Files
MultiRoombaRover/server/public/assets/index-Cpx-3dPK.js
T
2025-11-20 15:28:34 -05:00

12 lines
333 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))c(o);new MutationObserver(o=>{for(const d of o)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(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(o){if(o.ep)return;o.ep=!0;const d=s(o);fetch(o.href,d)}})();var dc={exports:{}},Ka={};var dm;function cv(){if(dm)return Ka;dm=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(c,o,d){var y=null;if(d!==void 0&&(y=""+d),o.key!==void 0&&(y=""+o.key),"key"in o){d={};for(var g in o)g!=="key"&&(d[g]=o[g])}else d=o;return o=d.ref,{$$typeof:i,type:c,key:y,ref:o!==void 0?o:null,props:d}}return Ka.Fragment=a,Ka.jsx=s,Ka.jsxs=s,Ka}var hm;function ov(){return hm||(hm=1,dc.exports=cv()),dc.exports}var h=ov(),hc={exports:{}},ae={};var mm;function fv(){if(mm)return ae;mm=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),o=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"),A=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),M=Symbol.iterator;function C(E){return E===null||typeof E!="object"?null:(E=M&&E[M]||E["@@iterator"],typeof E=="function"?E:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,L={};function V(E,k,K){this.props=E,this.context=k,this.refs=L,this.updater=K||O}V.prototype.isReactComponent={},V.prototype.setState=function(E,k){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,k,"setState")},V.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function G(){}G.prototype=V.prototype;function q(E,k,K){this.props=E,this.context=k,this.refs=L,this.updater=K||O}var F=q.prototype=new G;F.constructor=q,B(F,V.prototype),F.isPureReactComponent=!0;var Y=Array.isArray;function Q(){}var X={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function ee(E,k,K){var W=K.ref;return{$$typeof:i,type:E,key:k,ref:W!==void 0?W:null,props:K}}function J(E,k){return ee(E.type,k,E.props)}function le(E){return typeof E=="object"&&E!==null&&E.$$typeof===i}function we(E){var k={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(K){return k[K]})}var Xe=/\/+/g;function Ke(E,k){return typeof E=="object"&&E!==null&&E.key!=null?we(""+E.key):k.toString(36)}function Pe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(Q,Q):(E.status="pending",E.then(function(k){E.status==="pending"&&(E.status="fulfilled",E.value=k)},function(k){E.status==="pending"&&(E.status="rejected",E.reason=k)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function D(E,k,K,W,ue){var ce=typeof E;(ce==="undefined"||ce==="boolean")&&(E=null);var xe=!1;if(E===null)xe=!0;else switch(ce){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(E.$$typeof){case i:case a:xe=!0;break;case A:return xe=E._init,D(xe(E._payload),k,K,W,ue)}}if(xe)return ue=ue(E),xe=W===""?"."+Ke(E,0):W,Y(ue)?(K="",xe!=null&&(K=xe.replace(Xe,"$&/")+"/"),D(ue,k,K,"",function(ea){return ea})):ue!=null&&(le(ue)&&(ue=J(ue,K+(ue.key==null||E&&E.key===ue.key?"":(""+ue.key).replace(Xe,"$&/")+"/")+xe)),k.push(ue)),1;xe=0;var tt=W===""?".":W+":";if(Y(E))for(var Be=0;Be<E.length;Be++)W=E[Be],ce=tt+Ke(W,Be),xe+=D(W,k,K,ce,ue);else if(Be=C(E),typeof Be=="function")for(E=Be.call(E),Be=0;!(W=E.next()).done;)W=W.value,ce=tt+Ke(W,Be++),xe+=D(W,k,K,ce,ue);else if(ce==="object"){if(typeof E.then=="function")return D(Pe(E),k,K,W,ue);throw k=String(E),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Z(E,k,K){if(E==null)return E;var W=[],ue=0;return D(E,W,"","",function(ce){return k.call(K,ce,ue++)}),W}function te(E){if(E._status===-1){var k=E._result;k=k(),k.then(function(K){(E._status===0||E._status===-1)&&(E._status=1,E._result=K)},function(K){(E._status===0||E._status===-1)&&(E._status=2,E._result=K)}),E._status===-1&&(E._status=0,E._result=k)}if(E._status===1)return E._result.default;throw E._result}var be=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=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(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},Se={map:Z,forEach:function(E,k,K){Z(E,function(){k.apply(this,arguments)},K)},count:function(E){var k=0;return Z(E,function(){k++}),k},toArray:function(E){return Z(E,function(k){return k})||[]},only:function(E){if(!le(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return ae.Activity=T,ae.Children=Se,ae.Component=V,ae.Fragment=s,ae.Profiler=o,ae.PureComponent=q,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(E){return X.H.useMemoCache(E)}},ae.cache=function(E){return function(){return E.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(E,k,K){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var W=B({},E.props),ue=E.key;if(k!=null)for(ce in k.key!==void 0&&(ue=""+k.key),k)!ie.call(k,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&k.ref===void 0||(W[ce]=k[ce]);var ce=arguments.length-2;if(ce===1)W.children=K;else if(1<ce){for(var xe=Array(ce),tt=0;tt<ce;tt++)xe[tt]=arguments[tt+2];W.children=xe}return ee(E.type,ue,W)},ae.createContext=function(E){return E={$$typeof:y,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:d,_context:E},E},ae.createElement=function(E,k,K){var W,ue={},ce=null;if(k!=null)for(W in k.key!==void 0&&(ce=""+k.key),k)ie.call(k,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ue[W]=k[W]);var xe=arguments.length-2;if(xe===1)ue.children=K;else if(1<xe){for(var tt=Array(xe),Be=0;Be<xe;Be++)tt[Be]=arguments[Be+2];ue.children=tt}if(E&&E.defaultProps)for(W in xe=E.defaultProps,xe)ue[W]===void 0&&(ue[W]=xe[W]);return ee(E,ce,ue)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(E){return{$$typeof:g,render:E}},ae.isValidElement=le,ae.lazy=function(E){return{$$typeof:A,_payload:{_status:-1,_result:E},_init:te}},ae.memo=function(E,k){return{$$typeof:v,type:E,compare:k===void 0?null:k}},ae.startTransition=function(E){var k=X.T,K={};X.T=K;try{var W=E(),ue=X.S;ue!==null&&ue(K,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(Q,be)}catch(ce){be(ce)}finally{k!==null&&K.types!==null&&(k.types=K.types),X.T=k}},ae.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ae.use=function(E){return X.H.use(E)},ae.useActionState=function(E,k,K){return X.H.useActionState(E,k,K)},ae.useCallback=function(E,k){return X.H.useCallback(E,k)},ae.useContext=function(E){return X.H.useContext(E)},ae.useDebugValue=function(){},ae.useDeferredValue=function(E,k){return X.H.useDeferredValue(E,k)},ae.useEffect=function(E,k){return X.H.useEffect(E,k)},ae.useEffectEvent=function(E){return X.H.useEffectEvent(E)},ae.useId=function(){return X.H.useId()},ae.useImperativeHandle=function(E,k,K){return X.H.useImperativeHandle(E,k,K)},ae.useInsertionEffect=function(E,k){return X.H.useInsertionEffect(E,k)},ae.useLayoutEffect=function(E,k){return X.H.useLayoutEffect(E,k)},ae.useMemo=function(E,k){return X.H.useMemo(E,k)},ae.useOptimistic=function(E,k){return X.H.useOptimistic(E,k)},ae.useReducer=function(E,k,K){return X.H.useReducer(E,k,K)},ae.useRef=function(E){return X.H.useRef(E)},ae.useState=function(E){return X.H.useState(E)},ae.useSyncExternalStore=function(E,k,K){return X.H.useSyncExternalStore(E,k,K)},ae.useTransition=function(){return X.H.useTransition()},ae.version="19.2.0",ae}var pm;function Vc(){return pm||(pm=1,hc.exports=fv()),hc.exports}var b=Vc(),mc={exports:{}},Ja={},pc={exports:{}},yc={};var ym;function dv(){return ym||(ym=1,(function(i){function a(D,Z){var te=D.length;D.push(Z);e:for(;0<te;){var be=te-1>>>1,Se=D[be];if(0<o(Se,Z))D[be]=Z,D[te]=Se,te=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],te=D.pop();if(te!==Z){D[0]=te;e:for(var be=0,Se=D.length,E=Se>>>1;be<E;){var k=2*(be+1)-1,K=D[k],W=k+1,ue=D[W];if(0>o(K,te))W<Se&&0>o(ue,K)?(D[be]=ue,D[W]=te,be=W):(D[be]=K,D[k]=te,be=k);else if(W<Se&&0>o(ue,te))D[be]=ue,D[W]=te,be=W;else break e}}return Z}function o(D,Z){var te=D.sortIndex-Z.sortIndex;return te!==0?te: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=[],A=1,T=null,M=3,C=!1,O=!1,B=!1,L=!1,V=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function F(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 Y(D){if(B=!1,F(D),!O)if(s(p)!==null)O=!0,Q||(Q=!0,we());else{var Z=s(v);Z!==null&&Pe(Y,Z.startTime-D)}}var Q=!1,X=-1,ie=5,ee=-1;function J(){return L?!0:!(i.unstable_now()-ee<ie)}function le(){if(L=!1,Q){var D=i.unstable_now();ee=D;var Z=!0;try{e:{O=!1,B&&(B=!1,G(X),X=-1),C=!0;var te=M;try{t:{for(F(D),T=s(p);T!==null&&!(T.expirationTime>D&&J());){var be=T.callback;if(typeof be=="function"){T.callback=null,M=T.priorityLevel;var Se=be(T.expirationTime<=D);if(D=i.unstable_now(),typeof Se=="function"){T.callback=Se,F(D),Z=!0;break t}T===s(p)&&c(p),F(D)}else c(p);T=s(p)}if(T!==null)Z=!0;else{var E=s(v);E!==null&&Pe(Y,E.startTime-D),Z=!1}}break e}finally{T=null,M=te,C=!1}Z=void 0}}finally{Z?we():Q=!1}}}var we;if(typeof q=="function")we=function(){q(le)};else if(typeof MessageChannel<"u"){var Xe=new MessageChannel,Ke=Xe.port2;Xe.port1.onmessage=le,we=function(){Ke.postMessage(null)}}else we=function(){V(le,0)};function Pe(D,Z){X=V(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"):ie=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 te=M;M=Z;try{return D()}finally{M=te}},i.unstable_requestPaint=function(){L=!0},i.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var te=M;M=D;try{return Z()}finally{M=te}},i.unstable_scheduleCallback=function(D,Z,te){var be=i.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?be+te:be):te=be,D){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=te+Se,D={id:A++,callback:Z,priorityLevel:D,startTime:te,expirationTime:Se,sortIndex:-1},te>be?(D.sortIndex=te,a(v,D),s(p)===null&&D===s(v)&&(B?(G(X),X=-1):B=!0,Pe(Y,te-be))):(D.sortIndex=Se,a(p,D),O||C||(O=!0,Q||(Q=!0,we()))),D},i.unstable_shouldYield=J,i.unstable_wrapCallback=function(D){var Z=M;return function(){var te=M;M=Z;try{return D.apply(this,arguments)}finally{M=te}}}})(yc)),yc}var vm;function hv(){return vm||(vm=1,pc.exports=dv()),pc.exports}var vc={exports:{}},et={};var gm;function mv(){if(gm)return et;gm=1;var i=Vc();function a(p){var v="https://react.dev/errors/"+p;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)v+="&args[]="+encodeURIComponent(arguments[A])}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},o=Symbol.for("react.portal");function d(p,v,A){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:T==null?null:""+T,children:p,containerInfo:v,implementation:A}}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 et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,et.createPortal=function(p,v){var A=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,A)},et.flushSync=function(p){var v=y.T,A=c.p;try{if(y.T=null,c.p=2,p)return p()}finally{y.T=v,c.p=A,c.d.f()}},et.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))},et.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},et.preinit=function(p,v){if(typeof p=="string"&&v&&typeof v.as=="string"){var A=v.as,T=g(A,v.crossOrigin),M=typeof v.integrity=="string"?v.integrity:void 0,C=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;A==="style"?c.d.S(p,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:T,integrity:M,fetchPriority:C}):A==="script"&&c.d.X(p,{crossOrigin:T,integrity:M,fetchPriority:C,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},et.preinitModule=function(p,v){if(typeof p=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var A=g(v.as,v.crossOrigin);c.d.M(p,{crossOrigin:A,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)},et.preload=function(p,v){if(typeof p=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var A=v.as,T=g(A,v.crossOrigin);c.d.L(p,A,{crossOrigin:T,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})}},et.preloadModule=function(p,v){if(typeof p=="string")if(v){var A=g(v.as,v.crossOrigin);c.d.m(p,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:A,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else c.d.m(p)},et.requestFormReset=function(p){c.d.r(p)},et.unstable_batchedUpdates=function(p,v){return p(v)},et.useFormState=function(p,v,A){return y.H.useFormState(p,v,A)},et.useFormStatus=function(){return y.H.useHostTransitionStatus()},et.version="19.2.0",et}var bm;function pv(){if(bm)return vc.exports;bm=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(),vc.exports=mv(),vc.exports}var xm;function yv(){if(xm)return Ja;xm=1;var i=hv(),a=Vc(),s=pv();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 o(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 f=!1,m=u.child;m;){if(m===n){f=!0,n=u,l=r;break}if(m===l){f=!0,l=u,n=r;break}m=m.sibling}if(!f){for(m=r.child;m;){if(m===n){f=!0,n=r,l=u;break}if(m===l){f=!0,l=r,n=u;break}m=m.sibling}if(!f)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 A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,M=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),q=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function we(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var Xe=Symbol.for("react.client.reference");function Ke(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case V:return"Profiler";case L:return"StrictMode";case Y:return"Suspense";case Q:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case q:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case F: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:Ke(e.type)||"Memo";case ie:t=e._payload,e=e._init;try{return Ke(e(t))}catch{}}return null}var Pe=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,te={pending:!1,data:null,method:null,action:null},be=[],Se=-1;function E(e){return{current:e}}function k(e){0>Se||(e.current=be[Se],be[Se]=null,Se--)}function K(e,t){Se++,be[Se]=e.current,e.current=t}var W=E(null),ue=E(null),ce=E(null),xe=E(null);function tt(e,t){switch(K(ce,t),K(ue,e),K(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Bh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Bh(t),e=Uh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}k(W),K(W,e)}function Be(){k(W),k(ue),k(ce)}function ea(e){e.memoizedState!==null&&K(xe,e);var t=W.current,n=Uh(t,e.type);t!==n&&(K(ue,e),K(W,n))}function ui(e){ue.current===e&&(k(W),k(ue)),xe.current===e&&(k(xe),Ga._currentValue=te)}var Ju,co;function Yn(e){if(Ju===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ju=t&&t[1]||"",co=-1<n.stack.indexOf(`
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ju+e+co}var $u=!1;function Fu(e,t){if(!e||$u)return"";$u=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(w){var j=w}Reflect.construct(e,[],H)}else{try{H.call()}catch(w){j=w}e.call(H.prototype)}}else{try{throw Error()}catch(w){j=w}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(w){if(w&&j&&typeof w.stack=="string")return[w.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(),f=r[0],m=r[1];if(f&&m){var x=f.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 z=`
`+x[l].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=l&&0<=u);break}}}finally{$u=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yn(n):""}function qp(e,t){switch(e.tag){case 26:case 27:case 5:return Yn(e.type);case 16:return Yn("Lazy");case 13:return e.child!==t&&t!==null?Yn("Suspense Fallback"):Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 15:return Fu(e.type,!1);case 11:return Fu(e.type.render,!1);case 1:return Fu(e.type,!0);case 31:return Yn("Activity");default:return""}}function oo(e){try{var t="",n=null;do t+=qp(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
Error generating stack: `+l.message+`
`+l.stack}}var Wu=Object.prototype.hasOwnProperty,Iu=i.unstable_scheduleCallback,Pu=i.unstable_cancelCallback,Yp=i.unstable_shouldYield,Vp=i.unstable_requestPaint,ft=i.unstable_now,Gp=i.unstable_getCurrentPriorityLevel,fo=i.unstable_ImmediatePriority,ho=i.unstable_UserBlockingPriority,si=i.unstable_NormalPriority,Xp=i.unstable_LowPriority,mo=i.unstable_IdlePriority,Qp=i.log,Zp=i.unstable_setDisableYieldValue,ta=null,dt=null;function pn(e){if(typeof Qp=="function"&&Zp(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(ta,e)}catch{}}var ht=Math.clz32?Math.clz32:$p,Kp=Math.log,Jp=Math.LN2;function $p(e){return e>>>=0,e===0?32:31-(Kp(e)/Jp|0)|0}var ri=256,ci=262144,oi=4194304;function Vn(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 fi(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var u=0,r=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~r,l!==0?u=Vn(l):(f&=m,f!==0?u=Vn(f):n||(n=m&~e,n!==0&&(u=Vn(n))))):(m=l&~r,m!==0?u=Vn(m):f!==0?u=Vn(f):n||(n=l&~e,n!==0&&(u=Vn(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 na(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fp(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 po(){var e=oi;return oi<<=1,(oi&62914560)===0&&(oi=4194304),e}function es(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function la(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wp(e,t,n,l,u,r){var f=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=f&~n;0<n;){var z=31-ht(n),H=1<<z;m[z]=0,x[z]=-1;var j=R[z];if(j!==null)for(R[z]=null,z=0;z<j.length;z++){var w=j[z];w!==null&&(w.lane&=-536870913)}n&=~H}l!==0&&yo(e,l,0),r!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=r&~(f&~t))}function yo(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ht(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function vo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-ht(n),u=1<<l;u&t|e[l]&t&&(e[l]|=t),n&=~u}}function go(e,t){var n=t&-t;return n=(n&42)!==0?1:ts(n),(n&(e.suspendedLanes|t))!==0?0:n}function ts(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 ns(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function bo(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:im(e.type))}function xo(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var yn=Math.random().toString(36).slice(2),Je="__reactFiber$"+yn,at="__reactProps$"+yn,dl="__reactContainer$"+yn,ls="__reactEvents$"+yn,Ip="__reactListeners$"+yn,Pp="__reactHandles$"+yn,So="__reactResources$"+yn,aa="__reactMarker$"+yn;function as(e){delete e[Je],delete e[at],delete e[ls],delete e[Ip],delete e[Pp]}function hl(e){var t=e[Je];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dl]||n[Je]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Gh(e);e!==null;){if(n=e[Je])return n;e=Gh(e)}return t}e=n,n=e.parentNode}return null}function ml(e){if(e=e[Je]||e[dl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ia(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function pl(e){var t=e[So];return t||(t=e[So]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Qe(e){e[aa]=!0}var Eo=new Set,Ao={};function Gn(e,t){yl(e,t),yl(e+"Capture",t)}function yl(e,t){for(Ao[e]=t,e=0;e<t.length;e++)Eo.add(t[e])}var ey=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]*$"),To={},_o={};function ty(e){return Wu.call(_o,e)?!0:Wu.call(To,e)?!1:ey.test(e)?_o[e]=!0:(To[e]=!0,!1)}function di(e,t,n){if(ty(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 hi(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 Qt(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 St(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Co(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ny(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(f){n=""+f,r.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(f){n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function is(e){if(!e._valueTracker){var t=Co(e)?"checked":"value";e._valueTracker=ny(e,t,""+e[t])}}function No(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Co(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function mi(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 ly=/[\n"\\]/g;function Et(e){return e.replace(ly,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function us(e,t,n,l,u,r,f,m){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+St(t)):e.value!==""+St(t)&&(e.value=""+St(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?ss(e,f,St(t)):n!=null?ss(e,f,St(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=""+St(m):e.removeAttribute("name")}function Ro(e,t,n,l,u,r,f,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)){is(e);return}n=n!=null?""+St(n):"",t=t!=null?""+St(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,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),is(e)}function ss(e,t,n){t==="number"&&mi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function vl(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=""+St(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 Mo(e,t,n){if(t!=null&&(t=""+St(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+St(n):""}function jo(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(c(92));if(Pe(l)){if(1<l.length)throw Error(c(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=St(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),is(e)}function gl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ay=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 Oo(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||ay.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function wo(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&&Oo(e,u,l)}else for(var r in t)t.hasOwnProperty(r)&&Oo(e,r,t[r])}function rs(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 iy=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"]]),uy=/^[\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 pi(e){return uy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var cs=null;function os(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bl=null,xl=null;function zo(e){var t=ml(e);if(t&&(e=t.stateNode)){var n=e[at]||null;e:switch(e=t.stateNode,t.type){case"input":if(us(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="'+Et(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var u=l[at]||null;if(!u)throw Error(c(90));us(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&&No(l)}break e;case"textarea":Mo(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&vl(e,!!n.multiple,t,!1)}}}var fs=!1;function Do(e,t,n){if(fs)return e(t,n);fs=!0;try{var l=e(t);return l}finally{if(fs=!1,(bl!==null||xl!==null)&&(nu(),bl&&(t=bl,e=xl,xl=bl=null,zo(t),e)))for(t=0;t<e.length;t++)zo(e[t])}}function ua(e,t){var n=e.stateNode;if(n===null)return null;var l=n[at]||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 Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ds=!1;if(Kt)try{var sa={};Object.defineProperty(sa,"passive",{get:function(){ds=!0}}),window.addEventListener("test",sa,sa),window.removeEventListener("test",sa,sa)}catch{ds=!1}var vn=null,hs=null,yi=null;function Bo(){if(yi)return yi;var e,t=hs,n=t.length,l,u="value"in vn?vn.value:vn.textContent,r=u.length;for(e=0;e<n&&t[e]===u[e];e++);var f=n-e;for(l=1;l<=f&&t[n-l]===u[r-l];l++);return yi=u.slice(e,1<l?1-l:void 0)}function vi(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 gi(){return!0}function Uo(){return!1}function it(e){function t(n,l,u,r,f){this._reactName=n,this._targetInst=u,this.type=l,this.nativeEvent=r,this.target=f,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)?gi:Uo,this.isPropagationStopped=Uo,this}return T(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=gi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=gi)},persist:function(){},isPersistent:gi}),t}var Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bi=it(Xn),ra=T({},Xn,{view:0,detail:0}),sy=it(ra),ms,ps,ca,xi=T({},ra,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vs,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!==ca&&(ca&&e.type==="mousemove"?(ms=e.screenX-ca.screenX,ps=e.screenY-ca.screenY):ps=ms=0,ca=e),ms)},movementY:function(e){return"movementY"in e?e.movementY:ps}}),Lo=it(xi),ry=T({},xi,{dataTransfer:0}),cy=it(ry),oy=T({},ra,{relatedTarget:0}),ys=it(oy),fy=T({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),dy=it(fy),hy=T({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),my=it(hy),py=T({},Xn,{data:0}),ko=it(py),yy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vy={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"},gy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function by(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gy[e])?!!t[e]:!1}function vs(){return by}var xy=T({},ra,{key:function(e){if(e.key){var t=yy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vs,charCode:function(e){return e.type==="keypress"?vi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Sy=it(xy),Ey=T({},xi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ho=it(Ey),Ay=T({},ra,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vs}),Ty=it(Ay),_y=T({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cy=it(_y),Ny=T({},xi,{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}),Ry=it(Ny),My=T({},Xn,{newState:0,oldState:0}),jy=it(My),Oy=[9,13,27,32],gs=Kt&&"CompositionEvent"in window,oa=null;Kt&&"documentMode"in document&&(oa=document.documentMode);var wy=Kt&&"TextEvent"in window&&!oa,qo=Kt&&(!gs||oa&&8<oa&&11>=oa),Yo=" ",Vo=!1;function Go(e,t){switch(e){case"keyup":return Oy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sl=!1;function zy(e,t){switch(e){case"compositionend":return Xo(t);case"keypress":return t.which!==32?null:(Vo=!0,Yo);case"textInput":return e=t.data,e===Yo&&Vo?null:e;default:return null}}function Dy(e,t){if(Sl)return e==="compositionend"||!gs&&Go(e,t)?(e=Bo(),yi=hs=vn=null,Sl=!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 qo&&t.locale!=="ko"?null:t.data;default:return null}}var By={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"?!!By[e.type]:t==="textarea"}function Zo(e,t,n,l){bl?xl?xl.push(l):xl=[l]:bl=l,t=cu(t,"onChange"),0<t.length&&(n=new bi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var fa=null,da=null;function Uy(e){Mh(e,0)}function Si(e){var t=ia(e);if(No(t))return e}function Ko(e,t){if(e==="change")return t}var Jo=!1;if(Kt){var bs;if(Kt){var xs="oninput"in document;if(!xs){var $o=document.createElement("div");$o.setAttribute("oninput","return;"),xs=typeof $o.oninput=="function"}bs=xs}else bs=!1;Jo=bs&&(!document.documentMode||9<document.documentMode)}function Fo(){fa&&(fa.detachEvent("onpropertychange",Wo),da=fa=null)}function Wo(e){if(e.propertyName==="value"&&Si(da)){var t=[];Zo(t,da,e,os(e)),Do(Uy,t)}}function Ly(e,t,n){e==="focusin"?(Fo(),fa=t,da=n,fa.attachEvent("onpropertychange",Wo)):e==="focusout"&&Fo()}function ky(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Si(da)}function Hy(e,t){if(e==="click")return Si(t)}function qy(e,t){if(e==="input"||e==="change")return Si(t)}function Yy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:Yy;function ha(e,t){if(mt(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(!Wu.call(t,u)||!mt(e[u],t[u]))return!1}return!0}function Io(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Po(e,t){var n=Io(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=Io(n)}}function ef(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ef(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=mi(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=mi(e.document)}return t}function Ss(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 Vy=Kt&&"documentMode"in document&&11>=document.documentMode,El=null,Es=null,ma=null,As=!1;function nf(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;As||El==null||El!==mi(l)||(l=El,"selectionStart"in l&&Ss(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}),ma&&ha(ma,l)||(ma=l,l=cu(Es,"onSelect"),0<l.length&&(t=new bi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=El)))}function Qn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Al={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionrun:Qn("Transition","TransitionRun"),transitionstart:Qn("Transition","TransitionStart"),transitioncancel:Qn("Transition","TransitionCancel"),transitionend:Qn("Transition","TransitionEnd")},Ts={},lf={};Kt&&(lf=document.createElement("div").style,"AnimationEvent"in window||(delete Al.animationend.animation,delete Al.animationiteration.animation,delete Al.animationstart.animation),"TransitionEvent"in window||delete Al.transitionend.transition);function Zn(e){if(Ts[e])return Ts[e];if(!Al[e])return e;var t=Al[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in lf)return Ts[e]=t[n];return e}var af=Zn("animationend"),uf=Zn("animationiteration"),sf=Zn("animationstart"),Gy=Zn("transitionrun"),Xy=Zn("transitionstart"),Qy=Zn("transitioncancel"),rf=Zn("transitionend"),cf=new Map,_s="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(" ");_s.push("scrollEnd");function zt(e,t){cf.set(e,t),Gn(t,[e])}var Ei=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)},At=[],Tl=0,Cs=0;function Ai(){for(var e=Tl,t=Cs=Tl=0;t<e;){var n=At[t];At[t++]=null;var l=At[t];At[t++]=null;var u=At[t];At[t++]=null;var r=At[t];if(At[t++]=null,l!==null&&u!==null){var f=l.pending;f===null?u.next=u:(u.next=f.next,f.next=u),l.pending=u}r!==0&&of(n,u,r)}}function Ti(e,t,n,l){At[Tl++]=e,At[Tl++]=t,At[Tl++]=n,At[Tl++]=l,Cs|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ns(e,t,n,l){return Ti(e,t,n,l),_i(e)}function Kn(e,t){return Ti(e,null,null,t),_i(e)}function of(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-ht(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<Ua)throw Ua=0,Ur=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _l={};function Zy(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 pt(e,t,n,l){return new Zy(e,t,n,l)}function Rs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jt(e,t){var n=e.alternate;return n===null?(n=pt(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 ff(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 Ci(e,t,n,l,u,r){var f=0;if(l=e,typeof e=="function")Rs(e)&&(f=1);else if(typeof e=="string")f=W0(e,n,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=pt(31,n,t,u),e.elementType=ee,e.lanes=r,e;case B:return Jn(n.children,u,r,t);case L:f=8,u|=24;break;case V:return e=pt(12,n,t,u|2),e.elementType=V,e.lanes=r,e;case Y:return e=pt(13,n,t,u),e.elementType=Y,e.lanes=r,e;case Q:return e=pt(19,n,t,u),e.elementType=Q,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:f=10;break e;case G:f=9;break e;case F:f=11;break e;case X:f=14;break e;case ie:f=16,l=null;break e}f=29,n=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=pt(f,n,t,u),t.elementType=e,t.type=l,t.lanes=r,t}function Jn(e,t,n,l){return e=pt(7,e,l,t),e.lanes=n,e}function Ms(e,t,n){return e=pt(6,e,null,t),e.lanes=n,e}function df(e){var t=pt(18,null,null,0);return t.stateNode=e,t}function js(e,t,n){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hf=new WeakMap;function Tt(e,t){if(typeof e=="object"&&e!==null){var n=hf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:oo(t)},hf.set(e,t),t)}return{value:e,source:t,stack:oo(t)}}var Cl=[],Nl=0,Ni=null,pa=0,_t=[],Ct=0,gn=null,kt=1,Ht="";function $t(e,t){Cl[Nl++]=pa,Cl[Nl++]=Ni,Ni=e,pa=t}function mf(e,t,n){_t[Ct++]=kt,_t[Ct++]=Ht,_t[Ct++]=gn,gn=e;var l=kt;e=Ht;var u=32-ht(l)-1;l&=~(1<<u),n+=1;var r=32-ht(t)+u;if(30<r){var f=u-u%5;r=(l&(1<<f)-1).toString(32),l>>=f,u-=f,kt=1<<32-ht(t)+u|n<<u|l,Ht=r+e}else kt=1<<r|n<<u|l,Ht=e}function Os(e){e.return!==null&&($t(e,1),mf(e,1,0))}function ws(e){for(;e===Ni;)Ni=Cl[--Nl],Cl[Nl]=null,pa=Cl[--Nl],Cl[Nl]=null;for(;e===gn;)gn=_t[--Ct],_t[Ct]=null,Ht=_t[--Ct],_t[Ct]=null,kt=_t[--Ct],_t[Ct]=null}function pf(e,t){_t[Ct++]=kt,_t[Ct++]=Ht,_t[Ct++]=gn,kt=t.id,Ht=t.overflow,gn=e}var $e=null,Re=null,me=!1,bn=null,Nt=!1,zs=Error(c(519));function xn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ya(Tt(t,e)),zs}function yf(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Je]=e,t[at]=l,n){case"dialog":fe("cancel",t),fe("close",t);break;case"iframe":case"object":case"embed":fe("load",t);break;case"video":case"audio":for(n=0;n<ka.length;n++)fe(ka[n],t);break;case"source":fe("error",t);break;case"img":case"image":case"link":fe("error",t),fe("load",t);break;case"details":fe("toggle",t);break;case"input":fe("invalid",t),Ro(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":fe("invalid",t);break;case"textarea":fe("invalid",t),jo(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||zh(t.textContent,n)?(l.popover!=null&&(fe("beforetoggle",t),fe("toggle",t)),l.onScroll!=null&&fe("scroll",t),l.onScrollEnd!=null&&fe("scrollend",t),l.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||xn(e,!0)}function vf(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:Nt=!1;return;case 27:case 3:Nt=!0;return;default:$e=$e.return}}function Rl(e){if(e!==$e)return!1;if(!me)return vf(e),me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Wr(e.type,e.memoizedProps)),n=!n),n&&Re&&xn(e),vf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Re=Vh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Re=Vh(e)}else t===27?(t=Re,Dn(e.type)?(e=nc,nc=null,Re=e):Re=t):Re=$e?Mt(e.stateNode.nextSibling):null;return!0}function $n(){Re=$e=null,me=!1}function Ds(){var e=bn;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),bn=null),e}function ya(e){bn===null?bn=[e]:bn.push(e)}var Bs=E(null),Fn=null,Ft=null;function Sn(e,t,n){K(Bs,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=Bs.current,k(Bs)}function Us(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 Ls(e,t,n,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var r=u.dependencies;if(r!==null){var f=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),Us(r.return,n,e),l||(f=null);break e}r=m.next}}else if(u.tag===18){if(f=u.return,f===null)throw Error(c(341));f.lanes|=n,r=f.alternate,r!==null&&(r.lanes|=n),Us(f,n,e),f=null}else f=u.child;if(f!==null)f.return=u;else for(f=u;f!==null;){if(f===e){f=null;break}if(u=f.sibling,u!==null){u.return=f.return,f=u;break}f=f.return}u=f}}function Ml(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 f=u.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var m=u.type;mt(u.pendingProps.value,f.value)||(e!==null?e.push(m):e=[m])}}else if(u===xe.current){if(f=u.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Ga):e=[Ga])}u=u.return}e!==null&&Ls(t,e,n,l),t.flags|=262144}function Ri(e){for(e=e.firstContext;e!==null;){if(!mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wn(e){Fn=e,Ft=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Fe(e){return gf(Fn,e)}function Mi(e,t){return Fn===null&&Wn(e),gf(e,t)}function gf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ft===null){if(e===null)throw Error(c(308));Ft=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ft=Ft.next=t;return n}var Ky=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()})}},Jy=i.unstable_scheduleCallback,$y=i.unstable_NormalPriority,ke={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ks(){return{controller:new Ky,data:new Map,refCount:0}}function va(e){e.refCount--,e.refCount===0&&Jy($y,function(){e.controller.abort()})}var ga=null,Hs=0,jl=0,Ol=null;function Fy(e,t){if(ga===null){var n=ga=[];Hs=0,jl=Vr(),Ol={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Hs++,t.then(bf,bf),t}function bf(){if(--Hs===0&&ga!==null){Ol!==null&&(Ol.status="fulfilled");var e=ga;ga=null,jl=0,Ol=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wy(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 xf=D.S;D.S=function(e,t){lh=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fy(e,t),xf!==null&&xf(e,t)};var In=E(null);function qs(){var e=In.current;return e!==null?e:Ne.pooledCache}function ji(e,t){t===null?K(In,In.current):K(In,t.pool)}function Sf(){var e=qs();return e===null?null:{parent:ke._currentValue,pool:e}}var wl=Error(c(460)),Ys=Error(c(474)),Oi=Error(c(542)),wi={then:function(){}};function Ef(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Af(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_f(e),e;default:if(typeof t.status=="string")t.then(Zt,Zt);else{if(e=Ne,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,_f(e),e}throw el=t,wl}}function Pn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(el=n,wl):n}}var el=null;function Tf(){if(el===null)throw Error(c(459));var e=el;return el=null,e}function _f(e){if(e===wl||e===Oi)throw Error(c(483))}var zl=null,ba=0;function zi(e){var t=ba;return ba+=1,zl===null&&(zl=[]),Af(zl,e,t)}function xa(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 Cf(e){function t(_,S){if(e){var N=_.deletions;N===null?(_.deletions=[S],_.flags|=16):N.push(S)}}function n(_,S){if(!e)return null;for(;S!==null;)t(_,S),S=S.sibling;return null}function l(_){for(var S=new Map;_!==null;)_.key!==null?S.set(_.key,_):S.set(_.index,_),_=_.sibling;return S}function u(_,S){return _=Jt(_,S),_.index=0,_.sibling=null,_}function r(_,S,N){return _.index=N,e?(N=_.alternate,N!==null?(N=N.index,N<S?(_.flags|=67108866,S):N):(_.flags|=67108866,S)):(_.flags|=1048576,S)}function f(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function m(_,S,N,U){return S===null||S.tag!==6?(S=Ms(N,_.mode,U),S.return=_,S):(S=u(S,N),S.return=_,S)}function x(_,S,N,U){var P=N.type;return P===B?z(_,S,N.props.children,U,N.key):S!==null&&(S.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ie&&Pn(P)===S.type)?(S=u(S,N.props),xa(S,N),S.return=_,S):(S=Ci(N.type,N.key,N.props,null,_.mode,U),xa(S,N),S.return=_,S)}function R(_,S,N,U){return S===null||S.tag!==4||S.stateNode.containerInfo!==N.containerInfo||S.stateNode.implementation!==N.implementation?(S=js(N,_.mode,U),S.return=_,S):(S=u(S,N.children||[]),S.return=_,S)}function z(_,S,N,U,P){return S===null||S.tag!==7?(S=Jn(N,_.mode,U,P),S.return=_,S):(S=u(S,N),S.return=_,S)}function H(_,S,N){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Ms(""+S,_.mode,N),S.return=_,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case C:return N=Ci(S.type,S.key,S.props,null,_.mode,N),xa(N,S),N.return=_,N;case O:return S=js(S,_.mode,N),S.return=_,S;case ie:return S=Pn(S),H(_,S,N)}if(Pe(S)||we(S))return S=Jn(S,_.mode,N,null),S.return=_,S;if(typeof S.then=="function")return H(_,zi(S),N);if(S.$$typeof===q)return H(_,Mi(_,S),N);Di(_,S)}return null}function j(_,S,N,U){var P=S!==null?S.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return P!==null?null:m(_,S,""+N,U);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case C:return N.key===P?x(_,S,N,U):null;case O:return N.key===P?R(_,S,N,U):null;case ie:return N=Pn(N),j(_,S,N,U)}if(Pe(N)||we(N))return P!==null?null:z(_,S,N,U,null);if(typeof N.then=="function")return j(_,S,zi(N),U);if(N.$$typeof===q)return j(_,S,Mi(_,N),U);Di(_,N)}return null}function w(_,S,N,U,P){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return _=_.get(N)||null,m(S,_,""+U,P);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case C:return _=_.get(U.key===null?N:U.key)||null,x(S,_,U,P);case O:return _=_.get(U.key===null?N:U.key)||null,R(S,_,U,P);case ie:return U=Pn(U),w(_,S,N,U,P)}if(Pe(U)||we(U))return _=_.get(N)||null,z(S,_,U,P,null);if(typeof U.then=="function")return w(_,S,N,zi(U),P);if(U.$$typeof===q)return w(_,S,N,Mi(S,U),P);Di(S,U)}return null}function $(_,S,N,U){for(var P=null,ye=null,I=S,re=S=0,he=null;I!==null&&re<N.length;re++){I.index>re?(he=I,I=null):he=I.sibling;var ve=j(_,I,N[re],U);if(ve===null){I===null&&(I=he);break}e&&I&&ve.alternate===null&&t(_,I),S=r(ve,S,re),ye===null?P=ve:ye.sibling=ve,ye=ve,I=he}if(re===N.length)return n(_,I),me&&$t(_,re),P;if(I===null){for(;re<N.length;re++)I=H(_,N[re],U),I!==null&&(S=r(I,S,re),ye===null?P=I:ye.sibling=I,ye=I);return me&&$t(_,re),P}for(I=l(I);re<N.length;re++)he=w(I,_,re,N[re],U),he!==null&&(e&&he.alternate!==null&&I.delete(he.key===null?re:he.key),S=r(he,S,re),ye===null?P=he:ye.sibling=he,ye=he);return e&&I.forEach(function(Hn){return t(_,Hn)}),me&&$t(_,re),P}function ne(_,S,N,U){if(N==null)throw Error(c(151));for(var P=null,ye=null,I=S,re=S=0,he=null,ve=N.next();I!==null&&!ve.done;re++,ve=N.next()){I.index>re?(he=I,I=null):he=I.sibling;var Hn=j(_,I,ve.value,U);if(Hn===null){I===null&&(I=he);break}e&&I&&Hn.alternate===null&&t(_,I),S=r(Hn,S,re),ye===null?P=Hn:ye.sibling=Hn,ye=Hn,I=he}if(ve.done)return n(_,I),me&&$t(_,re),P;if(I===null){for(;!ve.done;re++,ve=N.next())ve=H(_,ve.value,U),ve!==null&&(S=r(ve,S,re),ye===null?P=ve:ye.sibling=ve,ye=ve);return me&&$t(_,re),P}for(I=l(I);!ve.done;re++,ve=N.next())ve=w(I,_,re,ve.value,U),ve!==null&&(e&&ve.alternate!==null&&I.delete(ve.key===null?re:ve.key),S=r(ve,S,re),ye===null?P=ve:ye.sibling=ve,ye=ve);return e&&I.forEach(function(rv){return t(_,rv)}),me&&$t(_,re),P}function Ce(_,S,N,U){if(typeof N=="object"&&N!==null&&N.type===B&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case C:e:{for(var P=N.key;S!==null;){if(S.key===P){if(P=N.type,P===B){if(S.tag===7){n(_,S.sibling),U=u(S,N.props.children),U.return=_,_=U;break e}}else if(S.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ie&&Pn(P)===S.type){n(_,S.sibling),U=u(S,N.props),xa(U,N),U.return=_,_=U;break e}n(_,S);break}else t(_,S);S=S.sibling}N.type===B?(U=Jn(N.props.children,_.mode,U,N.key),U.return=_,_=U):(U=Ci(N.type,N.key,N.props,null,_.mode,U),xa(U,N),U.return=_,_=U)}return f(_);case O:e:{for(P=N.key;S!==null;){if(S.key===P)if(S.tag===4&&S.stateNode.containerInfo===N.containerInfo&&S.stateNode.implementation===N.implementation){n(_,S.sibling),U=u(S,N.children||[]),U.return=_,_=U;break e}else{n(_,S);break}else t(_,S);S=S.sibling}U=js(N,_.mode,U),U.return=_,_=U}return f(_);case ie:return N=Pn(N),Ce(_,S,N,U)}if(Pe(N))return $(_,S,N,U);if(we(N)){if(P=we(N),typeof P!="function")throw Error(c(150));return N=P.call(N),ne(_,S,N,U)}if(typeof N.then=="function")return Ce(_,S,zi(N),U);if(N.$$typeof===q)return Ce(_,S,Mi(_,N),U);Di(_,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,S!==null&&S.tag===6?(n(_,S.sibling),U=u(S,N),U.return=_,_=U):(n(_,S),U=Ms(N,_.mode,U),U.return=_,_=U),f(_)):n(_,S)}return function(_,S,N,U){try{ba=0;var P=Ce(_,S,N,U);return zl=null,P}catch(I){if(I===wl||I===Oi)throw I;var ye=pt(29,I,null,_.mode);return ye.lanes=U,ye.return=_,ye}finally{}}}var tl=Cf(!0),Nf=Cf(!1),En=!1;function Vs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gs(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 An(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),of(e,null,n),t}return Ti(e,l,t,n),_i(e)}function Sa(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,vo(e,n)}}function Xs(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 f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?u=r=f:r=r.next=f,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 Qs=!1;function Ea(){if(Qs){var e=Ol;if(e!==null)throw e}}function Aa(e,t,n,l){Qs=!1;var u=e.updateQueue;En=!1;var r=u.firstBaseUpdate,f=u.lastBaseUpdate,m=u.shared.pending;if(m!==null){u.shared.pending=null;var x=m,R=x.next;x.next=null,f===null?r=R:f.next=R,f=x;var z=e.alternate;z!==null&&(z=z.updateQueue,m=z.lastBaseUpdate,m!==f&&(m===null?z.firstBaseUpdate=R:m.next=R,z.lastBaseUpdate=x))}if(r!==null){var H=u.baseState;f=0,z=R=x=null,m=r;do{var j=m.lane&-536870913,w=j!==m.lane;if(w?(de&j)===j:(l&j)===j){j!==0&&j===jl&&(Qs=!0),z!==null&&(z=z.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var $=e,ne=m;j=t;var Ce=n;switch(ne.tag){case 1:if($=ne.payload,typeof $=="function"){H=$.call(Ce,H,j);break e}H=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=ne.payload,j=typeof $=="function"?$.call(Ce,H,j):$,j==null)break e;H=T({},H,j);break e;case 2:En=!0}}j=m.callback,j!==null&&(e.flags|=64,w&&(e.flags|=8192),w=u.callbacks,w===null?u.callbacks=[j]:w.push(j))}else w={lane:j,tag:m.tag,payload:m.payload,callback:m.callback,next:null},z===null?(R=z=w,x=H):z=z.next=w,f|=j;if(m=m.next,m===null){if(m=u.shared.pending,m===null)break;w=m,m=w.next,w.next=null,u.lastBaseUpdate=w,u.shared.pending=null}}while(!0);z===null&&(x=H),u.baseState=x,u.firstBaseUpdate=R,u.lastBaseUpdate=z,r===null&&(u.shared.lanes=0),Mn|=f,e.lanes=f,e.memoizedState=H}}function Rf(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Mf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Rf(n[e],t)}var Dl=E(null),Bi=E(0);function jf(e,t){e=sn,K(Bi,e),K(Dl,t),sn=e|t.baseLanes}function Zs(){K(Bi,sn),K(Dl,Dl.current)}function Ks(){sn=Bi.current,k(Dl),k(Bi)}var yt=E(null),Rt=null;function _n(e){var t=e.alternate;K(Ue,Ue.current&1),K(yt,e),Rt===null&&(t===null||Dl.current!==null||t.memoizedState!==null)&&(Rt=e)}function Js(e){K(Ue,Ue.current),K(yt,e),Rt===null&&(Rt=e)}function Of(e){e.tag===22?(K(Ue,Ue.current),K(yt,e),Rt===null&&(Rt=e)):Cn()}function Cn(){K(Ue,Ue.current),K(yt,yt.current)}function vt(e){k(yt),Rt===e&&(Rt=null),k(Ue)}var Ue=E(0);function Ui(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ec(n)||tc(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 It=0,se=null,Te=null,He=null,Li=!1,Bl=!1,nl=!1,ki=0,Ta=0,Ul=null,Iy=0;function ze(){throw Error(c(321))}function $s(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function Fs(e,t,n,l,u,r){return It=r,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?md:fr,nl=!1,r=n(l,u),nl=!1,Bl&&(r=zf(t,n,l,u)),wf(e),r}function wf(e){D.H=Na;var t=Te!==null&&Te.next!==null;if(It=0,He=Te=se=null,Li=!1,Ta=0,Ul=null,t)throw Error(c(300));e===null||qe||(e=e.dependencies,e!==null&&Ri(e)&&(qe=!0))}function zf(e,t,n,l){se=e;var u=0;do{if(Bl&&(Ul=null),Ta=0,Bl=!1,25<=u)throw Error(c(301));if(u+=1,He=Te=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=pd,r=t(n,l)}while(Bl);return r}function Py(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?_a(t):t,e=e.useState()[0],(Te!==null?Te.memoizedState:null)!==e&&(se.flags|=1024),t}function Ws(){var e=ki!==0;return ki=0,e}function Is(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ps(e){if(Li){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Li=!1}It=0,He=Te=se=null,Bl=!1,Ta=ki=0,Ul=null}function nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?se.memoizedState=He=e:He=He.next=e,He}function Le(){if(Te===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=He===null?se.memoizedState:He.next;if(t!==null)He=t,Te=e;else{if(e===null)throw se.alternate===null?Error(c(467)):Error(c(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},He===null?se.memoizedState=He=e:He=He.next=e}return He}function Hi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _a(e){var t=Ta;return Ta+=1,Ul===null&&(Ul=[]),e=Af(Ul,e,t),t=se,(He===null?t.memoizedState:He.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?md:fr),e}function qi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _a(e);if(e.$$typeof===q)return Fe(e)}throw Error(c(438,String(e)))}function er(e){var t=null,n=se.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=se.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=Hi(),se.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]=J;return t.index++,n}function Pt(e,t){return typeof t=="function"?t(e):t}function Yi(e){var t=Le();return tr(t,Te,e)}function tr(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 f=u.next;u.next=r.next,r.next=f}t.baseQueue=u=r,l.pending=null}if(r=e.baseState,u===null)e.memoizedState=r;else{t=u.next;var m=f=null,x=null,R=t,z=!1;do{var H=R.lane&-536870913;if(H!==R.lane?(de&H)===H:(It&H)===H){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}),H===jl&&(z=!0);else if((It&j)===j){R=R.next,j===jl&&(z=!0);continue}else H={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(m=x=H,f=r):x=x.next=H,se.lanes|=j,Mn|=j;H=R.action,nl&&n(r,H),r=R.hasEagerState?R.eagerState:n(r,H)}else j={lane:H,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(m=x=j,f=r):x=x.next=j,se.lanes|=H,Mn|=H;R=R.next}while(R!==null&&R!==t);if(x===null?f=r:x.next=m,!mt(r,e.memoizedState)&&(qe=!0,z&&(n=Ol,n!==null)))throw n;e.memoizedState=r,e.baseState=f,e.baseQueue=x,l.lastRenderedState=r}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function nr(e){var t=Le(),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 f=u=u.next;do r=e(r,f.action),f=f.next;while(f!==u);mt(r,t.memoizedState)||(qe=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,l]}function Df(e,t,n){var l=se,u=Le(),r=me;if(r){if(n===void 0)throw Error(c(407));n=n()}else n=t();var f=!mt((Te||u).memoizedState,n);if(f&&(u.memoizedState=n,qe=!0),u=u.queue,ir(Lf.bind(null,l,u,e),[e]),u.getSnapshot!==t||f||He!==null&&He.memoizedState.tag&1){if(l.flags|=2048,Ll(9,{destroy:void 0},Uf.bind(null,l,u,n,t),null),Ne===null)throw Error(c(349));r||(It&127)!==0||Bf(l,t,n)}return n}function Bf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t=Hi(),se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uf(e,t,n,l){t.value=n,t.getSnapshot=l,kf(t)&&Hf(e)}function Lf(e,t,n){return n(function(){kf(t)&&Hf(e)})}function kf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mt(e,n)}catch{return!0}}function Hf(e){var t=Kn(e,2);t!==null&&ot(t,e,2)}function lr(e){var t=nt();if(typeof e=="function"){var n=e;if(e=n(),nl){pn(!0);try{n()}finally{pn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function qf(e,t,n,l){return e.baseState=n,tr(e,Te,typeof l=="function"?l:Pt)}function e0(e,t,n,l,u){if(Xi(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(f){r.listeners.push(f)}};D.T!==null?n(!0):r.isTransition=!1,l(r),n=t.pending,n===null?(r.next=t.pending=r,Yf(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Yf(e,t){var n=t.action,l=t.payload,u=e.state;if(t.isTransition){var r=D.T,f={};D.T=f;try{var m=n(u,l),x=D.S;x!==null&&x(f,m),Vf(e,t,m)}catch(R){ar(e,t,R)}finally{r!==null&&f.types!==null&&(r.types=f.types),D.T=r}}else try{r=n(u,l),Vf(e,t,r)}catch(R){ar(e,t,R)}}function Vf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Gf(e,t,l)},function(l){return ar(e,t,l)}):Gf(e,t,n)}function Gf(e,t,n){t.status="fulfilled",t.value=n,Xf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yf(e,n)))}function ar(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Xf(t),t=t.next;while(t!==l)}e.action=null}function Xf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qf(e,t){return t}function Zf(e,t){if(me){var n=Ne.formState;if(n!==null){e:{var l=se;if(me){if(Re){t:{for(var u=Re,r=Nt;u.nodeType!==8;){if(!r){u=null;break t}if(u=Mt(u.nextSibling),u===null){u=null;break t}}r=u.data,u=r==="F!"||r==="F"?u:null}if(u){Re=Mt(u.nextSibling),l=u.data==="F!";break e}}xn(l)}l=!1}l&&(t=n[0])}}return n=nt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qf,lastRenderedState:t},n.queue=l,n=fd.bind(null,se,l),l.dispatch=n,l=lr(!1),r=or.bind(null,se,!1,l.queue),l=nt(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,n=e0.bind(null,se,u,r,n),u.dispatch=n,l.memoizedState=e,[t,n,!1]}function Kf(e){var t=Le();return Jf(t,Te,e)}function Jf(e,t,n){if(t=tr(e,t,Qf)[0],e=Yi(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=_a(t)}catch(f){throw f===wl?Oi:f}else l=t;t=Le();var u=t.queue,r=u.dispatch;return n!==t.memoizedState&&(se.flags|=2048,Ll(9,{destroy:void 0},t0.bind(null,u,n),null)),[l,r,e]}function t0(e,t){e.action=t}function $f(e){var t=Le(),n=Te;if(n!==null)return Jf(t,n,e);Le(),t=t.memoizedState,n=Le();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Ll(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=se.updateQueue,t===null&&(t=Hi(),se.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 Ff(){return Le().memoizedState}function Vi(e,t,n,l){var u=nt();se.flags|=e,u.memoizedState=Ll(1|t,{destroy:void 0},n,l===void 0?null:l)}function Gi(e,t,n,l){var u=Le();l=l===void 0?null:l;var r=u.memoizedState.inst;Te!==null&&l!==null&&$s(l,Te.memoizedState.deps)?u.memoizedState=Ll(t,r,n,l):(se.flags|=e,u.memoizedState=Ll(1|t,r,n,l))}function Wf(e,t){Vi(8390656,8,e,t)}function ir(e,t){Gi(2048,8,e,t)}function n0(e){se.flags|=4;var t=se.updateQueue;if(t===null)t=Hi(),se.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function If(e){var t=Le().memoizedState;return n0({ref:t,nextImpl:e}),function(){if((ge&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Pf(e,t){return Gi(4,2,e,t)}function ed(e,t){return Gi(4,4,e,t)}function td(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 nd(e,t,n){n=n!=null?n.concat([e]):null,Gi(4,4,td.bind(null,t,e),n)}function ur(){}function ld(e,t){var n=Le();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&$s(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function ad(e,t){var n=Le();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&$s(t,l[1]))return l[0];if(l=e(),nl){pn(!0);try{e()}finally{pn(!1)}}return n.memoizedState=[l,t],l}function sr(e,t,n){return n===void 0||(It&1073741824)!==0&&(de&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=ih(),se.lanes|=e,Mn|=e,n)}function id(e,t,n,l){return mt(n,t)?n:Dl.current!==null?(e=sr(e,n,l),mt(e,t)||(qe=!0),e):(It&42)===0||(It&1073741824)!==0&&(de&261930)===0?(qe=!0,e.memoizedState=n):(e=ih(),se.lanes|=e,Mn|=e,t)}function ud(e,t,n,l,u){var r=Z.p;Z.p=r!==0&&8>r?r:8;var f=D.T,m={};D.T=m,or(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 z=Wy(x,l);Ca(e,t,z,xt(e))}else Ca(e,t,l,xt(e))}catch(H){Ca(e,t,{then:function(){},status:"rejected",reason:H},xt())}finally{Z.p=r,f!==null&&m.types!==null&&(f.types=m.types),D.T=f}}function l0(){}function rr(e,t,n,l){if(e.tag!==5)throw Error(c(476));var u=sd(e).queue;ud(e,u,t,te,n===null?l0:function(){return rd(e),n(l)})}function sd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rd(e){var t=sd(e);t.next===null&&(t=e.alternate.memoizedState),Ca(e,t.next.queue,{},xt())}function cr(){return Fe(Ga)}function cd(){return Le().memoizedState}function od(){return Le().memoizedState}function a0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xt();e=An(n);var l=Tn(t,e,n);l!==null&&(ot(l,t,n),Sa(l,t,n)),t={cache:ks()},e.payload=t;return}t=t.return}}function i0(e,t,n){var l=xt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Xi(e)?dd(t,n):(n=Ns(e,t,n,l),n!==null&&(ot(n,e,l),hd(n,t,l)))}function fd(e,t,n){var l=xt();Ca(e,t,n,l)}function Ca(e,t,n,l){var u={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xi(e))dd(t,u);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var f=t.lastRenderedState,m=r(f,n);if(u.hasEagerState=!0,u.eagerState=m,mt(m,f))return Ti(e,t,u,0),Ne===null&&Ai(),!1}catch{}finally{}if(n=Ns(e,t,u,l),n!==null)return ot(n,e,l),hd(n,t,l),!0}return!1}function or(e,t,n,l){if(l={lane:2,revertLane:Vr(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Xi(e)){if(t)throw Error(c(479))}else t=Ns(e,n,l,2),t!==null&&ot(t,e,2)}function Xi(e){var t=e.alternate;return e===se||t!==null&&t===se}function dd(e,t){Bl=Li=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hd(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,vo(e,n)}}var Na={readContext:Fe,use:qi,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze};Na.useEffectEvent=ze;var md={readContext:Fe,use:qi,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:Wf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Vi(4194308,4,td.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vi(4194308,4,e,t)},useInsertionEffect:function(e,t){Vi(4,2,e,t)},useMemo:function(e,t){var n=nt();t=t===void 0?null:t;var l=e();if(nl){pn(!0);try{e()}finally{pn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=nt();if(n!==void 0){var u=n(t);if(nl){pn(!0);try{n(t)}finally{pn(!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=i0.bind(null,se,e),[l.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:function(e){e=lr(e);var t=e.queue,n=fd.bind(null,se,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ur,useDeferredValue:function(e,t){var n=nt();return sr(n,e,t)},useTransition:function(){var e=lr(!1);return e=ud.bind(null,se,e.queue,!0,!1),nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=se,u=nt();if(me){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ne===null)throw Error(c(349));(de&127)!==0||Bf(l,t,n)}u.memoizedState=n;var r={value:n,getSnapshot:t};return u.queue=r,Wf(Lf.bind(null,l,r,e),[e]),l.flags|=2048,Ll(9,{destroy:void 0},Uf.bind(null,l,r,n,t),null),n},useId:function(){var e=nt(),t=Ne.identifierPrefix;if(me){var n=Ht,l=kt;n=(l&~(1<<32-ht(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ki++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Iy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cr,useFormState:Zf,useActionState:Zf,useOptimistic:function(e){var t=nt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=or.bind(null,se,!0,n),n.dispatch=t,[e,t]},useMemoCache:er,useCacheRefresh:function(){return nt().memoizedState=a0.bind(null,se)},useEffectEvent:function(e){var t=nt(),n={impl:e};return t.memoizedState=n,function(){if((ge&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},fr={readContext:Fe,use:qi,useCallback:ld,useContext:Fe,useEffect:ir,useImperativeHandle:nd,useInsertionEffect:Pf,useLayoutEffect:ed,useMemo:ad,useReducer:Yi,useRef:Ff,useState:function(){return Yi(Pt)},useDebugValue:ur,useDeferredValue:function(e,t){var n=Le();return id(n,Te.memoizedState,e,t)},useTransition:function(){var e=Yi(Pt)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:_a(e),t]},useSyncExternalStore:Df,useId:cd,useHostTransitionStatus:cr,useFormState:Kf,useActionState:Kf,useOptimistic:function(e,t){var n=Le();return qf(n,Te,e,t)},useMemoCache:er,useCacheRefresh:od};fr.useEffectEvent=If;var pd={readContext:Fe,use:qi,useCallback:ld,useContext:Fe,useEffect:ir,useImperativeHandle:nd,useInsertionEffect:Pf,useLayoutEffect:ed,useMemo:ad,useReducer:nr,useRef:Ff,useState:function(){return nr(Pt)},useDebugValue:ur,useDeferredValue:function(e,t){var n=Le();return Te===null?sr(n,e,t):id(n,Te.memoizedState,e,t)},useTransition:function(){var e=nr(Pt)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:_a(e),t]},useSyncExternalStore:Df,useId:cd,useHostTransitionStatus:cr,useFormState:$f,useActionState:$f,useOptimistic:function(e,t){var n=Le();return Te!==null?qf(n,Te,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:er,useCacheRefresh:od};pd.useEffectEvent=If;function dr(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hr={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=xt(),u=An(l);u.payload=t,n!=null&&(u.callback=n),t=Tn(e,u,l),t!==null&&(ot(t,e,l),Sa(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=xt(),u=An(l);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=Tn(e,u,l),t!==null&&(ot(t,e,l),Sa(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xt(),l=An(n);l.tag=2,t!=null&&(l.callback=t),t=Tn(e,l,n),t!==null&&(ot(t,e,n),Sa(t,e,n))}};function yd(e,t,n,l,u,r,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,r,f):t.prototype&&t.prototype.isPureReactComponent?!ha(n,l)||!ha(u,r):!0}function vd(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&&hr.enqueueReplaceState(t,t.state,null)}function ll(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=T({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function gd(e){Ei(e)}function bd(e){console.error(e)}function xd(e){Ei(e)}function Qi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Sd(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 mr(e,t,n){return n=An(n),n.tag=3,n.payload={element:null},n.callback=function(){Qi(e,t)},n}function Ed(e){return e=An(e),e.tag=3,e}function Ad(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(){Sd(t,n,l)}}var f=n.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Sd(t,n,l),typeof u!="function"&&(jn===null?jn=new Set([this]):jn.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function u0(e,t,n,l,u){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Ml(t,n,u,!0),n=yt.current,n!==null){switch(n.tag){case 31:case 13:return Rt===null?lu():n.alternate===null&&De===0&&(De=3),n.flags&=-257,n.flags|=65536,n.lanes=u,l===wi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Hr(e,l,u)),!1;case 22:return n.flags|=65536,l===wi?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)),Hr(e,l,u)),!1}throw Error(c(435,n.tag))}return Hr(e,l,u),lu(),!1}if(me)return t=yt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,l!==zs&&(e=Error(c(422),{cause:l}),ya(Tt(e,n)))):(l!==zs&&(t=Error(c(423),{cause:l}),ya(Tt(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Tt(l,n),u=mr(e.stateNode,l,u),Xs(e,u),De!==4&&(De=2)),!1;var r=Error(c(520),{cause:l});if(r=Tt(r,n),Ba===null?Ba=[r]:Ba.push(r),De!==4&&(De=2),t===null)return!0;l=Tt(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=mr(n.stateNode,l,e),Xs(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"&&(jn===null||!jn.has(r))))return n.flags|=65536,u&=-u,n.lanes|=u,u=Ed(u),Ad(u,e,n,l),Xs(n,u),!1}n=n.return}while(n!==null);return!1}var pr=Error(c(461)),qe=!1;function We(e,t,n,l){t.child=e===null?Nf(t,null,n,l):tl(t,e.child,n,l)}function Td(e,t,n,l,u){n=n.render;var r=t.ref;if("ref"in l){var f={};for(var m in l)m!=="ref"&&(f[m]=l[m])}else f=l;return Wn(t),l=Fs(e,t,n,f,r,u),m=Ws(),e!==null&&!qe?(Is(e,t,u),en(e,t,u)):(me&&m&&Os(t),t.flags|=1,We(e,t,l,u),t.child)}function _d(e,t,n,l,u){if(e===null){var r=n.type;return typeof r=="function"&&!Rs(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,Cd(e,t,r,l,u)):(e=Ci(n.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!Ar(e,u)){var f=r.memoizedProps;if(n=n.compare,n=n!==null?n:ha,n(f,l)&&e.ref===t.ref)return en(e,t,u)}return t.flags|=1,e=Jt(r,l),e.ref=t.ref,e.return=t,t.child=e}function Cd(e,t,n,l,u){if(e!==null){var r=e.memoizedProps;if(ha(r,l)&&e.ref===t.ref)if(qe=!1,t.pendingProps=l=r,Ar(e,u))(e.flags&131072)!==0&&(qe=!0);else return t.lanes=e.lanes,en(e,t,u)}return yr(e,t,n,l,u)}function Nd(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 Rd(e,t,r,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ji(t,r!==null?r.cachePool:null),r!==null?jf(t,r):Zs(),Of(t);else return l=t.lanes=536870912,Rd(e,t,r!==null?r.baseLanes|n:n,n,l)}else r!==null?(ji(t,r.cachePool),jf(t,r),Cn(),t.memoizedState=null):(e!==null&&ji(t,null),Zs(),Cn());return We(e,t,u,n),t.child}function Ra(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rd(e,t,n,l,u){var r=qs();return r=r===null?null:{parent:ke._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&ji(t,null),Zs(),Of(t),e!==null&&Ml(e,t,l,!0),t.childLanes=u,null}function Zi(e,t){return t=Ji({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Md(e,t,n){return tl(t,e.child,null,n),e=Zi(t,t.pendingProps),e.flags|=2,vt(t),t.memoizedState=null,e}function s0(e,t,n){var l=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(me){if(l.mode==="hidden")return e=Zi(t,l),t.lanes=536870912,Ra(null,e);if(Js(t),(e=Re)?(e=Yh(e,Nt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gn!==null?{id:kt,overflow:Ht}:null,retryLane:536870912,hydrationErrors:null},n=df(e),n.return=t,t.child=n,$e=t,Re=null)):e=null,e===null)throw xn(t);return t.lanes=536870912,null}return Zi(t,l)}var r=e.memoizedState;if(r!==null){var f=r.dehydrated;if(Js(t),u)if(t.flags&256)t.flags&=-257,t=Md(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||Ml(e,t,n,!1),u=(n&e.childLanes)!==0,qe||u){if(l=Ne,l!==null&&(f=go(l,n),f!==0&&f!==r.retryLane))throw r.retryLane=f,Kn(e,f),ot(l,e,f),pr;lu(),t=Md(e,t,n)}else e=r.treeContext,Re=Mt(f.nextSibling),$e=t,me=!0,bn=null,Nt=!1,e!==null&&pf(t,e),t=Zi(t,l),t.flags|=4096;return t}return e=Jt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ki(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 yr(e,t,n,l,u){return Wn(t),n=Fs(e,t,n,l,void 0,u),l=Ws(),e!==null&&!qe?(Is(e,t,u),en(e,t,u)):(me&&l&&Os(t),t.flags|=1,We(e,t,n,u),t.child)}function jd(e,t,n,l,u,r){return Wn(t),t.updateQueue=null,n=zf(t,l,n,u),wf(e),l=Ws(),e!==null&&!qe?(Is(e,t,r),en(e,t,r)):(me&&l&&Os(t),t.flags|=1,We(e,t,n,r),t.child)}function Od(e,t,n,l,u){if(Wn(t),t.stateNode===null){var r=_l,f=n.contextType;typeof f=="object"&&f!==null&&(r=Fe(f)),r=new n(l,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=hr,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=l,r.state=t.memoizedState,r.refs={},Vs(t),f=n.contextType,r.context=typeof f=="object"&&f!==null?Fe(f):_l,r.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(dr(t,n,f,l),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(f=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),f!==r.state&&hr.enqueueReplaceState(r,r.state,null),Aa(t,l,r,u),Ea(),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=ll(n,m);r.props=x;var R=r.context,z=n.contextType;f=_l,typeof z=="object"&&z!==null&&(f=Fe(z));var H=n.getDerivedStateFromProps;z=typeof H=="function"||typeof r.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,z||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(m||R!==f)&&vd(t,r,l,f),En=!1;var j=t.memoizedState;r.state=j,Aa(t,l,r,u),Ea(),R=t.memoizedState,m||j!==R||En?(typeof H=="function"&&(dr(t,n,H,l),R=t.memoizedState),(x=En||yd(t,n,x,l,j,R,f))?(z||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=f,l=x):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{r=t.stateNode,Gs(e,t),f=t.memoizedProps,z=ll(n,f),r.props=z,H=t.pendingProps,j=r.context,R=n.contextType,x=_l,typeof R=="object"&&R!==null&&(x=Fe(R)),m=n.getDerivedStateFromProps,(R=typeof m=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(f!==H||j!==x)&&vd(t,r,l,x),En=!1,j=t.memoizedState,r.state=j,Aa(t,l,r,u),Ea();var w=t.memoizedState;f!==H||j!==w||En||e!==null&&e.dependencies!==null&&Ri(e.dependencies)?(typeof m=="function"&&(dr(t,n,m,l),w=t.memoizedState),(z=En||yd(t,n,z,l,j,w,x)||e!==null&&e.dependencies!==null&&Ri(e.dependencies))?(R||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,w,x),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,w,x)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=w),r.props=l,r.state=w,r.context=x,l=z):(typeof r.componentDidUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),l=!1)}return r=l,Ki(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=tl(t,e.child,null,u),t.child=tl(t,null,n,u)):We(e,t,n,u),t.memoizedState=r.state,e=t.child):e=en(e,t,u),e}function wd(e,t,n,l){return $n(),t.flags|=256,We(e,t,n,l),t.child}var vr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gr(e){return{baseLanes:e,cachePool:Sf()}}function br(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=bt),e}function zd(e,t,n){var l=t.pendingProps,u=!1,r=(t.flags&128)!==0,f;if((f=r)||(f=e!==null&&e.memoizedState===null?!1:(Ue.current&2)!==0),f&&(u=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(me){if(u?_n(t):Cn(),(e=Re)?(e=Yh(e,Nt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gn!==null?{id:kt,overflow:Ht}:null,retryLane:536870912,hydrationErrors:null},n=df(e),n.return=t,t.child=n,$e=t,Re=null)):e=null,e===null)throw xn(t);return tc(e)?t.lanes=32:t.lanes=536870912,null}var m=l.children;return l=l.fallback,u?(Cn(),u=t.mode,m=Ji({mode:"hidden",children:m},u),l=Jn(l,u,n,null),m.return=t,l.return=t,m.sibling=l,t.child=m,l=t.child,l.memoizedState=gr(n),l.childLanes=br(e,f,n),t.memoizedState=vr,Ra(null,l)):(_n(t),xr(t,m))}var x=e.memoizedState;if(x!==null&&(m=x.dehydrated,m!==null)){if(r)t.flags&256?(_n(t),t.flags&=-257,t=Sr(e,t,n)):t.memoizedState!==null?(Cn(),t.child=e.child,t.flags|=128,t=null):(Cn(),m=l.fallback,u=t.mode,l=Ji({mode:"visible",children:l.children},u),m=Jn(m,u,n,null),m.flags|=2,l.return=t,m.return=t,l.sibling=m,t.child=l,tl(t,e.child,null,n),l=t.child,l.memoizedState=gr(n),l.childLanes=br(e,f,n),t.memoizedState=vr,t=Ra(null,l));else if(_n(t),tc(m)){if(f=m.nextSibling&&m.nextSibling.dataset,f)var R=f.dgst;f=R,l=Error(c(419)),l.stack="",l.digest=f,ya({value:l,source:null,stack:null}),t=Sr(e,t,n)}else if(qe||Ml(e,t,n,!1),f=(n&e.childLanes)!==0,qe||f){if(f=Ne,f!==null&&(l=go(f,n),l!==0&&l!==x.retryLane))throw x.retryLane=l,Kn(e,l),ot(f,e,l),pr;ec(m)||lu(),t=Sr(e,t,n)}else ec(m)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,Re=Mt(m.nextSibling),$e=t,me=!0,bn=null,Nt=!1,e!==null&&pf(t,e),t=xr(t,l.children),t.flags|=4096);return t}return u?(Cn(),m=l.fallback,u=t.mode,x=e.child,R=x.sibling,l=Jt(x,{mode:"hidden",children:l.children}),l.subtreeFlags=x.subtreeFlags&65011712,R!==null?m=Jt(R,m):(m=Jn(m,u,n,null),m.flags|=2),m.return=t,l.return=t,l.sibling=m,t.child=l,Ra(null,l),l=t.child,m=e.child.memoizedState,m===null?m=gr(n):(u=m.cachePool,u!==null?(x=ke._currentValue,u=u.parent!==x?{parent:x,pool:x}:u):u=Sf(),m={baseLanes:m.baseLanes|n,cachePool:u}),l.memoizedState=m,l.childLanes=br(e,f,n),t.memoizedState=vr,Ra(e.child,l)):(_n(t),n=e.child,e=n.sibling,n=Jt(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=n,t.memoizedState=null,n)}function xr(e,t){return t=Ji({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ji(e,t){return e=pt(22,e,null,t),e.lanes=0,e}function Sr(e,t,n){return tl(t,e.child,null,n),e=xr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Us(e.return,t,n)}function Er(e,t,n,l,u,r){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:u,treeForkCount:r}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=n,f.tailMode=u,f.treeForkCount=r)}function Bd(e,t,n){var l=t.pendingProps,u=l.revealOrder,r=l.tail;l=l.children;var f=Ue.current,m=(f&2)!==0;if(m?(f=f&1|2,t.flags|=128):f&=1,K(Ue,f),We(e,t,l,n),l=me?pa:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dd(e,n,t);else if(e.tag===19)Dd(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&&Ui(e)===null&&(u=n),n=n.sibling;n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),Er(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&&Ui(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}Er(t,!0,n,null,r,l);break;case"together":Er(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function en(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Mn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ml(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=Jt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Jt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ar(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ri(e)))}function r0(e,t,n){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),Sn(t,ke,e.memoizedState.cache),$n();break;case 27:case 5:ea(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:Sn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Js(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(_n(t),t.flags|=128,null):(n&t.child.childLanes)!==0?zd(e,t,n):(_n(t),e=en(e,t,n),e!==null?e.sibling:null);_n(t);break;case 19:var u=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Ml(e,t,n,!1),l=(n&t.childLanes)!==0),u){if(l)return Bd(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),K(Ue,Ue.current),l)break;return null;case 22:return t.lanes=0,Nd(e,t,n,t.pendingProps);case 24:Sn(t,ke,e.memoizedState.cache)}return en(e,t,n)}function Ud(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)qe=!0;else{if(!Ar(e,n)&&(t.flags&128)===0)return qe=!1,r0(e,t,n);qe=(e.flags&131072)!==0}else qe=!1,me&&(t.flags&1048576)!==0&&mf(t,pa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Pn(t.elementType),t.type=e,typeof e=="function")Rs(e)?(l=ll(e,l),t.tag=1,t=Od(null,t,e,l,n)):(t.tag=0,t=yr(null,t,e,l,n));else{if(e!=null){var u=e.$$typeof;if(u===F){t.tag=11,t=Td(null,t,e,l,n);break e}else if(u===X){t.tag=14,t=_d(null,t,e,l,n);break e}}throw t=Ke(e)||e,Error(c(306,t,""))}}return t;case 0:return yr(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,u=ll(l,t.pendingProps),Od(e,t,l,u,n);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var r=t.memoizedState;u=r.element,Gs(e,t),Aa(t,l,null,n);var f=t.memoizedState;if(l=f.cache,Sn(t,ke,l),l!==r.cache&&Ls(t,[ke],n,!0),Ea(),l=f.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=wd(e,t,l,n);break e}else if(l!==u){u=Tt(Error(c(424)),t),ya(u),t=wd(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(Re=Mt(e.firstChild),$e=t,me=!0,bn=null,Nt=!0,n=Nf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if($n(),l===u){t=en(e,t,n);break e}We(e,t,l,n)}t=t.child}return t;case 26:return Ki(e,t),e===null?(n=Kh(t.type,null,t.pendingProps,null))?t.memoizedState=n:me||(n=t.type,e=t.pendingProps,l=ou(ce.current).createElement(n),l[Je]=t,l[at]=e,Ie(l,n,e),Qe(l),t.stateNode=l):t.memoizedState=Kh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ea(t),e===null&&me&&(l=t.stateNode=Xh(t.type,t.pendingProps,ce.current),$e=t,Nt=!0,u=Re,Dn(t.type)?(nc=u,Re=Mt(l.firstChild)):Re=u),We(e,t,t.pendingProps.children,n),Ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&me&&((u=l=Re)&&(l=k0(l,t.type,t.pendingProps,Nt),l!==null?(t.stateNode=l,$e=t,Re=Mt(l.firstChild),Nt=!1,u=!0):u=!1),u||xn(t)),ea(t),u=t.type,r=t.pendingProps,f=e!==null?e.memoizedProps:null,l=r.children,Wr(u,r)?l=null:f!==null&&Wr(u,f)&&(t.flags|=32),t.memoizedState!==null&&(u=Fs(e,t,Py,null,null,n),Ga._currentValue=u),Ki(e,t),We(e,t,l,n),t.child;case 6:return e===null&&me&&((e=n=Re)&&(n=H0(n,t.pendingProps,Nt),n!==null?(t.stateNode=n,$e=t,Re=null,e=!0):e=!1),e||xn(t)),null;case 13:return zd(e,t,n);case 4:return tt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=tl(t,null,l,n):We(e,t,l,n),t.child;case 11:return Td(e,t,t.type,t.pendingProps,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,Sn(t,t.type,l.value),We(e,t,l.children,n),t.child;case 9:return u=t.type._context,l=t.pendingProps.children,Wn(t),u=Fe(u),l=l(u),t.flags|=1,We(e,t,l,n),t.child;case 14:return _d(e,t,t.type,t.pendingProps,n);case 15:return Cd(e,t,t.type,t.pendingProps,n);case 19:return Bd(e,t,n);case 31:return s0(e,t,n);case 22:return Nd(e,t,n,t.pendingProps);case 24:return Wn(t),l=Fe(ke),e===null?(u=qs(),u===null&&(u=Ne,r=ks(),u.pooledCache=r,r.refCount++,r!==null&&(u.pooledCacheLanes|=n),u=r),t.memoizedState={parent:l,cache:u},Vs(t),Sn(t,ke,u)):((e.lanes&n)!==0&&(Gs(e,t),Aa(t,null,null,n),Ea()),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),Sn(t,ke,l)):(l=r.cache,Sn(t,ke,l),l!==u.cache&&Ls(t,[ke],n,!0))),We(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function tn(e){e.flags|=4}function Tr(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(ch())e.flags|=8192;else throw el=wi,Ys}else e.flags&=-16777217}function Ld(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ih(t))if(ch())e.flags|=8192;else throw el=wi,Ys}function $i(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?po():536870912,e.lanes|=t,Yl|=t)}function Ma(e,t){if(!me)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 Me(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 c0(e,t,n){var l=t.pendingProps;switch(ws(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Me(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Wt(ke),Be(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?tn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ds())),Me(t),null;case 26:var u=t.type,r=t.memoizedState;return e===null?(tn(t),r!==null?(Me(t),Ld(t,r)):(Me(t),Tr(t,u,null,l,n))):r?r!==e.memoizedState?(tn(t),Me(t),Ld(t,r)):(Me(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&tn(t),Me(t),Tr(t,u,e,l,n)),null;case 27:if(ui(t),n=ce.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&tn(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Me(t),null}e=W.current,Rl(t)?yf(t):(e=Xh(u,l,n),t.stateNode=e,tn(t))}return Me(t),null;case 5:if(ui(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&tn(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Me(t),null}if(r=W.current,Rl(t))yf(t);else{var f=ou(ce.current);switch(r){case 1:r=f.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:r=f.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":r=f.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":r=f.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":r=f.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?r.multiple=!0:l.size&&(r.size=l.size);break;default:r=typeof l.is=="string"?f.createElement(u,{is:l.is}):f.createElement(u)}}r[Je]=t,r[at]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)r.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=r;e:switch(Ie(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&&tn(t)}}return Me(t),Tr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&tn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=ce.current,Rl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,u=$e,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[Je]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||zh(e.nodeValue,n)),e||xn(t,!0)}else e=ou(e).createTextNode(l),e[Je]=t,t.stateNode=e}return Me(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Rl(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[Je]=t}else $n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Me(t),e=!1}else n=Ds(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(vt(t),t):(vt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Me(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Rl(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[Je]=t}else $n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Me(t),u=!1}else u=Ds(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(vt(t),t):(vt(t),null)}return vt(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),$i(t,t.updateQueue),Me(t),null);case 4:return Be(),e===null&&Zr(t.stateNode.containerInfo),Me(t),null;case 10:return Wt(t.type),Me(t),null;case 19:if(k(Ue),l=t.memoizedState,l===null)return Me(t),null;if(u=(t.flags&128)!==0,r=l.rendering,r===null)if(u)Ma(l,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Ui(e),r!==null){for(t.flags|=128,Ma(l,!1),e=r.updateQueue,t.updateQueue=e,$i(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ff(n,e),n=n.sibling;return K(Ue,Ue.current&1|2),me&&$t(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ft()>eu&&(t.flags|=128,u=!0,Ma(l,!1),t.lanes=4194304)}else{if(!u)if(e=Ui(r),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,$i(t,e),Ma(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!me)return Me(t),null}else 2*ft()-l.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,u=!0,Ma(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=ft(),e.sibling=null,n=Ue.current,K(Ue,u?n&1|2:n&1),me&&$t(t,l.treeForkCount),e):(Me(t),null);case 22:case 23:return vt(t),Ks(),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&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),n=t.updateQueue,n!==null&&$i(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&&k(In),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wt(ke),Me(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function o0(e,t){switch(ws(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(ke),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ui(t),null;case 31:if(t.memoizedState!==null){if(vt(t),t.alternate===null)throw Error(c(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(Ue),null;case 4:return Be(),null;case 10:return Wt(t.type),null;case 22:case 23:return vt(t),Ks(),e!==null&&k(In),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(ke),null;case 25:return null;default:return null}}function kd(e,t){switch(ws(t),t.tag){case 3:Wt(ke),Be();break;case 26:case 27:case 5:ui(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&vt(t);break;case 13:vt(t);break;case 19:k(Ue);break;case 10:Wt(t.type);break;case 22:case 23:vt(t),Ks(),e!==null&&k(In);break;case 24:Wt(ke)}}function ja(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,f=n.inst;l=r(),f.destroy=l}n=n.next}while(n!==u)}}catch(m){Ae(t,t.return,m)}}function Nn(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 f=l.inst,m=f.destroy;if(m!==void 0){f.destroy=void 0,u=t;var x=n,R=m;try{R()}catch(z){Ae(u,x,z)}}}l=l.next}while(l!==r)}}catch(z){Ae(t,t.return,z)}}function Hd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Mf(t,n)}catch(l){Ae(e,e.return,l)}}}function qd(e,t,n){n.props=ll(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ae(e,t,l)}}function Oa(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){Ae(e,t,u)}}function qt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(u){Ae(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){Ae(e,t,u)}else n.current=null}function Yd(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){Ae(e,e.return,u)}}function _r(e,t,n){try{var l=e.stateNode;w0(l,e.type,n,t),l[at]=t}catch(u){Ae(e,e.return,u)}}function Vd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dn(e.type)||e.tag===4}function Cr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vd(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&&Dn(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 Nr(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=Zt));else if(l!==4&&(l===27&&Dn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Nr(e,t,n),e=e.sibling;e!==null;)Nr(e,t,n),e=e.sibling}function Fi(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&&Dn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Fi(e,t,n),e=e.sibling;e!==null;)Fi(e,t,n),e=e.sibling}function Gd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Ie(t,l,n),t[Je]=e,t[at]=n}catch(r){Ae(e,e.return,r)}}var nn=!1,Ye=!1,Rr=!1,Xd=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function f0(e,t){if(e=e.containerInfo,$r=vu,e=tf(e),Ss(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 f=0,m=-1,x=-1,R=0,z=0,H=e,j=null;t:for(;;){for(var w;H!==n||u!==0&&H.nodeType!==3||(m=f+u),H!==r||l!==0&&H.nodeType!==3||(x=f+l),H.nodeType===3&&(f+=H.nodeValue.length),(w=H.firstChild)!==null;)j=H,H=w;for(;;){if(H===e)break t;if(j===n&&++R===u&&(m=f),j===r&&++z===l&&(x=f),(w=H.nextSibling)!==null)break;H=j,j=H.parentNode}H=w}n=m===-1||x===-1?null:{start:m,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fr={focusedElem:e,selectionRange:n},vu=!1,Ze=t;Ze!==null;)if(t=Ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ze=e;else for(;Ze!==null;){switch(t=Ze,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 $=ll(n.type,u);e=l.getSnapshotBeforeUpdate($,r),l.__reactInternalSnapshotBeforeUpdate=e}catch(ne){Ae(n,n.return,ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Pr(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pr(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,Ze=e;break}Ze=t.return}}function Qd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:an(e,n),l&4&&ja(5,n);break;case 1:if(an(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(f){Ae(n,n.return,f)}else{var u=ll(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Ae(n,n.return,f)}}l&64&&Hd(n),l&512&&Oa(n,n.return);break;case 3:if(an(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{Mf(e,t)}catch(f){Ae(n,n.return,f)}}break;case 27:t===null&&l&4&&Gd(n);case 26:case 5:an(e,n),t===null&&l&4&&Yd(n),l&512&&Oa(n,n.return);break;case 12:an(e,n);break;case 31:an(e,n),l&4&&Jd(e,n);break;case 13:an(e,n),l&4&&$d(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=x0.bind(null,n),q0(e,n))));break;case 22:if(l=n.memoizedState!==null||nn,!l){t=t!==null&&t.memoizedState!==null||Ye,u=nn;var r=Ye;nn=l,(Ye=t)&&!r?un(e,n,(n.subtreeFlags&8772)!==0):an(e,n),nn=u,Ye=r}break;case 30:break;default:an(e,n)}}function Zd(e){var t=e.alternate;t!==null&&(e.alternate=null,Zd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&as(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 je=null,ut=!1;function ln(e,t,n){for(n=n.child;n!==null;)Kd(e,t,n),n=n.sibling}function Kd(e,t,n){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(ta,n)}catch{}switch(n.tag){case 26:Ye||qt(n,t),ln(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ye||qt(n,t);var l=je,u=ut;Dn(n.type)&&(je=n.stateNode,ut=!1),ln(e,t,n),qa(n.stateNode),je=l,ut=u;break;case 5:Ye||qt(n,t);case 6:if(l=je,u=ut,je=null,ln(e,t,n),je=l,ut=u,je!==null)if(ut)try{(je.nodeType===9?je.body:je.nodeName==="HTML"?je.ownerDocument.body:je).removeChild(n.stateNode)}catch(r){Ae(n,t,r)}else try{je.removeChild(n.stateNode)}catch(r){Ae(n,t,r)}break;case 18:je!==null&&(ut?(e=je,Hh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),$l(e)):Hh(je,n.stateNode));break;case 4:l=je,u=ut,je=n.stateNode.containerInfo,ut=!0,ln(e,t,n),je=l,ut=u;break;case 0:case 11:case 14:case 15:Nn(2,n,t),Ye||Nn(4,n,t),ln(e,t,n);break;case 1:Ye||(qt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&qd(n,t,l)),ln(e,t,n);break;case 21:ln(e,t,n);break;case 22:Ye=(l=Ye)||n.memoizedState!==null,ln(e,t,n),Ye=l;break;default:ln(e,t,n)}}function Jd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$l(e)}catch(n){Ae(t,t.return,n)}}}function $d(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$l(e)}catch(n){Ae(t,t.return,n)}}function d0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xd),t;default:throw Error(c(435,e.tag))}}function Wi(e,t){var n=d0(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var u=S0.bind(null,e,l);l.then(u,u)}})}function st(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var u=n[l],r=e,f=t,m=f;e:for(;m!==null;){switch(m.tag){case 27:if(Dn(m.type)){je=m.stateNode,ut=!1;break e}break;case 5:je=m.stateNode,ut=!1;break e;case 3:case 4:je=m.stateNode.containerInfo,ut=!0;break e}m=m.return}if(je===null)throw Error(c(160));Kd(r,f,u),je=null,ut=!1,r=u.alternate,r!==null&&(r.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Fd(t,e),t=t.sibling}var Dt=null;function Fd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:st(t,e),rt(e),l&4&&(Nn(3,e,e.return),ja(3,e),Nn(5,e,e.return));break;case 1:st(t,e),rt(e),l&512&&(Ye||n===null||qt(n,n.return)),l&64&&nn&&(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=Dt;if(st(t,e),rt(e),l&512&&(Ye||n===null||qt(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[aa]||r[Je]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=u.createElement(l),u.head.insertBefore(r,u.querySelector("head > title"))),Ie(r,l,n),r[Je]=e,Qe(r),l=r;break e;case"link":var f=Fh("link","href",u).get(l+(n.href||""));if(f){for(var m=0;m<f.length;m++)if(r=f[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)){f.splice(m,1);break t}}r=u.createElement(l),Ie(r,l,n),u.head.appendChild(r);break;case"meta":if(f=Fh("meta","content",u).get(l+(n.content||""))){for(m=0;m<f.length;m++)if(r=f[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)){f.splice(m,1);break t}}r=u.createElement(l),Ie(r,l,n),u.head.appendChild(r);break;default:throw Error(c(468,l))}r[Je]=e,Qe(r),l=r}e.stateNode=l}else Wh(u,e.type,e.stateNode);else e.stateNode=$h(u,l,e.memoizedProps);else r!==l?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,l===null?Wh(u,e.type,e.stateNode):$h(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&_r(e,e.memoizedProps,n.memoizedProps)}break;case 27:st(t,e),rt(e),l&512&&(Ye||n===null||qt(n,n.return)),n!==null&&l&4&&_r(e,e.memoizedProps,n.memoizedProps);break;case 5:if(st(t,e),rt(e),l&512&&(Ye||n===null||qt(n,n.return)),e.flags&32){u=e.stateNode;try{gl(u,"")}catch($){Ae(e,e.return,$)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,_r(e,u,n!==null?n.memoizedProps:u)),l&1024&&(Rr=!0);break;case 6:if(st(t,e),rt(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch($){Ae(e,e.return,$)}}break;case 3:if(hu=null,u=Dt,Dt=fu(t.containerInfo),st(t,e),Dt=u,rt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{$l(t.containerInfo)}catch($){Ae(e,e.return,$)}Rr&&(Rr=!1,Wd(e));break;case 4:l=Dt,Dt=fu(e.stateNode.containerInfo),st(t,e),rt(e),Dt=l;break;case 12:st(t,e),rt(e);break;case 31:st(t,e),rt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Wi(e,l)));break;case 13:st(t,e),rt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Pi=ft()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Wi(e,l)));break;case 22:u=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,R=nn,z=Ye;if(nn=R||u,Ye=z||x,st(t,e),Ye=z,nn=R,rt(e),l&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||x||nn||Ye||al(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(r=x.stateNode,u)f=r.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{m=x.stateNode;var H=x.memoizedProps.style,j=H!=null&&H.hasOwnProperty("display")?H.display:null;m.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch($){Ae(x,x.return,$)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=u?"":x.memoizedProps}catch($){Ae(x,x.return,$)}}}else if(t.tag===18){if(n===null){x=t;try{var w=x.stateNode;u?qh(w,!0):qh(x.stateNode,!1)}catch($){Ae(x,x.return,$)}}}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,Wi(e,n))));break;case 19:st(t,e),rt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Wi(e,l)));break;case 30:break;case 21:break;default:st(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Vd(l)){n=l;break}l=l.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var u=n.stateNode,r=Cr(e);Fi(e,r,u);break;case 5:var f=n.stateNode;n.flags&32&&(gl(f,""),n.flags&=-33);var m=Cr(e);Fi(e,m,f);break;case 3:case 4:var x=n.stateNode.containerInfo,R=Cr(e);Nr(e,R,x);break;default:throw Error(c(161))}}catch(z){Ae(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Wd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function an(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qd(e,t.alternate,t),t=t.sibling}function al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Nn(4,t,t.return),al(t);break;case 1:qt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&qd(t,t.return,n),al(t);break;case 27:qa(t.stateNode);case 26:case 5:qt(t,t.return),al(t);break;case 22:t.memoizedState===null&&al(t);break;case 30:al(t);break;default:al(t)}e=e.sibling}}function un(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,u=e,r=t,f=r.flags;switch(r.tag){case 0:case 11:case 15:un(u,r,n),ja(4,r);break;case 1:if(un(u,r,n),l=r,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(R){Ae(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++)Rf(x[u],m)}catch(R){Ae(l,l.return,R)}}n&&f&64&&Hd(r),Oa(r,r.return);break;case 27:Gd(r);case 26:case 5:un(u,r,n),n&&l===null&&f&4&&Yd(r),Oa(r,r.return);break;case 12:un(u,r,n);break;case 31:un(u,r,n),n&&f&4&&Jd(u,r);break;case 13:un(u,r,n),n&&f&4&&$d(u,r);break;case 22:r.memoizedState===null&&un(u,r,n),Oa(r,r.return);break;case 30:break;default:un(u,r,n)}t=t.sibling}}function Mr(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&&va(n))}function jr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&va(e))}function Bt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Id(e,t,n,l),t=t.sibling}function Id(e,t,n,l){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Bt(e,t,n,l),u&2048&&ja(9,t);break;case 1:Bt(e,t,n,l);break;case 3:Bt(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&&va(e)));break;case 12:if(u&2048){Bt(e,t,n,l),e=t.stateNode;try{var r=t.memoizedProps,f=r.id,m=r.onPostCommit;typeof m=="function"&&m(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){Ae(t,t.return,x)}}else Bt(e,t,n,l);break;case 31:Bt(e,t,n,l);break;case 13:Bt(e,t,n,l);break;case 23:break;case 22:r=t.stateNode,f=t.alternate,t.memoizedState!==null?r._visibility&2?Bt(e,t,n,l):wa(e,t):r._visibility&2?Bt(e,t,n,l):(r._visibility|=2,kl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Mr(f,t);break;case 24:Bt(e,t,n,l),u&2048&&jr(t.alternate,t);break;default:Bt(e,t,n,l)}}function kl(e,t,n,l,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,f=t,m=n,x=l,R=f.flags;switch(f.tag){case 0:case 11:case 15:kl(r,f,m,x,u),ja(8,f);break;case 23:break;case 22:var z=f.stateNode;f.memoizedState!==null?z._visibility&2?kl(r,f,m,x,u):wa(r,f):(z._visibility|=2,kl(r,f,m,x,u)),u&&R&2048&&Mr(f.alternate,f);break;case 24:kl(r,f,m,x,u),u&&R&2048&&jr(f.alternate,f);break;default:kl(r,f,m,x,u)}t=t.sibling}}function wa(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:wa(n,l),u&2048&&Mr(l.alternate,l);break;case 24:wa(n,l),u&2048&&jr(l.alternate,l);break;default:wa(n,l)}t=t.sibling}}var za=8192;function Hl(e,t,n){if(e.subtreeFlags&za)for(e=e.child;e!==null;)Pd(e,t,n),e=e.sibling}function Pd(e,t,n){switch(e.tag){case 26:Hl(e,t,n),e.flags&za&&e.memoizedState!==null&&I0(n,Dt,e.memoizedState,e.memoizedProps);break;case 5:Hl(e,t,n);break;case 3:case 4:var l=Dt;Dt=fu(e.stateNode.containerInfo),Hl(e,t,n),Dt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=za,za=16777216,Hl(e,t,n),za=l):Hl(e,t,n));break;default:Hl(e,t,n)}}function eh(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];Ze=l,nh(l,e)}eh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)th(e),e=e.sibling}function th(e){switch(e.tag){case 0:case 11:case 15:Da(e),e.flags&2048&&Nn(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,Ii(e)):Da(e);break;default:Da(e)}}function Ii(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];Ze=l,nh(l,e)}eh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nn(8,t,t.return),Ii(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ii(t));break;default:Ii(t)}e=e.sibling}}function nh(e,t){for(;Ze!==null;){var n=Ze;switch(n.tag){case 0:case 11:case 15:Nn(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:va(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ze=l;else e:for(n=e;Ze!==null;){l=Ze;var u=l.sibling,r=l.return;if(Zd(l),l===n){Ze=null;break e}if(u!==null){u.return=r,Ze=u;break e}Ze=r}}}var h0={getCacheForType:function(e){var t=Fe(ke),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Fe(ke).controller.signal}},m0=typeof WeakMap=="function"?WeakMap:Map,ge=0,Ne=null,oe=null,de=0,Ee=0,gt=null,Rn=!1,ql=!1,Or=!1,sn=0,De=0,Mn=0,il=0,wr=0,bt=0,Yl=0,Ba=null,ct=null,zr=!1,Pi=0,lh=0,eu=1/0,tu=null,jn=null,Ge=0,On=null,Vl=null,rn=0,Dr=0,Br=null,ah=null,Ua=0,Ur=null;function xt(){return(ge&2)!==0&&de!==0?de&-de:D.T!==null?Vr():bo()}function ih(){if(bt===0)if((de&536870912)===0||me){var e=ci;ci<<=1,(ci&3932160)===0&&(ci=262144),bt=e}else bt=536870912;return e=yt.current,e!==null&&(e.flags|=32),bt}function ot(e,t,n){(e===Ne&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Gl(e,0),wn(e,de,bt,!1)),la(e,n),((ge&2)===0||e!==Ne)&&(e===Ne&&((ge&2)===0&&(il|=n),De===4&&wn(e,de,bt,!1)),Yt(e))}function uh(e,t,n){if((ge&6)!==0)throw Error(c(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||na(e,t),u=l?v0(e,t):kr(e,t,!0),r=l;do{if(u===0){ql&&!l&&wn(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!p0(n)){u=kr(e,t,!1),r=!1;continue}if(u===2){if(r=t,e.errorRecoveryDisabledLanes&r)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var m=e;u=Ba;var x=m.current.memoizedState.isDehydrated;if(x&&(Gl(m,f).flags|=256),f=kr(m,f,!1),f!==2){if(Or&&!x){m.errorRecoveryDisabledLanes|=r,il|=r,u=4;break e}r=ct,ct=u,r!==null&&(ct===null?ct=r:ct.push.apply(ct,r))}u=f}if(r=!1,u!==2)continue}}if(u===1){Gl(e,0),wn(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:wn(l,t,bt,!Rn);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=Pi+300-ft(),10<u)){if(wn(l,t,bt,!Rn),fi(l,0,!0)!==0)break e;rn=t,l.timeoutHandle=Lh(sh.bind(null,l,n,ct,tu,zr,t,bt,il,Yl,Rn,r,"Throttled",-0,0),u);break e}sh(l,n,ct,tu,zr,t,bt,il,Yl,Rn,r,null,-0,0)}}break}while(!0);Yt(e)}function sh(e,t,n,l,u,r,f,m,x,R,z,H,j,w){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},Pd(t,r,H);var $=(r&62914560)===r?Pi-ft():(r&4194048)===r?lh-ft():0;if($=P0(H,$),$!==null){rn=r,e.cancelPendingCommit=$(ph.bind(null,e,t,r,n,l,u,f,m,x,z,H,null,j,w)),wn(e,r,f,!R);return}}ph(e,t,r,n,l,u,f,m,x)}function p0(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(!mt(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 wn(e,t,n,l){t&=~wr,t&=~il,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var r=31-ht(u),f=1<<r;l[r]=-1,u&=~f}n!==0&&yo(e,n,t)}function nu(){return(ge&6)===0?(La(0),!1):!0}function Lr(){if(oe!==null){if(Ee===0)var e=oe.return;else e=oe,Ft=Fn=null,Ps(e),zl=null,ba=0,e=oe;for(;e!==null;)kd(e.alternate,e),e=e.return;oe=null}}function Gl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,B0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),rn=0,Lr(),Ne=e,oe=n=Jt(e.current,null),de=t,Ee=0,gt=null,Rn=!1,ql=na(e,t),Or=!1,Yl=bt=wr=il=Mn=De=0,ct=Ba=null,zr=!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-ht(l),r=1<<u;t|=e[u],l&=~r}return sn=t,Ai(),n}function rh(e,t){se=null,D.H=Na,t===wl||t===Oi?(t=Tf(),Ee=3):t===Ys?(t=Tf(),Ee=4):Ee=t===pr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gt=t,oe===null&&(De=1,Qi(e,Tt(t,e.current)))}function ch(){var e=yt.current;return e===null?!0:(de&4194048)===de?Rt===null:(de&62914560)===de||(de&536870912)!==0?e===Rt:!1}function oh(){var e=D.H;return D.H=Na,e===null?Na:e}function fh(){var e=D.A;return D.A=h0,e}function lu(){De=4,Rn||(de&4194048)!==de&&yt.current!==null||(ql=!0),(Mn&134217727)===0&&(il&134217727)===0||Ne===null||wn(Ne,de,bt,!1)}function kr(e,t,n){var l=ge;ge|=2;var u=oh(),r=fh();(Ne!==e||de!==t)&&(tu=null,Gl(e,t)),t=!1;var f=De;e:do try{if(Ee!==0&&oe!==null){var m=oe,x=gt;switch(Ee){case 8:Lr(),f=6;break e;case 3:case 2:case 9:case 6:yt.current===null&&(t=!0);var R=Ee;if(Ee=0,gt=null,Xl(e,m,x,R),n&&ql){f=0;break e}break;default:R=Ee,Ee=0,gt=null,Xl(e,m,x,R)}}y0(),f=De;break}catch(z){rh(e,z)}while(!0);return t&&e.shellSuspendCounter++,Ft=Fn=null,ge=l,D.H=u,D.A=r,oe===null&&(Ne=null,de=0,Ai()),f}function y0(){for(;oe!==null;)dh(oe)}function v0(e,t){var n=ge;ge|=2;var l=oh(),u=fh();Ne!==e||de!==t?(tu=null,eu=ft()+500,Gl(e,t)):ql=na(e,t);e:do try{if(Ee!==0&&oe!==null){t=oe;var r=gt;t:switch(Ee){case 1:Ee=0,gt=null,Xl(e,t,r,1);break;case 2:case 9:if(Ef(r)){Ee=0,gt=null,hh(t);break}t=function(){Ee!==2&&Ee!==9||Ne!==e||(Ee=7),Yt(e)},r.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Ef(r)?(Ee=0,gt=null,hh(t)):(Ee=0,gt=null,Xl(e,t,r,7));break;case 5:var f=null;switch(oe.tag){case 26:f=oe.memoizedState;case 5:case 27:var m=oe;if(f?Ih(f):m.stateNode.complete){Ee=0,gt=null;var x=m.sibling;if(x!==null)oe=x;else{var R=m.return;R!==null?(oe=R,au(R)):oe=null}break t}}Ee=0,gt=null,Xl(e,t,r,5);break;case 6:Ee=0,gt=null,Xl(e,t,r,6);break;case 8:Lr(),De=6;break e;default:throw Error(c(462))}}g0();break}catch(z){rh(e,z)}while(!0);return Ft=Fn=null,D.H=l,D.A=u,ge=n,oe!==null?0:(Ne=null,de=0,Ai(),De)}function g0(){for(;oe!==null&&!Yp();)dh(oe)}function dh(e){var t=Ud(e.alternate,e,sn);e.memoizedProps=e.pendingProps,t===null?au(e):oe=t}function hh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=jd(n,t,t.pendingProps,t.type,void 0,de);break;case 11:t=jd(n,t,t.pendingProps,t.type.render,t.ref,de);break;case 5:Ps(t);default:kd(n,t),t=oe=ff(t,sn),t=Ud(n,t,sn)}e.memoizedProps=e.pendingProps,t===null?au(e):oe=t}function Xl(e,t,n,l){Ft=Fn=null,Ps(t),zl=null,ba=0;var u=t.return;try{if(u0(e,u,t,n,de)){De=1,Qi(e,Tt(n,e.current)),oe=null;return}}catch(r){if(u!==null)throw oe=u,r;De=1,Qi(e,Tt(n,e.current)),oe=null;return}t.flags&32768?(me||l===1?e=!0:ql||(de&536870912)!==0?e=!1:(Rn=e=!0,(l===2||l===9||l===3||l===6)&&(l=yt.current,l!==null&&l.tag===13&&(l.flags|=16384))),mh(t,e)):au(t)}function au(e){var t=e;do{if((t.flags&32768)!==0){mh(t,Rn);return}e=t.return;var n=c0(t.alternate,t,sn);if(n!==null){oe=n;return}if(t=t.sibling,t!==null){oe=t;return}oe=t=e}while(t!==null);De===0&&(De=5)}function mh(e,t){do{var n=o0(e.alternate,e);if(n!==null){n.flags&=32767,oe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){oe=e;return}oe=e=n}while(e!==null);De=6,oe=null}function ph(e,t,n,l,u,r,f,m,x){e.cancelPendingCommit=null;do iu();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|=Cs,Wp(e,n,r,f,m,x),e===Ne&&(oe=Ne=null,de=0),Vl=t,On=e,rn=n,Dr=r,Br=u,ah=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,E0(si,function(){return xh(),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,f=ge,ge|=4;try{f0(e,t,n)}finally{ge=f,Z.p=u,D.T=l}}Ge=1,yh(),vh(),gh()}}function yh(){if(Ge===1){Ge=0;var e=On,t=Vl,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{Fd(t,e);var r=Fr,f=tf(e.containerInfo),m=r.focusedElem,x=r.selectionRange;if(f!==m&&m&&m.ownerDocument&&ef(m.ownerDocument.documentElement,m)){if(x!==null&&Ss(m)){var R=x.start,z=x.end;if(z===void 0&&(z=R),"selectionStart"in m)m.selectionStart=R,m.selectionEnd=Math.min(z,m.value.length);else{var H=m.ownerDocument||document,j=H&&H.defaultView||window;if(j.getSelection){var w=j.getSelection(),$=m.textContent.length,ne=Math.min(x.start,$),Ce=x.end===void 0?ne:Math.min(x.end,$);!w.extend&&ne>Ce&&(f=Ce,Ce=ne,ne=f);var _=Po(m,ne),S=Po(m,Ce);if(_&&S&&(w.rangeCount!==1||w.anchorNode!==_.node||w.anchorOffset!==_.offset||w.focusNode!==S.node||w.focusOffset!==S.offset)){var N=H.createRange();N.setStart(_.node,_.offset),w.removeAllRanges(),ne>Ce?(w.addRange(N),w.extend(S.node,S.offset)):(N.setEnd(S.node,S.offset),w.addRange(N))}}}}for(H=[],w=m;w=w.parentNode;)w.nodeType===1&&H.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<H.length;m++){var U=H[m];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}vu=!!$r,Fr=$r=null}finally{ge=u,Z.p=l,D.T=n}}e.current=t,Ge=2}}function vh(){if(Ge===2){Ge=0;var e=On,t=Vl,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 gh(){if(Ge===4||Ge===3){Ge=0,Vp();var e=On,t=Vl,n=rn,l=ah;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ge=5:(Ge=0,Vl=On=null,bh(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(jn=null),ns(n),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(ta,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,f=0;f<l.length;f++){var m=l[f];r(m.value,{componentStack:m.stack})}}finally{D.T=t,Z.p=u}}(rn&3)!==0&&iu(),Yt(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===Ur?Ua++:(Ua=0,Ur=e):Ua=0,La(0)}}function bh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,va(t)))}function iu(){return yh(),vh(),gh(),xh()}function xh(){if(Ge!==5)return!1;var e=On,t=Dr;Dr=0;var n=ns(rn),l=D.T,u=Z.p;try{Z.p=32>n?32:n,D.T=null,n=Br,Br=null;var r=On,f=rn;if(Ge=0,Vl=On=null,rn=0,(ge&6)!==0)throw Error(c(331));var m=ge;if(ge|=4,th(r.current),Id(r,r.current,f,n),ge=m,La(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(ta,r)}catch{}return!0}finally{Z.p=u,D.T=l,bh(e,t)}}function Sh(e,t,n){t=Tt(n,t),t=mr(e.stateNode,t,2),e=Tn(e,t,2),e!==null&&(la(e,2),Yt(e))}function Ae(e,t,n){if(e.tag===3)Sh(e,e,n);else for(;t!==null;){if(t.tag===3){Sh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(jn===null||!jn.has(l))){e=Tt(n,e),n=Ed(2),l=Tn(t,n,2),l!==null&&(Ad(n,l,t,e),la(l,2),Yt(l));break}}t=t.return}}function Hr(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new m0;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)||(Or=!0,u.add(n),e=b0.bind(null,e,t,n),t.then(e,e))}function b0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ne===e&&(de&n)===n&&(De===4||De===3&&(de&62914560)===de&&300>ft()-Pi?(ge&2)===0&&Gl(e,0):wr|=n,Yl===de&&(Yl=0)),Yt(e)}function Eh(e,t){t===0&&(t=po()),e=Kn(e,t),e!==null&&(la(e,t),Yt(e))}function x0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Eh(e,n)}function S0(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),Eh(e,n)}function E0(e,t){return Iu(e,t)}var uu=null,Ql=null,qr=!1,su=!1,Yr=!1,zn=0;function Yt(e){e!==Ql&&e.next===null&&(Ql===null?uu=Ql=e:Ql=Ql.next=e),su=!0,qr||(qr=!0,T0())}function La(e,t){if(!Yr&&su){Yr=!0;do for(var n=!1,l=uu;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var r=0;else{var f=l.suspendedLanes,m=l.pingedLanes;r=(1<<31-ht(42|e)+1)-1,r&=u&~(f&~m),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Ch(l,r))}else r=de,r=fi(l,l===Ne?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||na(l,r)||(n=!0,Ch(l,r));l=l.next}while(n);Yr=!1}}function A0(){Ah()}function Ah(){su=qr=!1;var e=0;zn!==0&&D0()&&(e=zn);for(var t=ft(),n=null,l=uu;l!==null;){var u=l.next,r=Th(l,t);r===0?(l.next=null,n===null?uu=u:n.next=u,u===null&&(Ql=n)):(n=l,(e!==0||(r&3)!==0)&&(su=!0)),l=u}Ge!==0&&Ge!==5||La(e),zn!==0&&(zn=0)}function Th(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var f=31-ht(r),m=1<<f,x=u[f];x===-1?((m&n)===0||(m&l)!==0)&&(u[f]=Fp(m,t)):x<=t&&(e.expiredLanes|=m),r&=~m}if(t=Ne,n=de,n=fi(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Pu(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||na(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Pu(l),ns(n)){case 2:case 8:n=ho;break;case 32:n=si;break;case 268435456:n=mo;break;default:n=si}return l=_h.bind(null,e),n=Iu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Pu(l),e.callbackPriority=2,e.callbackNode=null,2}function _h(e,t){if(Ge!==0&&Ge!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(iu()&&e.callbackNode!==n)return null;var l=de;return l=fi(e,e===Ne?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(uh(e,l,t),Th(e,ft()),e.callbackNode!=null&&e.callbackNode===n?_h.bind(null,e):null)}function Ch(e,t){if(iu())return null;uh(e,t,!0)}function T0(){U0(function(){(ge&6)!==0?Iu(fo,A0):Ah()})}function Vr(){if(zn===0){var e=jl;e===0&&(e=ri,ri<<=1,(ri&261888)===0&&(ri=256)),zn=e}return zn}function Nh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pi(""+e)}function Rh(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 _0(e,t,n,l,u){if(t==="submit"&&n&&n.stateNode===u){var r=Nh((u[at]||null).action),f=l.submitter;f&&(t=(t=f[at]||null)?Nh(t.formAction):f.getAttribute("formAction"),t!==null&&(r=t,f=null));var m=new bi("action","action",null,l,u);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zn!==0){var x=f?Rh(u,f):new FormData(u);rr(n,{pending:!0,data:x,method:u.method,action:r},null,x)}}else typeof r=="function"&&(m.preventDefault(),x=f?Rh(u,f):new FormData(u),rr(n,{pending:!0,data:x,method:u.method,action:r},r,x))},currentTarget:u}]})}}for(var Gr=0;Gr<_s.length;Gr++){var Xr=_s[Gr],C0=Xr.toLowerCase(),N0=Xr[0].toUpperCase()+Xr.slice(1);zt(C0,"on"+N0)}zt(af,"onAnimationEnd"),zt(uf,"onAnimationIteration"),zt(sf,"onAnimationStart"),zt("dblclick","onDoubleClick"),zt("focusin","onFocus"),zt("focusout","onBlur"),zt(Gy,"onTransitionRun"),zt(Xy,"onTransitionStart"),zt(Qy,"onTransitionCancel"),zt(rf,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ka="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(" "),R0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ka));function Mh(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 f=l.length-1;0<=f;f--){var m=l[f],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(z){Ei(z)}u.currentTarget=null,r=x}else for(f=0;f<l.length;f++){if(m=l[f],x=m.instance,R=m.currentTarget,m=m.listener,x!==r&&u.isPropagationStopped())break e;r=m,u.currentTarget=R;try{r(u)}catch(z){Ei(z)}u.currentTarget=null,r=x}}}}function fe(e,t){var n=t[ls];n===void 0&&(n=t[ls]=new Set);var l=e+"__bubble";n.has(l)||(jh(t,e,2,!1),n.add(l))}function Qr(e,t,n){var l=0;t&&(l|=4),jh(n,e,l,t)}var ru="_reactListening"+Math.random().toString(36).slice(2);function Zr(e){if(!e[ru]){e[ru]=!0,Eo.forEach(function(n){n!=="selectionchange"&&(R0.has(n)||Qr(n,!1,e),Qr(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ru]||(t[ru]=!0,Qr("selectionchange",!1,t))}}function jh(e,t,n,l){switch(im(t)){case 2:var u=nv;break;case 8:u=lv;break;default:u=sc}n=u.bind(null,t,n,e),u=void 0,!ds||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 Kr(e,t,n,l,u){var r=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var m=l.stateNode.containerInfo;if(m===u)break;if(f===4)for(f=l.return;f!==null;){var x=f.tag;if((x===3||x===4)&&f.stateNode.containerInfo===u)return;f=f.return}for(;m!==null;){if(f=hl(m),f===null)return;if(x=f.tag,x===5||x===6||x===26||x===27){l=r=f;continue e}m=m.parentNode}}l=l.return}Do(function(){var R=r,z=os(n),H=[];e:{var j=cf.get(e);if(j!==void 0){var w=bi,$=e;switch(e){case"keypress":if(vi(n)===0)break e;case"keydown":case"keyup":w=Sy;break;case"focusin":$="focus",w=ys;break;case"focusout":$="blur",w=ys;break;case"beforeblur":case"afterblur":w=ys;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":w=Lo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=cy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=Ty;break;case af:case uf:case sf:w=dy;break;case rf:w=Cy;break;case"scroll":case"scrollend":w=sy;break;case"wheel":w=Ry;break;case"copy":case"cut":case"paste":w=my;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=Ho;break;case"toggle":case"beforetoggle":w=jy}var ne=(t&4)!==0,Ce=!ne&&(e==="scroll"||e==="scrollend"),_=ne?j!==null?j+"Capture":null:j;ne=[];for(var S=R,N;S!==null;){var U=S;if(N=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||N===null||_===null||(U=ua(S,_),U!=null&&ne.push(Ha(S,U,N))),Ce)break;S=S.return}0<ne.length&&(j=new w(j,$,null,n,z),H.push({event:j,listeners:ne}))}}if((t&7)===0){e:{if(j=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",j&&n!==cs&&($=n.relatedTarget||n.fromElement)&&(hl($)||$[dl]))break e;if((w||j)&&(j=z.window===z?z:(j=z.ownerDocument)?j.defaultView||j.parentWindow:window,w?($=n.relatedTarget||n.toElement,w=R,$=$?hl($):null,$!==null&&(Ce=d($),ne=$.tag,$!==Ce||ne!==5&&ne!==27&&ne!==6)&&($=null)):(w=null,$=R),w!==$)){if(ne=Lo,U="onMouseLeave",_="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ne=Ho,U="onPointerLeave",_="onPointerEnter",S="pointer"),Ce=w==null?j:ia(w),N=$==null?j:ia($),j=new ne(U,S+"leave",w,n,z),j.target=Ce,j.relatedTarget=N,U=null,hl(z)===R&&(ne=new ne(_,S+"enter",$,n,z),ne.target=N,ne.relatedTarget=Ce,U=ne),Ce=U,w&&$)t:{for(ne=M0,_=w,S=$,N=0,U=_;U;U=ne(U))N++;U=0;for(var P=S;P;P=ne(P))U++;for(;0<N-U;)_=ne(_),N--;for(;0<U-N;)S=ne(S),U--;for(;N--;){if(_===S||S!==null&&_===S.alternate){ne=_;break t}_=ne(_),S=ne(S)}ne=null}else ne=null;w!==null&&Oh(H,j,w,ne,!1),$!==null&&Ce!==null&&Oh(H,Ce,$,ne,!0)}}e:{if(j=R?ia(R):window,w=j.nodeName&&j.nodeName.toLowerCase(),w==="select"||w==="input"&&j.type==="file")var ye=Ko;else if(Qo(j))if(Jo)ye=qy;else{ye=ky;var I=Ly}else w=j.nodeName,!w||w.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?R&&rs(R.elementType)&&(ye=Ko):ye=Hy;if(ye&&(ye=ye(e,R))){Zo(H,ye,n,z);break e}I&&I(e,j,R),e==="focusout"&&R&&j.type==="number"&&R.memoizedProps.value!=null&&ss(j,"number",j.value)}switch(I=R?ia(R):window,e){case"focusin":(Qo(I)||I.contentEditable==="true")&&(El=I,Es=R,ma=null);break;case"focusout":ma=Es=El=null;break;case"mousedown":As=!0;break;case"contextmenu":case"mouseup":case"dragend":As=!1,nf(H,n,z);break;case"selectionchange":if(Vy)break;case"keydown":case"keyup":nf(H,n,z)}var re;if(gs)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else Sl?Go(e,n)&&(he="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(he="onCompositionStart");he&&(qo&&n.locale!=="ko"&&(Sl||he!=="onCompositionStart"?he==="onCompositionEnd"&&Sl&&(re=Bo()):(vn=z,hs="value"in vn?vn.value:vn.textContent,Sl=!0)),I=cu(R,he),0<I.length&&(he=new ko(he,e,null,n,z),H.push({event:he,listeners:I}),re?he.data=re:(re=Xo(n),re!==null&&(he.data=re)))),(re=wy?zy(e,n):Dy(e,n))&&(he=cu(R,"onBeforeInput"),0<he.length&&(I=new ko("onBeforeInput","beforeinput",null,n,z),H.push({event:I,listeners:he}),I.data=re)),_0(H,e,R,n,z)}Mh(H,t)})}function Ha(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cu(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=ua(e,n),u!=null&&l.unshift(Ha(e,u,r)),u=ua(e,t),u!=null&&l.push(Ha(e,u,r))),e.tag===3)return l;e=e.return}return[]}function M0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Oh(e,t,n,l,u){for(var r=t._reactName,f=[];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=ua(n,r),R!=null&&f.unshift(Ha(n,R,x))):u||(R=ua(n,r),R!=null&&f.push(Ha(n,R,x)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var j0=/\r\n?/g,O0=/\u0000|\uFFFD/g;function wh(e){return(typeof e=="string"?e:""+e).replace(j0,`
`).replace(O0,"")}function zh(e,t){return t=wh(t),wh(e)===t}function _e(e,t,n,l,u,r){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||gl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&gl(e,""+l);break;case"className":hi(e,"class",l);break;case"tabIndex":hi(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":hi(e,n,l);break;case"style":wo(e,l,r);break;case"data":if(t!=="object"){hi(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=pi(""+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=pi(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"onScroll":l!=null&&fe("scroll",e);break;case"onScrollEnd":l!=null&&fe("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=pi(""+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":fe("beforetoggle",e),fe("toggle",e),di(e,"popover",l);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":di(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=iy.get(n)||n,di(e,n,l))}}function Jr(e,t,n,l,u,r){switch(n){case"style":wo(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"?gl(e,l):(typeof l=="number"||typeof l=="bigint")&&gl(e,""+l);break;case"onScroll":l!=null&&fe("scroll",e);break;case"onScrollEnd":l!=null&&fe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ao.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[at]||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,""):di(e,n,l)}}}function Ie(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":fe("error",e),fe("load",e);var l=!1,u=!1,r;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=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,f,n,null)}}u&&_e(e,t,"srcSet",n.srcSet,n,null),l&&_e(e,t,"src",n.src,n,null);return;case"input":fe("invalid",e);var m=r=f=u=null,x=null,R=null;for(l in n)if(n.hasOwnProperty(l)){var z=n[l];if(z!=null)switch(l){case"name":u=z;break;case"type":f=z;break;case"checked":x=z;break;case"defaultChecked":R=z;break;case"value":r=z;break;case"defaultValue":m=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(c(137,t));break;default:_e(e,t,l,z,n,null)}}Ro(e,r,m,x,R,f,u,!1);return;case"select":fe("invalid",e),l=f=r=null;for(u in n)if(n.hasOwnProperty(u)&&(m=n[u],m!=null))switch(u){case"value":r=m;break;case"defaultValue":f=m;break;case"multiple":l=m;default:_e(e,t,u,m,n,null)}t=r,n=f,e.multiple=!!l,t!=null?vl(e,!!l,t,!1):n!=null&&vl(e,!!l,n,!0);return;case"textarea":fe("invalid",e),r=u=l=null;for(f in n)if(n.hasOwnProperty(f)&&(m=n[f],m!=null))switch(f){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,f,m,n,null)}jo(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":fe("beforetoggle",e),fe("toggle",e),fe("cancel",e),fe("close",e);break;case"iframe":case"object":fe("load",e);break;case"video":case"audio":for(l=0;l<ka.length;l++)fe(ka[l],e);break;case"image":fe("error",e),fe("load",e);break;case"details":fe("toggle",e);break;case"embed":case"source":case"link":fe("error",e),fe("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(rs(t)){for(z in n)n.hasOwnProperty(z)&&(l=n[z],l!==void 0&&Jr(e,t,z,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 w0(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,f=null,m=null,x=null,R=null,z=null;for(w in n){var H=n[w];if(n.hasOwnProperty(w)&&H!=null)switch(w){case"checked":break;case"value":break;case"defaultValue":x=H;default:l.hasOwnProperty(w)||_e(e,t,w,null,l,H)}}for(var j in l){var w=l[j];if(H=n[j],l.hasOwnProperty(j)&&(w!=null||H!=null))switch(j){case"type":r=w;break;case"name":u=w;break;case"checked":R=w;break;case"defaultChecked":z=w;break;case"value":f=w;break;case"defaultValue":m=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(c(137,t));break;default:w!==H&&_e(e,t,j,w,l,H)}}us(e,f,m,x,R,z,r,u);return;case"select":w=f=m=j=null;for(r in n)if(x=n[r],n.hasOwnProperty(r)&&x!=null)switch(r){case"value":break;case"multiple":w=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":f=r;default:r!==x&&_e(e,t,u,r,l,x)}t=m,n=f,l=w,j!=null?vl(e,!!n,j,!1):!!l!=!!n&&(t!=null?vl(e,!!n,t,!0):vl(e,!!n,n?[]:"",!1));return;case"textarea":w=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(f in l)if(u=l[f],r=n[f],l.hasOwnProperty(f)&&(u!=null||r!=null))switch(f){case"value":j=u;break;case"defaultValue":w=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==r&&_e(e,t,f,u,l,r)}Mo(e,j,w);return;case"option":for(var $ in n)if(j=n[$],n.hasOwnProperty($)&&j!=null&&!l.hasOwnProperty($))switch($){case"selected":e.selected=!1;break;default:_e(e,t,$,null,l,j)}for(x in l)if(j=l[x],w=n[x],l.hasOwnProperty(x)&&j!==w&&(j!=null||w!=null))switch(x){case"selected":e.selected=j&&typeof j!="function"&&typeof j!="symbol";break;default:_e(e,t,x,j,l,w)}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 ne in n)j=n[ne],n.hasOwnProperty(ne)&&j!=null&&!l.hasOwnProperty(ne)&&_e(e,t,ne,null,l,j);for(R in l)if(j=l[R],w=n[R],l.hasOwnProperty(R)&&j!==w&&(j!=null||w!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(c(137,t));break;default:_e(e,t,R,j,l,w)}return;default:if(rs(t)){for(var Ce in n)j=n[Ce],n.hasOwnProperty(Ce)&&j!==void 0&&!l.hasOwnProperty(Ce)&&Jr(e,t,Ce,void 0,l,j);for(z in l)j=l[z],w=n[z],!l.hasOwnProperty(z)||j===w||j===void 0&&w===void 0||Jr(e,t,z,j,l,w);return}}for(var _ in n)j=n[_],n.hasOwnProperty(_)&&j!=null&&!l.hasOwnProperty(_)&&_e(e,t,_,null,l,j);for(H in l)j=l[H],w=n[H],!l.hasOwnProperty(H)||j===w||j==null&&w==null||_e(e,t,H,j,l,w)}function Dh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function z0(){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,f=u.initiatorType,m=u.duration;if(r&&m&&Dh(f)){for(f=0,m=u.responseEnd,l+=1;l<n.length;l++){var x=n[l],R=x.startTime;if(R>m)break;var z=x.transferSize,H=x.initiatorType;z&&Dh(H)&&(x=x.responseEnd,f+=z*(x<m?1:(m-R)/(x-R)))}if(--l,t+=8*(r+f)/(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 $r=null,Fr=null;function ou(e){return e.nodeType===9?e:e.ownerDocument}function Bh(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 Uh(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 Wr(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 Ir=null;function D0(){var e=window.event;return e&&e.type==="popstate"?e===Ir?!1:(Ir=e,!0):(Ir=null,!1)}var Lh=typeof setTimeout=="function"?setTimeout:void 0,B0=typeof clearTimeout=="function"?clearTimeout:void 0,kh=typeof Promise=="function"?Promise:void 0,U0=typeof queueMicrotask=="function"?queueMicrotask:typeof kh<"u"?function(e){return kh.resolve(null).then(e).catch(L0)}:Lh;function L0(e){setTimeout(function(){throw e})}function Dn(e){return e==="head"}function Hh(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),$l(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")qa(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,qa(n);for(var r=n.firstChild;r;){var f=r.nextSibling,m=r.nodeName;r[aa]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=f}}else n==="body"&&qa(e.ownerDocument.body);n=u}while(n);$l(t)}function qh(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 Pr(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":Pr(n),as(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function k0(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[aa])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=Mt(e.nextSibling),e===null)break}return null}function H0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Mt(e.nextSibling),e===null))return null;return e}function Yh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Mt(e.nextSibling),e===null))return null;return e}function ec(e){return e.data==="$?"||e.data==="$~"}function tc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function q0(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 Mt(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 nc=null;function Vh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Mt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Gh(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 Xh(e,t,n){switch(t=ou(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 qa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);as(e)}var jt=new Map,Qh=new Set;function fu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=Z.d;Z.d={f:Y0,r:V0,D:G0,C:X0,L:Q0,m:Z0,X:J0,S:K0,M:$0};function Y0(){var e=cn.f(),t=nu();return e||t}function V0(e){var t=ml(e);t!==null&&t.tag===5&&t.type==="form"?rd(t):cn.r(e)}var Zl=typeof document>"u"?null:document;function Zh(e,t,n){var l=Zl;if(l&&typeof t=="string"&&t){var u=Et(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"),Ie(t,"link",e),Qe(t),l.head.appendChild(t)))}}function G0(e){cn.D(e),Zh("dns-prefetch",e,null)}function X0(e,t){cn.C(e,t),Zh("preconnect",e,t)}function Q0(e,t,n){cn.L(e,t,n);var l=Zl;if(l&&e&&t){var u='link[rel="preload"][as="'+Et(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+Et(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+Et(n.imageSizes)+'"]')):u+='[href="'+Et(e)+'"]';var r=u;switch(t){case"style":r=Kl(e);break;case"script":r=Jl(e)}jt.has(r)||(e=T({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),jt.set(r,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(Ya(r))||t==="script"&&l.querySelector(Va(r))||(t=l.createElement("link"),Ie(t,"link",e),Qe(t),l.head.appendChild(t)))}}function Z0(e,t){cn.m(e,t);var n=Zl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Et(l)+'"][href="'+Et(e)+'"]',r=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Jl(e)}if(!jt.has(r)&&(e=T({rel:"modulepreload",href:e},t),jt.set(r,e),n.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Va(r)))return}l=n.createElement("link"),Ie(l,"link",e),Qe(l),n.head.appendChild(l)}}}function K0(e,t,n){cn.S(e,t,n);var l=Zl;if(l&&e){var u=pl(l).hoistableStyles,r=Kl(e);t=t||"default";var f=u.get(r);if(!f){var m={loading:0,preload:null};if(f=l.querySelector(Ya(r)))m.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},n),(n=jt.get(r))&&lc(e,n);var x=f=l.createElement("link");Qe(x),Ie(x,"link",e),x._p=new Promise(function(R,z){x.onload=R,x.onerror=z}),x.addEventListener("load",function(){m.loading|=1}),x.addEventListener("error",function(){m.loading|=2}),m.loading|=4,du(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:m},u.set(r,f)}}}function J0(e,t){cn.X(e,t);var n=Zl;if(n&&e){var l=pl(n).hoistableScripts,u=Jl(e),r=l.get(u);r||(r=n.querySelector(Va(u)),r||(e=T({src:e,async:!0},t),(t=jt.get(u))&&ac(e,t),r=n.createElement("script"),Qe(r),Ie(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(u,r))}}function $0(e,t){cn.M(e,t);var n=Zl;if(n&&e){var l=pl(n).hoistableScripts,u=Jl(e),r=l.get(u);r||(r=n.querySelector(Va(u)),r||(e=T({src:e,async:!0,type:"module"},t),(t=jt.get(u))&&ac(e,t),r=n.createElement("script"),Qe(r),Ie(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(u,r))}}function Kh(e,t,n,l){var u=(u=ce.current)?fu(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=Kl(n.href),n=pl(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=Kl(n.href);var r=pl(u).hoistableStyles,f=r.get(e);if(f||(u=u.ownerDocument||u,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,f),(r=u.querySelector(Ya(e)))&&!r._p&&(f.instance=r,f.state.loading=5),jt.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},jt.set(e,n),r||F0(u,e,n,f.state))),t&&l===null)throw Error(c(528,""));return f}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=Jl(n),n=pl(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 Kl(e){return'href="'+Et(e)+'"'}function Ya(e){return'link[rel="stylesheet"]['+e+"]"}function Jh(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function F0(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}),Ie(t,"link",n),Qe(t),e.head.appendChild(t))}function Jl(e){return'[src="'+Et(e)+'"]'}function Va(e){return"script[async]"+e}function $h(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Et(n.href)+'"]');if(l)return t.instance=l,Qe(l),l;var u=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Qe(l),Ie(l,"style",u),du(l,n.precedence,e),t.instance=l;case"stylesheet":u=Kl(n.href);var r=e.querySelector(Ya(u));if(r)return t.state.loading|=4,t.instance=r,Qe(r),r;l=Jh(n),(u=jt.get(u))&&lc(l,u),r=(e.ownerDocument||e).createElement("link"),Qe(r);var f=r;return f._p=new Promise(function(m,x){f.onload=m,f.onerror=x}),Ie(r,"link",l),t.state.loading|=4,du(r,n.precedence,e),t.instance=r;case"script":return r=Jl(n.src),(u=e.querySelector(Va(r)))?(t.instance=u,Qe(u),u):(l=n,(u=jt.get(r))&&(l=T({},n),ac(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),Qe(u),Ie(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,du(l,n.precedence,e));return t.instance}function du(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,f=0;f<l.length;f++){var m=l[f];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 lc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ac(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hu=null;function Fh(e,t,n){if(hu===null){var l=new Map,u=hu=new Map;u.set(n,l)}else u=hu,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[aa]||r[Je]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var f=r.getAttribute(t)||"";f=e+f;var m=l.get(f);m?m.push(r):l.set(f,[r])}}return l}function Wh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function W0(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 Ih(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function I0(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=Kl(l.href),r=t.querySelector(Ya(u));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=mu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=r,Qe(r);return}r=t.ownerDocument||t,l=Jh(l),(u=jt.get(u))&&lc(l,u),r=r.createElement("link"),Qe(r);var f=r;f._p=new Promise(function(m,x){f.onload=m,f.onerror=x}),Ie(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=mu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var ic=0;function P0(e,t){return e.stylesheets&&e.count===0&&yu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&yu(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&ic===0&&(ic=62500*z0());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yu(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>ic?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function mu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pu=null;function yu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pu=new Map,t.forEach(ev,e),pu=null,mu.call(e))}function ev(e,t){if(!(t.state.loading&4)){var n=pu.get(e);if(n)var l=n.get(null);else{n=new Map,pu.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<u.length;r++){var f=u[r];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),l=f)}l&&n.set(null,l)}u=t.instance,f=u.getAttribute("data-precedence"),r=n.get(f)||l,r===l&&n.set(null,u),n.set(f,u),this.count++,l=mu.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 Ga={$$typeof:q,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function tv(e,t,n,l,u,r,f,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=es(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=es(0),this.hiddenUpdates=es(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=r,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Ph(e,t,n,l,u,r,f,m,x,R,z,H){return e=new tv(e,t,n,f,x,R,z,H,m),t=1,r===!0&&(t|=24),r=pt(3,null,null,t),e.current=r,r.stateNode=e,t=ks(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:t},Vs(r),e}function em(e){return e?(e=_l,e):_l}function tm(e,t,n,l,u,r){u=em(u),l.context===null?l.context=u:l.pendingContext=u,l=An(t),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=Tn(e,l,t),n!==null&&(ot(n,e,t),Sa(n,e,t))}function nm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function uc(e,t){nm(e,t),(e=e.alternate)&&nm(e,t)}function lm(e){if(e.tag===13||e.tag===31){var t=Kn(e,67108864);t!==null&&ot(t,e,67108864),uc(e,67108864)}}function am(e){if(e.tag===13||e.tag===31){var t=xt();t=ts(t);var n=Kn(e,t);n!==null&&ot(n,e,t),uc(e,t)}}var vu=!0;function nv(e,t,n,l){var u=D.T;D.T=null;var r=Z.p;try{Z.p=2,sc(e,t,n,l)}finally{Z.p=r,D.T=u}}function lv(e,t,n,l){var u=D.T;D.T=null;var r=Z.p;try{Z.p=8,sc(e,t,n,l)}finally{Z.p=r,D.T=u}}function sc(e,t,n,l){if(vu){var u=rc(l);if(u===null)Kr(e,t,l,gu,n),um(e,l);else if(iv(u,e,t,n,l))l.stopPropagation();else if(um(e,l),t&4&&-1<av.indexOf(e)){for(;u!==null;){var r=ml(u);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var f=Vn(r.pendingLanes);if(f!==0){var m=r;for(m.pendingLanes|=2,m.entangledLanes|=2;f;){var x=1<<31-ht(f);m.entanglements[1]|=x,f&=~x}Yt(r),(ge&6)===0&&(eu=ft()+500,La(0))}}break;case 31:case 13:m=Kn(r,2),m!==null&&ot(m,r,2),nu(),uc(r,2)}if(r=rc(l),r===null&&Kr(e,t,l,gu,n),r===u)break;u=r}u!==null&&l.stopPropagation()}else Kr(e,t,l,null,n)}}function rc(e){return e=os(e),cc(e)}var gu=null;function cc(e){if(gu=null,e=hl(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 gu=e,null}function im(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(Gp()){case fo:return 2;case ho:return 8;case si:case Xp:return 32;case mo:return 268435456;default:return 32}default:return 32}}var oc=!1,Bn=null,Un=null,Ln=null,Xa=new Map,Qa=new Map,kn=[],av="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 um(e,t){switch(e){case"focusin":case"focusout":Bn=null;break;case"dragenter":case"dragleave":Un=null;break;case"mouseover":case"mouseout":Ln=null;break;case"pointerover":case"pointerout":Xa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qa.delete(t.pointerId)}}function Za(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=ml(t),t!==null&&lm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function iv(e,t,n,l,u){switch(t){case"focusin":return Bn=Za(Bn,e,t,n,l,u),!0;case"dragenter":return Un=Za(Un,e,t,n,l,u),!0;case"mouseover":return Ln=Za(Ln,e,t,n,l,u),!0;case"pointerover":var r=u.pointerId;return Xa.set(r,Za(Xa.get(r)||null,e,t,n,l,u)),!0;case"gotpointercapture":return r=u.pointerId,Qa.set(r,Za(Qa.get(r)||null,e,t,n,l,u)),!0}return!1}function sm(e){var t=hl(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,xo(e.priority,function(){am(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,xo(e.priority,function(){am(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 bu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=rc(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);cs=l,n.target.dispatchEvent(l),cs=null}else return t=ml(n),t!==null&&lm(t),e.blockedOn=n,!1;t.shift()}return!0}function rm(e,t,n){bu(e)&&n.delete(t)}function uv(){oc=!1,Bn!==null&&bu(Bn)&&(Bn=null),Un!==null&&bu(Un)&&(Un=null),Ln!==null&&bu(Ln)&&(Ln=null),Xa.forEach(rm),Qa.forEach(rm)}function xu(e,t){e.blockedOn===t&&(e.blockedOn=null,oc||(oc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,uv)))}var Su=null;function cm(e){Su!==e&&(Su=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Su===e&&(Su=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(cc(l||n)===null)continue;break}var r=ml(n);r!==null&&(e.splice(t,3),t-=3,rr(r,{pending:!0,data:u,method:n.method,action:l},l,u))}}))}function $l(e){function t(x){return xu(x,e)}Bn!==null&&xu(Bn,e),Un!==null&&xu(Un,e),Ln!==null&&xu(Ln,e),Xa.forEach(t),Qa.forEach(t);for(var n=0;n<kn.length;n++){var l=kn[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<kn.length&&(n=kn[0],n.blockedOn===null);)sm(n),n.blockedOn===null&&kn.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],f=u[at]||null;if(typeof r=="function")f||cm(n);else if(f){var m=null;if(r&&r.hasAttribute("formAction")){if(u=r,f=r[at]||null)m=f.formAction;else if(cc(u)!==null)continue}else m=f.action;typeof m=="function"?n[l+1]=m:(n.splice(l,3),l-=3),cm(n)}}}function om(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(f){return u=f})},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 fc(e){this._internalRoot=e}Eu.prototype.render=fc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,l=xt();tm(n,l,e,t,null,null)},Eu.prototype.unmount=fc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tm(e.current,2,null,e,null,null),nu(),t[dl]=null}};function Eu(e){this._internalRoot=e}Eu.prototype.unstable_scheduleHydration=function(e){if(e){var t=bo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kn.length&&t!==0&&t<kn[n].priority;n++);kn.splice(n,0,e),n===0&&sm(e)}};var fm=a.version;if(fm!=="19.2.0")throw Error(c(527,fm,"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?A(e):null,e=e===null?null:e.stateNode,e};var sv={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Au=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Au.isDisabled&&Au.supportsFiber)try{ta=Au.inject(sv),dt=Au}catch{}}return Ja.createRoot=function(e,t){if(!o(e))throw Error(c(299));var n=!1,l="",u=gd,r=bd,f=xd;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&&(f=t.onRecoverableError)),t=Ph(e,1,!1,null,null,n,l,null,u,r,f,om),e[dl]=t.current,Zr(e),new fc(t)},Ja.hydrateRoot=function(e,t,n){if(!o(e))throw Error(c(299));var l=!1,u="",r=gd,f=bd,m=xd,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&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=Ph(e,1,!0,t,n??null,l,u,x,r,f,m,om),t.context=em(null),n=t.current,l=xt(),l=ts(l),u=An(l),u.callback=null,Tn(n,u,l),n=l,t.current.lanes=n,la(t,n),Yt(t),e[dl]=t.current,Zr(e),new Eu(t)},Ja.version="19.2.0",Ja}var Sm;function vv(){if(Sm)return mc.exports;Sm=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(),mc.exports=yv(),mc.exports}var gv=vv();var Em="popstate";function bv(i={}){function a(c,o){let{pathname:d,search:y,hash:g}=c.location;return jc("",{pathname:d,search:y,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function s(c,o){return typeof o=="string"?o:ei(o)}return Sv(a,s,null,i)}function Oe(i,a){if(i===!1||i===null||typeof i>"u")throw new Error(a)}function Lt(i,a){if(!i){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function xv(){return Math.random().toString(36).substring(2,10)}function Am(i,a){return{usr:i.state,key:i.key,idx:a}}function jc(i,a,s=null,c){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof a=="string"?Wl(a):a,state:s,key:a&&a.key||c||xv()}}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 Wl(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 Sv(i,a,s,c={}){let{window:o=document.defaultView,v5Compat:d=!1}=c,y=o.history,g="POP",p=null,v=A();v==null&&(v=0,y.replaceState({...y.state,idx:v},""));function A(){return(y.state||{idx:null}).idx}function T(){g="POP";let L=A(),V=L==null?null:L-v;v=L,p&&p({action:g,location:B.location,delta:V})}function M(L,V){g="PUSH";let G=jc(B.location,L,V);v=A()+1;let q=Am(G,v),F=B.createHref(G);try{y.pushState(q,"",F)}catch(Y){if(Y instanceof DOMException&&Y.name==="DataCloneError")throw Y;o.location.assign(F)}d&&p&&p({action:g,location:B.location,delta:1})}function C(L,V){g="REPLACE";let G=jc(B.location,L,V);v=A();let q=Am(G,v),F=B.createHref(G);y.replaceState(q,"",F),d&&p&&p({action:g,location:B.location,delta:0})}function O(L){return Ev(L)}let B={get action(){return g},get location(){return i(o,y)},listen(L){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Em,T),p=L,()=>{o.removeEventListener(Em,T),p=null}},createHref(L){return a(o,L)},createURL:O,encodeLocation(L){let V=O(L);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:M,replace:C,go(L){return y.go(L)}};return B}function Ev(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 Qm(i,a,s="/"){return Av(i,a,s,!1)}function Av(i,a,s,c){let o=typeof a=="string"?Wl(a):a,d=dn(o.pathname||"/",s);if(d==null)return null;let y=Zm(i);Tv(y);let g=null;for(let p=0;g==null&&p<y.length;++p){let v=Bv(d);g=zv(y[p],v,c)}return g}function Zm(i,a=[],s=[],c="",o=!1){let d=(y,g,p=o,v)=>{let A={relativePath:v===void 0?y.path||"":v,caseSensitive:y.caseSensitive===!0,childrenIndex:g,route:y};if(A.relativePath.startsWith("/")){if(!A.relativePath.startsWith(c)&&p)return;Oe(A.relativePath.startsWith(c),`Absolute route path "${A.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),A.relativePath=A.relativePath.slice(c.length)}let T=on([c,A.relativePath]),M=s.concat(A);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 "${T}".`),Zm(y.children,a,M,T,p)),!(y.path==null&&!y.index)&&a.push({path:T,score:Ov(T,y.index),routesMeta:M})};return i.forEach((y,g)=>{if(y.path===""||!y.path?.includes("?"))d(y,g);else for(let p of Km(y.path))d(y,g,!0,p)}),a}function Km(i){let a=i.split("/");if(a.length===0)return[];let[s,...c]=a,o=s.endsWith("?"),d=s.replace(/\?$/,"");if(c.length===0)return o?[d,""]:[d];let y=Km(c.join("/")),g=[];return g.push(...y.map(p=>p===""?d:[d,p].join("/"))),o&&g.push(...y),g.map(p=>i.startsWith("/")&&p===""?"/":p)}function Tv(i){i.sort((a,s)=>a.score!==s.score?s.score-a.score:wv(a.routesMeta.map(c=>c.childrenIndex),s.routesMeta.map(c=>c.childrenIndex)))}var _v=/^:[\w-]+$/,Cv=3,Nv=2,Rv=1,Mv=10,jv=-2,Tm=i=>i==="*";function Ov(i,a){let s=i.split("/"),c=s.length;return s.some(Tm)&&(c+=jv),a&&(c+=Nv),s.filter(o=>!Tm(o)).reduce((o,d)=>o+(_v.test(d)?Cv:d===""?Rv:Mv),c)}function wv(i,a){return i.length===a.length&&i.slice(0,-1).every((c,o)=>c===a[o])?i[i.length-1]-a[a.length-1]:0}function zv(i,a,s=!1){let{routesMeta:c}=i,o={},d="/",y=[];for(let g=0;g<c.length;++g){let p=c[g],v=g===c.length-1,A=d==="/"?a:a.slice(d.length)||"/",T=ku({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},A),M=p.route;if(!T&&v&&s&&!c[c.length-1].route.index&&(T=ku({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},A)),!T)return null;Object.assign(o,T.params),y.push({params:o,pathname:on([d,T.pathname]),pathnameBase:qv(on([d,T.pathnameBase])),route:M}),T.pathnameBase!=="/"&&(d=on([d,T.pathnameBase]))}return y}function ku(i,a){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[s,c]=Dv(i.path,i.caseSensitive,i.end),o=a.match(s);if(!o)return null;let d=o[0],y=d.replace(/(.)\/+$/,"$1"),g=o.slice(1);return{params:c.reduce((v,{paramName:A,isOptional:T},M)=>{if(A==="*"){let O=g[M]||"";y=d.slice(0,d.length-O.length).replace(/(.)\/+$/,"$1")}const C=g[M];return T&&!C?v[A]=void 0:v[A]=(C||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:y,pattern:i}}function Dv(i,a=!1,s=!0){Lt(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=[],o="^"+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:"*"}),o+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?o+="\\/*$":i!==""&&i!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,a?void 0:"i"),c]}function Bv(i){try{return i.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Lt(!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 dn(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 Uv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lv=i=>Uv.test(i);function kv(i,a="/"){let{pathname:s,search:c="",hash:o=""}=typeof i=="string"?Wl(i):i,d;if(s)if(Lv(s))d=s;else{if(s.includes("//")){let y=s;s=s.replace(/\/\/+/g,"/"),Lt(!1,`Pathnames cannot have embedded double slashes - normalizing ${y} -> ${s}`)}s.startsWith("/")?d=_m(s.substring(1),"/"):d=_m(s,a)}else d=a;return{pathname:d,search:Yv(c),hash:Vv(o)}}function _m(i,a){let s=a.replace(/\/+$/,"").split("/");return i.split("/").forEach(o=>{o===".."?s.length>1&&s.pop():o!=="."&&s.push(o)}),s.length>1?s.join("/"):"/"}function gc(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 Hv(i){return i.filter((a,s)=>s===0||a.route.path&&a.route.path.length>0)}function Jm(i){let a=Hv(i);return a.map((s,c)=>c===a.length-1?s.pathname:s.pathnameBase)}function $m(i,a,s,c=!1){let o;typeof i=="string"?o=Wl(i):(o={...i},Oe(!o.pathname||!o.pathname.includes("?"),gc("?","pathname","search",o)),Oe(!o.pathname||!o.pathname.includes("#"),gc("#","pathname","hash",o)),Oe(!o.search||!o.search.includes("#"),gc("#","search","hash",o)));let d=i===""||o.pathname==="",y=d?"/":o.pathname,g;if(y==null)g=s;else{let T=a.length-1;if(!c&&y.startsWith("..")){let M=y.split("/");for(;M[0]==="..";)M.shift(),T-=1;o.pathname=M.join("/")}g=T>=0?a[T]:"/"}let p=kv(o,g),v=y&&y!=="/"&&y.endsWith("/"),A=(d||y===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(v||A)&&(p.pathname+="/"),p}var on=i=>i.join("/").replace(/\/\/+/g,"/"),qv=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),Yv=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Vv=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function Gv(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 Fm=["POST","PUT","PATCH","DELETE"];new Set(Fm);var Xv=["GET",...Fm];new Set(Xv);var Il=b.createContext(null);Il.displayName="DataRouter";var Yu=b.createContext(null);Yu.displayName="DataRouterState";b.createContext(!1);var Wm=b.createContext({isTransitioning:!1});Wm.displayName="ViewTransition";var Qv=b.createContext(new Map);Qv.displayName="Fetchers";var Zv=b.createContext(null);Zv.displayName="Await";var Xt=b.createContext(null);Xt.displayName="Navigation";var ni=b.createContext(null);ni.displayName="Location";var hn=b.createContext({outlet:null,matches:[],isDataRoute:!1});hn.displayName="Route";var Gc=b.createContext(null);Gc.displayName="RouteError";function Kv(i,{relative:a}={}){Oe(li(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:c}=b.useContext(Xt),{hash:o,pathname:d,search:y}=ai(i,{relative:a}),g=d;return s!=="/"&&(g=d==="/"?s:on([s,d])),c.createHref({pathname:g,search:y,hash:o})}function li(){return b.useContext(ni)!=null}function fl(){return Oe(li(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(ni).location}var Im="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pm(i){b.useContext(Xt).static||b.useLayoutEffect(i)}function Jv(){let{isDataRoute:i}=b.useContext(hn);return i?sg():$v()}function $v(){Oe(li(),"useNavigate() may be used only in the context of a <Router> component.");let i=b.useContext(Il),{basename:a,navigator:s}=b.useContext(Xt),{matches:c}=b.useContext(hn),{pathname:o}=fl(),d=JSON.stringify(Jm(c)),y=b.useRef(!1);return Pm(()=>{y.current=!0}),b.useCallback((p,v={})=>{if(Lt(y.current,Im),!y.current)return;if(typeof p=="number"){s.go(p);return}let A=$m(p,JSON.parse(d),o,v.relative==="path");i==null&&a!=="/"&&(A.pathname=A.pathname==="/"?a:on([a,A.pathname])),(v.replace?s.replace:s.push)(A,v.state,v)},[a,s,d,o,i])}b.createContext(null);function ai(i,{relative:a}={}){let{matches:s}=b.useContext(hn),{pathname:c}=fl(),o=JSON.stringify(Jm(s));return b.useMemo(()=>$m(i,JSON.parse(o),c,a==="path"),[i,o,c,a])}function Fv(i,a){return ep(i,a)}function ep(i,a,s,c,o){Oe(li(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=b.useContext(Xt),{matches:y}=b.useContext(hn),g=y[y.length-1],p=g?g.params:{},v=g?g.pathname:"/",A=g?g.pathnameBase:"/",T=g&&g.route;{let G=T&&T.path||"";tp(v,!T||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${G}">) 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="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let M=fl(),C;if(a){let G=typeof a=="string"?Wl(a):a;Oe(A==="/"||G.pathname?.startsWith(A),`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 "${A}" but pathname "${G.pathname}" was given in the \`location\` prop.`),C=G}else C=M;let O=C.pathname||"/",B=O;if(A!=="/"){let G=A.replace(/^\//,"").split("/");B="/"+O.replace(/^\//,"").split("/").slice(G.length).join("/")}let L=Qm(i,{pathname:B});Lt(T||L!=null,`No routes matched location "${C.pathname}${C.search}${C.hash}" `),Lt(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.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 V=tg(L&&L.map(G=>Object.assign({},G,{params:Object.assign({},p,G.params),pathname:on([A,d.encodeLocation?d.encodeLocation(G.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?A:on([A,d.encodeLocation?d.encodeLocation(G.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),y,s,c,o);return a&&V?b.createElement(ni.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},V):V}function Wv(){let i=ug(),a=Gv(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)",o={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:o},s):null,y)}var Iv=b.createElement(Wv,null),Pv=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(hn.Provider,{value:this.props.routeContext},b.createElement(Gc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function eg({routeContext:i,match:a,children:s}){let c=b.useContext(Il);return c&&c.static&&c.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=a.route.id),b.createElement(hn.Provider,{value:i},s)}function tg(i,a=[],s=null,c=null,o=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 A=d.findIndex(T=>T.route.id&&y?.[T.route.id]!==void 0);Oe(A>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),d=d.slice(0,Math.min(d.length,A+1))}let g=!1,p=-1;if(s)for(let A=0;A<d.length;A++){let T=d[A];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(p=A),T.route.id){let{loaderData:M,errors:C}=s,O=T.route.loader&&!M.hasOwnProperty(T.route.id)&&(!C||C[T.route.id]===void 0);if(T.route.lazy||O){g=!0,p>=0?d=d.slice(0,p+1):d=[d[0]];break}}}let v=s&&c?(A,T)=>{c(A,{location:s.location,params:s.matches?.[0]?.params??{},errorInfo:T})}:void 0;return d.reduceRight((A,T,M)=>{let C,O=!1,B=null,L=null;s&&(C=y&&T.route.id?y[T.route.id]:void 0,B=T.route.errorElement||Iv,g&&(p<0&&M===0?(tp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,L=null):p===M&&(O=!0,L=T.route.hydrateFallbackElement||null)));let V=a.concat(d.slice(0,M+1)),G=()=>{let q;return C?q=B:O?q=L:T.route.Component?q=b.createElement(T.route.Component,null):T.route.element?q=T.route.element:q=A,b.createElement(eg,{match:T,routeContext:{outlet:A,matches:V,isDataRoute:s!=null},children:q})};return s&&(T.route.ErrorBoundary||T.route.errorElement||M===0)?b.createElement(Pv,{location:s.location,revalidation:s.revalidation,component:B,error:C,children:G(),routeContext:{outlet:null,matches:V,isDataRoute:!0},onError:v}):G()},null)}function Xc(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ng(i){let a=b.useContext(Il);return Oe(a,Xc(i)),a}function lg(i){let a=b.useContext(Yu);return Oe(a,Xc(i)),a}function ag(i){let a=b.useContext(hn);return Oe(a,Xc(i)),a}function Qc(i){let a=ag(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 ig(){return Qc("useRouteId")}function ug(){let i=b.useContext(Gc),a=lg("useRouteError"),s=Qc("useRouteError");return i!==void 0?i:a.errors?.[s]}function sg(){let{router:i}=ng("useNavigate"),a=Qc("useNavigate"),s=b.useRef(!1);return Pm(()=>{s.current=!0}),b.useCallback(async(o,d={})=>{Lt(s.current,Im),s.current&&(typeof o=="number"?i.navigate(o):await i.navigate(o,{fromRouteId:a,...d}))},[i,a])}var Cm={};function tp(i,a,s){!a&&!Cm[i]&&(Cm[i]=!0,Lt(!1,s))}b.memo(rg);function rg({routes:i,future:a,state:s,unstable_onError:c}){return ep(i,void 0,s,c,a)}function Oc(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 cg({basename:i="/",children:a=null,location:s,navigationType:c="POP",navigator:o,static:d=!1}){Oe(!li(),"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:o,static:d,future:{}}),[y,o,d]);typeof s=="string"&&(s=Wl(s));let{pathname:p="/",search:v="",hash:A="",state:T=null,key:M="default"}=s,C=b.useMemo(()=>{let O=dn(p,y);return O==null?null:{location:{pathname:O,search:v,hash:A,state:T,key:M},navigationType:c}},[y,p,v,A,T,M,c]);return Lt(C!=null,`<Router basename="${y}"> is not able to match the URL "${p}${v}${A}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:b.createElement(Xt.Provider,{value:g},b.createElement(ni.Provider,{children:a,value:C}))}function og({children:i,location:a}){return Fv(wc(i),a)}function wc(i,a=[]){let s=[];return b.Children.forEach(i,(c,o)=>{if(!b.isValidElement(c))return;let d=[...a,o];if(c.type===b.Fragment){s.push.apply(s,wc(c.props.children,d));return}Oe(c.type===Oc,`[${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=wc(c.props.children,d)),s.push(y)}),s}var wu="get",zu="application/x-www-form-urlencoded";function Vu(i){return i!=null&&typeof i.tagName=="string"}function fg(i){return Vu(i)&&i.tagName.toLowerCase()==="button"}function dg(i){return Vu(i)&&i.tagName.toLowerCase()==="form"}function hg(i){return Vu(i)&&i.tagName.toLowerCase()==="input"}function mg(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function pg(i,a){return i.button===0&&(!a||a==="_self")&&!mg(i)}var Tu=null;function yg(){if(Tu===null)try{new FormData(document.createElement("form"),0),Tu=!1}catch{Tu=!0}return Tu}var vg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bc(i){return i!=null&&!vg.has(i)?(Lt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zu}"`),null):i}function gg(i,a){let s,c,o,d,y;if(dg(i)){let g=i.getAttribute("action");c=g?dn(g,a):null,s=i.getAttribute("method")||wu,o=bc(i.getAttribute("enctype"))||zu,d=new FormData(i)}else if(fg(i)||hg(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?dn(p,a):null,s=i.getAttribute("formmethod")||g.getAttribute("method")||wu,o=bc(i.getAttribute("formenctype"))||bc(g.getAttribute("enctype"))||zu,d=new FormData(g,i),!yg()){let{name:v,type:A,value:T}=i;if(A==="image"){let M=v?`${v}.`:"";d.append(`${M}x`,"0"),d.append(`${M}y`,"0")}else v&&d.append(v,T)}}else{if(Vu(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=wu,c=null,o=zu,y=i}return d&&o==="text/plain"&&(y=d,d=void 0),{action:c,method:s.toLowerCase(),encType:o,formData:d,body:y}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zc(i,a){if(i===!1||i===null||typeof i>"u")throw new Error(a)}function bg(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&&dn(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function xg(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 Sg(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 Eg(i,a,s){let c=await Promise.all(i.map(async o=>{let d=a.routes[o.route.id];if(d){let y=await xg(d,s);return y.links?y.links():[]}return[]}));return Cg(c.flat(1).filter(Sg).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Nm(i,a,s,c,o,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 A=c.routes[p.route.id];if(!A||!A.hasLoader)return!1;if(y(p,v)||g(p,v))return!0;if(p.route.shouldRevalidate){let T=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function Ag(i,a,{includeHydrateFallback:s}={}){return Tg(i.map(c=>{let o=a.routes[c.route.id];if(!o)return[];let d=[o.module];return o.clientActionModule&&(d=d.concat(o.clientActionModule)),o.clientLoaderModule&&(d=d.concat(o.clientLoaderModule)),s&&o.hydrateFallbackModule&&(d=d.concat(o.hydrateFallbackModule)),o.imports&&(d=d.concat(o.imports)),d}).flat(1))}function Tg(i){return[...new Set(i)]}function _g(i){let a={},s=Object.keys(i).sort();for(let c of s)a[c]=i[c];return a}function Cg(i,a){let s=new Set;return new Set(a),i.reduce((c,o)=>{let d=JSON.stringify(_g(o));return s.has(d)||(s.add(d),c.push({key:d,link:o})),c},[])}function np(){let i=b.useContext(Il);return Zc(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function Ng(){let i=b.useContext(Yu);return Zc(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Kc=b.createContext(void 0);Kc.displayName="FrameworkContext";function lp(){let i=b.useContext(Kc);return Zc(i,"You must render this element inside a <HydratedRouter> element"),i}function Rg(i,a){let s=b.useContext(Kc),[c,o]=b.useState(!1),[d,y]=b.useState(!1),{onFocus:g,onBlur:p,onMouseEnter:v,onMouseLeave:A,onTouchStart:T}=a,M=b.useRef(null);b.useEffect(()=>{if(i==="render"&&y(!0),i==="viewport"){let B=V=>{V.forEach(G=>{y(G.isIntersecting)})},L=new IntersectionObserver(B,{threshold:.5});return M.current&&L.observe(M.current),()=>{L.disconnect()}}},[i]),b.useEffect(()=>{if(c){let B=setTimeout(()=>{y(!0)},100);return()=>{clearTimeout(B)}}},[c]);let C=()=>{o(!0)},O=()=>{o(!1),y(!1)};return s?i!=="intent"?[d,M,{}]:[d,M,{onFocus:$a(g,C),onBlur:$a(p,O),onMouseEnter:$a(v,C),onMouseLeave:$a(A,O),onTouchStart:$a(T,C)}]:[!1,M,{}]}function $a(i,a){return s=>{i&&i(s),s.defaultPrevented||a(s)}}function Mg({page:i,...a}){let{router:s}=np(),c=b.useMemo(()=>Qm(s.routes,i,s.basename),[s.routes,i,s.basename]);return c?b.createElement(Og,{page:i,matches:c,...a}):null}function jg(i){let{manifest:a,routeModules:s}=lp(),[c,o]=b.useState([]);return b.useEffect(()=>{let d=!1;return Eg(i,a,s).then(y=>{d||o(y)}),()=>{d=!0}},[i,a,s]),c}function Og({page:i,matches:a,...s}){let c=fl(),{manifest:o,routeModules:d}=lp(),{basename:y}=np(),{loaderData:g,matches:p}=Ng(),v=b.useMemo(()=>Nm(i,a,p,o,c,"data"),[i,a,p,o,c]),A=b.useMemo(()=>Nm(i,a,p,o,c,"assets"),[i,a,p,o,c]),T=b.useMemo(()=>{if(i===c.pathname+c.search+c.hash)return[];let O=new Set,B=!1;if(a.forEach(V=>{let G=o.routes[V.route.id];!G||!G.hasLoader||(!v.some(q=>q.route.id===V.route.id)&&V.route.id in g&&d[V.route.id]?.shouldRevalidate||G.hasClientLoader?B=!0:O.add(V.route.id))}),O.size===0)return[];let L=bg(i,y,"data");return B&&O.size>0&&L.searchParams.set("_routes",a.filter(V=>O.has(V.route.id)).map(V=>V.route.id).join(",")),[L.pathname+L.search]},[y,g,c,o,v,a,i,d]),M=b.useMemo(()=>Ag(A,o),[A,o]),C=jg(A);return b.createElement(b.Fragment,null,T.map(O=>b.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...s})),M.map(O=>b.createElement("link",{key:O,rel:"modulepreload",href:O,...s})),C.map(({key:O,link:B})=>b.createElement("link",{key:O,nonce:s.nonce,...B})))}function wg(...i){return a=>{i.forEach(s=>{typeof s=="function"?s(a):s!=null&&(s.current=a)})}}var ap=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ap&&(window.__reactRouterVersion="7.9.6")}catch{}function zg({basename:i,children:a,window:s}){let c=b.useRef();c.current==null&&(c.current=bv({window:s,v5Compat:!0}));let o=c.current,[d,y]=b.useState({action:o.action,location:o.location}),g=b.useCallback(p=>{b.startTransition(()=>y(p))},[y]);return b.useLayoutEffect(()=>o.listen(g),[o,g]),b.createElement(cg,{basename:i,children:a,location:d.location,navigationType:d.action,navigator:o})}var ip=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,up=b.forwardRef(function({onClick:a,discover:s="render",prefetch:c="none",relative:o,reloadDocument:d,replace:y,state:g,target:p,to:v,preventScrollReset:A,viewTransition:T,...M},C){let{basename:O}=b.useContext(Xt),B=typeof v=="string"&&ip.test(v),L,V=!1;if(typeof v=="string"&&B&&(L=v,ap))try{let ee=new URL(window.location.href),J=v.startsWith("//")?new URL(ee.protocol+v):new URL(v),le=dn(J.pathname,O);J.origin===ee.origin&&le!=null?v=le+J.search+J.hash:V=!0}catch{Lt(!1,`<Link to="${v}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let G=Kv(v,{relative:o}),[q,F,Y]=Rg(c,M),Q=Lg(v,{replace:y,state:g,target:p,preventScrollReset:A,relative:o,viewTransition:T});function X(ee){a&&a(ee),ee.defaultPrevented||Q(ee)}let ie=b.createElement("a",{...M,...Y,href:L||G,onClick:V||d?a:X,ref:wg(C,F),target:p,"data-discover":!B&&s==="render"?"true":void 0});return q&&!B?b.createElement(b.Fragment,null,ie,b.createElement(Mg,{page:G})):ie});up.displayName="Link";var Dg=b.forwardRef(function({"aria-current":a="page",caseSensitive:s=!1,className:c="",end:o=!1,style:d,to:y,viewTransition:g,children:p,...v},A){let T=ai(y,{relative:v.relative}),M=fl(),C=b.useContext(Yu),{navigator:O,basename:B}=b.useContext(Xt),L=C!=null&&Vg(T)&&g===!0,V=O.encodeLocation?O.encodeLocation(T).pathname:T.pathname,G=M.pathname,q=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;s||(G=G.toLowerCase(),q=q?q.toLowerCase():null,V=V.toLowerCase()),q&&B&&(q=dn(q,B)||q);const F=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let Y=G===V||!o&&G.startsWith(V)&&G.charAt(F)==="/",Q=q!=null&&(q===V||!o&&q.startsWith(V)&&q.charAt(V.length)==="/"),X={isActive:Y,isPending:Q,isTransitioning:L},ie=Y?a:void 0,ee;typeof c=="function"?ee=c(X):ee=[c,Y?"active":null,Q?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let J=typeof d=="function"?d(X):d;return b.createElement(up,{...v,"aria-current":ie,className:ee,ref:A,style:J,to:y,viewTransition:g},typeof p=="function"?p(X):p)});Dg.displayName="NavLink";var Bg=b.forwardRef(({discover:i="render",fetcherKey:a,navigate:s,reloadDocument:c,replace:o,state:d,method:y=wu,action:g,onSubmit:p,relative:v,preventScrollReset:A,viewTransition:T,...M},C)=>{let O=qg(),B=Yg(g,{relative:v}),L=y.toLowerCase()==="get"?"get":"post",V=typeof g=="string"&&ip.test(g),G=q=>{if(p&&p(q),q.defaultPrevented)return;q.preventDefault();let F=q.nativeEvent.submitter,Y=F?.getAttribute("formmethod")||y;O(F||q.currentTarget,{fetcherKey:a,method:Y,navigate:s,replace:o,state:d,relative:v,preventScrollReset:A,viewTransition:T})};return b.createElement("form",{ref:C,method:L,action:B,onSubmit:c?p:G,...M,"data-discover":!V&&i==="render"?"true":void 0})});Bg.displayName="Form";function Ug(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sp(i){let a=b.useContext(Il);return Oe(a,Ug(i)),a}function Lg(i,{target:a,replace:s,state:c,preventScrollReset:o,relative:d,viewTransition:y}={}){let g=Jv(),p=fl(),v=ai(i,{relative:d});return b.useCallback(A=>{if(pg(A,a)){A.preventDefault();let T=s!==void 0?s:ei(p)===ei(v);g(i,{replace:T,state:c,preventScrollReset:o,relative:d,viewTransition:y})}},[p,g,v,s,c,a,i,o,d,y])}var kg=0,Hg=()=>`__${String(++kg)}__`;function qg(){let{router:i}=sp("useSubmit"),{basename:a}=b.useContext(Xt),s=ig();return b.useCallback(async(c,o={})=>{let{action:d,method:y,encType:g,formData:p,body:v}=gg(c,a);if(o.navigate===!1){let A=o.fetcherKey||Hg();await i.fetch(A,s,o.action||d,{preventScrollReset:o.preventScrollReset,formData:p,body:v,formMethod:o.method||y,formEncType:o.encType||g,flushSync:o.flushSync})}else await i.navigate(o.action||d,{preventScrollReset:o.preventScrollReset,formData:p,body:v,formMethod:o.method||y,formEncType:o.encType||g,replace:o.replace,state:o.state,fromRouteId:s,flushSync:o.flushSync,viewTransition:o.viewTransition})},[i,a,s])}function Yg(i,{relative:a}={}){let{basename:s}=b.useContext(Xt),c=b.useContext(hn);Oe(c,"useFormAction must be used inside a RouteContext");let[o]=c.matches.slice(-1),d={...ai(i||".",{relative:a})},y=fl();if(i==null){d.search=y.search;let g=new URLSearchParams(d.search),p=g.getAll("index");if(p.some(A=>A==="")){g.delete("index"),p.filter(T=>T).forEach(T=>g.append("index",T));let A=g.toString();d.search=A?`?${A}`:""}}return(!i||i===".")&&o.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(d.pathname=d.pathname==="/"?s:on([s,d.pathname])),ei(d)}function Vg(i,{relative:a}={}){let s=b.useContext(Wm);Oe(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=sp("useViewTransitionState"),o=ai(i,{relative:a});if(!s.isTransitioning)return!1;let d=dn(s.currentLocation.pathname,c)||s.currentLocation.pathname,y=dn(s.nextLocation.pathname,c)||s.nextLocation.pathname;return ku(o.pathname,y)!=null||ku(o.pathname,d)!=null}const Gt=Object.create(null);Gt.open="0";Gt.close="1";Gt.ping="2";Gt.pong="3";Gt.message="4";Gt.upgrade="5";Gt.noop="6";const Du=Object.create(null);Object.keys(Gt).forEach(i=>{Du[Gt[i]]=i});const zc={type:"error",data:"parser error"},rp=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",cp=typeof ArrayBuffer=="function",op=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,Jc=({type:i,data:a},s,c)=>rp&&a instanceof Blob?s?c(a):Rm(a,c):cp&&(a instanceof ArrayBuffer||op(a))?s?c(a):Rm(new Blob([a]),c):c(Gt[i]+(a||"")),Rm=(i,a)=>{const s=new FileReader;return s.onload=function(){const c=s.result.split(",")[1];a("b"+(c||""))},s.readAsDataURL(i)};function Mm(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let xc;function Gg(i,a){if(rp&&i.data instanceof Blob)return i.data.arrayBuffer().then(Mm).then(a);if(cp&&(i.data instanceof ArrayBuffer||op(i.data)))return a(Mm(i.data));Jc(i,!1,s=>{xc||(xc=new TextEncoder),a(xc.encode(s))})}const jm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<jm.length;i++)Pa[jm.charCodeAt(i)]=i;const Xg=i=>{let a=i.length*.75,s=i.length,c,o=0,d,y,g,p;i[i.length-1]==="="&&(a--,i[i.length-2]==="="&&a--);const v=new ArrayBuffer(a),A=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)],A[o++]=d<<2|y>>4,A[o++]=(y&15)<<4|g>>2,A[o++]=(g&3)<<6|p&63;return v},Qg=typeof ArrayBuffer=="function",$c=(i,a)=>{if(typeof i!="string")return{type:"message",data:fp(i,a)};const s=i.charAt(0);return s==="b"?{type:"message",data:Zg(i.substring(1),a)}:Du[s]?i.length>1?{type:Du[s],data:i.substring(1)}:{type:Du[s]}:zc},Zg=(i,a)=>{if(Qg){const s=Xg(i);return fp(s,a)}else return{base64:!0,data:i}},fp=(i,a)=>{switch(a){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},dp="",Kg=(i,a)=>{const s=i.length,c=new Array(s);let o=0;i.forEach((d,y)=>{Jc(d,!1,g=>{c[y]=g,++o===s&&a(c.join(dp))})})},Jg=(i,a)=>{const s=i.split(dp),c=[];for(let o=0;o<s.length;o++){const d=$c(s[o],a);if(c.push(d),d.type==="error")break}return c};function $g(){return new TransformStream({transform(i,a){Gg(i,s=>{const c=s.length;let o;if(c<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,c);else if(c<65536){o=new Uint8Array(3);const d=new DataView(o.buffer);d.setUint8(0,126),d.setUint16(1,c)}else{o=new Uint8Array(9);const d=new DataView(o.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(c))}i.data&&typeof i.data!="string"&&(o[0]|=128),a.enqueue(o),a.enqueue(s)})}})}let Sc;function _u(i){return i.reduce((a,s)=>a+s.length,0)}function Cu(i,a){if(i[0].length===a)return i.shift();const s=new Uint8Array(a);let c=0;for(let o=0;o<a;o++)s[o]=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 Fg(i,a){Sc||(Sc=new TextDecoder);const s=[];let c=0,o=-1,d=!1;return new TransformStream({transform(y,g){for(s.push(y);;){if(c===0){if(_u(s)<1)break;const p=Cu(s,1);d=(p[0]&128)===128,o=p[0]&127,o<126?c=3:o===126?c=1:c=2}else if(c===1){if(_u(s)<2)break;const p=Cu(s,2);o=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),c=3}else if(c===2){if(_u(s)<8)break;const p=Cu(s,8),v=new DataView(p.buffer,p.byteOffset,p.length),A=v.getUint32(0);if(A>Math.pow(2,21)-1){g.enqueue(zc);break}o=A*Math.pow(2,32)+v.getUint32(4),c=3}else{if(_u(s)<o)break;const p=Cu(s,o);g.enqueue($c(d?p:Sc.decode(p),a)),c=0}if(o===0||o>i){g.enqueue(zc);break}}}})}const hp=4;function Ve(i){if(i)return Wg(i)}function Wg(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,o=0;o<s.length;o++)if(c=s[o],c===a||c.fn===a){s.splice(o,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,o=s.length;c<o;++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 Gu=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,s)=>s(a,0),Ot=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ig="arraybuffer";function mp(i,...a){return a.reduce((s,c)=>(i.hasOwnProperty(c)&&(s[c]=i[c]),s),{})}const Pg=Ot.setTimeout,eb=Ot.clearTimeout;function Xu(i,a){a.useNativeTimers?(i.setTimeoutFn=Pg.bind(Ot),i.clearTimeoutFn=eb.bind(Ot)):(i.setTimeoutFn=Ot.setTimeout.bind(Ot),i.clearTimeoutFn=Ot.clearTimeout.bind(Ot))}const tb=1.33;function nb(i){return typeof i=="string"?lb(i):Math.ceil((i.byteLength||i.size)*tb)}function lb(i){let a=0,s=0;for(let c=0,o=i.length;c<o;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 pp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function ab(i){let a="";for(let s in i)i.hasOwnProperty(s)&&(a.length&&(a+="&"),a+=encodeURIComponent(s)+"="+encodeURIComponent(i[s]));return a}function ib(i){let a={},s=i.split("&");for(let c=0,o=s.length;c<o;c++){let d=s[c].split("=");a[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return a}class ub extends Error{constructor(a,s,c){super(a),this.description=s,this.context=c,this.type="TransportError"}}class Fc extends Ve{constructor(a){super(),this.writable=!1,Xu(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 ub(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=$c(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=ab(a);return s.length?"?"+s:""}}class sb extends Fc{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)};Jg(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,Kg(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]=pp()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(a,s)}}let yp=!1;try{yp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const rb=yp;function cb(){}class ob extends sb{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",(o,d)=>{this.onError("xhr post error",o,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 Vt extends Ve{constructor(a,s,c){super(),this.createRequest=a,Xu(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=mp(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 o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&c.setRequestHeader(o,this._opts.extraHeaders[o])}}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 o;c.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.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(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Vt.requestsCount++,Vt.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=cb,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Vt.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()}}Vt.requestsCount=0;Vt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Om);else if(typeof addEventListener=="function"){const i="onpagehide"in Ot?"pagehide":"unload";addEventListener(i,Om,!1)}}function Om(){for(let i in Vt.requests)Vt.requests.hasOwnProperty(i)&&Vt.requests[i].abort()}const fb=(function(){const i=vp({xdomain:!1});return i&&i.responseType!==null})();class db extends ob{constructor(a){super(a);const s=a&&a.forceBase64;this.supportsBinary=fb&&!s}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Vt(vp,this.uri(),a)}}function vp(i){const a=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||rb))return new XMLHttpRequest}catch{}if(!a)try{return new Ot[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const gp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class hb extends Fc{get name(){return"websocket"}doOpen(){const a=this.uri(),s=this.opts.protocols,c=gp?{}:mp(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(o){return this.emitReserved("error",o)}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],o=s===a.length-1;Jc(c,this.supportsBinary,d=>{try{this.doWrite(c,d)}catch{}o&&Gu(()=>{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]=pp()),this.supportsBinary||(s.b64=1),this.createUri(a,s)}}const Ec=Ot.WebSocket||Ot.MozWebSocket;class mb extends hb{createSocket(a,s,c){return gp?new Ec(a,s,c):s?new Ec(a,s):new Ec(a)}doWrite(a,s){this.ws.send(s)}}class pb extends Fc{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=Fg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=a.readable.pipeThrough(s).getReader(),o=$g();o.readable.pipeTo(a.writable),this._writer=o.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],o=s===a.length-1;this._writer.write(c).then(()=>{o&&Gu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const yb={websocket:mb,webtransport:pb,polling:db},vb=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gb=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Dc(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 o=vb.exec(i||""),d={},y=14;for(;y--;)d[gb[y]]=o[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=bb(d,d.path),d.queryKey=xb(d,d.query),d}function bb(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 xb(i,a){const s={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,o,d){o&&(s[o]=d)}),s}const Bc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Bu=[];Bc&&addEventListener("offline",()=>{Bu.forEach(i=>i())},!1);class qn extends Ve{constructor(a,s){if(super(),this.binaryType=Ig,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=Dc(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=Dc(s.host).host);Xu(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 o=c.prototype.name;this.transports.push(o),this._transportsByName[o]=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=ib(this.opts.query)),Bc&&(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"})},Bu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const s=Object.assign({},this.opts.query);s.EIO=hp,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&&qn.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",qn.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 o=this.writeBuffer[c].data;if(o&&(s+=nb(o)),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,Gu(()=>{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,o){if(typeof s=="function"&&(o=s,s=void 0),typeof c=="function"&&(o=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),o&&this.once("flush",o),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(qn.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(),Bc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const c=Bu.indexOf(this._offlineEventListener);c!==-1&&Bu.splice(c,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,s),this.writeBuffer=[],this._prevBufferLen=0}}}qn.protocol=hp;class Sb extends qn{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;qn.priorWebsocketSuccess=!1;const o=()=>{c||(s.send([{type:"ping",data:"probe"}]),s.once("packet",T=>{if(!c)if(T.type==="pong"&&T.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;qn.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{c||this.readyState!=="closed"&&(A(),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,A(),s.close(),s=null)}const y=T=>{const M=new Error("probe error: "+T);M.transport=s.name,d(),this.emitReserved("upgradeError",M)};function g(){y("transport closed")}function p(){y("socket closed")}function v(T){s&&T.name!==s.name&&d()}const A=()=>{s.removeListener("open",o),s.removeListener("error",y),s.removeListener("close",g),this.off("close",p),this.off("upgrading",v)};s.once("open",o),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 Eb=class extends Sb{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(o=>yb[o]).filter(o=>!!o)),super(a,c)}};function Ab(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=Dc(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 Tb=typeof ArrayBuffer=="function",_b=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,bp=Object.prototype.toString,Cb=typeof Blob=="function"||typeof Blob<"u"&&bp.call(Blob)==="[object BlobConstructor]",Nb=typeof File=="function"||typeof File<"u"&&bp.call(File)==="[object FileConstructor]";function Wc(i){return Tb&&(i instanceof ArrayBuffer||_b(i))||Cb&&i instanceof Blob||Nb&&i instanceof File}function Uu(i,a){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let s=0,c=i.length;s<c;s++)if(Uu(i[s]))return!0;return!1}if(Wc(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return Uu(i.toJSON(),!0);for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&Uu(i[s]))return!0;return!1}function Rb(i){const a=[],s=i.data,c=i;return c.data=Uc(s,a),c.attachments=a.length,{packet:c,buffers:a}}function Uc(i,a){if(!i)return i;if(Wc(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]=Uc(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]=Uc(i[c],a));return s}return i}function Mb(i,a){return i.data=Lc(i.data,a),delete i.attachments,i}function Lc(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]=Lc(i[s],a);else if(typeof i=="object")for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(i[s]=Lc(i[s],a));return i}const jb=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ob=5;var pe;(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"})(pe||(pe={}));class wb{constructor(a){this.replacer=a}encode(a){return(a.type===pe.EVENT||a.type===pe.ACK)&&Uu(a)?this.encodeAsBinary({type:a.type===pe.EVENT?pe.BINARY_EVENT:pe.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let s=""+a.type;return(a.type===pe.BINARY_EVENT||a.type===pe.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=Rb(a),c=this.encodeAsString(s.packet),o=s.buffers;return o.unshift(c),o}}function wm(i){return Object.prototype.toString.call(i)==="[object Object]"}class Ic 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===pe.BINARY_EVENT;c||s.type===pe.BINARY_ACK?(s.type=c?pe.EVENT:pe.ACK,this.reconstructor=new zb(s),s.attachments===0&&super.emitReserved("decoded",s)):super.emitReserved("decoded",s)}else if(Wc(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(pe[c.type]===void 0)throw new Error("unknown packet type "+c.type);if(c.type===pe.BINARY_EVENT||c.type===pe.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 o=a.charAt(s+1);if(o!==""&&Number(o)==o){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(Ic.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 pe.CONNECT:return wm(s);case pe.DISCONNECT:return s===void 0;case pe.CONNECT_ERROR:return typeof s=="string"||wm(s);case pe.EVENT:case pe.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&jb.indexOf(s[0])===-1);case pe.ACK:case pe.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class zb{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=Mb(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Db=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ic,Encoder:wb,get PacketType(){return pe},protocol:Ob},Symbol.toStringTag,{value:"Module"}));function Ut(i,a,s){return i.on(a,s),function(){i.off(a,s)}}const Bb=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class xp 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=[Ut(a,"open",this.onopen.bind(this)),Ut(a,"packet",this.onpacket.bind(this)),Ut(a,"error",this.onerror.bind(this)),Ut(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,o,d;if(Bb.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:pe.EVENT,data:s};if(y.options={},y.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const A=this.ids++,T=s.pop();this._registerAckCallback(A,T),y.id=A}const g=(o=(c=this.io.engine)===null||c===void 0?void 0:c.transport)===null||o===void 0?void 0:o.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 o=(c=this.flags.timeout)!==null&&c!==void 0?c:this._opts.ackTimeout;if(o===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"))},o),y=(...g)=>{this.io.clearTimeoutFn(d),s.apply(this,g)};y.withError=!0,this.acks[a]=y}emitWithAck(a,...s){return new Promise((c,o)=>{const d=(y,g)=>y?o(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((o,...d)=>c!==this._queue[0]?void 0:(o!==null?c.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(o)):(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:pe.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 pe.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 pe.EVENT:case pe.BINARY_EVENT:this.onevent(a);break;case pe.ACK:case pe.BINARY_ACK:this.onack(a);break;case pe.DISCONNECT:this.ondisconnect();break;case pe.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(...o){c||(c=!0,s.packet({type:pe.ACK,id:a,data:o}))}}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:pe.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 Pl(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}Pl.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};Pl.prototype.reset=function(){this.attempts=0};Pl.prototype.setMin=function(i){this.ms=i};Pl.prototype.setMax=function(i){this.max=i};Pl.prototype.setJitter=function(i){this.jitter=i};class kc 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,Xu(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 Pl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=a;const o=s.parser||Db;this.encoder=new o.Encoder,this.decoder=new o.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 Eb(this.uri,this.opts);const s=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;const o=Ut(s,"open",function(){c.onopen(),a&&a()}),d=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),a?a(g):this.maybeReconnectOnOpen()},y=Ut(s,"error",d);if(this._timeout!==!1){const g=this._timeout,p=this.setTimeoutFn(()=>{o(),d(new Error("timeout")),s.close()},g);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(o),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(Ut(a,"ping",this.onping.bind(this)),Ut(a,"data",this.ondata.bind(this)),Ut(a,"error",this.onerror.bind(this)),Ut(a,"close",this.onclose.bind(this)),Ut(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){Gu(()=>{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 xp(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(o=>{o?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",o)):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 Fa={};function Lu(i,a){typeof i=="object"&&(a=i,i=void 0),a=a||{};const s=Ab(i,a.path||"/socket.io"),c=s.source,o=s.id,d=s.path,y=Fa[o]&&d in Fa[o].nsps,g=a.forceNew||a["force new connection"]||a.multiplex===!1||y;let p;return g?p=new kc(c,a):(Fa[o]||(Fa[o]=new kc(c,a)),p=Fa[o]),s.query&&!a.query&&(a.query=s.queryKey),p.socket(s.path,a)}Object.assign(Lu,{Manager:kc,Socket:xp,io:Lu,connect:Lu});const Sp=window.location.origin;console.info("[socket] connecting to",Sp);const Pc=Lu(Sp,{transports:["polling","websocket"],timeout:15e3});Pc.on("connect_error",i=>console.error("connect_error",i.code,i.message,i.data));const Ep=b.createContext(Pc),Ub=({children:i})=>h.jsx(Ep.Provider,{value:Pc,children:i}),Qu=()=>b.useContext(Ep),Ap=b.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function Lb(i){return b.useCallback((a,s={})=>new Promise((c,o)=>{i.emit(a,s,(d={})=>{d.error?o(new Error(d.error)):c(d)})}),[i])}function kb({children:i}){const a=Qu(),s=Lb(a),[c,o]=b.useState(null),[d,y]=b.useState([]),[g,p]=b.useState([]),[v,A]=b.useState(a.connected);b.useEffect(()=>{const C=()=>A(!0),O=()=>A(!1);return a.on("connect",C),a.on("disconnect",O),()=>{a.off("connect",C),a.off("disconnect",O)}},[a]),b.useEffect(()=>{function C(L){o(L)}function O(L=[]){y(L)}function B(L){y(V=>[...V.slice(-199),L])}return a.on("session:sync",C),a.on("log:init",O),a.on("log:entry",B),a.on("alert:new",(L={})=>{p(V=>[...V.slice(-49),{...L,receivedAt:Date.now()}])}),()=>{a.off("session:sync",C),a.off("log:init",O),a.off("log:entry",B),a.off("alert:new")}},[a]);const T=b.useMemo(()=>({login:(C,O)=>s("auth:login",{username:C,password:O}),setRole:C=>s("session:setRole",{role:C}),requestControl:(C,O={})=>s("session:requestControl",{roverId:C,...O}),releaseControl:C=>s("session:releaseControl",{roverId:C}),subscribeAll:()=>s("session:subscribeAll"),lockRover:(C,O)=>s("session:lockRover",{roverId:C,locked:O}),setMode:C=>s("setMode",{mode:C})}),[s]),M=b.useMemo(()=>({connected:v,session:c,logs:d,alerts:g,...T}),[T,g,v,d,c]);return h.jsx(Ap.Provider,{value:M,children:i})}function wt(){return b.useContext(Ap)}const Tp=b.createContext({frames:{}});function Hb({children:i}){const a=Qu(),[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 o=b.useMemo(()=>({frames:s}),[s]);return h.jsx(Tp.Provider,{value:o,children:i})}function _p(){return b.useContext(Tp).frames}function Zu(i){const a=_p();return i?a[i]??null:null}function zm(...i){return i.filter(Boolean).join(" ")}function qb(i){const a=i?.batteryState?.percentDisplay;return a==null?"--":`${a}%`}function Yb(i){return i?.batteryState?i.batteryState.urgentActive?"text-red-400":i.batteryState.warnActive?"text-amber-300":"text-emerald-300":"text-slate-400"}function Cp({title:i,roster:a=[],emptyText:s="No roster data.",renderActions:c=null}){return h.jsxs("div",{className:"space-y-0.5 text-sm",children:[i&&h.jsx("p",{className:"text-sm text-slate-400",children:i}),a.length===0?h.jsx("p",{className:"text-sm text-slate-500",children:s}):h.jsx("ul",{className:"space-y-0.5 text-sm",children:a.map(o=>h.jsxs("li",{className:zm("surface flex flex-wrap items-center justify-between gap-0.5",o.locked&&"bg-red-900/40"),children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-slate-200",children:o.name}),h.jsxs("p",{className:"text-xs text-slate-500 flex flex-wrap items-center gap-1",children:[h.jsx("span",{children:o.locked?"locked":"free"}),o.lockReason&&h.jsx("span",{className:"rounded bg-black/30 px-1",children:o.lockReason}),h.jsxs("span",{className:zm("font-semibold",Yb(o)),children:["Battery ",qb(o)]})]})]}),c?c(o):null]},o.id))})]})}function ul(i,a="--"){return i==null||i===""?a:i}function eo(){const{connected:i,session:a,requestControl:s}=wt(),c=a?.assignment?.roverId,o=Zu(c),d=o?.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,A=o?.receivedAt?new Date(o.receivedAt).toLocaleTimeString():null,T=o?.raw?o.raw:null,M=a?.roster??[],C=c?a?.activeDrivers?.[c]:null,O=c?C?C===a?.socketId?"You":C.slice(0,6):"Available":"n/a",B=b.useMemo(()=>a?.role==="admin"||a?.role==="lockdown"||a?.role==="lockdown-admin",[a?.role]),[L,V]=b.useState({});async function G(q){if(q){V(F=>({...F,[q]:!0}));try{await s(q)}catch(F){alert(F.message)}finally{V(F=>({...F,[q]:!1}))}}}return h.jsxs("section",{className:"panel-section space-y-0.5 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||"--"]}),A&&h.jsxs("span",{children:[" · sensors ",A]}),h.jsxs("span",{children:[" · driver ",O]})]}),c?o?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex flex-wrap gap-0.5 text-sm",children:[h.jsx(sl,{label:"Charge",value:ul(p!=null&&v!=null?`${p}/${v}`:null)}),h.jsx(sl,{label:"Charging",value:ul(d.chargingState?.label)}),h.jsx(sl,{label:"OI mode",value:ul(d.oiMode?.label)}),h.jsx(sl,{label:"Voltage",value:ul(y)}),h.jsx(sl,{label:"Current",value:ul(g)}),h.jsx(sl,{label:"Left Encoder",value:ul(d.encoderCountsLeft)}),h.jsx(sl,{label:"Right Encoder",value:ul(d.encoderCountsRight)})]}),h.jsxs("div",{className:"surface space-y-0.5",children:[h.jsx("div",{className:"w-full text-center text-sm text-slate-300",children:"Cliff Sensors"}),h.jsxs("div",{className:"flex gap-0.5 text-sm",children:[h.jsx(Nu,{value:d.cliffLeftSignal}),h.jsx(Nu,{value:d.cliffFrontLeftSignal}),h.jsx(Nu,{value:d.cliffFrontRightSignal}),h.jsx(Nu,{value:d.cliffRightSignal})]})]}),h.jsxs("div",{className:"surface flex gap-0.5 text-sm",children:[h.jsx(Ru,{label:"Left Wheel",value:d.wheelLeftCurrentMa,overcurrent:d.wheelOvercurrents.leftWheel}),h.jsx(Ru,{label:"Right Wheel",value:d.wheelRightCurrentMa,overcurrent:d.wheelOvercurrents.rightWheel}),h.jsx(Ru,{label:"Side Brush",value:d.sideBrushCurrentMa,overcurrent:d.wheelOvercurrents.sideBrush}),h.jsx(Ru,{label:"Main Brush",value:d.mainBrushCurrentMa,overcurrent:d.wheelOvercurrents.mainBrush})]})]}):h.jsx("p",{className:"text-sm text-slate-500",children:"Waiting for sensor frames…"}):h.jsx("p",{className:"text-sm text-slate-500",children:"Assign a rover to view sensors."}),T&&h.jsx("pre",{className:"surface whitespace-pre-wrap break-words text-xs text-lime-300",children:T}),h.jsx(Cp,{title:"Rovers",roster:M,renderActions:q=>B?h.jsx("button",{type:"button",onClick:()=>G(q.id),disabled:L[q.id],className:"button-dark disabled:opacity-40",children:L[q.id]?"...":"request"}):null})]})}function Nu({value:i}){const s=`${i==null?0:Math.max(0,Math.min(100,i/4095*100))}%`;return h.jsx("div",{className:"flex flex-col items-center gap-0.5 w-1/4",children:h.jsxs("div",{className:"surface-muted h-6 w-full relative",children:[h.jsx("div",{className:"absolute top-0 left-0 right-0 bg-amber-500",style:{height:s}}),h.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-white",children:i!=null?`${i}`:"--"})]})})}function sl({label:i,value:a}){return h.jsxs("div",{className:"surface text-sm",children:[i,": ",a]})}function Ru({label:i,value:a,overcurrent:s}){const o=`${a==null?0:Math.max(0,Math.min(100,a/1e3*100))}%`,d=s?"bg-red-500":"bg-emerald-500";return h.jsxs("div",{className:"flex flex-col items-center gap-0.5 w-1/4",children:[h.jsx("span",{className:"text-sm text-slate-200",children:i}),h.jsxs("div",{className:"surface-muted h-6 w-full relative",children:[h.jsx("div",{className:`${d} absolute bottom-0 left-0 right-0`,style:{height:o}}),h.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-white",children:a!=null?`${a} mA`:"--"})]})]})}const Ac={main:[-127,127],side:[-127,127],vacuum:[0,127]},Tc={maxSpeed:500,baseSpeed:250,boostSpeed:400},Hc=200,Vb={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Hu={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"]},Np=[{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:Hc},{type:"oi",command:"dock"},{type:"pause",duration:Hc},{type:"oi",command:"full"}]},{id:"seek-dock",label:"Dock",description:"Send the seek dock command.",steps:[{type:"oi",command:"dock"}]}];function qc(){return{vector:{x:0,y:0,boost:!1},speeds:{left:0,right:0},source:null,lastUpdatedAt:0}}function Yc(){return{main:0,side:0,vacuum:0}}function Gb(){return{enabled:!1,angle:null,config:null}}const Dm={roverId:null,mode:"drive",drive:qc(),aux:Yc(),camera:Gb(),macros:Np,keymap:Hu,inputs:{}};function Xb(i,a){switch(a.type){case"control/set-rover":return{...i,roverId:a.payload??null,drive:a.payload?i.drive:qc(),aux:a.payload?i.aux:Yc()};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:o}=a.payload;return{...i,drive:{vector:s??i.drive.vector,speeds:c??i.drive.speeds,source:o??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:qc(),aux:Yc()};default:return i}}function Fl(i,a,s){return typeof i!="number"||Number.isNaN(i)?a:Math.max(a,Math.min(s,i))}function fn(i){return typeof i!="number"||Number.isNaN(i)?0:Math.max(-1,Math.min(1,i))}function Wa(i,a){return!Array.isArray(a)||a.length!==2?i:Fl(i,a[0],a[1])}function Qb(i={}){const a=fn(i.x??0),s=fn(i.y??0);return{x:a,y:s,boost:!!i.boost}}function Zb(i={},a={}){const s=Qb(i),c=typeof a.maxSpeed=="number"?a.maxSpeed:Tc.maxSpeed,o=typeof a.baseSpeed=="number"?a.baseSpeed:Tc.baseSpeed,d=typeof a.boostSpeed=="number"?a.boostSpeed:Tc.boostSpeed,y=s.boost?d:o,g=s.y*y,p=s.x*y;return{vector:s,speeds:{left:Fl(Math.round(g+p),-c,c),right:Fl(Math.round(g-p),-c,c)}}}function Kb(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 Bm(i){return new Promise(a=>setTimeout(a,i))}function Jb(){const i=Qu(),{session:a}=wt(),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]),o=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:Wa(M?.left??0,[-500,500]),right:Wa(M?.right??0,[-500,500])};return d({type:"drive",data:{driveDirect:C}}),C},[d,s]),p=b.useCallback(({main:M=0,side:C=0,vacuum:O=0}={})=>{if(!s)return null;const B={main:Wa(M,Ac.main),side:Wa(C,Ac.side),vacuum:Wa(O,Ac.vacuum)};return d({type:"motors",data:{motorPwm:B}}),B},[d,s]),v=b.useCallback(M=>!s||!o?null:(d({type:"servo",data:{servo:{angle:M}}}),M),[d,s,o]),A=b.useCallback(M=>{if(!s)return!1;const C=Array.isArray(M)?M:typeof M=="string"?Vb[M]:null;return C?(d({type:"raw",data:{raw:Kb(C)}}),y(),!0):!1},[d,y,s]),T=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":A(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 Bm(C.duration??Hc);break}if(C.delay||C.delayMs){const O=C.delayMs??C.delay;typeof O=="number"&&O>0&&await Bm(O)}}},[s,A,g,p,v]);return b.useMemo(()=>({roverId:s,rosterEntry:c,servoConfig:o,emitCommand:d,enableSensorStream:y,sendDriveDirect:g,sendAuxMotors:p,sendServoAngle:v,sendOiCommand:A,runMacroSteps:T}),[s,c,o,d,y,g,p,v,A,T])}const $b={"{":"[","}":"]",":":";",'"':"'","<":",",">":".","?":"/","|":"\\",_:"-","+":"="},Um={"[":"BracketLeft","]":"BracketRight","\\":"Backslash",";":"Semicolon","'":"Quote",",":"Comma",".":"Period","/":"Slash","-":"Minus","=":"Equal","`":"Backquote"};function ii(i){if(typeof i!="string")return"";const a=i.toLowerCase();return $b[a]??a}function Fb(i){const a=ii(i);if(!a)return null;if(Um[a])return Um[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 Rp(i){const a=ii(i);return a?`key:${a}`:null}function Wb(i){const a=Fb(i);return a?`code:${a}`:null}function Lm(i){const a=new Set,s=Rp(i?.key??"");s&&a.add(s);const c=i?.code?`code:${i.code}`:null;return c&&a.add(c),Array.from(a)}function Ib(i={}){return Object.fromEntries(Object.entries(i).map(([a,s])=>{const c=Array.isArray(s)?s:[s],o=new Set;return c.forEach(d=>{const y=Rp(String(d));y&&o.add(y);const g=Wb(String(d));g&&o.add(g)}),[a,o]}))}function Pb(i){const a=ii(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 Mp="roverSettings",ex=3600*24*365;function tx(i){try{const a=decodeURIComponent(i??"");return JSON.parse(a)}catch(a){return console.warn("Failed to parse settings cookie",a),null}}function km(){if(typeof document>"u")return{};const i=`${Mp}=`,a=document.cookie.split(";").map(c=>c.trim()).find(c=>c.startsWith(i));if(!a)return{};const s=a.substring(i.length);return tx(s)??{}}function Hm(i){if(typeof document>"u")return!1;try{const a=encodeURIComponent(JSON.stringify(i??{})),s=`${Mp}=${a}; path=/; max-age=${ex}; samesite=strict`;return document.cookie=s,!0}catch(a){return console.warn("Failed to write settings cookie",a),!1}}const jp=b.createContext(null);function nx({children:i}){const[a,s]=b.useState(()=>({status:"loading",data:{}}));b.useEffect(()=>{const g=km();s({status:"ready",data:g??{}})},[]);const c=b.useCallback(()=>{const g=km();s({status:"ready",data:g??{}})},[]),o=b.useCallback(g=>{const p=Hm(g??{});return s(p?{status:"ready",data:g??{}}:v=>({...v,status:"error"})),p},[]),d=b.useCallback((g,p)=>{s(v=>{const A=v.data[g]||{},T=typeof p=="function"?p(A):{...A,...p??{}},M={...v.data,[g]:T};return Hm(M)?{status:"ready",data:M}:{...v,status:"error"}})},[]),y=b.useMemo(()=>({data:a.data,status:a.status,reload:c,saveAll:o,setNamespace:d}),[a,c,o,d]);return h.jsx(jp.Provider,{value:y,children:i})}function lx(){const i=b.useContext(jp);if(!i)throw new Error("useSettings must be used within SettingsProvider");return i}function ti(i,a={}){const{data:s,status:c,setNamespace:o}=lx(),d=s[i]??a??{},y=b.useCallback(v=>{o(i,A=>{const T=A??{};return typeof v=="function"?v(T):{...T,...v??{}}})},[i,o]),g=b.useCallback(v=>{o(i,()=>v??{})},[i,o]),p=b.useCallback(()=>{const v=typeof a=="object"?{...a}:a;o(i,()=>v??{})},[a,i,o]);return{value:d,status:c,save:y,replace:g,reset:p}}const Op=b.createContext(null);function qm(i){return Object.fromEntries(Object.entries(i||{}).map(([a,s])=>[a,Array.isArray(s)?[...s]:[]]))}function ax(i,a){if(!i)return a;const s=typeof i.minAngle=="number"?i.minAngle:-45,c=typeof i.maxAngle=="number"?i.maxAngle:45;return Fl(a,s,c)}function ix({children:i}){const a=Jb(),[s,c]=b.useReducer(Xb,Dm),o=b.useRef(Dm.camera.angle),{value:d,save:y}=ti("controls",{keymap:Hu,macros:Np});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 Y=a.servoConfig;if(!Y){c({type:"control/set-camera-config",payload:{config:null}}),o.current=null;return}const Q=typeof Y.minAngle=="number"?Y.minAngle:-45,X=typeof Y.maxAngle=="number"?Y.maxAngle:45,ie=typeof Y.homeAngle=="number"?Y.homeAngle:(Q+X)/2,ee=typeof o.current=="number"?Fl(o.current,Q,X):null,J=ee??Fl(ie,Q,X);c({type:"control/set-camera-config",payload:{config:Y,angle:J}}),o.current=J},[a.servoConfig]),b.useEffect(()=>{o.current=typeof s.camera.angle=="number"?s.camera.angle:o.current},[s.camera.angle]),b.useEffect(()=>{a.roverId&&a.enableSensorStream()},[a.roverId,a.enableSensorStream]);const g=b.useCallback(Y=>{c({type:"control/set-mode",payload:Y})},[]),p=b.useCallback((Y,Q={})=>{const X=Zb(Y);c({type:"control/update-drive",payload:{...X,source:Q.source??null}}),a.sendDriveDirect(X.speeds)},[a]),v=b.useCallback((Y={})=>{const Q=a.sendAuxMotors(Y)??Y;c({type:"control/set-aux-motors",payload:Q})},[a]),A=b.useCallback((Y,Q)=>{if(!Y)return!1;const X=ii(Q);if(!X)return!1;const ie=qm(s.keymap);return ie[Y]=[X],c({type:"control/set-keymap",payload:ie}),y(ee=>({...ee??{},keymap:ie})),!0},[s.keymap,y]),T=b.useCallback(()=>{const Y=qm(Hu);c({type:"control/set-keymap",payload:Y}),y(Q=>({...Q??{},keymap:Y}))},[y]),M=b.useCallback(Y=>{if(!a.servoConfig)return;const Q=ax(a.servoConfig,Y);c({type:"control/set-camera-angle",payload:Q}),a.sendServoAngle(Q),o.current=Q},[a]),C=b.useCallback((Y=0)=>{const Q=a.servoConfig;if(!Q)return;const X=typeof Y=="number"&&Y!==0?Y:Q.nudgeDegrees||1,ie=typeof o.current=="number"?o.current:typeof Q.homeAngle=="number"?Q.homeAngle:0;M(ie+X)},[a.servoConfig,M]),O=b.useCallback(()=>{const Y=a.servoConfig;if(!Y)return;const Q=typeof Y.homeAngle=="number"?Y.homeAngle:typeof Y.minAngle=="number"&&typeof Y.maxAngle=="number"?(Y.minAngle+Y.maxAngle)/2:0;M(Q)},[a.servoConfig,M]),B=b.useCallback(async Y=>{const Q=s.macros.find(X=>X.id===Y)||null;Q&&await a.runMacroSteps(Q)},[a,s.macros]),L=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]),V=b.useCallback(Y=>{a.sendOiCommand(Y)},[a]),G=b.useCallback(Y=>{a.roverId&&a.emitCommand({type:"sensorStream",data:{sensorStream:{enable:Y}}})},[a]),q=b.useCallback((Y,Q)=>{c({type:"control/register-input-state",payload:{source:Y,state:Q}})},[]),F=b.useMemo(()=>({state:s,dispatch:c,pipeline:a,actions:{setMode:g,setDriveVector:p,setAuxMotors:v,setServoAngle:M,nudgeServo:C,goServoHome:O,runMacro:B,stopAllMotion:L,sendOiCommand:V,setSensorStream:G,updateKeyBinding:A,resetKeyBindings:T,registerInputState:q}}),[s,a,g,p,v,M,C,O,B,L,V,G,A,T,q]);return h.jsx(Op.Provider,{value:F,children:i})}function mn(){const i=b.useContext(Op);if(!i)throw new Error("useControlSystem must be used within ControlSystemProvider");return i}const _c="keyboard",Cc={x:0,y:0,boost:!1},Nc={main:0,side:0,vacuum:0},ux=110;function sx(i){const a=i.target;if(!a)return!1;const s=a.tagName;return s==="INPUT"||s==="TEXTAREA"||a.isContentEditable||s==="SELECT"}function lt(i,a){if(!i||i.size===0)return!1;for(const s of a)if(i.has(s))return!0;return!1}function rx(i,a){const s=lt(a.driveForward,i),c=lt(a.driveBackward,i),o=lt(a.driveLeft,i),d=lt(a.driveRight,i),y=lt(a.boostModifier,i),g=lt(a.slowModifier,i);let p=0;s&&!c?p=1:c&&!s&&(p=-1);let v=0;o&&!d?v=-1:d&&!o&&(v=1);const A=g?.4:1;return{x:v*A,y:p*A,boost:y&&!g}}function cx(i,a){if(lt(a.auxAllForward,i))return{main:127,side:127,vacuum:127};const c=lt(a.auxMainForward,i)?127:lt(a.auxMainReverse,i)?-127:0,o=lt(a.auxSideForward,i)?127:lt(a.auxSideReverse,i)?-70:0,d=lt(a.auxVacuumFast,i)?127:lt(a.auxVacuumSlow,i)?50:0;return{main:c,side:o,vacuum:d}}function ox(){const{state:i,actions:{setMode:a,setDriveVector:s,setAuxMotors:c,nudgeServo:o,runMacro:d,stopAllMotion:y,registerInputState:g}}=mn(),p=b.useMemo(()=>Ib(i.keymap),[i.keymap]),v=b.useMemo(()=>{const Y=new Set;return Object.values(p).forEach(Q=>{Q&&Q.forEach(X=>Y.add(X))}),Y},[p]),A=b.useMemo(()=>Math.abs(i.camera?.config?.nudgeDegrees||1),[i.camera?.config?.nudgeDegrees]),T=b.useRef(new Set),M=b.useRef(Cc),C=b.useRef(Nc),O=b.useRef(null),B=b.useCallback(()=>{const Y=new Set(T.current),Q=rx(Y,p),X=cx(Y,p);(Q.x!==M.current.x||Q.y!==M.current.y||Q.boost!==M.current.boost)&&(M.current=Q,s(Q,{source:_c})),(X.main!==C.current.main||X.side!==C.current.side||X.vacuum!==C.current.vacuum)&&(C.current=X,c(X)),g(_c,{keys:Array.from(Y),vector:Q,aux:X})},[p,g,c,s]),L=b.useCallback(()=>{O.current&&(clearTimeout(O.current),O.current=null)},[]),V=b.useCallback(()=>{const Y=new Set(T.current),Q=lt(p.cameraUp,Y),X=lt(p.cameraDown,Y);return(Q?1:0)-(X?1:0)},[p]),G=b.useCallback(()=>{if(V()===0){L();return}if(O.current)return;const Q=()=>{const X=V();if(X===0){L();return}o(X*A),O.current=setTimeout(Q,ux)};O.current=setTimeout(Q,0)},[V,o,A,L]),q=b.useCallback(()=>{T.current.clear(),M.current=Cc,C.current=Nc,L(),y(),g(_c,{keys:[],vector:Cc,aux:Nc})},[g,y,L]);b.useEffect(()=>{function Y(ie){if(sx(ie))return;const ee=Lm(ie);if(ee.length===0)return;ee.some(le=>v.has(le))&&ie.preventDefault();const J=ee.filter(le=>!T.current.has(le));J.forEach(le=>T.current.add(le)),J.length>0&&(J.some(le=>p.driveMacro?.has(le))?(a("drive"),d("drive-sequence")):J.some(le=>p.dockMacro?.has(le))&&(a("dock"),d("seek-dock"))),G(),B()}function Q(ie){Lm(ie).forEach(J=>T.current.delete(J)),G(),B()}function X(){q()}return window.addEventListener("keydown",Y),window.addEventListener("keyup",Q),window.addEventListener("blur",X),()=>{window.removeEventListener("keydown",Y),window.removeEventListener("keyup",Q),window.removeEventListener("blur",X)}},[v,B,G,p.dockMacro,p.driveMacro,q,d,a]);const F=b.useRef(q);return b.useEffect(()=>{F.current=q},[q]),b.useEffect(()=>{F.current()},[i.roverId]),b.useEffect(()=>()=>{L()},[L]),null}const rl={gamepad:{driveDeadzone:.2,cameraDeadzone:.25,servoStep:2,auxReverseScale:.55}},qu={drive:{horizontal:null,vertical:null},camera:{vertical:null},brushes:{mainAxis:null,sideAxis:null},buttons:{allAux:null,vacuum:null,mainReverse:null,sideReverse:null,dock:null,drive:null}},Ia="gamepad";function Rc(i,a){return Math.abs(i)<a?0:i}function Ym(i,a){return i&&a&&i.x===a.x&&i.y===a.y&&i.boost===a.boost}function Vm(i,a){return i&&a&&i.main===a.main&&i.side===a.side&&i.vacuum===a.vacuum}function fx(){const{actions:{setMode:i,setDriveVector:a,setAuxMotors:s,nudgeServo:c,runMacro:o,registerInputState:d}}=mn(),{value:y}=ti("inputs",rl),{value:g}=ti("gamepadMapping",qu),p=y.gamepad??rl.gamepad,v=Math.min(Math.max(p.driveDeadzone??.2,0),.8),A=Math.min(Math.max(p.cameraDeadzone??.25,0),.9),T=p.servoStep??rl.gamepad.servoStep,M=p.auxReverseScale??rl.gamepad.auxReverseScale,C=!!g?.drive?.horizontal&&!!g?.drive?.vertical&&!!g?.camera?.vertical&&!!g?.brushes?.mainAxis&&!!g?.brushes?.sideAxis&&!!g?.buttons?.mainReverse&&!!g?.buttons?.sideReverse&&!!g?.buttons?.vacuum&&!!g?.buttons?.allAux&&!!g?.buttons?.drive&&!!g?.buttons?.dock,O=b.useRef(null),B=b.useRef({x:0,y:0,boost:!1}),L=b.useRef({main:0,side:0,vacuum:0}),V=b.useRef(new Map),G=b.useRef(0),q=b.useRef({main:!1,side:!1}),F=b.useCallback((ee,J)=>{const le=V.current.get(ee)||!1;return V.current.set(ee,J),J&&!le},[]),Y=b.useCallback((ee,J)=>{if(!J)return 0;const le=ee.axes?.[J.index]??0;return J.invert?-le:le},[]),Q=b.useCallback((ee,J)=>{if(!J)return 0;const le=ee.buttons?.[J.index];return le?typeof le.value=="number"?le.value:le.pressed?1:0:0},[]),X=b.useCallback((ee,J)=>{if(!J)return!1;const le=ee.buttons?.[J.index];return le?le.pressed||le.value>.5:!1},[]),ie=b.useCallback(()=>{if(typeof navigator>"u"||!navigator.getGamepads)return;const ee=navigator.getGamepads(),J=ee&&Array.from(ee).find(Boolean);if(!J){Ym(B.current,{x:0,y:0,boost:!1})||(B.current={x:0,y:0,boost:!1},a({x:0,y:0,boost:!1},{source:Ia})),Vm(L.current,{main:0,side:0,vacuum:0})||(L.current={main:0,side:0,vacuum:0},s({main:0,side:0,vacuum:0})),d(Ia,{connected:!1,mappingReady:C});return}if(!C){d(Ia,{connected:!0,mappingReady:!1});return}const le=fn(Rc(Y(J,g.drive.horizontal),v)),we=fn(Rc(-Y(J,g.drive.vertical),v)),Xe={x:le,y:we,boost:!1};Ym(Xe,B.current)||(B.current=Xe,a(Xe,{source:Ia}));const Ke=Y(J,g.brushes.mainAxis),Pe=Math.round(Math.min(Math.abs(Ke),1)*127),D=q.current.main?-Pe:Pe,Z=Y(J,g.brushes.sideAxis),te=Math.round(Math.min(Math.abs(Z),1)*127),be=q.current.side?-Math.round(te*M):Math.round(te*M),Se=X(J,g.buttons.vacuum)?127:0;let E={main:D,side:be,vacuum:Se};X(J,g.buttons.allAux)&&(E={main:127,side:127,vacuum:127}),Vm(E,L.current)||(L.current=E,s(E));const k=fn(Rc(-Y(J,g.camera.vertical),A)),K=performance.now();Math.abs(k)>.25&&K-G.current>120&&(G.current=K,c(k>0?T:-T)),F("toggle-main",X(J,g.buttons.mainReverse))&&(q.current.main=!q.current.main),F("toggle-side",X(J,g.buttons.sideReverse))&&(q.current.side=!q.current.side),F(`macro-${g.buttons.drive.index}`,X(J,g.buttons.drive))&&(i("drive"),o("drive-sequence")),F(`macro-${g.buttons.dock.index}`,X(J,g.buttons.dock))&&(i("dock"),o("seek-dock")),d(Ia,{connected:!0,mappingReady:!0,id:J.id,index:J.index,axes:[le,we,k],reverse:{...q.current}})},[M,A,v,Y,Q,F,X,g.buttons?.allAux,g.buttons?.dock,g.buttons?.drive,g.buttons?.mainReverse,g.buttons?.sideReverse,g.buttons?.vacuum,g.camera?.vertical,g.drive?.horizontal,g.drive?.vertical,g.brushes?.mainAxis,g.brushes?.sideAxis,C,c,d,o,T,s,a,i]);return b.useEffect(()=>{function ee(){ie(),O.current=requestAnimationFrame(ee)}return O.current=requestAnimationFrame(ee),()=>{O.current&&cancelAnimationFrame(O.current)}},[ie]),null}function to(){const{state:{roverId:i},actions:a}=mn(),c=Zu(i)?.sensors||{},o=(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:"panel-section space-y-0.5 text-base",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?"Ready to drive":"No rover assigned"})]}),h.jsxs("div",{className:"space-y-0.5",children:[h.jsx(Gm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:o?"Ready!":"Not Ready!",active:o}],tone:"emerald",onClick:g,disabled:!i}),h.jsx(Gm,{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 Gm({title:i,description:a,statuses:s,tone:c,onClick:o,disabled:d,footnote:y}){const g=c==="indigo"?{base:"bg-indigo-600",hover:"hover:bg-indigo-500"}:{base:"bg-emerald-600",hover:"hover:bg-emerald-500"};return h.jsxs("button",{type:"button",onClick:o,disabled:d,className:`w-full ${g.base} ${g.hover} px-0.5 py-0.5 text-left text-white transition-colors 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-0.5 flex flex-wrap gap-0.5",children:s.map(p=>h.jsx("span",{className:`px-0.5 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-0.5 text-xs text-emerald-50/80",children:y})]})}const dx=5e3;function hx(i){return i.id?i.id:i.timestamp?`${i.timestamp}-${i.message}`:`${i.title||"alert"}-${i.message}`}function mx(){const{alerts:i}=wt(),[a,s]=b.useState(()=>Date.now()),c=b.useMemo(()=>i.slice(-5).map(d=>({alert:d,key:hx(d)})),[i]);b.useEffect(()=>{if(!c.length)return;const d=setInterval(()=>s(Date.now()),200);return()=>clearInterval(d)},[c.length]);const o=c.map(d=>({...d,age:a-(d.alert.receivedAt??d.alert.timestamp??0)})).filter(d=>d.age<=dx);return o.length?h.jsx("div",{className:"pointer-events-none fixed top-0.5 left-1/2 z-50 flex -translate-x-1/2 flex-col gap-0.5",children:o.map(d=>h.jsx(px,{alert:d.alert},d.key))}):null}function px({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 px-0.5 py-0.5 text-[0.85rem] ${a}`,children:[h.jsx("p",{className:"text-xs text-slate-200",children:i.title||"Alert"}),h.jsx("p",{className:"text-sm text-white",children:i.message})]})}const yx=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function no(){const{session:i,lockRover:a,setMode:s,requestControl:c}=wt(),o=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,O)=>{try{await a(C,O),y(B=>({...B,[C]:O}))}catch(B){alert(B.message)}},A=async C=>{const O=C.target.value;try{await s(O)}catch(B){alert(B.message)}},T=async C=>{try{await c(C,{force:!0})}catch(O){alert(O.message)}},M=b.useMemo(()=>{const C={};return o.forEach(O=>{C[O.id]=d[O.id]??O.locked}),C},[o,d]);return g?h.jsxs("section",{className:"panel-section space-y-0.5 text-base",children:[h.jsxs("div",{className:"flex items-center justify-between gap-0.5 text-sm",children:[h.jsx("span",{children:"Admin controls"}),h.jsx("select",{value:p,onChange:A,className:"field-input text-sm",children:yx.map(C=>h.jsx("option",{value:C.key,children:C.label},C.key))})]}),h.jsx(Cp,{roster:o,renderActions:C=>h.jsxs("div",{className:"flex flex-wrap gap-0.5 text-xs",children:[h.jsx("button",{type:"button",onClick:()=>v(C.id,!M[C.id]),className:"button-dark",children:M[C.id]?"Unlock":"Lock"}),h.jsx("button",{type:"button",onClick:()=>T(C.id),className:"button-dark",children:"Force"})]})})]}):null}function vx({size:i="default"}){const{state:{roverId:a},actions:s}=mn(),[c,o]=b.useState(null),d=!a||c!==null,g=Zu(a)?.sensors?.oiMode?.label||"Unknown",v=g.toLowerCase()==="full",A=v?"Drive Ready":`OI Mode: ${g}`,T=async()=>{if(a){o("drive");try{s.setMode("drive"),await s.runMacro("drive-sequence")}finally{o(null)}}},M=async()=>{if(a){o("dock");try{s.setMode("dock"),await s.runMacro("seek-dock")}finally{o(null)}}},C=i==="compact"?"text-xs px-0.5 py-0.5":"text-sm px-0.5 py-0.5";return h.jsxs("div",{className:"bg-black/30 p-0.5 text-slate-100",children:[h.jsx("div",{className:"flex items-center",children:h.jsx("span",{className:`${v?"bg-emerald-700":"bg-indigo-700"} ${C}`,children:A})}),h.jsxs("div",{className:"mt-0.5 grid grid-cols-2 gap-0.5 text-xs",children:[h.jsx("button",{type:"button",onClick:T,disabled:d,className:`bg-emerald-600 px-0.5 py-0.5 font-semibold text-emerald-50 transition-colors hover:bg-emerald-500 disabled:opacity-40 ${i==="compact"?"text-xs":"text-sm"}`,children:"Drive"}),h.jsx("button",{type:"button",onClick:M,disabled:d,className:`bg-indigo-600 px-0.5 py-0.5 font-semibold text-indigo-50 transition-colors hover:bg-indigo-500 disabled:opacity-40 ${i==="compact"?"text-xs":"text-sm"}`,children:"Dock"})]})]})}const Mu="mobile-joystick",gx=80,bx=.15,xx=[{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 Sx({disabled:i,layout:a,radius:s,onMove:c,onStop:o}){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}}),A=b.useCallback(()=>{y.current=null,v({active:!1,base:{x:0,y:0},knob:{x:0,y:0}}),o?.()},[o]),T=b.useCallback(B=>{if(i||y.current!==null)return;B.preventDefault();const L=d.current;if(!L)return;const V=L.getBoundingClientRect(),G=B.clientX-V.left,q=B.clientY-V.top;g.current={x:G,y:q},y.current=B.pointerId,L.setPointerCapture?.(B.pointerId),v({active:!0,base:{x:G,y:q},knob:{x:0,y:0}})},[i]),M=b.useCallback(B=>{if(i||y.current!==B.pointerId)return;B.preventDefault();const L=d.current;if(!L)return;const V=L.getBoundingClientRect(),G=B.clientX-V.left,q=B.clientY-V.top,F=G-g.current.x,Y=q-g.current.y,Q=Math.min(Math.hypot(F,Y),s),X=Math.atan2(Y,F),ie=Math.cos(X)*Q,ee=Math.sin(X)*Q,J={x:fn(ie/s),y:fn(-ee/s),boost:!1};v(le=>({...le,knob:{x:ie,y:ee}})),c?.(J)},[i,c]),C=b.useCallback(B=>{if(y.current!==B.pointerId)return;B.preventDefault(),d.current?.releasePointerCapture?.(B.pointerId),A()},[A]);b.useEffect(()=>{i&&A()},[i,A]);const O=a==="landscape"?"h-[260px]":"h-[220px]";return h.jsxs("div",{ref:d,role:"presentation",className:`relative w-full ${O} select-none overflow-hidden bg-zinc-950`,style:{touchAction:"none"},onPointerDown:T,onPointerMove:M,onPointerUp:C,onPointerLeave:C,onPointerCancel:C,onContextMenu:B=>B.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 bg-cyan-400/10 outline outline-2 outline-cyan-400/60 [clip-path:circle(50%)]",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 bg-cyan-300/80 shadow-lg [clip-path:circle(50%)]",style:{left:p.base.x+p.knob.x,top:p.base.y+p.knob.y}})]})]})}function wp({layout:i}){const{state:{roverId:a,camera:s},actions:{setDriveVector:c,registerInputState:o,stopAllMotion:d,setServoAngle:y}}=mn(),g=!a,p=s?.config,v=!!(a&&s?.enabled&&p),A=typeof p?.minAngle=="number"?p.minAngle:-45,T=typeof p?.maxAngle=="number"?p.maxAngle:45,M=typeof s?.angle=="number"?s.angle:typeof p?.homeAngle=="number"?p.homeAngle:(A+T)/2,C=gx,O=bx,B=b.useRef({x:0,y:0,boost:!1});b.useEffect(()=>{g&&(B.current={x:0,y:0,boost:!1})},[g]);const L=b.useCallback((q={})=>{if(g)return;const F={x:fn(q.x??0),y:fn(q.y??0),boost:!!q.boost},Y={x:B.current.x+(F.x-B.current.x)*(1-O),y:B.current.y+(F.y-B.current.y)*(1-O),boost:F.boost};B.current=Y,c(Y,{source:Mu}),o(Mu,{vector:Y,lastEvent:"move"})},[g,o,c,O]),V=b.useCallback(()=>{if(g)return;const q={x:0,y:0,boost:!1};B.current=q,c(q,{source:Mu}),o(Mu,{vector:q,lastEvent:"stop"})},[g,o,c]),G=q=>{if(!v)return;const F=Number(q.target.value);Number.isNaN(F)||y(F)};return h.jsxs("div",{className:"flex flex-col gap-0.5 text-slate-100",children:[h.jsx(vx,{size:"compact"}),h.jsx(Sx,{disabled:g,layout:i,radius:C,onMove:L,onStop:V}),h.jsx("button",{type:"button",onClick:d,disabled:g,className:"button-danger w-full disabled:opacity-40",children:"Panic Stop"}),v&&h.jsxs("div",{className:"bg-zinc-950 p-0.5 text-xs",children:[h.jsxs("div",{className:"flex items-center justify-between text-[0.75rem] text-slate-400",children:[h.jsx("span",{children:"Camera Tilt"}),h.jsxs("span",{className:"font-mono text-slate-200",children:[M.toFixed(1),"°"]})]}),h.jsx("input",{type:"range",min:A,max:T,step:.5,value:M,onChange:G,className:"mt-0.5 w-full accent-cyan-400"})]})]})}function zp({orientation:i}){const{state:{roverId:a},actions:{setAuxMotors:s}}=mn(),c=b.useRef(null),o=!a,d=b.useCallback(p=>{if(!o){if(p.hold===!1){s(p.values),c.current=null;return}c.current=p.id,s(p.values)}},[o,s]),y=b.useCallback(p=>{o||p.hold===!1||c.current===p.id&&(c.current=null,s({main:0,side:0,vacuum:0}))},[o,s]),g=i==="landscape"?"grid-cols-1":"grid-cols-1 sm:grid-cols-2";return h.jsxs("div",{className:"flex flex-col gap-0.5 text-slate-100",children:[h.jsx("p",{className:"text-xs text-slate-400",children:"Aux controls"}),h.jsx("div",{className:`grid ${g} gap-0.5`,children:xx.map(p=>h.jsx("button",{type:"button",disabled:o,onPointerDown:v=>{v.preventDefault(),d(p)},onPointerUp:()=>y(p),onPointerLeave:()=>y(p),onPointerCancel:()=>y(p),onContextMenu:v=>v.preventDefault(),className:`px-0.5 py-0.5 text-left text-sm font-semibold text-white transition ${p.color} hover:brightness-110 disabled:opacity-30`,children:p.label},p.id))})]})}function Ex(){return h.jsx("div",{className:"flex h-full flex-col gap-0.5",children:h.jsx(zp,{orientation:"landscape"})})}function Ax(){return h.jsx("div",{className:"flex h-full flex-col gap-0.5",children:h.jsx(wp,{layout:"landscape"})})}function Tx(){return h.jsx("section",{className:"panel",children:h.jsxs("div",{className:"grid grid-cols-2 gap-0.5",children:[h.jsx(zp,{orientation:"portrait"}),h.jsx(wp,{layout:"portrait"})]})})}function _x(i){if(!i)return null;if(typeof i=="string"){const a=String(i).trim();return a?{type:"rover",id:a,key:a}:null}if(typeof i=="object"){if(i.type&&i.id){const a=String(i.id);return{type:i.type,id:a,key:i.key||`${i.type}:${a}`}}if(i.roverId){const a=String(i.roverId);return{type:"rover",id:a,key:i.key||a}}if(i.roomCameraId){const a=String(i.roomCameraId);return{type:"room",id:a,key:i.key||`room:${a}`}}}return null}function Cx(i=[]){const a=new Set,s=[];return i.forEach(c=>{!c?.key||a.has(c.key)||(a.add(c.key),s.push(c))}),s.sort((c,o)=>c.key.localeCompare(o.key))}function lo(i=[]){const a=Qu(),[s,c]=b.useState({}),o=b.useMemo(()=>Array.isArray(i)?Cx(i.map(_x).filter(Boolean)):[],[i]),d=b.useMemo(()=>o.map(p=>`${p.type}:${p.id}:${p.key}`).join("|"),[o]),y=b.useRef([]);return b.useEffect(()=>{y.current=o},[o]),b.useEffect(()=>{if(!d)return;const p=y.current;let v=!1;return p.forEach(A=>{const T=A.type==="room"?{roomCameraId:A.id}:{roverId:A.id};a.emit("video:request",T,(M={})=>{v||c(C=>({...C,[A.key]:M}))})}),()=>{v=!0}},[a,d]),b.useMemo(()=>{if(!d)return{};const p={};return o.forEach(v=>{s[v.key]&&(p[v.key]=s[v.key])}),p},[d,s,o])}const Nx={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function Rx(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 Mx(i){if(!i)return{};const a=`${i}:${i}`;return{Authorization:`Basic ${Rx(a)}`}}class jx{constructor({url:a,token:s,video:c,onStatus:o}){this.url=a,this.token=s,this.video=c,this.pc=null,this.abortController=null,this.onStatus=o}notify(a,s){typeof this.onStatus=="function"&&this.onStatus(a,s)}configureVideoElement(){this.video&&(this.video.playsInline=!0,this.video.autoplay=!0,this.video.muted=!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(Nx);this.pc=a;const s=new MediaStream;a.ontrack=c=>{c.streams[0]?.getTracks().forEach(o=>s.addTrack(o)),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 o=await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/sdp",...Mx(this.token)},body:c.sdp,signal:this.abortController.signal});if(!o.ok)throw new Error(`WHEP request failed: ${o.status}`);const d=await o.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 Ox=2e3,wx=3e3;function ao({sessionInfo:i,label:a,forceMute:s=!1,telemetryFrame:c,batteryConfig:o,showBatteryBar:d=!0}){const y=b.useRef(null),g=b.useRef(null),p=b.useRef(null),[v,A]=b.useState("idle"),[T,M]=b.useState(null),[C,O]=b.useState(0),[B,L]=b.useState(!0),V=c?.sensors,G=V?.batteryChargeMah??null,q=V?.wheelOvercurrents||null,F=q==null?[]:Object.entries(q).filter(([,J])=>!!J).map(([J])=>J),Y=b.useCallback(()=>{clearTimeout(g.current),g.current=setTimeout(()=>O(Date.now()),Ox)},[]),Q=b.useCallback(async()=>{const J=y.current;if(J)try{J.muted=!0,await J.play()}catch{}},[]),X=b.useCallback((J=0)=>{if(s)return;clearTimeout(p.current);const le=()=>{clearTimeout(p.current),p.current=setTimeout(()=>{s||we()},wx)},we=async()=>{const Xe=y.current;if(Xe)try{await Q(),Xe.muted=!1,await Xe.play(),L(!1)}catch{Xe.muted=!0,L(!0),le()}};p.current=setTimeout(we,J)},[Q,s]);b.useEffect(()=>()=>{clearTimeout(g.current),clearTimeout(p.current)},[]),b.useEffect(()=>{v==="playing"&&X(0)},[v,X]),b.useEffect(()=>{if(!i?.url||!y.current)return;let J=!0,le;const we=setTimeout(()=>L(!0),0),Xe=(Ke,Pe)=>{J&&(A(Ke),M(Pe||null),Ke==="playing"&&Q(),["error","failed","disconnected","closed"].includes(Ke)&&Y())};return le=new jx({url:i.url,token:i.token,video:y.current,onStatus:Xe}),le.start().catch(Ke=>{J&&(A("error"),M(Ke.message),Y())}),()=>{J=!1,clearTimeout(we),le?.stop()}},[i?.url,i?.token,C,Y,Q]),b.useEffect(()=>{v==="stopped"&&i?.url&&Y()},[v,i?.url,Y]);const ie=i?.url?v==="error"?`Error: ${T||"unknown"}`:T?`${v} (${T})`:v:"waiting",ee=()=>h.jsx("div",{className:"panel-section space-y-0.5 text-sm",children:h.jsx("div",{className:"flex items-center justify-between text-xs text-slate-400",children:h.jsx("span",{children:ie})})});return h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsxs("div",{className:"relative w-full overflow-hidden bg-black aspect-video",children:[h.jsx("video",{ref:y,muted:s||B,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),h.jsx(Dx,{frame:c,label:a}),h.jsx(Ux,{motors:F})]}),d?h.jsx(zx,{charge:G,config:o,label:a,status:ie}):ee()]})}function zx({charge:i,config:a,status:s}){const c=a?.Full,o=a?.Warn,d=a?.Urgent??null;if(i==null||c==null||o==null)return h.jsxs("div",{className:"panel-section space-y-0.5 text-sm",children:[h.jsx("div",{className:"flex items-center justify-between text-xs text-slate-400",children:h.jsx("span",{children:s})}),h.jsx("p",{className:"text-xs text-slate-500",children:"Battery telemetry unavailable"})]});const y=c-o;if(y<=0)return null;const g=(i-o)/y,p=Math.min(1,Math.max(0,g)),v=Math.round(p*100),A=`${v}%`,T=g<=0,M=d!=null&&i<=d,C=T?"bg-red-500 animate-pulse":M?"bg-amber-400":"bg-emerald-500";return h.jsxs("div",{className:"panel-section space-y-0.5 text-sm",children:[h.jsx("div",{className:"flex items-center justify-between text-xs text-slate-400",children:h.jsx("span",{children:s})}),h.jsxs("div",{className:"relative h-4 w-full bg-zinc-900",children:[h.jsx("div",{className:`h-full transition-[width] ${C}`,style:{width:`${v}%`}}),h.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:["Battery ",A]})]})]})}function Dx({frame:i,label:a}){const c=i?.sensors?.bumpsAndWheelDrops||{},[o,d]=b.useState(()=>Date.now());b.useEffect(()=>{const g=setInterval(()=>d(Date.now()),150);return()=>clearInterval(g)},[]);const y=i?.receivedAt?o-i.receivedAt<200:!1;return h.jsxs("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:[h.jsxs("div",{className:"absolute bottom-0.5 left-1/2 flex -translate-x-1/2 gap-0.5 bg-black/80 px-0.5 py-0.5 text-xs text-slate-100",children:[h.jsxs("span",{children:["You are driving ",a||"Unnamed Rover"]}),h.jsx("span",{children:y?"Sensors active":"No recent sensors"})]}),h.jsxs("div",{className:"absolute top-0.5 left-1/2 flex -translate-x-1/2 gap-0.5 bg-black/70 px-0.5 py-0.5 text-[0.6rem] font-medium text-slate-200",children:[h.jsx("div",{className:`px-0.5 py-0.5 ${c.bumpLeft?"bg-red-600 text-white animate-pulse":"text-slate-500"}`,children:"Left bump"}),h.jsx("div",{className:`px-0.5 py-0.5 ${c.wheelDropLeft?"bg-red-600 text-white animate-pulse":"text-slate-500"}`,children:"Left wheel drop"}),h.jsx("div",{className:`px-0.5 py-0.5 ${c.wheelDropRight?"bg-red-600 text-white animate-pulse":"text-slate-500"}`,children:"Right wheel drop"}),h.jsx("div",{className:`px-0.5 py-0.5 ${c.bumpRight?"bg-red-600 text-white animate-pulse":"text-slate-500"}`,children:"Right bump"})]})]})}const Bx={leftWheel:"Left wheel",rightWheel:"Right wheel",mainBrush:"Main brush",sideBrush:"Side brush"};function Ux({motors:i}){if(!i?.length)return null;const a=i.map(s=>Bx[s]||s);return h.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:h.jsxs("div",{className:"text-center text-2xl font-semibold text-white animate-pulse",children:[h.jsx("div",{children:"Overcurrent"}),h.jsx("div",{className:"mt-0.5 text-xl font-medium text-white",children:a.join(", ")})]})})}function Lx(){return h.jsxs("div",{className:"panel-section space-y-0.5 text-sm",children:[h.jsx("p",{className:"text-center text-slate-400",children:"No room cameras configured."}),h.jsx("p",{className:"text-center text-slate-500",children:"Add entries to server config to populate this list."})]})}function io(){const{session:i}=wt(),a=i?.roomCameras||[],s=a.map(o=>({type:"room",id:o.id,key:`room:${o.id}`})),c=lo(s);return a.length===0?h.jsx(Lx,{}):h.jsxs("section",{className:"panel-section space-y-0.5 text-base",children:[h.jsxs("header",{className:"flex items-center justify-between text-sm text-slate-400",children:[h.jsx("p",{children:"Room cameras"}),h.jsx("span",{children:a.length})]}),h.jsx("div",{className:"grid gap-0.5 sm:grid-cols-2",children:a.map(o=>{const d=`room:${o.id}`,y=c[d];return h.jsxs("article",{className:"space-y-0.5 rounded border border-slate-800 bg-zinc-950 p-0.5",children:[h.jsxs("header",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-lg font-semibold text-white",children:o.name||o.id}),o.description&&h.jsx("p",{className:"text-xs text-slate-500",children:o.description})]}),h.jsx(ao,{sessionInfo:y,label:o.name||o.id,forceMute:!0,showBatteryBar:!1})]},o.id)})})]})}function uo(){const{logs:i}=wt();return h.jsxs("div",{className:"panel-section space-y-0.5 text-base",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:"surface h-64 overflow-y-auto font-mono text-xs",children:i.length===0?h.jsx("p",{children:"No logs yet."}):i.slice().reverse().map(a=>h.jsxs("div",{className:"surface",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 Ku(){const{login:i,setRole:a}=wt(),[s,c]=b.useState(""),[o,d]=b.useState(""),[y,g]=b.useState(!1);async function p(v){v.preventDefault(),g(!0);try{await i(s,o),c(""),d("")}catch(A){alert(A.message)}finally{g(!1)}}return h.jsxs("div",{className:"panel-section space-y-0.5 text-base",children:[h.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),h.jsxs("form",{className:"flex flex-col gap-0.5",onSubmit:p,children:[h.jsx("input",{className:"field-input",placeholder:"Username",value:s,onChange:v=>c(v.target.value)}),h.jsx("input",{className:"field-input",placeholder:"Password",type:"password",value:o,onChange:v=>d(v.target.value)}),h.jsx("button",{type:"submit",disabled:y,className:"button-dark w-full disabled:opacity-50",children:y?"Logging in…":"Login"})]})]})}function so(){const{session:i}=wt(),a=i?.assignment?.roverId,s=lo(a?[a]:[]),c=a?s[a]:null,o=Zu(a),d=a&&i?.roster?i.roster.find(p=>String(p.id)===String(a)):null,y=d?.battery??null,g=d?.name||(a?`Rover ${a}`:"");return h.jsx("section",{className:"panel",children:a?h.jsx(ao,{sessionInfo:c,label:g,telemetryFrame:o,batteryConfig:y}):h.jsx("p",{className:"panel-muted",children:"Assign a rover to view the video feed."})})}const kx=150;function ju(i){return typeof i!="number"||Number.isNaN(i)?"—":`${i>0?"+":""}${i.toFixed(1)}°`}function Hx(){const{state:{roverId:i,camera:a},actions:{setServoAngle:s,nudgeServo:c,goServoHome:o}}=mn(),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[A,T]=b.useState(v),M=b.useRef(null),C=b.useRef(!1);b.useEffect(()=>{C.current||T(v)},[v]),b.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]);const O=typeof d?.nudgeDegrees=="number"&&d.nudgeDegrees>0?d.nudgeDegrees:1,B=q=>{M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{s(q)},kx)},L=q=>{const F=Number.parseFloat(q.target.value);Number.isNaN(F)||(C.current=!0,T(F),B(F))},V=()=>{C.current=!1,M.current&&clearTimeout(M.current),s(A)},G=q=>{const F=O*q;c(F)};return h.jsxs("section",{className:"panel-section space-y-0.5 text-base",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:ju(v)})]}),h.jsxs("div",{children:[h.jsx("input",{type:"range",className:"w-full accent-emerald-400",min:g,max:p,step:.5,value:A,onChange:L,onMouseUp:V,onTouchEnd:V,onPointerUp:V}),h.jsxs("div",{className:"mt-0.5 flex justify-between text-xs text-slate-400",children:[h.jsx("span",{children:ju(g)}),h.jsx("span",{children:ju(p)})]})]}),h.jsxs("div",{className:"flex gap-0.5 text-sm",children:[h.jsx("button",{type:"button",className:"flex-1 button-dark",onClick:()=>G(-1),children:"Tilt Down"}),h.jsx("button",{type:"button",className:"flex-1 button-dark",onClick:()=>o(),children:"Center"}),h.jsx("button",{type:"button",className:"flex-1 button-dark",onClick:()=>G(1),children:"Tilt Up"})]}),h.jsxs("p",{className:"text-xs text-slate-400",children:["Step: ",ju(O)," · Pin GPIO ",d?.pin]})]})}const qx=[{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 Yx(i){return i.reduce((a,s)=>((a[s.group]||(a[s.group]=[])).push(s),a),{})}function Vx(i){const[a,s]=b.useState(null);return b.useEffect(()=>{if(!a)return;function c(o){if(o.preventDefault(),o.key==="Escape"){s(null);return}const d=ii(o.key??"");d&&(i(a,d,o),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 Gx(){const{state:{keymap:i},actions:{updateKeyBinding:a,resetKeyBindings:s}}=mn(),c=b.useMemo(()=>Yx(qx),[]),{active:o,startCapture:d,cancel:y}=Vx((p,v)=>{a(p,v)}),g=b.useCallback(p=>i?.[p]?.[0]||Hu[p]?.[0]||"",[i]);return h.jsxs("section",{className:"panel-section space-y-0.5 text-sm",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs 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:"button-dark text-xs",children:"Reset defaults"})]}),h.jsx("div",{className:"space-y-0.5",children:Object.entries(c).map(([p,v])=>h.jsxs("div",{className:"space-y-0.5 surface",children:[h.jsx("p",{className:"text-[0.75rem] text-slate-400",children:p}),h.jsx("div",{className:"space-y-0.5",children:v.map(A=>{const T=g(A.id),M=o===A.id;return h.jsxs("div",{className:"surface-muted flex items-center justify-between text-xs",children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-semibold text-slate-100",children:A.label}),h.jsx("p",{className:"text-[0.65rem] text-slate-400",children:Pb(T)})]}),h.jsxs("div",{className:"flex items-center gap-0.5",children:[M&&h.jsx("button",{type:"button",onClick:()=>y(),className:"button-danger text-[0.7rem]",children:"Cancel"}),h.jsx("button",{type:"button",onClick:()=>d(A.id),className:`${M?"px-0.5 py-0.5 bg-emerald-500 text-emerald-950 hover:bg-emerald-400":"button-dark"} text-[0.7rem] font-medium transition-colors`,children:M?"Press a key…":"Change"})]})]},A.id)})})]},p))})]})}function Xx(){const[i,a]=b.useState(!1);return b.useEffect(()=>{function s(){const o=navigator.getGamepads?.();a(!!(o&&Array.from(o).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 Qx=new Intl.NumberFormat(void 0,{maximumFractionDigits:2}),Zx=[{id:"driveHorizontal",label:"Drive horizontal",type:"axis",section:"Drive joystick",path:["drive","horizontal"]},{id:"driveVertical",label:"Drive vertical",type:"axis",section:"Drive joystick",path:["drive","vertical"]},{id:"cameraVertical",label:"Camera vertical",type:"axis",section:"Camera joystick",path:["camera","vertical"]},{id:"mainAxis",label:"Main brush axis",type:"axis",section:"Brush analog",path:["brushes","mainAxis"]},{id:"sideAxis",label:"Side brush axis",type:"axis",section:"Brush analog",path:["brushes","sideAxis"]},{id:"mainReverse",label:"Toggle main reverse",type:"button",section:"Brush toggles",path:["buttons","mainReverse"]},{id:"sideReverse",label:"Toggle side reverse",type:"button",section:"Brush toggles",path:["buttons","sideReverse"]},{id:"vacuum",label:"Vacuum button",type:"button",section:"Auxiliary buttons",path:["buttons","vacuum"]},{id:"allAux",label:"All aux button",type:"button",section:"Auxiliary buttons",path:["buttons","allAux"]},{id:"drive",label:"Drive macro button",type:"button",section:"Mode buttons",path:["buttons","drive"]},{id:"dock",label:"Dock macro button",type:"button",section:"Mode buttons",path:["buttons","dock"]}];function Ou({label:i,description:a,min:s,max:c,step:o,value:d,onChange:y}){return h.jsxs("label",{className:"surface block",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:Qx.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:o,value:d,onChange:g=>y(Number(g.target.value)),className:"mt-0.5 w-full accent-emerald-400"})]})}function Kx(i){return i?`Axis ${i.index}${i.invert?" (invert)":""}`:"Unassigned"}function Jx(i){return i?`Button ${i.index}`:"Unassigned"}function Mc(i,a,s){const[c,o]=a,d={...i??qu};return d[c]={...d[c]??qu[c]},d[c][o]=s(d[c][o]),d}function $x(){const i=Xx(),{value:a,save:s,reset:c}=ti("gamepadMapping",qu),{value:o,save:d}=ti("inputs",rl),y=o.gamepad??rl.gamepad,[g,p]=b.useState(null),v=b.useRef(null),A=O=>{d(B=>({...B,gamepad:{...B.gamepad??rl.gamepad,...O}}))};b.useEffect(()=>{v.current=null},[g]),b.useEffect(()=>{if(!g)return;let O;const B=()=>{const L=navigator.getGamepads?.(),V=L&&Array.from(L).find(Boolean);if(V){if(g.type==="axis"){v.current||(v.current=Array.from(V.axes??[]).map(G=>G??0));for(let G=0;G<V.axes.length;G+=1){const q=V.axes[G],F=v.current?.[G]??0,Y=Math.abs(q-F);if(Math.abs(q)>.65&&Y>.5){s(Q=>Mc(Q,g.path,()=>({index:G,invert:q<0}))),p(null);return}}}else if(g.type==="button")for(let G=0;G<V.buttons.length;G+=1){const q=V.buttons[G];if(q&&(q.pressed||q.value>.6)){s(F=>Mc(F,g.path,()=>({index:G}))),p(null);return}}}O=requestAnimationFrame(B)};return O=requestAnimationFrame(B),()=>{O&&cancelAnimationFrame(O)}},[g,s]);const T=b.useMemo(()=>Zx.reduce((O,B)=>((O[B.section]||(O[B.section]=[])).push(B),O),{}),[]),M=O=>{const[B,L]=O.path,V=a?.[B]?.[L]??null;return O.type==="axis"?Kx(V):Jx(V)},C=O=>{s(B=>Mc(B,O.path,()=>null))};return h.jsxs("section",{className:"panel-section space-y-0.5 text-sm",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-slate-400",children:"Gamepad mapping"}),h.jsx("p",{className:"text-[0.65rem] text-slate-500",children:i?"Move sticks/axes with a big sweep or press buttons when capturing.":"Connect a controller to configure."}),g&&h.jsxs("p",{className:"mt-0.5 text-[0.7rem] text-emerald-400",children:["Capturing ",g.label,"…"]})]}),h.jsx("button",{type:"button",onClick:()=>c(),className:"button-dark text-xs",children:"Clear all"})]}),h.jsxs("div",{className:"space-y-0.5",children:[h.jsxs("div",{className:"space-y-0.5 surface",children:[h.jsx("p",{className:"text-[0.7rem] text-slate-500",children:"Sensitivity & feel"}),h.jsxs("div",{className:"space-y-0.5",children:[h.jsx(Ou,{label:"Drive deadzone",description:"Ignore small drive stick movement",min:0,max:.6,step:.01,value:y.driveDeadzone??.2,onChange:O=>A({driveDeadzone:O})}),h.jsx(Ou,{label:"Camera deadzone",description:"Tilt stick sensitivity",min:0,max:.6,step:.01,value:y.cameraDeadzone??.25,onChange:O=>A({cameraDeadzone:O})}),h.jsx(Ou,{label:"Servo step (deg)",description:"Degrees per camera tick",min:.5,max:6,step:.25,value:y.servoStep??2,onChange:O=>A({servoStep:O})}),h.jsx(Ou,{label:"Side reverse multiplier",description:"Scale when reversing the side brush",min:.3,max:1,step:.05,value:y.auxReverseScale??.55,onChange:O=>A({auxReverseScale:O})})]})]}),Object.entries(T).map(([O,B])=>h.jsxs("div",{className:"space-y-0.5 surface",children:[h.jsx("p",{className:"text-[0.7rem] text-slate-500",children:O}),h.jsx("div",{className:"space-y-0.5",children:B.map(L=>h.jsxs("div",{className:"surface-muted flex items-center justify-between text-xs",children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-semibold text-slate-100",children:L.label}),h.jsx("p",{className:"text-[0.65rem] text-slate-400",children:M(L)})]}),h.jsxs("div",{className:"flex items-center gap-0.5",children:[h.jsx("button",{type:"button",onClick:()=>C(L),className:"button-dark text-[0.7rem]",children:"Clear"}),h.jsx("button",{type:"button",onClick:()=>p(L),className:`${g?.id===L.id?"px-0.5 py-0.5 bg-emerald-500 text-emerald-950 hover:bg-emerald-400":"button-dark"} text-[0.7rem] font-medium`,children:g?.id===L.id?"Waiting…":"Capture"})]})]},L.id))})]},O))]})]})}const Dp=b.createContext(null);function Bp(){const i=b.useContext(Dp);if(!i)throw new Error("Tabs components must be used within a <Tabs> provider.");return i}const Xm={primary:{base:"flex-1 px-0.5 py-0.5 text-sm font-medium transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-slate-500",active:"bg-sky-600 text-white",inactive:"bg-zinc-900 text-slate-300 hover:bg-sky-500 hover:text-white"}},Up="primary";function ro(...i){return i.filter(Boolean).join(" ")}function Lp({children:i,defaultTab:a,currentTab:s,onTabChange:c,variant:o=Up}){const[d,y]=b.useState(a??null),[g,p]=b.useState([]),v=b.useCallback(C=>C?(p(O=>O.includes(C)?O:[...O,C]),()=>p(O=>O.includes(C)?O.filter(B=>B!==C):O)):()=>{},[]),A=s??d??g[0]??null;b.useEffect(()=>{a&&s===void 0&&y(a)},[a,s]);const T=b.useCallback(C=>{C&&(s===void 0&&y(C),c&&c(C))},[s,c]),M=b.useMemo(()=>({activeTab:A,setActiveTab:T,registerTab:v,variant:o}),[A,T,v,o]);return h.jsx(Dp.Provider,{value:M,children:i})}function kp({children:i,className:a=""}){return h.jsx("div",{className:ro("flex gap-0.5",a),children:i})}function cl({id:i,children:a,className:s="",disabled:c=!1}){const{activeTab:o,setActiveTab:d,registerTab:y,variant:g}=Bp();b.useEffect(()=>y(i),[i,y]);const p=Xm[g]??Xm[Up],v=o===i,A=ro(p.base,v?p.active:p.inactive,c?"cursor-not-allowed opacity-50":"",s);return h.jsx("button",{type:"button",className:A,onClick:()=>!c&&d(i),"aria-pressed":v,"aria-disabled":c,children:a})}function Hp({children:i,className:a=""}){return h.jsx("div",{className:ro("mt-0.5 space-y-0.5",a),children:i})}function ol({id:i,children:a,keepMounted:s=!1}){const{activeTab:c}=Bp(),o=c===i;return!o&&!s?null:!o&&s?h.jsx("div",{hidden:!0,"aria-hidden":"true",children:a}):h.jsx(h.Fragment,{children:a})}const Fx=[{key:"start",label:"Start OI"},{key:"safe",label:"Safe"},{key:"full",label:"Full"},{key:"passive",label:"Passive"},{key:"dock",label:"Dock"}];function Wx(){const{state:{roverId:i},actions:{sendOiCommand:a,setSensorStream:s}}=mn(),c=!!i,o=b.useMemo(()=>[{key:"start",label:"Enable stream",enable:!0},{key:"stop",label:"Disable stream",enable:!1}],[]),d=y=>{i&&s(y)};return h.jsxs(Lp,{defaultTab:"keybindings",children:[h.jsxs(kp,{children:[h.jsx(cl,{id:"keybindings",children:"Keybindings"}),h.jsx(cl,{id:"controller",children:"Controller"}),h.jsx(cl,{id:"admin",children:"Admin"})]}),h.jsxs(Hp,{children:[h.jsx(ol,{id:"keybindings",children:h.jsx("div",{className:"space-y-0.5",children:h.jsx(Gx,{})})}),h.jsx(ol,{id:"controller",children:h.jsx("div",{className:"space-y-0.5",children:h.jsx($x,{})})}),h.jsx(ol,{id:"admin",children:h.jsxs("div",{className:"space-y-0.5",children:[h.jsxs("section",{className:"panel-section space-y-0.5 text-sm",children:[h.jsx("p",{className:"text-slate-400",children:"Manual OI commands"}),h.jsx("div",{className:"surface flex flex-wrap gap-0.5",children:Fx.map(y=>h.jsx("button",{type:"button",onClick:()=>a(y.key),disabled:!c,className:"button-dark text-xs disabled:opacity-30",children:y.label},y.key))})]}),h.jsxs("section",{className:"panel-section space-y-0.5 text-sm",children:[h.jsx("p",{className:"text-slate-400",children:"Sensor stream"}),h.jsx("div",{className:"surface flex gap-0.5",children:o.map(y=>h.jsx("button",{type:"button",onClick:()=>d(y.enable),disabled:!c,className:"flex-1 button-dark text-xs disabled:opacity-30",children:y.label},y.key))}),!c&&h.jsx("p",{className:"text-xs text-slate-500",children:"Assign a rover to toggle streams."})]}),h.jsx(Ku,{}),h.jsx(no,{})]})})]})]})}function Ix({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:"panel-section space-y-0.5 text-base",children:[h.jsx("p",{className:"text-sm text-slate-400",children:"Help"}),h.jsx("ul",{className:"space-y-0.5 text-sm",children:s.map(c=>h.jsx("li",{className:"surface text-slate-200",children:c},c))})]})}function Px(){return h.jsxs("div",{className:"panel-section space-y-0.5 text-sm",children:[h.jsx("p",{className:"text-slate-400",children:"Room controls"}),h.jsx("p",{className:"text-slate-200",children:"Coming soon: lighting, docks, and environmental toggles."})]})}function eS({layout:i}){return h.jsx("section",{className:"panel text-base",children:h.jsxs(Lp,{defaultTab:"telemetry",children:[h.jsxs(kp,{children:[h.jsx(cl,{id:"telemetry",children:"Rover Controls"}),h.jsx(cl,{id:"room",children:"Room Controls"}),h.jsx(cl,{id:"settings",children:"Settings"}),h.jsx(cl,{id:"help",children:"Help"})]}),h.jsxs(Hp,{children:[h.jsx(ol,{id:"telemetry",children:h.jsxs("div",{className:"space-y-0.5",children:[h.jsx(to,{}),h.jsx(Hx,{}),h.jsx(eo,{})]})}),h.jsx(ol,{id:"room",children:h.jsxs("div",{className:"space-y-0.5",children:[h.jsx(io,{}),h.jsx(Px,{})]})}),h.jsx(ol,{id:"settings",children:h.jsx(Wx,{})}),h.jsx(ol,{id:"help",children:h.jsx(Ix,{layout:i})})]})]})})}const tS=new Set(["admin","lockdown","lockdown-admin"]),nS=new Set(["admin","lockdown"]);function lS(i="admin"){return i==="lockdown"?{title:"Lockdown mode active",description:"Only the server owners can access the interface at this time."}:{title:"Admin mode active",description:"The server is currently in admin mode. Only admins can access the interface."}}function aS(){const{session:i}=wt(),a=i?.mode,s=i?.role,c=nS.has(a),o=tS.has(s);if(!c||o)return null;const d=lS(a);return h.jsx("div",{className:"pointer-events-auto fixed inset-0 z-50 flex items-center justify-center bg-black/85 px-0.5 py-0.5",children:h.jsxs("div",{className:"surface w-full max-w-md space-y-0.5 text-slate-100 shadow-2xl",children:[h.jsxs("div",{className:"space-y-0.5",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:"surface-muted",children:h.jsx(Ku,{})})]})})}function iS(){const{session:i}=wt(),a=b.useMemo(()=>JSON.stringify(i??{},null,2),[i]);return h.jsxs("div",{className:"panel-section space-y-0.5 text-xs",children:[h.jsx("p",{className:"text-sm text-slate-400",children:"Session snapshot"}),h.jsx("pre",{className:"surface h-64 overflow-y-auto font-mono text-[0.7rem] text-lime-300",children:a})]})}function uS(){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:o}=window;c>=1024?a("desktop"):c>o?a("mobile-landscape"):a("mobile-portrait")}return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),i}function sS({layout:i}){return h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsxs("section",{className:"grid grid-cols-[minmax(0,1.8fr)_minmax(0,1fr)] gap-0.5",children:[h.jsx(so,{}),h.jsx(eS,{layout:i})]}),h.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-0.5",children:[h.jsx(uo,{}),h.jsx(iS,{})]})]})}function rS(){return h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsx(so,{}),h.jsx(Tx,{}),h.jsx(to,{}),h.jsx(eo,{}),h.jsx(Ku,{}),h.jsx(no,{}),h.jsx(io,{}),h.jsx(uo,{})]})}function cS(){return h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsxs("section",{className:"grid min-h-screen grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-0.5",children:[h.jsx(Ex,{}),h.jsx(so,{}),h.jsx(Ax,{})]}),h.jsxs("div",{className:"flex flex-col gap-0.5 pb-0.5",children:[h.jsx(io,{}),h.jsx(to,{}),h.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-0.5",children:[h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsx(Ku,{}),h.jsx(no,{})]}),h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsx(uo,{}),h.jsx(eo,{})]})]})]})]})}function oS(){const i=uS(),a=i==="desktop"?h.jsx(sS,{layout:i}):i==="mobile-landscape"?h.jsx(cS,{}):h.jsx(rS,{});return h.jsx("div",{className:"min-h-screen bg-black text-slate-100",children:h.jsx(nx,{children:h.jsxs(ix,{children:[h.jsx(ox,{}),h.jsx(fx,{}),h.jsx("main",{className:"flex w-full flex-col gap-0.5 text-base",children:a}),h.jsx(mx,{}),h.jsx(aS,{})]})})})}function fS(){const{session:i,setRole:a,subscribeAll:s}=wt(),[c,o]=b.useState(!1);return b.useEffect(()=>{let d=!1;async function y(){try{i?.role!=="spectator"&&await a("spectator"),await s(),d||o(!0)}catch(g){console.error("Failed to enter spectator mode",g)}}return y(),()=>{d=!0}},[i?.role,a,s]),c}function dS({connected:i,ready:a,rosterCount:s}){return h.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 text-sm",children:[h.jsx("span",{className:`px-0.5 py-0.5 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:`px-0.5 py-0.5 ${a?"bg-blue-600/40 text-blue-100":"bg-slate-700 text-slate-200"}`,children:["Spectator mode ",a?"active":"pending…"]}),h.jsxs("span",{className:"bg-slate-800 px-0.5 py-0.5 text-slate-200",children:["Rovers: ",s]})]})}function hS({logs:i}){return h.jsxs("section",{className:"panel space-y-0.5 text-sm",children:[h.jsxs("header",{className:"mb-0.5 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 text-slate-500",children:["latest ",i.length]})]}),h.jsx("div",{className:"surface h-60 overflow-y-auto space-y-0.5 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:"surface-muted",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 mS(i={}){return Object.entries(i).map(([a,s])=>({key:a,value:typeof s=="object"?JSON.stringify(s):s}))}function pS({rover:i,frame:a,videoInfo:s}){const c=mS(a?.sensors);return h.jsxs("article",{className:"space-y-0.5 bg-zinc-900 p-0.5",children:[h.jsxs("header",{className:"flex flex-col gap-0.5",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(ao,{sessionInfo:s,label:i.name,forceMute:!0}),h.jsxs("section",{className:"surface",children:[h.jsx("p",{className:"text-xs text-slate-500",children:"Telemetry"}),c.length===0?h.jsx("p",{className:"mt-0.5 text-sm text-slate-400",children:"No sensor data yet."}):h.jsx("dl",{className:"mt-0.5 grid gap-0.5 text-sm text-slate-200",children:c.map(({key:o,value:d})=>h.jsxs("div",{className:"flex justify-between gap-0.5",children:[h.jsx("dt",{className:"text-slate-500",children:o}),h.jsx("dd",{className:"text-right font-semibold text-white",children:d})]},o))})]})]})}function yS(){const{connected:i,session:a,logs:s}=wt(),c=fS(),o=_p(),d=a?.roster??[],y=lo(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-black text-slate-100",children:h.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-0.5 px-0.5 py-0.5",children:[h.jsxs("header",{className:"space-y-0.5",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(dS,{...g})]}),h.jsx("section",{className:"grid gap-0.5 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(pS,{rover:p,frame:o[p.id],videoInfo:y[p.id]},p.id))}),h.jsx(hS,{logs:s})]})})}gv.createRoot(document.getElementById("root")).render(h.jsx(b.StrictMode,{children:h.jsx(Ub,{children:h.jsx(kb,{children:h.jsx(Hb,{children:h.jsx(zg,{children:h.jsxs(og,{children:[h.jsx(Oc,{path:"/",element:h.jsx(oS,{})}),h.jsx(Oc,{path:"/spectate",element:h.jsx(yS,{})})]})})})})})}));