@nogataka/smart-edit 1.0.1 → 1.0.2

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.
@@ -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"]'))s(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"&&s(u)}).observe(document,{childList:!0,subtree:!0});function a(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 s(o){if(o.ep)return;o.ep=!0;const c=a(o);fetch(o.href,c)}})();var pu={exports:{}},Os={};var ym;function Yv(){if(ym)return Os;ym=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function a(s,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:i,type:s,key:u,ref:o!==void 0?o:null,props:c}}return Os.Fragment=e,Os.jsx=a,Os.jsxs=a,Os}var bm;function qv(){return bm||(bm=1,pu.exports=Yv()),pu.exports}var S=qv(),yu={exports:{}},rt={};var vm;function Xv(){if(vm)return rt;vm=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=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"),_=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=_&&D[_]||D["@@iterator"],typeof D=="function"?D:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function z(D,U,Z){this.props=D,this.context=U,this.refs=A,this.updater=Z||T}z.prototype.isReactComponent={},z.prototype.setState=function(D,U){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,U,"setState")},z.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function H(){}H.prototype=z.prototype;function Y(D,U,Z){this.props=D,this.context=U,this.refs=A,this.updater=Z||T}var G=Y.prototype=new H;G.constructor=Y,M(G,z.prototype),G.isPureReactComponent=!0;var q=Array.isArray;function K(){}var Q={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function tt(D,U,Z){var W=Z.ref;return{$$typeof:i,type:D,key:U,ref:W!==void 0?W:null,props:Z}}function ct(D,U){return tt(D.type,U,D.props)}function at(D){return typeof D=="object"&&D!==null&&D.$$typeof===i}function it(D){var U={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(Z){return U[Z]})}var kt=/\/+/g;function Vt(D,U){return typeof D=="object"&&D!==null&&D.key!=null?it(""+D.key):U.toString(36)}function dt(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(K,K):(D.status="pending",D.then(function(U){D.status==="pending"&&(D.status="fulfilled",D.value=U)},function(U){D.status==="pending"&&(D.status="rejected",D.reason=U)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function j(D,U,Z,W,st){var ot=typeof D;(ot==="undefined"||ot==="boolean")&&(D=null);var Et=!1;if(D===null)Et=!0;else switch(ot){case"bigint":case"string":case"number":Et=!0;break;case"object":switch(D.$$typeof){case i:case e:Et=!0;break;case p:return Et=D._init,j(Et(D._payload),U,Z,W,st)}}if(Et)return st=st(D),Et=W===""?"."+Vt(D,0):W,q(st)?(Z="",Et!=null&&(Z=Et.replace(kt,"$&/")+"/"),j(st,U,Z,"",function(ja){return ja})):st!=null&&(at(st)&&(st=ct(st,Z+(st.key==null||D&&D.key===st.key?"":(""+st.key).replace(kt,"$&/")+"/")+Et)),U.push(st)),1;Et=0;var he=W===""?".":W+":";if(q(D))for(var Qt=0;Qt<D.length;Qt++)W=D[Qt],ot=he+Vt(W,Qt),Et+=j(W,U,Z,ot,st);else if(Qt=x(D),typeof Qt=="function")for(D=Qt.call(D),Qt=0;!(W=D.next()).done;)W=W.value,ot=he+Vt(W,Qt++),Et+=j(W,U,Z,ot,st);else if(ot==="object"){if(typeof D.then=="function")return j(dt(D),U,Z,W,st);throw U=String(D),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Et}function X(D,U,Z){if(D==null)return D;var W=[],st=0;return j(D,W,"","",function(ot){return U.call(Z,ot,st++)}),W}function P(D){if(D._status===-1){var U=D._result;U=U(),U.then(function(Z){(D._status===0||D._status===-1)&&(D._status=1,D._result=Z)},function(Z){(D._status===0||D._status===-1)&&(D._status=2,D._result=Z)}),D._status===-1&&(D._status=0,D._result=U)}if(D._status===1)return D._result.default;throw D._result}var lt=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},_t={map:X,forEach:function(D,U,Z){X(D,function(){U.apply(this,arguments)},Z)},count:function(D){var U=0;return X(D,function(){U++}),U},toArray:function(D){return X(D,function(U){return U})||[]},only:function(D){if(!at(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return rt.Activity=b,rt.Children=_t,rt.Component=z,rt.Fragment=a,rt.Profiler=o,rt.PureComponent=Y,rt.StrictMode=s,rt.Suspense=d,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,rt.__COMPILER_RUNTIME={__proto__:null,c:function(D){return Q.H.useMemoCache(D)}},rt.cache=function(D){return function(){return D.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(D,U,Z){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var W=M({},D.props),st=D.key;if(U!=null)for(ot in U.key!==void 0&&(st=""+U.key),U)!F.call(U,ot)||ot==="key"||ot==="__self"||ot==="__source"||ot==="ref"&&U.ref===void 0||(W[ot]=U[ot]);var ot=arguments.length-2;if(ot===1)W.children=Z;else if(1<ot){for(var Et=Array(ot),he=0;he<ot;he++)Et[he]=arguments[he+2];W.children=Et}return tt(D.type,st,W)},rt.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:c,_context:D},D},rt.createElement=function(D,U,Z){var W,st={},ot=null;if(U!=null)for(W in U.key!==void 0&&(ot=""+U.key),U)F.call(U,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(st[W]=U[W]);var Et=arguments.length-2;if(Et===1)st.children=Z;else if(1<Et){for(var he=Array(Et),Qt=0;Qt<Et;Qt++)he[Qt]=arguments[Qt+2];st.children=he}if(D&&D.defaultProps)for(W in Et=D.defaultProps,Et)st[W]===void 0&&(st[W]=Et[W]);return tt(D,ot,st)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(D){return{$$typeof:f,render:D}},rt.isValidElement=at,rt.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:P}},rt.memo=function(D,U){return{$$typeof:m,type:D,compare:U===void 0?null:U}},rt.startTransition=function(D){var U=Q.T,Z={};Q.T=Z;try{var W=D(),st=Q.S;st!==null&&st(Z,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(K,lt)}catch(ot){lt(ot)}finally{U!==null&&Z.types!==null&&(U.types=Z.types),Q.T=U}},rt.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},rt.use=function(D){return Q.H.use(D)},rt.useActionState=function(D,U,Z){return Q.H.useActionState(D,U,Z)},rt.useCallback=function(D,U){return Q.H.useCallback(D,U)},rt.useContext=function(D){return Q.H.useContext(D)},rt.useDebugValue=function(){},rt.useDeferredValue=function(D,U){return Q.H.useDeferredValue(D,U)},rt.useEffect=function(D,U){return Q.H.useEffect(D,U)},rt.useEffectEvent=function(D){return Q.H.useEffectEvent(D)},rt.useId=function(){return Q.H.useId()},rt.useImperativeHandle=function(D,U,Z){return Q.H.useImperativeHandle(D,U,Z)},rt.useInsertionEffect=function(D,U){return Q.H.useInsertionEffect(D,U)},rt.useLayoutEffect=function(D,U){return Q.H.useLayoutEffect(D,U)},rt.useMemo=function(D,U){return Q.H.useMemo(D,U)},rt.useOptimistic=function(D,U){return Q.H.useOptimistic(D,U)},rt.useReducer=function(D,U,Z){return Q.H.useReducer(D,U,Z)},rt.useRef=function(D){return Q.H.useRef(D)},rt.useState=function(D){return Q.H.useState(D)},rt.useSyncExternalStore=function(D,U,Z){return Q.H.useSyncExternalStore(D,U,Z)},rt.useTransition=function(){return Q.H.useTransition()},rt.version="19.2.4",rt}var _m;function $u(){return _m||(_m=1,yu.exports=Xv()),yu.exports}var J=$u(),bu={exports:{}},Ds={},vu={exports:{}},_u={};var xm;function Gv(){return xm||(xm=1,(function(i){function e(j,X){var P=j.length;j.push(X);t:for(;0<P;){var lt=P-1>>>1,_t=j[lt];if(0<o(_t,X))j[lt]=X,j[P]=_t,P=lt;else break t}}function a(j){return j.length===0?null:j[0]}function s(j){if(j.length===0)return null;var X=j[0],P=j.pop();if(P!==X){j[0]=P;t:for(var lt=0,_t=j.length,D=_t>>>1;lt<D;){var U=2*(lt+1)-1,Z=j[U],W=U+1,st=j[W];if(0>o(Z,P))W<_t&&0>o(st,Z)?(j[lt]=st,j[W]=P,lt=W):(j[lt]=Z,j[U]=P,lt=U);else if(W<_t&&0>o(st,P))j[lt]=st,j[W]=P,lt=W;else break t}}return X}function o(j,X){var P=j.sortIndex-X.sortIndex;return P!==0?P:j.id-X.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;i.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();i.unstable_now=function(){return u.now()-f}}var d=[],m=[],p=1,b=null,_=3,x=!1,T=!1,M=!1,A=!1,z=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function G(j){for(var X=a(m);X!==null;){if(X.callback===null)s(m);else if(X.startTime<=j)s(m),X.sortIndex=X.expirationTime,e(d,X);else break;X=a(m)}}function q(j){if(M=!1,G(j),!T)if(a(d)!==null)T=!0,K||(K=!0,it());else{var X=a(m);X!==null&&dt(q,X.startTime-j)}}var K=!1,Q=-1,F=5,tt=-1;function ct(){return A?!0:!(i.unstable_now()-tt<F)}function at(){if(A=!1,K){var j=i.unstable_now();tt=j;var X=!0;try{t:{T=!1,M&&(M=!1,H(Q),Q=-1),x=!0;var P=_;try{e:{for(G(j),b=a(d);b!==null&&!(b.expirationTime>j&&ct());){var lt=b.callback;if(typeof lt=="function"){b.callback=null,_=b.priorityLevel;var _t=lt(b.expirationTime<=j);if(j=i.unstable_now(),typeof _t=="function"){b.callback=_t,G(j),X=!0;break e}b===a(d)&&s(d),G(j)}else s(d);b=a(d)}if(b!==null)X=!0;else{var D=a(m);D!==null&&dt(q,D.startTime-j),X=!1}}break t}finally{b=null,_=P,x=!1}X=void 0}}finally{X?it():K=!1}}}var it;if(typeof Y=="function")it=function(){Y(at)};else if(typeof MessageChannel<"u"){var kt=new MessageChannel,Vt=kt.port2;kt.port1.onmessage=at,it=function(){Vt.postMessage(null)}}else it=function(){z(at,0)};function dt(j,X){Q=z(function(){j(i.unstable_now())},X)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(j){j.callback=null},i.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<j?Math.floor(1e3/j):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(j){switch(_){case 1:case 2:case 3:var X=3;break;default:X=_}var P=_;_=X;try{return j()}finally{_=P}},i.unstable_requestPaint=function(){A=!0},i.unstable_runWithPriority=function(j,X){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var P=_;_=j;try{return X()}finally{_=P}},i.unstable_scheduleCallback=function(j,X,P){var lt=i.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?lt+P:lt):P=lt,j){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=P+_t,j={id:p++,callback:X,priorityLevel:j,startTime:P,expirationTime:_t,sortIndex:-1},P>lt?(j.sortIndex=P,e(m,j),a(d)===null&&j===a(m)&&(M?(H(Q),Q=-1):M=!0,dt(q,P-lt))):(j.sortIndex=_t,e(d,j),T||x||(T=!0,K||(K=!0,it()))),j},i.unstable_shouldYield=ct,i.unstable_wrapCallback=function(j){var X=_;return function(){var P=_;_=X;try{return j.apply(this,arguments)}finally{_=P}}}})(_u)),_u}var Sm;function Qv(){return Sm||(Sm=1,vu.exports=Gv()),vu.exports}var xu={exports:{}},ce={};var Tm;function Zv(){if(Tm)return ce;Tm=1;var i=$u();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 a(){}var s={d:{f:a,r:function(){throw Error(e(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},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=i.__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=s,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=s.p;try{if(u.T=null,s.p=2,d)return d()}finally{u.T=m,s.p=p,s.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,s.d.C(d,m))},ce.prefetchDNS=function(d){typeof d=="string"&&s.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),_=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?s.d.S(d,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:_,fetchPriority:x}):p==="script"&&s.d.X(d,{crossOrigin:b,integrity:_,fetchPriority:x,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);s.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&&s.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);s.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);s.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 s.d.m(d)},ce.requestFormReset=function(d){s.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 Mm;function Kv(){if(Mm)return xu.exports;Mm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),xu.exports=Zv(),xu.exports}var Em;function Fv(){if(Em)return Ds;Em=1;var i=Qv(),e=$u(),a=Kv();function s(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(s(188))}function m(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(s(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(s(188))}if(l.return!==r.return)l=h,r=g;else{for(var y=!1,v=h.child;v;){if(v===l){y=!0,l=h,r=g;break}if(v===r){y=!0,r=h,l=g;break}v=v.sibling}if(!y){for(v=g.child;v;){if(v===l){y=!0,l=g,r=h;break}if(v===r){y=!0,r=g,l=h;break}v=v.sibling}if(!y)throw Error(s(189))}}if(l.alternate!==r)throw Error(s(190))}if(l.tag!==3)throw Error(s(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,_=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),tt=Symbol.for("react.activity"),ct=Symbol.for("react.memo_cache_sentinel"),at=Symbol.iterator;function it(t){return t===null||typeof t!="object"?null:(t=at&&t[at]||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 z:return"Profiler";case A:return"StrictMode";case q:return"Suspense";case K:return"SuspenseList";case tt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case T:return"Portal";case Y:return t.displayName||"Context";case H: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 Q: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,j=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},lt=[],_t=-1;function D(t){return{current:t}}function U(t){0>_t||(t.current=lt[_t],lt[_t]=null,_t--)}function Z(t,n){_t++,lt[_t]=t.current,t.current=n}var W=D(null),st=D(null),ot=D(null),Et=D(null);function he(t,n){switch(Z(ot,n),Z(st,t),Z(W,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Vg(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Vg(n),t=Yg(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}U(W),Z(W,t)}function Qt(){U(W),U(st),U(ot)}function ja(t){t.memoizedState!==null&&Z(Et,t);var n=W.current,l=Yg(n,t.type);n!==l&&(Z(st,t),Z(W,l))}function $s(t){st.current===t&&(U(W),U(st)),Et.current===t&&(U(Et),Ts._currentValue=P)}var $o,pf;function di(t){if($o===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);$o=n&&n[1]||"",pf=-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 _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(`
2
2
  at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+$o+t+pf}var Po=!1;function tr(t,n){if(!t||Po)return"";Po=!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 N=k}Reflect.construct(t,[],V)}else{try{V.call()}catch(k){N=k}t.call(V.prototype)}}else{try{throw Error()}catch(k){N=k}(V=t())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(k){if(k&&N&&typeof k.stack=="string")return[k.stack,N.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],v=g[1];if(y&&v){var E=y.split(`
4
- `),w=v.split(`
5
- `);for(h=r=0;r<E.length&&!E[r].includes("DetermineComponentFrameRoot");)r++;for(;h<w.length&&!w[h].includes("DetermineComponentFrameRoot");)h++;if(r===E.length||h===w.length)for(r=E.length-1,h=w.length-1;1<=r&&0<=h&&E[r]!==w[h];)h--;for(;1<=r&&0<=h;r--,h--)if(E[r]!==w[h]){if(r!==1||h!==1)do if(r--,h--,0>h||E[r]!==w[h]){var L=`
6
- `+E[r].replace(" at new "," at ");return t.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",t.displayName)),L}while(1<=r&&0<=h);break}}}finally{Po=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?di(l):""}function by(t,n){switch(t.tag){case 26:case 27:case 5:return di(t.type);case 16:return di("Lazy");case 13:return t.child!==n&&n!==null?di("Suspense Fallback"):di("Suspense");case 19:return di("SuspenseList");case 0:case 15:return tr(t.type,!1);case 11:return tr(t.type.render,!1);case 1:return tr(t.type,!0);case 31:return di("Activity");default:return""}}function yf(t){try{var n="",l=null;do n+=by(t,l),l=t,t=t.return;while(t);return n}catch(r){return`
3
+ `+er+t+xf}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(N){var R=N}Reflect.construct(t,[],V)}else{try{V.call()}catch(N){R=N}t.call(V.prototype)}}else{try{throw Error()}catch(N){R=N}(V=t())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(N){if(N&&R&&typeof N.stack=="string")return[N.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],x=g[1];if(y&&x){var E=y.split(`
4
+ `),j=x.split(`
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:"")?gi(l):""}function My(t,n){switch(t.tag){case 26:case 27:case 5:return gi(t.type);case 16:return gi("Lazy");case 13:return t.child!==n&&n!==null?gi("Suspense Fallback"):gi("Suspense");case 19:return gi("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 gi("Activity");default:return""}}function _f(t){try{var n="",l=null;do n+=My(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 er=Object.prototype.hasOwnProperty,nr=i.unstable_scheduleCallback,ir=i.unstable_cancelCallback,vy=i.unstable_shouldYield,_y=i.unstable_requestPaint,Ee=i.unstable_now,xy=i.unstable_getCurrentPriorityLevel,bf=i.unstable_ImmediatePriority,vf=i.unstable_UserBlockingPriority,Ps=i.unstable_NormalPriority,Sy=i.unstable_LowPriority,_f=i.unstable_IdlePriority,Ty=i.log,My=i.unstable_setDisableYieldValue,ka=null,Ae=null;function kn(t){if(typeof Ty=="function"&&My(t),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(ka,t)}catch{}}var Oe=Math.clz32?Math.clz32:Oy,Ey=Math.log,Ay=Math.LN2;function Oy(t){return t>>>=0,t===0?32:31-(Ey(t)/Ay|0)|0}var tl=256,el=262144,nl=4194304;function gi(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 il(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 v=r&134217727;return v!==0?(r=v&~g,r!==0?h=gi(r):(y&=v,y!==0?h=gi(y):l||(l=v&~t,l!==0&&(h=gi(l))))):(v=r&~g,v!==0?h=gi(v):y!==0?h=gi(y):l||(l=r&~t,l!==0&&(h=gi(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 La(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Dy(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 xf(){var t=nl;return nl<<=1,(nl&62914560)===0&&(nl=4194304),t}function ar(t){for(var n=[],l=0;31>l;l++)n.push(t);return n}function Ha(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Cy(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 v=t.entanglements,E=t.expirationTimes,w=t.hiddenUpdates;for(l=y&~l;0<l;){var L=31-Oe(l),V=1<<L;v[L]=0,E[L]=-1;var N=w[L];if(N!==null)for(w[L]=null,L=0;L<N.length;L++){var k=N[L];k!==null&&(k.lane&=-536870913)}l&=~V}r!==0&&Sf(t,r,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(y&~n))}function Sf(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 Tf(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 Mf(t,n){var l=n&-n;return l=(l&42)!==0?1:sr(l),(l&(t.suspendedLanes|n))!==0?0:l}function sr(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 lr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ef(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:um(t.type))}function Af(t,n){var l=X.p;try{return X.p=t,n()}finally{X.p=l}}var Ln=Math.random().toString(36).slice(2),ie="__reactFiber$"+Ln,ge="__reactProps$"+Ln,qi="__reactContainer$"+Ln,or="__reactEvents$"+Ln,zy="__reactListeners$"+Ln,Ry="__reactHandles$"+Ln,Of="__reactResources$"+Ln,Ba="__reactMarker$"+Ln;function rr(t){delete t[ie],delete t[ge],delete t[or],delete t[zy],delete t[Ry]}function Xi(t){var n=t[ie];if(n)return n;for(var l=t.parentNode;l;){if(n=l[qi]||l[ie]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(t=Fg(t);t!==null;){if(l=t[ie])return l;t=Fg(t)}return n}t=l,l=t.parentNode}return null}function Gi(t){if(t=t[ie]||t[qi]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Ua(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(s(33))}function Qi(t){var n=t[Of];return n||(n=t[Of]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ee(t){t[Ba]=!0}var Df=new Set,Cf={};function mi(t,n){Zi(t,n),Zi(t+"Capture",n)}function Zi(t,n){for(Cf[t]=n,t=0;t<n.length;t++)Df.add(n[t])}var wy=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]*$"),zf={},Rf={};function Ny(t){return er.call(Rf,t)?!0:er.call(zf,t)?!1:wy.test(t)?Rf[t]=!0:(zf[t]=!0,!1)}function al(t,n,l){if(Ny(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 sl(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 wf(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function jy(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 cr(t){if(!t._valueTracker){var n=wf(t)?"checked":"value";t._valueTracker=jy(t,n,""+t[n])}}function Nf(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var l=n.getValue(),r="";return t&&(r=wf(t)?t.checked?"true":"false":t.value),t=r,t!==l?(n.setValue(t),!0):!1}function ll(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 ky=/[\n"\\]/g;function Be(t){return t.replace(ky,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ur(t,n,l,r,h,g,y,v){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?fr(t,y,He(n)):l!=null?fr(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"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.name=""+He(v):t.removeAttribute("name")}function jf(t,n,l,r,h,g,y,v){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)){cr(t);return}l=l!=null?""+He(l):"",n=n!=null?""+He(n):l,v||n===t.value||(t.value=n),t.defaultValue=n}r=r??h,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=v?t.checked:!!r,t.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),cr(t)}function fr(t,n,l){n==="number"&&ll(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Ki(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 kf(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 Lf(t,n,l,r){if(n==null){if(r!=null){if(l!=null)throw Error(s(92));if(dt(r)){if(1<r.length)throw Error(s(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),cr(t)}function Fi(t,n){if(n){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=n;return}}t.textContent=n}var Ly=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 Hf(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||Ly.has(n)?n==="float"?t.cssFloat=l:t[n]=(""+l).trim():t[n]=l+"px"}function Bf(t,n,l){if(n!=null&&typeof n!="object")throw Error(s(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&&Hf(t,h,r)}else for(var g in n)n.hasOwnProperty(g)&&Hf(t,g,n[g])}function hr(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 Hy=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"]]),By=/^[\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 ol(t){return By.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function un(){}var dr=null;function gr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Wi=null,Ji=null;function Uf(t){var n=Gi(t);if(n&&(t=n.stateNode)){var l=t[ge]||null;t:switch(t=n.stateNode,n.type){case"input":if(ur(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[ge]||null;if(!h)throw Error(s(90));ur(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&&Nf(r)}break t;case"textarea":kf(t,l.value,l.defaultValue);break t;case"select":n=l.value,n!=null&&Ki(t,!!l.multiple,n,!1)}}}var mr=!1;function Vf(t,n,l){if(mr)return t(n,l);mr=!0;try{var r=t(n);return r}finally{if(mr=!1,(Wi!==null||Ji!==null)&&(Fl(),Wi&&(n=Wi,t=Ji,Ji=Wi=null,Uf(n),t)))for(n=0;n<t.length;n++)Uf(t[n])}}function Va(t,n){var l=t.stateNode;if(l===null)return null;var r=l[ge]||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(s(231,n,typeof l));return l}var fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pr=!1;if(fn)try{var Ya={};Object.defineProperty(Ya,"passive",{get:function(){pr=!0}}),window.addEventListener("test",Ya,Ya),window.removeEventListener("test",Ya,Ya)}catch{pr=!1}var Hn=null,yr=null,rl=null;function Yf(){if(rl)return rl;var t,n=yr,l=n.length,r,h="value"in Hn?Hn.value:Hn.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 rl=h.slice(t,1<r?1-r:void 0)}function cl(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 ul(){return!0}function qf(){return!1}function me(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 v in t)t.hasOwnProperty(v)&&(l=t[v],this[v]=l?l(g):g[v]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?ul:qf,this.isPropagationStopped=qf,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=ul)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ul)},persist:function(){},isPersistent:ul}),n}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fl=me(pi),qa=b({},pi,{view:0,detail:0}),Uy=me(qa),br,vr,Xa,hl=b({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xr,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!==Xa&&(Xa&&t.type==="mousemove"?(br=t.screenX-Xa.screenX,vr=t.screenY-Xa.screenY):vr=br=0,Xa=t),br)},movementY:function(t){return"movementY"in t?t.movementY:vr}}),Xf=me(hl),Vy=b({},hl,{dataTransfer:0}),Yy=me(Vy),qy=b({},qa,{relatedTarget:0}),_r=me(qy),Xy=b({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),Gy=me(Xy),Qy=b({},pi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Zy=me(Qy),Ky=b({},pi,{data:0}),Gf=me(Ky),Fy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wy={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"},Jy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iy(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Jy[t])?!!n[t]:!1}function xr(){return Iy}var $y=b({},qa,{key:function(t){if(t.key){var n=Fy[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=cl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Wy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xr,charCode:function(t){return t.type==="keypress"?cl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?cl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Py=me($y),tb=b({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qf=me(tb),eb=b({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xr}),nb=me(eb),ib=b({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),ab=me(ib),sb=b({},hl,{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}),lb=me(sb),ob=b({},pi,{newState:0,oldState:0}),rb=me(ob),cb=[9,13,27,32],Sr=fn&&"CompositionEvent"in window,Ga=null;fn&&"documentMode"in document&&(Ga=document.documentMode);var ub=fn&&"TextEvent"in window&&!Ga,Zf=fn&&(!Sr||Ga&&8<Ga&&11>=Ga),Kf=" ",Ff=!1;function Wf(t,n){switch(t){case"keyup":return cb.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ii=!1;function fb(t,n){switch(t){case"compositionend":return Jf(n);case"keypress":return n.which!==32?null:(Ff=!0,Kf);case"textInput":return t=n.data,t===Kf&&Ff?null:t;default:return null}}function hb(t,n){if(Ii)return t==="compositionend"||!Sr&&Wf(t,n)?(t=Yf(),rl=yr=Hn=null,Ii=!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 Zf&&n.locale!=="ko"?null:n.data;default:return null}}var db={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 If(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!db[t.type]:n==="textarea"}function $f(t,n,l,r){Wi?Ji?Ji.push(r):Ji=[r]:Wi=r,n=eo(n,"onChange"),0<n.length&&(l=new fl("onChange","change",null,l,r),t.push({event:l,listeners:n}))}var Qa=null,Za=null;function gb(t){jg(t,0)}function dl(t){var n=Ua(t);if(Nf(n))return t}function Pf(t,n){if(t==="change")return n}var th=!1;if(fn){var Tr;if(fn){var Mr="oninput"in document;if(!Mr){var eh=document.createElement("div");eh.setAttribute("oninput","return;"),Mr=typeof eh.oninput=="function"}Tr=Mr}else Tr=!1;th=Tr&&(!document.documentMode||9<document.documentMode)}function nh(){Qa&&(Qa.detachEvent("onpropertychange",ih),Za=Qa=null)}function ih(t){if(t.propertyName==="value"&&dl(Za)){var n=[];$f(n,Za,t,gr(t)),Vf(gb,n)}}function mb(t,n,l){t==="focusin"?(nh(),Qa=n,Za=l,Qa.attachEvent("onpropertychange",ih)):t==="focusout"&&nh()}function pb(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return dl(Za)}function yb(t,n){if(t==="click")return dl(n)}function bb(t,n){if(t==="input"||t==="change")return dl(n)}function vb(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var De=typeof Object.is=="function"?Object.is:vb;function Ka(t,n){if(De(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(!er.call(n,h)||!De(t[h],n[h]))return!1}return!0}function ah(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function sh(t,n){var l=ah(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=ah(l)}}function lh(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?lh(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function oh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=ll(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=ll(t.document)}return n}function Er(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 _b=fn&&"documentMode"in document&&11>=document.documentMode,$i=null,Ar=null,Fa=null,Or=!1;function rh(t,n,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Or||$i==null||$i!==ll(r)||(r=$i,"selectionStart"in r&&Er(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}),Fa&&Ka(Fa,r)||(Fa=r,r=eo(Ar,"onSelect"),0<r.length&&(n=new fl("onSelect","select",null,n,l),t.push({event:n,listeners:r}),n.target=$i)))}function yi(t,n){var l={};return l[t.toLowerCase()]=n.toLowerCase(),l["Webkit"+t]="webkit"+n,l["Moz"+t]="moz"+n,l}var Pi={animationend:yi("Animation","AnimationEnd"),animationiteration:yi("Animation","AnimationIteration"),animationstart:yi("Animation","AnimationStart"),transitionrun:yi("Transition","TransitionRun"),transitionstart:yi("Transition","TransitionStart"),transitioncancel:yi("Transition","TransitionCancel"),transitionend:yi("Transition","TransitionEnd")},Dr={},ch={};fn&&(ch=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function bi(t){if(Dr[t])return Dr[t];if(!Pi[t])return t;var n=Pi[t],l;for(l in n)if(n.hasOwnProperty(l)&&l in ch)return Dr[t]=n[l];return t}var uh=bi("animationend"),fh=bi("animationiteration"),hh=bi("animationstart"),xb=bi("transitionrun"),Sb=bi("transitionstart"),Tb=bi("transitioncancel"),dh=bi("transitionend"),gh=new Map,Cr="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(" ");Cr.push("scrollEnd");function We(t,n){gh.set(t,n),mi(n,[t])}var gl=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=[],ta=0,zr=0;function ml(){for(var t=ta,n=zr=ta=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&&mh(l,h,g)}}function pl(t,n,l,r){Ue[ta++]=t,Ue[ta++]=n,Ue[ta++]=l,Ue[ta++]=r,zr|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function Rr(t,n,l,r){return pl(t,n,l,r),yl(t)}function vi(t,n){return pl(t,null,null,n),yl(t)}function mh(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 yl(t){if(50<ps)throw ps=0,Vc=null,Error(s(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var ea={};function Mb(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 Ce(t,n,l,r){return new Mb(t,n,l,r)}function wr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function hn(t,n){var l=t.alternate;return l===null?(l=Ce(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 ph(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 bl(t,n,l,r,h,g){var y=0;if(r=t,typeof t=="function")wr(t)&&(y=1);else if(typeof t=="string")y=Cv(t,l,W.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case tt:return t=Ce(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 z:return t=Ce(12,l,n,h|2),t.elementType=z,t.lanes=g,t;case q:return t=Ce(13,l,n,h),t.elementType=q,t.lanes=g,t;case K:return t=Ce(19,l,n,h),t.elementType=K,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Y:y=10;break t;case H:y=9;break t;case G:y=11;break t;case Q:y=14;break t;case F:y=16,r=null;break t}y=29,l=Error(s(130,t===null?"null":typeof t,"")),r=null}return n=Ce(y,l,n,h),n.elementType=t,n.type=r,n.lanes=g,n}function _i(t,n,l,r){return t=Ce(7,t,r,n),t.lanes=l,t}function Nr(t,n,l){return t=Ce(6,t,null,n),t.lanes=l,t}function yh(t){var n=Ce(18,null,null,0);return n.stateNode=t,n}function jr(t,n,l){return n=Ce(4,t.children!==null?t.children:[],t.key,n),n.lanes=l,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var bh=new WeakMap;function Ve(t,n){if(typeof t=="object"&&t!==null){var l=bh.get(t);return l!==void 0?l:(n={value:t,source:n,stack:yf(n)},bh.set(t,n),n)}return{value:t,source:n,stack:yf(n)}}var na=[],ia=0,vl=null,Wa=0,Ye=[],qe=0,Bn=null,$e=1,Pe="";function dn(t,n){na[ia++]=Wa,na[ia++]=vl,vl=t,Wa=n}function vh(t,n,l){Ye[qe++]=$e,Ye[qe++]=Pe,Ye[qe++]=Bn,Bn=t;var r=$e;t=Pe;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,Pe=g+t}else $e=1<<g|l<<h|r,Pe=t}function kr(t){t.return!==null&&(dn(t,1),vh(t,1,0))}function Lr(t){for(;t===vl;)vl=na[--ia],na[ia]=null,Wa=na[--ia],na[ia]=null;for(;t===Bn;)Bn=Ye[--qe],Ye[qe]=null,Pe=Ye[--qe],Ye[qe]=null,$e=Ye[--qe],Ye[qe]=null}function _h(t,n){Ye[qe++]=$e,Ye[qe++]=Pe,Ye[qe++]=Bn,$e=n.id,Pe=n.overflow,Bn=t}var ae=null,Lt=null,vt=!1,Un=null,Xe=!1,Hr=Error(s(519));function Vn(t){var n=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ja(Ve(n,t)),Hr}function xh(t){var n=t.stateNode,l=t.type,r=t.memoizedProps;switch(n[ie]=t,n[ge]=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<bs.length;l++)mt(bs[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),jf(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),Lf(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||Bg(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||Vn(t,!0)}function Sh(t){for(ae=t.return;ae;)switch(ae.tag){case 5:case 31:case 13:Xe=!1;return;case 27:case 3:Xe=!0;return;default:ae=ae.return}}function aa(t){if(t!==ae)return!1;if(!vt)return Sh(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")||eu(t.type,t.memoizedProps)),l=!l),l&&Lt&&Vn(t),Sh(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));Lt=Kg(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));Lt=Kg(t)}else n===27?(n=Lt,ti(t.type)?(t=lu,lu=null,Lt=t):Lt=n):Lt=ae?Qe(t.stateNode.nextSibling):null;return!0}function xi(){Lt=ae=null,vt=!1}function Br(){var t=Un;return t!==null&&(ve===null?ve=t:ve.push.apply(ve,t),Un=null),t}function Ja(t){Un===null?Un=[t]:Un.push(t)}var Ur=D(null),Si=null,gn=null;function Yn(t,n,l){Z(Ur,n._currentValue),n._currentValue=l}function mn(t){t._currentValue=Ur.current,U(Ur)}function Vr(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 Yr(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 v=g;g=h;for(var E=0;E<n.length;E++)if(v.context===n[E]){g.lanes|=l,v=g.alternate,v!==null&&(v.lanes|=l),Vr(g.return,l,t),r||(y=null);break t}g=v.next}}else if(h.tag===18){if(y=h.return,y===null)throw Error(s(341));y.lanes|=l,g=y.alternate,g!==null&&(g.lanes|=l),Vr(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 sa(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(s(387));if(y=y.memoizedProps,y!==null){var v=h.type;De(h.pendingProps.value,y.value)||(t!==null?t.push(v):t=[v])}}else if(h===Et.current){if(y=h.alternate,y===null)throw Error(s(387));y.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Ts):t=[Ts])}h=h.return}t!==null&&Yr(n,t,l,r),n.flags|=262144}function _l(t){for(t=t.firstContext;t!==null;){if(!De(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ti(t){Si=t,gn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function se(t){return Th(Si,t)}function xl(t,n){return Si===null&&Ti(t),Th(t,n)}function Th(t,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},gn===null){if(t===null)throw Error(s(308));gn=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else gn=gn.next=n;return l}var Eb=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()})}},Ab=i.unstable_scheduleCallback,Ob=i.unstable_NormalPriority,Wt={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qr(){return{controller:new Eb,data:new Map,refCount:0}}function Ia(t){t.refCount--,t.refCount===0&&Ab(Ob,function(){t.controller.abort()})}var $a=null,Xr=0,la=0,oa=null;function Db(t,n){if($a===null){var l=$a=[];Xr=0,la=Zc(),oa={status:"pending",value:void 0,then:function(r){l.push(r)}}}return Xr++,n.then(Mh,Mh),n}function Mh(){if(--Xr===0&&$a!==null){oa!==null&&(oa.status="fulfilled");var t=$a;$a=null,la=0,oa=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Cb(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 Eh=j.S;j.S=function(t,n){rg=Ee(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Db(t,n),Eh!==null&&Eh(t,n)};var Mi=D(null);function Gr(){var t=Mi.current;return t!==null?t:Nt.pooledCache}function Sl(t,n){n===null?Z(Mi,Mi.current):Z(Mi,n.pool)}function Ah(){var t=Gr();return t===null?null:{parent:Wt._currentValue,pool:t}}var ra=Error(s(460)),Qr=Error(s(474)),Tl=Error(s(542)),Ml={then:function(){}};function Oh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Dh(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,zh(t),t;default:if(typeof n.status=="string")n.then(un,un);else{if(t=Nt,t!==null&&100<t.shellSuspendCounter)throw Error(s(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,zh(t),t}throw Ai=n,ra}}function Ei(t){try{var n=t._init;return n(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ai=l,ra):l}}var Ai=null;function Ch(){if(Ai===null)throw Error(s(459));var t=Ai;return Ai=null,t}function zh(t){if(t===ra||t===Tl)throw Error(s(483))}var ca=null,Pa=0;function El(t){var n=Pa;return Pa+=1,ca===null&&(ca=[]),Dh(ca,t,n)}function ts(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Al(t,n){throw n.$$typeof===_?Error(s(525)):(t=Object.prototype.toString.call(n),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function Rh(t){function n(C,O){if(t){var R=C.deletions;R===null?(C.deletions=[O],C.flags|=16):R.push(O)}}function l(C,O){if(!t)return null;for(;O!==null;)n(C,O),O=O.sibling;return null}function r(C){for(var O=new Map;C!==null;)C.key!==null?O.set(C.key,C):O.set(C.index,C),C=C.sibling;return O}function h(C,O){return C=hn(C,O),C.index=0,C.sibling=null,C}function g(C,O,R){return C.index=R,t?(R=C.alternate,R!==null?(R=R.index,R<O?(C.flags|=67108866,O):R):(C.flags|=67108866,O)):(C.flags|=1048576,O)}function y(C){return t&&C.alternate===null&&(C.flags|=67108866),C}function v(C,O,R,B){return O===null||O.tag!==6?(O=Nr(R,C.mode,B),O.return=C,O):(O=h(O,R),O.return=C,O)}function E(C,O,R,B){var et=R.type;return et===M?L(C,O,R.props.children,B,R.key):O!==null&&(O.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===F&&Ei(et)===O.type)?(O=h(O,R.props),ts(O,R),O.return=C,O):(O=bl(R.type,R.key,R.props,null,C.mode,B),ts(O,R),O.return=C,O)}function w(C,O,R,B){return O===null||O.tag!==4||O.stateNode.containerInfo!==R.containerInfo||O.stateNode.implementation!==R.implementation?(O=jr(R,C.mode,B),O.return=C,O):(O=h(O,R.children||[]),O.return=C,O)}function L(C,O,R,B,et){return O===null||O.tag!==7?(O=_i(R,C.mode,B,et),O.return=C,O):(O=h(O,R),O.return=C,O)}function V(C,O,R){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Nr(""+O,C.mode,R),O.return=C,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case x:return R=bl(O.type,O.key,O.props,null,C.mode,R),ts(R,O),R.return=C,R;case T:return O=jr(O,C.mode,R),O.return=C,O;case F:return O=Ei(O),V(C,O,R)}if(dt(O)||it(O))return O=_i(O,C.mode,R,null),O.return=C,O;if(typeof O.then=="function")return V(C,El(O),R);if(O.$$typeof===Y)return V(C,xl(C,O),R);Al(C,O)}return null}function N(C,O,R,B){var et=O!==null?O.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return et!==null?null:v(C,O,""+R,B);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case x:return R.key===et?E(C,O,R,B):null;case T:return R.key===et?w(C,O,R,B):null;case F:return R=Ei(R),N(C,O,R,B)}if(dt(R)||it(R))return et!==null?null:L(C,O,R,B,null);if(typeof R.then=="function")return N(C,O,El(R),B);if(R.$$typeof===Y)return N(C,O,xl(C,R),B);Al(C,R)}return null}function k(C,O,R,B,et){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return C=C.get(R)||null,v(O,C,""+B,et);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case x:return C=C.get(B.key===null?R:B.key)||null,E(O,C,B,et);case T:return C=C.get(B.key===null?R:B.key)||null,w(O,C,B,et);case F:return B=Ei(B),k(C,O,R,B,et)}if(dt(B)||it(B))return C=C.get(R)||null,L(O,C,B,et,null);if(typeof B.then=="function")return k(C,O,R,El(B),et);if(B.$$typeof===Y)return k(C,O,R,xl(O,B),et);Al(O,B)}return null}function I(C,O,R,B){for(var et=null,xt=null,$=O,ft=O=0,bt=null;$!==null&&ft<R.length;ft++){$.index>ft?(bt=$,$=null):bt=$.sibling;var St=N(C,$,R[ft],B);if(St===null){$===null&&($=bt);break}t&&$&&St.alternate===null&&n(C,$),O=g(St,O,ft),xt===null?et=St:xt.sibling=St,xt=St,$=bt}if(ft===R.length)return l(C,$),vt&&dn(C,ft),et;if($===null){for(;ft<R.length;ft++)$=V(C,R[ft],B),$!==null&&(O=g($,O,ft),xt===null?et=$:xt.sibling=$,xt=$);return vt&&dn(C,ft),et}for($=r($);ft<R.length;ft++)bt=k($,C,ft,R[ft],B),bt!==null&&(t&&bt.alternate!==null&&$.delete(bt.key===null?ft:bt.key),O=g(bt,O,ft),xt===null?et=bt:xt.sibling=bt,xt=bt);return t&&$.forEach(function(si){return n(C,si)}),vt&&dn(C,ft),et}function nt(C,O,R,B){if(R==null)throw Error(s(151));for(var et=null,xt=null,$=O,ft=O=0,bt=null,St=R.next();$!==null&&!St.done;ft++,St=R.next()){$.index>ft?(bt=$,$=null):bt=$.sibling;var si=N(C,$,St.value,B);if(si===null){$===null&&($=bt);break}t&&$&&si.alternate===null&&n(C,$),O=g(si,O,ft),xt===null?et=si:xt.sibling=si,xt=si,$=bt}if(St.done)return l(C,$),vt&&dn(C,ft),et;if($===null){for(;!St.done;ft++,St=R.next())St=V(C,St.value,B),St!==null&&(O=g(St,O,ft),xt===null?et=St:xt.sibling=St,xt=St);return vt&&dn(C,ft),et}for($=r($);!St.done;ft++,St=R.next())St=k($,C,ft,St.value,B),St!==null&&(t&&St.alternate!==null&&$.delete(St.key===null?ft:St.key),O=g(St,O,ft),xt===null?et=St:xt.sibling=St,xt=St);return t&&$.forEach(function(Vv){return n(C,Vv)}),vt&&dn(C,ft),et}function wt(C,O,R,B){if(typeof R=="object"&&R!==null&&R.type===M&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case x:t:{for(var et=R.key;O!==null;){if(O.key===et){if(et=R.type,et===M){if(O.tag===7){l(C,O.sibling),B=h(O,R.props.children),B.return=C,C=B;break t}}else if(O.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===F&&Ei(et)===O.type){l(C,O.sibling),B=h(O,R.props),ts(B,R),B.return=C,C=B;break t}l(C,O);break}else n(C,O);O=O.sibling}R.type===M?(B=_i(R.props.children,C.mode,B,R.key),B.return=C,C=B):(B=bl(R.type,R.key,R.props,null,C.mode,B),ts(B,R),B.return=C,C=B)}return y(C);case T:t:{for(et=R.key;O!==null;){if(O.key===et)if(O.tag===4&&O.stateNode.containerInfo===R.containerInfo&&O.stateNode.implementation===R.implementation){l(C,O.sibling),B=h(O,R.children||[]),B.return=C,C=B;break t}else{l(C,O);break}else n(C,O);O=O.sibling}B=jr(R,C.mode,B),B.return=C,C=B}return y(C);case F:return R=Ei(R),wt(C,O,R,B)}if(dt(R))return I(C,O,R,B);if(it(R)){if(et=it(R),typeof et!="function")throw Error(s(150));return R=et.call(R),nt(C,O,R,B)}if(typeof R.then=="function")return wt(C,O,El(R),B);if(R.$$typeof===Y)return wt(C,O,xl(C,R),B);Al(C,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,O!==null&&O.tag===6?(l(C,O.sibling),B=h(O,R),B.return=C,C=B):(l(C,O),B=Nr(R,C.mode,B),B.return=C,C=B),y(C)):l(C,O)}return function(C,O,R,B){try{Pa=0;var et=wt(C,O,R,B);return ca=null,et}catch($){if($===ra||$===Tl)throw $;var xt=Ce(29,$,null,C.mode);return xt.lanes=B,xt.return=C,xt}}}var Oi=Rh(!0),wh=Rh(!1),qn=!1;function Zr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kr(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 Xn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Gn(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=yl(t),mh(t,null,l),n}return pl(t,r,n,l),yl(t)}function es(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,Tf(t,l)}}function Fr(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 Wr=!1;function ns(){if(Wr){var t=oa;if(t!==null)throw t}}function is(t,n,l,r){Wr=!1;var h=t.updateQueue;qn=!1;var g=h.firstBaseUpdate,y=h.lastBaseUpdate,v=h.shared.pending;if(v!==null){h.shared.pending=null;var E=v,w=E.next;E.next=null,y===null?g=w:y.next=w,y=E;var L=t.alternate;L!==null&&(L=L.updateQueue,v=L.lastBaseUpdate,v!==y&&(v===null?L.firstBaseUpdate=w:v.next=w,L.lastBaseUpdate=E))}if(g!==null){var V=h.baseState;y=0,L=w=E=null,v=g;do{var N=v.lane&-536870913,k=N!==v.lane;if(k?(yt&N)===N:(r&N)===N){N!==0&&N===la&&(Wr=!0),L!==null&&(L=L.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var I=t,nt=v;N=n;var wt=l;switch(nt.tag){case 1:if(I=nt.payload,typeof I=="function"){V=I.call(wt,V,N);break t}V=I;break t;case 3:I.flags=I.flags&-65537|128;case 0:if(I=nt.payload,N=typeof I=="function"?I.call(wt,V,N):I,N==null)break t;V=b({},V,N);break t;case 2:qn=!0}}N=v.callback,N!==null&&(t.flags|=64,k&&(t.flags|=8192),k=h.callbacks,k===null?h.callbacks=[N]:k.push(N))}else k={lane:N,tag:v.tag,payload:v.payload,callback:v.callback,next:null},L===null?(w=L=k,E=V):L=L.next=k,y|=N;if(v=v.next,v===null){if(v=h.shared.pending,v===null)break;k=v,v=k.next,k.next=null,h.lastBaseUpdate=k,h.shared.pending=null}}while(!0);L===null&&(E=V),h.baseState=E,h.firstBaseUpdate=w,h.lastBaseUpdate=L,g===null&&(h.shared.lanes=0),Wn|=y,t.lanes=y,t.memoizedState=V}}function Nh(t,n){if(typeof t!="function")throw Error(s(191,t));t.call(n)}function jh(t,n){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Nh(l[t],n)}var ua=D(null),Ol=D(0);function kh(t,n){t=Mn,Z(Ol,t),Z(ua,n),Mn=t|n.baseLanes}function Jr(){Z(Ol,Mn),Z(ua,ua.current)}function Ir(){Mn=Ol.current,U(ua),U(Ol)}var ze=D(null),Ge=null;function Qn(t){var n=t.alternate;Z(Zt,Zt.current&1),Z(ze,t),Ge===null&&(n===null||ua.current!==null||n.memoizedState!==null)&&(Ge=t)}function $r(t){Z(Zt,Zt.current),Z(ze,t),Ge===null&&(Ge=t)}function Lh(t){t.tag===22?(Z(Zt,Zt.current),Z(ze,t),Ge===null&&(Ge=t)):Zn()}function Zn(){Z(Zt,Zt.current),Z(ze,ze.current)}function Re(t){U(ze),Ge===t&&(Ge=null),U(Zt)}var Zt=D(0);function Dl(t){for(var n=t;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||au(l)||su(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,Cl=!1,fa=!1,Di=!1,zl=0,as=0,ha=null,zb=0;function qt(){throw Error(s(321))}function Pr(t,n){if(n===null)return!1;for(var l=0;l<n.length&&l<t.length;l++)if(!De(t[l],n[l]))return!1;return!0}function tc(t,n,l,r,h,g){return pn=g,ut=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,j.H=t===null||t.memoizedState===null?vd:mc,Di=!1,g=l(r,h),Di=!1,fa&&(g=Bh(n,l,r,h)),Hh(t),g}function Hh(t){j.H=os;var n=zt!==null&&zt.next!==null;if(pn=0,Jt=zt=ut=null,Cl=!1,as=0,ha=null,n)throw Error(s(300));t===null||It||(t=t.dependencies,t!==null&&_l(t)&&(It=!0))}function Bh(t,n,l,r){ut=t;var h=0;do{if(fa&&(ha=null),as=0,fa=!1,25<=h)throw Error(s(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)}j.H=_d,g=n(l,r)}while(fa);return g}function Rb(){var t=j.H,n=t.useState()[0];return n=typeof n.then=="function"?ss(n):n,t=t.useState()[0],(zt!==null?zt.memoizedState:null)!==t&&(ut.flags|=1024),n}function ec(){var t=zl!==0;return zl=0,t}function nc(t,n,l){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~l}function ic(t){if(Cl){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Cl=!1}pn=0,Jt=zt=ut=null,fa=!1,as=zl=0,ha=null}function de(){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 Kt(){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(s(467)):Error(s(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 Rl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(t){var n=as;return as+=1,ha===null&&(ha=[]),t=Dh(ha,t,n),n=ut,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,j.H=n===null||n.memoizedState===null?vd:mc),t}function wl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ss(t);if(t.$$typeof===Y)return se(t)}throw Error(s(438,String(t)))}function ac(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=Rl(),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]=ct;return n.index++,l}function yn(t,n){return typeof n=="function"?n(t):n}function Nl(t){var n=Kt();return sc(n,zt,t)}function sc(t,n,l){var r=t.queue;if(r===null)throw Error(s(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 v=y=null,E=null,w=n,L=!1;do{var V=w.lane&-536870913;if(V!==w.lane?(yt&V)===V:(pn&V)===V){var N=w.revertLane;if(N===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null}),V===la&&(L=!0);else if((pn&N)===N){w=w.next,N===la&&(L=!0);continue}else V={lane:0,revertLane:w.revertLane,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},E===null?(v=E=V,y=g):E=E.next=V,ut.lanes|=N,Wn|=N;V=w.action,Di&&l(g,V),g=w.hasEagerState?w.eagerState:l(g,V)}else N={lane:V,revertLane:w.revertLane,gesture:w.gesture,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},E===null?(v=E=N,y=g):E=E.next=N,ut.lanes|=V,Wn|=V;w=w.next}while(w!==null&&w!==n);if(E===null?y=g:E.next=v,!De(g,t.memoizedState)&&(It=!0,L&&(l=oa,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 lc(t){var n=Kt(),l=n.queue;if(l===null)throw Error(s(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);De(g,n.memoizedState)||(It=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),l.lastRenderedState=g}return[g,r]}function Uh(t,n,l){var r=ut,h=Kt(),g=vt;if(g){if(l===void 0)throw Error(s(407));l=l()}else l=n();var y=!De((zt||h).memoizedState,l);if(y&&(h.memoizedState=l,It=!0),h=h.queue,cc(qh.bind(null,r,h,t),[t]),h.getSnapshot!==n||y||Jt!==null&&Jt.memoizedState.tag&1){if(r.flags|=2048,da(9,{destroy:void 0},Yh.bind(null,r,h,l,n),null),Nt===null)throw Error(s(349));g||(pn&127)!==0||Vh(r,n,l)}return l}function Vh(t,n,l){t.flags|=16384,t={getSnapshot:n,value:l},n=ut.updateQueue,n===null?(n=Rl(),ut.updateQueue=n,n.stores=[t]):(l=n.stores,l===null?n.stores=[t]:l.push(t))}function Yh(t,n,l,r){n.value=l,n.getSnapshot=r,Xh(n)&&Gh(t)}function qh(t,n,l){return l(function(){Xh(n)&&Gh(t)})}function Xh(t){var n=t.getSnapshot;t=t.value;try{var l=n();return!De(t,l)}catch{return!0}}function Gh(t){var n=vi(t,2);n!==null&&_e(n,t,2)}function oc(t){var n=de();if(typeof t=="function"){var l=t;if(t=l(),Di){kn(!0);try{l()}finally{kn(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:t},n}function Qh(t,n,l,r){return t.baseState=l,sc(t,zt,typeof r=="function"?r:yn)}function wb(t,n,l,r,h){if(Ll(t))throw Error(s(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)}};j.T!==null?l(!0):g.isTransition=!1,r(g),l=n.pending,l===null?(g.next=n.pending=g,Zh(n,g)):(g.next=l.next,n.pending=l.next=g)}}function Zh(t,n){var l=n.action,r=n.payload,h=t.state;if(n.isTransition){var g=j.T,y={};j.T=y;try{var v=l(h,r),E=j.S;E!==null&&E(y,v),Kh(t,n,v)}catch(w){rc(t,n,w)}finally{g!==null&&y.types!==null&&(g.types=y.types),j.T=g}}else try{g=l(h,r),Kh(t,n,g)}catch(w){rc(t,n,w)}}function Kh(t,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(r){Fh(t,n,r)},function(r){return rc(t,n,r)}):Fh(t,n,l)}function Fh(t,n,l){n.status="fulfilled",n.value=l,Wh(n),t.state=l,n=t.pending,n!==null&&(l=n.next,l===n?t.pending=null:(l=l.next,n.next=l,Zh(t,l)))}function rc(t,n,l){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do n.status="rejected",n.reason=l,Wh(n),n=n.next;while(n!==r)}t.action=null}function Wh(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function Jh(t,n){return n}function Ih(t,n){if(vt){var l=Nt.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}}Vn(r)}r=!1}r&&(n=l[0])}}return l=de(),l.memoizedState=l.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:n},l.queue=r,l=pd.bind(null,ut,r),r.dispatch=l,r=oc(!1),g=gc.bind(null,ut,!1,r.queue),r=de(),h={state:n,dispatch:null,action:t,pending:null},r.queue=h,l=wb.bind(null,ut,h,g,l),h.dispatch=l,r.memoizedState=t,[n,l,!1]}function $h(t){var n=Kt();return Ph(n,zt,t)}function Ph(t,n,l){if(n=sc(t,n,Jh)[0],t=Nl(yn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var r=ss(n)}catch(y){throw y===ra?Tl:y}else r=n;n=Kt();var h=n.queue,g=h.dispatch;return l!==n.memoizedState&&(ut.flags|=2048,da(9,{destroy:void 0},Nb.bind(null,h,l),null)),[r,g,t]}function Nb(t,n){t.action=n}function td(t){var n=Kt(),l=zt;if(l!==null)return Ph(n,l,t);Kt(),n=n.memoizedState,l=Kt();var r=l.queue.dispatch;return l.memoizedState=t,[n,r,!1]}function da(t,n,l,r){return t={tag:t,create:l,deps:r,inst:n,next:null},n=ut.updateQueue,n===null&&(n=Rl(),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 ed(){return Kt().memoizedState}function jl(t,n,l,r){var h=de();ut.flags|=t,h.memoizedState=da(1|n,{destroy:void 0},l,r===void 0?null:r)}function kl(t,n,l,r){var h=Kt();r=r===void 0?null:r;var g=h.memoizedState.inst;zt!==null&&r!==null&&Pr(r,zt.memoizedState.deps)?h.memoizedState=da(n,g,l,r):(ut.flags|=t,h.memoizedState=da(1|n,g,l,r))}function nd(t,n){jl(8390656,8,t,n)}function cc(t,n){kl(2048,8,t,n)}function jb(t){ut.flags|=4;var n=ut.updateQueue;if(n===null)n=Rl(),ut.updateQueue=n,n.events=[t];else{var l=n.events;l===null?n.events=[t]:l.push(t)}}function id(t){var n=Kt().memoizedState;return jb({ref:n,nextImpl:t}),function(){if((Mt&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}function ad(t,n){return kl(4,2,t,n)}function sd(t,n){return kl(4,4,t,n)}function ld(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 od(t,n,l){l=l!=null?l.concat([t]):null,kl(4,4,ld.bind(null,n,t),l)}function uc(){}function rd(t,n){var l=Kt();n=n===void 0?null:n;var r=l.memoizedState;return n!==null&&Pr(n,r[1])?r[0]:(l.memoizedState=[t,n],t)}function cd(t,n){var l=Kt();n=n===void 0?null:n;var r=l.memoizedState;if(n!==null&&Pr(n,r[1]))return r[0];if(r=t(),Di){kn(!0);try{t()}finally{kn(!1)}}return l.memoizedState=[r,n],r}function fc(t,n,l){return l===void 0||(pn&1073741824)!==0&&(yt&261930)===0?t.memoizedState=n:(t.memoizedState=l,t=ug(),ut.lanes|=t,Wn|=t,l)}function ud(t,n,l,r){return De(l,n)?l:ua.current!==null?(t=fc(t,l,r),De(t,n)||(It=!0),t):(pn&42)===0||(pn&1073741824)!==0&&(yt&261930)===0?(It=!0,t.memoizedState=l):(t=ug(),ut.lanes|=t,Wn|=t,n)}function fd(t,n,l,r,h){var g=X.p;X.p=g!==0&&8>g?g:8;var y=j.T,v={};j.T=v,gc(t,!1,n,l);try{var E=h(),w=j.S;if(w!==null&&w(v,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var L=Cb(E,r);ls(t,n,L,je(t))}else ls(t,n,r,je(t))}catch(V){ls(t,n,{then:function(){},status:"rejected",reason:V},je())}finally{X.p=g,y!==null&&v.types!==null&&(y.types=v.types),j.T=y}}function kb(){}function hc(t,n,l,r){if(t.tag!==5)throw Error(s(476));var h=hd(t).queue;fd(t,h,n,P,l===null?kb:function(){return dd(t),l(r)})}function hd(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:P},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 dd(t){var n=hd(t);n.next===null&&(n=t.alternate.memoizedState),ls(t,n.next.queue,{},je())}function dc(){return se(Ts)}function gd(){return Kt().memoizedState}function md(){return Kt().memoizedState}function Lb(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var l=je();t=Xn(l);var r=Gn(n,t,l);r!==null&&(_e(r,n,l),es(r,n,l)),n={cache:qr()},t.payload=n;return}n=n.return}}function Hb(t,n,l){var r=je();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ll(t)?yd(n,l):(l=Rr(t,n,l,r),l!==null&&(_e(l,t,r),bd(l,n,r)))}function pd(t,n,l){var r=je();ls(t,n,l,r)}function ls(t,n,l,r){var h={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ll(t))yd(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,v=g(y,l);if(h.hasEagerState=!0,h.eagerState=v,De(v,y))return pl(t,n,h,0),Nt===null&&ml(),!1}catch{}if(l=Rr(t,n,h,r),l!==null)return _e(l,t,r),bd(l,n,r),!0}return!1}function gc(t,n,l,r){if(r={lane:2,revertLane:Zc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ll(t)){if(n)throw Error(s(479))}else n=Rr(t,l,r,2),n!==null&&_e(n,t,2)}function Ll(t){var n=t.alternate;return t===ut||n!==null&&n===ut}function yd(t,n){fa=Cl=!0;var l=t.pending;l===null?n.next=n:(n.next=l.next,l.next=n),t.pending=n}function bd(t,n,l){if((l&4194048)!==0){var r=n.lanes;r&=t.pendingLanes,l|=r,n.lanes=l,Tf(t,l)}}var os={readContext:se,use:wl,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};os.useEffectEvent=qt;var vd={readContext:se,use:wl,useCallback:function(t,n){return de().memoizedState=[t,n===void 0?null:n],t},useContext:se,useEffect:nd,useImperativeHandle:function(t,n,l){l=l!=null?l.concat([t]):null,jl(4194308,4,ld.bind(null,n,t),l)},useLayoutEffect:function(t,n){return jl(4194308,4,t,n)},useInsertionEffect:function(t,n){jl(4,2,t,n)},useMemo:function(t,n){var l=de();n=n===void 0?null:n;var r=t();if(Di){kn(!0);try{t()}finally{kn(!1)}}return l.memoizedState=[r,n],r},useReducer:function(t,n,l){var r=de();if(l!==void 0){var h=l(n);if(Di){kn(!0);try{l(n)}finally{kn(!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=Hb.bind(null,ut,t),[r.memoizedState,t]},useRef:function(t){var n=de();return t={current:t},n.memoizedState=t},useState:function(t){t=oc(t);var n=t.queue,l=pd.bind(null,ut,n);return n.dispatch=l,[t.memoizedState,l]},useDebugValue:uc,useDeferredValue:function(t,n){var l=de();return fc(l,t,n)},useTransition:function(){var t=oc(!1);return t=fd.bind(null,ut,t.queue,!0,!1),de().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,l){var r=ut,h=de();if(vt){if(l===void 0)throw Error(s(407));l=l()}else{if(l=n(),Nt===null)throw Error(s(349));(yt&127)!==0||Vh(r,n,l)}h.memoizedState=l;var g={value:l,getSnapshot:n};return h.queue=g,nd(qh.bind(null,r,g,t),[t]),r.flags|=2048,da(9,{destroy:void 0},Yh.bind(null,r,g,l,n),null),l},useId:function(){var t=de(),n=Nt.identifierPrefix;if(vt){var l=Pe,r=$e;l=(r&~(1<<32-Oe(r)-1)).toString(32)+l,n="_"+n+"R_"+l,l=zl++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=zb++,n="_"+n+"r_"+l.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:dc,useFormState:Ih,useActionState:Ih,useOptimistic:function(t){var n=de();n.memoizedState=n.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=gc.bind(null,ut,!0,l),l.dispatch=n,[t,n]},useMemoCache:ac,useCacheRefresh:function(){return de().memoizedState=Lb.bind(null,ut)},useEffectEvent:function(t){var n=de(),l={impl:t};return n.memoizedState=l,function(){if((Mt&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},mc={readContext:se,use:wl,useCallback:rd,useContext:se,useEffect:cc,useImperativeHandle:od,useInsertionEffect:ad,useLayoutEffect:sd,useMemo:cd,useReducer:Nl,useRef:ed,useState:function(){return Nl(yn)},useDebugValue:uc,useDeferredValue:function(t,n){var l=Kt();return ud(l,zt.memoizedState,t,n)},useTransition:function(){var t=Nl(yn)[0],n=Kt().memoizedState;return[typeof t=="boolean"?t:ss(t),n]},useSyncExternalStore:Uh,useId:gd,useHostTransitionStatus:dc,useFormState:$h,useActionState:$h,useOptimistic:function(t,n){var l=Kt();return Qh(l,zt,t,n)},useMemoCache:ac,useCacheRefresh:md};mc.useEffectEvent=id;var _d={readContext:se,use:wl,useCallback:rd,useContext:se,useEffect:cc,useImperativeHandle:od,useInsertionEffect:ad,useLayoutEffect:sd,useMemo:cd,useReducer:lc,useRef:ed,useState:function(){return lc(yn)},useDebugValue:uc,useDeferredValue:function(t,n){var l=Kt();return zt===null?fc(l,t,n):ud(l,zt.memoizedState,t,n)},useTransition:function(){var t=lc(yn)[0],n=Kt().memoizedState;return[typeof t=="boolean"?t:ss(t),n]},useSyncExternalStore:Uh,useId:gd,useHostTransitionStatus:dc,useFormState:td,useActionState:td,useOptimistic:function(t,n){var l=Kt();return zt!==null?Qh(l,zt,t,n):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:ac,useCacheRefresh:md};_d.useEffectEvent=id;function pc(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 yc={enqueueSetState:function(t,n,l){t=t._reactInternals;var r=je(),h=Xn(r);h.payload=n,l!=null&&(h.callback=l),n=Gn(t,h,r),n!==null&&(_e(n,t,r),es(n,t,r))},enqueueReplaceState:function(t,n,l){t=t._reactInternals;var r=je(),h=Xn(r);h.tag=1,h.payload=n,l!=null&&(h.callback=l),n=Gn(t,h,r),n!==null&&(_e(n,t,r),es(n,t,r))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var l=je(),r=Xn(l);r.tag=2,n!=null&&(r.callback=n),n=Gn(t,r,l),n!==null&&(_e(n,t,l),es(n,t,l))}};function xd(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?!Ka(l,r)||!Ka(h,g):!0}function Sd(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&&yc.enqueueReplaceState(n,n.state,null)}function Ci(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 Td(t){gl(t)}function Md(t){console.error(t)}function Ed(t){gl(t)}function Hl(t,n){try{var l=t.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(r){setTimeout(function(){throw r})}}function Ad(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 bc(t,n,l){return l=Xn(l),l.tag=3,l.payload={element:null},l.callback=function(){Hl(t,n)},l}function Od(t){return t=Xn(t),t.tag=3,t}function Dd(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(){Ad(n,l,r)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){Ad(n,l,r),typeof h!="function"&&(Jn===null?Jn=new Set([this]):Jn.add(this));var v=r.stack;this.componentDidCatch(r.value,{componentStack:v!==null?v:""})})}function Bb(t,n,l,r,h){if(l.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(n=l.alternate,n!==null&&sa(n,l,h,!0),l=ze.current,l!==null){switch(l.tag){case 31:case 13:return Ge===null?Wl():l.alternate===null&&Xt===0&&(Xt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,r===Ml?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([r]):n.add(r),Xc(t,r,h)),!1;case 22:return l.flags|=65536,r===Ml?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)),Xc(t,r,h)),!1}throw Error(s(435,l.tag))}return Xc(t,r,h),Wl(),!1}if(vt)return n=ze.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,r!==Hr&&(t=Error(s(422),{cause:r}),Ja(Ve(t,l)))):(r!==Hr&&(n=Error(s(423),{cause:r}),Ja(Ve(n,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,r=Ve(r,l),h=bc(t.stateNode,r,h),Fr(t,h),Xt!==4&&(Xt=2)),!1;var g=Error(s(520),{cause:r});if(g=Ve(g,l),ms===null?ms=[g]:ms.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=bc(l.stateNode,r,t),Fr(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"&&(Jn===null||!Jn.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Od(h),Dd(h,t,l,r),Fr(l,h),!1}l=l.return}while(l!==null);return!1}var vc=Error(s(461)),It=!1;function le(t,n,l,r){n.child=t===null?wh(n,null,l,r):Oi(n,t.child,l,r)}function Cd(t,n,l,r,h){l=l.render;var g=n.ref;if("ref"in r){var y={};for(var v in r)v!=="ref"&&(y[v]=r[v])}else y=r;return Ti(n),r=tc(t,n,l,y,g,h),v=ec(),t!==null&&!It?(nc(t,n,h),bn(t,n,h)):(vt&&v&&kr(n),n.flags|=1,le(t,n,r,h),n.child)}function zd(t,n,l,r,h){if(t===null){var g=l.type;return typeof g=="function"&&!wr(g)&&g.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=g,Rd(t,n,g,r,h)):(t=bl(l.type,null,r,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!Oc(t,h)){var y=g.memoizedProps;if(l=l.compare,l=l!==null?l:Ka,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 Rd(t,n,l,r,h){if(t!==null){var g=t.memoizedProps;if(Ka(g,r)&&t.ref===n.ref)if(It=!1,n.pendingProps=r=g,Oc(t,h))(t.flags&131072)!==0&&(It=!0);else return n.lanes=t.lanes,bn(t,n,h)}return _c(t,n,l,r,h)}function wd(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 Nd(t,n,g,l,r)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Sl(n,g!==null?g.cachePool:null),g!==null?kh(n,g):Jr(),Lh(n);else return r=n.lanes=536870912,Nd(t,n,g!==null?g.baseLanes|l:l,l,r)}else g!==null?(Sl(n,g.cachePool),kh(n,g),Zn(),n.memoizedState=null):(t!==null&&Sl(n,null),Jr(),Zn());return le(t,n,h,l),n.child}function rs(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Nd(t,n,l,r,h){var g=Gr();return g=g===null?null:{parent:Wt._currentValue,pool:g},n.memoizedState={baseLanes:l,cachePool:g},t!==null&&Sl(n,null),Jr(),Lh(n),t!==null&&sa(t,n,r,!0),n.childLanes=h,null}function Bl(t,n){return n=Vl({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function jd(t,n,l){return Oi(n,t.child,null,l),t=Bl(n,n.pendingProps),t.flags|=2,Re(n),n.memoizedState=null,t}function Ub(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=Bl(n,r),n.lanes=536870912,rs(null,t);if($r(n),(t=Lt)?(t=Zg(t,Xe),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Bn!==null?{id:$e,overflow:Pe}:null,retryLane:536870912,hydrationErrors:null},l=yh(t),l.return=n,n.child=l,ae=n,Lt=null)):t=null,t===null)throw Vn(n);return n.lanes=536870912,null}return Bl(n,r)}var g=t.memoizedState;if(g!==null){var y=g.dehydrated;if($r(n),h)if(n.flags&256)n.flags&=-257,n=jd(t,n,l);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(s(558));else if(It||sa(t,n,l,!1),h=(l&t.childLanes)!==0,It||h){if(r=Nt,r!==null&&(y=Mf(r,l),y!==0&&y!==g.retryLane))throw g.retryLane=y,vi(t,y),_e(r,t,y),vc;Wl(),n=jd(t,n,l)}else t=g.treeContext,Lt=Qe(y.nextSibling),ae=n,vt=!0,Un=null,Xe=!1,t!==null&&_h(n,t),n=Bl(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 Ul(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(s(284));(t===null||t.ref!==l)&&(n.flags|=4194816)}}function _c(t,n,l,r,h){return Ti(n),l=tc(t,n,l,r,void 0,h),r=ec(),t!==null&&!It?(nc(t,n,h),bn(t,n,h)):(vt&&r&&kr(n),n.flags|=1,le(t,n,l,h),n.child)}function kd(t,n,l,r,h,g){return Ti(n),n.updateQueue=null,l=Bh(n,r,l,h),Hh(t),r=ec(),t!==null&&!It?(nc(t,n,g),bn(t,n,g)):(vt&&r&&kr(n),n.flags|=1,le(t,n,l,g),n.child)}function Ld(t,n,l,r,h){if(Ti(n),n.stateNode===null){var g=ea,y=l.contextType;typeof y=="object"&&y!==null&&(g=se(y)),g=new l(r,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=yc,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=r,g.state=n.memoizedState,g.refs={},Zr(n),y=l.contextType,g.context=typeof y=="object"&&y!==null?se(y):ea,g.state=n.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(pc(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&&yc.enqueueReplaceState(g,g.state,null),is(n,r,g,h),ns(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),r=!0}else if(t===null){g=n.stateNode;var v=n.memoizedProps,E=Ci(l,v);g.props=E;var w=g.context,L=l.contextType;y=ea,typeof L=="object"&&L!==null&&(y=se(L));var V=l.getDerivedStateFromProps;L=typeof V=="function"||typeof g.getSnapshotBeforeUpdate=="function",v=n.pendingProps!==v,L||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(v||w!==y)&&Sd(n,g,r,y),qn=!1;var N=n.memoizedState;g.state=N,is(n,r,g,h),ns(),w=n.memoizedState,v||N!==w||qn?(typeof V=="function"&&(pc(n,l,V,r),w=n.memoizedState),(E=qn||xd(n,l,E,r,N,w,y))?(L||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=w),g.props=r,g.state=w,g.context=y,r=E):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{g=n.stateNode,Kr(t,n),y=n.memoizedProps,L=Ci(l,y),g.props=L,V=n.pendingProps,N=g.context,w=l.contextType,E=ea,typeof w=="object"&&w!==null&&(E=se(w)),v=l.getDerivedStateFromProps,(w=typeof v=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(y!==V||N!==E)&&Sd(n,g,r,E),qn=!1,N=n.memoizedState,g.state=N,is(n,r,g,h),ns();var k=n.memoizedState;y!==V||N!==k||qn||t!==null&&t.dependencies!==null&&_l(t.dependencies)?(typeof v=="function"&&(pc(n,l,v,r),k=n.memoizedState),(L=qn||xd(n,l,L,r,N,k,E)||t!==null&&t.dependencies!==null&&_l(t.dependencies))?(w||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&&N===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&N===t.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=k),g.props=r,g.state=k,g.context=E,r=L):(typeof g.componentDidUpdate!="function"||y===t.memoizedProps&&N===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&N===t.memoizedState||(n.flags|=1024),r=!1)}return g=r,Ul(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=Oi(n,t.child,null,h),n.child=Oi(n,null,l,h)):le(t,n,l,h),n.memoizedState=g.state,t=n.child):t=bn(t,n,h),t}function Hd(t,n,l,r){return xi(),n.flags|=256,le(t,n,l,r),n.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(t){return{baseLanes:t,cachePool:Ah()}}function Tc(t,n,l){return t=t!==null?t.childLanes&~l:0,n&&(t|=Ne),t}function Bd(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?Qn(n):Zn(),(t=Lt)?(t=Zg(t,Xe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Bn!==null?{id:$e,overflow:Pe}:null,retryLane:536870912,hydrationErrors:null},l=yh(t),l.return=n,n.child=l,ae=n,Lt=null)):t=null,t===null)throw Vn(n);return su(t)?n.lanes=32:n.lanes=536870912,null}var v=r.children;return r=r.fallback,h?(Zn(),h=n.mode,v=Vl({mode:"hidden",children:v},h),r=_i(r,h,l,null),v.return=n,r.return=n,v.sibling=r,n.child=v,r=n.child,r.memoizedState=Sc(l),r.childLanes=Tc(t,y,l),n.memoizedState=xc,rs(null,r)):(Qn(n),Mc(n,v))}var E=t.memoizedState;if(E!==null&&(v=E.dehydrated,v!==null)){if(g)n.flags&256?(Qn(n),n.flags&=-257,n=Ec(t,n,l)):n.memoizedState!==null?(Zn(),n.child=t.child,n.flags|=128,n=null):(Zn(),v=r.fallback,h=n.mode,r=Vl({mode:"visible",children:r.children},h),v=_i(v,h,l,null),v.flags|=2,r.return=n,v.return=n,r.sibling=v,n.child=r,Oi(n,t.child,null,l),r=n.child,r.memoizedState=Sc(l),r.childLanes=Tc(t,y,l),n.memoizedState=xc,n=rs(null,r));else if(Qn(n),su(v)){if(y=v.nextSibling&&v.nextSibling.dataset,y)var w=y.dgst;y=w,r=Error(s(419)),r.stack="",r.digest=y,Ja({value:r,source:null,stack:null}),n=Ec(t,n,l)}else if(It||sa(t,n,l,!1),y=(l&t.childLanes)!==0,It||y){if(y=Nt,y!==null&&(r=Mf(y,l),r!==0&&r!==E.retryLane))throw E.retryLane=r,vi(t,r),_e(y,t,r),vc;au(v)||Wl(),n=Ec(t,n,l)}else au(v)?(n.flags|=192,n.child=t.child,n=null):(t=E.treeContext,Lt=Qe(v.nextSibling),ae=n,vt=!0,Un=null,Xe=!1,t!==null&&_h(n,t),n=Mc(n,r.children),n.flags|=4096);return n}return h?(Zn(),v=r.fallback,h=n.mode,E=t.child,w=E.sibling,r=hn(E,{mode:"hidden",children:r.children}),r.subtreeFlags=E.subtreeFlags&65011712,w!==null?v=hn(w,v):(v=_i(v,h,l,null),v.flags|=2),v.return=n,r.return=n,r.sibling=v,n.child=r,rs(null,r),r=n.child,v=t.child.memoizedState,v===null?v=Sc(l):(h=v.cachePool,h!==null?(E=Wt._currentValue,h=h.parent!==E?{parent:E,pool:E}:h):h=Ah(),v={baseLanes:v.baseLanes|l,cachePool:h}),r.memoizedState=v,r.childLanes=Tc(t,y,l),n.memoizedState=xc,rs(t.child,r)):(Qn(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 Mc(t,n){return n=Vl({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Vl(t,n){return t=Ce(22,t,null,n),t.lanes=0,t}function Ec(t,n,l){return Oi(n,t.child,null,l),t=Mc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Ud(t,n,l){t.lanes|=n;var r=t.alternate;r!==null&&(r.lanes|=n),Vr(t.return,n,l)}function Ac(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 Vd(t,n,l){var r=n.pendingProps,h=r.revealOrder,g=r.tail;r=r.children;var y=Zt.current,v=(y&2)!==0;if(v?(y=y&1|2,n.flags|=128):y&=1,Z(Zt,y),le(t,n,r,l),r=vt?Wa:0,!v&&t!==null&&(t.flags&128)!==0)t:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ud(t,l,n);else if(t.tag===19)Ud(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&&Dl(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null),Ac(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&&Dl(t)===null){n.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Ac(n,!0,l,null,g,r);break;case"together":Ac(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),Wn|=n.lanes,(l&n.childLanes)===0)if(t!==null){if(sa(t,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(s(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 Oc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&_l(t)))}function Vb(t,n,l){switch(n.tag){case 3:he(n,n.stateNode.containerInfo),Yn(n,Wt,t.memoizedState.cache),xi();break;case 27:case 5:ja(n);break;case 4:he(n,n.stateNode.containerInfo);break;case 10:Yn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,$r(n),null;break;case 13:var r=n.memoizedState;if(r!==null)return r.dehydrated!==null?(Qn(n),n.flags|=128,null):(l&n.child.childLanes)!==0?Bd(t,n,l):(Qn(n),t=bn(t,n,l),t!==null?t.sibling:null);Qn(n);break;case 19:var h=(t.flags&128)!==0;if(r=(l&n.childLanes)!==0,r||(sa(t,n,l,!1),r=(l&n.childLanes)!==0),h){if(r)return Vd(t,n,l);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Z(Zt,Zt.current),r)break;return null;case 22:return n.lanes=0,wd(t,n,l,n.pendingProps);case 24:Yn(n,Wt,t.memoizedState.cache)}return bn(t,n,l)}function Yd(t,n,l){if(t!==null)if(t.memoizedProps!==n.pendingProps)It=!0;else{if(!Oc(t,l)&&(n.flags&128)===0)return It=!1,Vb(t,n,l);It=(t.flags&131072)!==0}else It=!1,vt&&(n.flags&1048576)!==0&&vh(n,Wa,n.index);switch(n.lanes=0,n.tag){case 16:t:{var r=n.pendingProps;if(t=Ei(n.elementType),n.type=t,typeof t=="function")wr(t)?(r=Ci(t,r),n.tag=1,n=Ld(null,n,t,r,l)):(n.tag=0,n=_c(null,n,t,r,l));else{if(t!=null){var h=t.$$typeof;if(h===G){n.tag=11,n=Cd(null,n,t,r,l);break t}else if(h===Q){n.tag=14,n=zd(null,n,t,r,l);break t}}throw n=Vt(t)||t,Error(s(306,n,""))}}return n;case 0:return _c(t,n,n.type,n.pendingProps,l);case 1:return r=n.type,h=Ci(r,n.pendingProps),Ld(t,n,r,h,l);case 3:t:{if(he(n,n.stateNode.containerInfo),t===null)throw Error(s(387));r=n.pendingProps;var g=n.memoizedState;h=g.element,Kr(t,n),is(n,r,null,l);var y=n.memoizedState;if(r=y.cache,Yn(n,Wt,r),r!==g.cache&&Yr(n,[Wt],l,!0),ns(),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=Hd(t,n,r,l);break t}else if(r!==h){h=Ve(Error(s(424)),n),Ja(h),n=Hd(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),ae=n,vt=!0,Un=null,Xe=!0,l=wh(n,null,r,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(xi(),r===h){n=bn(t,n,l);break t}le(t,n,r,l)}n=n.child}return n;case 26:return Ul(t,n),t===null?(l=$g(n.type,null,n.pendingProps,null))?n.memoizedState=l:vt||(l=n.type,t=n.pendingProps,r=no(ot.current).createElement(l),r[ie]=n,r[ge]=t,oe(r,l,t),ee(r),n.stateNode=r):n.memoizedState=$g(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return ja(n),t===null&&vt&&(r=n.stateNode=Wg(n.type,n.pendingProps,ot.current),ae=n,Xe=!0,h=Lt,ti(n.type)?(lu=h,Lt=Qe(r.firstChild)):Lt=h),le(t,n,n.pendingProps.children,l),Ul(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&vt&&((h=r=Lt)&&(r=pv(r,n.type,n.pendingProps,Xe),r!==null?(n.stateNode=r,ae=n,Lt=Qe(r.firstChild),Xe=!1,h=!0):h=!1),h||Vn(n)),ja(n),h=n.type,g=n.pendingProps,y=t!==null?t.memoizedProps:null,r=g.children,eu(h,g)?r=null:y!==null&&eu(h,y)&&(n.flags|=32),n.memoizedState!==null&&(h=tc(t,n,Rb,null,null,l),Ts._currentValue=h),Ul(t,n),le(t,n,r,l),n.child;case 6:return t===null&&vt&&((t=l=Lt)&&(l=yv(l,n.pendingProps,Xe),l!==null?(n.stateNode=l,ae=n,Lt=null,t=!0):t=!1),t||Vn(n)),null;case 13:return Bd(t,n,l);case 4:return he(n,n.stateNode.containerInfo),r=n.pendingProps,t===null?n.child=Oi(n,null,r,l):le(t,n,r,l),n.child;case 11:return Cd(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,Yn(n,n.type,r.value),le(t,n,r.children,l),n.child;case 9:return h=n.type._context,r=n.pendingProps.children,Ti(n),h=se(h),r=r(h),n.flags|=1,le(t,n,r,l),n.child;case 14:return zd(t,n,n.type,n.pendingProps,l);case 15:return Rd(t,n,n.type,n.pendingProps,l);case 19:return Vd(t,n,l);case 31:return Ub(t,n,l);case 22:return wd(t,n,l,n.pendingProps);case 24:return Ti(n),r=se(Wt),t===null?(h=Gr(),h===null&&(h=Nt,g=qr(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),n.memoizedState={parent:r,cache:h},Zr(n),Yn(n,Wt,h)):((t.lanes&l)!==0&&(Kr(t,n),is(n,null,null,l),ns()),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),Yn(n,Wt,r)):(r=g.cache,Yn(n,Wt,r),r!==h.cache&&Yr(n,[Wt],l,!0))),le(t,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(s(156,n.tag))}function vn(t){t.flags|=4}function Dc(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(gg())t.flags|=8192;else throw Ai=Ml,Qr}else t.flags&=-16777217}function qd(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!im(n))if(gg())t.flags|=8192;else throw Ai=Ml,Qr}function Yl(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?xf():536870912,t.lanes|=n,ya|=n)}function cs(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 Yb(t,n,l){var r=n.pendingProps;switch(Lr(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)&&(aa(n)?vn(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Br())),Ht(n),null;case 26:var h=n.type,g=n.memoizedState;return t===null?(vn(n),g!==null?(Ht(n),qd(n,g)):(Ht(n),Dc(n,h,null,r,l))):g?g!==t.memoizedState?(vn(n),Ht(n),qd(n,g)):(Ht(n),n.flags&=-16777217):(t=t.memoizedProps,t!==r&&vn(n),Ht(n),Dc(n,h,t,r,l)),null;case 27:if($s(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(s(166));return Ht(n),null}t=W.current,aa(n)?xh(n):(t=Wg(h,r,l),n.stateNode=t,vn(n))}return Ht(n),null;case 5:if($s(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(!r){if(n.stateNode===null)throw Error(s(166));return Ht(n),null}if(g=W.current,aa(n))xh(n);else{var y=no(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[ge]=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),Dc(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(s(166));if(t=ot.current,aa(n)){if(t=n.stateNode,l=n.memoizedProps,r=null,h=ae,h!==null)switch(h.tag){case 27:case 5:r=h.memoizedProps}t[ie]=n,t=!!(t.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||Bg(t.nodeValue,l)),t||Vn(n,!0)}else t=no(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=aa(n),l!==null){if(t===null){if(!r)throw Error(s(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[ie]=n}else xi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ht(n),t=!1}else l=Br(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return n.flags&256?(Re(n),n):(Re(n),null);if((n.flags&128)!==0)throw Error(s(558))}return Ht(n),null;case 13:if(r=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=aa(n),r!==null&&r.dehydrated!==null){if(t===null){if(!h)throw Error(s(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[ie]=n}else xi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ht(n),h=!1}else h=Br(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(Re(n),n):(Re(n),null)}return Re(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),Yl(n,n.updateQueue),Ht(n),null);case 4:return Qt(),t===null&&Jc(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)cs(r,!1);else{if(Xt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=Dl(t),g!==null){for(n.flags|=128,cs(r,!1),t=g.updateQueue,n.updateQueue=t,Yl(n,t),n.subtreeFlags=0,t=l,l=n.child;l!==null;)ph(l,t),l=l.sibling;return Z(Zt,Zt.current&1|2),vt&&dn(n,r.treeForkCount),n.child}t=t.sibling}r.tail!==null&&Ee()>Zl&&(n.flags|=128,h=!0,cs(r,!1),n.lanes=4194304)}else{if(!h)if(t=Dl(g),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,Yl(n,t),cs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!g.alternate&&!vt)return Ht(n),null}else 2*Ee()-r.renderingStartTime>Zl&&l!==536870912&&(n.flags|=128,h=!0,cs(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,Z(Zt,h?l&1|2:l&1),vt&&dn(n,r.treeForkCount),t):(Ht(n),null);case 22:case 23:return Re(n),Ir(),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&&Yl(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(Mi),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(s(156,n.tag))}function qb(t,n){switch(Lr(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 $s(n),null;case 31:if(n.memoizedState!==null){if(Re(n),n.alternate===null)throw Error(s(340));xi()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(Re(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(s(340));xi()}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 Re(n),Ir(),t!==null&&U(Mi),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 Xd(t,n){switch(Lr(n),n.tag){case 3:mn(Wt),Qt();break;case 26:case 27:case 5:$s(n);break;case 4:Qt();break;case 31:n.memoizedState!==null&&Re(n);break;case 13:Re(n);break;case 19:U(Zt);break;case 10:mn(n.type);break;case 22:case 23:Re(n),Ir(),t!==null&&U(Mi);break;case 24:mn(Wt)}}function us(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(v){Dt(n,n.return,v)}}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,v=y.destroy;if(v!==void 0){y.destroy=void 0,h=n;var E=l,w=v;try{w()}catch(L){Dt(h,E,L)}}}r=r.next}while(r!==g)}}catch(L){Dt(n,n.return,L)}}function Gd(t){var n=t.updateQueue;if(n!==null){var l=t.stateNode;try{jh(n,l)}catch(r){Dt(t,t.return,r)}}}function Qd(t,n,l){l.props=Ci(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(r){Dt(t,n,r)}}function fs(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){Dt(t,n,h)}}function tn(t,n){var l=t.ref,r=t.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(h){Dt(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){Dt(t,n,h)}else l.current=null}function Zd(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){Dt(t,t.return,h)}}function Cc(t,n,l){try{var r=t.stateNode;uv(r,t.type,l,n),r[ge]=n}catch(h){Dt(t,t.return,h)}}function Kd(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ti(t.type)||t.tag===4}function zc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Kd(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&&ti(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 Rc(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&&ti(t.type)&&(l=t.stateNode,n=null),t=t.child,t!==null))for(Rc(t,n,l),t=t.sibling;t!==null;)Rc(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&&ti(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 Fd(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[ge]=l}catch(g){Dt(t,t.return,g)}}var _n=!1,$t=!1,wc=!1,Wd=typeof WeakSet=="function"?WeakSet:Set,ne=null;function Xb(t,n){if(t=t.containerInfo,Pc=co,t=oh(t),Er(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,v=-1,E=-1,w=0,L=0,V=t,N=null;e:for(;;){for(var k;V!==l||h!==0&&V.nodeType!==3||(v=y+h),V!==g||r!==0&&V.nodeType!==3||(E=y+r),V.nodeType===3&&(y+=V.nodeValue.length),(k=V.firstChild)!==null;)N=V,V=k;for(;;){if(V===t)break e;if(N===l&&++w===h&&(v=y),N===g&&++L===r&&(E=y),(k=V.nextSibling)!==null)break;V=N,N=V.parentNode}V=k}l=v===-1||E===-1?null:{start:v,end:E}}else l=null}l=l||{start:0,end:0}}else l=null;for(tu={focusedElem:t,selectionRange:l},co=!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=Ci(l.type,h);t=r.getSnapshotBeforeUpdate(I,g),r.__reactInternalSnapshotBeforeUpdate=t}catch(nt){Dt(l,l.return,nt)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,l=t.nodeType,l===9)iu(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":iu(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(s(163))}if(t=n.sibling,t!==null){t.return=n.return,ne=t;break}ne=n.return}}function Jd(t,n,l){var r=l.flags;switch(l.tag){case 0:case 11:case 15:Sn(t,l),r&4&&us(5,l);break;case 1:if(Sn(t,l),r&4)if(t=l.stateNode,n===null)try{t.componentDidMount()}catch(y){Dt(l,l.return,y)}else{var h=Ci(l.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Dt(l,l.return,y)}}r&64&&Gd(l),r&512&&fs(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{jh(t,n)}catch(y){Dt(l,l.return,y)}}break;case 27:n===null&&r&4&&Fd(l);case 26:case 5:Sn(t,l),n===null&&r&4&&Zd(l),r&512&&fs(l,l.return);break;case 12:Sn(t,l);break;case 31:Sn(t,l),r&4&&Pd(t,l);break;case 13:Sn(t,l),r&4&&tg(t,l),r&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=$b.bind(null,l),bv(t,l))));break;case 22:if(r=l.memoizedState!==null||_n,!r){n=n!==null&&n.memoizedState!==null||$t,h=_n;var g=$t;_n=r,($t=n)&&!g?Tn(t,l,(l.subtreeFlags&8772)!==0):Sn(t,l),_n=h,$t=g}break;case 30:break;default:Sn(t,l)}}function Id(t){var n=t.alternate;n!==null&&(t.alternate=null,Id(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&rr(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,pe=!1;function xn(t,n,l){for(l=l.child;l!==null;)$d(t,n,l),l=l.sibling}function $d(t,n,l){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(ka,l)}catch{}switch(l.tag){case 26:$t||tn(l,n),xn(t,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:$t||tn(l,n);var r=Bt,h=pe;ti(l.type)&&(Bt=l.stateNode,pe=!1),xn(t,n,l),_s(l.stateNode),Bt=r,pe=h;break;case 5:$t||tn(l,n);case 6:if(r=Bt,h=pe,Bt=null,xn(t,n,l),Bt=r,pe=h,Bt!==null)if(pe)try{(Bt.nodeType===9?Bt.body:Bt.nodeName==="HTML"?Bt.ownerDocument.body:Bt).removeChild(l.stateNode)}catch(g){Dt(l,n,g)}else try{Bt.removeChild(l.stateNode)}catch(g){Dt(l,n,g)}break;case 18:Bt!==null&&(pe?(t=Bt,Gg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Ea(t)):Gg(Bt,l.stateNode));break;case 4:r=Bt,h=pe,Bt=l.stateNode.containerInfo,pe=!0,xn(t,n,l),Bt=r,pe=h;break;case 0:case 11:case 14:case 15:Kn(2,l,n),$t||Kn(4,l,n),xn(t,n,l);break;case 1:$t||(tn(l,n),r=l.stateNode,typeof r.componentWillUnmount=="function"&&Qd(l,n,r)),xn(t,n,l);break;case 21:xn(t,n,l);break;case 22:$t=(r=$t)||l.memoizedState!==null,xn(t,n,l),$t=r;break;default:xn(t,n,l)}}function Pd(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ea(t)}catch(l){Dt(n,n.return,l)}}}function tg(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ea(t)}catch(l){Dt(n,n.return,l)}}function Gb(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Wd),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Wd),n;default:throw Error(s(435,t.tag))}}function Xl(t,n){var l=Gb(t);n.forEach(function(r){if(!l.has(r)){l.add(r);var h=Pb.bind(null,t,r);r.then(h,h)}})}function ye(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,v=y;t:for(;v!==null;){switch(v.tag){case 27:if(ti(v.type)){Bt=v.stateNode,pe=!1;break t}break;case 5:Bt=v.stateNode,pe=!1;break t;case 3:case 4:Bt=v.stateNode.containerInfo,pe=!0;break t}v=v.return}if(Bt===null)throw Error(s(160));$d(g,y,h),Bt=null,pe=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)eg(n,t),n=n.sibling}var Je=null;function eg(t,n){var l=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ye(n,t),be(t),r&4&&(Kn(3,t,t.return),us(3,t),Kn(5,t,t.return));break;case 1:ye(n,t),be(t),r&512&&($t||l===null||tn(l,l.return)),r&64&&_n&&(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(ye(n,t),be(t),r&512&&($t||l===null||tn(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[Ba]||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=em("link","href",h).get(r+(l.href||""));if(y){for(var v=0;v<y.length;v++)if(g=y[v],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(v,1);break e}}g=h.createElement(r),oe(g,r,l),h.head.appendChild(g);break;case"meta":if(y=em("meta","content",h).get(r+(l.content||""))){for(v=0;v<y.length;v++)if(g=y[v],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(v,1);break e}}g=h.createElement(r),oe(g,r,l),h.head.appendChild(g);break;default:throw Error(s(468,r))}g[ie]=t,ee(g),r=g}t.stateNode=r}else nm(h,t.type,t.stateNode);else t.stateNode=tm(h,r,t.memoizedProps);else g!==r?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,r===null?nm(h,t.type,t.stateNode):tm(h,r,t.memoizedProps)):r===null&&t.stateNode!==null&&Cc(t,t.memoizedProps,l.memoizedProps)}break;case 27:ye(n,t),be(t),r&512&&($t||l===null||tn(l,l.return)),l!==null&&r&4&&Cc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(ye(n,t),be(t),r&512&&($t||l===null||tn(l,l.return)),t.flags&32){h=t.stateNode;try{Fi(h,"")}catch(I){Dt(t,t.return,I)}}r&4&&t.stateNode!=null&&(h=t.memoizedProps,Cc(t,h,l!==null?l.memoizedProps:h)),r&1024&&(wc=!0);break;case 6:if(ye(n,t),be(t),r&4){if(t.stateNode===null)throw Error(s(162));r=t.memoizedProps,l=t.stateNode;try{l.nodeValue=r}catch(I){Dt(t,t.return,I)}}break;case 3:if(so=null,h=Je,Je=io(n.containerInfo),ye(n,t),Je=h,be(t),r&4&&l!==null&&l.memoizedState.isDehydrated)try{Ea(n.containerInfo)}catch(I){Dt(t,t.return,I)}wc&&(wc=!1,ng(t));break;case 4:r=Je,Je=io(t.stateNode.containerInfo),ye(n,t),be(t),Je=r;break;case 12:ye(n,t),be(t);break;case 31:ye(n,t),be(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Xl(t,r)));break;case 13:ye(n,t),be(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ql=Ee()),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Xl(t,r)));break;case 22:h=t.memoizedState!==null;var E=l!==null&&l.memoizedState!==null,w=_n,L=$t;if(_n=w||h,$t=L||E,ye(n,t),$t=L,_n=w,be(t),r&8192)t:for(n=t.stateNode,n._visibility=h?n._visibility&-2:n._visibility|1,h&&(l===null||E||_n||$t||zi(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{v=E.stateNode;var V=E.memoizedProps.style,N=V!=null&&V.hasOwnProperty("display")?V.display:null;v.style.display=N==null||typeof N=="boolean"?"":(""+N).trim()}}catch(I){Dt(E,E.return,I)}}}else if(n.tag===6){if(l===null){E=n;try{E.stateNode.nodeValue=h?"":E.memoizedProps}catch(I){Dt(E,E.return,I)}}}else if(n.tag===18){if(l===null){E=n;try{var k=E.stateNode;h?Qg(k,!0):Qg(E.stateNode,!1)}catch(I){Dt(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,Xl(t,l))));break;case 19:ye(n,t),be(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Xl(t,r)));break;case 30:break;case 21:break;default:ye(n,t),be(t)}}function be(t){var n=t.flags;if(n&2){try{for(var l,r=t.return;r!==null;){if(Kd(r)){l=r;break}r=r.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var h=l.stateNode,g=zc(t);ql(t,g,h);break;case 5:var y=l.stateNode;l.flags&32&&(Fi(y,""),l.flags&=-33);var v=zc(t);ql(t,v,y);break;case 3:case 4:var E=l.stateNode.containerInfo,w=zc(t);Rc(t,w,E);break;default:throw Error(s(161))}}catch(L){Dt(t,t.return,L)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function ng(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;ng(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;)Jd(t,n.alternate,n),n=n.sibling}function zi(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),zi(n);break;case 1:tn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Qd(n,n.return,l),zi(n);break;case 27:_s(n.stateNode);case 26:case 5:tn(n,n.return),zi(n);break;case 22:n.memoizedState===null&&zi(n);break;case 30:zi(n);break;default:zi(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),us(4,g);break;case 1:if(Tn(h,g,l),r=g,h=r.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(w){Dt(r,r.return,w)}if(r=g,h=r.updateQueue,h!==null){var v=r.stateNode;try{var E=h.shared.hiddenCallbacks;if(E!==null)for(h.shared.hiddenCallbacks=null,h=0;h<E.length;h++)Nh(E[h],v)}catch(w){Dt(r,r.return,w)}}l&&y&64&&Gd(g),fs(g,g.return);break;case 27:Fd(g);case 26:case 5:Tn(h,g,l),l&&r===null&&y&4&&Zd(g),fs(g,g.return);break;case 12:Tn(h,g,l);break;case 31:Tn(h,g,l),l&&y&4&&Pd(h,g);break;case 13:Tn(h,g,l),l&&y&4&&tg(h,g);break;case 22:g.memoizedState===null&&Tn(h,g,l),fs(g,g.return);break;case 30:break;default:Tn(h,g,l)}n=n.sibling}}function Nc(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&&Ia(l))}function jc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ia(t))}function Ie(t,n,l,r){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ig(t,n,l,r),n=n.sibling}function ig(t,n,l,r){var h=n.flags;switch(n.tag){case 0:case 11:case 15:Ie(t,n,l,r),h&2048&&us(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&&Ia(t)));break;case 12:if(h&2048){Ie(t,n,l,r),t=n.stateNode;try{var g=n.memoizedProps,y=g.id,v=g.onPostCommit;typeof v=="function"&&v(y,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(E){Dt(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):hs(t,n):g._visibility&2?Ie(t,n,l,r):(g._visibility|=2,ga(t,n,l,r,(n.subtreeFlags&10256)!==0||!1)),h&2048&&Nc(y,n);break;case 24:Ie(t,n,l,r),h&2048&&jc(n.alternate,n);break;default:Ie(t,n,l,r)}}function ga(t,n,l,r,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,y=n,v=l,E=r,w=y.flags;switch(y.tag){case 0:case 11:case 15:ga(g,y,v,E,h),us(8,y);break;case 23:break;case 22:var L=y.stateNode;y.memoizedState!==null?L._visibility&2?ga(g,y,v,E,h):hs(g,y):(L._visibility|=2,ga(g,y,v,E,h)),h&&w&2048&&Nc(y.alternate,y);break;case 24:ga(g,y,v,E,h),h&&w&2048&&jc(y.alternate,y);break;default:ga(g,y,v,E,h)}n=n.sibling}}function hs(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:hs(l,r),h&2048&&Nc(r.alternate,r);break;case 24:hs(l,r),h&2048&&jc(r.alternate,r);break;default:hs(l,r)}n=n.sibling}}var ds=8192;function ma(t,n,l){if(t.subtreeFlags&ds)for(t=t.child;t!==null;)ag(t,n,l),t=t.sibling}function ag(t,n,l){switch(t.tag){case 26:ma(t,n,l),t.flags&ds&&t.memoizedState!==null&&zv(l,Je,t.memoizedState,t.memoizedProps);break;case 5:ma(t,n,l);break;case 3:case 4:var r=Je;Je=io(t.stateNode.containerInfo),ma(t,n,l),Je=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ds,ds=16777216,ma(t,n,l),ds=r):ma(t,n,l));break;default:ma(t,n,l)}}function sg(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 gs(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,og(r,t)}sg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lg(t),t=t.sibling}function lg(t){switch(t.tag){case 0:case 11:case 15:gs(t),t.flags&2048&&Kn(9,t,t.return);break;case 3:gs(t);break;case 12:gs(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Gl(t)):gs(t);break;default:gs(t)}}function Gl(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,og(r,t)}sg(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Kn(8,n,n.return),Gl(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Gl(n));break;default:Gl(n)}t=t.sibling}}function og(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:Ia(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(Id(r),r===l){ne=null;break t}if(h!==null){h.return=g,ne=h;break t}ne=g}}}var Qb={getCacheForType:function(t){var n=se(Wt),l=n.data.get(t);return l===void 0&&(l=t(),n.data.set(t,l)),l},cacheSignal:function(){return se(Wt).controller.signal}},Zb=typeof WeakMap=="function"?WeakMap:Map,Mt=0,Nt=null,gt=null,yt=0,Ot=0,we=null,Fn=!1,pa=!1,kc=!1,Mn=0,Xt=0,Wn=0,Ri=0,Lc=0,Ne=0,ya=0,ms=null,ve=null,Hc=!1,Ql=0,rg=0,Zl=1/0,Kl=null,Jn=null,Pt=0,In=null,ba=null,En=0,Bc=0,Uc=null,cg=null,ps=0,Vc=null;function je(){return(Mt&2)!==0&&yt!==0?yt&-yt:j.T!==null?Zc():Ef()}function ug(){if(Ne===0)if((yt&536870912)===0||vt){var t=el;el<<=1,(el&3932160)===0&&(el=262144),Ne=t}else Ne=536870912;return t=ze.current,t!==null&&(t.flags|=32),Ne}function _e(t,n,l){(t===Nt&&(Ot===2||Ot===9)||t.cancelPendingCommit!==null)&&(va(t,0),$n(t,yt,Ne,!1)),Ha(t,l),((Mt&2)===0||t!==Nt)&&(t===Nt&&((Mt&2)===0&&(Ri|=l),Xt===4&&$n(t,yt,Ne,!1)),en(t))}function fg(t,n,l){if((Mt&6)!==0)throw Error(s(327));var r=!l&&(n&127)===0&&(n&t.expiredLanes)===0||La(t,n),h=r?Wb(t,n):qc(t,n,!0),g=r;do{if(h===0){pa&&!r&&$n(t,n,0,!1);break}else{if(l=t.current.alternate,g&&!Kb(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 v=t;h=ms;var E=v.current.memoizedState.isDehydrated;if(E&&(va(v,y).flags|=256),y=qc(v,y,!1),y!==2){if(kc&&!E){v.errorRecoveryDisabledLanes|=g,Ri|=g,h=4;break t}g=ve,ve=h,g!==null&&(ve===null?ve=g:ve.push.apply(ve,g))}h=y}if(g=!1,h!==2)continue}}if(h===1){va(t,0),$n(t,n,0,!0);break}t:{switch(r=t,g=h,g){case 0:case 1:throw Error(s(345));case 4:if((n&4194048)!==n)break;case 6:$n(r,n,Ne,!Fn);break t;case 2:ve=null;break;case 3:case 5:break;default:throw Error(s(329))}if((n&62914560)===n&&(h=Ql+300-Ee(),10<h)){if($n(r,n,Ne,!Fn),il(r,0,!0)!==0)break t;En=n,r.timeoutHandle=qg(hg.bind(null,r,l,ve,Kl,Hc,n,Ne,Ri,ya,Fn,g,"Throttled",-0,0),h);break t}hg(r,l,ve,Kl,Hc,n,Ne,Ri,ya,Fn,g,null,-0,0)}}break}while(!0);en(t)}function hg(t,n,l,r,h,g,y,v,E,w,L,V,N,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},ag(n,g,V);var I=(g&62914560)===g?Ql-Ee():(g&4194048)===g?rg-Ee():0;if(I=Rv(V,I),I!==null){En=g,t.cancelPendingCommit=I(_g.bind(null,t,n,g,l,r,h,y,v,E,L,V,null,N,k)),$n(t,g,y,!w);return}}_g(t,n,g,l,r,h,y,v,E)}function Kb(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(!De(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&=~Lc,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&&Sf(t,l,n)}function Fl(){return(Mt&6)===0?(ys(0),!1):!0}function Yc(){if(gt!==null){if(Ot===0)var t=gt.return;else t=gt,gn=Si=null,ic(t),ca=null,Pa=0,t=gt;for(;t!==null;)Xd(t.alternate,t),t=t.return;gt=null}}function va(t,n){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,dv(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),En=0,Yc(),Nt=t,gt=l=hn(t.current,null),yt=n,Ot=0,we=null,Fn=!1,pa=La(t,n),kc=!1,ya=Ne=Lc=Ri=Wn=Xt=0,ve=ms=null,Hc=!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,ml(),l}function dg(t,n){ut=null,j.H=os,n===ra||n===Tl?(n=Ch(),Ot=3):n===Qr?(n=Ch(),Ot=4):Ot=n===vc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,we=n,gt===null&&(Xt=1,Hl(t,Ve(n,t.current)))}function gg(){var t=ze.current;return t===null?!0:(yt&4194048)===yt?Ge===null:(yt&62914560)===yt||(yt&536870912)!==0?t===Ge:!1}function mg(){var t=j.H;return j.H=os,t===null?os:t}function pg(){var t=j.A;return j.A=Qb,t}function Wl(){Xt=4,Fn||(yt&4194048)!==yt&&ze.current!==null||(pa=!0),(Wn&134217727)===0&&(Ri&134217727)===0||Nt===null||$n(Nt,yt,Ne,!1)}function qc(t,n,l){var r=Mt;Mt|=2;var h=mg(),g=pg();(Nt!==t||yt!==n)&&(Kl=null,va(t,n)),n=!1;var y=Xt;t:do try{if(Ot!==0&&gt!==null){var v=gt,E=we;switch(Ot){case 8:Yc(),y=6;break t;case 3:case 2:case 9:case 6:ze.current===null&&(n=!0);var w=Ot;if(Ot=0,we=null,_a(t,v,E,w),l&&pa){y=0;break t}break;default:w=Ot,Ot=0,we=null,_a(t,v,E,w)}}Fb(),y=Xt;break}catch(L){dg(t,L)}while(!0);return n&&t.shellSuspendCounter++,gn=Si=null,Mt=r,j.H=h,j.A=g,gt===null&&(Nt=null,yt=0,ml()),y}function Fb(){for(;gt!==null;)yg(gt)}function Wb(t,n){var l=Mt;Mt|=2;var r=mg(),h=pg();Nt!==t||yt!==n?(Kl=null,Zl=Ee()+500,va(t,n)):pa=La(t,n);t:do try{if(Ot!==0&&gt!==null){n=gt;var g=we;e:switch(Ot){case 1:Ot=0,we=null,_a(t,n,g,1);break;case 2:case 9:if(Oh(g)){Ot=0,we=null,bg(n);break}n=function(){Ot!==2&&Ot!==9||Nt!==t||(Ot=7),en(t)},g.then(n,n);break t;case 3:Ot=7;break t;case 4:Ot=5;break t;case 7:Oh(g)?(Ot=0,we=null,bg(n)):(Ot=0,we=null,_a(t,n,g,7));break;case 5:var y=null;switch(gt.tag){case 26:y=gt.memoizedState;case 5:case 27:var v=gt;if(y?im(y):v.stateNode.complete){Ot=0,we=null;var E=v.sibling;if(E!==null)gt=E;else{var w=v.return;w!==null?(gt=w,Jl(w)):gt=null}break e}}Ot=0,we=null,_a(t,n,g,5);break;case 6:Ot=0,we=null,_a(t,n,g,6);break;case 8:Yc(),Xt=6;break t;default:throw Error(s(462))}}Jb();break}catch(L){dg(t,L)}while(!0);return gn=Si=null,j.H=r,j.A=h,Mt=l,gt!==null?0:(Nt=null,yt=0,ml(),Xt)}function Jb(){for(;gt!==null&&!vy();)yg(gt)}function yg(t){var n=Yd(t.alternate,t,Mn);t.memoizedProps=t.pendingProps,n===null?Jl(t):gt=n}function bg(t){var n=t,l=n.alternate;switch(n.tag){case 15:case 0:n=kd(l,n,n.pendingProps,n.type,void 0,yt);break;case 11:n=kd(l,n,n.pendingProps,n.type.render,n.ref,yt);break;case 5:ic(n);default:Xd(l,n),n=gt=ph(n,Mn),n=Yd(l,n,Mn)}t.memoizedProps=t.pendingProps,n===null?Jl(t):gt=n}function _a(t,n,l,r){gn=Si=null,ic(n),ca=null,Pa=0;var h=n.return;try{if(Bb(t,h,n,l,yt)){Xt=1,Hl(t,Ve(l,t.current)),gt=null;return}}catch(g){if(h!==null)throw gt=h,g;Xt=1,Hl(t,Ve(l,t.current)),gt=null;return}n.flags&32768?(vt||r===1?t=!0:pa||(yt&536870912)!==0?t=!1:(Fn=t=!0,(r===2||r===9||r===3||r===6)&&(r=ze.current,r!==null&&r.tag===13&&(r.flags|=16384))),vg(n,t)):Jl(n)}function Jl(t){var n=t;do{if((n.flags&32768)!==0){vg(n,Fn);return}t=n.return;var l=Yb(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 vg(t,n){do{var l=qb(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 _g(t,n,l,r,h,g,y,v,E){t.cancelPendingCommit=null;do Il();while(Pt!==0);if((Mt&6)!==0)throw Error(s(327));if(n!==null){if(n===t.current)throw Error(s(177));if(g=n.lanes|n.childLanes,g|=zr,Cy(t,l,g,y,v,E),t===Nt&&(gt=Nt=null,yt=0),ba=n,In=t,En=l,Bc=g,Uc=h,cg=r,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,tv(Ps,function(){return Eg(),null})):(t.callbackNode=null,t.callbackPriority=0),r=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||r){r=j.T,j.T=null,h=X.p,X.p=2,y=Mt,Mt|=4;try{Xb(t,n,l)}finally{Mt=y,X.p=h,j.T=r}}Pt=1,xg(),Sg(),Tg()}}function xg(){if(Pt===1){Pt=0;var t=In,n=ba,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=j.T,j.T=null;var r=X.p;X.p=2;var h=Mt;Mt|=4;try{eg(n,t);var g=tu,y=oh(t.containerInfo),v=g.focusedElem,E=g.selectionRange;if(y!==v&&v&&v.ownerDocument&&lh(v.ownerDocument.documentElement,v)){if(E!==null&&Er(v)){var w=E.start,L=E.end;if(L===void 0&&(L=w),"selectionStart"in v)v.selectionStart=w,v.selectionEnd=Math.min(L,v.value.length);else{var V=v.ownerDocument||document,N=V&&V.defaultView||window;if(N.getSelection){var k=N.getSelection(),I=v.textContent.length,nt=Math.min(E.start,I),wt=E.end===void 0?nt:Math.min(E.end,I);!k.extend&&nt>wt&&(y=wt,wt=nt,nt=y);var C=sh(v,nt),O=sh(v,wt);if(C&&O&&(k.rangeCount!==1||k.anchorNode!==C.node||k.anchorOffset!==C.offset||k.focusNode!==O.node||k.focusOffset!==O.offset)){var R=V.createRange();R.setStart(C.node,C.offset),k.removeAllRanges(),nt>wt?(k.addRange(R),k.extend(O.node,O.offset)):(R.setEnd(O.node,O.offset),k.addRange(R))}}}}for(V=[],k=v;k=k.parentNode;)k.nodeType===1&&V.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<V.length;v++){var B=V[v];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}co=!!Pc,tu=Pc=null}finally{Mt=h,X.p=r,j.T=l}}t.current=n,Pt=2}}function Sg(){if(Pt===2){Pt=0;var t=In,n=ba,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=j.T,j.T=null;var r=X.p;X.p=2;var h=Mt;Mt|=4;try{Jd(t,n.alternate,n)}finally{Mt=h,X.p=r,j.T=l}}Pt=3}}function Tg(){if(Pt===4||Pt===3){Pt=0,_y();var t=In,n=ba,l=En,r=cg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Pt=5:(Pt=0,ba=In=null,Mg(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(Jn=null),lr(l),n=n.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(ka,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=j.T,h=X.p,X.p=2,j.T=null;try{for(var g=t.onRecoverableError,y=0;y<r.length;y++){var v=r[y];g(v.value,{componentStack:v.stack})}}finally{j.T=n,X.p=h}}(En&3)!==0&&Il(),en(t),h=t.pendingLanes,(l&261930)!==0&&(h&42)!==0?t===Vc?ps++:(ps=0,Vc=t):ps=0,ys(0)}}function Mg(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ia(n)))}function Il(){return xg(),Sg(),Tg(),Eg()}function Eg(){if(Pt!==5)return!1;var t=In,n=Bc;Bc=0;var l=lr(En),r=j.T,h=X.p;try{X.p=32>l?32:l,j.T=null,l=Uc,Uc=null;var g=In,y=En;if(Pt=0,ba=In=null,En=0,(Mt&6)!==0)throw Error(s(331));var v=Mt;if(Mt|=4,lg(g.current),ig(g,g.current,y,l),Mt=v,ys(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(ka,g)}catch{}return!0}finally{X.p=h,j.T=r,Mg(t,n)}}function Ag(t,n,l){n=Ve(l,n),n=bc(t.stateNode,n,2),t=Gn(t,n,2),t!==null&&(Ha(t,2),en(t))}function Dt(t,n,l){if(t.tag===3)Ag(t,t,l);else for(;n!==null;){if(n.tag===3){Ag(n,t,l);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jn===null||!Jn.has(r))){t=Ve(l,t),l=Od(2),r=Gn(n,l,2),r!==null&&(Dd(l,r,n,t),Ha(r,2),en(r));break}}n=n.return}}function Xc(t,n,l){var r=t.pingCache;if(r===null){r=t.pingCache=new Zb;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)||(kc=!0,h.add(l),t=Ib.bind(null,t,n,l),n.then(t,t))}function Ib(t,n,l){var r=t.pingCache;r!==null&&r.delete(n),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Nt===t&&(yt&l)===l&&(Xt===4||Xt===3&&(yt&62914560)===yt&&300>Ee()-Ql?(Mt&2)===0&&va(t,0):Lc|=l,ya===yt&&(ya=0)),en(t)}function Og(t,n){n===0&&(n=xf()),t=vi(t,n),t!==null&&(Ha(t,n),en(t))}function $b(t){var n=t.memoizedState,l=0;n!==null&&(l=n.retryLane),Og(t,l)}function Pb(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(s(314))}r!==null&&r.delete(n),Og(t,l)}function tv(t,n){return nr(t,n)}var $l=null,xa=null,Gc=!1,Pl=!1,Qc=!1,Pn=0;function en(t){t!==xa&&t.next===null&&(xa===null?$l=xa=t:xa=xa.next=t),Pl=!0,Gc||(Gc=!0,nv())}function ys(t,n){if(!Qc&&Pl){Qc=!0;do for(var l=!1,r=$l;r!==null;){if(t!==0){var h=r.pendingLanes;if(h===0)var g=0;else{var y=r.suspendedLanes,v=r.pingedLanes;g=(1<<31-Oe(42|t)+1)-1,g&=h&~(y&~v),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,Rg(r,g))}else g=yt,g=il(r,r===Nt?g:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(g&3)===0||La(r,g)||(l=!0,Rg(r,g));r=r.next}while(l);Qc=!1}}function ev(){Dg()}function Dg(){Pl=Gc=!1;var t=0;Pn!==0&&hv()&&(t=Pn);for(var n=Ee(),l=null,r=$l;r!==null;){var h=r.next,g=Cg(r,n);g===0?(r.next=null,l===null?$l=h:l.next=h,h===null&&(xa=l)):(l=r,(t!==0||(g&3)!==0)&&(Pl=!0)),r=h}Pt!==0&&Pt!==5||ys(t),Pn!==0&&(Pn=0)}function Cg(t,n){for(var l=t.suspendedLanes,r=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var y=31-Oe(g),v=1<<y,E=h[y];E===-1?((v&l)===0||(v&r)!==0)&&(h[y]=Dy(v,n)):E<=n&&(t.expiredLanes|=v),g&=~v}if(n=Nt,l=yt,l=il(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&&ir(r),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||La(t,l)){if(n=l&-l,n===t.callbackPriority)return n;switch(r!==null&&ir(r),lr(l)){case 2:case 8:l=vf;break;case 32:l=Ps;break;case 268435456:l=_f;break;default:l=Ps}return r=zg.bind(null,t),l=nr(l,r),t.callbackPriority=n,t.callbackNode=l,n}return r!==null&&r!==null&&ir(r),t.callbackPriority=2,t.callbackNode=null,2}function zg(t,n){if(Pt!==0&&Pt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Il()&&t.callbackNode!==l)return null;var r=yt;return r=il(t,t===Nt?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(fg(t,r,n),Cg(t,Ee()),t.callbackNode!=null&&t.callbackNode===l?zg.bind(null,t):null)}function Rg(t,n){if(Il())return null;fg(t,n,!0)}function nv(){gv(function(){(Mt&6)!==0?nr(bf,ev):Dg()})}function Zc(){if(Pn===0){var t=la;t===0&&(t=tl,tl<<=1,(tl&261888)===0&&(tl=256)),Pn=t}return Pn}function wg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ol(""+t)}function Ng(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 iv(t,n,l,r,h){if(n==="submit"&&l&&l.stateNode===h){var g=wg((h[ge]||null).action),y=r.submitter;y&&(n=(n=y[ge]||null)?wg(n.formAction):y.getAttribute("formAction"),n!==null&&(g=n,y=null));var v=new fl("action","action",null,r,h);t.push({event:v,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Pn!==0){var E=y?Ng(h,y):new FormData(h);hc(l,{pending:!0,data:E,method:h.method,action:g},null,E)}}else typeof g=="function"&&(v.preventDefault(),E=y?Ng(h,y):new FormData(h),hc(l,{pending:!0,data:E,method:h.method,action:g},g,E))},currentTarget:h}]})}}for(var Kc=0;Kc<Cr.length;Kc++){var Fc=Cr[Kc],av=Fc.toLowerCase(),sv=Fc[0].toUpperCase()+Fc.slice(1);We(av,"on"+sv)}We(uh,"onAnimationEnd"),We(fh,"onAnimationIteration"),We(hh,"onAnimationStart"),We("dblclick","onDoubleClick"),We("focusin","onFocus"),We("focusout","onBlur"),We(xb,"onTransitionRun"),We(Sb,"onTransitionStart"),We(Tb,"onTransitionCancel"),We(dh,"onTransitionEnd"),Zi("onMouseEnter",["mouseout","mouseover"]),Zi("onMouseLeave",["mouseout","mouseover"]),Zi("onPointerEnter",["pointerout","pointerover"]),Zi("onPointerLeave",["pointerout","pointerover"]),mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mi("onBeforeInput",["compositionend","keypress","textInput","paste"]),mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bs="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(" "),lv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bs));function jg(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 v=r[y],E=v.instance,w=v.currentTarget;if(v=v.listener,E!==g&&h.isPropagationStopped())break t;g=v,h.currentTarget=w;try{g(h)}catch(L){gl(L)}h.currentTarget=null,g=E}else for(y=0;y<r.length;y++){if(v=r[y],E=v.instance,w=v.currentTarget,v=v.listener,E!==g&&h.isPropagationStopped())break t;g=v,h.currentTarget=w;try{g(h)}catch(L){gl(L)}h.currentTarget=null,g=E}}}}function mt(t,n){var l=n[or];l===void 0&&(l=n[or]=new Set);var r=t+"__bubble";l.has(r)||(kg(n,t,2,!1),l.add(r))}function Wc(t,n,l){var r=0;n&&(r|=4),kg(l,t,r,n)}var to="_reactListening"+Math.random().toString(36).slice(2);function Jc(t){if(!t[to]){t[to]=!0,Df.forEach(function(l){l!=="selectionchange"&&(lv.has(l)||Wc(l,!1,t),Wc(l,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[to]||(n[to]=!0,Wc("selectionchange",!1,n))}}function kg(t,n,l,r){switch(um(n)){case 2:var h=jv;break;case 8:h=kv;break;default:h=fu}l=h.bind(null,n,l,t),h=void 0,!pr||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 Ic(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 v=r.stateNode.containerInfo;if(v===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(;v!==null;){if(y=Xi(v),y===null)return;if(E=y.tag,E===5||E===6||E===26||E===27){r=g=y;continue t}v=v.parentNode}}r=r.return}Vf(function(){var w=g,L=gr(l),V=[];t:{var N=gh.get(t);if(N!==void 0){var k=fl,I=t;switch(t){case"keypress":if(cl(l)===0)break t;case"keydown":case"keyup":k=Py;break;case"focusin":I="focus",k=_r;break;case"focusout":I="blur",k=_r;break;case"beforeblur":case"afterblur":k=_r;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=Xf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Yy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=nb;break;case uh:case fh:case hh:k=Gy;break;case dh:k=ab;break;case"scroll":case"scrollend":k=Uy;break;case"wheel":k=lb;break;case"copy":case"cut":case"paste":k=Zy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Qf;break;case"toggle":case"beforetoggle":k=rb}var nt=(n&4)!==0,wt=!nt&&(t==="scroll"||t==="scrollend"),C=nt?N!==null?N+"Capture":null:N;nt=[];for(var O=w,R;O!==null;){var B=O;if(R=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||R===null||C===null||(B=Va(O,C),B!=null&&nt.push(vs(O,B,R))),wt)break;O=O.return}0<nt.length&&(N=new k(N,I,null,l,L),V.push({event:N,listeners:nt}))}}if((n&7)===0){t:{if(N=t==="mouseover"||t==="pointerover",k=t==="mouseout"||t==="pointerout",N&&l!==dr&&(I=l.relatedTarget||l.fromElement)&&(Xi(I)||I[qi]))break t;if((k||N)&&(N=L.window===L?L:(N=L.ownerDocument)?N.defaultView||N.parentWindow:window,k?(I=l.relatedTarget||l.toElement,k=w,I=I?Xi(I):null,I!==null&&(wt=c(I),nt=I.tag,I!==wt||nt!==5&&nt!==27&&nt!==6)&&(I=null)):(k=null,I=w),k!==I)){if(nt=Xf,B="onMouseLeave",C="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(nt=Qf,B="onPointerLeave",C="onPointerEnter",O="pointer"),wt=k==null?N:Ua(k),R=I==null?N:Ua(I),N=new nt(B,O+"leave",k,l,L),N.target=wt,N.relatedTarget=R,B=null,Xi(L)===w&&(nt=new nt(C,O+"enter",I,l,L),nt.target=R,nt.relatedTarget=wt,B=nt),wt=B,k&&I)e:{for(nt=ov,C=k,O=I,R=0,B=C;B;B=nt(B))R++;B=0;for(var et=O;et;et=nt(et))B++;for(;0<R-B;)C=nt(C),R--;for(;0<B-R;)O=nt(O),B--;for(;R--;){if(C===O||O!==null&&C===O.alternate){nt=C;break e}C=nt(C),O=nt(O)}nt=null}else nt=null;k!==null&&Lg(V,N,k,nt,!1),I!==null&&wt!==null&&Lg(V,wt,I,nt,!0)}}t:{if(N=w?Ua(w):window,k=N.nodeName&&N.nodeName.toLowerCase(),k==="select"||k==="input"&&N.type==="file")var xt=Pf;else if(If(N))if(th)xt=bb;else{xt=pb;var $=mb}else k=N.nodeName,!k||k.toLowerCase()!=="input"||N.type!=="checkbox"&&N.type!=="radio"?w&&hr(w.elementType)&&(xt=Pf):xt=yb;if(xt&&(xt=xt(t,w))){$f(V,xt,l,L);break t}$&&$(t,N,w),t==="focusout"&&w&&N.type==="number"&&w.memoizedProps.value!=null&&fr(N,"number",N.value)}switch($=w?Ua(w):window,t){case"focusin":(If($)||$.contentEditable==="true")&&($i=$,Ar=w,Fa=null);break;case"focusout":Fa=Ar=$i=null;break;case"mousedown":Or=!0;break;case"contextmenu":case"mouseup":case"dragend":Or=!1,rh(V,l,L);break;case"selectionchange":if(_b)break;case"keydown":case"keyup":rh(V,l,L)}var ft;if(Sr)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 Ii?Wf(t,l)&&(bt="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(bt="onCompositionStart");bt&&(Zf&&l.locale!=="ko"&&(Ii||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Ii&&(ft=Yf()):(Hn=L,yr="value"in Hn?Hn.value:Hn.textContent,Ii=!0)),$=eo(w,bt),0<$.length&&(bt=new Gf(bt,t,null,l,L),V.push({event:bt,listeners:$}),ft?bt.data=ft:(ft=Jf(l),ft!==null&&(bt.data=ft)))),(ft=ub?fb(t,l):hb(t,l))&&(bt=eo(w,"onBeforeInput"),0<bt.length&&($=new Gf("onBeforeInput","beforeinput",null,l,L),V.push({event:$,listeners:bt}),$.data=ft)),iv(V,t,w,l,L)}jg(V,n)})}function vs(t,n,l){return{instance:t,listener:n,currentTarget:l}}function eo(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=Va(t,l),h!=null&&r.unshift(vs(t,h,g)),h=Va(t,n),h!=null&&r.push(vs(t,h,g))),t.tag===3)return r;t=t.return}return[]}function ov(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Lg(t,n,l,r,h){for(var g=n._reactName,y=[];l!==null&&l!==r;){var v=l,E=v.alternate,w=v.stateNode;if(v=v.tag,E!==null&&E===r)break;v!==5&&v!==26&&v!==27||w===null||(E=w,h?(w=Va(l,g),w!=null&&y.unshift(vs(l,w,E))):h||(w=Va(l,g),w!=null&&y.push(vs(l,w,E)))),l=l.return}y.length!==0&&t.push({event:n,listeners:y})}var rv=/\r\n?/g,cv=/\u0000|\uFFFD/g;function Hg(t){return(typeof t=="string"?t:""+t).replace(rv,`
9
- `).replace(cv,"")}function Bg(t,n){return n=Hg(n),Hg(t)===n}function Rt(t,n,l,r,h,g){switch(l){case"children":typeof r=="string"?n==="body"||n==="textarea"&&r===""||Fi(t,r):(typeof r=="number"||typeof r=="bigint")&&n!=="body"&&Fi(t,""+r);break;case"className":sl(t,"class",r);break;case"tabIndex":sl(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":sl(t,l,r);break;case"style":Bf(t,r,g);break;case"data":if(n!=="object"){sl(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=ol(""+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"&&Rt(t,n,"name",h.name,h,null),Rt(t,n,"formEncType",h.formEncType,h,null),Rt(t,n,"formMethod",h.formMethod,h,null),Rt(t,n,"formTarget",h.formTarget,h,null)):(Rt(t,n,"encType",h.encType,h,null),Rt(t,n,"method",h.method,h,null),Rt(t,n,"target",h.target,h,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(l);break}r=ol(""+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(s(61));if(l=r.__html,l!=null){if(h.children!=null)throw Error(s(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=ol(""+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),al(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":al(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=Hy.get(l)||l,al(t,l,r))}}function $c(t,n,l,r,h,g){switch(l){case"style":Bf(t,r,g);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(l=r.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"children":typeof r=="string"?Fi(t,r):(typeof r=="number"||typeof r=="bigint")&&Fi(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(!Cf.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[ge]||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,""):al(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(s(137,n));default:Rt(t,n,g,y,l,null)}}h&&Rt(t,n,"srcSet",l.srcSet,l,null),r&&Rt(t,n,"src",l.src,l,null);return;case"input":mt("invalid",t);var v=g=y=h=null,E=null,w=null;for(r in l)if(l.hasOwnProperty(r)){var L=l[r];if(L!=null)switch(r){case"name":h=L;break;case"type":y=L;break;case"checked":E=L;break;case"defaultChecked":w=L;break;case"value":g=L;break;case"defaultValue":v=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(137,n));break;default:Rt(t,n,r,L,l,null)}}jf(t,g,v,E,w,y,h,!1);return;case"select":mt("invalid",t),r=y=g=null;for(h in l)if(l.hasOwnProperty(h)&&(v=l[h],v!=null))switch(h){case"value":g=v;break;case"defaultValue":y=v;break;case"multiple":r=v;default:Rt(t,n,h,v,l,null)}n=g,l=y,t.multiple=!!r,n!=null?Ki(t,!!r,n,!1):l!=null&&Ki(t,!!r,l,!0);return;case"textarea":mt("invalid",t),g=h=r=null;for(y in l)if(l.hasOwnProperty(y)&&(v=l[y],v!=null))switch(y){case"value":r=v;break;case"defaultValue":h=v;break;case"children":g=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(s(91));break;default:Rt(t,n,y,v,l,null)}Lf(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":Rt(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<bs.length;r++)mt(bs[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(w in l)if(l.hasOwnProperty(w)&&(r=l[w],r!=null))switch(w){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:Rt(t,n,w,r,l,null)}return;default:if(hr(n)){for(L in l)l.hasOwnProperty(L)&&(r=l[L],r!==void 0&&$c(t,n,L,r,l,void 0));return}}for(v in l)l.hasOwnProperty(v)&&(r=l[v],r!=null&&Rt(t,n,v,r,l,null))}function uv(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,v=null,E=null,w=null,L=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)||Rt(t,n,k,null,r,V)}}for(var N in r){var k=r[N];if(V=l[N],r.hasOwnProperty(N)&&(k!=null||V!=null))switch(N){case"type":g=k;break;case"name":h=k;break;case"checked":w=k;break;case"defaultChecked":L=k;break;case"value":y=k;break;case"defaultValue":v=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(s(137,n));break;default:k!==V&&Rt(t,n,N,k,r,V)}}ur(t,y,v,E,w,L,g,h);return;case"select":k=y=v=N=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)||Rt(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":N=g;break;case"defaultValue":v=g;break;case"multiple":y=g;default:g!==E&&Rt(t,n,h,g,r,E)}n=v,l=y,r=k,N!=null?Ki(t,!!l,N,!1):!!r!=!!l&&(n!=null?Ki(t,!!l,n,!0):Ki(t,!!l,l?[]:"",!1));return;case"textarea":k=N=null;for(v in l)if(h=l[v],l.hasOwnProperty(v)&&h!=null&&!r.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Rt(t,n,v,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":N=h;break;case"defaultValue":k=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==g&&Rt(t,n,y,h,r,g)}kf(t,N,k);return;case"option":for(var I in l)N=l[I],l.hasOwnProperty(I)&&N!=null&&!r.hasOwnProperty(I)&&(I==="selected"?t.selected=!1:Rt(t,n,I,null,r,N));for(E in r)N=r[E],k=l[E],r.hasOwnProperty(E)&&N!==k&&(N!=null||k!=null)&&(E==="selected"?t.selected=N&&typeof N!="function"&&typeof N!="symbol":Rt(t,n,E,N,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)N=l[nt],l.hasOwnProperty(nt)&&N!=null&&!r.hasOwnProperty(nt)&&Rt(t,n,nt,null,r,N);for(w in r)if(N=r[w],k=l[w],r.hasOwnProperty(w)&&N!==k&&(N!=null||k!=null))switch(w){case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(s(137,n));break;default:Rt(t,n,w,N,r,k)}return;default:if(hr(n)){for(var wt in l)N=l[wt],l.hasOwnProperty(wt)&&N!==void 0&&!r.hasOwnProperty(wt)&&$c(t,n,wt,void 0,r,N);for(L in r)N=r[L],k=l[L],!r.hasOwnProperty(L)||N===k||N===void 0&&k===void 0||$c(t,n,L,N,r,k);return}}for(var C in l)N=l[C],l.hasOwnProperty(C)&&N!=null&&!r.hasOwnProperty(C)&&Rt(t,n,C,null,r,N);for(V in r)N=r[V],k=l[V],!r.hasOwnProperty(V)||N===k||N==null&&k==null||Rt(t,n,V,N,r,k)}function Ug(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fv(){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,v=h.duration;if(g&&v&&Ug(y)){for(y=0,v=h.responseEnd,r+=1;r<l.length;r++){var E=l[r],w=E.startTime;if(w>v)break;var L=E.transferSize,V=E.initiatorType;L&&Ug(V)&&(E=E.responseEnd,y+=L*(E<v?1:(v-w)/(E-w)))}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 Pc=null,tu=null;function no(t){return t.nodeType===9?t:t.ownerDocument}function Vg(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 Yg(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 eu(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 nu=null;function hv(){var t=window.event;return t&&t.type==="popstate"?t===nu?!1:(nu=t,!0):(nu=null,!1)}var qg=typeof setTimeout=="function"?setTimeout:void 0,dv=typeof clearTimeout=="function"?clearTimeout:void 0,Xg=typeof Promise=="function"?Promise:void 0,gv=typeof queueMicrotask=="function"?queueMicrotask:typeof Xg<"u"?function(t){return Xg.resolve(null).then(t).catch(mv)}:qg;function mv(t){setTimeout(function(){throw t})}function ti(t){return t==="head"}function Gg(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),Ea(n);return}r--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")r++;else if(l==="html")_s(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,_s(l);for(var g=l.firstChild;g;){var y=g.nextSibling,v=g.nodeName;g[Ba]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=y}}else l==="body"&&_s(t.ownerDocument.body);l=h}while(l);Ea(n)}function Qg(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 iu(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":iu(l),rr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function pv(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[Ba])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 yv(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 Zg(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 au(t){return t.data==="$?"||t.data==="$~"}function su(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function bv(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 lu=null;function Kg(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 Fg(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 Wg(t,n,l){switch(n=no(l),t){case"html":if(t=n.documentElement,!t)throw Error(s(452));return t;case"head":if(t=n.head,!t)throw Error(s(453));return t;case"body":if(t=n.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function _s(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);rr(t)}var Ze=new Map,Jg=new Set;function io(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var An=X.d;X.d={f:vv,r:_v,D:xv,C:Sv,L:Tv,m:Mv,X:Av,S:Ev,M:Ov};function vv(){var t=An.f(),n=Fl();return t||n}function _v(t){var n=Gi(t);n!==null&&n.tag===5&&n.type==="form"?dd(n):An.r(t)}var Sa=typeof document>"u"?null:document;function Ig(t,n,l){var r=Sa;if(r&&typeof n=="string"&&n){var h=Be(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),Jg.has(h)||(Jg.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 xv(t){An.D(t),Ig("dns-prefetch",t,null)}function Sv(t,n){An.C(t,n),Ig("preconnect",t,n)}function Tv(t,n,l){An.L(t,n,l);var r=Sa;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=Ta(t);break;case"script":g=Ma(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(xs(g))||n==="script"&&r.querySelector(Ss(g))||(n=r.createElement("link"),oe(n,"link",t),ee(n),r.head.appendChild(n)))}}function Mv(t,n){An.m(t,n);var l=Sa;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=Ma(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(Ss(g)))return}r=l.createElement("link"),oe(r,"link",t),ee(r),l.head.appendChild(r)}}}function Ev(t,n,l){An.S(t,n,l);var r=Sa;if(r&&t){var h=Qi(r).hoistableStyles,g=Ta(t);n=n||"default";var y=h.get(g);if(!y){var v={loading:0,preload:null};if(y=r.querySelector(xs(g)))v.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":n},l),(l=Ze.get(g))&&ou(t,l);var E=y=r.createElement("link");ee(E),oe(E,"link",t),E._p=new Promise(function(w,L){E.onload=w,E.onerror=L}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,ao(y,n,r)}y={type:"stylesheet",instance:y,count:1,state:v},h.set(g,y)}}}function Av(t,n){An.X(t,n);var l=Sa;if(l&&t){var r=Qi(l).hoistableScripts,h=Ma(t),g=r.get(h);g||(g=l.querySelector(Ss(h)),g||(t=b({src:t,async:!0},n),(n=Ze.get(h))&&ru(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 Ov(t,n){An.M(t,n);var l=Sa;if(l&&t){var r=Qi(l).hoistableScripts,h=Ma(t),g=r.get(h);g||(g=l.querySelector(Ss(h)),g||(t=b({src:t,async:!0,type:"module"},n),(n=Ze.get(h))&&ru(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 $g(t,n,l,r){var h=(h=ot.current)?io(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Ta(l.href),l=Qi(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=Ta(l.href);var g=Qi(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(xs(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||Dv(h,t,l,y.state))),n&&r===null)throw Error(s(528,""));return y}if(n&&r!==null)throw Error(s(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ma(l),l=Qi(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(s(444,t))}}function Ta(t){return'href="'+Be(t)+'"'}function xs(t){return'link[rel="stylesheet"]['+t+"]"}function Pg(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function Dv(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 Ma(t){return'[src="'+Be(t)+'"]'}function Ss(t){return"script[async]"+t}function tm(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),ao(r,l.precedence,t),n.instance=r;case"stylesheet":h=Ta(l.href);var g=t.querySelector(xs(h));if(g)return n.state.loading|=4,n.instance=g,ee(g),g;r=Pg(l),(h=Ze.get(h))&&ou(r,h),g=(t.ownerDocument||t).createElement("link"),ee(g);var y=g;return y._p=new Promise(function(v,E){y.onload=v,y.onerror=E}),oe(g,"link",r),n.state.loading|=4,ao(g,l.precedence,t),n.instance=g;case"script":return g=Ma(l.src),(h=t.querySelector(Ss(g)))?(n.instance=h,ee(h),h):(r=l,(h=Ze.get(g))&&(r=b({},l),ru(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(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,ao(r,l.precedence,t));return n.instance}function ao(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 v=r[y];if(v.dataset.precedence===n)g=v;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 ou(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function ru(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var so=null;function em(t,n,l){if(so===null){var r=new Map,h=so=new Map;h.set(l,r)}else h=so,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[Ba]||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 v=r.get(y);v?v.push(g):r.set(y,[g])}}return r}function nm(t,n,l){t=t.ownerDocument||t,t.head.insertBefore(l,n==="title"?t.querySelector("head > title"):null)}function Cv(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 im(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function zv(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=Ta(r.href),g=n.querySelector(xs(h));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=lo.bind(t),n.then(t,t)),l.state.loading|=4,l.instance=g,ee(g);return}g=n.ownerDocument||n,r=Pg(r),(h=Ze.get(h))&&ou(r,h),g=g.createElement("link"),ee(g);var y=g;y._p=new Promise(function(v,E){y.onload=v,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=lo.bind(t),n.addEventListener("load",l),n.addEventListener("error",l))}}var cu=0;function Rv(t,n){return t.stylesheets&&t.count===0&&ro(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var r=setTimeout(function(){if(t.stylesheets&&ro(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&cu===0&&(cu=62500*fv());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ro(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>cu?50:800)+n);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(h)}}:null}function lo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ro(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var oo=null;function ro(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,oo=new Map,n.forEach(wv,t),oo=null,lo.call(t))}function wv(t,n){if(!(n.state.loading&4)){var l=oo.get(t);if(l)var r=l.get(null);else{l=new Map,oo.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=lo.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 Ts={$$typeof:Y,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Nv(t,n,l,r,h,g,y,v,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=ar(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ar(0),this.hiddenUpdates=ar(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 am(t,n,l,r,h,g,y,v,E,w,L,V){return t=new Nv(t,n,l,y,E,w,L,V,v),n=1,g===!0&&(n|=24),g=Ce(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},Zr(g),t}function sm(t){return t?(t=ea,t):ea}function lm(t,n,l,r,h,g){h=sm(h),r.context===null?r.context=h:r.pendingContext=h,r=Xn(n),r.payload={element:l},g=g===void 0?null:g,g!==null&&(r.callback=g),l=Gn(t,r,n),l!==null&&(_e(l,t,n),es(l,t,n))}function om(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<n?l:n}}function uu(t,n){om(t,n),(t=t.alternate)&&om(t,n)}function rm(t){if(t.tag===13||t.tag===31){var n=vi(t,67108864);n!==null&&_e(n,t,67108864),uu(t,67108864)}}function cm(t){if(t.tag===13||t.tag===31){var n=je();n=sr(n);var l=vi(t,n);l!==null&&_e(l,t,n),uu(t,n)}}var co=!0;function jv(t,n,l,r){var h=j.T;j.T=null;var g=X.p;try{X.p=2,fu(t,n,l,r)}finally{X.p=g,j.T=h}}function kv(t,n,l,r){var h=j.T;j.T=null;var g=X.p;try{X.p=8,fu(t,n,l,r)}finally{X.p=g,j.T=h}}function fu(t,n,l,r){if(co){var h=hu(r);if(h===null)Ic(t,n,r,uo,l),fm(t,r);else if(Hv(h,t,n,l,r))r.stopPropagation();else if(fm(t,r),n&4&&-1<Lv.indexOf(t)){for(;h!==null;){var g=Gi(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var y=gi(g.pendingLanes);if(y!==0){var v=g;for(v.pendingLanes|=2,v.entangledLanes|=2;y;){var E=1<<31-Oe(y);v.entanglements[1]|=E,y&=~E}en(g),(Mt&6)===0&&(Zl=Ee()+500,ys(0))}}break;case 31:case 13:v=vi(g,2),v!==null&&_e(v,g,2),Fl(),uu(g,2)}if(g=hu(r),g===null&&Ic(t,n,r,uo,l),g===h)break;h=g}h!==null&&r.stopPropagation()}else Ic(t,n,r,null,l)}}function hu(t){return t=gr(t),du(t)}var uo=null;function du(t){if(uo=null,t=Xi(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 uo=t,null}function um(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(xy()){case bf:return 2;case vf:return 8;case Ps:case Sy:return 32;case _f:return 268435456;default:return 32}default:return 32}}var gu=!1,ei=null,ni=null,ii=null,Ms=new Map,Es=new Map,ai=[],Lv="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 fm(t,n){switch(t){case"focusin":case"focusout":ei=null;break;case"dragenter":case"dragleave":ni=null;break;case"mouseover":case"mouseout":ii=null;break;case"pointerover":case"pointerout":Ms.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Es.delete(n.pointerId)}}function As(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=Gi(n),n!==null&&rm(n)),t):(t.eventSystemFlags|=r,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function Hv(t,n,l,r,h){switch(n){case"focusin":return ei=As(ei,t,n,l,r,h),!0;case"dragenter":return ni=As(ni,t,n,l,r,h),!0;case"mouseover":return ii=As(ii,t,n,l,r,h),!0;case"pointerover":var g=h.pointerId;return Ms.set(g,As(Ms.get(g)||null,t,n,l,r,h)),!0;case"gotpointercapture":return g=h.pointerId,Es.set(g,As(Es.get(g)||null,t,n,l,r,h)),!0}return!1}function hm(t){var n=Xi(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,Af(t.priority,function(){cm(l)});return}}else if(n===31){if(n=f(l),n!==null){t.blockedOn=n,Af(t.priority,function(){cm(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 fo(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var l=hu(t.nativeEvent);if(l===null){l=t.nativeEvent;var r=new l.constructor(l.type,l);dr=r,l.target.dispatchEvent(r),dr=null}else return n=Gi(l),n!==null&&rm(n),t.blockedOn=l,!1;n.shift()}return!0}function dm(t,n,l){fo(t)&&l.delete(n)}function Bv(){gu=!1,ei!==null&&fo(ei)&&(ei=null),ni!==null&&fo(ni)&&(ni=null),ii!==null&&fo(ii)&&(ii=null),Ms.forEach(dm),Es.forEach(dm)}function ho(t,n){t.blockedOn===n&&(t.blockedOn=null,gu||(gu=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bv)))}var go=null;function gm(t){go!==t&&(go=t,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){go===t&&(go=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(du(r||l)===null)continue;break}var g=Gi(l);g!==null&&(t.splice(n,3),n-=3,hc(g,{pending:!0,data:h,method:l.method,action:r},r,h))}}))}function Ea(t){function n(E){return ho(E,t)}ei!==null&&ho(ei,t),ni!==null&&ho(ni,t),ii!==null&&ho(ii,t),Ms.forEach(n),Es.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);)hm(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[ge]||null;if(typeof g=="function")y||gm(l);else if(y){var v=null;if(g&&g.hasAttribute("formAction")){if(h=g,y=g[ge]||null)v=y.formAction;else if(du(h)!==null)continue}else v=y.action;typeof v=="function"?l[r+1]=v:(l.splice(r,3),r-=3),gm(l)}}}function mm(){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 mu(t){this._internalRoot=t}mo.prototype.render=mu.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(s(409));var l=n.current,r=je();lm(l,r,t,n,null,null)},mo.prototype.unmount=mu.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;lm(t.current,2,null,t,null,null),Fl(),n[qi]=null}};function mo(t){this._internalRoot=t}mo.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ef();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&&hm(t)}};var pm=e.version;if(pm!=="19.2.4")throw Error(s(527,pm,"19.2.4"));X.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=m(n),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var Uv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!po.isDisabled&&po.supportsFiber)try{ka=po.inject(Uv),Ae=po}catch{}}return Ds.createRoot=function(t,n){if(!o(t))throw Error(s(299));var l=!1,r="",h=Td,g=Md,y=Ed;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=am(t,1,!1,null,null,l,r,null,h,g,y,mm),t[qi]=n.current,Jc(t),new mu(n)},Ds.hydrateRoot=function(t,n,l){if(!o(t))throw Error(s(299));var r=!1,h="",g=Td,y=Md,v=Ed,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&&(v=l.onRecoverableError),l.formState!==void 0&&(E=l.formState)),n=am(t,1,!0,n,l??null,r,h,E,g,y,v,mm),n.context=sm(null),l=n.current,r=je(),r=sr(r),h=Xn(r),h.callback=null,Gn(l,h,r),l=r,n.current.lanes=l,Ha(n,l),en(n),t[qi]=n.current,Jc(t),new mo(n)},Ds.version="19.2.4",Ds}var Am;function Wv(){if(Am)return bu.exports;Am=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),bu.exports=Fv(),bu.exports}var Jv=Wv();function Is(i){return i+.5|0}const li=(i,e,a)=>Math.max(Math.min(i,a),e);function ks(i){return li(Is(i*2.55),0,255)}function fi(i){return li(Is(i*255),0,255)}function zn(i){return li(Is(i/2.55)/100,0,1)}function Om(i){return li(Is(i*100),0,100)}const Ke={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"],Iv=i=>qu[i&15],$v=i=>qu[(i&240)>>4]+qu[i&15],yo=i=>(i&240)>>4===(i&15),Pv=i=>yo(i.r)&&yo(i.g)&&yo(i.b)&&yo(i.a);function t_(i){var e=i.length,a;return i[0]==="#"&&(e===4||e===5?a={r:255&Ke[i[1]]*17,g:255&Ke[i[2]]*17,b:255&Ke[i[3]]*17,a:e===5?Ke[i[4]]*17:255}:(e===7||e===9)&&(a={r:Ke[i[1]]<<4|Ke[i[2]],g:Ke[i[3]]<<4|Ke[i[4]],b:Ke[i[5]]<<4|Ke[i[6]],a:e===9?Ke[i[7]]<<4|Ke[i[8]]:255})),a}const e_=(i,e)=>i<255?e(i):"";function n_(i){var e=Pv(i)?Iv:$v;return i?"#"+e(i.r)+e(i.g)+e(i.b)+e_(i.a,e):void 0}const i_=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function a0(i,e,a){const s=e*Math.min(a,1-a),o=(c,u=(c+i/30)%12)=>a-s*Math.max(Math.min(u-3,9-u,1),-1);return[o(0),o(8),o(4)]}function a_(i,e,a){const s=(o,c=(o+i/60)%6)=>a-a*e*Math.max(Math.min(c,4-c,1),0);return[s(5),s(3),s(1)]}function s_(i,e,a){const s=a0(i,1,.5);let o;for(e+a>1&&(o=1/(e+a),e*=o,a*=o),o=0;o<3;o++)s[o]*=1-e-a,s[o]+=e;return s}function l_(i,e,a,s,o){return i===o?(e-a)/s+(e<a?6:0):e===o?(a-i)/s+2:(i-e)/s+4}function Pu(i){const a=i.r/255,s=i.g/255,o=i.b/255,c=Math.max(a,s,o),u=Math.min(a,s,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=l_(a,s,o,p,c),d=d*60+.5),[d|0,m||0,f]}function tf(i,e,a,s){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,a,s)).map(fi)}function ef(i,e,a){return tf(a0,i,e,a)}function o_(i,e,a){return tf(s_,i,e,a)}function r_(i,e,a){return tf(a_,i,e,a)}function s0(i){return(i%360+360)%360}function c_(i){const e=i_.exec(i);let a=255,s;if(!e)return;e[5]!==s&&(a=e[6]?ks(+e[5]):fi(+e[5]));const o=s0(+e[2]),c=+e[3]/100,u=+e[4]/100;return e[1]==="hwb"?s=o_(o,c,u):e[1]==="hsv"?s=r_(o,c,u):s=ef(o,c,u),{r:s[0],g:s[1],b:s[2],a}}function u_(i,e){var a=Pu(i);a[0]=s0(a[0]+e),a=ef(a),i.r=a[0],i.g=a[1],i.b=a[2]}function f_(i){if(!i)return;const e=Pu(i),a=e[0],s=Om(e[1]),o=Om(e[2]);return i.a<255?`hsla(${a}, ${s}%, ${o}%, ${zn(i.a)})`:`hsl(${a}, ${s}%, ${o}%)`}const Dm={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"},Cm={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 h_(){const i={},e=Object.keys(Cm),a=Object.keys(Dm);let s,o,c,u,f;for(s=0;s<e.length;s++){for(u=f=e[s],o=0;o<a.length;o++)c=a[o],f=f.replace(c,Dm[c]);c=parseInt(Cm[u],16),i[f]=[c>>16&255,c>>8&255,c&255]}return i}let bo;function d_(i){bo||(bo=h_(),bo.transparent=[0,0,0,0]);const e=bo[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const g_=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function m_(i){const e=g_.exec(i);let a=255,s,o,c;if(e){if(e[7]!==s){const u=+e[7];a=e[8]?ks(u):li(u*255,0,255)}return s=+e[1],o=+e[3],c=+e[5],s=255&(e[2]?ks(s):li(s,0,255)),o=255&(e[4]?ks(o):li(o,0,255)),c=255&(e[6]?ks(c):li(c,0,255)),{r:s,g:o,b:c,a}}}function p_(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${zn(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Su=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Aa=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function y_(i,e,a){const s=Aa(zn(i.r)),o=Aa(zn(i.g)),c=Aa(zn(i.b));return{r:fi(Su(s+a*(Aa(zn(e.r))-s))),g:fi(Su(o+a*(Aa(zn(e.g))-o))),b:fi(Su(c+a*(Aa(zn(e.b))-c))),a:i.a+a*(e.a-i.a)}}function vo(i,e,a){if(i){let s=Pu(i);s[e]=Math.max(0,Math.min(s[e]+s[e]*a,e===0?360:1)),s=ef(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function l0(i,e){return i&&Object.assign(e||{},i)}function zm(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=fi(i[3]))):(e=l0(i,{r:0,g:0,b:0,a:1}),e.a=fi(e.a)),e}function b_(i){return i.charAt(0)==="r"?m_(i):c_(i)}class Gs{constructor(e){if(e instanceof Gs)return e;const a=typeof e;let s;a==="object"?s=zm(e):a==="string"&&(s=t_(e)||d_(e)||b_(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=l0(this._rgb);return e&&(e.a=zn(e.a)),e}set rgb(e){this._rgb=zm(e)}rgbString(){return this._valid?p_(this._rgb):void 0}hexString(){return this._valid?n_(this._rgb):void 0}hslString(){return this._valid?f_(this._rgb):void 0}mix(e,a){if(e){const s=this.rgb,o=e.rgb;let c;const u=a===c?.5:a,f=2*u-1,d=s.a-o.a,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2;c=1-m,s.r=255&m*s.r+c*o.r+.5,s.g=255&m*s.g+c*o.g+.5,s.b=255&m*s.b+c*o.b+.5,s.a=u*s.a+(1-u)*o.a,this.rgb=s}return this}interpolate(e,a){return e&&(this._rgb=y_(this._rgb,e._rgb,a)),this}clone(){return new Gs(this.rgb)}alpha(e){return this._rgb.a=fi(e),this}clearer(e){const a=this._rgb;return a.a*=1-e,this}greyscale(){const e=this._rgb,a=Is(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=a,this}opaquer(e){const a=this._rgb;return a.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 vo(this._rgb,2,e),this}darken(e){return vo(this._rgb,2,-e),this}saturate(e){return vo(this._rgb,1,e),this}desaturate(e){return vo(this._rgb,1,-e),this}rotate(e){return u_(this._rgb,e),this}}function On(){}const v_=(()=>{let i=0;return()=>i++})();function Tt(i){return i==null}function Ft(i){if(Array.isArray&&Array.isArray(i))return!0;const e=Object.prototype.toString.call(i);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function pt(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function fe(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function nn(i,e){return fe(i)?i:e}function ht(i,e){return typeof i>"u"?e:i}const __=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/e,o0=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*e:+i;function jt(i,e,a){if(i&&typeof i.call=="function")return i.apply(a,e)}function At(i,e,a,s){let o,c,u;if(Ft(i))for(c=i.length,o=0;o<c;o++)e.call(a,i[o],o);else if(pt(i))for(u=Object.keys(i),c=u.length,o=0;o<c;o++)e.call(a,i[u[o]],u[o])}function Lo(i,e){let a,s,o,c;if(!i||!e||i.length!==e.length)return!1;for(a=0,s=i.length;a<s;++a)if(o=i[a],c=e[a],o.datasetIndex!==c.datasetIndex||o.index!==c.index)return!1;return!0}function Ho(i){if(Ft(i))return i.map(Ho);if(pt(i)){const e=Object.create(null),a=Object.keys(i),s=a.length;let o=0;for(;o<s;++o)e[a[o]]=Ho(i[a[o]]);return e}return i}function r0(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function x_(i,e,a,s){if(!r0(i))return;const o=e[i],c=a[i];pt(o)&&pt(c)?on(o,c,s):e[i]=Ho(c)}function on(i,e,a){const s=Ft(e)?e:[e],o=s.length;if(!pt(i))return i;a=a||{};const c=a.merger||x_;let u;for(let f=0;f<o;++f){if(u=s[f],!pt(u))continue;const d=Object.keys(u);for(let m=0,p=d.length;m<p;++m)c(d[m],i,u,a)}return i}function Bs(i,e){return on(i,e,{merger:S_})}function S_(i,e,a){if(!r0(i))return;const s=e[i],o=a[i];pt(s)&&pt(o)?Bs(s,o):Object.prototype.hasOwnProperty.call(e,i)||(e[i]=Ho(o))}const Rm={"":i=>i,x:i=>i.x,y:i=>i.y};function T_(i){const e=i.split("."),a=[];let s="";for(const o of e)s+=o,s.endsWith("\\")?s=s.slice(0,-1)+".":(a.push(s),s="");return a}function M_(i){const e=T_(i);return a=>{for(const s of e){if(s==="")break;a=a&&a[s]}return a}}function Bi(i,e){return(Rm[e]||(Rm[e]=M_(e)))(i)}function nf(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Qs=i=>typeof i<"u",hi=i=>typeof i=="function",wm=(i,e)=>{if(i.size!==e.size)return!1;for(const a of i)if(!e.has(a))return!1;return!0};function E_(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const Ct=Math.PI,Yt=2*Ct,A_=Yt+Ct,Bo=Number.POSITIVE_INFINITY,O_=Ct/180,te=Ct/2,wi=Ct/4,Nm=Ct*2/3,c0=Math.log10,ln=Math.sign;function Us(i,e,a){return Math.abs(i-e)<a}function jm(i){const e=Math.round(i);i=Us(i,e,i/1e3)?e:i;const a=Math.pow(10,Math.floor(c0(i))),s=i/a;return(s<=1?1:s<=2?2:s<=5?5:10)*a}function D_(i){const e=[],a=Math.sqrt(i);let s;for(s=1;s<a;s++)i%s===0&&(e.push(s),e.push(i/s));return a===(a|0)&&e.push(a),e.sort((o,c)=>o-c).pop(),e}function C_(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Uo(i){return!C_(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function z_(i,e){const a=Math.round(i);return a-e<=i&&a+e>=i}function R_(i,e,a){let s,o,c;for(s=0,o=i.length;s<o;s++)c=i[s][a],isNaN(c)||(e.min=Math.min(e.min,c),e.max=Math.max(e.max,c))}function Rn(i){return i*(Ct/180)}function w_(i){return i*(180/Ct)}function km(i){if(!fe(i))return;let e=1,a=0;for(;Math.round(i*e)/e!==i;)e*=10,a++;return a}function u0(i,e){const a=e.x-i.x,s=e.y-i.y,o=Math.sqrt(a*a+s*s);let c=Math.atan2(s,a);return c<-.5*Ct&&(c+=Yt),{angle:c,distance:o}}function Xu(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function N_(i,e){return(i-e+A_)%Yt-Ct}function ke(i){return(i%Yt+Yt)%Yt}function Zs(i,e,a,s){const o=ke(i),c=ke(e),u=ke(a),f=ke(c-o),d=ke(u-o),m=ke(o-c),p=ke(o-u);return o===c||o===u||s&&c===u||f>d&&m<p}function Me(i,e,a){return Math.max(e,Math.min(a,i))}function j_(i){return Me(i,-32768,32767)}function wn(i,e,a,s=1e-6){return i>=Math.min(e,a)-s&&i<=Math.max(e,a)+s}function af(i,e,a){a=a||(u=>i[u]<e);let s=i.length-1,o=0,c;for(;s-o>1;)c=o+s>>1,a(c)?o=c:s=c;return{lo:o,hi:s}}const Gu=(i,e,a,s)=>af(i,a,s?o=>{const c=i[o][e];return c<a||c===a&&i[o+1][e]===a}:o=>i[o][e]<a),k_=(i,e,a)=>af(i,a,s=>i[s][e]>=a);function L_(i,e,a){let s=0,o=i.length;for(;s<o&&i[s]<e;)s++;for(;o>s&&i[o-1]>a;)o--;return s>0||o<i.length?i.slice(s,o):i}const f0=["push","pop","shift","splice","unshift"];function H_(i,e){if(i._chartjs){i._chartjs.listeners.push(e);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),f0.forEach(a=>{const s="_onData"+nf(a),o=i[a];Object.defineProperty(i,a,{configurable:!0,enumerable:!1,value(...c){const u=o.apply(this,c);return i._chartjs.listeners.forEach(f=>{typeof f[s]=="function"&&f[s](...c)}),u}})})}function Lm(i,e){const a=i._chartjs;if(!a)return;const s=a.listeners,o=s.indexOf(e);o!==-1&&s.splice(o,1),!(s.length>0)&&(f0.forEach(c=>{delete i[c]}),delete i._chartjs)}function h0(i){const e=new Set(i);return e.size===i.length?i:Array.from(e)}const d0=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function g0(i,e){let a=[],s=!1;return function(...o){a=o,s||(s=!0,d0.call(window,()=>{s=!1,i.apply(e,a)}))}}function B_(i,e){let a;return function(...s){return e?(clearTimeout(a),a=setTimeout(i,e,s)):i.apply(this,s),e}}const sf=i=>i==="start"?"left":i==="end"?"right":"center",ue=(i,e,a)=>i==="start"?e:i==="end"?a:(e+a)/2,U_=(i,e,a,s)=>i===(s?"left":"right")?a:i==="center"?(e+a)/2:e,_o=i=>i===0||i===1,Hm=(i,e,a)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-e)*Yt/a)),Bm=(i,e,a)=>Math.pow(2,-10*i)*Math.sin((i-e)*Yt/a)+1,Vs={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*te)+1,easeOutSine:i=>Math.sin(i*te),easeInOutSine:i=>-.5*(Math.cos(Ct*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>_o(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>_o(i)?i:Hm(i,.075,.3),easeOutElastic:i=>_o(i)?i:Bm(i,.075,.3),easeInOutElastic(i){return _o(i)?i:i<.5?.5*Hm(i*2,.1125,.45):.5+.5*Bm(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let e=1.70158;return(i/=.5)<1?.5*(i*i*(((e*=1.525)+1)*i-e)):.5*((i-=2)*i*(((e*=1.525)+1)*i+e)+2)},easeInBounce:i=>1-Vs.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Vs.easeInBounce(i*2)*.5:Vs.easeOutBounce(i*2-1)*.5+.5};function lf(i){if(i&&typeof i=="object"){const e=i.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Um(i){return lf(i)?i:new Gs(i)}function Tu(i){return lf(i)?i:new Gs(i).saturate(.5).darken(.1).hexString()}const V_=["x","y","borderWidth","radius","tension"],Y_=["color","borderColor","backgroundColor"];function q_(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),i.set("animations",{colors:{type:"color",properties:Y_},numbers:{type:"number",properties:V_}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function X_(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Vm=new Map;function G_(i,e){e=e||{};const a=i+JSON.stringify(e);let s=Vm.get(a);return s||(s=new Intl.NumberFormat(i,e),Vm.set(a,s)),s}function of(i,e,a){return G_(e,a).format(i)}const Q_={values(i){return Ft(i)?i:""+i},numeric(i,e,a){if(i===0)return"0";const s=this.chart.options.locale;let o,c=i;if(a.length>1){const m=Math.max(Math.abs(a[0].value),Math.abs(a[a.length-1].value));(m<1e-4||m>1e15)&&(o="scientific"),c=Z_(i,a)}const u=c0(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),of(i,s,d)}};function Z_(i,e){let a=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(a)>=1&&i!==Math.floor(i)&&(a=i-Math.floor(i)),a}var m0={formatters:Q_};function K_(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,a)=>a.lineWidth,tickColor:(e,a)=>a.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}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ui=Object.create(null),Qu=Object.create(null);function Ys(i,e){if(!e)return i;const a=e.split(".");for(let s=0,o=a.length;s<o;++s){const c=a[s];i=i[c]||(i[c]=Object.create(null))}return i}function Mu(i,e,a){return typeof e=="string"?on(Ys(i,e),a):on(Ys(i,""),e)}class F_{constructor(e,a){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=s=>s.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=(s,o)=>Tu(o.backgroundColor),this.hoverBorderColor=(s,o)=>Tu(o.borderColor),this.hoverColor=(s,o)=>Tu(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(a)}set(e,a){return Mu(this,e,a)}get(e){return Ys(this,e)}describe(e,a){return Mu(Qu,e,a)}override(e,a){return Mu(Ui,e,a)}route(e,a,s,o){const c=Ys(this,e),u=Ys(this,s),f="_"+a;Object.defineProperties(c,{[f]:{value:c[a],writable:!0},[a]:{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(a=>a(this))}}var Gt=new F_({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[q_,X_,K_]);function W_(i){return!i||Tt(i.size)||Tt(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ym(i,e,a,s,o){let c=e[o];return c||(c=e[o]=i.measureText(o).width,a.push(o)),c>s&&(s=c),s}function Ni(i,e,a){const s=i.currentDevicePixelRatio,o=a!==0?Math.max(a/2,.5):0;return Math.round((e-o)*s)/s+o}function qm(i,e){!e&&!i||(e=e||i.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,i.width,i.height),e.restore())}function Zu(i,e,a,s){p0(i,e,a,s,null)}function p0(i,e,a,s,o){let c,u,f,d,m,p,b,_;const x=e.pointStyle,T=e.rotation,M=e.radius;let A=(T||0)*O_;if(x&&typeof x=="object"&&(c=x.toString(),c==="[object HTMLImageElement]"||c==="[object HTMLCanvasElement]")){i.save(),i.translate(a,s),i.rotate(A),i.drawImage(x,-x.width/2,-x.height/2,x.width,x.height),i.restore();return}if(!(isNaN(M)||M<=0)){switch(i.beginPath(),x){default:o?i.ellipse(a,s,o/2,M,0,0,Yt):i.arc(a,s,M,0,Yt),i.closePath();break;case"triangle":p=o?o/2:M,i.moveTo(a+Math.sin(A)*p,s-Math.cos(A)*M),A+=Nm,i.lineTo(a+Math.sin(A)*p,s-Math.cos(A)*M),A+=Nm,i.lineTo(a+Math.sin(A)*p,s-Math.cos(A)*M),i.closePath();break;case"rectRounded":m=M*.516,d=M-m,u=Math.cos(A+wi)*d,b=Math.cos(A+wi)*(o?o/2-m:d),f=Math.sin(A+wi)*d,_=Math.sin(A+wi)*(o?o/2-m:d),i.arc(a-b,s-f,m,A-Ct,A-te),i.arc(a+_,s-u,m,A-te,A),i.arc(a+b,s+f,m,A,A+te),i.arc(a-_,s+u,m,A+te,A+Ct),i.closePath();break;case"rect":if(!T){d=Math.SQRT1_2*M,p=o?o/2:d,i.rect(a-p,s-d,2*p,2*d);break}A+=wi;case"rectRot":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,_=Math.sin(A)*(o?o/2:M),i.moveTo(a-b,s-f),i.lineTo(a+_,s-u),i.lineTo(a+b,s+f),i.lineTo(a-_,s+u),i.closePath();break;case"crossRot":A+=wi;case"cross":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,_=Math.sin(A)*(o?o/2:M),i.moveTo(a-b,s-f),i.lineTo(a+b,s+f),i.moveTo(a+_,s-u),i.lineTo(a-_,s+u);break;case"star":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,_=Math.sin(A)*(o?o/2:M),i.moveTo(a-b,s-f),i.lineTo(a+b,s+f),i.moveTo(a+_,s-u),i.lineTo(a-_,s+u),A+=wi,b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,_=Math.sin(A)*(o?o/2:M),i.moveTo(a-b,s-f),i.lineTo(a+b,s+f),i.moveTo(a+_,s-u),i.lineTo(a-_,s+u);break;case"line":u=o?o/2:Math.cos(A)*M,f=Math.sin(A)*M,i.moveTo(a-u,s-f),i.lineTo(a+u,s+f);break;case"dash":i.moveTo(a,s),i.lineTo(a+Math.cos(A)*(o?o/2:M),s+Math.sin(A)*M);break;case!1:i.closePath();break}i.fill(),e.borderWidth>0&&i.stroke()}}function Ks(i,e,a){return a=a||.5,!e||i&&i.x>e.left-a&&i.x<e.right+a&&i.y>e.top-a&&i.y<e.bottom+a}function Go(i,e){i.save(),i.beginPath(),i.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),i.clip()}function Qo(i){i.restore()}function J_(i,e,a,s,o){if(!e)return i.lineTo(a.x,a.y);if(o==="middle"){const c=(e.x+a.x)/2;i.lineTo(c,e.y),i.lineTo(c,a.y)}else o==="after"!=!!s?i.lineTo(e.x,a.y):i.lineTo(a.x,e.y);i.lineTo(a.x,a.y)}function I_(i,e,a,s){if(!e)return i.lineTo(a.x,a.y);i.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?a.cp2x:a.cp1x,s?a.cp2y:a.cp1y,a.x,a.y)}function $_(i,e){e.translation&&i.translate(e.translation[0],e.translation[1]),Tt(e.rotation)||i.rotate(e.rotation),e.color&&(i.fillStyle=e.color),e.textAlign&&(i.textAlign=e.textAlign),e.textBaseline&&(i.textBaseline=e.textBaseline)}function P_(i,e,a,s,o){if(o.strikethrough||o.underline){const c=i.measureText(s),u=e-c.actualBoundingBoxLeft,f=e+c.actualBoundingBoxRight,d=a-c.actualBoundingBoxAscent,m=a+c.actualBoundingBoxDescent,p=o.strikethrough?(d+m)/2:m;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=o.decorationWidth||2,i.moveTo(u,p),i.lineTo(f,p),i.stroke()}}function tx(i,e){const a=i.fillStyle;i.fillStyle=e.color,i.fillRect(e.left,e.top,e.width,e.height),i.fillStyle=a}function Fs(i,e,a,s,o,c={}){const u=Ft(e)?e:[e],f=c.strokeWidth>0&&c.strokeColor!=="";let d,m;for(i.save(),i.font=o.string,$_(i,c),d=0;d<u.length;++d)m=u[d],c.backdrop&&tx(i,c.backdrop),f&&(c.strokeColor&&(i.strokeStyle=c.strokeColor),Tt(c.strokeWidth)||(i.lineWidth=c.strokeWidth),i.strokeText(m,a,s,c.maxWidth)),i.fillText(m,a,s,c.maxWidth),P_(i,a,s,m,c),s+=Number(o.lineHeight);i.restore()}function Vo(i,e){const{x:a,y:s,w:o,h:c,radius:u}=e;i.arc(a+u.topLeft,s+u.topLeft,u.topLeft,1.5*Ct,Ct,!0),i.lineTo(a,s+c-u.bottomLeft),i.arc(a+u.bottomLeft,s+c-u.bottomLeft,u.bottomLeft,Ct,te,!0),i.lineTo(a+o-u.bottomRight,s+c),i.arc(a+o-u.bottomRight,s+c-u.bottomRight,u.bottomRight,te,0,!0),i.lineTo(a+o,s+u.topRight),i.arc(a+o-u.topRight,s+u.topRight,u.topRight,0,-te,!0),i.lineTo(a+u.topLeft,s)}const ex=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,nx=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ix(i,e){const a=(""+i).match(ex);if(!a||a[1]==="normal")return e*1.2;switch(i=+a[2],a[3]){case"px":return i;case"%":i/=100;break}return e*i}const ax=i=>+i||0;function rf(i,e){const a={},s=pt(e),o=s?Object.keys(e):e,c=pt(i)?s?u=>ht(i[u],i[e[u]]):u=>i[u]:()=>i;for(const u of o)a[u]=ax(c(u));return a}function y0(i){return rf(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Da(i){return rf(i,["topLeft","topRight","bottomLeft","bottomRight"])}function Le(i){const e=y0(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function re(i,e){i=i||{},e=e||Gt.font;let a=ht(i.size,e.size);typeof a=="string"&&(a=parseInt(a,10));let s=ht(i.style,e.style);s&&!(""+s).match(nx)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const o={family:ht(i.family,e.family),lineHeight:ix(ht(i.lineHeight,e.lineHeight),a),size:a,style:s,weight:ht(i.weight,e.weight),string:""};return o.string=W_(o),o}function Ut(i,e,a,s){let o,c,u;for(o=0,c=i.length;o<c;++o)if(u=i[o],u!==void 0&&(e!==void 0&&typeof u=="function"&&(u=u(e)),a!==void 0&&Ft(u)&&(u=u[a%u.length]),u!==void 0))return u}function sx(i,e,a){const{min:s,max:o}=i,c=o0(e,(o-s)/2),u=(f,d)=>a&&f===0?0:f+d;return{min:u(s,-Math.abs(c)),max:u(o,c)}}function Vi(i,e){return Object.assign(Object.create(i),e)}function cf(i,e=[""],a,s,o=()=>i[0]){const c=a||i;typeof s>"u"&&(s=x0("_fallback",i));const u={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:c,_fallback:s,_getTarget:o,override:f=>cf([f,...i],e,c,s)};return new Proxy(u,{deleteProperty(f,d){return delete f[d],delete f._keys,delete i[0][d],!0},get(f,d){return v0(f,d,()=>dx(d,e,i,f))},getOwnPropertyDescriptor(f,d){return Reflect.getOwnPropertyDescriptor(f._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(f,d){return Gm(f).includes(d)},ownKeys(f){return Gm(f)},set(f,d,m){const p=f._storage||(f._storage=o());return f[d]=p[d]=m,delete f._keys,!0}})}function Ra(i,e,a,s){const o={_cacheable:!1,_proxy:i,_context:e,_subProxy:a,_stack:new Set,_descriptors:b0(i,s),setContext:c=>Ra(i,c,a,s),override:c=>Ra(i.override(c),e,a,s)};return new Proxy(o,{deleteProperty(c,u){return delete c[u],delete i[u],!0},get(c,u,f){return v0(c,u,()=>ox(c,u,f))},getOwnPropertyDescriptor(c,u){return c._descriptors.allKeys?Reflect.has(i,u)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,u)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(c,u){return Reflect.has(i,u)},ownKeys(){return Reflect.ownKeys(i)},set(c,u,f){return i[u]=f,delete c[u],!0}})}function b0(i,e={scriptable:!0,indexable:!0}){const{_scriptable:a=e.scriptable,_indexable:s=e.indexable,_allKeys:o=e.allKeys}=i;return{allKeys:o,scriptable:a,indexable:s,isScriptable:hi(a)?a:()=>a,isIndexable:hi(s)?s:()=>s}}const lx=(i,e)=>i?i+nf(e):e,uf=(i,e)=>pt(e)&&i!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function v0(i,e,a){if(Object.prototype.hasOwnProperty.call(i,e)||e==="constructor")return i[e];const s=a();return i[e]=s,s}function ox(i,e,a){const{_proxy:s,_context:o,_subProxy:c,_descriptors:u}=i;let f=s[e];return hi(f)&&u.isScriptable(e)&&(f=rx(e,f,i,a)),Ft(f)&&f.length&&(f=cx(e,f,i,u.isIndexable)),uf(e,f)&&(f=Ra(f,o,c&&c[e],u)),f}function rx(i,e,a,s){const{_proxy:o,_context:c,_subProxy:u,_stack:f}=a;if(f.has(i))throw new Error("Recursion detected: "+Array.from(f).join("->")+"->"+i);f.add(i);let d=e(c,u||s);return f.delete(i),uf(i,d)&&(d=ff(o._scopes,o,i,d)),d}function cx(i,e,a,s){const{_proxy:o,_context:c,_subProxy:u,_descriptors:f}=a;if(typeof c.index<"u"&&s(i))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=ff(m,o,i,p);e.push(Ra(b,c,u&&u[i],f))}}return e}function _0(i,e,a){return hi(i)?i(e,a):i}const ux=(i,e)=>i===!0?e:typeof i=="string"?Bi(e,i):void 0;function fx(i,e,a,s,o){for(const c of e){const u=ux(a,c);if(u){i.add(u);const f=_0(u._fallback,a,o);if(typeof f<"u"&&f!==a&&f!==s)return f}else if(u===!1&&typeof s<"u"&&a!==s)return null}return!1}function ff(i,e,a,s){const o=e._rootScopes,c=_0(e._fallback,a,s),u=[...i,...o],f=new Set;f.add(s);let d=Xm(f,u,a,c||a,s);return d===null||typeof c<"u"&&c!==a&&(d=Xm(f,u,c,d,s),d===null)?!1:cf(Array.from(f),[""],o,c,()=>hx(e,a,s))}function Xm(i,e,a,s,o){for(;a;)a=fx(i,e,a,s,o);return a}function hx(i,e,a){const s=i._getTarget();e in s||(s[e]={});const o=s[e];return Ft(o)&&pt(a)?a:o||{}}function dx(i,e,a,s){let o;for(const c of e)if(o=x0(lx(c,i),a),typeof o<"u")return uf(i,o)?ff(a,s,i,o):o}function x0(i,e){for(const a of e){if(!a)continue;const s=a[i];if(typeof s<"u")return s}}function Gm(i){let e=i._keys;return e||(e=i._keys=gx(i._scopes)),e}function gx(i){const e=new Set;for(const a of i)for(const s of Object.keys(a).filter(o=>!o.startsWith("_")))e.add(s);return Array.from(e)}const mx=Number.EPSILON||1e-14,wa=(i,e)=>e<i.length&&!i[e].skip&&i[e],S0=i=>i==="x"?"y":"x";function px(i,e,a,s){const o=i.skip?e:i,c=e,u=a.skip?e:a,f=Xu(c,o),d=Xu(u,c);let m=f/(f+d),p=d/(f+d);m=isNaN(m)?0:m,p=isNaN(p)?0:p;const b=s*m,_=s*p;return{previous:{x:c.x-b*(u.x-o.x),y:c.y-b*(u.y-o.y)},next:{x:c.x+_*(u.x-o.x),y:c.y+_*(u.y-o.y)}}}function yx(i,e,a){const s=i.length;let o,c,u,f,d,m=wa(i,0);for(let p=0;p<s-1;++p)if(d=m,m=wa(i,p+1),!(!d||!m)){if(Us(e[p],0,mx)){a[p]=a[p+1]=0;continue}o=a[p]/e[p],c=a[p+1]/e[p],f=Math.pow(o,2)+Math.pow(c,2),!(f<=9)&&(u=3/Math.sqrt(f),a[p]=o*u*e[p],a[p+1]=c*u*e[p])}}function bx(i,e,a="x"){const s=S0(a),o=i.length;let c,u,f,d=wa(i,0);for(let m=0;m<o;++m){if(u=f,f=d,d=wa(i,m+1),!f)continue;const p=f[a],b=f[s];u&&(c=(p-u[a])/3,f[`cp1${a}`]=p-c,f[`cp1${s}`]=b-c*e[m]),d&&(c=(d[a]-p)/3,f[`cp2${a}`]=p+c,f[`cp2${s}`]=b+c*e[m])}}function vx(i,e="x"){const a=S0(e),s=i.length,o=Array(s).fill(0),c=Array(s);let u,f,d,m=wa(i,0);for(u=0;u<s;++u)if(f=d,d=m,m=wa(i,u+1),!!d){if(m){const p=m[e]-d[e];o[u]=p!==0?(m[a]-d[a])/p:0}c[u]=f?m?ln(o[u-1])!==ln(o[u])?0:(o[u-1]+o[u])/2:o[u-1]:o[u]}yx(i,o,c),bx(i,c,e)}function xo(i,e,a){return Math.max(Math.min(i,a),e)}function _x(i,e){let a,s,o,c,u,f=Ks(i[0],e);for(a=0,s=i.length;a<s;++a)u=c,c=f,f=a<s-1&&Ks(i[a+1],e),c&&(o=i[a],u&&(o.cp1x=xo(o.cp1x,e.left,e.right),o.cp1y=xo(o.cp1y,e.top,e.bottom)),f&&(o.cp2x=xo(o.cp2x,e.left,e.right),o.cp2y=xo(o.cp2y,e.top,e.bottom)))}function xx(i,e,a,s,o){let c,u,f,d;if(e.spanGaps&&(i=i.filter(m=>!m.skip)),e.cubicInterpolationMode==="monotone")vx(i,o);else{let m=s?i[i.length-1]:i[0];for(c=0,u=i.length;c<u;++c)f=i[c],d=px(m,f,i[Math.min(c+1,u-(s?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&&_x(i,a)}function hf(){return typeof window<"u"&&typeof document<"u"}function df(i){let e=i.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Yo(i,e,a){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*e.parentNode[a])):s=i,s}const Zo=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Sx(i,e){return Zo(i).getPropertyValue(e)}const Tx=["top","right","bottom","left"];function Hi(i,e,a){const s={};a=a?"-"+a:"";for(let o=0;o<4;o++){const c=Tx[o];s[c]=parseFloat(i[e+"-"+c+a])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Mx=(i,e,a)=>(i>0||e>0)&&(!a||!a.shadowRoot);function Ex(i,e){const a=i.touches,s=a&&a.length?a[0]:i,{offsetX:o,offsetY:c}=s;let u=!1,f,d;if(Mx(o,c,i.target))f=o,d=c;else{const m=e.getBoundingClientRect();f=s.clientX-m.left,d=s.clientY-m.top,u=!0}return{x:f,y:d,box:u}}function ki(i,e){if("native"in i)return i;const{canvas:a,currentDevicePixelRatio:s}=e,o=Zo(a),c=o.boxSizing==="border-box",u=Hi(o,"padding"),f=Hi(o,"border","width"),{x:d,y:m,box:p}=Ex(i,a),b=u.left+(p&&f.left),_=u.top+(p&&f.top);let{width:x,height:T}=e;return c&&(x-=u.width+f.width,T-=u.height+f.height),{x:Math.round((d-b)/x*a.width/s),y:Math.round((m-_)/T*a.height/s)}}function Ax(i,e,a){let s,o;if(e===void 0||a===void 0){const c=i&&df(i);if(!c)e=i.clientWidth,a=i.clientHeight;else{const u=c.getBoundingClientRect(),f=Zo(c),d=Hi(f,"border","width"),m=Hi(f,"padding");e=u.width-m.width-d.width,a=u.height-m.height-d.height,s=Yo(f.maxWidth,c,"clientWidth"),o=Yo(f.maxHeight,c,"clientHeight")}}return{width:e,height:a,maxWidth:s||Bo,maxHeight:o||Bo}}const oi=i=>Math.round(i*10)/10;function Ox(i,e,a,s){const o=Zo(i),c=Hi(o,"margin"),u=Yo(o.maxWidth,i,"clientWidth")||Bo,f=Yo(o.maxHeight,i,"clientHeight")||Bo,d=Ax(i,e,a);let{width:m,height:p}=d;if(o.boxSizing==="content-box"){const _=Hi(o,"border","width"),x=Hi(o,"padding");m-=x.width+_.width,p-=x.height+_.height}return m=Math.max(0,m-c.width),p=Math.max(0,s?m/s:p-c.height),m=oi(Math.min(m,u,d.maxWidth)),p=oi(Math.min(p,f,d.maxHeight)),m&&!p&&(p=oi(m/2)),(e!==void 0||a!==void 0)&&s&&d.height&&p>d.height&&(p=d.height,m=oi(Math.floor(p*s))),{width:m,height:p}}function Qm(i,e,a){const s=e||1,o=oi(i.height*s),c=oi(i.width*s);i.height=oi(i.height),i.width=oi(i.width);const u=i.canvas;return u.style&&(a||!u.style.height&&!u.style.width)&&(u.style.height=`${i.height}px`,u.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||u.height!==o||u.width!==c?(i.currentDevicePixelRatio=s,u.height=o,u.width=c,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const Dx=(function(){let i=!1;try{const e={get passive(){return i=!0,!1}};hf()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return i})();function Zm(i,e){const a=Sx(i,e),s=a&&a.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Li(i,e,a,s){return{x:i.x+a*(e.x-i.x),y:i.y+a*(e.y-i.y)}}function Cx(i,e,a,s){return{x:i.x+a*(e.x-i.x),y:s==="middle"?a<.5?i.y:e.y:s==="after"?a<1?i.y:e.y:a>0?e.y:i.y}}function zx(i,e,a,s){const o={x:i.cp2x,y:i.cp2y},c={x:e.cp1x,y:e.cp1y},u=Li(i,o,a),f=Li(o,c,a),d=Li(c,e,a),m=Li(u,f,a),p=Li(f,d,a);return Li(m,p,a)}const Rx=function(i,e){return{x(a){return i+i+e-a},setWidth(a){e=a},textAlign(a){return a==="center"?a:a==="right"?"left":"right"},xPlus(a,s){return a-s},leftForLtr(a,s){return a-s}}},wx=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,e){return i+e},leftForLtr(i,e){return i}}};function Ca(i,e,a){return i?Rx(e,a):wx()}function T0(i,e){let a,s;(e==="ltr"||e==="rtl")&&(a=i.canvas.style,s=[a.getPropertyValue("direction"),a.getPropertyPriority("direction")],a.setProperty("direction",e,"important"),i.prevTextDirection=s)}function M0(i,e){e!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",e[0],e[1]))}function E0(i){return i==="angle"?{between:Zs,compare:N_,normalize:ke}:{between:wn,compare:(e,a)=>e-a,normalize:e=>e}}function Km({start:i,end:e,count:a,loop:s,style:o}){return{start:i%a,end:e%a,loop:s&&(e-i+1)%a===0,style:o}}function Nx(i,e,a){const{property:s,start:o,end:c}=a,{between:u,normalize:f}=E0(s),d=e.length;let{start:m,end:p,loop:b}=i,_,x;if(b){for(m+=d,p+=d,_=0,x=d;_<x&&u(f(e[m%d][s]),o,c);++_)m--,p--;m%=d,p%=d}return p<m&&(p+=d),{start:m,end:p,loop:b,style:i.style}}function A0(i,e,a){if(!a)return[i];const{property:s,start:o,end:c}=a,u=e.length,{compare:f,between:d,normalize:m}=E0(s),{start:p,end:b,loop:_,style:x}=Nx(i,e,a),T=[];let M=!1,A=null,z,H,Y;const G=()=>d(o,Y,z)&&f(o,Y)!==0,q=()=>f(c,z)===0||d(c,Y,z),K=()=>M||G(),Q=()=>!M||q();for(let F=p,tt=p;F<=b;++F)H=e[F%u],!H.skip&&(z=m(H[s]),z!==Y&&(M=d(z,o,c),A===null&&K()&&(A=f(z,o)===0?F:tt),A!==null&&Q()&&(T.push(Km({start:A,end:F,loop:_,count:u,style:x})),A=null),tt=F,Y=z));return A!==null&&T.push(Km({start:A,end:b,loop:_,count:u,style:x})),T}function O0(i,e){const a=[],s=i.segments;for(let o=0;o<s.length;o++){const c=A0(s[o],i.points,e);c.length&&a.push(...c)}return a}function jx(i,e,a,s){let o=0,c=e-1;if(a&&!s)for(;o<e&&!i[o].skip;)o++;for(;o<e&&i[o].skip;)o++;for(o%=e,a&&(c+=o);c>o&&i[c%e].skip;)c--;return c%=e,{start:o,end:c}}function kx(i,e,a,s){const o=i.length,c=[];let u=e,f=i[e],d;for(d=e+1;d<=a;++d){const m=i[d%o];m.skip||m.stop?f.skip||(s=!1,c.push({start:e%o,end:(d-1)%o,loop:s}),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:s}),c}function Lx(i,e){const a=i.points,s=i.options.spanGaps,o=a.length;if(!o)return[];const c=!!i._loop,{start:u,end:f}=jx(a,o,c,s);if(s===!0)return Fm(i,[{start:u,end:f,loop:c}],a,e);const d=f<u?f+o:f,m=!!i._fullLoop&&u===0&&f===o-1;return Fm(i,kx(a,u,d,m),a,e)}function Fm(i,e,a,s){return!s||!s.setContext||!a?e:Hx(i,e,a,s)}function Hx(i,e,a,s){const o=i._chart.getContext(),c=Wm(i.options),{_datasetIndex:u,options:{spanGaps:f}}=i,d=a.length,m=[];let p=c,b=e[0].start,_=b;function x(T,M,A,z){const H=f?-1:1;if(T!==M){for(T+=d;a[T%d].skip;)T-=H;for(;a[M%d].skip;)M+=H;T%d!==M%d&&(m.push({start:T%d,end:M%d,loop:A,style:z}),p=z,b=M%d)}}for(const T of e){b=f?b:T.start;let M=a[b%d],A;for(_=b+1;_<=T.end;_++){const z=a[_%d];A=Wm(s.setContext(Vi(o,{type:"segment",p0:M,p1:z,p0DataIndex:(_-1)%d,p1DataIndex:_%d,datasetIndex:u}))),Bx(A,p)&&x(b,_-1,T.loop,p),M=z,p=A}b<_-1&&x(b,_-1,T.loop,p)}return m}function Wm(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Bx(i,e){if(!e)return!1;const a=[],s=function(o,c){return lf(c)?(a.includes(c)||a.push(c),a.indexOf(c)):c};return JSON.stringify(i,s)!==JSON.stringify(e,s)}function So(i,e,a){return i.options.clip?i[a]:e[a]}function Ux(i,e){const{xScale:a,yScale:s}=i;return a&&s?{left:So(a,e,"left"),right:So(a,e,"right"),top:So(s,e,"top"),bottom:So(s,e,"bottom")}:e}function D0(i,e){const a=e._clip;if(a.disabled)return!1;const s=Ux(e,i.chartArea);return{left:a.left===!1?0:s.left-(a.left===!0?0:a.left),right:a.right===!1?i.width:s.right+(a.right===!0?0:a.right),top:a.top===!1?0:s.top-(a.top===!0?0:a.top),bottom:a.bottom===!1?i.height:s.bottom+(a.bottom===!0?0:a.bottom)}}class Vx{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,a,s,o){const c=a.listeners[o],u=a.duration;c.forEach(f=>f({chart:e,initial:a.initial,numSteps:u,currentStep:Math.min(s-a.start,u)}))}_refresh(){this._request||(this._running=!0,this._request=d0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let a=0;this._charts.forEach((s,o)=>{if(!s.running||!s.items.length)return;const c=s.items;let u=c.length-1,f=!1,d;for(;u>=0;--u)d=c[u],d._active?(d._total>s.duration&&(s.duration=d._total),d.tick(e),f=!0):(c[u]=c[c.length-1],c.pop());f&&(o.draw(),this._notify(o,s,e,"progress")),c.length||(s.running=!1,this._notify(o,s,e,"complete"),s.initial=!1),a+=c.length}),this._lastDate=e,a===0&&(this._running=!1)}_getAnims(e){const a=this._charts;let s=a.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},a.set(e,s)),s}listen(e,a,s){this._getAnims(e).listeners[a].push(s)}add(e,a){!a||!a.length||this._getAnims(e).items.push(...a)}has(e){return this._getAnims(e).items.length>0}start(e){const a=this._charts.get(e);a&&(a.running=!0,a.start=Date.now(),a.duration=a.items.reduce((s,o)=>Math.max(s,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;const a=this._charts.get(e);return!(!a||!a.running||!a.items.length)}stop(e){const a=this._charts.get(e);if(!a||!a.items.length)return;const s=a.items;let o=s.length-1;for(;o>=0;--o)s[o].cancel();a.items=[],this._notify(e,a,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Dn=new Vx;const Jm="transparent",Yx={boolean(i,e,a){return a>.5?e:i},color(i,e,a){const s=Um(i||Jm),o=s.valid&&Um(e||Jm);return o&&o.valid?o.mix(s,a).hexString():e},number(i,e,a){return i+(e-i)*a}};class qx{constructor(e,a,s,o){const c=a[s];o=Ut([e.to,o,c,e.from]);const u=Ut([e.from,c,o]);this._active=!0,this._fn=e.fn||Yx[e.type||typeof u],this._easing=Vs[e.easing]||Vs.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=a,this._prop=s,this._from=u,this._to=o,this._promises=void 0}active(){return this._active}update(e,a,s){if(this._active){this._notify(!1);const o=this._target[this._prop],c=s-this._start,u=this._duration-c;this._start=s,this._duration=Math.floor(Math.max(u,e.duration)),this._total+=c,this._loop=!!e.loop,this._to=Ut([e.to,a,o,e.from]),this._from=Ut([e.from,o,a])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const a=e-this._start,s=this._duration,o=this._prop,c=this._from,u=this._loop,f=this._to;let d;if(this._active=c!==f&&(u||a<s),!this._active){this._target[o]=f,this._notify(!0);return}if(a<0){this._target[o]=c;return}d=a/s%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((a,s)=>{e.push({res:a,rej:s})})}_notify(e){const a=e?"res":"rej",s=this._promises||[];for(let o=0;o<s.length;o++)s[o][a]()}}class C0{constructor(e,a){this._chart=e,this._properties=new Map,this.configure(a)}configure(e){if(!pt(e))return;const a=Object.keys(Gt.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(o=>{const c=e[o];if(!pt(c))return;const u={};for(const f of a)u[f]=c[f];(Ft(c.properties)&&c.properties||[o]).forEach(f=>{(f===o||!s.has(f))&&s.set(f,u)})})}_animateOptions(e,a){const s=a.options,o=Gx(e,s);if(!o)return[];const c=this._createAnimations(o,s);return s.$shared&&Xx(e.options.$animations,s).then(()=>{e.options=s},()=>{}),c}_createAnimations(e,a){const s=this._properties,o=[],c=e.$animations||(e.$animations={}),u=Object.keys(a),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,a));continue}const p=a[m];let b=c[m];const _=s.get(m);if(b)if(_&&b.active()){b.update(_,p,f);continue}else b.cancel();if(!_||!_.duration){e[m]=p;continue}c[m]=b=new qx(_,e,m,p),o.push(b)}return o}update(e,a){if(this._properties.size===0){Object.assign(e,a);return}const s=this._createAnimations(e,a);if(s.length)return Dn.add(this._chart,s),!0}}function Xx(i,e){const a=[],s=Object.keys(e);for(let o=0;o<s.length;o++){const c=i[s[o]];c&&c.active()&&a.push(c.wait())}return Promise.all(a)}function Gx(i,e){if(!e)return;let a=i.options;if(!a){i.options=e;return}return a.$shared&&(i.options=a=Object.assign({},a,{$shared:!1,$animations:{}})),a}function Im(i,e){const a=i&&i.options||{},s=a.reverse,o=a.min===void 0?e:0,c=a.max===void 0?e:0;return{start:s?c:o,end:s?o:c}}function Qx(i,e,a){if(a===!1)return!1;const s=Im(i,a),o=Im(e,a);return{top:o.end,right:s.end,bottom:o.start,left:s.start}}function Zx(i){let e,a,s,o;return pt(i)?(e=i.top,a=i.right,s=i.bottom,o=i.left):e=a=s=o=i,{top:e,right:a,bottom:s,left:o,disabled:i===!1}}function z0(i,e){const a=[],s=i._getSortedDatasetMetas(e);let o,c;for(o=0,c=s.length;o<c;++o)a.push(s[o].index);return a}function $m(i,e,a,s={}){const o=i.keys,c=s.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===a){if(p=!0,s.all)continue;break}m=i.values[d],fe(m)&&(c||e===0||ln(e)===ln(m))&&(e+=m)}return!p&&!s.all?0:e}function Kx(i,e){const{iScale:a,vScale:s}=e,o=a.axis==="x"?"x":"y",c=s.axis==="x"?"x":"y",u=Object.keys(i),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]:i[p]};return f}function Eu(i,e){const a=i&&i.options.stacked;return a||a===void 0&&e.stack!==void 0}function Fx(i,e,a){return`${i.id}.${e.id}.${a.stack||a.type}`}function Wx(i){const{min:e,max:a,minDefined:s,maxDefined:o}=i.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:o?a:Number.POSITIVE_INFINITY}}function Jx(i,e,a){const s=i[e]||(i[e]={});return s[a]||(s[a]={})}function Pm(i,e,a,s){for(const o of e.getMatchingVisibleMetas(s).reverse()){const c=i[o.index];if(a&&c>0||!a&&c<0)return o.index}return null}function tp(i,e){const{chart:a,_cachedMeta:s}=i,o=a._stacks||(a._stacks={}),{iScale:c,vScale:u,index:f}=s,d=c.axis,m=u.axis,p=Fx(c,u,s),b=e.length;let _;for(let x=0;x<b;++x){const T=e[x],{[d]:M,[m]:A}=T,z=T._stacks||(T._stacks={});_=z[m]=Jx(o,p,M),_[f]=A,_._top=Pm(_,u,!0,s.type),_._bottom=Pm(_,u,!1,s.type);const H=_._visualValues||(_._visualValues={});H[f]=A}}function Au(i,e){const a=i.scales;return Object.keys(a).filter(s=>a[s].axis===e).shift()}function Ix(i,e){return Vi(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function $x(i,e,a){return Vi(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:a,index:e,mode:"default",type:"data"})}function Cs(i,e){const a=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){e=e||i._parsed;for(const o of e){const c=o._stacks;if(!c||c[s]===void 0||c[s][a]===void 0)return;delete c[s][a],c[s]._visualValues!==void 0&&c[s]._visualValues[a]!==void 0&&delete c[s]._visualValues[a]}}}const Ou=i=>i==="reset"||i==="none",ep=(i,e)=>e?i:Object.assign({},i),Px=(i,e,a)=>i&&!e.hidden&&e._stacked&&{keys:z0(a,!0),values:null};class gf{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,a){this.chart=e,this._ctx=e.ctx,this.index=a,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=Eu(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&&Cs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,a=this._cachedMeta,s=this.getDataset(),o=(b,_,x,T)=>b==="x"?_:b==="r"?T:x,c=a.xAxisID=ht(s.xAxisID,Au(e,"x")),u=a.yAxisID=ht(s.yAxisID,Au(e,"y")),f=a.rAxisID=ht(s.rAxisID,Au(e,"r")),d=a.indexAxis,m=a.iAxisID=o(d,c,u,f),p=a.vAxisID=o(d,u,c,f);a.xScale=this.getScaleForId(c),a.yScale=this.getScaleForId(u),a.rScale=this.getScaleForId(f),a.iScale=this.getScaleForId(m),a.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 a=this._cachedMeta;return e===a.iScale?a.vScale:a.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Lm(this._data,this),e._stacked&&Cs(e)}_dataCheck(){const e=this.getDataset(),a=e.data||(e.data=[]),s=this._data;if(pt(a)){const o=this._cachedMeta;this._data=Kx(a,o)}else if(s!==a){if(s){Lm(s,this);const o=this._cachedMeta;Cs(o),o._parsed=[]}a&&Object.isExtensible(a)&&H_(a,this),this._syncList=[],this._data=a}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const a=this._cachedMeta,s=this.getDataset();let o=!1;this._dataCheck();const c=a._stacked;a._stacked=Eu(a.vScale,a),a.stack!==s.stack&&(o=!0,Cs(a),a.stack=s.stack),this._resyncElements(e),(o||c!==a._stacked)&&(tp(this,a._parsed),a._stacked=Eu(a.vScale,a))}configure(){const e=this.chart.config,a=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),a,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,a){const{_cachedMeta:s,_data:o}=this,{iScale:c,_stacked:u}=s,f=c.axis;let d=e===0&&a===o.length?!0:s._sorted,m=e>0&&s._parsed[e-1],p,b,_;if(this._parsing===!1)s._parsed=o,s._sorted=!0,_=o;else{Ft(o[e])?_=this.parseArrayData(s,o,e,a):pt(o[e])?_=this.parseObjectData(s,o,e,a):_=this.parsePrimitiveData(s,o,e,a);const x=()=>b[f]===null||m&&b[f]<m[f];for(p=0;p<a;++p)s._parsed[p+e]=b=_[p],d&&(x()&&(d=!1),m=b);s._sorted=d}u&&tp(this,_)}parsePrimitiveData(e,a,s,o){const{iScale:c,vScale:u}=e,f=c.axis,d=u.axis,m=c.getLabels(),p=c===u,b=new Array(o);let _,x,T;for(_=0,x=o;_<x;++_)T=_+s,b[_]={[f]:p||c.parse(m[T],T),[d]:u.parse(a[T],T)};return b}parseArrayData(e,a,s,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+s,b=a[p],f[d]={x:c.parse(b[0],p),y:u.parse(b[1],p)};return f}parseObjectData(e,a,s,o){const{xScale:c,yScale:u}=e,{xAxisKey:f="x",yAxisKey:d="y"}=this._parsing,m=new Array(o);let p,b,_,x;for(p=0,b=o;p<b;++p)_=p+s,x=a[_],m[p]={x:c.parse(Bi(x,f),_),y:u.parse(Bi(x,d),_)};return m}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,a,s){const o=this.chart,c=this._cachedMeta,u=a[e.axis],f={keys:z0(o,!0),values:a._stacks[e.axis]._visualValues};return $m(f,u,c.index,{mode:s})}updateRangeFromParsed(e,a,s,o){const c=s[a.axis];let u=c===null?NaN:c;const f=o&&s._stacks[a.axis];o&&f&&(o.values=f,u=$m(o,c,this._cachedMeta.index)),e.min=Math.min(e.min,u),e.max=Math.max(e.max,u)}getMinMax(e,a){const s=this._cachedMeta,o=s._parsed,c=s._sorted&&e===s.iScale,u=o.length,f=this._getOtherScale(e),d=Px(a,s,this.chart),m={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:b}=Wx(f);let _,x;function T(){x=o[_];const M=x[f.axis];return!fe(x[e.axis])||p>M||b<M}for(_=0;_<u&&!(!T()&&(this.updateRangeFromParsed(m,e,x,d),c));++_);if(c){for(_=u-1;_>=0;--_)if(!T()){this.updateRangeFromParsed(m,e,x,d);break}}return m}getAllParsedValues(e){const a=this._cachedMeta._parsed,s=[];let o,c,u;for(o=0,c=a.length;o<c;++o)u=a[o][e.axis],fe(u)&&s.push(u);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const a=this._cachedMeta,s=a.iScale,o=a.vScale,c=this.getParsed(e);return{label:s?""+s.getLabelForValue(c[s.axis]):"",value:o?""+o.getLabelForValue(c[o.axis]):""}}_update(e){const a=this._cachedMeta;this.update(e||"default"),a._clip=Zx(ht(this.options.clip,Qx(a.xScale,a.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,a=this.chart,s=this._cachedMeta,o=s.data||[],c=a.chartArea,u=[],f=this._drawStart||0,d=this._drawCount||o.length-f,m=this.options.drawActiveElementsOnTop;let p;for(s.dataset&&s.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,a){const s=a?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,a,s){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=$x(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=Ix(this.chart.getContext(),this.index)),c.dataset=o,c.index=c.datasetIndex=this.index;return c.active=!!a,c.mode=s,c}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,a){return this._resolveElementOptions(this.dataElementType.id,a,e)}_resolveElementOptions(e,a="default",s){const o=a==="active",c=this._cachedDataOpts,u=e+"-"+a,f=c[u],d=this.enableOptionSharing&&Qs(s);if(f)return ep(f,d);const m=this.chart.config,p=m.datasetElementScopeKeys(this._type,e),b=o?[`${e}Hover`,"hover",e,""]:[e,""],_=m.getOptionScopes(this.getDataset(),p),x=Object.keys(Gt.elements[e]),T=()=>this.getContext(s,o,a),M=m.resolveNamedOptions(_,x,T,b);return M.$shared&&(M.$shared=d,c[u]=Object.freeze(ep(M,d))),M}_resolveAnimations(e,a,s){const o=this.chart,c=this._cachedDataOpts,u=`animation-${a}`,f=c[u];if(f)return f;let d;if(o.options.animation!==!1){const p=this.chart.config,b=p.datasetAnimationScopeKeys(this._type,a),_=p.getOptionScopes(this.getDataset(),b);d=p.createResolver(_,this.getContext(e,s,a))}const m=new C0(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,a){return!a||Ou(e)||this.chart._animationsDisabled}_getSharedOptions(e,a){const s=this.resolveDataElementOptions(e,a),o=this._sharedOptions,c=this.getSharedOptions(s),u=this.includeOptions(a,c)||c!==o;return this.updateSharedOptions(c,a,s),{sharedOptions:c,includeOptions:u}}updateElement(e,a,s,o){Ou(o)?Object.assign(e,s):this._resolveAnimations(a,o).update(e,s)}updateSharedOptions(e,a,s){e&&!Ou(a)&&this._resolveAnimations(void 0,a).update(e,s)}_setStyle(e,a,s,o){e.active=o;const c=this.getStyle(a,o);this._resolveAnimations(a,s,o).update(e,{options:!o&&this.getSharedOptions(c)||c})}removeHoverStyle(e,a,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,a,s){this._setStyle(e,s,"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 a=this._data,s=this._cachedMeta.data;for(const[f,d,m]of this._syncList)this[f](d,m);this._syncList=[];const o=s.length,c=a.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,a,s=!0){const o=this._cachedMeta,c=o.data,u=e+a;let f;const d=m=>{for(m.length+=a,f=m.length-1;f>=u;f--)m[f]=m[f-a]};for(d(c),f=e;f<u;++f)c[f]=new this.dataElementType;this._parsing&&d(o._parsed),this.parse(e,a),s&&this.updateElements(c,e,a,"reset")}updateElements(e,a,s,o){}_removeElements(e,a){const s=this._cachedMeta;if(this._parsing){const o=s._parsed.splice(e,a);s._stacked&&Cs(s,o)}s.data.splice(e,a)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[a,s,o]=e;this[a](s,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,a){a&&this._sync(["_removeElements",e,a]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function t1(i,e){if(!i._cache.$bar){const a=i.getMatchingVisibleMetas(e);let s=[];for(let o=0,c=a.length;o<c;o++)s=s.concat(a[o].controller.getAllParsedValues(i));i._cache.$bar=h0(s.sort((o,c)=>o-c))}return i._cache.$bar}function e1(i){const e=i.iScale,a=t1(e,i.type);let s=e._length,o,c,u,f;const d=()=>{u===32767||u===-32768||(Qs(f)&&(s=Math.min(s,Math.abs(u-f)||s)),f=u)};for(o=0,c=a.length;o<c;++o)u=e.getPixelForValue(a[o]),d();for(f=void 0,o=0,c=e.ticks.length;o<c;++o)u=e.getPixelForTick(o),d();return s}function n1(i,e,a,s){const o=a.barThickness;let c,u;return Tt(o)?(c=e.min*a.categoryPercentage,u=a.barPercentage):(c=o*s,u=1),{chunk:c/s,ratio:u,start:e.pixels[i]-c/2}}function i1(i,e,a,s){const o=e.pixels,c=o[i];let u=i>0?o[i-1]:null,f=i<o.length-1?o[i+1]:null;const d=a.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/s,ratio:a.barPercentage,start:m}}function a1(i,e,a,s){const o=a.parse(i[0],s),c=a.parse(i[1],s),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[a.axis]=m,e._custom={barStart:d,barEnd:m,start:o,end:c,min:u,max:f}}function R0(i,e,a,s){return Ft(i)?a1(i,e,a,s):e[a.axis]=a.parse(i,s),e}function np(i,e,a,s){const o=i.iScale,c=i.vScale,u=o.getLabels(),f=o===c,d=[];let m,p,b,_;for(m=a,p=a+s;m<p;++m)_=e[m],b={},b[o.axis]=f||o.parse(u[m],m),d.push(R0(_,b,c,m));return d}function Du(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function s1(i,e,a){return i!==0?ln(i):(e.isHorizontal()?1:-1)*(e.min>=a?1:-1)}function l1(i){let e,a,s,o,c;return i.horizontal?(e=i.base>i.x,a="left",s="right"):(e=i.base<i.y,a="bottom",s="top"),e?(o="end",c="start"):(o="start",c="end"),{start:a,end:s,reverse:e,top:o,bottom:c}}function o1(i,e,a,s){let o=e.borderSkipped;const c={};if(!o){i.borderSkipped=c;return}if(o===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:u,end:f,reverse:d,top:m,bottom:p}=l1(i);o==="middle"&&a&&(i.enableBorderRadius=!0,(a._top||0)===s?o=m:(a._bottom||0)===s?o=p:(c[ip(p,u,f,d)]=!0,o=m)),c[ip(o,u,f,d)]=!0,i.borderSkipped=c}function ip(i,e,a,s){return s?(i=r1(i,e,a),i=ap(i,a,e)):i=ap(i,e,a),i}function r1(i,e,a){return i===e?a:i===a?e:i}function ap(i,e,a){return i==="start"?e:i==="end"?a:i}function c1(i,{inflateAmount:e},a){i.inflateAmount=e==="auto"?a===1?.33:0:e}class u1 extends gf{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,a,s,o){return np(e,a,s,o)}parseArrayData(e,a,s,o){return np(e,a,s,o)}parseObjectData(e,a,s,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 _,x,T,M;for(_=s,x=s+o;_<x;++_)M=a[_],T={},T[c.axis]=c.parse(Bi(M,m),_),b.push(R0(Bi(M,p),T,u,_));return b}updateRangeFromParsed(e,a,s,o){super.updateRangeFromParsed(e,a,s,o);const c=s._custom;c&&a===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 a=this._cachedMeta,{iScale:s,vScale:o}=a,c=this.getParsed(e),u=c._custom,f=Du(u)?"["+u.start+", "+u.end+"]":""+o.getLabelForValue(c[o.axis]);return{label:""+s.getLabelForValue(c[s.axis]),value:f}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const a=this._cachedMeta;this.updateElements(a.data,0,a.data.length,e)}updateElements(e,a,s,o){const c=o==="reset",{index:u,_cachedMeta:{vScale:f}}=this,d=f.getBasePixel(),m=f.isHorizontal(),p=this._getRuler(),{sharedOptions:b,includeOptions:_}=this._getSharedOptions(a,o);for(let x=a;x<a+s;x++){const T=this.getParsed(x),M=c||Tt(T[f.axis])?{base:d,head:d}:this._calculateBarValuePixels(x),A=this._calculateBarIndexPixels(x,p),z=(T._stacks||{})[f.axis],H={horizontal:m,base:M.base,enableBorderRadius:!z||Du(T._custom)||u===z._top||u===z._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};_&&(H.options=b||this.resolveDataElementOptions(x,e[x].active?"active":o));const Y=H.options||e[x].options;o1(H,Y,z,u),c1(H,Y,p.ratio),this.updateElement(e[x],x,H,o)}}_getStacks(e,a){const{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),c=s.options.stacked,u=[],f=this._cachedMeta.controller.getParsed(a),d=f&&f[s.axis],m=p=>{const b=p._parsed.find(x=>x[s.axis]===d),_=b&&b[p.vScale.axis];if(Tt(_)||isNaN(_))return!0};for(const p of o)if(!(a!==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,a=this.chart.options.indexAxis;return Object.keys(e).filter(s=>e[s].axis===a).shift()}_getAxis(){const e={},a=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)e[ht(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,a)]=!0;return Object.keys(e)}_getStackIndex(e,a,s){const o=this._getStacks(e,s),c=a!==void 0?o.indexOf(a):-1;return c===-1?o.length-1:c}_getRuler(){const e=this.options,a=this._cachedMeta,s=a.iScale,o=[];let c,u;for(c=0,u=a.data.length;c<u;++c)o.push(s.getPixelForValue(this.getParsed(c)[s.axis],c));const f=e.barThickness;return{min:f||e1(a),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:f?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:a,_stacked:s,index:o},options:{base:c,minBarLength:u}}=this,f=c||0,d=this.getParsed(e),m=d._custom,p=Du(m);let b=d[a.axis],_=0,x=s?this.applyStack(a,d,s):b,T,M;x!==b&&(_=x-b,x=b),p&&(b=m.barStart,x=m.barEnd-m.barStart,b!==0&&ln(b)!==ln(m.barEnd)&&(_=0),_+=b);const A=!Tt(c)&&!p?c:_;let z=a.getPixelForValue(A);if(this.chart.getDataVisibility(e)?T=a.getPixelForValue(_+x):T=z,M=T-z,Math.abs(M)<u){M=s1(M,a,f)*u,b===f&&(z-=M/2);const H=a.getPixelForDecimal(0),Y=a.getPixelForDecimal(1),G=Math.min(H,Y),q=Math.max(H,Y);z=Math.max(Math.min(z,q),G),T=z+M,s&&!p&&(d._stacks[a.axis]._visualValues[o]=a.getValueForPixel(T)-a.getValueForPixel(z))}if(z===a.getPixelForValue(f)){const H=ln(M)*a.getLineWidthForValue(f)/2;z+=H,M-=H}return{size:M,base:z,head:T,center:T+M/2}}_calculateBarIndexPixels(e,a){const s=a.scale,o=this.options,c=o.skipNull,u=ht(o.maxBarThickness,1/0);let f,d;const m=this._getAxisCount();if(a.grouped){const p=c?this._getStackCount(e):a.stackCount,b=o.barThickness==="flex"?i1(e,a,o,p*m):n1(e,a,o,p*m),_=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,x=this._getAxis().indexOf(ht(_,this.getFirstScaleIdForIndexAxis())),T=this._getStackIndex(this.index,this._cachedMeta.stack,c?e:void 0)+x;f=b.start+b.chunk*T+b.chunk/2,d=Math.min(u,b.chunk*b.ratio)}else f=s.getPixelForValue(this.getParsed(e)[s.axis],e),d=Math.min(u,a.min*a.ratio);return{base:f-d/2,head:f+d/2,center:f,size:d}}draw(){const e=this._cachedMeta,a=e.vScale,s=e.data,o=s.length;let c=0;for(;c<o;++c)this.getParsed(c)[a.axis]!==null&&!s[c].hidden&&s[c].draw(this._ctx)}}function f1(i,e,a){let s=1,o=1,c=0,u=0;if(e<Yt){const f=i,d=f+e,m=Math.cos(f),p=Math.sin(f),b=Math.cos(d),_=Math.sin(d),x=(Y,G,q)=>Zs(Y,f,d,!0)?1:Math.max(G,G*a,q,q*a),T=(Y,G,q)=>Zs(Y,f,d,!0)?-1:Math.min(G,G*a,q,q*a),M=x(0,m,b),A=x(te,p,_),z=T(Ct,m,b),H=T(Ct+te,p,_);s=(M-z)/2,o=(A-H)/2,c=-(M+z)/2,u=-(A+H)/2}return{ratioX:s,ratioY:o,offsetX:c,offsetY:u}}class h1 extends gf{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 a=e.data,{labels:{pointStyle:s,textAlign:o,color:c,useBorderRadius:u,borderRadius:f}}=e.legend.options;return a.labels.length&&a.datasets.length?a.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:s,borderRadius:u&&(f||b.borderRadius),index:m}}):[]}},onClick(e,a,s){s.chart.toggleDataVisibility(a.index),s.chart.update()}}}};constructor(e,a){super(e,a),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,a){const s=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=s;else{let c=d=>+s[d];if(pt(s[e])){const{key:d="value"}=this._parsing;c=m=>+Bi(s[m],d)}let u,f;for(u=e,f=e+a;u<f;++u)o._parsed[u]=c(u)}}_getRotation(){return Rn(this.options.rotation-90)}_getCircumference(){return Rn(this.options.circumference)}_getRotationExtents(){let e=Yt,a=-Yt;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const o=this.chart.getDatasetMeta(s).controller,c=o._getRotation(),u=o._getCircumference();e=Math.min(e,c),a=Math.max(a,c+u)}return{rotation:e,circumference:a-e}}update(e){const a=this.chart,{chartArea:s}=a,o=this._cachedMeta,c=o.data,u=this.getMaxBorderWidth()+this.getMaxOffset(c)+this.options.spacing,f=Math.max((Math.min(s.width,s.height)-u)/2,0),d=Math.min(__(this.options.cutout,f),1),m=this._getRingWeight(this.index),{circumference:p,rotation:b}=this._getRotationExtents(),{ratioX:_,ratioY:x,offsetX:T,offsetY:M}=f1(b,p,d),A=(s.width-u)/_,z=(s.height-u)/x,H=Math.max(Math.min(A,z)/2,0),Y=o0(this.options.radius,H),G=Math.max(Y*d,0),q=(Y-G)/this._getVisibleDatasetWeightTotal();this.offsetX=T*Y,this.offsetY=M*Y,o.total=this.calculateTotal(),this.outerRadius=Y-q*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-q*m,0),this.updateElements(c,0,c.length,e)}_circumference(e,a){const s=this.options,o=this._cachedMeta,c=this._getCircumference();return a&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||o._parsed[e]===null||o.data[e].hidden?0:this.calculateCircumference(o._parsed[e]*c/Yt)}updateElements(e,a,s,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,_=c&&m.animateScale,x=_?0:this.innerRadius,T=_?0:this.outerRadius,{sharedOptions:M,includeOptions:A}=this._getSharedOptions(a,o);let z=this._getRotation(),H;for(H=0;H<a;++H)z+=this._circumference(H,c);for(H=a;H<a+s;++H){const Y=this._circumference(H,c),G=e[H],q={x:p+this.offsetX,y:b+this.offsetY,startAngle:z,endAngle:z+Y,circumference:Y,outerRadius:T,innerRadius:x};A&&(q.options=M||this.resolveDataElementOptions(H,G.active?"active":o)),z+=Y,this.updateElement(G,H,q,o)}}calculateTotal(){const e=this._cachedMeta,a=e.data;let s=0,o;for(o=0;o<a.length;o++){const c=e._parsed[o];c!==null&&!isNaN(c)&&this.chart.getDataVisibility(o)&&!a[o].hidden&&(s+=Math.abs(c))}return s}calculateCircumference(e){const a=this._cachedMeta.total;return a>0&&!isNaN(e)?Yt*(Math.abs(e)/a):0}getLabelAndValue(e){const a=this._cachedMeta,s=this.chart,o=s.data.labels||[],c=of(a._parsed[e],s.options.locale);return{label:o[e]||"",value:c}}getMaxBorderWidth(e){let a=0;const s=this.chart;let o,c,u,f,d;if(!e){for(o=0,c=s.data.datasets.length;o<c;++o)if(s.isDatasetVisible(o)){u=s.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"&&(a=Math.max(a,d.borderWidth||0,d.hoverBorderWidth||0));return a}getMaxOffset(e){let a=0;for(let s=0,o=e.length;s<o;++s){const c=this.resolveDataElementOptions(s);a=Math.max(a,c.offset||0,c.hoverOffset||0)}return a}_getRingWeightOffset(e){let a=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(a+=this._getRingWeight(s));return a}_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 d1 extends h1{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function ji(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class mf{static override(e){Object.assign(mf.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return ji()}parse(){return ji()}format(){return ji()}add(){return ji()}diff(){return ji()}startOf(){return ji()}endOf(){return ji()}}var g1={_date:mf};function m1(i,e,a,s){const{controller:o,data:c,_sorted:u}=i,f=o._cachedMeta.iScale,d=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(f&&e===f.axis&&e!=="r"&&u&&c.length){const m=f._reversePixels?k_:Gu;if(s){if(o._sharedOptions){const p=c[0],b=typeof p.getRange=="function"&&p.getRange(e);if(b){const _=m(c,e,a-b),x=m(c,e,a+b);return{lo:_.lo,hi:x.hi}}}}else{const p=m(c,e,a);if(d){const{vScale:b}=o._cachedMeta,{_parsed:_}=i,x=_.slice(0,p.lo+1).reverse().findIndex(M=>!Tt(M[b.axis]));p.lo-=Math.max(0,x);const T=_.slice(p.hi).findIndex(M=>!Tt(M[b.axis]));p.hi+=Math.max(0,T)}return p}}return{lo:0,hi:c.length-1}}function Ko(i,e,a,s,o){const c=i.getSortedVisibleDatasetMetas(),u=a[e];for(let f=0,d=c.length;f<d;++f){const{index:m,data:p}=c[f],{lo:b,hi:_}=m1(c[f],e,u,o);for(let x=b;x<=_;++x){const T=p[x];T.skip||s(T,m,x)}}}function p1(i){const e=i.indexOf("x")!==-1,a=i.indexOf("y")!==-1;return function(s,o){const c=e?Math.abs(s.x-o.x):0,u=a?Math.abs(s.y-o.y):0;return Math.sqrt(Math.pow(c,2)+Math.pow(u,2))}}function Cu(i,e,a,s,o){const c=[];return!o&&!i.isPointInArea(e)||Ko(i,a,e,function(f,d,m){!o&&!Ks(f,i.chartArea,0)||f.inRange(e.x,e.y,s)&&c.push({element:f,datasetIndex:d,index:m})},!0),c}function y1(i,e,a,s){let o=[];function c(u,f,d){const{startAngle:m,endAngle:p}=u.getProps(["startAngle","endAngle"],s),{angle:b}=u0(u,{x:e.x,y:e.y});Zs(b,m,p)&&o.push({element:u,datasetIndex:f,index:d})}return Ko(i,a,e,c),o}function b1(i,e,a,s,o,c){let u=[];const f=p1(a);let d=Number.POSITIVE_INFINITY;function m(p,b,_){const x=p.inRange(e.x,e.y,o);if(s&&!x)return;const T=p.getCenterPoint(o);if(!(!!c||i.isPointInArea(T))&&!x)return;const A=f(e,T);A<d?(u=[{element:p,datasetIndex:b,index:_}],d=A):A===d&&u.push({element:p,datasetIndex:b,index:_})}return Ko(i,a,e,m),u}function zu(i,e,a,s,o,c){return!c&&!i.isPointInArea(e)?[]:a==="r"&&!s?y1(i,e,a,o):b1(i,e,a,s,o,c)}function sp(i,e,a,s,o){const c=[],u=a==="x"?"inXRange":"inYRange";let f=!1;return Ko(i,a,e,(d,m,p)=>{d[u]&&d[u](e[a],o)&&(c.push({element:d,datasetIndex:m,index:p}),f=f||d.inRange(e.x,e.y,o))}),s&&!f?[]:c}var v1={modes:{index(i,e,a,s){const o=ki(e,i),c=a.axis||"x",u=a.includeInvisible||!1,f=a.intersect?Cu(i,o,c,s,u):zu(i,o,c,!1,s,u),d=[];return f.length?(i.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(i,e,a,s){const o=ki(e,i),c=a.axis||"xy",u=a.includeInvisible||!1;let f=a.intersect?Cu(i,o,c,s,u):zu(i,o,c,!1,s,u);if(f.length>0){const d=f[0].datasetIndex,m=i.getDatasetMeta(d).data;f=[];for(let p=0;p<m.length;++p)f.push({element:m[p],datasetIndex:d,index:p})}return f},point(i,e,a,s){const o=ki(e,i),c=a.axis||"xy",u=a.includeInvisible||!1;return Cu(i,o,c,s,u)},nearest(i,e,a,s){const o=ki(e,i),c=a.axis||"xy",u=a.includeInvisible||!1;return zu(i,o,c,a.intersect,s,u)},x(i,e,a,s){const o=ki(e,i);return sp(i,o,"x",a.intersect,s)},y(i,e,a,s){const o=ki(e,i);return sp(i,o,"y",a.intersect,s)}}};const w0=["left","top","right","bottom"];function zs(i,e){return i.filter(a=>a.pos===e)}function lp(i,e){return i.filter(a=>w0.indexOf(a.pos)===-1&&a.box.axis===e)}function Rs(i,e){return i.sort((a,s)=>{const o=e?s:a,c=e?a:s;return o.weight===c.weight?o.index-c.index:o.weight-c.weight})}function _1(i){const e=[];let a,s,o,c,u,f;for(a=0,s=(i||[]).length;a<s;++a)o=i[a],{position:c,options:{stack:u,stackWeight:f=1}}=o,e.push({index:a,box:o,pos:c,horizontal:o.isHorizontal(),weight:o.weight,stack:u&&c+u,stackWeight:f});return e}function x1(i){const e={};for(const a of i){const{stack:s,pos:o,stackWeight:c}=a;if(!s||!w0.includes(o))continue;const u=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});u.count++,u.weight+=c}return e}function S1(i,e){const a=x1(i),{vBoxMaxWidth:s,hBoxMaxHeight:o}=e;let c,u,f;for(c=0,u=i.length;c<u;++c){f=i[c];const{fullSize:d}=f.box,m=a[f.stack],p=m&&f.stackWeight/m.weight;f.horizontal?(f.width=p?p*s:d&&e.availableWidth,f.height=o):(f.width=s,f.height=p?p*o:d&&e.availableHeight)}return a}function T1(i){const e=_1(i),a=Rs(e.filter(m=>m.box.fullSize),!0),s=Rs(zs(e,"left"),!0),o=Rs(zs(e,"right")),c=Rs(zs(e,"top"),!0),u=Rs(zs(e,"bottom")),f=lp(e,"x"),d=lp(e,"y");return{fullSize:a,leftAndTop:s.concat(c),rightAndBottom:o.concat(d).concat(u).concat(f),chartArea:zs(e,"chartArea"),vertical:s.concat(o).concat(d),horizontal:c.concat(u).concat(f)}}function op(i,e,a,s){return Math.max(i[a],e[a])+Math.max(i[s],e[s])}function N0(i,e){i.top=Math.max(i.top,e.top),i.left=Math.max(i.left,e.left),i.bottom=Math.max(i.bottom,e.bottom),i.right=Math.max(i.right,e.right)}function M1(i,e,a,s){const{pos:o,box:c}=a,u=i.maxPadding;if(!pt(o)){a.size&&(i[o]-=a.size);const b=s[a.stack]||{size:0,count:1};b.size=Math.max(b.size,a.horizontal?c.height:c.width),a.size=b.size/b.count,i[o]+=a.size}c.getPadding&&N0(u,c.getPadding());const f=Math.max(0,e.outerWidth-op(u,i,"left","right")),d=Math.max(0,e.outerHeight-op(u,i,"top","bottom")),m=f!==i.w,p=d!==i.h;return i.w=f,i.h=d,a.horizontal?{same:m,other:p}:{same:p,other:m}}function E1(i){const e=i.maxPadding;function a(s){const o=Math.max(e[s]-i[s],0);return i[s]+=o,o}i.y+=a("top"),i.x+=a("left"),a("right"),a("bottom")}function A1(i,e){const a=e.maxPadding;function s(o){const c={left:0,top:0,right:0,bottom:0};return o.forEach(u=>{c[u]=Math.max(e[u],a[u])}),c}return s(i?["left","right"]:["top","bottom"])}function Ls(i,e,a,s){const o=[];let c,u,f,d,m,p;for(c=0,u=i.length,m=0;c<u;++c){f=i[c],d=f.box,d.update(f.width||e.w,f.height||e.h,A1(f.horizontal,e));const{same:b,other:_}=M1(e,a,f,s);m|=b&&o.length,p=p||_,d.fullSize||o.push(f)}return m&&Ls(o,e,a,s)||p}function To(i,e,a,s,o){i.top=a,i.left=e,i.right=e+s,i.bottom=a+o,i.width=s,i.height=o}function rp(i,e,a,s){const o=a.padding;let{x:c,y:u}=e;for(const f of i){const d=f.box,m=s[f.stack]||{placed:0,weight:1},p=f.stackWeight/m.weight||1;if(f.horizontal){const b=e.w*p,_=m.size||d.height;Qs(m.start)&&(u=m.start),d.fullSize?To(d,o.left,u,a.outerWidth-o.right-o.left,_):To(d,e.left+m.placed,u,b,_),m.start=u,m.placed+=b,u=d.bottom}else{const b=e.h*p,_=m.size||d.width;Qs(m.start)&&(c=m.start),d.fullSize?To(d,c,o.top,_,a.outerHeight-o.bottom-o.top):To(d,c,e.top+m.placed,_,b),m.start=c,m.placed+=b,c=d.right}}e.x=c,e.y=u}var Fe={addBox(i,e){i.boxes||(i.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(a){e.draw(a)}}]},i.boxes.push(e)},removeBox(i,e){const a=i.boxes?i.boxes.indexOf(e):-1;a!==-1&&i.boxes.splice(a,1)},configure(i,e,a){e.fullSize=a.fullSize,e.position=a.position,e.weight=a.weight},update(i,e,a,s){if(!i)return;const o=Le(i.options.layout.padding),c=Math.max(e-o.width,0),u=Math.max(a-o.height,0),f=T1(i.boxes),d=f.vertical,m=f.horizontal;At(i.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:a,padding:o,availableWidth:c,availableHeight:u,vBoxMaxWidth:c/2/p,hBoxMaxHeight:u/2}),_=Object.assign({},o);N0(_,Le(s));const x=Object.assign({maxPadding:_,w:c,h:u,x:o.left,y:o.top},o),T=S1(d.concat(m),b);Ls(f.fullSize,x,b,T),Ls(d,x,b,T),Ls(m,x,b,T)&&Ls(d,x,b,T),E1(x),rp(f.leftAndTop,x,b,T),x.x+=x.w,x.y+=x.h,rp(f.rightAndBottom,x,b,T),i.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},At(f.chartArea,M=>{const A=M.box;Object.assign(A,i.chartArea),A.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}};class j0{acquireContext(e,a){}releaseContext(e){return!1}addEventListener(e,a,s){}removeEventListener(e,a,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,a,s,o){return a=Math.max(0,a||e.width),s=s||e.height,{width:a,height:Math.max(0,o?Math.floor(a/o):s)}}isAttached(e){return!0}updateConfig(e){}}class O1 extends j0{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const jo="$chartjs",D1={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cp=i=>i===null||i==="";function C1(i,e){const a=i.style,s=i.getAttribute("height"),o=i.getAttribute("width");if(i[jo]={initial:{height:s,width:o,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",cp(o)){const c=Zm(i,"width");c!==void 0&&(i.width=c)}if(cp(s))if(i.style.height==="")i.height=i.width/(e||2);else{const c=Zm(i,"height");c!==void 0&&(i.height=c)}return i}const k0=Dx?{passive:!0}:!1;function z1(i,e,a){i&&i.addEventListener(e,a,k0)}function R1(i,e,a){i&&i.canvas&&i.canvas.removeEventListener(e,a,k0)}function w1(i,e){const a=D1[i.type]||i.type,{x:s,y:o}=ki(i,e);return{type:a,chart:e,native:i,x:s!==void 0?s:null,y:o!==void 0?o:null}}function qo(i,e){for(const a of i)if(a===e||a.contains(e))return!0}function N1(i,e,a){const s=i.canvas,o=new MutationObserver(c=>{let u=!1;for(const f of c)u=u||qo(f.addedNodes,s),u=u&&!qo(f.removedNodes,s);u&&a()});return o.observe(document,{childList:!0,subtree:!0}),o}function j1(i,e,a){const s=i.canvas,o=new MutationObserver(c=>{let u=!1;for(const f of c)u=u||qo(f.removedNodes,s),u=u&&!qo(f.addedNodes,s);u&&a()});return o.observe(document,{childList:!0,subtree:!0}),o}const Ws=new Map;let up=0;function L0(){const i=window.devicePixelRatio;i!==up&&(up=i,Ws.forEach((e,a)=>{a.currentDevicePixelRatio!==i&&e()}))}function k1(i,e){Ws.size||window.addEventListener("resize",L0),Ws.set(i,e)}function L1(i){Ws.delete(i),Ws.size||window.removeEventListener("resize",L0)}function H1(i,e,a){const s=i.canvas,o=s&&df(s);if(!o)return;const c=g0((f,d)=>{const m=o.clientWidth;a(f,d),m<o.clientWidth&&a()},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(i,c),u}function Ru(i,e,a){a&&a.disconnect(),e==="resize"&&L1(i)}function B1(i,e,a){const s=i.canvas,o=g0(c=>{i.ctx!==null&&a(w1(c,i))},i);return z1(s,e,o),o}class U1 extends j0{acquireContext(e,a){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(C1(e,a),s):null}releaseContext(e){const a=e.canvas;if(!a[jo])return!1;const s=a[jo].initial;["height","width"].forEach(c=>{const u=s[c];Tt(u)?a.removeAttribute(c):a.setAttribute(c,u)});const o=s.style||{};return Object.keys(o).forEach(c=>{a.style[c]=o[c]}),a.width=a.width,delete a[jo],!0}addEventListener(e,a,s){this.removeEventListener(e,a);const o=e.$proxies||(e.$proxies={}),u={attach:N1,detach:j1,resize:H1}[a]||B1;o[a]=u(e,a,s)}removeEventListener(e,a){const s=e.$proxies||(e.$proxies={}),o=s[a];if(!o)return;({attach:Ru,detach:Ru,resize:Ru}[a]||R1)(e,a,o),s[a]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,a,s,o){return Ox(e,a,s,o)}isAttached(e){const a=e&&df(e);return!!(a&&a.isConnected)}}function V1(i){return!hf()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?O1:U1}class jn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:a,y:s}=this.getProps(["x","y"],e);return{x:a,y:s}}hasValue(){return Uo(this.x)&&Uo(this.y)}getProps(e,a){const s=this.$animations;if(!a||!s)return this;const o={};return e.forEach(c=>{o[c]=s[c]&&s[c].active()?s[c]._to:this[c]}),o}}function Y1(i,e){const a=i.options.ticks,s=q1(i),o=Math.min(a.maxTicksLimit||s,s),c=a.major.enabled?G1(e):[],u=c.length,f=c[0],d=c[u-1],m=[];if(u>o)return Q1(e,m,c,u/o),m;const p=X1(c,e,o);if(u>0){let b,_;const x=u>1?Math.round((d-f)/(u-1)):null;for(Mo(e,m,p,Tt(x)?0:f-x,f),b=0,_=u-1;b<_;b++)Mo(e,m,p,c[b],c[b+1]);return Mo(e,m,p,d,Tt(x)?e.length:d+x),m}return Mo(e,m,p),m}function q1(i){const e=i.options.offset,a=i._tickSize(),s=i._length/a+(e?0:1),o=i._maxLength/a;return Math.floor(Math.min(s,o))}function X1(i,e,a){const s=Z1(i),o=e.length/a;if(!s)return Math.max(o,1);const c=D_(s);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 G1(i){const e=[];let a,s;for(a=0,s=i.length;a<s;a++)i[a].major&&e.push(a);return e}function Q1(i,e,a,s){let o=0,c=a[0],u;for(s=Math.ceil(s),u=0;u<i.length;u++)u===c&&(e.push(i[u]),o++,c=a[o*s])}function Mo(i,e,a,s,o){const c=ht(s,0),u=Math.min(ht(o,i.length),i.length);let f=0,d,m,p;for(a=Math.ceil(a),o&&(d=o-s,a=d/Math.floor(d/a)),p=c;p<0;)f++,p=Math.round(c+f*a);for(m=Math.max(c,0);m<u;m++)m===p&&(e.push(i[m]),f++,p=Math.round(c+f*a))}function Z1(i){const e=i.length;let a,s;if(e<2)return!1;for(s=i[0],a=1;a<e;++a)if(i[a]-i[a-1]!==s)return!1;return s}const K1=i=>i==="left"?"right":i==="right"?"left":i,fp=(i,e,a)=>e==="top"||e==="left"?i[e]+a:i[e]-a,hp=(i,e)=>Math.min(e||i,i);function dp(i,e){const a=[],s=i.length/e,o=i.length;let c=0;for(;c<o;c+=s)a.push(i[Math.floor(c)]);return a}function F1(i,e,a){const s=i.ticks.length,o=Math.min(e,s-1),c=i._startPixel,u=i._endPixel,f=1e-6;let d=i.getPixelForTick(o),m;if(!(a&&(s===1?m=Math.max(d-c,u-d):e===0?m=(i.getPixelForTick(1)-d)/2:m=(d-i.getPixelForTick(o-1))/2,d+=o<e?m:-m,d<c-f||d>u+f)))return d}function W1(i,e){At(i,a=>{const s=a.gc,o=s.length/2;let c;if(o>e){for(c=0;c<o;++c)delete a.data[s[c]];s.splice(0,o)}})}function ws(i){return i.drawTicks?i.tickLength:0}function gp(i,e){if(!i.display)return 0;const a=re(i.font,e),s=Le(i.padding);return(Ft(i.text)?i.text.length:1)*a.lineHeight+s.height}function J1(i,e){return Vi(i,{scale:e,type:"scale"})}function I1(i,e,a){return Vi(i,{tick:a,index:e,type:"tick"})}function $1(i,e,a){let s=sf(i);return(a&&e!=="right"||!a&&e==="right")&&(s=K1(s)),s}function P1(i,e,a,s){const{top:o,left:c,bottom:u,right:f,chart:d}=i,{chartArea:m,scales:p}=d;let b=0,_,x,T;const M=u-o,A=f-c;if(i.isHorizontal()){if(x=ue(s,c,f),pt(a)){const z=Object.keys(a)[0],H=a[z];T=p[z].getPixelForValue(H)+M-e}else a==="center"?T=(m.bottom+m.top)/2+M-e:T=fp(i,a,e);_=f-c}else{if(pt(a)){const z=Object.keys(a)[0],H=a[z];x=p[z].getPixelForValue(H)-A+e}else a==="center"?x=(m.left+m.right)/2-A+e:x=fp(i,a,e);T=ue(s,u,o),b=a==="left"?-te:te}return{titleX:x,titleY:T,maxWidth:_,rotation:b}}class Na extends jn{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,a){return e}getUserBounds(){let{_userMin:e,_userMax:a,_suggestedMin:s,_suggestedMax:o}=this;return e=nn(e,Number.POSITIVE_INFINITY),a=nn(a,Number.NEGATIVE_INFINITY),s=nn(s,Number.POSITIVE_INFINITY),o=nn(o,Number.NEGATIVE_INFINITY),{min:nn(e,s),max:nn(a,o),minDefined:fe(e),maxDefined:fe(a)}}getMinMax(e){let{min:a,max:s,minDefined:o,maxDefined:c}=this.getUserBounds(),u;if(o&&c)return{min:a,max:s};const f=this.getMatchingVisibleMetas();for(let d=0,m=f.length;d<m;++d)u=f[d].controller.getMinMax(this,e),o||(a=Math.min(a,u.min)),c||(s=Math.max(s,u.max));return a=c&&a>s?s:a,s=o&&a>s?a:s,{min:nn(a,nn(s,a)),max:nn(s,nn(a,s))}}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(){jt(this.options.beforeUpdate,[this])}update(e,a,s){const{beginAtZero:o,grace:c,ticks:u}=this.options,f=u.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=a,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=sx(this,c,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=f<this.ticks.length;this._convertTicksToLabels(d?dp(this.ticks,f):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),u.display&&(u.autoSkip||u.source==="auto")&&(this.ticks=Y1(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,a,s;this.isHorizontal()?(a=this.left,s=this.right):(a=this.top,s=this.bottom,e=!e),this._startPixel=a,this._endPixel=s,this._reversePixels=e,this._length=s-a,this._alignToPixels=this.options.alignToPixels}afterUpdate(){jt(this.options.afterUpdate,[this])}beforeSetDimensions(){jt(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(){jt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),jt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){jt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const a=this.options.ticks;let s,o,c;for(s=0,o=e.length;s<o;s++)c=e[s],c.label=jt(a.callback,[c.value,s,e],this)}afterTickToLabelConversion(){jt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){jt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,a=e.ticks,s=hp(this.ticks.length,e.ticks.maxTicksLimit),o=a.minRotation||0,c=a.maxRotation;let u=o,f,d,m;if(!this._isVisible()||!a.display||o>=c||s<=1||!this.isHorizontal()){this.labelRotation=o;return}const p=this._getLabelSizes(),b=p.widest.width,_=p.highest.height,x=Me(this.chart.width-b,0,this.maxWidth);f=e.offset?this.maxWidth/s:x/(s-1),b+6>f&&(f=x/(s-(e.offset?.5:1)),d=this.maxHeight-ws(e.grid)-a.padding-gp(e.title,this.chart.options.font),m=Math.sqrt(b*b+_*_),u=w_(Math.min(Math.asin(Me((p.highest.height+6)/f,-1,1)),Math.asin(Me(d/m,-1,1))-Math.asin(Me(_/m,-1,1)))),u=Math.max(o,Math.min(c,u))),this.labelRotation=u}afterCalculateLabelRotation(){jt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){jt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:a,options:{ticks:s,title:o,grid:c}}=this,u=this._isVisible(),f=this.isHorizontal();if(u){const d=gp(o,a.options.font);if(f?(e.width=this.maxWidth,e.height=ws(c)+d):(e.height=this.maxHeight,e.width=ws(c)+d),s.display&&this.ticks.length){const{first:m,last:p,widest:b,highest:_}=this._getLabelSizes(),x=s.padding*2,T=Rn(this.labelRotation),M=Math.cos(T),A=Math.sin(T);if(f){const z=s.mirror?0:A*b.width+M*_.height;e.height=Math.min(this.maxHeight,e.height+z+x)}else{const z=s.mirror?0:M*b.width+A*_.height;e.width=Math.min(this.maxWidth,e.width+z+x)}this._calculatePadding(m,p,A,M)}}this._handleMargins(),f?(this.width=this._length=a.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=a.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,a,s,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 _=0,x=0;d?m?(_=o*e.width,x=s*a.height):(_=s*e.height,x=o*a.width):c==="start"?x=a.width:c==="end"?_=e.width:c!=="inner"&&(_=e.width/2,x=a.width/2),this.paddingLeft=Math.max((_-p+u)*this.width/(this.width-p),0),this.paddingRight=Math.max((x-b+u)*this.width/(this.width-b),0)}else{let p=a.height/2,b=e.height/2;c==="start"?(p=0,b=e.height):c==="end"&&(p=a.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(){jt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:a}=this.options;return a==="top"||a==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let a,s;for(a=0,s=e.length;a<s;a++)Tt(e[a].label)&&(e.splice(a,1),s--,a--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const a=this.options.ticks.sampleSize;let s=this.ticks;a<s.length&&(s=dp(s,a)),this._labelSizes=e=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,a,s){const{ctx:o,_longestTextCache:c}=this,u=[],f=[],d=Math.floor(a/hp(a,s));let m=0,p=0,b,_,x,T,M,A,z,H,Y,G,q;for(b=0;b<a;b+=d){if(T=e[b].label,M=this._resolveTickFontOptions(b),o.font=A=M.string,z=c[A]=c[A]||{data:{},gc:[]},H=M.lineHeight,Y=G=0,!Tt(T)&&!Ft(T))Y=Ym(o,z.data,z.gc,Y,T),G=H;else if(Ft(T))for(_=0,x=T.length;_<x;++_)q=T[_],!Tt(q)&&!Ft(q)&&(Y=Ym(o,z.data,z.gc,Y,q),G+=H);u.push(Y),f.push(G),m=Math.max(Y,m),p=Math.max(G,p)}W1(c,a);const K=u.indexOf(m),Q=f.indexOf(p),F=tt=>({width:u[tt]||0,height:f[tt]||0});return{first:F(0),last:F(a-1),widest:F(K),highest:F(Q),widths:u,heights:f}}getLabelForValue(e){return e}getPixelForValue(e,a){return NaN}getValueForPixel(e){}getPixelForTick(e){const a=this.ticks;return e<0||e>a.length-1?null:this.getPixelForValue(a[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const a=this._startPixel+e*this._length;return j_(this._alignToPixels?Ni(this.chart,a,0):a)}getDecimalForPixel(e){const a=(e-this._startPixel)/this._length;return this._reversePixels?1-a:a}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:a}=this;return e<0&&a<0?a:e>0&&a>0?e:0}getContext(e){const a=this.ticks||[];if(e>=0&&e<a.length){const s=a[e];return s.$context||(s.$context=I1(this.getContext(),e,s))}return this.$context||(this.$context=J1(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,a=Rn(this.labelRotation),s=Math.abs(Math.cos(a)),o=Math.abs(Math.sin(a)),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*s>f*o?f/s:d/o:d*o<f*s?d/s:f/o}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const a=this.axis,s=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),_=ws(c),x=[],T=f.setContext(this.getContext()),M=T.display?T.width:0,A=M/2,z=function(j){return Ni(s,j,M)};let H,Y,G,q,K,Q,F,tt,ct,at,it,kt;if(u==="top")H=z(this.bottom),Q=this.bottom-_,tt=H-A,at=z(e.top)+A,kt=e.bottom;else if(u==="bottom")H=z(this.top),at=e.top,kt=z(e.bottom)-A,Q=H+A,tt=this.top+_;else if(u==="left")H=z(this.right),K=this.right-_,F=H-A,ct=z(e.left)+A,it=e.right;else if(u==="right")H=z(this.left),ct=e.left,it=z(e.right)-A,K=H+A,F=this.left+_;else if(a==="x"){if(u==="center")H=z((e.top+e.bottom)/2+.5);else if(pt(u)){const j=Object.keys(u)[0],X=u[j];H=z(this.chart.scales[j].getPixelForValue(X))}at=e.top,kt=e.bottom,Q=H+A,tt=Q+_}else if(a==="y"){if(u==="center")H=z((e.left+e.right)/2);else if(pt(u)){const j=Object.keys(u)[0],X=u[j];H=z(this.chart.scales[j].getPixelForValue(X))}K=H-A,F=K-_,ct=e.left,it=e.right}const Vt=ht(o.ticks.maxTicksLimit,b),dt=Math.max(1,Math.ceil(b/Vt));for(Y=0;Y<b;Y+=dt){const j=this.getContext(Y),X=c.setContext(j),P=f.setContext(j),lt=X.lineWidth,_t=X.color,D=P.dash||[],U=P.dashOffset,Z=X.tickWidth,W=X.tickColor,st=X.tickBorderDash||[],ot=X.tickBorderDashOffset;G=F1(this,Y,d),G!==void 0&&(q=Ni(s,G,lt),m?K=F=ct=it=q:Q=tt=at=kt=q,x.push({tx1:K,ty1:Q,tx2:F,ty2:tt,x1:ct,y1:at,x2:it,y2:kt,width:lt,color:_t,borderDash:D,borderDashOffset:U,tickWidth:Z,tickColor:W,tickBorderDash:st,tickBorderDashOffset:ot}))}return this._ticksLength=b,this._borderValue=H,x}_computeLabelItems(e){const a=this.axis,s=this.options,{position:o,ticks:c}=s,u=this.isHorizontal(),f=this.ticks,{align:d,crossAlign:m,padding:p,mirror:b}=c,_=ws(s.grid),x=_+p,T=b?-p:x,M=-Rn(this.labelRotation),A=[];let z,H,Y,G,q,K,Q,F,tt,ct,at,it,kt="middle";if(o==="top")K=this.bottom-T,Q=this._getXAxisLabelAlignment();else if(o==="bottom")K=this.top+T,Q=this._getXAxisLabelAlignment();else if(o==="left"){const dt=this._getYAxisLabelAlignment(_);Q=dt.textAlign,q=dt.x}else if(o==="right"){const dt=this._getYAxisLabelAlignment(_);Q=dt.textAlign,q=dt.x}else if(a==="x"){if(o==="center")K=(e.top+e.bottom)/2+x;else if(pt(o)){const dt=Object.keys(o)[0],j=o[dt];K=this.chart.scales[dt].getPixelForValue(j)+x}Q=this._getXAxisLabelAlignment()}else if(a==="y"){if(o==="center")q=(e.left+e.right)/2-x;else if(pt(o)){const dt=Object.keys(o)[0],j=o[dt];q=this.chart.scales[dt].getPixelForValue(j)}Q=this._getYAxisLabelAlignment(_).textAlign}a==="y"&&(d==="start"?kt="top":d==="end"&&(kt="bottom"));const Vt=this._getLabelSizes();for(z=0,H=f.length;z<H;++z){Y=f[z],G=Y.label;const dt=c.setContext(this.getContext(z));F=this.getPixelForTick(z)+c.labelOffset,tt=this._resolveTickFontOptions(z),ct=tt.lineHeight,at=Ft(G)?G.length:1;const j=at/2,X=dt.color,P=dt.textStrokeColor,lt=dt.textStrokeWidth;let _t=Q;u?(q=F,Q==="inner"&&(z===H-1?_t=this.options.reverse?"left":"right":z===0?_t=this.options.reverse?"right":"left":_t="center"),o==="top"?m==="near"||M!==0?it=-at*ct+ct/2:m==="center"?it=-Vt.highest.height/2-j*ct+ct:it=-Vt.highest.height+ct/2:m==="near"||M!==0?it=ct/2:m==="center"?it=Vt.highest.height/2-j*ct:it=Vt.highest.height-at*ct,b&&(it*=-1),M!==0&&!dt.showLabelBackdrop&&(q+=ct/2*Math.sin(M))):(K=F,it=(1-at)*ct/2);let D;if(dt.showLabelBackdrop){const U=Le(dt.backdropPadding),Z=Vt.heights[z],W=Vt.widths[z];let st=it-U.top,ot=0-U.left;switch(kt){case"middle":st-=Z/2;break;case"bottom":st-=Z;break}switch(Q){case"center":ot-=W/2;break;case"right":ot-=W;break;case"inner":z===H-1?ot-=W:z>0&&(ot-=W/2);break}D={left:ot,top:st,width:W+U.width,height:Z+U.height,color:dt.backdropColor}}A.push({label:G,font:tt,textOffset:it,options:{rotation:M,color:X,strokeColor:P,strokeWidth:lt,textAlign:_t,textBaseline:kt,translation:[q,K],backdrop:D}})}return A}_getXAxisLabelAlignment(){const{position:e,ticks:a}=this.options;if(-Rn(this.labelRotation))return e==="top"?"left":"right";let o="center";return a.align==="start"?o="left":a.align==="end"?o="right":a.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(e){const{position:a,ticks:{crossAlign:s,mirror:o,padding:c}}=this.options,u=this._getLabelSizes(),f=e+c,d=u.widest.width;let m,p;return a==="left"?o?(p=this.right+c,s==="near"?m="left":s==="center"?(m="center",p+=d/2):(m="right",p+=d)):(p=this.right-f,s==="near"?m="right":s==="center"?(m="center",p-=d/2):(m="left",p=this.left)):a==="right"?o?(p=this.left+c,s==="near"?m="right":s==="center"?(m="center",p-=d/2):(m="left",p-=d)):(p=this.left+f,s==="near"?m="left":s==="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,a=this.options.position;if(a==="left"||a==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(a==="top"||a==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:a},left:s,top:o,width:c,height:u}=this;a&&(e.save(),e.fillStyle=a,e.fillRect(s,o,c,u),e.restore())}getLineWidthForValue(e){const a=this.options.grid;if(!this._isVisible()||!a.display)return 0;const o=this.ticks.findIndex(c=>c.value===e);return o>=0?a.setContext(this.getContext(o)).lineWidth:0}drawGrid(e){const a=this.options.grid,s=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let c,u;const f=(d,m,p)=>{!p.width||!p.color||(s.save(),s.lineWidth=p.width,s.strokeStyle=p.color,s.setLineDash(p.borderDash||[]),s.lineDashOffset=p.borderDashOffset,s.beginPath(),s.moveTo(d.x,d.y),s.lineTo(m.x,m.y),s.stroke(),s.restore())};if(a.display)for(c=0,u=o.length;c<u;++c){const d=o[c];a.drawOnChartArea&&f({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),a.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:a,options:{border:s,grid:o}}=this,c=s.setContext(this.getContext()),u=s.display?c.width:0;if(!u)return;const f=o.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let m,p,b,_;this.isHorizontal()?(m=Ni(e,this.left,u)-u/2,p=Ni(e,this.right,f)+f/2,b=_=d):(b=Ni(e,this.top,u)-u/2,_=Ni(e,this.bottom,f)+f/2,m=p=d),a.save(),a.lineWidth=c.width,a.strokeStyle=c.color,a.beginPath(),a.moveTo(m,b),a.lineTo(p,_),a.stroke(),a.restore()}drawLabels(e){if(!this.options.ticks.display)return;const s=this.ctx,o=this._computeLabelArea();o&&Go(s,o);const c=this.getLabelItems(e);for(const u of c){const f=u.options,d=u.font,m=u.label,p=u.textOffset;Fs(s,m,0,p,d,f)}o&&Qo(s)}drawTitle(){const{ctx:e,options:{position:a,title:s,reverse:o}}=this;if(!s.display)return;const c=re(s.font),u=Le(s.padding),f=s.align;let d=c.lineHeight/2;a==="bottom"||a==="center"||pt(a)?(d+=u.bottom,Ft(s.text)&&(d+=c.lineHeight*(s.text.length-1))):d+=u.top;const{titleX:m,titleY:p,maxWidth:b,rotation:_}=P1(this,d,a,f);Fs(e,s.text,0,0,c,{color:s.color,maxWidth:b,rotation:_,textAlign:$1(f,a,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,a=e.ticks&&e.ticks.z||0,s=ht(e.grid&&e.grid.z,-1),o=ht(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Na.prototype.draw?[{z:a,draw:c=>{this.draw(c)}}]:[{z:s,draw:c=>{this.drawBackground(),this.drawGrid(c),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:a,draw:c=>{this.drawLabels(c)}}]}getMatchingVisibleMetas(e){const a=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",o=[];let c,u;for(c=0,u=a.length;c<u;++c){const f=a[c];f[s]===this.id&&(!e||f.type===e)&&o.push(f)}return o}_resolveTickFontOptions(e){const a=this.options.ticks.setContext(this.getContext(e));return re(a.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Eo{constructor(e,a,s){this.type=e,this.scope=a,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const a=Object.getPrototypeOf(e);let s;nS(a)&&(s=this.register(a));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,tS(e,u,s),this.override&&Gt.override(e.id,e.overrides)),u}get(e){return this.items[e]}unregister(e){const a=this.items,s=e.id,o=this.scope;s in a&&delete a[s],o&&s in Gt[o]&&(delete Gt[o][s],this.override&&delete Ui[s])}}function tS(i,e,a){const s=on(Object.create(null),[a?Gt.get(a):{},Gt.get(e),i.defaults]);Gt.set(e,s),i.defaultRoutes&&eS(e,i.defaultRoutes),i.descriptors&&Gt.describe(e,i.descriptors)}function eS(i,e){Object.keys(e).forEach(a=>{const s=a.split("."),o=s.pop(),c=[i].concat(s).join("."),u=e[a].split("."),f=u.pop(),d=u.join(".");Gt.route(c,o,d,f)})}function nS(i){return"id"in i&&"defaults"in i}class iS{constructor(){this.controllers=new Eo(gf,"datasets",!0),this.elements=new Eo(jn,"elements"),this.plugins=new Eo(Object,"plugins"),this.scales=new Eo(Na,"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,a,s){[...a].forEach(o=>{const c=s||this._getRegistryForType(o);s||c.isForType(o)||c===this.plugins&&o.id?this._exec(e,c,o):At(o,u=>{const f=s||this._getRegistryForType(u);this._exec(e,f,u)})})}_exec(e,a,s){const o=nf(e);jt(s["before"+o],[],s),a[e](s),jt(s["after"+o],[],s)}_getRegistryForType(e){for(let a=0;a<this._typedRegistries.length;a++){const s=this._typedRegistries[a];if(s.isForType(e))return s}return this.plugins}_get(e,a,s){const o=a.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+s+".");return o}}var sn=new iS;class aS{constructor(){this._init=void 0}notify(e,a,s,o){if(a==="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,a,s);return a==="afterDestroy"&&(this._notify(c,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),u}_notify(e,a,s,o){o=o||{};for(const c of e){const u=c.plugin,f=u[s],d=[a,o,c.options];if(jt(f,d,u)===!1&&o.cancelable)return!1}return!0}invalidate(){Tt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const a=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),a}_createDescriptors(e,a){const s=e&&e.config,o=ht(s.options&&s.options.plugins,{}),c=sS(s);return o===!1&&!a?[]:oS(e,c,o,a)}_notifyStateChanges(e){const a=this._oldCache||[],s=this._cache,o=(c,u)=>c.filter(f=>!u.some(d=>f.plugin.id===d.plugin.id));this._notify(o(a,s),e,"stop"),this._notify(o(s,a),e,"start")}}function sS(i){const e={},a=[],s=Object.keys(sn.plugins.items);for(let c=0;c<s.length;c++)a.push(sn.getPlugin(s[c]));const o=i.plugins||[];for(let c=0;c<o.length;c++){const u=o[c];a.indexOf(u)===-1&&(a.push(u),e[u.id]=!0)}return{plugins:a,localIds:e}}function lS(i,e){return!e&&i===!1?null:i===!0?{}:i}function oS(i,{plugins:e,localIds:a},s,o){const c=[],u=i.getContext();for(const f of e){const d=f.id,m=lS(s[d],o);m!==null&&c.push({plugin:f,options:rS(i.config,{plugin:f,local:a[d]},m,u)})}return c}function rS(i,{plugin:e,local:a},s,o){const c=i.pluginScopeKeys(e),u=i.getOptionScopes(s,c);return a&&e.defaults&&u.push(e.defaults),i.createResolver(u,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ku(i,e){const a=Gt.datasets[i]||{};return((e.datasets||{})[i]||{}).indexAxis||e.indexAxis||a.indexAxis||"x"}function cS(i,e){let a=i;return i==="_index_"?a=e:i==="_value_"&&(a=e==="x"?"y":"x"),a}function uS(i,e){return i===e?"_index_":"_value_"}function mp(i){if(i==="x"||i==="y"||i==="r")return i}function fS(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Fu(i,...e){if(mp(i))return i;for(const a of e){const s=a.axis||fS(a.position)||i.length>1&&mp(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function pp(i,e,a){if(a[e+"AxisID"]===i)return{axis:e}}function hS(i,e){if(e.data&&e.data.datasets){const a=e.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(a.length)return pp(i,"x",a[0])||pp(i,"y",a[0])}return{}}function dS(i,e){const a=Ui[i.type]||{scales:{}},s=e.scales||{},o=Ku(i.type,e),c=Object.create(null);return Object.keys(s).forEach(u=>{const f=s[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=Fu(u,f,hS(u,i),Gt.scales[f.type]),m=uS(d,o),p=a.scales||{};c[u]=Bs(Object.create(null),[{axis:d},f,p[d],p[m]])}),i.data.datasets.forEach(u=>{const f=u.type||i.type,d=u.indexAxis||Ku(f,e),p=(Ui[f]||{}).scales||{};Object.keys(p).forEach(b=>{const _=cS(b,d),x=u[_+"AxisID"]||_;c[x]=c[x]||Object.create(null),Bs(c[x],[{axis:_},s[x],p[b]])})}),Object.keys(c).forEach(u=>{const f=c[u];Bs(f,[Gt.scales[f.type],Gt.scale])}),c}function H0(i){const e=i.options||(i.options={});e.plugins=ht(e.plugins,{}),e.scales=dS(i,e)}function B0(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function gS(i){return i=i||{},i.data=B0(i.data),H0(i),i}const yp=new Map,U0=new Set;function Ao(i,e){let a=yp.get(i);return a||(a=e(),yp.set(i,a),U0.add(a)),a}const Ns=(i,e,a)=>{const s=Bi(e,a);s!==void 0&&i.add(s)};class mS{constructor(e){this._config=gS(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=B0(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(),H0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ao(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,a){return Ao(`${e}.transition.${a}`,()=>[[`datasets.${e}.transitions.${a}`,`transitions.${a}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,a){return Ao(`${e}-${a}`,()=>[[`datasets.${e}.elements.${a}`,`datasets.${e}`,`elements.${a}`,""]])}pluginScopeKeys(e){const a=e.id,s=this.type;return Ao(`${s}-plugin-${a}`,()=>[[`plugins.${a}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,a){const s=this._scopeCache;let o=s.get(e);return(!o||a)&&(o=new Map,s.set(e,o)),o}getOptionScopes(e,a,s){const{options:o,type:c}=this,u=this._cachedScopes(e,s),f=u.get(a);if(f)return f;const d=new Set;a.forEach(p=>{e&&(d.add(e),p.forEach(b=>Ns(d,e,b))),p.forEach(b=>Ns(d,o,b)),p.forEach(b=>Ns(d,Ui[c]||{},b)),p.forEach(b=>Ns(d,Gt,b)),p.forEach(b=>Ns(d,Qu,b))});const m=Array.from(d);return m.length===0&&m.push(Object.create(null)),U0.has(a)&&u.set(a,m),m}chartOptionScopes(){const{options:e,type:a}=this;return[e,Ui[a]||{},Gt.datasets[a]||{},{type:a},Gt,Qu]}resolveNamedOptions(e,a,s,o=[""]){const c={$shared:!0},{resolver:u,subPrefixes:f}=bp(this._resolverCache,e,o);let d=u;if(yS(u,a)){c.$shared=!1,s=hi(s)?s():s;const m=this.createResolver(e,s,f);d=Ra(u,s,m)}for(const m of a)c[m]=d[m];return c}createResolver(e,a,s=[""],o){const{resolver:c}=bp(this._resolverCache,e,s);return pt(a)?Ra(c,a,void 0,o):c}}function bp(i,e,a){let s=i.get(e);s||(s=new Map,i.set(e,s));const o=a.join();let c=s.get(o);return c||(c={resolver:cf(e,a),subPrefixes:a.filter(f=>!f.toLowerCase().includes("hover"))},s.set(o,c)),c}const pS=i=>pt(i)&&Object.getOwnPropertyNames(i).some(e=>hi(i[e]));function yS(i,e){const{isScriptable:a,isIndexable:s}=b0(i);for(const o of e){const c=a(o),u=s(o),f=(u||c)&&i[o];if(c&&(hi(f)||pS(f))||u&&Ft(f))return!0}return!1}var bS="4.5.1";const vS=["top","bottom","left","right","chartArea"];function vp(i,e){return i==="top"||i==="bottom"||vS.indexOf(i)===-1&&e==="x"}function _p(i,e){return function(a,s){return a[i]===s[i]?a[e]-s[e]:a[i]-s[i]}}function xp(i){const e=i.chart,a=e.options.animation;e.notifyPlugins("afterRender"),jt(a&&a.onComplete,[i],e)}function _S(i){const e=i.chart,a=e.options.animation;jt(a&&a.onProgress,[i],e)}function V0(i){return hf()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ko={},Sp=i=>{const e=V0(i);return Object.values(ko).filter(a=>a.canvas===e).pop()};function xS(i,e,a){const s=Object.keys(i);for(const o of s){const c=+o;if(c>=e){const u=i[o];delete i[o],(a>0||c>e)&&(i[c+a]=u)}}}function SS(i,e,a,s){return!a||i.type==="mouseout"?null:s?e:i}let Fo=class{static defaults=Gt;static instances=ko;static overrides=Ui;static registry=sn;static version=bS;static getChart=Sp;static register(...e){sn.add(...e),Tp()}static unregister(...e){sn.remove(...e),Tp()}constructor(e,a){const s=this.config=new mS(a),o=V0(e),c=Sp(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=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||V1(o)),this.platform.updateConfig(s);const f=this.platform.acquireContext(o,u.aspectRatio),d=f&&f.canvas,m=d&&d.height,p=d&&d.width;if(this.id=v_(),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 aS,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=B_(b=>this.update(b),u.resizeDelay||0),this._dataChanges=[],ko[this.id]=this,!f||!d){console.error("Failed to create chart: can't acquire context from the given item");return}Dn.listen(this,"complete",xp),Dn.listen(this,"progress",_S),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:a},width:s,height:o,_aspectRatio:c}=this;return Tt(e)?a&&c?c:o?s/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 sn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qm(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return qm(this.canvas,this.ctx),this}stop(){return Dn.stop(this),this}resize(e,a){Dn.running(this)?this._resizeBeforeDraw={width:e,height:a}:this._resize(e,a)}_resize(e,a){const s=this.options,o=this.canvas,c=s.maintainAspectRatio&&this.aspectRatio,u=this.platform.getMaximumSize(o,e,a,c),f=s.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=u.width,this.height=u.height,this._aspectRatio=this.aspectRatio,Qm(this,f,!0)&&(this.notifyPlugins("resize",{size:u}),jt(s.onResize,[this,u],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const a=this.options.scales||{};At(a,(s,o)=>{s.id=o})}buildOrUpdateScales(){const e=this.options,a=e.scales,s=this.scales,o=Object.keys(s).reduce((u,f)=>(u[f]=!1,u),{});let c=[];a&&(c=c.concat(Object.keys(a).map(u=>{const f=a[u],d=Fu(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=Fu(d,f),p=ht(f.type,u.dtype);(f.position===void 0||vp(f.position,m)!==vp(u.dposition))&&(f.position=u.dposition),o[d]=!0;let b=null;if(d in s&&s[d].type===p)b=s[d];else{const _=sn.getScale(p);b=new _({id:d,type:p,ctx:this.ctx,chart:this}),s[b.id]=b}b.init(f,e)}),At(o,(u,f)=>{u||delete s[f]}),At(s,u=>{Fe.configure(this,u,u.options),Fe.addBox(this,u)})}_updateMetasets(){const e=this._metasets,a=this.data.datasets.length,s=e.length;if(e.sort((o,c)=>o.index-c.index),s>a){for(let o=a;o<s;++o)this._destroyDatasetMeta(o);e.splice(a,s-a)}this._sortedMetasets=e.slice(0).sort(_p("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:a}}=this;e.length>a.length&&delete this._stacks,e.forEach((s,o)=>{a.filter(c=>c===s._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const e=[],a=this.data.datasets;let s,o;for(this._removeUnreferencedMetasets(),s=0,o=a.length;s<o;s++){const c=a[s];let u=this.getDatasetMeta(s);const f=c.type||this.config.type;if(u.type&&u.type!==f&&(this._destroyDatasetMeta(s),u=this.getDatasetMeta(s)),u.type=f,u.indexAxis=c.indexAxis||Ku(f,this.options),u.order=c.order||0,u.index=s,u.label=""+c.label,u.visible=this.isDatasetVisible(s),u.controller)u.controller.updateIndex(s),u.controller.linkScales();else{const d=sn.getController(f),{datasetElementType:m,dataElementType:p}=Gt.datasets[f];Object.assign(d,{dataElementType:sn.getElement(p),datasetElementType:m&&sn.getElement(m)}),u.controller=new d(this,s),e.push(u.controller)}}return this._updateMetasets(),e}_resetElements(){At(this.data.datasets,(e,a)=>{this.getDatasetMeta(a).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const a=this.config;a.update();const s=this._options=a.createResolver(a.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!s.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),_=!o&&c.indexOf(b)===-1;b.buildOrUpdateElements(_),u=Math.max(+b.getMaxOverflow(),u)}u=this._minPadding=s.layout.autoPadding?u:0,this._updateLayout(u),o||At(c,m=>{m.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(_p("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=>{Fe.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,a=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!wm(a,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,a=this._getUniformDataChanges()||[];for(const{method:s,start:o,count:c}of a){const u=s==="_removeElements"?-c:c;xS(e,o,u)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const a=this.data.datasets.length,s=c=>new Set(e.filter(u=>u[0]===c).map((u,f)=>f+","+u.splice(1).join(","))),o=s(0);for(let c=1;c<a;c++)if(!wm(o,s(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;Fe.update(this,this.width,this.height,e);const a=this.chartArea,s=a.width<=0||a.height<=0;this._layers=[],At(this.boxes,o=>{s&&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 a=0,s=this.data.datasets.length;a<s;++a)this.getDatasetMeta(a).controller.configure();for(let a=0,s=this.data.datasets.length;a<s;++a)this._updateDataset(a,hi(e)?e({datasetIndex:a}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,a){const s=this.getDatasetMeta(e),o={meta:s,index:e,mode:a,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(s.controller._update(a),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Dn.has(this)?this.attached&&!Dn.running(this)&&Dn.start(this):(this.draw(),xp({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:s,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const a=this._layers;for(e=0;e<a.length&&a[e].z<=0;++e)a[e].draw(this.chartArea);for(this._drawDatasets();e<a.length;++e)a[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const a=this._sortedMetasets,s=[];let o,c;for(o=0,c=a.length;o<c;++o){const u=a[o];(!e||u.visible)&&s.push(u)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let a=e.length-1;a>=0;--a)this._drawDataset(e[a]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const a=this.ctx,s={meta:e,index:e.index,cancelable:!0},o=D0(this,e);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(o&&Go(a,o),e.controller.draw(),o&&Qo(a),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Ks(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,a,s,o){const c=v1.modes[a];return typeof c=="function"?c(this,e,s,o):[]}getDatasetMeta(e){const a=this.data.datasets[e],s=this._metasets;let o=s.filter(c=>c&&c._dataset===a).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a&&a.order||0,index:e,_dataset:a,_parsed:[],_sorted:!1},s.push(o)),o}getContext(){return this.$context||(this.$context=Vi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const a=this.data.datasets[e];if(!a)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!a.hidden}setDatasetVisibility(e,a){const s=this.getDatasetMeta(e);s.hidden=!a}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,a,s){const o=s?"show":"hide",c=this.getDatasetMeta(e),u=c.controller._resolveAnimations(void 0,o);Qs(a)?(c.data[a].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),u.update(c,{visible:s}),this.update(f=>f.datasetIndex===e?o:void 0))}hide(e,a){this._updateVisibility(e,a,!1)}show(e,a){this._updateVisibility(e,a,!0)}_destroyDatasetMeta(e){const a=this._metasets[e];a&&a.controller&&a.controller._destroy(),delete this._metasets[e]}_stop(){let e,a;for(this.stop(),Dn.remove(this),e=0,a=this.data.datasets.length;e<a;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:a}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),qm(e,a),this.platform.releaseContext(a),this.canvas=null,this.ctx=null),delete ko[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,a=this.platform,s=(c,u)=>{a.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=>s(c,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,a=this.platform,s=(d,m)=>{a.addEventListener(this,d,m),e[d]=m},o=(d,m)=>{e[d]&&(a.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(),s("resize",c),s("detach",u)};u=()=>{this.attached=!1,o("resize",c),this._stop(),this._resize(0,0),s("attach",f)},a.isAttached(this.canvas)?f():u()}unbindEvents(){At(this._listeners,(e,a)=>{this.platform.removeEventListener(this,a,e)}),this._listeners={},At(this._responsiveListeners,(e,a)=>{this.platform.removeEventListener(this,a,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,a,s){const o=s?"set":"remove";let c,u,f,d;for(a==="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 a=this._active||[],s=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}});!Lo(s,a)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,a))}notifyPlugins(e,a,s){return this._plugins.notify(this,e,a,s)}isPluginEnabled(e){return this._plugins._cache.filter(a=>a.plugin.id===e).length===1}_updateHoverStyles(e,a,s){const o=this.options.hover,c=(d,m)=>d.filter(p=>!m.some(b=>p.datasetIndex===b.datasetIndex&&p.index===b.index)),u=c(a,e),f=s?e:c(e,a);u.length&&this.updateHoverStyle(u,o.mode,!1),f.length&&o.mode&&this.updateHoverStyle(f,o.mode,!0)}_eventHandler(e,a){const s={event:e,replay:a,cancelable:!0,inChartArea:this.isPointInArea(e)},o=u=>(u.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,o)===!1)return;const c=this._handleEvent(e,a,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,o),(c||s.changed)&&this.render(),this}_handleEvent(e,a,s){const{_active:o=[],options:c}=this,u=a,f=this._getActiveElements(e,o,s,u),d=E_(e),m=SS(e,this._lastEvent,s,d);s&&(this._lastEvent=null,jt(c.onHover,[e,f,this],this),d&&jt(c.onClick,[e,f,this],this));const p=!Lo(f,o);return(p||a)&&(this._active=f,this._updateHoverStyles(f,o,a)),this._lastEvent=m,p}_getActiveElements(e,a,s,o){if(e.type==="mouseout")return[];if(!s)return a;const c=this.options.hover;return this.getElementsAtEventForMode(e,c.mode,c,o)}};function Tp(){return At(Fo.instances,i=>i._plugins.invalidate())}function TS(i,e,a){const{startAngle:s,x:o,y:c,outerRadius:u,innerRadius:f,options:d}=e,{borderWidth:m,borderJoinStyle:p}=d,b=Math.min(m/u,ke(s-a));if(i.beginPath(),i.arc(o,c,u-m/2,s+b/2,a-b/2),f>0){const _=Math.min(m/f,ke(s-a));i.arc(o,c,f+m/2,a-_/2,s+_/2,!0)}else{const _=Math.min(m/2,u*ke(s-a));if(p==="round")i.arc(o,c,_,a-Ct/2,s+Ct/2,!0);else if(p==="bevel"){const x=2*_*_,T=-x*Math.cos(a+Ct/2)+o,M=-x*Math.sin(a+Ct/2)+c,A=x*Math.cos(s+Ct/2)+o,z=x*Math.sin(s+Ct/2)+c;i.lineTo(T,M),i.lineTo(A,z)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function MS(i,e,a){const{startAngle:s,pixelMargin:o,x:c,y:u,outerRadius:f,innerRadius:d}=e;let m=o/f;i.beginPath(),i.arc(c,u,f,s-m,a+m),d>o?(m=o/d,i.arc(c,u,d,a+m,s-m,!0)):i.arc(c,u,o,a+te,s-te),i.closePath(),i.clip()}function ES(i){return rf(i,["outerStart","outerEnd","innerStart","innerEnd"])}function AS(i,e,a,s){const o=ES(i.options.borderRadius),c=(a-e)/2,u=Math.min(c,s*e/2),f=d=>{const m=(a-Math.min(c,d))*s/2;return Me(d,0,Math.min(c,m))};return{outerStart:f(o.outerStart),outerEnd:f(o.outerEnd),innerStart:Me(o.innerStart,0,u),innerEnd:Me(o.innerEnd,0,u)}}function Oa(i,e,a,s){return{x:a+i*Math.cos(e),y:s+i*Math.sin(e)}}function Xo(i,e,a,s,o,c){const{x:u,y:f,startAngle:d,pixelMargin:m,innerRadius:p}=e,b=Math.max(e.outerRadius+s+a-m,0),_=p>0?p+s+a+m:0;let x=0;const T=o-d;if(s){const dt=p>0?p-s:0,j=b>0?b-s:0,X=(dt+j)/2,P=X!==0?T*X/(X+s):T;x=(T-P)/2}const M=Math.max(.001,T*b-a/Ct)/b,A=(T-M)/2,z=d+A+x,H=o-A-x,{outerStart:Y,outerEnd:G,innerStart:q,innerEnd:K}=AS(e,_,b,H-z),Q=b-Y,F=b-G,tt=z+Y/Q,ct=H-G/F,at=_+q,it=_+K,kt=z+q/at,Vt=H-K/it;if(i.beginPath(),c){const dt=(tt+ct)/2;if(i.arc(u,f,b,tt,dt),i.arc(u,f,b,dt,ct),G>0){const lt=Oa(F,ct,u,f);i.arc(lt.x,lt.y,G,ct,H+te)}const j=Oa(it,H,u,f);if(i.lineTo(j.x,j.y),K>0){const lt=Oa(it,Vt,u,f);i.arc(lt.x,lt.y,K,H+te,Vt+Math.PI)}const X=(H-K/_+(z+q/_))/2;if(i.arc(u,f,_,H-K/_,X,!0),i.arc(u,f,_,X,z+q/_,!0),q>0){const lt=Oa(at,kt,u,f);i.arc(lt.x,lt.y,q,kt+Math.PI,z-te)}const P=Oa(Q,z,u,f);if(i.lineTo(P.x,P.y),Y>0){const lt=Oa(Q,tt,u,f);i.arc(lt.x,lt.y,Y,z-te,tt)}}else{i.moveTo(u,f);const dt=Math.cos(tt)*b+u,j=Math.sin(tt)*b+f;i.lineTo(dt,j);const X=Math.cos(ct)*b+u,P=Math.sin(ct)*b+f;i.lineTo(X,P)}i.closePath()}function OS(i,e,a,s,o){const{fullCircles:c,startAngle:u,circumference:f}=e;let d=e.endAngle;if(c){Xo(i,e,a,s,d,o);for(let m=0;m<c;++m)i.fill();isNaN(f)||(d=u+(f%Yt||Yt))}return Xo(i,e,a,s,d,o),i.fill(),d}function DS(i,e,a,s,o){const{fullCircles:c,startAngle:u,circumference:f,options:d}=e,{borderWidth:m,borderJoinStyle:p,borderDash:b,borderDashOffset:_,borderRadius:x}=d,T=d.borderAlign==="inner";if(!m)return;i.setLineDash(b||[]),i.lineDashOffset=_,T?(i.lineWidth=m*2,i.lineJoin=p||"round"):(i.lineWidth=m,i.lineJoin=p||"bevel");let M=e.endAngle;if(c){Xo(i,e,a,s,M,o);for(let A=0;A<c;++A)i.stroke();isNaN(f)||(M=u+(f%Yt||Yt))}T&&MS(i,e,M),d.selfJoin&&M-u>=Ct&&x===0&&p!=="miter"&&TS(i,e,M),c||(Xo(i,e,a,s,M,o),i.stroke())}class Y0 extends jn{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,a,s){const o=this.getProps(["x","y"],s),{angle:c,distance:u}=u0(o,{x:e,y:a}),{startAngle:f,endAngle:d,innerRadius:m,outerRadius:p,circumference:b}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),_=(this.options.spacing+this.options.borderWidth)/2,x=ht(b,d-f),T=Zs(c,f,d)&&f!==d,M=x>=Yt||T,A=wn(u,m+_,p+_);return M&&A}getCenterPoint(e){const{x:a,y:s,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:a+Math.cos(p)*b,y:s+Math.sin(p)*b}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:a,circumference:s}=this,o=(a.offset||0)/4,c=(a.spacing||0)/2,u=a.circular;if(this.pixelMargin=a.borderAlign==="inner"?.33:0,this.fullCircles=s>Yt?Math.floor(s/Yt):0,s===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(Ct,s||0)),m=o*d;e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,OS(e,this,m,c,u),DS(e,this,m,c,u),e.restore()}}function q0(i,e,a=e){i.lineCap=ht(a.borderCapStyle,e.borderCapStyle),i.setLineDash(ht(a.borderDash,e.borderDash)),i.lineDashOffset=ht(a.borderDashOffset,e.borderDashOffset),i.lineJoin=ht(a.borderJoinStyle,e.borderJoinStyle),i.lineWidth=ht(a.borderWidth,e.borderWidth),i.strokeStyle=ht(a.borderColor,e.borderColor)}function CS(i,e,a){i.lineTo(a.x,a.y)}function zS(i){return i.stepped?J_:i.tension||i.cubicInterpolationMode==="monotone"?I_:CS}function X0(i,e,a={}){const s=i.length,{start:o=0,end:c=s-1}=a,{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:s,start:d,loop:e.loop,ilen:m<d&&!p?s+m-d:m-d}}function RS(i,e,a,s){const{points:o,options:c}=e,{count:u,start:f,loop:d,ilen:m}=X0(o,a,s),p=zS(c);let{move:b=!0,reverse:_}=s||{},x,T,M;for(x=0;x<=m;++x)T=o[(f+(_?m-x:x))%u],!T.skip&&(b?(i.moveTo(T.x,T.y),b=!1):p(i,M,T,_,c.stepped),M=T);return d&&(T=o[(f+(_?m:0))%u],p(i,M,T,_,c.stepped)),!!d}function wS(i,e,a,s){const o=e.points,{count:c,start:u,ilen:f}=X0(o,a,s),{move:d=!0,reverse:m}=s||{};let p=0,b=0,_,x,T,M,A,z;const H=G=>(u+(m?f-G:G))%c,Y=()=>{M!==A&&(i.lineTo(p,A),i.lineTo(p,M),i.lineTo(p,z))};for(d&&(x=o[H(0)],i.moveTo(x.x,x.y)),_=0;_<=f;++_){if(x=o[H(_)],x.skip)continue;const G=x.x,q=x.y,K=G|0;K===T?(q<M?M=q:q>A&&(A=q),p=(b*p+G)/++b):(Y(),i.lineTo(G,q),T=K,b=0,M=A=q),z=q}Y()}function Wu(i){const e=i.options,a=e.borderDash&&e.borderDash.length;return!i._decimated&&!i._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!a?wS:RS}function NS(i){return i.stepped?Cx:i.tension||i.cubicInterpolationMode==="monotone"?zx:Li}function jS(i,e,a,s){let o=e._path;o||(o=e._path=new Path2D,e.path(o,a,s)&&o.closePath()),q0(i,e.options),i.stroke(o)}function kS(i,e,a,s){const{segments:o,options:c}=e,u=Wu(e);for(const f of o)q0(i,c,f.style),i.beginPath(),u(i,e,f,{start:a,end:a+s-1})&&i.closePath(),i.stroke()}const LS=typeof Path2D=="function";function HS(i,e,a,s){LS&&!e.options.segment?jS(i,e,a,s):kS(i,e,a,s)}class Wo extends jn{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,a){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const o=s.spanGaps?this._loop:this._fullLoop;xx(this._points,s,e,o,a),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=Lx(this,this.options.segment))}first(){const e=this.segments,a=this.points;return e.length&&a[e[0].start]}last(){const e=this.segments,a=this.points,s=e.length;return s&&a[e[s-1].end]}interpolate(e,a){const s=this.options,o=e[a],c=this.points,u=O0(this,{property:a,start:o,end:o});if(!u.length)return;const f=[],d=NS(s);let m,p;for(m=0,p=u.length;m<p;++m){const{start:b,end:_}=u[m],x=c[b],T=c[_];if(x===T){f.push(x);continue}const M=Math.abs((o-x[a])/(T[a]-x[a])),A=d(x,T,M,s.stepped);A[a]=e[a],f.push(A)}return f.length===1?f[0]:f}pathSegment(e,a,s){return Wu(this)(e,this,a,s)}path(e,a,s){const o=this.segments,c=Wu(this);let u=this._loop;a=a||0,s=s||this.points.length-a;for(const f of o)u&=c(e,this,f,{start:a,end:a+s-1});return!!u}draw(e,a,s,o){const c=this.options||{};(this.points||[]).length&&c.borderWidth&&(e.save(),HS(e,this,s,o),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Mp(i,e,a,s){const o=i.options,{[a]:c}=i.getProps([a],s);return Math.abs(e-c)<o.radius+o.hitRadius}class G0 extends jn{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,a,s){const o=this.options,{x:c,y:u}=this.getProps(["x","y"],s);return Math.pow(e-c,2)+Math.pow(a-u,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,a){return Mp(this,e,"x",a)}inYRange(e,a){return Mp(this,e,"y",a)}getCenterPoint(e){const{x:a,y:s}=this.getProps(["x","y"],e);return{x:a,y:s}}size(e){e=e||this.options||{};let a=e.radius||0;a=Math.max(a,a&&e.hoverRadius||0);const s=a&&e.borderWidth||0;return(a+s)*2}draw(e,a){const s=this.options;this.skip||s.radius<.1||!Ks(this,a,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Zu(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function Q0(i,e){const{x:a,y:s,base:o,width:c,height:u}=i.getProps(["x","y","base","width","height"],e);let f,d,m,p,b;return i.horizontal?(b=u/2,f=Math.min(a,o),d=Math.max(a,o),m=s-b,p=s+b):(b=c/2,f=a-b,d=a+b,m=Math.min(s,o),p=Math.max(s,o)),{left:f,top:m,right:d,bottom:p}}function ri(i,e,a,s){return i?0:Me(e,a,s)}function BS(i,e,a){const s=i.options.borderWidth,o=i.borderSkipped,c=y0(s);return{t:ri(o.top,c.top,0,a),r:ri(o.right,c.right,0,e),b:ri(o.bottom,c.bottom,0,a),l:ri(o.left,c.left,0,e)}}function US(i,e,a){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),o=i.options.borderRadius,c=Da(o),u=Math.min(e,a),f=i.borderSkipped,d=s||pt(o);return{topLeft:ri(!d||f.top||f.left,c.topLeft,0,u),topRight:ri(!d||f.top||f.right,c.topRight,0,u),bottomLeft:ri(!d||f.bottom||f.left,c.bottomLeft,0,u),bottomRight:ri(!d||f.bottom||f.right,c.bottomRight,0,u)}}function VS(i){const e=Q0(i),a=e.right-e.left,s=e.bottom-e.top,o=BS(i,a/2,s/2),c=US(i,a/2,s/2);return{outer:{x:e.left,y:e.top,w:a,h:s,radius:c},inner:{x:e.left+o.l,y:e.top+o.t,w:a-o.l-o.r,h:s-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 wu(i,e,a,s){const o=e===null,c=a===null,f=i&&!(o&&c)&&Q0(i,s);return f&&(o||wn(e,f.left,f.right))&&(c||wn(a,f.top,f.bottom))}function YS(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function qS(i,e){i.rect(e.x,e.y,e.w,e.h)}function Nu(i,e,a={}){const s=i.x!==a.x?-e:0,o=i.y!==a.y?-e:0,c=(i.x+i.w!==a.x+a.w?e:0)-s,u=(i.y+i.h!==a.y+a.h?e:0)-o;return{x:i.x+s,y:i.y+o,w:i.w+c,h:i.h+u,radius:i.radius}}class Z0 extends jn{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:a,options:{borderColor:s,backgroundColor:o}}=this,{inner:c,outer:u}=VS(this),f=YS(u.radius)?Vo:qS;e.save(),(u.w!==c.w||u.h!==c.h)&&(e.beginPath(),f(e,Nu(u,a,c)),e.clip(),f(e,Nu(c,-a,u)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),f(e,Nu(c,a)),e.fillStyle=o,e.fill(),e.restore()}inRange(e,a,s){return wu(this,e,a,s)}inXRange(e,a){return wu(this,e,null,a)}inYRange(e,a){return wu(this,null,e,a)}getCenterPoint(e){const{x:a,y:s,base:o,horizontal:c}=this.getProps(["x","y","base","horizontal"],e);return{x:c?(a+o)/2:a,y:c?s:(s+o)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}function XS(i,e,a){const s=i.segments,o=i.points,c=e.points,u=[];for(const f of s){let{start:d,end:m}=f;m=Jo(d,m,o);const p=Ju(a,o[d],o[m],f.loop);if(!e.segments){u.push({source:f,target:p,start:o[d],end:o[m]});continue}const b=O0(e,p);for(const _ of b){const x=Ju(a,c[_.start],c[_.end],_.loop),T=A0(f,o,x);for(const M of T)u.push({source:M,target:_,start:{[a]:Ep(p,x,"start",Math.max)},end:{[a]:Ep(p,x,"end",Math.min)}})}}return u}function Ju(i,e,a,s){if(s)return;let o=e[i],c=a[i];return i==="angle"&&(o=ke(o),c=ke(c)),{property:i,start:o,end:c}}function GS(i,e){const{x:a=null,y:s=null}=i||{},o=e.points,c=[];return e.segments.forEach(({start:u,end:f})=>{f=Jo(u,f,o);const d=o[u],m=o[f];s!==null?(c.push({x:d.x,y:s}),c.push({x:m.x,y:s})):a!==null&&(c.push({x:a,y:d.y}),c.push({x:a,y:m.y}))}),c}function Jo(i,e,a){for(;e>i;e--){const s=a[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}function Ep(i,e,a,s){return i&&e?s(i[a],e[a]):i?i[a]:e?e[a]:0}function K0(i,e){let a=[],s=!1;return Ft(i)?(s=!0,a=i):a=GS(i,e),a.length?new Wo({points:a,options:{tension:0},_loop:s,_fullLoop:s}):null}function Ap(i){return i&&i.fill!==!1}function QS(i,e,a){let o=i[e].fill;const c=[e];let u;if(!a)return o;for(;o!==!1&&c.indexOf(o)===-1;){if(!fe(o))return o;if(u=i[o],!u)return!1;if(u.visible)return o;c.push(o),o=u.fill}return!1}function ZS(i,e,a){const s=JS(i);if(pt(s))return isNaN(s.value)?!1:s;let o=parseFloat(s);return fe(o)&&Math.floor(o)===o?KS(s[0],e,o,a):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function KS(i,e,a,s){return(i==="-"||i==="+")&&(a=e+a),a===e||a<0||a>=s?!1:a}function FS(i,e){let a=null;return i==="start"?a=e.bottom:i==="end"?a=e.top:pt(i)?a=e.getPixelForValue(i.value):e.getBasePixel&&(a=e.getBasePixel()),a}function WS(i,e,a){let s;return i==="start"?s=a:i==="end"?s=e.options.reverse?e.min:e.max:pt(i)?s=i.value:s=e.getBaseValue(),s}function JS(i){const e=i.options,a=e.fill;let s=ht(a&&a.target,a);return s===void 0&&(s=!!e.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function IS(i){const{scale:e,index:a,line:s}=i,o=[],c=s.segments,u=s.points,f=$S(e,a);f.push(K0({x:null,y:e.bottom},s));for(let d=0;d<c.length;d++){const m=c[d];for(let p=m.start;p<=m.end;p++)PS(o,u[p],f)}return new Wo({points:o,options:{}})}function $S(i,e){const a=[],s=i.getMatchingVisibleMetas("line");for(let o=0;o<s.length;o++){const c=s[o];if(c.index===e)break;c.hidden||a.unshift(c.dataset)}return a}function PS(i,e,a){const s=[];for(let o=0;o<a.length;o++){const c=a[o],{first:u,last:f,point:d}=t2(c,e,"x");if(!(!d||u&&f)){if(u)s.unshift(d);else if(i.push(d),!f)break}}i.push(...s)}function t2(i,e,a){const s=i.interpolate(e,a);if(!s)return{};const o=s[a],c=i.segments,u=i.points;let f=!1,d=!1;for(let m=0;m<c.length;m++){const p=c[m],b=u[p.start][a],_=u[p.end][a];if(wn(o,b,_)){f=o===b,d=o===_;break}}return{first:f,last:d,point:s}}class F0{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,a,s){const{x:o,y:c,radius:u}=this;return a=a||{start:0,end:Yt},e.arc(o,c,u,a.end,a.start,!0),!s.bounds}interpolate(e){const{x:a,y:s,radius:o}=this,c=e.angle;return{x:a+Math.cos(c)*o,y:s+Math.sin(c)*o,angle:c}}}function e2(i){const{chart:e,fill:a,line:s}=i;if(fe(a))return n2(e,a);if(a==="stack")return IS(i);if(a==="shape")return!0;const o=i2(i);return o instanceof F0?o:K0(o,s)}function n2(i,e){const a=i.getDatasetMeta(e);return a&&i.isDatasetVisible(e)?a.dataset:null}function i2(i){return(i.scale||{}).getPointPositionForValue?s2(i):a2(i)}function a2(i){const{scale:e={},fill:a}=i,s=FS(a,e);if(fe(s)){const o=e.isHorizontal();return{x:o?s:null,y:o?null:s}}return null}function s2(i){const{scale:e,fill:a}=i,s=e.options,o=e.getLabels().length,c=s.reverse?e.max:e.min,u=WS(a,e,c),f=[];if(s.grid.circular){const d=e.getPointPositionForValue(0,c);return new F0({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 ju(i,e,a){const s=e2(e),{chart:o,index:c,line:u,scale:f,axis:d}=e,m=u.options,p=m.fill,b=m.backgroundColor,{above:_=b,below:x=b}=p||{},T=o.getDatasetMeta(c),M=D0(o,T);s&&u.points.length&&(Go(i,a),l2(i,{line:u,target:s,above:_,below:x,area:a,scale:f,axis:d,clip:M}),Qo(i))}function l2(i,e){const{line:a,target:s,above:o,below:c,area:u,scale:f,clip:d}=e,m=a._loop?"angle":e.axis;i.save();let p=c;c!==o&&(m==="x"?(Op(i,s,u.top),ku(i,{line:a,target:s,color:o,scale:f,property:m,clip:d}),i.restore(),i.save(),Op(i,s,u.bottom)):m==="y"&&(Dp(i,s,u.left),ku(i,{line:a,target:s,color:c,scale:f,property:m,clip:d}),i.restore(),i.save(),Dp(i,s,u.right),p=o)),ku(i,{line:a,target:s,color:p,scale:f,property:m,clip:d}),i.restore()}function Op(i,e,a){const{segments:s,points:o}=e;let c=!0,u=!1;i.beginPath();for(const f of s){const{start:d,end:m}=f,p=o[d],b=o[Jo(d,m,o)];c?(i.moveTo(p.x,p.y),c=!1):(i.lineTo(p.x,a),i.lineTo(p.x,p.y)),u=!!e.pathSegment(i,f,{move:u}),u?i.closePath():i.lineTo(b.x,a)}i.lineTo(e.first().x,a),i.closePath(),i.clip()}function Dp(i,e,a){const{segments:s,points:o}=e;let c=!0,u=!1;i.beginPath();for(const f of s){const{start:d,end:m}=f,p=o[d],b=o[Jo(d,m,o)];c?(i.moveTo(p.x,p.y),c=!1):(i.lineTo(a,p.y),i.lineTo(p.x,p.y)),u=!!e.pathSegment(i,f,{move:u}),u?i.closePath():i.lineTo(a,b.y)}i.lineTo(a,e.first().y),i.closePath(),i.clip()}function ku(i,e){const{line:a,target:s,property:o,color:c,scale:u,clip:f}=e,d=XS(a,s,o);for(const{source:m,target:p,start:b,end:_}of d){const{style:{backgroundColor:x=c}={}}=m,T=s!==!0;i.save(),i.fillStyle=x,o2(i,u,f,T&&Ju(o,b,_)),i.beginPath();const M=!!a.pathSegment(i,m);let A;if(T){M?i.closePath():Cp(i,s,_,o);const z=!!s.pathSegment(i,p,{move:M,reverse:!0});A=M&&z,A||Cp(i,s,b,o)}i.closePath(),i.fill(A?"evenodd":"nonzero"),i.restore()}}function o2(i,e,a,s){const o=e.chart.chartArea,{property:c,start:u,end:f}=s||{};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),i.beginPath(),a&&(d=Math.max(d,a.left),p=Math.min(p,a.right),m=Math.max(m,a.top),b=Math.min(b,a.bottom)),i.rect(d,m,p-d,b-m),i.clip()}}function Cp(i,e,a,s){const o=e.interpolate(a,s);o&&i.lineTo(o.x,o.y)}var r2={id:"filler",afterDatasetsUpdate(i,e,a){const s=(i.data.datasets||[]).length,o=[];let c,u,f,d;for(u=0;u<s;++u)c=i.getDatasetMeta(u),f=c.dataset,d=null,f&&f.options&&f instanceof Wo&&(d={visible:i.isDatasetVisible(u),index:u,fill:ZS(f,u,s),chart:i,axis:c.controller.options.indexAxis,scale:c.vScale,line:f}),c.$filler=d,o.push(d);for(u=0;u<s;++u)d=o[u],!(!d||d.fill===!1)&&(d.fill=QS(o,u,a.propagate))},beforeDraw(i,e,a){const s=a.drawTime==="beforeDraw",o=i.getSortedVisibleDatasetMetas(),c=i.chartArea;for(let u=o.length-1;u>=0;--u){const f=o[u].$filler;f&&(f.line.updateControlPoints(c,f.axis),s&&f.fill&&ju(i.ctx,f,c))}},beforeDatasetsDraw(i,e,a){if(a.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let o=s.length-1;o>=0;--o){const c=s[o].$filler;Ap(c)&&ju(i.ctx,c,i.chartArea)}},beforeDatasetDraw(i,e,a){const s=e.meta.$filler;!Ap(s)||a.drawTime!=="beforeDatasetDraw"||ju(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const zp=(i,e)=>{let{boxHeight:a=e,boxWidth:s=e}=i;return i.usePointStyle&&(a=Math.min(a,e),s=i.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:a,itemHeight:Math.max(e,a)}},c2=(i,e)=>i!==null&&e!==null&&i.datasetIndex===e.datasetIndex&&i.index===e.index;class Rp extends jn{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,a,s){this.maxWidth=e,this.maxHeight=a,this._margins=s,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 a=jt(e.generateLabels,[this.chart],this)||[];e.filter&&(a=a.filter(s=>e.filter(s,this.chart.data))),e.sort&&(a=a.sort((s,o)=>e.sort(s,o,this.chart.data))),this.options.reverse&&a.reverse(),this.legendItems=a}fit(){const{options:e,ctx:a}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,o=re(s.font),c=o.size,u=this._computeTitleHeight(),{boxWidth:f,itemHeight:d}=zp(s,c);let m,p;a.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,a,s,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 _=-1,x=-p;return this.legendItems.forEach((T,M)=>{const A=s+a/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,x+=p,_++),d[M]={left:0,top:x,row:_,width:A,height:o},m[m.length-1]+=A+f}),b}_fitCols(e,a,s,o){const{ctx:c,maxHeight:u,options:{labels:{padding:f}}}=this,d=this.legendHitBoxes=[],m=this.columnSizes=[],p=u-e;let b=f,_=0,x=0,T=0,M=0;return this.legendItems.forEach((A,z)=>{const{itemWidth:H,itemHeight:Y}=u2(s,a,c,A,o);z>0&&x+Y+2*f>p&&(b+=_+f,m.push({width:_,height:x}),T+=_+f,M++,_=x=0),d[z]={left:T,top:x,col:M,width:H,height:Y},_=Math.max(_,H),x+=Y+f}),b+=_,m.push({width:_,height:x}),b}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:a,options:{align:s,labels:{padding:o},rtl:c}}=this,u=Ca(c,this.left,this.width);if(this.isHorizontal()){let f=0,d=ue(s,this.left+o,this.right-this.lineWidths[f]);for(const m of a)f!==m.row&&(f=m.row,d=ue(s,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(s,this.top+e+o,this.bottom-this.columnSizes[f].height);for(const m of a)m.col!==f&&(f=m.col,d=ue(s,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;Go(e,this),this._draw(),Qo(e)}}_draw(){const{options:e,columnSizes:a,lineWidths:s,ctx:o}=this,{align:c,labels:u}=e,f=Gt.color,d=Ca(e.rtl,this.left,this.width),m=re(u.font),{padding:p}=u,b=m.size,_=b/2;let x;this.drawTitle(),o.textAlign=d.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=m.string;const{boxWidth:T,boxHeight:M,itemHeight:A}=zp(u,b),z=function(K,Q,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 ct={radius:M*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:tt},at=d.xPlus(K,T/2),it=Q+_;p0(o,ct,at,it,u.pointStyleWidth&&T)}else{const ct=Q+Math.max((b-M)/2,0),at=d.leftForLtr(K,T),it=Da(F.borderRadius);o.beginPath(),Object.values(it).some(kt=>kt!==0)?Vo(o,{x:at,y:ct,w:T,h:M,radius:it}):o.rect(at,ct,T,M),o.fill(),tt!==0&&o.stroke()}o.restore()},H=function(K,Q,F){Fs(o,F.text,K,Q+A/2,m,{strikethrough:F.hidden,textAlign:d.textAlign(F.textAlign)})},Y=this.isHorizontal(),G=this._computeTitleHeight();Y?x={x:ue(c,this.left+p,this.right-s[0]),y:this.top+p+G,line:0}:x={x:this.left+p,y:ue(c,this.top+G+p,this.bottom-a[0].height),line:0},T0(this.ctx,e.textDirection);const q=A+p;this.legendItems.forEach((K,Q)=>{o.strokeStyle=K.fontColor,o.fillStyle=K.fontColor;const F=o.measureText(K.text).width,tt=d.textAlign(K.textAlign||(K.textAlign=u.textAlign)),ct=T+_+F;let at=x.x,it=x.y;d.setWidth(this.width),Y?Q>0&&at+ct+p>this.right&&(it=x.y+=q,x.line++,at=x.x=ue(c,this.left+p,this.right-s[x.line])):Q>0&&it+q>this.bottom&&(at=x.x=at+a[x.line].width+p,x.line++,it=x.y=ue(c,this.top+G+p,this.bottom-a[x.line].height));const kt=d.x(at);if(z(kt,it,K),at=U_(tt,at+T+_,Y?at+ct:this.right,e.rtl),H(d.x(at),it,K),Y)x.x+=ct+p;else if(typeof K.text!="string"){const Vt=m.lineHeight;x.y+=W0(K,Vt)+p}else x.y+=q}),M0(this.ctx,e.textDirection)}drawTitle(){const e=this.options,a=e.title,s=re(a.font),o=Le(a.padding);if(!a.display)return;const c=Ca(e.rtl,this.left,this.width),u=this.ctx,f=a.position,d=s.size/2,m=o.top+d;let p,b=this.left,_=this.width;if(this.isHorizontal())_=Math.max(...this.lineWidths),p=this.top+m,b=ue(e.align,b,this.right-_);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 x=ue(f,b,b+_);u.textAlign=c.textAlign(sf(f)),u.textBaseline="middle",u.strokeStyle=a.color,u.fillStyle=a.color,u.font=s.string,Fs(u,a.text,x,p,s)}_computeTitleHeight(){const e=this.options.title,a=re(e.font),s=Le(e.padding);return e.display?a.lineHeight+s.height:0}_getLegendItemAt(e,a){let s,o,c;if(wn(e,this.left,this.right)&&wn(a,this.top,this.bottom)){for(c=this.legendHitBoxes,s=0;s<c.length;++s)if(o=c[s],wn(e,o.left,o.left+o.width)&&wn(a,o.top,o.top+o.height))return this.legendItems[s]}return null}handleEvent(e){const a=this.options;if(!d2(e.type,a))return;const s=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const o=this._hoveredItem,c=c2(o,s);o&&!c&&jt(a.onLeave,[e,o,this],this),this._hoveredItem=s,s&&!c&&jt(a.onHover,[e,s,this],this)}else s&&jt(a.onClick,[e,s,this],this)}}function u2(i,e,a,s,o){const c=f2(s,i,e,a),u=h2(o,s,e.lineHeight);return{itemWidth:c,itemHeight:u}}function f2(i,e,a,s){let o=i.text;return o&&typeof o!="string"&&(o=o.reduce((c,u)=>c.length>u.length?c:u)),e+a.size/2+s.measureText(o).width}function h2(i,e,a){let s=i;return typeof e.text!="string"&&(s=W0(e,a)),s}function W0(i,e){const a=i.text?i.text.length:0;return e*a}function d2(i,e){return!!((i==="mousemove"||i==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(i==="click"||i==="mouseup"))}var g2={id:"legend",_element:Rp,start(i,e,a){const s=i.legend=new Rp({ctx:i.ctx,options:a,chart:i});Fe.configure(i,s,a),Fe.addBox(i,s)},stop(i){Fe.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,e,a){const s=i.legend;Fe.configure(i,s,a),s.options=a},afterUpdate(i){const e=i.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(i,e){e.replay||i.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,e,a){const s=e.datasetIndex,o=a.chart;o.isDatasetVisible(s)?(o.hide(s),e.hidden=!0):(o.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const e=i.data.datasets,{labels:{usePointStyle:a,pointStyle:s,textAlign:o,color:c,useBorderRadius:u,borderRadius:f}}=i.legend.options;return i._getSortedDatasetMetas().map(d=>{const m=d.controller.getStyle(a?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:s||m.pointStyle,rotation:m.rotation,textAlign:o||m.textAlign,borderRadius:u&&(f||m.borderRadius),datasetIndex:d.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class J0 extends jn{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,a){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=a;const o=Ft(s.text)?s.text.length:1;this._padding=Le(s.padding);const c=o*re(s.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:a,left:s,bottom:o,right:c,options:u}=this,f=u.align;let d=0,m,p,b;return this.isHorizontal()?(p=ue(f,s,c),b=a+e,m=c-s):(u.position==="left"?(p=s+e,b=ue(f,o,a),d=Ct*-.5):(p=c-e,b=ue(f,a,o),d=Ct*.5),m=o-a),{titleX:p,titleY:b,maxWidth:m,rotation:d}}draw(){const e=this.ctx,a=this.options;if(!a.display)return;const s=re(a.font),c=s.lineHeight/2+this._padding.top,{titleX:u,titleY:f,maxWidth:d,rotation:m}=this._drawArgs(c);Fs(e,a.text,0,0,s,{color:a.color,maxWidth:d,rotation:m,textAlign:sf(a.align),textBaseline:"middle",translation:[u,f]})}}function m2(i,e){const a=new J0({ctx:i.ctx,options:e,chart:i});Fe.configure(i,a,e),Fe.addBox(i,a),i.titleBlock=a}var p2={id:"title",_element:J0,start(i,e,a){m2(i,a)},stop(i){const e=i.titleBlock;Fe.removeBox(i,e),delete i.titleBlock},beforeUpdate(i,e,a){const s=i.titleBlock;Fe.configure(i,s,a),s.options=a},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 Hs={average(i){if(!i.length)return!1;let e,a,s=new Set,o=0,c=0;for(e=0,a=i.length;e<a;++e){const f=i[e].element;if(f&&f.hasValue()){const d=f.tooltipPosition();s.add(d.x),o+=d.y,++c}}return c===0||s.size===0?!1:{x:[...s].reduce((f,d)=>f+d)/s.size,y:o/c}},nearest(i,e){if(!i.length)return!1;let a=e.x,s=e.y,o=Number.POSITIVE_INFINITY,c,u,f;for(c=0,u=i.length;c<u;++c){const d=i[c].element;if(d&&d.hasValue()){const m=d.getCenterPoint(),p=Xu(e,m);p<o&&(o=p,f=d)}}if(f){const d=f.tooltipPosition();a=d.x,s=d.y}return{x:a,y:s}}};function an(i,e){return e&&(Ft(e)?Array.prototype.push.apply(i,e):i.push(e)),i}function Cn(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
10
- `)>-1?i.split(`
11
- `):i}function y2(i,e){const{element:a,datasetIndex:s,index:o}=e,c=i.getDatasetMeta(s).controller,{label:u,value:f}=c.getLabelAndValue(o);return{chart:i,label:u,parsed:c.getParsed(o),raw:i.data.datasets[s].data[o],formattedValue:f,dataset:c.getDataset(),dataIndex:o,datasetIndex:s,element:a}}function wp(i,e){const a=i.chart.ctx,{body:s,footer:o,title:c}=i,{boxWidth:u,boxHeight:f}=e,d=re(e.bodyFont),m=re(e.titleFont),p=re(e.footerFont),b=c.length,_=o.length,x=s.length,T=Le(e.padding);let M=T.height,A=0,z=s.reduce((G,q)=>G+q.before.length+q.lines.length+q.after.length,0);if(z+=i.beforeBody.length+i.afterBody.length,b&&(M+=b*m.lineHeight+(b-1)*e.titleSpacing+e.titleMarginBottom),z){const G=e.displayColors?Math.max(f,d.lineHeight):d.lineHeight;M+=x*G+(z-x)*d.lineHeight+(z-1)*e.bodySpacing}_&&(M+=e.footerMarginTop+_*p.lineHeight+(_-1)*e.footerSpacing);let H=0;const Y=function(G){A=Math.max(A,a.measureText(G).width+H)};return a.save(),a.font=m.string,At(i.title,Y),a.font=d.string,At(i.beforeBody.concat(i.afterBody),Y),H=e.displayColors?u+2+e.boxPadding:0,At(s,G=>{At(G.before,Y),At(G.lines,Y),At(G.after,Y)}),H=0,a.font=p.string,At(i.footer,Y),a.restore(),A+=T.width,{width:A,height:M}}function b2(i,e){const{y:a,height:s}=e;return a<s/2?"top":a>i.height-s/2?"bottom":"center"}function v2(i,e,a,s){const{x:o,width:c}=s,u=a.caretSize+a.caretPadding;if(i==="left"&&o+c+u>e.width||i==="right"&&o-c-u<0)return!0}function _2(i,e,a,s){const{x:o,width:c}=a,{width:u,chartArea:{left:f,right:d}}=i;let m="center";return s==="center"?m=o<=(f+d)/2?"left":"right":o<=c/2?m="left":o>=u-c/2&&(m="right"),v2(m,i,e,a)&&(m="center"),m}function Np(i,e,a){const s=a.yAlign||e.yAlign||b2(i,a);return{xAlign:a.xAlign||e.xAlign||_2(i,e,a,s),yAlign:s}}function x2(i,e){let{x:a,width:s}=i;return e==="right"?a-=s:e==="center"&&(a-=s/2),a}function S2(i,e,a){let{y:s,height:o}=i;return e==="top"?s+=a:e==="bottom"?s-=o+a:s-=o/2,s}function jp(i,e,a,s){const{caretSize:o,caretPadding:c,cornerRadius:u}=i,{xAlign:f,yAlign:d}=a,m=o+c,{topLeft:p,topRight:b,bottomLeft:_,bottomRight:x}=Da(u);let T=x2(e,f);const M=S2(e,d,m);return d==="center"?f==="left"?T+=m:f==="right"&&(T-=m):f==="left"?T-=Math.max(p,_)+o:f==="right"&&(T+=Math.max(b,x)+o),{x:Me(T,0,s.width-e.width),y:Me(M,0,s.height-e.height)}}function Oo(i,e,a){const s=Le(a.padding);return e==="center"?i.x+i.width/2:e==="right"?i.x+i.width-s.right:i.x+s.left}function kp(i){return an([],Cn(i))}function T2(i,e,a){return Vi(i,{tooltip:e,tooltipItems:a,type:"tooltip"})}function Lp(i,e){const a=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return a?i.override(a):i}const I0={beforeTitle:On,title(i){if(i.length>0){const e=i[0],a=e.chart.data.labels,s=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return a[e.dataIndex]}return""},afterTitle:On,beforeBody:On,beforeLabel:On,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let e=i.dataset.label||"";e&&(e+=": ");const a=i.formattedValue;return Tt(a)||(e+=a),e},labelColor(i){const a=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const a=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:On,afterBody:On,beforeFooter:On,footer:On,afterFooter:On};function xe(i,e,a,s){const o=i[e].call(a,s);return typeof o>"u"?I0[e].call(a,s):o}class Hp extends jn{static positioners=Hs;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 a=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&a.options.animation&&s.animations,c=new C0(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(c)),c}getContext(){return this.$context||(this.$context=T2(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,a){const{callbacks:s}=a,o=xe(s,"beforeTitle",this,e),c=xe(s,"title",this,e),u=xe(s,"afterTitle",this,e);let f=[];return f=an(f,Cn(o)),f=an(f,Cn(c)),f=an(f,Cn(u)),f}getBeforeBody(e,a){return kp(xe(a.callbacks,"beforeBody",this,e))}getBody(e,a){const{callbacks:s}=a,o=[];return At(e,c=>{const u={before:[],lines:[],after:[]},f=Lp(s,c);an(u.before,Cn(xe(f,"beforeLabel",this,c))),an(u.lines,xe(f,"label",this,c)),an(u.after,Cn(xe(f,"afterLabel",this,c))),o.push(u)}),o}getAfterBody(e,a){return kp(xe(a.callbacks,"afterBody",this,e))}getFooter(e,a){const{callbacks:s}=a,o=xe(s,"beforeFooter",this,e),c=xe(s,"footer",this,e),u=xe(s,"afterFooter",this,e);let f=[];return f=an(f,Cn(o)),f=an(f,Cn(c)),f=an(f,Cn(u)),f}_createItems(e){const a=this._active,s=this.chart.data,o=[],c=[],u=[];let f=[],d,m;for(d=0,m=a.length;d<m;++d)f.push(y2(this.chart,a[d]));return e.filter&&(f=f.filter((p,b,_)=>e.filter(p,b,_,s))),e.itemSort&&(f=f.sort((p,b)=>e.itemSort(p,b,s))),At(f,p=>{const b=Lp(e.callbacks,p);o.push(xe(b,"labelColor",this,p)),c.push(xe(b,"labelPointStyle",this,p)),u.push(xe(b,"labelTextColor",this,p))}),this.labelColors=o,this.labelPointStyles=c,this.labelTextColors=u,this.dataPoints=f,f}update(e,a){const s=this.options.setContext(this.getContext()),o=this._active;let c,u=[];if(!o.length)this.opacity!==0&&(c={opacity:0});else{const f=Hs[s.position].call(this,o,this._eventPosition);u=this._createItems(s),this.title=this.getTitle(u,s),this.beforeBody=this.getBeforeBody(u,s),this.body=this.getBody(u,s),this.afterBody=this.getAfterBody(u,s),this.footer=this.getFooter(u,s);const d=this._size=wp(this,s),m=Object.assign({},f,d),p=Np(this.chart,s,m),b=jp(s,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&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(e,a,s,o){const c=this.getCaretPosition(e,s,o);a.lineTo(c.x1,c.y1),a.lineTo(c.x2,c.y2),a.lineTo(c.x3,c.y3)}getCaretPosition(e,a,s){const{xAlign:o,yAlign:c}=this,{caretSize:u,cornerRadius:f}=s,{topLeft:d,topRight:m,bottomLeft:p,bottomRight:b}=Da(f),{x:_,y:x}=e,{width:T,height:M}=a;let A,z,H,Y,G,q;return c==="center"?(G=x+M/2,o==="left"?(A=_,z=A-u,Y=G+u,q=G-u):(A=_+T,z=A+u,Y=G-u,q=G+u),H=A):(o==="left"?z=_+Math.max(d,p)+u:o==="right"?z=_+T-Math.max(m,b)-u:z=this.caretX,c==="top"?(Y=x,G=Y-u,A=z-u,H=z+u):(Y=x+M,G=Y+u,A=z+u,H=z-u),q=Y),{x1:A,x2:z,x3:H,y1:Y,y2:G,y3:q}}drawTitle(e,a,s){const o=this.title,c=o.length;let u,f,d;if(c){const m=Ca(s.rtl,this.x,this.width);for(e.x=Oo(this,s.titleAlign,s),a.textAlign=m.textAlign(s.titleAlign),a.textBaseline="middle",u=re(s.titleFont),f=s.titleSpacing,a.fillStyle=s.titleColor,a.font=u.string,d=0;d<c;++d)a.fillText(o[d],m.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+f,d+1===c&&(e.y+=s.titleMarginBottom-f)}}_drawColorBox(e,a,s,o,c){const u=this.labelColors[s],f=this.labelPointStyles[s],{boxHeight:d,boxWidth:m}=c,p=re(c.bodyFont),b=Oo(this,"left",c),_=o.x(b),x=d<p.lineHeight?(p.lineHeight-d)/2:0,T=a.y+x;if(c.usePointStyle){const M={radius:Math.min(m,d)/2,pointStyle:f.pointStyle,rotation:f.rotation,borderWidth:1},A=o.leftForLtr(_,m)+m/2,z=T+d/2;e.strokeStyle=c.multiKeyBackground,e.fillStyle=c.multiKeyBackground,Zu(e,M,A,z),e.strokeStyle=u.borderColor,e.fillStyle=u.backgroundColor,Zu(e,M,A,z)}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(_,m),A=o.leftForLtr(o.xPlus(_,1),m-2),z=Da(u.borderRadius);Object.values(z).some(H=>H!==0)?(e.beginPath(),e.fillStyle=c.multiKeyBackground,Vo(e,{x:M,y:T,w:m,h:d,radius:z}),e.fill(),e.stroke(),e.fillStyle=u.backgroundColor,e.beginPath(),Vo(e,{x:A,y:T+1,w:m-2,h:d-2,radius:z}),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[s]}drawBody(e,a,s){const{body:o}=this,{bodySpacing:c,bodyAlign:u,displayColors:f,boxHeight:d,boxWidth:m,boxPadding:p}=s,b=re(s.bodyFont);let _=b.lineHeight,x=0;const T=Ca(s.rtl,this.x,this.width),M=function(F){a.fillText(F,T.x(e.x+x),e.y+_/2),e.y+=_+c},A=T.textAlign(u);let z,H,Y,G,q,K,Q;for(a.textAlign=u,a.textBaseline="middle",a.font=b.string,e.x=Oo(this,A,s),a.fillStyle=s.bodyColor,At(this.beforeBody,M),x=f&&A!=="right"?u==="center"?m/2+p:m+2+p:0,G=0,K=o.length;G<K;++G){for(z=o[G],H=this.labelTextColors[G],a.fillStyle=H,At(z.before,M),Y=z.lines,f&&Y.length&&(this._drawColorBox(a,e,G,T,s),_=Math.max(b.lineHeight,d)),q=0,Q=Y.length;q<Q;++q)M(Y[q]),_=b.lineHeight;At(z.after,M)}x=0,_=b.lineHeight,At(this.afterBody,M),e.y-=c}drawFooter(e,a,s){const o=this.footer,c=o.length;let u,f;if(c){const d=Ca(s.rtl,this.x,this.width);for(e.x=Oo(this,s.footerAlign,s),e.y+=s.footerMarginTop,a.textAlign=d.textAlign(s.footerAlign),a.textBaseline="middle",u=re(s.footerFont),a.fillStyle=s.footerColor,a.font=u.string,f=0;f<c;++f)a.fillText(o[f],d.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+s.footerSpacing}}drawBackground(e,a,s,o){const{xAlign:c,yAlign:u}=this,{x:f,y:d}=e,{width:m,height:p}=s,{topLeft:b,topRight:_,bottomLeft:x,bottomRight:T}=Da(o.cornerRadius);a.fillStyle=o.backgroundColor,a.strokeStyle=o.borderColor,a.lineWidth=o.borderWidth,a.beginPath(),a.moveTo(f+b,d),u==="top"&&this.drawCaret(e,a,s,o),a.lineTo(f+m-_,d),a.quadraticCurveTo(f+m,d,f+m,d+_),u==="center"&&c==="right"&&this.drawCaret(e,a,s,o),a.lineTo(f+m,d+p-T),a.quadraticCurveTo(f+m,d+p,f+m-T,d+p),u==="bottom"&&this.drawCaret(e,a,s,o),a.lineTo(f+x,d+p),a.quadraticCurveTo(f,d+p,f,d+p-x),u==="center"&&c==="left"&&this.drawCaret(e,a,s,o),a.lineTo(f,d+b),a.quadraticCurveTo(f,d,f+b,d),a.closePath(),a.fill(),o.borderWidth>0&&a.stroke()}_updateAnimationTarget(e){const a=this.chart,s=this.$animations,o=s&&s.x,c=s&&s.y;if(o||c){const u=Hs[e.position].call(this,this._active,this._eventPosition);if(!u)return;const f=this._size=wp(this,e),d=Object.assign({},u,this._size),m=Np(a,e,d),p=jp(e,d,m,a);(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 a=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(a);const o={width:this.width,height:this.height},c={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const u=Le(a.padding),f=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&f&&(e.save(),e.globalAlpha=s,this.drawBackground(c,e,o,a),T0(e,a.textDirection),c.y+=u.top,this.drawTitle(c,e,a),this.drawBody(c,e,a),this.drawFooter(c,e,a),M0(e,a.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,a){const s=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=!Lo(s,o),u=this._positionChanged(o,a);(c||u)&&(this._active=o,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,a,s=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,c=this._active||[],u=this._getActiveElements(e,c,a,s),f=this._positionChanged(u,e),d=a||!Lo(u,c)||f;return d&&(this._active=u,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,a))),d}_getActiveElements(e,a,s,o){const c=this.options;if(e.type==="mouseout")return[];if(!o)return a.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,s);return c.reverse&&u.reverse(),u}_positionChanged(e,a){const{caretX:s,caretY:o,options:c}=this,u=Hs[c.position].call(this,e,a);return u!==!1&&(s!==u.x||o!==u.y)}}var M2={id:"tooltip",_element:Hp,positioners:Hs,afterInit(i,e,a){a&&(i.tooltip=new Hp({chart:i,options:a}))},beforeUpdate(i,e,a){i.tooltip&&i.tooltip.initialize(a)},reset(i,e,a){i.tooltip&&i.tooltip.initialize(a)},afterDraw(i){const e=i.tooltip;if(e&&e._willRender()){const a={tooltip:e};if(i.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;e.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",a)}},afterEvent(i,e){if(i.tooltip){const a=e.replay;i.tooltip.handleEvent(e.event,a,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:(i,e)=>e.bodyFont.size,boxWidth:(i,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:I0},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const E2=(i,e,a,s)=>(typeof e=="string"?(a=i.push(e)-1,s.unshift({index:a,label:e})):isNaN(e)&&(a=null),a);function A2(i,e,a,s){const o=i.indexOf(e);if(o===-1)return E2(i,e,a,s);const c=i.lastIndexOf(e);return o!==c?a:o}const O2=(i,e)=>i===null?null:Me(Math.round(i),0,e);function Bp(i){const e=this.getLabels();return i>=0&&i<e.length?e[i]:i}class D2 extends Na{static id="category";static defaults={ticks:{callback:Bp}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const a=this._addedLabels;if(a.length){const s=this.getLabels();for(const{index:o,label:c}of a)s[o]===c&&s.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,a){if(Tt(e))return null;const s=this.getLabels();return a=isFinite(a)&&s[a]===e?a:A2(s,e,ht(a,e),this._addedLabels),O2(a,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:a}=this.getUserBounds();let{min:s,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(s=0),a||(o=this.getLabels().length-1)),this.min=s,this.max=o}buildTicks(){const e=this.min,a=this.max,s=this.options.offset,o=[];let c=this.getLabels();c=e===0&&a===c.length-1?c:c.slice(e,a+1),this._valueRange=Math.max(c.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let u=e;u<=a;u++)o.push({value:u});return o}getLabelForValue(e){return Bp.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 a=this.ticks;return e<0||e>a.length-1?null:this.getPixelForValue(a[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function C2(i,e){const a=[],{bounds:o,step:c,min:u,max:f,precision:d,count:m,maxTicks:p,maxDigits:b,includeBounds:_}=i,x=c||1,T=p-1,{min:M,max:A}=e,z=!Tt(u),H=!Tt(f),Y=!Tt(m),G=(A-M)/(b+1);let q=jm((A-M)/T/x)*x,K,Q,F,tt;if(q<1e-14&&!z&&!H)return[{value:M},{value:A}];tt=Math.ceil(A/q)-Math.floor(M/q),tt>T&&(q=jm(tt*q/T/x)*x),Tt(d)||(K=Math.pow(10,d),q=Math.ceil(q*K)/K),o==="ticks"?(Q=Math.floor(M/q)*q,F=Math.ceil(A/q)*q):(Q=M,F=A),z&&H&&c&&z_((f-u)/c,q/1e3)?(tt=Math.round(Math.min((f-u)/q,p)),q=(f-u)/tt,Q=u,F=f):Y?(Q=z?u:Q,F=H?f:F,tt=m-1,q=(F-Q)/tt):(tt=(F-Q)/q,Us(tt,Math.round(tt),q/1e3)?tt=Math.round(tt):tt=Math.ceil(tt));const ct=Math.max(km(q),km(Q));K=Math.pow(10,Tt(d)?ct:d),Q=Math.round(Q*K)/K,F=Math.round(F*K)/K;let at=0;for(z&&(_&&Q!==u?(a.push({value:u}),Q<u&&at++,Us(Math.round((Q+at*q)*K)/K,u,Up(u,G,i))&&at++):Q<u&&at++);at<tt;++at){const it=Math.round((Q+at*q)*K)/K;if(H&&it>f)break;a.push({value:it})}return H&&_&&F!==f?a.length&&Us(a[a.length-1].value,f,Up(f,G,i))?a[a.length-1].value=f:a.push({value:f}):(!H||F===f)&&a.push({value:F}),a}function Up(i,e,{horizontal:a,minRotation:s}){const o=Rn(s),c=(a?Math.sin(o):Math.cos(o))||.001,u=.75*e*(""+i).length;return Math.min(e/c,u)}class z2 extends Na{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,a){return Tt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:a,maxDefined:s}=this.getUserBounds();let{min:o,max:c}=this;const u=d=>o=a?o:d,f=d=>c=s?c:d;if(e){const d=ln(o),m=ln(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:a,stepSize:s}=e,o;return s?(o=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),a=a||11),a&&(o=Math.min(a,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,a=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const o={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},c=this._range||this,u=C2(o,c);return e.bounds==="ticks"&&R_(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 a=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const o=(s-a)/Math.max(e.length-1,1)/2;a-=o,s+=o}this._startValue=a,this._endValue=s,this._valueRange=s-a}getLabelForValue(e){return of(e,this.chart.options.locale,this.options.ticks.format)}}class R2 extends z2{static id="linear";static defaults={ticks:{callback:m0.formatters.numeric}};determineDataLimits(){const{min:e,max:a}=this.getMinMax(!0);this.min=fe(e)?e:0,this.max=fe(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),a=e?this.width:this.height,s=Rn(this.options.ticks.minRotation),o=(e?Math.sin(s):Math.cos(s))||.001,c=this._resolveTickFontOptions(0);return Math.ceil(a/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 Io={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}},Te=Object.keys(Io);function Vp(i,e){return i-e}function Yp(i,e){if(Tt(e))return null;const a=i._adapter,{parser:s,round:o,isoWeekday:c}=i._parseOpts;let u=e;return typeof s=="function"&&(u=s(u)),fe(u)||(u=typeof s=="string"?a.parse(u,s):a.parse(u)),u===null?null:(o&&(u=o==="week"&&(Uo(c)||c===!0)?a.startOf(u,"isoWeek",c):a.startOf(u,o)),+u)}function qp(i,e,a,s){const o=Te.length;for(let c=Te.indexOf(i);c<o-1;++c){const u=Io[Te[c]],f=u.steps?u.steps:Number.MAX_SAFE_INTEGER;if(u.common&&Math.ceil((a-e)/(f*u.size))<=s)return Te[c]}return Te[o-1]}function w2(i,e,a,s,o){for(let c=Te.length-1;c>=Te.indexOf(a);c--){const u=Te[c];if(Io[u].common&&i._adapter.diff(o,s,u)>=e-1)return u}return Te[a?Te.indexOf(a):0]}function N2(i){for(let e=Te.indexOf(i)+1,a=Te.length;e<a;++e)if(Io[Te[e]].common)return Te[e]}function Xp(i,e,a){if(!a)i[e]=!0;else if(a.length){const{lo:s,hi:o}=af(a,e),c=a[s]>=e?a[s]:a[o];i[c]=!0}}function j2(i,e,a,s){const o=i._adapter,c=+o.startOf(e[0].value,s),u=e[e.length-1].value;let f,d;for(f=c;f<=u;f=+o.add(f,1,s))d=a[f],d>=0&&(e[d].major=!0);return e}function Gp(i,e,a){const s=[],o={},c=e.length;let u,f;for(u=0;u<c;++u)f=e[u],o[f]=u,s.push({value:f,major:!1});return c===0||!a?s:j2(i,s,o,a)}class Qp extends Na{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,a={}){const s=e.time||(e.time={}),o=this._adapter=new g1._date(e.adapters.date);o.init(a),Bs(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=a.normalized}parse(e,a){return e===void 0?null:Yp(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,a=this._adapter,s=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=fe(o)&&!isNaN(o)?o:+a.startOf(Date.now(),s),c=fe(c)&&!isNaN(c)?c:+a.endOf(Date.now(),s)+1,this.min=Math.min(o,c-1),this.max=Math.max(o+1,c)}_getLabelBounds(){const e=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(a=e[0],s=e[e.length-1]),{min:a,max:s}}buildTicks(){const e=this.options,a=e.time,s=e.ticks,o=s.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=L_(o,c,u);return this._unit=a.unit||(s.autoSkip?qp(a.minUnit,this.min,this.max,this._getLabelCapacity(c)):w2(this,f.length,a.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:N2(this._unit),this.initOffsets(o),e.reverse&&f.reverse(),Gp(this,f,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let a=0,s=0,o,c;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?a=1-o:a=(this.getDecimalForValue(e[1])-o)/2,c=this.getDecimalForValue(e[e.length-1]),e.length===1?s=c:s=(c-this.getDecimalForValue(e[e.length-2]))/2);const u=e.length<3?.5:.25;a=Me(a,0,u),s=Me(s,0,u),this._offsets={start:a,end:s,factor:1/(a+1+s)}}_generate(){const e=this._adapter,a=this.min,s=this.max,o=this.options,c=o.time,u=c.unit||qp(c.minUnit,a,s,this._getLabelCapacity(a)),f=ht(o.ticks.stepSize,1),d=u==="week"?c.isoWeekday:!1,m=Uo(d)||d===!0,p={};let b=a,_,x;if(m&&(b=+e.startOf(b,"isoWeek",d)),b=+e.startOf(b,m?"day":u),e.diff(s,a,u)>1e5*f)throw new Error(a+" and "+s+" are too far apart with stepSize of "+f+" "+u);const T=o.ticks.source==="data"&&this.getDataTimestamps();for(_=b,x=0;_<s;_=+e.add(_,f,u),x++)Xp(p,_,T);return(_===s||o.bounds==="ticks"||x===1)&&Xp(p,_,T),Object.keys(p).sort(Vp).map(M=>+M)}getLabelForValue(e){const a=this._adapter,s=this.options.time;return s.tooltipFormat?a.format(e,s.tooltipFormat):a.format(e,s.displayFormats.datetime)}format(e,a){const o=this.options.time.displayFormats,c=this._unit,u=a||o[c];return this._adapter.format(e,u)}_tickFormatFunction(e,a,s,o){const c=this.options,u=c.ticks.callback;if(u)return jt(u,[e,a,s],this);const f=c.time.displayFormats,d=this._unit,m=this._majorUnit,p=d&&f[d],b=m&&f[m],_=s[a],x=m&&b&&_&&_.major;return this._adapter.format(e,o||(x?b:p))}generateTickLabels(e){let a,s,o;for(a=0,s=e.length;a<s;++a)o=e[a],o.label=this._tickFormatFunction(o.value,a,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const a=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((a.start+s)*a.factor)}getValueForPixel(e){const a=this._offsets,s=this.getDecimalForPixel(e)/a.factor-a.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const a=this.options.ticks,s=this.ctx.measureText(e).width,o=Rn(this.isHorizontal()?a.maxRotation:a.minRotation),c=Math.cos(o),u=Math.sin(o),f=this._resolveTickFontOptions(0).size;return{w:s*c+f*u,h:s*u+f*c}}_getLabelCapacity(e){const a=this.options.time,s=a.displayFormats,o=s[a.unit]||s.millisecond,c=this._tickFormatFunction(e,0,Gp(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||[],a,s;if(e.length)return e;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(a=0,s=o.length;a<s;++a)e=e.concat(o[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let a,s;if(e.length)return e;const o=this.getLabels();for(a=0,s=o.length;a<s;++a)e.push(Yp(this,o[a]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return h0(e.sort(Vp))}}function Do(i,e,a){let s=0,o=i.length-1,c,u,f,d;a?(e>=i[s].pos&&e<=i[o].pos&&({lo:s,hi:o}=Gu(i,"pos",e)),{pos:c,time:f}=i[s],{pos:u,time:d}=i[o]):(e>=i[s].time&&e<=i[o].time&&({lo:s,hi:o}=Gu(i,"time",e)),{time:c,pos:f}=i[s],{time:u,pos:d}=i[o]);const m=u-c;return m?f+(d-f)*(e-c)/m:f}class hM extends Qp{static id="timeseries";static defaults=Qp.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(e);this._minPos=Do(a,this.min),this._tableRange=Do(a,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:a,max:s}=this,o=[],c=[];let u,f,d,m,p;for(u=0,f=e.length;u<f;++u)m=e[u],m>=a&&m<=s&&o.push(m);if(o.length<2)return[{time:a,pos:0},{time:s,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,a=this.max;let s=super.getDataTimestamps();return(!s.includes(e)||!s.length)&&s.splice(0,0,e),(!s.includes(a)||s.length===1)&&s.push(a),s.sort((o,c)=>o-c)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const a=this.getDataTimestamps(),s=this.getLabelTimestamps();return a.length&&s.length?e=this.normalize(a.concat(s)):e=a.length?a:s,e=this._cache.all=e,e}getDecimalForValue(e){return(Do(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const a=this._offsets,s=this.getDecimalForPixel(e)/a.factor-a.end;return Do(this._table,s*this._tableRange+this._minPos,!0)}}var Zp=(function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var i=window.screen;if(i)return(i.deviceXDPI||1)/(i.logicalXDPI||1)}return 1})(),qs={toTextLines:function(i){var e=[],a;for(i=[].concat(i);i.length;)a=i.pop(),typeof a=="string"?e.unshift.apply(e,a.split(`
12
- `)):Array.isArray(a)?i.push.apply(i,a):Tt(i)||e.unshift(""+a);return e},textSize:function(i,e,a){var s=[].concat(e),o=s.length,c=i.font,u=0,f;for(i.font=a.string,f=0;f<o;++f)u=Math.max(i.measureText(s[f]).width,u);return i.font=c,{height:o*a.lineHeight,width:u}},bound:function(i,e,a){return Math.max(i,Math.min(e,a))},arrayDiff:function(i,e){var a=i.slice(),s=[],o,c,u,f;for(o=0,u=e.length;o<u;++o)f=e[o],c=a.indexOf(f),c===-1?s.push([f,1]):a.splice(c,1);for(o=0,u=a.length;o<u;++o)s.push([a[o],-1]);return s},rasterize:function(i){return Math.round(i*Zp)/Zp}};function Lu(i,e){var a=e.x,s=e.y;if(a===null)return{x:0,y:-1};if(s===null)return{x:1,y:0};var o=i.x-a,c=i.y-s,u=Math.sqrt(o*o+c*c);return{x:u?o/u:0,y:u?c/u:-1}}function k2(i,e,a,s,o){switch(o){case"center":a=s=0;break;case"bottom":a=0,s=1;break;case"right":a=1,s=0;break;case"left":a=-1,s=0;break;case"top":a=0,s=-1;break;case"start":a=-a,s=-s;break;case"end":break;default:o*=Math.PI/180,a=Math.cos(o),s=Math.sin(o);break}return{x:i,y:e,vx:a,vy:s}}var L2=0,$0=1,P0=2,ty=4,ey=8;function Co(i,e,a){var s=L2;return i<a.left?s|=$0:i>a.right&&(s|=P0),e<a.top?s|=ey:e>a.bottom&&(s|=ty),s}function H2(i,e){for(var a=i.x0,s=i.y0,o=i.x1,c=i.y1,u=Co(a,s,e),f=Co(o,c,e),d,m,p;!(!(u|f)||u&f);)d=u||f,d&ey?(m=a+(o-a)*(e.top-s)/(c-s),p=e.top):d&ty?(m=a+(o-a)*(e.bottom-s)/(c-s),p=e.bottom):d&P0?(p=s+(c-s)*(e.right-a)/(o-a),m=e.right):d&$0&&(p=s+(c-s)*(e.left-a)/(o-a),m=e.left),d===u?(a=m,s=p,u=Co(a,s,e)):(o=m,c=p,f=Co(o,c,e));return{x0:a,x1:o,y0:s,y1:c}}function zo(i,e){var a=e.anchor,s=i,o,c;return e.clamp&&(s=H2(s,e.area)),a==="start"?(o=s.x0,c=s.y0):a==="end"?(o=s.x1,c=s.y1):(o=(s.x0+s.x1)/2,c=(s.y0+s.y1)/2),k2(o,c,i.vx,i.vy,e.align)}var Ro={arc:function(i,e){var a=(i.startAngle+i.endAngle)/2,s=Math.cos(a),o=Math.sin(a),c=i.innerRadius,u=i.outerRadius;return zo({x0:i.x+s*c,y0:i.y+o*c,x1:i.x+s*u,y1:i.y+o*u,vx:s,vy:o},e)},point:function(i,e){var a=Lu(i,e.origin),s=a.x*i.options.radius,o=a.y*i.options.radius;return zo({x0:i.x-s,y0:i.y-o,x1:i.x+s,y1:i.y+o,vx:a.x,vy:a.y},e)},bar:function(i,e){var a=Lu(i,e.origin),s=i.x,o=i.y,c=0,u=0;return i.horizontal?(s=Math.min(i.x,i.base),c=Math.abs(i.base-i.x)):(o=Math.min(i.y,i.base),u=Math.abs(i.base-i.y)),zo({x0:s,y0:o+u,x1:s+c,y1:o,vx:a.x,vy:a.y},e)},fallback:function(i,e){var a=Lu(i,e.origin);return zo({x0:i.x,y0:i.y,x1:i.x+(i.width||0),y1:i.y+(i.height||0),vx:a.x,vy:a.y},e)}},Nn=qs.rasterize;function B2(i){var e=i.borderWidth||0,a=i.padding,s=i.size.height,o=i.size.width,c=-o/2,u=-s/2;return{frame:{x:c-a.left-e,y:u-a.top-e,w:o+a.width+e*2,h:s+a.height+e*2},text:{x:c,y:u,w:o,h:s}}}function U2(i,e){var a=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!a)return null;if(a.xCenter!==void 0&&a.yCenter!==void 0)return{x:a.xCenter,y:a.yCenter};var s=a.getBasePixel();return i.horizontal?{x:s,y:null}:{x:null,y:s}}function V2(i){return i instanceof Y0?Ro.arc:i instanceof G0?Ro.point:i instanceof Z0?Ro.bar:Ro.fallback}function Y2(i,e,a,s,o,c){var u=Math.PI/2;if(c){var f=Math.min(c,o/2,s/2),d=e+f,m=a+f,p=e+s-f,b=a+o-f;i.moveTo(e,m),d<p&&m<b?(i.arc(d,m,f,-Math.PI,-u),i.arc(p,m,f,-u,0),i.arc(p,b,f,0,u),i.arc(d,b,f,u,Math.PI)):d<p?(i.moveTo(d,a),i.arc(p,m,f,-u,u),i.arc(d,m,f,u,Math.PI+u)):m<b?(i.arc(d,m,f,-Math.PI,0),i.arc(d,b,f,0,Math.PI)):i.arc(d,m,f,-Math.PI,Math.PI),i.closePath(),i.moveTo(e,a)}else i.rect(e,a,s,o)}function q2(i,e,a){var s=a.backgroundColor,o=a.borderColor,c=a.borderWidth;!s&&(!o||!c)||(i.beginPath(),Y2(i,Nn(e.x)+c/2,Nn(e.y)+c/2,Nn(e.w)-c,Nn(e.h)-c,a.borderRadius),i.closePath(),s&&(i.fillStyle=s,i.fill()),o&&c&&(i.strokeStyle=o,i.lineWidth=c,i.lineJoin="miter",i.stroke()))}function X2(i,e,a){var s=a.lineHeight,o=i.w,c=i.x,u=i.y+s/2;return e==="center"?c+=o/2:(e==="end"||e==="right")&&(c+=o),{h:s,w:o,x:c,y:u}}function G2(i,e,a){var s=i.shadowBlur,o=a.stroked,c=Nn(a.x),u=Nn(a.y),f=Nn(a.w);o&&i.strokeText(e,c,u,f),a.filled&&(s&&o&&(i.shadowBlur=0),i.fillText(e,c,u,f),s&&o&&(i.shadowBlur=s))}function Q2(i,e,a,s){var o=s.textAlign,c=s.color,u=!!c,f=s.font,d=e.length,m=s.textStrokeColor,p=s.textStrokeWidth,b=m&&p,_;if(!(!d||!u&&!b))for(a=X2(a,o,f),i.font=f.string,i.textAlign=o,i.textBaseline="middle",i.shadowBlur=s.textShadowBlur,i.shadowColor=s.textShadowColor,u&&(i.fillStyle=c),b&&(i.lineJoin="round",i.lineWidth=p,i.strokeStyle=m),_=0,d=e.length;_<d;++_)G2(i,e[_],{stroked:b,filled:u,w:a.w,x:a.x,y:a.y+a.h*_})}var ny=function(i,e,a,s){var o=this;o._config=i,o._index=s,o._model=null,o._rects=null,o._ctx=e,o._el=a};on(ny.prototype,{_modelize:function(i,e,a,s){var o=this,c=o._index,u=re(Ut([a.font,{}],s,c)),f=Ut([a.color,Gt.color],s,c);return{align:Ut([a.align,"center"],s,c),anchor:Ut([a.anchor,"center"],s,c),area:s.chart.chartArea,backgroundColor:Ut([a.backgroundColor,null],s,c),borderColor:Ut([a.borderColor,null],s,c),borderRadius:Ut([a.borderRadius,0],s,c),borderWidth:Ut([a.borderWidth,0],s,c),clamp:Ut([a.clamp,!1],s,c),clip:Ut([a.clip,!1],s,c),color:f,display:i,font:u,lines:e,offset:Ut([a.offset,4],s,c),opacity:Ut([a.opacity,1],s,c),origin:U2(o._el,s),padding:Le(Ut([a.padding,4],s,c)),positioner:V2(o._el),rotation:Ut([a.rotation,0],s,c)*(Math.PI/180),size:qs.textSize(o._ctx,e,u),textAlign:Ut([a.textAlign,"start"],s,c),textShadowBlur:Ut([a.textShadowBlur,0],s,c),textShadowColor:Ut([a.textShadowColor,f],s,c),textStrokeColor:Ut([a.textStrokeColor,f],s,c),textStrokeWidth:Ut([a.textStrokeWidth,0],s,c)}},update:function(i){var e=this,a=null,s=null,o=e._index,c=e._config,u,f,d,m=Ut([c.display,!0],i,o);m&&(u=i.dataset.data[o],f=ht(jt(c.formatter,[u,i]),u),d=Tt(f)?[]:qs.toTextLines(f),d.length&&(a=e._modelize(m,d,c,i),s=B2(a))),e._model=a,e._rects=s},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(i,e){var a=this,s=i.ctx,o=a._model,c=a._rects,u;this.visible()&&(s.save(),o.clip&&(u=o.area,s.beginPath(),s.rect(u.left,u.top,u.right-u.left,u.bottom-u.top),s.clip()),s.globalAlpha=qs.bound(0,o.opacity,1),s.translate(Nn(e.x),Nn(e.y)),s.rotate(o.rotation),q2(s,c.frame,o),Q2(s,o.lines,c.text,o),s.restore())}});var Z2=Number.MIN_SAFE_INTEGER||-9007199254740991,K2=Number.MAX_SAFE_INTEGER||9007199254740991;function js(i,e,a){var s=Math.cos(a),o=Math.sin(a),c=e.x,u=e.y;return{x:c+s*(i.x-c)-o*(i.y-u),y:u+o*(i.x-c)+s*(i.y-u)}}function Kp(i,e){var a=K2,s=Z2,o=e.origin,c,u,f,d,m;for(c=0;c<i.length;++c)u=i[c],f=u.x-o.x,d=u.y-o.y,m=e.vx*f+e.vy*d,a=Math.min(a,m),s=Math.max(s,m);return{min:a,max:s}}function wo(i,e){var a=e.x-i.x,s=e.y-i.y,o=Math.sqrt(a*a+s*s);return{vx:(e.x-i.x)/o,vy:(e.y-i.y)/o,origin:i,ln:o}}var iy=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};on(iy.prototype,{center:function(){var i=this._rect;return{x:i.x+i.w/2,y:i.y+i.h/2}},update:function(i,e,a){this._rotation=a,this._rect={x:e.x+i.x,y:e.y+i.y,w:e.w,h:e.h}},contains:function(i){var e=this,a=1,s=e._rect;return i=js(i,e.center(),-e._rotation),!(i.x<s.x-a||i.y<s.y-a||i.x>s.x+s.w+a*2||i.y>s.y+s.h+a*2)},intersects:function(i){var e=this._points(),a=i._points(),s=[wo(e[0],e[1]),wo(e[0],e[3])],o,c,u;for(this._rotation!==i._rotation&&s.push(wo(a[0],a[1]),wo(a[0],a[3])),o=0;o<s.length;++o)if(c=Kp(e,s[o]),u=Kp(a,s[o]),c.max<u.min||u.max<c.min)return!1;return!0},_points:function(){var i=this,e=i._rect,a=i._rotation,s=i.center();return[js({x:e.x,y:e.y},s,a),js({x:e.x+e.w,y:e.y},s,a),js({x:e.x+e.w,y:e.y+e.h},s,a),js({x:e.x,y:e.y+e.h},s,a)]}});function ay(i,e,a){var s=e.positioner(i,e),o=s.vx,c=s.vy;if(!o&&!c)return{x:s.x,y:s.y};var u=a.w,f=a.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:s.x+m,y:s.y+p}}function F2(i,e){var a,s,o,c;for(a=i.length-1;a>=0;--a)for(o=i[a].$layout,s=a-1;s>=0&&o._visible;--s)c=i[s].$layout,c._visible&&o._box.intersects(c._box)&&e(o,c);return i}function W2(i){var e,a,s,o,c,u,f;for(e=0,a=i.length;e<a;++e)s=i[e],o=s.$layout,o._visible&&(f=new Proxy(s._el,{get:(d,m)=>d.getProps([m],!0)[m]}),c=s.geometry(),u=ay(f,s.model(),c),o._box.update(u,c,s.rotation()));return F2(i,function(d,m){var p=d._hidable,b=m._hidable;p&&b||b?m._visible=!1:p&&(d._visible=!1)})}var Xs={prepare:function(i){var e=[],a,s,o,c,u;for(a=0,o=i.length;a<o;++a)for(s=0,c=i[a].length;s<c;++s)u=i[a][s],e.push(u),u.$layout={_box:new iy,_hidable:!1,_visible:!0,_set:a,_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(i){var e=!1,a,s,o,c,u;for(a=0,s=i.length;a<s;++a)o=i[a],c=o.model(),u=o.$layout,u._hidable=c&&c.display==="auto",u._visible=o.visible(),e|=u._hidable;e&&W2(i)},lookup:function(i,e){var a,s;for(a=i.length-1;a>=0;--a)if(s=i[a].$layout,s&&s._visible&&s._box.contains(e))return i[a];return null},draw:function(i,e){var a,s,o,c,u,f;for(a=0,s=e.length;a<s;++a)o=e[a],c=o.$layout,c._visible&&(u=o.geometry(),f=ay(o._el,o.model(),u),c._box.update(f,u,o.rotation()),o.draw(i,f))}},J2=function(i){if(Tt(i))return null;var e=i,a,s,o;if(pt(i))if(!Tt(i.label))e=i.label;else if(!Tt(i.r))e=i.r;else for(e="",a=Object.keys(i),o=0,s=a.length;o<s;++o)e+=(o!==0?", ":"")+a[o]+": "+i[a[o]];return""+e},I2={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:J2,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},Se="$datalabels",sy="$default";function $2(i,e){var a=i.datalabels,s={},o=[],c,u;return a===!1?null:(a===!0&&(a={}),e=on({},[e,a]),c=e.labels||{},u=Object.keys(c),delete e.labels,u.length?u.forEach(function(f){c[f]&&o.push(on({},[e,c[f],{_key:f}]))}):o.push(e),s=o.reduce(function(f,d){return At(d.listeners||{},function(m,p){f[p]=f[p]||{},f[p][d._key||sy]=m}),delete d.listeners,f},{}),{labels:o,listeners:s})}function Iu(i,e,a,s){if(e){var o=a.$context,c=a.$groups,u;e[c._set]&&(u=e[c._set][c._key],u&&jt(u,[o,s])===!0&&(i[Se]._dirty=!0,a.update(o)))}}function P2(i,e,a,s,o){var c,u;!a&&!s||(a?s?a!==s&&(u=c=!0):u=!0:c=!0,u&&Iu(i,e.leave,a,o),c&&Iu(i,e.enter,s,o))}function tT(i,e){var a=i[Se],s=a._listeners,o,c;if(!(!s.enter&&!s.leave)){if(e.type==="mousemove")c=Xs.lookup(a._labels,e);else if(e.type!=="mouseout")return;o=a._hovered,a._hovered=c,P2(i,s,o,c,e)}}function eT(i,e){var a=i[Se],s=a._listeners.click,o=s&&Xs.lookup(a._labels,e);o&&Iu(i,s,o,e)}var nT={id:"datalabels",defaults:I2,beforeInit:function(i){i[Se]={_actives:[]}},beforeUpdate:function(i){var e=i[Se];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(i,e,a){var s=e.index,o=i[Se],c=o._datasets[s]=[],u=i.isDatasetVisible(s),f=i.data.datasets[s],d=$2(f,a),m=e.meta.data||[],p=i.ctx,b,_,x,T,M,A,z,H;for(p.save(),b=0,x=m.length;b<x;++b)if(z=m[b],z[Se]=[],u&&z&&i.getDataVisibility(b)&&!z.skip)for(_=0,T=d.labels.length;_<T;++_)M=d.labels[_],A=M._key,H=new ny(M,p,z,b),H.$groups={_set:s,_key:A||sy},H.$context={active:!1,chart:i,dataIndex:b,dataset:f,datasetIndex:s},H.update(H.$context),z[Se].push(H),c.push(H);p.restore(),on(o._listeners,d.listeners,{merger:function(Y,G,q){G[Y]=G[Y]||{},G[Y][e.index]=q[Y],o._listened=!0}})},afterUpdate:function(i){i[Se]._labels=Xs.prepare(i[Se]._datasets)},afterDatasetsDraw:function(i){Xs.draw(i,i[Se]._labels)},beforeEvent:function(i,e){if(i[Se]._listened){var a=e.event;switch(a.type){case"mousemove":case"mouseout":tT(i,a);break;case"click":eT(i,a);break}}},afterEvent:function(i){var e=i[Se],a=e._actives,s=e._actives=i.getActiveElements(),o=qs.arrayDiff(a,s),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[Se]||[],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)&&(Xs.update(e._labels),i.render()),delete e._dirty}};const Hu=1e3;function iT(){if(typeof window>"u")return"light";const i=localStorage.getItem("smart-edit-theme");return i==="dark"||i==="light"?i:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function aT(){return typeof window>"u"?!1:localStorage.getItem("smart-edit-sidebar-collapsed")==="true"}function ly(){return{searchKeyword:"",logLevels:new Set,toolNames:new Set}}const sT={logs:[],maxLogIdx:-1,toolNames:[],toolStats:null,theme:iT(),isStatsVisible:!1,connectionMode:"disconnected",activeProject:null,error:null,isLoading:!1,currentView:"logs",sidebarCollapsed:aT(),logFilter:ly(),currentSession:null,sessionHistory:[]};function lT(i,e){switch(e.type){case"SET_LOGS":return{...i,logs:e.logs.slice(-Hu),maxLogIdx:e.maxIdx};case"APPEND_LOG":{const a=[...i.logs,e.log];return{...i,logs:a.length>Hu?a.slice(-Hu):a,maxLogIdx:e.maxIdx}}case"SET_TOOL_NAMES":return{...i,toolNames:e.toolNames};case"SET_TOOL_STATS":return{...i,toolStats:e.stats};case"SET_THEME":return localStorage.setItem("smart-edit-theme",e.theme),document.documentElement.setAttribute("data-theme",e.theme),{...i,theme:e.theme};case"TOGGLE_STATS":return{...i,isStatsVisible:!i.isStatsVisible};case"SET_CONNECTION_MODE":return{...i,connectionMode:e.mode};case"SET_ACTIVE_PROJECT":return{...i,activeProject:e.project};case"SET_ERROR":return{...i,error:e.error};case"SET_LOADING":return{...i,isLoading:e.isLoading};case"CLEAR_LOGS":return{...i,logs:[],maxLogIdx:-1};case"SET_CURRENT_VIEW":return{...i,currentView:e.view};case"TOGGLE_SIDEBAR":{const a=!i.sidebarCollapsed;return localStorage.setItem("smart-edit-sidebar-collapsed",String(a)),{...i,sidebarCollapsed:a}}case"SET_LOG_FILTER":return{...i,logFilter:{...i.logFilter,...e.filter}};case"CLEAR_LOG_FILTERS":return{...i,logFilter:ly()};case"START_SESSION":return{...i,currentSession:e.session};case"END_SESSION":return i.currentSession?{...i,sessionHistory:[{...i.currentSession,endTime:new Date},...i.sessionHistory].slice(0,50),currentSession:null}:i;case"LOAD_SESSION_HISTORY":return{...i,sessionHistory:e.sessions};case"CLEAR_SESSION_HISTORY":return{...i,sessionHistory:[]};default:return i}}const oy=J.createContext(null);function oT({children:i}){const[e,a]=J.useReducer(lT,sT);return S.jsx(oy.Provider,{value:{state:e,dispatch:a},children:i})}function Yi(){const i=J.useContext(oy);if(!i)throw new Error("useDashboard must be used within a DashboardProvider");return i}function rn(){return Yi().state}function ry(){return Yi().dispatch}async function Fp(i=0){const e=await fetch("/get_log_messages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({start_idx:i})});if(!e.ok)throw new Error(`Failed to fetch logs: ${e.statusText}`);return e.json()}async function Wp(){const i=await fetch("/get_tool_names");if(!i.ok)throw new Error(`Failed to fetch tool names: ${i.statusText}`);return(await i.json()).tool_names??[]}async function rT(){const i=await fetch("/get_tool_stats");if(!i.ok)throw new Error(`Failed to fetch tool stats: ${i.statusText}`);return(await i.json()).stats??{}}async function cT(){const i=await fetch("/clear_tool_stats",{method:"POST"});if(!i.ok)throw new Error(`Failed to clear tool stats: ${i.statusText}`)}async function uT(){const i=await fetch("/get_token_count_estimator_name");if(!i.ok)throw new Error(`Failed to fetch token estimator name: ${i.statusText}`);return(await i.json()).token_count_estimator_name??"unknown"}async function fT(){await fetch("/shutdown",{method:"PUT"})}const hT=[{id:"dashboard",label:"Dashboard",icon:"📊"},{id:"logs",label:"Logs",icon:"📝"},{id:"stats",label:"Statistics",icon:"📈"},{id:"sessions",label:"Sessions",icon:"📁"}];function dT(){const{state:i,dispatch:e}=Yi(),{currentView:a,sidebarCollapsed:s}=i,o=f=>{e({type:"SET_CURRENT_VIEW",view:f})},c=()=>{e({type:"TOGGLE_SIDEBAR"})},u=()=>{window.confirm("This will fully terminate the Smart Edit server.")&&(fT(),e({type:"SET_ERROR",error:"Shutting down ..."}),setTimeout(()=>window.close(),2e3))};return S.jsxs("aside",{className:`sidebar ${s?"collapsed":""}`,children:[S.jsxs("div",{className:"sidebar-header",children:[S.jsxs("div",{className:"sidebar-logo",children:[S.jsx("span",{className:"sidebar-logo-icon",children:"⚡"}),S.jsx("span",{className:"sidebar-logo-text",children:"Smart Edit"})]}),S.jsx("button",{className:"sidebar-toggle",onClick:c,title:s?"Expand sidebar":"Collapse sidebar",children:s?"→":"←"})]}),S.jsx("nav",{className:"sidebar-nav",children:hT.map(f=>S.jsxs("button",{className:`nav-item ${a===f.id?"active":""}`,onClick:()=>o(f.id),title:s?f.label:void 0,children:[S.jsx("span",{className:"nav-item-icon",children:f.icon}),S.jsx("span",{className:"nav-item-label",children:f.label})]},f.id))}),S.jsx("div",{className:"sidebar-footer",children:S.jsxs("button",{className:"nav-item shutdown-btn",onClick:u,title:s?"Shutdown Server":void 0,children:[S.jsx("span",{className:"nav-item-icon",children:"⏻"}),S.jsx("span",{className:"nav-item-label",children:"Shutdown"})]})})]})}function gT(){const{state:i,dispatch:e}=Yi(),a=()=>{const s=i.theme==="light"?"dark":"light";e({type:"SET_THEME",theme:s})};return S.jsxs("button",{className:"theme-toggle",onClick:a,children:[S.jsx("span",{className:"icon",children:i.theme==="dark"?"☀️":"🌙"}),S.jsx("span",{children:i.theme==="dark"?"Light":"Dark"})]})}const mT={dashboard:"Dashboard",logs:"Logs",stats:"Statistics",sessions:"Sessions"};function pT(){const{currentView:i,activeProject:e,connectionMode:a}=rn(),s=()=>{switch(a){case"streaming":return"Connected";case"polling":return"Polling";case"disconnected":return"Disconnected"}};return S.jsxs("header",{className:"topbar",children:[S.jsx("div",{className:"topbar-left",children:S.jsxs("div",{children:[S.jsx("h1",{className:"topbar-title",children:mT[i]}),e&&S.jsx("p",{className:"topbar-subtitle",children:e})]})}),S.jsxs("div",{className:"topbar-right",children:[S.jsxs("div",{className:"connection-indicator",children:[S.jsx("span",{className:`connection-dot ${a}`}),S.jsx("span",{children:s()})]}),S.jsx(gT,{})]})]})}function yT({children:i}){return S.jsxs("div",{className:"main-layout",children:[S.jsx(dT,{}),S.jsxs("div",{className:"main-content",children:[S.jsx(pT,{}),S.jsx("main",{className:"content-area",children:i})]})]})}function bT(i,e){const[a,s]=J.useState(i);return J.useEffect(()=>{const o=setTimeout(()=>{s(i)},e);return()=>{clearTimeout(o)}},[i,e]),a}const vT=/\[tool:\s*([^\]]+)\]/i;function cy(i){const e=i.match(vT);return e?e[1].trim():null}function _T(i,e){const a=bT(e.searchKeyword,200);return J.useMemo(()=>i.filter(s=>{if(e.logLevels.size>0&&!e.logLevels.has(s.level))return!1;if(e.toolNames.size>0){const o=cy(s.message);if(!o||!e.toolNames.has(o))return!1}if(a){const o=a.toLowerCase();if(!s.message.toLowerCase().includes(o))return!1}return!0}),[i,e.logLevels,e.toolNames,a])}function xT(i){return J.useMemo(()=>{const e=new Set;for(const a of i){const s=cy(a.message);s&&e.add(s)}return Array.from(e).sort()},[i])}const ST=1e3,TT=3;function MT(i){return i.startsWith("DEBUG")?"debug":i.startsWith("INFO")?"info":i.startsWith("WARNING")?"warning":i.startsWith("ERROR")?"error":"default"}function No(i,e){return{id:e,message:i,level:MT(i)}}function ET(){const{state:i,dispatch:e}=Yi(),a=J.useRef(null),s=J.useRef(null),o=J.useRef(0),c=J.useRef(i.maxLogIdx);c.current=i.maxLogIdx;const u=J.useCallback(async()=>{try{e({type:"SET_LOADING",isLoading:!0});const x=await Wp();e({type:"SET_TOOL_NAMES",toolNames:x});const T=await Fp(0),M=T.messages.map((A,z)=>No(A,z));e({type:"SET_LOGS",logs:M,maxIdx:T.max_idx}),e({type:"SET_ACTIVE_PROJECT",project:T.active_project}),e({type:"SET_ERROR",error:null})}catch(x){e({type:"SET_ERROR",error:x instanceof Error?x.message:String(x)})}finally{e({type:"SET_LOADING",isLoading:!1})}},[e]),f=J.useCallback(async()=>{try{const x=await Fp(c.current+1);if(o.current=0,x.messages.length>0)for(let T=0;T<x.messages.length;T++){const M=c.current+1+T,A=No(x.messages[T],M);e({type:"APPEND_LOG",log:A,maxIdx:M})}e({type:"SET_ACTIVE_PROJECT",project:x.active_project})}catch{o.current++,o.current>=TT&&window.close()}},[e]),d=J.useCallback(()=>{s.current===null&&(e({type:"SET_CONNECTION_MODE",mode:"polling"}),s.current=window.setInterval(f,ST))},[e,f]),m=J.useCallback(()=>{s.current!==null&&(clearInterval(s.current),s.current=null)},[]),p=J.useCallback(()=>{if(!window.EventSource)return!1;try{const x=new EventSource("/log_stream");a.current=x;let T=!1;return x.addEventListener("open",()=>{e({type:"SET_CONNECTION_MODE",mode:"streaming"}),m()}),x.addEventListener("history",M=>{T=!0;const A=JSON.parse(M.data),z=A.messages.map((H,Y)=>No(H,Y));e({type:"SET_LOGS",logs:z,maxIdx:A.maxIdx}),e({type:"SET_ACTIVE_PROJECT",project:A.activeProject})}),x.addEventListener("log",M=>{const A=JSON.parse(M.data),z=No(A.message,A.idx);e({type:"APPEND_LOG",log:z,maxIdx:A.idx}),e({type:"SET_ACTIVE_PROJECT",project:A.activeProject})}),x.addEventListener("toolNames",M=>{const A=JSON.parse(M.data);e({type:"SET_TOOL_NAMES",toolNames:A.toolNames})}),x.onerror=()=>{x.close(),a.current=null,e({type:"SET_CONNECTION_MODE",mode:"disconnected"}),T?d():u().then(()=>{d()})},!0}catch{return!1}},[e,m,u,d]),b=J.useCallback(()=>{a.current&&(a.current.close(),a.current=null),m(),p()||u().then(()=>{d()})},[p,m,u,d]);return J.useEffect(()=>((async()=>{const T=await Wp().catch(()=>[]);e({type:"SET_TOOL_NAMES",toolNames:T}),p()||(await u(),d())})(),()=>{a.current&&a.current.close(),m()}),[e,p,u,d,m]),J.useEffect(()=>{const x=()=>{document.visibilityState==="visible"&&i.connectionMode==="disconnected"&&b()};return document.addEventListener("visibilitychange",x),()=>document.removeEventListener("visibilitychange",x)},[i.connectionMode,b]),{reloadLogs:J.useCallback(async()=>{e({type:"CLEAR_LOGS"}),await u()},[e,u]),reconnect:b}}function AT({value:i,onChange:e,placeholder:a="Search...",className:s=""}){const o=u=>{e(u.target.value)},c=()=>{e("")};return S.jsxs("div",{className:`search-input-wrapper ${s}`,children:[S.jsx("span",{className:"search-input-icon",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("circle",{cx:"11",cy:"11",r:"8"}),S.jsx("path",{d:"m21 21-4.35-4.35"})]})}),S.jsx("input",{type:"text",className:"search-input",value:i,onChange:o,placeholder:a}),i&&S.jsx("button",{type:"button",className:"search-input-clear",onClick:c,"aria-label":"Clear search",children:S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M18 6 6 18"}),S.jsx("path",{d:"m6 6 12 12"})]})})]})}function Jp({options:i,selected:e,onChange:a,placeholder:s="Select...",className:o="",multiple:c=!0}){const[u,f]=J.useState(!1),d=J.useRef(null);J.useEffect(()=>{const x=T=>{d.current&&!d.current.contains(T.target)&&f(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const m=()=>{f(!u)},p=x=>{const T=new Set(e);T.has(x)?T.delete(x):(c||T.clear(),T.add(x)),a(T)},b=()=>{a(new Set)},_=()=>{if(e.size===0)return s;if(e.size===1){const x=Array.from(e)[0];return i.find(M=>M.value===x)?.label||x}return`${e.size} selected`};return S.jsxs("div",{className:`dropdown ${o}`,ref:d,children:[S.jsxs("button",{type:"button",className:"dropdown-trigger",onClick:m,children:[S.jsx("span",{className:"dropdown-text",children:_()}),S.jsx("span",{className:`dropdown-arrow ${u?"open":""}`,children:S.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),u&&S.jsxs("div",{className:"dropdown-menu",children:[c&&e.size>0&&S.jsx("button",{type:"button",className:"dropdown-clear",onClick:b,children:"Clear all"}),S.jsx("div",{className:"dropdown-options",children:i.map(x=>S.jsxs("label",{className:"dropdown-option",children:[S.jsx("input",{type:c?"checkbox":"radio",checked:e.has(x.value),onChange:()=>p(x.value)}),S.jsx("span",{className:"dropdown-option-label",children:x.label})]},x.value))})]})]})}const OT=[{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warning",label:"Warning"},{value:"error",label:"Error"}];function DT(){const{logs:i,logFilter:e}=rn(),a=ry(),s=xT(i),{reloadLogs:o}=ET(),[c,u]=J.useState(!1),f=s.map(T=>({value:T,label:T})),d=T=>{a({type:"SET_LOG_FILTER",filter:{searchKeyword:T}})},m=T=>{a({type:"SET_LOG_FILTER",filter:{logLevels:T}})},p=T=>{a({type:"SET_LOG_FILTER",filter:{toolNames:T}})},b=()=>{a({type:"CLEAR_LOG_FILTERS"})},_=async()=>{u(!0);try{await o()}finally{u(!1)}},x=e.searchKeyword||e.logLevels.size>0||e.toolNames.size>0;return S.jsxs("div",{className:"log-filter-bar",children:[S.jsx(AT,{value:e.searchKeyword,onChange:d,placeholder:"Search logs...",className:"log-filter-search"}),S.jsxs("div",{className:"log-filter-dropdowns",children:[S.jsx(Jp,{options:OT,selected:e.logLevels,onChange:m,placeholder:"Log Level",className:"log-filter-level"}),f.length>0&&S.jsx(Jp,{options:f,selected:e.toolNames,onChange:p,placeholder:"Tool",className:"log-filter-tool"}),S.jsx("button",{type:"button",className:`icon-btn reload-btn ${c?"spinning":""}`,onClick:_,disabled:c,title:"Reload logs",children:S.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}),S.jsx("path",{d:"M21 3v5h-5"})]})})]}),x&&S.jsx("button",{type:"button",className:"log-filter-clear btn",onClick:b,children:"Clear Filters"})]})}const CT={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function zT(i){return i.replace(/[<>&"'`]/g,e=>CT[e]??e)}function RT(i,e){if(e.length===0)return i;let a=zT(i);for(const s of e){const o=new RegExp(`\\b${wT(s)}\\b`,"gi");a=a.replace(o,'<span class="tool-name">$&</span>')}return a}function wT(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function NT({log:i}){const{toolNames:e}=rn(),a=J.useMemo(()=>RT(i.message,e),[i.message,e]);return S.jsx("div",{className:`log-${i.level}`,dangerouslySetInnerHTML:{__html:a+`
13
- `}})}function jT({logs:i,isLoading:e,totalCount:a}){const s=J.useRef(null),o=J.useRef(!0);J.useEffect(()=>{const u=s.current;if(!u)return;const f=()=>{o.current=u.scrollTop+u.clientHeight>=u.scrollHeight-10};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)},[]),J.useEffect(()=>{const u=s.current;u&&o.current&&(u.scrollTop=u.scrollHeight)},[i]);const c=i.length!==a;return e&&a===0?S.jsx("div",{className:"log-container",ref:s,children:S.jsx("div",{className:"loading",children:"Loading logs..."})}):a===0?S.jsx("div",{className:"log-container",ref:s,children:S.jsx("div",{className:"loading",children:"No log messages found."})}):i.length===0&&c?S.jsx("div",{className:"log-container",ref:s,children:S.jsx("div",{className:"loading",children:"No logs match the current filters."})}):S.jsxs("div",{className:"log-container",ref:s,children:[c&&S.jsxs("div",{className:"filter-stats",children:["Showing ",S.jsx("span",{className:"filter-stats-count",children:i.length})," of"," ",S.jsx("span",{className:"filter-stats-count",children:a})," logs"]}),i.map(u=>S.jsx(NT,{log:u},u.id))]})}function kT(){const{error:i}=rn();return i?S.jsx("div",{id:"error-container",children:S.jsx("div",{className:"error-message",children:i})}):null}function ci({children:i,title:e,subtitle:a,actions:s,className:o="",style:c}){return S.jsxs("div",{className:`card ${o}`,style:c,children:[(e||s)&&S.jsxs("div",{className:"card-header",children:[S.jsxs("div",{children:[e&&S.jsx("h3",{className:"card-title",children:e}),a&&S.jsx("p",{className:"card-subtitle",children:a})]}),s&&S.jsx("div",{className:"card-actions",children:s})]}),S.jsx("div",{className:"card-body",children:i})]})}function LT(){const{logs:i,logFilter:e,isLoading:a}=rn(),s=_T(i,e);return S.jsxs("div",{className:"log-panel",children:[S.jsx(kT,{}),S.jsxs(ci,{className:"log-card",style:{flex:1,display:"flex",flexDirection:"column"},children:[S.jsx("div",{className:"log-panel-header",children:S.jsx(DT,{})}),S.jsx("div",{className:"log-panel-content",children:S.jsx(jT,{logs:s,isLoading:a,totalCount:i.length})})]})]})}function uy(){const{dispatch:i}=Yi(),[e,a]=J.useState(!1),[s,o]=J.useState("unknown"),c=J.useCallback(async()=>{a(!0);try{const[f,d]=await Promise.all([rT(),uT()]);i({type:"SET_TOOL_STATS",stats:f}),o(d)}catch(f){console.error("Failed to load stats:",f)}finally{a(!1)}},[i]),u=J.useCallback(async()=>{try{await cT(),await c()}catch(f){console.error("Failed to clear stats:",f)}},[c]);return{loadStats:c,clearStats:u,isLoading:e,tokenEstimatorName:s}}function fy(i){return J.useMemo(()=>{if(!i)return{totalCalls:0,totalInputTokens:0,totalOutputTokens:0,totalTokens:0,toolCount:0,mostUsedTool:null,topTools:[]};const e=Object.entries(i);let a=0,s=0,o=0,c=null;const f=e.map(([d,m])=>(a+=m.num_times_called,s+=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:a,totalInputTokens:s,totalOutputTokens:o,totalTokens:s+o,toolCount:e.length,mostUsedTool:c,topTools:f}},[i])}function Js(i){return i>=1e6?(i/1e6).toFixed(1)+"M":i>=1e3?(i/1e3).toFixed(1)+"K":i.toString()}function ui({title:i,value:e,subtitle:a,icon:s,trend:o,className:c=""}){return S.jsxs("div",{className:`metric-card ${c}`,children:[S.jsxs("div",{className:"metric-card-header",children:[S.jsx("span",{className:"metric-card-title",children:i}),s&&S.jsx("span",{className:"metric-card-icon",children:s})]}),S.jsx("div",{className:"metric-card-value",children:e}),(a||o)&&S.jsxs("div",{className:"metric-card-footer",children:[a&&S.jsx("span",{className:"metric-card-subtitle",children:a}),o&&S.jsxs("span",{className:`metric-card-trend ${o.direction}`,children:[o.direction==="up"&&"+",o.direction==="down"&&"-",Math.abs(o.value),"%"]})]})]})}function za({value:i,duration:e=500,formatter:a=o=>o.toLocaleString(),className:s=""}){const[o,c]=J.useState(i),u=J.useRef(i),f=J.useRef(void 0);return J.useEffect(()=>{const d=u.current,m=i,p=performance.now(),b=_=>{const x=_-p,T=Math.min(x/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)}},[i,e]),S.jsx("span",{className:`live-counter ${s}`,children:a(o)})}const hy="label";function Ip(i,e){typeof i=="function"?i(e):i&&(i.current=e)}function HT(i,e){const a=i.options;a&&e&&Object.assign(a,e)}function dy(i,e){i.labels=e}function gy(i,e,a=hy){const s=[];i.datasets=e.map(o=>{const c=i.datasets.find(u=>u[a]===o[a]);return!c||!o.data||s.includes(c)?{...o}:(s.push(c),Object.assign(c,o),c)})}function BT(i,e=hy){const a={labels:[],datasets:[]};return dy(a,i.labels),gy(a,i.datasets,e),a}function UT(i,e){const{height:a=150,width:s=300,redraw:o=!1,datasetIdKey:c,type:u,data:f,options:d,plugins:m=[],fallbackContent:p,updateMode:b,..._}=i,x=J.useRef(null),T=J.useRef(null),M=()=>{x.current&&(T.current=new Fo(x.current,{type:u,data:BT(f,c),options:d&&{...d},plugins:m}),Ip(e,T.current))},A=()=>{Ip(e,null),T.current&&(T.current.destroy(),T.current=null)};return J.useEffect(()=>{!o&&T.current&&d&&HT(T.current,d)},[o,d]),J.useEffect(()=>{!o&&T.current&&dy(T.current.config.data,f.labels)},[o,f.labels]),J.useEffect(()=>{!o&&T.current&&f.datasets&&gy(T.current.config.data,f.datasets,c)},[o,f.datasets]),J.useEffect(()=>{T.current&&(o?(A(),setTimeout(M)):T.current.update(b))},[o,d,f.labels,f.datasets,b]),J.useEffect(()=>{T.current&&(A(),setTimeout(M))},[u]),J.useEffect(()=>(M(),()=>A()),[]),S.jsx("canvas",{ref:x,role:"img",height:a,width:s,..._,children:p})}const VT=J.forwardRef(UT);function my(i,e){return Fo.register(e),J.forwardRef((a,s)=>S.jsx(VT,{...a,ref:s,type:i}))}const YT=my("bar",u1),qT=my("pie",d1);function py(){const{theme:i}=rn();return J.useMemo(()=>({textColor:i==="dark"?"#ffffff":"#000000",gridColor:i==="dark"?"#444444":"#dddddd",legendColor:i==="dark"?"#ffffff":"#000000"}),[i])}function XT({toolStats:i,maxTools:e=8}){const a=py();if(!i||Object.keys(i).length===0)return S.jsx("div",{className:"chart-empty",children:S.jsx("p",{children:"No tool usage data available"})});const s=Object.entries(i).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:s.map(u=>u.name),datasets:[{label:"Input Tokens",data:s.map(u=>u.inputTokens),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"Output Tokens",data:s.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:a.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:a.gridColor},ticks:{color:a.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:a.textColor}}}};return S.jsx("div",{className:"chart-container",style:{height:Math.max(200,s.length*40)},children:S.jsx(YT,{data:o,options:c})})}const $p=["#101010","#1f1f1f","#2e2e2e","#3d3d3d","#4c4c4c","#5b5b5b","#6a6a6a","#797979","#888888","#979797","#a6a6a6","#b5b5b5","#c4c4c4","#d3d3d3","#e2e2e2"];function GT(i){return Array.from({length:i},(e,a)=>$p[a%$p.length])}function Bu({title:i,labels:e,data:a}){const{textColor:s}=py(),o=J.useMemo(()=>GT(e.length),[e.length]),c=J.useMemo(()=>({labels:e,datasets:[{data:a,backgroundColor:o}]}),[e,a,o]),u=J.useMemo(()=>({plugins:{legend:{display:!0,labels:{color:s}},datalabels:{display:!0,color:"white",font:{weight:"bold"},formatter:f=>f}}}),[s]);return S.jsxs("div",{className:"chart-group",children:[S.jsx("h3",{children:i}),S.jsx(qT,{data:c,options:u})]})}function QT(){return S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.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 Pp(){return S.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("circle",{cx:"12",cy:"12",r:"10"}),S.jsx("path",{d:"M12 6v12"}),S.jsx("path",{d:"M8 10h8"}),S.jsx("path",{d:"M8 14h8"})]})}function ZT(){return S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function KT(){const{toolStats:i}=rn(),{loadStats:e,clearStats:a,isLoading:s,tokenEstimatorName:o}=uy(),c=fy(i);J.useEffect(()=>{i||e()},[i,e]);const u=i?{names:Object.keys(i),counts:Object.values(i).map(f=>f.num_times_called),inputTokens:Object.values(i).map(f=>f.input_tokens),outputTokens:Object.values(i).map(f=>f.output_tokens)}:null;return S.jsxs("div",{className:"stats-panel",children:[S.jsxs("div",{className:"stats-panel-header",children:[S.jsxs("div",{className:"stats-panel-actions",children:[S.jsx("button",{className:"btn",onClick:e,disabled:s,children:s?"Loading...":"Refresh"}),S.jsx("button",{className:"btn",onClick:a,children:"Clear Stats"})]}),o&&S.jsxs("span",{className:"stats-estimator",children:["Token estimator: ",o]})]}),!i||Object.keys(i).length===0?S.jsx(ci,{children:S.jsxs("div",{className:"stats-empty",children:[S.jsx("p",{children:"No tool stats collected yet."}),S.jsx("p",{className:"stats-empty-hint",children:"Tool statistics will appear here once tools are used during the session."})]})}):S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"metrics-grid",children:[S.jsx(ui,{title:"Total Calls",value:S.jsx(za,{value:c.totalCalls}),subtitle:`${c.toolCount} tools used`,icon:S.jsx(ZT,{})}),S.jsx(ui,{title:"Input Tokens",value:S.jsx(za,{value:c.totalInputTokens,formatter:Js}),subtitle:"Total input",icon:S.jsx(Pp,{})}),S.jsx(ui,{title:"Output Tokens",value:S.jsx(za,{value:c.totalOutputTokens,formatter:Js}),subtitle:"Total output",icon:S.jsx(Pp,{})}),S.jsx(ui,{title:"Most Used Tool",value:c.mostUsedTool?.name||"-",subtitle:c.mostUsedTool?`${c.mostUsedTool.calls} calls`:void 0,icon:S.jsx(QT,{})})]}),S.jsxs("div",{className:"stats-charts-grid",children:[S.jsx(ci,{title:"Token Distribution by Tool",children:S.jsx(XT,{toolStats:i})}),S.jsx(ci,{title:"Call Distribution",children:u&&S.jsx(Bu,{title:"",labels:u.names,data:u.counts})})]}),S.jsx("div",{className:"stats-charts-row",children:S.jsx(ci,{title:"Token Breakdown",children:S.jsx("div",{className:"pie-charts-row",children:u&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"pie-chart-item",children:S.jsx(Bu,{title:"Input Tokens",labels:u.names,data:u.inputTokens})}),S.jsx("div",{className:"pie-chart-item",children:S.jsx(Bu,{title:"Output Tokens",labels:u.names,data:u.outputTokens})})]})})})})]})]})}const Uu="smart-edit-session-history";function Vu(i){return{id:i.id,startTime:i.startTime.toISOString(),endTime:i.endTime?i.endTime.toISOString():null,projectName:i.projectName,stats:i.stats,toolStats:i.toolStats}}function FT(i){return{id:i.id,startTime:new Date(i.startTime),endTime:i.endTime?new Date(i.endTime):null,projectName:i.projectName,stats:i.stats,toolStats:i.toolStats}}function WT(){const{state:i,dispatch:e}=Yi();J.useEffect(()=>{try{const f=localStorage.getItem(Uu);if(f){const m=JSON.parse(f).map(FT);e({type:"LOAD_SESSION_HISTORY",sessions:m})}}catch(f){console.error("Failed to load session history:",f)}},[e]),J.useEffect(()=>{try{const f=i.sessionHistory.map(Vu);localStorage.setItem(Uu,JSON.stringify(f))}catch(f){console.error("Failed to save session history:",f)}},[i.sessionHistory]);const a=J.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]),s=J.useCallback(()=>{if(i.currentSession&&i.toolStats){const f=Object.values(i.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={...i.currentSession,stats:f,toolStats:i.toolStats};e({type:"START_SESSION",session:d})}e({type:"END_SESSION"})},[e,i.currentSession,i.toolStats]),o=J.useCallback(()=>{e({type:"CLEAR_SESSION_HISTORY"}),localStorage.removeItem(Uu)},[e]),c=J.useCallback(f=>{const d={...Vu(f),exportedAt:new Date().toISOString()};return JSON.stringify(d,null,2)},[]),u=J.useCallback(()=>{const f={sessions:i.sessionHistory.map(Vu),exportedAt:new Date().toISOString()};return JSON.stringify(f,null,2)},[i.sessionHistory]);return{currentSession:i.currentSession,sessionHistory:i.sessionHistory,startSession:a,endSession:s,clearHistory:o,exportSession:c,exportAllSessions:u}}function JT(i){return i.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function t0(i){return i.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function IT(i,e){if(!e)return"In progress";const a=e.getTime()-i.getTime(),s=Math.floor(a/(1e3*60*60)),o=Math.floor(a%(1e3*60*60)/(1e3*60));return s>0?`${s}h ${o}m`:`${o}m`}function $T({sessions:i,onExport:e}){return i.length===0?S.jsxs("div",{className:"session-list-empty",children:[S.jsx("p",{children:"No session history available."}),S.jsx("p",{className:"session-list-empty-hint",children:"Session history will appear here as you use Smart Edit."})]}):S.jsx("div",{className:"session-list",children:i.map(a=>S.jsxs("div",{className:"session-item",children:[S.jsxs("div",{className:"session-item-header",children:[S.jsxs("div",{className:"session-item-info",children:[S.jsx("span",{className:"session-item-date",children:JT(a.startTime)}),S.jsxs("span",{className:"session-item-time",children:[t0(a.startTime),a.endTime&&` - ${t0(a.endTime)}`]})]}),S.jsx("span",{className:"session-item-duration",children:IT(a.startTime,a.endTime)})]}),a.projectName&&S.jsx("div",{className:"session-item-project",children:a.projectName}),S.jsxs("div",{className:"session-item-stats",children:[S.jsxs("div",{className:"session-stat",children:[S.jsx("span",{className:"session-stat-label",children:"Calls"}),S.jsx("span",{className:"session-stat-value",children:a.stats.totalCalls})]}),S.jsxs("div",{className:"session-stat",children:[S.jsx("span",{className:"session-stat-label",children:"Input"}),S.jsx("span",{className:"session-stat-value",children:Js(a.stats.totalInputTokens)})]}),S.jsxs("div",{className:"session-stat",children:[S.jsx("span",{className:"session-stat-label",children:"Output"}),S.jsx("span",{className:"session-stat-value",children:Js(a.stats.totalOutputTokens)})]})]}),S.jsx("div",{className:"session-item-actions",children:S.jsxs("button",{type:"button",className:"session-action-btn",onClick:()=>e(a),title:"Export session as JSON",children:[S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),S.jsx("polyline",{points:"7 10 12 15 17 10"}),S.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),"Export"]})})]},a.id))})}function PT({getData:i,filename:e,label:a="Export All",className:s=""}){const o=J.useCallback(()=>{const c=i(),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)},[i,e]);return S.jsxs("button",{type:"button",className:`btn export-btn ${s}`,onClick:o,children:[S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{marginRight:"6px"},children:[S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),S.jsx("polyline",{points:"7 10 12 15 17 10"}),S.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),a]})}function tM(i,e){const a=new Blob([i],{type:"application/json"}),s=URL.createObjectURL(a),o=document.createElement("a");o.href=s,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(s)}function eM(){const{sessionHistory:i,clearHistory:e,exportSession:a,exportAllSessions:s}=WT(),o=J.useCallback(u=>{const f=a(u),d=u.startTime.toISOString().split("T")[0];tM(f,`smart-edit-session-${d}.json`)},[a]),c=J.useCallback(()=>s(),[s]);return S.jsx("div",{className:"session-panel",children:S.jsxs(ci,{children:[S.jsxs("div",{className:"session-panel-header",children:[S.jsxs("div",{children:[S.jsx("h3",{className:"session-panel-title",children:"Session History"}),S.jsxs("p",{className:"session-panel-subtitle",children:[i.length," session",i.length!==1?"s":""," recorded"]})]}),S.jsx("div",{className:"session-panel-actions",children:i.length>0&&S.jsxs(S.Fragment,{children:[S.jsx(PT,{getData:c,filename:`smart-edit-sessions-${new Date().toISOString().split("T")[0]}.json`,label:"Export All"}),S.jsx("button",{type:"button",className:"btn btn-danger",onClick:e,children:"Clear History"})]})})]}),S.jsx($T,{sessions:i,onExport:o})]})})}function e0(){return S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function n0(){return S.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("path",{d:"M14 2v6h6"}),S.jsx("path",{d:"M16 13H8"}),S.jsx("path",{d:"M16 17H8"}),S.jsx("path",{d:"M10 9H8"})]})}function i0(){return S.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("circle",{cx:"12",cy:"12",r:"10"}),S.jsx("path",{d:"M12 6v12"}),S.jsx("path",{d:"M8 10h8"}),S.jsx("path",{d:"M8 14h8"})]})}function nM(){return S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.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 Yu({title:i,description:e,icon:a,view:s}){const o=ry(),c=()=>{o({type:"SET_CURRENT_VIEW",view:s})};return S.jsxs("button",{type:"button",className:"quick-nav-card",onClick:c,children:[S.jsx("div",{className:"quick-nav-icon",children:a}),S.jsxs("div",{className:"quick-nav-content",children:[S.jsx("h4",{className:"quick-nav-title",children:i}),S.jsx("p",{className:"quick-nav-description",children:e})]}),S.jsx("svg",{className:"quick-nav-arrow",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M9 18l6-6-6-6"})})]})}function iM(){const{logs:i,toolStats:e,connectionMode:a,activeProject:s}=rn(),{loadStats:o}=uy(),c=fy(e);return J.useEffect(()=>{e||o()},[e,o]),S.jsxs("div",{className:"dashboard-overview",children:[S.jsx(ci,{children:S.jsxs("div",{className:"welcome-section",children:[S.jsxs("div",{className:"welcome-content",children:[S.jsx("h2",{className:"welcome-title",children:s?`Welcome to ${s}`:"Welcome to Smart Edit"}),S.jsx("p",{className:"welcome-description",children:"Monitor your coding sessions, view logs, and analyze tool usage statistics."})]}),S.jsx("div",{className:"connection-badge",children:S.jsxs("span",{className:`connection-status ${a}`,children:[a==="streaming"&&"Connected",a==="polling"&&"Polling",a==="disconnected"&&"Disconnected"]})})]})}),S.jsxs("div",{className:"metrics-grid",children:[S.jsx(ui,{title:"Log Entries",value:S.jsx(za,{value:i.length}),subtitle:"Current session",icon:S.jsx(n0,{})}),S.jsx(ui,{title:"Tool Calls",value:S.jsx(za,{value:c.totalCalls}),subtitle:`${c.toolCount} tools used`,icon:S.jsx(e0,{})}),S.jsx(ui,{title:"Total Tokens",value:S.jsx(za,{value:c.totalTokens,formatter:Js}),subtitle:"Input + Output",icon:S.jsx(i0,{})}),S.jsx(ui,{title:"Top Tool",value:c.mostUsedTool?.name||"-",subtitle:c.mostUsedTool?`${c.mostUsedTool.calls} calls`:"No data",icon:S.jsx(nM,{})})]}),S.jsx(ci,{title:"Quick Navigation",children:S.jsxs("div",{className:"quick-nav-grid",children:[S.jsx(Yu,{title:"View Logs",description:"Real-time log stream with filtering",icon:S.jsx(n0,{}),view:"logs"}),S.jsx(Yu,{title:"Statistics",description:"Tool usage and token analytics",icon:S.jsx(e0,{}),view:"stats"}),S.jsx(Yu,{title:"Sessions",description:"Session history and export",icon:S.jsx(i0,{}),view:"sessions"})]})})]})}function aM(){return S.jsx(iM,{})}function sM(){return S.jsx(LT,{})}function lM(){return S.jsx(KT,{})}function oM(){return S.jsx(eM,{})}function rM(){const{currentView:i}=rn();return{dashboard:S.jsx(aM,{}),logs:S.jsx(sM,{}),stats:S.jsx(lM,{}),sessions:S.jsx(oM,{})}[i]}function cM(){const{theme:i,activeProject:e}=rn();return J.useEffect(()=>{document.documentElement.setAttribute("data-theme",i)},[i]),J.useEffect(()=>{document.title=e?`${e} – Smart Edit Dashboard`:"Smart Edit Dashboard"},[e]),S.jsx(yT,{children:S.jsx(rM,{})})}function uM(){return S.jsx(oT,{children:S.jsx(cM,{})})}Fo.register(Y0,Z0,Wo,G0,D2,R2,g2,M2,p2,r2,nT);const yy=document.getElementById("root");if(!yy)throw new Error("Root element not found");Jv.createRoot(yy).render(S.jsx(J.StrictMode,{children:S.jsx(uM,{})}));
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&&gt!==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&&gt!==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(`
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={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};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,{})}));