diff --git a/server/data/community-goal.json b/server/data/community-goal.json new file mode 100644 index 00000000..6544a48c --- /dev/null +++ b/server/data/community-goal.json @@ -0,0 +1,5 @@ +{ + "text": "Flip the green slime box", + "updatedAt": 1768597355934, + "updatedBy": "355503317503311872" +} diff --git a/server/index.js b/server/index.js index d8fe7541..3fc5b9bb 100644 --- a/server/index.js +++ b/server/index.js @@ -17,6 +17,7 @@ require('./src/services/roverConnectionService'); require('./src/services/assignmentService'); require('./src/services/nicknameService'); require('./src/services/chatService'); +require('./src/services/communityGoalService'); require('./src/services/videoSessions'); require('./src/services/videoAuthService'); require('./src/services/videoSocketService'); diff --git a/server/public/assets/index-BrK8dCMT.js b/server/public/assets/index-BrK8dCMT.js new file mode 100644 index 00000000..6a731ad4 --- /dev/null +++ b/server/public/assets/index-BrK8dCMT.js @@ -0,0 +1,119 @@ +(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function i(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(f){if(f.ep)return;f.ep=!0;const d=i(f);fetch(f.href,d)}})();function Yv(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Uo={exports:{}},gs={};var rp;function Gv(){if(rp)return gs;rp=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(r,f,d){var p=null;if(d!==void 0&&(p=""+d),f.key!==void 0&&(p=""+f.key),"key"in f){d={};for(var m in f)m!=="key"&&(d[m]=f[m])}else d=f;return f=d.ref,{$$typeof:a,type:r,key:p,ref:f!==void 0?f:null,props:d}}return gs.Fragment=s,gs.jsx=i,gs.jsxs=i,gs}var cp;function Qv(){return cp||(cp=1,Uo.exports=Gv()),Uo.exports}var o=Qv(),Ho={exports:{}},he={};var op;function Xv(){if(op)return he;op=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),R=Symbol.iterator;function j(E){return E===null||typeof E!="object"?null:(E=R&&E[R]||E["@@iterator"],typeof E=="function"?E:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function N(E,B,H){this.props=E,this.context=B,this.refs=A,this.updater=H||w}N.prototype.isReactComponent={},N.prototype.setState=function(E,B){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,B,"setState")},N.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function M(){}M.prototype=N.prototype;function V(E,B,H){this.props=E,this.context=B,this.refs=A,this.updater=H||w}var F=V.prototype=new M;F.constructor=V,C(F,N.prototype),F.isPureReactComponent=!0;var $=Array.isArray;function G(){}var O={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function te(E,B,H){var Q=H.ref;return{$$typeof:a,type:E,key:B,ref:Q!==void 0?Q:null,props:H}}function ie(E,B){return te(E.type,B,E.props)}function ue(E){return typeof E=="object"&&E!==null&&E.$$typeof===a}function ce(E){var B={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(H){return B[H]})}var ye=/\/+/g;function P(E,B){return typeof E=="object"&&E!==null&&E.key!=null?ce(""+E.key):B.toString(36)}function W(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(G,G):(E.status="pending",E.then(function(B){E.status==="pending"&&(E.status="fulfilled",E.value=B)},function(B){E.status==="pending"&&(E.status="rejected",E.reason=B)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function k(E,B,H,Q,I){var ae=typeof E;(ae==="undefined"||ae==="boolean")&&(E=null);var de=!1;if(E===null)de=!0;else switch(ae){case"bigint":case"string":case"number":de=!0;break;case"object":switch(E.$$typeof){case a:case s:de=!0;break;case S:return de=E._init,k(de(E._payload),B,H,Q,I)}}if(de)return I=I(E),de=Q===""?"."+P(E,0):Q,$(I)?(H="",de!=null&&(H=de.replace(ye,"$&/")+"/"),k(I,B,H,"",function(rn){return rn})):I!=null&&(ue(I)&&(I=ie(I,H+(I.key==null||E&&E.key===I.key?"":(""+I.key).replace(ye,"$&/")+"/")+de)),B.push(I)),1;de=0;var Ne=Q===""?".":Q+":";if($(E))for(var me=0;me>>1,fe=k[ne];if(0>>1;nef(H,ee))Qf(I,H)?(k[ne]=I,k[Q]=ee,ne=Q):(k[ne]=H,k[B]=ee,ne=B);else if(Qf(I,ee))k[ne]=I,k[Q]=ee,ne=Q;else break e}}return U}function f(k,U){var ee=k.sortIndex-U.sortIndex;return ee!==0?ee:k.id-U.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;a.unstable_now=function(){return d.now()}}else{var p=Date,m=p.now();a.unstable_now=function(){return p.now()-m}}var y=[],v=[],S=1,b=null,R=3,j=!1,w=!1,C=!1,A=!1,N=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function F(k){for(var U=i(v);U!==null;){if(U.callback===null)r(v);else if(U.startTime<=k)r(v),U.sortIndex=U.expirationTime,s(y,U);else break;U=i(v)}}function $(k){if(C=!1,F(k),!w)if(i(y)!==null)w=!0,G||(G=!0,ce());else{var U=i(v);U!==null&&W($,U.startTime-k)}}var G=!1,O=-1,Z=5,te=-1;function ie(){return A?!0:!(a.unstable_now()-tek&&ie());){var ne=b.callback;if(typeof ne=="function"){b.callback=null,R=b.priorityLevel;var fe=ne(b.expirationTime<=k);if(k=a.unstable_now(),typeof fe=="function"){b.callback=fe,F(k),U=!0;break t}b===i(y)&&r(y),F(k)}else r(y);b=i(y)}if(b!==null)U=!0;else{var E=i(v);E!==null&&W($,E.startTime-k),U=!1}}break e}finally{b=null,R=ee,j=!1}U=void 0}}finally{U?ce():G=!1}}}var ce;if(typeof V=="function")ce=function(){V(ue)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,P=ye.port2;ye.port1.onmessage=ue,ce=function(){P.postMessage(null)}}else ce=function(){N(ue,0)};function W(k,U){O=N(function(){k(a.unstable_now())},U)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(k){k.callback=null},a.unstable_forceFrameRate=function(k){0>k||125ne?(k.sortIndex=ee,s(v,k),i(y)===null&&k===i(v)&&(C?(M(O),O=-1):C=!0,W($,ee-ne))):(k.sortIndex=fe,s(y,k),w||j||(w=!0,G||(G=!0,ce()))),k},a.unstable_shouldYield=ie,a.unstable_wrapCallback=function(k){var U=R;return function(){var ee=R;R=U;try{return k.apply(this,arguments)}finally{R=ee}}}})(Go)),Go}var dp;function $v(){return dp||(dp=1,Yo.exports=Kv()),Yo.exports}var Qo={exports:{}},ut={};var hp;function Zv(){if(hp)return ut;hp=1;var a=qu();function s(y){var v="https://react.dev/errors/"+y;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),Qo.exports=Zv(),Qo.exports}var pp;function Fv(){if(pp)return ys;pp=1;var a=$v(),s=qu(),i=Jv();function r(e){var t="https://react.dev/errors/"+e;if(1fe||(e.current=ne[fe],ne[fe]=null,fe--)}function H(e,t){fe++,ne[fe]=e.current,e.current=t}var Q=E(null),I=E(null),ae=E(null),de=E(null);function Ne(e,t){switch(H(ae,t),H(I,e),H(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rm(t),e=Mm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(Q),H(Q,e)}function me(){B(Q),B(I),B(ae)}function rn(e){e.memoizedState!==null&&H(de,e);var t=Q.current,n=Mm(t,e.type);t!==n&&(H(I,e),H(Q,n))}function Qt(e){I.current===e&&(B(Q),B(I)),de.current===e&&(B(de),ds._currentValue=ee)}var cn,Ta;function ft(e){if(cn===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);cn=t&&t[1]||"",Ta=-1)":-1c||q[l]!==z[c]){var X=` +`+q[l].replace(" at new "," at ");return e.displayName&&X.includes("")&&(X=X.replace("",e.displayName)),X}while(1<=l&&0<=c);break}}}finally{Mt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ft(n):""}function ra(e,t){switch(e.tag){case 26:case 27:case 5:return ft(e.type);case 16:return ft("Lazy");case 13:return e.child!==t&&t!==null?ft("Suspense Fallback"):ft("Suspense");case 19:return ft("SuspenseList");case 0:case 15:return _t(e.type,!1);case 11:return _t(e.type.render,!1);case 1:return _t(e.type,!0);case 31:return ft("Activity");default:return""}}function zs(e){try{var t="",n=null;do t+=ra(e,n),n=e,e=e.return;while(e);return t}catch(l){return` +Error generating stack: `+l.message+` +`+l.stack}}var Al=Object.prototype.hasOwnProperty,jl=a.unstable_scheduleCallback,Ra=a.unstable_cancelCallback,qe=a.unstable_shouldYield,dt=a.unstable_requestPaint,ze=a.unstable_now,Le=a.unstable_getCurrentPriorityLevel,Xe=a.unstable_ImmediatePriority,Be=a.unstable_UserBlockingPriority,Ma=a.unstable_NormalPriority,jg=a.unstable_LowPriority,uf=a.unstable_IdlePriority,Ng=a.log,qg=a.unstable_setDisableYieldValue,Nl=null,St=null;function kn(e){if(typeof Ng=="function"&&qg(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(Nl,e)}catch{}}var At=Math.clz32?Math.clz32:Cg,Eg=Math.log,wg=Math.LN2;function Cg(e){return e>>>=0,e===0?32:31-(Eg(e)/wg|0)|0}var Bs=256,Ls=262144,Us=4194304;function ca(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 Hs(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var c=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~u,l!==0?c=ca(l):(h&=x,h!==0?c=ca(h):n||(n=x&~e,n!==0&&(c=ca(n))))):(x=l&~u,x!==0?c=ca(x):h!==0?c=ca(h):n||(n=l&~e,n!==0&&(c=ca(n)))),c===0?0:t!==0&&t!==c&&(t&u)===0&&(u=c&-c,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:c}function ql(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Tg(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 ff(){var e=Us;return Us<<=1,(Us&62914560)===0&&(Us=4194304),e}function Er(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function El(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rg(e,t,n,l,c,u){var h=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 x=e.entanglements,q=e.expirationTimes,z=e.hiddenUpdates;for(n=h&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var zg=/[\n"\\]/g;function Ot(e){return e.replace(zg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function _r(e,t,n,l,c,u,h,x){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?kr(e,h,kt(t)):n!=null?kr(e,h,kt(n)):l!=null&&e.removeAttribute("value"),c==null&&u!=null&&(e.defaultChecked=!!u),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+kt(x):e.removeAttribute("name")}function Nf(e,t,n,l,c,u,h,x){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Mr(e);return}n=n!=null?""+kt(n):"",t=t!=null?""+kt(t):n,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Mr(e)}function kr(e,t,n){t==="number"&&Gs(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ba(e,t,n,l){if(e=e.options,t){t={};for(var c=0;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lr=!1;if(fn)try{var Rl={};Object.defineProperty(Rl,"passive",{get:function(){Lr=!0}}),window.addEventListener("test",Rl,Rl),window.removeEventListener("test",Rl,Rl)}catch{Lr=!1}var Dn=null,Ur=null,Xs=null;function Mf(){if(Xs)return Xs;var e,t=Ur,n=t.length,l,c="value"in Dn?Dn.value:Dn.textContent,u=c.length;for(e=0;e=kl),Bf=" ",Lf=!1;function Uf(e,t){switch(e){case"keyup":return uy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Va=!1;function dy(e,t){switch(e){case"compositionend":return Hf(t);case"keypress":return t.which!==32?null:(Lf=!0,Bf);case"textInput":return e=t.data,e===Bf&&Lf?null:e;default:return null}}function hy(e,t){if(Va)return e==="compositionend"||!Qr&&Uf(e,t)?(e=Mf(),Xs=Ur=Dn=null,Va=!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)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=Zf(n)}}function Ff(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ff(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gs(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=Gs(e.document)}return t}function $r(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 Sy=fn&&"documentMode"in document&&11>=document.documentMode,Ya=null,Zr=null,Bl=null,Jr=!1;function If(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Ya==null||Ya!==Gs(l)||(l=Ya,"selectionStart"in l&&$r(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}),Bl&&zl(Bl,l)||(Bl=l,l=Li(Zr,"onSelect"),0>=h,c-=h,It=1<<32-At(t)+c|n<ge?(Se=se,se=null):Se=se.sibling;var we=L(_,se,D[ge],K);if(we===null){se===null&&(se=Se);break}e&&se&&we.alternate===null&&t(_,se),T=u(we,T,ge),Ee===null?re=we:Ee.sibling=we,Ee=we,se=Se}if(ge===D.length)return n(_,se),Ae&&hn(_,ge),re;if(se===null){for(;gege?(Se=se,se=null):Se=se.sibling;var aa=L(_,se,we.value,K);if(aa===null){se===null&&(se=Se);break}e&&se&&aa.alternate===null&&t(_,se),T=u(aa,T,ge),Ee===null?re=aa:Ee.sibling=aa,Ee=aa,se=Se}if(we.done)return n(_,se),Ae&&hn(_,ge),re;if(se===null){for(;!we.done;ge++,we=D.next())we=J(_,we.value,K),we!==null&&(T=u(we,T,ge),Ee===null?re=we:Ee.sibling=we,Ee=we);return Ae&&hn(_,ge),re}for(se=l(se);!we.done;ge++,we=D.next())we=Y(se,_,ge,we.value,K),we!==null&&(e&&we.alternate!==null&&se.delete(we.key===null?ge:we.key),T=u(we,T,ge),Ee===null?re=we:Ee.sibling=we,Ee=we);return e&&se.forEach(function(Vv){return t(_,Vv)}),Ae&&hn(_,ge),re}function ke(_,T,D,K){if(typeof D=="object"&&D!==null&&D.type===C&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case j:e:{for(var re=D.key;T!==null;){if(T.key===re){if(re=D.type,re===C){if(T.tag===7){n(_,T.sibling),K=c(T,D.props.children),K.return=_,_=K;break e}}else if(T.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===Z&&xa(re)===T.type){n(_,T.sibling),K=c(T,D.props),Gl(K,D),K.return=_,_=K;break e}n(_,T);break}else t(_,T);T=T.sibling}D.type===C?(K=ma(D.props.children,_.mode,K,D.key),K.return=_,_=K):(K=ti(D.type,D.key,D.props,null,_.mode,K),Gl(K,D),K.return=_,_=K)}return h(_);case w:e:{for(re=D.key;T!==null;){if(T.key===re)if(T.tag===4&&T.stateNode.containerInfo===D.containerInfo&&T.stateNode.implementation===D.implementation){n(_,T.sibling),K=c(T,D.children||[]),K.return=_,_=K;break e}else{n(_,T);break}else t(_,T);T=T.sibling}K=nc(D,_.mode,K),K.return=_,_=K}return h(_);case Z:return D=xa(D),ke(_,T,D,K)}if(W(D))return le(_,T,D,K);if(ce(D)){if(re=ce(D),typeof re!="function")throw Error(r(150));return D=re.call(D),oe(_,T,D,K)}if(typeof D.then=="function")return ke(_,T,ci(D),K);if(D.$$typeof===V)return ke(_,T,li(_,D),K);oi(_,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,T!==null&&T.tag===6?(n(_,T.sibling),K=c(T,D),K.return=_,_=K):(n(_,T),K=tc(D,_.mode,K),K.return=_,_=K),h(_)):n(_,T)}return function(_,T,D,K){try{Yl=0;var re=ke(_,T,D,K);return Pa=null,re}catch(se){if(se===Ia||se===ii)throw se;var Ee=Nt(29,se,null,_.mode);return Ee.lanes=K,Ee.return=_,Ee}finally{}}}var Sa=Sd(!0),Ad=Sd(!1),Hn=!1;function mc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(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 Vn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ce&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=ei(e),sd(e,null,n),t}return Ps(e,l,t,n),ei(e)}function Ql(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,hf(e,n)}}function gc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var c=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?c=u=h:u=u.next=h,n=n.next}while(n!==null);u===null?c=u=t:u=u.next=t}else c=u=t;n={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:u,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 yc=!1;function Xl(){if(yc){var e=Wa;if(e!==null)throw e}}function Kl(e,t,n,l){yc=!1;var c=e.updateQueue;Hn=!1;var u=c.firstBaseUpdate,h=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var q=x,z=q.next;q.next=null,h===null?u=z:h.next=z,h=q;var X=e.alternate;X!==null&&(X=X.updateQueue,x=X.lastBaseUpdate,x!==h&&(x===null?X.firstBaseUpdate=z:x.next=z,X.lastBaseUpdate=q))}if(u!==null){var J=c.baseState;h=0,X=z=q=null,x=u;do{var L=x.lane&-536870913,Y=L!==x.lane;if(Y?(be&L)===L:(l&L)===L){L!==0&&L===Fa&&(yc=!0),X!==null&&(X=X.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var le=e,oe=x;L=t;var ke=n;switch(oe.tag){case 1:if(le=oe.payload,typeof le=="function"){J=le.call(ke,J,L);break e}J=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=oe.payload,L=typeof le=="function"?le.call(ke,J,L):le,L==null)break e;J=b({},J,L);break e;case 2:Hn=!0}}L=x.callback,L!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=c.callbacks,Y===null?c.callbacks=[L]:Y.push(L))}else Y={lane:L,tag:x.tag,payload:x.payload,callback:x.callback,next:null},X===null?(z=X=Y,q=J):X=X.next=Y,h|=L;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;Y=x,x=Y.next,Y.next=null,c.lastBaseUpdate=Y,c.shared.pending=null}}while(!0);X===null&&(q=J),c.baseState=q,c.firstBaseUpdate=z,c.lastBaseUpdate=X,u===null&&(c.shared.lanes=0),$n|=h,e.lanes=h,e.memoizedState=J}}function jd(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Nd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;eu?u:8;var h=k.T,x={};k.T=x,zc(e,!1,t,n);try{var q=c(),z=k.S;if(z!==null&&z(x,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var X=Ry(q,l);Jl(e,t,X,Tt(e))}else Jl(e,t,l,Tt(e))}catch(J){Jl(e,t,{then:function(){},status:"rejected",reason:J},Tt())}finally{U.p=u,h!==null&&x.types!==null&&(h.types=x.types),k.T=h}}function zy(){}function Oc(e,t,n,l){if(e.tag!==5)throw Error(r(476));var c=nh(e).queue;th(e,c,t,ee,n===null?zy:function(){return ah(e),n(l)})}function nh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ah(e){var t=nh(e);t.next===null&&(t=e.alternate.memoizedState),Jl(e,t.next.queue,{},Tt())}function Dc(){return st(ds)}function lh(){return $e().memoizedState}function sh(){return $e().memoizedState}function By(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tt();e=Vn(n);var l=Yn(t,e,n);l!==null&&(bt(l,t,n),Ql(l,t,n)),t={cache:uc()},e.payload=t;return}t=t.return}}function Ly(e,t,n){var l=Tt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},xi(e)?rh(t,n):(n=Pr(e,t,n,l),n!==null&&(bt(n,e,l),ch(n,t,l)))}function ih(e,t,n){var l=Tt();Jl(e,t,n,l)}function Jl(e,t,n,l){var c={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(xi(e))rh(t,c);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,x=u(h,n);if(c.hasEagerState=!0,c.eagerState=x,jt(x,h))return Ps(e,t,c,0),De===null&&Is(),!1}catch{}finally{}if(n=Pr(e,t,c,l),n!==null)return bt(n,e,l),ch(n,t,l),!0}return!1}function zc(e,t,n,l){if(l={lane:2,revertLane:po(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},xi(e)){if(t)throw Error(r(479))}else t=Pr(e,n,l,2),t!==null&&bt(t,e,2)}function xi(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function rh(e,t){tl=di=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ch(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,hf(e,n)}}var Fl={readContext:st,use:pi,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Fl.useEffectEvent=Ge;var oh={readContext:st,use:pi,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Kd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,yi(4194308,4,Fd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yi(4194308,4,e,t)},useInsertionEffect:function(e,t){yi(4,2,e,t)},useMemo:function(e,t){var n=ht();t=t===void 0?null:t;var l=e();if(Aa){kn(!0);try{e()}finally{kn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=ht();if(n!==void 0){var c=n(t);if(Aa){kn(!0);try{n(t)}finally{kn(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=Ly.bind(null,pe,e),[l.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=Tc(e);var t=e.queue,n=ih.bind(null,pe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_c,useDeferredValue:function(e,t){var n=ht();return kc(n,e,t)},useTransition:function(){var e=Tc(!1);return e=th.bind(null,pe,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=pe,c=ht();if(Ae){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),De===null)throw Error(r(349));(be&127)!==0||Rd(l,t,n)}c.memoizedState=n;var u={value:n,getSnapshot:t};return c.queue=u,Kd(_d.bind(null,l,u,e),[e]),l.flags|=2048,al(9,{destroy:void 0},Md.bind(null,l,u,n,t),null),n},useId:function(){var e=ht(),t=De.identifierPrefix;if(Ae){var n=Pt,l=It;n=(l&~(1<<32-At(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=hi++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?h.createElement(c,{is:l.is}):h.createElement(c)}}u[at]=t,u[mt]=l;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(rt(u,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&xn(t)}}return He(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&xn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=ae.current,Za(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,c=lt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Cm(e.nodeValue,n)),e||Ln(t,!0)}else e=Ui(e).createTextNode(l),e[at]=t,t.stateNode=e}return He(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Za(t),n!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[at]=t}else pa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),e=!1}else n=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Et(t),t):(Et(t),null);if((t.flags&128)!==0)throw Error(r(558))}return He(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Za(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[at]=t}else pa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),c=!1}else c=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Et(t),t):(Et(t),null)}return Et(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==c&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ni(t,t.updateQueue),He(t),null);case 4:return me(),e===null&&xo(t.stateNode.containerInfo),He(t),null;case 10:return pn(t.type),He(t),null;case 19:if(B(Ke),l=t.memoizedState,l===null)return He(t),null;if(c=(t.flags&128)!==0,u=l.rendering,u===null)if(c)Il(l,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=fi(e),u!==null){for(t.flags|=128,Il(l,!1),e=u.updateQueue,t.updateQueue=e,Ni(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)id(n,e),n=n.sibling;return H(Ke,Ke.current&1|2),Ae&&hn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ze()>Ti&&(t.flags|=128,c=!0,Il(l,!1),t.lanes=4194304)}else{if(!c)if(e=fi(u),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Ni(t,e),Il(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ae)return He(t),null}else 2*ze()-l.renderingStartTime>Ti&&n!==536870912&&(t.flags|=128,c=!0,Il(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ze(),e.sibling=null,n=Ke.current,H(Ke,c?n&1|2:n&1),Ae&&hn(t,l.treeForkCount),e):(He(t),null);case 22:case 23:return Et(t),xc(),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&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),n=t.updateQueue,n!==null&&Ni(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&&B(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pn(Ze),He(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Gy(e,t){switch(lc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pn(Ze),me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Qt(t),null;case 31:if(t.memoizedState!==null){if(Et(t),t.alternate===null)throw Error(r(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Et(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Ke),null;case 4:return me(),null;case 10:return pn(t.type),null;case 22:case 23:return Et(t),xc(),e!==null&&B(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pn(Ze),null;case 25:return null;default:return null}}function kh(e,t){switch(lc(t),t.tag){case 3:pn(Ze),me();break;case 26:case 27:case 5:Qt(t);break;case 4:me();break;case 31:t.memoizedState!==null&&Et(t);break;case 13:Et(t);break;case 19:B(Ke);break;case 10:pn(t.type);break;case 22:case 23:Et(t),xc(),e!==null&&B(va);break;case 24:pn(Ze)}}function Pl(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var c=l.next;n=c;do{if((n.tag&e)===e){l=void 0;var u=n.create,h=n.inst;l=u(),h.destroy=l}n=n.next}while(n!==c)}}catch(x){Re(t,t.return,x)}}function Xn(e,t,n){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var u=c.next;l=u;do{if((l.tag&e)===e){var h=l.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,c=t;var q=n,z=x;try{z()}catch(X){Re(c,q,X)}}}l=l.next}while(l!==u)}}catch(X){Re(t,t.return,X)}}function Oh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Nd(t,n)}catch(l){Re(e,e.return,l)}}}function Dh(e,t,n){n.props=ja(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Re(e,t,l)}}function es(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(c){Re(e,t,c)}}function en(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(c){Re(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){Re(e,t,c)}else n.current=null}function zh(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(c){Re(e,e.return,c)}}function Wc(e,t,n){try{var l=e.stateNode;fv(l,e.type,n,t),l[mt]=t}catch(c){Re(e,e.return,c)}}function Bh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&In(e.type)||e.tag===4}function Ic(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bh(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&&In(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 Pc(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=un));else if(l!==4&&(l===27&&In(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Pc(e,t,n),e=e.sibling;e!==null;)Pc(e,t,n),e=e.sibling}function qi(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&&In(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qi(e,t,n),e=e.sibling;e!==null;)qi(e,t,n),e=e.sibling}function Lh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);rt(t,l,n),t[at]=e,t[mt]=n}catch(u){Re(e,e.return,u)}}var bn=!1,We=!1,eo=!1,Uh=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Qy(e,t){if(e=e.containerInfo,Ao=Ki,e=Wf(e),$r(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 c=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var h=0,x=-1,q=-1,z=0,X=0,J=e,L=null;t:for(;;){for(var Y;J!==n||c!==0&&J.nodeType!==3||(x=h+c),J!==u||l!==0&&J.nodeType!==3||(q=h+l),J.nodeType===3&&(h+=J.nodeValue.length),(Y=J.firstChild)!==null;)L=J,J=Y;for(;;){if(J===e)break t;if(L===n&&++z===c&&(x=h),L===u&&++X===l&&(q=h),(Y=J.nextSibling)!==null)break;J=L,L=J.parentNode}J=Y}n=x===-1||q===-1?null:{start:x,end:q}}else n=null}n=n||{start:0,end:0}}else n=null;for(jo={focusedElem:e,selectionRange:n},Ki=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){switch(t=nt,u=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 title"))),rt(u,l,n),u[at]=e,tt(u),l=u;break e;case"link":var h=Xm("link","href",c).get(l+(n.href||""));if(h){for(var x=0;xke&&(h=ke,ke=oe,oe=h);var _=Jf(x,oe),T=Jf(x,ke);if(_&&T&&(Y.rangeCount!==1||Y.anchorNode!==_.node||Y.anchorOffset!==_.offset||Y.focusNode!==T.node||Y.focusOffset!==T.offset)){var D=J.createRange();D.setStart(_.node,_.offset),Y.removeAllRanges(),oe>ke?(Y.addRange(D),Y.extend(T.node,T.offset)):(D.setEnd(T.node,T.offset),Y.addRange(D))}}}}for(J=[],Y=x;Y=Y.parentNode;)Y.nodeType===1&&J.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;xn?32:n,k.T=null,n=ro,ro=null;var u=Jn,h=qn;if(et=0,cl=Jn=null,qn=0,(Ce&6)!==0)throw Error(r(331));var x=Ce;if(Ce|=4,Fh(u.current),$h(u,u.current,h,n),Ce=x,is(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Nl,u)}catch{}return!0}finally{U.p=c,k.T=l,mm(e,t)}}function gm(e,t,n){t=zt(n,t),t=Hc(e.stateNode,t,2),e=Yn(e,t,2),e!==null&&(El(e,2),tn(e))}function Re(e,t,n){if(e.tag===3)gm(e,e,n);else for(;t!==null;){if(t.tag===3){gm(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Zn===null||!Zn.has(l))){e=zt(n,e),n=yh(2),l=Yn(t,n,2),l!==null&&(vh(n,l,t,e),El(l,2),tn(l));break}}t=t.return}}function fo(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new $y;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(n)||(ao=!0,c.add(n),e=Iy.bind(null,e,t,n),t.then(e,e))}function Iy(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,De===e&&(be&n)===n&&(Qe===4||Qe===3&&(be&62914560)===be&&300>ze()-Ci?(Ce&2)===0&&ol(e,0):lo|=n,rl===be&&(rl=0)),tn(e)}function ym(e,t){t===0&&(t=ff()),e=ha(e,t),e!==null&&(El(e,t),tn(e))}function Py(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ym(e,n)}function ev(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),ym(e,n)}function tv(e,t){return jl(e,t)}var Di=null,fl=null,ho=!1,zi=!1,mo=!1,Wn=0;function tn(e){e!==fl&&e.next===null&&(fl===null?Di=fl=e:fl=fl.next=e),zi=!0,ho||(ho=!0,av())}function is(e,t){if(!mo&&zi){mo=!0;do for(var n=!1,l=Di;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var u=0;else{var h=l.suspendedLanes,x=l.pingedLanes;u=(1<<31-At(42|e)+1)-1,u&=c&~(h&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Sm(l,u))}else u=be,u=Hs(l,l===De?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||ql(l,u)||(n=!0,Sm(l,u));l=l.next}while(n);mo=!1}}function nv(){vm()}function vm(){zi=ho=!1;var e=0;Wn!==0&&hv()&&(e=Wn);for(var t=ze(),n=null,l=Di;l!==null;){var c=l.next,u=xm(l,t);u===0?(l.next=null,n===null?Di=c:n.next=c,c===null&&(fl=n)):(n=l,(e!==0||(u&3)!==0)&&(zi=!0)),l=c}et!==0&&et!==5||is(e),Wn!==0&&(Wn=0)}function xm(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,u=e.pendingLanes&-62914561;0x)break;var X=q.transferSize,J=q.initiatorType;X&&Tm(J)&&(q=q.responseEnd,h+=X*(q"u"?null:document;function Vm(e,t,n){var l=dl;if(l&&typeof t=="string"&&t){var c=Ot(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),Hm.has(c)||(Hm.add(c),e={rel:e,crossOrigin:n,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),rt(t,"link",e),tt(t),l.head.appendChild(t)))}}function Av(e){En.D(e),Vm("dns-prefetch",e,null)}function jv(e,t){En.C(e,t),Vm("preconnect",e,t)}function Nv(e,t,n){En.L(e,t,n);var l=dl;if(l&&e&&t){var c='link[rel="preload"][as="'+Ot(t)+'"]';t==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+Ot(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+Ot(n.imageSizes)+'"]')):c+='[href="'+Ot(e)+'"]';var u=c;switch(t){case"style":u=hl(e);break;case"script":u=ml(e)}Yt.has(u)||(e=b({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Yt.set(u,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(us(u))||t==="script"&&l.querySelector(fs(u))||(t=l.createElement("link"),rt(t,"link",e),tt(t),l.head.appendChild(t)))}}function qv(e,t){En.m(e,t);var n=dl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Ot(l)+'"][href="'+Ot(e)+'"]',u=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ml(e)}if(!Yt.has(u)&&(e=b({rel:"modulepreload",href:e},t),Yt.set(u,e),n.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(fs(u)))return}l=n.createElement("link"),rt(l,"link",e),tt(l),n.head.appendChild(l)}}}function Ev(e,t,n){En.S(e,t,n);var l=dl;if(l&&e){var c=Da(l).hoistableStyles,u=hl(e);t=t||"default";var h=c.get(u);if(!h){var x={loading:0,preload:null};if(h=l.querySelector(us(u)))x.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Yt.get(u))&&Ro(e,n);var q=h=l.createElement("link");tt(q),rt(q,"link",e),q._p=new Promise(function(z,X){q.onload=z,q.onerror=X}),q.addEventListener("load",function(){x.loading|=1}),q.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Vi(h,t,l)}h={type:"stylesheet",instance:h,count:1,state:x},c.set(u,h)}}}function wv(e,t){En.X(e,t);var n=dl;if(n&&e){var l=Da(n).hoistableScripts,c=ml(e),u=l.get(c);u||(u=n.querySelector(fs(c)),u||(e=b({src:e,async:!0},t),(t=Yt.get(c))&&Mo(e,t),u=n.createElement("script"),tt(u),rt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(c,u))}}function Cv(e,t){En.M(e,t);var n=dl;if(n&&e){var l=Da(n).hoistableScripts,c=ml(e),u=l.get(c);u||(u=n.querySelector(fs(c)),u||(e=b({src:e,async:!0,type:"module"},t),(t=Yt.get(c))&&Mo(e,t),u=n.createElement("script"),tt(u),rt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(c,u))}}function Ym(e,t,n,l){var c=(c=ae.current)?Hi(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=hl(n.href),n=Da(c).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=hl(n.href);var u=Da(c).hoistableStyles,h=u.get(e);if(h||(c=c.ownerDocument||c,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=c.querySelector(us(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Yt.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},Yt.set(e,n),u||Tv(c,e,n,h.state))),t&&l===null)throw Error(r(528,""));return h}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ml(n),n=Da(c).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(r(444,e))}}function hl(e){return'href="'+Ot(e)+'"'}function us(e){return'link[rel="stylesheet"]['+e+"]"}function Gm(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Tv(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}),rt(t,"link",n),tt(t),e.head.appendChild(t))}function ml(e){return'[src="'+Ot(e)+'"]'}function fs(e){return"script[async]"+e}function Qm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ot(n.href)+'"]');if(l)return t.instance=l,tt(l),l;var c=b({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),tt(l),rt(l,"style",c),Vi(l,n.precedence,e),t.instance=l;case"stylesheet":c=hl(n.href);var u=e.querySelector(us(c));if(u)return t.state.loading|=4,t.instance=u,tt(u),u;l=Gm(n),(c=Yt.get(c))&&Ro(l,c),u=(e.ownerDocument||e).createElement("link"),tt(u);var h=u;return h._p=new Promise(function(x,q){h.onload=x,h.onerror=q}),rt(u,"link",l),t.state.loading|=4,Vi(u,n.precedence,e),t.instance=u;case"script":return u=ml(n.src),(c=e.querySelector(fs(u)))?(t.instance=c,tt(c),c):(l=n,(c=Yt.get(u))&&(l=b({},n),Mo(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),tt(c),rt(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Vi(l,n.precedence,e));return t.instance}function Vi(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,u=c,h=0;h title"):null)}function Rv(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 $m(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Mv(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 c=hl(l.href),u=t.querySelector(us(c));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Gi.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,tt(u);return}u=t.ownerDocument||t,l=Gm(l),(c=Yt.get(c))&&Ro(l,c),u=u.createElement("link"),tt(u);var h=u;h._p=new Promise(function(x,q){h.onload=x,h.onerror=q}),rt(u,"link",l),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Gi.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var _o=0;function _v(e,t){return e.stylesheets&&e.count===0&&Xi(e,e.stylesheets),0_o?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Gi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qi=null;function Xi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qi=new Map,t.forEach(kv,e),Qi=null,Gi.call(e))}function kv(e,t){if(!(t.state.loading&4)){var n=Qi.get(e);if(n)var l=n.get(null);else{n=new Map,Qi.set(e,n);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),Vo.exports=Fv(),Vo.exports}var Iv=Wv();var yp="popstate";function Pv(a={}){function s(r,f){let{pathname:d,search:p,hash:m}=r.location;return uu("",{pathname:d,search:p,hash:m},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function i(r,f){return typeof f=="string"?f:qs(f)}return tx(s,i,null,a)}function Ye(a,s){if(a===!1||a===null||typeof a>"u")throw new Error(s)}function Wt(a,s){if(!a){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function ex(){return Math.random().toString(36).substring(2,10)}function vp(a,s){return{usr:a.state,key:a.key,idx:s}}function uu(a,s,i=null,r){return{pathname:typeof a=="string"?a:a.pathname,search:"",hash:"",...typeof s=="string"?xl(s):s,state:i,key:s&&s.key||r||ex()}}function qs({pathname:a="/",search:s="",hash:i=""}){return s&&s!=="?"&&(a+=s.charAt(0)==="?"?s:"?"+s),i&&i!=="#"&&(a+=i.charAt(0)==="#"?i:"#"+i),a}function xl(a){let s={};if(a){let i=a.indexOf("#");i>=0&&(s.hash=a.substring(i),a=a.substring(0,i));let r=a.indexOf("?");r>=0&&(s.search=a.substring(r),a=a.substring(0,r)),a&&(s.pathname=a)}return s}function tx(a,s,i,r={}){let{window:f=document.defaultView,v5Compat:d=!1}=r,p=f.history,m="POP",y=null,v=S();v==null&&(v=0,p.replaceState({...p.state,idx:v},""));function S(){return(p.state||{idx:null}).idx}function b(){m="POP";let A=S(),N=A==null?null:A-v;v=A,y&&y({action:m,location:C.location,delta:N})}function R(A,N){m="PUSH";let M=uu(C.location,A,N);v=S()+1;let V=vp(M,v),F=C.createHref(M);try{p.pushState(V,"",F)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;f.location.assign(F)}d&&y&&y({action:m,location:C.location,delta:1})}function j(A,N){m="REPLACE";let M=uu(C.location,A,N);v=S();let V=vp(M,v),F=C.createHref(M);p.replaceState(V,"",F),d&&y&&y({action:m,location:C.location,delta:0})}function w(A){return nx(A)}let C={get action(){return m},get location(){return a(f,p)},listen(A){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(yp,b),y=A,()=>{f.removeEventListener(yp,b),y=null}},createHref(A){return s(f,A)},createURL:w,encodeLocation(A){let N=w(A);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:R,replace:j,go(A){return p.go(A)}};return C}function nx(a,s=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(i,"No window.location.(origin|href) available to create URL");let r=typeof a=="string"?a:qs(a);return r=r.replace(/ $/,"%20"),!s&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function i0(a,s,i="/"){return ax(a,s,i,!1)}function ax(a,s,i,r){let f=typeof s=="string"?xl(s):s,d=Mn(f.pathname||"/",i);if(d==null)return null;let p=r0(a);lx(p);let m=null;for(let y=0;m==null&&y{let S={relativePath:v===void 0?p.path||"":v,caseSensitive:p.caseSensitive===!0,childrenIndex:m,route:p};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(r)&&y)return;Ye(S.relativePath.startsWith(r),`Absolute route path "${S.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(r.length)}let b=Tn([r,S.relativePath]),R=i.concat(S);p.children&&p.children.length>0&&(Ye(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),r0(p.children,s,R,b,y)),!(p.path==null&&!p.index)&&s.push({path:b,score:fx(b,p.index),routesMeta:R})};return a.forEach((p,m)=>{if(p.path===""||!p.path?.includes("?"))d(p,m);else for(let y of c0(p.path))d(p,m,!0,y)}),s}function c0(a){let s=a.split("/");if(s.length===0)return[];let[i,...r]=s,f=i.endsWith("?"),d=i.replace(/\?$/,"");if(r.length===0)return f?[d,""]:[d];let p=c0(r.join("/")),m=[];return m.push(...p.map(y=>y===""?d:[d,y].join("/"))),f&&m.push(...p),m.map(y=>a.startsWith("/")&&y===""?"/":y)}function lx(a){a.sort((s,i)=>s.score!==i.score?i.score-s.score:dx(s.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var sx=/^:[\w-]+$/,ix=3,rx=2,cx=1,ox=10,ux=-2,xp=a=>a==="*";function fx(a,s){let i=a.split("/"),r=i.length;return i.some(xp)&&(r+=ux),s&&(r+=rx),i.filter(f=>!xp(f)).reduce((f,d)=>f+(sx.test(d)?ix:d===""?cx:ox),r)}function dx(a,s){return a.length===s.length&&a.slice(0,-1).every((r,f)=>r===s[f])?a[a.length-1]-s[s.length-1]:0}function hx(a,s,i=!1){let{routesMeta:r}=a,f={},d="/",p=[];for(let m=0;m{if(S==="*"){let w=m[R]||"";p=d.slice(0,d.length-w.length).replace(/(.)\/+$/,"$1")}const j=m[R];return b&&!j?v[S]=void 0:v[S]=(j||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:p,pattern:a}}function mx(a,s=!1,i=!0){Wt(a==="*"||!a.endsWith("*")||a.endsWith("/*"),`Route path "${a}" will be treated as if it were "${a.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${a.replace(/\*$/,"/*")}".`);let r=[],f="^"+a.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,m,y)=>(r.push({paramName:m,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return a.endsWith("*")?(r.push({paramName:"*"}),f+=a==="*"||a==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?f+="\\/*$":a!==""&&a!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,s?void 0:"i"),r]}function px(a){try{return a.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Wt(!1,`The URL path "${a}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),a}}function Mn(a,s){if(s==="/")return a;if(!a.toLowerCase().startsWith(s.toLowerCase()))return null;let i=s.endsWith("/")?s.length-1:s.length,r=a.charAt(i);return r&&r!=="/"?null:a.slice(i)||"/"}var gx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yx=a=>gx.test(a);function vx(a,s="/"){let{pathname:i,search:r="",hash:f=""}=typeof a=="string"?xl(a):a,d;if(i)if(yx(i))d=i;else{if(i.includes("//")){let p=i;i=i.replace(/\/\/+/g,"/"),Wt(!1,`Pathnames cannot have embedded double slashes - normalizing ${p} -> ${i}`)}i.startsWith("/")?d=bp(i.substring(1),"/"):d=bp(i,s)}else d=s;return{pathname:d,search:Sx(r),hash:Ax(f)}}function bp(a,s){let i=s.replace(/\/+$/,"").split("/");return a.split("/").forEach(f=>{f===".."?i.length>1&&i.pop():f!=="."&&i.push(f)}),i.length>1?i.join("/"):"/"}function Xo(a,s,i,r){return`Cannot include a '${a}' character in a manually specified \`to.${s}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function xx(a){return a.filter((s,i)=>i===0||s.route.path&&s.route.path.length>0)}function o0(a){let s=xx(a);return s.map((i,r)=>r===s.length-1?i.pathname:i.pathnameBase)}function u0(a,s,i,r=!1){let f;typeof a=="string"?f=xl(a):(f={...a},Ye(!f.pathname||!f.pathname.includes("?"),Xo("?","pathname","search",f)),Ye(!f.pathname||!f.pathname.includes("#"),Xo("#","pathname","hash",f)),Ye(!f.search||!f.search.includes("#"),Xo("#","search","hash",f)));let d=a===""||f.pathname==="",p=d?"/":f.pathname,m;if(p==null)m=i;else{let b=s.length-1;if(!r&&p.startsWith("..")){let R=p.split("/");for(;R[0]==="..";)R.shift(),b-=1;f.pathname=R.join("/")}m=b>=0?s[b]:"/"}let y=vx(f,m),v=p&&p!=="/"&&p.endsWith("/"),S=(d||p===".")&&i.endsWith("/");return!y.pathname.endsWith("/")&&(v||S)&&(y.pathname+="/"),y}var Tn=a=>a.join("/").replace(/\/\/+/g,"/"),bx=a=>a.replace(/\/+$/,"").replace(/^\/*/,"/"),Sx=a=>!a||a==="?"?"":a.startsWith("?")?a:"?"+a,Ax=a=>!a||a==="#"?"":a.startsWith("#")?a:"#"+a;function jx(a){return a!=null&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.internal=="boolean"&&"data"in a}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var f0=["POST","PUT","PATCH","DELETE"];new Set(f0);var Nx=["GET",...f0];new Set(Nx);var bl=g.createContext(null);bl.displayName="DataRouter";var br=g.createContext(null);br.displayName="DataRouterState";g.createContext(!1);var d0=g.createContext({isTransitioning:!1});d0.displayName="ViewTransition";var qx=g.createContext(new Map);qx.displayName="Fetchers";var Ex=g.createContext(null);Ex.displayName="Await";var ln=g.createContext(null);ln.displayName="Navigation";var Rs=g.createContext(null);Rs.displayName="Location";var _n=g.createContext({outlet:null,matches:[],isDataRoute:!1});_n.displayName="Route";var Eu=g.createContext(null);Eu.displayName="RouteError";function wx(a,{relative:s}={}){Ye(Ms(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:r}=g.useContext(ln),{hash:f,pathname:d,search:p}=_s(a,{relative:s}),m=d;return i!=="/"&&(m=d==="/"?i:Tn([i,d])),r.createHref({pathname:m,search:p,hash:f})}function Ms(){return g.useContext(Rs)!=null}function Ca(){return Ye(Ms(),"useLocation() may be used only in the context of a component."),g.useContext(Rs).location}var h0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function m0(a){g.useContext(ln).static||g.useLayoutEffect(a)}function Cx(){let{isDataRoute:a}=g.useContext(_n);return a?Vx():Tx()}function Tx(){Ye(Ms(),"useNavigate() may be used only in the context of a component.");let a=g.useContext(bl),{basename:s,navigator:i}=g.useContext(ln),{matches:r}=g.useContext(_n),{pathname:f}=Ca(),d=JSON.stringify(o0(r)),p=g.useRef(!1);return m0(()=>{p.current=!0}),g.useCallback((y,v={})=>{if(Wt(p.current,h0),!p.current)return;if(typeof y=="number"){i.go(y);return}let S=u0(y,JSON.parse(d),f,v.relative==="path");a==null&&s!=="/"&&(S.pathname=S.pathname==="/"?s:Tn([s,S.pathname])),(v.replace?i.replace:i.push)(S,v.state,v)},[s,i,d,f,a])}g.createContext(null);function _s(a,{relative:s}={}){let{matches:i}=g.useContext(_n),{pathname:r}=Ca(),f=JSON.stringify(o0(i));return g.useMemo(()=>u0(a,JSON.parse(f),r,s==="path"),[a,f,r,s])}function Rx(a,s){return p0(a,s)}function p0(a,s,i,r,f){Ye(Ms(),"useRoutes() may be used only in the context of a component.");let{navigator:d}=g.useContext(ln),{matches:p}=g.useContext(_n),m=p[p.length-1],y=m?m.params:{},v=m?m.pathname:"/",S=m?m.pathnameBase:"/",b=m&&m.route;{let M=b&&b.path||"";g0(v,!b||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${v}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let R=Ca(),j;if(s){let M=typeof s=="string"?xl(s):s;Ye(S==="/"||M.pathname?.startsWith(S),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${S}" but pathname "${M.pathname}" was given in the \`location\` prop.`),j=M}else j=R;let w=j.pathname||"/",C=w;if(S!=="/"){let M=S.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(M.length).join("/")}let A=i0(a,{pathname:C});Wt(b||A!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),Wt(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let N=Dx(A&&A.map(M=>Object.assign({},M,{params:Object.assign({},y,M.params),pathname:Tn([S,d.encodeLocation?d.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?S:Tn([S,d.encodeLocation?d.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),p,i,r,f);return s&&N?g.createElement(Rs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},N):N}function Mx(){let a=Hx(),s=jx(a)?`${a.status} ${a.statusText}`:a instanceof Error?a.message:JSON.stringify(a),i=a instanceof Error?a.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},p=null;return console.error("Error handled by React Router default ErrorBoundary:",a),p=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:d},"ErrorBoundary")," or"," ",g.createElement("code",{style:d},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},s),i?g.createElement("pre",{style:f},i):null,p)}var _x=g.createElement(Mx,null),kx=class extends g.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,s){return s.location!==a.location||s.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:s.error,location:s.location,revalidation:a.revalidation||s.revalidation}}componentDidCatch(a,s){this.props.onError?this.props.onError(a,s):console.error("React Router caught the following error during render",a)}render(){return this.state.error!==void 0?g.createElement(_n.Provider,{value:this.props.routeContext},g.createElement(Eu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ox({routeContext:a,match:s,children:i}){let r=g.useContext(bl);return r&&r.static&&r.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=s.route.id),g.createElement(_n.Provider,{value:a},i)}function Dx(a,s=[],i=null,r=null,f=null){if(a==null){if(!i)return null;if(i.errors)a=i.matches;else if(s.length===0&&!i.initialized&&i.matches.length>0)a=i.matches;else return null}let d=a,p=i?.errors;if(p!=null){let S=d.findIndex(b=>b.route.id&&p?.[b.route.id]!==void 0);Ye(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),d=d.slice(0,Math.min(d.length,S+1))}let m=!1,y=-1;if(i)for(let S=0;S=0?d=d.slice(0,y+1):d=[d[0]];break}}}let v=i&&r?(S,b)=>{r(S,{location:i.location,params:i.matches?.[0]?.params??{},errorInfo:b})}:void 0;return d.reduceRight((S,b,R)=>{let j,w=!1,C=null,A=null;i&&(j=p&&b.route.id?p[b.route.id]:void 0,C=b.route.errorElement||_x,m&&(y<0&&R===0?(g0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,A=null):y===R&&(w=!0,A=b.route.hydrateFallbackElement||null)));let N=s.concat(d.slice(0,R+1)),M=()=>{let V;return j?V=C:w?V=A:b.route.Component?V=g.createElement(b.route.Component,null):b.route.element?V=b.route.element:V=S,g.createElement(Ox,{match:b,routeContext:{outlet:S,matches:N,isDataRoute:i!=null},children:V})};return i&&(b.route.ErrorBoundary||b.route.errorElement||R===0)?g.createElement(kx,{location:i.location,revalidation:i.revalidation,component:C,error:j,children:M(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:v}):M()},null)}function wu(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zx(a){let s=g.useContext(bl);return Ye(s,wu(a)),s}function Bx(a){let s=g.useContext(br);return Ye(s,wu(a)),s}function Lx(a){let s=g.useContext(_n);return Ye(s,wu(a)),s}function Cu(a){let s=Lx(a),i=s.matches[s.matches.length-1];return Ye(i.route.id,`${a} can only be used on routes that contain a unique "id"`),i.route.id}function Ux(){return Cu("useRouteId")}function Hx(){let a=g.useContext(Eu),s=Bx("useRouteError"),i=Cu("useRouteError");return a!==void 0?a:s.errors?.[i]}function Vx(){let{router:a}=zx("useNavigate"),s=Cu("useNavigate"),i=g.useRef(!1);return m0(()=>{i.current=!0}),g.useCallback(async(f,d={})=>{Wt(i.current,h0),i.current&&(typeof f=="number"?a.navigate(f):await a.navigate(f,{fromRouteId:s,...d}))},[a,s])}var Sp={};function g0(a,s,i){!s&&!Sp[a]&&(Sp[a]=!0,Wt(!1,i))}g.memo(Yx);function Yx({routes:a,future:s,state:i,unstable_onError:r}){return p0(a,void 0,i,r,s)}function rr(a){Ye(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Gx({basename:a="/",children:s=null,location:i,navigationType:r="POP",navigator:f,static:d=!1}){Ye(!Ms(),"You cannot render a inside another . You should never have more than one in your app.");let p=a.replace(/^\/*/,"/"),m=g.useMemo(()=>({basename:p,navigator:f,static:d,future:{}}),[p,f,d]);typeof i=="string"&&(i=xl(i));let{pathname:y="/",search:v="",hash:S="",state:b=null,key:R="default"}=i,j=g.useMemo(()=>{let w=Mn(y,p);return w==null?null:{location:{pathname:w,search:v,hash:S,state:b,key:R},navigationType:r}},[p,y,v,S,b,R,r]);return Wt(j!=null,` is not able to match the URL "${y}${v}${S}" because it does not start with the basename, so the won't render anything.`),j==null?null:g.createElement(ln.Provider,{value:m},g.createElement(Rs.Provider,{children:s,value:j}))}function Qx({children:a,location:s}){return Rx(fu(a),s)}function fu(a,s=[]){let i=[];return g.Children.forEach(a,(r,f)=>{if(!g.isValidElement(r))return;let d=[...s,f];if(r.type===g.Fragment){i.push.apply(i,fu(r.props.children,d));return}Ye(r.type===rr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Ye(!r.props.index||!r.props.children,"An index route cannot have child routes.");let p={id:r.props.id||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(p.children=fu(r.props.children,d)),i.push(p)}),i}var cr="get",or="application/x-www-form-urlencoded";function Sr(a){return a!=null&&typeof a.tagName=="string"}function Xx(a){return Sr(a)&&a.tagName.toLowerCase()==="button"}function Kx(a){return Sr(a)&&a.tagName.toLowerCase()==="form"}function $x(a){return Sr(a)&&a.tagName.toLowerCase()==="input"}function Zx(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}function Jx(a,s){return a.button===0&&(!s||s==="_self")&&!Zx(a)}var Pi=null;function Fx(){if(Pi===null)try{new FormData(document.createElement("form"),0),Pi=!1}catch{Pi=!0}return Pi}var Wx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ko(a){return a!=null&&!Wx.has(a)?(Wt(!1,`"${a}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${or}"`),null):a}function Ix(a,s){let i,r,f,d,p;if(Kx(a)){let m=a.getAttribute("action");r=m?Mn(m,s):null,i=a.getAttribute("method")||cr,f=Ko(a.getAttribute("enctype"))||or,d=new FormData(a)}else if(Xx(a)||$x(a)&&(a.type==="submit"||a.type==="image")){let m=a.form;if(m==null)throw new Error('Cannot submit a + + + { + if (!goalText) { + setVisible(false); + return undefined; + } + setVisible(true); + if (!isMobile) return undefined; + const startedAt = Date.now(); + setRemainingMs(MOBILE_DISMISS_MS); + const timer = setTimeout(() => setVisible(false), MOBILE_DISMISS_MS); + const tick = setInterval(() => { + const elapsed = Date.now() - startedAt; + setRemainingMs(Math.max(0, MOBILE_DISMISS_MS - elapsed)); + }, 250); + return () => { + clearTimeout(timer); + clearInterval(tick); + }; + }, [goalText, isMobile]); + + useEffect(() => { + if (!goalText) return undefined; + setFontSize(MAX_FONT_PX); + let rafId = 0; + const adjustFont = () => { + const textContainer = textContainerRef.current; + const text = textRef.current; + if (!textContainer || !text) return; + const available = textContainer.clientWidth; + if (!available) return; + const needed = text.scrollWidth; + if (!needed) return; + const scale = Math.min(1, available / needed); + const nextSize = Math.max(MIN_FONT_PX, Math.floor(MAX_FONT_PX * scale)); + setFontSize(nextSize); + }; + rafId = window.requestAnimationFrame(adjustFont); + const observer = new ResizeObserver(() => { + window.cancelAnimationFrame(rafId); + rafId = window.requestAnimationFrame(adjustFont); + }); + if (containerRef.current) observer.observe(containerRef.current); + return () => { + window.cancelAnimationFrame(rafId); + observer.disconnect(); + }; + }, [goalText]); + + const containerClass = useMemo( + () => + [ + 'panel-section flex w-full items-center justify-center', + isMobile ? 'rounded-none' : 'rounded', + 'px-1 py-1 text-center font-semibold tracking-tight', + className, + ] + .filter(Boolean) + .join(' '), + [className, isMobile], + ); + + if (!goalText || !visible) return null; + + const remainingSeconds = isMobile ? Math.ceil(remainingMs / 1000) : null; + + return ( +
setVisible(false)} + role="button" + tabIndex={0} + > + + + Community + Goal + + + + {goalText} + + + {isMobile ? ( + + {remainingSeconds}s + + ) : null} + +
+ ); +} diff --git a/webui/src/context/SessionContext.jsx b/webui/src/context/SessionContext.jsx index 130a5064..4502becf 100644 --- a/webui/src/context/SessionContext.jsx +++ b/webui/src/context/SessionContext.jsx @@ -16,6 +16,7 @@ const SessionContext = createContext({ homeAssistantSetState: async () => {}, setNickname: async () => {}, triggerReplay: async () => {}, + setCommunityGoal: async () => {}, }); function useAckEmitter(socket) { @@ -98,6 +99,7 @@ export function SessionProvider({ children }) { emitWithAck('homeAssistant:setState', { entityId, state }), setNickname: (nickname) => emitWithAck('nickname:set', { nickname }), triggerReplay: (sources = []) => emitWithAck('replay:trigger', { sources }), + setCommunityGoal: (text) => emitWithAck('communityGoal:set', { text }), pushAlert: (alert) => setAlerts((prev) => [ ...prev.slice(-49), diff --git a/webui/src/spectate/SpectatorApp.jsx b/webui/src/spectate/SpectatorApp.jsx index ecdad7a9..1e4b7884 100644 --- a/webui/src/spectate/SpectatorApp.jsx +++ b/webui/src/spectate/SpectatorApp.jsx @@ -12,6 +12,7 @@ import LogPanel from '../components/LogPanel.jsx'; import RoverRoster from '../components/RoverRoster.jsx'; import AlertFeed from '../components/AlertFeed.jsx'; import useDefaultNickname from '../hooks/useDefaultNickname.js'; +import CommunityGoalBanner from '../components/CommunityGoalBanner.jsx'; function formatDriverLabel({ roverId, session }) { const activeDriverId = session?.activeDrivers?.[roverId] || null; @@ -135,6 +136,7 @@ function SpectatorContent() {
+