mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
12 lines
305 KiB
JavaScript
12 lines
305 KiB
JavaScript
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function r(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(f){if(f.ep)return;f.ep=!0;const h=r(f);fetch(f.href,h)}})();var Ir={exports:{}},ka={};var Jh;function Dy(){if(Jh)return ka;Jh=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(c,f,h){var m=null;if(h!==void 0&&(m=""+h),f.key!==void 0&&(m=""+f.key),"key"in f){h={};for(var g in f)g!=="key"&&(h[g]=f[g])}else h=f;return f=h.ref,{$$typeof:u,type:c,key:m,ref:f!==void 0?f:null,props:h}}return ka.Fragment=i,ka.jsx=r,ka.jsxs=r,ka}var $h;function jy(){return $h||($h=1,Ir.exports=Dy()),Ir.exports}var p=jy(),ec={exports:{}},P={};var Wh;function wy(){if(Wh)return P;Wh=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),N=Symbol.iterator;function M(_){return _===null||typeof _!="object"?null:(_=N&&_[N]||_["@@iterator"],typeof _=="function"?_:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,q={};function H(_,B,X){this.props=_,this.context=B,this.refs=q,this.updater=X||L}H.prototype.isReactComponent={},H.prototype.setState=function(_,B){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,B,"setState")},H.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function Y(){}Y.prototype=H.prototype;function V(_,B,X){this.props=_,this.context=B,this.refs=q,this.updater=X||L}var ne=V.prototype=new Y;ne.constructor=V,G(ne,H.prototype),ne.isPureReactComponent=!0;var de=Array.isArray;function Ae(){}var F={H:null,A:null,T:null,S:null},_e=Object.prototype.hasOwnProperty;function ve(_,B,X){var Z=X.ref;return{$$typeof:u,type:_,key:B,ref:Z!==void 0?Z:null,props:X}}function Ge(_,B){return ve(_.type,B,_.props)}function Ue(_){return typeof _=="object"&&_!==null&&_.$$typeof===u}function ke(_){var B={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(X){return B[X]})}var Xt=/\/+/g;function Gt(_,B){return typeof _=="object"&&_!==null&&_.key!=null?ke(""+_.key):B.toString(36)}function Ot(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(Ae,Ae):(_.status="pending",_.then(function(B){_.status==="pending"&&(_.status="fulfilled",_.value=B)},function(B){_.status==="pending"&&(_.status="rejected",_.reason=B)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function j(_,B,X,Z,I){var le=typeof _;(le==="undefined"||le==="boolean")&&(_=null);var me=!1;if(_===null)me=!0;else switch(le){case"bigint":case"string":case"number":me=!0;break;case"object":switch(_.$$typeof){case u:case i:me=!0;break;case T:return me=_._init,j(me(_._payload),B,X,Z,I)}}if(me)return I=I(_),me=Z===""?"."+Gt(_,0):Z,de(I)?(X="",me!=null&&(X=me.replace(Xt,"$&/")+"/"),j(I,B,X,"",function(Jl){return Jl})):I!=null&&(Ue(I)&&(I=Ge(I,X+(I.key==null||_&&_.key===I.key?"":(""+I.key).replace(Xt,"$&/")+"/")+me)),B.push(I)),1;me=0;var Pe=Z===""?".":Z+":";if(de(_))for(var De=0;De<_.length;De++)Z=_[De],le=Pe+Gt(Z,De),me+=j(Z,B,X,le,I);else if(De=M(_),typeof De=="function")for(_=De.call(_),De=0;!(Z=_.next()).done;)Z=Z.value,le=Pe+Gt(Z,De++),me+=j(Z,B,X,le,I);else if(le==="object"){if(typeof _.then=="function")return j(Ot(_),B,X,Z,I);throw B=String(_),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return me}function k(_,B,X){if(_==null)return _;var Z=[],I=0;return j(_,Z,"","",function(le){return B.call(X,le,I++)}),Z}function W(_){if(_._status===-1){var B=_._result;B=B(),B.then(function(X){(_._status===0||_._status===-1)&&(_._status=1,_._result=X)},function(X){(_._status===0||_._status===-1)&&(_._status=2,_._result=X)}),_._status===-1&&(_._status=0,_._result=B)}if(_._status===1)return _._result.default;throw _._result}var ge=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},Ee={map:k,forEach:function(_,B,X){k(_,function(){B.apply(this,arguments)},X)},count:function(_){var B=0;return k(_,function(){B++}),B},toArray:function(_){return k(_,function(B){return B})||[]},only:function(_){if(!Ue(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return P.Activity=S,P.Children=Ee,P.Component=H,P.Fragment=r,P.Profiler=f,P.PureComponent=V,P.StrictMode=c,P.Suspense=y,P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,P.__COMPILER_RUNTIME={__proto__:null,c:function(_){return F.H.useMemoCache(_)}},P.cache=function(_){return function(){return _.apply(null,arguments)}},P.cacheSignal=function(){return null},P.cloneElement=function(_,B,X){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var Z=G({},_.props),I=_.key;if(B!=null)for(le in B.key!==void 0&&(I=""+B.key),B)!_e.call(B,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&B.ref===void 0||(Z[le]=B[le]);var le=arguments.length-2;if(le===1)Z.children=X;else if(1<le){for(var me=Array(le),Pe=0;Pe<le;Pe++)me[Pe]=arguments[Pe+2];Z.children=me}return ve(_.type,I,Z)},P.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:h,_context:_},_},P.createElement=function(_,B,X){var Z,I={},le=null;if(B!=null)for(Z in B.key!==void 0&&(le=""+B.key),B)_e.call(B,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(I[Z]=B[Z]);var me=arguments.length-2;if(me===1)I.children=X;else if(1<me){for(var Pe=Array(me),De=0;De<me;De++)Pe[De]=arguments[De+2];I.children=Pe}if(_&&_.defaultProps)for(Z in me=_.defaultProps,me)I[Z]===void 0&&(I[Z]=me[Z]);return ve(_,le,I)},P.createRef=function(){return{current:null}},P.forwardRef=function(_){return{$$typeof:g,render:_}},P.isValidElement=Ue,P.lazy=function(_){return{$$typeof:T,_payload:{_status:-1,_result:_},_init:W}},P.memo=function(_,B){return{$$typeof:v,type:_,compare:B===void 0?null:B}},P.startTransition=function(_){var B=F.T,X={};F.T=X;try{var Z=_(),I=F.S;I!==null&&I(X,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(Ae,ge)}catch(le){ge(le)}finally{B!==null&&X.types!==null&&(B.types=X.types),F.T=B}},P.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},P.use=function(_){return F.H.use(_)},P.useActionState=function(_,B,X){return F.H.useActionState(_,B,X)},P.useCallback=function(_,B){return F.H.useCallback(_,B)},P.useContext=function(_){return F.H.useContext(_)},P.useDebugValue=function(){},P.useDeferredValue=function(_,B){return F.H.useDeferredValue(_,B)},P.useEffect=function(_,B){return F.H.useEffect(_,B)},P.useEffectEvent=function(_){return F.H.useEffectEvent(_)},P.useId=function(){return F.H.useId()},P.useImperativeHandle=function(_,B,X){return F.H.useImperativeHandle(_,B,X)},P.useInsertionEffect=function(_,B){return F.H.useInsertionEffect(_,B)},P.useLayoutEffect=function(_,B){return F.H.useLayoutEffect(_,B)},P.useMemo=function(_,B){return F.H.useMemo(_,B)},P.useOptimistic=function(_,B){return F.H.useOptimistic(_,B)},P.useReducer=function(_,B,X){return F.H.useReducer(_,B,X)},P.useRef=function(_){return F.H.useRef(_)},P.useState=function(_){return F.H.useState(_)},P.useSyncExternalStore=function(_,B,X){return F.H.useSyncExternalStore(_,B,X)},P.useTransition=function(){return F.H.useTransition()},P.version="19.2.0",P}var Fh;function Ru(){return Fh||(Fh=1,ec.exports=wy()),ec.exports}var E=Ru(),tc={exports:{}},Xa={},nc={exports:{}},lc={};var Ph;function Uy(){return Ph||(Ph=1,(function(u){function i(j,k){var W=j.length;j.push(k);e:for(;0<W;){var ge=W-1>>>1,Ee=j[ge];if(0<f(Ee,k))j[ge]=k,j[W]=Ee,W=ge;else break e}}function r(j){return j.length===0?null:j[0]}function c(j){if(j.length===0)return null;var k=j[0],W=j.pop();if(W!==k){j[0]=W;e:for(var ge=0,Ee=j.length,_=Ee>>>1;ge<_;){var B=2*(ge+1)-1,X=j[B],Z=B+1,I=j[Z];if(0>f(X,W))Z<Ee&&0>f(I,X)?(j[ge]=I,j[Z]=W,ge=Z):(j[ge]=X,j[B]=W,ge=B);else if(Z<Ee&&0>f(I,W))j[ge]=I,j[Z]=W,ge=Z;else break e}}return k}function f(j,k){var W=j.sortIndex-k.sortIndex;return W!==0?W:j.id-k.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var m=Date,g=m.now();u.unstable_now=function(){return m.now()-g}}var y=[],v=[],T=1,S=null,N=3,M=!1,L=!1,G=!1,q=!1,H=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function ne(j){for(var k=r(v);k!==null;){if(k.callback===null)c(v);else if(k.startTime<=j)c(v),k.sortIndex=k.expirationTime,i(y,k);else break;k=r(v)}}function de(j){if(G=!1,ne(j),!L)if(r(y)!==null)L=!0,Ae||(Ae=!0,ke());else{var k=r(v);k!==null&&Ot(de,k.startTime-j)}}var Ae=!1,F=-1,_e=5,ve=-1;function Ge(){return q?!0:!(u.unstable_now()-ve<_e)}function Ue(){if(q=!1,Ae){var j=u.unstable_now();ve=j;var k=!0;try{e:{L=!1,G&&(G=!1,Y(F),F=-1),M=!0;var W=N;try{t:{for(ne(j),S=r(y);S!==null&&!(S.expirationTime>j&&Ge());){var ge=S.callback;if(typeof ge=="function"){S.callback=null,N=S.priorityLevel;var Ee=ge(S.expirationTime<=j);if(j=u.unstable_now(),typeof Ee=="function"){S.callback=Ee,ne(j),k=!0;break t}S===r(y)&&c(y),ne(j)}else c(y);S=r(y)}if(S!==null)k=!0;else{var _=r(v);_!==null&&Ot(de,_.startTime-j),k=!1}}break e}finally{S=null,N=W,M=!1}k=void 0}}finally{k?ke():Ae=!1}}}var ke;if(typeof V=="function")ke=function(){V(Ue)};else if(typeof MessageChannel<"u"){var Xt=new MessageChannel,Gt=Xt.port2;Xt.port1.onmessage=Ue,ke=function(){Gt.postMessage(null)}}else ke=function(){H(Ue,0)};function Ot(j,k){F=H(function(){j(u.unstable_now())},k)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(j){j.callback=null},u.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"):_e=0<j?Math.floor(1e3/j):5},u.unstable_getCurrentPriorityLevel=function(){return N},u.unstable_next=function(j){switch(N){case 1:case 2:case 3:var k=3;break;default:k=N}var W=N;N=k;try{return j()}finally{N=W}},u.unstable_requestPaint=function(){q=!0},u.unstable_runWithPriority=function(j,k){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var W=N;N=j;try{return k()}finally{N=W}},u.unstable_scheduleCallback=function(j,k,W){var ge=u.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ge+W:ge):W=ge,j){case 1:var Ee=-1;break;case 2:Ee=250;break;case 5:Ee=1073741823;break;case 4:Ee=1e4;break;default:Ee=5e3}return Ee=W+Ee,j={id:T++,callback:k,priorityLevel:j,startTime:W,expirationTime:Ee,sortIndex:-1},W>ge?(j.sortIndex=W,i(v,j),r(y)===null&&j===r(v)&&(G?(Y(F),F=-1):G=!0,Ot(de,W-ge))):(j.sortIndex=Ee,i(y,j),L||M||(L=!0,Ae||(Ae=!0,ke()))),j},u.unstable_shouldYield=Ge,u.unstable_wrapCallback=function(j){var k=N;return function(){var W=N;N=k;try{return j.apply(this,arguments)}finally{N=W}}}})(lc)),lc}var Ih;function By(){return Ih||(Ih=1,nc.exports=Uy()),nc.exports}var ac={exports:{}},Fe={};var em;function Ly(){if(em)return Fe;em=1;var u=Ru();function i(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)v+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+y+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var c={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(y,v,T){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:y,containerInfo:v,implementation:T}}var m=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Fe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Fe.createPortal=function(y,v){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return h(y,v,null,T)},Fe.flushSync=function(y){var v=m.T,T=c.p;try{if(m.T=null,c.p=2,y)return y()}finally{m.T=v,c.p=T,c.d.f()}},Fe.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,c.d.C(y,v))},Fe.prefetchDNS=function(y){typeof y=="string"&&c.d.D(y)},Fe.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var T=v.as,S=g(T,v.crossOrigin),N=typeof v.integrity=="string"?v.integrity:void 0,M=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;T==="style"?c.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:S,integrity:N,fetchPriority:M}):T==="script"&&c.d.X(y,{crossOrigin:S,integrity:N,fetchPriority:M,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Fe.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var T=g(v.as,v.crossOrigin);c.d.M(y,{crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&c.d.M(y)},Fe.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var T=v.as,S=g(T,v.crossOrigin);c.d.L(y,T,{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})}},Fe.preloadModule=function(y,v){if(typeof y=="string")if(v){var T=g(v.as,v.crossOrigin);c.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else c.d.m(y)},Fe.requestFormReset=function(y){c.d.r(y)},Fe.unstable_batchedUpdates=function(y,v){return y(v)},Fe.useFormState=function(y,v,T){return m.H.useFormState(y,v,T)},Fe.useFormStatus=function(){return m.H.useHostTransitionStatus()},Fe.version="19.2.0",Fe}var tm;function Hy(){if(tm)return ac.exports;tm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),ac.exports=Ly(),ac.exports}var nm;function qy(){if(nm)return Xa;nm=1;var u=By(),i=Ru(),r=Hy();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 h(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 m(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 y(e){if(h(e)!==e)throw Error(c(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return y(a),e;if(s===l)return y(a),t;s=s.sibling}throw Error(c(188))}if(n.return!==l.return)n=a,l=s;else{for(var o=!1,d=a.child;d;){if(d===n){o=!0,n=a,l=s;break}if(d===l){o=!0,l=a,n=s;break}d=d.sibling}if(!o){for(d=s.child;d;){if(d===n){o=!0,n=s,l=a;break}if(d===l){o=!0,l=s,n=a;break}d=d.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 T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,N=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),V=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),Ae=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),ve=Symbol.for("react.activity"),Ge=Symbol.for("react.memo_cache_sentinel"),Ue=Symbol.iterator;function ke(e){return e===null||typeof e!="object"?null:(e=Ue&&e[Ue]||e["@@iterator"],typeof e=="function"?e:null)}var Xt=Symbol.for("react.client.reference");function Gt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Xt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case H:return"Profiler";case q:return"StrictMode";case de:return"Suspense";case Ae:return"SuspenseList";case ve:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case V:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case ne: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 _e:t=e._payload,e=e._init;try{return Gt(e(t))}catch{}}return null}var Ot=Array.isArray,j=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ge=[],Ee=-1;function _(e){return{current:e}}function B(e){0>Ee||(e.current=ge[Ee],ge[Ee]=null,Ee--)}function X(e,t){Ee++,ge[Ee]=e.current,e.current=t}var Z=_(null),I=_(null),le=_(null),me=_(null);function Pe(e,t){switch(X(le,t),X(I,e),X(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=vh(t),e=gh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(Z),X(Z,e)}function De(){B(Z),B(I),B(le)}function Jl(e){e.memoizedState!==null&&X(me,e);var t=Z.current,n=gh(t,e.type);t!==n&&(X(I,e),X(Z,n))}function ei(e){I.current===e&&(B(Z),B(I)),me.current===e&&(B(me),La._currentValue=W)}var Uu,Qc;function qn(e){if(Uu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Uu=t&&t[1]||"",Qc=-1<n.stack.indexOf(`
|
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
`+Uu+e+Qc}var Bu=!1;function Lu(e,t){if(!e||Bu)return"";Bu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(z){var O=z}Reflect.construct(e,[],U)}else{try{U.call()}catch(z){O=z}e.call(U.prototype)}}else{try{throw Error()}catch(z){O=z}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(z){if(z&&O&&typeof z.stack=="string")return[z.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),o=s[0],d=s[1];if(o&&d){var b=o.split(`
|
|
`),R=d.split(`
|
|
`);for(a=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;a<R.length&&!R[a].includes("DetermineComponentFrameRoot");)a++;if(l===b.length||a===R.length)for(l=b.length-1,a=R.length-1;1<=l&&0<=a&&b[l]!==R[a];)a--;for(;1<=l&&0<=a;l--,a--)if(b[l]!==R[a]){if(l!==1||a!==1)do if(l--,a--,0>a||b[l]!==R[a]){var D=`
|
|
`+b[l].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=l&&0<=a);break}}}finally{Bu=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qn(n):""}function cp(e,t){switch(e.tag){case 26:case 27:case 5:return qn(e.type);case 16:return qn("Lazy");case 13:return e.child!==t&&t!==null?qn("Suspense Fallback"):qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return Lu(e.type,!1);case 11:return Lu(e.type.render,!1);case 1:return Lu(e.type,!0);case 31:return qn("Activity");default:return""}}function Zc(e){try{var t="",n=null;do t+=cp(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
Error generating stack: `+l.message+`
|
|
`+l.stack}}var Hu=Object.prototype.hasOwnProperty,qu=u.unstable_scheduleCallback,Yu=u.unstable_cancelCallback,op=u.unstable_shouldYield,fp=u.unstable_requestPaint,st=u.unstable_now,dp=u.unstable_getCurrentPriorityLevel,Kc=u.unstable_ImmediatePriority,Jc=u.unstable_UserBlockingPriority,ti=u.unstable_NormalPriority,hp=u.unstable_LowPriority,$c=u.unstable_IdlePriority,mp=u.log,pp=u.unstable_setDisableYieldValue,$l=null,rt=null;function hn(e){if(typeof mp=="function"&&pp(e),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode($l,e)}catch{}}var ct=Math.clz32?Math.clz32:gp,yp=Math.log,vp=Math.LN2;function gp(e){return e>>>=0,e===0?32:31-(yp(e)/vp|0)|0}var ni=256,li=262144,ai=4194304;function Yn(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 ii(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,s=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~s,l!==0?a=Yn(l):(o&=d,o!==0?a=Yn(o):n||(n=d&~e,n!==0&&(a=Yn(n))))):(d=l&~s,d!==0?a=Yn(d):o!==0?a=Yn(o):n||(n=l&~e,n!==0&&(a=Yn(n)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:a}function Wl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function bp(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 Wc(){var e=ai;return ai<<=1,(ai&62914560)===0&&(ai=4194304),e}function ku(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sp(e,t,n,l,a,s){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 d=e.entanglements,b=e.expirationTimes,R=e.hiddenUpdates;for(n=o&~n;0<n;){var D=31-ct(n),U=1<<D;d[D]=0,b[D]=-1;var O=R[D];if(O!==null)for(R[D]=null,D=0;D<O.length;D++){var z=O[D];z!==null&&(z.lane&=-536870913)}n&=~U}l!==0&&Fc(e,l,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(o&~t))}function Fc(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 Pc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-ct(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Ic(e,t){var n=t&-t;return n=(n&42)!==0?1:Xu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Xu(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 Gu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function eo(){var e=k.p;return e!==0?e:(e=window.event,e===void 0?32:kh(e.type))}function to(e,t){var n=k.p;try{return k.p=e,t()}finally{k.p=n}}var mn=Math.random().toString(36).slice(2),Ze="__reactFiber$"+mn,et="__reactProps$"+mn,ul="__reactContainer$"+mn,Vu="__reactEvents$"+mn,xp="__reactListeners$"+mn,_p="__reactHandles$"+mn,no="__reactResources$"+mn,Pl="__reactMarker$"+mn;function Qu(e){delete e[Ze],delete e[et],delete e[Vu],delete e[xp],delete e[_p]}function sl(e){var t=e[Ze];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ul]||n[Ze]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ah(e);e!==null;){if(n=e[Ze])return n;e=Ah(e)}return t}e=n,n=e.parentNode}return null}function rl(e){if(e=e[Ze]||e[ul]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Il(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function cl(e){var t=e[no];return t||(t=e[no]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ve(e){e[Pl]=!0}var lo=new Set,ao={};function kn(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for(ao[e]=t,e=0;e<t.length;e++)lo.add(t[e])}var Ep=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]*$"),io={},uo={};function Tp(e){return Hu.call(uo,e)?!0:Hu.call(io,e)?!1:Ep.test(e)?uo[e]=!0:(io[e]=!0,!1)}function ui(e,t,n){if(Tp(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 si(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 Vt(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 Ap(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 a=l.get,s=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,s.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 Zu(e){if(!e._valueTracker){var t=so(e)?"checked":"value";e._valueTracker=Ap(e,t,""+e[t])}}function ro(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 ri(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 Np=/[\n"\\]/g;function bt(e){return e.replace(Np,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ku(e,t,n,l,a,s,o,d){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?Ju(e,o,gt(t)):n!=null?Ju(e,o,gt(n)):l!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+gt(d):e.removeAttribute("name")}function co(e,t,n,l,a,s,o,d){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Zu(e);return}n=n!=null?""+gt(n):"",t=t!=null?""+gt(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Zu(e)}function Ju(e,t,n){t==="number"&&ri(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function fl(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+gt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function oo(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 fo(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),Zu(e)}function dl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cp=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 ho(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||Cp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function mo(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 a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&ho(e,a,l)}else for(var s in t)t.hasOwnProperty(s)&&ho(e,s,t[s])}function $u(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 Rp=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"]]),Op=/^[\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 ci(e){return Op.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var Wu=null;function Fu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hl=null,ml=null;function po(e){var t=rl(e);if(t&&(e=t.stateNode)){var n=e[et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ku(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 a=l[et]||null;if(!a)throw Error(c(90));Ku(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&ro(l)}break e;case"textarea":oo(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fl(e,!!n.multiple,t,!1)}}}var Pu=!1;function yo(e,t,n){if(Pu)return e(t,n);Pu=!0;try{var l=e(t);return l}finally{if(Pu=!1,(hl!==null||ml!==null)&&(Wi(),hl&&(t=hl,e=ml,ml=hl=null,po(t),e)))for(t=0;t<e.length;t++)po(e[t])}}function ea(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"),Iu=!1;if(Zt)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){Iu=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{Iu=!1}var pn=null,es=null,oi=null;function vo(){if(oi)return oi;var e,t=es,n=t.length,l,a="value"in pn?pn.value:pn.textContent,s=a.length;for(e=0;e<n&&t[e]===a[e];e++);var o=n-e;for(l=1;l<=o&&t[n-l]===a[s-l];l++);return oi=a.slice(e,1<l?1-l:void 0)}function fi(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 di(){return!0}function go(){return!1}function tt(e){function t(n,l,a,s,o){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(s):s[d]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?di:go,this.isPropagationStopped=go,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=di)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=di)},persist:function(){},isPersistent:di}),t}var Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hi=tt(Xn),na=S({},Xn,{view:0,detail:0}),zp=tt(na),ts,ns,la,mi=S({},na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:as,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!==la&&(la&&e.type==="mousemove"?(ts=e.screenX-la.screenX,ns=e.screenY-la.screenY):ns=ts=0,la=e),ts)},movementY:function(e){return"movementY"in e?e.movementY:ns}}),bo=tt(mi),Mp=S({},mi,{dataTransfer:0}),Dp=tt(Mp),jp=S({},na,{relatedTarget:0}),ls=tt(jp),wp=S({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),Up=tt(wp),Bp=S({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lp=tt(Bp),Hp=S({},Xn,{data:0}),So=tt(Hp),qp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yp={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"},kp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kp[e])?!!t[e]:!1}function as(){return Xp}var Gp=S({},na,{key:function(e){if(e.key){var t=qp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:as,charCode:function(e){return e.type==="keypress"?fi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vp=tt(Gp),Qp=S({},mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xo=tt(Qp),Zp=S({},na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:as}),Kp=tt(Zp),Jp=S({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),$p=tt(Jp),Wp=S({},mi,{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}),Fp=tt(Wp),Pp=S({},Xn,{newState:0,oldState:0}),Ip=tt(Pp),e0=[9,13,27,32],is=Zt&&"CompositionEvent"in window,aa=null;Zt&&"documentMode"in document&&(aa=document.documentMode);var t0=Zt&&"TextEvent"in window&&!aa,_o=Zt&&(!is||aa&&8<aa&&11>=aa),Eo=" ",To=!1;function Ao(e,t){switch(e){case"keyup":return e0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function No(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pl=!1;function n0(e,t){switch(e){case"compositionend":return No(t);case"keypress":return t.which!==32?null:(To=!0,Eo);case"textInput":return e=t.data,e===Eo&&To?null:e;default:return null}}function l0(e,t){if(pl)return e==="compositionend"||!is&&Ao(e,t)?(e=vo(),oi=es=pn=null,pl=!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 _o&&t.locale!=="ko"?null:t.data;default:return null}}var a0={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 Co(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!a0[e.type]:t==="textarea"}function Ro(e,t,n,l){hl?ml?ml.push(l):ml=[l]:hl=l,t=lu(t,"onChange"),0<t.length&&(n=new hi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ia=null,ua=null;function i0(e){fh(e,0)}function pi(e){var t=Il(e);if(ro(t))return e}function Oo(e,t){if(e==="change")return t}var zo=!1;if(Zt){var us;if(Zt){var ss="oninput"in document;if(!ss){var Mo=document.createElement("div");Mo.setAttribute("oninput","return;"),ss=typeof Mo.oninput=="function"}us=ss}else us=!1;zo=us&&(!document.documentMode||9<document.documentMode)}function Do(){ia&&(ia.detachEvent("onpropertychange",jo),ua=ia=null)}function jo(e){if(e.propertyName==="value"&&pi(ua)){var t=[];Ro(t,ua,e,Fu(e)),yo(i0,t)}}function u0(e,t,n){e==="focusin"?(Do(),ia=t,ua=n,ia.attachEvent("onpropertychange",jo)):e==="focusout"&&Do()}function s0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pi(ua)}function r0(e,t){if(e==="click")return pi(t)}function c0(e,t){if(e==="input"||e==="change")return pi(t)}function o0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ot=typeof Object.is=="function"?Object.is:o0;function sa(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 a=n[l];if(!Hu.call(t,a)||!ot(e[a],t[a]))return!1}return!0}function wo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uo(e,t){var n=wo(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=wo(n)}}function Bo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ri(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=ri(e.document)}return t}function rs(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 f0=Zt&&"documentMode"in document&&11>=document.documentMode,yl=null,cs=null,ra=null,os=!1;function Ho(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;os||yl==null||yl!==ri(l)||(l=yl,"selectionStart"in l&&rs(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}),ra&&sa(ra,l)||(ra=l,l=lu(cs,"onSelect"),0<l.length&&(t=new hi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=yl)))}function Gn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vl={animationend:Gn("Animation","AnimationEnd"),animationiteration:Gn("Animation","AnimationIteration"),animationstart:Gn("Animation","AnimationStart"),transitionrun:Gn("Transition","TransitionRun"),transitionstart:Gn("Transition","TransitionStart"),transitioncancel:Gn("Transition","TransitionCancel"),transitionend:Gn("Transition","TransitionEnd")},fs={},qo={};Zt&&(qo=document.createElement("div").style,"AnimationEvent"in window||(delete vl.animationend.animation,delete vl.animationiteration.animation,delete vl.animationstart.animation),"TransitionEvent"in window||delete vl.transitionend.transition);function Vn(e){if(fs[e])return fs[e];if(!vl[e])return e;var t=vl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qo)return fs[e]=t[n];return e}var Yo=Vn("animationend"),ko=Vn("animationiteration"),Xo=Vn("animationstart"),d0=Vn("transitionrun"),h0=Vn("transitionstart"),m0=Vn("transitioncancel"),Go=Vn("transitionend"),Vo=new Map,ds="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(" ");ds.push("scrollEnd");function zt(e,t){Vo.set(e,t),kn(t,[e])}var yi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},St=[],gl=0,hs=0;function vi(){for(var e=gl,t=hs=gl=0;t<e;){var n=St[t];St[t++]=null;var l=St[t];St[t++]=null;var a=St[t];St[t++]=null;var s=St[t];if(St[t++]=null,l!==null&&a!==null){var o=l.pending;o===null?a.next=a:(a.next=o.next,o.next=a),l.pending=a}s!==0&&Qo(n,a,s)}}function gi(e,t,n,l){St[gl++]=e,St[gl++]=t,St[gl++]=n,St[gl++]=l,hs|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function ms(e,t,n,l){return gi(e,t,n,l),bi(e)}function Qn(e,t){return gi(e,null,null,t),bi(e)}function Qo(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,s=e.return;s!==null;)s.childLanes|=n,l=s.alternate,l!==null&&(l.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(a=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,a&&t!==null&&(a=31-ct(n),e=s.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),s):null}function bi(e){if(50<za)throw za=0,Er=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bl={};function p0(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 p0(e,t,n,l)}function ps(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 Zo(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 Si(e,t,n,l,a,s){var o=0;if(l=e,typeof e=="function")ps(e)&&(o=1);else if(typeof e=="string")o=Sy(e,n,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ve:return e=ft(31,n,t,a),e.elementType=ve,e.lanes=s,e;case G:return Zn(n.children,a,s,t);case q:o=8,a|=24;break;case H:return e=ft(12,n,t,a|2),e.elementType=H,e.lanes=s,e;case de:return e=ft(13,n,t,a),e.elementType=de,e.lanes=s,e;case Ae:return e=ft(19,n,t,a),e.elementType=Ae,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:o=10;break e;case Y:o=9;break e;case ne:o=11;break e;case F:o=14;break e;case _e: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,a),t.elementType=e,t.type=l,t.lanes=s,t}function Zn(e,t,n,l){return e=ft(7,e,l,t),e.lanes=n,e}function ys(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Ko(e){var t=ft(18,null,null,0);return t.stateNode=e,t}function vs(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 Jo=new WeakMap;function xt(e,t){if(typeof e=="object"&&e!==null){var n=Jo.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Zc(t)},Jo.set(e,t),t)}return{value:e,source:t,stack:Zc(t)}}var Sl=[],xl=0,xi=null,ca=0,_t=[],Et=0,yn=null,Ut=1,Bt="";function Jt(e,t){Sl[xl++]=ca,Sl[xl++]=xi,xi=e,ca=t}function $o(e,t,n){_t[Et++]=Ut,_t[Et++]=Bt,_t[Et++]=yn,yn=e;var l=Ut;e=Bt;var a=32-ct(l)-1;l&=~(1<<a),n+=1;var s=32-ct(t)+a;if(30<s){var o=a-a%5;s=(l&(1<<o)-1).toString(32),l>>=o,a-=o,Ut=1<<32-ct(t)+a|n<<a|l,Bt=s+e}else Ut=1<<s|n<<a|l,Bt=e}function gs(e){e.return!==null&&(Jt(e,1),$o(e,1,0))}function bs(e){for(;e===xi;)xi=Sl[--xl],Sl[xl]=null,ca=Sl[--xl],Sl[xl]=null;for(;e===yn;)yn=_t[--Et],_t[Et]=null,Bt=_t[--Et],_t[Et]=null,Ut=_t[--Et],_t[Et]=null}function Wo(e,t){_t[Et++]=Ut,_t[Et++]=Bt,_t[Et++]=yn,Ut=t.id,Bt=t.overflow,yn=e}var Ke=null,Ne=null,re=!1,vn=null,Tt=!1,Ss=Error(c(519));function gn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oa(xt(t,e)),Ss}function Fo(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Ze]=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<Da.length;n++)ie(Da[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),co(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),fo(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||ph(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 Po(e){for(Ke=e.return;Ke;)switch(Ke.tag){case 5:case 31:case 13:Tt=!1;return;case 27:case 3:Tt=!0;return;default:Ke=Ke.return}}function _l(e){if(e!==Ke)return!1;if(!re)return Po(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")||Hr(e.type,e.memoizedProps)),n=!n),n&&Ne&&gn(e),Po(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ne=Th(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ne=Th(e)}else t===27?(t=Ne,Dn(e.type)?(e=Gr,Gr=null,Ne=e):Ne=t):Ne=Ke?Nt(e.stateNode.nextSibling):null;return!0}function Kn(){Ne=Ke=null,re=!1}function xs(){var e=vn;return e!==null&&(it===null?it=e:it.push.apply(it,e),vn=null),e}function oa(e){vn===null?vn=[e]:vn.push(e)}var _s=_(null),Jn=null,$t=null;function bn(e,t,n){X(_s,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=_s.current,B(_s)}function Es(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 Ts(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var o=a.child;s=s.firstContext;e:for(;s!==null;){var d=s;s=a;for(var b=0;b<t.length;b++)if(d.context===t[b]){s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),Es(s.return,n,e),l||(o=null);break e}s=d.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(c(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Es(o,n,e),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function El(e,t,n,l){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var d=a.type;ot(a.pendingProps.value,o.value)||(e!==null?e.push(d):e=[d])}}else if(a===me.current){if(o=a.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(La):e=[La])}a=a.return}e!==null&&Ts(t,e,n,l),t.flags|=262144}function _i(e){for(e=e.firstContext;e!==null;){if(!ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $n(e){Jn=e,$t=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Je(e){return Io(Jn,e)}function Ei(e,t){return Jn===null&&$n(e),Io(e,t)}function Io(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 y0=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()})}},v0=u.unstable_scheduleCallback,g0=u.unstable_NormalPriority,Be={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function As(){return{controller:new y0,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&v0(g0,function(){e.controller.abort()})}var da=null,Ns=0,Tl=0,Al=null;function b0(e,t){if(da===null){var n=da=[];Ns=0,Tl=Or(),Al={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Ns++,t.then(ef,ef),t}function ef(){if(--Ns===0&&da!==null){Al!==null&&(Al.status="fulfilled");var e=da;da=null,Tl=0,Al=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function S0(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var tf=j.S;j.S=function(e,t){qd=st(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&b0(e,t),tf!==null&&tf(e,t)};var Wn=_(null);function Cs(){var e=Wn.current;return e!==null?e:Te.pooledCache}function Ti(e,t){t===null?X(Wn,Wn.current):X(Wn,t.pool)}function nf(){var e=Cs();return e===null?null:{parent:Be._currentValue,pool:e}}var Nl=Error(c(460)),Rs=Error(c(474)),Ai=Error(c(542)),Ni={then:function(){}};function lf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function af(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sf(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=Te,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sf(e),e}throw Pn=t,Nl}}function Fn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Pn=n,Nl):n}}var Pn=null;function uf(){if(Pn===null)throw Error(c(459));var e=Pn;return Pn=null,e}function sf(e){if(e===Nl||e===Ai)throw Error(c(483))}var Cl=null,ha=0;function Ci(e){var t=ha;return ha+=1,Cl===null&&(Cl=[]),af(Cl,e,t)}function ma(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ri(e,t){throw t.$$typeof===N?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function rf(e){function t(A,x){if(e){var C=A.deletions;C===null?(A.deletions=[x],A.flags|=16):C.push(x)}}function n(A,x){if(!e)return null;for(;x!==null;)t(A,x),x=x.sibling;return null}function l(A){for(var x=new Map;A!==null;)A.key!==null?x.set(A.key,A):x.set(A.index,A),A=A.sibling;return x}function a(A,x){return A=Kt(A,x),A.index=0,A.sibling=null,A}function s(A,x,C){return A.index=C,e?(C=A.alternate,C!==null?(C=C.index,C<x?(A.flags|=67108866,x):C):(A.flags|=67108866,x)):(A.flags|=1048576,x)}function o(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function d(A,x,C,w){return x===null||x.tag!==6?(x=ys(C,A.mode,w),x.return=A,x):(x=a(x,C),x.return=A,x)}function b(A,x,C,w){var J=C.type;return J===G?D(A,x,C.props.children,w,C.key):x!==null&&(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===_e&&Fn(J)===x.type)?(x=a(x,C.props),ma(x,C),x.return=A,x):(x=Si(C.type,C.key,C.props,null,A.mode,w),ma(x,C),x.return=A,x)}function R(A,x,C,w){return x===null||x.tag!==4||x.stateNode.containerInfo!==C.containerInfo||x.stateNode.implementation!==C.implementation?(x=vs(C,A.mode,w),x.return=A,x):(x=a(x,C.children||[]),x.return=A,x)}function D(A,x,C,w,J){return x===null||x.tag!==7?(x=Zn(C,A.mode,w,J),x.return=A,x):(x=a(x,C),x.return=A,x)}function U(A,x,C){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=ys(""+x,A.mode,C),x.return=A,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case M:return C=Si(x.type,x.key,x.props,null,A.mode,C),ma(C,x),C.return=A,C;case L:return x=vs(x,A.mode,C),x.return=A,x;case _e:return x=Fn(x),U(A,x,C)}if(Ot(x)||ke(x))return x=Zn(x,A.mode,C,null),x.return=A,x;if(typeof x.then=="function")return U(A,Ci(x),C);if(x.$$typeof===V)return U(A,Ei(A,x),C);Ri(A,x)}return null}function O(A,x,C,w){var J=x!==null?x.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return J!==null?null:d(A,x,""+C,w);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case M:return C.key===J?b(A,x,C,w):null;case L:return C.key===J?R(A,x,C,w):null;case _e:return C=Fn(C),O(A,x,C,w)}if(Ot(C)||ke(C))return J!==null?null:D(A,x,C,w,null);if(typeof C.then=="function")return O(A,x,Ci(C),w);if(C.$$typeof===V)return O(A,x,Ei(A,C),w);Ri(A,C)}return null}function z(A,x,C,w,J){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return A=A.get(C)||null,d(x,A,""+w,J);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case M:return A=A.get(w.key===null?C:w.key)||null,b(x,A,w,J);case L:return A=A.get(w.key===null?C:w.key)||null,R(x,A,w,J);case _e:return w=Fn(w),z(A,x,C,w,J)}if(Ot(w)||ke(w))return A=A.get(C)||null,D(x,A,w,J,null);if(typeof w.then=="function")return z(A,x,C,Ci(w),J);if(w.$$typeof===V)return z(A,x,C,Ei(x,w),J);Ri(x,w)}return null}function Q(A,x,C,w){for(var J=null,oe=null,K=x,te=x=0,se=null;K!==null&&te<C.length;te++){K.index>te?(se=K,K=null):se=K.sibling;var fe=O(A,K,C[te],w);if(fe===null){K===null&&(K=se);break}e&&K&&fe.alternate===null&&t(A,K),x=s(fe,x,te),oe===null?J=fe:oe.sibling=fe,oe=fe,K=se}if(te===C.length)return n(A,K),re&&Jt(A,te),J;if(K===null){for(;te<C.length;te++)K=U(A,C[te],w),K!==null&&(x=s(K,x,te),oe===null?J=K:oe.sibling=K,oe=K);return re&&Jt(A,te),J}for(K=l(K);te<C.length;te++)se=z(K,A,te,C[te],w),se!==null&&(e&&se.alternate!==null&&K.delete(se.key===null?te:se.key),x=s(se,x,te),oe===null?J=se:oe.sibling=se,oe=se);return e&&K.forEach(function(Ln){return t(A,Ln)}),re&&Jt(A,te),J}function $(A,x,C,w){if(C==null)throw Error(c(151));for(var J=null,oe=null,K=x,te=x=0,se=null,fe=C.next();K!==null&&!fe.done;te++,fe=C.next()){K.index>te?(se=K,K=null):se=K.sibling;var Ln=O(A,K,fe.value,w);if(Ln===null){K===null&&(K=se);break}e&&K&&Ln.alternate===null&&t(A,K),x=s(Ln,x,te),oe===null?J=Ln:oe.sibling=Ln,oe=Ln,K=se}if(fe.done)return n(A,K),re&&Jt(A,te),J;if(K===null){for(;!fe.done;te++,fe=C.next())fe=U(A,fe.value,w),fe!==null&&(x=s(fe,x,te),oe===null?J=fe:oe.sibling=fe,oe=fe);return re&&Jt(A,te),J}for(K=l(K);!fe.done;te++,fe=C.next())fe=z(K,A,te,fe.value,w),fe!==null&&(e&&fe.alternate!==null&&K.delete(fe.key===null?te:fe.key),x=s(fe,x,te),oe===null?J=fe:oe.sibling=fe,oe=fe);return e&&K.forEach(function(My){return t(A,My)}),re&&Jt(A,te),J}function xe(A,x,C,w){if(typeof C=="object"&&C!==null&&C.type===G&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case M:e:{for(var J=C.key;x!==null;){if(x.key===J){if(J=C.type,J===G){if(x.tag===7){n(A,x.sibling),w=a(x,C.props.children),w.return=A,A=w;break e}}else if(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===_e&&Fn(J)===x.type){n(A,x.sibling),w=a(x,C.props),ma(w,C),w.return=A,A=w;break e}n(A,x);break}else t(A,x);x=x.sibling}C.type===G?(w=Zn(C.props.children,A.mode,w,C.key),w.return=A,A=w):(w=Si(C.type,C.key,C.props,null,A.mode,w),ma(w,C),w.return=A,A=w)}return o(A);case L:e:{for(J=C.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===C.containerInfo&&x.stateNode.implementation===C.implementation){n(A,x.sibling),w=a(x,C.children||[]),w.return=A,A=w;break e}else{n(A,x);break}else t(A,x);x=x.sibling}w=vs(C,A.mode,w),w.return=A,A=w}return o(A);case _e:return C=Fn(C),xe(A,x,C,w)}if(Ot(C))return Q(A,x,C,w);if(ke(C)){if(J=ke(C),typeof J!="function")throw Error(c(150));return C=J.call(C),$(A,x,C,w)}if(typeof C.then=="function")return xe(A,x,Ci(C),w);if(C.$$typeof===V)return xe(A,x,Ei(A,C),w);Ri(A,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,x!==null&&x.tag===6?(n(A,x.sibling),w=a(x,C),w.return=A,A=w):(n(A,x),w=ys(C,A.mode,w),w.return=A,A=w),o(A)):n(A,x)}return function(A,x,C,w){try{ha=0;var J=xe(A,x,C,w);return Cl=null,J}catch(K){if(K===Nl||K===Ai)throw K;var oe=ft(29,K,null,A.mode);return oe.lanes=w,oe.return=A,oe}finally{}}}var In=rf(!0),cf=rf(!1),Sn=!1;function Os(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zs(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 xn(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 a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=bi(e),Qo(e,null,n),t}return gi(e,l,t,n),bi(e)}function pa(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,Pc(e,n)}}function Ms(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?a=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?a=s=t:s=s.next=t}else a=s=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:s,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 Ds=!1;function ya(){if(Ds){var e=Al;if(e!==null)throw e}}function va(e,t,n,l){Ds=!1;var a=e.updateQueue;Sn=!1;var s=a.firstBaseUpdate,o=a.lastBaseUpdate,d=a.shared.pending;if(d!==null){a.shared.pending=null;var b=d,R=b.next;b.next=null,o===null?s=R:o.next=R,o=b;var D=e.alternate;D!==null&&(D=D.updateQueue,d=D.lastBaseUpdate,d!==o&&(d===null?D.firstBaseUpdate=R:d.next=R,D.lastBaseUpdate=b))}if(s!==null){var U=a.baseState;o=0,D=R=b=null,d=s;do{var O=d.lane&-536870913,z=O!==d.lane;if(z?(ue&O)===O:(l&O)===O){O!==0&&O===Tl&&(Ds=!0),D!==null&&(D=D.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var Q=e,$=d;O=t;var xe=n;switch($.tag){case 1:if(Q=$.payload,typeof Q=="function"){U=Q.call(xe,U,O);break e}U=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=$.payload,O=typeof Q=="function"?Q.call(xe,U,O):Q,O==null)break e;U=S({},U,O);break e;case 2:Sn=!0}}O=d.callback,O!==null&&(e.flags|=64,z&&(e.flags|=8192),z=a.callbacks,z===null?a.callbacks=[O]:z.push(O))}else z={lane:O,tag:d.tag,payload:d.payload,callback:d.callback,next:null},D===null?(R=D=z,b=U):D=D.next=z,o|=O;if(d=d.next,d===null){if(d=a.shared.pending,d===null)break;z=d,d=z.next,z.next=null,a.lastBaseUpdate=z,a.shared.pending=null}}while(!0);D===null&&(b=U),a.baseState=b,a.firstBaseUpdate=R,a.lastBaseUpdate=D,s===null&&(a.shared.lanes=0),Cn|=o,e.lanes=o,e.memoizedState=U}}function of(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function ff(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)of(n[e],t)}var Rl=_(null),Oi=_(0);function df(e,t){e=un,X(Oi,e),X(Rl,t),un=e|t.baseLanes}function js(){X(Oi,un),X(Rl,Rl.current)}function ws(){un=Oi.current,B(Rl),B(Oi)}var dt=_(null),At=null;function En(e){var t=e.alternate;X(je,je.current&1),X(dt,e),At===null&&(t===null||Rl.current!==null||t.memoizedState!==null)&&(At=e)}function Us(e){X(je,je.current),X(dt,e),At===null&&(At=e)}function hf(e){e.tag===22?(X(je,je.current),X(dt,e),At===null&&(At=e)):Tn()}function Tn(){X(je,je.current),X(dt,dt.current)}function ht(e){B(dt),At===e&&(At=null),B(je)}var je=_(0);function zi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||kr(n)||Xr(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 Ft=0,ee=null,be=null,Le=null,Mi=!1,Ol=!1,el=!1,Di=0,ga=0,zl=null,x0=0;function ze(){throw Error(c(321))}function Bs(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 Ls(e,t,n,l,a,s){return Ft=s,ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Wf:Ps,el=!1,s=n(l,a),el=!1,Ol&&(s=pf(t,n,l,a)),mf(e),s}function mf(e){j.H=xa;var t=be!==null&&be.next!==null;if(Ft=0,Le=be=ee=null,Mi=!1,ga=0,zl=null,t)throw Error(c(300));e===null||He||(e=e.dependencies,e!==null&&_i(e)&&(He=!0))}function pf(e,t,n,l){ee=e;var a=0;do{if(Ol&&(zl=null),ga=0,Ol=!1,25<=a)throw Error(c(301));if(a+=1,Le=be=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}j.H=Ff,s=t(n,l)}while(Ol);return s}function _0(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?ba(t):t,e=e.useState()[0],(be!==null?be.memoizedState:null)!==e&&(ee.flags|=1024),t}function Hs(){var e=Di!==0;return Di=0,e}function qs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ys(e){if(Mi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Mi=!1}Ft=0,Le=be=ee=null,Ol=!1,ga=Di=0,zl=null}function Ie(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?ee.memoizedState=Le=e:Le=Le.next=e,Le}function we(){if(be===null){var e=ee.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=Le===null?ee.memoizedState:Le.next;if(t!==null)Le=t,be=e;else{if(e===null)throw ee.alternate===null?Error(c(467)):Error(c(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},Le===null?ee.memoizedState=Le=e:Le=Le.next=e}return Le}function ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ba(e){var t=ga;return ga+=1,zl===null&&(zl=[]),e=af(zl,e,t),t=ee,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Wf:Ps),e}function wi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ba(e);if(e.$$typeof===V)return Je(e)}throw Error(c(438,String(e)))}function ks(e){var t=null,n=ee.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ee.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ji(),ee.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]=Ge;return t.index++,n}function Pt(e,t){return typeof t=="function"?t(e):t}function Ui(e){var t=we();return Xs(t,be,e)}function Xs(e,t,n){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=n;var a=e.baseQueue,s=l.pending;if(s!==null){if(a!==null){var o=a.next;a.next=s.next,s.next=o}t.baseQueue=a=s,l.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var d=o=null,b=null,R=t,D=!1;do{var U=R.lane&-536870913;if(U!==R.lane?(ue&U)===U:(Ft&U)===U){var O=R.revertLane;if(O===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),U===Tl&&(D=!0);else if((Ft&O)===O){R=R.next,O===Tl&&(D=!0);continue}else U={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(d=b=U,o=s):b=b.next=U,ee.lanes|=O,Cn|=O;U=R.action,el&&n(s,U),s=R.hasEagerState?R.eagerState:n(s,U)}else O={lane:U,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(d=b=O,o=s):b=b.next=O,ee.lanes|=U,Cn|=U;R=R.next}while(R!==null&&R!==t);if(b===null?o=s:b.next=d,!ot(s,e.memoizedState)&&(He=!0,D&&(n=Al,n!==null)))throw n;e.memoizedState=s,e.baseState=o,e.baseQueue=b,l.lastRenderedState=s}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Gs(e){var t=we(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,s=t.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do s=e(s,o.action),o=o.next;while(o!==a);ot(s,t.memoizedState)||(He=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function yf(e,t,n){var l=ee,a=we(),s=re;if(s){if(n===void 0)throw Error(c(407));n=n()}else n=t();var o=!ot((be||a).memoizedState,n);if(o&&(a.memoizedState=n,He=!0),a=a.queue,Zs(bf.bind(null,l,a,e),[e]),a.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(l.flags|=2048,Ml(9,{destroy:void 0},gf.bind(null,l,a,n,t),null),Te===null)throw Error(c(349));s||(Ft&127)!==0||vf(l,t,n)}return n}function vf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ee.updateQueue,t===null?(t=ji(),ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function gf(e,t,n,l){t.value=n,t.getSnapshot=l,Sf(t)&&xf(e)}function bf(e,t,n){return n(function(){Sf(t)&&xf(e)})}function Sf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ot(e,n)}catch{return!0}}function xf(e){var t=Qn(e,2);t!==null&&ut(t,e,2)}function Vs(e){var t=Ie();if(typeof e=="function"){var n=e;if(e=n(),el){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function _f(e,t,n,l){return e.baseState=n,Xs(e,be,typeof l=="function"?l:Pt)}function E0(e,t,n,l,a){if(Hi(e))throw Error(c(485));if(e=t.action,e!==null){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){s.listeners.push(o)}};j.T!==null?n(!0):s.isTransition=!1,l(s),n=t.pending,n===null?(s.next=t.pending=s,Ef(t,s)):(s.next=n.next,t.pending=n.next=s)}}function Ef(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var s=j.T,o={};j.T=o;try{var d=n(a,l),b=j.S;b!==null&&b(o,d),Tf(e,t,d)}catch(R){Qs(e,t,R)}finally{s!==null&&o.types!==null&&(s.types=o.types),j.T=s}}else try{s=n(a,l),Tf(e,t,s)}catch(R){Qs(e,t,R)}}function Tf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Af(e,t,l)},function(l){return Qs(e,t,l)}):Af(e,t,n)}function Af(e,t,n){t.status="fulfilled",t.value=n,Nf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ef(e,n)))}function Qs(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Nf(t),t=t.next;while(t!==l)}e.action=null}function Nf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Cf(e,t){return t}function Rf(e,t){if(re){var n=Te.formState;if(n!==null){e:{var l=ee;if(re){if(Ne){t:{for(var a=Ne,s=Tt;a.nodeType!==8;){if(!s){a=null;break t}if(a=Nt(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Ne=Nt(a.nextSibling),l=a.data==="F!";break e}}gn(l)}l=!1}l&&(t=n[0])}}return n=Ie(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cf,lastRenderedState:t},n.queue=l,n=Kf.bind(null,ee,l),l.dispatch=n,l=Vs(!1),s=Fs.bind(null,ee,!1,l.queue),l=Ie(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=E0.bind(null,ee,a,s,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Of(e){var t=we();return zf(t,be,e)}function zf(e,t,n){if(t=Xs(e,t,Cf)[0],e=Ui(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ba(t)}catch(o){throw o===Nl?Ai:o}else l=t;t=we();var a=t.queue,s=a.dispatch;return n!==t.memoizedState&&(ee.flags|=2048,Ml(9,{destroy:void 0},T0.bind(null,a,n),null)),[l,s,e]}function T0(e,t){e.action=t}function Mf(e){var t=we(),n=be;if(n!==null)return zf(t,n,e);we(),t=t.memoizedState,n=we();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Ml(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ee.updateQueue,t===null&&(t=ji(),ee.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 Df(){return we().memoizedState}function Bi(e,t,n,l){var a=Ie();ee.flags|=e,a.memoizedState=Ml(1|t,{destroy:void 0},n,l===void 0?null:l)}function Li(e,t,n,l){var a=we();l=l===void 0?null:l;var s=a.memoizedState.inst;be!==null&&l!==null&&Bs(l,be.memoizedState.deps)?a.memoizedState=Ml(t,s,n,l):(ee.flags|=e,a.memoizedState=Ml(1|t,s,n,l))}function jf(e,t){Bi(8390656,8,e,t)}function Zs(e,t){Li(2048,8,e,t)}function A0(e){ee.flags|=4;var t=ee.updateQueue;if(t===null)t=ji(),ee.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function wf(e){var t=we().memoizedState;return A0({ref:t,nextImpl:e}),function(){if((he&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Uf(e,t){return Li(4,2,e,t)}function Bf(e,t){return Li(4,4,e,t)}function Lf(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 Hf(e,t,n){n=n!=null?n.concat([e]):null,Li(4,4,Lf.bind(null,t,e),n)}function Ks(){}function qf(e,t){var n=we();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Bs(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Yf(e,t){var n=we();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Bs(t,l[1]))return l[0];if(l=e(),el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l}function Js(e,t,n){return n===void 0||(Ft&1073741824)!==0&&(ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=kd(),ee.lanes|=e,Cn|=e,n)}function kf(e,t,n,l){return ot(n,t)?n:Rl.current!==null?(e=Js(e,n,l),ot(e,t)||(He=!0),e):(Ft&42)===0||(Ft&1073741824)!==0&&(ue&261930)===0?(He=!0,e.memoizedState=n):(e=kd(),ee.lanes|=e,Cn|=e,t)}function Xf(e,t,n,l,a){var s=k.p;k.p=s!==0&&8>s?s:8;var o=j.T,d={};j.T=d,Fs(e,!1,t,n);try{var b=a(),R=j.S;if(R!==null&&R(d,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var D=S0(b,l);Sa(e,t,D,yt(e))}else Sa(e,t,l,yt(e))}catch(U){Sa(e,t,{then:function(){},status:"rejected",reason:U},yt())}finally{k.p=s,o!==null&&d.types!==null&&(o.types=d.types),j.T=o}}function N0(){}function $s(e,t,n,l){if(e.tag!==5)throw Error(c(476));var a=Gf(e).queue;Xf(e,a,t,W,n===null?N0:function(){return Vf(e),n(l)})}function Gf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:W},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Vf(e){var t=Gf(e);t.next===null&&(t=e.alternate.memoizedState),Sa(e,t.next.queue,{},yt())}function Ws(){return Je(La)}function Qf(){return we().memoizedState}function Zf(){return we().memoizedState}function C0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yt();e=xn(n);var l=_n(t,e,n);l!==null&&(ut(l,t,n),pa(l,t,n)),t={cache:As()},e.payload=t;return}t=t.return}}function R0(e,t,n){var l=yt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hi(e)?Jf(t,n):(n=ms(e,t,n,l),n!==null&&(ut(n,e,l),$f(n,t,l)))}function Kf(e,t,n){var l=yt();Sa(e,t,n,l)}function Sa(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hi(e))Jf(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,d=s(o,n);if(a.hasEagerState=!0,a.eagerState=d,ot(d,o))return gi(e,t,a,0),Te===null&&vi(),!1}catch{}finally{}if(n=ms(e,t,a,l),n!==null)return ut(n,e,l),$f(n,t,l),!0}return!1}function Fs(e,t,n,l){if(l={lane:2,revertLane:Or(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Hi(e)){if(t)throw Error(c(479))}else t=ms(e,n,l,2),t!==null&&ut(t,e,2)}function Hi(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function Jf(e,t){Ol=Mi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $f(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Pc(e,n)}}var xa={readContext:Je,use:wi,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze};xa.useEffectEvent=ze;var Wf={readContext:Je,use:wi,useCallback:function(e,t){return Ie().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:jf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Bi(4194308,4,Lf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bi(4194308,4,e,t)},useInsertionEffect:function(e,t){Bi(4,2,e,t)},useMemo:function(e,t){var n=Ie();t=t===void 0?null:t;var l=e();if(el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Ie();if(n!==void 0){var a=n(t);if(el){hn(!0);try{n(t)}finally{hn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=R0.bind(null,ee,e),[l.memoizedState,e]},useRef:function(e){var t=Ie();return e={current:e},t.memoizedState=e},useState:function(e){e=Vs(e);var t=e.queue,n=Kf.bind(null,ee,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ks,useDeferredValue:function(e,t){var n=Ie();return Js(n,e,t)},useTransition:function(){var e=Vs(!1);return e=Xf.bind(null,ee,e.queue,!0,!1),Ie().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ee,a=Ie();if(re){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Te===null)throw Error(c(349));(ue&127)!==0||vf(l,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,jf(bf.bind(null,l,s,e),[e]),l.flags|=2048,Ml(9,{destroy:void 0},gf.bind(null,l,s,n,t),null),n},useId:function(){var e=Ie(),t=Te.identifierPrefix;if(re){var n=Bt,l=Ut;n=(l&~(1<<32-ct(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Di++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=x0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ws,useFormState:Rf,useActionState:Rf,useOptimistic:function(e){var t=Ie();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,ee,!0,n),n.dispatch=t,[e,t]},useMemoCache:ks,useCacheRefresh:function(){return Ie().memoizedState=C0.bind(null,ee)},useEffectEvent:function(e){var t=Ie(),n={impl:e};return t.memoizedState=n,function(){if((he&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},Ps={readContext:Je,use:wi,useCallback:qf,useContext:Je,useEffect:Zs,useImperativeHandle:Hf,useInsertionEffect:Uf,useLayoutEffect:Bf,useMemo:Yf,useReducer:Ui,useRef:Df,useState:function(){return Ui(Pt)},useDebugValue:Ks,useDeferredValue:function(e,t){var n=we();return kf(n,be.memoizedState,e,t)},useTransition:function(){var e=Ui(Pt)[0],t=we().memoizedState;return[typeof e=="boolean"?e:ba(e),t]},useSyncExternalStore:yf,useId:Qf,useHostTransitionStatus:Ws,useFormState:Of,useActionState:Of,useOptimistic:function(e,t){var n=we();return _f(n,be,e,t)},useMemoCache:ks,useCacheRefresh:Zf};Ps.useEffectEvent=wf;var Ff={readContext:Je,use:wi,useCallback:qf,useContext:Je,useEffect:Zs,useImperativeHandle:Hf,useInsertionEffect:Uf,useLayoutEffect:Bf,useMemo:Yf,useReducer:Gs,useRef:Df,useState:function(){return Gs(Pt)},useDebugValue:Ks,useDeferredValue:function(e,t){var n=we();return be===null?Js(n,e,t):kf(n,be.memoizedState,e,t)},useTransition:function(){var e=Gs(Pt)[0],t=we().memoizedState;return[typeof e=="boolean"?e:ba(e),t]},useSyncExternalStore:yf,useId:Qf,useHostTransitionStatus:Ws,useFormState:Mf,useActionState:Mf,useOptimistic:function(e,t){var n=we();return be!==null?_f(n,be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ks,useCacheRefresh:Zf};Ff.useEffectEvent=wf;function Is(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 er={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=yt(),a=xn(l);a.payload=t,n!=null&&(a.callback=n),t=_n(e,a,l),t!==null&&(ut(t,e,l),pa(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=yt(),a=xn(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=_n(e,a,l),t!==null&&(ut(t,e,l),pa(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),l=xn(n);l.tag=2,t!=null&&(l.callback=t),t=_n(e,l,n),t!==null&&(ut(t,e,n),pa(t,e,n))}};function Pf(e,t,n,l,a,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,s,o):t.prototype&&t.prototype.isPureReactComponent?!sa(n,l)||!sa(a,s):!0}function If(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&&er.enqueueReplaceState(t,t.state,null)}function tl(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 a in e)n[a]===void 0&&(n[a]=e[a])}return n}function ed(e){yi(e)}function td(e){console.error(e)}function nd(e){yi(e)}function qi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function ld(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function tr(e,t,n){return n=xn(n),n.tag=3,n.payload={element:null},n.callback=function(){qi(e,t)},n}function ad(e){return e=xn(e),e.tag=3,e}function id(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var s=l.value;e.payload=function(){return a(s)},e.callback=function(){ld(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){ld(t,n,l),typeof a!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function O0(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&El(t,n,a,!0),n=dt.current,n!==null){switch(n.tag){case 31:case 13:return At===null?Fi():n.alternate===null&&Me===0&&(Me=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Ni?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Nr(e,l,a)),!1;case 22:return n.flags|=65536,l===Ni?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)),Nr(e,l,a)),!1}throw Error(c(435,n.tag))}return Nr(e,l,a),Fi(),!1}if(re)return t=dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Ss&&(e=Error(c(422),{cause:l}),oa(xt(e,n)))):(l!==Ss&&(t=Error(c(423),{cause:l}),oa(xt(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=xt(l,n),a=tr(e.stateNode,l,a),Ms(e,a),Me!==4&&(Me=2)),!1;var s=Error(c(520),{cause:l});if(s=xt(s,n),Oa===null?Oa=[s]:Oa.push(s),Me!==4&&(Me=2),t===null)return!0;l=xt(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=tr(n.stateNode,l,e),Ms(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Rn===null||!Rn.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ad(a),id(a,e,n,l),Ms(n,a),!1}n=n.return}while(n!==null);return!1}var nr=Error(c(461)),He=!1;function $e(e,t,n,l){t.child=e===null?cf(t,null,n,l):In(t,e.child,n,l)}function ud(e,t,n,l,a){n=n.render;var s=t.ref;if("ref"in l){var o={};for(var d in l)d!=="ref"&&(o[d]=l[d])}else o=l;return $n(t),l=Ls(e,t,n,o,s,a),d=Hs(),e!==null&&!He?(qs(e,t,a),It(e,t,a)):(re&&d&&gs(t),t.flags|=1,$e(e,t,l,a),t.child)}function sd(e,t,n,l,a){if(e===null){var s=n.type;return typeof s=="function"&&!ps(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,rd(e,t,s,l,a)):(e=Si(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!or(e,a)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:sa,n(o,l)&&e.ref===t.ref)return It(e,t,a)}return t.flags|=1,e=Kt(s,l),e.ref=t.ref,e.return=t,t.child=e}function rd(e,t,n,l,a){if(e!==null){var s=e.memoizedProps;if(sa(s,l)&&e.ref===t.ref)if(He=!1,t.pendingProps=l=s,or(e,a))(e.flags&131072)!==0&&(He=!0);else return t.lanes=e.lanes,It(e,t,a)}return lr(e,t,n,l,a)}function cd(e,t,n,l){var a=l.children,s=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(s=s!==null?s.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~s}else l=0,t.child=null;return od(e,t,s,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ti(t,s!==null?s.cachePool:null),s!==null?df(t,s):js(),hf(t);else return l=t.lanes=536870912,od(e,t,s!==null?s.baseLanes|n:n,n,l)}else s!==null?(Ti(t,s.cachePool),df(t,s),Tn(),t.memoizedState=null):(e!==null&&Ti(t,null),js(),Tn());return $e(e,t,a,n),t.child}function _a(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function od(e,t,n,l,a){var s=Cs();return s=s===null?null:{parent:Be._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&Ti(t,null),js(),hf(t),e!==null&&El(e,t,l,!0),t.childLanes=a,null}function Yi(e,t){return t=Xi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fd(e,t,n){return In(t,e.child,null,n),e=Yi(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function z0(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(re){if(l.mode==="hidden")return e=Yi(t,l),t.lanes=536870912,_a(null,e);if(Us(t),(e=Ne)?(e=Eh(e,Tt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Ut,overflow:Bt}:null,retryLane:536870912,hydrationErrors:null},n=Ko(e),n.return=t,t.child=n,Ke=t,Ne=null)):e=null,e===null)throw gn(t);return t.lanes=536870912,null}return Yi(t,l)}var s=e.memoizedState;if(s!==null){var o=s.dehydrated;if(Us(t),a)if(t.flags&256)t.flags&=-257,t=fd(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||El(e,t,n,!1),a=(n&e.childLanes)!==0,He||a){if(l=Te,l!==null&&(o=Ic(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,Qn(e,o),ut(l,e,o),nr;Fi(),t=fd(e,t,n)}else e=s.treeContext,Ne=Nt(o.nextSibling),Ke=t,re=!0,vn=null,Tt=!1,e!==null&&Wo(t,e),t=Yi(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 ki(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function lr(e,t,n,l,a){return $n(t),n=Ls(e,t,n,l,void 0,a),l=Hs(),e!==null&&!He?(qs(e,t,a),It(e,t,a)):(re&&l&&gs(t),t.flags|=1,$e(e,t,n,a),t.child)}function dd(e,t,n,l,a,s){return $n(t),t.updateQueue=null,n=pf(t,l,n,a),mf(e),l=Hs(),e!==null&&!He?(qs(e,t,s),It(e,t,s)):(re&&l&&gs(t),t.flags|=1,$e(e,t,n,s),t.child)}function hd(e,t,n,l,a){if($n(t),t.stateNode===null){var s=bl,o=n.contextType;typeof o=="object"&&o!==null&&(s=Je(o)),s=new n(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=er,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},Os(t),o=n.contextType,s.context=typeof o=="object"&&o!==null?Je(o):bl,s.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(Is(t,n,o,l),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(o=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),o!==s.state&&er.enqueueReplaceState(s,s.state,null),va(t,l,s,a),ya(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var d=t.memoizedProps,b=tl(n,d);s.props=b;var R=s.context,D=n.contextType;o=bl,typeof D=="object"&&D!==null&&(o=Je(D));var U=n.getDerivedStateFromProps;D=typeof U=="function"||typeof s.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,D||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d||R!==o)&&If(t,s,l,o),Sn=!1;var O=t.memoizedState;s.state=O,va(t,l,s,a),ya(),R=t.memoizedState,d||O!==R||Sn?(typeof U=="function"&&(Is(t,n,U,l),R=t.memoizedState),(b=Sn||Pf(t,n,b,l,O,R,o))?(D||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=R),s.props=l,s.state=R,s.context=o,l=b):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,zs(e,t),o=t.memoizedProps,D=tl(n,o),s.props=D,U=t.pendingProps,O=s.context,R=n.contextType,b=bl,typeof R=="object"&&R!==null&&(b=Je(R)),d=n.getDerivedStateFromProps,(R=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==U||O!==b)&&If(t,s,l,b),Sn=!1,O=t.memoizedState,s.state=O,va(t,l,s,a),ya();var z=t.memoizedState;o!==U||O!==z||Sn||e!==null&&e.dependencies!==null&&_i(e.dependencies)?(typeof d=="function"&&(Is(t,n,d,l),z=t.memoizedState),(D=Sn||Pf(t,n,D,l,O,z,b)||e!==null&&e.dependencies!==null&&_i(e.dependencies))?(R||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,z,b),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,z,b)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=z),s.props=l,s.state=z,s.context=b,l=D):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return s=l,ki(e,t),l=(t.flags&128)!==0,s||l?(s=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&l?(t.child=In(t,e.child,null,a),t.child=In(t,null,n,a)):$e(e,t,n,a),t.memoizedState=s.state,e=t.child):e=It(e,t,a),e}function md(e,t,n,l){return Kn(),t.flags|=256,$e(e,t,n,l),t.child}var ar={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ir(e){return{baseLanes:e,cachePool:nf()}}function ur(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pt),e}function pd(e,t,n){var l=t.pendingProps,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(re){if(a?En(t):Tn(),(e=Ne)?(e=Eh(e,Tt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Ut,overflow:Bt}:null,retryLane:536870912,hydrationErrors:null},n=Ko(e),n.return=t,t.child=n,Ke=t,Ne=null)):e=null,e===null)throw gn(t);return Xr(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(Tn(),a=t.mode,d=Xi({mode:"hidden",children:d},a),l=Zn(l,a,n,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=ir(n),l.childLanes=ur(e,o,n),t.memoizedState=ar,_a(null,l)):(En(t),sr(t,d))}var b=e.memoizedState;if(b!==null&&(d=b.dehydrated,d!==null)){if(s)t.flags&256?(En(t),t.flags&=-257,t=rr(e,t,n)):t.memoizedState!==null?(Tn(),t.child=e.child,t.flags|=128,t=null):(Tn(),d=l.fallback,a=t.mode,l=Xi({mode:"visible",children:l.children},a),d=Zn(d,a,n,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,In(t,e.child,null,n),l=t.child,l.memoizedState=ir(n),l.childLanes=ur(e,o,n),t.memoizedState=ar,t=_a(null,l));else if(En(t),Xr(d)){if(o=d.nextSibling&&d.nextSibling.dataset,o)var R=o.dgst;o=R,l=Error(c(419)),l.stack="",l.digest=o,oa({value:l,source:null,stack:null}),t=rr(e,t,n)}else if(He||El(e,t,n,!1),o=(n&e.childLanes)!==0,He||o){if(o=Te,o!==null&&(l=Ic(o,n),l!==0&&l!==b.retryLane))throw b.retryLane=l,Qn(e,l),ut(o,e,l),nr;kr(d)||Fi(),t=rr(e,t,n)}else kr(d)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ne=Nt(d.nextSibling),Ke=t,re=!0,vn=null,Tt=!1,e!==null&&Wo(t,e),t=sr(t,l.children),t.flags|=4096);return t}return a?(Tn(),d=l.fallback,a=t.mode,b=e.child,R=b.sibling,l=Kt(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,R!==null?d=Kt(R,d):(d=Zn(d,a,n,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,_a(null,l),l=t.child,d=e.child.memoizedState,d===null?d=ir(n):(a=d.cachePool,a!==null?(b=Be._currentValue,a=a.parent!==b?{parent:b,pool:b}:a):a=nf(),d={baseLanes:d.baseLanes|n,cachePool:a}),l.memoizedState=d,l.childLanes=ur(e,o,n),t.memoizedState=ar,_a(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 sr(e,t){return t=Xi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xi(e,t){return e=ft(22,e,null,t),e.lanes=0,e}function rr(e,t,n){return In(t,e.child,null,n),e=sr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Es(e.return,t,n)}function cr(e,t,n,l,a,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=a,o.treeForkCount=s)}function vd(e,t,n){var l=t.pendingProps,a=l.revealOrder,s=l.tail;l=l.children;var o=je.current,d=(o&2)!==0;if(d?(o=o&1|2,t.flags|=128):o&=1,X(je,o),$e(e,t,l,n),l=re?ca:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yd(e,n,t);else if(e.tag===19)yd(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(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&zi(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),cr(t,!1,a,n,s,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&zi(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}cr(t,!0,n,null,s,l);break;case"together":cr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function It(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(El(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 or(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_i(e)))}function M0(e,t,n){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),bn(t,Be,e.memoizedState.cache),Kn();break;case 27:case 5:Jl(t);break;case 4:Pe(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,Us(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?pd(e,t,n):(En(t),e=It(e,t,n),e!==null?e.sibling:null);En(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(El(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return vd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),X(je,je.current),l)break;return null;case 22:return t.lanes=0,cd(e,t,n,t.pendingProps);case 24:bn(t,Be,e.memoizedState.cache)}return It(e,t,n)}function gd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)He=!0;else{if(!or(e,n)&&(t.flags&128)===0)return He=!1,M0(e,t,n);He=(e.flags&131072)!==0}else He=!1,re&&(t.flags&1048576)!==0&&$o(t,ca,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Fn(t.elementType),t.type=e,typeof e=="function")ps(e)?(l=tl(e,l),t.tag=1,t=hd(null,t,e,l,n)):(t.tag=0,t=lr(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=ud(null,t,e,l,n);break e}else if(a===F){t.tag=14,t=sd(null,t,e,l,n);break e}}throw t=Gt(e)||e,Error(c(306,t,""))}}return t;case 0:return lr(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=tl(l,t.pendingProps),hd(e,t,l,a,n);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var s=t.memoizedState;a=s.element,zs(e,t),va(t,l,null,n);var o=t.memoizedState;if(l=o.cache,bn(t,Be,l),l!==s.cache&&Ts(t,[Be],n,!0),ya(),l=o.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=md(e,t,l,n);break e}else if(l!==a){a=xt(Error(c(424)),t),oa(a),t=md(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ne=Nt(e.firstChild),Ke=t,re=!0,vn=null,Tt=!0,n=cf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kn(),l===a){t=It(e,t,n);break e}$e(e,t,l,n)}t=t.child}return t;case 26:return ki(e,t),e===null?(n=Oh(t.type,null,t.pendingProps,null))?t.memoizedState=n:re||(n=t.type,e=t.pendingProps,l=au(le.current).createElement(n),l[Ze]=t,l[et]=e,We(l,n,e),Ve(l),t.stateNode=l):t.memoizedState=Oh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Jl(t),e===null&&re&&(l=t.stateNode=Nh(t.type,t.pendingProps,le.current),Ke=t,Tt=!0,a=Ne,Dn(t.type)?(Gr=a,Ne=Nt(l.firstChild)):Ne=a),$e(e,t,t.pendingProps.children,n),ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&re&&((a=l=Ne)&&(l=sy(l,t.type,t.pendingProps,Tt),l!==null?(t.stateNode=l,Ke=t,Ne=Nt(l.firstChild),Tt=!1,a=!0):a=!1),a||gn(t)),Jl(t),a=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,l=s.children,Hr(a,s)?l=null:o!==null&&Hr(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=Ls(e,t,_0,null,null,n),La._currentValue=a),ki(e,t),$e(e,t,l,n),t.child;case 6:return e===null&&re&&((e=n=Ne)&&(n=ry(n,t.pendingProps,Tt),n!==null?(t.stateNode=n,Ke=t,Ne=null,e=!0):e=!1),e||gn(t)),null;case 13:return pd(e,t,n);case 4:return Pe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=In(t,null,l,n):$e(e,t,l,n),t.child;case 11:return ud(e,t,t.type,t.pendingProps,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,bn(t,t.type,l.value),$e(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,$n(t),a=Je(a),l=l(a),t.flags|=1,$e(e,t,l,n),t.child;case 14:return sd(e,t,t.type,t.pendingProps,n);case 15:return rd(e,t,t.type,t.pendingProps,n);case 19:return vd(e,t,n);case 31:return z0(e,t,n);case 22:return cd(e,t,n,t.pendingProps);case 24:return $n(t),l=Je(Be),e===null?(a=Cs(),a===null&&(a=Te,s=As(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:l,cache:a},Os(t),bn(t,Be,a)):((e.lanes&n)!==0&&(zs(e,t),va(t,null,null,n),ya()),a=e.memoizedState,s=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),bn(t,Be,l)):(l=s.cache,bn(t,Be,l),l!==a.cache&&Ts(t,[Be],n,!0))),$e(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 fr(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Qd())e.flags|=8192;else throw Pn=Ni,Rs}else e.flags&=-16777217}function bd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wh(t))if(Qd())e.flags|=8192;else throw Pn=Ni,Rs}function Gi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wc():536870912,e.lanes|=t,Ul|=t)}function Ea(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 Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function D0(e,t,n){var l=t.pendingProps;switch(bs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Ce(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Wt(Be),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(_l(t)?en(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xs())),Ce(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(en(t),s!==null?(Ce(t),bd(t,s)):(Ce(t),fr(t,a,null,l,n))):s?s!==e.memoizedState?(en(t),Ce(t),bd(t,s)):(Ce(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&en(t),Ce(t),fr(t,a,e,l,n)),null;case 27:if(ei(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Ce(t),null}e=Z.current,_l(t)?Fo(t):(e=Nh(a,l,n),t.stateNode=e,en(t))}return Ce(t),null;case 5:if(ei(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Ce(t),null}if(s=Z.current,_l(t))Fo(t);else{var o=au(le.current);switch(s){case 1:s=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=o.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?o.createElement(a,{is:l.is}):o.createElement(a)}}s[Ze]=t,s[et]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)s.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=s;e:switch(We(s,a,l),a){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 Ce(t),fr(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,_l(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ke,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[Ze]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||ph(e.nodeValue,n)),e||gn(t,!0)}else e=au(e).createTextNode(l),e[Ze]=t,t.stateNode=e}return Ce(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=_l(t),n!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Ze]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ce(t),e=!1}else n=xs(),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 Ce(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=_l(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(c(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[Ze]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ce(t),a=!1}else a=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)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,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gi(t,t.updateQueue),Ce(t),null);case 4:return De(),e===null&&jr(t.stateNode.containerInfo),Ce(t),null;case 10:return Wt(t.type),Ce(t),null;case 19:if(B(je),l=t.memoizedState,l===null)return Ce(t),null;if(a=(t.flags&128)!==0,s=l.rendering,s===null)if(a)Ea(l,!1);else{if(Me!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=zi(e),s!==null){for(t.flags|=128,Ea(l,!1),e=s.updateQueue,t.updateQueue=e,Gi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Zo(n,e),n=n.sibling;return X(je,je.current&1|2),re&&Jt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&st()>Ji&&(t.flags|=128,a=!0,Ea(l,!1),t.lanes=4194304)}else{if(!a)if(e=zi(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Gi(t,e),Ea(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!re)return Ce(t),null}else 2*st()-l.renderingStartTime>Ji&&n!==536870912&&(t.flags|=128,a=!0,Ea(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=st(),e.sibling=null,n=je.current,X(je,a?n&1|2:n&1),re&&Jt(t,l.treeForkCount),e):(Ce(t),null);case 22:case 23:return ht(t),ws(),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&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),n=t.updateQueue,n!==null&&Gi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&B(Wn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wt(Be),Ce(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function j0(e,t){switch(bs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(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 ei(t),null;case 31:if(t.memoizedState!==null){if(ht(t),t.alternate===null)throw Error(c(340));Kn()}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));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(je),null;case 4:return De(),null;case 10:return Wt(t.type),null;case 22:case 23:return ht(t),ws(),e!==null&&B(Wn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(Be),null;case 25:return null;default:return null}}function Sd(e,t){switch(bs(t),t.tag){case 3:Wt(Be),De();break;case 26:case 27:case 5:ei(t);break;case 4:De();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:B(je);break;case 10:Wt(t.type);break;case 22:case 23:ht(t),ws(),e!==null&&B(Wn);break;case 24:Wt(Be)}}function Ta(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var s=n.create,o=n.inst;l=s(),o.destroy=l}n=n.next}while(n!==a)}}catch(d){ye(t,t.return,d)}}function An(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){var o=l.inst,d=o.destroy;if(d!==void 0){o.destroy=void 0,a=t;var b=n,R=d;try{R()}catch(D){ye(a,b,D)}}}l=l.next}while(l!==s)}}catch(D){ye(t,t.return,D)}}function xd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ff(t,n)}catch(l){ye(e,e.return,l)}}}function _d(e,t,n){n.props=tl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){ye(e,t,l)}}function Aa(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(a){ye(e,t,a)}}function Lt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){ye(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){ye(e,t,a)}else n.current=null}function Ed(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(a){ye(e,e.return,a)}}function dr(e,t,n){try{var l=e.stateNode;ty(l,e.type,n,t),l[et]=t}catch(a){ye(e,e.return,a)}}function Td(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dn(e.type)||e.tag===4}function hr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Td(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 mr(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(mr(e,t,n),e=e.sibling;e!==null;)mr(e,t,n),e=e.sibling}function Vi(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(Vi(e,t,n),e=e.sibling;e!==null;)Vi(e,t,n),e=e.sibling}function Ad(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);We(t,l,n),t[Ze]=e,t[et]=n}catch(s){ye(e,e.return,s)}}var tn=!1,qe=!1,pr=!1,Nd=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function w0(e,t){if(e=e.containerInfo,Br=fu,e=Lo(e),rs(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 a=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,d=-1,b=-1,R=0,D=0,U=e,O=null;t:for(;;){for(var z;U!==n||a!==0&&U.nodeType!==3||(d=o+a),U!==s||l!==0&&U.nodeType!==3||(b=o+l),U.nodeType===3&&(o+=U.nodeValue.length),(z=U.firstChild)!==null;)O=U,U=z;for(;;){if(U===e)break t;if(O===n&&++R===a&&(d=o),O===s&&++D===l&&(b=o),(z=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=z}n=d===-1||b===-1?null:{start:d,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lr={focusedElem:e,selectionRange:n},fu=!1,Qe=t;Qe!==null;)if(t=Qe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qe=e;else for(;Qe!==null;){switch(t=Qe,s=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++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,a=s.memoizedProps,s=s.memoizedState,l=n.stateNode;try{var Q=tl(n.type,a);e=l.getSnapshotBeforeUpdate(Q,s),l.__reactInternalSnapshotBeforeUpdate=e}catch($){ye(n,n.return,$)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Yr(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Qe=e;break}Qe=t.return}}function Cd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:ln(e,n),l&4&&Ta(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 a=tl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){ye(n,n.return,o)}}l&64&&xd(n),l&512&&Aa(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{ff(e,t)}catch(o){ye(n,n.return,o)}}break;case 27:t===null&&l&4&&Ad(n);case 26:case 5:ln(e,n),t===null&&l&4&&Ed(n),l&512&&Aa(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),l&4&&zd(e,n);break;case 13:ln(e,n),l&4&&Md(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=G0.bind(null,n),cy(e,n))));break;case 22:if(l=n.memoizedState!==null||tn,!l){t=t!==null&&t.memoizedState!==null||qe,a=tn;var s=qe;tn=l,(qe=t)&&!s?an(e,n,(n.subtreeFlags&8772)!==0):ln(e,n),tn=a,qe=s}break;case 30:break;default:ln(e,n)}}function Rd(e){var t=e.alternate;t!==null&&(e.alternate=null,Rd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Qu(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 Re=null,nt=!1;function nn(e,t,n){for(n=n.child;n!==null;)Od(e,t,n),n=n.sibling}function Od(e,t,n){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount($l,n)}catch{}switch(n.tag){case 26:qe||Lt(n,t),nn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qe||Lt(n,t);var l=Re,a=nt;Dn(n.type)&&(Re=n.stateNode,nt=!1),nn(e,t,n),wa(n.stateNode),Re=l,nt=a;break;case 5:qe||Lt(n,t);case 6:if(l=Re,a=nt,Re=null,nn(e,t,n),Re=l,nt=a,Re!==null)if(nt)try{(Re.nodeType===9?Re.body:Re.nodeName==="HTML"?Re.ownerDocument.body:Re).removeChild(n.stateNode)}catch(s){ye(n,t,s)}else try{Re.removeChild(n.stateNode)}catch(s){ye(n,t,s)}break;case 18:Re!==null&&(nt?(e=Re,xh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Gl(e)):xh(Re,n.stateNode));break;case 4:l=Re,a=nt,Re=n.stateNode.containerInfo,nt=!0,nn(e,t,n),Re=l,nt=a;break;case 0:case 11:case 14:case 15:An(2,n,t),qe||An(4,n,t),nn(e,t,n);break;case 1:qe||(Lt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&_d(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 zd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gl(e)}catch(n){ye(t,t.return,n)}}}function Md(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(n){ye(t,t.return,n)}}function U0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Nd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nd),t;default:throw Error(c(435,e.tag))}}function Qi(e,t){var n=U0(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=V0.bind(null,e,l);l.then(a,a)}})}function lt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],s=e,o=t,d=o;e:for(;d!==null;){switch(d.tag){case 27:if(Dn(d.type)){Re=d.stateNode,nt=!1;break e}break;case 5:Re=d.stateNode,nt=!1;break e;case 3:case 4:Re=d.stateNode.containerInfo,nt=!0;break e}d=d.return}if(Re===null)throw Error(c(160));Od(s,o,a),Re=null,nt=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dd(t,e),t=t.sibling}var Mt=null;function Dd(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&&(An(3,e,e.return),Ta(3,e),An(5,e,e.return));break;case 1:lt(t,e),at(e),l&512&&(qe||n===null||Lt(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 a=Mt;if(lt(t,e),at(e),l&512&&(qe||n===null||Lt(n,n.return)),l&4){var s=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,a=a.ownerDocument||a;t:switch(l){case"title":s=a.getElementsByTagName("title")[0],(!s||s[Pl]||s[Ze]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=a.createElement(l),a.head.insertBefore(s,a.querySelector("head > title"))),We(s,l,n),s[Ze]=e,Ve(s),l=s;break e;case"link":var o=Dh("link","href",a).get(l+(n.href||""));if(o){for(var d=0;d<o.length;d++)if(s=o[d],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(d,1);break t}}s=a.createElement(l),We(s,l,n),a.head.appendChild(s);break;case"meta":if(o=Dh("meta","content",a).get(l+(n.content||""))){for(d=0;d<o.length;d++)if(s=o[d],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(d,1);break t}}s=a.createElement(l),We(s,l,n),a.head.appendChild(s);break;default:throw Error(c(468,l))}s[Ze]=e,Ve(s),l=s}e.stateNode=l}else jh(a,e.type,e.stateNode);else e.stateNode=Mh(a,l,e.memoizedProps);else s!==l?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,l===null?jh(a,e.type,e.stateNode):Mh(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&dr(e,e.memoizedProps,n.memoizedProps)}break;case 27:lt(t,e),at(e),l&512&&(qe||n===null||Lt(n,n.return)),n!==null&&l&4&&dr(e,e.memoizedProps,n.memoizedProps);break;case 5:if(lt(t,e),at(e),l&512&&(qe||n===null||Lt(n,n.return)),e.flags&32){a=e.stateNode;try{dl(a,"")}catch(Q){ye(e,e.return,Q)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,dr(e,a,n!==null?n.memoizedProps:a)),l&1024&&(pr=!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(su=null,a=Mt,Mt=iu(t.containerInfo),lt(t,e),Mt=a,at(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(Q){ye(e,e.return,Q)}pr&&(pr=!1,jd(e));break;case 4:l=Mt,Mt=iu(e.stateNode.containerInfo),lt(t,e),at(e),Mt=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,Qi(e,l)));break;case 13:lt(t,e),at(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ki=st()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qi(e,l)));break;case 22:a=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,R=tn,D=qe;if(tn=R||a,qe=D||b,lt(t,e),qe=D,tn=R,at(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||b||tn||qe||nl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(s=b.stateNode,a)o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{d=b.stateNode;var U=b.memoizedProps.style,O=U!=null&&U.hasOwnProperty("display")?U.display:null;d.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(Q){ye(b,b.return,Q)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=a?"":b.memoizedProps}catch(Q){ye(b,b.return,Q)}}}else if(t.tag===18){if(n===null){b=t;try{var z=b.stateNode;a?_h(z,!0):_h(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,Qi(e,n))));break;case 19:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qi(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(Td(l)){n=l;break}l=l.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var a=n.stateNode,s=hr(e);Vi(e,s,a);break;case 5:var o=n.stateNode;n.flags&32&&(dl(o,""),n.flags&=-33);var d=hr(e);Vi(e,d,o);break;case 3:case 4:var b=n.stateNode.containerInfo,R=hr(e);mr(e,R,b);break;default:throw Error(c(161))}}catch(D){ye(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jd(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;)Cd(e,t.alternate,t),t=t.sibling}function nl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:An(4,t,t.return),nl(t);break;case 1:Lt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&_d(t,t.return,n),nl(t);break;case 27:wa(t.stateNode);case 26:case 5:Lt(t,t.return),nl(t);break;case 22:t.memoizedState===null&&nl(t);break;case 30:nl(t);break;default:nl(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,a=e,s=t,o=s.flags;switch(s.tag){case 0:case 11:case 15:an(a,s,n),Ta(4,s);break;case 1:if(an(a,s,n),l=s,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(R){ye(l,l.return,R)}if(l=s,a=l.updateQueue,a!==null){var d=l.stateNode;try{var b=a.shared.hiddenCallbacks;if(b!==null)for(a.shared.hiddenCallbacks=null,a=0;a<b.length;a++)of(b[a],d)}catch(R){ye(l,l.return,R)}}n&&o&64&&xd(s),Aa(s,s.return);break;case 27:Ad(s);case 26:case 5:an(a,s,n),n&&l===null&&o&4&&Ed(s),Aa(s,s.return);break;case 12:an(a,s,n);break;case 31:an(a,s,n),n&&o&4&&zd(a,s);break;case 13:an(a,s,n),n&&o&4&&Md(a,s);break;case 22:s.memoizedState===null&&an(a,s,n),Aa(s,s.return);break;case 30:break;default:an(a,s,n)}t=t.sibling}}function yr(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&&fa(n))}function vr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function Dt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wd(e,t,n,l),t=t.sibling}function wd(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Dt(e,t,n,l),a&2048&&Ta(9,t);break;case 1:Dt(e,t,n,l);break;case 3:Dt(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(a&2048){Dt(e,t,n,l),e=t.stateNode;try{var s=t.memoizedProps,o=s.id,d=s.onPostCommit;typeof d=="function"&&d(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:s=t.stateNode,o=t.alternate,t.memoizedState!==null?s._visibility&2?Dt(e,t,n,l):Na(e,t):s._visibility&2?Dt(e,t,n,l):(s._visibility|=2,Dl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&yr(o,t);break;case 24:Dt(e,t,n,l),a&2048&&vr(t.alternate,t);break;default:Dt(e,t,n,l)}}function Dl(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,o=t,d=n,b=l,R=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(s,o,d,b,a),Ta(8,o);break;case 23:break;case 22:var D=o.stateNode;o.memoizedState!==null?D._visibility&2?Dl(s,o,d,b,a):Na(s,o):(D._visibility|=2,Dl(s,o,d,b,a)),a&&R&2048&&yr(o.alternate,o);break;case 24:Dl(s,o,d,b,a),a&&R&2048&&vr(o.alternate,o);break;default:Dl(s,o,d,b,a)}t=t.sibling}}function Na(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:Na(n,l),a&2048&&yr(l.alternate,l);break;case 24:Na(n,l),a&2048&&vr(l.alternate,l);break;default:Na(n,l)}t=t.sibling}}var Ca=8192;function jl(e,t,n){if(e.subtreeFlags&Ca)for(e=e.child;e!==null;)Ud(e,t,n),e=e.sibling}function Ud(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Ca&&e.memoizedState!==null&&xy(n,Mt,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var l=Mt;Mt=iu(e.stateNode.containerInfo),jl(e,t,n),Mt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ca,Ca=16777216,jl(e,t,n),Ca=l):jl(e,t,n));break;default:jl(e,t,n)}}function Bd(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 Ra(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Qe=l,Hd(l,e)}Bd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ld(e),e=e.sibling}function Ld(e){switch(e.tag){case 0:case 11:case 15:Ra(e),e.flags&2048&&An(9,e,e.return);break;case 3:Ra(e);break;case 12:Ra(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zi(e)):Ra(e);break;default:Ra(e)}}function Zi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Qe=l,Hd(l,e)}Bd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:An(8,t,t.return),Zi(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zi(t));break;default:Zi(t)}e=e.sibling}}function Hd(e,t){for(;Qe!==null;){var n=Qe;switch(n.tag){case 0:case 11:case 15:An(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:fa(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Qe=l;else e:for(n=e;Qe!==null;){l=Qe;var a=l.sibling,s=l.return;if(Rd(l),l===n){Qe=null;break e}if(a!==null){a.return=s,Qe=a;break e}Qe=s}}}var B0={getCacheForType:function(e){var t=Je(Be),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Je(Be).controller.signal}},L0=typeof WeakMap=="function"?WeakMap:Map,he=0,Te=null,ae=null,ue=0,pe=0,mt=null,Nn=!1,wl=!1,gr=!1,un=0,Me=0,Cn=0,ll=0,br=0,pt=0,Ul=0,Oa=null,it=null,Sr=!1,Ki=0,qd=0,Ji=1/0,$i=null,Rn=null,Xe=0,On=null,Bl=null,sn=0,xr=0,_r=null,Yd=null,za=0,Er=null;function yt(){return(he&2)!==0&&ue!==0?ue&-ue:j.T!==null?Or():eo()}function kd(){if(pt===0)if((ue&536870912)===0||re){var e=li;li<<=1,(li&3932160)===0&&(li=262144),pt=e}else pt=536870912;return e=dt.current,e!==null&&(e.flags|=32),pt}function ut(e,t,n){(e===Te&&(pe===2||pe===9)||e.cancelPendingCommit!==null)&&(Ll(e,0),zn(e,ue,pt,!1)),Fl(e,n),((he&2)===0||e!==Te)&&(e===Te&&((he&2)===0&&(ll|=n),Me===4&&zn(e,ue,pt,!1)),Ht(e))}function Xd(e,t,n){if((he&6)!==0)throw Error(c(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Wl(e,t),a=l?Y0(e,t):Ar(e,t,!0),s=l;do{if(a===0){wl&&!l&&zn(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!H0(n)){a=Ar(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var d=e;a=Oa;var b=d.current.memoizedState.isDehydrated;if(b&&(Ll(d,o).flags|=256),o=Ar(d,o,!1),o!==2){if(gr&&!b){d.errorRecoveryDisabledLanes|=s,ll|=s,a=4;break e}s=it,it=a,s!==null&&(it===null?it=s:it.push.apply(it,s))}a=o}if(s=!1,a!==2)continue}}if(a===1){Ll(e,0),zn(e,t,0,!0);break}e:{switch(l=e,s=a,s){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:zn(l,t,pt,!Nn);break e;case 2:it=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(a=Ki+300-st(),10<a)){if(zn(l,t,pt,!Nn),ii(l,0,!0)!==0)break e;sn=t,l.timeoutHandle=bh(Gd.bind(null,l,n,it,$i,Sr,t,pt,ll,Ul,Nn,s,"Throttled",-0,0),a);break e}Gd(l,n,it,$i,Sr,t,pt,ll,Ul,Nn,s,null,-0,0)}}break}while(!0);Ht(e)}function Gd(e,t,n,l,a,s,o,d,b,R,D,U,O,z){if(e.timeoutHandle=-1,U=t.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Ud(t,s,U);var Q=(s&62914560)===s?Ki-st():(s&4194048)===s?qd-st():0;if(Q=_y(U,Q),Q!==null){sn=s,e.cancelPendingCommit=Q(Fd.bind(null,e,t,s,n,l,a,o,d,b,D,U,null,O,z)),zn(e,s,o,!R);return}}Fd(e,t,s,n,l,a,o,d,b)}function H0(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 a=n[l],s=a.getSnapshot;a=a.value;try{if(!ot(s(),a))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 zn(e,t,n,l){t&=~br,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var s=31-ct(a),o=1<<s;l[s]=-1,a&=~o}n!==0&&Fc(e,n,t)}function Wi(){return(he&6)===0?(Ma(0),!1):!0}function Tr(){if(ae!==null){if(pe===0)var e=ae.return;else e=ae,$t=Jn=null,Ys(e),Cl=null,ha=0,e=ae;for(;e!==null;)Sd(e.alternate,e),e=e.return;ae=null}}function Ll(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ay(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),sn=0,Tr(),Te=e,ae=n=Kt(e.current,null),ue=t,pe=0,mt=null,Nn=!1,wl=Wl(e,t),gr=!1,Ul=pt=br=ll=Cn=Me=0,it=Oa=null,Sr=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-ct(l),s=1<<a;t|=e[a],l&=~s}return un=t,vi(),n}function Vd(e,t){ee=null,j.H=xa,t===Nl||t===Ai?(t=uf(),pe=3):t===Rs?(t=uf(),pe=4):pe=t===nr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mt=t,ae===null&&(Me=1,qi(e,xt(t,e.current)))}function Qd(){var e=dt.current;return e===null?!0:(ue&4194048)===ue?At===null:(ue&62914560)===ue||(ue&536870912)!==0?e===At:!1}function Zd(){var e=j.H;return j.H=xa,e===null?xa:e}function Kd(){var e=j.A;return j.A=B0,e}function Fi(){Me=4,Nn||(ue&4194048)!==ue&&dt.current!==null||(wl=!0),(Cn&134217727)===0&&(ll&134217727)===0||Te===null||zn(Te,ue,pt,!1)}function Ar(e,t,n){var l=he;he|=2;var a=Zd(),s=Kd();(Te!==e||ue!==t)&&($i=null,Ll(e,t)),t=!1;var o=Me;e:do try{if(pe!==0&&ae!==null){var d=ae,b=mt;switch(pe){case 8:Tr(),o=6;break e;case 3:case 2:case 9:case 6:dt.current===null&&(t=!0);var R=pe;if(pe=0,mt=null,Hl(e,d,b,R),n&&wl){o=0;break e}break;default:R=pe,pe=0,mt=null,Hl(e,d,b,R)}}q0(),o=Me;break}catch(D){Vd(e,D)}while(!0);return t&&e.shellSuspendCounter++,$t=Jn=null,he=l,j.H=a,j.A=s,ae===null&&(Te=null,ue=0,vi()),o}function q0(){for(;ae!==null;)Jd(ae)}function Y0(e,t){var n=he;he|=2;var l=Zd(),a=Kd();Te!==e||ue!==t?($i=null,Ji=st()+500,Ll(e,t)):wl=Wl(e,t);e:do try{if(pe!==0&&ae!==null){t=ae;var s=mt;t:switch(pe){case 1:pe=0,mt=null,Hl(e,t,s,1);break;case 2:case 9:if(lf(s)){pe=0,mt=null,$d(t);break}t=function(){pe!==2&&pe!==9||Te!==e||(pe=7),Ht(e)},s.then(t,t);break e;case 3:pe=7;break e;case 4:pe=5;break e;case 7:lf(s)?(pe=0,mt=null,$d(t)):(pe=0,mt=null,Hl(e,t,s,7));break;case 5:var o=null;switch(ae.tag){case 26:o=ae.memoizedState;case 5:case 27:var d=ae;if(o?wh(o):d.stateNode.complete){pe=0,mt=null;var b=d.sibling;if(b!==null)ae=b;else{var R=d.return;R!==null?(ae=R,Pi(R)):ae=null}break t}}pe=0,mt=null,Hl(e,t,s,5);break;case 6:pe=0,mt=null,Hl(e,t,s,6);break;case 8:Tr(),Me=6;break e;default:throw Error(c(462))}}k0();break}catch(D){Vd(e,D)}while(!0);return $t=Jn=null,j.H=l,j.A=a,he=n,ae!==null?0:(Te=null,ue=0,vi(),Me)}function k0(){for(;ae!==null&&!op();)Jd(ae)}function Jd(e){var t=gd(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?Pi(e):ae=t}function $d(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dd(n,t,t.pendingProps,t.type,void 0,ue);break;case 11:t=dd(n,t,t.pendingProps,t.type.render,t.ref,ue);break;case 5:Ys(t);default:Sd(n,t),t=ae=Zo(t,un),t=gd(n,t,un)}e.memoizedProps=e.pendingProps,t===null?Pi(e):ae=t}function Hl(e,t,n,l){$t=Jn=null,Ys(t),Cl=null,ha=0;var a=t.return;try{if(O0(e,a,t,n,ue)){Me=1,qi(e,xt(n,e.current)),ae=null;return}}catch(s){if(a!==null)throw ae=a,s;Me=1,qi(e,xt(n,e.current)),ae=null;return}t.flags&32768?(re||l===1?e=!0:wl||(ue&536870912)!==0?e=!1:(Nn=e=!0,(l===2||l===9||l===3||l===6)&&(l=dt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Wd(t,e)):Pi(t)}function Pi(e){var t=e;do{if((t.flags&32768)!==0){Wd(t,Nn);return}e=t.return;var n=D0(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);Me===0&&(Me=5)}function Wd(e,t){do{var n=j0(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);Me=6,ae=null}function Fd(e,t,n,l,a,s,o,d,b){e.cancelPendingCommit=null;do Ii();while(Xe!==0);if((he&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(s=t.lanes|t.childLanes,s|=hs,Sp(e,n,s,o,d,b),e===Te&&(ae=Te=null,ue=0),Bl=t,On=e,sn=n,xr=s,_r=a,Yd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Q0(ti,function(){return nh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=j.T,j.T=null,a=k.p,k.p=2,o=he,he|=4;try{w0(e,t,n)}finally{he=o,k.p=a,j.T=l}}Xe=1,Pd(),Id(),eh()}}function Pd(){if(Xe===1){Xe=0;var e=On,t=Bl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=j.T,j.T=null;var l=k.p;k.p=2;var a=he;he|=4;try{Dd(t,e);var s=Lr,o=Lo(e.containerInfo),d=s.focusedElem,b=s.selectionRange;if(o!==d&&d&&d.ownerDocument&&Bo(d.ownerDocument.documentElement,d)){if(b!==null&&rs(d)){var R=b.start,D=b.end;if(D===void 0&&(D=R),"selectionStart"in d)d.selectionStart=R,d.selectionEnd=Math.min(D,d.value.length);else{var U=d.ownerDocument||document,O=U&&U.defaultView||window;if(O.getSelection){var z=O.getSelection(),Q=d.textContent.length,$=Math.min(b.start,Q),xe=b.end===void 0?$:Math.min(b.end,Q);!z.extend&&$>xe&&(o=xe,xe=$,$=o);var A=Uo(d,$),x=Uo(d,xe);if(A&&x&&(z.rangeCount!==1||z.anchorNode!==A.node||z.anchorOffset!==A.offset||z.focusNode!==x.node||z.focusOffset!==x.offset)){var C=U.createRange();C.setStart(A.node,A.offset),z.removeAllRanges(),$>xe?(z.addRange(C),z.extend(x.node,x.offset)):(C.setEnd(x.node,x.offset),z.addRange(C))}}}}for(U=[],z=d;z=z.parentNode;)z.nodeType===1&&U.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<U.length;d++){var w=U[d];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}fu=!!Br,Lr=Br=null}finally{he=a,k.p=l,j.T=n}}e.current=t,Xe=2}}function Id(){if(Xe===2){Xe=0;var e=On,t=Bl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=j.T,j.T=null;var l=k.p;k.p=2;var a=he;he|=4;try{Cd(e,t.alternate,t)}finally{he=a,k.p=l,j.T=n}}Xe=3}}function eh(){if(Xe===4||Xe===3){Xe=0,fp();var e=On,t=Bl,n=sn,l=Yd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Xe=5:(Xe=0,Bl=On=null,th(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Rn=null),Gu(n),t=t.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot($l,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=j.T,a=k.p,k.p=2,j.T=null;try{for(var s=e.onRecoverableError,o=0;o<l.length;o++){var d=l[o];s(d.value,{componentStack:d.stack})}}finally{j.T=t,k.p=a}}(sn&3)!==0&&Ii(),Ht(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===Er?za++:(za=0,Er=e):za=0,Ma(0)}}function th(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Ii(){return Pd(),Id(),eh(),nh()}function nh(){if(Xe!==5)return!1;var e=On,t=xr;xr=0;var n=Gu(sn),l=j.T,a=k.p;try{k.p=32>n?32:n,j.T=null,n=_r,_r=null;var s=On,o=sn;if(Xe=0,Bl=On=null,sn=0,(he&6)!==0)throw Error(c(331));var d=he;if(he|=4,Ld(s.current),wd(s,s.current,o,n),he=d,Ma(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot($l,s)}catch{}return!0}finally{k.p=a,j.T=l,th(e,t)}}function lh(e,t,n){t=xt(n,t),t=tr(e.stateNode,t,2),e=_n(e,t,2),e!==null&&(Fl(e,2),Ht(e))}function ye(e,t,n){if(e.tag===3)lh(e,e,n);else for(;t!==null;){if(t.tag===3){lh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Rn===null||!Rn.has(l))){e=xt(n,e),n=ad(2),l=_n(t,n,2),l!==null&&(id(n,l,t,e),Fl(l,2),Ht(l));break}}t=t.return}}function Nr(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new L0;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(gr=!0,a.add(n),e=X0.bind(null,e,t,n),t.then(e,e))}function X0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Te===e&&(ue&n)===n&&(Me===4||Me===3&&(ue&62914560)===ue&&300>st()-Ki?(he&2)===0&&Ll(e,0):br|=n,Ul===ue&&(Ul=0)),Ht(e)}function ah(e,t){t===0&&(t=Wc()),e=Qn(e,t),e!==null&&(Fl(e,t),Ht(e))}function G0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ah(e,n)}function V0(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.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),ah(e,n)}function Q0(e,t){return qu(e,t)}var eu=null,ql=null,Cr=!1,tu=!1,Rr=!1,Mn=0;function Ht(e){e!==ql&&e.next===null&&(ql===null?eu=ql=e:ql=ql.next=e),tu=!0,Cr||(Cr=!0,K0())}function Ma(e,t){if(!Rr&&tu){Rr=!0;do for(var n=!1,l=eu;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var s=0;else{var o=l.suspendedLanes,d=l.pingedLanes;s=(1<<31-ct(42|e)+1)-1,s&=a&~(o&~d),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,rh(l,s))}else s=ue,s=ii(l,l===Te?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Wl(l,s)||(n=!0,rh(l,s));l=l.next}while(n);Rr=!1}}function Z0(){ih()}function ih(){tu=Cr=!1;var e=0;Mn!==0&&ly()&&(e=Mn);for(var t=st(),n=null,l=eu;l!==null;){var a=l.next,s=uh(l,t);s===0?(l.next=null,n===null?eu=a:n.next=a,a===null&&(ql=n)):(n=l,(e!==0||(s&3)!==0)&&(tu=!0)),l=a}Xe!==0&&Xe!==5||Ma(e),Mn!==0&&(Mn=0)}function uh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var o=31-ct(s),d=1<<o,b=a[o];b===-1?((d&n)===0||(d&l)!==0)&&(a[o]=bp(d,t)):b<=t&&(e.expiredLanes|=d),s&=~d}if(t=Te,n=ue,n=ii(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&&Yu(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Wl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Yu(l),Gu(n)){case 2:case 8:n=Jc;break;case 32:n=ti;break;case 268435456:n=$c;break;default:n=ti}return l=sh.bind(null,e),n=qu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Yu(l),e.callbackPriority=2,e.callbackNode=null,2}function sh(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ii()&&e.callbackNode!==n)return null;var l=ue;return l=ii(e,e===Te?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Xd(e,l,t),uh(e,st()),e.callbackNode!=null&&e.callbackNode===n?sh.bind(null,e):null)}function rh(e,t){if(Ii())return null;Xd(e,t,!0)}function K0(){iy(function(){(he&6)!==0?qu(Kc,Z0):ih()})}function Or(){if(Mn===0){var e=Tl;e===0&&(e=ni,ni<<=1,(ni&261888)===0&&(ni=256)),Mn=e}return Mn}function ch(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ci(""+e)}function oh(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 J0(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var s=ch((a[et]||null).action),o=l.submitter;o&&(t=(t=o[et]||null)?ch(t.formAction):o.getAttribute("formAction"),t!==null&&(s=t,o=null));var d=new hi("action","action",null,l,a);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Mn!==0){var b=o?oh(a,o):new FormData(a);$s(n,{pending:!0,data:b,method:a.method,action:s},null,b)}}else typeof s=="function"&&(d.preventDefault(),b=o?oh(a,o):new FormData(a),$s(n,{pending:!0,data:b,method:a.method,action:s},s,b))},currentTarget:a}]})}}for(var zr=0;zr<ds.length;zr++){var Mr=ds[zr],$0=Mr.toLowerCase(),W0=Mr[0].toUpperCase()+Mr.slice(1);zt($0,"on"+W0)}zt(Yo,"onAnimationEnd"),zt(ko,"onAnimationIteration"),zt(Xo,"onAnimationStart"),zt("dblclick","onDoubleClick"),zt("focusin","onFocus"),zt("focusout","onBlur"),zt(d0,"onTransitionRun"),zt(h0,"onTransitionStart"),zt(m0,"onTransitionCancel"),zt(Go,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("onPointerLeave",["pointerout","pointerover"]),kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Da="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(" "),F0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Da));function fh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var s=void 0;if(t)for(var o=l.length-1;0<=o;o--){var d=l[o],b=d.instance,R=d.currentTarget;if(d=d.listener,b!==s&&a.isPropagationStopped())break e;s=d,a.currentTarget=R;try{s(a)}catch(D){yi(D)}a.currentTarget=null,s=b}else for(o=0;o<l.length;o++){if(d=l[o],b=d.instance,R=d.currentTarget,d=d.listener,b!==s&&a.isPropagationStopped())break e;s=d,a.currentTarget=R;try{s(a)}catch(D){yi(D)}a.currentTarget=null,s=b}}}}function ie(e,t){var n=t[Vu];n===void 0&&(n=t[Vu]=new Set);var l=e+"__bubble";n.has(l)||(dh(t,e,2,!1),n.add(l))}function Dr(e,t,n){var l=0;t&&(l|=4),dh(n,e,l,t)}var nu="_reactListening"+Math.random().toString(36).slice(2);function jr(e){if(!e[nu]){e[nu]=!0,lo.forEach(function(n){n!=="selectionchange"&&(F0.has(n)||Dr(n,!1,e),Dr(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[nu]||(t[nu]=!0,Dr("selectionchange",!1,t))}}function dh(e,t,n,l){switch(kh(t)){case 2:var a=Ay;break;case 8:a=Ny;break;default:a=Jr}n=a.bind(null,t,n,e),a=void 0,!Iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function wr(e,t,n,l,a){var s=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 d=l.stateNode.containerInfo;if(d===a)break;if(o===4)for(o=l.return;o!==null;){var b=o.tag;if((b===3||b===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;d!==null;){if(o=sl(d),o===null)return;if(b=o.tag,b===5||b===6||b===26||b===27){l=s=o;continue e}d=d.parentNode}}l=l.return}yo(function(){var R=s,D=Fu(n),U=[];e:{var O=Vo.get(e);if(O!==void 0){var z=hi,Q=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":z=Vp;break;case"focusin":Q="focus",z=ls;break;case"focusout":Q="blur",z=ls;break;case"beforeblur":case"afterblur":z=ls;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=bo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Dp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Kp;break;case Yo:case ko:case Xo:z=Up;break;case Go:z=$p;break;case"scroll":case"scrollend":z=zp;break;case"wheel":z=Fp;break;case"copy":case"cut":case"paste":z=Lp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=xo;break;case"toggle":case"beforetoggle":z=Ip}var $=(t&4)!==0,xe=!$&&(e==="scroll"||e==="scrollend"),A=$?O!==null?O+"Capture":null:O;$=[];for(var x=R,C;x!==null;){var w=x;if(C=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||C===null||A===null||(w=ea(x,A),w!=null&&$.push(ja(x,w,C))),xe)break;x=x.return}0<$.length&&(O=new z(O,Q,null,n,D),U.push({event:O,listeners:$}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",O&&n!==Wu&&(Q=n.relatedTarget||n.fromElement)&&(sl(Q)||Q[ul]))break e;if((z||O)&&(O=D.window===D?D:(O=D.ownerDocument)?O.defaultView||O.parentWindow:window,z?(Q=n.relatedTarget||n.toElement,z=R,Q=Q?sl(Q):null,Q!==null&&(xe=h(Q),$=Q.tag,Q!==xe||$!==5&&$!==27&&$!==6)&&(Q=null)):(z=null,Q=R),z!==Q)){if($=bo,w="onMouseLeave",A="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&($=xo,w="onPointerLeave",A="onPointerEnter",x="pointer"),xe=z==null?O:Il(z),C=Q==null?O:Il(Q),O=new $(w,x+"leave",z,n,D),O.target=xe,O.relatedTarget=C,w=null,sl(D)===R&&($=new $(A,x+"enter",Q,n,D),$.target=C,$.relatedTarget=xe,w=$),xe=w,z&&Q)t:{for($=P0,A=z,x=Q,C=0,w=A;w;w=$(w))C++;w=0;for(var J=x;J;J=$(J))w++;for(;0<C-w;)A=$(A),C--;for(;0<w-C;)x=$(x),w--;for(;C--;){if(A===x||x!==null&&A===x.alternate){$=A;break t}A=$(A),x=$(x)}$=null}else $=null;z!==null&&hh(U,O,z,$,!1),Q!==null&&xe!==null&&hh(U,xe,Q,$,!0)}}e:{if(O=R?Il(R):window,z=O.nodeName&&O.nodeName.toLowerCase(),z==="select"||z==="input"&&O.type==="file")var oe=Oo;else if(Co(O))if(zo)oe=c0;else{oe=s0;var K=u0}else z=O.nodeName,!z||z.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?R&&$u(R.elementType)&&(oe=Oo):oe=r0;if(oe&&(oe=oe(e,R))){Ro(U,oe,n,D);break e}K&&K(e,O,R),e==="focusout"&&R&&O.type==="number"&&R.memoizedProps.value!=null&&Ju(O,"number",O.value)}switch(K=R?Il(R):window,e){case"focusin":(Co(K)||K.contentEditable==="true")&&(yl=K,cs=R,ra=null);break;case"focusout":ra=cs=yl=null;break;case"mousedown":os=!0;break;case"contextmenu":case"mouseup":case"dragend":os=!1,Ho(U,n,D);break;case"selectionchange":if(f0)break;case"keydown":case"keyup":Ho(U,n,D)}var te;if(is)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 pl?Ao(e,n)&&(se="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(se="onCompositionStart");se&&(_o&&n.locale!=="ko"&&(pl||se!=="onCompositionStart"?se==="onCompositionEnd"&&pl&&(te=vo()):(pn=D,es="value"in pn?pn.value:pn.textContent,pl=!0)),K=lu(R,se),0<K.length&&(se=new So(se,e,null,n,D),U.push({event:se,listeners:K}),te?se.data=te:(te=No(n),te!==null&&(se.data=te)))),(te=t0?n0(e,n):l0(e,n))&&(se=lu(R,"onBeforeInput"),0<se.length&&(K=new So("onBeforeInput","beforeinput",null,n,D),U.push({event:K,listeners:se}),K.data=te)),J0(U,e,R,n,D)}fh(U,t)})}function ja(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lu(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=ea(e,n),a!=null&&l.unshift(ja(e,a,s)),a=ea(e,t),a!=null&&l.push(ja(e,a,s))),e.tag===3)return l;e=e.return}return[]}function P0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function hh(e,t,n,l,a){for(var s=t._reactName,o=[];n!==null&&n!==l;){var d=n,b=d.alternate,R=d.stateNode;if(d=d.tag,b!==null&&b===l)break;d!==5&&d!==26&&d!==27||R===null||(b=R,a?(R=ea(n,s),R!=null&&o.unshift(ja(n,R,b))):a||(R=ea(n,s),R!=null&&o.push(ja(n,R,b)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var I0=/\r\n?/g,ey=/\u0000|\uFFFD/g;function mh(e){return(typeof e=="string"?e:""+e).replace(I0,`
|
|
`).replace(ey,"")}function ph(e,t){return t=mh(t),mh(e)===t}function Se(e,t,n,l,a,s){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||dl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&dl(e,""+l);break;case"className":si(e,"class",l);break;case"tabIndex":si(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":si(e,n,l);break;case"style":mo(e,l,s);break;case"data":if(t!=="object"){si(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=ci(""+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 s=="function"&&(n==="formAction"?(t!=="input"&&Se(e,t,"name",a.name,a,null),Se(e,t,"formEncType",a.formEncType,a,null),Se(e,t,"formMethod",a.formMethod,a,null),Se(e,t,"formTarget",a.formTarget,a,null)):(Se(e,t,"encType",a.encType,a,null),Se(e,t,"method",a.method,a,null),Se(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ci(""+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(a.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=ci(""+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),ui(e,"popover",l);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ui(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=Rp.get(n)||n,ui(e,n,l))}}function Ur(e,t,n,l,a,s){switch(n){case"style":mo(e,l,s);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"children":typeof l=="string"?dl(e,l):(typeof l=="number"||typeof l=="bigint")&&dl(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(!ao.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),s=e[et]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,a),typeof l=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):ui(e,n,l)}}}function We(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,a=!1,s;for(s in n)if(n.hasOwnProperty(s)){var o=n[s];if(o!=null)switch(s){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Se(e,t,s,o,n,null)}}a&&Se(e,t,"srcSet",n.srcSet,n,null),l&&Se(e,t,"src",n.src,n,null);return;case"input":ie("invalid",e);var d=s=o=a=null,b=null,R=null;for(l in n)if(n.hasOwnProperty(l)){var D=n[l];if(D!=null)switch(l){case"name":a=D;break;case"type":o=D;break;case"checked":b=D;break;case"defaultChecked":R=D;break;case"value":s=D;break;case"defaultValue":d=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(c(137,t));break;default:Se(e,t,l,D,n,null)}}co(e,s,d,b,R,o,a,!1);return;case"select":ie("invalid",e),l=o=s=null;for(a in n)if(n.hasOwnProperty(a)&&(d=n[a],d!=null))switch(a){case"value":s=d;break;case"defaultValue":o=d;break;case"multiple":l=d;default:Se(e,t,a,d,n,null)}t=s,n=o,e.multiple=!!l,t!=null?fl(e,!!l,t,!1):n!=null&&fl(e,!!l,n,!0);return;case"textarea":ie("invalid",e),s=a=l=null;for(o in n)if(n.hasOwnProperty(o)&&(d=n[o],d!=null))switch(o){case"value":l=d;break;case"defaultValue":a=d;break;case"children":s=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(c(91));break;default:Se(e,t,o,d,n,null)}fo(e,l,a,s);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:Se(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<Da.length;l++)ie(Da[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(R in n)if(n.hasOwnProperty(R)&&(l=n[R],l!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Se(e,t,R,l,n,null)}return;default:if($u(t)){for(D in n)n.hasOwnProperty(D)&&(l=n[D],l!==void 0&&Ur(e,t,D,l,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(l=n[d],l!=null&&Se(e,t,d,l,n,null))}function ty(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 a=null,s=null,o=null,d=null,b=null,R=null,D=null;for(z in n){var U=n[z];if(n.hasOwnProperty(z)&&U!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":b=U;default:l.hasOwnProperty(z)||Se(e,t,z,null,l,U)}}for(var O in l){var z=l[O];if(U=n[O],l.hasOwnProperty(O)&&(z!=null||U!=null))switch(O){case"type":s=z;break;case"name":a=z;break;case"checked":R=z;break;case"defaultChecked":D=z;break;case"value":o=z;break;case"defaultValue":d=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(c(137,t));break;default:z!==U&&Se(e,t,O,z,l,U)}}Ku(e,o,d,b,R,D,s,a);return;case"select":z=o=d=O=null;for(s in n)if(b=n[s],n.hasOwnProperty(s)&&b!=null)switch(s){case"value":break;case"multiple":z=b;default:l.hasOwnProperty(s)||Se(e,t,s,null,l,b)}for(a in l)if(s=l[a],b=n[a],l.hasOwnProperty(a)&&(s!=null||b!=null))switch(a){case"value":O=s;break;case"defaultValue":d=s;break;case"multiple":o=s;default:s!==b&&Se(e,t,a,s,l,b)}t=d,n=o,l=z,O!=null?fl(e,!!n,O,!1):!!l!=!!n&&(t!=null?fl(e,!!n,t,!0):fl(e,!!n,n?[]:"",!1));return;case"textarea":z=O=null;for(d in n)if(a=n[d],n.hasOwnProperty(d)&&a!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:Se(e,t,d,null,l,a)}for(o in l)if(a=l[o],s=n[o],l.hasOwnProperty(o)&&(a!=null||s!=null))switch(o){case"value":O=a;break;case"defaultValue":z=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(c(91));break;default:a!==s&&Se(e,t,o,a,l,s)}oo(e,O,z);return;case"option":for(var Q in n)if(O=n[Q],n.hasOwnProperty(Q)&&O!=null&&!l.hasOwnProperty(Q))switch(Q){case"selected":e.selected=!1;break;default:Se(e,t,Q,null,l,O)}for(b in l)if(O=l[b],z=n[b],l.hasOwnProperty(b)&&O!==z&&(O!=null||z!=null))switch(b){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Se(e,t,b,O,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 $ in n)O=n[$],n.hasOwnProperty($)&&O!=null&&!l.hasOwnProperty($)&&Se(e,t,$,null,l,O);for(R in l)if(O=l[R],z=n[R],l.hasOwnProperty(R)&&O!==z&&(O!=null||z!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,t));break;default:Se(e,t,R,O,l,z)}return;default:if($u(t)){for(var xe in n)O=n[xe],n.hasOwnProperty(xe)&&O!==void 0&&!l.hasOwnProperty(xe)&&Ur(e,t,xe,void 0,l,O);for(D in l)O=l[D],z=n[D],!l.hasOwnProperty(D)||O===z||O===void 0&&z===void 0||Ur(e,t,D,O,l,z);return}}for(var A in n)O=n[A],n.hasOwnProperty(A)&&O!=null&&!l.hasOwnProperty(A)&&Se(e,t,A,null,l,O);for(U in l)O=l[U],z=n[U],!l.hasOwnProperty(U)||O===z||O==null&&z==null||Se(e,t,U,O,l,z)}function yh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ny(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],s=a.transferSize,o=a.initiatorType,d=a.duration;if(s&&d&&yh(o)){for(o=0,d=a.responseEnd,l+=1;l<n.length;l++){var b=n[l],R=b.startTime;if(R>d)break;var D=b.transferSize,U=b.initiatorType;D&&yh(U)&&(b=b.responseEnd,o+=D*(b<d?1:(d-R)/(b-R)))}if(--l,t+=8*(s+o)/(a.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 Br=null,Lr=null;function au(e){return e.nodeType===9?e:e.ownerDocument}function vh(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 gh(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 Hr(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 qr=null;function ly(){var e=window.event;return e&&e.type==="popstate"?e===qr?!1:(qr=e,!0):(qr=null,!1)}var bh=typeof setTimeout=="function"?setTimeout:void 0,ay=typeof clearTimeout=="function"?clearTimeout:void 0,Sh=typeof Promise=="function"?Promise:void 0,iy=typeof queueMicrotask=="function"?queueMicrotask:typeof Sh<"u"?function(e){return Sh.resolve(null).then(e).catch(uy)}:bh;function uy(e){setTimeout(function(){throw e})}function Dn(e){return e==="head"}function xh(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Gl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")wa(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,wa(n);for(var s=n.firstChild;s;){var o=s.nextSibling,d=s.nodeName;s[Pl]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=o}}else n==="body"&&wa(e.ownerDocument.body);n=a}while(n);Gl(t)}function _h(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 Yr(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":Yr(n),Qu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function sy(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Pl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Nt(e.nextSibling),e===null)break}return null}function ry(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Nt(e.nextSibling),e===null))return null;return e}function Eh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Nt(e.nextSibling),e===null))return null;return e}function kr(e){return e.data==="$?"||e.data==="$~"}function Xr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function cy(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Nt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Gr=null;function Th(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Nt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Ah(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 Nh(e,t,n){switch(t=au(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 wa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qu(e)}var Ct=new Map,Ch=new Set;function iu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rn=k.d;k.d={f:oy,r:fy,D:dy,C:hy,L:my,m:py,X:vy,S:yy,M:gy};function oy(){var e=rn.f(),t=Wi();return e||t}function fy(e){var t=rl(e);t!==null&&t.tag===5&&t.type==="form"?Vf(t):rn.r(e)}var Yl=typeof document>"u"?null:document;function Rh(e,t,n){var l=Yl;if(l&&typeof t=="string"&&t){var a=bt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Ch.has(a)||(Ch.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),We(t,"link",e),Ve(t),l.head.appendChild(t)))}}function dy(e){rn.D(e),Rh("dns-prefetch",e,null)}function hy(e,t){rn.C(e,t),Rh("preconnect",e,t)}function my(e,t,n){rn.L(e,t,n);var l=Yl;if(l&&e&&t){var a='link[rel="preload"][as="'+bt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+bt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+bt(n.imageSizes)+'"]')):a+='[href="'+bt(e)+'"]';var s=a;switch(t){case"style":s=kl(e);break;case"script":s=Xl(e)}Ct.has(s)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ct.set(s,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Ua(s))||t==="script"&&l.querySelector(Ba(s))||(t=l.createElement("link"),We(t,"link",e),Ve(t),l.head.appendChild(t)))}}function py(e,t){rn.m(e,t);var n=Yl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+bt(l)+'"][href="'+bt(e)+'"]',s=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Xl(e)}if(!Ct.has(s)&&(e=S({rel:"modulepreload",href:e},t),Ct.set(s,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ba(s)))return}l=n.createElement("link"),We(l,"link",e),Ve(l),n.head.appendChild(l)}}}function yy(e,t,n){rn.S(e,t,n);var l=Yl;if(l&&e){var a=cl(l).hoistableStyles,s=kl(e);t=t||"default";var o=a.get(s);if(!o){var d={loading:0,preload:null};if(o=l.querySelector(Ua(s)))d.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ct.get(s))&&Vr(e,n);var b=o=l.createElement("link");Ve(b),We(b,"link",e),b._p=new Promise(function(R,D){b.onload=R,b.onerror=D}),b.addEventListener("load",function(){d.loading|=1}),b.addEventListener("error",function(){d.loading|=2}),d.loading|=4,uu(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:d},a.set(s,o)}}}function vy(e,t){rn.X(e,t);var n=Yl;if(n&&e){var l=cl(n).hoistableScripts,a=Xl(e),s=l.get(a);s||(s=n.querySelector(Ba(a)),s||(e=S({src:e,async:!0},t),(t=Ct.get(a))&&Qr(e,t),s=n.createElement("script"),Ve(s),We(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function gy(e,t){rn.M(e,t);var n=Yl;if(n&&e){var l=cl(n).hoistableScripts,a=Xl(e),s=l.get(a);s||(s=n.querySelector(Ba(a)),s||(e=S({src:e,async:!0,type:"module"},t),(t=Ct.get(a))&&Qr(e,t),s=n.createElement("script"),Ve(s),We(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function Oh(e,t,n,l){var a=(a=le.current)?iu(a):null;if(!a)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=kl(n.href),n=cl(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=kl(n.href);var s=cl(a).hoistableStyles,o=s.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,o),(s=a.querySelector(Ua(e)))&&!s._p&&(o.instance=s,o.state.loading=5),Ct.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},Ct.set(e,n),s||by(a,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=Xl(n),n=cl(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function kl(e){return'href="'+bt(e)+'"'}function Ua(e){return'link[rel="stylesheet"]['+e+"]"}function zh(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function by(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}),We(t,"link",n),Ve(t),e.head.appendChild(t))}function Xl(e){return'[src="'+bt(e)+'"]'}function Ba(e){return"script[async]"+e}function Mh(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,Ve(l),l;var a=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ve(l),We(l,"style",a),uu(l,n.precedence,e),t.instance=l;case"stylesheet":a=kl(n.href);var s=e.querySelector(Ua(a));if(s)return t.state.loading|=4,t.instance=s,Ve(s),s;l=zh(n),(a=Ct.get(a))&&Vr(l,a),s=(e.ownerDocument||e).createElement("link"),Ve(s);var o=s;return o._p=new Promise(function(d,b){o.onload=d,o.onerror=b}),We(s,"link",l),t.state.loading|=4,uu(s,n.precedence,e),t.instance=s;case"script":return s=Xl(n.src),(a=e.querySelector(Ba(s)))?(t.instance=a,Ve(a),a):(l=n,(a=Ct.get(s))&&(l=S({},n),Qr(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ve(a),We(a,"link",l),e.head.appendChild(a),t.instance=a);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,uu(l,n.precedence,e));return t.instance}function uu(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,s=a,o=0;o<l.length;o++){var d=l[o];if(d.dataset.precedence===t)s=d;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Qr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var su=null;function Dh(e,t,n){if(su===null){var l=new Map,a=su=new Map;a.set(n,l)}else a=su,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var s=n[a];if(!(s[Pl]||s[Ze]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var o=s.getAttribute(t)||"";o=e+o;var d=l.get(o);d?d.push(s):l.set(o,[s])}}return l}function jh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Sy(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 wh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function xy(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 a=kl(l.href),s=t.querySelector(Ua(a));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ru.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ve(s);return}s=t.ownerDocument||t,l=zh(l),(a=Ct.get(a))&&Vr(l,a),s=s.createElement("link"),Ve(s);var o=s;o._p=new Promise(function(d,b){o.onload=d,o.onerror=b}),We(s,"link",l),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ru.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Zr=0;function _y(e,t){return e.stylesheets&&e.count===0&&ou(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&ou(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Zr===0&&(Zr=62500*ny());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ou(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Zr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function ru(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ou(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cu=null;function ou(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cu=new Map,t.forEach(Ey,e),cu=null,ru.call(e))}function Ey(e,t){if(!(t.state.loading&4)){var n=cu.get(e);if(n)var l=n.get(null);else{n=new Map,cu.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var o=a[s];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),l=o)}l&&n.set(null,l)}a=t.instance,o=a.getAttribute("data-precedence"),s=n.get(o)||l,s===l&&n.set(null,a),n.set(o,a),this.count++,l=ru.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),s?s.parentNode.insertBefore(a,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var La={$$typeof:V,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function Ty(e,t,n,l,a,s,o,d,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=ku(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ku(0),this.hiddenUpdates=ku(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Uh(e,t,n,l,a,s,o,d,b,R,D,U){return e=new Ty(e,t,n,o,b,R,D,U,d),t=1,s===!0&&(t|=24),s=ft(3,null,null,t),e.current=s,s.stateNode=e,t=As(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},Os(s),e}function Bh(e){return e?(e=bl,e):bl}function Lh(e,t,n,l,a,s){a=Bh(a),l.context===null?l.context=a:l.pendingContext=a,l=xn(t),l.payload={element:n},s=s===void 0?null:s,s!==null&&(l.callback=s),n=_n(e,l,t),n!==null&&(ut(n,e,t),pa(n,e,t))}function Hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Kr(e,t){Hh(e,t),(e=e.alternate)&&Hh(e,t)}function qh(e){if(e.tag===13||e.tag===31){var t=Qn(e,67108864);t!==null&&ut(t,e,67108864),Kr(e,67108864)}}function Yh(e){if(e.tag===13||e.tag===31){var t=yt();t=Xu(t);var n=Qn(e,t);n!==null&&ut(n,e,t),Kr(e,t)}}var fu=!0;function Ay(e,t,n,l){var a=j.T;j.T=null;var s=k.p;try{k.p=2,Jr(e,t,n,l)}finally{k.p=s,j.T=a}}function Ny(e,t,n,l){var a=j.T;j.T=null;var s=k.p;try{k.p=8,Jr(e,t,n,l)}finally{k.p=s,j.T=a}}function Jr(e,t,n,l){if(fu){var a=$r(l);if(a===null)wr(e,t,l,du,n),Xh(e,l);else if(Ry(a,e,t,n,l))l.stopPropagation();else if(Xh(e,l),t&4&&-1<Cy.indexOf(e)){for(;a!==null;){var s=rl(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var o=Yn(s.pendingLanes);if(o!==0){var d=s;for(d.pendingLanes|=2,d.entangledLanes|=2;o;){var b=1<<31-ct(o);d.entanglements[1]|=b,o&=~b}Ht(s),(he&6)===0&&(Ji=st()+500,Ma(0))}}break;case 31:case 13:d=Qn(s,2),d!==null&&ut(d,s,2),Wi(),Kr(s,2)}if(s=$r(l),s===null&&wr(e,t,l,du,n),s===a)break;a=s}a!==null&&l.stopPropagation()}else wr(e,t,l,null,n)}}function $r(e){return e=Fu(e),Wr(e)}var du=null;function Wr(e){if(du=null,e=sl(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(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 du=e,null}function kh(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(dp()){case Kc:return 2;case Jc:return 8;case ti:case hp:return 32;case $c:return 268435456;default:return 32}default:return 32}}var Fr=!1,jn=null,wn=null,Un=null,Ha=new Map,qa=new Map,Bn=[],Cy="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 Xh(e,t){switch(e){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":wn=null;break;case"mouseover":case"mouseout":Un=null;break;case"pointerover":case"pointerout":Ha.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qa.delete(t.pointerId)}}function Ya(e,t,n,l,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:s,targetContainers:[a]},t!==null&&(t=rl(t),t!==null&&qh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Ry(e,t,n,l,a){switch(t){case"focusin":return jn=Ya(jn,e,t,n,l,a),!0;case"dragenter":return wn=Ya(wn,e,t,n,l,a),!0;case"mouseover":return Un=Ya(Un,e,t,n,l,a),!0;case"pointerover":var s=a.pointerId;return Ha.set(s,Ya(Ha.get(s)||null,e,t,n,l,a)),!0;case"gotpointercapture":return s=a.pointerId,qa.set(s,Ya(qa.get(s)||null,e,t,n,l,a)),!0}return!1}function Gh(e){var t=sl(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,to(e.priority,function(){Yh(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,to(e.priority,function(){Yh(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 hu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=$r(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Wu=l,n.target.dispatchEvent(l),Wu=null}else return t=rl(n),t!==null&&qh(t),e.blockedOn=n,!1;t.shift()}return!0}function Vh(e,t,n){hu(e)&&n.delete(t)}function Oy(){Fr=!1,jn!==null&&hu(jn)&&(jn=null),wn!==null&&hu(wn)&&(wn=null),Un!==null&&hu(Un)&&(Un=null),Ha.forEach(Vh),qa.forEach(Vh)}function mu(e,t){e.blockedOn===t&&(e.blockedOn=null,Fr||(Fr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,Oy)))}var pu=null;function Qh(e){pu!==e&&(pu=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){pu===e&&(pu=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(Wr(l||n)===null)continue;break}var s=rl(n);s!==null&&(e.splice(t,3),t-=3,$s(s,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Gl(e){function t(b){return mu(b,e)}jn!==null&&mu(jn,e),wn!==null&&mu(wn,e),Un!==null&&mu(Un,e),Ha.forEach(t),qa.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);)Gh(n),n.blockedOn===null&&Bn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],s=n[l+1],o=a[et]||null;if(typeof s=="function")o||Qh(n);else if(o){var d=null;if(s&&s.hasAttribute("formAction")){if(a=s,o=s[et]||null)d=o.formAction;else if(Wr(a)!==null)continue}else d=o.action;typeof d=="function"?n[l+1]=d:(n.splice(l,3),l-=3),Qh(n)}}}function Zh(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=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),a!==null&&(a(),a=null)}}}function Pr(e){this._internalRoot=e}yu.prototype.render=Pr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,l=yt();Lh(n,l,e,t,null,null)},yu.prototype.unmount=Pr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lh(e.current,2,null,e,null,null),Wi(),t[ul]=null}};function yu(e){this._internalRoot=e}yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=eo();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&&Gh(e)}};var Kh=i.version;if(Kh!=="19.2.0")throw Error(c(527,Kh,"19.2.0"));k.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?T(e):null,e=e===null?null:e.stateNode,e};var zy={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vu.isDisabled&&vu.supportsFiber)try{$l=vu.inject(zy),rt=vu}catch{}}return Xa.createRoot=function(e,t){if(!f(e))throw Error(c(299));var n=!1,l="",a=ed,s=td,o=nd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Uh(e,1,!1,null,null,n,l,null,a,s,o,Zh),e[ul]=t.current,jr(e),new Pr(t)},Xa.hydrateRoot=function(e,t,n){if(!f(e))throw Error(c(299));var l=!1,a="",s=ed,o=td,d=nd,b=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(d=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=Uh(e,1,!0,t,n??null,l,a,b,s,o,d,Zh),t.context=Bh(null),n=t.current,l=yt(),l=Xu(l),a=xn(l),a.callback=null,_n(n,a,l),n=l,t.current.lanes=n,Fl(t,n),Ht(t),e[ul]=t.current,jr(e),new yu(t)},Xa.version="19.2.0",Xa}var lm;function Yy(){if(lm)return tc.exports;lm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),tc.exports=qy(),tc.exports}var ky=Yy();var am="popstate";function Xy(u={}){function i(c,f){let{pathname:h,search:m,hash:g}=c.location;return hc("",{pathname:h,search:m,hash:g},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function r(c,f){return typeof f=="string"?f:Wa(f)}return Vy(i,r,null,u)}function Oe(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function wt(u,i){if(!u){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function Gy(){return Math.random().toString(36).substring(2,10)}function im(u,i){return{usr:u.state,key:u.key,idx:i}}function hc(u,i,r=null,c){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof i=="string"?Ql(i):i,state:r,key:i&&i.key||c||Gy()}}function Wa({pathname:u="/",search:i="",hash:r=""}){return i&&i!=="?"&&(u+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(u+=r.charAt(0)==="#"?r:"#"+r),u}function Ql(u){let i={};if(u){let r=u.indexOf("#");r>=0&&(i.hash=u.substring(r),u=u.substring(0,r));let c=u.indexOf("?");c>=0&&(i.search=u.substring(c),u=u.substring(0,c)),u&&(i.pathname=u)}return i}function Vy(u,i,r,c={}){let{window:f=document.defaultView,v5Compat:h=!1}=c,m=f.history,g="POP",y=null,v=T();v==null&&(v=0,m.replaceState({...m.state,idx:v},""));function T(){return(m.state||{idx:null}).idx}function S(){g="POP";let q=T(),H=q==null?null:q-v;v=q,y&&y({action:g,location:G.location,delta:H})}function N(q,H){g="PUSH";let Y=hc(G.location,q,H);v=T()+1;let V=im(Y,v),ne=G.createHref(Y);try{m.pushState(V,"",ne)}catch(de){if(de instanceof DOMException&&de.name==="DataCloneError")throw de;f.location.assign(ne)}h&&y&&y({action:g,location:G.location,delta:1})}function M(q,H){g="REPLACE";let Y=hc(G.location,q,H);v=T();let V=im(Y,v),ne=G.createHref(Y);m.replaceState(V,"",ne),h&&y&&y({action:g,location:G.location,delta:0})}function L(q){return Qy(q)}let G={get action(){return g},get location(){return u(f,m)},listen(q){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(am,S),y=q,()=>{f.removeEventListener(am,S),y=null}},createHref(q){return i(f,q)},createURL:L,encodeLocation(q){let H=L(q);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:N,replace:M,go(q){return m.go(q)}};return G}function Qy(u,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(r,"No window.location.(origin|href) available to create URL");let c=typeof u=="string"?u:Wa(u);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=r+c),new URL(c,r)}function Em(u,i,r="/"){return Zy(u,i,r,!1)}function Zy(u,i,r,c){let f=typeof i=="string"?Ql(i):i,h=fn(f.pathname||"/",r);if(h==null)return null;let m=Tm(u);Ky(m);let g=null;for(let y=0;g==null&&y<m.length;++y){let v=av(h);g=nv(m[y],v,c)}return g}function Tm(u,i=[],r=[],c="",f=!1){let h=(m,g,y=f,v)=>{let T={relativePath:v===void 0?m.path||"":v,caseSensitive:m.caseSensitive===!0,childrenIndex:g,route:m};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(c)&&y)return;Oe(T.relativePath.startsWith(c),`Absolute route path "${T.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(c.length)}let S=on([c,T.relativePath]),N=r.concat(T);m.children&&m.children.length>0&&(Oe(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),Tm(m.children,i,N,S,y)),!(m.path==null&&!m.index)&&i.push({path:S,score:ev(S,m.index),routesMeta:N})};return u.forEach((m,g)=>{if(m.path===""||!m.path?.includes("?"))h(m,g);else for(let y of Am(m.path))h(m,g,!0,y)}),i}function Am(u){let i=u.split("/");if(i.length===0)return[];let[r,...c]=i,f=r.endsWith("?"),h=r.replace(/\?$/,"");if(c.length===0)return f?[h,""]:[h];let m=Am(c.join("/")),g=[];return g.push(...m.map(y=>y===""?h:[h,y].join("/"))),f&&g.push(...m),g.map(y=>u.startsWith("/")&&y===""?"/":y)}function Ky(u){u.sort((i,r)=>i.score!==r.score?r.score-i.score:tv(i.routesMeta.map(c=>c.childrenIndex),r.routesMeta.map(c=>c.childrenIndex)))}var Jy=/^:[\w-]+$/,$y=3,Wy=2,Fy=1,Py=10,Iy=-2,um=u=>u==="*";function ev(u,i){let r=u.split("/"),c=r.length;return r.some(um)&&(c+=Iy),i&&(c+=Wy),r.filter(f=>!um(f)).reduce((f,h)=>f+(Jy.test(h)?$y:h===""?Fy:Py),c)}function tv(u,i){return u.length===i.length&&u.slice(0,-1).every((c,f)=>c===i[f])?u[u.length-1]-i[i.length-1]:0}function nv(u,i,r=!1){let{routesMeta:c}=u,f={},h="/",m=[];for(let g=0;g<c.length;++g){let y=c[g],v=g===c.length-1,T=h==="/"?i:i.slice(h.length)||"/",S=Cu({path:y.relativePath,caseSensitive:y.caseSensitive,end:v},T),N=y.route;if(!S&&v&&r&&!c[c.length-1].route.index&&(S=Cu({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},T)),!S)return null;Object.assign(f,S.params),m.push({params:f,pathname:on([h,S.pathname]),pathnameBase:cv(on([h,S.pathnameBase])),route:N}),S.pathnameBase!=="/"&&(h=on([h,S.pathnameBase]))}return m}function Cu(u,i){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[r,c]=lv(u.path,u.caseSensitive,u.end),f=i.match(r);if(!f)return null;let h=f[0],m=h.replace(/(.)\/+$/,"$1"),g=f.slice(1);return{params:c.reduce((v,{paramName:T,isOptional:S},N)=>{if(T==="*"){let L=g[N]||"";m=h.slice(0,h.length-L.length).replace(/(.)\/+$/,"$1")}const M=g[N];return S&&!M?v[T]=void 0:v[T]=(M||"").replace(/%2F/g,"/"),v},{}),pathname:h,pathnameBase:m,pattern:u}}function lv(u,i=!1,r=!0){wt(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let c=[],f="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,g,y)=>(c.push({paramName:g,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(c.push({paramName:"*"}),f+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?f+="\\/*$":u!==""&&u!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,i?void 0:"i"),c]}function av(u){try{return u.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return wt(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),u}}function fn(u,i){if(i==="/")return u;if(!u.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,c=u.charAt(r);return c&&c!=="/"?null:u.slice(r)||"/"}var iv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uv=u=>iv.test(u);function sv(u,i="/"){let{pathname:r,search:c="",hash:f=""}=typeof u=="string"?Ql(u):u,h;if(r)if(uv(r))h=r;else{if(r.includes("//")){let m=r;r=r.replace(/\/\/+/g,"/"),wt(!1,`Pathnames cannot have embedded double slashes - normalizing ${m} -> ${r}`)}r.startsWith("/")?h=sm(r.substring(1),"/"):h=sm(r,i)}else h=i;return{pathname:h,search:ov(c),hash:fv(f)}}function sm(u,i){let r=i.replace(/\/+$/,"").split("/");return u.split("/").forEach(f=>{f===".."?r.length>1&&r.pop():f!=="."&&r.push(f)}),r.length>1?r.join("/"):"/"}function ic(u,i,r,c){return`Cannot include a '${u}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function rv(u){return u.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function Nm(u){let i=rv(u);return i.map((r,c)=>c===i.length-1?r.pathname:r.pathnameBase)}function Cm(u,i,r,c=!1){let f;typeof u=="string"?f=Ql(u):(f={...u},Oe(!f.pathname||!f.pathname.includes("?"),ic("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),ic("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),ic("#","search","hash",f)));let h=u===""||f.pathname==="",m=h?"/":f.pathname,g;if(m==null)g=r;else{let S=i.length-1;if(!c&&m.startsWith("..")){let N=m.split("/");for(;N[0]==="..";)N.shift(),S-=1;f.pathname=N.join("/")}g=S>=0?i[S]:"/"}let y=sv(f,g),v=m&&m!=="/"&&m.endsWith("/"),T=(h||m===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(v||T)&&(y.pathname+="/"),y}var on=u=>u.join("/").replace(/\/\/+/g,"/"),cv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),ov=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,fv=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u;function dv(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Rm=["POST","PUT","PATCH","DELETE"];new Set(Rm);var hv=["GET",...Rm];new Set(hv);var Zl=E.createContext(null);Zl.displayName="DataRouter";var Ou=E.createContext(null);Ou.displayName="DataRouterState";E.createContext(!1);var Om=E.createContext({isTransitioning:!1});Om.displayName="ViewTransition";var mv=E.createContext(new Map);mv.displayName="Fetchers";var pv=E.createContext(null);pv.displayName="Await";var kt=E.createContext(null);kt.displayName="Navigation";var Fa=E.createContext(null);Fa.displayName="Location";var dn=E.createContext({outlet:null,matches:[],isDataRoute:!1});dn.displayName="Route";var _c=E.createContext(null);_c.displayName="RouteError";function yv(u,{relative:i}={}){Oe(Pa(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:c}=E.useContext(kt),{hash:f,pathname:h,search:m}=Ia(u,{relative:i}),g=h;return r!=="/"&&(g=h==="/"?r:on([r,h])),c.createHref({pathname:g,search:m,hash:f})}function Pa(){return E.useContext(Fa)!=null}function il(){return Oe(Pa(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Fa).location}var zm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mm(u){E.useContext(kt).static||E.useLayoutEffect(u)}function vv(){let{isDataRoute:u}=E.useContext(dn);return u?zv():gv()}function gv(){Oe(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let u=E.useContext(Zl),{basename:i,navigator:r}=E.useContext(kt),{matches:c}=E.useContext(dn),{pathname:f}=il(),h=JSON.stringify(Nm(c)),m=E.useRef(!1);return Mm(()=>{m.current=!0}),E.useCallback((y,v={})=>{if(wt(m.current,zm),!m.current)return;if(typeof y=="number"){r.go(y);return}let T=Cm(y,JSON.parse(h),f,v.relative==="path");u==null&&i!=="/"&&(T.pathname=T.pathname==="/"?i:on([i,T.pathname])),(v.replace?r.replace:r.push)(T,v.state,v)},[i,r,h,f,u])}E.createContext(null);function Ia(u,{relative:i}={}){let{matches:r}=E.useContext(dn),{pathname:c}=il(),f=JSON.stringify(Nm(r));return E.useMemo(()=>Cm(u,JSON.parse(f),c,i==="path"),[u,f,c,i])}function bv(u,i){return Dm(u,i)}function Dm(u,i,r,c,f){Oe(Pa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=E.useContext(kt),{matches:m}=E.useContext(dn),g=m[m.length-1],y=g?g.params:{},v=g?g.pathname:"/",T=g?g.pathnameBase:"/",S=g&&g.route;{let Y=S&&S.path||"";jm(v,!S||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${Y}">) 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="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let N=il(),M;if(i){let Y=typeof i=="string"?Ql(i):i;Oe(T==="/"||Y.pathname?.startsWith(T),`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 "${T}" but pathname "${Y.pathname}" was given in the \`location\` prop.`),M=Y}else M=N;let L=M.pathname||"/",G=L;if(T!=="/"){let Y=T.replace(/^\//,"").split("/");G="/"+L.replace(/^\//,"").split("/").slice(Y.length).join("/")}let q=Em(u,{pathname:G});wt(S||q!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),wt(q==null||q[q.length-1].route.element!==void 0||q[q.length-1].route.Component!==void 0||q[q.length-1].route.lazy!==void 0,`Matched leaf route at location "${M.pathname}${M.search}${M.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 H=Tv(q&&q.map(Y=>Object.assign({},Y,{params:Object.assign({},y,Y.params),pathname:on([T,h.encodeLocation?h.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?T:on([T,h.encodeLocation?h.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),m,r,c,f);return i&&H?E.createElement(Fa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...M},navigationType:"POP"}},H):H}function Sv(){let u=Ov(),i=dv(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),r=u instanceof Error?u.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},m=null;return console.error("Error handled by React Router default ErrorBoundary:",u),m=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:h},"ErrorBoundary")," or"," ",E.createElement("code",{style:h},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},i),r?E.createElement("pre",{style:f},r):null,m)}var xv=E.createElement(Sv,null),_v=class extends E.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,i){return i.location!==u.location||i.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:i.error,location:i.location,revalidation:u.revalidation||i.revalidation}}componentDidCatch(u,i){this.props.onError?this.props.onError(u,i):console.error("React Router caught the following error during render",u)}render(){return this.state.error!==void 0?E.createElement(dn.Provider,{value:this.props.routeContext},E.createElement(_c.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ev({routeContext:u,match:i,children:r}){let c=E.useContext(Zl);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),E.createElement(dn.Provider,{value:u},r)}function Tv(u,i=[],r=null,c=null,f=null){if(u==null){if(!r)return null;if(r.errors)u=r.matches;else if(i.length===0&&!r.initialized&&r.matches.length>0)u=r.matches;else return null}let h=u,m=r?.errors;if(m!=null){let T=h.findIndex(S=>S.route.id&&m?.[S.route.id]!==void 0);Oe(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),h=h.slice(0,Math.min(h.length,T+1))}let g=!1,y=-1;if(r)for(let T=0;T<h.length;T++){let S=h[T];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(y=T),S.route.id){let{loaderData:N,errors:M}=r,L=S.route.loader&&!N.hasOwnProperty(S.route.id)&&(!M||M[S.route.id]===void 0);if(S.route.lazy||L){g=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}let v=r&&c?(T,S)=>{c(T,{location:r.location,params:r.matches?.[0]?.params??{},errorInfo:S})}:void 0;return h.reduceRight((T,S,N)=>{let M,L=!1,G=null,q=null;r&&(M=m&&S.route.id?m[S.route.id]:void 0,G=S.route.errorElement||xv,g&&(y<0&&N===0?(jm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,q=null):y===N&&(L=!0,q=S.route.hydrateFallbackElement||null)));let H=i.concat(h.slice(0,N+1)),Y=()=>{let V;return M?V=G:L?V=q:S.route.Component?V=E.createElement(S.route.Component,null):S.route.element?V=S.route.element:V=T,E.createElement(Ev,{match:S,routeContext:{outlet:T,matches:H,isDataRoute:r!=null},children:V})};return r&&(S.route.ErrorBoundary||S.route.errorElement||N===0)?E.createElement(_v,{location:r.location,revalidation:r.revalidation,component:G,error:M,children:Y(),routeContext:{outlet:null,matches:H,isDataRoute:!0},onError:v}):Y()},null)}function Ec(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Av(u){let i=E.useContext(Zl);return Oe(i,Ec(u)),i}function Nv(u){let i=E.useContext(Ou);return Oe(i,Ec(u)),i}function Cv(u){let i=E.useContext(dn);return Oe(i,Ec(u)),i}function Tc(u){let i=Cv(u),r=i.matches[i.matches.length-1];return Oe(r.route.id,`${u} can only be used on routes that contain a unique "id"`),r.route.id}function Rv(){return Tc("useRouteId")}function Ov(){let u=E.useContext(_c),i=Nv("useRouteError"),r=Tc("useRouteError");return u!==void 0?u:i.errors?.[r]}function zv(){let{router:u}=Av("useNavigate"),i=Tc("useNavigate"),r=E.useRef(!1);return Mm(()=>{r.current=!0}),E.useCallback(async(f,h={})=>{wt(r.current,zm),r.current&&(typeof f=="number"?u.navigate(f):await u.navigate(f,{fromRouteId:i,...h}))},[u,i])}var rm={};function jm(u,i,r){!i&&!rm[u]&&(rm[u]=!0,wt(!1,r))}E.memo(Mv);function Mv({routes:u,future:i,state:r,unstable_onError:c}){return Dm(u,void 0,r,c,i)}function mc(u){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 Dv({basename:u="/",children:i=null,location:r,navigationType:c="POP",navigator:f,static:h=!1}){Oe(!Pa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=u.replace(/^\/*/,"/"),g=E.useMemo(()=>({basename:m,navigator:f,static:h,future:{}}),[m,f,h]);typeof r=="string"&&(r=Ql(r));let{pathname:y="/",search:v="",hash:T="",state:S=null,key:N="default"}=r,M=E.useMemo(()=>{let L=fn(y,m);return L==null?null:{location:{pathname:L,search:v,hash:T,state:S,key:N},navigationType:c}},[m,y,v,T,S,N,c]);return wt(M!=null,`<Router basename="${m}"> is not able to match the URL "${y}${v}${T}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:E.createElement(kt.Provider,{value:g},E.createElement(Fa.Provider,{children:i,value:M}))}function jv({children:u,location:i}){return bv(pc(u),i)}function pc(u,i=[]){let r=[];return E.Children.forEach(u,(c,f)=>{if(!E.isValidElement(c))return;let h=[...i,f];if(c.type===E.Fragment){r.push.apply(r,pc(c.props.children,h));return}Oe(c.type===mc,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Oe(!c.props.index||!c.props.children,"An index route cannot have child routes.");let m={id:c.props.id||h.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&&(m.children=pc(c.props.children,h)),r.push(m)}),r}var xu="get",_u="application/x-www-form-urlencoded";function zu(u){return u!=null&&typeof u.tagName=="string"}function wv(u){return zu(u)&&u.tagName.toLowerCase()==="button"}function Uv(u){return zu(u)&&u.tagName.toLowerCase()==="form"}function Bv(u){return zu(u)&&u.tagName.toLowerCase()==="input"}function Lv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Hv(u,i){return u.button===0&&(!i||i==="_self")&&!Lv(u)}var gu=null;function qv(){if(gu===null)try{new FormData(document.createElement("form"),0),gu=!1}catch{gu=!0}return gu}var Yv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function uc(u){return u!=null&&!Yv.has(u)?(wt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_u}"`),null):u}function kv(u,i){let r,c,f,h,m;if(Uv(u)){let g=u.getAttribute("action");c=g?fn(g,i):null,r=u.getAttribute("method")||xu,f=uc(u.getAttribute("enctype"))||_u,h=new FormData(u)}else if(wv(u)||Bv(u)&&(u.type==="submit"||u.type==="image")){let g=u.form;if(g==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=u.getAttribute("formaction")||g.getAttribute("action");if(c=y?fn(y,i):null,r=u.getAttribute("formmethod")||g.getAttribute("method")||xu,f=uc(u.getAttribute("formenctype"))||uc(g.getAttribute("enctype"))||_u,h=new FormData(g,u),!qv()){let{name:v,type:T,value:S}=u;if(T==="image"){let N=v?`${v}.`:"";h.append(`${N}x`,"0"),h.append(`${N}y`,"0")}else v&&h.append(v,S)}}else{if(zu(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=xu,c=null,f=_u,m=u}return h&&f==="text/plain"&&(m=h,h=void 0),{action:c,method:r.toLowerCase(),encType:f,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ac(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function Xv(u,i,r){let c=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return c.pathname==="/"?c.pathname=`_root.${r}`:i&&fn(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${r}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${r}`,c}async function Gv(u,i){if(u.id in i)return i[u.id];try{let r=await import(u.module);return i[u.id]=r,r}catch(r){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Vv(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Qv(u,i,r){let c=await Promise.all(u.map(async f=>{let h=i.routes[f.route.id];if(h){let m=await Gv(h,r);return m.links?m.links():[]}return[]}));return $v(c.flat(1).filter(Vv).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function cm(u,i,r,c,f,h){let m=(y,v)=>r[v]?y.route.id!==r[v].route.id:!0,g=(y,v)=>r[v].pathname!==y.pathname||r[v].route.path?.endsWith("*")&&r[v].params["*"]!==y.params["*"];return h==="assets"?i.filter((y,v)=>m(y,v)||g(y,v)):h==="data"?i.filter((y,v)=>{let T=c.routes[y.route.id];if(!T||!T.hasLoader)return!1;if(m(y,v)||g(y,v))return!0;if(y.route.shouldRevalidate){let S=y.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(u,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Zv(u,i,{includeHydrateFallback:r}={}){return Kv(u.map(c=>{let f=i.routes[c.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),r&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function Kv(u){return[...new Set(u)]}function Jv(u){let i={},r=Object.keys(u).sort();for(let c of r)i[c]=u[c];return i}function $v(u,i){let r=new Set;return new Set(i),u.reduce((c,f)=>{let h=JSON.stringify(Jv(f));return r.has(h)||(r.add(h),c.push({key:h,link:f})),c},[])}function wm(){let u=E.useContext(Zl);return Ac(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function Wv(){let u=E.useContext(Ou);return Ac(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Nc=E.createContext(void 0);Nc.displayName="FrameworkContext";function Um(){let u=E.useContext(Nc);return Ac(u,"You must render this element inside a <HydratedRouter> element"),u}function Fv(u,i){let r=E.useContext(Nc),[c,f]=E.useState(!1),[h,m]=E.useState(!1),{onFocus:g,onBlur:y,onMouseEnter:v,onMouseLeave:T,onTouchStart:S}=i,N=E.useRef(null);E.useEffect(()=>{if(u==="render"&&m(!0),u==="viewport"){let G=H=>{H.forEach(Y=>{m(Y.isIntersecting)})},q=new IntersectionObserver(G,{threshold:.5});return N.current&&q.observe(N.current),()=>{q.disconnect()}}},[u]),E.useEffect(()=>{if(c){let G=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(G)}}},[c]);let M=()=>{f(!0)},L=()=>{f(!1),m(!1)};return r?u!=="intent"?[h,N,{}]:[h,N,{onFocus:Ga(g,M),onBlur:Ga(y,L),onMouseEnter:Ga(v,M),onMouseLeave:Ga(T,L),onTouchStart:Ga(S,M)}]:[!1,N,{}]}function Ga(u,i){return r=>{u&&u(r),r.defaultPrevented||i(r)}}function Pv({page:u,...i}){let{router:r}=wm(),c=E.useMemo(()=>Em(r.routes,u,r.basename),[r.routes,u,r.basename]);return c?E.createElement(eg,{page:u,matches:c,...i}):null}function Iv(u){let{manifest:i,routeModules:r}=Um(),[c,f]=E.useState([]);return E.useEffect(()=>{let h=!1;return Qv(u,i,r).then(m=>{h||f(m)}),()=>{h=!0}},[u,i,r]),c}function eg({page:u,matches:i,...r}){let c=il(),{manifest:f,routeModules:h}=Um(),{basename:m}=wm(),{loaderData:g,matches:y}=Wv(),v=E.useMemo(()=>cm(u,i,y,f,c,"data"),[u,i,y,f,c]),T=E.useMemo(()=>cm(u,i,y,f,c,"assets"),[u,i,y,f,c]),S=E.useMemo(()=>{if(u===c.pathname+c.search+c.hash)return[];let L=new Set,G=!1;if(i.forEach(H=>{let Y=f.routes[H.route.id];!Y||!Y.hasLoader||(!v.some(V=>V.route.id===H.route.id)&&H.route.id in g&&h[H.route.id]?.shouldRevalidate||Y.hasClientLoader?G=!0:L.add(H.route.id))}),L.size===0)return[];let q=Xv(u,m,"data");return G&&L.size>0&&q.searchParams.set("_routes",i.filter(H=>L.has(H.route.id)).map(H=>H.route.id).join(",")),[q.pathname+q.search]},[m,g,c,f,v,i,u,h]),N=E.useMemo(()=>Zv(T,f),[T,f]),M=Iv(T);return E.createElement(E.Fragment,null,S.map(L=>E.createElement("link",{key:L,rel:"prefetch",as:"fetch",href:L,...r})),N.map(L=>E.createElement("link",{key:L,rel:"modulepreload",href:L,...r})),M.map(({key:L,link:G})=>E.createElement("link",{key:L,nonce:r.nonce,...G})))}function tg(...u){return i=>{u.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var Bm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bm&&(window.__reactRouterVersion="7.9.6")}catch{}function ng({basename:u,children:i,window:r}){let c=E.useRef();c.current==null&&(c.current=Xy({window:r,v5Compat:!0}));let f=c.current,[h,m]=E.useState({action:f.action,location:f.location}),g=E.useCallback(y=>{E.startTransition(()=>m(y))},[m]);return E.useLayoutEffect(()=>f.listen(g),[f,g]),E.createElement(Dv,{basename:u,children:i,location:h.location,navigationType:h.action,navigator:f})}var Lm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hm=E.forwardRef(function({onClick:i,discover:r="render",prefetch:c="none",relative:f,reloadDocument:h,replace:m,state:g,target:y,to:v,preventScrollReset:T,viewTransition:S,...N},M){let{basename:L}=E.useContext(kt),G=typeof v=="string"&&Lm.test(v),q,H=!1;if(typeof v=="string"&&G&&(q=v,Bm))try{let ve=new URL(window.location.href),Ge=v.startsWith("//")?new URL(ve.protocol+v):new URL(v),Ue=fn(Ge.pathname,L);Ge.origin===ve.origin&&Ue!=null?v=Ue+Ge.search+Ge.hash:H=!0}catch{wt(!1,`<Link to="${v}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let Y=yv(v,{relative:f}),[V,ne,de]=Fv(c,N),Ae=ug(v,{replace:m,state:g,target:y,preventScrollReset:T,relative:f,viewTransition:S});function F(ve){i&&i(ve),ve.defaultPrevented||Ae(ve)}let _e=E.createElement("a",{...N,...de,href:q||Y,onClick:H||h?i:F,ref:tg(M,ne),target:y,"data-discover":!G&&r==="render"?"true":void 0});return V&&!G?E.createElement(E.Fragment,null,_e,E.createElement(Pv,{page:Y})):_e});Hm.displayName="Link";var lg=E.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:c="",end:f=!1,style:h,to:m,viewTransition:g,children:y,...v},T){let S=Ia(m,{relative:v.relative}),N=il(),M=E.useContext(Ou),{navigator:L,basename:G}=E.useContext(kt),q=M!=null&&fg(S)&&g===!0,H=L.encodeLocation?L.encodeLocation(S).pathname:S.pathname,Y=N.pathname,V=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;r||(Y=Y.toLowerCase(),V=V?V.toLowerCase():null,H=H.toLowerCase()),V&&G&&(V=fn(V,G)||V);const ne=H!=="/"&&H.endsWith("/")?H.length-1:H.length;let de=Y===H||!f&&Y.startsWith(H)&&Y.charAt(ne)==="/",Ae=V!=null&&(V===H||!f&&V.startsWith(H)&&V.charAt(H.length)==="/"),F={isActive:de,isPending:Ae,isTransitioning:q},_e=de?i:void 0,ve;typeof c=="function"?ve=c(F):ve=[c,de?"active":null,Ae?"pending":null,q?"transitioning":null].filter(Boolean).join(" ");let Ge=typeof h=="function"?h(F):h;return E.createElement(Hm,{...v,"aria-current":_e,className:ve,ref:T,style:Ge,to:m,viewTransition:g},typeof y=="function"?y(F):y)});lg.displayName="NavLink";var ag=E.forwardRef(({discover:u="render",fetcherKey:i,navigate:r,reloadDocument:c,replace:f,state:h,method:m=xu,action:g,onSubmit:y,relative:v,preventScrollReset:T,viewTransition:S,...N},M)=>{let L=cg(),G=og(g,{relative:v}),q=m.toLowerCase()==="get"?"get":"post",H=typeof g=="string"&&Lm.test(g),Y=V=>{if(y&&y(V),V.defaultPrevented)return;V.preventDefault();let ne=V.nativeEvent.submitter,de=ne?.getAttribute("formmethod")||m;L(ne||V.currentTarget,{fetcherKey:i,method:de,navigate:r,replace:f,state:h,relative:v,preventScrollReset:T,viewTransition:S})};return E.createElement("form",{ref:M,method:q,action:G,onSubmit:c?y:Y,...N,"data-discover":!H&&u==="render"?"true":void 0})});ag.displayName="Form";function ig(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qm(u){let i=E.useContext(Zl);return Oe(i,ig(u)),i}function ug(u,{target:i,replace:r,state:c,preventScrollReset:f,relative:h,viewTransition:m}={}){let g=vv(),y=il(),v=Ia(u,{relative:h});return E.useCallback(T=>{if(Hv(T,i)){T.preventDefault();let S=r!==void 0?r:Wa(y)===Wa(v);g(u,{replace:S,state:c,preventScrollReset:f,relative:h,viewTransition:m})}},[y,g,v,r,c,i,u,f,h,m])}var sg=0,rg=()=>`__${String(++sg)}__`;function cg(){let{router:u}=qm("useSubmit"),{basename:i}=E.useContext(kt),r=Rv();return E.useCallback(async(c,f={})=>{let{action:h,method:m,encType:g,formData:y,body:v}=kv(c,i);if(f.navigate===!1){let T=f.fetcherKey||rg();await u.fetch(T,r,f.action||h,{preventScrollReset:f.preventScrollReset,formData:y,body:v,formMethod:f.method||m,formEncType:f.encType||g,flushSync:f.flushSync})}else await u.navigate(f.action||h,{preventScrollReset:f.preventScrollReset,formData:y,body:v,formMethod:f.method||m,formEncType:f.encType||g,replace:f.replace,state:f.state,fromRouteId:r,flushSync:f.flushSync,viewTransition:f.viewTransition})},[u,i,r])}function og(u,{relative:i}={}){let{basename:r}=E.useContext(kt),c=E.useContext(dn);Oe(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),h={...Ia(u||".",{relative:i})},m=il();if(u==null){h.search=m.search;let g=new URLSearchParams(h.search),y=g.getAll("index");if(y.some(T=>T==="")){g.delete("index"),y.filter(S=>S).forEach(S=>g.append("index",S));let T=g.toString();h.search=T?`?${T}`:""}}return(!u||u===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(h.pathname=h.pathname==="/"?r:on([r,h.pathname])),Wa(h)}function fg(u,{relative:i}={}){let r=E.useContext(Om);Oe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=qm("useViewTransitionState"),f=Ia(u,{relative:i});if(!r.isTransitioning)return!1;let h=fn(r.currentLocation.pathname,c)||r.currentLocation.pathname,m=fn(r.nextLocation.pathname,c)||r.nextLocation.pathname;return Cu(f.pathname,m)!=null||Cu(f.pathname,h)!=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 Eu=Object.create(null);Object.keys(Yt).forEach(u=>{Eu[Yt[u]]=u});const yc={type:"error",data:"parser error"},Ym=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",km=typeof ArrayBuffer=="function",Xm=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer,Cc=({type:u,data:i},r,c)=>Ym&&i instanceof Blob?r?c(i):om(i,c):km&&(i instanceof ArrayBuffer||Xm(i))?r?c(i):om(new Blob([i]),c):c(Yt[u]+(i||"")),om=(u,i)=>{const r=new FileReader;return r.onload=function(){const c=r.result.split(",")[1];i("b"+(c||""))},r.readAsDataURL(u)};function fm(u){return u instanceof Uint8Array?u:u instanceof ArrayBuffer?new Uint8Array(u):new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}let sc;function dg(u,i){if(Ym&&u.data instanceof Blob)return u.data.arrayBuffer().then(fm).then(i);if(km&&(u.data instanceof ArrayBuffer||Xm(u.data)))return i(fm(u.data));Cc(u,!1,r=>{sc||(sc=new TextEncoder),i(sc.encode(r))})}const dm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$a=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let u=0;u<dm.length;u++)$a[dm.charCodeAt(u)]=u;const hg=u=>{let i=u.length*.75,r=u.length,c,f=0,h,m,g,y;u[u.length-1]==="="&&(i--,u[u.length-2]==="="&&i--);const v=new ArrayBuffer(i),T=new Uint8Array(v);for(c=0;c<r;c+=4)h=$a[u.charCodeAt(c)],m=$a[u.charCodeAt(c+1)],g=$a[u.charCodeAt(c+2)],y=$a[u.charCodeAt(c+3)],T[f++]=h<<2|m>>4,T[f++]=(m&15)<<4|g>>2,T[f++]=(g&3)<<6|y&63;return v},mg=typeof ArrayBuffer=="function",Rc=(u,i)=>{if(typeof u!="string")return{type:"message",data:Gm(u,i)};const r=u.charAt(0);return r==="b"?{type:"message",data:pg(u.substring(1),i)}:Eu[r]?u.length>1?{type:Eu[r],data:u.substring(1)}:{type:Eu[r]}:yc},pg=(u,i)=>{if(mg){const r=hg(u);return Gm(r,i)}else return{base64:!0,data:u}},Gm=(u,i)=>{switch(i){case"blob":return u instanceof Blob?u:new Blob([u]);case"arraybuffer":default:return u instanceof ArrayBuffer?u:u.buffer}},Vm="",yg=(u,i)=>{const r=u.length,c=new Array(r);let f=0;u.forEach((h,m)=>{Cc(h,!1,g=>{c[m]=g,++f===r&&i(c.join(Vm))})})},vg=(u,i)=>{const r=u.split(Vm),c=[];for(let f=0;f<r.length;f++){const h=Rc(r[f],i);if(c.push(h),h.type==="error")break}return c};function gg(){return new TransformStream({transform(u,i){dg(u,r=>{const c=r.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 h=new DataView(f.buffer);h.setUint8(0,126),h.setUint16(1,c)}else{f=new Uint8Array(9);const h=new DataView(f.buffer);h.setUint8(0,127),h.setBigUint64(1,BigInt(c))}u.data&&typeof u.data!="string"&&(f[0]|=128),i.enqueue(f),i.enqueue(r)})}})}let rc;function bu(u){return u.reduce((i,r)=>i+r.length,0)}function Su(u,i){if(u[0].length===i)return u.shift();const r=new Uint8Array(i);let c=0;for(let f=0;f<i;f++)r[f]=u[0][c++],c===u[0].length&&(u.shift(),c=0);return u.length&&c<u[0].length&&(u[0]=u[0].slice(c)),r}function bg(u,i){rc||(rc=new TextDecoder);const r=[];let c=0,f=-1,h=!1;return new TransformStream({transform(m,g){for(r.push(m);;){if(c===0){if(bu(r)<1)break;const y=Su(r,1);h=(y[0]&128)===128,f=y[0]&127,f<126?c=3:f===126?c=1:c=2}else if(c===1){if(bu(r)<2)break;const y=Su(r,2);f=new DataView(y.buffer,y.byteOffset,y.length).getUint16(0),c=3}else if(c===2){if(bu(r)<8)break;const y=Su(r,8),v=new DataView(y.buffer,y.byteOffset,y.length),T=v.getUint32(0);if(T>Math.pow(2,21)-1){g.enqueue(yc);break}f=T*Math.pow(2,32)+v.getUint32(4),c=3}else{if(bu(r)<f)break;const y=Su(r,f);g.enqueue(Rc(h?y:rc.decode(y),i)),c=0}if(f===0||f>u){g.enqueue(yc);break}}}})}const Qm=4;function Ye(u){if(u)return Sg(u)}function Sg(u){for(var i in Ye.prototype)u[i]=Ye.prototype[i];return u}Ye.prototype.on=Ye.prototype.addEventListener=function(u,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(i),this};Ye.prototype.once=function(u,i){function r(){this.off(u,r),i.apply(this,arguments)}return r.fn=i,this.on(u,r),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(u,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+u];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+u],this;for(var c,f=0;f<r.length;f++)if(c=r[f],c===i||c.fn===i){r.splice(f,1);break}return r.length===0&&delete this._callbacks["$"+u],this};Ye.prototype.emit=function(u){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),r=this._callbacks["$"+u],c=1;c<arguments.length;c++)i[c-1]=arguments[c];if(r){r=r.slice(0);for(var c=0,f=r.length;c<f;++c)r[c].apply(this,i)}return this};Ye.prototype.emitReserved=Ye.prototype.emit;Ye.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]};Ye.prototype.hasListeners=function(u){return!!this.listeners(u).length};const Mu=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,r)=>r(i,0),Rt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),xg="arraybuffer";function Zm(u,...i){return i.reduce((r,c)=>(u.hasOwnProperty(c)&&(r[c]=u[c]),r),{})}const _g=Rt.setTimeout,Eg=Rt.clearTimeout;function Du(u,i){i.useNativeTimers?(u.setTimeoutFn=_g.bind(Rt),u.clearTimeoutFn=Eg.bind(Rt)):(u.setTimeoutFn=Rt.setTimeout.bind(Rt),u.clearTimeoutFn=Rt.clearTimeout.bind(Rt))}const Tg=1.33;function Ag(u){return typeof u=="string"?Ng(u):Math.ceil((u.byteLength||u.size)*Tg)}function Ng(u){let i=0,r=0;for(let c=0,f=u.length;c<f;c++)i=u.charCodeAt(c),i<128?r+=1:i<2048?r+=2:i<55296||i>=57344?r+=3:(c++,r+=4);return r}function Km(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Cg(u){let i="";for(let r in u)u.hasOwnProperty(r)&&(i.length&&(i+="&"),i+=encodeURIComponent(r)+"="+encodeURIComponent(u[r]));return i}function Rg(u){let i={},r=u.split("&");for(let c=0,f=r.length;c<f;c++){let h=r[c].split("=");i[decodeURIComponent(h[0])]=decodeURIComponent(h[1])}return i}class Og extends Error{constructor(i,r,c){super(i),this.description=r,this.context=c,this.type="TransportError"}}class Oc extends Ye{constructor(i){super(),this.writable=!1,Du(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,r,c){return super.emitReserved("error",new Og(i,r,c)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const r=Rc(i,this.socket.binaryType);this.onPacket(r)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,r={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const r=Cg(i);return r.length?"?"+r:""}}class zg extends Oc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const r=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let c=0;this._polling&&(c++,this.once("pollComplete",function(){--c||r()})),this.writable||(c++,this.once("drain",function(){--c||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const r=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)};vg(i,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,yg(i,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Km()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(i,r)}}let Jm=!1;try{Jm=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Mg=Jm;function Dg(){}class jg extends zg{constructor(i){if(super(i),typeof location<"u"){const r=location.protocol==="https:";let c=location.port;c||(c=r?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||c!==i.port}}doWrite(i,r){const c=this.request({method:"POST",data:i});c.on("success",r),c.on("error",(f,h)=>{this.onError("xhr post error",f,h)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(r,c)=>{this.onError("xhr poll error",r,c)}),this.pollXhr=i}}class qt extends Ye{constructor(i,r,c){super(),this.createRequest=i,Du(this,c),this._opts=c,this._method=c.method||"GET",this._uri=r,this._data=c.data!==void 0?c.data:null,this._create()}_create(){var i;const r=Zm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const c=this._xhr=this.createRequest(r);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{}(i=this._opts.cookieJar)===null||i===void 0||i.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=qt.requestsCount++,qt.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Dg,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete qt.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}qt.requestsCount=0;qt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hm);else if(typeof addEventListener=="function"){const u="onpagehide"in Rt?"pagehide":"unload";addEventListener(u,hm,!1)}}function hm(){for(let u in qt.requests)qt.requests.hasOwnProperty(u)&&qt.requests[u].abort()}const wg=(function(){const u=$m({xdomain:!1});return u&&u.responseType!==null})();class Ug extends jg{constructor(i){super(i);const r=i&&i.forceBase64;this.supportsBinary=wg&&!r}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new qt($m,this.uri(),i)}}function $m(u){const i=u.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||Mg))return new XMLHttpRequest}catch{}if(!i)try{return new Rt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Wm=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bg extends Oc{get name(){return"websocket"}doOpen(){const i=this.uri(),r=this.opts.protocols,c=Wm?{}:Zm(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(i,r,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=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const c=i[r],f=r===i.length-1;Cc(c,this.supportsBinary,h=>{try{this.doWrite(c,h)}catch{}f&&Mu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Km()),this.supportsBinary||(r.b64=1),this.createUri(i,r)}}const cc=Rt.WebSocket||Rt.MozWebSocket;class Lg extends Bg{createSocket(i,r,c){return Wm?new cc(i,r,c):r?new cc(i,r):new cc(i)}doWrite(i,r){this.ws.send(r)}}class Hg extends Oc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const r=bg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=i.readable.pipeThrough(r).getReader(),f=gg();f.readable.pipeTo(i.writable),this._writer=f.writable.getWriter();const h=()=>{c.read().then(({done:g,value:y})=>{g||(this.onPacket(y),h())}).catch(g=>{})};h();const m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this._writer.write(m).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const c=i[r],f=r===i.length-1;this._writer.write(c).then(()=>{f&&Mu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const qg={websocket:Lg,webtransport:Hg,polling:Ug},Yg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function vc(u){if(u.length>8e3)throw"URI too long";const i=u,r=u.indexOf("["),c=u.indexOf("]");r!=-1&&c!=-1&&(u=u.substring(0,r)+u.substring(r,c).replace(/:/g,";")+u.substring(c,u.length));let f=Yg.exec(u||""),h={},m=14;for(;m--;)h[kg[m]]=f[m]||"";return r!=-1&&c!=-1&&(h.source=i,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h.pathNames=Xg(h,h.path),h.queryKey=Gg(h,h.query),h}function Xg(u,i){const r=/\/{2,9}/g,c=i.replace(r,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&c.splice(0,1),i.slice(-1)=="/"&&c.splice(c.length-1,1),c}function Gg(u,i){const r={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,f,h){f&&(r[f]=h)}),r}const gc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Tu=[];gc&&addEventListener("offline",()=>{Tu.forEach(u=>u())},!1);class Hn extends Ye{constructor(i,r){if(super(),this.binaryType=xg,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(r=i,i=null),i){const c=vc(i);r.hostname=c.host,r.secure=c.protocol==="https"||c.protocol==="wss",r.port=c.port,c.query&&(r.query=c.query)}else r.host&&(r.hostname=vc(r.host).host);Du(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Rg(this.opts.query)),gc&&(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"})},Tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const r=Object.assign({},this.opts.query);r.EIO=Qm,r.transport=i,this.id&&(r.sid=this.id);const c=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](c)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&Hn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(i);r.open(),this.setTransport(r)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Hn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=i.data,this._onError(r);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),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 i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let c=0;c<this.writeBuffer.length;c++){const f=this.writeBuffer[c].data;if(f&&(r+=Ag(f)),c>0&&r>this._maxPayload)return this.writeBuffer.slice(0,c);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Mu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,r,c){return this._sendPacket("message",i,r,c),this}send(i,r,c){return this._sendPacket("message",i,r,c),this}_sendPacket(i,r,c,f){if(typeof r=="function"&&(f=r,r=void 0),typeof c=="function"&&(f=c,c=null),this.readyState==="closing"||this.readyState==="closed")return;c=c||{},c.compress=c.compress!==!1;const h={type:i,data:r,options:c};this.emitReserved("packetCreate",h),this.writeBuffer.push(h),f&&this.once("flush",f),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),i()},c=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?c():i()}):this.upgrading?c():i()),this}_onError(i){if(Hn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,r){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(),gc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const c=Tu.indexOf(this._offlineEventListener);c!==-1&&Tu.splice(c,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,r),this.writeBuffer=[],this._prevBufferLen=0}}}Hn.protocol=Qm;class Vg extends Hn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let r=this.createTransport(i),c=!1;Hn.priorWebsocketSuccess=!1;const f=()=>{c||(r.send([{type:"ping",data:"probe"}]),r.once("packet",S=>{if(!c)if(S.type==="pong"&&S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Hn.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{c||this.readyState!=="closed"&&(T(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const N=new Error("probe error");N.transport=r.name,this.emitReserved("upgradeError",N)}}))};function h(){c||(c=!0,T(),r.close(),r=null)}const m=S=>{const N=new Error("probe error: "+S);N.transport=r.name,h(),this.emitReserved("upgradeError",N)};function g(){m("transport closed")}function y(){m("socket closed")}function v(S){r&&S.name!==r.name&&h()}const T=()=>{r.removeListener("open",f),r.removeListener("error",m),r.removeListener("close",g),this.off("close",y),this.off("upgrading",v)};r.once("open",f),r.once("error",m),r.once("close",g),this.once("close",y),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{c||r.open()},200):r.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const r=[];for(let c=0;c<i.length;c++)~this.transports.indexOf(i[c])&&r.push(i[c]);return r}}let Qg=class extends Vg{constructor(i,r={}){const c=typeof i=="object"?i:r;(!c.transports||c.transports&&typeof c.transports[0]=="string")&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(f=>qg[f]).filter(f=>!!f)),super(i,c)}};function Zg(u,i="",r){let c=u;r=r||typeof location<"u"&&location,u==null&&(u=r.protocol+"//"+r.host),typeof u=="string"&&(u.charAt(0)==="/"&&(u.charAt(1)==="/"?u=r.protocol+u:u=r.host+u),/^(https?|wss?):\/\//.test(u)||(typeof r<"u"?u=r.protocol+"//"+u:u="https://"+u),c=vc(u)),c.port||(/^(http|ws)$/.test(c.protocol)?c.port="80":/^(http|ws)s$/.test(c.protocol)&&(c.port="443")),c.path=c.path||"/";const h=c.host.indexOf(":")!==-1?"["+c.host+"]":c.host;return c.id=c.protocol+"://"+h+":"+c.port+i,c.href=c.protocol+"://"+h+(r&&r.port===c.port?"":":"+c.port),c}const Kg=typeof ArrayBuffer=="function",Jg=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u.buffer instanceof ArrayBuffer,Fm=Object.prototype.toString,$g=typeof Blob=="function"||typeof Blob<"u"&&Fm.call(Blob)==="[object BlobConstructor]",Wg=typeof File=="function"||typeof File<"u"&&Fm.call(File)==="[object FileConstructor]";function zc(u){return Kg&&(u instanceof ArrayBuffer||Jg(u))||$g&&u instanceof Blob||Wg&&u instanceof File}function Au(u,i){if(!u||typeof u!="object")return!1;if(Array.isArray(u)){for(let r=0,c=u.length;r<c;r++)if(Au(u[r]))return!0;return!1}if(zc(u))return!0;if(u.toJSON&&typeof u.toJSON=="function"&&arguments.length===1)return Au(u.toJSON(),!0);for(const r in u)if(Object.prototype.hasOwnProperty.call(u,r)&&Au(u[r]))return!0;return!1}function Fg(u){const i=[],r=u.data,c=u;return c.data=bc(r,i),c.attachments=i.length,{packet:c,buffers:i}}function bc(u,i){if(!u)return u;if(zc(u)){const r={_placeholder:!0,num:i.length};return i.push(u),r}else if(Array.isArray(u)){const r=new Array(u.length);for(let c=0;c<u.length;c++)r[c]=bc(u[c],i);return r}else if(typeof u=="object"&&!(u instanceof Date)){const r={};for(const c in u)Object.prototype.hasOwnProperty.call(u,c)&&(r[c]=bc(u[c],i));return r}return u}function Pg(u,i){return u.data=Sc(u.data,i),delete u.attachments,u}function Sc(u,i){if(!u)return u;if(u&&u._placeholder===!0){if(typeof u.num=="number"&&u.num>=0&&u.num<i.length)return i[u.num];throw new Error("illegal attachments")}else if(Array.isArray(u))for(let r=0;r<u.length;r++)u[r]=Sc(u[r],i);else if(typeof u=="object")for(const r in u)Object.prototype.hasOwnProperty.call(u,r)&&(u[r]=Sc(u[r],i));return u}const Ig=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],eb=5;var ce;(function(u){u[u.CONNECT=0]="CONNECT",u[u.DISCONNECT=1]="DISCONNECT",u[u.EVENT=2]="EVENT",u[u.ACK=3]="ACK",u[u.CONNECT_ERROR=4]="CONNECT_ERROR",u[u.BINARY_EVENT=5]="BINARY_EVENT",u[u.BINARY_ACK=6]="BINARY_ACK"})(ce||(ce={}));class tb{constructor(i){this.replacer=i}encode(i){return(i.type===ce.EVENT||i.type===ce.ACK)&&Au(i)?this.encodeAsBinary({type:i.type===ce.EVENT?ce.BINARY_EVENT:ce.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let r=""+i.type;return(i.type===ce.BINARY_EVENT||i.type===ce.BINARY_ACK)&&(r+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(r+=i.nsp+","),i.id!=null&&(r+=i.id),i.data!=null&&(r+=JSON.stringify(i.data,this.replacer)),r}encodeAsBinary(i){const r=Fg(i),c=this.encodeAsString(r.packet),f=r.buffers;return f.unshift(c),f}}function mm(u){return Object.prototype.toString.call(u)==="[object Object]"}class Mc extends Ye{constructor(i){super(),this.reviver=i}add(i){let r;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(i);const c=r.type===ce.BINARY_EVENT;c||r.type===ce.BINARY_ACK?(r.type=c?ce.EVENT:ce.ACK,this.reconstructor=new nb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(zc(i)||i.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(i),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let r=0;const c={type:Number(i.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 h=r+1;for(;i.charAt(++r)!=="-"&&r!=i.length;);const m=i.substring(h,r);if(m!=Number(m)||i.charAt(r)!=="-")throw new Error("Illegal attachments");c.attachments=Number(m)}if(i.charAt(r+1)==="/"){const h=r+1;for(;++r&&!(i.charAt(r)===","||r===i.length););c.nsp=i.substring(h,r)}else c.nsp="/";const f=i.charAt(r+1);if(f!==""&&Number(f)==f){const h=r+1;for(;++r;){const m=i.charAt(r);if(m==null||Number(m)!=m){--r;break}if(r===i.length)break}c.id=Number(i.substring(h,r+1))}if(i.charAt(++r)){const h=this.tryParse(i.substr(r));if(Mc.isPayloadValid(c.type,h))c.data=h;else throw new Error("invalid payload")}return c}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,r){switch(i){case ce.CONNECT:return mm(r);case ce.DISCONNECT:return r===void 0;case ce.CONNECT_ERROR:return typeof r=="string"||mm(r);case ce.EVENT:case ce.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Ig.indexOf(r[0])===-1);case ce.ACK:case ce.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class nb{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const r=Pg(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const lb=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Mc,Encoder:tb,get PacketType(){return ce},protocol:eb},Symbol.toStringTag,{value:"Module"}));function jt(u,i,r){return u.on(i,r),function(){u.off(i,r)}}const ab=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Pm extends Ye{constructor(i,r,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=i,this.nsp=r,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 i=this.io;this.subs=[jt(i,"open",this.onopen.bind(this)),jt(i,"packet",this.onpacket.bind(this)),jt(i,"error",this.onerror.bind(this)),jt(i,"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(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...r){var c,f,h;if(ab.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(r.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const m={type:ce.EVENT,data:r};if(m.options={},m.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const T=this.ids++,S=r.pop();this._registerAckCallback(T,S),m.id=T}const g=(f=(c=this.io.engine)===null||c===void 0?void 0:c.transport)===null||f===void 0?void 0:f.writable,y=this.connected&&!(!((h=this.io.engine)===null||h===void 0)&&h._hasPingExpired());return this.flags.volatile&&!g||(y?(this.notifyOutgoingListeners(m),this.packet(m)):this.sendBuffer.push(m)),this.flags={},this}_registerAckCallback(i,r){var c;const f=(c=this.flags.timeout)!==null&&c!==void 0?c:this._opts.ackTimeout;if(f===void 0){this.acks[i]=r;return}const h=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let g=0;g<this.sendBuffer.length;g++)this.sendBuffer[g].id===i&&this.sendBuffer.splice(g,1);r.call(this,new Error("operation has timed out"))},f),m=(...g)=>{this.io.clearTimeoutFn(h),r.apply(this,g)};m.withError=!0,this.acks[i]=m}emitWithAck(i,...r){return new Promise((c,f)=>{const h=(m,g)=>m?f(m):c(g);h.withError=!0,r.push(h),this.emit(i,...r)})}_addToQueue(i){let r;typeof i[i.length-1]=="function"&&(r=i.pop());const c={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((f,...h)=>c!==this._queue[0]?void 0:(f!==null?c.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(f)):(this._queue.shift(),r&&r(null,...h)),c.pending=!1,this._drainQueue())),this._queue.push(c),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!i||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(c=>String(c.id)===i)){const c=this.acks[i];delete this.acks[i],c.withError&&c.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case ce.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.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(i);break;case ce.ACK:case ce.BINARY_ACK:this.onack(i);break;case ce.DISCONNECT:this.ondisconnect();break;case ce.CONNECT_ERROR:this.destroy();const c=new Error(i.data.message);c.data=i.data.data,this.emitReserved("connect_error",c);break}}onevent(i){const r=i.data||[];i.id!=null&&r.push(this.ack(i.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const c of r)c.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const r=this;let c=!1;return function(...f){c||(c=!0,r.packet({type:ce.ACK,id:i,data:f}))}}onack(i){const r=this.acks[i.id];typeof r=="function"&&(delete this.acks[i.id],r.withError&&i.data.unshift(null),r.apply(this,i.data))}onconnect(i,r){this.id=i,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),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(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const r=this._anyListeners;for(let c=0;c<r.length;c++)if(i===r[c])return r.splice(c,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const r=this._anyOutgoingListeners;for(let c=0;c<r.length;c++)if(i===r[c])return r.splice(c,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const c of r)c.apply(this,i.data)}}}function Kl(u){u=u||{},this.ms=u.min||100,this.max=u.max||1e4,this.factor=u.factor||2,this.jitter=u.jitter>0&&u.jitter<=1?u.jitter:0,this.attempts=0}Kl.prototype.duration=function(){var u=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),r=Math.floor(i*this.jitter*u);u=(Math.floor(i*10)&1)==0?u-r:u+r}return Math.min(u,this.max)|0};Kl.prototype.reset=function(){this.attempts=0};Kl.prototype.setMin=function(u){this.ms=u};Kl.prototype.setMax=function(u){this.max=u};Kl.prototype.setJitter=function(u){this.jitter=u};class xc extends Ye{constructor(i,r){var c;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(r=i,i=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Du(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((c=r.randomizationFactor)!==null&&c!==void 0?c:.5),this.backoff=new Kl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=i;const f=r.parser||lb;this.encoder=new f.Encoder,this.decoder=new f.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var r;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(r=this.backoff)===null||r===void 0||r.setMin(i),this)}randomizationFactor(i){var r;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(r=this.backoff)===null||r===void 0||r.setJitter(i),this)}reconnectionDelayMax(i){var r;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(r=this.backoff)===null||r===void 0||r.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new Qg(this.uri,this.opts);const r=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;const f=jt(r,"open",function(){c.onopen(),i&&i()}),h=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),i?i(g):this.maybeReconnectOnOpen()},m=jt(r,"error",h);if(this._timeout!==!1){const g=this._timeout,y=this.setTimeoutFn(()=>{f(),h(new Error("timeout")),r.close()},g);this.opts.autoUnref&&y.unref(),this.subs.push(()=>{this.clearTimeoutFn(y)})}return this.subs.push(f),this.subs.push(m),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(jt(i,"ping",this.onping.bind(this)),jt(i,"data",this.ondata.bind(this)),jt(i,"error",this.onerror.bind(this)),jt(i,"close",this.onclose.bind(this)),jt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(r){this.onclose("parse error",r)}}ondecoded(i){Mu(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,r){let c=this.nsps[i];return c?this._autoConnect&&!c.active&&c.connect():(c=new Pm(this,i,r),this.nsps[i]=c),c}_destroy(i){const r=Object.keys(this.nsps);for(const c of r)if(this.nsps[c].active)return;this._close()}_packet(i){const r=this.encoder.encode(i);for(let c=0;c<r.length;c++)this.engine.write(r[c],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,r){var c;this.cleanup(),(c=this.engine)===null||c===void 0||c.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const c=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(f=>{f?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",f)):i.onreconnect()}))},r);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Va={};function Nu(u,i){typeof u=="object"&&(i=u,u=void 0),i=i||{};const r=Zg(u,i.path||"/socket.io"),c=r.source,f=r.id,h=r.path,m=Va[f]&&h in Va[f].nsps,g=i.forceNew||i["force new connection"]||i.multiplex===!1||m;let y;return g?y=new xc(c,i):(Va[f]||(Va[f]=new xc(c,i)),y=Va[f]),r.query&&!i.query&&(i.query=r.queryKey),y.socket(r.path,i)}Object.assign(Nu,{Manager:xc,Socket:Pm,io:Nu,connect:Nu});const Im=window.location.origin;console.info("[socket] connecting to",Im);const Dc=Nu(Im,{transports:["polling","websocket"],timeout:15e3});Dc.on("connect_error",u=>console.error("connect_error",u.code,u.message,u.data));const ep=E.createContext(Dc),ib=({children:u})=>p.jsx(ep.Provider,{value:Dc,children:u}),ju=()=>E.useContext(ep),tp=E.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function ub(u){return E.useCallback((i,r={})=>new Promise((c,f)=>{u.emit(i,r,(h={})=>{h.error?f(new Error(h.error)):c(h)})}),[u])}function sb({children:u}){const i=ju(),r=ub(i),[c,f]=E.useState(null),[h,m]=E.useState([]),[g,y]=E.useState([]),[v,T]=E.useState(i.connected);E.useEffect(()=>{const M=()=>T(!0),L=()=>T(!1);return i.on("connect",M),i.on("disconnect",L),()=>{i.off("connect",M),i.off("disconnect",L)}},[i]),E.useEffect(()=>{function M(q){f(q)}function L(q=[]){m(q)}function G(q){m(H=>[...H.slice(-199),q])}return i.on("session:sync",M),i.on("log:init",L),i.on("log:entry",G),i.on("alert:new",(q={})=>{y(H=>[...H.slice(-49),{...q,receivedAt:Date.now()}])}),()=>{i.off("session:sync",M),i.off("log:init",L),i.off("log:entry",G),i.off("alert:new")}},[i]);const S=E.useMemo(()=>({login:(M,L)=>r("auth:login",{username:M,password:L}),setRole:M=>r("session:setRole",{role:M}),requestControl:(M,L={})=>r("session:requestControl",{roverId:M,...L}),releaseControl:M=>r("session:releaseControl",{roverId:M}),subscribeAll:()=>r("session:subscribeAll"),lockRover:(M,L)=>r("session:lockRover",{roverId:M,locked:L}),setMode:M=>r("setMode",{mode:M})}),[r]),N=E.useMemo(()=>({connected:v,session:c,logs:h,alerts:g,...S}),[S,g,v,h,c]);return p.jsx(tp.Provider,{value:N,children:u})}function vt(){return E.useContext(tp)}const np=E.createContext({frames:{}});function rb({children:u}){const i=ju(),[r,c]=E.useState({});E.useEffect(()=>{function h({roverId:m,sensors:g={},frame:y={}}){m&&c(v=>({...v,[m]:{roverId:m,sensors:g,raw:y?.data||null,receivedAt:Date.now()}}))}return i.on("sensorFrame",h),()=>{i.off("sensorFrame",h)}},[i]);const f=E.useMemo(()=>({frames:r}),[r]);return p.jsx(np.Provider,{value:f,children:u})}function lp(){return E.useContext(np).frames}function jc(u){const i=lp();return u?i[u]??null:null}function Qa(u,i="--"){return u==null||u===""?i:u}function wc(){const{session:u}=vt(),i=u?.assignment?.roverId,r=jc(i),c=r?.sensors||{},f=c.voltageMv!=null?(c.voltageMv/1e3).toFixed(2):null,h=c.currentMa!=null?(c.currentMa/1e3).toFixed(2):null,m=c.batteryChargeMah,g=c.batteryCapacityMah,y=r?.receivedAt?new Date(r.receivedAt).toLocaleTimeString():null,v=r?.raw?r.raw.length>80?`${r.raw.slice(0,80)}…`:r.raw:null;return p.jsxs("section",{className:"rounded-lg border border-slate-900 bg-slate-950/70 p-2 text-[0.8rem] text-slate-200",children:[p.jsxs("div",{className:"flex items-center justify-between text-[0.65rem] uppercase tracking-[0.3em] text-slate-500",children:[p.jsx("span",{children:"Telemetry"}),p.jsx("span",{children:y?`Updated ${y}`:"waiting"})]}),i?r?p.jsxs("div",{className:"mt-2 space-y-2",children:[p.jsx(Za,{label:"Charge",value:Qa(m!=null&&g!=null?`${m}/${g} mAh`:null)}),p.jsx(Za,{label:"Charging",value:Qa(c.chargingState?.label)}),p.jsx(Za,{label:"OI Mode",value:Qa(c.oiMode?.label)}),p.jsx(Za,{label:"Voltage",value:Qa(f?`${f} V`:null)}),p.jsx(Za,{label:"Current",value:Qa(h?`${h} A`:null)})]}):p.jsx("p",{className:"mt-2 text-[0.75rem] text-slate-400",children:"No sensor frames yet."}):p.jsx("p",{className:"mt-2 text-[0.75rem] text-slate-400",children:"Assignment required to view sensors."}),v&&p.jsx("pre",{className:"mt-2 overflow-hidden rounded border border-slate-800 bg-black/60 p-1 text-[0.6rem] text-lime-300",children:v})]})}function Za({label:u,value:i}){return p.jsxs("div",{className:"flex items-center justify-between text-[0.75rem]",children:[p.jsx("span",{className:"text-slate-500",children:u}),p.jsx("span",{className:"font-semibold text-slate-200",children:i})]})}const cb={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function ob(u){if(typeof btoa=="function")return btoa(u);if(typeof Buffer<"u")return Buffer.from(u).toString("base64");throw new Error("No base64 encoder available")}function fb(u){if(!u)return{};const i=`${u}:${u}`;return{Authorization:`Basic ${ob(i)}`}}class db{constructor({url:i,token:r,video:c,onStatus:f}){this.url=i,this.token=r,this.video=c,this.pc=null,this.abortController=null,this.onStatus=f}notify(i,r){typeof this.onStatus=="function"&&this.onStatus(i,r)}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 i=new RTCPeerConnection(cb);this.pc=i;const r=new MediaStream;i.ontrack=c=>{c.streams[0]?.getTracks().forEach(f=>r.addTrack(f)),this.video.srcObject=r,c.track?.kind==="video"&&"playoutDelayHint"in c.receiver&&(c.receiver.playoutDelayHint=0)},i.addTransceiver("video",{direction:"recvonly"}),i.addTransceiver("audio",{direction:"recvonly"}),i.onconnectionstatechange=()=>{const c=i.connectionState;this.notify(c)},i.oniceconnectionstatechange=()=>{const c=i.iceConnectionState;(c==="failed"||c==="disconnected")&&this.notify(c)};try{const c=await i.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});await i.setLocalDescription(c);const f=await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/sdp",...fb(this.token)},body:c.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const h=await f.text();await i.setRemoteDescription({type:"answer",sdp:h}),i.getReceivers().forEach(m=>{"playoutDelayHint"in m&&(m.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(i=>i.track?.stop()),this.pc.getReceivers().forEach(i=>i.track?.stop()),this.pc.close(),this.pc=null),this.video&&(this.video.srcObject=null),this.notify("stopped")}}const hb=2e3,mb=3e3;function ap({sessionInfo:u,label:i,forceMute:r=!1,telemetryFrame:c,batteryConfig:f}){const h=E.useRef(null),m=E.useRef(null),g=E.useRef(null),[y,v]=E.useState("idle"),[T,S]=E.useState(null),[N,M]=E.useState(0),[L,G]=E.useState(!0),q=c?.sensors,H=q?.batteryChargeMah??null,Y=q?.batteryCapacityMah??null,V=q?.wheelOvercurrents||null,ne=!!(V&&Object.values(V).some(_e=>!!_e)),de=E.useCallback(()=>{clearTimeout(m.current),m.current=setTimeout(()=>M(Date.now()),hb)},[]),Ae=E.useCallback((_e=0)=>{if(r)return;clearTimeout(g.current);const ve=()=>{clearTimeout(g.current),g.current=setTimeout(()=>{r||Ge()},mb)},Ge=async()=>{const Ue=h.current;if(Ue)try{Ue.muted=!1,await Ue.play(),G(!1)}catch{Ue.muted=!0,G(!0),ve()}};g.current=setTimeout(Ge,_e)},[r]);E.useEffect(()=>()=>{clearTimeout(m.current),clearTimeout(g.current)},[]),E.useEffect(()=>{y==="playing"&&Ae(0)},[y,Ae]),E.useEffect(()=>{if(!u?.url||!h.current)return;let _e=!0,ve;const Ge=setTimeout(()=>G(!0),0),Ue=(ke,Xt)=>{_e&&(v(ke),S(Xt||null),["error","failed","disconnected","closed"].includes(ke)&&de())};return ve=new db({url:u.url,token:u.token,video:h.current,onStatus:Ue}),ve.start().catch(ke=>{_e&&(v("error"),S(ke.message),de())}),()=>{_e=!1,clearTimeout(Ge),ve?.stop()}},[u?.url,u?.token,N,de]),E.useEffect(()=>{y==="stopped"&&u?.url&&de()},[y,u?.url,de]);const F=u?.url?y==="error"?`Error: ${T||"unknown"}`:T?`${y} (${T})`:y:"waiting";return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("div",{className:"relative w-full overflow-hidden rounded-lg border border-slate-900 bg-black",children:[p.jsx("video",{ref:h,muted:r||L,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),p.jsx(yb,{frame:c}),p.jsx(vb,{active:ne})]}),p.jsx(pb,{charge:H,capacity:Y,config:f}),p.jsxs("div",{className:"text-[0.65rem] uppercase tracking-[0.3em] text-slate-500",children:[p.jsx("span",{className:"text-slate-200",children:i})," · ",F]})]})}function pb({charge:u,capacity:i,config:r}){if(u==null||!r?.full||r.warn==null)return null;const c=r.full-r.warn;if(c<=0)return null;const f=(u-r.warn)/c,h=Math.min(1,Math.max(0,f)),m=Math.round(h*100),g=f<=0,y=r.urgent!=null&&u<=r.urgent,v=g?"bg-red-500 animate-pulse":y?"bg-amber-400":"bg-emerald-500",T=i?`${u}/${i}`:`${u}`;return p.jsxs("div",{className:"rounded border border-slate-900 bg-slate-950/80 p-1",children:[p.jsxs("div",{className:"flex items-center justify-between text-[0.65rem] text-slate-300",children:[p.jsx("span",{children:"Battery"}),p.jsxs("span",{children:[T," mAh"]})]}),p.jsx("div",{className:"mt-1 h-2 w-full rounded-full bg-slate-800",children:p.jsx("div",{className:`h-full rounded-full transition-[width] ${v}`,style:{width:`${m}%`}})})]})}function yb({frame:u}){const r=u?.sensors?.bumpsAndWheelDrops||{},[c,f]=E.useState(()=>Date.now());E.useEffect(()=>{const y=setInterval(()=>f(Date.now()),150);return()=>clearInterval(y)},[]);const h=u?.receivedAt?c-u.receivedAt<200:!1,m=[{label:"B-L",active:r.bumpLeft},{label:"B-R",active:r.bumpRight}],g=[{label:"DROP L",active:r.wheelDropLeft},{label:"DROP R",active:r.wheelDropRight}];return p.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-2 text-[0.6rem] uppercase tracking-[0.3em] text-slate-200",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:`h-2 w-2 rounded-full ${h?"bg-emerald-300 shadow-[0_0_6px_rgba(16,185,129,0.9)]":"bg-slate-700"}`}),p.jsx("span",{className:"text-slate-400",children:"SENSORS"})]}),p.jsx("div",{className:"flex gap-1",children:m.map(y=>p.jsx(pm,{label:y.label,active:y.active},y.label))})]}),p.jsx("div",{className:"flex justify-end gap-1",children:g.map(y=>p.jsx(pm,{label:y.label,active:y.active},y.label))})]})}function pm({label:u,active:i}){return p.jsx("span",{className:`rounded-sm border px-1 py-0.5 text-[0.55rem] ${i?"border-emerald-400 bg-emerald-500/10 text-emerald-200":"border-slate-700 bg-black/40 text-slate-500"}`,children:u})}function vb({active:u}){return u?p.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:p.jsx("div",{className:"text-center text-lg font-black uppercase tracking-[0.6em] text-red-100 animate-pulse",children:"Overcurrent"})}):null}const gb={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Vl={main:[-127,127],side:[-127,127],vacuum:[0,127]},bb=200,Sb=u=>new Promise(i=>setTimeout(i,u));function al(u,i,r){return Math.max(i,Math.min(r,u))}function xb(u){const i=u.has("w"),r=u.has("s"),c=u.has("a"),f=u.has("d"),m=u.has("shift")?300:150;let g=0,y=0;return i&&!r?(g+=m,y+=m):r&&!i&&(g-=m,y-=m),c&&!f?(g-=m,y+=m):f&&!c&&(g+=m,y-=m),!i&&!r&&(c||f)&&(g=c?-m:m,y=c?m:-m),{left:al(g,-500,500),right:al(y,-500,500)}}function ym(u){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function _b(u){const i=u.target;if(!i)return!1;const r=i.tagName;return r==="INPUT"||r==="TEXTAREA"||i.isContentEditable||r==="SELECT"&&["w","a","s","d","Shift"].includes(u.key)}function Eb(u){const i=String.fromCharCode(...u);if(typeof btoa=="function")return btoa(i);if(typeof Buffer<"u")return Buffer.from(u).toString("base64");throw new Error("No base64 encoder available")}function Tb(){const u=ju(),{session:i}=vt(),r=i?.assignment?.roverId,c=E.useRef(new Set),f=E.useRef({left:0,right:0}),[h,m]=E.useState(()=>({left:0,right:0})),g=E.useCallback((H,Y)=>{r&&u.emit("command",{roverId:r,...H},Y)},[u,r]),y=E.useCallback(()=>{r&&g({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[g,r]),v=E.useCallback(()=>{if(!r)return;const H=xb(c.current),Y=f.current;H.left===Y.left&&H.right===Y.right||(f.current=H,m(H),g({type:"drive",data:{driveDirect:H}}))},[g,r]),T=E.useCallback(({x:H=0,y:Y=0,boost:V=!1}={})=>{if(!r)return;const ne=V?400:250,de=ym(Y)*ne,Ae=ym(H)*ne,F={left:al(Math.round(de+Ae),-500,500),right:al(Math.round(de-Ae),-500,500)};f.current=F,m(F),g({type:"drive",data:{driveDirect:F}})},[g,r]),S=E.useCallback(({main:H=0,side:Y=0,vacuum:V=0}={})=>{if(!r)return;const ne={main:al(H,Vl.main[0],Vl.main[1]),side:al(Y,Vl.side[0],Vl.side[1]),vacuum:al(V,Vl.vacuum[0],Vl.vacuum[1])};g({type:"motors",data:{motorPwm:ne}})},[g,r]),N=E.useCallback(()=>{r&&(c.current.clear(),f.current={left:0,right:0},m(f.current),S({main:0,side:0,vacuum:0}))},[r,S]),M=E.useCallback(H=>{if(!r)return;const Y=gb[H];Y&&(g({type:"raw",data:{raw:Eb(Y)}}),y())},[g,y,r]),L=E.useCallback(async()=>{if(r)for(const H of["start","dock","full"])M(H),await Sb(bb)},[r,M]),G=E.useCallback(()=>{M("dock")},[M]),q=E.useCallback(H=>{r&&S(H)},[r,S]);return E.useEffect(()=>{if(!r){c.current.clear(),f.current={left:0,right:0},m(f.current);return}function H(V){if(_b(V))return;const ne=V.key.toLowerCase();["w","a","s","d","shift"].includes(ne)&&(c.current.has(ne)||(c.current.add(ne),v()))}function Y(V){const ne=V.key.toLowerCase();c.current.has(ne)&&(c.current.delete(ne),v())}return window.addEventListener("keydown",H),window.addEventListener("keyup",Y),y(),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Y)}},[r,v,y]),{roverId:r,speeds:h,stopMotors:N,sendOiCommand:M,runStartDockFull:L,seekDock:G,setAuxMotors:q,driveWithVector:T}}const ip=E.createContext(null);function Ab({children:u}){const i=Tb();return p.jsx(ip.Provider,{value:i,children:u})}function Uc(){const u=E.useContext(ip);if(!u)throw new Error("useDriveControl must be used within DriveControlProvider");return u}const Nb=[{key:"safe",label:"Safe"},{key:"passive",label:"Passive"},{key:"full",label:"Full"}];function Bc(){const{roverId:u,speeds:i,stopMotors:r,sendOiCommand:c,runStartDockFull:f,seekDock:h}=Uc(),m=jc(u),g=m?.sensors||{},y=(g.oiMode?.label||"").toLowerCase()==="full",v=!!g.chargingSources?.homeBase,T=!!(g.chargingState?.label&&g.chargingState.label.toLowerCase()!=="not charging"),S=m?.receivedAt?new Date(m.receivedAt).toLocaleTimeString():null;return p.jsxs("section",{className:"rounded-lg border border-slate-900 bg-slate-950/70 p-2 text-[0.8rem] text-slate-100",children:[p.jsxs("div",{className:"flex items-center justify-between text-[0.65rem] uppercase tracking-[0.3em] text-slate-500",children:[p.jsx("span",{children:"Drive Control"}),p.jsx("span",{children:u?`Rover ${u}`:"unassigned"})]}),p.jsxs("div",{className:"mt-2 space-y-2",children:[p.jsxs("div",{children:[p.jsx("button",{type:"button",onClick:f,disabled:!u,className:"w-full rounded border border-emerald-500/40 bg-emerald-500/10 py-1 text-[0.7rem] font-semibold uppercase tracking-[0.3em] text-emerald-200 disabled:opacity-40",children:"Enable Driving Mode"}),p.jsx("p",{className:"mt-1 text-[0.65rem] text-slate-400",children:"Runs Start → Dock → Full commands to ready the rover."}),p.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1 text-[0.6rem]",children:[p.jsx(oc,{label:"Driving mode",active:y}),S&&p.jsxs("span",{className:"text-slate-500",children:["Updated ",S]})]})]}),p.jsxs("div",{children:[p.jsx("button",{type:"button",onClick:h,disabled:!u,className:"w-full rounded border border-cyan-500/40 bg-cyan-500/10 py-1 text-[0.7rem] font-semibold uppercase tracking-[0.3em] text-cyan-200 disabled:opacity-40",children:"Seek Dock"}),p.jsx("p",{className:"mt-1 text-[0.65rem] text-slate-400",children:"Point the rover straight at the dock, about one foot away, before triggering."}),p.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[p.jsx(oc,{label:v?"Docked":"Not docked",active:v}),p.jsx(oc,{label:T?"Charging":"Not charging",active:T})]})]}),p.jsx(Cb,{left:i.left,right:i.right}),p.jsxs("div",{children:[p.jsx("p",{className:"text-[0.6rem] uppercase tracking-[0.3em] text-slate-500",children:"Manual OI"}),p.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:Nb.map(N=>p.jsx("button",{type:"button",onClick:()=>c(N.key),disabled:!u,className:"rounded border border-slate-800 px-2 py-0.5 text-[0.65rem] uppercase tracking-[0.2em] text-slate-200 disabled:opacity-30",children:N.label},N.key))})]}),p.jsx("div",{className:"flex flex-wrap gap-1",children:p.jsx("button",{type:"button",onClick:r,disabled:!u,className:"flex-1 rounded border border-red-500/50 bg-red-500/10 py-1 text-[0.7rem] font-semibold uppercase tracking-[0.3em] text-red-200 disabled:opacity-40",children:"Stop Motors"})})]}),p.jsx("p",{className:"mt-2 text-[0.6rem] text-slate-500",children:"Sensor streaming auto-starts after each OI change."})]})}function Cb({left:u,right:i}){return p.jsxs("div",{className:"grid grid-cols-2 gap-1 rounded border border-slate-900 bg-black/50 p-1 text-[0.7rem]",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-[0.55rem] uppercase tracking-[0.3em] text-slate-500",children:"Left"}),p.jsx("p",{className:"font-semibold text-slate-100",children:u})]}),p.jsxs("div",{children:[p.jsx("p",{className:"text-[0.55rem] uppercase tracking-[0.3em] text-slate-500",children:"Right"}),p.jsx("p",{className:"font-semibold text-slate-100",children:i})]})]})}function oc({label:u,active:i}){return p.jsx("span",{className:`rounded-full border px-2 py-0.5 text-[0.55rem] uppercase tracking-[0.3em] ${i?"border-emerald-400 bg-emerald-500/10 text-emerald-200":"border-slate-700 bg-slate-900 text-slate-500"}`,children:u})}const Rb=5e3;function Ob(u){return u.id?u.id:u.timestamp?`${u.timestamp}-${u.message}`:`${u.title||"alert"}-${u.message}`}function zb(){const{alerts:u}=vt(),[i,r]=E.useState(()=>Date.now()),c=E.useMemo(()=>u.slice(-5).map(h=>({alert:h,key:Ob(h)})),[u]);E.useEffect(()=>{if(!c.length)return;const h=setInterval(()=>r(Date.now()),200);return()=>clearInterval(h)},[c.length]);const f=c.map(h=>({...h,age:i-(h.alert.receivedAt??h.alert.timestamp??0)})).filter(h=>h.age<=Rb);return f.length?p.jsx("div",{className:"pointer-events-none fixed top-2 left-1/2 z-50 flex -translate-x-1/2 flex-col gap-2",children:f.map(h=>p.jsx(Mb,{alert:h.alert},h.key))}):null}function Mb({alert:u}){const i=u.color==="error"?"border-red-500/50 bg-red-500/20 text-red-100":u.color==="warn"?"border-amber-500/50 bg-amber-500/20 text-amber-100":"border-emerald-500/40 bg-emerald-500/10 text-emerald-100";return p.jsxs("div",{className:`pointer-events-auto rounded-md border px-3 py-2 text-[0.75rem] shadow-lg shadow-black/60 ${i}`,children:[p.jsx("p",{className:"text-[0.6rem] uppercase tracking-[0.4em] opacity-70",children:u.title||"Alert"}),p.jsx("p",{className:"text-sm font-semibold",children:u.message})]})}const Db=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function Lc(){const{session:u,lockRover:i,setMode:r,requestControl:c}=vt(),f=E.useMemo(()=>u?.roster??[],[u?.roster]),[h,m]=E.useState({}),g=u?.role==="admin"||u?.role==="lockdown"||u?.role==="lockdown-admin",y=u?.mode??"open",v=async(M,L)=>{try{await i(M,L),m(G=>({...G,[M]:L}))}catch(G){alert(G.message)}},T=async M=>{const L=M.target.value;try{await r(L)}catch(G){alert(G.message)}},S=async M=>{try{await c(M,{force:!0})}catch(L){alert(L.message)}},N=E.useMemo(()=>{const M={};return f.forEach(L=>{M[L.id]=h[L.id]??L.locked}),M},[f,h]);return g?p.jsxs("section",{className:"rounded-2xl border border-amber-600/40 bg-amber-500/5 p-4 text-sm text-amber-100",children:[p.jsxs("header",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Admin Controls"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("label",{className:"text-xs uppercase tracking-[0.3em] text-amber-300",children:"Server mode"}),p.jsx("select",{value:y,onChange:T,className:"rounded-md border border-amber-600/40 bg-slate-950/60 px-2 py-1 text-sm text-white",children:Db.map(M=>p.jsx("option",{value:M.key,children:M.label},M.key))})]})]}),p.jsx("div",{className:"space-y-3",children:f.map(M=>p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-amber-600/30 bg-slate-950/30 px-3 py-2",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-white",children:M.name}),p.jsxs("p",{className:"text-xs text-amber-200",children:["Locked: ",N[M.id]?"yes":"no"]})]}),p.jsxs("div",{className:"flex flex-wrap gap-2",children:[p.jsx("button",{type:"button",onClick:()=>v(M.id,!N[M.id]),className:"rounded-md border border-amber-500 px-3 py-1 text-xs font-semibold text-amber-100",children:N[M.id]?"Unlock":"Lock"}),p.jsx("button",{type:"button",onClick:()=>S(M.id),className:"rounded-md border border-amber-500 px-3 py-1 text-xs font-semibold text-amber-100",children:"Force Control"})]})]},M.id))})]}):null}var fc={},cn={},dc={},vm;function wu(){return vm||(vm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=void 0,(function(i){i.Circle="circle",i.Square="square",i.AxisY="axisY",i.AxisX="axisX"})(u.JoystickShape||(u.JoystickShape={}))})(dc)),dc}var Ka={},gm;function jb(){if(gm)return Ka;gm=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.shapeFactory=void 0;var u=wu(),i=function(r,c){switch(r){case u.JoystickShape.Square:return{borderRadius:Math.sqrt(c)};case u.JoystickShape.Circle:default:return{borderRadius:c}}};return Ka.shapeFactory=i,Ka}var Ja={},bm;function wb(){if(bm)return Ja;bm=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.shapeBoundsFactory=void 0;var u=wu(),i=function(c,f,h,m,g,y,v,T,S){switch(c){case u.JoystickShape.Square:return m=r(f-S.left-T/2,T),g=r(h-S.top-T/2,T),{relativeX:m,relativeY:g};case u.JoystickShape.AxisX:return m=r(f-S.left-T/2,T),g=0,{relativeX:m,relativeY:g};case u.JoystickShape.AxisY:return m=0,g=r(h-S.top-T/2,T),{relativeX:m,relativeY:g};default:return y>v&&(m*=v/y,g*=v/y),{relativeX:m,relativeY:g}}};Ja.shapeBoundsFactory=i;var r=function(c,f){var h=f/2;return c>h?h:c<-h?h*-1:c};return Ja}var Sm;function Ub(){if(Sm)return cn;Sm=1;var u=cn&&cn.__extends||(function(){var v=function(T,S){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,M){N.__proto__=M}||function(N,M){for(var L in M)Object.prototype.hasOwnProperty.call(M,L)&&(N[L]=M[L])},v(T,S)};return function(T,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");v(T,S);function N(){this.constructor=T}T.prototype=S===null?Object.create(S):(N.prototype=S.prototype,new N)}})(),i=cn&&cn.__assign||function(){return i=Object.assign||function(v){for(var T,S=1,N=arguments.length;S<N;S++){T=arguments[S];for(var M in T)Object.prototype.hasOwnProperty.call(T,M)&&(v[M]=T[M])}return v},i.apply(this,arguments)};Object.defineProperty(cn,"__esModule",{value:!0}),cn.Joystick=void 0;var r=Ru(),c=wu(),f=jb(),h=wb(),m;(function(v){v.PointerDown="pointerdown",v.PointerMove="pointermove",v.PointerUp="pointerup"})(m||(m={}));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 y=(function(v){u(T,v);function T(S){var N=v.call(this,S)||this;return N._stickRef=r.createRef(),N._baseRef=r.createRef(),N.frameId=null,N._pointerId=null,N._mounted=!1,N._pointerMove=function(M){if(M.preventDefault(),N.state.dragging){if(!N.props.followCursor&&M.pointerId!==N._pointerId)return;var L=M.clientX,G=M.clientY,q=L-N._parentRect.left-N._radius,H=G-N._parentRect.top-N._radius,Y=N._distance(q,H),V=(0,h.shapeBoundsFactory)(N.props.controlPlaneShape||N.props.baseShape,L,G,q,H,Y,N._radius,N._baseSize,N._parentRect);q=V.relativeX,H=V.relativeY;var ne=Math.atan2(q,H);N._updatePos({relativeX:q,relativeY:H,distance:N._distanceToPercentile(Y),direction:N._getDirection(ne),axisX:L-N._parentRect.left,axisY:G-N._parentRect.top})}},N._pointerUp=function(M){if(M.pointerId===N._pointerId){var L={dragging:!1};N.props.sticky||(L.coordinates=void 0),N.frameId=window.requestAnimationFrame(function(){N._mounted&&N.setState(L)}),window.removeEventListener(m.PointerUp,N._pointerUp),window.removeEventListener(m.PointerMove,N._pointerMove),N._pointerId=null,N.props.stop&&N.props.stop({type:"stop",x:N.props.sticky?N.state.coordinates.relativeX*2/N._baseSize:null,y:N.props.sticky?N.state.coordinates.relativeY*2/N._baseSize:null,direction:N.props.sticky?N.state.coordinates.direction:null,distance:N.props.sticky?N.state.coordinates.distance:null})}},N.state={dragging:!1},N._throttleMoveCallback=(function(){var M=0;return function(L){var G=new Date().getTime(),q=N.props.throttle||0;if(!(G-M<q)&&(M=G,N.props.move))return N.props.move(L)}})(),N}return T.prototype.componentWillUnmount=function(){var S=this;this._mounted=!1,this.props.followCursor&&window.removeEventListener(m.PointerMove,function(N){return S._pointerMove(N)}),this.frameId!==null&&window.cancelAnimationFrame(this.frameId)},T.prototype.componentDidMount=function(){var S=this;this._mounted=!0,this.props.followCursor&&(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(m.PointerMove,function(N){return S._pointerMove(N)}),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},T.prototype._updatePos=function(S){var N=this;this.frameId=window.requestAnimationFrame(function(){N._mounted&&N.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})},T.prototype._pointerDown=function(S){this.props.disabled||this.props.followCursor||(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(m.PointerUp,this._pointerUp),window.addEventListener(m.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}))},T.prototype._getDirection=function(S){return S>g.TopRight||S<g.TopLeft?"FORWARD":S<g.TopRight&&S>g.BottomRight?"RIGHT":S<g.BottomLeft?"LEFT":"BACKWARD"},T.prototype._distance=function(S,N){return Math.hypot(S,N)},T.prototype._distanceToPercentile=function(S){var N=S/(this._baseSize/2)*100;return N>100?100:N},T.prototype.getBaseShapeStyle=function(){var S=this.props.baseShape||c.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},T.prototype.getStickShapeStyle=function(){var S=this.props.stickShape||c.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},T.prototype._getBaseStyle=function(){var S=this.props.baseColor!==void 0?this.props.baseColor:"#000033",N="".concat(this._baseSize,"px"),M=i(i({},this.getBaseShapeStyle()),{height:N,width:N,background:S,display:"flex",justifyContent:"center",alignItems:"center"});return this.props.baseImage&&(M.background="url(".concat(this.props.baseImage,")"),M.backgroundSize="100%"),M},T.prototype._getStickStyle=function(){var S=this.props.stickColor!==void 0?this.props.stickColor:"#3D59AB",N=this._stickSize?"".concat(this._stickSize,"px"):"".concat(this._baseSize/1.5,"px"),M=i(i({},this.getStickShapeStyle()),{background:S,cursor:"move",height:N,width:N,border:"none",flexShrink:0,touchAction:"none"});return this.props.stickImage&&(M.background="url(".concat(this.props.stickImage,")"),M.backgroundSize="100%"),this.props.pos&&(M=Object.assign({},M,{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&&(M=Object.assign({},M,{position:"absolute",transform:"translate3d(".concat(this.state.coordinates.relativeX,"px, ").concat(this.state.coordinates.relativeY,"px, 0)")})),M},T.prototype.render=function(){var S=this;this._baseSize=this.props.size||100,this._stickSize=this.props.stickSize,this._radius=this._baseSize/2;var N=this._getBaseStyle(),M=this._getStickStyle();return r.createElement("div",{"data-testid":"joystick-base",className:this.props.disabled?"joystick-base-disabled":"",ref:this._baseRef,style:N},r.createElement("button",{ref:this._stickRef,disabled:this.props.disabled,onPointerDown:function(L){return S._pointerDown(L)},className:this.props.disabled?"joystick-disabled":"",style:M}))},T})(r.Component);return cn.Joystick=y,cn}var xm;function Bb(){return xm||(xm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=u.Joystick=void 0;var i=Ub();Object.defineProperty(u,"Joystick",{enumerable:!0,get:function(){return i.Joystick}});var r=wu();Object.defineProperty(u,"JoystickShape",{enumerable:!0,get:function(){return r.JoystickShape}})})(fc)),fc}var Lb=Bb();function _m(u=0){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function up(){const{roverId:u,driveWithVector:i,stopMotors:r}=Uc(),c=!u,f=E.useCallback((m={})=>{if(c)return;const g=_m(m.x??0),y=_m(m.y??0);i({x:g,y})},[c,i]),h=E.useCallback(()=>{c||i({x:0,y:0})},[c,i]);return p.jsxs("section",{className:"rounded-lg border border-slate-900 bg-slate-950/70 p-2 text-[0.8rem] text-slate-100",children:[p.jsx("div",{className:"text-[0.65rem] uppercase tracking-[0.3em] text-slate-500",children:"Joystick"}),p.jsx("div",{className:"mt-2 flex items-center justify-center",children:p.jsx(Lb.Joystick,{size:120,baseColor:"#0f172a",stickColor:"#38bdf8",throttle:75,move:f,stop:h,disabled:c})}),p.jsx("p",{className:"mt-2 text-[0.65rem] text-slate-400",children:"Drag to drive. Release to stop sending drive commands."}),p.jsx("button",{type:"button",onClick:r,disabled:c,className:"mt-2 w-full rounded border border-slate-800 bg-black/40 py-1 text-[0.7rem] font-semibold uppercase tracking-[0.2em] text-slate-200 disabled:opacity-40",children:"Panic Stop"})]})}function sp(){const{roverId:u,setAuxMotors:i}=Uc(),r=!u,c=()=>{r||i({main:127,side:127,vacuum:127})},f=()=>{r||i({main:0,side:0,vacuum:0})},h=[{label:"Main +",values:{main:127}},{label:"Main -",values:{main:-127}},{label:"Side +",values:{side:127}},{label:"Side -",values:{side:-127}},{label:"Vacuum Max",values:{vacuum:127}},{label:"Vacuum Off",values:{vacuum:0}}];return p.jsxs("section",{className:"rounded-lg border border-slate-900 bg-slate-950/70 p-2 text-[0.8rem] text-slate-100",children:[p.jsx("div",{className:"text-[0.65rem] uppercase tracking-[0.3em] text-slate-500",children:"Aux Motors"}),p.jsxs("div",{className:"mt-2 flex flex-wrap gap-1",children:[p.jsx("button",{type:"button",onClick:c,disabled:r,className:"flex-1 rounded border border-emerald-500/40 bg-emerald-500/10 py-1 text-[0.7rem] font-semibold uppercase tracking-[0.2em] text-emerald-200 disabled:opacity-40",children:"All forward"}),p.jsx("button",{type:"button",onClick:f,disabled:r,className:"flex-1 rounded border border-slate-800 bg-black/40 py-1 text-[0.7rem] font-semibold uppercase tracking-[0.2em] text-slate-200 disabled:opacity-40",children:"Stop all"})]}),p.jsx("div",{className:"mt-2 grid grid-cols-2 gap-1 text-[0.7rem]",children:h.map(m=>p.jsx("button",{type:"button",onClick:()=>!r&&i(m.values),disabled:r,className:"rounded border border-slate-800 bg-black/30 py-1 uppercase tracking-[0.2em] text-slate-200 disabled:opacity-30",children:m.label},m.label))})]})}function Hb(){return p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(up,{}),p.jsx(sp,{})]})}function rp(u=[]){const i=ju(),[r,c]=E.useState({}),f=E.useMemo(()=>Array.from(new Set(u.filter(Boolean))),[u]),h=f.join("|");return E.useEffect(()=>{if(!f.length)return;let g=!1;return f.forEach(y=>{i.emit("video:request",{roverId:y},(v={})=>{g||c(T=>({...T,[y]:v}))})}),()=>{g=!0}},[i,h,f]),E.useMemo(()=>{if(!f.length)return{};const g={};return f.forEach(y=>{r[y]&&(g[y]=r[y])}),g},[f,r])}function qb({connected:u,role:i,mode:r}){const c=u?"bg-emerald-500/20 text-emerald-300":"bg-red-500/20 text-red-200";return p.jsxs("div",{className:"flex flex-wrap items-center gap-1 text-[0.65rem] uppercase tracking-[0.2em]",children:[p.jsx("span",{className:`rounded-full px-2 py-0.5 font-medium ${c}`,children:u?"Connected":"Disconnected"}),p.jsxs("span",{className:"rounded-full bg-slate-800/80 px-2 py-0.5 text-slate-200",children:["Role ",i||"unknown"]}),p.jsxs("span",{className:"rounded-full bg-slate-800/80 px-2 py-0.5 text-slate-200",children:["Mode ",r||"--"]})]})}function Hc(){return p.jsxs("div",{className:"min-h-[8rem] rounded-lg border border-slate-800 bg-slate-900/70 p-2 text-[0.75rem] text-slate-400",children:[p.jsx("p",{className:"text-center text-xs uppercase tracking-[0.3em] text-slate-500",children:"Room camera"}),p.jsx("p",{className:"mt-2 text-center text-sm text-slate-300",children:"Feed placeholder. Wire upcoming room cam here."})]})}function Yb(){const[u,i]=E.useState(()=>typeof window>"u"||window.innerWidth>=1024?"desktop":window.innerWidth>window.innerHeight?"mobile-landscape":"mobile-portrait");return E.useEffect(()=>{function r(){if(typeof window>"u")return;const{innerWidth:c,innerHeight:f}=window;c>=1024?i("desktop"):c>f?i("mobile-landscape"):i("mobile-portrait")}return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),u}function qc(){const{logs:u}=vt();return p.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-900/70 p-4",children:[p.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),p.jsxs("span",{className:"text-xs uppercase tracking-[0.2em] text-slate-500",children:[u.length," entries"]})]}),p.jsx("div",{className:"h-64 overflow-y-auto rounded-xl bg-slate-950/40 p-3 text-xs font-mono text-slate-300",children:u.length===0?p.jsx("p",{children:"No logs yet."}):u.slice().reverse().map(i=>p.jsxs("div",{className:"mb-2",children:[p.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",p.jsxs("span",{className:"text-cyan-300",children:["[",i.level,"]"]})," ",i.label&&p.jsxs("span",{className:"text-pink-300",children:["[",i.label,"]"]})," ",p.jsx("span",{children:i.message})]},i.id))})]})}function Yc(){const{session:u,requestControl:i}=vt(),r=u?.roster??[],c=u?.role==="admin"||u?.role==="lockdown",[f,h]=E.useState({});async function m(g){h(y=>({...y,[g]:!0}));try{await i(g)}catch(y){alert(y.message)}finally{h(y=>({...y,[g]:!1}))}}return p.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-900/60 p-4",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Rovers"}),p.jsxs("div",{className:"mt-4 space-y-3",children:[r.length===0&&p.jsx("p",{className:"text-slate-400",children:"No rovers registered."}),r.map(g=>p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl bg-slate-950/40 px-4 py-3",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-white",children:g.name}),p.jsxs("p",{className:"text-xs text-slate-400",children:["Locked: ",g.locked?"yes":"no"]})]}),c?p.jsx("button",{type:"button",onClick:()=>m(g.id),disabled:f[g.id],className:"rounded-full bg-blue-600 px-4 py-1 text-sm font-semibold text-white disabled:opacity-50",children:f[g.id]?"Requesting…":"Request control"}):p.jsx("span",{className:"text-xs text-slate-500",children:"Auto-assigned"})]},g.id))]})]})}function kc(){const{session:u,releaseControl:i}=vt(),r=u?.assignment,c=r?.roverId,[f,h]=E.useState(!1);async function m(){if(c){h(!0);try{await i(c)}catch(g){alert(g.message)}finally{h(!1)}}}return p.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-900/60 p-4",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Assignment"}),c?p.jsxs("div",{className:"mt-4 space-y-3",children:[p.jsxs("p",{className:"text-slate-300",children:["Currently driving rover ",c]}),p.jsx("button",{type:"button",onClick:m,disabled:f,className:"rounded-full bg-red-600 px-4 py-1 text-sm font-semibold text-white disabled:opacity-50",children:f?"Releasing…":"Release control"})]}):p.jsxs("div",{className:"mt-4 text-slate-400",children:[p.jsxs("p",{children:["Status: ",r?.status??"not assigned"]}),r?.queuePosition&&p.jsxs("p",{children:["Queue position: ",r.queuePosition]})]})]})}function Xc(){const{session:u}=vt(),i=E.useMemo(()=>JSON.stringify(u??{},null,2),[u]);return p.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-900/60 p-4",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Session snapshot"}),p.jsx("pre",{className:"mt-4 max-h-64 overflow-y-auto text-sm text-teal-200",children:i})]})}function Gc(){const{session:u}=vt(),i=u?.assignment?.roverId,r=rp(i?[i]:[]),c=i?r[i]:null,f=jc(i),h=E.useMemo(()=>i?u?.roster?.find(g=>g.id===i)?.battery??null:null,[u?.roster,i]);return p.jsxs("section",{className:"rounded-2xl border border-slate-800 bg-slate-900/60 p-4",children:[p.jsx("header",{className:"mb-4 flex items-center justify-between",children:p.jsxs("div",{children:[p.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Video Feed"}),p.jsx("h2",{className:"text-2xl font-semibold text-white",children:i?`Rover ${i}`:"No rover assigned"})]})}),i?p.jsx(ap,{sessionInfo:c,label:i,muted:!1,telemetryFrame:f,batteryConfig:h}):p.jsx("p",{className:"text-sm text-slate-400",children:"Assignment required to initialize video."})]})}function Vc(){const{login:u,setRole:i}=vt(),[r,c]=E.useState(""),[f,h]=E.useState(""),[m,g]=E.useState(!1);async function y(v){v.preventDefault(),g(!0);try{await u(r,f),c(""),h("")}catch(T){alert(T.message)}finally{g(!1)}}return p.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-900/60 p-4",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Authentication"}),p.jsxs("form",{className:"mt-4 flex flex-col gap-3",onSubmit:y,children:[p.jsx("input",{className:"rounded-lg border border-slate-800 bg-slate-950/60 px-3 py-2 text-white",placeholder:"Username",value:r,onChange:v=>c(v.target.value)}),p.jsx("input",{className:"rounded-lg border border-slate-800 bg-slate-950/60 px-3 py-2 text-white",placeholder:"Password",type:"password",value:f,onChange:v=>h(v.target.value)}),p.jsx("button",{type:"submit",disabled:m,className:"rounded-lg bg-emerald-600 py-2 font-semibold text-white disabled:opacity-50",children:m?"Logging in…":"Login as admin"})]}),p.jsxs("div",{className:"mt-4 flex gap-3",children:[p.jsx("button",{type:"button",onClick:()=>i("user"),className:"rounded-lg border border-slate-700 px-3 py-1 text-sm text-slate-200",children:"Driver mode"}),p.jsx("button",{type:"button",onClick:()=>i("spectator"),className:"rounded-lg border border-slate-700 px-3 py-1 text-sm text-slate-200",children:"Spectator mode"})]})]})}function kb(){return p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1.4fr)_minmax(0,1fr)] gap-2",children:[p.jsx(wc,{}),p.jsx(Gc,{}),p.jsx(Bc,{})]}),p.jsxs("section",{className:"grid grid-cols-[minmax(0,1.2fr)_minmax(0,1fr)_minmax(0,1fr)] gap-2",children:[p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Vc,{}),p.jsx(Lc,{}),p.jsx(Yc,{})]}),p.jsx(Hc,{}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(kc,{}),p.jsx(qc,{}),p.jsx(Xc,{})]})]})]})}function Xb(){return p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Gc,{}),p.jsx(Hb,{}),p.jsx(Bc,{}),p.jsx(wc,{}),p.jsx(Yc,{}),p.jsx(kc,{}),p.jsx(Vc,{}),p.jsx(Lc,{}),p.jsx(Hc,{}),p.jsx(qc,{}),p.jsx(Xc,{})]})}function Gb(){return p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsxs("section",{className:"grid grid-cols-[minmax(0,0.9fr)_minmax(0,1.2fr)_minmax(0,0.9fr)] gap-2",children:[p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Bc,{}),p.jsx(sp,{})]}),p.jsx(Gc,{}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(up,{}),p.jsx(wc,{})]})]}),p.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-2",children:[p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Yc,{}),p.jsx(kc,{}),p.jsx(Vc,{}),p.jsx(Lc,{})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Hc,{}),p.jsx(qc,{}),p.jsx(Xc,{})]})]})]})}function Vb(){const{connected:u,session:i}=vt(),r=Yb(),c=r==="desktop"?p.jsx(kb,{}):r==="mobile-landscape"?p.jsx(Gb,{}):p.jsx(Xb,{});return p.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:p.jsx("main",{className:"mx-auto flex w-full max-w-screen-2xl flex-col gap-2 px-1 py-1",children:p.jsxs(Ab,{children:[p.jsx("div",{className:"flex justify-end",children:p.jsx(qb,{connected:u,role:i?.role,mode:i?.mode})}),c,p.jsx(zb,{})]})})})}function Qb(){const{session:u,setRole:i,subscribeAll:r}=vt(),[c,f]=E.useState(!1);return E.useEffect(()=>{let h=!1;async function m(){try{u?.role!=="spectator"&&await i("spectator"),await r(),h||f(!0)}catch(g){console.error("Failed to enter spectator mode",g)}}return m(),()=>{h=!0}},[u?.role,i,r]),c}function Zb({connected:u,ready:i,rosterCount:r}){return p.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[p.jsx("span",{className:`rounded-full px-3 py-1 font-semibold ${u?"bg-emerald-500/20 text-emerald-200":"bg-red-500/20 text-red-200"}`,children:u?"Connected":"Disconnected"}),p.jsxs("span",{className:`rounded-full px-3 py-1 ${i?"bg-blue-600/40 text-blue-100":"bg-slate-700 text-slate-200"}`,children:["Spectator mode ",i?"active":"pending…"]}),p.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",r]})]})}function Kb({logs:u}){return p.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[p.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),p.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",u.length]})]}),p.jsx("div",{className:"h-60 overflow-y-auto rounded-2xl bg-slate-950/40 p-3 text-xs font-mono text-slate-300",children:u.length===0?p.jsx("p",{children:"No log entries yet."}):u.slice().reverse().map(i=>p.jsxs("div",{className:"mb-2",children:[p.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",p.jsxs("span",{className:"text-cyan-300",children:["[",i.level,"]"]})," ",i.label&&p.jsxs("span",{className:"text-pink-300",children:["[",i.label,"]"]})," ",p.jsx("span",{children:i.message})]},i.id))})]})}function Jb(u={}){return Object.entries(u).map(([i,r])=>({key:i,value:typeof r=="object"?JSON.stringify(r):r}))}function $b({rover:u,frame:i,videoInfo:r}){const c=Jb(i?.sensors);return p.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[p.jsxs("header",{className:"flex flex-col gap-1",children:[p.jsx("h3",{className:"text-2xl font-semibold text-white",children:u.name}),p.jsx("p",{className:"text-sm text-slate-400",children:i?.receivedAt?`Updated ${new Date(i.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),p.jsx(ap,{sessionInfo:r,label:u.name,forceMute:!0}),p.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[p.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),c.length===0?p.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):p.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:c.map(({key:f,value:h})=>p.jsxs("div",{className:"flex justify-between gap-4",children:[p.jsx("dt",{className:"text-slate-500",children:f}),p.jsx("dd",{className:"text-right font-semibold text-white",children:h})]},f))})]})]})}function Wb(){const{connected:u,session:i,logs:r}=vt(),c=Qb(),f=lp(),h=i?.roster??[],m=rp(h.map(y=>y.id)),g=E.useMemo(()=>({connected:u,ready:c,rosterCount:h.length}),[u,c,h.length]);return p.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:p.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[p.jsxs("header",{className:"space-y-3",children:[p.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),p.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),p.jsx(Zb,{...g})]}),p.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:h.length===0?p.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):h.map(y=>p.jsx($b,{rover:y,frame:f[y.id],videoInfo:m[y.id]},y.id))}),p.jsx(Kb,{logs:r})]})})}ky.createRoot(document.getElementById("root")).render(p.jsx(E.StrictMode,{children:p.jsx(ib,{children:p.jsx(sb,{children:p.jsx(rb,{children:p.jsx(ng,{children:p.jsxs(jv,{children:[p.jsx(mc,{path:"/",element:p.jsx(Vb,{})}),p.jsx(mc,{path:"/spectate",element:p.jsx(Wb,{})})]})})})})})}));
|