mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
12 lines
320 KiB
JavaScript
12 lines
320 KiB
JavaScript
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const y of d.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&c(y)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();var cc={exports:{}},Xa={};var sm;function F0(){if(sm)return Xa;sm=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(c,f,d){var y=null;if(d!==void 0&&(y=""+d),f.key!==void 0&&(y=""+f.key),"key"in f){d={};for(var g in f)g!=="key"&&(d[g]=f[g])}else d=f;return f=d.ref,{$$typeof:i,type:c,key:y,ref:f!==void 0?f:null,props:d}}return Xa.Fragment=a,Xa.jsx=s,Xa.jsxs=s,Xa}var rm;function W0(){return rm||(rm=1,cc.exports=F0()),cc.exports}var m=W0(),oc={exports:{}},P={};var cm;function I0(){if(cm)return P;cm=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),y=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),_=Symbol.iterator;function C(T){return T===null||typeof T!="object"?null:(T=_&&T[_]||T["@@iterator"],typeof T=="function"?T:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,k={};function V(T,q,X){this.props=T,this.context=q,this.refs=k,this.updater=X||D}V.prototype.isReactComponent={},V.prototype.setState=function(T,q){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,q,"setState")},V.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function U(){}U.prototype=V.prototype;function H(T,q,X){this.props=T,this.context=q,this.refs=k,this.updater=X||D}var J=H.prototype=new U;J.constructor=H,Y(J,V.prototype),J.isPureReactComponent=!0;var oe=Array.isArray;function Ae(){}var F={H:null,A:null,T:null,S:null},Te=Object.prototype.hasOwnProperty;function Se(T,q,X){var Z=X.ref;return{$$typeof:i,type:T,key:q,ref:Z!==void 0?Z:null,props:X}}function Ue(T,q){return Se(T.type,q,T.props)}function Ve(T){return typeof T=="object"&&T!==null&&T.$$typeof===i}function Fe(T){var q={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(X){return q[X]})}var kn=/\/+/g;function Gt(T,q){return typeof T=="object"&&T!==null&&T.key!=null?Fe(""+T.key):q.toString(36)}function Ot(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(Ae,Ae):(T.status="pending",T.then(function(q){T.status==="pending"&&(T.status="fulfilled",T.value=q)},function(q){T.status==="pending"&&(T.status="rejected",T.reason=q)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function j(T,q,X,Z,ee){var le=typeof T;(le==="undefined"||le==="boolean")&&(T=null);var me=!1;if(T===null)me=!0;else switch(le){case"bigint":case"string":case"number":me=!0;break;case"object":switch(T.$$typeof){case i:case a:me=!0;break;case E:return me=T._init,j(me(T._payload),q,X,Z,ee)}}if(me)return ee=ee(T),me=Z===""?"."+Gt(T,0):Z,oe(ee)?(X="",me!=null&&(X=me.replace(kn,"$&/")+"/"),j(ee,q,X,"",function(Wl){return Wl})):ee!=null&&(Ve(ee)&&(ee=Ue(ee,X+(ee.key==null||T&&T.key===ee.key?"":(""+ee.key).replace(kn,"$&/")+"/")+me)),q.push(ee)),1;me=0;var Ie=Z===""?".":Z+":";if(oe(T))for(var De=0;De<T.length;De++)Z=T[De],le=Ie+Gt(Z,De),me+=j(Z,q,X,le,ee);else if(De=C(T),typeof De=="function")for(T=De.call(T),De=0;!(Z=T.next()).done;)Z=Z.value,le=Ie+Gt(Z,De++),me+=j(Z,q,X,le,ee);else if(le==="object"){if(typeof T.then=="function")return j(Ot(T),q,X,Z,ee);throw q=String(T),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return me}function G(T,q,X){if(T==null)return T;var Z=[],ee=0;return j(T,Z,"","",function(le){return q.call(X,le,ee++)}),Z}function I(T){if(T._status===-1){var q=T._result;q=q(),q.then(function(X){(T._status===0||T._status===-1)&&(T._status=1,T._result=X)},function(X){(T._status===0||T._status===-1)&&(T._status=2,T._result=X)}),T._status===-1&&(T._status=0,T._result=q)}if(T._status===1)return T._result.default;throw T._result}var ve=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},_e={map:G,forEach:function(T,q,X){G(T,function(){q.apply(this,arguments)},X)},count:function(T){var q=0;return G(T,function(){q++}),q},toArray:function(T){return G(T,function(q){return q})||[]},only:function(T){if(!Ve(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return P.Activity=S,P.Children=_e,P.Component=V,P.Fragment=s,P.Profiler=f,P.PureComponent=H,P.StrictMode=c,P.Suspense=p,P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,P.__COMPILER_RUNTIME={__proto__:null,c:function(T){return F.H.useMemoCache(T)}},P.cache=function(T){return function(){return T.apply(null,arguments)}},P.cacheSignal=function(){return null},P.cloneElement=function(T,q,X){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Z=Y({},T.props),ee=T.key;if(q!=null)for(le in q.key!==void 0&&(ee=""+q.key),q)!Te.call(q,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&q.ref===void 0||(Z[le]=q[le]);var le=arguments.length-2;if(le===1)Z.children=X;else if(1<le){for(var me=Array(le),Ie=0;Ie<le;Ie++)me[Ie]=arguments[Ie+2];Z.children=me}return Se(T.type,ee,Z)},P.createContext=function(T){return T={$$typeof:y,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:d,_context:T},T},P.createElement=function(T,q,X){var Z,ee={},le=null;if(q!=null)for(Z in q.key!==void 0&&(le=""+q.key),q)Te.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=q[Z]);var me=arguments.length-2;if(me===1)ee.children=X;else if(1<me){for(var Ie=Array(me),De=0;De<me;De++)Ie[De]=arguments[De+2];ee.children=Ie}if(T&&T.defaultProps)for(Z in me=T.defaultProps,me)ee[Z]===void 0&&(ee[Z]=me[Z]);return Se(T,le,ee)},P.createRef=function(){return{current:null}},P.forwardRef=function(T){return{$$typeof:g,render:T}},P.isValidElement=Ve,P.lazy=function(T){return{$$typeof:E,_payload:{_status:-1,_result:T},_init:I}},P.memo=function(T,q){return{$$typeof:v,type:T,compare:q===void 0?null:q}},P.startTransition=function(T){var q=F.T,X={};F.T=X;try{var Z=T(),ee=F.S;ee!==null&&ee(X,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(Ae,ve)}catch(le){ve(le)}finally{q!==null&&X.types!==null&&(q.types=X.types),F.T=q}},P.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},P.use=function(T){return F.H.use(T)},P.useActionState=function(T,q,X){return F.H.useActionState(T,q,X)},P.useCallback=function(T,q){return F.H.useCallback(T,q)},P.useContext=function(T){return F.H.useContext(T)},P.useDebugValue=function(){},P.useDeferredValue=function(T,q){return F.H.useDeferredValue(T,q)},P.useEffect=function(T,q){return F.H.useEffect(T,q)},P.useEffectEvent=function(T){return F.H.useEffectEvent(T)},P.useId=function(){return F.H.useId()},P.useImperativeHandle=function(T,q,X){return F.H.useImperativeHandle(T,q,X)},P.useInsertionEffect=function(T,q){return F.H.useInsertionEffect(T,q)},P.useLayoutEffect=function(T,q){return F.H.useLayoutEffect(T,q)},P.useMemo=function(T,q){return F.H.useMemo(T,q)},P.useOptimistic=function(T,q){return F.H.useOptimistic(T,q)},P.useReducer=function(T,q,X){return F.H.useReducer(T,q,X)},P.useRef=function(T){return F.H.useRef(T)},P.useState=function(T){return F.H.useState(T)},P.useSyncExternalStore=function(T,q,X){return F.H.useSyncExternalStore(T,q,X)},P.useTransition=function(){return F.H.useTransition()},P.version="19.2.0",P}var om;function Lu(){return om||(om=1,oc.exports=I0()),oc.exports}var x=Lu(),fc={exports:{}},Qa={},dc={exports:{}},hc={};var fm;function P0(){return fm||(fm=1,(function(i){function a(j,G){var I=j.length;j.push(G);e:for(;0<I;){var ve=I-1>>>1,_e=j[ve];if(0<f(_e,G))j[ve]=G,j[I]=_e,I=ve;else break e}}function s(j){return j.length===0?null:j[0]}function c(j){if(j.length===0)return null;var G=j[0],I=j.pop();if(I!==G){j[0]=I;e:for(var ve=0,_e=j.length,T=_e>>>1;ve<T;){var q=2*(ve+1)-1,X=j[q],Z=q+1,ee=j[Z];if(0>f(X,I))Z<_e&&0>f(ee,X)?(j[ve]=ee,j[Z]=I,ve=Z):(j[ve]=X,j[q]=I,ve=q);else if(Z<_e&&0>f(ee,I))j[ve]=ee,j[Z]=I,ve=Z;else break e}}return G}function f(j,G){var I=j.sortIndex-G.sortIndex;return I!==0?I:j.id-G.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=[],E=1,S=null,_=3,C=!1,D=!1,Y=!1,k=!1,V=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function J(j){for(var G=s(v);G!==null;){if(G.callback===null)c(v);else if(G.startTime<=j)c(v),G.sortIndex=G.expirationTime,a(p,G);else break;G=s(v)}}function oe(j){if(Y=!1,J(j),!D)if(s(p)!==null)D=!0,Ae||(Ae=!0,Fe());else{var G=s(v);G!==null&&Ot(oe,G.startTime-j)}}var Ae=!1,F=-1,Te=5,Se=-1;function Ue(){return k?!0:!(i.unstable_now()-Se<Te)}function Ve(){if(k=!1,Ae){var j=i.unstable_now();Se=j;var G=!0;try{e:{D=!1,Y&&(Y=!1,U(F),F=-1),C=!0;var I=_;try{t:{for(J(j),S=s(p);S!==null&&!(S.expirationTime>j&&Ue());){var ve=S.callback;if(typeof ve=="function"){S.callback=null,_=S.priorityLevel;var _e=ve(S.expirationTime<=j);if(j=i.unstable_now(),typeof _e=="function"){S.callback=_e,J(j),G=!0;break t}S===s(p)&&c(p),J(j)}else c(p);S=s(p)}if(S!==null)G=!0;else{var T=s(v);T!==null&&Ot(oe,T.startTime-j),G=!1}}break e}finally{S=null,_=I,C=!1}G=void 0}}finally{G?Fe():Ae=!1}}}var Fe;if(typeof H=="function")Fe=function(){H(Ve)};else if(typeof MessageChannel<"u"){var kn=new MessageChannel,Gt=kn.port2;kn.port1.onmessage=Ve,Fe=function(){Gt.postMessage(null)}}else Fe=function(){V(Ve,0)};function Ot(j,G){F=V(function(){j(i.unstable_now())},G)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(j){j.callback=null},i.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<j?Math.floor(1e3/j):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(j){switch(_){case 1:case 2:case 3:var G=3;break;default:G=_}var I=_;_=G;try{return j()}finally{_=I}},i.unstable_requestPaint=function(){k=!0},i.unstable_runWithPriority=function(j,G){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var I=_;_=j;try{return G()}finally{_=I}},i.unstable_scheduleCallback=function(j,G,I){var ve=i.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?ve+I:ve):I=ve,j){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=I+_e,j={id:E++,callback:G,priorityLevel:j,startTime:I,expirationTime:_e,sortIndex:-1},I>ve?(j.sortIndex=I,a(v,j),s(p)===null&&j===s(v)&&(Y?(U(F),F=-1):Y=!0,Ot(oe,I-ve))):(j.sortIndex=_e,a(p,j),D||C||(D=!0,Ae||(Ae=!0,Fe()))),j},i.unstable_shouldYield=Ue,i.unstable_wrapCallback=function(j){var G=_;return function(){var I=_;_=G;try{return j.apply(this,arguments)}finally{_=I}}}})(hc)),hc}var dm;function ev(){return dm||(dm=1,dc.exports=P0()),dc.exports}var mc={exports:{}},We={};var hm;function tv(){if(hm)return We;hm=1;var i=Lu();function a(p){var v="https://react.dev/errors/"+p;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)v+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+p+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var c={d:{f:s,r:function(){throw Error(a(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(p,v,E){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:p,containerInfo:v,implementation:E}}var y=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(p,v){if(p==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return We.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,We.createPortal=function(p,v){var E=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,E)},We.flushSync=function(p){var v=y.T,E=c.p;try{if(y.T=null,c.p=2,p)return p()}finally{y.T=v,c.p=E,c.d.f()}},We.preconnect=function(p,v){typeof p=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,c.d.C(p,v))},We.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},We.preinit=function(p,v){if(typeof p=="string"&&v&&typeof v.as=="string"){var E=v.as,S=g(E,v.crossOrigin),_=typeof v.integrity=="string"?v.integrity:void 0,C=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;E==="style"?c.d.S(p,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:S,integrity:_,fetchPriority:C}):E==="script"&&c.d.X(p,{crossOrigin:S,integrity:_,fetchPriority:C,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},We.preinitModule=function(p,v){if(typeof p=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var E=g(v.as,v.crossOrigin);c.d.M(p,{crossOrigin:E,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&c.d.M(p)},We.preload=function(p,v){if(typeof p=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var E=v.as,S=g(E,v.crossOrigin);c.d.L(p,E,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},We.preloadModule=function(p,v){if(typeof p=="string")if(v){var E=g(v.as,v.crossOrigin);c.d.m(p,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:E,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else c.d.m(p)},We.requestFormReset=function(p){c.d.r(p)},We.unstable_batchedUpdates=function(p,v){return p(v)},We.useFormState=function(p,v,E){return y.H.useFormState(p,v,E)},We.useFormStatus=function(){return y.H.useHostTransitionStatus()},We.version="19.2.0",We}var mm;function nv(){if(mm)return mc.exports;mm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(a){console.error(a)}}return i(),mc.exports=tv(),mc.exports}var pm;function lv(){if(pm)return Qa;pm=1;var i=ev(),a=Lu(),s=nv();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function y(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(c(188))}function v(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,l=t;;){var u=n.return;if(u===null)break;var r=u.alternate;if(r===null){if(l=u.return,l!==null){n=l;continue}break}if(u.child===r.child){for(r=u.child;r;){if(r===n)return p(u),e;if(r===l)return p(u),t;r=r.sibling}throw Error(c(188))}if(n.return!==l.return)n=u,l=r;else{for(var o=!1,h=u.child;h;){if(h===n){o=!0,n=u,l=r;break}if(h===l){o=!0,l=u,n=r;break}h=h.sibling}if(!o){for(h=r.child;h;){if(h===n){o=!0,n=r,l=u;break}if(h===l){o=!0,l=r,n=u;break}h=h.sibling}if(!o)throw Error(c(189))}}if(n.alternate!==l)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,_=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),H=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),Ae=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),Se=Symbol.for("react.activity"),Ue=Symbol.for("react.memo_cache_sentinel"),Ve=Symbol.iterator;function Fe(e){return e===null||typeof e!="object"?null:(e=Ve&&e[Ve]||e["@@iterator"],typeof e=="function"?e:null)}var kn=Symbol.for("react.client.reference");function Gt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===kn?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case V:return"Profiler";case k:return"StrictMode";case oe:return"Suspense";case Ae:return"SuspenseList";case Se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case H:return e.displayName||"Context";case U:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:Gt(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return Gt(e(t))}catch{}}return null}var Ot=Array.isArray,j=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},ve=[],_e=-1;function T(e){return{current:e}}function q(e){0>_e||(e.current=ve[_e],ve[_e]=null,_e--)}function X(e,t){_e++,ve[_e]=e.current,e.current=t}var Z=T(null),ee=T(null),le=T(null),me=T(null);function Ie(e,t){switch(X(le,t),X(ee,e),X(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Mh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Mh(t),e=zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(Z),X(Z,e)}function De(){q(Z),q(ee),q(le)}function Wl(e){e.memoizedState!==null&&X(me,e);var t=Z.current,n=zh(t,e.type);t!==n&&(X(ee,e),X(Z,n))}function li(e){ee.current===e&&(q(Z),q(ee)),me.current===e&&(q(me),ka._currentValue=I)}var Qu,ao;function Yn(e){if(Qu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Qu=t&&t[1]||"",ao=-1<n.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Qu+e+ao}var Zu=!1;function Ku(e,t){if(!e||Zu)return"";Zu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(z){var M=z}Reflect.construct(e,[],L)}else{try{L.call()}catch(z){M=z}e.call(L.prototype)}}else{try{throw Error()}catch(z){M=z}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(z){if(z&&M&&typeof z.stack=="string")return[z.stack,M.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=l.DetermineComponentFrameRoot(),o=r[0],h=r[1];if(o&&h){var b=o.split(`
|
||
`),O=h.split(`
|
||
`);for(u=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;u<O.length&&!O[u].includes("DetermineComponentFrameRoot");)u++;if(l===b.length||u===O.length)for(l=b.length-1,u=O.length-1;1<=l&&0<=u&&b[l]!==O[u];)u--;for(;1<=l&&0<=u;l--,u--)if(b[l]!==O[u]){if(l!==1||u!==1)do if(l--,u--,0>u||b[l]!==O[u]){var w=`
|
||
`+b[l].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),w}while(1<=l&&0<=u);break}}}finally{Zu=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yn(n):""}function Rp(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 Ku(e.type,!1);case 11:return Ku(e.type.render,!1);case 1:return Ku(e.type,!0);case 31:return Yn("Activity");default:return""}}function io(e){try{var t="",n=null;do t+=Rp(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
||
Error generating stack: `+l.message+`
|
||
`+l.stack}}var Ju=Object.prototype.hasOwnProperty,$u=i.unstable_scheduleCallback,Fu=i.unstable_cancelCallback,Np=i.unstable_shouldYield,Op=i.unstable_requestPaint,st=i.unstable_now,Mp=i.unstable_getCurrentPriorityLevel,uo=i.unstable_ImmediatePriority,so=i.unstable_UserBlockingPriority,ai=i.unstable_NormalPriority,zp=i.unstable_LowPriority,ro=i.unstable_IdlePriority,Dp=i.log,wp=i.unstable_setDisableYieldValue,Il=null,rt=null;function hn(e){if(typeof Dp=="function"&&wp(e),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(Il,e)}catch{}}var ct=Math.clz32?Math.clz32:Bp,jp=Math.log,Up=Math.LN2;function Bp(e){return e>>>=0,e===0?32:31-(jp(e)/Up|0)|0}var ii=256,ui=262144,si=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 ri(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var u=0,r=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~r,l!==0?u=Vn(l):(o&=h,o!==0?u=Vn(o):n||(n=h&~e,n!==0&&(u=Vn(n))))):(h=l&~r,h!==0?u=Vn(h):o!==0?u=Vn(o):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 Pl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Lp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function co(){var e=si;return si<<=1,(si&62914560)===0&&(si=4194304),e}function Wu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ea(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hp(e,t,n,l,u,r){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,b=e.expirationTimes,O=e.hiddenUpdates;for(n=o&~n;0<n;){var w=31-ct(n),L=1<<w;h[w]=0,b[w]=-1;var M=O[w];if(M!==null)for(O[w]=null,w=0;w<M.length;w++){var z=M[w];z!==null&&(z.lane&=-536870913)}n&=~L}l!==0&&oo(e,l,0),r!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=r&~(o&~t))}function oo(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ct(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function fo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-ct(n),u=1<<l;u&t|e[l]&t&&(e[l]|=t),n&=~u}}function ho(e,t){var n=t&-t;return n=(n&42)!==0?1:Iu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Iu(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 Pu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mo(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:em(e.type))}function po(e,t){var n=G.p;try{return G.p=e,t()}finally{G.p=n}}var mn=Math.random().toString(36).slice(2),Qe="__reactFiber$"+mn,et="__reactProps$"+mn,ol="__reactContainer$"+mn,es="__reactEvents$"+mn,qp="__reactListeners$"+mn,kp="__reactHandles$"+mn,yo="__reactResources$"+mn,ta="__reactMarker$"+mn;function ts(e){delete e[Qe],delete e[et],delete e[es],delete e[qp],delete e[kp]}function fl(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ol]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hh(e);e!==null;){if(n=e[Qe])return n;e=Hh(e)}return t}e=n,n=e.parentNode}return null}function dl(e){if(e=e[Qe]||e[ol]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function na(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function hl(e){var t=e[yo];return t||(t=e[yo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ge(e){e[ta]=!0}var vo=new Set,go={};function Gn(e,t){ml(e,t),ml(e+"Capture",t)}function ml(e,t){for(go[e]=t,e=0;e<t.length;e++)vo.add(t[e])}var Yp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),bo={},xo={};function Vp(e){return Ju.call(xo,e)?!0:Ju.call(bo,e)?!1:Yp.test(e)?xo[e]=!0:(bo[e]=!0,!1)}function ci(e,t,n){if(Vp(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 oi(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 Xt(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 gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function So(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gp(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,r=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(o){n=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ns(e){if(!e._valueTracker){var t=So(e)?"checked":"value";e._valueTracker=Gp(e,t,""+e[t])}}function _o(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=So(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function fi(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 Xp=/[\n"\\]/g;function bt(e){return e.replace(Xp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ls(e,t,n,l,u,r,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+gt(t)):e.value!==""+gt(t)&&(e.value=""+gt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?as(e,o,gt(t)):n!=null?as(e,o,gt(n)):l!=null&&e.removeAttribute("value"),u==null&&r!=null&&(e.defaultChecked=!!r),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+gt(h):e.removeAttribute("name")}function Eo(e,t,n,l,u,r,o,h){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)){ns(e);return}n=n!=null?""+gt(n):"",t=t!=null?""+gt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),ns(e)}function as(e,t,n){t==="number"&&fi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function pl(e,t,n,l){if(e=e.options,t){t={};for(var u=0;u<n.length;u++)t["$"+n[u]]=!0;for(n=0;n<e.length;n++)u=t.hasOwnProperty("$"+e[n].value),e[n].selected!==u&&(e[n].selected=u),u&&l&&(e[n].defaultSelected=!0)}else{for(n=""+gt(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 Ao(e,t,n){if(t!=null&&(t=""+gt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+gt(n):""}function To(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(c(92));if(Ot(l)){if(1<l.length)throw Error(c(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=gt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),ns(e)}function yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Co(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Qp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ro(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in t)l=t[u],t.hasOwnProperty(u)&&n[u]!==l&&Co(e,u,l)}else for(var r in t)t.hasOwnProperty(r)&&Co(e,r,t[r])}function is(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 Zp=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"]]),Kp=/^[\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 di(e){return Kp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var us=null;function ss(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vl=null,gl=null;function No(e){var t=dl(e);if(t&&(e=t.stateNode)){var n=e[et]||null;e:switch(e=t.stateNode,t.type){case"input":if(ls(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="'+bt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var u=l[et]||null;if(!u)throw Error(c(90));ls(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&&_o(l)}break e;case"textarea":Ao(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&pl(e,!!n.multiple,t,!1)}}}var rs=!1;function Oo(e,t,n){if(rs)return e(t,n);rs=!0;try{var l=e(t);return l}finally{if(rs=!1,(vl!==null||gl!==null)&&(Pi(),vl&&(t=vl,e=gl,gl=vl=null,No(t),e)))for(t=0;t<e.length;t++)No(e[t])}}function la(e,t){var n=e.stateNode;if(n===null)return null;var l=n[et]||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 Zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cs=!1;if(Zt)try{var aa={};Object.defineProperty(aa,"passive",{get:function(){cs=!0}}),window.addEventListener("test",aa,aa),window.removeEventListener("test",aa,aa)}catch{cs=!1}var pn=null,os=null,hi=null;function Mo(){if(hi)return hi;var e,t=os,n=t.length,l,u="value"in pn?pn.value:pn.textContent,r=u.length;for(e=0;e<n&&t[e]===u[e];e++);var o=n-e;for(l=1;l<=o&&t[n-l]===u[r-l];l++);return hi=u.slice(e,1<l?1-l:void 0)}function mi(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 pi(){return!0}function zo(){return!1}function tt(e){function t(n,l,u,r,o){this._reactName=n,this._targetInst=u,this.type=l,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(r):r[h]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?pi:zo,this.isPropagationStopped=zo,this}return S(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=pi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pi)},persist:function(){},isPersistent:pi}),t}var Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yi=tt(Xn),ia=S({},Xn,{view:0,detail:0}),Jp=tt(ia),fs,ds,ua,vi=S({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ms,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!==ua&&(ua&&e.type==="mousemove"?(fs=e.screenX-ua.screenX,ds=e.screenY-ua.screenY):ds=fs=0,ua=e),fs)},movementY:function(e){return"movementY"in e?e.movementY:ds}}),Do=tt(vi),$p=S({},vi,{dataTransfer:0}),Fp=tt($p),Wp=S({},ia,{relatedTarget:0}),hs=tt(Wp),Ip=S({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),Pp=tt(Ip),ey=S({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ty=tt(ey),ny=S({},Xn,{data:0}),wo=tt(ny),ly={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ay={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"},iy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=iy[e])?!!t[e]:!1}function ms(){return uy}var sy=S({},ia,{key:function(e){if(e.key){var t=ly[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ay[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ms,charCode:function(e){return e.type==="keypress"?mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ry=tt(sy),cy=S({},vi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jo=tt(cy),oy=S({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ms}),fy=tt(oy),dy=S({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),hy=tt(dy),my=S({},vi,{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}),py=tt(my),yy=S({},Xn,{newState:0,oldState:0}),vy=tt(yy),gy=[9,13,27,32],ps=Zt&&"CompositionEvent"in window,sa=null;Zt&&"documentMode"in document&&(sa=document.documentMode);var by=Zt&&"TextEvent"in window&&!sa,Uo=Zt&&(!ps||sa&&8<sa&&11>=sa),Bo=" ",Lo=!1;function Ho(e,t){switch(e){case"keyup":return gy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function xy(e,t){switch(e){case"compositionend":return qo(t);case"keypress":return t.which!==32?null:(Lo=!0,Bo);case"textInput":return e=t.data,e===Bo&&Lo?null:e;default:return null}}function Sy(e,t){if(bl)return e==="compositionend"||!ps&&Ho(e,t)?(e=Mo(),hi=os=pn=null,bl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Uo&&t.locale!=="ko"?null:t.data;default:return null}}var _y={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ko(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_y[e.type]:t==="textarea"}function Yo(e,t,n,l){vl?gl?gl.push(l):gl=[l]:vl=l,t=uu(t,"onChange"),0<t.length&&(n=new yi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ra=null,ca=null;function Ey(e){Ah(e,0)}function gi(e){var t=na(e);if(_o(t))return e}function Vo(e,t){if(e==="change")return t}var Go=!1;if(Zt){var ys;if(Zt){var vs="oninput"in document;if(!vs){var Xo=document.createElement("div");Xo.setAttribute("oninput","return;"),vs=typeof Xo.oninput=="function"}ys=vs}else ys=!1;Go=ys&&(!document.documentMode||9<document.documentMode)}function Qo(){ra&&(ra.detachEvent("onpropertychange",Zo),ca=ra=null)}function Zo(e){if(e.propertyName==="value"&&gi(ca)){var t=[];Yo(t,ca,e,ss(e)),Oo(Ey,t)}}function Ay(e,t,n){e==="focusin"?(Qo(),ra=t,ca=n,ra.attachEvent("onpropertychange",Zo)):e==="focusout"&&Qo()}function Ty(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gi(ca)}function Cy(e,t){if(e==="click")return gi(t)}function Ry(e,t){if(e==="input"||e==="change")return gi(t)}function Ny(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ot=typeof Object.is=="function"?Object.is:Ny;function oa(e,t){if(ot(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(!Ju.call(t,u)||!ot(e[u],t[u]))return!1}return!0}function Ko(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jo(e,t){var n=Ko(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ko(n)}}function $o(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$o(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fi(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=fi(e.document)}return t}function gs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Oy=Zt&&"documentMode"in document&&11>=document.documentMode,xl=null,bs=null,fa=null,xs=!1;function Wo(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xs||xl==null||xl!==fi(l)||(l=xl,"selectionStart"in l&&gs(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}),fa&&oa(fa,l)||(fa=l,l=uu(bs,"onSelect"),0<l.length&&(t=new yi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=xl)))}function Qn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sl={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")},Ss={},Io={};Zt&&(Io=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function Zn(e){if(Ss[e])return Ss[e];if(!Sl[e])return e;var t=Sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Io)return Ss[e]=t[n];return e}var Po=Zn("animationend"),ef=Zn("animationiteration"),tf=Zn("animationstart"),My=Zn("transitionrun"),zy=Zn("transitionstart"),Dy=Zn("transitioncancel"),nf=Zn("transitionend"),lf=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 Mt(e,t){lf.set(e,t),Gn(t,[e])}var bi=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)},xt=[],_l=0,Es=0;function xi(){for(var e=_l,t=Es=_l=0;t<e;){var n=xt[t];xt[t++]=null;var l=xt[t];xt[t++]=null;var u=xt[t];xt[t++]=null;var r=xt[t];if(xt[t++]=null,l!==null&&u!==null){var o=l.pending;o===null?u.next=u:(u.next=o.next,o.next=u),l.pending=u}r!==0&&af(n,u,r)}}function Si(e,t,n,l){xt[_l++]=e,xt[_l++]=t,xt[_l++]=n,xt[_l++]=l,Es|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function As(e,t,n,l){return Si(e,t,n,l),_i(e)}function Kn(e,t){return Si(e,null,null,t),_i(e)}function af(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var u=!1,r=e.return;r!==null;)r.childLanes|=n,l=r.alternate,l!==null&&(l.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(u=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,u&&t!==null&&(u=31-ct(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<wa)throw wa=0,wr=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var El={};function wy(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 ft(e,t,n,l){return new wy(e,t,n,l)}function Ts(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var n=e.alternate;return n===null?(n=ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function uf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ei(e,t,n,l,u,r){var o=0;if(l=e,typeof e=="function")Ts(e)&&(o=1);else if(typeof e=="string")o=H0(e,n,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Se:return e=ft(31,n,t,u),e.elementType=Se,e.lanes=r,e;case Y:return Jn(n.children,u,r,t);case k:o=8,u|=24;break;case V:return e=ft(12,n,t,u|2),e.elementType=V,e.lanes=r,e;case oe:return e=ft(13,n,t,u),e.elementType=oe,e.lanes=r,e;case Ae:return e=ft(19,n,t,u),e.elementType=Ae,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:o=10;break e;case U:o=9;break e;case J:o=11;break e;case F:o=14;break e;case Te:o=16,l=null;break e}o=29,n=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=ft(o,n,t,u),t.elementType=e,t.type=l,t.lanes=r,t}function Jn(e,t,n,l){return e=ft(7,e,l,t),e.lanes=n,e}function Cs(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function sf(e){var t=ft(18,null,null,0);return t.stateNode=e,t}function Rs(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var rf=new WeakMap;function St(e,t){if(typeof e=="object"&&e!==null){var n=rf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:io(t)},rf.set(e,t),t)}return{value:e,source:t,stack:io(t)}}var Al=[],Tl=0,Ai=null,da=0,_t=[],Et=0,yn=null,Bt=1,Lt="";function Jt(e,t){Al[Tl++]=da,Al[Tl++]=Ai,Ai=e,da=t}function cf(e,t,n){_t[Et++]=Bt,_t[Et++]=Lt,_t[Et++]=yn,yn=e;var l=Bt;e=Lt;var u=32-ct(l)-1;l&=~(1<<u),n+=1;var r=32-ct(t)+u;if(30<r){var o=u-u%5;r=(l&(1<<o)-1).toString(32),l>>=o,u-=o,Bt=1<<32-ct(t)+u|n<<u|l,Lt=r+e}else Bt=1<<r|n<<u|l,Lt=e}function Ns(e){e.return!==null&&(Jt(e,1),cf(e,1,0))}function Os(e){for(;e===Ai;)Ai=Al[--Tl],Al[Tl]=null,da=Al[--Tl],Al[Tl]=null;for(;e===yn;)yn=_t[--Et],_t[Et]=null,Lt=_t[--Et],_t[Et]=null,Bt=_t[--Et],_t[Et]=null}function of(e,t){_t[Et++]=Bt,_t[Et++]=Lt,_t[Et++]=yn,Bt=t.id,Lt=t.overflow,yn=e}var Ze=null,Ce=null,re=!1,vn=null,At=!1,Ms=Error(c(519));function gn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ha(St(t,e)),Ms}function ff(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Qe]=e,t[et]=l,n){case"dialog":ie("cancel",t),ie("close",t);break;case"iframe":case"object":case"embed":ie("load",t);break;case"video":case"audio":for(n=0;n<Ua.length;n++)ie(Ua[n],t);break;case"source":ie("error",t);break;case"img":case"image":case"link":ie("error",t),ie("load",t);break;case"details":ie("toggle",t);break;case"input":ie("invalid",t),Eo(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ie("invalid",t);break;case"textarea":ie("invalid",t),To(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Nh(t.textContent,n)?(l.popover!=null&&(ie("beforetoggle",t),ie("toggle",t)),l.onScroll!=null&&ie("scroll",t),l.onScrollEnd!=null&&ie("scrollend",t),l.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||gn(e,!0)}function df(e){for(Ze=e.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:At=!1;return;case 27:case 3:At=!0;return;default:Ze=Ze.return}}function Cl(e){if(e!==Ze)return!1;if(!re)return df(e),re=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Jr(e.type,e.memoizedProps)),n=!n),n&&Ce&&gn(e),df(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ce=Lh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ce=Lh(e)}else t===27?(t=Ce,Dn(e.type)?(e=Pr,Pr=null,Ce=e):Ce=t):Ce=Ze?Ct(e.stateNode.nextSibling):null;return!0}function $n(){Ce=Ze=null,re=!1}function zs(){var e=vn;return e!==null&&(it===null?it=e:it.push.apply(it,e),vn=null),e}function ha(e){vn===null?vn=[e]:vn.push(e)}var Ds=T(null),Fn=null,$t=null;function bn(e,t,n){X(Ds,t._currentValue),t._currentValue=n}function Ft(e){e._currentValue=Ds.current,q(Ds)}function ws(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 js(e,t,n,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var r=u.dependencies;if(r!==null){var o=u.child;r=r.firstContext;e:for(;r!==null;){var h=r;r=u;for(var b=0;b<t.length;b++)if(h.context===t[b]){r.lanes|=n,h=r.alternate,h!==null&&(h.lanes|=n),ws(r.return,n,e),l||(o=null);break e}r=h.next}}else if(u.tag===18){if(o=u.return,o===null)throw Error(c(341));o.lanes|=n,r=o.alternate,r!==null&&(r.lanes|=n),ws(o,n,e),o=null}else o=u.child;if(o!==null)o.return=u;else for(o=u;o!==null;){if(o===e){o=null;break}if(u=o.sibling,u!==null){u.return=o.return,o=u;break}o=o.return}u=o}}function Rl(e,t,n,l){e=null;for(var u=t,r=!1;u!==null;){if(!r){if((u.flags&524288)!==0)r=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var o=u.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=u.type;ot(u.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(u===me.current){if(o=u.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ka):e=[ka])}u=u.return}e!==null&&js(t,e,n,l),t.flags|=262144}function Ti(e){for(e=e.firstContext;e!==null;){if(!ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wn(e){Fn=e,$t=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ke(e){return hf(Fn,e)}function Ci(e,t){return Fn===null&&Wn(e),hf(e,t)}function hf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$t===null){if(e===null)throw Error(c(308));$t=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $t=$t.next=t;return n}var jy=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()})}},Uy=i.unstable_scheduleCallback,By=i.unstable_NormalPriority,Be={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Us(){return{controller:new jy,data:new Map,refCount:0}}function ma(e){e.refCount--,e.refCount===0&&Uy(By,function(){e.controller.abort()})}var pa=null,Bs=0,Nl=0,Ol=null;function Ly(e,t){if(pa===null){var n=pa=[];Bs=0,Nl=qr(),Ol={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Bs++,t.then(mf,mf),t}function mf(){if(--Bs===0&&pa!==null){Ol!==null&&(Ol.status="fulfilled");var e=pa;pa=null,Nl=0,Ol=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Hy(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(u){n.push(u)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var u=0;u<n.length;u++)(0,n[u])(t)},function(u){for(l.status="rejected",l.reason=u,u=0;u<n.length;u++)(0,n[u])(void 0)}),l}var pf=j.S;j.S=function(e,t){Id=st(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ly(e,t),pf!==null&&pf(e,t)};var In=T(null);function Ls(){var e=In.current;return e!==null?e:Ee.pooledCache}function Ri(e,t){t===null?X(In,In.current):X(In,t.pool)}function yf(){var e=Ls();return e===null?null:{parent:Be._currentValue,pool:e}}var Ml=Error(c(460)),Hs=Error(c(474)),Ni=Error(c(542)),Oi={then:function(){}};function vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xf(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=Ee,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=l}},function(l){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xf(e),e}throw el=t,Ml}}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,Ml):n}}var el=null;function bf(){if(el===null)throw Error(c(459));var e=el;return el=null,e}function xf(e){if(e===Ml||e===Ni)throw Error(c(483))}var zl=null,ya=0;function Mi(e){var t=ya;return ya+=1,zl===null&&(zl=[]),gf(zl,e,t)}function va(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zi(e,t){throw t.$$typeof===_?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Sf(e){function t(R,A){if(e){var N=R.deletions;N===null?(R.deletions=[A],R.flags|=16):N.push(A)}}function n(R,A){if(!e)return null;for(;A!==null;)t(R,A),A=A.sibling;return null}function l(R){for(var A=new Map;R!==null;)R.key!==null?A.set(R.key,R):A.set(R.index,R),R=R.sibling;return A}function u(R,A){return R=Kt(R,A),R.index=0,R.sibling=null,R}function r(R,A,N){return R.index=N,e?(N=R.alternate,N!==null?(N=N.index,N<A?(R.flags|=67108866,A):N):(R.flags|=67108866,A)):(R.flags|=1048576,A)}function o(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function h(R,A,N,B){return A===null||A.tag!==6?(A=Cs(N,R.mode,B),A.return=R,A):(A=u(A,N),A.return=R,A)}function b(R,A,N,B){var $=N.type;return $===Y?w(R,A,N.props.children,B,N.key):A!==null&&(A.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Te&&Pn($)===A.type)?(A=u(A,N.props),va(A,N),A.return=R,A):(A=Ei(N.type,N.key,N.props,null,R.mode,B),va(A,N),A.return=R,A)}function O(R,A,N,B){return A===null||A.tag!==4||A.stateNode.containerInfo!==N.containerInfo||A.stateNode.implementation!==N.implementation?(A=Rs(N,R.mode,B),A.return=R,A):(A=u(A,N.children||[]),A.return=R,A)}function w(R,A,N,B,$){return A===null||A.tag!==7?(A=Jn(N,R.mode,B,$),A.return=R,A):(A=u(A,N),A.return=R,A)}function L(R,A,N){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Cs(""+A,R.mode,N),A.return=R,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case C:return N=Ei(A.type,A.key,A.props,null,R.mode,N),va(N,A),N.return=R,N;case D:return A=Rs(A,R.mode,N),A.return=R,A;case Te:return A=Pn(A),L(R,A,N)}if(Ot(A)||Fe(A))return A=Jn(A,R.mode,N,null),A.return=R,A;if(typeof A.then=="function")return L(R,Mi(A),N);if(A.$$typeof===H)return L(R,Ci(R,A),N);zi(R,A)}return null}function M(R,A,N,B){var $=A!==null?A.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return $!==null?null:h(R,A,""+N,B);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case C:return N.key===$?b(R,A,N,B):null;case D:return N.key===$?O(R,A,N,B):null;case Te:return N=Pn(N),M(R,A,N,B)}if(Ot(N)||Fe(N))return $!==null?null:w(R,A,N,B,null);if(typeof N.then=="function")return M(R,A,Mi(N),B);if(N.$$typeof===H)return M(R,A,Ci(R,N),B);zi(R,N)}return null}function z(R,A,N,B,$){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return R=R.get(N)||null,h(A,R,""+B,$);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case C:return R=R.get(B.key===null?N:B.key)||null,b(A,R,B,$);case D:return R=R.get(B.key===null?N:B.key)||null,O(A,R,B,$);case Te:return B=Pn(B),z(R,A,N,B,$)}if(Ot(B)||Fe(B))return R=R.get(N)||null,w(A,R,B,$,null);if(typeof B.then=="function")return z(R,A,N,Mi(B),$);if(B.$$typeof===H)return z(R,A,N,Ci(A,B),$);zi(A,B)}return null}function Q(R,A,N,B){for(var $=null,fe=null,K=A,ne=A=0,se=null;K!==null&&ne<N.length;ne++){K.index>ne?(se=K,K=null):se=K.sibling;var de=M(R,K,N[ne],B);if(de===null){K===null&&(K=se);break}e&&K&&de.alternate===null&&t(R,K),A=r(de,A,ne),fe===null?$=de:fe.sibling=de,fe=de,K=se}if(ne===N.length)return n(R,K),re&&Jt(R,ne),$;if(K===null){for(;ne<N.length;ne++)K=L(R,N[ne],B),K!==null&&(A=r(K,A,ne),fe===null?$=K:fe.sibling=K,fe=K);return re&&Jt(R,ne),$}for(K=l(K);ne<N.length;ne++)se=z(K,R,ne,N[ne],B),se!==null&&(e&&se.alternate!==null&&K.delete(se.key===null?ne:se.key),A=r(se,A,ne),fe===null?$=se:fe.sibling=se,fe=se);return e&&K.forEach(function(Ln){return t(R,Ln)}),re&&Jt(R,ne),$}function W(R,A,N,B){if(N==null)throw Error(c(151));for(var $=null,fe=null,K=A,ne=A=0,se=null,de=N.next();K!==null&&!de.done;ne++,de=N.next()){K.index>ne?(se=K,K=null):se=K.sibling;var Ln=M(R,K,de.value,B);if(Ln===null){K===null&&(K=se);break}e&&K&&Ln.alternate===null&&t(R,K),A=r(Ln,A,ne),fe===null?$=Ln:fe.sibling=Ln,fe=Ln,K=se}if(de.done)return n(R,K),re&&Jt(R,ne),$;if(K===null){for(;!de.done;ne++,de=N.next())de=L(R,de.value,B),de!==null&&(A=r(de,A,ne),fe===null?$=de:fe.sibling=de,fe=de);return re&&Jt(R,ne),$}for(K=l(K);!de.done;ne++,de=N.next())de=z(K,R,ne,de.value,B),de!==null&&(e&&de.alternate!==null&&K.delete(de.key===null?ne:de.key),A=r(de,A,ne),fe===null?$=de:fe.sibling=de,fe=de);return e&&K.forEach(function($0){return t(R,$0)}),re&&Jt(R,ne),$}function xe(R,A,N,B){if(typeof N=="object"&&N!==null&&N.type===Y&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case C:e:{for(var $=N.key;A!==null;){if(A.key===$){if($=N.type,$===Y){if(A.tag===7){n(R,A.sibling),B=u(A,N.props.children),B.return=R,R=B;break e}}else if(A.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Te&&Pn($)===A.type){n(R,A.sibling),B=u(A,N.props),va(B,N),B.return=R,R=B;break e}n(R,A);break}else t(R,A);A=A.sibling}N.type===Y?(B=Jn(N.props.children,R.mode,B,N.key),B.return=R,R=B):(B=Ei(N.type,N.key,N.props,null,R.mode,B),va(B,N),B.return=R,R=B)}return o(R);case D:e:{for($=N.key;A!==null;){if(A.key===$)if(A.tag===4&&A.stateNode.containerInfo===N.containerInfo&&A.stateNode.implementation===N.implementation){n(R,A.sibling),B=u(A,N.children||[]),B.return=R,R=B;break e}else{n(R,A);break}else t(R,A);A=A.sibling}B=Rs(N,R.mode,B),B.return=R,R=B}return o(R);case Te:return N=Pn(N),xe(R,A,N,B)}if(Ot(N))return Q(R,A,N,B);if(Fe(N)){if($=Fe(N),typeof $!="function")throw Error(c(150));return N=$.call(N),W(R,A,N,B)}if(typeof N.then=="function")return xe(R,A,Mi(N),B);if(N.$$typeof===H)return xe(R,A,Ci(R,N),B);zi(R,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,A!==null&&A.tag===6?(n(R,A.sibling),B=u(A,N),B.return=R,R=B):(n(R,A),B=Cs(N,R.mode,B),B.return=R,R=B),o(R)):n(R,A)}return function(R,A,N,B){try{ya=0;var $=xe(R,A,N,B);return zl=null,$}catch(K){if(K===Ml||K===Ni)throw K;var fe=ft(29,K,null,R.mode);return fe.lanes=B,fe.return=R,fe}finally{}}}var tl=Sf(!0),_f=Sf(!1),xn=!1;function qs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ks(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 Sn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _n(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(he&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,t=_i(e),af(e,null,n),t}return Si(e,l,t,n),_i(e)}function ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,fo(e,n)}}function Ys(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var u=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?u=r=o:r=r.next=o,n=n.next}while(n!==null);r===null?u=r=t:r=r.next=t}else u=r=t;n={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Vs=!1;function ba(){if(Vs){var e=Ol;if(e!==null)throw e}}function xa(e,t,n,l){Vs=!1;var u=e.updateQueue;xn=!1;var r=u.firstBaseUpdate,o=u.lastBaseUpdate,h=u.shared.pending;if(h!==null){u.shared.pending=null;var b=h,O=b.next;b.next=null,o===null?r=O:o.next=O,o=b;var w=e.alternate;w!==null&&(w=w.updateQueue,h=w.lastBaseUpdate,h!==o&&(h===null?w.firstBaseUpdate=O:h.next=O,w.lastBaseUpdate=b))}if(r!==null){var L=u.baseState;o=0,w=O=b=null,h=r;do{var M=h.lane&-536870913,z=M!==h.lane;if(z?(ue&M)===M:(l&M)===M){M!==0&&M===Nl&&(Vs=!0),w!==null&&(w=w.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var Q=e,W=h;M=t;var xe=n;switch(W.tag){case 1:if(Q=W.payload,typeof Q=="function"){L=Q.call(xe,L,M);break e}L=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=W.payload,M=typeof Q=="function"?Q.call(xe,L,M):Q,M==null)break e;L=S({},L,M);break e;case 2:xn=!0}}M=h.callback,M!==null&&(e.flags|=64,z&&(e.flags|=8192),z=u.callbacks,z===null?u.callbacks=[M]:z.push(M))}else z={lane:M,tag:h.tag,payload:h.payload,callback:h.callback,next:null},w===null?(O=w=z,b=L):w=w.next=z,o|=M;if(h=h.next,h===null){if(h=u.shared.pending,h===null)break;z=h,h=z.next,z.next=null,u.lastBaseUpdate=z,u.shared.pending=null}}while(!0);w===null&&(b=L),u.baseState=b,u.firstBaseUpdate=O,u.lastBaseUpdate=w,r===null&&(u.shared.lanes=0),Rn|=o,e.lanes=o,e.memoizedState=L}}function Ef(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Af(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ef(n[e],t)}var Dl=T(null),Di=T(0);function Tf(e,t){e=un,X(Di,e),X(Dl,t),un=e|t.baseLanes}function Gs(){X(Di,un),X(Dl,Dl.current)}function Xs(){un=Di.current,q(Dl),q(Di)}var dt=T(null),Tt=null;function En(e){var t=e.alternate;X(we,we.current&1),X(dt,e),Tt===null&&(t===null||Dl.current!==null||t.memoizedState!==null)&&(Tt=e)}function Qs(e){X(we,we.current),X(dt,e),Tt===null&&(Tt=e)}function Cf(e){e.tag===22?(X(we,we.current),X(dt,e),Tt===null&&(Tt=e)):An()}function An(){X(we,we.current),X(dt,dt.current)}function ht(e){q(dt),Tt===e&&(Tt=null),q(we)}var we=T(0);function wi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Wr(n)||Ir(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 Wt=0,te=null,ge=null,Le=null,ji=!1,wl=!1,nl=!1,Ui=0,Sa=0,jl=null,qy=0;function Me(){throw Error(c(321))}function Zs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ot(e[n],t[n]))return!1;return!0}function Ks(e,t,n,l,u,r){return Wt=r,te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?cd:rr,nl=!1,r=n(l,u),nl=!1,wl&&(r=Nf(t,n,l,u)),Rf(e),r}function Rf(e){j.H=Aa;var t=ge!==null&&ge.next!==null;if(Wt=0,Le=ge=te=null,ji=!1,Sa=0,jl=null,t)throw Error(c(300));e===null||He||(e=e.dependencies,e!==null&&Ti(e)&&(He=!0))}function Nf(e,t,n,l){te=e;var u=0;do{if(wl&&(jl=null),Sa=0,wl=!1,25<=u)throw Error(c(301));if(u+=1,Le=ge=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}j.H=od,r=t(n,l)}while(wl);return r}function ky(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?_a(t):t,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(te.flags|=1024),t}function Js(){var e=Ui!==0;return Ui=0,e}function $s(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Fs(e){if(ji){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ji=!1}Wt=0,Le=ge=te=null,wl=!1,Sa=Ui=0,jl=null}function Pe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?te.memoizedState=Le=e:Le=Le.next=e,Le}function je(){if(ge===null){var e=te.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Le===null?te.memoizedState:Le.next;if(t!==null)Le=t,ge=e;else{if(e===null)throw te.alternate===null?Error(c(467)):Error(c(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Le===null?te.memoizedState=Le=e:Le=Le.next=e}return Le}function Bi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _a(e){var t=Sa;return Sa+=1,jl===null&&(jl=[]),e=gf(jl,e,t),t=te,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?cd:rr),e}function Li(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _a(e);if(e.$$typeof===H)return Ke(e)}throw Error(c(438,String(e)))}function Ws(e){var t=null,n=te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=te.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=Bi(),te.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]=Ue;return t.index++,n}function It(e,t){return typeof t=="function"?t(e):t}function Hi(e){var t=je();return Is(t,ge,e)}function Is(e,t,n){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=n;var u=e.baseQueue,r=l.pending;if(r!==null){if(u!==null){var o=u.next;u.next=r.next,r.next=o}t.baseQueue=u=r,l.pending=null}if(r=e.baseState,u===null)e.memoizedState=r;else{t=u.next;var h=o=null,b=null,O=t,w=!1;do{var L=O.lane&-536870913;if(L!==O.lane?(ue&L)===L:(Wt&L)===L){var M=O.revertLane;if(M===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),L===Nl&&(w=!0);else if((Wt&M)===M){O=O.next,M===Nl&&(w=!0);continue}else L={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},b===null?(h=b=L,o=r):b=b.next=L,te.lanes|=M,Rn|=M;L=O.action,nl&&n(r,L),r=O.hasEagerState?O.eagerState:n(r,L)}else M={lane:L,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},b===null?(h=b=M,o=r):b=b.next=M,te.lanes|=L,Rn|=L;O=O.next}while(O!==null&&O!==t);if(b===null?o=r:b.next=h,!ot(r,e.memoizedState)&&(He=!0,w&&(n=Ol,n!==null)))throw n;e.memoizedState=r,e.baseState=o,e.baseQueue=b,l.lastRenderedState=r}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ps(e){var t=je(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var l=n.dispatch,u=n.pending,r=t.memoizedState;if(u!==null){n.pending=null;var o=u=u.next;do r=e(r,o.action),o=o.next;while(o!==u);ot(r,t.memoizedState)||(He=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,l]}function Of(e,t,n){var l=te,u=je(),r=re;if(r){if(n===void 0)throw Error(c(407));n=n()}else n=t();var o=!ot((ge||u).memoizedState,n);if(o&&(u.memoizedState=n,He=!0),u=u.queue,nr(Df.bind(null,l,u,e),[e]),u.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(l.flags|=2048,Ul(9,{destroy:void 0},zf.bind(null,l,u,n,t),null),Ee===null)throw Error(c(349));r||(Wt&127)!==0||Mf(l,t,n)}return n}function Mf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=te.updateQueue,t===null?(t=Bi(),te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zf(e,t,n,l){t.value=n,t.getSnapshot=l,wf(t)&&jf(e)}function Df(e,t,n){return n(function(){wf(t)&&jf(e)})}function wf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ot(e,n)}catch{return!0}}function jf(e){var t=Kn(e,2);t!==null&&ut(t,e,2)}function er(e){var t=Pe();if(typeof e=="function"){var n=e;if(e=n(),nl){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:e},t}function Uf(e,t,n,l){return e.baseState=n,Is(e,ge,typeof l=="function"?l:It)}function Yy(e,t,n,l,u){if(Yi(e))throw Error(c(485));if(e=t.action,e!==null){var r={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){r.listeners.push(o)}};j.T!==null?n(!0):r.isTransition=!1,l(r),n=t.pending,n===null?(r.next=t.pending=r,Bf(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Bf(e,t){var n=t.action,l=t.payload,u=e.state;if(t.isTransition){var r=j.T,o={};j.T=o;try{var h=n(u,l),b=j.S;b!==null&&b(o,h),Lf(e,t,h)}catch(O){tr(e,t,O)}finally{r!==null&&o.types!==null&&(r.types=o.types),j.T=r}}else try{r=n(u,l),Lf(e,t,r)}catch(O){tr(e,t,O)}}function Lf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Hf(e,t,l)},function(l){return tr(e,t,l)}):Hf(e,t,n)}function Hf(e,t,n){t.status="fulfilled",t.value=n,qf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Bf(e,n)))}function tr(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,qf(t),t=t.next;while(t!==l)}e.action=null}function qf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kf(e,t){return t}function Yf(e,t){if(re){var n=Ee.formState;if(n!==null){e:{var l=te;if(re){if(Ce){t:{for(var u=Ce,r=At;u.nodeType!==8;){if(!r){u=null;break t}if(u=Ct(u.nextSibling),u===null){u=null;break t}}r=u.data,u=r==="F!"||r==="F"?u:null}if(u){Ce=Ct(u.nextSibling),l=u.data==="F!";break e}}gn(l)}l=!1}l&&(t=n[0])}}return n=Pe(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kf,lastRenderedState:t},n.queue=l,n=ud.bind(null,te,l),l.dispatch=n,l=er(!1),r=sr.bind(null,te,!1,l.queue),l=Pe(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,n=Yy.bind(null,te,u,r,n),u.dispatch=n,l.memoizedState=e,[t,n,!1]}function Vf(e){var t=je();return Gf(t,ge,e)}function Gf(e,t,n){if(t=Is(e,t,kf)[0],e=Hi(It)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=_a(t)}catch(o){throw o===Ml?Ni:o}else l=t;t=je();var u=t.queue,r=u.dispatch;return n!==t.memoizedState&&(te.flags|=2048,Ul(9,{destroy:void 0},Vy.bind(null,u,n),null)),[l,r,e]}function Vy(e,t){e.action=t}function Xf(e){var t=je(),n=ge;if(n!==null)return Gf(t,n,e);je(),t=t.memoizedState,n=je();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Ul(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=te.updateQueue,t===null&&(t=Bi(),te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Qf(){return je().memoizedState}function qi(e,t,n,l){var u=Pe();te.flags|=e,u.memoizedState=Ul(1|t,{destroy:void 0},n,l===void 0?null:l)}function ki(e,t,n,l){var u=je();l=l===void 0?null:l;var r=u.memoizedState.inst;ge!==null&&l!==null&&Zs(l,ge.memoizedState.deps)?u.memoizedState=Ul(t,r,n,l):(te.flags|=e,u.memoizedState=Ul(1|t,r,n,l))}function Zf(e,t){qi(8390656,8,e,t)}function nr(e,t){ki(2048,8,e,t)}function Gy(e){te.flags|=4;var t=te.updateQueue;if(t===null)t=Bi(),te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Kf(e){var t=je().memoizedState;return Gy({ref:t,nextImpl:e}),function(){if((he&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Jf(e,t){return ki(4,2,e,t)}function $f(e,t){return ki(4,4,e,t)}function Ff(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wf(e,t,n){n=n!=null?n.concat([e]):null,ki(4,4,Ff.bind(null,t,e),n)}function lr(){}function If(e,t){var n=je();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Zs(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Pf(e,t){var n=je();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Zs(t,l[1]))return l[0];if(l=e(),nl){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l}function ar(e,t,n){return n===void 0||(Wt&1073741824)!==0&&(ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=eh(),te.lanes|=e,Rn|=e,n)}function ed(e,t,n,l){return ot(n,t)?n:Dl.current!==null?(e=ar(e,n,l),ot(e,t)||(He=!0),e):(Wt&42)===0||(Wt&1073741824)!==0&&(ue&261930)===0?(He=!0,e.memoizedState=n):(e=eh(),te.lanes|=e,Rn|=e,t)}function td(e,t,n,l,u){var r=G.p;G.p=r!==0&&8>r?r:8;var o=j.T,h={};j.T=h,sr(e,!1,t,n);try{var b=u(),O=j.S;if(O!==null&&O(h,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var w=Hy(b,l);Ea(e,t,w,yt(e))}else Ea(e,t,l,yt(e))}catch(L){Ea(e,t,{then:function(){},status:"rejected",reason:L},yt())}finally{G.p=r,o!==null&&h.types!==null&&(o.types=h.types),j.T=o}}function Xy(){}function ir(e,t,n,l){if(e.tag!==5)throw Error(c(476));var u=nd(e).queue;td(e,u,t,I,n===null?Xy:function(){return ld(e),n(l)})}function nd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ld(e){var t=nd(e);t.next===null&&(t=e.alternate.memoizedState),Ea(e,t.next.queue,{},yt())}function ur(){return Ke(ka)}function ad(){return je().memoizedState}function id(){return je().memoizedState}function Qy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yt();e=Sn(n);var l=_n(t,e,n);l!==null&&(ut(l,t,n),ga(l,t,n)),t={cache:Us()},e.payload=t;return}t=t.return}}function Zy(e,t,n){var l=yt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Yi(e)?sd(t,n):(n=As(e,t,n,l),n!==null&&(ut(n,e,l),rd(n,t,l)))}function ud(e,t,n){var l=yt();Ea(e,t,n,l)}function Ea(e,t,n,l){var u={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yi(e))sd(t,u);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var o=t.lastRenderedState,h=r(o,n);if(u.hasEagerState=!0,u.eagerState=h,ot(h,o))return Si(e,t,u,0),Ee===null&&xi(),!1}catch{}finally{}if(n=As(e,t,u,l),n!==null)return ut(n,e,l),rd(n,t,l),!0}return!1}function sr(e,t,n,l){if(l={lane:2,revertLane:qr(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Yi(e)){if(t)throw Error(c(479))}else t=As(e,n,l,2),t!==null&&ut(t,e,2)}function Yi(e){var t=e.alternate;return e===te||t!==null&&t===te}function sd(e,t){wl=ji=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rd(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,fo(e,n)}}var Aa={readContext:Ke,use:Li,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useLayoutEffect:Me,useInsertionEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useSyncExternalStore:Me,useId:Me,useHostTransitionStatus:Me,useFormState:Me,useActionState:Me,useOptimistic:Me,useMemoCache:Me,useCacheRefresh:Me};Aa.useEffectEvent=Me;var cd={readContext:Ke,use:Li,useCallback:function(e,t){return Pe().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:Zf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,qi(4194308,4,Ff.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qi(4194308,4,e,t)},useInsertionEffect:function(e,t){qi(4,2,e,t)},useMemo:function(e,t){var n=Pe();t=t===void 0?null:t;var l=e();if(nl){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Pe();if(n!==void 0){var u=n(t);if(nl){hn(!0);try{n(t)}finally{hn(!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=Zy.bind(null,te,e),[l.memoizedState,e]},useRef:function(e){var t=Pe();return e={current:e},t.memoizedState=e},useState:function(e){e=er(e);var t=e.queue,n=ud.bind(null,te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:lr,useDeferredValue:function(e,t){var n=Pe();return ar(n,e,t)},useTransition:function(){var e=er(!1);return e=td.bind(null,te,e.queue,!0,!1),Pe().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=te,u=Pe();if(re){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ee===null)throw Error(c(349));(ue&127)!==0||Mf(l,t,n)}u.memoizedState=n;var r={value:n,getSnapshot:t};return u.queue=r,Zf(Df.bind(null,l,r,e),[e]),l.flags|=2048,Ul(9,{destroy:void 0},zf.bind(null,l,r,n,t),null),n},useId:function(){var e=Pe(),t=Ee.identifierPrefix;if(re){var n=Lt,l=Bt;n=(l&~(1<<32-ct(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ui++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=qy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ur,useFormState:Yf,useActionState:Yf,useOptimistic:function(e){var t=Pe();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=sr.bind(null,te,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ws,useCacheRefresh:function(){return Pe().memoizedState=Qy.bind(null,te)},useEffectEvent:function(e){var t=Pe(),n={impl:e};return t.memoizedState=n,function(){if((he&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},rr={readContext:Ke,use:Li,useCallback:If,useContext:Ke,useEffect:nr,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:$f,useMemo:Pf,useReducer:Hi,useRef:Qf,useState:function(){return Hi(It)},useDebugValue:lr,useDeferredValue:function(e,t){var n=je();return ed(n,ge.memoizedState,e,t)},useTransition:function(){var e=Hi(It)[0],t=je().memoizedState;return[typeof e=="boolean"?e:_a(e),t]},useSyncExternalStore:Of,useId:ad,useHostTransitionStatus:ur,useFormState:Vf,useActionState:Vf,useOptimistic:function(e,t){var n=je();return Uf(n,ge,e,t)},useMemoCache:Ws,useCacheRefresh:id};rr.useEffectEvent=Kf;var od={readContext:Ke,use:Li,useCallback:If,useContext:Ke,useEffect:nr,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:$f,useMemo:Pf,useReducer:Ps,useRef:Qf,useState:function(){return Ps(It)},useDebugValue:lr,useDeferredValue:function(e,t){var n=je();return ge===null?ar(n,e,t):ed(n,ge.memoizedState,e,t)},useTransition:function(){var e=Ps(It)[0],t=je().memoizedState;return[typeof e=="boolean"?e:_a(e),t]},useSyncExternalStore:Of,useId:ad,useHostTransitionStatus:ur,useFormState:Xf,useActionState:Xf,useOptimistic:function(e,t){var n=je();return ge!==null?Uf(n,ge,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ws,useCacheRefresh:id};od.useEffectEvent=Kf;function cr(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var or={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=yt(),u=Sn(l);u.payload=t,n!=null&&(u.callback=n),t=_n(e,u,l),t!==null&&(ut(t,e,l),ga(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=yt(),u=Sn(l);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=_n(e,u,l),t!==null&&(ut(t,e,l),ga(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),l=Sn(n);l.tag=2,t!=null&&(l.callback=t),t=_n(e,l,n),t!==null&&(ut(t,e,n),ga(t,e,n))}};function fd(e,t,n,l,u,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,r,o):t.prototype&&t.prototype.isPureReactComponent?!oa(n,l)||!oa(u,r):!0}function dd(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&or.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=S({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function hd(e){bi(e)}function md(e){console.error(e)}function pd(e){bi(e)}function Vi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function yd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function fr(e,t,n){return n=Sn(n),n.tag=3,n.payload={element:null},n.callback=function(){Vi(e,t)},n}function vd(e){return e=Sn(e),e.tag=3,e}function gd(e,t,n,l){var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var r=l.value;e.payload=function(){return u(r)},e.callback=function(){yd(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){yd(t,n,l),typeof u!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Ky(e,t,n,l,u){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Rl(t,n,u,!0),n=dt.current,n!==null){switch(n.tag){case 31:case 13:return Tt===null?eu():n.alternate===null&&ze===0&&(ze=3),n.flags&=-257,n.flags|=65536,n.lanes=u,l===Oi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Br(e,l,u)),!1;case 22:return n.flags|=65536,l===Oi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Br(e,l,u)),!1}throw Error(c(435,n.tag))}return Br(e,l,u),eu(),!1}if(re)return t=dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,l!==Ms&&(e=Error(c(422),{cause:l}),ha(St(e,n)))):(l!==Ms&&(t=Error(c(423),{cause:l}),ha(St(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=St(l,n),u=fr(e.stateNode,l,u),Ys(e,u),ze!==4&&(ze=2)),!1;var r=Error(c(520),{cause:l});if(r=St(r,n),Da===null?Da=[r]:Da.push(r),ze!==4&&(ze=2),t===null)return!0;l=St(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=fr(n.stateNode,l,e),Ys(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"&&(Nn===null||!Nn.has(r))))return n.flags|=65536,u&=-u,n.lanes|=u,u=vd(u),gd(u,e,n,l),Ys(n,u),!1}n=n.return}while(n!==null);return!1}var dr=Error(c(461)),He=!1;function Je(e,t,n,l){t.child=e===null?_f(t,null,n,l):tl(t,e.child,n,l)}function bd(e,t,n,l,u){n=n.render;var r=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return Wn(t),l=Ks(e,t,n,o,r,u),h=Js(),e!==null&&!He?($s(e,t,u),Pt(e,t,u)):(re&&h&&Ns(t),t.flags|=1,Je(e,t,l,u),t.child)}function xd(e,t,n,l,u){if(e===null){var r=n.type;return typeof r=="function"&&!Ts(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,Sd(e,t,r,l,u)):(e=Ei(n.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!xr(e,u)){var o=r.memoizedProps;if(n=n.compare,n=n!==null?n:oa,n(o,l)&&e.ref===t.ref)return Pt(e,t,u)}return t.flags|=1,e=Kt(r,l),e.ref=t.ref,e.return=t,t.child=e}function Sd(e,t,n,l,u){if(e!==null){var r=e.memoizedProps;if(oa(r,l)&&e.ref===t.ref)if(He=!1,t.pendingProps=l=r,xr(e,u))(e.flags&131072)!==0&&(He=!0);else return t.lanes=e.lanes,Pt(e,t,u)}return hr(e,t,n,l,u)}function _d(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 Ed(e,t,r,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ri(t,r!==null?r.cachePool:null),r!==null?Tf(t,r):Gs(),Cf(t);else return l=t.lanes=536870912,Ed(e,t,r!==null?r.baseLanes|n:n,n,l)}else r!==null?(Ri(t,r.cachePool),Tf(t,r),An(),t.memoizedState=null):(e!==null&&Ri(t,null),Gs(),An());return Je(e,t,u,n),t.child}function Ta(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ed(e,t,n,l,u){var r=Ls();return r=r===null?null:{parent:Be._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&Ri(t,null),Gs(),Cf(t),e!==null&&Rl(e,t,l,!0),t.childLanes=u,null}function Gi(e,t){return t=Qi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ad(e,t,n){return tl(t,e.child,null,n),e=Gi(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function Jy(e,t,n){var l=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(re){if(l.mode==="hidden")return e=Gi(t,l),t.lanes=536870912,Ta(null,e);if(Qs(t),(e=Ce)?(e=Bh(e,At),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Bt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=sf(e),n.return=t,t.child=n,Ze=t,Ce=null)):e=null,e===null)throw gn(t);return t.lanes=536870912,null}return Gi(t,l)}var r=e.memoizedState;if(r!==null){var o=r.dehydrated;if(Qs(t),u)if(t.flags&256)t.flags&=-257,t=Ad(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(He||Rl(e,t,n,!1),u=(n&e.childLanes)!==0,He||u){if(l=Ee,l!==null&&(o=ho(l,n),o!==0&&o!==r.retryLane))throw r.retryLane=o,Kn(e,o),ut(l,e,o),dr;eu(),t=Ad(e,t,n)}else e=r.treeContext,Ce=Ct(o.nextSibling),Ze=t,re=!0,vn=null,At=!1,e!==null&&of(t,e),t=Gi(t,l),t.flags|=4096;return t}return e=Kt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xi(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 hr(e,t,n,l,u){return Wn(t),n=Ks(e,t,n,l,void 0,u),l=Js(),e!==null&&!He?($s(e,t,u),Pt(e,t,u)):(re&&l&&Ns(t),t.flags|=1,Je(e,t,n,u),t.child)}function Td(e,t,n,l,u,r){return Wn(t),t.updateQueue=null,n=Nf(t,l,n,u),Rf(e),l=Js(),e!==null&&!He?($s(e,t,r),Pt(e,t,r)):(re&&l&&Ns(t),t.flags|=1,Je(e,t,n,r),t.child)}function Cd(e,t,n,l,u){if(Wn(t),t.stateNode===null){var r=El,o=n.contextType;typeof o=="object"&&o!==null&&(r=Ke(o)),r=new n(l,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=or,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=l,r.state=t.memoizedState,r.refs={},qs(t),o=n.contextType,r.context=typeof o=="object"&&o!==null?Ke(o):El,r.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(cr(t,n,o,l),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(o=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),o!==r.state&&or.enqueueReplaceState(r,r.state,null),xa(t,l,r,u),ba(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){r=t.stateNode;var h=t.memoizedProps,b=ll(n,h);r.props=b;var O=r.context,w=n.contextType;o=El,typeof w=="object"&&w!==null&&(o=Ke(w));var L=n.getDerivedStateFromProps;w=typeof L=="function"||typeof r.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,w||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(h||O!==o)&&dd(t,r,l,o),xn=!1;var M=t.memoizedState;r.state=M,xa(t,l,r,u),ba(),O=t.memoizedState,h||M!==O||xn?(typeof L=="function"&&(cr(t,n,L,l),O=t.memoizedState),(b=xn||fd(t,n,b,l,M,O,o))?(w||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=O),r.props=l,r.state=O,r.context=o,l=b):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{r=t.stateNode,ks(e,t),o=t.memoizedProps,w=ll(n,o),r.props=w,L=t.pendingProps,M=r.context,O=n.contextType,b=El,typeof O=="object"&&O!==null&&(b=Ke(O)),h=n.getDerivedStateFromProps,(O=typeof h=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o!==L||M!==b)&&dd(t,r,l,b),xn=!1,M=t.memoizedState,r.state=M,xa(t,l,r,u),ba();var z=t.memoizedState;o!==L||M!==z||xn||e!==null&&e.dependencies!==null&&Ti(e.dependencies)?(typeof h=="function"&&(cr(t,n,h,l),z=t.memoizedState),(w=xn||fd(t,n,w,l,M,z,b)||e!==null&&e.dependencies!==null&&Ti(e.dependencies))?(O||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,z,b),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,z,b)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=z),r.props=l,r.state=z,r.context=b,l=w):(typeof r.componentDidUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),l=!1)}return r=l,Xi(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)):Je(e,t,n,u),t.memoizedState=r.state,e=t.child):e=Pt(e,t,u),e}function Rd(e,t,n,l){return $n(),t.flags|=256,Je(e,t,n,l),t.child}var mr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pr(e){return{baseLanes:e,cachePool:yf()}}function yr(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pt),e}function Nd(e,t,n){var l=t.pendingProps,u=!1,r=(t.flags&128)!==0,o;if((o=r)||(o=e!==null&&e.memoizedState===null?!1:(we.current&2)!==0),o&&(u=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(re){if(u?En(t):An(),(e=Ce)?(e=Bh(e,At),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Bt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=sf(e),n.return=t,t.child=n,Ze=t,Ce=null)):e=null,e===null)throw gn(t);return Ir(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,u?(An(),u=t.mode,h=Qi({mode:"hidden",children:h},u),l=Jn(l,u,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=pr(n),l.childLanes=yr(e,o,n),t.memoizedState=mr,Ta(null,l)):(En(t),vr(t,h))}var b=e.memoizedState;if(b!==null&&(h=b.dehydrated,h!==null)){if(r)t.flags&256?(En(t),t.flags&=-257,t=gr(e,t,n)):t.memoizedState!==null?(An(),t.child=e.child,t.flags|=128,t=null):(An(),h=l.fallback,u=t.mode,l=Qi({mode:"visible",children:l.children},u),h=Jn(h,u,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,tl(t,e.child,null,n),l=t.child,l.memoizedState=pr(n),l.childLanes=yr(e,o,n),t.memoizedState=mr,t=Ta(null,l));else if(En(t),Ir(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var O=o.dgst;o=O,l=Error(c(419)),l.stack="",l.digest=o,ha({value:l,source:null,stack:null}),t=gr(e,t,n)}else if(He||Rl(e,t,n,!1),o=(n&e.childLanes)!==0,He||o){if(o=Ee,o!==null&&(l=ho(o,n),l!==0&&l!==b.retryLane))throw b.retryLane=l,Kn(e,l),ut(o,e,l),dr;Wr(h)||eu(),t=gr(e,t,n)}else Wr(h)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ce=Ct(h.nextSibling),Ze=t,re=!0,vn=null,At=!1,e!==null&&of(t,e),t=vr(t,l.children),t.flags|=4096);return t}return u?(An(),h=l.fallback,u=t.mode,b=e.child,O=b.sibling,l=Kt(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,O!==null?h=Kt(O,h):(h=Jn(h,u,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,Ta(null,l),l=t.child,h=e.child.memoizedState,h===null?h=pr(n):(u=h.cachePool,u!==null?(b=Be._currentValue,u=u.parent!==b?{parent:b,pool:b}:u):u=yf(),h={baseLanes:h.baseLanes|n,cachePool:u}),l.memoizedState=h,l.childLanes=yr(e,o,n),t.memoizedState=mr,Ta(e.child,l)):(En(t),n=e.child,e=n.sibling,n=Kt(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function vr(e,t){return t=Qi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Qi(e,t){return e=ft(22,e,null,t),e.lanes=0,e}function gr(e,t,n){return tl(t,e.child,null,n),e=vr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Od(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ws(e.return,t,n)}function br(e,t,n,l,u,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:u,treeForkCount:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=u,o.treeForkCount=r)}function Md(e,t,n){var l=t.pendingProps,u=l.revealOrder,r=l.tail;l=l.children;var o=we.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,X(we,o),Je(e,t,l,n),l=re?da:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Od(e,n,t);else if(e.tag===19)Od(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&&wi(e)===null&&(u=n),n=n.sibling;n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),br(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&&wi(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}br(t,!0,n,null,r,l);break;case"together":br(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Pt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Rn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Rl(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=Kt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ti(e)))}function $y(e,t,n){switch(t.tag){case 3:Ie(t,t.stateNode.containerInfo),bn(t,Be,e.memoizedState.cache),$n();break;case 27:case 5:Wl(t);break;case 4:Ie(t,t.stateNode.containerInfo);break;case 10:bn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qs(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(En(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Nd(e,t,n):(En(t),e=Pt(e,t,n),e!==null?e.sibling:null);En(t);break;case 19:var u=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Rl(e,t,n,!1),l=(n&t.childLanes)!==0),u){if(l)return Md(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),X(we,we.current),l)break;return null;case 22:return t.lanes=0,_d(e,t,n,t.pendingProps);case 24:bn(t,Be,e.memoizedState.cache)}return Pt(e,t,n)}function zd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)He=!0;else{if(!xr(e,n)&&(t.flags&128)===0)return He=!1,$y(e,t,n);He=(e.flags&131072)!==0}else He=!1,re&&(t.flags&1048576)!==0&&cf(t,da,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")Ts(e)?(l=ll(e,l),t.tag=1,t=Cd(null,t,e,l,n)):(t.tag=0,t=hr(null,t,e,l,n));else{if(e!=null){var u=e.$$typeof;if(u===J){t.tag=11,t=bd(null,t,e,l,n);break e}else if(u===F){t.tag=14,t=xd(null,t,e,l,n);break e}}throw t=Gt(e)||e,Error(c(306,t,""))}}return t;case 0:return hr(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,u=ll(l,t.pendingProps),Cd(e,t,l,u,n);case 3:e:{if(Ie(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var r=t.memoizedState;u=r.element,ks(e,t),xa(t,l,null,n);var o=t.memoizedState;if(l=o.cache,bn(t,Be,l),l!==r.cache&&js(t,[Be],n,!0),ba(),l=o.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Rd(e,t,l,n);break e}else if(l!==u){u=St(Error(c(424)),t),ha(u),t=Rd(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(Ce=Ct(e.firstChild),Ze=t,re=!0,vn=null,At=!0,n=_f(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if($n(),l===u){t=Pt(e,t,n);break e}Je(e,t,l,n)}t=t.child}return t;case 26:return Xi(e,t),e===null?(n=Vh(t.type,null,t.pendingProps,null))?t.memoizedState=n:re||(n=t.type,e=t.pendingProps,l=su(le.current).createElement(n),l[Qe]=t,l[et]=e,$e(l,n,e),Ge(l),t.stateNode=l):t.memoizedState=Vh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Wl(t),e===null&&re&&(l=t.stateNode=qh(t.type,t.pendingProps,le.current),Ze=t,At=!0,u=Ce,Dn(t.type)?(Pr=u,Ce=Ct(l.firstChild)):Ce=u),Je(e,t,t.pendingProps.children,n),Xi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&re&&((u=l=Ce)&&(l=T0(l,t.type,t.pendingProps,At),l!==null?(t.stateNode=l,Ze=t,Ce=Ct(l.firstChild),At=!1,u=!0):u=!1),u||gn(t)),Wl(t),u=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,l=r.children,Jr(u,r)?l=null:o!==null&&Jr(u,o)&&(t.flags|=32),t.memoizedState!==null&&(u=Ks(e,t,ky,null,null,n),ka._currentValue=u),Xi(e,t),Je(e,t,l,n),t.child;case 6:return e===null&&re&&((e=n=Ce)&&(n=C0(n,t.pendingProps,At),n!==null?(t.stateNode=n,Ze=t,Ce=null,e=!0):e=!1),e||gn(t)),null;case 13:return Nd(e,t,n);case 4:return Ie(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=tl(t,null,l,n):Je(e,t,l,n),t.child;case 11:return bd(e,t,t.type,t.pendingProps,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,bn(t,t.type,l.value),Je(e,t,l.children,n),t.child;case 9:return u=t.type._context,l=t.pendingProps.children,Wn(t),u=Ke(u),l=l(u),t.flags|=1,Je(e,t,l,n),t.child;case 14:return xd(e,t,t.type,t.pendingProps,n);case 15:return Sd(e,t,t.type,t.pendingProps,n);case 19:return Md(e,t,n);case 31:return Jy(e,t,n);case 22:return _d(e,t,n,t.pendingProps);case 24:return Wn(t),l=Ke(Be),e===null?(u=Ls(),u===null&&(u=Ee,r=Us(),u.pooledCache=r,r.refCount++,r!==null&&(u.pooledCacheLanes|=n),u=r),t.memoizedState={parent:l,cache:u},qs(t),bn(t,Be,u)):((e.lanes&n)!==0&&(ks(e,t),xa(t,null,null,n),ba()),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),bn(t,Be,l)):(l=r.cache,bn(t,Be,l),l!==u.cache&&js(t,[Be],n,!0))),Je(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function en(e){e.flags|=4}function Sr(e,t,n,l,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(ah())e.flags|=8192;else throw el=Oi,Hs}else e.flags&=-16777217}function Dd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Kh(t))if(ah())e.flags|=8192;else throw el=Oi,Hs}function Zi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?co():536870912,e.lanes|=t,ql|=t)}function Ca(e,t){if(!re)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var u=e.child;u!==null;)n|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)n|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Fy(e,t,n){var l=t.pendingProps;switch(Os(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Re(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ft(Be),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Cl(t)?en(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zs())),Re(t),null;case 26:var u=t.type,r=t.memoizedState;return e===null?(en(t),r!==null?(Re(t),Dd(t,r)):(Re(t),Sr(t,u,null,l,n))):r?r!==e.memoizedState?(en(t),Re(t),Dd(t,r)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&en(t),Re(t),Sr(t,u,e,l,n)),null;case 27:if(li(t),n=le.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}e=Z.current,Cl(t)?ff(t):(e=qh(u,l,n),t.stateNode=e,en(t))}return Re(t),null;case 5:if(li(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}if(r=Z.current,Cl(t))ff(t);else{var o=su(le.current);switch(r){case 1:r=o.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:r=o.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":r=o.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":r=o.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":r=o.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?r.multiple=!0:l.size&&(r.size=l.size);break;default:r=typeof l.is=="string"?o.createElement(u,{is:l.is}):o.createElement(u)}}r[Qe]=t,r[et]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=r;e:switch($e(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&&en(t)}}return Re(t),Sr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=le.current,Cl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,u=Ze,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Nh(e.nodeValue,n)),e||gn(t,!0)}else e=su(e).createTextNode(l),e[Qe]=t,t.stateNode=e}return Re(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Cl(t),n!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Qe]=t}else $n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else n=zs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ht(t),t):(ht(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Re(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Cl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[Qe]=t}else $n(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),u=!1}else u=zs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(ht(t),t):(ht(t),null)}return ht(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),Zi(t,t.updateQueue),Re(t),null);case 4:return De(),e===null&&Gr(t.stateNode.containerInfo),Re(t),null;case 10:return Ft(t.type),Re(t),null;case 19:if(q(we),l=t.memoizedState,l===null)return Re(t),null;if(u=(t.flags&128)!==0,r=l.rendering,r===null)if(u)Ca(l,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=wi(e),r!==null){for(t.flags|=128,Ca(l,!1),e=r.updateQueue,t.updateQueue=e,Zi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)uf(n,e),n=n.sibling;return X(we,we.current&1|2),re&&Jt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&st()>Wi&&(t.flags|=128,u=!0,Ca(l,!1),t.lanes=4194304)}else{if(!u)if(e=wi(r),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Zi(t,e),Ca(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!re)return Re(t),null}else 2*st()-l.renderingStartTime>Wi&&n!==536870912&&(t.flags|=128,u=!0,Ca(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=st(),e.sibling=null,n=we.current,X(we,u?n&1|2:n&1),re&&Jt(t,l.treeForkCount),e):(Re(t),null);case 22:case 23:return ht(t),Xs(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),n=t.updateQueue,n!==null&&Zi(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&&q(In),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ft(Be),Re(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Wy(e,t){switch(Os(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ft(Be),De(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return li(t),null;case 31:if(t.memoizedState!==null){if(ht(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(ht(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 q(we),null;case 4:return De(),null;case 10:return Ft(t.type),null;case 22:case 23:return ht(t),Xs(),e!==null&&q(In),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ft(Be),null;case 25:return null;default:return null}}function wd(e,t){switch(Os(t),t.tag){case 3:Ft(Be),De();break;case 26:case 27:case 5:li(t);break;case 4:De();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:q(we);break;case 10:Ft(t.type);break;case 22:case 23:ht(t),Xs(),e!==null&&q(In);break;case 24:Ft(Be)}}function Ra(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var u=l.next;n=u;do{if((n.tag&e)===e){l=void 0;var r=n.create,o=n.inst;l=r(),o.destroy=l}n=n.next}while(n!==u)}}catch(h){ye(t,t.return,h)}}function Tn(e,t,n){try{var l=t.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var r=u.next;l=r;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,u=t;var b=n,O=h;try{O()}catch(w){ye(u,b,w)}}}l=l.next}while(l!==r)}}catch(w){ye(t,t.return,w)}}function jd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Af(t,n)}catch(l){ye(e,e.return,l)}}}function Ud(e,t,n){n.props=ll(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){ye(e,t,l)}}function Na(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){ye(e,t,u)}}function Ht(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(u){ye(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){ye(e,t,u)}else n.current=null}function Bd(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){ye(e,e.return,u)}}function _r(e,t,n){try{var l=e.stateNode;b0(l,e.type,n,t),l[et]=t}catch(u){ye(e,e.return,u)}}function Ld(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dn(e.type)||e.tag===4}function Er(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ld(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&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 Ar(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=Qt));else if(l!==4&&(l===27&&Dn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ar(e,t,n),e=e.sibling;e!==null;)Ar(e,t,n),e=e.sibling}function Ki(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(Ki(e,t,n),e=e.sibling;e!==null;)Ki(e,t,n),e=e.sibling}function Hd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);$e(t,l,n),t[Qe]=e,t[et]=n}catch(r){ye(e,e.return,r)}}var tn=!1,qe=!1,Tr=!1,qd=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function Iy(e,t){if(e=e.containerInfo,Zr=mu,e=Fo(e),gs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var u=l.anchorOffset,r=l.focusNode;l=l.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break e}var o=0,h=-1,b=-1,O=0,w=0,L=e,M=null;t:for(;;){for(var z;L!==n||u!==0&&L.nodeType!==3||(h=o+u),L!==r||l!==0&&L.nodeType!==3||(b=o+l),L.nodeType===3&&(o+=L.nodeValue.length),(z=L.firstChild)!==null;)M=L,L=z;for(;;){if(L===e)break t;if(M===n&&++O===u&&(h=o),M===r&&++w===l&&(b=o),(z=L.nextSibling)!==null)break;L=M,M=L.parentNode}L=z}n=h===-1||b===-1?null:{start:h,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kr={focusedElem:e,selectionRange:n},mu=!1,Xe=t;Xe!==null;)if(t=Xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xe=e;else for(;Xe!==null;){switch(t=Xe,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 Q=ll(n.type,u);e=l.getSnapshotBeforeUpdate(Q,r),l.__reactInternalSnapshotBeforeUpdate=e}catch(W){ye(n,n.return,W)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Fr(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fr(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,Xe=e;break}Xe=t.return}}function kd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:ln(e,n),l&4&&Ra(5,n);break;case 1:if(ln(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){ye(n,n.return,o)}else{var u=ll(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){ye(n,n.return,o)}}l&64&&jd(n),l&512&&Na(n,n.return);break;case 3:if(ln(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{Af(e,t)}catch(o){ye(n,n.return,o)}}break;case 27:t===null&&l&4&&Hd(n);case 26:case 5:ln(e,n),t===null&&l&4&&Bd(n),l&512&&Na(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),l&4&&Gd(e,n);break;case 13:ln(e,n),l&4&&Xd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=s0.bind(null,n),R0(e,n))));break;case 22:if(l=n.memoizedState!==null||tn,!l){t=t!==null&&t.memoizedState!==null||qe,u=tn;var r=qe;tn=l,(qe=t)&&!r?an(e,n,(n.subtreeFlags&8772)!==0):ln(e,n),tn=u,qe=r}break;case 30:break;default:ln(e,n)}}function Yd(e){var t=e.alternate;t!==null&&(e.alternate=null,Yd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ts(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 Ne=null,nt=!1;function nn(e,t,n){for(n=n.child;n!==null;)Vd(e,t,n),n=n.sibling}function Vd(e,t,n){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(Il,n)}catch{}switch(n.tag){case 26:qe||Ht(n,t),nn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qe||Ht(n,t);var l=Ne,u=nt;Dn(n.type)&&(Ne=n.stateNode,nt=!1),nn(e,t,n),La(n.stateNode),Ne=l,nt=u;break;case 5:qe||Ht(n,t);case 6:if(l=Ne,u=nt,Ne=null,nn(e,t,n),Ne=l,nt=u,Ne!==null)if(nt)try{(Ne.nodeType===9?Ne.body:Ne.nodeName==="HTML"?Ne.ownerDocument.body:Ne).removeChild(n.stateNode)}catch(r){ye(n,t,r)}else try{Ne.removeChild(n.stateNode)}catch(r){ye(n,t,r)}break;case 18:Ne!==null&&(nt?(e=Ne,jh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Kl(e)):jh(Ne,n.stateNode));break;case 4:l=Ne,u=nt,Ne=n.stateNode.containerInfo,nt=!0,nn(e,t,n),Ne=l,nt=u;break;case 0:case 11:case 14:case 15:Tn(2,n,t),qe||Tn(4,n,t),nn(e,t,n);break;case 1:qe||(Ht(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Ud(n,t,l)),nn(e,t,n);break;case 21:nn(e,t,n);break;case 22:qe=(l=qe)||n.memoizedState!==null,nn(e,t,n),qe=l;break;default:nn(e,t,n)}}function Gd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kl(e)}catch(n){ye(t,t.return,n)}}}function Xd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kl(e)}catch(n){ye(t,t.return,n)}}function Py(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qd),t;default:throw Error(c(435,e.tag))}}function Ji(e,t){var n=Py(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var u=r0.bind(null,e,l);l.then(u,u)}})}function lt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var u=n[l],r=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Dn(h.type)){Ne=h.stateNode,nt=!1;break e}break;case 5:Ne=h.stateNode,nt=!1;break e;case 3:case 4:Ne=h.stateNode.containerInfo,nt=!0;break e}h=h.return}if(Ne===null)throw Error(c(160));Vd(r,o,u),Ne=null,nt=!1,r=u.alternate,r!==null&&(r.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qd(t,e),t=t.sibling}var zt=null;function Qd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:lt(t,e),at(e),l&4&&(Tn(3,e,e.return),Ra(3,e),Tn(5,e,e.return));break;case 1:lt(t,e),at(e),l&512&&(qe||n===null||Ht(n,n.return)),l&64&&tn&&(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=zt;if(lt(t,e),at(e),l&512&&(qe||n===null||Ht(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[ta]||r[Qe]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=u.createElement(l),u.head.insertBefore(r,u.querySelector("head > title"))),$e(r,l,n),r[Qe]=e,Ge(r),l=r;break e;case"link":var o=Qh("link","href",u).get(l+(n.href||""));if(o){for(var h=0;h<o.length;h++)if(r=o[h],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(h,1);break t}}r=u.createElement(l),$e(r,l,n),u.head.appendChild(r);break;case"meta":if(o=Qh("meta","content",u).get(l+(n.content||""))){for(h=0;h<o.length;h++)if(r=o[h],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(h,1);break t}}r=u.createElement(l),$e(r,l,n),u.head.appendChild(r);break;default:throw Error(c(468,l))}r[Qe]=e,Ge(r),l=r}e.stateNode=l}else Zh(u,e.type,e.stateNode);else e.stateNode=Xh(u,l,e.memoizedProps);else r!==l?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,l===null?Zh(u,e.type,e.stateNode):Xh(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&_r(e,e.memoizedProps,n.memoizedProps)}break;case 27:lt(t,e),at(e),l&512&&(qe||n===null||Ht(n,n.return)),n!==null&&l&4&&_r(e,e.memoizedProps,n.memoizedProps);break;case 5:if(lt(t,e),at(e),l&512&&(qe||n===null||Ht(n,n.return)),e.flags&32){u=e.stateNode;try{yl(u,"")}catch(Q){ye(e,e.return,Q)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,_r(e,u,n!==null?n.memoizedProps:u)),l&1024&&(Tr=!0);break;case 6:if(lt(t,e),at(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(Q){ye(e,e.return,Q)}}break;case 3:if(ou=null,u=zt,zt=ru(t.containerInfo),lt(t,e),zt=u,at(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Kl(t.containerInfo)}catch(Q){ye(e,e.return,Q)}Tr&&(Tr=!1,Zd(e));break;case 4:l=zt,zt=ru(e.stateNode.containerInfo),lt(t,e),at(e),zt=l;break;case 12:lt(t,e),at(e);break;case 31:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ji(e,l)));break;case 13:lt(t,e),at(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Fi=st()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ji(e,l)));break;case 22:u=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,O=tn,w=qe;if(tn=O||u,qe=w||b,lt(t,e),qe=w,tn=O,at(e),l&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||b||tn||qe||al(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(r=b.stateNode,u)o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=b.stateNode;var L=b.memoizedProps.style,M=L!=null&&L.hasOwnProperty("display")?L.display:null;h.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(Q){ye(b,b.return,Q)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=u?"":b.memoizedProps}catch(Q){ye(b,b.return,Q)}}}else if(t.tag===18){if(n===null){b=t;try{var z=b.stateNode;u?Uh(z,!0):Uh(b.stateNode,!1)}catch(Q){ye(b,b.return,Q)}}}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,Ji(e,n))));break;case 19:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ji(e,l)));break;case 30:break;case 21:break;default:lt(t,e),at(e)}}function at(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Ld(l)){n=l;break}l=l.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var u=n.stateNode,r=Er(e);Ki(e,r,u);break;case 5:var o=n.stateNode;n.flags&32&&(yl(o,""),n.flags&=-33);var h=Er(e);Ki(e,h,o);break;case 3:case 4:var b=n.stateNode.containerInfo,O=Er(e);Ar(e,O,b);break;default:throw Error(c(161))}}catch(w){ye(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Zd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)kd(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:Tn(4,t,t.return),al(t);break;case 1:Ht(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Ud(t,t.return,n),al(t);break;case 27:La(t.stateNode);case 26:case 5:Ht(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 an(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,u=e,r=t,o=r.flags;switch(r.tag){case 0:case 11:case 15:an(u,r,n),Ra(4,r);break;case 1:if(an(u,r,n),l=r,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(O){ye(l,l.return,O)}if(l=r,u=l.updateQueue,u!==null){var h=l.stateNode;try{var b=u.shared.hiddenCallbacks;if(b!==null)for(u.shared.hiddenCallbacks=null,u=0;u<b.length;u++)Ef(b[u],h)}catch(O){ye(l,l.return,O)}}n&&o&64&&jd(r),Na(r,r.return);break;case 27:Hd(r);case 26:case 5:an(u,r,n),n&&l===null&&o&4&&Bd(r),Na(r,r.return);break;case 12:an(u,r,n);break;case 31:an(u,r,n),n&&o&4&&Gd(u,r);break;case 13:an(u,r,n),n&&o&4&&Xd(u,r);break;case 22:r.memoizedState===null&&an(u,r,n),Na(r,r.return);break;case 30:break;default:an(u,r,n)}t=t.sibling}}function Cr(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&&ma(n))}function Rr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e))}function Dt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kd(e,t,n,l),t=t.sibling}function Kd(e,t,n,l){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Dt(e,t,n,l),u&2048&&Ra(9,t);break;case 1:Dt(e,t,n,l);break;case 3:Dt(e,t,n,l),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e)));break;case 12:if(u&2048){Dt(e,t,n,l),e=t.stateNode;try{var r=t.memoizedProps,o=r.id,h=r.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){ye(t,t.return,b)}}else Dt(e,t,n,l);break;case 31:Dt(e,t,n,l);break;case 13:Dt(e,t,n,l);break;case 23:break;case 22:r=t.stateNode,o=t.alternate,t.memoizedState!==null?r._visibility&2?Dt(e,t,n,l):Oa(e,t):r._visibility&2?Dt(e,t,n,l):(r._visibility|=2,Bl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Cr(o,t);break;case 24:Dt(e,t,n,l),u&2048&&Rr(t.alternate,t);break;default:Dt(e,t,n,l)}}function Bl(e,t,n,l,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,o=t,h=n,b=l,O=o.flags;switch(o.tag){case 0:case 11:case 15:Bl(r,o,h,b,u),Ra(8,o);break;case 23:break;case 22:var w=o.stateNode;o.memoizedState!==null?w._visibility&2?Bl(r,o,h,b,u):Oa(r,o):(w._visibility|=2,Bl(r,o,h,b,u)),u&&O&2048&&Cr(o.alternate,o);break;case 24:Bl(r,o,h,b,u),u&&O&2048&&Rr(o.alternate,o);break;default:Bl(r,o,h,b,u)}t=t.sibling}}function Oa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,u=l.flags;switch(l.tag){case 22:Oa(n,l),u&2048&&Cr(l.alternate,l);break;case 24:Oa(n,l),u&2048&&Rr(l.alternate,l);break;default:Oa(n,l)}t=t.sibling}}var Ma=8192;function Ll(e,t,n){if(e.subtreeFlags&Ma)for(e=e.child;e!==null;)Jd(e,t,n),e=e.sibling}function Jd(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Ma&&e.memoizedState!==null&&q0(n,zt,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var l=zt;zt=ru(e.stateNode.containerInfo),Ll(e,t,n),zt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ma,Ma=16777216,Ll(e,t,n),Ma=l):Ll(e,t,n));break;default:Ll(e,t,n)}}function $d(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function za(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];Xe=l,Wd(l,e)}$d(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fd(e),e=e.sibling}function Fd(e){switch(e.tag){case 0:case 11:case 15:za(e),e.flags&2048&&Tn(9,e,e.return);break;case 3:za(e);break;case 12:za(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,$i(e)):za(e);break;default:za(e)}}function $i(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];Xe=l,Wd(l,e)}$d(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tn(8,t,t.return),$i(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,$i(t));break;default:$i(t)}e=e.sibling}}function Wd(e,t){for(;Xe!==null;){var n=Xe;switch(n.tag){case 0:case 11:case 15:Tn(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:ma(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Xe=l;else e:for(n=e;Xe!==null;){l=Xe;var u=l.sibling,r=l.return;if(Yd(l),l===n){Xe=null;break e}if(u!==null){u.return=r,Xe=u;break e}Xe=r}}}var e0={getCacheForType:function(e){var t=Ke(Be),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ke(Be).controller.signal}},t0=typeof WeakMap=="function"?WeakMap:Map,he=0,Ee=null,ae=null,ue=0,pe=0,mt=null,Cn=!1,Hl=!1,Nr=!1,un=0,ze=0,Rn=0,il=0,Or=0,pt=0,ql=0,Da=null,it=null,Mr=!1,Fi=0,Id=0,Wi=1/0,Ii=null,Nn=null,Ye=0,On=null,kl=null,sn=0,zr=0,Dr=null,Pd=null,wa=0,wr=null;function yt(){return(he&2)!==0&&ue!==0?ue&-ue:j.T!==null?qr():mo()}function eh(){if(pt===0)if((ue&536870912)===0||re){var e=ui;ui<<=1,(ui&3932160)===0&&(ui=262144),pt=e}else pt=536870912;return e=dt.current,e!==null&&(e.flags|=32),pt}function ut(e,t,n){(e===Ee&&(pe===2||pe===9)||e.cancelPendingCommit!==null)&&(Yl(e,0),Mn(e,ue,pt,!1)),ea(e,n),((he&2)===0||e!==Ee)&&(e===Ee&&((he&2)===0&&(il|=n),ze===4&&Mn(e,ue,pt,!1)),qt(e))}function th(e,t,n){if((he&6)!==0)throw Error(c(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Pl(e,t),u=l?a0(e,t):Ur(e,t,!0),r=l;do{if(u===0){Hl&&!l&&Mn(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!n0(n)){u=Ur(e,t,!1),r=!1;continue}if(u===2){if(r=t,e.errorRecoveryDisabledLanes&r)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;u=Da;var b=h.current.memoizedState.isDehydrated;if(b&&(Yl(h,o).flags|=256),o=Ur(h,o,!1),o!==2){if(Nr&&!b){h.errorRecoveryDisabledLanes|=r,il|=r,u=4;break e}r=it,it=u,r!==null&&(it===null?it=r:it.push.apply(it,r))}u=o}if(r=!1,u!==2)continue}}if(u===1){Yl(e,0),Mn(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:Mn(l,t,pt,!Cn);break e;case 2:it=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=Fi+300-st(),10<u)){if(Mn(l,t,pt,!Cn),ri(l,0,!0)!==0)break e;sn=t,l.timeoutHandle=Dh(nh.bind(null,l,n,it,Ii,Mr,t,pt,il,ql,Cn,r,"Throttled",-0,0),u);break e}nh(l,n,it,Ii,Mr,t,pt,il,ql,Cn,r,null,-0,0)}}break}while(!0);qt(e)}function nh(e,t,n,l,u,r,o,h,b,O,w,L,M,z){if(e.timeoutHandle=-1,L=t.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Jd(t,r,L);var Q=(r&62914560)===r?Fi-st():(r&4194048)===r?Id-st():0;if(Q=k0(L,Q),Q!==null){sn=r,e.cancelPendingCommit=Q(oh.bind(null,e,t,r,n,l,u,o,h,b,w,L,null,M,z)),Mn(e,r,o,!O);return}}oh(e,t,r,n,l,u,o,h,b)}function n0(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(!ot(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 Mn(e,t,n,l){t&=~Or,t&=~il,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var r=31-ct(u),o=1<<r;l[r]=-1,u&=~o}n!==0&&oo(e,n,t)}function Pi(){return(he&6)===0?(ja(0),!1):!0}function jr(){if(ae!==null){if(pe===0)var e=ae.return;else e=ae,$t=Fn=null,Fs(e),zl=null,ya=0,e=ae;for(;e!==null;)wd(e.alternate,e),e=e.return;ae=null}}function Yl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,_0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),sn=0,jr(),Ee=e,ae=n=Kt(e.current,null),ue=t,pe=0,mt=null,Cn=!1,Hl=Pl(e,t),Nr=!1,ql=pt=Or=il=Rn=ze=0,it=Da=null,Mr=!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-ct(l),r=1<<u;t|=e[u],l&=~r}return un=t,xi(),n}function lh(e,t){te=null,j.H=Aa,t===Ml||t===Ni?(t=bf(),pe=3):t===Hs?(t=bf(),pe=4):pe=t===dr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mt=t,ae===null&&(ze=1,Vi(e,St(t,e.current)))}function ah(){var e=dt.current;return e===null?!0:(ue&4194048)===ue?Tt===null:(ue&62914560)===ue||(ue&536870912)!==0?e===Tt:!1}function ih(){var e=j.H;return j.H=Aa,e===null?Aa:e}function uh(){var e=j.A;return j.A=e0,e}function eu(){ze=4,Cn||(ue&4194048)!==ue&&dt.current!==null||(Hl=!0),(Rn&134217727)===0&&(il&134217727)===0||Ee===null||Mn(Ee,ue,pt,!1)}function Ur(e,t,n){var l=he;he|=2;var u=ih(),r=uh();(Ee!==e||ue!==t)&&(Ii=null,Yl(e,t)),t=!1;var o=ze;e:do try{if(pe!==0&&ae!==null){var h=ae,b=mt;switch(pe){case 8:jr(),o=6;break e;case 3:case 2:case 9:case 6:dt.current===null&&(t=!0);var O=pe;if(pe=0,mt=null,Vl(e,h,b,O),n&&Hl){o=0;break e}break;default:O=pe,pe=0,mt=null,Vl(e,h,b,O)}}l0(),o=ze;break}catch(w){lh(e,w)}while(!0);return t&&e.shellSuspendCounter++,$t=Fn=null,he=l,j.H=u,j.A=r,ae===null&&(Ee=null,ue=0,xi()),o}function l0(){for(;ae!==null;)sh(ae)}function a0(e,t){var n=he;he|=2;var l=ih(),u=uh();Ee!==e||ue!==t?(Ii=null,Wi=st()+500,Yl(e,t)):Hl=Pl(e,t);e:do try{if(pe!==0&&ae!==null){t=ae;var r=mt;t:switch(pe){case 1:pe=0,mt=null,Vl(e,t,r,1);break;case 2:case 9:if(vf(r)){pe=0,mt=null,rh(t);break}t=function(){pe!==2&&pe!==9||Ee!==e||(pe=7),qt(e)},r.then(t,t);break e;case 3:pe=7;break e;case 4:pe=5;break e;case 7:vf(r)?(pe=0,mt=null,rh(t)):(pe=0,mt=null,Vl(e,t,r,7));break;case 5:var o=null;switch(ae.tag){case 26:o=ae.memoizedState;case 5:case 27:var h=ae;if(o?Kh(o):h.stateNode.complete){pe=0,mt=null;var b=h.sibling;if(b!==null)ae=b;else{var O=h.return;O!==null?(ae=O,tu(O)):ae=null}break t}}pe=0,mt=null,Vl(e,t,r,5);break;case 6:pe=0,mt=null,Vl(e,t,r,6);break;case 8:jr(),ze=6;break e;default:throw Error(c(462))}}i0();break}catch(w){lh(e,w)}while(!0);return $t=Fn=null,j.H=l,j.A=u,he=n,ae!==null?0:(Ee=null,ue=0,xi(),ze)}function i0(){for(;ae!==null&&!Np();)sh(ae)}function sh(e){var t=zd(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?tu(e):ae=t}function rh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Td(n,t,t.pendingProps,t.type,void 0,ue);break;case 11:t=Td(n,t,t.pendingProps,t.type.render,t.ref,ue);break;case 5:Fs(t);default:wd(n,t),t=ae=uf(t,un),t=zd(n,t,un)}e.memoizedProps=e.pendingProps,t===null?tu(e):ae=t}function Vl(e,t,n,l){$t=Fn=null,Fs(t),zl=null,ya=0;var u=t.return;try{if(Ky(e,u,t,n,ue)){ze=1,Vi(e,St(n,e.current)),ae=null;return}}catch(r){if(u!==null)throw ae=u,r;ze=1,Vi(e,St(n,e.current)),ae=null;return}t.flags&32768?(re||l===1?e=!0:Hl||(ue&536870912)!==0?e=!1:(Cn=e=!0,(l===2||l===9||l===3||l===6)&&(l=dt.current,l!==null&&l.tag===13&&(l.flags|=16384))),ch(t,e)):tu(t)}function tu(e){var t=e;do{if((t.flags&32768)!==0){ch(t,Cn);return}e=t.return;var n=Fy(t.alternate,t,un);if(n!==null){ae=n;return}if(t=t.sibling,t!==null){ae=t;return}ae=t=e}while(t!==null);ze===0&&(ze=5)}function ch(e,t){do{var n=Wy(e.alternate,e);if(n!==null){n.flags&=32767,ae=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ae=e;return}ae=e=n}while(e!==null);ze=6,ae=null}function oh(e,t,n,l,u,r,o,h,b){e.cancelPendingCommit=null;do nu();while(Ye!==0);if((he&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(r=t.lanes|t.childLanes,r|=Es,Hp(e,n,r,o,h,b),e===Ee&&(ae=Ee=null,ue=0),kl=t,On=e,sn=n,zr=r,Dr=u,Pd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,c0(ai,function(){return ph(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=j.T,j.T=null,u=G.p,G.p=2,o=he,he|=4;try{Iy(e,t,n)}finally{he=o,G.p=u,j.T=l}}Ye=1,fh(),dh(),hh()}}function fh(){if(Ye===1){Ye=0;var e=On,t=kl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=j.T,j.T=null;var l=G.p;G.p=2;var u=he;he|=4;try{Qd(t,e);var r=Kr,o=Fo(e.containerInfo),h=r.focusedElem,b=r.selectionRange;if(o!==h&&h&&h.ownerDocument&&$o(h.ownerDocument.documentElement,h)){if(b!==null&&gs(h)){var O=b.start,w=b.end;if(w===void 0&&(w=O),"selectionStart"in h)h.selectionStart=O,h.selectionEnd=Math.min(w,h.value.length);else{var L=h.ownerDocument||document,M=L&&L.defaultView||window;if(M.getSelection){var z=M.getSelection(),Q=h.textContent.length,W=Math.min(b.start,Q),xe=b.end===void 0?W:Math.min(b.end,Q);!z.extend&&W>xe&&(o=xe,xe=W,W=o);var R=Jo(h,W),A=Jo(h,xe);if(R&&A&&(z.rangeCount!==1||z.anchorNode!==R.node||z.anchorOffset!==R.offset||z.focusNode!==A.node||z.focusOffset!==A.offset)){var N=L.createRange();N.setStart(R.node,R.offset),z.removeAllRanges(),W>xe?(z.addRange(N),z.extend(A.node,A.offset)):(N.setEnd(A.node,A.offset),z.addRange(N))}}}}for(L=[],z=h;z=z.parentNode;)z.nodeType===1&&L.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<L.length;h++){var B=L[h];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}mu=!!Zr,Kr=Zr=null}finally{he=u,G.p=l,j.T=n}}e.current=t,Ye=2}}function dh(){if(Ye===2){Ye=0;var e=On,t=kl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=j.T,j.T=null;var l=G.p;G.p=2;var u=he;he|=4;try{kd(e,t.alternate,t)}finally{he=u,G.p=l,j.T=n}}Ye=3}}function hh(){if(Ye===4||Ye===3){Ye=0,Op();var e=On,t=kl,n=sn,l=Pd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ye=5:(Ye=0,kl=On=null,mh(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Nn=null),Pu(n),t=t.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(Il,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=j.T,u=G.p,G.p=2,j.T=null;try{for(var r=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];r(h.value,{componentStack:h.stack})}}finally{j.T=t,G.p=u}}(sn&3)!==0&&nu(),qt(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===wr?wa++:(wa=0,wr=e):wa=0,ja(0)}}function mh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function nu(){return fh(),dh(),hh(),ph()}function ph(){if(Ye!==5)return!1;var e=On,t=zr;zr=0;var n=Pu(sn),l=j.T,u=G.p;try{G.p=32>n?32:n,j.T=null,n=Dr,Dr=null;var r=On,o=sn;if(Ye=0,kl=On=null,sn=0,(he&6)!==0)throw Error(c(331));var h=he;if(he|=4,Fd(r.current),Kd(r,r.current,o,n),he=h,ja(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(Il,r)}catch{}return!0}finally{G.p=u,j.T=l,mh(e,t)}}function yh(e,t,n){t=St(n,t),t=fr(e.stateNode,t,2),e=_n(e,t,2),e!==null&&(ea(e,2),qt(e))}function ye(e,t,n){if(e.tag===3)yh(e,e,n);else for(;t!==null;){if(t.tag===3){yh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Nn===null||!Nn.has(l))){e=St(n,e),n=vd(2),l=_n(t,n,2),l!==null&&(gd(n,l,t,e),ea(l,2),qt(l));break}}t=t.return}}function Br(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new t0;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)||(Nr=!0,u.add(n),e=u0.bind(null,e,t,n),t.then(e,e))}function u0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ee===e&&(ue&n)===n&&(ze===4||ze===3&&(ue&62914560)===ue&&300>st()-Fi?(he&2)===0&&Yl(e,0):Or|=n,ql===ue&&(ql=0)),qt(e)}function vh(e,t){t===0&&(t=co()),e=Kn(e,t),e!==null&&(ea(e,t),qt(e))}function s0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vh(e,n)}function r0(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),vh(e,n)}function c0(e,t){return $u(e,t)}var lu=null,Gl=null,Lr=!1,au=!1,Hr=!1,zn=0;function qt(e){e!==Gl&&e.next===null&&(Gl===null?lu=Gl=e:Gl=Gl.next=e),au=!0,Lr||(Lr=!0,f0())}function ja(e,t){if(!Hr&&au){Hr=!0;do for(var n=!1,l=lu;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var r=0;else{var o=l.suspendedLanes,h=l.pingedLanes;r=(1<<31-ct(42|e)+1)-1,r&=u&~(o&~h),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Sh(l,r))}else r=ue,r=ri(l,l===Ee?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||Pl(l,r)||(n=!0,Sh(l,r));l=l.next}while(n);Hr=!1}}function o0(){gh()}function gh(){au=Lr=!1;var e=0;zn!==0&&S0()&&(e=zn);for(var t=st(),n=null,l=lu;l!==null;){var u=l.next,r=bh(l,t);r===0?(l.next=null,n===null?lu=u:n.next=u,u===null&&(Gl=n)):(n=l,(e!==0||(r&3)!==0)&&(au=!0)),l=u}Ye!==0&&Ye!==5||ja(e),zn!==0&&(zn=0)}function bh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var o=31-ct(r),h=1<<o,b=u[o];b===-1?((h&n)===0||(h&l)!==0)&&(u[o]=Lp(h,t)):b<=t&&(e.expiredLanes|=h),r&=~h}if(t=Ee,n=ue,n=ri(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(pe===2||pe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Fu(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Pl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Fu(l),Pu(n)){case 2:case 8:n=so;break;case 32:n=ai;break;case 268435456:n=ro;break;default:n=ai}return l=xh.bind(null,e),n=$u(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Fu(l),e.callbackPriority=2,e.callbackNode=null,2}function xh(e,t){if(Ye!==0&&Ye!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(nu()&&e.callbackNode!==n)return null;var l=ue;return l=ri(e,e===Ee?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(th(e,l,t),bh(e,st()),e.callbackNode!=null&&e.callbackNode===n?xh.bind(null,e):null)}function Sh(e,t){if(nu())return null;th(e,t,!0)}function f0(){E0(function(){(he&6)!==0?$u(uo,o0):gh()})}function qr(){if(zn===0){var e=Nl;e===0&&(e=ii,ii<<=1,(ii&261888)===0&&(ii=256)),zn=e}return zn}function _h(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:di(""+e)}function Eh(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 d0(e,t,n,l,u){if(t==="submit"&&n&&n.stateNode===u){var r=_h((u[et]||null).action),o=l.submitter;o&&(t=(t=o[et]||null)?_h(t.formAction):o.getAttribute("formAction"),t!==null&&(r=t,o=null));var h=new yi("action","action",null,l,u);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zn!==0){var b=o?Eh(u,o):new FormData(u);ir(n,{pending:!0,data:b,method:u.method,action:r},null,b)}}else typeof r=="function"&&(h.preventDefault(),b=o?Eh(u,o):new FormData(u),ir(n,{pending:!0,data:b,method:u.method,action:r},r,b))},currentTarget:u}]})}}for(var kr=0;kr<_s.length;kr++){var Yr=_s[kr],h0=Yr.toLowerCase(),m0=Yr[0].toUpperCase()+Yr.slice(1);Mt(h0,"on"+m0)}Mt(Po,"onAnimationEnd"),Mt(ef,"onAnimationIteration"),Mt(tf,"onAnimationStart"),Mt("dblclick","onDoubleClick"),Mt("focusin","onFocus"),Mt("focusout","onBlur"),Mt(My,"onTransitionRun"),Mt(zy,"onTransitionStart"),Mt(Dy,"onTransitionCancel"),Mt(nf,"onTransitionEnd"),ml("onMouseEnter",["mouseout","mouseover"]),ml("onMouseLeave",["mouseout","mouseover"]),ml("onPointerEnter",["pointerout","pointerover"]),ml("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 Ua="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(" "),p0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ua));function Ah(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],u=l.event;l=l.listeners;e:{var r=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],b=h.instance,O=h.currentTarget;if(h=h.listener,b!==r&&u.isPropagationStopped())break e;r=h,u.currentTarget=O;try{r(u)}catch(w){bi(w)}u.currentTarget=null,r=b}else for(o=0;o<l.length;o++){if(h=l[o],b=h.instance,O=h.currentTarget,h=h.listener,b!==r&&u.isPropagationStopped())break e;r=h,u.currentTarget=O;try{r(u)}catch(w){bi(w)}u.currentTarget=null,r=b}}}}function ie(e,t){var n=t[es];n===void 0&&(n=t[es]=new Set);var l=e+"__bubble";n.has(l)||(Th(t,e,2,!1),n.add(l))}function Vr(e,t,n){var l=0;t&&(l|=4),Th(n,e,l,t)}var iu="_reactListening"+Math.random().toString(36).slice(2);function Gr(e){if(!e[iu]){e[iu]=!0,vo.forEach(function(n){n!=="selectionchange"&&(p0.has(n)||Vr(n,!1,e),Vr(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[iu]||(t[iu]=!0,Vr("selectionchange",!1,t))}}function Th(e,t,n,l){switch(em(t)){case 2:var u=G0;break;case 8:u=X0;break;default:u=ac}n=u.bind(null,t,n,e),u=void 0,!cs||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 Xr(e,t,n,l,u){var r=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===u)break;if(o===4)for(o=l.return;o!==null;){var b=o.tag;if((b===3||b===4)&&o.stateNode.containerInfo===u)return;o=o.return}for(;h!==null;){if(o=fl(h),o===null)return;if(b=o.tag,b===5||b===6||b===26||b===27){l=r=o;continue e}h=h.parentNode}}l=l.return}Oo(function(){var O=r,w=ss(n),L=[];e:{var M=lf.get(e);if(M!==void 0){var z=yi,Q=e;switch(e){case"keypress":if(mi(n)===0)break e;case"keydown":case"keyup":z=ry;break;case"focusin":Q="focus",z=hs;break;case"focusout":Q="blur",z=hs;break;case"beforeblur":case"afterblur":z=hs;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":z=Do;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Fp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=fy;break;case Po:case ef:case tf:z=Pp;break;case nf:z=hy;break;case"scroll":case"scrollend":z=Jp;break;case"wheel":z=py;break;case"copy":case"cut":case"paste":z=ty;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=jo;break;case"toggle":case"beforetoggle":z=vy}var W=(t&4)!==0,xe=!W&&(e==="scroll"||e==="scrollend"),R=W?M!==null?M+"Capture":null:M;W=[];for(var A=O,N;A!==null;){var B=A;if(N=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||N===null||R===null||(B=la(A,R),B!=null&&W.push(Ba(A,B,N))),xe)break;A=A.return}0<W.length&&(M=new z(M,Q,null,n,w),L.push({event:M,listeners:W}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",M&&n!==us&&(Q=n.relatedTarget||n.fromElement)&&(fl(Q)||Q[ol]))break e;if((z||M)&&(M=w.window===w?w:(M=w.ownerDocument)?M.defaultView||M.parentWindow:window,z?(Q=n.relatedTarget||n.toElement,z=O,Q=Q?fl(Q):null,Q!==null&&(xe=d(Q),W=Q.tag,Q!==xe||W!==5&&W!==27&&W!==6)&&(Q=null)):(z=null,Q=O),z!==Q)){if(W=Do,B="onMouseLeave",R="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(W=jo,B="onPointerLeave",R="onPointerEnter",A="pointer"),xe=z==null?M:na(z),N=Q==null?M:na(Q),M=new W(B,A+"leave",z,n,w),M.target=xe,M.relatedTarget=N,B=null,fl(w)===O&&(W=new W(R,A+"enter",Q,n,w),W.target=N,W.relatedTarget=xe,B=W),xe=B,z&&Q)t:{for(W=y0,R=z,A=Q,N=0,B=R;B;B=W(B))N++;B=0;for(var $=A;$;$=W($))B++;for(;0<N-B;)R=W(R),N--;for(;0<B-N;)A=W(A),B--;for(;N--;){if(R===A||A!==null&&R===A.alternate){W=R;break t}R=W(R),A=W(A)}W=null}else W=null;z!==null&&Ch(L,M,z,W,!1),Q!==null&&xe!==null&&Ch(L,xe,Q,W,!0)}}e:{if(M=O?na(O):window,z=M.nodeName&&M.nodeName.toLowerCase(),z==="select"||z==="input"&&M.type==="file")var fe=Vo;else if(ko(M))if(Go)fe=Ry;else{fe=Ty;var K=Ay}else z=M.nodeName,!z||z.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?O&&is(O.elementType)&&(fe=Vo):fe=Cy;if(fe&&(fe=fe(e,O))){Yo(L,fe,n,w);break e}K&&K(e,M,O),e==="focusout"&&O&&M.type==="number"&&O.memoizedProps.value!=null&&as(M,"number",M.value)}switch(K=O?na(O):window,e){case"focusin":(ko(K)||K.contentEditable==="true")&&(xl=K,bs=O,fa=null);break;case"focusout":fa=bs=xl=null;break;case"mousedown":xs=!0;break;case"contextmenu":case"mouseup":case"dragend":xs=!1,Wo(L,n,w);break;case"selectionchange":if(Oy)break;case"keydown":case"keyup":Wo(L,n,w)}var ne;if(ps)e:{switch(e){case"compositionstart":var se="onCompositionStart";break e;case"compositionend":se="onCompositionEnd";break e;case"compositionupdate":se="onCompositionUpdate";break e}se=void 0}else bl?Ho(e,n)&&(se="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(se="onCompositionStart");se&&(Uo&&n.locale!=="ko"&&(bl||se!=="onCompositionStart"?se==="onCompositionEnd"&&bl&&(ne=Mo()):(pn=w,os="value"in pn?pn.value:pn.textContent,bl=!0)),K=uu(O,se),0<K.length&&(se=new wo(se,e,null,n,w),L.push({event:se,listeners:K}),ne?se.data=ne:(ne=qo(n),ne!==null&&(se.data=ne)))),(ne=by?xy(e,n):Sy(e,n))&&(se=uu(O,"onBeforeInput"),0<se.length&&(K=new wo("onBeforeInput","beforeinput",null,n,w),L.push({event:K,listeners:se}),K.data=ne)),d0(L,e,O,n,w)}Ah(L,t)})}function Ba(e,t,n){return{instance:e,listener:t,currentTarget:n}}function uu(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=la(e,n),u!=null&&l.unshift(Ba(e,u,r)),u=la(e,t),u!=null&&l.push(Ba(e,u,r))),e.tag===3)return l;e=e.return}return[]}function y0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ch(e,t,n,l,u){for(var r=t._reactName,o=[];n!==null&&n!==l;){var h=n,b=h.alternate,O=h.stateNode;if(h=h.tag,b!==null&&b===l)break;h!==5&&h!==26&&h!==27||O===null||(b=O,u?(O=la(n,r),O!=null&&o.unshift(Ba(n,O,b))):u||(O=la(n,r),O!=null&&o.push(Ba(n,O,b)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var v0=/\r\n?/g,g0=/\u0000|\uFFFD/g;function Rh(e){return(typeof e=="string"?e:""+e).replace(v0,`
|
||
`).replace(g0,"")}function Nh(e,t){return t=Rh(t),Rh(e)===t}function be(e,t,n,l,u,r){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||yl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&yl(e,""+l);break;case"className":oi(e,"class",l);break;case"tabIndex":oi(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":oi(e,n,l);break;case"style":Ro(e,l,r);break;case"data":if(t!=="object"){oi(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=di(""+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"&&be(e,t,"name",u.name,u,null),be(e,t,"formEncType",u.formEncType,u,null),be(e,t,"formMethod",u.formMethod,u,null),be(e,t,"formTarget",u.formTarget,u,null)):(be(e,t,"encType",u.encType,u,null),be(e,t,"method",u.method,u,null),be(e,t,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=di(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Qt);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("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=di(""+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":ie("beforetoggle",e),ie("toggle",e),ci(e,"popover",l);break;case"xlinkActuate":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ci(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=Zp.get(n)||n,ci(e,n,l))}}function Qr(e,t,n,l,u,r){switch(n){case"style":Ro(e,l,r);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(n=l.__html,n!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"children":typeof l=="string"?yl(e,l):(typeof l=="number"||typeof l=="bigint")&&yl(e,""+l);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!go.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(u=n.endsWith("Capture"),t=n.slice(2,u?n.length-7:void 0),r=e[et]||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,""):ci(e,n,l)}}}function $e(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ie("error",e),ie("load",e);var l=!1,u=!1,r;for(r in n)if(n.hasOwnProperty(r)){var o=n[r];if(o!=null)switch(r){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:be(e,t,r,o,n,null)}}u&&be(e,t,"srcSet",n.srcSet,n,null),l&&be(e,t,"src",n.src,n,null);return;case"input":ie("invalid",e);var h=r=o=u=null,b=null,O=null;for(l in n)if(n.hasOwnProperty(l)){var w=n[l];if(w!=null)switch(l){case"name":u=w;break;case"type":o=w;break;case"checked":b=w;break;case"defaultChecked":O=w;break;case"value":r=w;break;case"defaultValue":h=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(c(137,t));break;default:be(e,t,l,w,n,null)}}Eo(e,r,h,b,O,o,u,!1);return;case"select":ie("invalid",e),l=o=r=null;for(u in n)if(n.hasOwnProperty(u)&&(h=n[u],h!=null))switch(u){case"value":r=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:be(e,t,u,h,n,null)}t=r,n=o,e.multiple=!!l,t!=null?pl(e,!!l,t,!1):n!=null&&pl(e,!!l,n,!0);return;case"textarea":ie("invalid",e),r=u=l=null;for(o in n)if(n.hasOwnProperty(o)&&(h=n[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":u=h;break;case"children":r=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:be(e,t,o,h,n,null)}To(e,l,u,r);return;case"option":for(b in n)if(n.hasOwnProperty(b)&&(l=n[b],l!=null))switch(b){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:be(e,t,b,l,n,null)}return;case"dialog":ie("beforetoggle",e),ie("toggle",e),ie("cancel",e),ie("close",e);break;case"iframe":case"object":ie("load",e);break;case"video":case"audio":for(l=0;l<Ua.length;l++)ie(Ua[l],e);break;case"image":ie("error",e),ie("load",e);break;case"details":ie("toggle",e);break;case"embed":case"source":case"link":ie("error",e),ie("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(O in n)if(n.hasOwnProperty(O)&&(l=n[O],l!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:be(e,t,O,l,n,null)}return;default:if(is(t)){for(w in n)n.hasOwnProperty(w)&&(l=n[w],l!==void 0&&Qr(e,t,w,l,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(l=n[h],l!=null&&be(e,t,h,l,n,null))}function b0(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,r=null,o=null,h=null,b=null,O=null,w=null;for(z in n){var L=n[z];if(n.hasOwnProperty(z)&&L!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":b=L;default:l.hasOwnProperty(z)||be(e,t,z,null,l,L)}}for(var M in l){var z=l[M];if(L=n[M],l.hasOwnProperty(M)&&(z!=null||L!=null))switch(M){case"type":r=z;break;case"name":u=z;break;case"checked":O=z;break;case"defaultChecked":w=z;break;case"value":o=z;break;case"defaultValue":h=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(c(137,t));break;default:z!==L&&be(e,t,M,z,l,L)}}ls(e,o,h,b,O,w,r,u);return;case"select":z=o=h=M=null;for(r in n)if(b=n[r],n.hasOwnProperty(r)&&b!=null)switch(r){case"value":break;case"multiple":z=b;default:l.hasOwnProperty(r)||be(e,t,r,null,l,b)}for(u in l)if(r=l[u],b=n[u],l.hasOwnProperty(u)&&(r!=null||b!=null))switch(u){case"value":M=r;break;case"defaultValue":h=r;break;case"multiple":o=r;default:r!==b&&be(e,t,u,r,l,b)}t=h,n=o,l=z,M!=null?pl(e,!!n,M,!1):!!l!=!!n&&(t!=null?pl(e,!!n,t,!0):pl(e,!!n,n?[]:"",!1));return;case"textarea":z=M=null;for(h in n)if(u=n[h],n.hasOwnProperty(h)&&u!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:be(e,t,h,null,l,u)}for(o in l)if(u=l[o],r=n[o],l.hasOwnProperty(o)&&(u!=null||r!=null))switch(o){case"value":M=u;break;case"defaultValue":z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==r&&be(e,t,o,u,l,r)}Ao(e,M,z);return;case"option":for(var Q in n)if(M=n[Q],n.hasOwnProperty(Q)&&M!=null&&!l.hasOwnProperty(Q))switch(Q){case"selected":e.selected=!1;break;default:be(e,t,Q,null,l,M)}for(b in l)if(M=l[b],z=n[b],l.hasOwnProperty(b)&&M!==z&&(M!=null||z!=null))switch(b){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:be(e,t,b,M,l,z)}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 W in n)M=n[W],n.hasOwnProperty(W)&&M!=null&&!l.hasOwnProperty(W)&&be(e,t,W,null,l,M);for(O in l)if(M=l[O],z=n[O],l.hasOwnProperty(O)&&M!==z&&(M!=null||z!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(c(137,t));break;default:be(e,t,O,M,l,z)}return;default:if(is(t)){for(var xe in n)M=n[xe],n.hasOwnProperty(xe)&&M!==void 0&&!l.hasOwnProperty(xe)&&Qr(e,t,xe,void 0,l,M);for(w in l)M=l[w],z=n[w],!l.hasOwnProperty(w)||M===z||M===void 0&&z===void 0||Qr(e,t,w,M,l,z);return}}for(var R in n)M=n[R],n.hasOwnProperty(R)&&M!=null&&!l.hasOwnProperty(R)&&be(e,t,R,null,l,M);for(L in l)M=l[L],z=n[L],!l.hasOwnProperty(L)||M===z||M==null&&z==null||be(e,t,L,M,l,z)}function Oh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function x0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var u=n[l],r=u.transferSize,o=u.initiatorType,h=u.duration;if(r&&h&&Oh(o)){for(o=0,h=u.responseEnd,l+=1;l<n.length;l++){var b=n[l],O=b.startTime;if(O>h)break;var w=b.transferSize,L=b.initiatorType;w&&Oh(L)&&(b=b.responseEnd,o+=w*(b<h?1:(h-O)/(b-O)))}if(--l,t+=8*(r+o)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Zr=null,Kr=null;function su(e){return e.nodeType===9?e:e.ownerDocument}function Mh(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 zh(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 Jr(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 $r=null;function S0(){var e=window.event;return e&&e.type==="popstate"?e===$r?!1:($r=e,!0):($r=null,!1)}var Dh=typeof setTimeout=="function"?setTimeout:void 0,_0=typeof clearTimeout=="function"?clearTimeout:void 0,wh=typeof Promise=="function"?Promise:void 0,E0=typeof queueMicrotask=="function"?queueMicrotask:typeof wh<"u"?function(e){return wh.resolve(null).then(e).catch(A0)}:Dh;function A0(e){setTimeout(function(){throw e})}function Dn(e){return e==="head"}function jh(e,t){var n=t,l=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(u),Kl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")La(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,La(n);for(var r=n.firstChild;r;){var o=r.nextSibling,h=r.nodeName;r[ta]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=o}}else n==="body"&&La(e.ownerDocument.body);n=u}while(n);Kl(t)}function Uh(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 Fr(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":Fr(n),ts(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function T0(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[ta])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=Ct(e.nextSibling),e===null)break}return null}function C0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ct(e.nextSibling),e===null))return null;return e}function Bh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ct(e.nextSibling),e===null))return null;return e}function Wr(e){return e.data==="$?"||e.data==="$~"}function Ir(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function R0(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 Ct(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 Pr=null;function Lh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ct(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Hh(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 qh(e,t,n){switch(t=su(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 La(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ts(e)}var Rt=new Map,kh=new Set;function ru(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rn=G.d;G.d={f:N0,r:O0,D:M0,C:z0,L:D0,m:w0,X:U0,S:j0,M:B0};function N0(){var e=rn.f(),t=Pi();return e||t}function O0(e){var t=dl(e);t!==null&&t.tag===5&&t.type==="form"?ld(t):rn.r(e)}var Xl=typeof document>"u"?null:document;function Yh(e,t,n){var l=Xl;if(l&&typeof t=="string"&&t){var u=bt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),kh.has(u)||(kh.add(u),e={rel:e,crossOrigin:n,href:t},l.querySelector(u)===null&&(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function M0(e){rn.D(e),Yh("dns-prefetch",e,null)}function z0(e,t){rn.C(e,t),Yh("preconnect",e,t)}function D0(e,t,n){rn.L(e,t,n);var l=Xl;if(l&&e&&t){var u='link[rel="preload"][as="'+bt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+bt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+bt(n.imageSizes)+'"]')):u+='[href="'+bt(e)+'"]';var r=u;switch(t){case"style":r=Ql(e);break;case"script":r=Zl(e)}Rt.has(r)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Rt.set(r,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(Ha(r))||t==="script"&&l.querySelector(qa(r))||(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function w0(e,t){rn.m(e,t);var n=Xl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+bt(l)+'"][href="'+bt(e)+'"]',r=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Zl(e)}if(!Rt.has(r)&&(e=S({rel:"modulepreload",href:e},t),Rt.set(r,e),n.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qa(r)))return}l=n.createElement("link"),$e(l,"link",e),Ge(l),n.head.appendChild(l)}}}function j0(e,t,n){rn.S(e,t,n);var l=Xl;if(l&&e){var u=hl(l).hoistableStyles,r=Ql(e);t=t||"default";var o=u.get(r);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(Ha(r)))h.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Rt.get(r))&&ec(e,n);var b=o=l.createElement("link");Ge(b),$e(b,"link",e),b._p=new Promise(function(O,w){b.onload=O,b.onerror=w}),b.addEventListener("load",function(){h.loading|=1}),b.addEventListener("error",function(){h.loading|=2}),h.loading|=4,cu(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},u.set(r,o)}}}function U0(e,t){rn.X(e,t);var n=Xl;if(n&&e){var l=hl(n).hoistableScripts,u=Zl(e),r=l.get(u);r||(r=n.querySelector(qa(u)),r||(e=S({src:e,async:!0},t),(t=Rt.get(u))&&tc(e,t),r=n.createElement("script"),Ge(r),$e(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(u,r))}}function B0(e,t){rn.M(e,t);var n=Xl;if(n&&e){var l=hl(n).hoistableScripts,u=Zl(e),r=l.get(u);r||(r=n.querySelector(qa(u)),r||(e=S({src:e,async:!0,type:"module"},t),(t=Rt.get(u))&&tc(e,t),r=n.createElement("script"),Ge(r),$e(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(u,r))}}function Vh(e,t,n,l){var u=(u=le.current)?ru(u):null;if(!u)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=hl(u).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var r=hl(u).hoistableStyles,o=r.get(e);if(o||(u=u.ownerDocument||u,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,o),(r=u.querySelector(Ha(e)))&&!r._p&&(o.instance=r,o.state.loading=5),Rt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rt.set(e,n),r||L0(u,e,n,o.state))),t&&l===null)throw Error(c(528,""));return o}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zl(n),n=hl(u).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Ql(e){return'href="'+bt(e)+'"'}function Ha(e){return'link[rel="stylesheet"]['+e+"]"}function Gh(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function L0(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}),$e(t,"link",n),Ge(t),e.head.appendChild(t))}function Zl(e){return'[src="'+bt(e)+'"]'}function qa(e){return"script[async]"+e}function Xh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+bt(n.href)+'"]');if(l)return t.instance=l,Ge(l),l;var u=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ge(l),$e(l,"style",u),cu(l,n.precedence,e),t.instance=l;case"stylesheet":u=Ql(n.href);var r=e.querySelector(Ha(u));if(r)return t.state.loading|=4,t.instance=r,Ge(r),r;l=Gh(n),(u=Rt.get(u))&&ec(l,u),r=(e.ownerDocument||e).createElement("link"),Ge(r);var o=r;return o._p=new Promise(function(h,b){o.onload=h,o.onerror=b}),$e(r,"link",l),t.state.loading|=4,cu(r,n.precedence,e),t.instance=r;case"script":return r=Zl(n.src),(u=e.querySelector(qa(r)))?(t.instance=u,Ge(u),u):(l=n,(u=Rt.get(r))&&(l=S({},n),tc(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),Ge(u),$e(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,cu(l,n.precedence,e));return t.instance}function cu(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,r=u,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)r=h;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 ec(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ou=null;function Qh(e,t,n){if(ou===null){var l=new Map,u=ou=new Map;u.set(n,l)}else u=ou,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[ta]||r[Qe]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var o=r.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(r):l.set(o,[r])}}return l}function Zh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function H0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Kh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function q0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=Ql(l.href),r=t.querySelector(Ha(u));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=r,Ge(r);return}r=t.ownerDocument||t,l=Gh(l),(u=Rt.get(u))&&ec(l,u),r=r.createElement("link"),Ge(r);var o=r;o._p=new Promise(function(h,b){o.onload=h,o.onerror=b}),$e(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=fu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var nc=0;function k0(e,t){return e.stylesheets&&e.count===0&&hu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&hu(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&nc===0&&(nc=62500*x0());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hu(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>nc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function fu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var du=null;function hu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,du=new Map,t.forEach(Y0,e),du=null,fu.call(e))}function Y0(e,t){if(!(t.state.loading&4)){var n=du.get(e);if(n)var l=n.get(null);else{n=new Map,du.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<u.length;r++){var o=u[r];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),l=o)}l&&n.set(null,l)}u=t.instance,o=u.getAttribute("data-precedence"),r=n.get(o)||l,r===l&&n.set(null,u),n.set(o,u),this.count++,l=fu.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 ka={$$typeof:H,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function V0(e,t,n,l,u,r,o,h,b){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=Wu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.hiddenUpdates=Wu(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=r,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Jh(e,t,n,l,u,r,o,h,b,O,w,L){return e=new V0(e,t,n,o,b,O,w,L,h),t=1,r===!0&&(t|=24),r=ft(3,null,null,t),e.current=r,r.stateNode=e,t=Us(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:t},qs(r),e}function $h(e){return e?(e=El,e):El}function Fh(e,t,n,l,u,r){u=$h(u),l.context===null?l.context=u:l.pendingContext=u,l=Sn(t),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=_n(e,l,t),n!==null&&(ut(n,e,t),ga(n,e,t))}function Wh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lc(e,t){Wh(e,t),(e=e.alternate)&&Wh(e,t)}function Ih(e){if(e.tag===13||e.tag===31){var t=Kn(e,67108864);t!==null&&ut(t,e,67108864),lc(e,67108864)}}function Ph(e){if(e.tag===13||e.tag===31){var t=yt();t=Iu(t);var n=Kn(e,t);n!==null&&ut(n,e,t),lc(e,t)}}var mu=!0;function G0(e,t,n,l){var u=j.T;j.T=null;var r=G.p;try{G.p=2,ac(e,t,n,l)}finally{G.p=r,j.T=u}}function X0(e,t,n,l){var u=j.T;j.T=null;var r=G.p;try{G.p=8,ac(e,t,n,l)}finally{G.p=r,j.T=u}}function ac(e,t,n,l){if(mu){var u=ic(l);if(u===null)Xr(e,t,l,pu,n),tm(e,l);else if(Z0(u,e,t,n,l))l.stopPropagation();else if(tm(e,l),t&4&&-1<Q0.indexOf(e)){for(;u!==null;){var r=dl(u);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var o=Vn(r.pendingLanes);if(o!==0){var h=r;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var b=1<<31-ct(o);h.entanglements[1]|=b,o&=~b}qt(r),(he&6)===0&&(Wi=st()+500,ja(0))}}break;case 31:case 13:h=Kn(r,2),h!==null&&ut(h,r,2),Pi(),lc(r,2)}if(r=ic(l),r===null&&Xr(e,t,l,pu,n),r===u)break;u=r}u!==null&&l.stopPropagation()}else Xr(e,t,l,null,n)}}function ic(e){return e=ss(e),uc(e)}var pu=null;function uc(e){if(pu=null,e=fl(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=y(t),e!==null)return e;e=null}else if(n===31){if(e=g(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pu=e,null}function em(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Mp()){case uo:return 2;case so:return 8;case ai:case zp:return 32;case ro:return 268435456;default:return 32}default:return 32}}var sc=!1,wn=null,jn=null,Un=null,Ya=new Map,Va=new Map,Bn=[],Q0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function tm(e,t){switch(e){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":Un=null;break;case"pointerover":case"pointerout":Ya.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Va.delete(t.pointerId)}}function Ga(e,t,n,l,u,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:r,targetContainers:[u]},t!==null&&(t=dl(t),t!==null&&Ih(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Z0(e,t,n,l,u){switch(t){case"focusin":return wn=Ga(wn,e,t,n,l,u),!0;case"dragenter":return jn=Ga(jn,e,t,n,l,u),!0;case"mouseover":return Un=Ga(Un,e,t,n,l,u),!0;case"pointerover":var r=u.pointerId;return Ya.set(r,Ga(Ya.get(r)||null,e,t,n,l,u)),!0;case"gotpointercapture":return r=u.pointerId,Va.set(r,Ga(Va.get(r)||null,e,t,n,l,u)),!0}return!1}function nm(e){var t=fl(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=y(n),t!==null){e.blockedOn=t,po(e.priority,function(){Ph(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,po(e.priority,function(){Ph(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ic(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);us=l,n.target.dispatchEvent(l),us=null}else return t=dl(n),t!==null&&Ih(t),e.blockedOn=n,!1;t.shift()}return!0}function lm(e,t,n){yu(e)&&n.delete(t)}function K0(){sc=!1,wn!==null&&yu(wn)&&(wn=null),jn!==null&&yu(jn)&&(jn=null),Un!==null&&yu(Un)&&(Un=null),Ya.forEach(lm),Va.forEach(lm)}function vu(e,t){e.blockedOn===t&&(e.blockedOn=null,sc||(sc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,K0)))}var gu=null;function am(e){gu!==e&&(gu=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){gu===e&&(gu=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(uc(l||n)===null)continue;break}var r=dl(n);r!==null&&(e.splice(t,3),t-=3,ir(r,{pending:!0,data:u,method:n.method,action:l},l,u))}}))}function Kl(e){function t(b){return vu(b,e)}wn!==null&&vu(wn,e),jn!==null&&vu(jn,e),Un!==null&&vu(Un,e),Ya.forEach(t),Va.forEach(t);for(var n=0;n<Bn.length;n++){var l=Bn[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Bn.length&&(n=Bn[0],n.blockedOn===null);)nm(n),n.blockedOn===null&&Bn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var u=n[l],r=n[l+1],o=u[et]||null;if(typeof r=="function")o||am(n);else if(o){var h=null;if(r&&r.hasAttribute("formAction")){if(u=r,o=r[et]||null)h=o.formAction;else if(uc(u)!==null)continue}else h=o.action;typeof h=="function"?n[l+1]=h:(n.splice(l,3),l-=3),am(n)}}}function im(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(o){return u=o})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function rc(e){this._internalRoot=e}bu.prototype.render=rc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,l=yt();Fh(n,l,e,t,null,null)},bu.prototype.unmount=rc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fh(e.current,2,null,e,null,null),Pi(),t[ol]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=mo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bn.length&&t!==0&&t<Bn[n].priority;n++);Bn.splice(n,0,e),n===0&&nm(e)}};var um=a.version;if(um!=="19.2.0")throw Error(c(527,um,"19.2.0"));G.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?E(e):null,e=e===null?null:e.stateNode,e};var J0={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xu.isDisabled&&xu.supportsFiber)try{Il=xu.inject(J0),rt=xu}catch{}}return Qa.createRoot=function(e,t){if(!f(e))throw Error(c(299));var n=!1,l="",u=hd,r=md,o=pd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Jh(e,1,!1,null,null,n,l,null,u,r,o,im),e[ol]=t.current,Gr(e),new rc(t)},Qa.hydrateRoot=function(e,t,n){if(!f(e))throw Error(c(299));var l=!1,u="",r=hd,o=md,h=pd,b=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=Jh(e,1,!0,t,n??null,l,u,b,r,o,h,im),t.context=$h(null),n=t.current,l=yt(),l=Iu(l),u=Sn(l),u.callback=null,_n(n,u,l),n=l,t.current.lanes=n,ea(t,n),qt(t),e[ol]=t.current,Gr(e),new bu(t)},Qa.version="19.2.0",Qa}var ym;function av(){if(ym)return fc.exports;ym=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(a){console.error(a)}}return i(),fc.exports=lv(),fc.exports}var iv=av();var vm="popstate";function uv(i={}){function a(c,f){let{pathname:d,search:y,hash:g}=c.location;return Nc("",{pathname:d,search:y,hash:g},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function s(c,f){return typeof f=="string"?f:Ia(f)}return rv(a,s,null,i)}function Oe(i,a){if(i===!1||i===null||typeof i>"u")throw new Error(a)}function jt(i,a){if(!i){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function sv(){return Math.random().toString(36).substring(2,10)}function gm(i,a){return{usr:i.state,key:i.key,idx:a}}function Nc(i,a,s=null,c){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof a=="string"?Jl(a):a,state:s,key:a&&a.key||c||sv()}}function Ia({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 Jl(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 rv(i,a,s,c={}){let{window:f=document.defaultView,v5Compat:d=!1}=c,y=f.history,g="POP",p=null,v=E();v==null&&(v=0,y.replaceState({...y.state,idx:v},""));function E(){return(y.state||{idx:null}).idx}function S(){g="POP";let k=E(),V=k==null?null:k-v;v=k,p&&p({action:g,location:Y.location,delta:V})}function _(k,V){g="PUSH";let U=Nc(Y.location,k,V);v=E()+1;let H=gm(U,v),J=Y.createHref(U);try{y.pushState(H,"",J)}catch(oe){if(oe instanceof DOMException&&oe.name==="DataCloneError")throw oe;f.location.assign(J)}d&&p&&p({action:g,location:Y.location,delta:1})}function C(k,V){g="REPLACE";let U=Nc(Y.location,k,V);v=E();let H=gm(U,v),J=Y.createHref(U);y.replaceState(H,"",J),d&&p&&p({action:g,location:Y.location,delta:0})}function D(k){return cv(k)}let Y={get action(){return g},get location(){return i(f,y)},listen(k){if(p)throw new Error("A history only accepts one active listener");return f.addEventListener(vm,S),p=k,()=>{f.removeEventListener(vm,S),p=null}},createHref(k){return a(f,k)},createURL:D,encodeLocation(k){let V=D(k);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:_,replace:C,go(k){return y.go(k)}};return Y}function cv(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:Ia(i);return c=c.replace(/ $/,"%20"),!a&&c.startsWith("//")&&(c=s+c),new URL(c,s)}function km(i,a,s="/"){return ov(i,a,s,!1)}function ov(i,a,s,c){let f=typeof a=="string"?Jl(a):a,d=fn(f.pathname||"/",s);if(d==null)return null;let y=Ym(i);fv(y);let g=null;for(let p=0;g==null&&p<y.length;++p){let v=_v(d);g=xv(y[p],v,c)}return g}function Ym(i,a=[],s=[],c="",f=!1){let d=(y,g,p=f,v)=>{let E={relativePath:v===void 0?y.path||"":v,caseSensitive:y.caseSensitive===!0,childrenIndex:g,route:y};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(c)&&p)return;Oe(E.relativePath.startsWith(c),`Absolute route path "${E.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(c.length)}let S=on([c,E.relativePath]),_=s.concat(E);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 "${S}".`),Ym(y.children,a,_,S,p)),!(y.path==null&&!y.index)&&a.push({path:S,score:gv(S,y.index),routesMeta:_})};return i.forEach((y,g)=>{if(y.path===""||!y.path?.includes("?"))d(y,g);else for(let p of Vm(y.path))d(y,g,!0,p)}),a}function Vm(i){let a=i.split("/");if(a.length===0)return[];let[s,...c]=a,f=s.endsWith("?"),d=s.replace(/\?$/,"");if(c.length===0)return f?[d,""]:[d];let y=Vm(c.join("/")),g=[];return g.push(...y.map(p=>p===""?d:[d,p].join("/"))),f&&g.push(...y),g.map(p=>i.startsWith("/")&&p===""?"/":p)}function fv(i){i.sort((a,s)=>a.score!==s.score?s.score-a.score:bv(a.routesMeta.map(c=>c.childrenIndex),s.routesMeta.map(c=>c.childrenIndex)))}var dv=/^:[\w-]+$/,hv=3,mv=2,pv=1,yv=10,vv=-2,bm=i=>i==="*";function gv(i,a){let s=i.split("/"),c=s.length;return s.some(bm)&&(c+=vv),a&&(c+=mv),s.filter(f=>!bm(f)).reduce((f,d)=>f+(dv.test(d)?hv:d===""?pv:yv),c)}function bv(i,a){return i.length===a.length&&i.slice(0,-1).every((c,f)=>c===a[f])?i[i.length-1]-a[a.length-1]:0}function xv(i,a,s=!1){let{routesMeta:c}=i,f={},d="/",y=[];for(let g=0;g<c.length;++g){let p=c[g],v=g===c.length-1,E=d==="/"?a:a.slice(d.length)||"/",S=Bu({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},E),_=p.route;if(!S&&v&&s&&!c[c.length-1].route.index&&(S=Bu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},E)),!S)return null;Object.assign(f,S.params),y.push({params:f,pathname:on([d,S.pathname]),pathnameBase:Rv(on([d,S.pathnameBase])),route:_}),S.pathnameBase!=="/"&&(d=on([d,S.pathnameBase]))}return y}function Bu(i,a){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[s,c]=Sv(i.path,i.caseSensitive,i.end),f=a.match(s);if(!f)return null;let d=f[0],y=d.replace(/(.)\/+$/,"$1"),g=f.slice(1);return{params:c.reduce((v,{paramName:E,isOptional:S},_)=>{if(E==="*"){let D=g[_]||"";y=d.slice(0,d.length-D.length).replace(/(.)\/+$/,"$1")}const C=g[_];return S&&!C?v[E]=void 0:v[E]=(C||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:y,pattern:i}}function Sv(i,a=!1,s=!0){jt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let c=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,g,p)=>(c.push({paramName:g,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(c.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,a?void 0:"i"),c]}function _v(i){try{return i.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return jt(!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 fn(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 Ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Av=i=>Ev.test(i);function Tv(i,a="/"){let{pathname:s,search:c="",hash:f=""}=typeof i=="string"?Jl(i):i,d;if(s)if(Av(s))d=s;else{if(s.includes("//")){let y=s;s=s.replace(/\/\/+/g,"/"),jt(!1,`Pathnames cannot have embedded double slashes - normalizing ${y} -> ${s}`)}s.startsWith("/")?d=xm(s.substring(1),"/"):d=xm(s,a)}else d=a;return{pathname:d,search:Nv(c),hash:Ov(f)}}function xm(i,a){let s=a.replace(/\/+$/,"").split("/");return i.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function pc(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 Cv(i){return i.filter((a,s)=>s===0||a.route.path&&a.route.path.length>0)}function Gm(i){let a=Cv(i);return a.map((s,c)=>c===a.length-1?s.pathname:s.pathnameBase)}function Xm(i,a,s,c=!1){let f;typeof i=="string"?f=Jl(i):(f={...i},Oe(!f.pathname||!f.pathname.includes("?"),pc("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),pc("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),pc("#","search","hash",f)));let d=i===""||f.pathname==="",y=d?"/":f.pathname,g;if(y==null)g=s;else{let S=a.length-1;if(!c&&y.startsWith("..")){let _=y.split("/");for(;_[0]==="..";)_.shift(),S-=1;f.pathname=_.join("/")}g=S>=0?a[S]:"/"}let p=Tv(f,g),v=y&&y!=="/"&&y.endsWith("/"),E=(d||y===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(v||E)&&(p.pathname+="/"),p}var on=i=>i.join("/").replace(/\/\/+/g,"/"),Rv=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),Nv=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Ov=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function Mv(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 Qm=["POST","PUT","PATCH","DELETE"];new Set(Qm);var zv=["GET",...Qm];new Set(zv);var $l=x.createContext(null);$l.displayName="DataRouter";var Hu=x.createContext(null);Hu.displayName="DataRouterState";x.createContext(!1);var Zm=x.createContext({isTransitioning:!1});Zm.displayName="ViewTransition";var Dv=x.createContext(new Map);Dv.displayName="Fetchers";var wv=x.createContext(null);wv.displayName="Await";var Vt=x.createContext(null);Vt.displayName="Navigation";var ei=x.createContext(null);ei.displayName="Location";var dn=x.createContext({outlet:null,matches:[],isDataRoute:!1});dn.displayName="Route";var kc=x.createContext(null);kc.displayName="RouteError";function jv(i,{relative:a}={}){Oe(ti(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:c}=x.useContext(Vt),{hash:f,pathname:d,search:y}=ni(i,{relative:a}),g=d;return s!=="/"&&(g=d==="/"?s:on([s,d])),c.createHref({pathname:g,search:y,hash:f})}function ti(){return x.useContext(ei)!=null}function cl(){return Oe(ti(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(ei).location}var Km="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jm(i){x.useContext(Vt).static||x.useLayoutEffect(i)}function Uv(){let{isDataRoute:i}=x.useContext(dn);return i?Jv():Bv()}function Bv(){Oe(ti(),"useNavigate() may be used only in the context of a <Router> component.");let i=x.useContext($l),{basename:a,navigator:s}=x.useContext(Vt),{matches:c}=x.useContext(dn),{pathname:f}=cl(),d=JSON.stringify(Gm(c)),y=x.useRef(!1);return Jm(()=>{y.current=!0}),x.useCallback((p,v={})=>{if(jt(y.current,Km),!y.current)return;if(typeof p=="number"){s.go(p);return}let E=Xm(p,JSON.parse(d),f,v.relative==="path");i==null&&a!=="/"&&(E.pathname=E.pathname==="/"?a:on([a,E.pathname])),(v.replace?s.replace:s.push)(E,v.state,v)},[a,s,d,f,i])}x.createContext(null);function ni(i,{relative:a}={}){let{matches:s}=x.useContext(dn),{pathname:c}=cl(),f=JSON.stringify(Gm(s));return x.useMemo(()=>Xm(i,JSON.parse(f),c,a==="path"),[i,f,c,a])}function Lv(i,a){return $m(i,a)}function $m(i,a,s,c,f){Oe(ti(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=x.useContext(Vt),{matches:y}=x.useContext(dn),g=y[y.length-1],p=g?g.params:{},v=g?g.pathname:"/",E=g?g.pathnameBase:"/",S=g&&g.route;{let U=S&&S.path||"";Fm(v,!S||U.endsWith("*")||U.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${U}">) 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="${U}"> to <Route path="${U==="/"?"*":`${U}/*`}">.`)}let _=cl(),C;if(a){let U=typeof a=="string"?Jl(a):a;Oe(E==="/"||U.pathname?.startsWith(E),`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 "${E}" but pathname "${U.pathname}" was given in the \`location\` prop.`),C=U}else C=_;let D=C.pathname||"/",Y=D;if(E!=="/"){let U=E.replace(/^\//,"").split("/");Y="/"+D.replace(/^\//,"").split("/").slice(U.length).join("/")}let k=km(i,{pathname:Y});jt(S||k!=null,`No routes matched location "${C.pathname}${C.search}${C.hash}" `),jt(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.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=Vv(k&&k.map(U=>Object.assign({},U,{params:Object.assign({},p,U.params),pathname:on([E,d.encodeLocation?d.encodeLocation(U.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathname]),pathnameBase:U.pathnameBase==="/"?E:on([E,d.encodeLocation?d.encodeLocation(U.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathnameBase])})),y,s,c,f);return a&&V?x.createElement(ei.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},V):V}function Hv(){let i=Kv(),a=Mv(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),s=i instanceof Error?i.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},d={padding:"2px 4px",backgroundColor:c},y=null;return console.error("Error handled by React Router default ErrorBoundary:",i),y=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:d},"ErrorBoundary")," or"," ",x.createElement("code",{style:d},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},a),s?x.createElement("pre",{style:f},s):null,y)}var qv=x.createElement(Hv,null),kv=class extends x.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?x.createElement(dn.Provider,{value:this.props.routeContext},x.createElement(kc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Yv({routeContext:i,match:a,children:s}){let c=x.useContext($l);return c&&c.static&&c.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=a.route.id),x.createElement(dn.Provider,{value:i},s)}function Vv(i,a=[],s=null,c=null,f=null){if(i==null){if(!s)return null;if(s.errors)i=s.matches;else if(a.length===0&&!s.initialized&&s.matches.length>0)i=s.matches;else return null}let d=i,y=s?.errors;if(y!=null){let E=d.findIndex(S=>S.route.id&&y?.[S.route.id]!==void 0);Oe(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),d=d.slice(0,Math.min(d.length,E+1))}let g=!1,p=-1;if(s)for(let E=0;E<d.length;E++){let S=d[E];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(p=E),S.route.id){let{loaderData:_,errors:C}=s,D=S.route.loader&&!_.hasOwnProperty(S.route.id)&&(!C||C[S.route.id]===void 0);if(S.route.lazy||D){g=!0,p>=0?d=d.slice(0,p+1):d=[d[0]];break}}}let v=s&&c?(E,S)=>{c(E,{location:s.location,params:s.matches?.[0]?.params??{},errorInfo:S})}:void 0;return d.reduceRight((E,S,_)=>{let C,D=!1,Y=null,k=null;s&&(C=y&&S.route.id?y[S.route.id]:void 0,Y=S.route.errorElement||qv,g&&(p<0&&_===0?(Fm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,k=null):p===_&&(D=!0,k=S.route.hydrateFallbackElement||null)));let V=a.concat(d.slice(0,_+1)),U=()=>{let H;return C?H=Y:D?H=k:S.route.Component?H=x.createElement(S.route.Component,null):S.route.element?H=S.route.element:H=E,x.createElement(Yv,{match:S,routeContext:{outlet:E,matches:V,isDataRoute:s!=null},children:H})};return s&&(S.route.ErrorBoundary||S.route.errorElement||_===0)?x.createElement(kv,{location:s.location,revalidation:s.revalidation,component:Y,error:C,children:U(),routeContext:{outlet:null,matches:V,isDataRoute:!0},onError:v}):U()},null)}function Yc(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gv(i){let a=x.useContext($l);return Oe(a,Yc(i)),a}function Xv(i){let a=x.useContext(Hu);return Oe(a,Yc(i)),a}function Qv(i){let a=x.useContext(dn);return Oe(a,Yc(i)),a}function Vc(i){let a=Qv(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 Zv(){return Vc("useRouteId")}function Kv(){let i=x.useContext(kc),a=Xv("useRouteError"),s=Vc("useRouteError");return i!==void 0?i:a.errors?.[s]}function Jv(){let{router:i}=Gv("useNavigate"),a=Vc("useNavigate"),s=x.useRef(!1);return Jm(()=>{s.current=!0}),x.useCallback(async(f,d={})=>{jt(s.current,Km),s.current&&(typeof f=="number"?i.navigate(f):await i.navigate(f,{fromRouteId:a,...d}))},[i,a])}var Sm={};function Fm(i,a,s){!a&&!Sm[i]&&(Sm[i]=!0,jt(!1,s))}x.memo($v);function $v({routes:i,future:a,state:s,unstable_onError:c}){return $m(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 Fv({basename:i="/",children:a=null,location:s,navigationType:c="POP",navigator:f,static:d=!1}){Oe(!ti(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=i.replace(/^\/*/,"/"),g=x.useMemo(()=>({basename:y,navigator:f,static:d,future:{}}),[y,f,d]);typeof s=="string"&&(s=Jl(s));let{pathname:p="/",search:v="",hash:E="",state:S=null,key:_="default"}=s,C=x.useMemo(()=>{let D=fn(p,y);return D==null?null:{location:{pathname:D,search:v,hash:E,state:S,key:_},navigationType:c}},[y,p,v,E,S,_,c]);return jt(C!=null,`<Router basename="${y}"> is not able to match the URL "${p}${v}${E}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:x.createElement(Vt.Provider,{value:g},x.createElement(ei.Provider,{children:a,value:C}))}function Wv({children:i,location:a}){return Lv(Mc(i),a)}function Mc(i,a=[]){let s=[];return x.Children.forEach(i,(c,f)=>{if(!x.isValidElement(c))return;let d=[...a,f];if(c.type===x.Fragment){s.push.apply(s,Mc(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=Mc(c.props.children,d)),s.push(y)}),s}var Mu="get",zu="application/x-www-form-urlencoded";function qu(i){return i!=null&&typeof i.tagName=="string"}function Iv(i){return qu(i)&&i.tagName.toLowerCase()==="button"}function Pv(i){return qu(i)&&i.tagName.toLowerCase()==="form"}function eg(i){return qu(i)&&i.tagName.toLowerCase()==="input"}function tg(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function ng(i,a){return i.button===0&&(!a||a==="_self")&&!tg(i)}var Su=null;function lg(){if(Su===null)try{new FormData(document.createElement("form"),0),Su=!1}catch{Su=!0}return Su}var ag=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yc(i){return i!=null&&!ag.has(i)?(jt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zu}"`),null):i}function ig(i,a){let s,c,f,d,y;if(Pv(i)){let g=i.getAttribute("action");c=g?fn(g,a):null,s=i.getAttribute("method")||Mu,f=yc(i.getAttribute("enctype"))||zu,d=new FormData(i)}else if(Iv(i)||eg(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?fn(p,a):null,s=i.getAttribute("formmethod")||g.getAttribute("method")||Mu,f=yc(i.getAttribute("formenctype"))||yc(g.getAttribute("enctype"))||zu,d=new FormData(g,i),!lg()){let{name:v,type:E,value:S}=i;if(E==="image"){let _=v?`${v}.`:"";d.append(`${_}x`,"0"),d.append(`${_}y`,"0")}else v&&d.append(v,S)}}else{if(qu(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Mu,c=null,f=zu,y=i}return d&&f==="text/plain"&&(y=d,d=void 0),{action:c,method:s.toLowerCase(),encType:f,formData:d,body:y}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Gc(i,a){if(i===!1||i===null||typeof i>"u")throw new Error(a)}function ug(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&&fn(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function sg(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 rg(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 cg(i,a,s){let c=await Promise.all(i.map(async f=>{let d=a.routes[f.route.id];if(d){let y=await sg(d,s);return y.links?y.links():[]}return[]}));return hg(c.flat(1).filter(rg).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function _m(i,a,s,c,f,d){let y=(p,v)=>s[v]?p.route.id!==s[v].route.id:!0,g=(p,v)=>s[v].pathname!==p.pathname||s[v].route.path?.endsWith("*")&&s[v].params["*"]!==p.params["*"];return d==="assets"?a.filter((p,v)=>y(p,v)||g(p,v)):d==="data"?a.filter((p,v)=>{let E=c.routes[p.route.id];if(!E||!E.hasLoader)return!1;if(y(p,v)||g(p,v))return!0;if(p.route.shouldRevalidate){let S=p.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function og(i,a,{includeHydrateFallback:s}={}){return fg(i.map(c=>{let f=a.routes[c.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),s&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function fg(i){return[...new Set(i)]}function dg(i){let a={},s=Object.keys(i).sort();for(let c of s)a[c]=i[c];return a}function hg(i,a){let s=new Set;return new Set(a),i.reduce((c,f)=>{let d=JSON.stringify(dg(f));return s.has(d)||(s.add(d),c.push({key:d,link:f})),c},[])}function Wm(){let i=x.useContext($l);return Gc(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function mg(){let i=x.useContext(Hu);return Gc(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Xc=x.createContext(void 0);Xc.displayName="FrameworkContext";function Im(){let i=x.useContext(Xc);return Gc(i,"You must render this element inside a <HydratedRouter> element"),i}function pg(i,a){let s=x.useContext(Xc),[c,f]=x.useState(!1),[d,y]=x.useState(!1),{onFocus:g,onBlur:p,onMouseEnter:v,onMouseLeave:E,onTouchStart:S}=a,_=x.useRef(null);x.useEffect(()=>{if(i==="render"&&y(!0),i==="viewport"){let Y=V=>{V.forEach(U=>{y(U.isIntersecting)})},k=new IntersectionObserver(Y,{threshold:.5});return _.current&&k.observe(_.current),()=>{k.disconnect()}}},[i]),x.useEffect(()=>{if(c){let Y=setTimeout(()=>{y(!0)},100);return()=>{clearTimeout(Y)}}},[c]);let C=()=>{f(!0)},D=()=>{f(!1),y(!1)};return s?i!=="intent"?[d,_,{}]:[d,_,{onFocus:Za(g,C),onBlur:Za(p,D),onMouseEnter:Za(v,C),onMouseLeave:Za(E,D),onTouchStart:Za(S,C)}]:[!1,_,{}]}function Za(i,a){return s=>{i&&i(s),s.defaultPrevented||a(s)}}function yg({page:i,...a}){let{router:s}=Wm(),c=x.useMemo(()=>km(s.routes,i,s.basename),[s.routes,i,s.basename]);return c?x.createElement(gg,{page:i,matches:c,...a}):null}function vg(i){let{manifest:a,routeModules:s}=Im(),[c,f]=x.useState([]);return x.useEffect(()=>{let d=!1;return cg(i,a,s).then(y=>{d||f(y)}),()=>{d=!0}},[i,a,s]),c}function gg({page:i,matches:a,...s}){let c=cl(),{manifest:f,routeModules:d}=Im(),{basename:y}=Wm(),{loaderData:g,matches:p}=mg(),v=x.useMemo(()=>_m(i,a,p,f,c,"data"),[i,a,p,f,c]),E=x.useMemo(()=>_m(i,a,p,f,c,"assets"),[i,a,p,f,c]),S=x.useMemo(()=>{if(i===c.pathname+c.search+c.hash)return[];let D=new Set,Y=!1;if(a.forEach(V=>{let U=f.routes[V.route.id];!U||!U.hasLoader||(!v.some(H=>H.route.id===V.route.id)&&V.route.id in g&&d[V.route.id]?.shouldRevalidate||U.hasClientLoader?Y=!0:D.add(V.route.id))}),D.size===0)return[];let k=ug(i,y,"data");return Y&&D.size>0&&k.searchParams.set("_routes",a.filter(V=>D.has(V.route.id)).map(V=>V.route.id).join(",")),[k.pathname+k.search]},[y,g,c,f,v,a,i,d]),_=x.useMemo(()=>og(E,f),[E,f]),C=vg(E);return x.createElement(x.Fragment,null,S.map(D=>x.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...s})),_.map(D=>x.createElement("link",{key:D,rel:"modulepreload",href:D,...s})),C.map(({key:D,link:Y})=>x.createElement("link",{key:D,nonce:s.nonce,...Y})))}function bg(...i){return a=>{i.forEach(s=>{typeof s=="function"?s(a):s!=null&&(s.current=a)})}}var Pm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Pm&&(window.__reactRouterVersion="7.9.6")}catch{}function xg({basename:i,children:a,window:s}){let c=x.useRef();c.current==null&&(c.current=uv({window:s,v5Compat:!0}));let f=c.current,[d,y]=x.useState({action:f.action,location:f.location}),g=x.useCallback(p=>{x.startTransition(()=>y(p))},[y]);return x.useLayoutEffect(()=>f.listen(g),[f,g]),x.createElement(Fv,{basename:i,children:a,location:d.location,navigationType:d.action,navigator:f})}var ep=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tp=x.forwardRef(function({onClick:a,discover:s="render",prefetch:c="none",relative:f,reloadDocument:d,replace:y,state:g,target:p,to:v,preventScrollReset:E,viewTransition:S,..._},C){let{basename:D}=x.useContext(Vt),Y=typeof v=="string"&&ep.test(v),k,V=!1;if(typeof v=="string"&&Y&&(k=v,Pm))try{let Se=new URL(window.location.href),Ue=v.startsWith("//")?new URL(Se.protocol+v):new URL(v),Ve=fn(Ue.pathname,D);Ue.origin===Se.origin&&Ve!=null?v=Ve+Ue.search+Ue.hash:V=!0}catch{jt(!1,`<Link to="${v}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let U=jv(v,{relative:f}),[H,J,oe]=pg(c,_),Ae=Ag(v,{replace:y,state:g,target:p,preventScrollReset:E,relative:f,viewTransition:S});function F(Se){a&&a(Se),Se.defaultPrevented||Ae(Se)}let Te=x.createElement("a",{..._,...oe,href:k||U,onClick:V||d?a:F,ref:bg(C,J),target:p,"data-discover":!Y&&s==="render"?"true":void 0});return H&&!Y?x.createElement(x.Fragment,null,Te,x.createElement(yg,{page:U})):Te});tp.displayName="Link";var Sg=x.forwardRef(function({"aria-current":a="page",caseSensitive:s=!1,className:c="",end:f=!1,style:d,to:y,viewTransition:g,children:p,...v},E){let S=ni(y,{relative:v.relative}),_=cl(),C=x.useContext(Hu),{navigator:D,basename:Y}=x.useContext(Vt),k=C!=null&&Og(S)&&g===!0,V=D.encodeLocation?D.encodeLocation(S).pathname:S.pathname,U=_.pathname,H=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;s||(U=U.toLowerCase(),H=H?H.toLowerCase():null,V=V.toLowerCase()),H&&Y&&(H=fn(H,Y)||H);const J=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let oe=U===V||!f&&U.startsWith(V)&&U.charAt(J)==="/",Ae=H!=null&&(H===V||!f&&H.startsWith(V)&&H.charAt(V.length)==="/"),F={isActive:oe,isPending:Ae,isTransitioning:k},Te=oe?a:void 0,Se;typeof c=="function"?Se=c(F):Se=[c,oe?"active":null,Ae?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let Ue=typeof d=="function"?d(F):d;return x.createElement(tp,{...v,"aria-current":Te,className:Se,ref:E,style:Ue,to:y,viewTransition:g},typeof p=="function"?p(F):p)});Sg.displayName="NavLink";var _g=x.forwardRef(({discover:i="render",fetcherKey:a,navigate:s,reloadDocument:c,replace:f,state:d,method:y=Mu,action:g,onSubmit:p,relative:v,preventScrollReset:E,viewTransition:S,..._},C)=>{let D=Rg(),Y=Ng(g,{relative:v}),k=y.toLowerCase()==="get"?"get":"post",V=typeof g=="string"&&ep.test(g),U=H=>{if(p&&p(H),H.defaultPrevented)return;H.preventDefault();let J=H.nativeEvent.submitter,oe=J?.getAttribute("formmethod")||y;D(J||H.currentTarget,{fetcherKey:a,method:oe,navigate:s,replace:f,state:d,relative:v,preventScrollReset:E,viewTransition:S})};return x.createElement("form",{ref:C,method:k,action:Y,onSubmit:c?p:U,..._,"data-discover":!V&&i==="render"?"true":void 0})});_g.displayName="Form";function Eg(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function np(i){let a=x.useContext($l);return Oe(a,Eg(i)),a}function Ag(i,{target:a,replace:s,state:c,preventScrollReset:f,relative:d,viewTransition:y}={}){let g=Uv(),p=cl(),v=ni(i,{relative:d});return x.useCallback(E=>{if(ng(E,a)){E.preventDefault();let S=s!==void 0?s:Ia(p)===Ia(v);g(i,{replace:S,state:c,preventScrollReset:f,relative:d,viewTransition:y})}},[p,g,v,s,c,a,i,f,d,y])}var Tg=0,Cg=()=>`__${String(++Tg)}__`;function Rg(){let{router:i}=np("useSubmit"),{basename:a}=x.useContext(Vt),s=Zv();return x.useCallback(async(c,f={})=>{let{action:d,method:y,encType:g,formData:p,body:v}=ig(c,a);if(f.navigate===!1){let E=f.fetcherKey||Cg();await i.fetch(E,s,f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:v,formMethod:f.method||y,formEncType:f.encType||g,flushSync:f.flushSync})}else await i.navigate(f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:v,formMethod:f.method||y,formEncType:f.encType||g,replace:f.replace,state:f.state,fromRouteId:s,flushSync:f.flushSync,viewTransition:f.viewTransition})},[i,a,s])}function Ng(i,{relative:a}={}){let{basename:s}=x.useContext(Vt),c=x.useContext(dn);Oe(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),d={...ni(i||".",{relative:a})},y=cl();if(i==null){d.search=y.search;let g=new URLSearchParams(d.search),p=g.getAll("index");if(p.some(E=>E==="")){g.delete("index"),p.filter(S=>S).forEach(S=>g.append("index",S));let E=g.toString();d.search=E?`?${E}`:""}}return(!i||i===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(d.pathname=d.pathname==="/"?s:on([s,d.pathname])),Ia(d)}function Og(i,{relative:a}={}){let s=x.useContext(Zm);Oe(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=np("useViewTransitionState"),f=ni(i,{relative:a});if(!s.isTransitioning)return!1;let d=fn(s.currentLocation.pathname,c)||s.currentLocation.pathname,y=fn(s.nextLocation.pathname,c)||s.nextLocation.pathname;return Bu(f.pathname,y)!=null||Bu(f.pathname,d)!=null}const Yt=Object.create(null);Yt.open="0";Yt.close="1";Yt.ping="2";Yt.pong="3";Yt.message="4";Yt.upgrade="5";Yt.noop="6";const Du=Object.create(null);Object.keys(Yt).forEach(i=>{Du[Yt[i]]=i});const zc={type:"error",data:"parser error"},lp=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ap=typeof ArrayBuffer=="function",ip=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,Qc=({type:i,data:a},s,c)=>lp&&a instanceof Blob?s?c(a):Em(a,c):ap&&(a instanceof ArrayBuffer||ip(a))?s?c(a):Em(new Blob([a]),c):c(Yt[i]+(a||"")),Em=(i,a)=>{const s=new FileReader;return s.onload=function(){const c=s.result.split(",")[1];a("b"+(c||""))},s.readAsDataURL(i)};function Am(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let vc;function Mg(i,a){if(lp&&i.data instanceof Blob)return i.data.arrayBuffer().then(Am).then(a);if(ap&&(i.data instanceof ArrayBuffer||ip(i.data)))return a(Am(i.data));Qc(i,!1,s=>{vc||(vc=new TextEncoder),a(vc.encode(s))})}const Tm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<Tm.length;i++)Wa[Tm.charCodeAt(i)]=i;const zg=i=>{let a=i.length*.75,s=i.length,c,f=0,d,y,g,p;i[i.length-1]==="="&&(a--,i[i.length-2]==="="&&a--);const v=new ArrayBuffer(a),E=new Uint8Array(v);for(c=0;c<s;c+=4)d=Wa[i.charCodeAt(c)],y=Wa[i.charCodeAt(c+1)],g=Wa[i.charCodeAt(c+2)],p=Wa[i.charCodeAt(c+3)],E[f++]=d<<2|y>>4,E[f++]=(y&15)<<4|g>>2,E[f++]=(g&3)<<6|p&63;return v},Dg=typeof ArrayBuffer=="function",Zc=(i,a)=>{if(typeof i!="string")return{type:"message",data:up(i,a)};const s=i.charAt(0);return s==="b"?{type:"message",data:wg(i.substring(1),a)}:Du[s]?i.length>1?{type:Du[s],data:i.substring(1)}:{type:Du[s]}:zc},wg=(i,a)=>{if(Dg){const s=zg(i);return up(s,a)}else return{base64:!0,data:i}},up=(i,a)=>{switch(a){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},sp="",jg=(i,a)=>{const s=i.length,c=new Array(s);let f=0;i.forEach((d,y)=>{Qc(d,!1,g=>{c[y]=g,++f===s&&a(c.join(sp))})})},Ug=(i,a)=>{const s=i.split(sp),c=[];for(let f=0;f<s.length;f++){const d=Zc(s[f],a);if(c.push(d),d.type==="error")break}return c};function Bg(){return new TransformStream({transform(i,a){Mg(i,s=>{const c=s.length;let f;if(c<126)f=new Uint8Array(1),new DataView(f.buffer).setUint8(0,c);else if(c<65536){f=new Uint8Array(3);const d=new DataView(f.buffer);d.setUint8(0,126),d.setUint16(1,c)}else{f=new Uint8Array(9);const d=new DataView(f.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(c))}i.data&&typeof i.data!="string"&&(f[0]|=128),a.enqueue(f),a.enqueue(s)})}})}let gc;function _u(i){return i.reduce((a,s)=>a+s.length,0)}function Eu(i,a){if(i[0].length===a)return i.shift();const s=new Uint8Array(a);let c=0;for(let f=0;f<a;f++)s[f]=i[0][c++],c===i[0].length&&(i.shift(),c=0);return i.length&&c<i[0].length&&(i[0]=i[0].slice(c)),s}function Lg(i,a){gc||(gc=new TextDecoder);const s=[];let c=0,f=-1,d=!1;return new TransformStream({transform(y,g){for(s.push(y);;){if(c===0){if(_u(s)<1)break;const p=Eu(s,1);d=(p[0]&128)===128,f=p[0]&127,f<126?c=3:f===126?c=1:c=2}else if(c===1){if(_u(s)<2)break;const p=Eu(s,2);f=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),c=3}else if(c===2){if(_u(s)<8)break;const p=Eu(s,8),v=new DataView(p.buffer,p.byteOffset,p.length),E=v.getUint32(0);if(E>Math.pow(2,21)-1){g.enqueue(zc);break}f=E*Math.pow(2,32)+v.getUint32(4),c=3}else{if(_u(s)<f)break;const p=Eu(s,f);g.enqueue(Zc(d?p:gc.decode(p),a)),c=0}if(f===0||f>i){g.enqueue(zc);break}}}})}const rp=4;function ke(i){if(i)return Hg(i)}function Hg(i){for(var a in ke.prototype)i[a]=ke.prototype[a];return i}ke.prototype.on=ke.prototype.addEventListener=function(i,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(a),this};ke.prototype.once=function(i,a){function s(){this.off(i,s),a.apply(this,arguments)}return s.fn=a,this.on(i,s),this};ke.prototype.off=ke.prototype.removeListener=ke.prototype.removeAllListeners=ke.prototype.removeEventListener=function(i,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+i];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var c,f=0;f<s.length;f++)if(c=s[f],c===a||c.fn===a){s.splice(f,1);break}return s.length===0&&delete this._callbacks["$"+i],this};ke.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),s=this._callbacks["$"+i],c=1;c<arguments.length;c++)a[c-1]=arguments[c];if(s){s=s.slice(0);for(var c=0,f=s.length;c<f;++c)s[c].apply(this,a)}return this};ke.prototype.emitReserved=ke.prototype.emit;ke.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};ke.prototype.hasListeners=function(i){return!!this.listeners(i).length};const ku=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,s)=>s(a,0),Nt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),qg="arraybuffer";function cp(i,...a){return a.reduce((s,c)=>(i.hasOwnProperty(c)&&(s[c]=i[c]),s),{})}const kg=Nt.setTimeout,Yg=Nt.clearTimeout;function Yu(i,a){a.useNativeTimers?(i.setTimeoutFn=kg.bind(Nt),i.clearTimeoutFn=Yg.bind(Nt)):(i.setTimeoutFn=Nt.setTimeout.bind(Nt),i.clearTimeoutFn=Nt.clearTimeout.bind(Nt))}const Vg=1.33;function Gg(i){return typeof i=="string"?Xg(i):Math.ceil((i.byteLength||i.size)*Vg)}function Xg(i){let a=0,s=0;for(let c=0,f=i.length;c<f;c++)a=i.charCodeAt(c),a<128?s+=1:a<2048?s+=2:a<55296||a>=57344?s+=3:(c++,s+=4);return s}function op(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Qg(i){let a="";for(let s in i)i.hasOwnProperty(s)&&(a.length&&(a+="&"),a+=encodeURIComponent(s)+"="+encodeURIComponent(i[s]));return a}function Zg(i){let a={},s=i.split("&");for(let c=0,f=s.length;c<f;c++){let d=s[c].split("=");a[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return a}class Kg extends Error{constructor(a,s,c){super(a),this.description=s,this.context=c,this.type="TransportError"}}class Kc extends ke{constructor(a){super(),this.writable=!1,Yu(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 Kg(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=Zc(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=Qg(a);return s.length?"?"+s:""}}class Jg extends Kc{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)};Ug(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,jg(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]=op()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(a,s)}}let fp=!1;try{fp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const $g=fp;function Fg(){}class Wg extends Jg{constructor(a){if(super(a),typeof location<"u"){const s=location.protocol==="https:";let c=location.port;c||(c=s?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||c!==a.port}}doWrite(a,s){const c=this.request({method:"POST",data:a});c.on("success",s),c.on("error",(f,d)=>{this.onError("xhr post error",f,d)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(s,c)=>{this.onError("xhr poll error",s,c)}),this.pollXhr=a}}class kt extends ke{constructor(a,s,c){super(),this.createRequest=a,Yu(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=cp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const c=this._xhr=this.createRequest(s);try{c.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){c.setDisableHeaderCheck&&c.setDisableHeaderCheck(!0);for(let f in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(f)&&c.setRequestHeader(f,this._opts.extraHeaders[f])}}catch{}if(this._method==="POST")try{c.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{c.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(c),"withCredentials"in c&&(c.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(c.timeout=this._opts.requestTimeout),c.onreadystatechange=()=>{var f;c.readyState===3&&((f=this._opts.cookieJar)===null||f===void 0||f.parseCookies(c.getResponseHeader("set-cookie"))),c.readyState===4&&(c.status===200||c.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof c.status=="number"?c.status:0)},0))},c.send(this._data)}catch(f){this.setTimeoutFn(()=>{this._onError(f)},0);return}typeof document<"u"&&(this._index=kt.requestsCount++,kt.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=Fg,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete kt.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()}}kt.requestsCount=0;kt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Cm);else if(typeof addEventListener=="function"){const i="onpagehide"in Nt?"pagehide":"unload";addEventListener(i,Cm,!1)}}function Cm(){for(let i in kt.requests)kt.requests.hasOwnProperty(i)&&kt.requests[i].abort()}const Ig=(function(){const i=dp({xdomain:!1});return i&&i.responseType!==null})();class Pg extends Wg{constructor(a){super(a);const s=a&&a.forceBase64;this.supportsBinary=Ig&&!s}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new kt(dp,this.uri(),a)}}function dp(i){const a=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||$g))return new XMLHttpRequest}catch{}if(!a)try{return new Nt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const hp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class eb extends Kc{get name(){return"websocket"}doOpen(){const a=this.uri(),s=this.opts.protocols,c=hp?{}:cp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,s,c)}catch(f){return this.emitReserved("error",f)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let s=0;s<a.length;s++){const c=a[s],f=s===a.length-1;Qc(c,this.supportsBinary,d=>{try{this.doWrite(c,d)}catch{}f&&ku(()=>{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]=op()),this.supportsBinary||(s.b64=1),this.createUri(a,s)}}const bc=Nt.WebSocket||Nt.MozWebSocket;class tb extends eb{createSocket(a,s,c){return hp?new bc(a,s,c):s?new bc(a,s):new bc(a)}doWrite(a,s){this.ws.send(s)}}class nb extends Kc{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=Lg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=a.readable.pipeThrough(s).getReader(),f=Bg();f.readable.pipeTo(a.writable),this._writer=f.writable.getWriter();const d=()=>{c.read().then(({done:g,value:p})=>{g||(this.onPacket(p),d())}).catch(g=>{})};d();const y={type:"open"};this.query.sid&&(y.data=`{"sid":"${this.query.sid}"}`),this._writer.write(y).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let s=0;s<a.length;s++){const c=a[s],f=s===a.length-1;this._writer.write(c).then(()=>{f&&ku(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const lb={websocket:tb,webtransport:nb,polling:Pg},ab=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ib=["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 f=ab.exec(i||""),d={},y=14;for(;y--;)d[ib[y]]=f[y]||"";return s!=-1&&c!=-1&&(d.source=a,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=ub(d,d.path),d.queryKey=sb(d,d.query),d}function ub(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 sb(i,a){const s={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,f,d){f&&(s[f]=d)}),s}const wc=typeof addEventListener=="function"&&typeof removeEventListener=="function",wu=[];wc&&addEventListener("offline",()=>{wu.forEach(i=>i())},!1);class Hn extends ke{constructor(a,s){if(super(),this.binaryType=qg,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);Yu(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(c=>{const f=c.prototype.name;this.transports.push(f),this._transportsByName[f]=c}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Zg(this.opts.query)),wc&&(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"})},wu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const s=Object.assign({},this.opts.query);s.EIO=rp,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&&Hn.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",Hn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=a.data,this._onError(s);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let c=0;c<this.writeBuffer.length;c++){const f=this.writeBuffer[c].data;if(f&&(s+=Gg(f)),c>0&&s>this._maxPayload)return this.writeBuffer.slice(0,c);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,ku(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,s,c){return this._sendPacket("message",a,s,c),this}send(a,s,c){return this._sendPacket("message",a,s,c),this}_sendPacket(a,s,c,f){if(typeof s=="function"&&(f=s,s=void 0),typeof c=="function"&&(f=c,c=null),this.readyState==="closing"||this.readyState==="closed")return;c=c||{},c.compress=c.compress!==!1;const d={type:a,data:s,options:c};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),f&&this.once("flush",f),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),a()},c=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?c():a()}):this.upgrading?c():a()),this}_onError(a){if(Hn.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(),wc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const c=wu.indexOf(this._offlineEventListener);c!==-1&&wu.splice(c,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,s),this.writeBuffer=[],this._prevBufferLen=0}}}Hn.protocol=rp;class rb extends Hn{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;Hn.priorWebsocketSuccess=!1;const f=()=>{c||(s.send([{type:"ping",data:"probe"}]),s.once("packet",S=>{if(!c)if(S.type==="pong"&&S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;Hn.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{c||this.readyState!=="closed"&&(E(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const _=new Error("probe error");_.transport=s.name,this.emitReserved("upgradeError",_)}}))};function d(){c||(c=!0,E(),s.close(),s=null)}const y=S=>{const _=new Error("probe error: "+S);_.transport=s.name,d(),this.emitReserved("upgradeError",_)};function g(){y("transport closed")}function p(){y("socket closed")}function v(S){s&&S.name!==s.name&&d()}const E=()=>{s.removeListener("open",f),s.removeListener("error",y),s.removeListener("close",g),this.off("close",p),this.off("upgrading",v)};s.once("open",f),s.once("error",y),s.once("close",g),this.once("close",p),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{c||s.open()},200):s.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const s=[];for(let c=0;c<a.length;c++)~this.transports.indexOf(a[c])&&s.push(a[c]);return s}}let cb=class extends rb{constructor(a,s={}){const c=typeof a=="object"?a:s;(!c.transports||c.transports&&typeof c.transports[0]=="string")&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(f=>lb[f]).filter(f=>!!f)),super(a,c)}};function ob(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 fb=typeof ArrayBuffer=="function",db=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,mp=Object.prototype.toString,hb=typeof Blob=="function"||typeof Blob<"u"&&mp.call(Blob)==="[object BlobConstructor]",mb=typeof File=="function"||typeof File<"u"&&mp.call(File)==="[object FileConstructor]";function Jc(i){return fb&&(i instanceof ArrayBuffer||db(i))||hb&&i instanceof Blob||mb&&i instanceof File}function ju(i,a){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let s=0,c=i.length;s<c;s++)if(ju(i[s]))return!0;return!1}if(Jc(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return ju(i.toJSON(),!0);for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&ju(i[s]))return!0;return!1}function pb(i){const a=[],s=i.data,c=i;return c.data=jc(s,a),c.attachments=a.length,{packet:c,buffers:a}}function jc(i,a){if(!i)return i;if(Jc(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]=jc(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]=jc(i[c],a));return s}return i}function yb(i,a){return i.data=Uc(i.data,a),delete i.attachments,i}function Uc(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]=Uc(i[s],a);else if(typeof i=="object")for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(i[s]=Uc(i[s],a));return i}const vb=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gb=5;var ce;(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"})(ce||(ce={}));class bb{constructor(a){this.replacer=a}encode(a){return(a.type===ce.EVENT||a.type===ce.ACK)&&ju(a)?this.encodeAsBinary({type:a.type===ce.EVENT?ce.BINARY_EVENT:ce.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let s=""+a.type;return(a.type===ce.BINARY_EVENT||a.type===ce.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=pb(a),c=this.encodeAsString(s.packet),f=s.buffers;return f.unshift(c),f}}function Rm(i){return Object.prototype.toString.call(i)==="[object Object]"}class $c extends ke{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===ce.BINARY_EVENT;c||s.type===ce.BINARY_ACK?(s.type=c?ce.EVENT:ce.ACK,this.reconstructor=new xb(s),s.attachments===0&&super.emitReserved("decoded",s)):super.emitReserved("decoded",s)}else if(Jc(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(ce[c.type]===void 0)throw new Error("unknown packet type "+c.type);if(c.type===ce.BINARY_EVENT||c.type===ce.BINARY_ACK){const d=s+1;for(;a.charAt(++s)!=="-"&&s!=a.length;);const y=a.substring(d,s);if(y!=Number(y)||a.charAt(s)!=="-")throw new Error("Illegal attachments");c.attachments=Number(y)}if(a.charAt(s+1)==="/"){const d=s+1;for(;++s&&!(a.charAt(s)===","||s===a.length););c.nsp=a.substring(d,s)}else c.nsp="/";const f=a.charAt(s+1);if(f!==""&&Number(f)==f){const d=s+1;for(;++s;){const y=a.charAt(s);if(y==null||Number(y)!=y){--s;break}if(s===a.length)break}c.id=Number(a.substring(d,s+1))}if(a.charAt(++s)){const d=this.tryParse(a.substr(s));if($c.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 ce.CONNECT:return Rm(s);case ce.DISCONNECT:return s===void 0;case ce.CONNECT_ERROR:return typeof s=="string"||Rm(s);case ce.EVENT:case ce.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&vb.indexOf(s[0])===-1);case ce.ACK:case ce.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xb{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=yb(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Sb=Object.freeze(Object.defineProperty({__proto__:null,Decoder:$c,Encoder:bb,get PacketType(){return ce},protocol:gb},Symbol.toStringTag,{value:"Module"}));function wt(i,a,s){return i.on(a,s),function(){i.off(a,s)}}const _b=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class pp extends ke{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=[wt(a,"open",this.onopen.bind(this)),wt(a,"packet",this.onpacket.bind(this)),wt(a,"error",this.onerror.bind(this)),wt(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...s){var c,f,d;if(_b.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(s.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const y={type:ce.EVENT,data:s};if(y.options={},y.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const E=this.ids++,S=s.pop();this._registerAckCallback(E,S),y.id=E}const g=(f=(c=this.io.engine)===null||c===void 0?void 0:c.transport)===null||f===void 0?void 0:f.writable,p=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!g||(p?(this.notifyOutgoingListeners(y),this.packet(y)):this.sendBuffer.push(y)),this.flags={},this}_registerAckCallback(a,s){var c;const f=(c=this.flags.timeout)!==null&&c!==void 0?c:this._opts.ackTimeout;if(f===void 0){this.acks[a]=s;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let g=0;g<this.sendBuffer.length;g++)this.sendBuffer[g].id===a&&this.sendBuffer.splice(g,1);s.call(this,new Error("operation has timed out"))},f),y=(...g)=>{this.io.clearTimeoutFn(d),s.apply(this,g)};y.withError=!0,this.acks[a]=y}emitWithAck(a,...s){return new Promise((c,f)=>{const d=(y,g)=>y?f(y):c(g);d.withError=!0,s.push(d),this.emit(a,...s)})}_addToQueue(a){let s;typeof a[a.length-1]=="function"&&(s=a.pop());const c={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((f,...d)=>c!==this._queue[0]?void 0:(f!==null?c.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(f)):(this._queue.shift(),s&&s(null,...d)),c.pending=!1,this._drainQueue())),this._queue.push(c),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!a||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:ce.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 ce.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 ce.EVENT:case ce.BINARY_EVENT:this.onevent(a);break;case ce.ACK:case ce.BINARY_ACK:this.onack(a);break;case ce.DISCONNECT:this.ondisconnect();break;case ce.CONNECT_ERROR:this.destroy();const c=new Error(a.data.message);c.data=a.data.data,this.emitReserved("connect_error",c);break}}onevent(a){const s=a.data||[];a.id!=null&&s.push(this.ack(a.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const c of s)c.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const s=this;let c=!1;return function(...f){c||(c=!0,s.packet({type:ce.ACK,id:a,data:f}))}}onack(a){const s=this.acks[a.id];typeof s=="function"&&(delete this.acks[a.id],s.withError&&a.data.unshift(null),s.apply(this,a.data))}onconnect(a,s){this.id=a,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ce.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 Fl(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}Fl.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};Fl.prototype.reset=function(){this.attempts=0};Fl.prototype.setMin=function(i){this.ms=i};Fl.prototype.setMax=function(i){this.max=i};Fl.prototype.setJitter=function(i){this.jitter=i};class Bc extends ke{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,Yu(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 Fl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=a;const f=s.parser||Sb;this.encoder=new f.Encoder,this.decoder=new f.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var s;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(s=this.backoff)===null||s===void 0||s.setMin(a),this)}randomizationFactor(a){var s;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(s=this.backoff)===null||s===void 0||s.setJitter(a),this)}reconnectionDelayMax(a){var s;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(s=this.backoff)===null||s===void 0||s.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new cb(this.uri,this.opts);const s=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;const f=wt(s,"open",function(){c.onopen(),a&&a()}),d=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),a?a(g):this.maybeReconnectOnOpen()},y=wt(s,"error",d);if(this._timeout!==!1){const g=this._timeout,p=this.setTimeoutFn(()=>{f(),d(new Error("timeout")),s.close()},g);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(f),this.subs.push(y),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(wt(a,"ping",this.onping.bind(this)),wt(a,"data",this.ondata.bind(this)),wt(a,"error",this.onerror.bind(this)),wt(a,"close",this.onclose.bind(this)),wt(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){ku(()=>{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 pp(this,a,s),this.nsps[a]=c),c}_destroy(a){const s=Object.keys(this.nsps);for(const c of s)if(this.nsps[c].active)return;this._close()}_packet(a){const s=this.encoder.encode(a);for(let c=0;c<s.length;c++)this.engine.write(s[c],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,s){var c;this.cleanup(),(c=this.engine)===null||c===void 0||c.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const c=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(f=>{f?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",f)):a.onreconnect()}))},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const Ka={};function Uu(i,a){typeof i=="object"&&(a=i,i=void 0),a=a||{};const s=ob(i,a.path||"/socket.io"),c=s.source,f=s.id,d=s.path,y=Ka[f]&&d in Ka[f].nsps,g=a.forceNew||a["force new connection"]||a.multiplex===!1||y;let p;return g?p=new Bc(c,a):(Ka[f]||(Ka[f]=new Bc(c,a)),p=Ka[f]),s.query&&!a.query&&(a.query=s.queryKey),p.socket(s.path,a)}Object.assign(Uu,{Manager:Bc,Socket:pp,io:Uu,connect:Uu});const yp=window.location.origin;console.info("[socket] connecting to",yp);const Fc=Uu(yp,{transports:["polling","websocket"],timeout:15e3});Fc.on("connect_error",i=>console.error("connect_error",i.code,i.message,i.data));const vp=x.createContext(Fc),Eb=({children:i})=>m.jsx(vp.Provider,{value:Fc,children:i}),Vu=()=>x.useContext(vp),gp=x.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function Ab(i){return x.useCallback((a,s={})=>new Promise((c,f)=>{i.emit(a,s,(d={})=>{d.error?f(new Error(d.error)):c(d)})}),[i])}function Tb({children:i}){const a=Vu(),s=Ab(a),[c,f]=x.useState(null),[d,y]=x.useState([]),[g,p]=x.useState([]),[v,E]=x.useState(a.connected);x.useEffect(()=>{const C=()=>E(!0),D=()=>E(!1);return a.on("connect",C),a.on("disconnect",D),()=>{a.off("connect",C),a.off("disconnect",D)}},[a]),x.useEffect(()=>{function C(k){f(k)}function D(k=[]){y(k)}function Y(k){y(V=>[...V.slice(-199),k])}return a.on("session:sync",C),a.on("log:init",D),a.on("log:entry",Y),a.on("alert:new",(k={})=>{p(V=>[...V.slice(-49),{...k,receivedAt:Date.now()}])}),()=>{a.off("session:sync",C),a.off("log:init",D),a.off("log:entry",Y),a.off("alert:new")}},[a]);const S=x.useMemo(()=>({login:(C,D)=>s("auth:login",{username:C,password:D}),setRole:C=>s("session:setRole",{role:C}),requestControl:(C,D={})=>s("session:requestControl",{roverId:C,...D}),releaseControl:C=>s("session:releaseControl",{roverId:C}),subscribeAll:()=>s("session:subscribeAll"),lockRover:(C,D)=>s("session:lockRover",{roverId:C,locked:D}),setMode:C=>s("setMode",{mode:C})}),[s]),_=x.useMemo(()=>({connected:v,session:c,logs:d,alerts:g,...S}),[S,g,v,d,c]);return m.jsx(gp.Provider,{value:_,children:i})}function Ut(){return x.useContext(gp)}const bp=x.createContext({frames:{}});function Cb({children:i}){const a=Vu(),[s,c]=x.useState({});x.useEffect(()=>{function d({roverId:y,sensors:g={},frame:p={}}){y&&c(v=>({...v,[y]:{roverId:y,sensors:g,raw:p?.data||null,receivedAt:Date.now()}}))}return a.on("sensorFrame",d),()=>{a.off("sensorFrame",d)}},[a]);const f=x.useMemo(()=>({frames:s}),[s]);return m.jsx(bp.Provider,{value:f,children:i})}function xp(){return x.useContext(bp).frames}function Wc(i){const a=xp();return i?a[i]??null:null}function ul(i,a="--"){return i==null||i===""?a:i}function Ic(){const{connected:i,session:a,requestControl:s}=Ut(),c=a?.assignment?.roverId,f=Wc(c),d=f?.sensors||{},y=d.voltageMv!=null?`${(d.voltageMv/1e3).toFixed(2)} V`:null,g=d.currentMa!=null?`${d.currentMa} mA`:null,p=d.batteryChargeMah,v=d.batteryCapacityMah,E=f?.receivedAt?new Date(f.receivedAt).toLocaleTimeString():null,S=f?.raw?f.raw:null,_=a?.roster??[],C=c?a?.activeDrivers?.[c]:null,D=c?C?C===a?.socketId?"You":C.slice(0,6):"Available":"n/a",Y=x.useMemo(()=>a?.role==="admin"||a?.role==="lockdown"||a?.role==="lockdown-admin",[a?.role]),[k,V]=x.useState({});async function U(H){if(H){V(J=>({...J,[H]:!0}));try{await s(H)}catch(J){alert(J.message)}finally{V(J=>({...J,[H]:!1}))}}}return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"text-sm text-slate-400",children:[m.jsx("span",{children:i?"online":"offline"}),m.jsxs("span",{children:[" · role ",a?.role||"unknown"]}),m.jsxs("span",{children:[" · mode ",a?.mode||"--"]}),E&&m.jsxs("span",{children:[" · sensors ",E]}),m.jsxs("span",{children:[" · driver ",D]})]}),c?f?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex flex-wrap gap-0.5",children:[m.jsx(sl,{label:"Charge",value:ul(p!=null&&v!=null?`${p}/${v}`:null)}),m.jsx(sl,{label:"Charging",value:ul(d.chargingState?.label)}),m.jsx(sl,{label:"OI mode",value:ul(d.oiMode?.label)}),m.jsx(sl,{label:"Voltage",value:ul(y)}),m.jsx(sl,{label:"Current",value:ul(g)}),m.jsx(sl,{label:"Left Encoder",value:ul(d.encoderCountsLeft)}),m.jsx(sl,{label:"Right Encoder",value:ul(d.encoderCountsRight)})]}),m.jsxs("div",{className:"mt-1 flex gap-0.5",children:[m.jsx(Au,{value:d.cliffLeftSignal}),m.jsx(Au,{value:d.cliffFrontLeftSignal}),m.jsx(Au,{value:d.cliffFrontRightSignal}),m.jsx(Au,{value:d.cliffRightSignal})]})]}):m.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Waiting for sensor frames…"}):m.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Assign a rover to view sensors."}),S&&m.jsx("pre",{className:"mt-1 text-wrap break-words p-1 text-xs text-lime-300 bg-gray-700",children:S}),m.jsxs("div",{className:"mt-1",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Rovers"}),_.length===0?m.jsx("p",{className:"text-sm text-slate-500",children:"No roster data."}):m.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:_.map(H=>m.jsxs("li",{className:"flex items-center justify-between gap-1",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-slate-200",children:H.name}),m.jsxs("p",{className:"text-xs text-slate-500",children:[H.locked?"locked":"free"," · ",H.lastSeen?"seen":"unknown"]})]}),Y&&m.jsx("button",{type:"button",onClick:()=>U(H.id),disabled:k[H.id],className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-40",children:k[H.id]?"...":"request"})]},H.id))})]})]})}function Au({value:i}){const s=`${i==null?0:Math.max(0,Math.min(100,i/4095*100))}%`;return m.jsx("div",{className:"w-1/4 h-6 bg-gray-700 rounded-sm overflow-hidden",children:m.jsx("div",{className:"w-full bg-amber-400",style:{height:s}})})}function sl({label:i,value:a}){return m.jsxs("div",{className:"bg-gray-700 rounded-sm p-0.5 text-sm",children:[i,": ",a]})}const xc={main:[-127,127],side:[-127,127],vacuum:[0,127]},Sc={maxSpeed:500,baseSpeed:250,boostSpeed:400},Lc=200,Rb={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Nb={driveForward:["w"],driveBackward:["s"],driveLeft:["a"],driveRight:["d"],boostModifier:["\\\\"],slowModifier:["shift"],auxMainForward:["o"],auxMainReverse:["l"],auxSideForward:["p"],auxSideReverse:[";"],auxVacuumFast:["["],auxVacuumSlow:["'"],auxAllForward:["."],cameraUp:["i"],cameraDown:["k"],driveMacro:["g"],dockMacro:["h"]},Ob=[{id:"drive-sequence",label:"Drive",description:"Start, dock, and full command sequence used by the drive button.",steps:[{type:"oi",command:"start"},{type:"pause",duration:Lc},{type:"oi",command:"dock"},{type:"pause",duration:Lc},{type:"oi",command:"full"}]},{id:"seek-dock",label:"Dock",description:"Send the seek dock command.",steps:[{type:"oi",command:"dock"}]}],Sp="roverControlSettings",Mb=3600*24*365;function Hc(){return{vector:{x:0,y:0,boost:!1},speeds:{left:0,right:0},source:null,lastUpdatedAt:0}}function qc(){return{main:0,side:0,vacuum:0}}function zb(){return{enabled:!1,angle:null,config:null}}const Db={roverId:null,mode:"drive",drive:Hc(),aux:qc(),camera:zb(),macros:Ob,keymap:Nb,inputs:{},settings:{status:"idle",error:null,lastLoadedAt:null,lastSavedAt:null,data:null}};function wb(i,a){const s={status:"ready",error:null,lastLoadedAt:Date.now(),lastSavedAt:i.settings.lastSavedAt,data:a??i.settings.data},c={...i,settings:s};return a?.keymap&&(c.keymap={...i.keymap,...a.keymap}),a?.macros&&(c.macros=a.macros),c}function jb(i,a){switch(a.type){case"control/set-rover":return{...i,roverId:a.payload??null,drive:a.payload?i.drive:Hc(),aux:a.payload?i.aux:qc()};case"control/set-mode":return i.mode===a.payload?i:{...i,mode:a.payload==="dock"?"dock":"drive"};case"control/update-drive":{const{vector:s,speeds:c,source:f}=a.payload;return{...i,drive:{vector:s??i.drive.vector,speeds:c??i.drive.speeds,source:f??i.drive.source,lastUpdatedAt:Date.now()}}}case"control/set-aux-motors":return{...i,aux:{...i.aux,...a.payload}};case"control/set-camera-config":return{...i,camera:{...i.camera,enabled:!!a.payload?.config,config:a.payload?.config??null,angle:typeof a.payload?.angle=="number"?a.payload.angle:a.payload?.config?a.payload.config.homeAngle??i.camera.angle:null}};case"control/set-camera-angle":return{...i,camera:{...i.camera,angle:a.payload}};case"control/register-input-state":{const s=a.payload?.source||"unknown";return{...i,inputs:{...i.inputs,[s]:{...i.inputs[s]??{},...a.payload?.state,updatedAt:Date.now()}}}}case"control/settings/loading":return{...i,settings:{...i.settings,status:"loading",error:null}};case"control/settings/loaded":return wb(i,a.payload);case"control/settings/error":return{...i,settings:{...i.settings,status:"error",error:a.payload}};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:Hc(),aux:qc()};default:return i}}function Pa(i,a,s){return typeof i!="number"||Number.isNaN(i)?a:Math.max(a,Math.min(s,i))}function rl(i){return typeof i!="number"||Number.isNaN(i)?0:Math.max(-1,Math.min(1,i))}function Ja(i,a){return!Array.isArray(a)||a.length!==2?i:Pa(i,a[0],a[1])}function Ub(i={}){const a=rl(i.x??0),s=rl(i.y??0);return{x:a,y:s,boost:!!i.boost}}function Bb(i={},a={}){const s=Ub(i),c=typeof a.maxSpeed=="number"?a.maxSpeed:Sc.maxSpeed,f=typeof a.baseSpeed=="number"?a.baseSpeed:Sc.baseSpeed,d=typeof a.boostSpeed=="number"?a.boostSpeed:Sc.boostSpeed,y=s.boost?d:f,g=s.y*y,p=s.x*y;return{vector:s,speeds:{left:Pa(Math.round(g+p),-c,c),right:Pa(Math.round(g-p),-c,c)}}}function Lb(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 Nm(i){return new Promise(a=>setTimeout(a,i))}function Hb(){const i=Vu(),{session:a}=Ut(),s=a?.assignment?.roverId,c=x.useMemo(()=>!s||!Array.isArray(a?.roster)?null:a.roster.find(_=>String(_.id)===String(s))||null,[s,a?.roster]),f=x.useMemo(()=>!c?.cameraServo||!c.cameraServo.enabled?null:c.cameraServo,[c]),d=x.useCallback((_,C)=>{s&&i.emit("command",{roverId:s,..._},C)},[i,s]),y=x.useCallback(()=>{s&&d({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[d,s]),g=x.useCallback(_=>{if(!s)return null;const C={left:Ja(_?.left??0,[-500,500]),right:Ja(_?.right??0,[-500,500])};return d({type:"drive",data:{driveDirect:C}}),C},[d,s]),p=x.useCallback(({main:_=0,side:C=0,vacuum:D=0}={})=>{if(!s)return null;const Y={main:Ja(_,xc.main),side:Ja(C,xc.side),vacuum:Ja(D,xc.vacuum)};return d({type:"motors",data:{motorPwm:Y}}),Y},[d,s]),v=x.useCallback(_=>!s||!f?null:(d({type:"servo",data:{servo:{angle:_}}}),_),[d,s,f]),E=x.useCallback(_=>{if(!s)return!1;const C=Array.isArray(_)?_:typeof _=="string"?Rb[_]:null;return C?(d({type:"raw",data:{raw:Lb(C)}}),y(),!0):!1},[d,y,s]),S=x.useCallback(async _=>{if(!(!_||!Array.isArray(_.steps)||!s))for(const C of _.steps){if(!s)break;switch(C.type){case"oi":E(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 Nm(C.duration??Lc);break}if(C.delay||C.delayMs){const D=C.delayMs??C.delay;typeof D=="number"&&D>0&&await Nm(D)}}},[s,E,g,p,v]);return x.useMemo(()=>({roverId:s,rosterEntry:c,servoConfig:f,emitCommand:d,enableSensorStream:y,sendDriveDirect:g,sendAuxMotors:p,sendServoAngle:v,sendOiCommand:E,runMacroSteps:S}),[s,c,f,d,y,g,p,v,E,S])}function qb(i){try{const a=decodeURIComponent(i??"");return JSON.parse(a)}catch(a){return console.warn("Failed to parse control settings cookie",a),null}}function Om(){if(typeof document>"u")return null;const i=`${Sp}=`,a=document.cookie.split(";").map(c=>c.trim()).find(c=>c.startsWith(i));if(!a)return null;const s=a.substring(i.length);return qb(s)}function kb(i){if(typeof document>"u")return!1;try{const a=encodeURIComponent(JSON.stringify(i??{})),s=`${Sp}=${a}; path=/; max-age=${Mb}; samesite=strict`;return document.cookie=s,!0}catch(a){return console.warn("Failed to write control settings cookie",a),!1}}const _p=x.createContext(null);function Yb(i,a){if(!i)return a;const s=typeof i.minAngle=="number"?i.minAngle:-45,c=typeof i.maxAngle=="number"?i.maxAngle:45;return Pa(a,s,c)}function Vb({children:i}){const a=Hb(),[s,c]=x.useReducer(jb,Db);x.useEffect(()=>{c({type:"control/set-rover",payload:a.roverId})},[a.roverId]),x.useEffect(()=>{c({type:"control/settings/loading"});const U=Om();c({type:"control/settings/loaded",payload:U})},[]),x.useEffect(()=>{const U=a.servoConfig;if(!U){c({type:"control/set-camera-config",payload:{config:null}});return}const H=typeof U.minAngle=="number"?U.minAngle:-45,J=typeof U.maxAngle=="number"?U.maxAngle:45,oe=typeof U.homeAngle=="number"?U.homeAngle:(H+J)/2;c({type:"control/set-camera-config",payload:{config:U,angle:Pa(oe,H,J)}})},[a.servoConfig]),x.useEffect(()=>{a.roverId&&a.enableSensorStream()},[a.roverId,a.enableSensorStream]);const f=x.useCallback(U=>{c({type:"control/set-mode",payload:U})},[]),d=x.useCallback((U,H={})=>{const J=Bb(U);c({type:"control/update-drive",payload:{...J,source:H.source??null}}),a.sendDriveDirect(J.speeds)},[a]),y=x.useCallback((U={})=>{const H=a.sendAuxMotors(U)??U;c({type:"control/set-aux-motors",payload:H})},[a]),g=x.useCallback(U=>{if(!a.servoConfig)return;const H=Yb(a.servoConfig,U);c({type:"control/set-camera-angle",payload:H}),a.sendServoAngle(H)},[a]),p=x.useCallback((U=0)=>{const H=a.servoConfig;if(!H)return;const J=typeof U=="number"&&U!==0?U:H.nudgeDegrees||1,oe=typeof s.camera.angle=="number"?s.camera.angle:typeof H.homeAngle=="number"?H.homeAngle:0;g(oe+J)},[a.servoConfig,g,s.camera.angle]),v=x.useCallback(()=>{const U=a.servoConfig;if(!U)return;const H=typeof U.homeAngle=="number"?U.homeAngle:typeof U.minAngle=="number"&&typeof U.maxAngle=="number"?(U.minAngle+U.maxAngle)/2:0;g(H)},[a.servoConfig,g]),E=x.useCallback(async U=>{const H=s.macros.find(J=>J.id===U)||null;H&&await a.runMacroSteps(H)},[a,s.macros]),S=x.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]),_=x.useCallback(U=>{a.sendOiCommand(U)},[a]),C=x.useCallback(U=>{a.roverId&&a.emitCommand({type:"sensorStream",data:{sensorStream:{enable:U}}})},[a]),D=x.useCallback((U,H)=>{c({type:"control/register-input-state",payload:{source:U,state:H}})},[]),Y=x.useCallback(()=>{c({type:"control/settings/loading"});const U=Om();c({type:"control/settings/loaded",payload:U})},[]),k=x.useCallback(U=>{const H={...s.settings.data??{},...U??{}},J=kb(H);return c(J?{type:"control/settings/loaded",payload:H}:{type:"control/settings/error",payload:new Error("Failed to save control settings")}),J},[s.settings.data]),V=x.useMemo(()=>({state:s,dispatch:c,pipeline:a,actions:{setMode:f,setDriveVector:d,setAuxMotors:y,setServoAngle:g,nudgeServo:p,goServoHome:v,runMacro:E,stopAllMotion:S,sendOiCommand:_,setSensorStream:C,registerInputState:D,reloadSettings:Y,persistSettings:k}}),[s,a,f,d,y,g,p,v,E,S,_,C,D,Y,k]);return m.jsx(_p.Provider,{value:V,children:i})}function qn(){const i=x.useContext(_p);if(!i)throw new Error("useControlSystem must be used within ControlSystemProvider");return i}const _c="keyboard",Ec={x:0,y:0,boost:!1},Ac={main:0,side:0,vacuum:0};function Gb(i){const a=i.target;if(!a)return!1;const s=a.tagName;return s==="INPUT"||s==="TEXTAREA"||a.isContentEditable||s==="SELECT"}function Xb(i={}){const a=Object.entries(i).map(([s,c])=>{const f=Array.isArray(c)?c:[c],d=new Set(f.map(y=>String(y).toLowerCase()));return[s,d]});return Object.fromEntries(a)}function Tu(i,a){return!i||i.size===0?!1:i.has(a)}function vt(i,a){if(!i||i.size===0)return!1;for(const s of a)if(i.has(s))return!0;return!1}function Qb(i,a){const s=vt(a.driveForward,i),c=vt(a.driveBackward,i),f=vt(a.driveLeft,i),d=vt(a.driveRight,i),y=vt(a.boostModifier,i),g=vt(a.slowModifier,i);let p=0;s&&!c?p=1:c&&!s&&(p=-1);let v=0;f&&!d?v=-1:d&&!f&&(v=1);const E=g?.4:1;return{x:v*E,y:p*E,boost:y&&!g}}function Zb(i,a){if(vt(a.auxAllForward,i))return{main:127,side:127,vacuum:127};const c=vt(a.auxMainForward,i)?127:vt(a.auxMainReverse,i)?-127:0,f=vt(a.auxSideForward,i)?127:vt(a.auxSideReverse,i)?-70:0,d=vt(a.auxVacuumFast,i)?127:vt(a.auxVacuumSlow,i)?50:0;return{main:c,side:f,vacuum:d}}function Kb(i,a){return i&&a&&i.x===a.x&&i.y===a.y&&i.boost===a.boost}function Jb(i,a){return i&&a&&i.main===a.main&&i.side===a.side&&i.vacuum===a.vacuum}function $b(){const{state:i,actions:{setMode:a,setDriveVector:s,setAuxMotors:c,nudgeServo:f,runMacro:d,stopAllMotion:y,registerInputState:g}}=qn(),p=x.useMemo(()=>Xb(i.keymap),[i.keymap]),v=Math.abs(i.camera?.config?.nudgeDegrees)||1,E=x.useRef(new Set),S=x.useRef(Ec),_=x.useRef(Ac),C=x.useCallback(()=>{const Y=E.current,k=Qb(Y,p),V=Zb(Y,p);Kb(k,S.current)||(S.current=k,s(k,{source:_c})),Jb(V,_.current)||(_.current=V,c(V)),g(_c,{keys:Array.from(Y),vector:k,aux:V})},[p,g,c,s]),D=x.useCallback(()=>{E.current.clear(),S.current=Ec,_.current=Ac,y(),g(_c,{keys:[],vector:Ec,aux:Ac})},[g,y]);return x.useEffect(()=>{function Y(U){if(Gb(U))return;const H=U.key?.toLowerCase();H&&(E.current.has(H)||(E.current.add(H),Tu(p.driveMacro,H)?(U.preventDefault(),a("drive"),d("drive-sequence")):Tu(p.dockMacro,H)?(U.preventDefault(),a("dock"),d("seek-dock")):Tu(p.cameraUp,H)?(U.preventDefault(),f(v)):Tu(p.cameraDown,H)&&(U.preventDefault(),f(-v)),C()))}function k(U){const H=U.key?.toLowerCase();!H||!E.current.has(H)||(E.current.delete(H),C())}function V(){D()}return window.addEventListener("keydown",Y),window.addEventListener("keyup",k),window.addEventListener("blur",V),()=>{window.removeEventListener("keydown",Y),window.removeEventListener("keyup",k),window.removeEventListener("blur",V)}},[p,f,D,d,v,a,C]),x.useEffect(()=>{D()},[i.roverId,D]),null}const Cu="gamepad",Fb=.2;function Tc(i){return Math.abs(i)<Fb?0:i}function Mm(i,a,s=127,c=1){if(!i)return 0;const f=typeof i.value=="number"?i.value:i.pressed?1:0;if(f<.05)return 0;const d=a?.pressed?-1:1;return Math.round(f*s*d*c)}function zm(i,a){return i&&a&&i.x===a.x&&i.y===a.y&&i.boost===a.boost}function Dm(i,a){return i&&a&&i.main===a.main&&i.side===a.side&&i.vacuum===a.vacuum}function Wb(){const{actions:{setMode:i,setDriveVector:a,setAuxMotors:s,nudgeServo:c,runMacro:f,registerInputState:d}}=qn(),y=x.useRef(null),g=x.useRef({x:0,y:0,boost:!1}),p=x.useRef({main:0,side:0,vacuum:0}),v=x.useRef(new Map),E=x.useRef(0),S=x.useCallback((C,D)=>{const Y=v.current.get(C)||!1;return v.current.set(C,D),D&&!Y},[]),_=x.useCallback(()=>{if(typeof navigator>"u"||!navigator.getGamepads)return;const C=navigator.getGamepads(),D=C&&Array.from(C).find(Boolean);if(!D){zm(g.current,{x:0,y:0,boost:!1})||(g.current={x:0,y:0,boost:!1},a({x:0,y:0,boost:!1},{source:Cu})),Dm(p.current,{main:0,side:0,vacuum:0})||(p.current={main:0,side:0,vacuum:0},s({main:0,side:0,vacuum:0})),d(Cu,{connected:!1});return}const Y=rl(Tc(D.axes?.[0]??0)),k=rl(Tc(-(D.axes?.[1]??0))),V={x:Y,y:k,boost:!1};zm(V,g.current)||(g.current=V,a(V,{source:Cu}));const U=Mm(D.buttons?.[7],D.buttons?.[5]),H=Mm(D.buttons?.[6],D.buttons?.[4],127,.55),J=D.buttons?.[1]?.pressed?127:0;let oe={main:U,side:H,vacuum:J};D.buttons?.[0]?.pressed&&(oe={main:127,side:127,vacuum:127}),Dm(oe,p.current)||(p.current=oe,s(oe));const Ae=rl(Tc(-(D.axes?.[3]??0))),F=performance.now();Math.abs(Ae)>.25&&F-E.current>120&&(E.current=F,c(Ae>0?2:-2)),S(14,D.buttons?.[14]?.pressed)&&(i("drive"),f("drive-sequence")),S(15,D.buttons?.[15]?.pressed)&&(i("dock"),f("seek-dock")),d(Cu,{connected:!0,id:D.id,index:D.index,axes:[Y,k,Ae],buttons:{a:D.buttons?.[0]?.pressed||!1,b:D.buttons?.[1]?.pressed||!1,lb:D.buttons?.[4]?.pressed||!1,rb:D.buttons?.[5]?.pressed||!1}})},[S,c,d,f,s,a,i]);return x.useEffect(()=>{function C(){_(),y.current=requestAnimationFrame(C)}return y.current=requestAnimationFrame(C),()=>{y.current&&cancelAnimationFrame(y.current)}},[_]),null}function Pc(){const{state:{roverId:i},actions:a}=qn(),c=Wc(i)?.sensors||{},f=(c.oiMode?.label||"").toLowerCase()==="full",d=!!c.chargingSources?.homeBase,y=!!(c.chargingState?.label&&c.chargingState.label.toLowerCase()!=="not charging"),g=()=>{i&&(a.setMode("drive"),a.runMacro("drive-sequence"))},p=()=>{i&&(a.setMode("dock"),a.runMacro("seek-dock"))};return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[m.jsx("span",{children:"Drive control"}),m.jsx("span",{children:i?`Rover ${i}`:"unassigned"})]}),m.jsxs("div",{className:"mt-1 space-y-1",children:[m.jsx(wm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:f?"Ready!":"Not Ready!",active:f}],tone:"emerald",onClick:g,disabled:!i}),m.jsx(wm,{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 wm({title:i,description:a,statuses:s,tone:c,onClick:f,disabled:d,footnote:y}){const g=c==="indigo"?"bg-indigo-600":"bg-emerald-600";return m.jsxs("button",{type:"button",onClick:f,disabled:d,className:`w-full rounded-lg ${g} px-1 py-1 text-left text-white disabled:opacity-40`,children:[m.jsx("p",{className:"text-base font-semibold",children:i}),m.jsx("p",{className:"text-sm text-white/90",children:a}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:s.map(p=>m.jsx("span",{className:`rounded-full px-1 py-0.5 text-xs font-semibold ${p.active?"bg-lime-300 text-emerald-900":"bg-emerald-900 text-emerald-100"}`,children:p.label},p.label))}),y&&m.jsx("p",{className:"mt-1 text-xs text-emerald-50/80",children:y})]})}const Ib=5e3;function Pb(i){return i.id?i.id:i.timestamp?`${i.timestamp}-${i.message}`:`${i.title||"alert"}-${i.message}`}function e1(){const{alerts:i}=Ut(),[a,s]=x.useState(()=>Date.now()),c=x.useMemo(()=>i.slice(-5).map(d=>({alert:d,key:Pb(d)})),[i]);x.useEffect(()=>{if(!c.length)return;const d=setInterval(()=>s(Date.now()),200);return()=>clearInterval(d)},[c.length]);const f=c.map(d=>({...d,age:a-(d.alert.receivedAt??d.alert.timestamp??0)})).filter(d=>d.age<=Ib);return f.length?m.jsx("div",{className:"pointer-events-none fixed top-1 left-1/2 z-50 flex -translate-x-1/2 flex-col gap-1",children:f.map(d=>m.jsx(t1,{alert:d.alert},d.key))}):null}function t1({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 m.jsxs("div",{className:`pointer-events-auto rounded-sm px-1 py-1 text-[0.75rem] shadow-lg shadow-black/60 ${a}`,children:[m.jsx("p",{className:"text-[0.65rem] text-slate-300",children:i.title||"Alert"}),m.jsx("p",{className:"text-sm text-white",children:i.message})]})}const n1=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function eo(){const{session:i,lockRover:a,setMode:s,requestControl:c}=Ut(),f=x.useMemo(()=>i?.roster??[],[i?.roster]),[d,y]=x.useState({}),g=i?.role==="admin"||i?.role==="lockdown"||i?.role==="lockdown-admin",p=i?.mode??"open",v=async(C,D)=>{try{await a(C,D),y(Y=>({...Y,[C]:D}))}catch(Y){alert(Y.message)}},E=async C=>{const D=C.target.value;try{await s(D)}catch(Y){alert(Y.message)}},S=async C=>{try{await c(C,{force:!0})}catch(D){alert(D.message)}},_=x.useMemo(()=>{const C={};return f.forEach(D=>{C[D.id]=d[D.id]??D.locked}),C},[f,d]);return g?m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between gap-1 text-sm",children:[m.jsx("span",{children:"Admin controls"}),m.jsx("select",{value:p,onChange:E,className:"rounded-sm bg-black/40 px-1 py-1 text-sm text-slate-100",children:n1.map(C=>m.jsx("option",{value:C.key,children:C.label},C.key))})]}),m.jsx("div",{className:"mt-1 space-y-1 text-sm",children:f.map(C=>m.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 rounded-sm bg-black/30 px-1 py-1",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-slate-100",children:C.name}),m.jsx("p",{className:"text-xs text-slate-400",children:_[C.id]?"locked":"unlocked"})]}),m.jsxs("div",{className:"flex flex-wrap gap-1 text-xs",children:[m.jsx("button",{type:"button",onClick:()=>v(C.id,!_[C.id]),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:_[C.id]?"Unlock":"Lock"}),m.jsx("button",{type:"button",onClick:()=>S(C.id),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:"Force"})]})]},C.id))})]}):null}var Cc={},cn={},Rc={},jm;function Gu(){return jm||(jm=1,(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.JoystickShape=void 0,(function(a){a.Circle="circle",a.Square="square",a.AxisY="axisY",a.AxisX="axisX"})(i.JoystickShape||(i.JoystickShape={}))})(Rc)),Rc}var $a={},Um;function l1(){if(Um)return $a;Um=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.shapeFactory=void 0;var i=Gu(),a=function(s,c){switch(s){case i.JoystickShape.Square:return{borderRadius:Math.sqrt(c)};case i.JoystickShape.Circle:default:return{borderRadius:c}}};return $a.shapeFactory=a,$a}var Fa={},Bm;function a1(){if(Bm)return Fa;Bm=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.shapeBoundsFactory=void 0;var i=Gu(),a=function(c,f,d,y,g,p,v,E,S){switch(c){case i.JoystickShape.Square:return y=s(f-S.left-E/2,E),g=s(d-S.top-E/2,E),{relativeX:y,relativeY:g};case i.JoystickShape.AxisX:return y=s(f-S.left-E/2,E),g=0,{relativeX:y,relativeY:g};case i.JoystickShape.AxisY:return y=0,g=s(d-S.top-E/2,E),{relativeX:y,relativeY:g};default:return p>v&&(y*=v/p,g*=v/p),{relativeX:y,relativeY:g}}};Fa.shapeBoundsFactory=a;var s=function(c,f){var d=f/2;return c>d?d:c<-d?d*-1:c};return Fa}var Lm;function i1(){if(Lm)return cn;Lm=1;var i=cn&&cn.__extends||(function(){var v=function(E,S){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,C){_.__proto__=C}||function(_,C){for(var D in C)Object.prototype.hasOwnProperty.call(C,D)&&(_[D]=C[D])},v(E,S)};return function(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");v(E,S);function _(){this.constructor=E}E.prototype=S===null?Object.create(S):(_.prototype=S.prototype,new _)}})(),a=cn&&cn.__assign||function(){return a=Object.assign||function(v){for(var E,S=1,_=arguments.length;S<_;S++){E=arguments[S];for(var C in E)Object.prototype.hasOwnProperty.call(E,C)&&(v[C]=E[C])}return v},a.apply(this,arguments)};Object.defineProperty(cn,"__esModule",{value:!0}),cn.Joystick=void 0;var s=Lu(),c=Gu(),f=l1(),d=a1(),y;(function(v){v.PointerDown="pointerdown",v.PointerMove="pointermove",v.PointerUp="pointerup"})(y||(y={}));var g;(function(v){v[v.TopRight=2.35619449]="TopRight",v[v.TopLeft=-2.35619449]="TopLeft",v[v.BottomRight=.785398163]="BottomRight",v[v.BottomLeft=-.785398163]="BottomLeft"})(g||(g={}));var p=(function(v){i(E,v);function E(S){var _=v.call(this,S)||this;return _._stickRef=s.createRef(),_._baseRef=s.createRef(),_.frameId=null,_._pointerId=null,_._mounted=!1,_._pointerMove=function(C){if(C.preventDefault(),_.state.dragging){if(!_.props.followCursor&&C.pointerId!==_._pointerId)return;var D=C.clientX,Y=C.clientY,k=D-_._parentRect.left-_._radius,V=Y-_._parentRect.top-_._radius,U=_._distance(k,V),H=(0,d.shapeBoundsFactory)(_.props.controlPlaneShape||_.props.baseShape,D,Y,k,V,U,_._radius,_._baseSize,_._parentRect);k=H.relativeX,V=H.relativeY;var J=Math.atan2(k,V);_._updatePos({relativeX:k,relativeY:V,distance:_._distanceToPercentile(U),direction:_._getDirection(J),axisX:D-_._parentRect.left,axisY:Y-_._parentRect.top})}},_._pointerUp=function(C){if(C.pointerId===_._pointerId){var D={dragging:!1};_.props.sticky||(D.coordinates=void 0),_.frameId=window.requestAnimationFrame(function(){_._mounted&&_.setState(D)}),window.removeEventListener(y.PointerUp,_._pointerUp),window.removeEventListener(y.PointerMove,_._pointerMove),_._pointerId=null,_.props.stop&&_.props.stop({type:"stop",x:_.props.sticky?_.state.coordinates.relativeX*2/_._baseSize:null,y:_.props.sticky?_.state.coordinates.relativeY*2/_._baseSize:null,direction:_.props.sticky?_.state.coordinates.direction:null,distance:_.props.sticky?_.state.coordinates.distance:null})}},_.state={dragging:!1},_._throttleMoveCallback=(function(){var C=0;return function(D){var Y=new Date().getTime(),k=_.props.throttle||0;if(!(Y-C<k)&&(C=Y,_.props.move))return _.props.move(D)}})(),_}return E.prototype.componentWillUnmount=function(){var S=this;this._mounted=!1,this.props.followCursor&&window.removeEventListener(y.PointerMove,function(_){return S._pointerMove(_)}),this.frameId!==null&&window.cancelAnimationFrame(this.frameId)},E.prototype.componentDidMount=function(){var S=this;this._mounted=!0,this.props.followCursor&&(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(y.PointerMove,function(_){return S._pointerMove(_)}),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},E.prototype._updatePos=function(S){var _=this;this.frameId=window.requestAnimationFrame(function(){_._mounted&&_.setState({coordinates:S})}),!(typeof this.props.minDistance=="number"&&S.distance<this.props.minDistance)&&this._throttleMoveCallback({type:"move",x:S.relativeX*2/this._baseSize,y:-(S.relativeY*2/this._baseSize),direction:S.direction,distance:S.distance})},E.prototype._pointerDown=function(S){this.props.disabled||this.props.followCursor||(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(y.PointerUp,this._pointerUp),window.addEventListener(y.PointerMove,this._pointerMove),this._pointerId=S.pointerId,this._stickRef.current.setPointerCapture(S.pointerId),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},E.prototype._getDirection=function(S){return S>g.TopRight||S<g.TopLeft?"FORWARD":S<g.TopRight&&S>g.BottomRight?"RIGHT":S<g.BottomLeft?"LEFT":"BACKWARD"},E.prototype._distance=function(S,_){return Math.hypot(S,_)},E.prototype._distanceToPercentile=function(S){var _=S/(this._baseSize/2)*100;return _>100?100:_},E.prototype.getBaseShapeStyle=function(){var S=this.props.baseShape||c.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},E.prototype.getStickShapeStyle=function(){var S=this.props.stickShape||c.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},E.prototype._getBaseStyle=function(){var S=this.props.baseColor!==void 0?this.props.baseColor:"#000033",_="".concat(this._baseSize,"px"),C=a(a({},this.getBaseShapeStyle()),{height:_,width:_,background:S,display:"flex",justifyContent:"center",alignItems:"center"});return this.props.baseImage&&(C.background="url(".concat(this.props.baseImage,")"),C.backgroundSize="100%"),C},E.prototype._getStickStyle=function(){var S=this.props.stickColor!==void 0?this.props.stickColor:"#3D59AB",_=this._stickSize?"".concat(this._stickSize,"px"):"".concat(this._baseSize/1.5,"px"),C=a(a({},this.getStickShapeStyle()),{background:S,cursor:"move",height:_,width:_,border:"none",flexShrink:0,touchAction:"none"});return this.props.stickImage&&(C.background="url(".concat(this.props.stickImage,")"),C.backgroundSize="100%"),this.props.pos&&(C=Object.assign({},C,{position:"absolute",transform:"translate3d(".concat(this.props.pos.x*this._baseSize/2,"px, ").concat(-(this.props.pos.y*this._baseSize)/2,"px, 0)")})),this.state.coordinates!==void 0&&(C=Object.assign({},C,{position:"absolute",transform:"translate3d(".concat(this.state.coordinates.relativeX,"px, ").concat(this.state.coordinates.relativeY,"px, 0)")})),C},E.prototype.render=function(){var S=this;this._baseSize=this.props.size||100,this._stickSize=this.props.stickSize,this._radius=this._baseSize/2;var _=this._getBaseStyle(),C=this._getStickStyle();return s.createElement("div",{"data-testid":"joystick-base",className:this.props.disabled?"joystick-base-disabled":"",ref:this._baseRef,style:_},s.createElement("button",{ref:this._stickRef,disabled:this.props.disabled,onPointerDown:function(D){return S._pointerDown(D)},className:this.props.disabled?"joystick-disabled":"",style:C}))},E})(s.Component);return cn.Joystick=p,cn}var Hm;function u1(){return Hm||(Hm=1,(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.JoystickShape=i.Joystick=void 0;var a=i1();Object.defineProperty(i,"Joystick",{enumerable:!0,get:function(){return a.Joystick}});var s=Gu();Object.defineProperty(i,"JoystickShape",{enumerable:!0,get:function(){return s.JoystickShape}})})(Cc)),Cc}var s1=u1();function r1({size:i="default"}){const{state:{roverId:a,mode:s},actions:c}=qn(),[f,d]=x.useState(null),y=!a||f!==null,g=async()=>{if(a){d("drive");try{c.setMode("drive"),await c.runMacro("drive-sequence")}finally{d(null)}}},p=async()=>{if(a){d("dock");try{c.setMode("dock"),await c.runMacro("seek-dock")}finally{d(null)}}},v=i==="compact"?"text-xs px-1 py-0.5":"text-sm px-1.5 py-0.5",E=s==="dock"?"Dock mode":"Drive mode";return m.jsxs("div",{className:"rounded-sm bg-black/30 p-1 text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("span",{className:`rounded-full bg-slate-800 ${v}`,children:E}),m.jsxs("span",{className:"text-[0.65rem] text-slate-400",children:["Rover ",a??"—"]})]}),m.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-1 text-xs",children:[m.jsx("button",{type:"button",onClick:g,disabled:y,className:`rounded-sm bg-emerald-600 px-1 py-1 font-semibold uppercase tracking-wide text-emerald-50 disabled:opacity-40 ${i==="compact"?"text-xs":"text-sm"}`,children:"Drive"}),m.jsx("button",{type:"button",onClick:p,disabled:y,className:`rounded-sm bg-indigo-600 px-1 py-1 font-semibold uppercase tracking-wide text-indigo-50 disabled:opacity-40 ${i==="compact"?"text-xs":"text-sm"}`,children:"Dock"})]})]})}const Ru="mobile-joystick",c1=[{id:"main-forward",label:"Main +",values:{main:127},hold:!0},{id:"main-reverse",label:"Main -",values:{main:-127},hold:!0},{id:"side-forward",label:"Side +",values:{side:127},hold:!0},{id:"side-reverse",label:"Side -",values:{side:-70},hold:!0},{id:"vacuum-fast",label:"Vacuum Max",values:{vacuum:127},hold:!0},{id:"vacuum-slow",label:"Vacuum Low",values:{vacuum:50},hold:!0},{id:"all-forward",label:"All +",values:{main:127,side:127,vacuum:127},hold:!0},{id:"stop-all",label:"Stop",values:{main:0,side:0,vacuum:0},hold:!1}];function Ep({layout:i}){const{state:{roverId:a},actions:{setDriveVector:s,registerInputState:c,stopAllMotion:f}}=qn(),d=!a,y=x.useCallback((p={})=>{if(d)return;const v={x:rl(p.x??0),y:rl(p.y??0),boost:!!p.shiftKey};s(v,{source:Ru}),c(Ru,{vector:v,lastEvent:"move"})},[d,c,s]),g=x.useCallback(()=>{if(d)return;const p={x:0,y:0,boost:!1};s(p,{source:Ru}),c(Ru,{vector:p,lastEvent:"stop"})},[d,c,s]);return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx(r1,{size:"compact"}),m.jsxs("div",{className:"mt-1 flex flex-col gap-1",children:[m.jsx("div",{className:"flex items-center justify-center",children:m.jsx(s1.Joystick,{size:i==="landscape"?140:120,baseColor:"#0f172a",stickColor:"#38bdf8",throttle:60,move:y,stop:g,disabled:d})}),m.jsx("p",{className:"text-[0.7rem] text-slate-400",children:"Drag to steer · Release to stop sending drive commands."}),m.jsx("button",{type:"button",onClick:f,disabled:d,className:"rounded-sm bg-red-600 px-1 py-1 text-xs font-semibold uppercase tracking-wide text-red-100 disabled:opacity-40",children:"Panic Stop"})]})]})}function Ap({orientation:i}){const{state:{roverId:a},actions:{setAuxMotors:s}}=qn(),c=x.useRef(null),f=!a,d=x.useCallback(p=>{if(!f){if(p.hold===!1){s(p.values),c.current=null;return}c.current=p.id,s(p.values)}},[f,s]),y=x.useCallback(p=>{f||p.hold===!1||c.current===p.id&&(c.current=null,s({main:0,side:0,vacuum:0}))},[f,s]),g=i==="landscape"?"text-xs":"text-[0.75rem]";return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Aux motors · hold to run"}),m.jsx("div",{className:"mt-1 grid grid-cols-2 gap-1",children:c1.map(p=>m.jsx("button",{type:"button",disabled:f,onPointerDown:v=>{v.preventDefault(),d(p)},onPointerUp:()=>y(p),onPointerLeave:()=>y(p),onPointerCancel:()=>y(p),className:`rounded-sm bg-black/40 px-1 py-1 text-left text-slate-100 disabled:opacity-30 ${g}`,children:p.label},p.id))})]})}function o1(){return m.jsx("div",{className:"flex flex-col gap-1",children:m.jsx(Ap,{orientation:"landscape"})})}function f1(){return m.jsx("div",{className:"flex flex-col gap-1",children:m.jsx(Ep,{layout:"landscape"})})}function d1(){return m.jsx("section",{className:"rounded-sm bg-transparent",children:m.jsxs("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:[m.jsx(Ap,{orientation:"portrait"}),m.jsx(Ep,{layout:"portrait"})]})})}function to(){return m.jsxs("div",{className:"min-h-[8rem] rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-center text-sm text-slate-400",children:"Room camera"}),m.jsx("p",{className:"mt-1 text-center",children:"Feed placeholder. Wire upcoming room cam here."})]})}function no(){const{logs:i}=Ut();return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-400",children:[m.jsx("span",{children:"Server logs"}),m.jsx("span",{children:i.length})]}),m.jsx("div",{className:"mt-1 h-64 overflow-y-auto rounded-sm bg-black/40 p-1 font-mono text-xs",children:i.length===0?m.jsx("p",{children:"No logs yet."}):i.slice().reverse().map(a=>m.jsxs("div",{className:"mb-1",children:[m.jsx("span",{className:"text-amber-400",children:a.timestamp})," ",m.jsxs("span",{className:"text-lime-400",children:["[",a.level,"]"]})," ",a.label&&m.jsxs("span",{className:"text-teal-400",children:["[",a.label,"]"]})," ",m.jsx("span",{children:a.message})]},a.id))})]})}function Xu(){const{login:i,setRole:a}=Ut(),[s,c]=x.useState(""),[f,d]=x.useState(""),[y,g]=x.useState(!1);async function p(v){v.preventDefault(),g(!0);try{await i(s,f),c(""),d("")}catch(E){alert(E.message)}finally{g(!1)}}return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),m.jsxs("form",{className:"mt-1 flex flex-col gap-1",onSubmit:p,children:[m.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Username",value:s,onChange:v=>c(v.target.value)}),m.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Password",type:"password",value:f,onChange:v=>d(v.target.value)}),m.jsx("button",{type:"submit",disabled:y,className:"rounded-sm bg-slate-200 px-1 py-1 text-sm font-semibold text-black disabled:opacity-50",children:y?"Logging in…":"Login"})]}),m.jsxs("div",{className:"mt-1 flex gap-1 text-sm",children:[m.jsx("button",{type:"button",onClick:()=>a("user"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Driver"}),m.jsx("button",{type:"button",onClick:()=>a("spectator"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Spectator"})]})]})}function Tp(i=[]){const a=Vu(),[s,c]=x.useState({}),f=Array.isArray(i)?i.filter(Boolean).join("|"):"";return x.useEffect(()=>{if(!f)return;const y=f.split("|");let g=!1;return y.forEach(p=>{a.emit("video:request",{roverId:p},(v={})=>{g||c(E=>({...E,[p]:v}))})}),()=>{g=!0}},[a,f]),x.useMemo(()=>{if(!f)return{};const y=f.split("|"),g={};return y.forEach(p=>{s[p]&&(g[p]=s[p])}),g},[f,s])}const h1={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function m1(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 p1(i){if(!i)return{};const a=`${i}:${i}`;return{Authorization:`Basic ${m1(a)}`}}class y1{constructor({url:a,token:s,video:c,onStatus:f}){this.url=a,this.token=s,this.video=c,this.pc=null,this.abortController=null,this.onStatus=f}notify(a,s){typeof this.onStatus=="function"&&this.onStatus(a,s)}configureVideoElement(){this.video&&(this.video.playsInline=!0,this.video.autoplay=!0,this.video.disableRemotePlayback=!0,"latencyHint"in HTMLMediaElement.prototype&&(this.video.latencyHint="interactive"))}async start(){if(!this.url||!this.video)throw new Error("Video target missing");this.stop(),this.notify("connecting"),this.configureVideoElement(),this.abortController=new AbortController;const a=new RTCPeerConnection(h1);this.pc=a;const s=new MediaStream;a.ontrack=c=>{c.streams[0]?.getTracks().forEach(f=>s.addTrack(f)),this.video.srcObject=s,c.track?.kind==="video"&&"playoutDelayHint"in c.receiver&&(c.receiver.playoutDelayHint=0)},a.addTransceiver("video",{direction:"recvonly"}),a.addTransceiver("audio",{direction:"recvonly"}),a.onconnectionstatechange=()=>{const c=a.connectionState;this.notify(c)},a.oniceconnectionstatechange=()=>{const c=a.iceConnectionState;(c==="failed"||c==="disconnected")&&this.notify(c)};try{const c=await a.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});await a.setLocalDescription(c);const f=await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/sdp",...p1(this.token)},body:c.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const d=await f.text();await a.setRemoteDescription({type:"answer",sdp:d}),a.getReceivers().forEach(y=>{"playoutDelayHint"in y&&(y.playoutDelayHint=0)}),await this.video.play().catch(()=>{}),this.notify("playing")}catch(c){throw this.notify("error",c.message),this.stop(),c}}stop(){this.abortController&&(this.abortController.abort(),this.abortController=null),this.pc&&(this.pc.getSenders().forEach(a=>a.track?.stop()),this.pc.getReceivers().forEach(a=>a.track?.stop()),this.pc.close(),this.pc=null),this.video&&(this.video.srcObject=null),this.notify("stopped")}}const v1=2e3,g1=3e3;function Cp({sessionInfo:i,label:a,forceMute:s=!1,telemetryFrame:c,batteryConfig:f}){const d=x.useRef(null),y=x.useRef(null),g=x.useRef(null),[p,v]=x.useState("idle"),[E,S]=x.useState(null),[_,C]=x.useState(0),[D,Y]=x.useState(!0),k=c?.sensors,V=k?.batteryChargeMah??null,U=k?.wheelOvercurrents||null,H=!!(U&&Object.values(U).some(F=>!!F)),J=x.useCallback(()=>{clearTimeout(y.current),y.current=setTimeout(()=>C(Date.now()),v1)},[]),oe=x.useCallback((F=0)=>{if(s)return;clearTimeout(g.current);const Te=()=>{clearTimeout(g.current),g.current=setTimeout(()=>{s||Se()},g1)},Se=async()=>{const Ue=d.current;if(Ue)try{Ue.muted=!1,await Ue.play(),Y(!1)}catch{Ue.muted=!0,Y(!0),Te()}};g.current=setTimeout(Se,F)},[s]);x.useEffect(()=>()=>{clearTimeout(y.current),clearTimeout(g.current)},[]),x.useEffect(()=>{p==="playing"&&oe(0)},[p,oe]),x.useEffect(()=>{if(!i?.url||!d.current)return;let F=!0,Te;const Se=setTimeout(()=>Y(!0),0),Ue=(Ve,Fe)=>{F&&(v(Ve),S(Fe||null),["error","failed","disconnected","closed"].includes(Ve)&&J())};return Te=new y1({url:i.url,token:i.token,video:d.current,onStatus:Ue}),Te.start().catch(Ve=>{F&&(v("error"),S(Ve.message),J())}),()=>{F=!1,clearTimeout(Se),Te?.stop()}},[i?.url,i?.token,_,J]),x.useEffect(()=>{p==="stopped"&&i?.url&&J()},[p,i?.url,J]);const Ae=i?.url?p==="error"?`Error: ${E||"unknown"}`:E?`${p} (${E})`:p:"waiting";return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm bg-black aspect-video",children:[m.jsx("video",{ref:d,muted:s||D,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),m.jsx(x1,{frame:c}),m.jsx(S1,{active:H})]}),m.jsx(b1,{charge:V,config:f,label:a,status:Ae})]})}function b1({charge:i,config:a,label:s,status:c}){const f=a?.Full,d=a?.Warn,y=a?.Urgent??null;if(i==null||f==null||d==null)return m.jsxs("div",{className:"rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[m.jsx("span",{children:s}),m.jsx("span",{children:c})]}),m.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Battery telemetry unavailable"})]});const g=f-d;if(g<=0)return null;const p=(i-d)/g,v=Math.min(1,Math.max(0,p)),E=Math.round(v*100),S=`${E}%`,_=p<=0,C=y!=null&&i<=y,D=_?"bg-red-500 animate-pulse":C?"bg-amber-400":"bg-emerald-500";return m.jsxs("div",{className:"space-y-2 rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[m.jsx("span",{children:s}),m.jsx("span",{children:c})]}),m.jsxs("div",{className:"relative h-4 w-full rounded-full bg-slate-800",children:[m.jsx("div",{className:`h-full rounded-full transition-[width] ${D}`,style:{width:`${E}%`}}),m.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:S})]})]})}function x1({frame:i}){const s=i?.sensors?.bumpsAndWheelDrops||{},[c,f]=x.useState(()=>Date.now());x.useEffect(()=>{const p=setInterval(()=>f(Date.now()),150);return()=>clearInterval(p)},[]);const d=i?.receivedAt?c-i.receivedAt<200:!1,y=[{label:"B-L",active:s.bumpLeft},{label:"B-R",active:s.bumpRight}],g=[{label:"Drop L",active:s.wheelDropLeft},{label:"Drop R",active:s.wheelDropRight}];return m.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-1 text-[0.65rem] text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between gap-1",children:[m.jsxs("div",{className:"flex items-center gap-1 text-[0.55rem] text-slate-400",children:[m.jsx("span",{className:`h-2 w-2 rounded-full ${d?"bg-emerald-300 shadow-[0_0_4px_rgba(16,185,129,0.8)]":"bg-slate-700"}`}),m.jsx("span",{children:"sensor"})]}),m.jsx("div",{className:"flex gap-1",children:y.map(p=>m.jsx(qm,{label:p.label,active:p.active},p.label))})]}),m.jsx("div",{className:"flex justify-end gap-1",children:g.map(p=>m.jsx(qm,{label:p.label,active:p.active},p.label))})]})}function qm({label:i,active:a}){return m.jsx("span",{className:`rounded-sm px-1 py-0.5 text-[0.55rem] ${a?"bg-emerald-500/30 text-emerald-100":"bg-black/40 text-slate-500"}`,children:i})}function S1({active:i}){return i?m.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:m.jsx("div",{className:"text-center text-sm font-semibold text-red-100 animate-pulse",children:"Overcurrent"})}):null}function lo(){const{session:i}=Ut(),a=i?.assignment?.roverId,s=Tp(a?[a]:[]),c=a?s[a]:null,f=Wc(a),y=(a&&i?.roster?i.roster.find(g=>String(g.id)===String(a)):null)?.battery??null;return m.jsx("section",{className:"rounded-sm bg-[#242a32] p-1",children:a?m.jsx("div",{className:"w-full",children:m.jsx(Cp,{sessionInfo:c,label:a,muted:!1,telemetryFrame:f,batteryConfig:y})}):m.jsx("p",{className:"text-sm text-slate-400",children:"Assign a rover to view the video feed."})})}const _1=150;function Nu(i){return typeof i!="number"||Number.isNaN(i)?"—":`${i>0?"+":""}${i.toFixed(1)}°`}function E1(){const{state:{roverId:i,camera:a},actions:{setServoAngle:s,nudgeServo:c,goServoHome:f}}=qn(),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[E,S]=x.useState(v),_=x.useRef(null),C=x.useRef(!1);x.useEffect(()=>{C.current||S(v)},[v]),x.useEffect(()=>()=>{_.current&&clearTimeout(_.current)},[]);const D=typeof d?.nudgeDegrees=="number"&&d.nudgeDegrees>0?d.nudgeDegrees:1,Y=H=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{s(H)},_1)},k=H=>{const J=Number.parseFloat(H.target.value);Number.isNaN(J)||(C.current=!0,S(J),Y(J))},V=()=>{C.current=!1,_.current&&clearTimeout(_.current),s(E)},U=H=>{const J=D*H;c(J)};return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[m.jsx("span",{children:"Camera Tilt"}),m.jsx("span",{className:"font-mono text-sm text-slate-100",children:Nu(v)})]}),m.jsxs("div",{className:"mt-2",children:[m.jsx("input",{type:"range",className:"w-full accent-emerald-400",min:g,max:p,step:.5,value:E,onChange:k,onMouseUp:V,onTouchEnd:V,onPointerUp:V}),m.jsxs("div",{className:"mt-1 flex justify-between text-xs text-slate-400",children:[m.jsx("span",{children:Nu(g)}),m.jsx("span",{children:Nu(p)})]})]}),m.jsxs("div",{className:"mt-2 flex gap-1 text-sm",children:[m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-800 px-1 py-0.5 text-slate-100 hover:bg-slate-700",onClick:()=>U(-1),children:"Tilt Down"}),m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-700 px-1 py-0.5 text-slate-100 hover:bg-slate-600",onClick:()=>f(),children:"Center"}),m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-800 px-1 py-0.5 text-slate-100 hover:bg-slate-700",onClick:()=>U(1),children:"Tilt Up"})]}),m.jsxs("p",{className:"mt-1 text-xs text-slate-400",children:["Step: ",Nu(D)," · Pin GPIO ",d?.pin]})]})}const A1=[{key:"start",label:"Start OI"},{key:"safe",label:"Safe"},{key:"full",label:"Full"},{key:"passive",label:"Passive"},{key:"dock",label:"Dock"}];function T1(){const{state:{roverId:i},actions:{sendOiCommand:a,setSensorStream:s}}=qn(),c=!!i,f=x.useMemo(()=>[{key:"start",label:"Enable stream",enable:!0},{key:"stop",label:"Disable stream",enable:!1}],[]),d=y=>{i&&s(y)};return m.jsxs("div",{className:"space-y-1",children:[m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Manual OI commands"}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:A1.map(y=>m.jsx("button",{type:"button",onClick:()=>a(y.key),disabled:!c,className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-30",children:y.label},y.key))})]}),m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Sensor stream"}),m.jsx("div",{className:"mt-1 flex gap-1",children:f.map(y=>m.jsx("button",{type:"button",onClick:()=>d(y.enable),disabled:!c,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-30",children:y.label},y.key))}),!c&&m.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Assign a rover to toggle streams."})]}),m.jsx(Xu,{}),m.jsx(eo,{})]})}function C1({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 m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Help"}),m.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:s.map(c=>m.jsx("li",{className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200",children:c},c))})]})}function Ou({active:i,onClick:a,children:s}){return m.jsx("button",{type:"button",onClick:a,className:`flex-1 rounded-sm px-1 py-1 text-xs font-semibold ${i?"bg-slate-100 text-slate-900":"bg-black/30 text-slate-300"}`,children:s})}function R1(){return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Room controls"}),m.jsx("p",{className:"text-sm text-slate-200",children:"Coming soon: lighting, docks, and environmental toggles."})]})}function N1({layout:i}){const[a,s]=x.useState("telemetry");return m.jsxs("section",{className:"rounded-sm bg-[#1a1d23] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex gap-1",children:[m.jsx(Ou,{active:a==="telemetry",onClick:()=>s("telemetry"),children:"Rover Controls"}),m.jsx(Ou,{active:a==="room",onClick:()=>s("room"),children:"Room Controls"}),m.jsx(Ou,{active:a==="advanced",onClick:()=>s("advanced"),children:"Settings"}),m.jsx(Ou,{active:a==="help",onClick:()=>s("help"),children:"Help"})]}),m.jsxs("div",{className:"mt-1 space-y-1",children:[a==="telemetry"&&m.jsxs("div",{className:"space-y-1",children:[m.jsx(Pc,{}),m.jsx(E1,{}),m.jsx(Ic,{})]}),a==="room"&&m.jsxs("div",{className:"space-y-1",children:[m.jsx(to,{}),m.jsx(R1,{})]}),a==="advanced"&&m.jsx(T1,{}),a==="help"&&m.jsx(C1,{layout:i})]})]})}const O1=new Set(["admin","lockdown","lockdown-admin"]),M1=new Set(["admin","lockdown"]);function z1(i="admin"){return i==="lockdown"?{title:"Lockdown in effect",description:"Only the lockdown admin can remain connected right now. If you have credentials, log in below. Otherwise please stand by until the server re-opens."}:{title:"Admin mode active",description:"The server is temporarily restricted to administrators. Log in below if you are authorized, or wait for admin mode to end."}}function D1(){const{session:i}=Ut(),a=i?.mode,s=i?.role,c=M1.has(a),f=O1.has(s);if(!c||f)return null;const d=z1(a);return m.jsx("div",{className:"pointer-events-auto fixed inset-0 z-50 flex items-center justify-center bg-black/85 px-2 py-2",children:m.jsxs("div",{className:"w-full max-w-md space-y-2 rounded-lg bg-[#141821] p-2 text-slate-100 shadow-2xl",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("p",{className:"text-lg font-semibold",children:d.title}),m.jsx("p",{className:"text-sm text-slate-300",children:d.description})]}),m.jsx("div",{className:"rounded-md bg-black/40 p-1",children:m.jsx(Xu,{})}),m.jsx("p",{className:"text-xs text-slate-500",children:"Your controls are paused until access is granted. You will automatically regain the interface once the mode changes or after a successful login."})]})})}function w1(){const{session:i}=Ut(),a=x.useMemo(()=>JSON.stringify(i??{},null,2),[i]);return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-xs text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Session snapshot"}),m.jsx("pre",{className:"mt-1 h-64 overflow-y-auto bg-black/40 p-1 text-[0.7rem] text-lime-300",children:a})]})}function j1(){const[i,a]=x.useState(()=>typeof window>"u"||window.innerWidth>=1024?"desktop":window.innerWidth>window.innerHeight?"mobile-landscape":"mobile-portrait");return x.useEffect(()=>{function s(){if(typeof window>"u")return;const{innerWidth:c,innerHeight:f}=window;c>=1024?a("desktop"):c>f?a("mobile-landscape"):a("mobile-portrait")}return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),i}function U1({layout:i}){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("section",{className:"grid grid-cols-[minmax(0,1.8fr)_minmax(0,1fr)] gap-1",children:[m.jsx(lo,{}),m.jsx(N1,{layout:i})]}),m.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[m.jsx(no,{}),m.jsx(w1,{})]})]})}function B1(){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(lo,{}),m.jsx(d1,{}),m.jsx(Pc,{}),m.jsx(Ic,{}),m.jsx(Xu,{}),m.jsx(eo,{}),m.jsx(to,{}),m.jsx(no,{})]})}function L1(){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("section",{className:"grid grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-1",children:[m.jsx(o1,{}),m.jsx(lo,{}),m.jsx(f1,{})]}),m.jsx(to,{}),m.jsx(Pc,{}),m.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(Xu,{}),m.jsx(eo,{})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(no,{}),m.jsx(Ic,{})]})]})]})}function H1(){const i=j1(),a=i==="desktop"?m.jsx(U1,{layout:i}):i==="mobile-landscape"?m.jsx(L1,{}):m.jsx(B1,{});return m.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:m.jsxs(Vb,{children:[m.jsx($b,{}),m.jsx(Wb,{}),m.jsx("main",{className:"flex w-full flex-col gap-1 px-1 py-1 text-base",children:a}),m.jsx(e1,{}),m.jsx(D1,{})]})})}function q1(){const{session:i,setRole:a,subscribeAll:s}=Ut(),[c,f]=x.useState(!1);return x.useEffect(()=>{let d=!1;async function y(){try{i?.role!=="spectator"&&await a("spectator"),await s(),d||f(!0)}catch(g){console.error("Failed to enter spectator mode",g)}}return y(),()=>{d=!0}},[i?.role,a,s]),c}function k1({connected:i,ready:a,rosterCount:s}){return m.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[m.jsx("span",{className:`rounded-full px-3 py-1 font-semibold ${i?"bg-emerald-500/20 text-emerald-200":"bg-red-500/20 text-red-200"}`,children:i?"Connected":"Disconnected"}),m.jsxs("span",{className:`rounded-full px-3 py-1 ${a?"bg-blue-600/40 text-blue-100":"bg-slate-700 text-slate-200"}`,children:["Spectator mode ",a?"active":"pending…"]}),m.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",s]})]})}function Y1({logs:i}){return m.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[m.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[m.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),m.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",i.length]})]}),m.jsx("div",{className:"h-60 overflow-y-auto rounded-2xl bg-slate-950/40 p-3 text-xs font-mono text-slate-300",children:i.length===0?m.jsx("p",{children:"No log entries yet."}):i.slice().reverse().map(a=>m.jsxs("div",{className:"mb-2",children:[m.jsx("span",{className:"text-slate-500",children:a.timestamp})," ",m.jsxs("span",{className:"text-cyan-300",children:["[",a.level,"]"]})," ",a.label&&m.jsxs("span",{className:"text-pink-300",children:["[",a.label,"]"]})," ",m.jsx("span",{children:a.message})]},a.id))})]})}function V1(i={}){return Object.entries(i).map(([a,s])=>({key:a,value:typeof s=="object"?JSON.stringify(s):s}))}function G1({rover:i,frame:a,videoInfo:s}){const c=V1(a?.sensors);return m.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[m.jsxs("header",{className:"flex flex-col gap-1",children:[m.jsx("h3",{className:"text-2xl font-semibold text-white",children:i.name}),m.jsx("p",{className:"text-sm text-slate-400",children:a?.receivedAt?`Updated ${new Date(a.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),m.jsx(Cp,{sessionInfo:s,label:i.name,forceMute:!0}),m.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[m.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),c.length===0?m.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):m.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:c.map(({key:f,value:d})=>m.jsxs("div",{className:"flex justify-between gap-4",children:[m.jsx("dt",{className:"text-slate-500",children:f}),m.jsx("dd",{className:"text-right font-semibold text-white",children:d})]},f))})]})]})}function X1(){const{connected:i,session:a,logs:s}=Ut(),c=q1(),f=xp(),d=a?.roster??[],y=Tp(d.map(p=>p.id)),g=x.useMemo(()=>({connected:i,ready:c,rosterCount:d.length}),[i,c,d.length]);return m.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:m.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[m.jsxs("header",{className:"space-y-3",children:[m.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),m.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),m.jsx(k1,{...g})]}),m.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:d.length===0?m.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):d.map(p=>m.jsx(G1,{rover:p,frame:f[p.id],videoInfo:y[p.id]},p.id))}),m.jsx(Y1,{logs:s})]})})}iv.createRoot(document.getElementById("root")).render(m.jsx(x.StrictMode,{children:m.jsx(Eb,{children:m.jsx(Tb,{children:m.jsx(Cb,{children:m.jsx(xg,{children:m.jsxs(Wv,{children:[m.jsx(Oc,{path:"/",element:m.jsx(H1,{})}),m.jsx(Oc,{path:"/spectate",element:m.jsx(X1,{})})]})})})})})}));
|