mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 17:40:46 -04:00
12 lines
330 KiB
JavaScript
12 lines
330 KiB
JavaScript
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const y of d.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&c(y)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();var oc={exports:{}},Za={};var sm;function I0(){if(sm)return Za;sm=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(c,f,d){var y=null;if(d!==void 0&&(y=""+d),f.key!==void 0&&(y=""+f.key),"key"in f){d={};for(var g in f)g!=="key"&&(d[g]=f[g])}else d=f;return f=d.ref,{$$typeof:i,type:c,key:y,ref:f!==void 0?f:null,props:d}}return Za.Fragment=a,Za.jsx=s,Za.jsxs=s,Za}var rm;function P0(){return rm||(rm=1,oc.exports=I0()),oc.exports}var h=P0(),fc={exports:{}},ae={};var cm;function ev(){if(cm)return ae;cm=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),y=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),M=Symbol.iterator;function C(A){return A===null||typeof A!="object"?null:(A=M&&A[M]||A["@@iterator"],typeof A=="function"?A:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,q={};function Y(A,L,K){this.props=A,this.context=L,this.refs=q,this.updater=K||z}Y.prototype.isReactComponent={},Y.prototype.setState=function(A,L){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,L,"setState")},Y.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Q(){}Q.prototype=Y.prototype;function V(A,L,K){this.props=A,this.context=L,this.refs=q,this.updater=K||z}var J=V.prototype=new Q;J.constructor=V,H(J,Y.prototype),J.isPureReactComponent=!0;var k=Array.isArray;function G(){}var X={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(A,L,K){var W=K.ref;return{$$typeof:i,type:A,key:L,ref:W!==void 0?W:null,props:K}}function le(A,L){return $(A.type,L,A.props)}function je(A){return typeof A=="object"&&A!==null&&A.$$typeof===i}function Le(A){var L={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(K){return L[K]})}var Lt=/\/+/g;function kt(A,L){return typeof A=="object"&&A!==null&&A.key!=null?Le(""+A.key):L.toString(36)}function rt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(G,G):(A.status="pending",A.then(function(L){A.status==="pending"&&(A.status="fulfilled",A.value=L)},function(L){A.status==="pending"&&(A.status="rejected",A.reason=L)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function D(A,L,K,W,ie){var re=typeof A;(re==="undefined"||re==="boolean")&&(A=null);var xe=!1;if(A===null)xe=!0;else switch(re){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(A.$$typeof){case i:case a:xe=!0;break;case S:return xe=A._init,D(xe(A._payload),L,K,W,ie)}}if(xe)return ie=ie(A),xe=W===""?"."+kt(A,0):W,k(ie)?(K="",xe!=null&&(K=xe.replace(Lt,"$&/")+"/"),D(ie,L,K,"",function(Pl){return Pl})):ie!=null&&(je(ie)&&(ie=le(ie,K+(ie.key==null||A&&A.key===ie.key?"":(""+ie.key).replace(Lt,"$&/")+"/")+xe)),L.push(ie)),1;xe=0;var Ie=W===""?".":W+":";if(k(A))for(var ze=0;ze<A.length;ze++)W=A[ze],re=Ie+kt(W,ze),xe+=D(W,L,K,re,ie);else if(ze=C(A),typeof ze=="function")for(A=ze.call(A),ze=0;!(W=A.next()).done;)W=W.value,re=Ie+kt(W,ze++),xe+=D(W,L,K,re,ie);else if(re==="object"){if(typeof A.then=="function")return D(rt(A),L,K,W,ie);throw L=String(A),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Z(A,L,K){if(A==null)return A;var W=[],ie=0;return D(A,W,"","",function(re){return L.call(K,re,ie++)}),W}function ne(A){if(A._status===-1){var L=A._result;L=L(),L.then(function(K){(A._status===0||A._status===-1)&&(A._status=1,A._result=K)},function(K){(A._status===0||A._status===-1)&&(A._status=2,A._result=K)}),A._status===-1&&(A._status=0,A._result=L)}if(A._status===1)return A._result.default;throw A._result}var be=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},pe={map:Z,forEach:function(A,L,K){Z(A,function(){L.apply(this,arguments)},K)},count:function(A){var L=0;return Z(A,function(){L++}),L},toArray:function(A){return Z(A,function(L){return L})||[]},only:function(A){if(!je(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ae.Activity=_,ae.Children=pe,ae.Component=Y,ae.Fragment=s,ae.Profiler=f,ae.PureComponent=V,ae.StrictMode=c,ae.Suspense=p,ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ae.__COMPILER_RUNTIME={__proto__:null,c:function(A){return X.H.useMemoCache(A)}},ae.cache=function(A){return function(){return A.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(A,L,K){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var W=H({},A.props),ie=A.key;if(L!=null)for(re in L.key!==void 0&&(ie=""+L.key),L)!P.call(L,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&L.ref===void 0||(W[re]=L[re]);var re=arguments.length-2;if(re===1)W.children=K;else if(1<re){for(var xe=Array(re),Ie=0;Ie<re;Ie++)xe[Ie]=arguments[Ie+2];W.children=xe}return $(A.type,ie,W)},ae.createContext=function(A){return A={$$typeof:y,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},ae.createElement=function(A,L,K){var W,ie={},re=null;if(L!=null)for(W in L.key!==void 0&&(re=""+L.key),L)P.call(L,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ie[W]=L[W]);var xe=arguments.length-2;if(xe===1)ie.children=K;else if(1<xe){for(var Ie=Array(xe),ze=0;ze<xe;ze++)Ie[ze]=arguments[ze+2];ie.children=Ie}if(A&&A.defaultProps)for(W in xe=A.defaultProps,xe)ie[W]===void 0&&(ie[W]=xe[W]);return $(A,re,ie)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(A){return{$$typeof:g,render:A}},ae.isValidElement=je,ae.lazy=function(A){return{$$typeof:S,_payload:{_status:-1,_result:A},_init:ne}},ae.memo=function(A,L){return{$$typeof:v,type:A,compare:L===void 0?null:L}},ae.startTransition=function(A){var L=X.T,K={};X.T=K;try{var W=A(),ie=X.S;ie!==null&&ie(K,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(G,be)}catch(re){be(re)}finally{L!==null&&K.types!==null&&(L.types=K.types),X.T=L}},ae.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ae.use=function(A){return X.H.use(A)},ae.useActionState=function(A,L,K){return X.H.useActionState(A,L,K)},ae.useCallback=function(A,L){return X.H.useCallback(A,L)},ae.useContext=function(A){return X.H.useContext(A)},ae.useDebugValue=function(){},ae.useDeferredValue=function(A,L){return X.H.useDeferredValue(A,L)},ae.useEffect=function(A,L){return X.H.useEffect(A,L)},ae.useEffectEvent=function(A){return X.H.useEffectEvent(A)},ae.useId=function(){return X.H.useId()},ae.useImperativeHandle=function(A,L,K){return X.H.useImperativeHandle(A,L,K)},ae.useInsertionEffect=function(A,L){return X.H.useInsertionEffect(A,L)},ae.useLayoutEffect=function(A,L){return X.H.useLayoutEffect(A,L)},ae.useMemo=function(A,L){return X.H.useMemo(A,L)},ae.useOptimistic=function(A,L){return X.H.useOptimistic(A,L)},ae.useReducer=function(A,L,K){return X.H.useReducer(A,L,K)},ae.useRef=function(A){return X.H.useRef(A)},ae.useState=function(A){return X.H.useState(A)},ae.useSyncExternalStore=function(A,L,K){return X.H.useSyncExternalStore(A,L,K)},ae.useTransition=function(){return X.H.useTransition()},ae.version="19.2.0",ae}var om;function qc(){return om||(om=1,fc.exports=ev()),fc.exports}var b=qc(),dc={exports:{}},Ka={},hc={exports:{}},mc={};var fm;function tv(){return fm||(fm=1,(function(i){function a(D,Z){var ne=D.length;D.push(Z);e:for(;0<ne;){var be=ne-1>>>1,pe=D[be];if(0<f(pe,Z))D[be]=Z,D[ne]=pe,ne=be;else break e}}function s(D){return D.length===0?null:D[0]}function c(D){if(D.length===0)return null;var Z=D[0],ne=D.pop();if(ne!==Z){D[0]=ne;e:for(var be=0,pe=D.length,A=pe>>>1;be<A;){var L=2*(be+1)-1,K=D[L],W=L+1,ie=D[W];if(0>f(K,ne))W<pe&&0>f(ie,K)?(D[be]=ie,D[W]=ne,be=W):(D[be]=K,D[L]=ne,be=L);else if(W<pe&&0>f(ie,ne))D[be]=ie,D[W]=ne,be=W;else break e}}return Z}function f(D,Z){var ne=D.sortIndex-Z.sortIndex;return ne!==0?ne:D.id-Z.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;i.unstable_now=function(){return d.now()}}else{var y=Date,g=y.now();i.unstable_now=function(){return y.now()-g}}var p=[],v=[],S=1,_=null,M=3,C=!1,z=!1,H=!1,q=!1,Y=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function J(D){for(var Z=s(v);Z!==null;){if(Z.callback===null)c(v);else if(Z.startTime<=D)c(v),Z.sortIndex=Z.expirationTime,a(p,Z);else break;Z=s(v)}}function k(D){if(H=!1,J(D),!z)if(s(p)!==null)z=!0,G||(G=!0,Le());else{var Z=s(v);Z!==null&&rt(k,Z.startTime-D)}}var G=!1,X=-1,P=5,$=-1;function le(){return q?!0:!(i.unstable_now()-$<P)}function je(){if(q=!1,G){var D=i.unstable_now();$=D;var Z=!0;try{e:{z=!1,H&&(H=!1,Q(X),X=-1),C=!0;var ne=M;try{t:{for(J(D),_=s(p);_!==null&&!(_.expirationTime>D&&le());){var be=_.callback;if(typeof be=="function"){_.callback=null,M=_.priorityLevel;var pe=be(_.expirationTime<=D);if(D=i.unstable_now(),typeof pe=="function"){_.callback=pe,J(D),Z=!0;break t}_===s(p)&&c(p),J(D)}else c(p);_=s(p)}if(_!==null)Z=!0;else{var A=s(v);A!==null&&rt(k,A.startTime-D),Z=!1}}break e}finally{_=null,M=ne,C=!1}Z=void 0}}finally{Z?Le():G=!1}}}var Le;if(typeof V=="function")Le=function(){V(je)};else if(typeof MessageChannel<"u"){var Lt=new MessageChannel,kt=Lt.port2;Lt.port1.onmessage=je,Le=function(){kt.postMessage(null)}}else Le=function(){Y(je,0)};function rt(D,Z){X=Y(function(){D(i.unstable_now())},Z)}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(D){D.callback=null},i.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<D?Math.floor(1e3/D):5},i.unstable_getCurrentPriorityLevel=function(){return M},i.unstable_next=function(D){switch(M){case 1:case 2:case 3:var Z=3;break;default:Z=M}var ne=M;M=Z;try{return D()}finally{M=ne}},i.unstable_requestPaint=function(){q=!0},i.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ne=M;M=D;try{return Z()}finally{M=ne}},i.unstable_scheduleCallback=function(D,Z,ne){var be=i.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?be+ne:be):ne=be,D){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=ne+pe,D={id:S++,callback:Z,priorityLevel:D,startTime:ne,expirationTime:pe,sortIndex:-1},ne>be?(D.sortIndex=ne,a(v,D),s(p)===null&&D===s(v)&&(H?(Q(X),X=-1):H=!0,rt(k,ne-be))):(D.sortIndex=pe,a(p,D),z||C||(z=!0,G||(G=!0,Le()))),D},i.unstable_shouldYield=le,i.unstable_wrapCallback=function(D){var Z=M;return function(){var ne=M;M=Z;try{return D.apply(this,arguments)}finally{M=ne}}}})(mc)),mc}var dm;function nv(){return dm||(dm=1,hc.exports=tv()),hc.exports}var pc={exports:{}},We={};var hm;function lv(){if(hm)return We;hm=1;var i=qc();function a(p){var v="https://react.dev/errors/"+p;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+p+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var c={d:{f:s,r:function(){throw Error(a(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(p,v,S){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:_==null?null:""+_,children:p,containerInfo:v,implementation:S}}var y=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(p,v){if(p==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return We.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,We.createPortal=function(p,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(a(299));return d(p,v,null,S)},We.flushSync=function(p){var v=y.T,S=c.p;try{if(y.T=null,c.p=2,p)return p()}finally{y.T=v,c.p=S,c.d.f()}},We.preconnect=function(p,v){typeof p=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,c.d.C(p,v))},We.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},We.preinit=function(p,v){if(typeof p=="string"&&v&&typeof v.as=="string"){var S=v.as,_=g(S,v.crossOrigin),M=typeof v.integrity=="string"?v.integrity:void 0,C=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?c.d.S(p,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:_,integrity:M,fetchPriority:C}):S==="script"&&c.d.X(p,{crossOrigin:_,integrity:M,fetchPriority:C,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},We.preinitModule=function(p,v){if(typeof p=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=g(v.as,v.crossOrigin);c.d.M(p,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&c.d.M(p)},We.preload=function(p,v){if(typeof p=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,_=g(S,v.crossOrigin);c.d.L(p,S,{crossOrigin:_,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},We.preloadModule=function(p,v){if(typeof p=="string")if(v){var S=g(v.as,v.crossOrigin);c.d.m(p,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else c.d.m(p)},We.requestFormReset=function(p){c.d.r(p)},We.unstable_batchedUpdates=function(p,v){return p(v)},We.useFormState=function(p,v,S){return y.H.useFormState(p,v,S)},We.useFormStatus=function(){return y.H.useHostTransitionStatus()},We.version="19.2.0",We}var mm;function av(){if(mm)return pc.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(a){console.error(a)}}return i(),pc.exports=lv(),pc.exports}var pm;function iv(){if(pm)return Ka;pm=1;var i=nv(),a=qc(),s=av();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function y(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(c(188))}function v(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,l=t;;){var u=n.return;if(u===null)break;var r=u.alternate;if(r===null){if(l=u.return,l!==null){n=l;continue}break}if(u.child===r.child){for(r=u.child;r;){if(r===n)return p(u),e;if(r===l)return p(u),t;r=r.sibling}throw Error(c(188))}if(n.return!==l.return)n=u,l=r;else{for(var o=!1,m=u.child;m;){if(m===n){o=!0,n=u,l=r;break}if(m===l){o=!0,l=u,n=r;break}m=m.sibling}if(!o){for(m=r.child;m;){if(m===n){o=!0,n=r,l=u;break}if(m===l){o=!0,l=r,n=u;break}m=m.sibling}if(!o)throw Error(c(189))}}if(n.alternate!==l)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var _=Object.assign,M=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),V=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),je=Symbol.iterator;function Le(e){return e===null||typeof e!="object"?null:(e=je&&e[je]||e["@@iterator"],typeof e=="function"?e:null)}var Lt=Symbol.for("react.client.reference");function kt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Lt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case Y:return"Profiler";case q:return"StrictMode";case k:return"Suspense";case G:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case V:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:kt(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return kt(e(t))}catch{}}return null}var rt=Array.isArray,D=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},be=[],pe=-1;function A(e){return{current:e}}function L(e){0>pe||(e.current=be[pe],be[pe]=null,pe--)}function K(e,t){pe++,be[pe]=e.current,e.current=t}var W=A(null),ie=A(null),re=A(null),xe=A(null);function Ie(e,t){switch(K(re,t),K(ie,e),K(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jh(t),e=Oh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(W),K(W,e)}function ze(){L(W),L(ie),L(re)}function Pl(e){e.memoizedState!==null&&K(xe,e);var t=W.current,n=Oh(t,e.type);t!==n&&(K(ie,e),K(W,n))}function ii(e){ie.current===e&&(L(W),L(ie)),xe.current===e&&(L(xe),Va._currentValue=ne)}var Zu,ao;function Vn(e){if(Zu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zu=t&&t[1]||"",ao=-1<n.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Zu+e+ao}var Ku=!1;function Ju(e,t){if(!e||Ku)return"";Ku=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(O){var j=O}Reflect.construct(e,[],U)}else{try{U.call()}catch(O){j=O}e.call(U.prototype)}}else{try{throw Error()}catch(O){j=O}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(O){if(O&&j&&typeof O.stack=="string")return[O.stack,j.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=l.DetermineComponentFrameRoot(),o=r[0],m=r[1];if(o&&m){var x=o.split(`
|
||
`),R=m.split(`
|
||
`);for(u=l=0;l<x.length&&!x[l].includes("DetermineComponentFrameRoot");)l++;for(;u<R.length&&!R[u].includes("DetermineComponentFrameRoot");)u++;if(l===x.length||u===R.length)for(l=x.length-1,u=R.length-1;1<=l&&0<=u&&x[l]!==R[u];)u--;for(;1<=l&&0<=u;l--,u--)if(x[l]!==R[u]){if(l!==1||u!==1)do if(l--,u--,0>u||x[l]!==R[u]){var w=`
|
||
`+x[l].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),w}while(1<=l&&0<=u);break}}}finally{Ku=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Vn(n):""}function Mp(e,t){switch(e.tag){case 26:case 27:case 5:return Vn(e.type);case 16:return Vn("Lazy");case 13:return e.child!==t&&t!==null?Vn("Suspense Fallback"):Vn("Suspense");case 19:return Vn("SuspenseList");case 0:case 15:return Ju(e.type,!1);case 11:return Ju(e.type.render,!1);case 1:return Ju(e.type,!0);case 31:return Vn("Activity");default:return""}}function io(e){try{var t="",n=null;do t+=Mp(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
||
Error generating stack: `+l.message+`
|
||
`+l.stack}}var $u=Object.prototype.hasOwnProperty,Fu=i.unstable_scheduleCallback,Wu=i.unstable_cancelCallback,jp=i.unstable_shouldYield,Op=i.unstable_requestPaint,ct=i.unstable_now,wp=i.unstable_getCurrentPriorityLevel,uo=i.unstable_ImmediatePriority,so=i.unstable_UserBlockingPriority,ui=i.unstable_NormalPriority,Dp=i.unstable_LowPriority,ro=i.unstable_IdlePriority,zp=i.log,Bp=i.unstable_setDisableYieldValue,ea=null,ot=null;function yn(e){if(typeof zp=="function"&&Bp(e),ot&&typeof ot.setStrictMode=="function")try{ot.setStrictMode(ea,e)}catch{}}var ft=Math.clz32?Math.clz32:kp,Up=Math.log,Lp=Math.LN2;function kp(e){return e>>>=0,e===0?32:31-(Up(e)/Lp|0)|0}var si=256,ri=262144,ci=4194304;function Gn(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function oi(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var u=0,r=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~r,l!==0?u=Gn(l):(o&=m,o!==0?u=Gn(o):n||(n=m&~e,n!==0&&(u=Gn(n))))):(m=l&~r,m!==0?u=Gn(m):o!==0?u=Gn(o):n||(n=l&~e,n!==0&&(u=Gn(n)))),u===0?0:t!==0&&t!==u&&(t&r)===0&&(r=u&-u,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:u}function ta(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Hp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 co(){var e=ci;return ci<<=1,(ci&62914560)===0&&(ci=4194304),e}function Iu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function na(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qp(e,t,n,l,u,r){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var m=e.entanglements,x=e.expirationTimes,R=e.hiddenUpdates;for(n=o&~n;0<n;){var w=31-ft(n),U=1<<w;m[w]=0,x[w]=-1;var j=R[w];if(j!==null)for(R[w]=null,w=0;w<j.length;w++){var O=j[w];O!==null&&(O.lane&=-536870913)}n&=~U}l!==0&&oo(e,l,0),r!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=r&~(o&~t))}function oo(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ft(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function fo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-ft(n),u=1<<l;u&t|e[l]&t&&(e[l]|=t),n&=~u}}function ho(e,t){var n=t&-t;return n=(n&42)!==0?1:Pu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Pu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function es(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mo(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:em(e.type))}function po(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var vn=Math.random().toString(36).slice(2),Ze="__reactFiber$"+vn,tt="__reactProps$"+vn,ol="__reactContainer$"+vn,ts="__reactEvents$"+vn,Yp="__reactListeners$"+vn,Vp="__reactHandles$"+vn,yo="__reactResources$"+vn,la="__reactMarker$"+vn;function ns(e){delete e[Ze],delete e[tt],delete e[ts],delete e[Yp],delete e[Vp]}function fl(e){var t=e[Ze];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ol]||n[Ze]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=kh(e);e!==null;){if(n=e[Ze])return n;e=kh(e)}return t}e=n,n=e.parentNode}return null}function dl(e){if(e=e[Ze]||e[ol]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function aa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function hl(e){var t=e[yo];return t||(t=e[yo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Xe(e){e[la]=!0}var vo=new Set,go={};function Xn(e,t){ml(e,t),ml(e+"Capture",t)}function ml(e,t){for(go[e]=t,e=0;e<t.length;e++)vo.add(t[e])}var Gp=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]*$"),bo={},xo={};function Xp(e){return $u.call(xo,e)?!0:$u.call(bo,e)?!1:Gp.test(e)?xo[e]=!0:(bo[e]=!0,!1)}function fi(e,t,n){if(Xp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function di(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Zt(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function So(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qp(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,r=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(o){n=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ls(e){if(!e._valueTracker){var t=So(e)?"checked":"value";e._valueTracker=Qp(e,t,""+e[t])}}function Eo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=So(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function hi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Zp=/[\n"\\]/g;function xt(e){return e.replace(Zp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function as(e,t,n,l,u,r,o,m){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bt(t)):e.value!==""+bt(t)&&(e.value=""+bt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?is(e,o,bt(t)):n!=null?is(e,o,bt(n)):l!=null&&e.removeAttribute("value"),u==null&&r!=null&&(e.defaultChecked=!!r),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+bt(m):e.removeAttribute("name")}function Ao(e,t,n,l,u,r,o,m){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){ls(e);return}n=n!=null?""+bt(n):"",t=t!=null?""+bt(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),ls(e)}function is(e,t,n){t==="number"&&hi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function pl(e,t,n,l){if(e=e.options,t){t={};for(var u=0;u<n.length;u++)t["$"+n[u]]=!0;for(n=0;n<e.length;n++)u=t.hasOwnProperty("$"+e[n].value),e[n].selected!==u&&(e[n].selected=u),u&&l&&(e[n].defaultSelected=!0)}else{for(n=""+bt(n),t=null,u=0;u<e.length;u++){if(e[u].value===n){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function _o(e,t,n){if(t!=null&&(t=""+bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+bt(n):""}function To(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(c(92));if(rt(l)){if(1<l.length)throw Error(c(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=bt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),ls(e)}function yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kp=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 Co(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Kp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function No(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in t)l=t[u],t.hasOwnProperty(u)&&n[u]!==l&&Co(e,u,l)}else for(var r in t)t.hasOwnProperty(r)&&Co(e,r,t[r])}function us(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Jp=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"]]),$p=/^[\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 mi(e){return $p.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kt(){}var ss=null;function rs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vl=null,gl=null;function Ro(e){var t=dl(e);if(t&&(e=t.stateNode)){var n=e[tt]||null;e:switch(e=t.stateNode,t.type){case"input":if(as(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+xt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var u=l[tt]||null;if(!u)throw Error(c(90));as(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Eo(l)}break e;case"textarea":_o(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&pl(e,!!n.multiple,t,!1)}}}var cs=!1;function Mo(e,t,n){if(cs)return e(t,n);cs=!0;try{var l=e(t);return l}finally{if(cs=!1,(vl!==null||gl!==null)&&(tu(),vl&&(t=vl,e=gl,gl=vl=null,Ro(t),e)))for(t=0;t<e.length;t++)Ro(e[t])}}function ia(e,t){var n=e.stateNode;if(n===null)return null;var l=n[tt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var Jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),os=!1;if(Jt)try{var ua={};Object.defineProperty(ua,"passive",{get:function(){os=!0}}),window.addEventListener("test",ua,ua),window.removeEventListener("test",ua,ua)}catch{os=!1}var gn=null,fs=null,pi=null;function jo(){if(pi)return pi;var e,t=fs,n=t.length,l,u="value"in gn?gn.value:gn.textContent,r=u.length;for(e=0;e<n&&t[e]===u[e];e++);var o=n-e;for(l=1;l<=o&&t[n-l]===u[r-l];l++);return pi=u.slice(e,1<l?1-l:void 0)}function yi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vi(){return!0}function Oo(){return!1}function nt(e){function t(n,l,u,r,o){this._reactName=n,this._targetInst=u,this.type=l,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(r):r[m]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?vi:Oo,this.isPropagationStopped=Oo,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=vi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=vi)},persist:function(){},isPersistent:vi}),t}var Qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gi=nt(Qn),sa=_({},Qn,{view:0,detail:0}),Fp=nt(sa),ds,hs,ra,bi=_({},sa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ps,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ra&&(ra&&e.type==="mousemove"?(ds=e.screenX-ra.screenX,hs=e.screenY-ra.screenY):hs=ds=0,ra=e),ds)},movementY:function(e){return"movementY"in e?e.movementY:hs}}),wo=nt(bi),Wp=_({},bi,{dataTransfer:0}),Ip=nt(Wp),Pp=_({},sa,{relatedTarget:0}),ms=nt(Pp),ey=_({},Qn,{animationName:0,elapsedTime:0,pseudoElement:0}),ty=nt(ey),ny=_({},Qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ly=nt(ny),ay=_({},Qn,{data:0}),Do=nt(ay),iy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uy={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"},sy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ry(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sy[e])?!!t[e]:!1}function ps(){return ry}var cy=_({},sa,{key:function(e){if(e.key){var t=iy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ps,charCode:function(e){return e.type==="keypress"?yi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),oy=nt(cy),fy=_({},bi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zo=nt(fy),dy=_({},sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ps}),hy=nt(dy),my=_({},Qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),py=nt(my),yy=_({},bi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),vy=nt(yy),gy=_({},Qn,{newState:0,oldState:0}),by=nt(gy),xy=[9,13,27,32],ys=Jt&&"CompositionEvent"in window,ca=null;Jt&&"documentMode"in document&&(ca=document.documentMode);var Sy=Jt&&"TextEvent"in window&&!ca,Bo=Jt&&(!ys||ca&&8<ca&&11>=ca),Uo=" ",Lo=!1;function ko(e,t){switch(e){case"keyup":return xy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ho(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function Ey(e,t){switch(e){case"compositionend":return Ho(t);case"keypress":return t.which!==32?null:(Lo=!0,Uo);case"textInput":return e=t.data,e===Uo&&Lo?null:e;default:return null}}function Ay(e,t){if(bl)return e==="compositionend"||!ys&&ko(e,t)?(e=jo(),pi=fs=gn=null,bl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bo&&t.locale!=="ko"?null:t.data;default:return null}}var _y={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 qo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_y[e.type]:t==="textarea"}function Yo(e,t,n,l){vl?gl?gl.push(l):gl=[l]:vl=l,t=ru(t,"onChange"),0<t.length&&(n=new gi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var oa=null,fa=null;function Ty(e){_h(e,0)}function xi(e){var t=aa(e);if(Eo(t))return e}function Vo(e,t){if(e==="change")return t}var Go=!1;if(Jt){var vs;if(Jt){var gs="oninput"in document;if(!gs){var Xo=document.createElement("div");Xo.setAttribute("oninput","return;"),gs=typeof Xo.oninput=="function"}vs=gs}else vs=!1;Go=vs&&(!document.documentMode||9<document.documentMode)}function Qo(){oa&&(oa.detachEvent("onpropertychange",Zo),fa=oa=null)}function Zo(e){if(e.propertyName==="value"&&xi(fa)){var t=[];Yo(t,fa,e,rs(e)),Mo(Ty,t)}}function Cy(e,t,n){e==="focusin"?(Qo(),oa=t,fa=n,oa.attachEvent("onpropertychange",Zo)):e==="focusout"&&Qo()}function Ny(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xi(fa)}function Ry(e,t){if(e==="click")return xi(t)}function My(e,t){if(e==="input"||e==="change")return xi(t)}function jy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dt=typeof Object.is=="function"?Object.is:jy;function da(e,t){if(dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var u=n[l];if(!$u.call(t,u)||!dt(e[u],t[u]))return!1}return!0}function Ko(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jo(e,t){var n=Ko(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ko(n)}}function $o(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$o(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=hi(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hi(e.document)}return t}function bs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Oy=Jt&&"documentMode"in document&&11>=document.documentMode,xl=null,xs=null,ha=null,Ss=!1;function Wo(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ss||xl==null||xl!==hi(l)||(l=xl,"selectionStart"in l&&bs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ha&&da(ha,l)||(ha=l,l=ru(xs,"onSelect"),0<l.length&&(t=new gi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=xl)))}function Zn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sl={animationend:Zn("Animation","AnimationEnd"),animationiteration:Zn("Animation","AnimationIteration"),animationstart:Zn("Animation","AnimationStart"),transitionrun:Zn("Transition","TransitionRun"),transitionstart:Zn("Transition","TransitionStart"),transitioncancel:Zn("Transition","TransitionCancel"),transitionend:Zn("Transition","TransitionEnd")},Es={},Io={};Jt&&(Io=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function Kn(e){if(Es[e])return Es[e];if(!Sl[e])return e;var t=Sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Io)return Es[e]=t[n];return e}var Po=Kn("animationend"),ef=Kn("animationiteration"),tf=Kn("animationstart"),wy=Kn("transitionrun"),Dy=Kn("transitionstart"),zy=Kn("transitioncancel"),nf=Kn("transitionend"),lf=new Map,As="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(" ");As.push("scrollEnd");function Ot(e,t){lf.set(e,t),Xn(t,[e])}var Si=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},St=[],El=0,_s=0;function Ei(){for(var e=El,t=_s=El=0;t<e;){var n=St[t];St[t++]=null;var l=St[t];St[t++]=null;var u=St[t];St[t++]=null;var r=St[t];if(St[t++]=null,l!==null&&u!==null){var o=l.pending;o===null?u.next=u:(u.next=o.next,o.next=u),l.pending=u}r!==0&&af(n,u,r)}}function Ai(e,t,n,l){St[El++]=e,St[El++]=t,St[El++]=n,St[El++]=l,_s|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ts(e,t,n,l){return Ai(e,t,n,l),_i(e)}function Jn(e,t){return Ai(e,null,null,t),_i(e)}function af(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var u=!1,r=e.return;r!==null;)r.childLanes|=n,l=r.alternate,l!==null&&(l.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(u=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,u&&t!==null&&(u=31-ft(n),e=r.hiddenUpdates,l=e[u],l===null?e[u]=[t]:l.push(t),t.lane=n|536870912),r):null}function _i(e){if(50<Ba)throw Ba=0,zr=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Al={};function By(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ht(e,t,n,l){return new By(e,t,n,l)}function Cs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $t(e,t){var n=e.alternate;return n===null?(n=ht(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function uf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,l,u,r){var o=0;if(l=e,typeof e=="function")Cs(e)&&(o=1);else if(typeof e=="string")o=q0(e,n,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=ht(31,n,t,u),e.elementType=$,e.lanes=r,e;case H:return $n(n.children,u,r,t);case q:o=8,u|=24;break;case Y:return e=ht(12,n,t,u|2),e.elementType=Y,e.lanes=r,e;case k:return e=ht(13,n,t,u),e.elementType=k,e.lanes=r,e;case G:return e=ht(19,n,t,u),e.elementType=G,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:o=10;break e;case Q:o=9;break e;case J:o=11;break e;case X:o=14;break e;case P:o=16,l=null;break e}o=29,n=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=ht(o,n,t,u),t.elementType=e,t.type=l,t.lanes=r,t}function $n(e,t,n,l){return e=ht(7,e,l,t),e.lanes=n,e}function Ns(e,t,n){return e=ht(6,e,null,t),e.lanes=n,e}function sf(e){var t=ht(18,null,null,0);return t.stateNode=e,t}function Rs(e,t,n){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var rf=new WeakMap;function Et(e,t){if(typeof e=="object"&&e!==null){var n=rf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:io(t)},rf.set(e,t),t)}return{value:e,source:t,stack:io(t)}}var _l=[],Tl=0,Ci=null,ma=0,At=[],_t=0,bn=null,Ht=1,qt="";function Ft(e,t){_l[Tl++]=ma,_l[Tl++]=Ci,Ci=e,ma=t}function cf(e,t,n){At[_t++]=Ht,At[_t++]=qt,At[_t++]=bn,bn=e;var l=Ht;e=qt;var u=32-ft(l)-1;l&=~(1<<u),n+=1;var r=32-ft(t)+u;if(30<r){var o=u-u%5;r=(l&(1<<o)-1).toString(32),l>>=o,u-=o,Ht=1<<32-ft(t)+u|n<<u|l,qt=r+e}else Ht=1<<r|n<<u|l,qt=e}function Ms(e){e.return!==null&&(Ft(e,1),cf(e,1,0))}function js(e){for(;e===Ci;)Ci=_l[--Tl],_l[Tl]=null,ma=_l[--Tl],_l[Tl]=null;for(;e===bn;)bn=At[--_t],At[_t]=null,qt=At[--_t],At[_t]=null,Ht=At[--_t],At[_t]=null}function of(e,t){At[_t++]=Ht,At[_t++]=qt,At[_t++]=bn,Ht=t.id,qt=t.overflow,bn=e}var Ke=null,Ne=null,he=!1,xn=null,Tt=!1,Os=Error(c(519));function Sn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pa(Et(t,e)),Os}function ff(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Ze]=e,t[tt]=l,n){case"dialog":oe("cancel",t),oe("close",t);break;case"iframe":case"object":case"embed":oe("load",t);break;case"video":case"audio":for(n=0;n<La.length;n++)oe(La[n],t);break;case"source":oe("error",t);break;case"img":case"image":case"link":oe("error",t),oe("load",t);break;case"details":oe("toggle",t);break;case"input":oe("invalid",t),Ao(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":oe("invalid",t);break;case"textarea":oe("invalid",t),To(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Rh(t.textContent,n)?(l.popover!=null&&(oe("beforetoggle",t),oe("toggle",t)),l.onScroll!=null&&oe("scroll",t),l.onScrollEnd!=null&&oe("scrollend",t),l.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||Sn(e,!0)}function df(e){for(Ke=e.return;Ke;)switch(Ke.tag){case 5:case 31:case 13:Tt=!1;return;case 27:case 3:Tt=!0;return;default:Ke=Ke.return}}function Cl(e){if(e!==Ke)return!1;if(!he)return df(e),he=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||$r(e.type,e.memoizedProps)),n=!n),n&&Ne&&Sn(e),df(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ne=Lh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ne=Lh(e)}else t===27?(t=Ne,Bn(e.type)?(e=ec,ec=null,Ne=e):Ne=t):Ne=Ke?Nt(e.stateNode.nextSibling):null;return!0}function Fn(){Ne=Ke=null,he=!1}function ws(){var e=xn;return e!==null&&(ut===null?ut=e:ut.push.apply(ut,e),xn=null),e}function pa(e){xn===null?xn=[e]:xn.push(e)}var Ds=A(null),Wn=null,Wt=null;function En(e,t,n){K(Ds,t._currentValue),t._currentValue=n}function It(e){e._currentValue=Ds.current,L(Ds)}function zs(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Bs(e,t,n,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var r=u.dependencies;if(r!==null){var o=u.child;r=r.firstContext;e:for(;r!==null;){var m=r;r=u;for(var x=0;x<t.length;x++)if(m.context===t[x]){r.lanes|=n,m=r.alternate,m!==null&&(m.lanes|=n),zs(r.return,n,e),l||(o=null);break e}r=m.next}}else if(u.tag===18){if(o=u.return,o===null)throw Error(c(341));o.lanes|=n,r=o.alternate,r!==null&&(r.lanes|=n),zs(o,n,e),o=null}else o=u.child;if(o!==null)o.return=u;else for(o=u;o!==null;){if(o===e){o=null;break}if(u=o.sibling,u!==null){u.return=o.return,o=u;break}o=o.return}u=o}}function Nl(e,t,n,l){e=null;for(var u=t,r=!1;u!==null;){if(!r){if((u.flags&524288)!==0)r=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var o=u.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var m=u.type;dt(u.pendingProps.value,o.value)||(e!==null?e.push(m):e=[m])}}else if(u===xe.current){if(o=u.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Va):e=[Va])}u=u.return}e!==null&&Bs(t,e,n,l),t.flags|=262144}function Ni(e){for(e=e.firstContext;e!==null;){if(!dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function In(e){Wn=e,Wt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Je(e){return hf(Wn,e)}function Ri(e,t){return Wn===null&&In(e),hf(e,t)}function hf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wt===null){if(e===null)throw Error(c(308));Wt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wt=Wt.next=t;return n}var Uy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Ly=i.unstable_scheduleCallback,ky=i.unstable_NormalPriority,ke={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Us(){return{controller:new Uy,data:new Map,refCount:0}}function ya(e){e.refCount--,e.refCount===0&&Ly(ky,function(){e.controller.abort()})}var va=null,Ls=0,Rl=0,Ml=null;function Hy(e,t){if(va===null){var n=va=[];Ls=0,Rl=qr(),Ml={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Ls++,t.then(mf,mf),t}function mf(){if(--Ls===0&&va!==null){Ml!==null&&(Ml.status="fulfilled");var e=va;va=null,Rl=0,Ml=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qy(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(u){n.push(u)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var u=0;u<n.length;u++)(0,n[u])(t)},function(u){for(l.status="rejected",l.reason=u,u=0;u<n.length;u++)(0,n[u])(void 0)}),l}var pf=D.S;D.S=function(e,t){Id=ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Hy(e,t),pf!==null&&pf(e,t)};var Pn=A(null);function ks(){var e=Pn.current;return e!==null?e:Ce.pooledCache}function Mi(e,t){t===null?K(Pn,Pn.current):K(Pn,t.pool)}function yf(){var e=ks();return e===null?null:{parent:ke._currentValue,pool:e}}var jl=Error(c(460)),Hs=Error(c(474)),ji=Error(c(542)),Oi={then:function(){}};function vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xf(e),e;default:if(typeof t.status=="string")t.then(Kt,Kt);else{if(e=Ce,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=l}},function(l){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xf(e),e}throw tl=t,jl}}function el(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(tl=n,jl):n}}var tl=null;function bf(){if(tl===null)throw Error(c(459));var e=tl;return tl=null,e}function xf(e){if(e===jl||e===ji)throw Error(c(483))}var Ol=null,ga=0;function wi(e){var t=ga;return ga+=1,Ol===null&&(Ol=[]),gf(Ol,e,t)}function ba(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Di(e,t){throw t.$$typeof===M?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Sf(e){function t(T,E){if(e){var N=T.deletions;N===null?(T.deletions=[E],T.flags|=16):N.push(E)}}function n(T,E){if(!e)return null;for(;E!==null;)t(T,E),E=E.sibling;return null}function l(T){for(var E=new Map;T!==null;)T.key!==null?E.set(T.key,T):E.set(T.index,T),T=T.sibling;return E}function u(T,E){return T=$t(T,E),T.index=0,T.sibling=null,T}function r(T,E,N){return T.index=N,e?(N=T.alternate,N!==null?(N=N.index,N<E?(T.flags|=67108866,E):N):(T.flags|=67108866,E)):(T.flags|=1048576,E)}function o(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function m(T,E,N,B){return E===null||E.tag!==6?(E=Ns(N,T.mode,B),E.return=T,E):(E=u(E,N),E.return=T,E)}function x(T,E,N,B){var ee=N.type;return ee===H?w(T,E,N.props.children,B,N.key):E!==null&&(E.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===P&&el(ee)===E.type)?(E=u(E,N.props),ba(E,N),E.return=T,E):(E=Ti(N.type,N.key,N.props,null,T.mode,B),ba(E,N),E.return=T,E)}function R(T,E,N,B){return E===null||E.tag!==4||E.stateNode.containerInfo!==N.containerInfo||E.stateNode.implementation!==N.implementation?(E=Rs(N,T.mode,B),E.return=T,E):(E=u(E,N.children||[]),E.return=T,E)}function w(T,E,N,B,ee){return E===null||E.tag!==7?(E=$n(N,T.mode,B,ee),E.return=T,E):(E=u(E,N),E.return=T,E)}function U(T,E,N){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Ns(""+E,T.mode,N),E.return=T,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case C:return N=Ti(E.type,E.key,E.props,null,T.mode,N),ba(N,E),N.return=T,N;case z:return E=Rs(E,T.mode,N),E.return=T,E;case P:return E=el(E),U(T,E,N)}if(rt(E)||Le(E))return E=$n(E,T.mode,N,null),E.return=T,E;if(typeof E.then=="function")return U(T,wi(E),N);if(E.$$typeof===V)return U(T,Ri(T,E),N);Di(T,E)}return null}function j(T,E,N,B){var ee=E!==null?E.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return ee!==null?null:m(T,E,""+N,B);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case C:return N.key===ee?x(T,E,N,B):null;case z:return N.key===ee?R(T,E,N,B):null;case P:return N=el(N),j(T,E,N,B)}if(rt(N)||Le(N))return ee!==null?null:w(T,E,N,B,null);if(typeof N.then=="function")return j(T,E,wi(N),B);if(N.$$typeof===V)return j(T,E,Ri(T,N),B);Di(T,N)}return null}function O(T,E,N,B,ee){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return T=T.get(N)||null,m(E,T,""+B,ee);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case C:return T=T.get(B.key===null?N:B.key)||null,x(E,T,B,ee);case z:return T=T.get(B.key===null?N:B.key)||null,R(E,T,B,ee);case P:return B=el(B),O(T,E,N,B,ee)}if(rt(B)||Le(B))return T=T.get(N)||null,w(E,T,B,ee,null);if(typeof B.then=="function")return O(T,E,N,wi(B),ee);if(B.$$typeof===V)return O(T,E,N,Ri(E,B),ee);Di(E,B)}return null}function F(T,E,N,B){for(var ee=null,ye=null,I=E,se=E=0,de=null;I!==null&&se<N.length;se++){I.index>se?(de=I,I=null):de=I.sibling;var ve=j(T,I,N[se],B);if(ve===null){I===null&&(I=de);break}e&&I&&ve.alternate===null&&t(T,I),E=r(ve,E,se),ye===null?ee=ve:ye.sibling=ve,ye=ve,I=de}if(se===N.length)return n(T,I),he&&Ft(T,se),ee;if(I===null){for(;se<N.length;se++)I=U(T,N[se],B),I!==null&&(E=r(I,E,se),ye===null?ee=I:ye.sibling=I,ye=I);return he&&Ft(T,se),ee}for(I=l(I);se<N.length;se++)de=O(I,T,se,N[se],B),de!==null&&(e&&de.alternate!==null&&I.delete(de.key===null?se:de.key),E=r(de,E,se),ye===null?ee=de:ye.sibling=de,ye=de);return e&&I.forEach(function(qn){return t(T,qn)}),he&&Ft(T,se),ee}function te(T,E,N,B){if(N==null)throw Error(c(151));for(var ee=null,ye=null,I=E,se=E=0,de=null,ve=N.next();I!==null&&!ve.done;se++,ve=N.next()){I.index>se?(de=I,I=null):de=I.sibling;var qn=j(T,I,ve.value,B);if(qn===null){I===null&&(I=de);break}e&&I&&qn.alternate===null&&t(T,I),E=r(qn,E,se),ye===null?ee=qn:ye.sibling=qn,ye=qn,I=de}if(ve.done)return n(T,I),he&&Ft(T,se),ee;if(I===null){for(;!ve.done;se++,ve=N.next())ve=U(T,ve.value,B),ve!==null&&(E=r(ve,E,se),ye===null?ee=ve:ye.sibling=ve,ye=ve);return he&&Ft(T,se),ee}for(I=l(I);!ve.done;se++,ve=N.next())ve=O(I,T,se,ve.value,B),ve!==null&&(e&&ve.alternate!==null&&I.delete(ve.key===null?se:ve.key),E=r(ve,E,se),ye===null?ee=ve:ye.sibling=ve,ye=ve);return e&&I.forEach(function(W0){return t(T,W0)}),he&&Ft(T,se),ee}function Te(T,E,N,B){if(typeof N=="object"&&N!==null&&N.type===H&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case C:e:{for(var ee=N.key;E!==null;){if(E.key===ee){if(ee=N.type,ee===H){if(E.tag===7){n(T,E.sibling),B=u(E,N.props.children),B.return=T,T=B;break e}}else if(E.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===P&&el(ee)===E.type){n(T,E.sibling),B=u(E,N.props),ba(B,N),B.return=T,T=B;break e}n(T,E);break}else t(T,E);E=E.sibling}N.type===H?(B=$n(N.props.children,T.mode,B,N.key),B.return=T,T=B):(B=Ti(N.type,N.key,N.props,null,T.mode,B),ba(B,N),B.return=T,T=B)}return o(T);case z:e:{for(ee=N.key;E!==null;){if(E.key===ee)if(E.tag===4&&E.stateNode.containerInfo===N.containerInfo&&E.stateNode.implementation===N.implementation){n(T,E.sibling),B=u(E,N.children||[]),B.return=T,T=B;break e}else{n(T,E);break}else t(T,E);E=E.sibling}B=Rs(N,T.mode,B),B.return=T,T=B}return o(T);case P:return N=el(N),Te(T,E,N,B)}if(rt(N))return F(T,E,N,B);if(Le(N)){if(ee=Le(N),typeof ee!="function")throw Error(c(150));return N=ee.call(N),te(T,E,N,B)}if(typeof N.then=="function")return Te(T,E,wi(N),B);if(N.$$typeof===V)return Te(T,E,Ri(T,N),B);Di(T,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,E!==null&&E.tag===6?(n(T,E.sibling),B=u(E,N),B.return=T,T=B):(n(T,E),B=Ns(N,T.mode,B),B.return=T,T=B),o(T)):n(T,E)}return function(T,E,N,B){try{ga=0;var ee=Te(T,E,N,B);return Ol=null,ee}catch(I){if(I===jl||I===ji)throw I;var ye=ht(29,I,null,T.mode);return ye.lanes=B,ye.return=T,ye}finally{}}}var nl=Sf(!0),Ef=Sf(!1),An=!1;function qs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ys(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _n(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Tn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ge&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,t=_i(e),af(e,null,n),t}return Ai(e,l,t,n),_i(e)}function xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,fo(e,n)}}function Vs(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var u=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?u=r=o:r=r.next=o,n=n.next}while(n!==null);r===null?u=r=t:r=r.next=t}else u=r=t;n={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Gs=!1;function Sa(){if(Gs){var e=Ml;if(e!==null)throw e}}function Ea(e,t,n,l){Gs=!1;var u=e.updateQueue;An=!1;var r=u.firstBaseUpdate,o=u.lastBaseUpdate,m=u.shared.pending;if(m!==null){u.shared.pending=null;var x=m,R=x.next;x.next=null,o===null?r=R:o.next=R,o=x;var w=e.alternate;w!==null&&(w=w.updateQueue,m=w.lastBaseUpdate,m!==o&&(m===null?w.firstBaseUpdate=R:m.next=R,w.lastBaseUpdate=x))}if(r!==null){var U=u.baseState;o=0,w=R=x=null,m=r;do{var j=m.lane&-536870913,O=j!==m.lane;if(O?(fe&j)===j:(l&j)===j){j!==0&&j===Rl&&(Gs=!0),w!==null&&(w=w.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var F=e,te=m;j=t;var Te=n;switch(te.tag){case 1:if(F=te.payload,typeof F=="function"){U=F.call(Te,U,j);break e}U=F;break e;case 3:F.flags=F.flags&-65537|128;case 0:if(F=te.payload,j=typeof F=="function"?F.call(Te,U,j):F,j==null)break e;U=_({},U,j);break e;case 2:An=!0}}j=m.callback,j!==null&&(e.flags|=64,O&&(e.flags|=8192),O=u.callbacks,O===null?u.callbacks=[j]:O.push(j))}else O={lane:j,tag:m.tag,payload:m.payload,callback:m.callback,next:null},w===null?(R=w=O,x=U):w=w.next=O,o|=j;if(m=m.next,m===null){if(m=u.shared.pending,m===null)break;O=m,m=O.next,O.next=null,u.lastBaseUpdate=O,u.shared.pending=null}}while(!0);w===null&&(x=U),u.baseState=x,u.firstBaseUpdate=R,u.lastBaseUpdate=w,r===null&&(u.shared.lanes=0),jn|=o,e.lanes=o,e.memoizedState=U}}function Af(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function _f(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Af(n[e],t)}var wl=A(null),zi=A(0);function Tf(e,t){e=rn,K(zi,e),K(wl,t),rn=e|t.baseLanes}function Xs(){K(zi,rn),K(wl,wl.current)}function Qs(){rn=zi.current,L(wl),L(zi)}var mt=A(null),Ct=null;function Cn(e){var t=e.alternate;K(Be,Be.current&1),K(mt,e),Ct===null&&(t===null||wl.current!==null||t.memoizedState!==null)&&(Ct=e)}function Zs(e){K(Be,Be.current),K(mt,e),Ct===null&&(Ct=e)}function Cf(e){e.tag===22?(K(Be,Be.current),K(mt,e),Ct===null&&(Ct=e)):Nn()}function Nn(){K(Be,Be.current),K(mt,mt.current)}function pt(e){L(mt),Ct===e&&(Ct=null),L(Be)}var Be=A(0);function Bi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ir(n)||Pr(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pt=0,ue=null,Ae=null,He=null,Ui=!1,Dl=!1,ll=!1,Li=0,Aa=0,zl=null,Yy=0;function we(){throw Error(c(321))}function Ks(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dt(e[n],t[n]))return!1;return!0}function Js(e,t,n,l,u,r){return Pt=r,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?cd:cr,ll=!1,r=n(l,u),ll=!1,Dl&&(r=Rf(t,n,l,u)),Nf(e),r}function Nf(e){D.H=Ca;var t=Ae!==null&&Ae.next!==null;if(Pt=0,He=Ae=ue=null,Ui=!1,Aa=0,zl=null,t)throw Error(c(300));e===null||qe||(e=e.dependencies,e!==null&&Ni(e)&&(qe=!0))}function Rf(e,t,n,l){ue=e;var u=0;do{if(Dl&&(zl=null),Aa=0,Dl=!1,25<=u)throw Error(c(301));if(u+=1,He=Ae=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}D.H=od,r=t(n,l)}while(Dl);return r}function Vy(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?_a(t):t,e=e.useState()[0],(Ae!==null?Ae.memoizedState:null)!==e&&(ue.flags|=1024),t}function $s(){var e=Li!==0;return Li=0,e}function Fs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ws(e){if(Ui){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ui=!1}Pt=0,He=Ae=ue=null,Dl=!1,Aa=Li=0,zl=null}function Pe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?ue.memoizedState=He=e:He=He.next=e,He}function Ue(){if(Ae===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=He===null?ue.memoizedState:He.next;if(t!==null)He=t,Ae=e;else{if(e===null)throw ue.alternate===null?Error(c(467)):Error(c(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},He===null?ue.memoizedState=He=e:He=He.next=e}return He}function ki(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _a(e){var t=Aa;return Aa+=1,zl===null&&(zl=[]),e=gf(zl,e,t),t=ue,(He===null?t.memoizedState:He.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?cd:cr),e}function Hi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _a(e);if(e.$$typeof===V)return Je(e)}throw Error(c(438,String(e)))}function Is(e){var t=null,n=ue.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ue.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ki(),ue.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=le;return t.index++,n}function en(e,t){return typeof t=="function"?t(e):t}function qi(e){var t=Ue();return Ps(t,Ae,e)}function Ps(e,t,n){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=n;var u=e.baseQueue,r=l.pending;if(r!==null){if(u!==null){var o=u.next;u.next=r.next,r.next=o}t.baseQueue=u=r,l.pending=null}if(r=e.baseState,u===null)e.memoizedState=r;else{t=u.next;var m=o=null,x=null,R=t,w=!1;do{var U=R.lane&-536870913;if(U!==R.lane?(fe&U)===U:(Pt&U)===U){var j=R.revertLane;if(j===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),U===Rl&&(w=!0);else if((Pt&j)===j){R=R.next,j===Rl&&(w=!0);continue}else U={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(m=x=U,o=r):x=x.next=U,ue.lanes|=j,jn|=j;U=R.action,ll&&n(r,U),r=R.hasEagerState?R.eagerState:n(r,U)}else j={lane:U,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(m=x=j,o=r):x=x.next=j,ue.lanes|=U,jn|=U;R=R.next}while(R!==null&&R!==t);if(x===null?o=r:x.next=m,!dt(r,e.memoizedState)&&(qe=!0,w&&(n=Ml,n!==null)))throw n;e.memoizedState=r,e.baseState=o,e.baseQueue=x,l.lastRenderedState=r}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function er(e){var t=Ue(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var l=n.dispatch,u=n.pending,r=t.memoizedState;if(u!==null){n.pending=null;var o=u=u.next;do r=e(r,o.action),o=o.next;while(o!==u);dt(r,t.memoizedState)||(qe=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,l]}function Mf(e,t,n){var l=ue,u=Ue(),r=he;if(r){if(n===void 0)throw Error(c(407));n=n()}else n=t();var o=!dt((Ae||u).memoizedState,n);if(o&&(u.memoizedState=n,qe=!0),u=u.queue,lr(wf.bind(null,l,u,e),[e]),u.getSnapshot!==t||o||He!==null&&He.memoizedState.tag&1){if(l.flags|=2048,Bl(9,{destroy:void 0},Of.bind(null,l,u,n,t),null),Ce===null)throw Error(c(349));r||(Pt&127)!==0||jf(l,t,n)}return n}function jf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ue.updateQueue,t===null?(t=ki(),ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Of(e,t,n,l){t.value=n,t.getSnapshot=l,Df(t)&&zf(e)}function wf(e,t,n){return n(function(){Df(t)&&zf(e)})}function Df(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dt(e,n)}catch{return!0}}function zf(e){var t=Jn(e,2);t!==null&&st(t,e,2)}function tr(e){var t=Pe();if(typeof e=="function"){var n=e;if(e=n(),ll){yn(!0);try{n()}finally{yn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:e},t}function Bf(e,t,n,l){return e.baseState=n,Ps(e,Ae,typeof l=="function"?l:en)}function Gy(e,t,n,l,u){if(Gi(e))throw Error(c(485));if(e=t.action,e!==null){var r={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){r.listeners.push(o)}};D.T!==null?n(!0):r.isTransition=!1,l(r),n=t.pending,n===null?(r.next=t.pending=r,Uf(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Uf(e,t){var n=t.action,l=t.payload,u=e.state;if(t.isTransition){var r=D.T,o={};D.T=o;try{var m=n(u,l),x=D.S;x!==null&&x(o,m),Lf(e,t,m)}catch(R){nr(e,t,R)}finally{r!==null&&o.types!==null&&(r.types=o.types),D.T=r}}else try{r=n(u,l),Lf(e,t,r)}catch(R){nr(e,t,R)}}function Lf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){kf(e,t,l)},function(l){return nr(e,t,l)}):kf(e,t,n)}function kf(e,t,n){t.status="fulfilled",t.value=n,Hf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Uf(e,n)))}function nr(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Hf(t),t=t.next;while(t!==l)}e.action=null}function Hf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qf(e,t){return t}function Yf(e,t){if(he){var n=Ce.formState;if(n!==null){e:{var l=ue;if(he){if(Ne){t:{for(var u=Ne,r=Tt;u.nodeType!==8;){if(!r){u=null;break t}if(u=Nt(u.nextSibling),u===null){u=null;break t}}r=u.data,u=r==="F!"||r==="F"?u:null}if(u){Ne=Nt(u.nextSibling),l=u.data==="F!";break e}}Sn(l)}l=!1}l&&(t=n[0])}}return n=Pe(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qf,lastRenderedState:t},n.queue=l,n=ud.bind(null,ue,l),l.dispatch=n,l=tr(!1),r=rr.bind(null,ue,!1,l.queue),l=Pe(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,n=Gy.bind(null,ue,u,r,n),u.dispatch=n,l.memoizedState=e,[t,n,!1]}function Vf(e){var t=Ue();return Gf(t,Ae,e)}function Gf(e,t,n){if(t=Ps(e,t,qf)[0],e=qi(en)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=_a(t)}catch(o){throw o===jl?ji:o}else l=t;t=Ue();var u=t.queue,r=u.dispatch;return n!==t.memoizedState&&(ue.flags|=2048,Bl(9,{destroy:void 0},Xy.bind(null,u,n),null)),[l,r,e]}function Xy(e,t){e.action=t}function Xf(e){var t=Ue(),n=Ae;if(n!==null)return Gf(t,n,e);Ue(),t=t.memoizedState,n=Ue();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Bl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ue.updateQueue,t===null&&(t=ki(),ue.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Qf(){return Ue().memoizedState}function Yi(e,t,n,l){var u=Pe();ue.flags|=e,u.memoizedState=Bl(1|t,{destroy:void 0},n,l===void 0?null:l)}function Vi(e,t,n,l){var u=Ue();l=l===void 0?null:l;var r=u.memoizedState.inst;Ae!==null&&l!==null&&Ks(l,Ae.memoizedState.deps)?u.memoizedState=Bl(t,r,n,l):(ue.flags|=e,u.memoizedState=Bl(1|t,r,n,l))}function Zf(e,t){Yi(8390656,8,e,t)}function lr(e,t){Vi(2048,8,e,t)}function Qy(e){ue.flags|=4;var t=ue.updateQueue;if(t===null)t=ki(),ue.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Kf(e){var t=Ue().memoizedState;return Qy({ref:t,nextImpl:e}),function(){if((ge&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Jf(e,t){return Vi(4,2,e,t)}function $f(e,t){return Vi(4,4,e,t)}function Ff(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wf(e,t,n){n=n!=null?n.concat([e]):null,Vi(4,4,Ff.bind(null,t,e),n)}function ar(){}function If(e,t){var n=Ue();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Ks(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Pf(e,t){var n=Ue();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Ks(t,l[1]))return l[0];if(l=e(),ll){yn(!0);try{e()}finally{yn(!1)}}return n.memoizedState=[l,t],l}function ir(e,t,n){return n===void 0||(Pt&1073741824)!==0&&(fe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=eh(),ue.lanes|=e,jn|=e,n)}function ed(e,t,n,l){return dt(n,t)?n:wl.current!==null?(e=ir(e,n,l),dt(e,t)||(qe=!0),e):(Pt&42)===0||(Pt&1073741824)!==0&&(fe&261930)===0?(qe=!0,e.memoizedState=n):(e=eh(),ue.lanes|=e,jn|=e,t)}function td(e,t,n,l,u){var r=Z.p;Z.p=r!==0&&8>r?r:8;var o=D.T,m={};D.T=m,rr(e,!1,t,n);try{var x=u(),R=D.S;if(R!==null&&R(m,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var w=qy(x,l);Ta(e,t,w,gt(e))}else Ta(e,t,l,gt(e))}catch(U){Ta(e,t,{then:function(){},status:"rejected",reason:U},gt())}finally{Z.p=r,o!==null&&m.types!==null&&(o.types=m.types),D.T=o}}function Zy(){}function ur(e,t,n,l){if(e.tag!==5)throw Error(c(476));var u=nd(e).queue;td(e,u,t,ne,n===null?Zy:function(){return ld(e),n(l)})}function nd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:en,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ld(e){var t=nd(e);t.next===null&&(t=e.alternate.memoizedState),Ta(e,t.next.queue,{},gt())}function sr(){return Je(Va)}function ad(){return Ue().memoizedState}function id(){return Ue().memoizedState}function Ky(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gt();e=_n(n);var l=Tn(t,e,n);l!==null&&(st(l,t,n),xa(l,t,n)),t={cache:Us()},e.payload=t;return}t=t.return}}function Jy(e,t,n){var l=gt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Gi(e)?sd(t,n):(n=Ts(e,t,n,l),n!==null&&(st(n,e,l),rd(n,t,l)))}function ud(e,t,n){var l=gt();Ta(e,t,n,l)}function Ta(e,t,n,l){var u={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gi(e))sd(t,u);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var o=t.lastRenderedState,m=r(o,n);if(u.hasEagerState=!0,u.eagerState=m,dt(m,o))return Ai(e,t,u,0),Ce===null&&Ei(),!1}catch{}finally{}if(n=Ts(e,t,u,l),n!==null)return st(n,e,l),rd(n,t,l),!0}return!1}function rr(e,t,n,l){if(l={lane:2,revertLane:qr(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Gi(e)){if(t)throw Error(c(479))}else t=Ts(e,n,l,2),t!==null&&st(t,e,2)}function Gi(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function sd(e,t){Dl=Ui=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rd(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,fo(e,n)}}var Ca={readContext:Je,use:Hi,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useLayoutEffect:we,useInsertionEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useSyncExternalStore:we,useId:we,useHostTransitionStatus:we,useFormState:we,useActionState:we,useOptimistic:we,useMemoCache:we,useCacheRefresh:we};Ca.useEffectEvent=we;var cd={readContext:Je,use:Hi,useCallback:function(e,t){return Pe().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:Zf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Yi(4194308,4,Ff.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){Yi(4,2,e,t)},useMemo:function(e,t){var n=Pe();t=t===void 0?null:t;var l=e();if(ll){yn(!0);try{e()}finally{yn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Pe();if(n!==void 0){var u=n(t);if(ll){yn(!0);try{n(t)}finally{yn(!1)}}}else u=t;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=Jy.bind(null,ue,e),[l.memoizedState,e]},useRef:function(e){var t=Pe();return e={current:e},t.memoizedState=e},useState:function(e){e=tr(e);var t=e.queue,n=ud.bind(null,ue,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ar,useDeferredValue:function(e,t){var n=Pe();return ir(n,e,t)},useTransition:function(){var e=tr(!1);return e=td.bind(null,ue,e.queue,!0,!1),Pe().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ue,u=Pe();if(he){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ce===null)throw Error(c(349));(fe&127)!==0||jf(l,t,n)}u.memoizedState=n;var r={value:n,getSnapshot:t};return u.queue=r,Zf(wf.bind(null,l,r,e),[e]),l.flags|=2048,Bl(9,{destroy:void 0},Of.bind(null,l,r,n,t),null),n},useId:function(){var e=Pe(),t=Ce.identifierPrefix;if(he){var n=qt,l=Ht;n=(l&~(1<<32-ft(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Li++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Yy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:sr,useFormState:Yf,useActionState:Yf,useOptimistic:function(e){var t=Pe();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=rr.bind(null,ue,!0,n),n.dispatch=t,[e,t]},useMemoCache:Is,useCacheRefresh:function(){return Pe().memoizedState=Ky.bind(null,ue)},useEffectEvent:function(e){var t=Pe(),n={impl:e};return t.memoizedState=n,function(){if((ge&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},cr={readContext:Je,use:Hi,useCallback:If,useContext:Je,useEffect:lr,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:$f,useMemo:Pf,useReducer:qi,useRef:Qf,useState:function(){return qi(en)},useDebugValue:ar,useDeferredValue:function(e,t){var n=Ue();return ed(n,Ae.memoizedState,e,t)},useTransition:function(){var e=qi(en)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:_a(e),t]},useSyncExternalStore:Mf,useId:ad,useHostTransitionStatus:sr,useFormState:Vf,useActionState:Vf,useOptimistic:function(e,t){var n=Ue();return Bf(n,Ae,e,t)},useMemoCache:Is,useCacheRefresh:id};cr.useEffectEvent=Kf;var od={readContext:Je,use:Hi,useCallback:If,useContext:Je,useEffect:lr,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:$f,useMemo:Pf,useReducer:er,useRef:Qf,useState:function(){return er(en)},useDebugValue:ar,useDeferredValue:function(e,t){var n=Ue();return Ae===null?ir(n,e,t):ed(n,Ae.memoizedState,e,t)},useTransition:function(){var e=er(en)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:_a(e),t]},useSyncExternalStore:Mf,useId:ad,useHostTransitionStatus:sr,useFormState:Xf,useActionState:Xf,useOptimistic:function(e,t){var n=Ue();return Ae!==null?Bf(n,Ae,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Is,useCacheRefresh:id};od.useEffectEvent=Kf;function or(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:_({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fr={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=gt(),u=_n(l);u.payload=t,n!=null&&(u.callback=n),t=Tn(e,u,l),t!==null&&(st(t,e,l),xa(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=gt(),u=_n(l);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=Tn(e,u,l),t!==null&&(st(t,e,l),xa(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gt(),l=_n(n);l.tag=2,t!=null&&(l.callback=t),t=Tn(e,l,n),t!==null&&(st(t,e,n),xa(t,e,n))}};function fd(e,t,n,l,u,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,r,o):t.prototype&&t.prototype.isPureReactComponent?!da(n,l)||!da(u,r):!0}function dd(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&fr.enqueueReplaceState(t,t.state,null)}function al(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=_({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function hd(e){Si(e)}function md(e){console.error(e)}function pd(e){Si(e)}function Xi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function yd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function dr(e,t,n){return n=_n(n),n.tag=3,n.payload={element:null},n.callback=function(){Xi(e,t)},n}function vd(e){return e=_n(e),e.tag=3,e}function gd(e,t,n,l){var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var r=l.value;e.payload=function(){return u(r)},e.callback=function(){yd(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){yd(t,n,l),typeof u!="function"&&(On===null?On=new Set([this]):On.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function $y(e,t,n,l,u){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Nl(t,n,u,!0),n=mt.current,n!==null){switch(n.tag){case 31:case 13:return Ct===null?nu():n.alternate===null&&De===0&&(De=3),n.flags&=-257,n.flags|=65536,n.lanes=u,l===Oi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Lr(e,l,u)),!1;case 22:return n.flags|=65536,l===Oi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Lr(e,l,u)),!1}throw Error(c(435,n.tag))}return Lr(e,l,u),nu(),!1}if(he)return t=mt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,l!==Os&&(e=Error(c(422),{cause:l}),pa(Et(e,n)))):(l!==Os&&(t=Error(c(423),{cause:l}),pa(Et(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Et(l,n),u=dr(e.stateNode,l,u),Vs(e,u),De!==4&&(De=2)),!1;var r=Error(c(520),{cause:l});if(r=Et(r,n),za===null?za=[r]:za.push(r),De!==4&&(De=2),t===null)return!0;l=Et(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=dr(n.stateNode,l,e),Vs(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(On===null||!On.has(r))))return n.flags|=65536,u&=-u,n.lanes|=u,u=vd(u),gd(u,e,n,l),Vs(n,u),!1}n=n.return}while(n!==null);return!1}var hr=Error(c(461)),qe=!1;function $e(e,t,n,l){t.child=e===null?Ef(t,null,n,l):nl(t,e.child,n,l)}function bd(e,t,n,l,u){n=n.render;var r=t.ref;if("ref"in l){var o={};for(var m in l)m!=="ref"&&(o[m]=l[m])}else o=l;return In(t),l=Js(e,t,n,o,r,u),m=$s(),e!==null&&!qe?(Fs(e,t,u),tn(e,t,u)):(he&&m&&Ms(t),t.flags|=1,$e(e,t,l,u),t.child)}function xd(e,t,n,l,u){if(e===null){var r=n.type;return typeof r=="function"&&!Cs(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,Sd(e,t,r,l,u)):(e=Ti(n.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!Sr(e,u)){var o=r.memoizedProps;if(n=n.compare,n=n!==null?n:da,n(o,l)&&e.ref===t.ref)return tn(e,t,u)}return t.flags|=1,e=$t(r,l),e.ref=t.ref,e.return=t,t.child=e}function Sd(e,t,n,l,u){if(e!==null){var r=e.memoizedProps;if(da(r,l)&&e.ref===t.ref)if(qe=!1,t.pendingProps=l=r,Sr(e,u))(e.flags&131072)!==0&&(qe=!0);else return t.lanes=e.lanes,tn(e,t,u)}return mr(e,t,n,l,u)}function Ed(e,t,n,l){var u=l.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|n:n,e!==null){for(l=t.child=e.child,u=0;l!==null;)u=u|l.lanes|l.childLanes,l=l.sibling;l=u&~r}else l=0,t.child=null;return Ad(e,t,r,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Mi(t,r!==null?r.cachePool:null),r!==null?Tf(t,r):Xs(),Cf(t);else return l=t.lanes=536870912,Ad(e,t,r!==null?r.baseLanes|n:n,n,l)}else r!==null?(Mi(t,r.cachePool),Tf(t,r),Nn(),t.memoizedState=null):(e!==null&&Mi(t,null),Xs(),Nn());return $e(e,t,u,n),t.child}function Na(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ad(e,t,n,l,u){var r=ks();return r=r===null?null:{parent:ke._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&Mi(t,null),Xs(),Cf(t),e!==null&&Nl(e,t,l,!0),t.childLanes=u,null}function Qi(e,t){return t=Ki({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _d(e,t,n){return nl(t,e.child,null,n),e=Qi(t,t.pendingProps),e.flags|=2,pt(t),t.memoizedState=null,e}function Fy(e,t,n){var l=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(he){if(l.mode==="hidden")return e=Qi(t,l),t.lanes=536870912,Na(null,e);if(Zs(t),(e=Ne)?(e=Uh(e,Tt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bn!==null?{id:Ht,overflow:qt}:null,retryLane:536870912,hydrationErrors:null},n=sf(e),n.return=t,t.child=n,Ke=t,Ne=null)):e=null,e===null)throw Sn(t);return t.lanes=536870912,null}return Qi(t,l)}var r=e.memoizedState;if(r!==null){var o=r.dehydrated;if(Zs(t),u)if(t.flags&256)t.flags&=-257,t=_d(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(qe||Nl(e,t,n,!1),u=(n&e.childLanes)!==0,qe||u){if(l=Ce,l!==null&&(o=ho(l,n),o!==0&&o!==r.retryLane))throw r.retryLane=o,Jn(e,o),st(l,e,o),hr;nu(),t=_d(e,t,n)}else e=r.treeContext,Ne=Nt(o.nextSibling),Ke=t,he=!0,xn=null,Tt=!1,e!==null&&of(t,e),t=Qi(t,l),t.flags|=4096;return t}return e=$t(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Zi(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function mr(e,t,n,l,u){return In(t),n=Js(e,t,n,l,void 0,u),l=$s(),e!==null&&!qe?(Fs(e,t,u),tn(e,t,u)):(he&&l&&Ms(t),t.flags|=1,$e(e,t,n,u),t.child)}function Td(e,t,n,l,u,r){return In(t),t.updateQueue=null,n=Rf(t,l,n,u),Nf(e),l=$s(),e!==null&&!qe?(Fs(e,t,r),tn(e,t,r)):(he&&l&&Ms(t),t.flags|=1,$e(e,t,n,r),t.child)}function Cd(e,t,n,l,u){if(In(t),t.stateNode===null){var r=Al,o=n.contextType;typeof o=="object"&&o!==null&&(r=Je(o)),r=new n(l,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=fr,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=l,r.state=t.memoizedState,r.refs={},qs(t),o=n.contextType,r.context=typeof o=="object"&&o!==null?Je(o):Al,r.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(or(t,n,o,l),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(o=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),o!==r.state&&fr.enqueueReplaceState(r,r.state,null),Ea(t,l,r,u),Sa(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){r=t.stateNode;var m=t.memoizedProps,x=al(n,m);r.props=x;var R=r.context,w=n.contextType;o=Al,typeof w=="object"&&w!==null&&(o=Je(w));var U=n.getDerivedStateFromProps;w=typeof U=="function"||typeof r.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,w||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(m||R!==o)&&dd(t,r,l,o),An=!1;var j=t.memoizedState;r.state=j,Ea(t,l,r,u),Sa(),R=t.memoizedState,m||j!==R||An?(typeof U=="function"&&(or(t,n,U,l),R=t.memoizedState),(x=An||fd(t,n,x,l,j,R,o))?(w||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=R),r.props=l,r.state=R,r.context=o,l=x):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{r=t.stateNode,Ys(e,t),o=t.memoizedProps,w=al(n,o),r.props=w,U=t.pendingProps,j=r.context,R=n.contextType,x=Al,typeof R=="object"&&R!==null&&(x=Je(R)),m=n.getDerivedStateFromProps,(R=typeof m=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o!==U||j!==x)&&dd(t,r,l,x),An=!1,j=t.memoizedState,r.state=j,Ea(t,l,r,u),Sa();var O=t.memoizedState;o!==U||j!==O||An||e!==null&&e.dependencies!==null&&Ni(e.dependencies)?(typeof m=="function"&&(or(t,n,m,l),O=t.memoizedState),(w=An||fd(t,n,w,l,j,O,x)||e!==null&&e.dependencies!==null&&Ni(e.dependencies))?(R||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,O,x),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,O,x)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||o===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=O),r.props=l,r.state=O,r.context=x,l=w):(typeof r.componentDidUpdate!="function"||o===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),l=!1)}return r=l,Zi(e,t),l=(t.flags&128)!==0,r||l?(r=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&l?(t.child=nl(t,e.child,null,u),t.child=nl(t,null,n,u)):$e(e,t,n,u),t.memoizedState=r.state,e=t.child):e=tn(e,t,u),e}function Nd(e,t,n,l){return Fn(),t.flags|=256,$e(e,t,n,l),t.child}var pr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yr(e){return{baseLanes:e,cachePool:yf()}}function vr(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=vt),e}function Rd(e,t,n){var l=t.pendingProps,u=!1,r=(t.flags&128)!==0,o;if((o=r)||(o=e!==null&&e.memoizedState===null?!1:(Be.current&2)!==0),o&&(u=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(he){if(u?Cn(t):Nn(),(e=Ne)?(e=Uh(e,Tt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bn!==null?{id:Ht,overflow:qt}:null,retryLane:536870912,hydrationErrors:null},n=sf(e),n.return=t,t.child=n,Ke=t,Ne=null)):e=null,e===null)throw Sn(t);return Pr(e)?t.lanes=32:t.lanes=536870912,null}var m=l.children;return l=l.fallback,u?(Nn(),u=t.mode,m=Ki({mode:"hidden",children:m},u),l=$n(l,u,n,null),m.return=t,l.return=t,m.sibling=l,t.child=m,l=t.child,l.memoizedState=yr(n),l.childLanes=vr(e,o,n),t.memoizedState=pr,Na(null,l)):(Cn(t),gr(t,m))}var x=e.memoizedState;if(x!==null&&(m=x.dehydrated,m!==null)){if(r)t.flags&256?(Cn(t),t.flags&=-257,t=br(e,t,n)):t.memoizedState!==null?(Nn(),t.child=e.child,t.flags|=128,t=null):(Nn(),m=l.fallback,u=t.mode,l=Ki({mode:"visible",children:l.children},u),m=$n(m,u,n,null),m.flags|=2,l.return=t,m.return=t,l.sibling=m,t.child=l,nl(t,e.child,null,n),l=t.child,l.memoizedState=yr(n),l.childLanes=vr(e,o,n),t.memoizedState=pr,t=Na(null,l));else if(Cn(t),Pr(m)){if(o=m.nextSibling&&m.nextSibling.dataset,o)var R=o.dgst;o=R,l=Error(c(419)),l.stack="",l.digest=o,pa({value:l,source:null,stack:null}),t=br(e,t,n)}else if(qe||Nl(e,t,n,!1),o=(n&e.childLanes)!==0,qe||o){if(o=Ce,o!==null&&(l=ho(o,n),l!==0&&l!==x.retryLane))throw x.retryLane=l,Jn(e,l),st(o,e,l),hr;Ir(m)||nu(),t=br(e,t,n)}else Ir(m)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,Ne=Nt(m.nextSibling),Ke=t,he=!0,xn=null,Tt=!1,e!==null&&of(t,e),t=gr(t,l.children),t.flags|=4096);return t}return u?(Nn(),m=l.fallback,u=t.mode,x=e.child,R=x.sibling,l=$t(x,{mode:"hidden",children:l.children}),l.subtreeFlags=x.subtreeFlags&65011712,R!==null?m=$t(R,m):(m=$n(m,u,n,null),m.flags|=2),m.return=t,l.return=t,l.sibling=m,t.child=l,Na(null,l),l=t.child,m=e.child.memoizedState,m===null?m=yr(n):(u=m.cachePool,u!==null?(x=ke._currentValue,u=u.parent!==x?{parent:x,pool:x}:u):u=yf(),m={baseLanes:m.baseLanes|n,cachePool:u}),l.memoizedState=m,l.childLanes=vr(e,o,n),t.memoizedState=pr,Na(e.child,l)):(Cn(t),n=e.child,e=n.sibling,n=$t(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function gr(e,t){return t=Ki({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ki(e,t){return e=ht(22,e,null,t),e.lanes=0,e}function br(e,t,n){return nl(t,e.child,null,n),e=gr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Md(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),zs(e.return,t,n)}function xr(e,t,n,l,u,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:u,treeForkCount:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=u,o.treeForkCount=r)}function jd(e,t,n){var l=t.pendingProps,u=l.revealOrder,r=l.tail;l=l.children;var o=Be.current,m=(o&2)!==0;if(m?(o=o&1|2,t.flags|=128):o&=1,K(Be,o),$e(e,t,l,n),l=he?ma:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Md(e,n,t);else if(e.tag===19)Md(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(n=t.child,u=null;n!==null;)e=n.alternate,e!==null&&Bi(e)===null&&(u=n),n=n.sibling;n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),xr(t,!1,u,n,r,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Bi(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}xr(t,!0,n,null,r,l);break;case"together":xr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Nl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=$t(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$t(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ni(e)))}function Wy(e,t,n){switch(t.tag){case 3:Ie(t,t.stateNode.containerInfo),En(t,ke,e.memoizedState.cache),Fn();break;case 27:case 5:Pl(t);break;case 4:Ie(t,t.stateNode.containerInfo);break;case 10:En(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Zs(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Cn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Rd(e,t,n):(Cn(t),e=tn(e,t,n),e!==null?e.sibling:null);Cn(t);break;case 19:var u=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Nl(e,t,n,!1),l=(n&t.childLanes)!==0),u){if(l)return jd(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),K(Be,Be.current),l)break;return null;case 22:return t.lanes=0,Ed(e,t,n,t.pendingProps);case 24:En(t,ke,e.memoizedState.cache)}return tn(e,t,n)}function Od(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)qe=!0;else{if(!Sr(e,n)&&(t.flags&128)===0)return qe=!1,Wy(e,t,n);qe=(e.flags&131072)!==0}else qe=!1,he&&(t.flags&1048576)!==0&&cf(t,ma,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=el(t.elementType),t.type=e,typeof e=="function")Cs(e)?(l=al(e,l),t.tag=1,t=Cd(null,t,e,l,n)):(t.tag=0,t=mr(null,t,e,l,n));else{if(e!=null){var u=e.$$typeof;if(u===J){t.tag=11,t=bd(null,t,e,l,n);break e}else if(u===X){t.tag=14,t=xd(null,t,e,l,n);break e}}throw t=kt(e)||e,Error(c(306,t,""))}}return t;case 0:return mr(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,u=al(l,t.pendingProps),Cd(e,t,l,u,n);case 3:e:{if(Ie(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var r=t.memoizedState;u=r.element,Ys(e,t),Ea(t,l,null,n);var o=t.memoizedState;if(l=o.cache,En(t,ke,l),l!==r.cache&&Bs(t,[ke],n,!0),Sa(),l=o.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Nd(e,t,l,n);break e}else if(l!==u){u=Et(Error(c(424)),t),pa(u),t=Nd(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ne=Nt(e.firstChild),Ke=t,he=!0,xn=null,Tt=!0,n=Ef(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fn(),l===u){t=tn(e,t,n);break e}$e(e,t,l,n)}t=t.child}return t;case 26:return Zi(e,t),e===null?(n=Vh(t.type,null,t.pendingProps,null))?t.memoizedState=n:he||(n=t.type,e=t.pendingProps,l=cu(re.current).createElement(n),l[Ze]=t,l[tt]=e,Fe(l,n,e),Xe(l),t.stateNode=l):t.memoizedState=Vh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pl(t),e===null&&he&&(l=t.stateNode=Hh(t.type,t.pendingProps,re.current),Ke=t,Tt=!0,u=Ne,Bn(t.type)?(ec=u,Ne=Nt(l.firstChild)):Ne=u),$e(e,t,t.pendingProps.children,n),Zi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&he&&((u=l=Ne)&&(l=N0(l,t.type,t.pendingProps,Tt),l!==null?(t.stateNode=l,Ke=t,Ne=Nt(l.firstChild),Tt=!1,u=!0):u=!1),u||Sn(t)),Pl(t),u=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,l=r.children,$r(u,r)?l=null:o!==null&&$r(u,o)&&(t.flags|=32),t.memoizedState!==null&&(u=Js(e,t,Vy,null,null,n),Va._currentValue=u),Zi(e,t),$e(e,t,l,n),t.child;case 6:return e===null&&he&&((e=n=Ne)&&(n=R0(n,t.pendingProps,Tt),n!==null?(t.stateNode=n,Ke=t,Ne=null,e=!0):e=!1),e||Sn(t)),null;case 13:return Rd(e,t,n);case 4:return Ie(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=nl(t,null,l,n):$e(e,t,l,n),t.child;case 11:return bd(e,t,t.type,t.pendingProps,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,En(t,t.type,l.value),$e(e,t,l.children,n),t.child;case 9:return u=t.type._context,l=t.pendingProps.children,In(t),u=Je(u),l=l(u),t.flags|=1,$e(e,t,l,n),t.child;case 14:return xd(e,t,t.type,t.pendingProps,n);case 15:return Sd(e,t,t.type,t.pendingProps,n);case 19:return jd(e,t,n);case 31:return Fy(e,t,n);case 22:return Ed(e,t,n,t.pendingProps);case 24:return In(t),l=Je(ke),e===null?(u=ks(),u===null&&(u=Ce,r=Us(),u.pooledCache=r,r.refCount++,r!==null&&(u.pooledCacheLanes|=n),u=r),t.memoizedState={parent:l,cache:u},qs(t),En(t,ke,u)):((e.lanes&n)!==0&&(Ys(e,t),Ea(t,null,null,n),Sa()),u=e.memoizedState,r=t.memoizedState,u.parent!==l?(u={parent:l,cache:l},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),En(t,ke,l)):(l=r.cache,En(t,ke,l),l!==u.cache&&Bs(t,[ke],n,!0))),$e(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function nn(e){e.flags|=4}function Er(e,t,n,l,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(ah())e.flags|=8192;else throw tl=Oi,Hs}else e.flags&=-16777217}function wd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Kh(t))if(ah())e.flags|=8192;else throw tl=Oi,Hs}function Ji(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?co():536870912,e.lanes|=t,Hl|=t)}function Ra(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var u=e.child;u!==null;)n|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)n|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Iy(e,t,n){var l=t.pendingProps;switch(js(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Re(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),It(ke),ze(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Cl(t)?nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ws())),Re(t),null;case 26:var u=t.type,r=t.memoizedState;return e===null?(nn(t),r!==null?(Re(t),wd(t,r)):(Re(t),Er(t,u,null,l,n))):r?r!==e.memoizedState?(nn(t),Re(t),wd(t,r)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&nn(t),Re(t),Er(t,u,e,l,n)),null;case 27:if(ii(t),n=re.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}e=W.current,Cl(t)?ff(t):(e=Hh(u,l,n),t.stateNode=e,nn(t))}return Re(t),null;case 5:if(ii(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}if(r=W.current,Cl(t))ff(t);else{var o=cu(re.current);switch(r){case 1:r=o.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:r=o.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":r=o.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":r=o.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":r=o.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?r.multiple=!0:l.size&&(r.size=l.size);break;default:r=typeof l.is=="string"?o.createElement(u,{is:l.is}):o.createElement(u)}}r[Ze]=t,r[tt]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=r;e:switch(Fe(r,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&nn(t)}}return Re(t),Er(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&nn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=re.current,Cl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,u=Ke,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[Ze]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Rh(e.nodeValue,n)),e||Sn(t,!0)}else e=cu(e).createTextNode(l),e[Ze]=t,t.stateNode=e}return Re(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Cl(t),n!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Ze]=t}else Fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else n=ws(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(pt(t),t):(pt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Re(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Cl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[Ze]=t}else Fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),u=!1}else u=ws(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(pt(t),t):(pt(t),null)}return pt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),r=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==u&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ji(t,t.updateQueue),Re(t),null);case 4:return ze(),e===null&&Xr(t.stateNode.containerInfo),Re(t),null;case 10:return It(t.type),Re(t),null;case 19:if(L(Be),l=t.memoizedState,l===null)return Re(t),null;if(u=(t.flags&128)!==0,r=l.rendering,r===null)if(u)Ra(l,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Bi(e),r!==null){for(t.flags|=128,Ra(l,!1),e=r.updateQueue,t.updateQueue=e,Ji(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)uf(n,e),n=n.sibling;return K(Be,Be.current&1|2),he&&Ft(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ct()>Pi&&(t.flags|=128,u=!0,Ra(l,!1),t.lanes=4194304)}else{if(!u)if(e=Bi(r),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Ji(t,e),Ra(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!he)return Re(t),null}else 2*ct()-l.renderingStartTime>Pi&&n!==536870912&&(t.flags|=128,u=!0,Ra(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ct(),e.sibling=null,n=Be.current,K(Be,u?n&1|2:n&1),he&&Ft(t,l.treeForkCount),e):(Re(t),null);case 22:case 23:return pt(t),Qs(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),n=t.updateQueue,n!==null&&Ji(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&L(Pn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),It(ke),Re(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Py(e,t){switch(js(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return It(ke),ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ii(t),null;case 31:if(t.memoizedState!==null){if(pt(t),t.alternate===null)throw Error(c(340));Fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(pt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Be),null;case 4:return ze(),null;case 10:return It(t.type),null;case 22:case 23:return pt(t),Qs(),e!==null&&L(Pn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return It(ke),null;case 25:return null;default:return null}}function Dd(e,t){switch(js(t),t.tag){case 3:It(ke),ze();break;case 26:case 27:case 5:ii(t);break;case 4:ze();break;case 31:t.memoizedState!==null&&pt(t);break;case 13:pt(t);break;case 19:L(Be);break;case 10:It(t.type);break;case 22:case 23:pt(t),Qs(),e!==null&&L(Pn);break;case 24:It(ke)}}function Ma(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var u=l.next;n=u;do{if((n.tag&e)===e){l=void 0;var r=n.create,o=n.inst;l=r(),o.destroy=l}n=n.next}while(n!==u)}}catch(m){Ee(t,t.return,m)}}function Rn(e,t,n){try{var l=t.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var r=u.next;l=r;do{if((l.tag&e)===e){var o=l.inst,m=o.destroy;if(m!==void 0){o.destroy=void 0,u=t;var x=n,R=m;try{R()}catch(w){Ee(u,x,w)}}}l=l.next}while(l!==r)}}catch(w){Ee(t,t.return,w)}}function zd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_f(t,n)}catch(l){Ee(e,e.return,l)}}}function Bd(e,t,n){n.props=al(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ee(e,t,l)}}function ja(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(u){Ee(e,t,u)}}function Yt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(u){Ee(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){Ee(e,t,u)}else n.current=null}function Ud(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(u){Ee(e,e.return,u)}}function Ar(e,t,n){try{var l=e.stateNode;S0(l,e.type,n,t),l[tt]=t}catch(u){Ee(e,e.return,u)}}function Ld(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bn(e.type)||e.tag===4}function _r(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ld(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Bn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tr(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(l!==4&&(l===27&&Bn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Tr(e,t,n),e=e.sibling;e!==null;)Tr(e,t,n),e=e.sibling}function $i(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Bn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($i(e,t,n),e=e.sibling;e!==null;)$i(e,t,n),e=e.sibling}function kd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Fe(t,l,n),t[Ze]=e,t[tt]=n}catch(r){Ee(e,e.return,r)}}var ln=!1,Ye=!1,Cr=!1,Hd=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function e0(e,t){if(e=e.containerInfo,Kr=yu,e=Fo(e),bs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var u=l.anchorOffset,r=l.focusNode;l=l.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break e}var o=0,m=-1,x=-1,R=0,w=0,U=e,j=null;t:for(;;){for(var O;U!==n||u!==0&&U.nodeType!==3||(m=o+u),U!==r||l!==0&&U.nodeType!==3||(x=o+l),U.nodeType===3&&(o+=U.nodeValue.length),(O=U.firstChild)!==null;)j=U,U=O;for(;;){if(U===e)break t;if(j===n&&++R===u&&(m=o),j===r&&++w===l&&(x=o),(O=U.nextSibling)!==null)break;U=j,j=U.parentNode}U=O}n=m===-1||x===-1?null:{start:m,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(Jr={focusedElem:e,selectionRange:n},yu=!1,Qe=t;Qe!==null;)if(t=Qe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qe=e;else for(;Qe!==null;){switch(t=Qe,r=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)u=e[n],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,n=t,u=r.memoizedProps,r=r.memoizedState,l=n.stateNode;try{var F=al(n.type,u);e=l.getSnapshotBeforeUpdate(F,r),l.__reactInternalSnapshotBeforeUpdate=e}catch(te){Ee(n,n.return,te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Wr(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Qe=e;break}Qe=t.return}}function qd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:un(e,n),l&4&&Ma(5,n);break;case 1:if(un(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){Ee(n,n.return,o)}else{var u=al(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ee(n,n.return,o)}}l&64&&zd(n),l&512&&ja(n,n.return);break;case 3:if(un(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{_f(e,t)}catch(o){Ee(n,n.return,o)}}break;case 27:t===null&&l&4&&kd(n);case 26:case 5:un(e,n),t===null&&l&4&&Ud(n),l&512&&ja(n,n.return);break;case 12:un(e,n);break;case 31:un(e,n),l&4&&Gd(e,n);break;case 13:un(e,n),l&4&&Xd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=c0.bind(null,n),M0(e,n))));break;case 22:if(l=n.memoizedState!==null||ln,!l){t=t!==null&&t.memoizedState!==null||Ye,u=ln;var r=Ye;ln=l,(Ye=t)&&!r?sn(e,n,(n.subtreeFlags&8772)!==0):un(e,n),ln=u,Ye=r}break;case 30:break;default:un(e,n)}}function Yd(e){var t=e.alternate;t!==null&&(e.alternate=null,Yd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ns(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Me=null,lt=!1;function an(e,t,n){for(n=n.child;n!==null;)Vd(e,t,n),n=n.sibling}function Vd(e,t,n){if(ot&&typeof ot.onCommitFiberUnmount=="function")try{ot.onCommitFiberUnmount(ea,n)}catch{}switch(n.tag){case 26:Ye||Yt(n,t),an(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ye||Yt(n,t);var l=Me,u=lt;Bn(n.type)&&(Me=n.stateNode,lt=!1),an(e,t,n),Ha(n.stateNode),Me=l,lt=u;break;case 5:Ye||Yt(n,t);case 6:if(l=Me,u=lt,Me=null,an(e,t,n),Me=l,lt=u,Me!==null)if(lt)try{(Me.nodeType===9?Me.body:Me.nodeName==="HTML"?Me.ownerDocument.body:Me).removeChild(n.stateNode)}catch(r){Ee(n,t,r)}else try{Me.removeChild(n.stateNode)}catch(r){Ee(n,t,r)}break;case 18:Me!==null&&(lt?(e=Me,zh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Kl(e)):zh(Me,n.stateNode));break;case 4:l=Me,u=lt,Me=n.stateNode.containerInfo,lt=!0,an(e,t,n),Me=l,lt=u;break;case 0:case 11:case 14:case 15:Rn(2,n,t),Ye||Rn(4,n,t),an(e,t,n);break;case 1:Ye||(Yt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Bd(n,t,l)),an(e,t,n);break;case 21:an(e,t,n);break;case 22:Ye=(l=Ye)||n.memoizedState!==null,an(e,t,n),Ye=l;break;default:an(e,t,n)}}function Gd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kl(e)}catch(n){Ee(t,t.return,n)}}}function Xd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kl(e)}catch(n){Ee(t,t.return,n)}}function t0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hd),t;default:throw Error(c(435,e.tag))}}function Fi(e,t){var n=t0(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var u=o0.bind(null,e,l);l.then(u,u)}})}function at(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var u=n[l],r=e,o=t,m=o;e:for(;m!==null;){switch(m.tag){case 27:if(Bn(m.type)){Me=m.stateNode,lt=!1;break e}break;case 5:Me=m.stateNode,lt=!1;break e;case 3:case 4:Me=m.stateNode.containerInfo,lt=!0;break e}m=m.return}if(Me===null)throw Error(c(160));Vd(r,o,u),Me=null,lt=!1,r=u.alternate,r!==null&&(r.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qd(t,e),t=t.sibling}var wt=null;function Qd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:at(t,e),it(e),l&4&&(Rn(3,e,e.return),Ma(3,e),Rn(5,e,e.return));break;case 1:at(t,e),it(e),l&512&&(Ye||n===null||Yt(n,n.return)),l&64&&ln&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var u=wt;if(at(t,e),it(e),l&512&&(Ye||n===null||Yt(n,n.return)),l&4){var r=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":r=u.getElementsByTagName("title")[0],(!r||r[la]||r[Ze]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=u.createElement(l),u.head.insertBefore(r,u.querySelector("head > title"))),Fe(r,l,n),r[Ze]=e,Xe(r),l=r;break e;case"link":var o=Qh("link","href",u).get(l+(n.href||""));if(o){for(var m=0;m<o.length;m++)if(r=o[m],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(m,1);break t}}r=u.createElement(l),Fe(r,l,n),u.head.appendChild(r);break;case"meta":if(o=Qh("meta","content",u).get(l+(n.content||""))){for(m=0;m<o.length;m++)if(r=o[m],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(m,1);break t}}r=u.createElement(l),Fe(r,l,n),u.head.appendChild(r);break;default:throw Error(c(468,l))}r[Ze]=e,Xe(r),l=r}e.stateNode=l}else Zh(u,e.type,e.stateNode);else e.stateNode=Xh(u,l,e.memoizedProps);else r!==l?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,l===null?Zh(u,e.type,e.stateNode):Xh(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ar(e,e.memoizedProps,n.memoizedProps)}break;case 27:at(t,e),it(e),l&512&&(Ye||n===null||Yt(n,n.return)),n!==null&&l&4&&Ar(e,e.memoizedProps,n.memoizedProps);break;case 5:if(at(t,e),it(e),l&512&&(Ye||n===null||Yt(n,n.return)),e.flags&32){u=e.stateNode;try{yl(u,"")}catch(F){Ee(e,e.return,F)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,Ar(e,u,n!==null?n.memoizedProps:u)),l&1024&&(Cr=!0);break;case 6:if(at(t,e),it(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(F){Ee(e,e.return,F)}}break;case 3:if(du=null,u=wt,wt=ou(t.containerInfo),at(t,e),wt=u,it(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Kl(t.containerInfo)}catch(F){Ee(e,e.return,F)}Cr&&(Cr=!1,Zd(e));break;case 4:l=wt,wt=ou(e.stateNode.containerInfo),at(t,e),it(e),wt=l;break;case 12:at(t,e),it(e);break;case 31:at(t,e),it(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Fi(e,l)));break;case 13:at(t,e),it(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ii=ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Fi(e,l)));break;case 22:u=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,R=ln,w=Ye;if(ln=R||u,Ye=w||x,at(t,e),Ye=w,ln=R,it(e),l&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||x||ln||Ye||il(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(r=x.stateNode,u)o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{m=x.stateNode;var U=x.memoizedProps.style,j=U!=null&&U.hasOwnProperty("display")?U.display:null;m.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch(F){Ee(x,x.return,F)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=u?"":x.memoizedProps}catch(F){Ee(x,x.return,F)}}}else if(t.tag===18){if(n===null){x=t;try{var O=x.stateNode;u?Bh(O,!0):Bh(x.stateNode,!1)}catch(F){Ee(x,x.return,F)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Fi(e,n))));break;case 19:at(t,e),it(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Fi(e,l)));break;case 30:break;case 21:break;default:at(t,e),it(e)}}function it(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Ld(l)){n=l;break}l=l.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var u=n.stateNode,r=_r(e);$i(e,r,u);break;case 5:var o=n.stateNode;n.flags&32&&(yl(o,""),n.flags&=-33);var m=_r(e);$i(e,m,o);break;case 3:case 4:var x=n.stateNode.containerInfo,R=_r(e);Tr(e,R,x);break;default:throw Error(c(161))}}catch(w){Ee(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Zd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)qd(e,t.alternate,t),t=t.sibling}function il(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rn(4,t,t.return),il(t);break;case 1:Yt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Bd(t,t.return,n),il(t);break;case 27:Ha(t.stateNode);case 26:case 5:Yt(t,t.return),il(t);break;case 22:t.memoizedState===null&&il(t);break;case 30:il(t);break;default:il(t)}e=e.sibling}}function sn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,u=e,r=t,o=r.flags;switch(r.tag){case 0:case 11:case 15:sn(u,r,n),Ma(4,r);break;case 1:if(sn(u,r,n),l=r,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(R){Ee(l,l.return,R)}if(l=r,u=l.updateQueue,u!==null){var m=l.stateNode;try{var x=u.shared.hiddenCallbacks;if(x!==null)for(u.shared.hiddenCallbacks=null,u=0;u<x.length;u++)Af(x[u],m)}catch(R){Ee(l,l.return,R)}}n&&o&64&&zd(r),ja(r,r.return);break;case 27:kd(r);case 26:case 5:sn(u,r,n),n&&l===null&&o&4&&Ud(r),ja(r,r.return);break;case 12:sn(u,r,n);break;case 31:sn(u,r,n),n&&o&4&&Gd(u,r);break;case 13:sn(u,r,n),n&&o&4&&Xd(u,r);break;case 22:r.memoizedState===null&&sn(u,r,n),ja(r,r.return);break;case 30:break;default:sn(u,r,n)}t=t.sibling}}function Nr(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ya(n))}function Rr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ya(e))}function Dt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kd(e,t,n,l),t=t.sibling}function Kd(e,t,n,l){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Dt(e,t,n,l),u&2048&&Ma(9,t);break;case 1:Dt(e,t,n,l);break;case 3:Dt(e,t,n,l),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ya(e)));break;case 12:if(u&2048){Dt(e,t,n,l),e=t.stateNode;try{var r=t.memoizedProps,o=r.id,m=r.onPostCommit;typeof m=="function"&&m(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){Ee(t,t.return,x)}}else Dt(e,t,n,l);break;case 31:Dt(e,t,n,l);break;case 13:Dt(e,t,n,l);break;case 23:break;case 22:r=t.stateNode,o=t.alternate,t.memoizedState!==null?r._visibility&2?Dt(e,t,n,l):Oa(e,t):r._visibility&2?Dt(e,t,n,l):(r._visibility|=2,Ul(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Nr(o,t);break;case 24:Dt(e,t,n,l),u&2048&&Rr(t.alternate,t);break;default:Dt(e,t,n,l)}}function Ul(e,t,n,l,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,o=t,m=n,x=l,R=o.flags;switch(o.tag){case 0:case 11:case 15:Ul(r,o,m,x,u),Ma(8,o);break;case 23:break;case 22:var w=o.stateNode;o.memoizedState!==null?w._visibility&2?Ul(r,o,m,x,u):Oa(r,o):(w._visibility|=2,Ul(r,o,m,x,u)),u&&R&2048&&Nr(o.alternate,o);break;case 24:Ul(r,o,m,x,u),u&&R&2048&&Rr(o.alternate,o);break;default:Ul(r,o,m,x,u)}t=t.sibling}}function Oa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,u=l.flags;switch(l.tag){case 22:Oa(n,l),u&2048&&Nr(l.alternate,l);break;case 24:Oa(n,l),u&2048&&Rr(l.alternate,l);break;default:Oa(n,l)}t=t.sibling}}var wa=8192;function Ll(e,t,n){if(e.subtreeFlags&wa)for(e=e.child;e!==null;)Jd(e,t,n),e=e.sibling}function Jd(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&wa&&e.memoizedState!==null&&Y0(n,wt,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var l=wt;wt=ou(e.stateNode.containerInfo),Ll(e,t,n),wt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=wa,wa=16777216,Ll(e,t,n),wa=l):Ll(e,t,n));break;default:Ll(e,t,n)}}function $d(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Da(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Qe=l,Wd(l,e)}$d(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fd(e),e=e.sibling}function Fd(e){switch(e.tag){case 0:case 11:case 15:Da(e),e.flags&2048&&Rn(9,e,e.return);break;case 3:Da(e);break;case 12:Da(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wi(e)):Da(e);break;default:Da(e)}}function Wi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Qe=l,Wd(l,e)}$d(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rn(8,t,t.return),Wi(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wi(t));break;default:Wi(t)}e=e.sibling}}function Wd(e,t){for(;Qe!==null;){var n=Qe;switch(n.tag){case 0:case 11:case 15:Rn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ya(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Qe=l;else e:for(n=e;Qe!==null;){l=Qe;var u=l.sibling,r=l.return;if(Yd(l),l===n){Qe=null;break e}if(u!==null){u.return=r,Qe=u;break e}Qe=r}}}var n0={getCacheForType:function(e){var t=Je(ke),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Je(ke).controller.signal}},l0=typeof WeakMap=="function"?WeakMap:Map,ge=0,Ce=null,ce=null,fe=0,Se=0,yt=null,Mn=!1,kl=!1,Mr=!1,rn=0,De=0,jn=0,ul=0,jr=0,vt=0,Hl=0,za=null,ut=null,Or=!1,Ii=0,Id=0,Pi=1/0,eu=null,On=null,Ge=0,wn=null,ql=null,cn=0,wr=0,Dr=null,Pd=null,Ba=0,zr=null;function gt(){return(ge&2)!==0&&fe!==0?fe&-fe:D.T!==null?qr():mo()}function eh(){if(vt===0)if((fe&536870912)===0||he){var e=ri;ri<<=1,(ri&3932160)===0&&(ri=262144),vt=e}else vt=536870912;return e=mt.current,e!==null&&(e.flags|=32),vt}function st(e,t,n){(e===Ce&&(Se===2||Se===9)||e.cancelPendingCommit!==null)&&(Yl(e,0),Dn(e,fe,vt,!1)),na(e,n),((ge&2)===0||e!==Ce)&&(e===Ce&&((ge&2)===0&&(ul|=n),De===4&&Dn(e,fe,vt,!1)),Vt(e))}function th(e,t,n){if((ge&6)!==0)throw Error(c(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ta(e,t),u=l?u0(e,t):Ur(e,t,!0),r=l;do{if(u===0){kl&&!l&&Dn(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!a0(n)){u=Ur(e,t,!1),r=!1;continue}if(u===2){if(r=t,e.errorRecoveryDisabledLanes&r)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var m=e;u=za;var x=m.current.memoizedState.isDehydrated;if(x&&(Yl(m,o).flags|=256),o=Ur(m,o,!1),o!==2){if(Mr&&!x){m.errorRecoveryDisabledLanes|=r,ul|=r,u=4;break e}r=ut,ut=u,r!==null&&(ut===null?ut=r:ut.push.apply(ut,r))}u=o}if(r=!1,u!==2)continue}}if(u===1){Yl(e,0),Dn(e,t,0,!0);break}e:{switch(l=e,r=u,r){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Dn(l,t,vt,!Mn);break e;case 2:ut=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=Ii+300-ct(),10<u)){if(Dn(l,t,vt,!Mn),oi(l,0,!0)!==0)break e;cn=t,l.timeoutHandle=wh(nh.bind(null,l,n,ut,eu,Or,t,vt,ul,Hl,Mn,r,"Throttled",-0,0),u);break e}nh(l,n,ut,eu,Or,t,vt,ul,Hl,Mn,r,null,-0,0)}}break}while(!0);Vt(e)}function nh(e,t,n,l,u,r,o,m,x,R,w,U,j,O){if(e.timeoutHandle=-1,U=t.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},Jd(t,r,U);var F=(r&62914560)===r?Ii-ct():(r&4194048)===r?Id-ct():0;if(F=V0(U,F),F!==null){cn=r,e.cancelPendingCommit=F(oh.bind(null,e,t,r,n,l,u,o,m,x,w,U,null,j,O)),Dn(e,r,o,!R);return}}oh(e,t,r,n,l,u,o,m,x)}function a0(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var u=n[l],r=u.getSnapshot;u=u.value;try{if(!dt(r(),u))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dn(e,t,n,l){t&=~jr,t&=~ul,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var r=31-ft(u),o=1<<r;l[r]=-1,u&=~o}n!==0&&oo(e,n,t)}function tu(){return(ge&6)===0?(Ua(0),!1):!0}function Br(){if(ce!==null){if(Se===0)var e=ce.return;else e=ce,Wt=Wn=null,Ws(e),Ol=null,ga=0,e=ce;for(;e!==null;)Dd(e.alternate,e),e=e.return;ce=null}}function Yl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,_0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cn=0,Br(),Ce=e,ce=n=$t(e.current,null),fe=t,Se=0,yt=null,Mn=!1,kl=ta(e,t),Mr=!1,Hl=vt=jr=ul=jn=De=0,ut=za=null,Or=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var u=31-ft(l),r=1<<u;t|=e[u],l&=~r}return rn=t,Ei(),n}function lh(e,t){ue=null,D.H=Ca,t===jl||t===ji?(t=bf(),Se=3):t===Hs?(t=bf(),Se=4):Se=t===hr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yt=t,ce===null&&(De=1,Xi(e,Et(t,e.current)))}function ah(){var e=mt.current;return e===null?!0:(fe&4194048)===fe?Ct===null:(fe&62914560)===fe||(fe&536870912)!==0?e===Ct:!1}function ih(){var e=D.H;return D.H=Ca,e===null?Ca:e}function uh(){var e=D.A;return D.A=n0,e}function nu(){De=4,Mn||(fe&4194048)!==fe&&mt.current!==null||(kl=!0),(jn&134217727)===0&&(ul&134217727)===0||Ce===null||Dn(Ce,fe,vt,!1)}function Ur(e,t,n){var l=ge;ge|=2;var u=ih(),r=uh();(Ce!==e||fe!==t)&&(eu=null,Yl(e,t)),t=!1;var o=De;e:do try{if(Se!==0&&ce!==null){var m=ce,x=yt;switch(Se){case 8:Br(),o=6;break e;case 3:case 2:case 9:case 6:mt.current===null&&(t=!0);var R=Se;if(Se=0,yt=null,Vl(e,m,x,R),n&&kl){o=0;break e}break;default:R=Se,Se=0,yt=null,Vl(e,m,x,R)}}i0(),o=De;break}catch(w){lh(e,w)}while(!0);return t&&e.shellSuspendCounter++,Wt=Wn=null,ge=l,D.H=u,D.A=r,ce===null&&(Ce=null,fe=0,Ei()),o}function i0(){for(;ce!==null;)sh(ce)}function u0(e,t){var n=ge;ge|=2;var l=ih(),u=uh();Ce!==e||fe!==t?(eu=null,Pi=ct()+500,Yl(e,t)):kl=ta(e,t);e:do try{if(Se!==0&&ce!==null){t=ce;var r=yt;t:switch(Se){case 1:Se=0,yt=null,Vl(e,t,r,1);break;case 2:case 9:if(vf(r)){Se=0,yt=null,rh(t);break}t=function(){Se!==2&&Se!==9||Ce!==e||(Se=7),Vt(e)},r.then(t,t);break e;case 3:Se=7;break e;case 4:Se=5;break e;case 7:vf(r)?(Se=0,yt=null,rh(t)):(Se=0,yt=null,Vl(e,t,r,7));break;case 5:var o=null;switch(ce.tag){case 26:o=ce.memoizedState;case 5:case 27:var m=ce;if(o?Kh(o):m.stateNode.complete){Se=0,yt=null;var x=m.sibling;if(x!==null)ce=x;else{var R=m.return;R!==null?(ce=R,lu(R)):ce=null}break t}}Se=0,yt=null,Vl(e,t,r,5);break;case 6:Se=0,yt=null,Vl(e,t,r,6);break;case 8:Br(),De=6;break e;default:throw Error(c(462))}}s0();break}catch(w){lh(e,w)}while(!0);return Wt=Wn=null,D.H=l,D.A=u,ge=n,ce!==null?0:(Ce=null,fe=0,Ei(),De)}function s0(){for(;ce!==null&&!jp();)sh(ce)}function sh(e){var t=Od(e.alternate,e,rn);e.memoizedProps=e.pendingProps,t===null?lu(e):ce=t}function rh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Td(n,t,t.pendingProps,t.type,void 0,fe);break;case 11:t=Td(n,t,t.pendingProps,t.type.render,t.ref,fe);break;case 5:Ws(t);default:Dd(n,t),t=ce=uf(t,rn),t=Od(n,t,rn)}e.memoizedProps=e.pendingProps,t===null?lu(e):ce=t}function Vl(e,t,n,l){Wt=Wn=null,Ws(t),Ol=null,ga=0;var u=t.return;try{if($y(e,u,t,n,fe)){De=1,Xi(e,Et(n,e.current)),ce=null;return}}catch(r){if(u!==null)throw ce=u,r;De=1,Xi(e,Et(n,e.current)),ce=null;return}t.flags&32768?(he||l===1?e=!0:kl||(fe&536870912)!==0?e=!1:(Mn=e=!0,(l===2||l===9||l===3||l===6)&&(l=mt.current,l!==null&&l.tag===13&&(l.flags|=16384))),ch(t,e)):lu(t)}function lu(e){var t=e;do{if((t.flags&32768)!==0){ch(t,Mn);return}e=t.return;var n=Iy(t.alternate,t,rn);if(n!==null){ce=n;return}if(t=t.sibling,t!==null){ce=t;return}ce=t=e}while(t!==null);De===0&&(De=5)}function ch(e,t){do{var n=Py(e.alternate,e);if(n!==null){n.flags&=32767,ce=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ce=e;return}ce=e=n}while(e!==null);De=6,ce=null}function oh(e,t,n,l,u,r,o,m,x){e.cancelPendingCommit=null;do au();while(Ge!==0);if((ge&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(r=t.lanes|t.childLanes,r|=_s,qp(e,n,r,o,m,x),e===Ce&&(ce=Ce=null,fe=0),ql=t,wn=e,cn=n,wr=r,Dr=u,Pd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,f0(ui,function(){return ph(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,u=Z.p,Z.p=2,o=ge,ge|=4;try{e0(e,t,n)}finally{ge=o,Z.p=u,D.T=l}}Ge=1,fh(),dh(),hh()}}function fh(){if(Ge===1){Ge=0;var e=wn,t=ql,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null;var l=Z.p;Z.p=2;var u=ge;ge|=4;try{Qd(t,e);var r=Jr,o=Fo(e.containerInfo),m=r.focusedElem,x=r.selectionRange;if(o!==m&&m&&m.ownerDocument&&$o(m.ownerDocument.documentElement,m)){if(x!==null&&bs(m)){var R=x.start,w=x.end;if(w===void 0&&(w=R),"selectionStart"in m)m.selectionStart=R,m.selectionEnd=Math.min(w,m.value.length);else{var U=m.ownerDocument||document,j=U&&U.defaultView||window;if(j.getSelection){var O=j.getSelection(),F=m.textContent.length,te=Math.min(x.start,F),Te=x.end===void 0?te:Math.min(x.end,F);!O.extend&&te>Te&&(o=Te,Te=te,te=o);var T=Jo(m,te),E=Jo(m,Te);if(T&&E&&(O.rangeCount!==1||O.anchorNode!==T.node||O.anchorOffset!==T.offset||O.focusNode!==E.node||O.focusOffset!==E.offset)){var N=U.createRange();N.setStart(T.node,T.offset),O.removeAllRanges(),te>Te?(O.addRange(N),O.extend(E.node,E.offset)):(N.setEnd(E.node,E.offset),O.addRange(N))}}}}for(U=[],O=m;O=O.parentNode;)O.nodeType===1&&U.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<U.length;m++){var B=U[m];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}yu=!!Kr,Jr=Kr=null}finally{ge=u,Z.p=l,D.T=n}}e.current=t,Ge=2}}function dh(){if(Ge===2){Ge=0;var e=wn,t=ql,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=D.T,D.T=null;var l=Z.p;Z.p=2;var u=ge;ge|=4;try{qd(e,t.alternate,t)}finally{ge=u,Z.p=l,D.T=n}}Ge=3}}function hh(){if(Ge===4||Ge===3){Ge=0,Op();var e=wn,t=ql,n=cn,l=Pd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ge=5:(Ge=0,ql=wn=null,mh(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(On=null),es(n),t=t.stateNode,ot&&typeof ot.onCommitFiberRoot=="function")try{ot.onCommitFiberRoot(ea,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,u=Z.p,Z.p=2,D.T=null;try{for(var r=e.onRecoverableError,o=0;o<l.length;o++){var m=l[o];r(m.value,{componentStack:m.stack})}}finally{D.T=t,Z.p=u}}(cn&3)!==0&&au(),Vt(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===zr?Ba++:(Ba=0,zr=e):Ba=0,Ua(0)}}function mh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ya(t)))}function au(){return fh(),dh(),hh(),ph()}function ph(){if(Ge!==5)return!1;var e=wn,t=wr;wr=0;var n=es(cn),l=D.T,u=Z.p;try{Z.p=32>n?32:n,D.T=null,n=Dr,Dr=null;var r=wn,o=cn;if(Ge=0,ql=wn=null,cn=0,(ge&6)!==0)throw Error(c(331));var m=ge;if(ge|=4,Fd(r.current),Kd(r,r.current,o,n),ge=m,Ua(0,!1),ot&&typeof ot.onPostCommitFiberRoot=="function")try{ot.onPostCommitFiberRoot(ea,r)}catch{}return!0}finally{Z.p=u,D.T=l,mh(e,t)}}function yh(e,t,n){t=Et(n,t),t=dr(e.stateNode,t,2),e=Tn(e,t,2),e!==null&&(na(e,2),Vt(e))}function Ee(e,t,n){if(e.tag===3)yh(e,e,n);else for(;t!==null;){if(t.tag===3){yh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(On===null||!On.has(l))){e=Et(n,e),n=vd(2),l=Tn(t,n,2),l!==null&&(gd(n,l,t,e),na(l,2),Vt(l));break}}t=t.return}}function Lr(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new l0;var u=new Set;l.set(t,u)}else u=l.get(t),u===void 0&&(u=new Set,l.set(t,u));u.has(n)||(Mr=!0,u.add(n),e=r0.bind(null,e,t,n),t.then(e,e))}function r0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ce===e&&(fe&n)===n&&(De===4||De===3&&(fe&62914560)===fe&&300>ct()-Ii?(ge&2)===0&&Yl(e,0):jr|=n,Hl===fe&&(Hl=0)),Vt(e)}function vh(e,t){t===0&&(t=co()),e=Jn(e,t),e!==null&&(na(e,t),Vt(e))}function c0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vh(e,n)}function o0(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),vh(e,n)}function f0(e,t){return Fu(e,t)}var iu=null,Gl=null,kr=!1,uu=!1,Hr=!1,zn=0;function Vt(e){e!==Gl&&e.next===null&&(Gl===null?iu=Gl=e:Gl=Gl.next=e),uu=!0,kr||(kr=!0,h0())}function Ua(e,t){if(!Hr&&uu){Hr=!0;do for(var n=!1,l=iu;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var r=0;else{var o=l.suspendedLanes,m=l.pingedLanes;r=(1<<31-ft(42|e)+1)-1,r&=u&~(o&~m),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Sh(l,r))}else r=fe,r=oi(l,l===Ce?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||ta(l,r)||(n=!0,Sh(l,r));l=l.next}while(n);Hr=!1}}function d0(){gh()}function gh(){uu=kr=!1;var e=0;zn!==0&&A0()&&(e=zn);for(var t=ct(),n=null,l=iu;l!==null;){var u=l.next,r=bh(l,t);r===0?(l.next=null,n===null?iu=u:n.next=u,u===null&&(Gl=n)):(n=l,(e!==0||(r&3)!==0)&&(uu=!0)),l=u}Ge!==0&&Ge!==5||Ua(e),zn!==0&&(zn=0)}function bh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var o=31-ft(r),m=1<<o,x=u[o];x===-1?((m&n)===0||(m&l)!==0)&&(u[o]=Hp(m,t)):x<=t&&(e.expiredLanes|=m),r&=~m}if(t=Ce,n=fe,n=oi(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Se===2||Se===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Wu(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||ta(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Wu(l),es(n)){case 2:case 8:n=so;break;case 32:n=ui;break;case 268435456:n=ro;break;default:n=ui}return l=xh.bind(null,e),n=Fu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Wu(l),e.callbackPriority=2,e.callbackNode=null,2}function xh(e,t){if(Ge!==0&&Ge!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(au()&&e.callbackNode!==n)return null;var l=fe;return l=oi(e,e===Ce?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(th(e,l,t),bh(e,ct()),e.callbackNode!=null&&e.callbackNode===n?xh.bind(null,e):null)}function Sh(e,t){if(au())return null;th(e,t,!0)}function h0(){T0(function(){(ge&6)!==0?Fu(uo,d0):gh()})}function qr(){if(zn===0){var e=Rl;e===0&&(e=si,si<<=1,(si&261888)===0&&(si=256)),zn=e}return zn}function Eh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mi(""+e)}function Ah(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function m0(e,t,n,l,u){if(t==="submit"&&n&&n.stateNode===u){var r=Eh((u[tt]||null).action),o=l.submitter;o&&(t=(t=o[tt]||null)?Eh(t.formAction):o.getAttribute("formAction"),t!==null&&(r=t,o=null));var m=new gi("action","action",null,l,u);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zn!==0){var x=o?Ah(u,o):new FormData(u);ur(n,{pending:!0,data:x,method:u.method,action:r},null,x)}}else typeof r=="function"&&(m.preventDefault(),x=o?Ah(u,o):new FormData(u),ur(n,{pending:!0,data:x,method:u.method,action:r},r,x))},currentTarget:u}]})}}for(var Yr=0;Yr<As.length;Yr++){var Vr=As[Yr],p0=Vr.toLowerCase(),y0=Vr[0].toUpperCase()+Vr.slice(1);Ot(p0,"on"+y0)}Ot(Po,"onAnimationEnd"),Ot(ef,"onAnimationIteration"),Ot(tf,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(wy,"onTransitionRun"),Ot(Dy,"onTransitionStart"),Ot(zy,"onTransitionCancel"),Ot(nf,"onTransitionEnd"),ml("onMouseEnter",["mouseout","mouseover"]),ml("onMouseLeave",["mouseout","mouseover"]),ml("onPointerEnter",["pointerout","pointerover"]),ml("onPointerLeave",["pointerout","pointerover"]),Xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var La="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(" "),v0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(La));function _h(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],u=l.event;l=l.listeners;e:{var r=void 0;if(t)for(var o=l.length-1;0<=o;o--){var m=l[o],x=m.instance,R=m.currentTarget;if(m=m.listener,x!==r&&u.isPropagationStopped())break e;r=m,u.currentTarget=R;try{r(u)}catch(w){Si(w)}u.currentTarget=null,r=x}else for(o=0;o<l.length;o++){if(m=l[o],x=m.instance,R=m.currentTarget,m=m.listener,x!==r&&u.isPropagationStopped())break e;r=m,u.currentTarget=R;try{r(u)}catch(w){Si(w)}u.currentTarget=null,r=x}}}}function oe(e,t){var n=t[ts];n===void 0&&(n=t[ts]=new Set);var l=e+"__bubble";n.has(l)||(Th(t,e,2,!1),n.add(l))}function Gr(e,t,n){var l=0;t&&(l|=4),Th(n,e,l,t)}var su="_reactListening"+Math.random().toString(36).slice(2);function Xr(e){if(!e[su]){e[su]=!0,vo.forEach(function(n){n!=="selectionchange"&&(v0.has(n)||Gr(n,!1,e),Gr(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[su]||(t[su]=!0,Gr("selectionchange",!1,t))}}function Th(e,t,n,l){switch(em(t)){case 2:var u=Q0;break;case 8:u=Z0;break;default:u=ic}n=u.bind(null,t,n,e),u=void 0,!os||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(t,n,{capture:!0,passive:u}):e.addEventListener(t,n,!0):u!==void 0?e.addEventListener(t,n,{passive:u}):e.addEventListener(t,n,!1)}function Qr(e,t,n,l,u){var r=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var m=l.stateNode.containerInfo;if(m===u)break;if(o===4)for(o=l.return;o!==null;){var x=o.tag;if((x===3||x===4)&&o.stateNode.containerInfo===u)return;o=o.return}for(;m!==null;){if(o=fl(m),o===null)return;if(x=o.tag,x===5||x===6||x===26||x===27){l=r=o;continue e}m=m.parentNode}}l=l.return}Mo(function(){var R=r,w=rs(n),U=[];e:{var j=lf.get(e);if(j!==void 0){var O=gi,F=e;switch(e){case"keypress":if(yi(n)===0)break e;case"keydown":case"keyup":O=oy;break;case"focusin":F="focus",O=ms;break;case"focusout":F="blur",O=ms;break;case"beforeblur":case"afterblur":O=ms;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=wo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Ip;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=hy;break;case Po:case ef:case tf:O=ty;break;case nf:O=py;break;case"scroll":case"scrollend":O=Fp;break;case"wheel":O=vy;break;case"copy":case"cut":case"paste":O=ly;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=zo;break;case"toggle":case"beforetoggle":O=by}var te=(t&4)!==0,Te=!te&&(e==="scroll"||e==="scrollend"),T=te?j!==null?j+"Capture":null:j;te=[];for(var E=R,N;E!==null;){var B=E;if(N=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||N===null||T===null||(B=ia(E,T),B!=null&&te.push(ka(E,B,N))),Te)break;E=E.return}0<te.length&&(j=new O(j,F,null,n,w),U.push({event:j,listeners:te}))}}if((t&7)===0){e:{if(j=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",j&&n!==ss&&(F=n.relatedTarget||n.fromElement)&&(fl(F)||F[ol]))break e;if((O||j)&&(j=w.window===w?w:(j=w.ownerDocument)?j.defaultView||j.parentWindow:window,O?(F=n.relatedTarget||n.toElement,O=R,F=F?fl(F):null,F!==null&&(Te=d(F),te=F.tag,F!==Te||te!==5&&te!==27&&te!==6)&&(F=null)):(O=null,F=R),O!==F)){if(te=wo,B="onMouseLeave",T="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(te=zo,B="onPointerLeave",T="onPointerEnter",E="pointer"),Te=O==null?j:aa(O),N=F==null?j:aa(F),j=new te(B,E+"leave",O,n,w),j.target=Te,j.relatedTarget=N,B=null,fl(w)===R&&(te=new te(T,E+"enter",F,n,w),te.target=N,te.relatedTarget=Te,B=te),Te=B,O&&F)t:{for(te=g0,T=O,E=F,N=0,B=T;B;B=te(B))N++;B=0;for(var ee=E;ee;ee=te(ee))B++;for(;0<N-B;)T=te(T),N--;for(;0<B-N;)E=te(E),B--;for(;N--;){if(T===E||E!==null&&T===E.alternate){te=T;break t}T=te(T),E=te(E)}te=null}else te=null;O!==null&&Ch(U,j,O,te,!1),F!==null&&Te!==null&&Ch(U,Te,F,te,!0)}}e:{if(j=R?aa(R):window,O=j.nodeName&&j.nodeName.toLowerCase(),O==="select"||O==="input"&&j.type==="file")var ye=Vo;else if(qo(j))if(Go)ye=My;else{ye=Ny;var I=Cy}else O=j.nodeName,!O||O.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?R&&us(R.elementType)&&(ye=Vo):ye=Ry;if(ye&&(ye=ye(e,R))){Yo(U,ye,n,w);break e}I&&I(e,j,R),e==="focusout"&&R&&j.type==="number"&&R.memoizedProps.value!=null&&is(j,"number",j.value)}switch(I=R?aa(R):window,e){case"focusin":(qo(I)||I.contentEditable==="true")&&(xl=I,xs=R,ha=null);break;case"focusout":ha=xs=xl=null;break;case"mousedown":Ss=!0;break;case"contextmenu":case"mouseup":case"dragend":Ss=!1,Wo(U,n,w);break;case"selectionchange":if(Oy)break;case"keydown":case"keyup":Wo(U,n,w)}var se;if(ys)e:{switch(e){case"compositionstart":var de="onCompositionStart";break e;case"compositionend":de="onCompositionEnd";break e;case"compositionupdate":de="onCompositionUpdate";break e}de=void 0}else bl?ko(e,n)&&(de="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(de="onCompositionStart");de&&(Bo&&n.locale!=="ko"&&(bl||de!=="onCompositionStart"?de==="onCompositionEnd"&&bl&&(se=jo()):(gn=w,fs="value"in gn?gn.value:gn.textContent,bl=!0)),I=ru(R,de),0<I.length&&(de=new Do(de,e,null,n,w),U.push({event:de,listeners:I}),se?de.data=se:(se=Ho(n),se!==null&&(de.data=se)))),(se=Sy?Ey(e,n):Ay(e,n))&&(de=ru(R,"onBeforeInput"),0<de.length&&(I=new Do("onBeforeInput","beforeinput",null,n,w),U.push({event:I,listeners:de}),I.data=se)),m0(U,e,R,n,w)}_h(U,t)})}function ka(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ru(e,t){for(var n=t+"Capture",l=[];e!==null;){var u=e,r=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||r===null||(u=ia(e,n),u!=null&&l.unshift(ka(e,u,r)),u=ia(e,t),u!=null&&l.push(ka(e,u,r))),e.tag===3)return l;e=e.return}return[]}function g0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ch(e,t,n,l,u){for(var r=t._reactName,o=[];n!==null&&n!==l;){var m=n,x=m.alternate,R=m.stateNode;if(m=m.tag,x!==null&&x===l)break;m!==5&&m!==26&&m!==27||R===null||(x=R,u?(R=ia(n,r),R!=null&&o.unshift(ka(n,R,x))):u||(R=ia(n,r),R!=null&&o.push(ka(n,R,x)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var b0=/\r\n?/g,x0=/\u0000|\uFFFD/g;function Nh(e){return(typeof e=="string"?e:""+e).replace(b0,`
|
||
`).replace(x0,"")}function Rh(e,t){return t=Nh(t),Nh(e)===t}function _e(e,t,n,l,u,r){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||yl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&yl(e,""+l);break;case"className":di(e,"class",l);break;case"tabIndex":di(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":di(e,n,l);break;case"style":No(e,l,r);break;case"data":if(t!=="object"){di(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=mi(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 r=="function"&&(n==="formAction"?(t!=="input"&&_e(e,t,"name",u.name,u,null),_e(e,t,"formEncType",u.formEncType,u,null),_e(e,t,"formMethod",u.formMethod,u,null),_e(e,t,"formTarget",u.formTarget,u,null)):(_e(e,t,"encType",u.encType,u,null),_e(e,t,"method",u.method,u,null),_e(e,t,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=mi(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Kt);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(n=l.__html,n!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=mi(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":oe("beforetoggle",e),oe("toggle",e),fi(e,"popover",l);break;case"xlinkActuate":Zt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Zt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Zt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Zt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Zt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Zt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":fi(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Jp.get(n)||n,fi(e,n,l))}}function Zr(e,t,n,l,u,r){switch(n){case"style":No(e,l,r);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(n=l.__html,n!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"children":typeof l=="string"?yl(e,l):(typeof l=="number"||typeof l=="bigint")&&yl(e,""+l);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Kt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!go.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(u=n.endsWith("Capture"),t=n.slice(2,u?n.length-7:void 0),r=e[tt]||null,r=r!=null?r[n]:null,typeof r=="function"&&e.removeEventListener(t,r,u),typeof l=="function")){typeof r!="function"&&r!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,u);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):fi(e,n,l)}}}function Fe(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":oe("error",e),oe("load",e);var l=!1,u=!1,r;for(r in n)if(n.hasOwnProperty(r)){var o=n[r];if(o!=null)switch(r){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:_e(e,t,r,o,n,null)}}u&&_e(e,t,"srcSet",n.srcSet,n,null),l&&_e(e,t,"src",n.src,n,null);return;case"input":oe("invalid",e);var m=r=o=u=null,x=null,R=null;for(l in n)if(n.hasOwnProperty(l)){var w=n[l];if(w!=null)switch(l){case"name":u=w;break;case"type":o=w;break;case"checked":x=w;break;case"defaultChecked":R=w;break;case"value":r=w;break;case"defaultValue":m=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(c(137,t));break;default:_e(e,t,l,w,n,null)}}Ao(e,r,m,x,R,o,u,!1);return;case"select":oe("invalid",e),l=o=r=null;for(u in n)if(n.hasOwnProperty(u)&&(m=n[u],m!=null))switch(u){case"value":r=m;break;case"defaultValue":o=m;break;case"multiple":l=m;default:_e(e,t,u,m,n,null)}t=r,n=o,e.multiple=!!l,t!=null?pl(e,!!l,t,!1):n!=null&&pl(e,!!l,n,!0);return;case"textarea":oe("invalid",e),r=u=l=null;for(o in n)if(n.hasOwnProperty(o)&&(m=n[o],m!=null))switch(o){case"value":l=m;break;case"defaultValue":u=m;break;case"children":r=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:_e(e,t,o,m,n,null)}To(e,l,u,r);return;case"option":for(x in n)if(n.hasOwnProperty(x)&&(l=n[x],l!=null))switch(x){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:_e(e,t,x,l,n,null)}return;case"dialog":oe("beforetoggle",e),oe("toggle",e),oe("cancel",e),oe("close",e);break;case"iframe":case"object":oe("load",e);break;case"video":case"audio":for(l=0;l<La.length;l++)oe(La[l],e);break;case"image":oe("error",e),oe("load",e);break;case"details":oe("toggle",e);break;case"embed":case"source":case"link":oe("error",e),oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in n)if(n.hasOwnProperty(R)&&(l=n[R],l!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:_e(e,t,R,l,n,null)}return;default:if(us(t)){for(w in n)n.hasOwnProperty(w)&&(l=n[w],l!==void 0&&Zr(e,t,w,l,n,void 0));return}}for(m in n)n.hasOwnProperty(m)&&(l=n[m],l!=null&&_e(e,t,m,l,n,null))}function S0(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,r=null,o=null,m=null,x=null,R=null,w=null;for(O in n){var U=n[O];if(n.hasOwnProperty(O)&&U!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":x=U;default:l.hasOwnProperty(O)||_e(e,t,O,null,l,U)}}for(var j in l){var O=l[j];if(U=n[j],l.hasOwnProperty(j)&&(O!=null||U!=null))switch(j){case"type":r=O;break;case"name":u=O;break;case"checked":R=O;break;case"defaultChecked":w=O;break;case"value":o=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,t));break;default:O!==U&&_e(e,t,j,O,l,U)}}as(e,o,m,x,R,w,r,u);return;case"select":O=o=m=j=null;for(r in n)if(x=n[r],n.hasOwnProperty(r)&&x!=null)switch(r){case"value":break;case"multiple":O=x;default:l.hasOwnProperty(r)||_e(e,t,r,null,l,x)}for(u in l)if(r=l[u],x=n[u],l.hasOwnProperty(u)&&(r!=null||x!=null))switch(u){case"value":j=r;break;case"defaultValue":m=r;break;case"multiple":o=r;default:r!==x&&_e(e,t,u,r,l,x)}t=m,n=o,l=O,j!=null?pl(e,!!n,j,!1):!!l!=!!n&&(t!=null?pl(e,!!n,t,!0):pl(e,!!n,n?[]:"",!1));return;case"textarea":O=j=null;for(m in n)if(u=n[m],n.hasOwnProperty(m)&&u!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:_e(e,t,m,null,l,u)}for(o in l)if(u=l[o],r=n[o],l.hasOwnProperty(o)&&(u!=null||r!=null))switch(o){case"value":j=u;break;case"defaultValue":O=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==r&&_e(e,t,o,u,l,r)}_o(e,j,O);return;case"option":for(var F in n)if(j=n[F],n.hasOwnProperty(F)&&j!=null&&!l.hasOwnProperty(F))switch(F){case"selected":e.selected=!1;break;default:_e(e,t,F,null,l,j)}for(x in l)if(j=l[x],O=n[x],l.hasOwnProperty(x)&&j!==O&&(j!=null||O!=null))switch(x){case"selected":e.selected=j&&typeof j!="function"&&typeof j!="symbol";break;default:_e(e,t,x,j,l,O)}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 te in n)j=n[te],n.hasOwnProperty(te)&&j!=null&&!l.hasOwnProperty(te)&&_e(e,t,te,null,l,j);for(R in l)if(j=l[R],O=n[R],l.hasOwnProperty(R)&&j!==O&&(j!=null||O!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(c(137,t));break;default:_e(e,t,R,j,l,O)}return;default:if(us(t)){for(var Te in n)j=n[Te],n.hasOwnProperty(Te)&&j!==void 0&&!l.hasOwnProperty(Te)&&Zr(e,t,Te,void 0,l,j);for(w in l)j=l[w],O=n[w],!l.hasOwnProperty(w)||j===O||j===void 0&&O===void 0||Zr(e,t,w,j,l,O);return}}for(var T in n)j=n[T],n.hasOwnProperty(T)&&j!=null&&!l.hasOwnProperty(T)&&_e(e,t,T,null,l,j);for(U in l)j=l[U],O=n[U],!l.hasOwnProperty(U)||j===O||j==null&&O==null||_e(e,t,U,j,l,O)}function Mh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function E0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var u=n[l],r=u.transferSize,o=u.initiatorType,m=u.duration;if(r&&m&&Mh(o)){for(o=0,m=u.responseEnd,l+=1;l<n.length;l++){var x=n[l],R=x.startTime;if(R>m)break;var w=x.transferSize,U=x.initiatorType;w&&Mh(U)&&(x=x.responseEnd,o+=w*(x<m?1:(m-R)/(x-R)))}if(--l,t+=8*(r+o)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Kr=null,Jr=null;function cu(e){return e.nodeType===9?e:e.ownerDocument}function jh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Oh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function $r(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Fr=null;function A0(){var e=window.event;return e&&e.type==="popstate"?e===Fr?!1:(Fr=e,!0):(Fr=null,!1)}var wh=typeof setTimeout=="function"?setTimeout:void 0,_0=typeof clearTimeout=="function"?clearTimeout:void 0,Dh=typeof Promise=="function"?Promise:void 0,T0=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(C0)}:wh;function C0(e){setTimeout(function(){throw e})}function Bn(e){return e==="head"}function zh(e,t){var n=t,l=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(u),Kl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Ha(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ha(n);for(var r=n.firstChild;r;){var o=r.nextSibling,m=r.nodeName;r[la]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=o}}else n==="body"&&Ha(e.ownerDocument.body);n=u}while(n);Kl(t)}function Bh(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Wr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Wr(n),ns(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function N0(e,t,n,l){for(;e.nodeType===1;){var u=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[la])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=Nt(e.nextSibling),e===null)break}return null}function R0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Nt(e.nextSibling),e===null))return null;return e}function Uh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Nt(e.nextSibling),e===null))return null;return e}function Ir(e){return e.data==="$?"||e.data==="$~"}function Pr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function M0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Nt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ec=null;function Lh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Nt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function kh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Hh(e,t,n){switch(t=cu(n),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Ha(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ns(e)}var Rt=new Map,qh=new Set;function ou(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var on=Z.d;Z.d={f:j0,r:O0,D:w0,C:D0,L:z0,m:B0,X:L0,S:U0,M:k0};function j0(){var e=on.f(),t=tu();return e||t}function O0(e){var t=dl(e);t!==null&&t.tag===5&&t.type==="form"?ld(t):on.r(e)}var Xl=typeof document>"u"?null:document;function Yh(e,t,n){var l=Xl;if(l&&typeof t=="string"&&t){var u=xt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),qh.has(u)||(qh.add(u),e={rel:e,crossOrigin:n,href:t},l.querySelector(u)===null&&(t=l.createElement("link"),Fe(t,"link",e),Xe(t),l.head.appendChild(t)))}}function w0(e){on.D(e),Yh("dns-prefetch",e,null)}function D0(e,t){on.C(e,t),Yh("preconnect",e,t)}function z0(e,t,n){on.L(e,t,n);var l=Xl;if(l&&e&&t){var u='link[rel="preload"][as="'+xt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+xt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+xt(n.imageSizes)+'"]')):u+='[href="'+xt(e)+'"]';var r=u;switch(t){case"style":r=Ql(e);break;case"script":r=Zl(e)}Rt.has(r)||(e=_({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Rt.set(r,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(qa(r))||t==="script"&&l.querySelector(Ya(r))||(t=l.createElement("link"),Fe(t,"link",e),Xe(t),l.head.appendChild(t)))}}function B0(e,t){on.m(e,t);var n=Xl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+xt(l)+'"][href="'+xt(e)+'"]',r=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Zl(e)}if(!Rt.has(r)&&(e=_({rel:"modulepreload",href:e},t),Rt.set(r,e),n.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ya(r)))return}l=n.createElement("link"),Fe(l,"link",e),Xe(l),n.head.appendChild(l)}}}function U0(e,t,n){on.S(e,t,n);var l=Xl;if(l&&e){var u=hl(l).hoistableStyles,r=Ql(e);t=t||"default";var o=u.get(r);if(!o){var m={loading:0,preload:null};if(o=l.querySelector(qa(r)))m.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Rt.get(r))&&tc(e,n);var x=o=l.createElement("link");Xe(x),Fe(x,"link",e),x._p=new Promise(function(R,w){x.onload=R,x.onerror=w}),x.addEventListener("load",function(){m.loading|=1}),x.addEventListener("error",function(){m.loading|=2}),m.loading|=4,fu(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:m},u.set(r,o)}}}function L0(e,t){on.X(e,t);var n=Xl;if(n&&e){var l=hl(n).hoistableScripts,u=Zl(e),r=l.get(u);r||(r=n.querySelector(Ya(u)),r||(e=_({src:e,async:!0},t),(t=Rt.get(u))&&nc(e,t),r=n.createElement("script"),Xe(r),Fe(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(u,r))}}function k0(e,t){on.M(e,t);var n=Xl;if(n&&e){var l=hl(n).hoistableScripts,u=Zl(e),r=l.get(u);r||(r=n.querySelector(Ya(u)),r||(e=_({src:e,async:!0,type:"module"},t),(t=Rt.get(u))&&nc(e,t),r=n.createElement("script"),Xe(r),Fe(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(u,r))}}function Vh(e,t,n,l){var u=(u=re.current)?ou(u):null;if(!u)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=hl(u).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var r=hl(u).hoistableStyles,o=r.get(e);if(o||(u=u.ownerDocument||u,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,o),(r=u.querySelector(qa(e)))&&!r._p&&(o.instance=r,o.state.loading=5),Rt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rt.set(e,n),r||H0(u,e,n,o.state))),t&&l===null)throw Error(c(528,""));return o}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zl(n),n=hl(u).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Ql(e){return'href="'+xt(e)+'"'}function qa(e){return'link[rel="stylesheet"]['+e+"]"}function Gh(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function H0(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Fe(t,"link",n),Xe(t),e.head.appendChild(t))}function Zl(e){return'[src="'+xt(e)+'"]'}function Ya(e){return"script[async]"+e}function Xh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+xt(n.href)+'"]');if(l)return t.instance=l,Xe(l),l;var u=_({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Xe(l),Fe(l,"style",u),fu(l,n.precedence,e),t.instance=l;case"stylesheet":u=Ql(n.href);var r=e.querySelector(qa(u));if(r)return t.state.loading|=4,t.instance=r,Xe(r),r;l=Gh(n),(u=Rt.get(u))&&tc(l,u),r=(e.ownerDocument||e).createElement("link"),Xe(r);var o=r;return o._p=new Promise(function(m,x){o.onload=m,o.onerror=x}),Fe(r,"link",l),t.state.loading|=4,fu(r,n.precedence,e),t.instance=r;case"script":return r=Zl(n.src),(u=e.querySelector(Ya(r)))?(t.instance=u,Xe(u),u):(l=n,(u=Rt.get(r))&&(l=_({},n),nc(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),Xe(u),Fe(u,"link",l),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,fu(l,n.precedence,e));return t.instance}function fu(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,r=u,o=0;o<l.length;o++){var m=l[o];if(m.dataset.precedence===t)r=m;else if(r!==u)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function tc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var du=null;function Qh(e,t,n){if(du===null){var l=new Map,u=du=new Map;u.set(n,l)}else u=du,l=u.get(n),l||(l=new Map,u.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),u=0;u<n.length;u++){var r=n[u];if(!(r[la]||r[Ze]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var o=r.getAttribute(t)||"";o=e+o;var m=l.get(o);m?m.push(r):l.set(o,[r])}}return l}function Zh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function q0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Kh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Y0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=Ql(l.href),r=t.querySelector(qa(u));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=r,Xe(r);return}r=t.ownerDocument||t,l=Gh(l),(u=Rt.get(u))&&tc(l,u),r=r.createElement("link"),Xe(r);var o=r;o._p=new Promise(function(m,x){o.onload=m,o.onerror=x}),Fe(r,"link",l),n.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=hu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var lc=0;function V0(e,t){return e.stylesheets&&e.count===0&&pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&lc===0&&(lc=62500*E0());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>lc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function hu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mu=null;function pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mu=new Map,t.forEach(G0,e),mu=null,hu.call(e))}function G0(e,t){if(!(t.state.loading&4)){var n=mu.get(e);if(n)var l=n.get(null);else{n=new Map,mu.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<u.length;r++){var o=u[r];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),l=o)}l&&n.set(null,l)}u=t.instance,o=u.getAttribute("data-precedence"),r=n.get(o)||l,r===l&&n.set(null,u),n.set(o,u),this.count++,l=hu.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),r?r.parentNode.insertBefore(u,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Va={$$typeof:V,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function X0(e,t,n,l,u,r,o,m,x){this.tag=1,this.containerInfo=e,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=Iu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Iu(0),this.hiddenUpdates=Iu(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=r,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Jh(e,t,n,l,u,r,o,m,x,R,w,U){return e=new X0(e,t,n,o,x,R,w,U,m),t=1,r===!0&&(t|=24),r=ht(3,null,null,t),e.current=r,r.stateNode=e,t=Us(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:t},qs(r),e}function $h(e){return e?(e=Al,e):Al}function Fh(e,t,n,l,u,r){u=$h(u),l.context===null?l.context=u:l.pendingContext=u,l=_n(t),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=Tn(e,l,t),n!==null&&(st(n,e,t),xa(n,e,t))}function Wh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ac(e,t){Wh(e,t),(e=e.alternate)&&Wh(e,t)}function Ih(e){if(e.tag===13||e.tag===31){var t=Jn(e,67108864);t!==null&&st(t,e,67108864),ac(e,67108864)}}function Ph(e){if(e.tag===13||e.tag===31){var t=gt();t=Pu(t);var n=Jn(e,t);n!==null&&st(n,e,t),ac(e,t)}}var yu=!0;function Q0(e,t,n,l){var u=D.T;D.T=null;var r=Z.p;try{Z.p=2,ic(e,t,n,l)}finally{Z.p=r,D.T=u}}function Z0(e,t,n,l){var u=D.T;D.T=null;var r=Z.p;try{Z.p=8,ic(e,t,n,l)}finally{Z.p=r,D.T=u}}function ic(e,t,n,l){if(yu){var u=uc(l);if(u===null)Qr(e,t,l,vu,n),tm(e,l);else if(J0(u,e,t,n,l))l.stopPropagation();else if(tm(e,l),t&4&&-1<K0.indexOf(e)){for(;u!==null;){var r=dl(u);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var o=Gn(r.pendingLanes);if(o!==0){var m=r;for(m.pendingLanes|=2,m.entangledLanes|=2;o;){var x=1<<31-ft(o);m.entanglements[1]|=x,o&=~x}Vt(r),(ge&6)===0&&(Pi=ct()+500,Ua(0))}}break;case 31:case 13:m=Jn(r,2),m!==null&&st(m,r,2),tu(),ac(r,2)}if(r=uc(l),r===null&&Qr(e,t,l,vu,n),r===u)break;u=r}u!==null&&l.stopPropagation()}else Qr(e,t,l,null,n)}}function uc(e){return e=rs(e),sc(e)}var vu=null;function sc(e){if(vu=null,e=fl(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=y(t),e!==null)return e;e=null}else if(n===31){if(e=g(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vu=e,null}function em(e){switch(e){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(wp()){case uo:return 2;case so:return 8;case ui:case Dp:return 32;case ro:return 268435456;default:return 32}default:return 32}}var rc=!1,Un=null,Ln=null,kn=null,Ga=new Map,Xa=new Map,Hn=[],K0="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 tm(e,t){switch(e){case"focusin":case"focusout":Un=null;break;case"dragenter":case"dragleave":Ln=null;break;case"mouseover":case"mouseout":kn=null;break;case"pointerover":case"pointerout":Ga.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xa.delete(t.pointerId)}}function Qa(e,t,n,l,u,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:r,targetContainers:[u]},t!==null&&(t=dl(t),t!==null&&Ih(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function J0(e,t,n,l,u){switch(t){case"focusin":return Un=Qa(Un,e,t,n,l,u),!0;case"dragenter":return Ln=Qa(Ln,e,t,n,l,u),!0;case"mouseover":return kn=Qa(kn,e,t,n,l,u),!0;case"pointerover":var r=u.pointerId;return Ga.set(r,Qa(Ga.get(r)||null,e,t,n,l,u)),!0;case"gotpointercapture":return r=u.pointerId,Xa.set(r,Qa(Xa.get(r)||null,e,t,n,l,u)),!0}return!1}function nm(e){var t=fl(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=y(n),t!==null){e.blockedOn=t,po(e.priority,function(){Ph(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,po(e.priority,function(){Ph(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=uc(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);ss=l,n.target.dispatchEvent(l),ss=null}else return t=dl(n),t!==null&&Ih(t),e.blockedOn=n,!1;t.shift()}return!0}function lm(e,t,n){gu(e)&&n.delete(t)}function $0(){rc=!1,Un!==null&&gu(Un)&&(Un=null),Ln!==null&&gu(Ln)&&(Ln=null),kn!==null&&gu(kn)&&(kn=null),Ga.forEach(lm),Xa.forEach(lm)}function bu(e,t){e.blockedOn===t&&(e.blockedOn=null,rc||(rc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,$0)))}var xu=null;function am(e){xu!==e&&(xu=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){xu===e&&(xu=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],u=e[t+2];if(typeof l!="function"){if(sc(l||n)===null)continue;break}var r=dl(n);r!==null&&(e.splice(t,3),t-=3,ur(r,{pending:!0,data:u,method:n.method,action:l},l,u))}}))}function Kl(e){function t(x){return bu(x,e)}Un!==null&&bu(Un,e),Ln!==null&&bu(Ln,e),kn!==null&&bu(kn,e),Ga.forEach(t),Xa.forEach(t);for(var n=0;n<Hn.length;n++){var l=Hn[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Hn.length&&(n=Hn[0],n.blockedOn===null);)nm(n),n.blockedOn===null&&Hn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var u=n[l],r=n[l+1],o=u[tt]||null;if(typeof r=="function")o||am(n);else if(o){var m=null;if(r&&r.hasAttribute("formAction")){if(u=r,o=r[tt]||null)m=o.formAction;else if(sc(u)!==null)continue}else m=o.action;typeof m=="function"?n[l+1]=m:(n.splice(l,3),l-=3),am(n)}}}function im(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(o){return u=o})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function cc(e){this._internalRoot=e}Su.prototype.render=cc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,l=gt();Fh(n,l,e,t,null,null)},Su.prototype.unmount=cc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fh(e.current,2,null,e,null,null),tu(),t[ol]=null}};function Su(e){this._internalRoot=e}Su.prototype.unstable_scheduleHydration=function(e){if(e){var t=mo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Hn.length&&t!==0&&t<Hn[n].priority;n++);Hn.splice(n,0,e),n===0&&nm(e)}};var um=a.version;if(um!=="19.2.0")throw Error(c(527,um,"19.2.0"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=v(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var F0={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eu.isDisabled&&Eu.supportsFiber)try{ea=Eu.inject(F0),ot=Eu}catch{}}return Ka.createRoot=function(e,t){if(!f(e))throw Error(c(299));var n=!1,l="",u=hd,r=md,o=pd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Jh(e,1,!1,null,null,n,l,null,u,r,o,im),e[ol]=t.current,Xr(e),new cc(t)},Ka.hydrateRoot=function(e,t,n){if(!f(e))throw Error(c(299));var l=!1,u="",r=hd,o=md,m=pd,x=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=Jh(e,1,!0,t,n??null,l,u,x,r,o,m,im),t.context=$h(null),n=t.current,l=gt(),l=Pu(l),u=_n(l),u.callback=null,Tn(n,u,l),n=l,t.current.lanes=n,na(t,n),Vt(t),e[ol]=t.current,Xr(e),new Su(t)},Ka.version="19.2.0",Ka}var ym;function uv(){if(ym)return dc.exports;ym=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(a){console.error(a)}}return i(),dc.exports=iv(),dc.exports}var sv=uv();var vm="popstate";function rv(i={}){function a(c,f){let{pathname:d,search:y,hash:g}=c.location;return Rc("",{pathname:d,search:y,hash:g},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function s(c,f){return typeof f=="string"?f:ei(f)}return ov(a,s,null,i)}function Oe(i,a){if(i===!1||i===null||typeof i>"u")throw new Error(a)}function Bt(i,a){if(!i){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function cv(){return Math.random().toString(36).substring(2,10)}function gm(i,a){return{usr:i.state,key:i.key,idx:a}}function Rc(i,a,s=null,c){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof a=="string"?Fl(a):a,state:s,key:a&&a.key||c||cv()}}function ei({pathname:i="/",search:a="",hash:s=""}){return a&&a!=="?"&&(i+=a.charAt(0)==="?"?a:"?"+a),s&&s!=="#"&&(i+=s.charAt(0)==="#"?s:"#"+s),i}function Fl(i){let a={};if(i){let s=i.indexOf("#");s>=0&&(a.hash=i.substring(s),i=i.substring(0,s));let c=i.indexOf("?");c>=0&&(a.search=i.substring(c),i=i.substring(0,c)),i&&(a.pathname=i)}return a}function ov(i,a,s,c={}){let{window:f=document.defaultView,v5Compat:d=!1}=c,y=f.history,g="POP",p=null,v=S();v==null&&(v=0,y.replaceState({...y.state,idx:v},""));function S(){return(y.state||{idx:null}).idx}function _(){g="POP";let q=S(),Y=q==null?null:q-v;v=q,p&&p({action:g,location:H.location,delta:Y})}function M(q,Y){g="PUSH";let Q=Rc(H.location,q,Y);v=S()+1;let V=gm(Q,v),J=H.createHref(Q);try{y.pushState(V,"",J)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;f.location.assign(J)}d&&p&&p({action:g,location:H.location,delta:1})}function C(q,Y){g="REPLACE";let Q=Rc(H.location,q,Y);v=S();let V=gm(Q,v),J=H.createHref(Q);y.replaceState(V,"",J),d&&p&&p({action:g,location:H.location,delta:0})}function z(q){return fv(q)}let H={get action(){return g},get location(){return i(f,y)},listen(q){if(p)throw new Error("A history only accepts one active listener");return f.addEventListener(vm,_),p=q,()=>{f.removeEventListener(vm,_),p=null}},createHref(q){return a(f,q)},createURL:z,encodeLocation(q){let Y=z(q);return{pathname:Y.pathname,search:Y.search,hash:Y.hash}},push:M,replace:C,go(q){return y.go(q)}};return H}function fv(i,a=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(s,"No window.location.(origin|href) available to create URL");let c=typeof i=="string"?i:ei(i);return c=c.replace(/ $/,"%20"),!a&&c.startsWith("//")&&(c=s+c),new URL(c,s)}function Hm(i,a,s="/"){return dv(i,a,s,!1)}function dv(i,a,s,c){let f=typeof a=="string"?Fl(a):a,d=hn(f.pathname||"/",s);if(d==null)return null;let y=qm(i);hv(y);let g=null;for(let p=0;g==null&&p<y.length;++p){let v=_v(d);g=Ev(y[p],v,c)}return g}function qm(i,a=[],s=[],c="",f=!1){let d=(y,g,p=f,v)=>{let S={relativePath:v===void 0?y.path||"":v,caseSensitive:y.caseSensitive===!0,childrenIndex:g,route:y};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(c)&&p)return;Oe(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length)}let _=fn([c,S.relativePath]),M=s.concat(S);y.children&&y.children.length>0&&(Oe(y.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${_}".`),qm(y.children,a,M,_,p)),!(y.path==null&&!y.index)&&a.push({path:_,score:xv(_,y.index),routesMeta:M})};return i.forEach((y,g)=>{if(y.path===""||!y.path?.includes("?"))d(y,g);else for(let p of Ym(y.path))d(y,g,!0,p)}),a}function Ym(i){let a=i.split("/");if(a.length===0)return[];let[s,...c]=a,f=s.endsWith("?"),d=s.replace(/\?$/,"");if(c.length===0)return f?[d,""]:[d];let y=Ym(c.join("/")),g=[];return g.push(...y.map(p=>p===""?d:[d,p].join("/"))),f&&g.push(...y),g.map(p=>i.startsWith("/")&&p===""?"/":p)}function hv(i){i.sort((a,s)=>a.score!==s.score?s.score-a.score:Sv(a.routesMeta.map(c=>c.childrenIndex),s.routesMeta.map(c=>c.childrenIndex)))}var mv=/^:[\w-]+$/,pv=3,yv=2,vv=1,gv=10,bv=-2,bm=i=>i==="*";function xv(i,a){let s=i.split("/"),c=s.length;return s.some(bm)&&(c+=bv),a&&(c+=yv),s.filter(f=>!bm(f)).reduce((f,d)=>f+(mv.test(d)?pv:d===""?vv:gv),c)}function Sv(i,a){return i.length===a.length&&i.slice(0,-1).every((c,f)=>c===a[f])?i[i.length-1]-a[a.length-1]:0}function Ev(i,a,s=!1){let{routesMeta:c}=i,f={},d="/",y=[];for(let g=0;g<c.length;++g){let p=c[g],v=g===c.length-1,S=d==="/"?a:a.slice(d.length)||"/",_=Uu({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},S),M=p.route;if(!_&&v&&s&&!c[c.length-1].route.index&&(_=Uu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},S)),!_)return null;Object.assign(f,_.params),y.push({params:f,pathname:fn([d,_.pathname]),pathnameBase:Mv(fn([d,_.pathnameBase])),route:M}),_.pathnameBase!=="/"&&(d=fn([d,_.pathnameBase]))}return y}function Uu(i,a){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[s,c]=Av(i.path,i.caseSensitive,i.end),f=a.match(s);if(!f)return null;let d=f[0],y=d.replace(/(.)\/+$/,"$1"),g=f.slice(1);return{params:c.reduce((v,{paramName:S,isOptional:_},M)=>{if(S==="*"){let z=g[M]||"";y=d.slice(0,d.length-z.length).replace(/(.)\/+$/,"$1")}const C=g[M];return _&&!C?v[S]=void 0:v[S]=(C||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:y,pattern:i}}function Av(i,a=!1,s=!0){Bt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let c=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,g,p)=>(c.push({paramName:g,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(c.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,a?void 0:"i"),c]}function _v(i){try{return i.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Bt(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),i}}function hn(i,a){if(a==="/")return i;if(!i.toLowerCase().startsWith(a.toLowerCase()))return null;let s=a.endsWith("/")?a.length-1:a.length,c=i.charAt(s);return c&&c!=="/"?null:i.slice(s)||"/"}var Tv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cv=i=>Tv.test(i);function Nv(i,a="/"){let{pathname:s,search:c="",hash:f=""}=typeof i=="string"?Fl(i):i,d;if(s)if(Cv(s))d=s;else{if(s.includes("//")){let y=s;s=s.replace(/\/\/+/g,"/"),Bt(!1,`Pathnames cannot have embedded double slashes - normalizing ${y} -> ${s}`)}s.startsWith("/")?d=xm(s.substring(1),"/"):d=xm(s,a)}else d=a;return{pathname:d,search:jv(c),hash:Ov(f)}}function xm(i,a){let s=a.replace(/\/+$/,"").split("/");return i.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function yc(i,a,s,c){return`Cannot include a '${i}' character in a manually specified \`to.${a}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Rv(i){return i.filter((a,s)=>s===0||a.route.path&&a.route.path.length>0)}function Vm(i){let a=Rv(i);return a.map((s,c)=>c===a.length-1?s.pathname:s.pathnameBase)}function Gm(i,a,s,c=!1){let f;typeof i=="string"?f=Fl(i):(f={...i},Oe(!f.pathname||!f.pathname.includes("?"),yc("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),yc("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),yc("#","search","hash",f)));let d=i===""||f.pathname==="",y=d?"/":f.pathname,g;if(y==null)g=s;else{let _=a.length-1;if(!c&&y.startsWith("..")){let M=y.split("/");for(;M[0]==="..";)M.shift(),_-=1;f.pathname=M.join("/")}g=_>=0?a[_]:"/"}let p=Nv(f,g),v=y&&y!=="/"&&y.endsWith("/"),S=(d||y===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(v||S)&&(p.pathname+="/"),p}var fn=i=>i.join("/").replace(/\/\/+/g,"/"),Mv=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),jv=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Ov=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function wv(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Xm=["POST","PUT","PATCH","DELETE"];new Set(Xm);var Dv=["GET",...Xm];new Set(Dv);var Wl=b.createContext(null);Wl.displayName="DataRouter";var Hu=b.createContext(null);Hu.displayName="DataRouterState";b.createContext(!1);var Qm=b.createContext({isTransitioning:!1});Qm.displayName="ViewTransition";var zv=b.createContext(new Map);zv.displayName="Fetchers";var Bv=b.createContext(null);Bv.displayName="Await";var Qt=b.createContext(null);Qt.displayName="Navigation";var ti=b.createContext(null);ti.displayName="Location";var mn=b.createContext({outlet:null,matches:[],isDataRoute:!1});mn.displayName="Route";var Yc=b.createContext(null);Yc.displayName="RouteError";function Uv(i,{relative:a}={}){Oe(ni(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:c}=b.useContext(Qt),{hash:f,pathname:d,search:y}=li(i,{relative:a}),g=d;return s!=="/"&&(g=d==="/"?s:fn([s,d])),c.createHref({pathname:g,search:y,hash:f})}function ni(){return b.useContext(ti)!=null}function cl(){return Oe(ni(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(ti).location}var Zm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Km(i){b.useContext(Qt).static||b.useLayoutEffect(i)}function Lv(){let{isDataRoute:i}=b.useContext(mn);return i?Fv():kv()}function kv(){Oe(ni(),"useNavigate() may be used only in the context of a <Router> component.");let i=b.useContext(Wl),{basename:a,navigator:s}=b.useContext(Qt),{matches:c}=b.useContext(mn),{pathname:f}=cl(),d=JSON.stringify(Vm(c)),y=b.useRef(!1);return Km(()=>{y.current=!0}),b.useCallback((p,v={})=>{if(Bt(y.current,Zm),!y.current)return;if(typeof p=="number"){s.go(p);return}let S=Gm(p,JSON.parse(d),f,v.relative==="path");i==null&&a!=="/"&&(S.pathname=S.pathname==="/"?a:fn([a,S.pathname])),(v.replace?s.replace:s.push)(S,v.state,v)},[a,s,d,f,i])}b.createContext(null);function li(i,{relative:a}={}){let{matches:s}=b.useContext(mn),{pathname:c}=cl(),f=JSON.stringify(Vm(s));return b.useMemo(()=>Gm(i,JSON.parse(f),c,a==="path"),[i,f,c,a])}function Hv(i,a){return Jm(i,a)}function Jm(i,a,s,c,f){Oe(ni(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=b.useContext(Qt),{matches:y}=b.useContext(mn),g=y[y.length-1],p=g?g.params:{},v=g?g.pathname:"/",S=g?g.pathnameBase:"/",_=g&&g.route;{let Q=_&&_.path||"";$m(v,!_||Q.endsWith("*")||Q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${Q}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
||
|
||
Please change the parent <Route path="${Q}"> to <Route path="${Q==="/"?"*":`${Q}/*`}">.`)}let M=cl(),C;if(a){let Q=typeof a=="string"?Fl(a):a;Oe(S==="/"||Q.pathname?.startsWith(S),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${S}" but pathname "${Q.pathname}" was given in the \`location\` prop.`),C=Q}else C=M;let z=C.pathname||"/",H=z;if(S!=="/"){let Q=S.replace(/^\//,"").split("/");H="/"+z.replace(/^\//,"").split("/").slice(Q.length).join("/")}let q=Hm(i,{pathname:H});Bt(_||q!=null,`No routes matched location "${C.pathname}${C.search}${C.hash}" `),Bt(q==null||q[q.length-1].route.element!==void 0||q[q.length-1].route.Component!==void 0||q[q.length-1].route.lazy!==void 0,`Matched leaf route at location "${C.pathname}${C.search}${C.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let Y=Xv(q&&q.map(Q=>Object.assign({},Q,{params:Object.assign({},p,Q.params),pathname:fn([S,d.encodeLocation?d.encodeLocation(Q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Q.pathname]),pathnameBase:Q.pathnameBase==="/"?S:fn([S,d.encodeLocation?d.encodeLocation(Q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Q.pathnameBase])})),y,s,c,f);return a&&Y?b.createElement(ti.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},Y):Y}function qv(){let i=$v(),a=wv(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),s=i instanceof Error?i.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},d={padding:"2px 4px",backgroundColor:c},y=null;return console.error("Error handled by React Router default ErrorBoundary:",i),y=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:d},"ErrorBoundary")," or"," ",b.createElement("code",{style:d},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},a),s?b.createElement("pre",{style:f},s):null,y)}var Yv=b.createElement(qv,null),Vv=class extends b.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,a){return a.location!==i.location||a.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:a.error,location:a.location,revalidation:i.revalidation||a.revalidation}}componentDidCatch(i,a){this.props.onError?this.props.onError(i,a):console.error("React Router caught the following error during render",i)}render(){return this.state.error!==void 0?b.createElement(mn.Provider,{value:this.props.routeContext},b.createElement(Yc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Gv({routeContext:i,match:a,children:s}){let c=b.useContext(Wl);return c&&c.static&&c.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=a.route.id),b.createElement(mn.Provider,{value:i},s)}function Xv(i,a=[],s=null,c=null,f=null){if(i==null){if(!s)return null;if(s.errors)i=s.matches;else if(a.length===0&&!s.initialized&&s.matches.length>0)i=s.matches;else return null}let d=i,y=s?.errors;if(y!=null){let S=d.findIndex(_=>_.route.id&&y?.[_.route.id]!==void 0);Oe(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),d=d.slice(0,Math.min(d.length,S+1))}let g=!1,p=-1;if(s)for(let S=0;S<d.length;S++){let _=d[S];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(p=S),_.route.id){let{loaderData:M,errors:C}=s,z=_.route.loader&&!M.hasOwnProperty(_.route.id)&&(!C||C[_.route.id]===void 0);if(_.route.lazy||z){g=!0,p>=0?d=d.slice(0,p+1):d=[d[0]];break}}}let v=s&&c?(S,_)=>{c(S,{location:s.location,params:s.matches?.[0]?.params??{},errorInfo:_})}:void 0;return d.reduceRight((S,_,M)=>{let C,z=!1,H=null,q=null;s&&(C=y&&_.route.id?y[_.route.id]:void 0,H=_.route.errorElement||Yv,g&&(p<0&&M===0?($m("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,q=null):p===M&&(z=!0,q=_.route.hydrateFallbackElement||null)));let Y=a.concat(d.slice(0,M+1)),Q=()=>{let V;return C?V=H:z?V=q:_.route.Component?V=b.createElement(_.route.Component,null):_.route.element?V=_.route.element:V=S,b.createElement(Gv,{match:_,routeContext:{outlet:S,matches:Y,isDataRoute:s!=null},children:V})};return s&&(_.route.ErrorBoundary||_.route.errorElement||M===0)?b.createElement(Vv,{location:s.location,revalidation:s.revalidation,component:H,error:C,children:Q(),routeContext:{outlet:null,matches:Y,isDataRoute:!0},onError:v}):Q()},null)}function Vc(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qv(i){let a=b.useContext(Wl);return Oe(a,Vc(i)),a}function Zv(i){let a=b.useContext(Hu);return Oe(a,Vc(i)),a}function Kv(i){let a=b.useContext(mn);return Oe(a,Vc(i)),a}function Gc(i){let a=Kv(i),s=a.matches[a.matches.length-1];return Oe(s.route.id,`${i} can only be used on routes that contain a unique "id"`),s.route.id}function Jv(){return Gc("useRouteId")}function $v(){let i=b.useContext(Yc),a=Zv("useRouteError"),s=Gc("useRouteError");return i!==void 0?i:a.errors?.[s]}function Fv(){let{router:i}=Qv("useNavigate"),a=Gc("useNavigate"),s=b.useRef(!1);return Km(()=>{s.current=!0}),b.useCallback(async(f,d={})=>{Bt(s.current,Zm),s.current&&(typeof f=="number"?i.navigate(f):await i.navigate(f,{fromRouteId:a,...d}))},[i,a])}var Sm={};function $m(i,a,s){!a&&!Sm[i]&&(Sm[i]=!0,Bt(!1,s))}b.memo(Wv);function Wv({routes:i,future:a,state:s,unstable_onError:c}){return Jm(i,void 0,s,c,a)}function Mc(i){Oe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Iv({basename:i="/",children:a=null,location:s,navigationType:c="POP",navigator:f,static:d=!1}){Oe(!ni(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=i.replace(/^\/*/,"/"),g=b.useMemo(()=>({basename:y,navigator:f,static:d,future:{}}),[y,f,d]);typeof s=="string"&&(s=Fl(s));let{pathname:p="/",search:v="",hash:S="",state:_=null,key:M="default"}=s,C=b.useMemo(()=>{let z=hn(p,y);return z==null?null:{location:{pathname:z,search:v,hash:S,state:_,key:M},navigationType:c}},[y,p,v,S,_,M,c]);return Bt(C!=null,`<Router basename="${y}"> is not able to match the URL "${p}${v}${S}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:b.createElement(Qt.Provider,{value:g},b.createElement(ti.Provider,{children:a,value:C}))}function Pv({children:i,location:a}){return Hv(jc(i),a)}function jc(i,a=[]){let s=[];return b.Children.forEach(i,(c,f)=>{if(!b.isValidElement(c))return;let d=[...a,f];if(c.type===b.Fragment){s.push.apply(s,jc(c.props.children,d));return}Oe(c.type===Mc,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Oe(!c.props.index||!c.props.children,"An index route cannot have child routes.");let y={id:c.props.id||d.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(y.children=jc(c.props.children,d)),s.push(y)}),s}var ju="get",Ou="application/x-www-form-urlencoded";function qu(i){return i!=null&&typeof i.tagName=="string"}function eg(i){return qu(i)&&i.tagName.toLowerCase()==="button"}function tg(i){return qu(i)&&i.tagName.toLowerCase()==="form"}function ng(i){return qu(i)&&i.tagName.toLowerCase()==="input"}function lg(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function ag(i,a){return i.button===0&&(!a||a==="_self")&&!lg(i)}var Au=null;function ig(){if(Au===null)try{new FormData(document.createElement("form"),0),Au=!1}catch{Au=!0}return Au}var ug=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vc(i){return i!=null&&!ug.has(i)?(Bt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ou}"`),null):i}function sg(i,a){let s,c,f,d,y;if(tg(i)){let g=i.getAttribute("action");c=g?hn(g,a):null,s=i.getAttribute("method")||ju,f=vc(i.getAttribute("enctype"))||Ou,d=new FormData(i)}else if(eg(i)||ng(i)&&(i.type==="submit"||i.type==="image")){let g=i.form;if(g==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=i.getAttribute("formaction")||g.getAttribute("action");if(c=p?hn(p,a):null,s=i.getAttribute("formmethod")||g.getAttribute("method")||ju,f=vc(i.getAttribute("formenctype"))||vc(g.getAttribute("enctype"))||Ou,d=new FormData(g,i),!ig()){let{name:v,type:S,value:_}=i;if(S==="image"){let M=v?`${v}.`:"";d.append(`${M}x`,"0"),d.append(`${M}y`,"0")}else v&&d.append(v,_)}}else{if(qu(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=ju,c=null,f=Ou,y=i}return d&&f==="text/plain"&&(y=d,d=void 0),{action:c,method:s.toLowerCase(),encType:f,formData:d,body:y}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Xc(i,a){if(i===!1||i===null||typeof i>"u")throw new Error(a)}function rg(i,a,s){let c=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return c.pathname==="/"?c.pathname=`_root.${s}`:a&&hn(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function cg(i,a){if(i.id in a)return a[i.id];try{let s=await import(i.module);return a[i.id]=s,s}catch(s){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function og(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function fg(i,a,s){let c=await Promise.all(i.map(async f=>{let d=a.routes[f.route.id];if(d){let y=await cg(d,s);return y.links?y.links():[]}return[]}));return pg(c.flat(1).filter(og).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Em(i,a,s,c,f,d){let y=(p,v)=>s[v]?p.route.id!==s[v].route.id:!0,g=(p,v)=>s[v].pathname!==p.pathname||s[v].route.path?.endsWith("*")&&s[v].params["*"]!==p.params["*"];return d==="assets"?a.filter((p,v)=>y(p,v)||g(p,v)):d==="data"?a.filter((p,v)=>{let S=c.routes[p.route.id];if(!S||!S.hasLoader)return!1;if(y(p,v)||g(p,v))return!0;if(p.route.shouldRevalidate){let _=p.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function dg(i,a,{includeHydrateFallback:s}={}){return hg(i.map(c=>{let f=a.routes[c.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),s&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function hg(i){return[...new Set(i)]}function mg(i){let a={},s=Object.keys(i).sort();for(let c of s)a[c]=i[c];return a}function pg(i,a){let s=new Set;return new Set(a),i.reduce((c,f)=>{let d=JSON.stringify(mg(f));return s.has(d)||(s.add(d),c.push({key:d,link:f})),c},[])}function Fm(){let i=b.useContext(Wl);return Xc(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function yg(){let i=b.useContext(Hu);return Xc(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Qc=b.createContext(void 0);Qc.displayName="FrameworkContext";function Wm(){let i=b.useContext(Qc);return Xc(i,"You must render this element inside a <HydratedRouter> element"),i}function vg(i,a){let s=b.useContext(Qc),[c,f]=b.useState(!1),[d,y]=b.useState(!1),{onFocus:g,onBlur:p,onMouseEnter:v,onMouseLeave:S,onTouchStart:_}=a,M=b.useRef(null);b.useEffect(()=>{if(i==="render"&&y(!0),i==="viewport"){let H=Y=>{Y.forEach(Q=>{y(Q.isIntersecting)})},q=new IntersectionObserver(H,{threshold:.5});return M.current&&q.observe(M.current),()=>{q.disconnect()}}},[i]),b.useEffect(()=>{if(c){let H=setTimeout(()=>{y(!0)},100);return()=>{clearTimeout(H)}}},[c]);let C=()=>{f(!0)},z=()=>{f(!1),y(!1)};return s?i!=="intent"?[d,M,{}]:[d,M,{onFocus:Ja(g,C),onBlur:Ja(p,z),onMouseEnter:Ja(v,C),onMouseLeave:Ja(S,z),onTouchStart:Ja(_,C)}]:[!1,M,{}]}function Ja(i,a){return s=>{i&&i(s),s.defaultPrevented||a(s)}}function gg({page:i,...a}){let{router:s}=Fm(),c=b.useMemo(()=>Hm(s.routes,i,s.basename),[s.routes,i,s.basename]);return c?b.createElement(xg,{page:i,matches:c,...a}):null}function bg(i){let{manifest:a,routeModules:s}=Wm(),[c,f]=b.useState([]);return b.useEffect(()=>{let d=!1;return fg(i,a,s).then(y=>{d||f(y)}),()=>{d=!0}},[i,a,s]),c}function xg({page:i,matches:a,...s}){let c=cl(),{manifest:f,routeModules:d}=Wm(),{basename:y}=Fm(),{loaderData:g,matches:p}=yg(),v=b.useMemo(()=>Em(i,a,p,f,c,"data"),[i,a,p,f,c]),S=b.useMemo(()=>Em(i,a,p,f,c,"assets"),[i,a,p,f,c]),_=b.useMemo(()=>{if(i===c.pathname+c.search+c.hash)return[];let z=new Set,H=!1;if(a.forEach(Y=>{let Q=f.routes[Y.route.id];!Q||!Q.hasLoader||(!v.some(V=>V.route.id===Y.route.id)&&Y.route.id in g&&d[Y.route.id]?.shouldRevalidate||Q.hasClientLoader?H=!0:z.add(Y.route.id))}),z.size===0)return[];let q=rg(i,y,"data");return H&&z.size>0&&q.searchParams.set("_routes",a.filter(Y=>z.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[q.pathname+q.search]},[y,g,c,f,v,a,i,d]),M=b.useMemo(()=>dg(S,f),[S,f]),C=bg(S);return b.createElement(b.Fragment,null,_.map(z=>b.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...s})),M.map(z=>b.createElement("link",{key:z,rel:"modulepreload",href:z,...s})),C.map(({key:z,link:H})=>b.createElement("link",{key:z,nonce:s.nonce,...H})))}function Sg(...i){return a=>{i.forEach(s=>{typeof s=="function"?s(a):s!=null&&(s.current=a)})}}var Im=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Im&&(window.__reactRouterVersion="7.9.6")}catch{}function Eg({basename:i,children:a,window:s}){let c=b.useRef();c.current==null&&(c.current=rv({window:s,v5Compat:!0}));let f=c.current,[d,y]=b.useState({action:f.action,location:f.location}),g=b.useCallback(p=>{b.startTransition(()=>y(p))},[y]);return b.useLayoutEffect(()=>f.listen(g),[f,g]),b.createElement(Iv,{basename:i,children:a,location:d.location,navigationType:d.action,navigator:f})}var Pm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ep=b.forwardRef(function({onClick:a,discover:s="render",prefetch:c="none",relative:f,reloadDocument:d,replace:y,state:g,target:p,to:v,preventScrollReset:S,viewTransition:_,...M},C){let{basename:z}=b.useContext(Qt),H=typeof v=="string"&&Pm.test(v),q,Y=!1;if(typeof v=="string"&&H&&(q=v,Im))try{let $=new URL(window.location.href),le=v.startsWith("//")?new URL($.protocol+v):new URL(v),je=hn(le.pathname,z);le.origin===$.origin&&je!=null?v=je+le.search+le.hash:Y=!0}catch{Bt(!1,`<Link to="${v}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let Q=Uv(v,{relative:f}),[V,J,k]=vg(c,M),G=Cg(v,{replace:y,state:g,target:p,preventScrollReset:S,relative:f,viewTransition:_});function X($){a&&a($),$.defaultPrevented||G($)}let P=b.createElement("a",{...M,...k,href:q||Q,onClick:Y||d?a:X,ref:Sg(C,J),target:p,"data-discover":!H&&s==="render"?"true":void 0});return V&&!H?b.createElement(b.Fragment,null,P,b.createElement(gg,{page:Q})):P});ep.displayName="Link";var Ag=b.forwardRef(function({"aria-current":a="page",caseSensitive:s=!1,className:c="",end:f=!1,style:d,to:y,viewTransition:g,children:p,...v},S){let _=li(y,{relative:v.relative}),M=cl(),C=b.useContext(Hu),{navigator:z,basename:H}=b.useContext(Qt),q=C!=null&&Og(_)&&g===!0,Y=z.encodeLocation?z.encodeLocation(_).pathname:_.pathname,Q=M.pathname,V=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;s||(Q=Q.toLowerCase(),V=V?V.toLowerCase():null,Y=Y.toLowerCase()),V&&H&&(V=hn(V,H)||V);const J=Y!=="/"&&Y.endsWith("/")?Y.length-1:Y.length;let k=Q===Y||!f&&Q.startsWith(Y)&&Q.charAt(J)==="/",G=V!=null&&(V===Y||!f&&V.startsWith(Y)&&V.charAt(Y.length)==="/"),X={isActive:k,isPending:G,isTransitioning:q},P=k?a:void 0,$;typeof c=="function"?$=c(X):$=[c,k?"active":null,G?"pending":null,q?"transitioning":null].filter(Boolean).join(" ");let le=typeof d=="function"?d(X):d;return b.createElement(ep,{...v,"aria-current":P,className:$,ref:S,style:le,to:y,viewTransition:g},typeof p=="function"?p(X):p)});Ag.displayName="NavLink";var _g=b.forwardRef(({discover:i="render",fetcherKey:a,navigate:s,reloadDocument:c,replace:f,state:d,method:y=ju,action:g,onSubmit:p,relative:v,preventScrollReset:S,viewTransition:_,...M},C)=>{let z=Mg(),H=jg(g,{relative:v}),q=y.toLowerCase()==="get"?"get":"post",Y=typeof g=="string"&&Pm.test(g),Q=V=>{if(p&&p(V),V.defaultPrevented)return;V.preventDefault();let J=V.nativeEvent.submitter,k=J?.getAttribute("formmethod")||y;z(J||V.currentTarget,{fetcherKey:a,method:k,navigate:s,replace:f,state:d,relative:v,preventScrollReset:S,viewTransition:_})};return b.createElement("form",{ref:C,method:q,action:H,onSubmit:c?p:Q,...M,"data-discover":!Y&&i==="render"?"true":void 0})});_g.displayName="Form";function Tg(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tp(i){let a=b.useContext(Wl);return Oe(a,Tg(i)),a}function Cg(i,{target:a,replace:s,state:c,preventScrollReset:f,relative:d,viewTransition:y}={}){let g=Lv(),p=cl(),v=li(i,{relative:d});return b.useCallback(S=>{if(ag(S,a)){S.preventDefault();let _=s!==void 0?s:ei(p)===ei(v);g(i,{replace:_,state:c,preventScrollReset:f,relative:d,viewTransition:y})}},[p,g,v,s,c,a,i,f,d,y])}var Ng=0,Rg=()=>`__${String(++Ng)}__`;function Mg(){let{router:i}=tp("useSubmit"),{basename:a}=b.useContext(Qt),s=Jv();return b.useCallback(async(c,f={})=>{let{action:d,method:y,encType:g,formData:p,body:v}=sg(c,a);if(f.navigate===!1){let S=f.fetcherKey||Rg();await i.fetch(S,s,f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:v,formMethod:f.method||y,formEncType:f.encType||g,flushSync:f.flushSync})}else await i.navigate(f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:v,formMethod:f.method||y,formEncType:f.encType||g,replace:f.replace,state:f.state,fromRouteId:s,flushSync:f.flushSync,viewTransition:f.viewTransition})},[i,a,s])}function jg(i,{relative:a}={}){let{basename:s}=b.useContext(Qt),c=b.useContext(mn);Oe(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),d={...li(i||".",{relative:a})},y=cl();if(i==null){d.search=y.search;let g=new URLSearchParams(d.search),p=g.getAll("index");if(p.some(S=>S==="")){g.delete("index"),p.filter(_=>_).forEach(_=>g.append("index",_));let S=g.toString();d.search=S?`?${S}`:""}}return(!i||i===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(d.pathname=d.pathname==="/"?s:fn([s,d.pathname])),ei(d)}function Og(i,{relative:a}={}){let s=b.useContext(Qm);Oe(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=tp("useViewTransitionState"),f=li(i,{relative:a});if(!s.isTransitioning)return!1;let d=hn(s.currentLocation.pathname,c)||s.currentLocation.pathname,y=hn(s.nextLocation.pathname,c)||s.nextLocation.pathname;return Uu(f.pathname,y)!=null||Uu(f.pathname,d)!=null}const Xt=Object.create(null);Xt.open="0";Xt.close="1";Xt.ping="2";Xt.pong="3";Xt.message="4";Xt.upgrade="5";Xt.noop="6";const wu=Object.create(null);Object.keys(Xt).forEach(i=>{wu[Xt[i]]=i});const Oc={type:"error",data:"parser error"},np=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",lp=typeof ArrayBuffer=="function",ap=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,Zc=({type:i,data:a},s,c)=>np&&a instanceof Blob?s?c(a):Am(a,c):lp&&(a instanceof ArrayBuffer||ap(a))?s?c(a):Am(new Blob([a]),c):c(Xt[i]+(a||"")),Am=(i,a)=>{const s=new FileReader;return s.onload=function(){const c=s.result.split(",")[1];a("b"+(c||""))},s.readAsDataURL(i)};function _m(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let gc;function wg(i,a){if(np&&i.data instanceof Blob)return i.data.arrayBuffer().then(_m).then(a);if(lp&&(i.data instanceof ArrayBuffer||ap(i.data)))return a(_m(i.data));Zc(i,!1,s=>{gc||(gc=new TextEncoder),a(gc.encode(s))})}const Tm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<Tm.length;i++)Pa[Tm.charCodeAt(i)]=i;const Dg=i=>{let a=i.length*.75,s=i.length,c,f=0,d,y,g,p;i[i.length-1]==="="&&(a--,i[i.length-2]==="="&&a--);const v=new ArrayBuffer(a),S=new Uint8Array(v);for(c=0;c<s;c+=4)d=Pa[i.charCodeAt(c)],y=Pa[i.charCodeAt(c+1)],g=Pa[i.charCodeAt(c+2)],p=Pa[i.charCodeAt(c+3)],S[f++]=d<<2|y>>4,S[f++]=(y&15)<<4|g>>2,S[f++]=(g&3)<<6|p&63;return v},zg=typeof ArrayBuffer=="function",Kc=(i,a)=>{if(typeof i!="string")return{type:"message",data:ip(i,a)};const s=i.charAt(0);return s==="b"?{type:"message",data:Bg(i.substring(1),a)}:wu[s]?i.length>1?{type:wu[s],data:i.substring(1)}:{type:wu[s]}:Oc},Bg=(i,a)=>{if(zg){const s=Dg(i);return ip(s,a)}else return{base64:!0,data:i}},ip=(i,a)=>{switch(a){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},up="",Ug=(i,a)=>{const s=i.length,c=new Array(s);let f=0;i.forEach((d,y)=>{Zc(d,!1,g=>{c[y]=g,++f===s&&a(c.join(up))})})},Lg=(i,a)=>{const s=i.split(up),c=[];for(let f=0;f<s.length;f++){const d=Kc(s[f],a);if(c.push(d),d.type==="error")break}return c};function kg(){return new TransformStream({transform(i,a){wg(i,s=>{const c=s.length;let f;if(c<126)f=new Uint8Array(1),new DataView(f.buffer).setUint8(0,c);else if(c<65536){f=new Uint8Array(3);const d=new DataView(f.buffer);d.setUint8(0,126),d.setUint16(1,c)}else{f=new Uint8Array(9);const d=new DataView(f.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(c))}i.data&&typeof i.data!="string"&&(f[0]|=128),a.enqueue(f),a.enqueue(s)})}})}let bc;function _u(i){return i.reduce((a,s)=>a+s.length,0)}function Tu(i,a){if(i[0].length===a)return i.shift();const s=new Uint8Array(a);let c=0;for(let f=0;f<a;f++)s[f]=i[0][c++],c===i[0].length&&(i.shift(),c=0);return i.length&&c<i[0].length&&(i[0]=i[0].slice(c)),s}function Hg(i,a){bc||(bc=new TextDecoder);const s=[];let c=0,f=-1,d=!1;return new TransformStream({transform(y,g){for(s.push(y);;){if(c===0){if(_u(s)<1)break;const p=Tu(s,1);d=(p[0]&128)===128,f=p[0]&127,f<126?c=3:f===126?c=1:c=2}else if(c===1){if(_u(s)<2)break;const p=Tu(s,2);f=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),c=3}else if(c===2){if(_u(s)<8)break;const p=Tu(s,8),v=new DataView(p.buffer,p.byteOffset,p.length),S=v.getUint32(0);if(S>Math.pow(2,21)-1){g.enqueue(Oc);break}f=S*Math.pow(2,32)+v.getUint32(4),c=3}else{if(_u(s)<f)break;const p=Tu(s,f);g.enqueue(Kc(d?p:bc.decode(p),a)),c=0}if(f===0||f>i){g.enqueue(Oc);break}}}})}const sp=4;function Ve(i){if(i)return qg(i)}function qg(i){for(var a in Ve.prototype)i[a]=Ve.prototype[a];return i}Ve.prototype.on=Ve.prototype.addEventListener=function(i,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(a),this};Ve.prototype.once=function(i,a){function s(){this.off(i,s),a.apply(this,arguments)}return s.fn=a,this.on(i,s),this};Ve.prototype.off=Ve.prototype.removeListener=Ve.prototype.removeAllListeners=Ve.prototype.removeEventListener=function(i,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+i];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var c,f=0;f<s.length;f++)if(c=s[f],c===a||c.fn===a){s.splice(f,1);break}return s.length===0&&delete this._callbacks["$"+i],this};Ve.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),s=this._callbacks["$"+i],c=1;c<arguments.length;c++)a[c-1]=arguments[c];if(s){s=s.slice(0);for(var c=0,f=s.length;c<f;++c)s[c].apply(this,a)}return this};Ve.prototype.emitReserved=Ve.prototype.emit;Ve.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};Ve.prototype.hasListeners=function(i){return!!this.listeners(i).length};const Yu=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,s)=>s(a,0),Mt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Yg="arraybuffer";function rp(i,...a){return a.reduce((s,c)=>(i.hasOwnProperty(c)&&(s[c]=i[c]),s),{})}const Vg=Mt.setTimeout,Gg=Mt.clearTimeout;function Vu(i,a){a.useNativeTimers?(i.setTimeoutFn=Vg.bind(Mt),i.clearTimeoutFn=Gg.bind(Mt)):(i.setTimeoutFn=Mt.setTimeout.bind(Mt),i.clearTimeoutFn=Mt.clearTimeout.bind(Mt))}const Xg=1.33;function Qg(i){return typeof i=="string"?Zg(i):Math.ceil((i.byteLength||i.size)*Xg)}function Zg(i){let a=0,s=0;for(let c=0,f=i.length;c<f;c++)a=i.charCodeAt(c),a<128?s+=1:a<2048?s+=2:a<55296||a>=57344?s+=3:(c++,s+=4);return s}function cp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Kg(i){let a="";for(let s in i)i.hasOwnProperty(s)&&(a.length&&(a+="&"),a+=encodeURIComponent(s)+"="+encodeURIComponent(i[s]));return a}function Jg(i){let a={},s=i.split("&");for(let c=0,f=s.length;c<f;c++){let d=s[c].split("=");a[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return a}class $g extends Error{constructor(a,s,c){super(a),this.description=s,this.context=c,this.type="TransportError"}}class Jc extends Ve{constructor(a){super(),this.writable=!1,Vu(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,s,c){return super.emitReserved("error",new $g(a,s,c)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const s=Kc(a,this.socket.binaryType);this.onPacket(s)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,s={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(s)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const s=Kg(a);return s.length?"?"+s:""}}class Fg extends Jc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const s=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let c=0;this._polling&&(c++,this.once("pollComplete",function(){--c||s()})),this.writable||(c++,this.once("drain",function(){--c||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const s=c=>{if(this.readyState==="opening"&&c.type==="open"&&this.onOpen(),c.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(c)};Lg(a,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,Ug(a,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=cp()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(a,s)}}let op=!1;try{op=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Wg=op;function Ig(){}class Pg extends Fg{constructor(a){if(super(a),typeof location<"u"){const s=location.protocol==="https:";let c=location.port;c||(c=s?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||c!==a.port}}doWrite(a,s){const c=this.request({method:"POST",data:a});c.on("success",s),c.on("error",(f,d)=>{this.onError("xhr post error",f,d)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(s,c)=>{this.onError("xhr poll error",s,c)}),this.pollXhr=a}}class Gt extends Ve{constructor(a,s,c){super(),this.createRequest=a,Vu(this,c),this._opts=c,this._method=c.method||"GET",this._uri=s,this._data=c.data!==void 0?c.data:null,this._create()}_create(){var a;const s=rp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const c=this._xhr=this.createRequest(s);try{c.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){c.setDisableHeaderCheck&&c.setDisableHeaderCheck(!0);for(let f in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(f)&&c.setRequestHeader(f,this._opts.extraHeaders[f])}}catch{}if(this._method==="POST")try{c.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{c.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(c),"withCredentials"in c&&(c.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(c.timeout=this._opts.requestTimeout),c.onreadystatechange=()=>{var f;c.readyState===3&&((f=this._opts.cookieJar)===null||f===void 0||f.parseCookies(c.getResponseHeader("set-cookie"))),c.readyState===4&&(c.status===200||c.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof c.status=="number"?c.status:0)},0))},c.send(this._data)}catch(f){this.setTimeoutFn(()=>{this._onError(f)},0);return}typeof document<"u"&&(this._index=Gt.requestsCount++,Gt.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ig,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Gt.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Gt.requestsCount=0;Gt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Cm);else if(typeof addEventListener=="function"){const i="onpagehide"in Mt?"pagehide":"unload";addEventListener(i,Cm,!1)}}function Cm(){for(let i in Gt.requests)Gt.requests.hasOwnProperty(i)&&Gt.requests[i].abort()}const eb=(function(){const i=fp({xdomain:!1});return i&&i.responseType!==null})();class tb extends Pg{constructor(a){super(a);const s=a&&a.forceBase64;this.supportsBinary=eb&&!s}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Gt(fp,this.uri(),a)}}function fp(i){const a=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||Wg))return new XMLHttpRequest}catch{}if(!a)try{return new Mt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const dp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class nb extends Jc{get name(){return"websocket"}doOpen(){const a=this.uri(),s=this.opts.protocols,c=dp?{}:rp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,s,c)}catch(f){return this.emitReserved("error",f)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let s=0;s<a.length;s++){const c=a[s],f=s===a.length-1;Zc(c,this.supportsBinary,d=>{try{this.doWrite(c,d)}catch{}f&&Yu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=cp()),this.supportsBinary||(s.b64=1),this.createUri(a,s)}}const xc=Mt.WebSocket||Mt.MozWebSocket;class lb extends nb{createSocket(a,s,c){return dp?new xc(a,s,c):s?new xc(a,s):new xc(a)}doWrite(a,s){this.ws.send(s)}}class ab extends Jc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const s=Hg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=a.readable.pipeThrough(s).getReader(),f=kg();f.readable.pipeTo(a.writable),this._writer=f.writable.getWriter();const d=()=>{c.read().then(({done:g,value:p})=>{g||(this.onPacket(p),d())}).catch(g=>{})};d();const y={type:"open"};this.query.sid&&(y.data=`{"sid":"${this.query.sid}"}`),this._writer.write(y).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let s=0;s<a.length;s++){const c=a[s],f=s===a.length-1;this._writer.write(c).then(()=>{f&&Yu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const ib={websocket:lb,webtransport:ab,polling:tb},ub=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sb=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wc(i){if(i.length>8e3)throw"URI too long";const a=i,s=i.indexOf("["),c=i.indexOf("]");s!=-1&&c!=-1&&(i=i.substring(0,s)+i.substring(s,c).replace(/:/g,";")+i.substring(c,i.length));let f=ub.exec(i||""),d={},y=14;for(;y--;)d[sb[y]]=f[y]||"";return s!=-1&&c!=-1&&(d.source=a,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=rb(d,d.path),d.queryKey=cb(d,d.query),d}function rb(i,a){const s=/\/{2,9}/g,c=a.replace(s,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&c.splice(0,1),a.slice(-1)=="/"&&c.splice(c.length-1,1),c}function cb(i,a){const s={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,f,d){f&&(s[f]=d)}),s}const Dc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Du=[];Dc&&addEventListener("offline",()=>{Du.forEach(i=>i())},!1);class Yn extends Ve{constructor(a,s){if(super(),this.binaryType=Yg,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(s=a,a=null),a){const c=wc(a);s.hostname=c.host,s.secure=c.protocol==="https"||c.protocol==="wss",s.port=c.port,c.query&&(s.query=c.query)}else s.host&&(s.hostname=wc(s.host).host);Vu(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(c=>{const f=c.prototype.name;this.transports.push(f),this._transportsByName[f]=c}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Jg(this.opts.query)),Dc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Du.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const s=Object.assign({},this.opts.query);s.EIO=sp,s.transport=a,this.id&&(s.sid=this.id);const c=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](c)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&Yn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(a);s.open(),this.setTransport(s)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",Yn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=a.data,this._onError(s);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let c=0;c<this.writeBuffer.length;c++){const f=this.writeBuffer[c].data;if(f&&(s+=Qg(f)),c>0&&s>this._maxPayload)return this.writeBuffer.slice(0,c);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,Yu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,s,c){return this._sendPacket("message",a,s,c),this}send(a,s,c){return this._sendPacket("message",a,s,c),this}_sendPacket(a,s,c,f){if(typeof s=="function"&&(f=s,s=void 0),typeof c=="function"&&(f=c,c=null),this.readyState==="closing"||this.readyState==="closed")return;c=c||{},c.compress=c.compress!==!1;const d={type:a,data:s,options:c};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),f&&this.once("flush",f),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),a()},c=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?c():a()}):this.upgrading?c():a()),this}_onError(a){if(Yn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Dc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const c=Du.indexOf(this._offlineEventListener);c!==-1&&Du.splice(c,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,s),this.writeBuffer=[],this._prevBufferLen=0}}}Yn.protocol=sp;class ob extends Yn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let s=this.createTransport(a),c=!1;Yn.priorWebsocketSuccess=!1;const f=()=>{c||(s.send([{type:"ping",data:"probe"}]),s.once("packet",_=>{if(!c)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;Yn.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{c||this.readyState!=="closed"&&(S(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const M=new Error("probe error");M.transport=s.name,this.emitReserved("upgradeError",M)}}))};function d(){c||(c=!0,S(),s.close(),s=null)}const y=_=>{const M=new Error("probe error: "+_);M.transport=s.name,d(),this.emitReserved("upgradeError",M)};function g(){y("transport closed")}function p(){y("socket closed")}function v(_){s&&_.name!==s.name&&d()}const S=()=>{s.removeListener("open",f),s.removeListener("error",y),s.removeListener("close",g),this.off("close",p),this.off("upgrading",v)};s.once("open",f),s.once("error",y),s.once("close",g),this.once("close",p),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{c||s.open()},200):s.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const s=[];for(let c=0;c<a.length;c++)~this.transports.indexOf(a[c])&&s.push(a[c]);return s}}let fb=class extends ob{constructor(a,s={}){const c=typeof a=="object"?a:s;(!c.transports||c.transports&&typeof c.transports[0]=="string")&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(f=>ib[f]).filter(f=>!!f)),super(a,c)}};function db(i,a="",s){let c=i;s=s||typeof location<"u"&&location,i==null&&(i=s.protocol+"//"+s.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=s.protocol+i:i=s.host+i),/^(https?|wss?):\/\//.test(i)||(typeof s<"u"?i=s.protocol+"//"+i:i="https://"+i),c=wc(i)),c.port||(/^(http|ws)$/.test(c.protocol)?c.port="80":/^(http|ws)s$/.test(c.protocol)&&(c.port="443")),c.path=c.path||"/";const d=c.host.indexOf(":")!==-1?"["+c.host+"]":c.host;return c.id=c.protocol+"://"+d+":"+c.port+a,c.href=c.protocol+"://"+d+(s&&s.port===c.port?"":":"+c.port),c}const hb=typeof ArrayBuffer=="function",mb=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,hp=Object.prototype.toString,pb=typeof Blob=="function"||typeof Blob<"u"&&hp.call(Blob)==="[object BlobConstructor]",yb=typeof File=="function"||typeof File<"u"&&hp.call(File)==="[object FileConstructor]";function $c(i){return hb&&(i instanceof ArrayBuffer||mb(i))||pb&&i instanceof Blob||yb&&i instanceof File}function zu(i,a){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let s=0,c=i.length;s<c;s++)if(zu(i[s]))return!0;return!1}if($c(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return zu(i.toJSON(),!0);for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&zu(i[s]))return!0;return!1}function vb(i){const a=[],s=i.data,c=i;return c.data=zc(s,a),c.attachments=a.length,{packet:c,buffers:a}}function zc(i,a){if(!i)return i;if($c(i)){const s={_placeholder:!0,num:a.length};return a.push(i),s}else if(Array.isArray(i)){const s=new Array(i.length);for(let c=0;c<i.length;c++)s[c]=zc(i[c],a);return s}else if(typeof i=="object"&&!(i instanceof Date)){const s={};for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&(s[c]=zc(i[c],a));return s}return i}function gb(i,a){return i.data=Bc(i.data,a),delete i.attachments,i}function Bc(i,a){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<a.length)return a[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let s=0;s<i.length;s++)i[s]=Bc(i[s],a);else if(typeof i=="object")for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(i[s]=Bc(i[s],a));return i}const bb=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],xb=5;var me;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(me||(me={}));class Sb{constructor(a){this.replacer=a}encode(a){return(a.type===me.EVENT||a.type===me.ACK)&&zu(a)?this.encodeAsBinary({type:a.type===me.EVENT?me.BINARY_EVENT:me.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let s=""+a.type;return(a.type===me.BINARY_EVENT||a.type===me.BINARY_ACK)&&(s+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(s+=a.nsp+","),a.id!=null&&(s+=a.id),a.data!=null&&(s+=JSON.stringify(a.data,this.replacer)),s}encodeAsBinary(a){const s=vb(a),c=this.encodeAsString(s.packet),f=s.buffers;return f.unshift(c),f}}function Nm(i){return Object.prototype.toString.call(i)==="[object Object]"}class Fc extends Ve{constructor(a){super(),this.reviver=a}add(a){let s;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");s=this.decodeString(a);const c=s.type===me.BINARY_EVENT;c||s.type===me.BINARY_ACK?(s.type=c?me.EVENT:me.ACK,this.reconstructor=new Eb(s),s.attachments===0&&super.emitReserved("decoded",s)):super.emitReserved("decoded",s)}else if($c(a)||a.base64)if(this.reconstructor)s=this.reconstructor.takeBinaryData(a),s&&(this.reconstructor=null,super.emitReserved("decoded",s));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let s=0;const c={type:Number(a.charAt(0))};if(me[c.type]===void 0)throw new Error("unknown packet type "+c.type);if(c.type===me.BINARY_EVENT||c.type===me.BINARY_ACK){const d=s+1;for(;a.charAt(++s)!=="-"&&s!=a.length;);const y=a.substring(d,s);if(y!=Number(y)||a.charAt(s)!=="-")throw new Error("Illegal attachments");c.attachments=Number(y)}if(a.charAt(s+1)==="/"){const d=s+1;for(;++s&&!(a.charAt(s)===","||s===a.length););c.nsp=a.substring(d,s)}else c.nsp="/";const f=a.charAt(s+1);if(f!==""&&Number(f)==f){const d=s+1;for(;++s;){const y=a.charAt(s);if(y==null||Number(y)!=y){--s;break}if(s===a.length)break}c.id=Number(a.substring(d,s+1))}if(a.charAt(++s)){const d=this.tryParse(a.substr(s));if(Fc.isPayloadValid(c.type,d))c.data=d;else throw new Error("invalid payload")}return c}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,s){switch(a){case me.CONNECT:return Nm(s);case me.DISCONNECT:return s===void 0;case me.CONNECT_ERROR:return typeof s=="string"||Nm(s);case me.EVENT:case me.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&bb.indexOf(s[0])===-1);case me.ACK:case me.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Eb{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const s=gb(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ab=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fc,Encoder:Sb,get PacketType(){return me},protocol:xb},Symbol.toStringTag,{value:"Module"}));function zt(i,a,s){return i.on(a,s),function(){i.off(a,s)}}const _b=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class mp extends Ve{constructor(a,s,c){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=s,c&&c.auth&&(this.auth=c.auth),this._opts=Object.assign({},c),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[zt(a,"open",this.onopen.bind(this)),zt(a,"packet",this.onpacket.bind(this)),zt(a,"error",this.onerror.bind(this)),zt(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...s){var c,f,d;if(_b.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(s.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const y={type:me.EVENT,data:s};if(y.options={},y.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const S=this.ids++,_=s.pop();this._registerAckCallback(S,_),y.id=S}const g=(f=(c=this.io.engine)===null||c===void 0?void 0:c.transport)===null||f===void 0?void 0:f.writable,p=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!g||(p?(this.notifyOutgoingListeners(y),this.packet(y)):this.sendBuffer.push(y)),this.flags={},this}_registerAckCallback(a,s){var c;const f=(c=this.flags.timeout)!==null&&c!==void 0?c:this._opts.ackTimeout;if(f===void 0){this.acks[a]=s;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let g=0;g<this.sendBuffer.length;g++)this.sendBuffer[g].id===a&&this.sendBuffer.splice(g,1);s.call(this,new Error("operation has timed out"))},f),y=(...g)=>{this.io.clearTimeoutFn(d),s.apply(this,g)};y.withError=!0,this.acks[a]=y}emitWithAck(a,...s){return new Promise((c,f)=>{const d=(y,g)=>y?f(y):c(g);d.withError=!0,s.push(d),this.emit(a,...s)})}_addToQueue(a){let s;typeof a[a.length-1]=="function"&&(s=a.pop());const c={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((f,...d)=>c!==this._queue[0]?void 0:(f!==null?c.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(f)):(this._queue.shift(),s&&s(null,...d)),c.pending=!1,this._drainQueue())),this._queue.push(c),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!a||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:me.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(c=>String(c.id)===a)){const c=this.acks[a];delete this.acks[a],c.withError&&c.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case me.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case me.EVENT:case me.BINARY_EVENT:this.onevent(a);break;case me.ACK:case me.BINARY_ACK:this.onack(a);break;case me.DISCONNECT:this.ondisconnect();break;case me.CONNECT_ERROR:this.destroy();const c=new Error(a.data.message);c.data=a.data.data,this.emitReserved("connect_error",c);break}}onevent(a){const s=a.data||[];a.id!=null&&s.push(this.ack(a.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const c of s)c.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const s=this;let c=!1;return function(...f){c||(c=!0,s.packet({type:me.ACK,id:a,data:f}))}}onack(a){const s=this.acks[a.id];typeof s=="function"&&(delete this.acks[a.id],s.withError&&a.data.unshift(null),s.apply(this,a.data))}onconnect(a,s){this.id=a,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:me.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const s=this._anyListeners;for(let c=0;c<s.length;c++)if(a===s[c])return s.splice(c,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const s=this._anyOutgoingListeners;for(let c=0;c<s.length;c++)if(a===s[c])return s.splice(c,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const s=this._anyOutgoingListeners.slice();for(const c of s)c.apply(this,a.data)}}}function Il(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}Il.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),s=Math.floor(a*this.jitter*i);i=(Math.floor(a*10)&1)==0?i-s:i+s}return Math.min(i,this.max)|0};Il.prototype.reset=function(){this.attempts=0};Il.prototype.setMin=function(i){this.ms=i};Il.prototype.setMax=function(i){this.max=i};Il.prototype.setJitter=function(i){this.jitter=i};class Uc extends Ve{constructor(a,s){var c;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(s=a,a=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Vu(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((c=s.randomizationFactor)!==null&&c!==void 0?c:.5),this.backoff=new Il({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=a;const f=s.parser||Ab;this.encoder=new f.Encoder,this.decoder=new f.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var s;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(s=this.backoff)===null||s===void 0||s.setMin(a),this)}randomizationFactor(a){var s;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(s=this.backoff)===null||s===void 0||s.setJitter(a),this)}reconnectionDelayMax(a){var s;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(s=this.backoff)===null||s===void 0||s.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new fb(this.uri,this.opts);const s=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;const f=zt(s,"open",function(){c.onopen(),a&&a()}),d=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),a?a(g):this.maybeReconnectOnOpen()},y=zt(s,"error",d);if(this._timeout!==!1){const g=this._timeout,p=this.setTimeoutFn(()=>{f(),d(new Error("timeout")),s.close()},g);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(f),this.subs.push(y),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(zt(a,"ping",this.onping.bind(this)),zt(a,"data",this.ondata.bind(this)),zt(a,"error",this.onerror.bind(this)),zt(a,"close",this.onclose.bind(this)),zt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(s){this.onclose("parse error",s)}}ondecoded(a){Yu(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,s){let c=this.nsps[a];return c?this._autoConnect&&!c.active&&c.connect():(c=new mp(this,a,s),this.nsps[a]=c),c}_destroy(a){const s=Object.keys(this.nsps);for(const c of s)if(this.nsps[c].active)return;this._close()}_packet(a){const s=this.encoder.encode(a);for(let c=0;c<s.length;c++)this.engine.write(s[c],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,s){var c;this.cleanup(),(c=this.engine)===null||c===void 0||c.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const c=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(f=>{f?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",f)):a.onreconnect()}))},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const $a={};function Bu(i,a){typeof i=="object"&&(a=i,i=void 0),a=a||{};const s=db(i,a.path||"/socket.io"),c=s.source,f=s.id,d=s.path,y=$a[f]&&d in $a[f].nsps,g=a.forceNew||a["force new connection"]||a.multiplex===!1||y;let p;return g?p=new Uc(c,a):($a[f]||($a[f]=new Uc(c,a)),p=$a[f]),s.query&&!a.query&&(a.query=s.queryKey),p.socket(s.path,a)}Object.assign(Bu,{Manager:Uc,Socket:mp,io:Bu,connect:Bu});const pp=window.location.origin;console.info("[socket] connecting to",pp);const Wc=Bu(pp,{transports:["polling","websocket"],timeout:15e3});Wc.on("connect_error",i=>console.error("connect_error",i.code,i.message,i.data));const yp=b.createContext(Wc),Tb=({children:i})=>h.jsx(yp.Provider,{value:Wc,children:i}),Gu=()=>b.useContext(yp),vp=b.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function Cb(i){return b.useCallback((a,s={})=>new Promise((c,f)=>{i.emit(a,s,(d={})=>{d.error?f(new Error(d.error)):c(d)})}),[i])}function Nb({children:i}){const a=Gu(),s=Cb(a),[c,f]=b.useState(null),[d,y]=b.useState([]),[g,p]=b.useState([]),[v,S]=b.useState(a.connected);b.useEffect(()=>{const C=()=>S(!0),z=()=>S(!1);return a.on("connect",C),a.on("disconnect",z),()=>{a.off("connect",C),a.off("disconnect",z)}},[a]),b.useEffect(()=>{function C(q){f(q)}function z(q=[]){y(q)}function H(q){y(Y=>[...Y.slice(-199),q])}return a.on("session:sync",C),a.on("log:init",z),a.on("log:entry",H),a.on("alert:new",(q={})=>{p(Y=>[...Y.slice(-49),{...q,receivedAt:Date.now()}])}),()=>{a.off("session:sync",C),a.off("log:init",z),a.off("log:entry",H),a.off("alert:new")}},[a]);const _=b.useMemo(()=>({login:(C,z)=>s("auth:login",{username:C,password:z}),setRole:C=>s("session:setRole",{role:C}),requestControl:(C,z={})=>s("session:requestControl",{roverId:C,...z}),releaseControl:C=>s("session:releaseControl",{roverId:C}),subscribeAll:()=>s("session:subscribeAll"),lockRover:(C,z)=>s("session:lockRover",{roverId:C,locked:z}),setMode:C=>s("setMode",{mode:C})}),[s]),M=b.useMemo(()=>({connected:v,session:c,logs:d,alerts:g,..._}),[_,g,v,d,c]);return h.jsx(vp.Provider,{value:M,children:i})}function Ut(){return b.useContext(vp)}const gp=b.createContext({frames:{}});function Rb({children:i}){const a=Gu(),[s,c]=b.useState({});b.useEffect(()=>{function d({roverId:y,sensors:g={},frame:p={}}){y&&c(v=>({...v,[y]:{roverId:y,sensors:g,raw:p?.data||null,receivedAt:Date.now()}}))}return a.on("sensorFrame",d),()=>{a.off("sensorFrame",d)}},[a]);const f=b.useMemo(()=>({frames:s}),[s]);return h.jsx(gp.Provider,{value:f,children:i})}function bp(){return b.useContext(gp).frames}function Xu(i){const a=bp();return i?a[i]??null:null}function sl(i,a="--"){return i==null||i===""?a:i}function Ic(){const{connected:i,session:a,requestControl:s}=Ut(),c=a?.assignment?.roverId,f=Xu(c),d=f?.sensors||{},y=d.voltageMv!=null?`${(d.voltageMv/1e3).toFixed(2)} V`:null,g=d.currentMa!=null?`${d.currentMa} mA`:null,p=d.batteryChargeMah,v=d.batteryCapacityMah,S=f?.receivedAt?new Date(f.receivedAt).toLocaleTimeString():null,_=f?.raw?f.raw:null,M=a?.roster??[],C=c?a?.activeDrivers?.[c]:null,z=c?C?C===a?.socketId?"You":C.slice(0,6):"Available":"n/a",H=b.useMemo(()=>a?.role==="admin"||a?.role==="lockdown"||a?.role==="lockdown-admin",[a?.role]),[q,Y]=b.useState({});async function Q(V){if(V){Y(J=>({...J,[V]:!0}));try{await s(V)}catch(J){alert(J.message)}finally{Y(J=>({...J,[V]:!1}))}}}return h.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[h.jsxs("div",{className:"text-sm text-slate-400",children:[h.jsx("span",{children:i?"online":"offline"}),h.jsxs("span",{children:[" · role ",a?.role||"unknown"]}),h.jsxs("span",{children:[" · mode ",a?.mode||"--"]}),S&&h.jsxs("span",{children:[" · sensors ",S]}),h.jsxs("span",{children:[" · driver ",z]})]}),c?f?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex flex-wrap gap-0.5",children:[h.jsx(rl,{label:"Charge",value:sl(p!=null&&v!=null?`${p}/${v}`:null)}),h.jsx(rl,{label:"Charging",value:sl(d.chargingState?.label)}),h.jsx(rl,{label:"OI mode",value:sl(d.oiMode?.label)}),h.jsx(rl,{label:"Voltage",value:sl(y)}),h.jsx(rl,{label:"Current",value:sl(g)}),h.jsx(rl,{label:"Left Encoder",value:sl(d.encoderCountsLeft)}),h.jsx(rl,{label:"Right Encoder",value:sl(d.encoderCountsRight)})]}),h.jsxs("div",{className:"mt-1 flex gap-0.5",children:[h.jsx(Cu,{value:d.cliffLeftSignal}),h.jsx(Cu,{value:d.cliffFrontLeftSignal}),h.jsx(Cu,{value:d.cliffFrontRightSignal}),h.jsx(Cu,{value:d.cliffRightSignal})]})]}):h.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Waiting for sensor frames…"}):h.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Assign a rover to view sensors."}),_&&h.jsx("pre",{className:"mt-1 text-wrap break-words p-1 text-xs text-lime-300 bg-gray-700",children:_}),h.jsxs("div",{className:"mt-1",children:[h.jsx("p",{className:"text-sm text-slate-400",children:"Rovers"}),M.length===0?h.jsx("p",{className:"text-sm text-slate-500",children:"No roster data."}):h.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:M.map(V=>h.jsxs("li",{className:"flex items-center justify-between gap-1",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-slate-200",children:V.name}),h.jsxs("p",{className:"text-xs text-slate-500",children:[V.locked?"locked":"free"," · ",V.lastSeen?"seen":"unknown"]})]}),H&&h.jsx("button",{type:"button",onClick:()=>Q(V.id),disabled:q[V.id],className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-40",children:q[V.id]?"...":"request"})]},V.id))})]})]})}function Cu({value:i}){const s=`${i==null?0:Math.max(0,Math.min(100,i/4095*100))}%`;return h.jsx("div",{className:"w-1/4 h-6 bg-gray-700 rounded-sm overflow-hidden",children:h.jsx("div",{className:"w-full bg-amber-400",style:{height:s}})})}function rl({label:i,value:a}){return h.jsxs("div",{className:"bg-gray-700 rounded-sm p-0.5 text-sm",children:[i,": ",a]})}const Sc={main:[-127,127],side:[-127,127],vacuum:[0,127]},Ec={maxSpeed:500,baseSpeed:250,boostSpeed:400},Lc=200,Mb={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Lu={driveForward:["w"],driveBackward:["s"],driveLeft:["a"],driveRight:["d"],boostModifier:["\\"],slowModifier:["shift"],auxMainForward:["i"],auxMainReverse:["k"],auxSideForward:["o"],auxSideReverse:["l"],auxVacuumFast:["p"],auxVacuumSlow:[";"],auxAllForward:[","],cameraUp:["u"],cameraDown:["j"],driveMacro:["f"],dockMacro:["g"]},xp=[{id:"drive-sequence",label:"Drive",description:"Start, dock, and full command sequence used by the drive button.",steps:[{type:"oi",command:"start"},{type:"pause",duration:Lc},{type:"oi",command:"dock"},{type:"pause",duration:Lc},{type:"oi",command:"full"}]},{id:"seek-dock",label:"Dock",description:"Send the seek dock command.",steps:[{type:"oi",command:"dock"}]}];function kc(){return{vector:{x:0,y:0,boost:!1},speeds:{left:0,right:0},source:null,lastUpdatedAt:0}}function Hc(){return{main:0,side:0,vacuum:0}}function jb(){return{enabled:!1,angle:null,config:null}}const Rm={roverId:null,mode:"drive",drive:kc(),aux:Hc(),camera:jb(),macros:xp,keymap:Lu,inputs:{}};function Ob(i,a){switch(a.type){case"control/set-rover":return{...i,roverId:a.payload??null,drive:a.payload?i.drive:kc(),aux:a.payload?i.aux:Hc()};case"control/set-mode":return i.mode===a.payload?i:{...i,mode:a.payload==="dock"?"dock":"drive"};case"control/update-drive":{const{vector:s,speeds:c,source:f}=a.payload;return{...i,drive:{vector:s??i.drive.vector,speeds:c??i.drive.speeds,source:f??i.drive.source,lastUpdatedAt:Date.now()}}}case"control/set-aux-motors":return{...i,aux:{...i.aux,...a.payload}};case"control/set-camera-config":return{...i,camera:{...i.camera,enabled:!!a.payload?.config,config:a.payload?.config??null,angle:typeof a.payload?.angle=="number"?a.payload.angle:a.payload?.config?a.payload.config.homeAngle??i.camera.angle:null}};case"control/set-camera-angle":return{...i,camera:{...i.camera,angle:a.payload}};case"control/register-input-state":{const s=a.payload?.source||"unknown";return{...i,inputs:{...i.inputs,[s]:{...i.inputs[s]??{},...a.payload?.state,updatedAt:Date.now()}}}}case"control/set-keymap":return{...i,keymap:{...i.keymap,...a.payload??{}}};case"control/set-macros":return{...i,macros:Array.isArray(a.payload)?a.payload:i.macros};case"control/reset":return{...i,drive:kc(),aux:Hc()};default:return i}}function Jl(i,a,s){return typeof i!="number"||Number.isNaN(i)?a:Math.max(a,Math.min(s,i))}function dn(i){return typeof i!="number"||Number.isNaN(i)?0:Math.max(-1,Math.min(1,i))}function Fa(i,a){return!Array.isArray(a)||a.length!==2?i:Jl(i,a[0],a[1])}function wb(i={}){const a=dn(i.x??0),s=dn(i.y??0);return{x:a,y:s,boost:!!i.boost}}function Db(i={},a={}){const s=wb(i),c=typeof a.maxSpeed=="number"?a.maxSpeed:Ec.maxSpeed,f=typeof a.baseSpeed=="number"?a.baseSpeed:Ec.baseSpeed,d=typeof a.boostSpeed=="number"?a.boostSpeed:Ec.boostSpeed,y=s.boost?d:f,g=s.y*y,p=s.x*y;return{vector:s,speeds:{left:Jl(Math.round(g+p),-c,c),right:Jl(Math.round(g-p),-c,c)}}}function zb(i){const a=Array.isArray(i)?i:[],s=String.fromCharCode(...a);if(typeof btoa=="function")return btoa(s);if(typeof Buffer<"u")return Buffer.from(a).toString("base64");throw new Error("No base64 encoder available")}function Mm(i){return new Promise(a=>setTimeout(a,i))}function Bb(){const i=Gu(),{session:a}=Ut(),s=a?.assignment?.roverId,c=b.useMemo(()=>!s||!Array.isArray(a?.roster)?null:a.roster.find(M=>String(M.id)===String(s))||null,[s,a?.roster]),f=b.useMemo(()=>!c?.cameraServo||!c.cameraServo.enabled?null:c.cameraServo,[c]),d=b.useCallback((M,C)=>{s&&i.emit("command",{roverId:s,...M},C)},[i,s]),y=b.useCallback(()=>{s&&d({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[d,s]),g=b.useCallback(M=>{if(!s)return null;const C={left:Fa(M?.left??0,[-500,500]),right:Fa(M?.right??0,[-500,500])};return console.debug("[pipeline] sendDriveDirect",C),d({type:"drive",data:{driveDirect:C}}),C},[d,s]),p=b.useCallback(({main:M=0,side:C=0,vacuum:z=0}={})=>{if(!s)return null;const H={main:Fa(M,Sc.main),side:Fa(C,Sc.side),vacuum:Fa(z,Sc.vacuum)};return console.debug("[pipeline] sendAuxMotors",H),d({type:"motors",data:{motorPwm:H}}),H},[d,s]),v=b.useCallback(M=>!s||!f?null:(d({type:"servo",data:{servo:{angle:M}}}),M),[d,s,f]),S=b.useCallback(M=>{if(!s)return!1;const C=Array.isArray(M)?M:typeof M=="string"?Mb[M]:null;return C?(d({type:"raw",data:{raw:zb(C)}}),y(),!0):!1},[d,y,s]),_=b.useCallback(async M=>{if(!(!M||!Array.isArray(M.steps)||!s))for(const C of M.steps){if(!s)break;switch(C.type){case"oi":S(C.command);break;case"drive":g(C.speeds??{left:0,right:0});break;case"motors":p(C.values??{});break;case"servo":v(C.angle);break;case"pause":await Mm(C.duration??Lc);break}if(C.delay||C.delayMs){const z=C.delayMs??C.delay;typeof z=="number"&&z>0&&await Mm(z)}}},[s,S,g,p,v]);return b.useMemo(()=>({roverId:s,rosterEntry:c,servoConfig:f,emitCommand:d,enableSensorStream:y,sendDriveDirect:g,sendAuxMotors:p,sendServoAngle:v,sendOiCommand:S,runMacroSteps:_}),[s,c,f,d,y,g,p,v,S,_])}const Ub={"{":"[","}":"]",":":";",'"':"'","<":",",">":".","?":"/","|":"\\",_:"-","+":"="},jm={"[":"BracketLeft","]":"BracketRight","\\":"Backslash",";":"Semicolon","'":"Quote",",":"Comma",".":"Period","/":"Slash","-":"Minus","=":"Equal","`":"Backquote"};function ai(i){if(typeof i!="string")return"";const a=i.toLowerCase();return Ub[a]??a}function Lb(i){const a=ai(i);if(!a)return null;if(jm[a])return jm[a];if(a.length===1){if(/[a-z]/.test(a))return`Key${a.toUpperCase()}`;if(/[0-9]/.test(a))return`Digit${a}`}return null}function Sp(i){const a=ai(i);return a?`key:${a}`:null}function kb(i){const a=Lb(i);return a?`code:${a}`:null}function Om(i){const a=new Set,s=Sp(i?.key??"");s&&a.add(s);const c=i?.code?`code:${i.code}`:null;return c&&a.add(c),Array.from(a)}function Hb(i={}){return Object.fromEntries(Object.entries(i).map(([a,s])=>{const c=Array.isArray(s)?s:[s],f=new Set;return c.forEach(d=>{const y=Sp(String(d));y&&f.add(y);const g=kb(String(d));g&&f.add(g)}),[a,f]}))}function qb(i){const a=ai(i);return a?a===" "?"Space":a==="\\"?"Backslash":a==="`"?"Backtick":a==="["?"[ or {":a==="]"?"] or }":a===";"?"; or :":a==="'"?`' or "`:a===","?", or <":a==="."?". or >":a==="/"?"/ or ?":a==="-"?"- or _":a==="="?"= or +":a.length===1?a.toUpperCase():a:"—"}const Ep="roverSettings",Yb=3600*24*365;function Vb(i){try{const a=decodeURIComponent(i??"");return JSON.parse(a)}catch(a){return console.warn("Failed to parse settings cookie",a),null}}function wm(){if(typeof document>"u")return{};const i=`${Ep}=`,a=document.cookie.split(";").map(c=>c.trim()).find(c=>c.startsWith(i));if(!a)return{};const s=a.substring(i.length);return Vb(s)??{}}function Dm(i){if(typeof document>"u")return!1;try{const a=encodeURIComponent(JSON.stringify(i??{})),s=`${Ep}=${a}; path=/; max-age=${Yb}; samesite=strict`;return document.cookie=s,!0}catch(a){return console.warn("Failed to write settings cookie",a),!1}}const Ap=b.createContext(null);function Gb({children:i}){const[a,s]=b.useState(()=>({status:"loading",data:{}}));b.useEffect(()=>{const g=wm();s({status:"ready",data:g??{}})},[]);const c=b.useCallback(()=>{const g=wm();s({status:"ready",data:g??{}})},[]),f=b.useCallback(g=>{const p=Dm(g??{});return s(p?{status:"ready",data:g??{}}:v=>({...v,status:"error"})),p},[]),d=b.useCallback((g,p)=>{s(v=>{const S=v.data[g]||{},_=typeof p=="function"?p(S):{...S,...p??{}},M={...v.data,[g]:_};return Dm(M)?{status:"ready",data:M}:{...v,status:"error"}})},[]),y=b.useMemo(()=>({data:a.data,status:a.status,reload:c,saveAll:f,setNamespace:d}),[a,c,f,d]);return h.jsx(Ap.Provider,{value:y,children:i})}function Xb(){const i=b.useContext(Ap);if(!i)throw new Error("useSettings must be used within SettingsProvider");return i}function $l(i,a={}){const{data:s,status:c,setNamespace:f}=Xb(),d=s[i]??a??{},y=b.useCallback(v=>{f(i,S=>{const _=S??{};return typeof v=="function"?v(_):{..._,...v??{}}})},[i,f]),g=b.useCallback(v=>{f(i,()=>v??{})},[i,f]),p=b.useCallback(()=>{const v=typeof a=="object"?{...a}:a;f(i,()=>v??{})},[a,i,f]);return{value:d,status:c,save:y,replace:g,reset:p}}const _p=b.createContext(null);function zm(i){return Object.fromEntries(Object.entries(i||{}).map(([a,s])=>[a,Array.isArray(s)?[...s]:[]]))}function Qb(i,a){if(!i)return a;const s=typeof i.minAngle=="number"?i.minAngle:-45,c=typeof i.maxAngle=="number"?i.maxAngle:45;return Jl(a,s,c)}function Zb({children:i}){const a=Bb(),[s,c]=b.useReducer(Ob,Rm),f=b.useRef(Rm.camera.angle),{value:d,save:y}=$l("controls",{keymap:Lu,macros:xp});b.useEffect(()=>{c({type:"control/set-rover",payload:a.roverId})},[a.roverId]),b.useEffect(()=>{d?.keymap&&c({type:"control/set-keymap",payload:d.keymap}),d?.macros&&c({type:"control/set-macros",payload:d.macros})},[d?.keymap,d?.macros]),b.useEffect(()=>{const k=a.servoConfig;if(!k){c({type:"control/set-camera-config",payload:{config:null}}),f.current=null;return}const G=typeof k.minAngle=="number"?k.minAngle:-45,X=typeof k.maxAngle=="number"?k.maxAngle:45,P=typeof k.homeAngle=="number"?k.homeAngle:(G+X)/2;c({type:"control/set-camera-config",payload:{config:k,angle:Jl(P,G,X)}}),f.current=Jl(P,G,X)},[a.servoConfig]),b.useEffect(()=>{f.current=typeof s.camera.angle=="number"?s.camera.angle:f.current},[s.camera.angle]),b.useEffect(()=>{a.roverId&&a.enableSensorStream()},[a.roverId,a.enableSensorStream]);const g=b.useCallback(k=>{c({type:"control/set-mode",payload:k})},[]),p=b.useCallback((k,G={})=>{console.debug("[control] setDriveVector",k,G);const X=Db(k);c({type:"control/update-drive",payload:{...X,source:G.source??null}}),a.sendDriveDirect(X.speeds)},[a]),v=b.useCallback((k={})=>{console.debug("[control] setAuxMotors",k);const G=a.sendAuxMotors(k)??k;c({type:"control/set-aux-motors",payload:G})},[a]),S=b.useCallback((k,G)=>{if(!k)return!1;const X=ai(G);if(!X)return!1;const P=zm(s.keymap);return P[k]=[X],c({type:"control/set-keymap",payload:P}),y($=>({...$??{},keymap:P})),!0},[s.keymap,y]),_=b.useCallback(()=>{const k=zm(Lu);c({type:"control/set-keymap",payload:k}),y(G=>({...G??{},keymap:k}))},[y]),M=b.useCallback(k=>{if(!a.servoConfig)return;const G=Qb(a.servoConfig,k);c({type:"control/set-camera-angle",payload:G}),a.sendServoAngle(G),f.current=G},[a]),C=b.useCallback((k=0)=>{const G=a.servoConfig;if(!G)return;const X=typeof k=="number"&&k!==0?k:G.nudgeDegrees||1,P=typeof f.current=="number"?f.current:typeof G.homeAngle=="number"?G.homeAngle:0;M(P+X)},[a.servoConfig,M]),z=b.useCallback(()=>{const k=a.servoConfig;if(!k)return;const G=typeof k.homeAngle=="number"?k.homeAngle:typeof k.minAngle=="number"&&typeof k.maxAngle=="number"?(k.minAngle+k.maxAngle)/2:0;M(G)},[a.servoConfig,M]),H=b.useCallback(async k=>{const G=s.macros.find(X=>X.id===k)||null;G&&await a.runMacroSteps(G)},[a,s.macros]),q=b.useCallback(()=>{c({type:"control/update-drive",payload:{vector:{x:0,y:0,boost:!1},speeds:{left:0,right:0},source:"system-stop"}}),a.sendDriveDirect({left:0,right:0}),a.sendAuxMotors({main:0,side:0,vacuum:0})},[a]),Y=b.useCallback(k=>{a.sendOiCommand(k)},[a]),Q=b.useCallback(k=>{a.roverId&&a.emitCommand({type:"sensorStream",data:{sensorStream:{enable:k}}})},[a]),V=b.useCallback((k,G)=>{c({type:"control/register-input-state",payload:{source:k,state:G}})},[]),J=b.useMemo(()=>({state:s,dispatch:c,pipeline:a,actions:{setMode:g,setDriveVector:p,setAuxMotors:v,setServoAngle:M,nudgeServo:C,goServoHome:z,runMacro:H,stopAllMotion:q,sendOiCommand:Y,setSensorStream:Q,updateKeyBinding:S,resetKeyBindings:_,registerInputState:V}}),[s,a,g,p,v,M,C,z,H,q,Y,Q,S,_,V]);return h.jsx(_p.Provider,{value:J,children:i})}function pn(){const i=b.useContext(_p);if(!i)throw new Error("useControlSystem must be used within ControlSystemProvider");return i}const Ac="keyboard",_c={x:0,y:0,boost:!1},Tc={main:0,side:0,vacuum:0},Kb=110;function Jb(i){const a=i.target;if(!a)return!1;const s=a.tagName;return s==="INPUT"||s==="TEXTAREA"||a.isContentEditable||s==="SELECT"}function et(i,a){if(!i||i.size===0)return!1;for(const s of a)if(i.has(s))return!0;return!1}function $b(i,a){const s=et(a.driveForward,i),c=et(a.driveBackward,i),f=et(a.driveLeft,i),d=et(a.driveRight,i),y=et(a.boostModifier,i),g=et(a.slowModifier,i);let p=0;s&&!c?p=1:c&&!s&&(p=-1);let v=0;f&&!d?v=-1:d&&!f&&(v=1);const S=g?.4:1;return{x:v*S,y:p*S,boost:y&&!g}}function Fb(i,a){if(et(a.auxAllForward,i))return{main:127,side:127,vacuum:127};const c=et(a.auxMainForward,i)?127:et(a.auxMainReverse,i)?-127:0,f=et(a.auxSideForward,i)?127:et(a.auxSideReverse,i)?-70:0,d=et(a.auxVacuumFast,i)?127:et(a.auxVacuumSlow,i)?50:0;return{main:c,side:f,vacuum:d}}function Wb(){const{state:i,actions:{setMode:a,setDriveVector:s,setAuxMotors:c,nudgeServo:f,runMacro:d,stopAllMotion:y,registerInputState:g}}=pn(),p=b.useMemo(()=>Hb(i.keymap),[i.keymap]),v=b.useMemo(()=>{const J=new Set;return Object.values(p).forEach(k=>{k&&k.forEach(G=>J.add(G))}),J},[p]),S=b.useMemo(()=>Math.abs(i.camera?.config?.nudgeDegrees||1),[i.camera?.config?.nudgeDegrees]),_=b.useRef(new Set),M=b.useRef(_c),C=b.useRef(Tc),z=b.useRef(null),H=b.useCallback(()=>{const J=new Set(_.current),k=$b(J,p),G=Fb(J,p);(k.x!==M.current.x||k.y!==M.current.y||k.boost!==M.current.boost)&&(console.debug("[keyboard] drive vector",Array.from(J),k),M.current=k,s(k,{source:Ac})),(G.main!==C.current.main||G.side!==C.current.side||G.vacuum!==C.current.vacuum)&&(console.debug("[keyboard] aux state",Array.from(J),G),C.current=G,c(G)),g(Ac,{keys:Array.from(J),vector:k,aux:G})},[p,g,c,s]),q=b.useCallback(()=>{z.current&&(clearTimeout(z.current),z.current=null)},[]),Y=b.useCallback(()=>{const J=new Set(_.current),k=et(p.cameraUp,J),G=et(p.cameraDown,J);return(k?1:0)-(G?1:0)},[p]),Q=b.useCallback(()=>{const J=Y();if(J===0){z.current&&console.debug("[keyboard] servo loop stop"),q();return}if(z.current)return;console.debug("[keyboard] servo loop start",J);const k=()=>{const G=Y();if(G===0){q();return}console.debug("[keyboard] servo tick",G),f(G*S),z.current=setTimeout(k,Kb)};z.current=setTimeout(k,0)},[Y,f,S,q]),V=b.useCallback(()=>{_.current.clear(),M.current=_c,C.current=Tc,q(),y(),g(Ac,{keys:[],vector:_c,aux:Tc})},[g,y,q]);return b.useEffect(()=>{function J(X){if(Jb(X))return;const P=Om(X);if(P.length===0)return;P.some(le=>v.has(le))&&X.preventDefault(),console.debug("[keyboard] keydown",{key:X.key,code:X.code,tokens:P});const $=P.filter(le=>!_.current.has(le));$.forEach(le=>_.current.add(le)),$.length>0&&($.some(le=>p.driveMacro?.has(le))?(a("drive"),d("drive-sequence")):$.some(le=>p.dockMacro?.has(le))&&(a("dock"),d("seek-dock"))),Q(),H()}function k(X){const P=Om(X);console.debug("[keyboard] keyup",{key:X.key,code:X.code,tokens:P}),P.forEach($=>_.current.delete($)),Q(),H()}function G(){V()}return window.addEventListener("keydown",J),window.addEventListener("keyup",k),window.addEventListener("blur",G),()=>{window.removeEventListener("keydown",J),window.removeEventListener("keyup",k),window.removeEventListener("blur",G)}},[v,H,Q,p.dockMacro,p.driveMacro,V,d,a]),b.useEffect(()=>{V()},[i.roverId,V]),b.useEffect(()=>()=>{q()},[q]),null}const jt={gamepad:{driveDeadzone:.2,cameraDeadzone:.25,servoStep:2,auxReverseScale:.55},mobile:{joystickRadius:80,joystickSmoothing:.15}},ku={drive:{horizontal:null,vertical:null},camera:{vertical:null},triggers:{main:null,side:null},buttons:{mainReverse:null,sideReverse:null,vacuum:null,allAux:null,driveMacro:null,dockMacro:null}},Wa="gamepad";function Cc(i,a){return Math.abs(i)<a?0:i}function Bm(i,a){return i&&a&&i.x===a.x&&i.y===a.y&&i.boost===a.boost}function Um(i,a){return i&&a&&i.main===a.main&&i.side===a.side&&i.vacuum===a.vacuum}function Ib(){const{actions:{setMode:i,setDriveVector:a,setAuxMotors:s,nudgeServo:c,runMacro:f,registerInputState:d}}=pn(),{value:y}=$l("inputs",jt),{value:g}=$l("gamepadMapping",ku),p=y.gamepad??jt.gamepad,v=Math.min(Math.max(p.driveDeadzone??.2,0),.8),S=Math.min(Math.max(p.cameraDeadzone??.25,0),.9),_=p.servoStep??jt.gamepad.servoStep,M=p.auxReverseScale??jt.gamepad.auxReverseScale,C=!!g?.drive?.horizontal&&!!g?.drive?.vertical&&!!g?.camera?.vertical&&!!g?.triggers?.main&&!!g?.triggers?.side&&!!g?.buttons?.mainReverse&&!!g?.buttons?.sideReverse&&!!g?.buttons?.vacuum&&!!g?.buttons?.allAux&&!!g?.buttons?.driveMacro&&!!g?.buttons?.dockMacro,z=b.useRef(null),H=b.useRef({x:0,y:0,boost:!1}),q=b.useRef({main:0,side:0,vacuum:0}),Y=b.useRef(new Map),Q=b.useRef(0),V=b.useCallback((P,$)=>{const le=Y.current.get(P)||!1;return Y.current.set(P,$),$&&!le},[]),J=b.useCallback((P,$)=>{if(!$)return 0;const le=P.axes?.[$.index]??0;return $.invert?-le:le},[]),k=b.useCallback((P,$)=>{if(!$)return 0;const le=P.buttons?.[$.index];return le?typeof le.value=="number"?le.value:le.pressed?1:0:0},[]),G=b.useCallback((P,$)=>{if(!$)return!1;const le=P.buttons?.[$.index];return le?le.pressed||le.value>.5:!1},[]),X=b.useCallback(()=>{if(typeof navigator>"u"||!navigator.getGamepads)return;const P=navigator.getGamepads(),$=P&&Array.from(P).find(Boolean);if(!$){Bm(H.current,{x:0,y:0,boost:!1})||(H.current={x:0,y:0,boost:!1},a({x:0,y:0,boost:!1},{source:Wa})),Um(q.current,{main:0,side:0,vacuum:0})||(q.current={main:0,side:0,vacuum:0},s({main:0,side:0,vacuum:0})),d(Wa,{connected:!1,mappingReady:C});return}if(!C){d(Wa,{connected:!0,mappingReady:!1});return}const le=dn(Cc(J($,g.drive.horizontal),v)),je=dn(Cc(-J($,g.drive.vertical),v)),Le={x:le,y:je,boost:!1};Bm(Le,H.current)||(H.current=Le,a(Le,{source:Wa}));const Lt=Math.round(k($,g.triggers.main)*127),rt=G($,g.buttons.mainReverse)?-Lt:Lt,D=Math.round(k($,g.triggers.side)*127),ne=G($,g.buttons.sideReverse)?-Math.round(D*M):D,be=G($,g.buttons.vacuum)?127:0;let pe={main:rt,side:ne,vacuum:be};G($,g.buttons.allAux)&&(pe={main:127,side:127,vacuum:127}),Um(pe,q.current)||(q.current=pe,s(pe));const A=dn(Cc(-J($,g.camera.vertical),S)),L=performance.now();Math.abs(A)>.25&&L-Q.current>120&&(Q.current=L,c(A>0?_:-_));const K=G($,g.buttons.driveMacro);V(`macro-${g.buttons.driveMacro.index}`,K)&&(i("drive"),f("drive-sequence"));const W=G($,g.buttons.dockMacro);V(`macro-${g.buttons.dockMacro.index}`,W)&&(i("dock"),f("seek-dock")),d(Wa,{connected:!0,id:$.id,index:$.index,axes:[le,je,A],buttons:{a:$.buttons?.[0]?.pressed||!1,b:$.buttons?.[1]?.pressed||!1,lb:$.buttons?.[4]?.pressed||!1,rb:$.buttons?.[5]?.pressed||!1}})},[M,S,v,J,k,V,G,g.buttons?.allAux,g.buttons?.dockMacro,g.buttons?.driveMacro,g.buttons?.mainReverse,g.buttons?.sideReverse,g.buttons?.vacuum,g.camera?.vertical,g.drive?.horizontal,g.drive?.vertical,g.triggers?.main,g.triggers?.side,C,c,d,f,_,s,a,i]);return b.useEffect(()=>{function P(){X(),z.current=requestAnimationFrame(P)}return z.current=requestAnimationFrame(P),()=>{z.current&&cancelAnimationFrame(z.current)}},[X]),null}function Pc(){const{state:{roverId:i},actions:a}=pn(),c=Xu(i)?.sensors||{},f=(c.oiMode?.label||"").toLowerCase()==="full",d=!!c.chargingSources?.homeBase,y=!!(c.chargingState?.label&&c.chargingState.label.toLowerCase()!=="not charging"),g=()=>{i&&(a.setMode("drive"),a.runMacro("drive-sequence"))},p=()=>{i&&(a.setMode("dock"),a.runMacro("seek-dock"))};return h.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[h.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[h.jsx("span",{children:"Drive control"}),h.jsx("span",{children:i?`Rover ${i}`:"unassigned"})]}),h.jsxs("div",{className:"mt-1 space-y-1",children:[h.jsx(Lm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:f?"Ready!":"Not Ready!",active:f}],tone:"emerald",onClick:g,disabled:!i}),h.jsx(Lm,{title:"Dock and Charge",description:"Line the rover up about a foot from the dock, then trigger an automatic approach.",statuses:[{label:d?"Docked!":"Not Docked!",active:d},{label:y?"Charging!":"Not Charging!",active:y}],tone:"indigo",onClick:p,disabled:!i})]})]})}function Lm({title:i,description:a,statuses:s,tone:c,onClick:f,disabled:d,footnote:y}){const g=c==="indigo"?"bg-indigo-600":"bg-emerald-600";return h.jsxs("button",{type:"button",onClick:f,disabled:d,className:`w-full rounded-lg ${g} px-1 py-1 text-left text-white disabled:opacity-40`,children:[h.jsx("p",{className:"text-base font-semibold",children:i}),h.jsx("p",{className:"text-sm text-white/90",children:a}),h.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:s.map(p=>h.jsx("span",{className:`rounded-full px-1 py-0.5 text-xs font-semibold ${p.active?"bg-lime-300 text-emerald-900":"bg-emerald-900 text-emerald-100"}`,children:p.label},p.label))}),y&&h.jsx("p",{className:"mt-1 text-xs text-emerald-50/80",children:y})]})}const Pb=5e3;function ex(i){return i.id?i.id:i.timestamp?`${i.timestamp}-${i.message}`:`${i.title||"alert"}-${i.message}`}function tx(){const{alerts:i}=Ut(),[a,s]=b.useState(()=>Date.now()),c=b.useMemo(()=>i.slice(-5).map(d=>({alert:d,key:ex(d)})),[i]);b.useEffect(()=>{if(!c.length)return;const d=setInterval(()=>s(Date.now()),200);return()=>clearInterval(d)},[c.length]);const f=c.map(d=>({...d,age:a-(d.alert.receivedAt??d.alert.timestamp??0)})).filter(d=>d.age<=Pb);return f.length?h.jsx("div",{className:"pointer-events-none fixed top-1 left-1/2 z-50 flex -translate-x-1/2 flex-col gap-1",children:f.map(d=>h.jsx(nx,{alert:d.alert},d.key))}):null}function nx({alert:i}){const a=i.color==="error"?"bg-red-500/30 text-red-100":i.color==="warn"?"bg-amber-500/30 text-amber-100":"bg-emerald-500/30 text-emerald-100";return h.jsxs("div",{className:`pointer-events-auto rounded-sm px-1 py-1 text-[0.75rem] shadow-lg shadow-black/60 ${a}`,children:[h.jsx("p",{className:"text-[0.65rem] text-slate-300",children:i.title||"Alert"}),h.jsx("p",{className:"text-sm text-white",children:i.message})]})}const lx=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function eo(){const{session:i,lockRover:a,setMode:s,requestControl:c}=Ut(),f=b.useMemo(()=>i?.roster??[],[i?.roster]),[d,y]=b.useState({}),g=i?.role==="admin"||i?.role==="lockdown"||i?.role==="lockdown-admin",p=i?.mode??"open",v=async(C,z)=>{try{await a(C,z),y(H=>({...H,[C]:z}))}catch(H){alert(H.message)}},S=async C=>{const z=C.target.value;try{await s(z)}catch(H){alert(H.message)}},_=async C=>{try{await c(C,{force:!0})}catch(z){alert(z.message)}},M=b.useMemo(()=>{const C={};return f.forEach(z=>{C[z.id]=d[z.id]??z.locked}),C},[f,d]);return g?h.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[h.jsxs("div",{className:"flex items-center justify-between gap-1 text-sm",children:[h.jsx("span",{children:"Admin controls"}),h.jsx("select",{value:p,onChange:S,className:"rounded-sm bg-black/40 px-1 py-1 text-sm text-slate-100",children:lx.map(C=>h.jsx("option",{value:C.key,children:C.label},C.key))})]}),h.jsx("div",{className:"mt-1 space-y-1 text-sm",children:f.map(C=>h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 rounded-sm bg-black/30 px-1 py-1",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-slate-100",children:C.name}),h.jsx("p",{className:"text-xs text-slate-400",children:M[C.id]?"locked":"unlocked"})]}),h.jsxs("div",{className:"flex flex-wrap gap-1 text-xs",children:[h.jsx("button",{type:"button",onClick:()=>v(C.id,!M[C.id]),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:M[C.id]?"Unlock":"Lock"}),h.jsx("button",{type:"button",onClick:()=>_(C.id),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:"Force"})]})]},C.id))})]}):null}function ax({size:i="default"}){const{state:{roverId:a},actions:s}=pn(),[c,f]=b.useState(null),d=!a||c!==null,g=Xu(a)?.sensors?.oiMode?.label||"Unknown",v=g.toLowerCase()==="full",S=v?"Drive Ready":`OI Mode: ${g}`,_=async()=>{if(a){f("drive");try{s.setMode("drive"),await s.runMacro("drive-sequence")}finally{f(null)}}},M=async()=>{if(a){f("dock");try{s.setMode("dock"),await s.runMacro("seek-dock")}finally{f(null)}}},C=i==="compact"?"text-xs px-1 py-0.5":"text-sm px-1.5 py-0.5";return h.jsxs("div",{className:"rounded-sm bg-black/30 p-1 text-slate-100",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:`rounded-full ${v?"bg-emerald-700":"bg-indigo-700"} ${C}`,children:S}),h.jsxs("span",{className:"text-[0.65rem] text-slate-400",children:["Rover ",a??"—"]})]}),h.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-1 text-xs",children:[h.jsx("button",{type:"button",onClick:_,disabled:d,className:`rounded-sm bg-emerald-600 px-1 py-1 font-semibold uppercase tracking-wide text-emerald-50 disabled:opacity-40 ${i==="compact"?"text-xs":"text-sm"}`,children:"Drive"}),h.jsx("button",{type:"button",onClick:M,disabled:d,className:`rounded-sm bg-indigo-600 px-1 py-1 font-semibold uppercase tracking-wide text-indigo-50 disabled:opacity-40 ${i==="compact"?"text-xs":"text-sm"}`,children:"Dock"})]})]})}const Nu="mobile-joystick",ix=[{id:"main-forward",label:"Main +",values:{main:127},hold:!0,color:"bg-emerald-600"},{id:"main-reverse",label:"Main -",values:{main:-127},hold:!0,color:"bg-emerald-800"},{id:"side-forward",label:"Side +",values:{side:127},hold:!0,color:"bg-cyan-600"},{id:"side-reverse",label:"Side -",values:{side:-70},hold:!0,color:"bg-cyan-800"},{id:"vacuum-fast",label:"Vacuum Max",values:{vacuum:127},hold:!0,color:"bg-amber-500 text-amber-950"},{id:"vacuum-slow",label:"Vacuum Low",values:{vacuum:50},hold:!0,color:"bg-amber-700"},{id:"all-forward",label:"All +",values:{main:127,side:127,vacuum:127},hold:!0,color:"bg-fuchsia-600"},{id:"stop-all",label:"Stop",values:{main:0,side:0,vacuum:0},hold:!1,color:"bg-slate-900"}];function ux({disabled:i,layout:a,radius:s,onMove:c,onStop:f}){const d=b.useRef(null),y=b.useRef(null),g=b.useRef({x:0,y:0}),[p,v]=b.useState({active:!1,base:{x:0,y:0},knob:{x:0,y:0}}),S=b.useCallback(()=>{y.current=null,v({active:!1,base:{x:0,y:0},knob:{x:0,y:0}}),f?.()},[f]),_=b.useCallback(H=>{if(i||y.current!==null)return;H.preventDefault();const q=d.current;if(!q)return;const Y=q.getBoundingClientRect(),Q=H.clientX-Y.left,V=H.clientY-Y.top;g.current={x:Q,y:V},y.current=H.pointerId,q.setPointerCapture?.(H.pointerId),v({active:!0,base:{x:Q,y:V},knob:{x:0,y:0}})},[i]),M=b.useCallback(H=>{if(i||y.current!==H.pointerId)return;H.preventDefault();const q=d.current;if(!q)return;const Y=q.getBoundingClientRect(),Q=H.clientX-Y.left,V=H.clientY-Y.top,J=Q-g.current.x,k=V-g.current.y,G=Math.min(Math.hypot(J,k),s),X=Math.atan2(k,J),P=Math.cos(X)*G,$=Math.sin(X)*G,le={x:dn(P/s),y:dn(-$/s),boost:!1};v(je=>({...je,knob:{x:P,y:$}})),c?.(le)},[i,c]),C=b.useCallback(H=>{if(y.current!==H.pointerId)return;H.preventDefault(),d.current?.releasePointerCapture?.(H.pointerId),S()},[S]);b.useEffect(()=>{i&&S()},[i,S]);const z=a==="landscape"?"h-[260px]":"h-[220px]";return h.jsxs("div",{ref:d,role:"presentation",className:`relative w-full ${z} select-none overflow-hidden rounded-lg border border-slate-800 bg-slate-900/70`,style:{touchAction:"none"},onPointerDown:_,onPointerMove:M,onPointerUp:C,onPointerLeave:C,onPointerCancel:C,onContextMenu:H=>H.preventDefault(),children:[!p.active&&h.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center text-xs text-slate-400",children:[h.jsx("p",{children:"Touch and hold anywhere"}),h.jsx("p",{children:"Joystick will follow your thumb"})]}),p.active&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"pointer-events-none absolute h-28 w-28 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-cyan-400/60 bg-cyan-400/10",style:{left:p.base.x,top:p.base.y}}),h.jsx("div",{className:"pointer-events-none absolute h-12 w-12 -translate-x-1/2 -translate-y-1/2 rounded-full bg-cyan-300/80 shadow-lg",style:{left:p.base.x+p.knob.x,top:p.base.y+p.knob.y}})]})]})}function Tp({layout:i}){const{state:{roverId:a,camera:s},actions:{setDriveVector:c,registerInputState:f,stopAllMotion:d,setServoAngle:y}}=pn(),{value:g}=$l("inputs",jt),p=g.mobile??jt.mobile,v=!a,S=s?.config,_=!!(a&&s?.enabled&&S),M=typeof S?.minAngle=="number"?S.minAngle:-45,C=typeof S?.maxAngle=="number"?S.maxAngle:45,z=typeof s?.angle=="number"?s.angle:typeof S?.homeAngle=="number"?S.homeAngle:(M+C)/2,H=Math.max(40,p.joystickRadius??jt.mobile.joystickRadius),q=Math.min(Math.max(p.joystickSmoothing??0,0),.85),Y=b.useRef({x:0,y:0,boost:!1});b.useEffect(()=>{v&&(Y.current={x:0,y:0,boost:!1})},[v]);const Q=b.useCallback((k={})=>{if(v)return;const G={x:dn(k.x??0),y:dn(k.y??0),boost:!!k.boost},X=q>0?{x:Y.current.x+(G.x-Y.current.x)*(1-q),y:Y.current.y+(G.y-Y.current.y)*(1-q),boost:G.boost}:G;Y.current=X,c(X,{source:Nu}),f(Nu,{vector:X,lastEvent:"move"})},[v,f,c,q]),V=b.useCallback(()=>{if(v)return;const k={x:0,y:0,boost:!1};Y.current=k,c(k,{source:Nu}),f(Nu,{vector:k,lastEvent:"stop"})},[v,f,c]),J=k=>{if(!_)return;const G=Number(k.target.value);Number.isNaN(G)||y(G)};return h.jsxs("div",{className:"flex flex-col gap-1 text-slate-100",children:[h.jsx(ax,{size:"compact"}),h.jsx(ux,{disabled:v,layout:i,radius:H,onMove:Q,onStop:V}),h.jsx("button",{type:"button",onClick:d,disabled:v,className:"rounded bg-red-600 px-2 py-2 text-xs font-semibold uppercase tracking-wide text-red-100 disabled:opacity-40",children:"Panic Stop"}),_&&h.jsxs("div",{className:"rounded-lg bg-slate-900/70 p-2 text-xs",children:[h.jsxs("div",{className:"flex items-center justify-between text-[0.7rem] uppercase tracking-wide text-slate-400",children:[h.jsx("span",{children:"Camera Tilt"}),h.jsxs("span",{className:"font-mono text-slate-200",children:[z.toFixed(1),"°"]})]}),h.jsx("input",{type:"range",min:M,max:C,step:.5,value:z,onChange:J,className:"mt-1 w-full accent-cyan-400"})]})]})}function Cp({orientation:i}){const{state:{roverId:a},actions:{setAuxMotors:s}}=pn(),c=b.useRef(null),f=!a,d=b.useCallback(p=>{if(!f){if(p.hold===!1){s(p.values),c.current=null;return}c.current=p.id,s(p.values)}},[f,s]),y=b.useCallback(p=>{f||p.hold===!1||c.current===p.id&&(c.current=null,s({main:0,side:0,vacuum:0}))},[f,s]),g=i==="landscape"?"grid-cols-1":"grid-cols-1 sm:grid-cols-2";return h.jsxs("div",{className:"flex flex-col gap-1 text-slate-100",children:[h.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-400",children:"Aux controls"}),h.jsx("div",{className:`grid ${g} gap-1`,children:ix.map(p=>h.jsx("button",{type:"button",disabled:f,onPointerDown:v=>{v.preventDefault(),d(p)},onPointerUp:()=>y(p),onPointerLeave:()=>y(p),onPointerCancel:()=>y(p),onContextMenu:v=>v.preventDefault(),className:`rounded-lg px-2 py-2 text-left text-sm font-semibold uppercase tracking-wide text-white transition ${p.color} disabled:opacity-30`,children:p.label},p.id))})]})}function sx(){return h.jsx("div",{className:"flex h-full flex-col gap-1",children:h.jsx(Cp,{orientation:"landscape"})})}function rx(){return h.jsx("div",{className:"flex h-full flex-col gap-1",children:h.jsx(Tp,{layout:"landscape"})})}function cx(){return h.jsx("section",{className:"w-full",children:h.jsxs("div",{className:"grid grid-cols-2 gap-1",children:[h.jsx(Cp,{orientation:"portrait"}),h.jsx(Tp,{layout:"portrait"})]})})}function to(){return h.jsxs("div",{className:"min-h-[8rem] rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[h.jsx("p",{className:"text-center text-sm text-slate-400",children:"Room camera"}),h.jsx("p",{className:"mt-1 text-center",children:"Feed placeholder. Wire upcoming room cam here."})]})}function no(){const{logs:i}=Ut();return h.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[h.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-400",children:[h.jsx("span",{children:"Server logs"}),h.jsx("span",{children:i.length})]}),h.jsx("div",{className:"mt-1 h-64 overflow-y-auto rounded-sm bg-black/40 p-1 font-mono text-xs",children:i.length===0?h.jsx("p",{children:"No logs yet."}):i.slice().reverse().map(a=>h.jsxs("div",{className:"mb-1",children:[h.jsx("span",{className:"text-amber-400",children:a.timestamp})," ",h.jsxs("span",{className:"text-lime-400",children:["[",a.level,"]"]})," ",a.label&&h.jsxs("span",{className:"text-teal-400",children:["[",a.label,"]"]})," ",h.jsx("span",{children:a.message})]},a.id))})]})}function Qu(){const{login:i,setRole:a}=Ut(),[s,c]=b.useState(""),[f,d]=b.useState(""),[y,g]=b.useState(!1);async function p(v){v.preventDefault(),g(!0);try{await i(s,f),c(""),d("")}catch(S){alert(S.message)}finally{g(!1)}}return h.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[h.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),h.jsxs("form",{className:"mt-1 flex flex-col gap-1",onSubmit:p,children:[h.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Username",value:s,onChange:v=>c(v.target.value)}),h.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Password",type:"password",value:f,onChange:v=>d(v.target.value)}),h.jsx("button",{type:"submit",disabled:y,className:"rounded-sm bg-slate-200 px-1 py-1 text-sm font-semibold text-black disabled:opacity-50",children:y?"Logging in…":"Login"})]}),h.jsxs("div",{className:"mt-1 flex gap-1 text-sm",children:[h.jsx("button",{type:"button",onClick:()=>a("user"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Driver"}),h.jsx("button",{type:"button",onClick:()=>a("spectator"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Spectator"})]})]})}function Np(i=[]){const a=Gu(),[s,c]=b.useState({}),f=Array.isArray(i)?i.filter(Boolean).join("|"):"";return b.useEffect(()=>{if(!f)return;const y=f.split("|");let g=!1;return y.forEach(p=>{a.emit("video:request",{roverId:p},(v={})=>{g||c(S=>({...S,[p]:v}))})}),()=>{g=!0}},[a,f]),b.useMemo(()=>{if(!f)return{};const y=f.split("|"),g={};return y.forEach(p=>{s[p]&&(g[p]=s[p])}),g},[f,s])}const ox={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function fx(i){if(typeof btoa=="function")return btoa(i);if(typeof Buffer<"u")return Buffer.from(i).toString("base64");throw new Error("No base64 encoder available")}function dx(i){if(!i)return{};const a=`${i}:${i}`;return{Authorization:`Basic ${fx(a)}`}}class hx{constructor({url:a,token:s,video:c,onStatus:f}){this.url=a,this.token=s,this.video=c,this.pc=null,this.abortController=null,this.onStatus=f}notify(a,s){typeof this.onStatus=="function"&&this.onStatus(a,s)}configureVideoElement(){this.video&&(this.video.playsInline=!0,this.video.autoplay=!0,this.video.disableRemotePlayback=!0,"latencyHint"in HTMLMediaElement.prototype&&(this.video.latencyHint="interactive"))}async start(){if(!this.url||!this.video)throw new Error("Video target missing");this.stop(),this.notify("connecting"),this.configureVideoElement(),this.abortController=new AbortController;const a=new RTCPeerConnection(ox);this.pc=a;const s=new MediaStream;a.ontrack=c=>{c.streams[0]?.getTracks().forEach(f=>s.addTrack(f)),this.video.srcObject=s,c.track?.kind==="video"&&"playoutDelayHint"in c.receiver&&(c.receiver.playoutDelayHint=0)},a.addTransceiver("video",{direction:"recvonly"}),a.addTransceiver("audio",{direction:"recvonly"}),a.onconnectionstatechange=()=>{const c=a.connectionState;this.notify(c)},a.oniceconnectionstatechange=()=>{const c=a.iceConnectionState;(c==="failed"||c==="disconnected")&&this.notify(c)};try{const c=await a.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});await a.setLocalDescription(c);const f=await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/sdp",...dx(this.token)},body:c.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const d=await f.text();await a.setRemoteDescription({type:"answer",sdp:d}),a.getReceivers().forEach(y=>{"playoutDelayHint"in y&&(y.playoutDelayHint=0)}),await this.video.play().catch(()=>{}),this.notify("playing")}catch(c){throw this.notify("error",c.message),this.stop(),c}}stop(){this.abortController&&(this.abortController.abort(),this.abortController=null),this.pc&&(this.pc.getSenders().forEach(a=>a.track?.stop()),this.pc.getReceivers().forEach(a=>a.track?.stop()),this.pc.close(),this.pc=null),this.video&&(this.video.srcObject=null),this.notify("stopped")}}const mx=2e3,px=3e3;function Rp({sessionInfo:i,label:a,forceMute:s=!1,telemetryFrame:c,batteryConfig:f}){const d=b.useRef(null),y=b.useRef(null),g=b.useRef(null),[p,v]=b.useState("idle"),[S,_]=b.useState(null),[M,C]=b.useState(0),[z,H]=b.useState(!0),q=c?.sensors,Y=q?.batteryChargeMah??null,Q=q?.wheelOvercurrents||null,V=!!(Q&&Object.values(Q).some(X=>!!X)),J=b.useCallback(()=>{clearTimeout(y.current),y.current=setTimeout(()=>C(Date.now()),mx)},[]),k=b.useCallback((X=0)=>{if(s)return;clearTimeout(g.current);const P=()=>{clearTimeout(g.current),g.current=setTimeout(()=>{s||$()},px)},$=async()=>{const le=d.current;if(le)try{le.muted=!1,await le.play(),H(!1)}catch{le.muted=!0,H(!0),P()}};g.current=setTimeout($,X)},[s]);b.useEffect(()=>()=>{clearTimeout(y.current),clearTimeout(g.current)},[]),b.useEffect(()=>{p==="playing"&&k(0)},[p,k]),b.useEffect(()=>{if(!i?.url||!d.current)return;let X=!0,P;const $=setTimeout(()=>H(!0),0),le=(je,Le)=>{X&&(v(je),_(Le||null),["error","failed","disconnected","closed"].includes(je)&&J())};return P=new hx({url:i.url,token:i.token,video:d.current,onStatus:le}),P.start().catch(je=>{X&&(v("error"),_(je.message),J())}),()=>{X=!1,clearTimeout($),P?.stop()}},[i?.url,i?.token,M,J]),b.useEffect(()=>{p==="stopped"&&i?.url&&J()},[p,i?.url,J]);const G=i?.url?p==="error"?`Error: ${S||"unknown"}`:S?`${p} (${S})`:p:"waiting";return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm bg-black aspect-video",children:[h.jsx("video",{ref:d,muted:s||z,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),h.jsx(vx,{frame:c}),h.jsx(gx,{active:V})]}),h.jsx(yx,{charge:Y,config:f,label:a,status:G})]})}function yx({charge:i,config:a,label:s,status:c}){const f=a?.Full,d=a?.Warn,y=a?.Urgent??null;if(i==null||f==null||d==null)return h.jsxs("div",{className:"rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[h.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[h.jsx("span",{children:s}),h.jsx("span",{children:c})]}),h.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Battery telemetry unavailable"})]});const g=f-d;if(g<=0)return null;const p=(i-d)/g,v=Math.min(1,Math.max(0,p)),S=Math.round(v*100),_=`${S}%`,M=p<=0,C=y!=null&&i<=y,z=M?"bg-red-500 animate-pulse":C?"bg-amber-400":"bg-emerald-500";return h.jsxs("div",{className:"space-y-2 rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[h.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[h.jsx("span",{children:s}),h.jsx("span",{children:c})]}),h.jsxs("div",{className:"relative h-4 w-full rounded-full bg-slate-800",children:[h.jsx("div",{className:`h-full rounded-full transition-[width] ${z}`,style:{width:`${S}%`}}),h.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:_})]})]})}function vx({frame:i}){const s=i?.sensors?.bumpsAndWheelDrops||{},[c,f]=b.useState(()=>Date.now());b.useEffect(()=>{const p=setInterval(()=>f(Date.now()),150);return()=>clearInterval(p)},[]);const d=i?.receivedAt?c-i.receivedAt<200:!1,y=[{label:"B-L",active:s.bumpLeft},{label:"B-R",active:s.bumpRight}],g=[{label:"Drop L",active:s.wheelDropLeft},{label:"Drop R",active:s.wheelDropRight}];return h.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-1 text-[0.65rem] text-slate-200",children:[h.jsxs("div",{className:"flex items-center justify-between gap-1",children:[h.jsxs("div",{className:"flex items-center gap-1 text-[0.55rem] text-slate-400",children:[h.jsx("span",{className:`h-2 w-2 rounded-full ${d?"bg-emerald-300 shadow-[0_0_4px_rgba(16,185,129,0.8)]":"bg-slate-700"}`}),h.jsx("span",{children:"sensor"})]}),h.jsx("div",{className:"flex gap-1",children:y.map(p=>h.jsx(km,{label:p.label,active:p.active},p.label))})]}),h.jsx("div",{className:"flex justify-end gap-1",children:g.map(p=>h.jsx(km,{label:p.label,active:p.active},p.label))})]})}function km({label:i,active:a}){return h.jsx("span",{className:`rounded-sm px-1 py-0.5 text-[0.55rem] ${a?"bg-emerald-500/30 text-emerald-100":"bg-black/40 text-slate-500"}`,children:i})}function gx({active:i}){return i?h.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:h.jsx("div",{className:"text-center text-sm font-semibold text-red-100 animate-pulse",children:"Overcurrent"})}):null}function lo(){const{session:i}=Ut(),a=i?.assignment?.roverId,s=Np(a?[a]:[]),c=a?s[a]:null,f=Xu(a),y=(a&&i?.roster?i.roster.find(g=>String(g.id)===String(a)):null)?.battery??null;return h.jsx("section",{className:"rounded-sm bg-[#242a32] p-1",children:a?h.jsx("div",{className:"w-full",children:h.jsx(Rp,{sessionInfo:c,label:a,muted:!1,telemetryFrame:f,batteryConfig:y})}):h.jsx("p",{className:"text-sm text-slate-400",children:"Assign a rover to view the video feed."})})}const bx=150;function Ru(i){return typeof i!="number"||Number.isNaN(i)?"—":`${i>0?"+":""}${i.toFixed(1)}°`}function xx(){const{state:{roverId:i,camera:a},actions:{setServoAngle:s,nudgeServo:c,goServoHome:f}}=pn(),d=a?.config,y=!!(i&&a?.enabled&&d),g=typeof d?.minAngle=="number"?d.minAngle:-30,p=typeof d?.maxAngle=="number"?d.maxAngle:30,v=typeof a?.angle=="number"?a.angle:typeof d?.homeAngle=="number"?d.homeAngle:(g+p)/2;if(!y)return null;const[S,_]=b.useState(v),M=b.useRef(null),C=b.useRef(!1);b.useEffect(()=>{C.current||_(v)},[v]),b.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]);const z=typeof d?.nudgeDegrees=="number"&&d.nudgeDegrees>0?d.nudgeDegrees:1,H=V=>{M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{s(V)},bx)},q=V=>{const J=Number.parseFloat(V.target.value);Number.isNaN(J)||(C.current=!0,_(J),H(J))},Y=()=>{C.current=!1,M.current&&clearTimeout(M.current),s(S)},Q=V=>{const J=z*V;c(J)};return h.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[h.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[h.jsx("span",{children:"Camera Tilt"}),h.jsx("span",{className:"font-mono text-sm text-slate-100",children:Ru(v)})]}),h.jsxs("div",{className:"mt-2",children:[h.jsx("input",{type:"range",className:"w-full accent-emerald-400",min:g,max:p,step:.5,value:S,onChange:q,onMouseUp:Y,onTouchEnd:Y,onPointerUp:Y}),h.jsxs("div",{className:"mt-1 flex justify-between text-xs text-slate-400",children:[h.jsx("span",{children:Ru(g)}),h.jsx("span",{children:Ru(p)})]})]}),h.jsxs("div",{className:"mt-2 flex gap-1 text-sm",children:[h.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-800 px-1 py-0.5 text-slate-100 hover:bg-slate-700",onClick:()=>Q(-1),children:"Tilt Down"}),h.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-700 px-1 py-0.5 text-slate-100 hover:bg-slate-600",onClick:()=>f(),children:"Center"}),h.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-800 px-1 py-0.5 text-slate-100 hover:bg-slate-700",onClick:()=>Q(1),children:"Tilt Up"})]}),h.jsxs("p",{className:"mt-1 text-xs text-slate-400",children:["Step: ",Ru(z)," · Pin GPIO ",d?.pin]})]})}const Sx=[{id:"driveForward",label:"Drive Forward",group:"Driving"},{id:"driveBackward",label:"Drive Backward",group:"Driving"},{id:"driveLeft",label:"Turn Left",group:"Driving"},{id:"driveRight",label:"Turn Right",group:"Driving"},{id:"boostModifier",label:"Boost Modifier",group:"Driving"},{id:"slowModifier",label:"Slow Modifier",group:"Driving"},{id:"auxMainForward",label:"Main Brush Forward",group:"Aux Motors"},{id:"auxMainReverse",label:"Main Brush Reverse",group:"Aux Motors"},{id:"auxSideForward",label:"Side Brush Forward",group:"Aux Motors"},{id:"auxSideReverse",label:"Side Brush Reverse",group:"Aux Motors"},{id:"auxVacuumFast",label:"Vacuum Max",group:"Aux Motors"},{id:"auxVacuumSlow",label:"Vacuum Low",group:"Aux Motors"},{id:"auxAllForward",label:"All Aux Forward",group:"Aux Motors"},{id:"cameraUp",label:"Camera Up",group:"Camera"},{id:"cameraDown",label:"Camera Down",group:"Camera"},{id:"driveMacro",label:"Drive Macro",group:"Macros"},{id:"dockMacro",label:"Dock Macro",group:"Macros"}];function Ex(i){return i.reduce((a,s)=>((a[s.group]||(a[s.group]=[])).push(s),a),{})}function Ax(i){const[a,s]=b.useState(null);return b.useEffect(()=>{if(!a)return;function c(f){if(f.preventDefault(),f.key==="Escape"){s(null);return}const d=ai(f.key??"");d&&(i(a,d,f),s(null))}return window.addEventListener("keydown",c,{capture:!0}),()=>window.removeEventListener("keydown",c,{capture:!0})},[a,i]),{active:a,startCapture:s,cancel:()=>s(null)}}function _x(){const{state:{keymap:i},actions:{updateKeyBinding:a,resetKeyBindings:s}}=pn(),c=b.useMemo(()=>Ex(Sx),[]),{active:f,startCapture:d,cancel:y}=Ax((p,v)=>{a(p,v)}),g=b.useCallback(p=>i?.[p]?.[0]||Lu[p]?.[0]||"",[i]);return h.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-400",children:"Keyboard Layout"}),h.jsx("p",{className:"text-[0.7rem] text-slate-500",children:"Per-browser · click to change a binding"})]}),h.jsx("button",{type:"button",onClick:()=>s(),className:"rounded-sm bg-black/40 px-2 py-1 text-xs uppercase tracking-wide text-slate-200 hover:bg-black/60",children:"Reset Defaults"})]}),h.jsx("div",{className:"mt-2 space-y-2",children:Object.entries(c).map(([p,v])=>h.jsxs("div",{className:"rounded border border-white/5 p-1",children:[h.jsx("p",{className:"text-[0.7rem] uppercase tracking-wide text-slate-400",children:p}),h.jsx("div",{className:"mt-1 space-y-1",children:v.map(S=>{const _=g(S.id),M=f===S.id;return h.jsxs("div",{className:"flex items-center justify-between rounded bg-black/30 px-1 py-1 text-xs",children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-semibold text-slate-100",children:S.label}),h.jsx("p",{className:"text-[0.65rem] text-slate-400",children:qb(_)})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[M&&h.jsx("button",{type:"button",onClick:()=>y(),className:"rounded bg-red-600 px-2 py-1 text-[0.65rem] uppercase tracking-wide text-red-100",children:"Cancel"}),h.jsx("button",{type:"button",onClick:()=>d(S.id),className:`rounded px-2 py-1 text-[0.65rem] uppercase tracking-wide ${M?"bg-emerald-500 text-emerald-950":"bg-slate-700 text-slate-100"}`,children:M?"Press a key…":"Change"})]})]},S.id)})})]},p))})]})}const Tx=new Intl.NumberFormat(void 0,{maximumFractionDigits:2});function Ia({label:i,description:a,min:s,max:c,step:f,value:d,onChange:y}){return h.jsxs("label",{className:"block rounded border border-white/5 p-1",children:[h.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-300",children:[h.jsx("span",{className:"font-semibold text-slate-100",children:i}),h.jsx("span",{className:"font-mono text-slate-400",children:Tx.format(d)})]}),a&&h.jsx("p",{className:"text-[0.65rem] text-slate-500",children:a}),h.jsx("input",{type:"range",min:s,max:c,step:f,value:d,onChange:g=>y(Number(g.target.value)),className:"mt-1 w-full accent-emerald-400"})]})}function Cx(){const{value:i,save:a}=$l("inputs",jt),s=i.gamepad??jt.gamepad,c=i.mobile??jt.mobile,f=y=>{a(g=>({...g,gamepad:{...g.gamepad??jt.gamepad,...y}}))},d=y=>{a(g=>({...g,mobile:{...g.mobile??jt.mobile,...y}}))};return h.jsxs("section",{className:"rounded-sm bg-[#1d232b] p-1 text-sm text-slate-100",children:[h.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-400",children:"Input tuning"}),h.jsxs("div",{className:"mt-2 space-y-2",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-[0.7rem] uppercase tracking-wide text-slate-500",children:"Gamepad"}),h.jsxs("div",{className:"mt-1 space-y-1",children:[h.jsx(Ia,{label:"Drive deadzone",description:"Ignore small stick movements",min:0,max:.5,step:.01,value:s.driveDeadzone,onChange:y=>f({driveDeadzone:y})}),h.jsx(Ia,{label:"Camera deadzone",description:"Tilt stick sensitivity",min:0,max:.5,step:.01,value:s.cameraDeadzone,onChange:y=>f({cameraDeadzone:y})}),h.jsx(Ia,{label:"Servo step",description:"Degrees per camera tick",min:.5,max:6,step:.25,value:s.servoStep,onChange:y=>f({servoStep:y})})]})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-[0.7rem] uppercase tracking-wide text-slate-500",children:"Mobile joystick"}),h.jsxs("div",{className:"mt-1 space-y-1",children:[h.jsx(Ia,{label:"Joystick radius",description:"Drag distance needed for full speed",min:50,max:140,step:5,value:c.joystickRadius,onChange:y=>d({joystickRadius:y})}),h.jsx(Ia,{label:"Smoothing",description:"Lower values feel more direct",min:0,max:.6,step:.02,value:c.joystickSmoothing,onChange:y=>d({joystickSmoothing:y})})]})]})]})]})}function Nx(){const[i,a]=b.useState(!1);return b.useEffect(()=>{function s(){const f=navigator.getGamepads?.();a(!!(f&&Array.from(f).some(Boolean)))}s(),window.addEventListener("gamepadconnected",s),window.addEventListener("gamepaddisconnected",s);const c=setInterval(s,2e3);return()=>{window.removeEventListener("gamepadconnected",s),window.removeEventListener("gamepaddisconnected",s),clearInterval(c)}},[]),i}const Rx=[{id:"driveHorizontal",label:"Drive horizontal",type:"axis",section:"Drive stick",path:["drive","horizontal"]},{id:"driveVertical",label:"Drive vertical",type:"axis",section:"Drive stick",path:["drive","vertical"]},{id:"cameraVertical",label:"Camera vertical",type:"axis",section:"Camera stick",path:["camera","vertical"]},{id:"mainTrigger",label:"Main brush trigger",type:"button",section:"Brush triggers",path:["triggers","main"]},{id:"mainReverse",label:"Main reverse button",type:"button",section:"Brush triggers",path:["buttons","mainReverse"]},{id:"sideTrigger",label:"Side brush trigger",type:"button",section:"Brush triggers",path:["triggers","side"]},{id:"sideReverse",label:"Side reverse button",type:"button",section:"Brush triggers",path:["buttons","sideReverse"]},{id:"vacuum",label:"Vacuum button",type:"button",section:"Auxiliary buttons",path:["buttons","vacuum"]},{id:"allAux",label:"All aux forward button",type:"button",section:"Auxiliary buttons",path:["buttons","allAux"]},{id:"driveMacro",label:"Drive macro button",type:"button",section:"Mode buttons",path:["buttons","driveMacro"]},{id:"dockMacro",label:"Dock macro button",type:"button",section:"Mode buttons",path:["buttons","dockMacro"]}];function Mx(i){return i?`Axis ${i.index}${i.invert?" (invert)":""}`:"Unassigned"}function jx(i){return i?`Button ${i.index}`:"Unassigned"}function Nc(i,a,s){const[c,f]=a,d={...i??ku};return d[c]={...d[c]??ku[c]},d[c][f]=s(d[c][f]),d}function Ox(){const i=Nx(),{value:a,save:s,reset:c}=$l("gamepadMapping",ku),[f,d]=b.useState(null);b.useEffect(()=>{if(!f)return;let v;const S=()=>{const _=navigator.getGamepads?.(),M=_&&Array.from(_).find(Boolean);if(M){if(f.type==="axis")for(let C=0;C<M.axes.length;C+=1){const z=M.axes[C];if(Math.abs(z)>.55){s(H=>Nc(H,f.path,()=>({index:C,invert:z<0}))),d(null);return}}else if(f.type==="button")for(let C=0;C<M.buttons.length;C+=1){const z=M.buttons[C];if(z&&(z.pressed||z.value>.6)){s(H=>Nc(H,f.path,()=>({index:C}))),d(null);return}}}v=requestAnimationFrame(S)};return v=requestAnimationFrame(S),()=>{v&&cancelAnimationFrame(v)}},[f,s]);const y=b.useMemo(()=>Rx.reduce((v,S)=>((v[S.section]||(v[S.section]=[])).push(S),v),{}),[]),g=v=>{const[S,_]=v.path,M=a?.[S]?.[_]??null;return v.type==="axis"?Mx(M):jx(M)},p=v=>{s(S=>Nc(S,v.path,()=>null))};return h.jsxs("section",{className:"rounded-sm bg-[#1d232b] p-1 text-sm text-slate-100",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-400",children:"Gamepad mapping"}),h.jsx("p",{className:"text-[0.65rem] text-slate-500",children:i?"Press buttons or move sticks when prompted.":"Connect a controller to configure."}),f&&h.jsxs("p",{className:"mt-1 text-[0.7rem] text-emerald-400",children:["Capturing ",f.label,"…"]})]}),h.jsx("button",{type:"button",onClick:()=>c(),className:"rounded-sm bg-black/40 px-2 py-1 text-xs uppercase tracking-wide text-slate-200 hover:bg-black/60",children:"Clear all"})]}),h.jsx("div",{className:"mt-2 space-y-2",children:Object.entries(y).map(([v,S])=>h.jsxs("div",{className:"rounded border border-white/5 p-1",children:[h.jsx("p",{className:"text-[0.7rem] uppercase tracking-wide text-slate-500",children:v}),h.jsx("div",{className:"mt-1 space-y-1",children:S.map(_=>h.jsxs("div",{className:"flex items-center justify-between rounded bg-black/30 px-1 py-1 text-xs",children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-semibold text-slate-100",children:_.label}),h.jsx("p",{className:"text-[0.65rem] text-slate-400",children:g(_)})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{type:"button",onClick:()=>p(_),className:"rounded bg-slate-800 px-2 py-1 text-[0.65rem] uppercase tracking-wide",children:"Clear"}),h.jsx("button",{type:"button",onClick:()=>d(_),className:`rounded px-2 py-1 text-[0.65rem] uppercase tracking-wide ${f?.id===_.id?"bg-emerald-500 text-emerald-950":"bg-slate-700 text-slate-100"}`,children:f?.id===_.id?"Waiting…":"Capture"})]})]},_.id))})]},v))})]})}const wx=[{key:"start",label:"Start OI"},{key:"safe",label:"Safe"},{key:"full",label:"Full"},{key:"passive",label:"Passive"},{key:"dock",label:"Dock"}];function Dx(){const{state:{roverId:i},actions:{sendOiCommand:a,setSensorStream:s}}=pn(),c=!!i,f=b.useMemo(()=>[{key:"start",label:"Enable stream",enable:!0},{key:"stop",label:"Disable stream",enable:!1}],[]),d=y=>{i&&s(y)};return h.jsxs("div",{className:"space-y-1",children:[h.jsx(_x,{}),h.jsx(Cx,{}),h.jsx(Ox,{}),h.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[h.jsx("p",{className:"text-xs text-slate-400",children:"Manual OI commands"}),h.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:wx.map(y=>h.jsx("button",{type:"button",onClick:()=>a(y.key),disabled:!c,className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-30",children:y.label},y.key))})]}),h.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[h.jsx("p",{className:"text-xs text-slate-400",children:"Sensor stream"}),h.jsx("div",{className:"mt-1 flex gap-1",children:f.map(y=>h.jsx("button",{type:"button",onClick:()=>d(y.enable),disabled:!c,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-30",children:y.label},y.key))}),!c&&h.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Assign a rover to toggle streams."})]}),h.jsx(Qu,{}),h.jsx(eo,{})]})}function zx({layout:i}){const a={desktop:["Use WASD + Shift to drive. Video must stay focused.","Macros on the left prep the rover before moving.","Switch tabs on the right for telemetry, room, and advanced tools."],"mobile-portrait":["Keep joystick centered when not driving.","Auxiliary buttons sit beside the joystick – use them carefully.","Scroll to access drive/telemetry if screen space is limited."],"mobile-landscape":["Joystick and video are side by side for game-style control.","Rotate back to portrait if you need admin controls quickly.","Tabs are desktop-only; mobile shows sections stacked."]},s=a[i]||a.desktop;return h.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[h.jsx("p",{className:"text-sm text-slate-400",children:"Help"}),h.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:s.map(c=>h.jsx("li",{className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200",children:c},c))})]})}function Mu({active:i,onClick:a,children:s}){return h.jsx("button",{type:"button",onClick:a,className:`flex-1 rounded-sm px-1 py-1 text-xs font-semibold ${i?"bg-slate-100 text-slate-900":"bg-black/30 text-slate-300"}`,children:s})}function Bx(){return h.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[h.jsx("p",{className:"text-xs text-slate-400",children:"Room controls"}),h.jsx("p",{className:"text-sm text-slate-200",children:"Coming soon: lighting, docks, and environmental toggles."})]})}function Ux({layout:i}){const[a,s]=b.useState("telemetry");return h.jsxs("section",{className:"rounded-sm bg-[#1a1d23] p-1 text-base text-slate-100",children:[h.jsxs("div",{className:"flex gap-1",children:[h.jsx(Mu,{active:a==="telemetry",onClick:()=>s("telemetry"),children:"Rover Controls"}),h.jsx(Mu,{active:a==="room",onClick:()=>s("room"),children:"Room Controls"}),h.jsx(Mu,{active:a==="advanced",onClick:()=>s("advanced"),children:"Settings"}),h.jsx(Mu,{active:a==="help",onClick:()=>s("help"),children:"Help"})]}),h.jsxs("div",{className:"mt-1 space-y-1",children:[a==="telemetry"&&h.jsxs("div",{className:"space-y-1",children:[h.jsx(Pc,{}),h.jsx(xx,{}),h.jsx(Ic,{})]}),a==="room"&&h.jsxs("div",{className:"space-y-1",children:[h.jsx(to,{}),h.jsx(Bx,{})]}),a==="advanced"&&h.jsx(Dx,{}),a==="help"&&h.jsx(zx,{layout:i})]})]})}const Lx=new Set(["admin","lockdown","lockdown-admin"]),kx=new Set(["admin","lockdown"]);function Hx(i="admin"){return i==="lockdown"?{title:"Lockdown in effect",description:"Only the lockdown admin can remain connected right now. If you have credentials, log in below. Otherwise please stand by until the server re-opens."}:{title:"Admin mode active",description:"The server is temporarily restricted to administrators. Log in below if you are authorized, or wait for admin mode to end."}}function qx(){const{session:i}=Ut(),a=i?.mode,s=i?.role,c=kx.has(a),f=Lx.has(s);if(!c||f)return null;const d=Hx(a);return h.jsx("div",{className:"pointer-events-auto fixed inset-0 z-50 flex items-center justify-center bg-black/85 px-2 py-2",children:h.jsxs("div",{className:"w-full max-w-md space-y-2 rounded-lg bg-[#141821] p-2 text-slate-100 shadow-2xl",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("p",{className:"text-lg font-semibold",children:d.title}),h.jsx("p",{className:"text-sm text-slate-300",children:d.description})]}),h.jsx("div",{className:"rounded-md bg-black/40 p-1",children:h.jsx(Qu,{})}),h.jsx("p",{className:"text-xs text-slate-500",children:"Your controls are paused until access is granted. You will automatically regain the interface once the mode changes or after a successful login."})]})})}function Yx(){const{session:i}=Ut(),a=b.useMemo(()=>JSON.stringify(i??{},null,2),[i]);return h.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-xs text-slate-100",children:[h.jsx("p",{className:"text-sm text-slate-400",children:"Session snapshot"}),h.jsx("pre",{className:"mt-1 h-64 overflow-y-auto bg-black/40 p-1 text-[0.7rem] text-lime-300",children:a})]})}function Vx(){const[i,a]=b.useState(()=>typeof window>"u"||window.innerWidth>=1024?"desktop":window.innerWidth>window.innerHeight?"mobile-landscape":"mobile-portrait");return b.useEffect(()=>{function s(){if(typeof window>"u")return;const{innerWidth:c,innerHeight:f}=window;c>=1024?a("desktop"):c>f?a("mobile-landscape"):a("mobile-portrait")}return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),i}function Gx({layout:i}){return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("section",{className:"grid grid-cols-[minmax(0,1.8fr)_minmax(0,1fr)] gap-1",children:[h.jsx(lo,{}),h.jsx(Ux,{layout:i})]}),h.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[h.jsx(no,{}),h.jsx(Yx,{})]})]})}function Xx(){return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx(lo,{}),h.jsx(cx,{}),h.jsx(Pc,{}),h.jsx(Ic,{}),h.jsx(Qu,{}),h.jsx(eo,{}),h.jsx(to,{}),h.jsx(no,{})]})}function Qx(){return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("section",{className:"grid min-h-screen grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-1",children:[h.jsx(sx,{}),h.jsx(lo,{}),h.jsx(rx,{})]}),h.jsxs("div",{className:"flex flex-col gap-1 pb-2",children:[h.jsx(to,{}),h.jsx(Pc,{}),h.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx(Qu,{}),h.jsx(eo,{})]}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx(no,{}),h.jsx(Ic,{})]})]})]})]})}function Zx(){const i=Vx(),a=i==="desktop"?h.jsx(Gx,{layout:i}):i==="mobile-landscape"?h.jsx(Qx,{}):h.jsx(Xx,{});return h.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:h.jsx(Gb,{children:h.jsxs(Zb,{children:[h.jsx(Wb,{}),h.jsx(Ib,{}),h.jsx("main",{className:"flex w-full flex-col gap-1 text-base",children:a}),h.jsx(tx,{}),h.jsx(qx,{})]})})})}function Kx(){const{session:i,setRole:a,subscribeAll:s}=Ut(),[c,f]=b.useState(!1);return b.useEffect(()=>{let d=!1;async function y(){try{i?.role!=="spectator"&&await a("spectator"),await s(),d||f(!0)}catch(g){console.error("Failed to enter spectator mode",g)}}return y(),()=>{d=!0}},[i?.role,a,s]),c}function Jx({connected:i,ready:a,rosterCount:s}){return h.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[h.jsx("span",{className:`rounded-full px-3 py-1 font-semibold ${i?"bg-emerald-500/20 text-emerald-200":"bg-red-500/20 text-red-200"}`,children:i?"Connected":"Disconnected"}),h.jsxs("span",{className:`rounded-full px-3 py-1 ${a?"bg-blue-600/40 text-blue-100":"bg-slate-700 text-slate-200"}`,children:["Spectator mode ",a?"active":"pending…"]}),h.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",s]})]})}function $x({logs:i}){return h.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[h.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[h.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),h.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",i.length]})]}),h.jsx("div",{className:"h-60 overflow-y-auto rounded-2xl bg-slate-950/40 p-3 text-xs font-mono text-slate-300",children:i.length===0?h.jsx("p",{children:"No log entries yet."}):i.slice().reverse().map(a=>h.jsxs("div",{className:"mb-2",children:[h.jsx("span",{className:"text-slate-500",children:a.timestamp})," ",h.jsxs("span",{className:"text-cyan-300",children:["[",a.level,"]"]})," ",a.label&&h.jsxs("span",{className:"text-pink-300",children:["[",a.label,"]"]})," ",h.jsx("span",{children:a.message})]},a.id))})]})}function Fx(i={}){return Object.entries(i).map(([a,s])=>({key:a,value:typeof s=="object"?JSON.stringify(s):s}))}function Wx({rover:i,frame:a,videoInfo:s}){const c=Fx(a?.sensors);return h.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[h.jsxs("header",{className:"flex flex-col gap-1",children:[h.jsx("h3",{className:"text-2xl font-semibold text-white",children:i.name}),h.jsx("p",{className:"text-sm text-slate-400",children:a?.receivedAt?`Updated ${new Date(a.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),h.jsx(Rp,{sessionInfo:s,label:i.name,forceMute:!0}),h.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[h.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),c.length===0?h.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):h.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:c.map(({key:f,value:d})=>h.jsxs("div",{className:"flex justify-between gap-4",children:[h.jsx("dt",{className:"text-slate-500",children:f}),h.jsx("dd",{className:"text-right font-semibold text-white",children:d})]},f))})]})]})}function Ix(){const{connected:i,session:a,logs:s}=Ut(),c=Kx(),f=bp(),d=a?.roster??[],y=Np(d.map(p=>p.id)),g=b.useMemo(()=>({connected:i,ready:c,rosterCount:d.length}),[i,c,d.length]);return h.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:h.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[h.jsxs("header",{className:"space-y-3",children:[h.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),h.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),h.jsx(Jx,{...g})]}),h.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:d.length===0?h.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):d.map(p=>h.jsx(Wx,{rover:p,frame:f[p.id],videoInfo:y[p.id]},p.id))}),h.jsx($x,{logs:s})]})})}sv.createRoot(document.getElementById("root")).render(h.jsx(b.StrictMode,{children:h.jsx(Tb,{children:h.jsx(Nb,{children:h.jsx(Rb,{children:h.jsx(Eg,{children:h.jsxs(Pv,{children:[h.jsx(Mc,{path:"/",element:h.jsx(Zx,{})}),h.jsx(Mc,{path:"/spectate",element:h.jsx(Ix,{})})]})})})})})}));
|