(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))s(v);new MutationObserver(v=>{for(const A of v)if(A.type==="childList")for(const w of A.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&s(w)}).observe(document,{childList:!0,subtree:!0});function c(v){const A={};return v.integrity&&(A.integrity=v.integrity),v.referrerPolicy&&(A.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?A.credentials="include":v.crossOrigin==="anonymous"?A.credentials="omit":A.credentials="same-origin",A}function s(v){if(v.ep)return;v.ep=!0;const A=c(v);fetch(v.href,A)}})();var Bs={exports:{}},Pa={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Xh;function Om(){if(Xh)return Pa;Xh=1;var f=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(s,v,A){var w=null;if(A!==void 0&&(w=""+A),v.key!==void 0&&(w=""+v.key),"key"in v){A={};for(var V in v)V!=="key"&&(A[V]=v[V])}else A=v;return v=A.ref,{$$typeof:f,type:s,key:w,ref:v!==void 0?v:null,props:A}}return Pa.Fragment=i,Pa.jsx=c,Pa.jsxs=c,Pa}var Gh;function zm(){return Gh||(Gh=1,Bs.exports=Om()),Bs.exports}var Q=zm(),ws={exports:{}},st={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Qh;function Nm(){if(Qh)return st;Qh=1;var f=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),w=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),R=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),K=Symbol.iterator;function J(y){return y===null||typeof y!="object"?null:(y=K&&y[K]||y["@@iterator"],typeof y=="function"?y:null)}var pt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qt=Object.assign,Ct={};function Ht(y,N,H){this.props=y,this.context=N,this.refs=Ct,this.updater=H||pt}Ht.prototype.isReactComponent={},Ht.prototype.setState=function(y,N){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,N,"setState")},Ht.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function Bt(){}Bt.prototype=Ht.prototype;function he(y,N,H){this.props=y,this.context=N,this.refs=Ct,this.updater=H||pt}var it=he.prototype=new Bt;it.constructor=he,qt(it,Ht.prototype),it.isPureReactComponent=!0;var le=Array.isArray,ut={H:null,A:null,T:null,S:null,V:null},Wt=Object.prototype.hasOwnProperty;function bt(y,N,H,B,Z,I){return H=I.ref,{$$typeof:f,type:y,key:N,ref:H!==void 0?H:null,props:I}}function C(y,N){return bt(y.type,N,void 0,void 0,void 0,y.props)}function at(y){return typeof y=="object"&&y!==null&&y.$$typeof===f}function ht(y){var N={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(H){return N[H]})}var rt=/\/+/g;function At(y,N){return typeof y=="object"&&y!==null&&y.key!=null?ht(""+y.key):N.toString(36)}function Vt(){}function Oe(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(Vt,Vt):(y.status="pending",y.then(function(N){y.status==="pending"&&(y.status="fulfilled",y.value=N)},function(N){y.status==="pending"&&(y.status="rejected",y.reason=N)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function Gt(y,N,H,B,Z){var I=typeof y;(I==="undefined"||I==="boolean")&&(y=null);var nt=!1;if(y===null)nt=!0;else switch(I){case"bigint":case"string":case"number":nt=!0;break;case"object":switch(y.$$typeof){case f:case i:nt=!0;break;case Y:return nt=y._init,Gt(nt(y._payload),N,H,B,Z)}}if(nt)return Z=Z(y),nt=B===""?"."+At(y,0):B,le(Z)?(H="",nt!=null&&(H=nt.replace(rt,"$&/")+"/"),Gt(Z,N,H,"",function(de){return de})):Z!=null&&(at(Z)&&(Z=C(Z,H+(Z.key==null||y&&y.key===Z.key?"":(""+Z.key).replace(rt,"$&/")+"/")+nt)),N.push(Z)),1;nt=0;var Et=B===""?".":B+":";if(le(y))for(var dt=0;dt<y.length;dt++)B=y[dt],I=Et+At(B,dt),nt+=Gt(B,N,H,I,Z);else if(dt=J(y),typeof dt=="function")for(y=dt.call(y),dt=0;!(B=y.next()).done;)B=B.value,I=Et+At(B,dt++),nt+=Gt(B,N,H,I,Z);else if(I==="object"){if(typeof y.then=="function")return Gt(Oe(y),N,H,B,Z);throw N=String(y),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return nt}function T(y,N,H){if(y==null)return y;var B=[],Z=0;return Gt(y,B,"","",function(I){return N.call(H,I,Z++)}),B}function j(y){if(y._status===-1){var N=y._result;N=N(),N.then(function(H){(y._status===0||y._status===-1)&&(y._status=1,y._result=H)},function(H){(y._status===0||y._status===-1)&&(y._status=2,y._result=H)}),y._status===-1&&(y._status=0,y._result=N)}if(y._status===1)return y._result.default;throw y._result}var k=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)};function ft(){}return st.Children={map:T,forEach:function(y,N,H){T(y,function(){N.apply(this,arguments)},H)},count:function(y){var N=0;return T(y,function(){N++}),N},toArray:function(y){return T(y,function(N){return N})||[]},only:function(y){if(!at(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},st.Component=Ht,st.Fragment=c,st.Profiler=v,st.PureComponent=he,st.StrictMode=s,st.Suspense=U,st.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ut,st.__COMPILER_RUNTIME={__proto__:null,c:function(y){return ut.H.useMemoCache(y)}},st.cache=function(y){return function(){return y.apply(null,arguments)}},st.cloneElement=function(y,N,H){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var B=qt({},y.props),Z=y.key,I=void 0;if(N!=null)for(nt in N.ref!==void 0&&(I=void 0),N.key!==void 0&&(Z=""+N.key),N)!Wt.call(N,nt)||nt==="key"||nt==="__self"||nt==="__source"||nt==="ref"&&N.ref===void 0||(B[nt]=N[nt]);var nt=arguments.length-2;if(nt===1)B.children=H;else if(1<nt){for(var Et=Array(nt),dt=0;dt<nt;dt++)Et[dt]=arguments[dt+2];B.children=Et}return bt(y.type,Z,void 0,void 0,I,B)},st.createContext=function(y){return y={$$typeof:w,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:A,_context:y},y},st.createElement=function(y,N,H){var B,Z={},I=null;if(N!=null)for(B in N.key!==void 0&&(I=""+N.key),N)Wt.call(N,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(Z[B]=N[B]);var nt=arguments.length-2;if(nt===1)Z.children=H;else if(1<nt){for(var Et=Array(nt),dt=0;dt<nt;dt++)Et[dt]=arguments[dt+2];Z.children=Et}if(y&&y.defaultProps)for(B in nt=y.defaultProps,nt)Z[B]===void 0&&(Z[B]=nt[B]);return bt(y,I,void 0,void 0,null,Z)},st.createRef=function(){return{current:null}},st.forwardRef=function(y){return{$$typeof:V,render:y}},st.isValidElement=at,st.lazy=function(y){return{$$typeof:Y,_payload:{_status:-1,_result:y},_init:j}},st.memo=function(y,N){return{$$typeof:R,type:y,compare:N===void 0?null:N}},st.startTransition=function(y){var N=ut.T,H={};ut.T=H;try{var B=y(),Z=ut.S;Z!==null&&Z(H,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(ft,k)}catch(I){k(I)}finally{ut.T=N}},st.unstable_useCacheRefresh=function(){return ut.H.useCacheRefresh()},st.use=function(y){return ut.H.use(y)},st.useActionState=function(y,N,H){return ut.H.useActionState(y,N,H)},st.useCallback=function(y,N){return ut.H.useCallback(y,N)},st.useContext=function(y){return ut.H.useContext(y)},st.useDebugValue=function(){},st.useDeferredValue=function(y,N){return ut.H.useDeferredValue(y,N)},st.useEffect=function(y,N,H){var B=ut.H;if(typeof H=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return B.useEffect(y,N)},st.useId=function(){return ut.H.useId()},st.useImperativeHandle=function(y,N,H){return ut.H.useImperativeHandle(y,N,H)},st.useInsertionEffect=function(y,N){return ut.H.useInsertionEffect(y,N)},st.useLayoutEffect=function(y,N){return ut.H.useLayoutEffect(y,N)},st.useMemo=function(y,N){return ut.H.useMemo(y,N)},st.useOptimistic=function(y,N){return ut.H.useOptimistic(y,N)},st.useReducer=function(y,N,H){return ut.H.useReducer(y,N,H)},st.useRef=function(y){return ut.H.useRef(y)},st.useState=function(y){return ut.H.useState(y)},st.useSyncExternalStore=function(y,N,H){return ut.H.useSyncExternalStore(y,N,H)},st.useTransition=function(){return ut.H.useTransition()},st.version="19.1.1",st}var $h;function Js(){return $h||($h=1,ws.exports=Nm()),ws.exports}var lt=Js(),qs={exports:{}},Ia={},Hs={exports:{}},js={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Vh;function xm(){return Vh||(Vh=1,function(f){function i(T,j){var k=T.length;T.push(j);t:for(;0<k;){var ft=k-1>>>1,y=T[ft];if(0<v(y,j))T[ft]=j,T[k]=y,k=ft;else break t}}function c(T){return T.length===0?null:T[0]}function s(T){if(T.length===0)return null;var j=T[0],k=T.pop();if(k!==j){T[0]=k;t:for(var ft=0,y=T.length,N=y>>>1;ft<N;){var H=2*(ft+1)-1,B=T[H],Z=H+1,I=T[Z];if(0>v(B,k))Z<y&&0>v(I,B)?(T[ft]=I,T[Z]=k,ft=Z):(T[ft]=B,T[H]=k,ft=H);else if(Z<y&&0>v(I,k))T[ft]=I,T[Z]=k,ft=Z;else break t}}return j}function v(T,j){var k=T.sortIndex-j.sortIndex;return k!==0?k:T.id-j.id}if(f.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var A=performance;f.unstable_now=function(){return A.now()}}else{var w=Date,V=w.now();f.unstable_now=function(){return w.now()-V}}var U=[],R=[],Y=1,K=null,J=3,pt=!1,qt=!1,Ct=!1,Ht=!1,Bt=typeof setTimeout=="function"?setTimeout:null,he=typeof clearTimeout=="function"?clearTimeout:null,it=typeof setImmediate<"u"?setImmediate:null;function le(T){for(var j=c(R);j!==null;){if(j.callback===null)s(R);else if(j.startTime<=T)s(R),j.sortIndex=j.expirationTime,i(U,j);else break;j=c(R)}}function ut(T){if(Ct=!1,le(T),!qt)if(c(U)!==null)qt=!0,Wt||(Wt=!0,At());else{var j=c(R);j!==null&&Gt(ut,j.startTime-T)}}var Wt=!1,bt=-1,C=5,at=-1;function ht(){return Ht?!0:!(f.unstable_now()-at<C)}function rt(){if(Ht=!1,Wt){var T=f.unstable_now();at=T;var j=!0;try{t:{qt=!1,Ct&&(Ct=!1,he(bt),bt=-1),pt=!0;var k=J;try{e:{for(le(T),K=c(U);K!==null&&!(K.expirationTime>T&&ht());){var ft=K.callback;if(typeof ft=="function"){K.callback=null,J=K.priorityLevel;var y=ft(K.expirationTime<=T);if(T=f.unstable_now(),typeof y=="function"){K.callback=y,le(T),j=!0;break e}K===c(U)&&s(U),le(T)}else s(U);K=c(U)}if(K!==null)j=!0;else{var N=c(R);N!==null&&Gt(ut,N.startTime-T),j=!1}}break t}finally{K=null,J=k,pt=!1}j=void 0}}finally{j?At():Wt=!1}}}var At;if(typeof it=="function")At=function(){it(rt)};else if(typeof MessageChannel<"u"){var Vt=new MessageChannel,Oe=Vt.port2;Vt.port1.onmessage=rt,At=function(){Oe.postMessage(null)}}else At=function(){Bt(rt,0)};function Gt(T,j){bt=Bt(function(){T(f.unstable_now())},j)}f.unstable_IdlePriority=5,f.unstable_ImmediatePriority=1,f.unstable_LowPriority=4,f.unstable_NormalPriority=3,f.unstable_Profiling=null,f.unstable_UserBlockingPriority=2,f.unstable_cancelCallback=function(T){T.callback=null},f.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<T?Math.floor(1e3/T):5},f.unstable_getCurrentPriorityLevel=function(){return J},f.unstable_next=function(T){switch(J){case 1:case 2:case 3:var j=3;break;default:j=J}var k=J;J=j;try{return T()}finally{J=k}},f.unstable_requestPaint=function(){Ht=!0},f.unstable_runWithPriority=function(T,j){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var k=J;J=T;try{return j()}finally{J=k}},f.unstable_scheduleCallback=function(T,j,k){var ft=f.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?ft+k:ft):k=ft,T){case 1:var y=-1;break;case 2:y=250;break;case 5:y=1073741823;break;case 4:y=1e4;break;default:y=5e3}return y=k+y,T={id:Y++,callback:j,priorityLevel:T,startTime:k,expirationTime:y,sortIndex:-1},k>ft?(T.sortIndex=k,i(R,T),c(U)===null&&T===c(R)&&(Ct?(he(bt),bt=-1):Ct=!0,Gt(ut,k-ft))):(T.sortIndex=y,i(U,T),qt||pt||(qt=!0,Wt||(Wt=!0,At()))),T},f.unstable_shouldYield=ht,f.unstable_wrapCallback=function(T){var j=J;return function(){var k=J;J=j;try{return T.apply(this,arguments)}finally{J=k}}}}(js)),js}var Zh;function Dm(){return Zh||(Zh=1,Hs.exports=xm()),Hs.exports}var Ls={exports:{}},fe={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var kh;function Um(){if(kh)return fe;kh=1;var f=Js();function i(U){var R="https://react.dev/errors/"+U;if(1<arguments.length){R+="?args[]="+encodeURIComponent(arguments[1]);for(var Y=2;Y<arguments.length;Y++)R+="&args[]="+encodeURIComponent(arguments[Y])}return"Minified React error #"+U+"; visit "+R+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var s={d:{f:c,r:function(){throw Error(i(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},v=Symbol.for("react.portal");function A(U,R,Y){var K=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:v,key:K==null?null:""+K,children:U,containerInfo:R,implementation:Y}}var w=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function V(U,R){if(U==="font")return"";if(typeof R=="string")return R==="use-credentials"?R:""}return fe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,fe.createPortal=function(U,R){var Y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!R||R.nodeType!==1&&R.nodeType!==9&&R.nodeType!==11)throw Error(i(299));return A(U,R,null,Y)},fe.flushSync=function(U){var R=w.T,Y=s.p;try{if(w.T=null,s.p=2,U)return U()}finally{w.T=R,s.p=Y,s.d.f()}},fe.preconnect=function(U,R){typeof U=="string"&&(R?(R=R.crossOrigin,R=typeof R=="string"?R==="use-credentials"?R:"":void 0):R=null,s.d.C(U,R))},fe.prefetchDNS=function(U){typeof U=="string"&&s.d.D(U)},fe.preinit=function(U,R){if(typeof U=="string"&&R&&typeof R.as=="string"){var Y=R.as,K=V(Y,R.crossOrigin),J=typeof R.integrity=="string"?R.integrity:void 0,pt=typeof R.fetchPriority=="string"?R.fetchPriority:void 0;Y==="style"?s.d.S(U,typeof R.precedence=="string"?R.precedence:void 0,{crossOrigin:K,integrity:J,fetchPriority:pt}):Y==="script"&&s.d.X(U,{crossOrigin:K,integrity:J,fetchPriority:pt,nonce:typeof R.nonce=="string"?R.nonce:void 0})}},fe.preinitModule=function(U,R){if(typeof U=="string")if(typeof R=="object"&&R!==null){if(R.as==null||R.as==="script"){var Y=V(R.as,R.crossOrigin);s.d.M(U,{crossOrigin:Y,integrity:typeof R.integrity=="string"?R.integrity:void 0,nonce:typeof R.nonce=="string"?R.nonce:void 0})}}else R==null&&s.d.M(U)},fe.preload=function(U,R){if(typeof U=="string"&&typeof R=="object"&&R!==null&&typeof R.as=="string"){var Y=R.as,K=V(Y,R.crossOrigin);s.d.L(U,Y,{crossOrigin:K,integrity:typeof R.integrity=="string"?R.integrity:void 0,nonce:typeof R.nonce=="string"?R.nonce:void 0,type:typeof R.type=="string"?R.type:void 0,fetchPriority:typeof R.fetchPriority=="string"?R.fetchPriority:void 0,referrerPolicy:typeof R.referrerPolicy=="string"?R.referrerPolicy:void 0,imageSrcSet:typeof R.imageSrcSet=="string"?R.imageSrcSet:void 0,imageSizes:typeof R.imageSizes=="string"?R.imageSizes:void 0,media:typeof R.media=="string"?R.media:void 0})}},fe.preloadModule=function(U,R){if(typeof U=="string")if(R){var Y=V(R.as,R.crossOrigin);s.d.m(U,{as:typeof R.as=="string"&&R.as!=="script"?R.as:void 0,crossOrigin:Y,integrity:typeof R.integrity=="string"?R.integrity:void 0})}else s.d.m(U)},fe.requestFormReset=function(U){s.d.r(U)},fe.unstable_batchedUpdates=function(U,R){return U(R)},fe.useFormState=function(U,R,Y){return w.H.useFormState(U,R,Y)},fe.useFormStatus=function(){return w.H.useHostTransitionStatus()},fe.version="19.1.1",fe}var Kh;function Mm(){if(Kh)return Ls.exports;Kh=1;function f(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(i){console.error(i)}}return f(),Ls.exports=Um(),Ls.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Jh;function Cm(){if(Jh)return Ia;Jh=1;var f=Dm(),i=Js(),c=Mm();function s(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function v(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function A(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function w(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function V(t){if(A(t)!==t)throw Error(s(188))}function U(t){var e=t.alternate;if(!e){if(e=A(t),e===null)throw Error(s(188));return e!==t?null:t}for(var n=t,l=e;;){var a=n.return;if(a===null)break;var u=a.alternate;if(u===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===u.child){for(u=a.child;u;){if(u===n)return V(a),t;if(u===l)return V(a),e;u=u.sibling}throw Error(s(188))}if(n.return!==l.return)n=a,l=u;else{for(var r=!1,o=a.child;o;){if(o===n){r=!0,n=a,l=u;break}if(o===l){r=!0,l=a,n=u;break}o=o.sibling}if(!r){for(o=u.child;o;){if(o===n){r=!0,n=u,l=a;break}if(o===l){r=!0,l=u,n=a;break}o=o.sibling}if(!r)throw Error(s(189))}}if(n.alternate!==l)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?t:e}function R(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=R(t),e!==null)return e;t=t.sibling}return null}var Y=Object.assign,K=Symbol.for("react.element"),J=Symbol.for("react.transitional.element"),pt=Symbol.for("react.portal"),qt=Symbol.for("react.fragment"),Ct=Symbol.for("react.strict_mode"),Ht=Symbol.for("react.profiler"),Bt=Symbol.for("react.provider"),he=Symbol.for("react.consumer"),it=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ut=Symbol.for("react.suspense"),Wt=Symbol.for("react.suspense_list"),bt=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),at=Symbol.for("react.activity"),ht=Symbol.for("react.memo_cache_sentinel"),rt=Symbol.iterator;function At(t){return t===null||typeof t!="object"?null:(t=rt&&t[rt]||t["@@iterator"],typeof t=="function"?t:null)}var Vt=Symbol.for("react.client.reference");function Oe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Vt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case qt:return"Fragment";case Ht:return"Profiler";case Ct:return"StrictMode";case ut:return"Suspense";case Wt:return"SuspenseList";case at:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case pt:return"Portal";case it:return(t.displayName||"Context")+".Provider";case he:return(t._context.displayName||"Context")+".Consumer";case le:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case bt:return e=t.displayName||null,e!==null?e:Oe(t.type)||"Memo";case C:e=t._payload,t=t._init;try{return Oe(t(e))}catch{}}return null}var Gt=Array.isArray,T=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k={pending:!1,data:null,method:null,action:null},ft=[],y=-1;function N(t){return{current:t}}function H(t){0>y||(t.current=ft[y],ft[y]=null,y--)}function B(t,e){y++,ft[y]=t.current,t.current=e}var Z=N(null),I=N(null),nt=N(null),Et=N(null);function dt(t,e){switch(B(nt,e),B(I,t),B(Z,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?mh(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=mh(e),t=gh(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}H(Z),B(Z,t)}function de(){H(Z),H(I),H(nt)}function cl(t){t.memoizedState!==null&&B(Et,t);var e=Z.current,n=gh(e,t.type);e!==n&&(B(I,t),B(Z,n))}function Xn(t){I.current===t&&(H(Z),H(I)),Et.current===t&&(H(Et),ka._currentValue=k)}var Gn=Object.prototype.hasOwnProperty,Il=f.unstable_scheduleCallback,sl=f.unstable_cancelCallback,Ei=f.unstable_shouldYield,rl=f.unstable_requestPaint,ze=f.unstable_now,yn=f.unstable_getCurrentPriorityLevel,fl=f.unstable_ImmediatePriority,mn=f.unstable_UserBlockingPriority,ol=f.unstable_NormalPriority,Ti=f.unstable_LowPriority,nu=f.unstable_IdlePriority,Ai=f.log,ta=f.unstable_setDisableYieldValue,gn=null,ce=null;function Le(t){if(typeof Ai=="function"&&ta(t),ce&&typeof ce.setStrictMode=="function")try{ce.setStrictMode(gn,t)}catch{}}var h=Math.clz32?Math.clz32:g,O=Math.log,q=Math.LN2;function g(t){return t>>>=0,t===0?32:31-(O(t)/q|0)|0}var D=256,tt=4194304;function L(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function X(t,e,n){var l=t.pendingLanes;if(l===0)return 0;var a=0,u=t.suspendedLanes,r=t.pingedLanes;t=t.warmLanes;var o=l&134217727;return o!==0?(l=o&~u,l!==0?a=L(l):(r&=o,r!==0?a=L(r):n||(n=o&~t,n!==0&&(a=L(n))))):(o=l&~u,o!==0?a=L(o):r!==0?a=L(r):n||(n=l&~t,n!==0&&(a=L(n)))),a===0?0:e!==0&&e!==a&&(e&u)===0&&(u=a&-a,n=e&-e,u>=n||u===32&&(n&4194048)!==0)?e:a}function St(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function ct(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Zt(){var t=D;return D<<=1,(D&4194048)===0&&(D=256),t}function Tt(){var t=tt;return tt<<=1,(tt&62914560)===0&&(tt=4194304),t}function Ye(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Ne(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function lu(t,e,n,l,a,u){var r=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var o=t.entanglements,d=t.expirationTimes,S=t.hiddenUpdates;for(n=r&~n;0<n;){var z=31-h(n),M=1<<z;o[z]=0,d[z]=-1;var _=S[z];if(_!==null)for(S[z]=null,z=0;z<_.length;z++){var E=_[z];E!==null&&(E.lane&=-536870913)}n&=~M}l!==0&&Qn(t,l,0),u!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=u&~(r&~e))}function Qn(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var l=31-h(e);t.entangledLanes|=e,t.entanglements[l]=t.entanglements[l]|1073741824|n&4194090}function ea(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var l=31-h(n),a=1<<l;a&e|t[l]&e&&(t[l]|=e),n&=~a}}function na(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function la(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function hl(){var t=j.p;return t!==0?t:(t=window.event,t===void 0?32:wh(t.type))}function Ri(t,e){var n=j.p;try{return j.p=t,e()}finally{j.p=n}}var vn=Math.random().toString(36).slice(2),se="__reactFiber$"+vn,ye="__reactProps$"+vn,dl="__reactContainer$"+vn,Oi="__reactEvents$"+vn,gd="__reactListeners$"+vn,vd="__reactHandles$"+vn,er="__reactResources$"+vn,aa="__reactMarker$"+vn;function zi(t){delete t[se],delete t[ye],delete t[Oi],delete t[gd],delete t[vd]}function yl(t){var e=t[se];if(e)return e;for(var n=t.parentNode;n;){if(e=n[dl]||n[se]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Sh(t);t!==null;){if(n=t[se])return n;t=Sh(t)}return e}t=n,n=t.parentNode}return null}function ml(t){if(t=t[se]||t[dl]){var e=t.tag;if(e===5||e===6||e===13||e===26||e===27||e===3)return t}return null}function ua(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(s(33))}function gl(t){var e=t[er];return e||(e=t[er]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function It(t){t[aa]=!0}var nr=new Set,lr={};function $n(t,e){vl(t,e),vl(t+"Capture",e)}function vl(t,e){for(lr[t]=e,t=0;t<e.length;t++)nr.add(e[t])}var pd=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]*$"),ar={},ur={};function bd(t){return Gn.call(ur,t)?!0:Gn.call(ar,t)?!1:pd.test(t)?ur[t]=!0:(ar[t]=!0,!1)}function au(t,e,n){if(bd(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function uu(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Pe(t,e,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+l)}}var Ni,ir;function pl(t){if(Ni===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Ni=e&&e[1]||"",ir=-1<n.stack.indexOf(`
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ni+t+ir}var xi=!1;function Di(t,e){if(!t||xi)return"";xi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(e){var M=function(){throw Error()};if(Object.defineProperty(M.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(M,[])}catch(E){var _=E}Reflect.construct(t,[],M)}else{try{M.call()}catch(E){_=E}t.call(M.prototype)}}else{try{throw Error()}catch(E){_=E}(M=t())&&typeof M.catch=="function"&&M.catch(function(){})}}catch(E){if(E&&_&&typeof E.stack=="string")return[E.stack,_.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 u=l.DetermineComponentFrameRoot(),r=u[0],o=u[1];if(r&&o){var d=r.split(`
`),S=o.split(`
`);for(a=l=0;l<d.length&&!d[l].includes("DetermineComponentFrameRoot");)l++;for(;a<S.length&&!S[a].includes("DetermineComponentFrameRoot");)a++;if(l===d.length||a===S.length)for(l=d.length-1,a=S.length-1;1<=l&&0<=a&&d[l]!==S[a];)a--;for(;1<=l&&0<=a;l--,a--)if(d[l]!==S[a]){if(l!==1||a!==1)do if(l--,a--,0>a||d[l]!==S[a]){var z=`
`+d[l].replace(" at new "," at ");return t.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",t.displayName)),z}while(1<=l&&0<=a);break}}}finally{xi=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?pl(n):""}function Sd(t){switch(t.tag){case 26:case 27:case 5:return pl(t.type);case 16:return pl("Lazy");case 13:return pl("Suspense");case 19:return pl("SuspenseList");case 0:case 15:return Di(t.type,!1);case 11:return Di(t.type.render,!1);case 1:return Di(t.type,!0);case 31:return pl("Activity");default:return""}}function cr(t){try{var e="";do e+=Sd(t),t=t.return;while(t);return e}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}function xe(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function sr(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function _d(t){var e=sr(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),l=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,u=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(r){l=""+r,u.call(this,r)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(r){l=""+r},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function iu(t){t._valueTracker||(t._valueTracker=_d(t))}function rr(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),l="";return t&&(l=sr(t)?t.checked?"true":"false":t.value),t=l,t!==n?(e.setValue(t),!0):!1}function cu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ed=/[\n"\\]/g;function De(t){return t.replace(Ed,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Ui(t,e,n,l,a,u,r,o){t.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?t.type=r:t.removeAttribute("type"),e!=null?r==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+xe(e)):t.value!==""+xe(e)&&(t.value=""+xe(e)):r!=="submit"&&r!=="reset"||t.removeAttribute("value"),e!=null?Mi(t,r,xe(e)):n!=null?Mi(t,r,xe(n)):l!=null&&t.removeAttribute("value"),a==null&&u!=null&&(t.defaultChecked=!!u),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.name=""+xe(o):t.removeAttribute("name")}function fr(t,e,n,l,a,u,r,o){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||e!=null))return;n=n!=null?""+xe(n):"",e=e!=null?""+xe(e):n,o||e===t.value||(t.value=e),t.defaultValue=e}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=o?t.checked:!!l,t.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.name=r)}function Mi(t,e,n){e==="number"&&cu(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function bl(t,e,n,l){if(t=t.options,e){e={};for(var a=0;a<n.length;a++)e["$"+n[a]]=!0;for(n=0;n<t.length;n++)a=e.hasOwnProperty("$"+t[n].value),t[n].selected!==a&&(t[n].selected=a),a&&l&&(t[n].defaultSelected=!0)}else{for(n=""+xe(n),e=null,a=0;a<t.length;a++){if(t[a].value===n){t[a].selected=!0,l&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function or(t,e,n){if(e!=null&&(e=""+xe(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+xe(n):""}function hr(t,e,n,l){if(e==null){if(l!=null){if(n!=null)throw Error(s(92));if(Gt(l)){if(1<l.length)throw Error(s(93));l=l[0]}n=l}n==null&&(n=""),e=n}n=xe(e),t.defaultValue=n,l=t.textContent,l===n&&l!==""&&l!==null&&(t.value=l)}function Sl(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Td=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 dr(t,e,n){var l=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":l?t.setProperty(e,n):typeof n!="number"||n===0||Td.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function yr(t,e,n){if(e!=null&&typeof e!="object")throw Error(s(62));if(t=t.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||e!=null&&e.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var a in e)l=e[a],e.hasOwnProperty(a)&&n[a]!==l&&dr(t,a,l)}else for(var u in e)e.hasOwnProperty(u)&&dr(t,u,e[u])}function Ci(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Ad=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"]]),Rd=/^[\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 su(t){return Rd.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Bi=null;function wi(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _l=null,El=null;function mr(t){var e=ml(t);if(e&&(t=e.stateNode)){var n=t[ye]||null;t:switch(t=e.stateNode,e.type){case"input":if(Ui(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+De(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var l=n[e];if(l!==t&&l.form===t.form){var a=l[ye]||null;if(!a)throw Error(s(90));Ui(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<n.length;e++)l=n[e],l.form===t.form&&rr(l)}break t;case"textarea":or(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&bl(t,!!n.multiple,e,!1)}}}var qi=!1;function gr(t,e,n){if(qi)return t(e,n);qi=!0;try{var l=t(e);return l}finally{if(qi=!1,(_l!==null||El!==null)&&(ku(),_l&&(e=_l,t=El,El=_l=null,mr(e),t)))for(e=0;e<t.length;e++)mr(t[e])}}function ia(t,e){var n=t.stateNode;if(n===null)return null;var l=n[ye]||null;if(l===null)return null;n=l[e];t:switch(e){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)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(s(231,e,typeof n));return n}var Ie=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(Ie)try{var ca={};Object.defineProperty(ca,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",ca,ca),window.removeEventListener("test",ca,ca)}catch{Hi=!1}var pn=null,ji=null,ru=null;function vr(){if(ru)return ru;var t,e=ji,n=e.length,l,a="value"in pn?pn.value:pn.textContent,u=a.length;for(t=0;t<n&&e[t]===a[t];t++);var r=n-t;for(l=1;l<=r&&e[n-l]===a[u-l];l++);return ru=a.slice(t,1<l?1-l:void 0)}function fu(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function ou(){return!0}function pr(){return!1}function me(t){function e(n,l,a,u,r){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=u,this.target=r,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(n=t[o],this[o]=n?n(u):u[o]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ou:pr,this.isPropagationStopped=pr,this}return Y(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ou)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ou)},persist:function(){},isPersistent:ou}),e}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hu=me(Vn),sa=Y({},Vn,{view:0,detail:0}),Od=me(sa),Li,Yi,ra,du=Y({},sa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gi,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ra&&(ra&&t.type==="mousemove"?(Li=t.screenX-ra.screenX,Yi=t.screenY-ra.screenY):Yi=Li=0,ra=t),Li)},movementY:function(t){return"movementY"in t?t.movementY:Yi}}),br=me(du),zd=Y({},du,{dataTransfer:0}),Nd=me(zd),xd=Y({},sa,{relatedTarget:0}),Xi=me(xd),Dd=Y({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0}),Ud=me(Dd),Md=Y({},Vn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Cd=me(Md),Bd=Y({},Vn,{data:0}),Sr=me(Bd),wd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qd={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"},Hd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jd(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Hd[t])?!!e[t]:!1}function Gi(){return jd}var Ld=Y({},sa,{key:function(t){if(t.key){var e=wd[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=fu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qd[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gi,charCode:function(t){return t.type==="keypress"?fu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?fu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Yd=me(Ld),Xd=Y({},du,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_r=me(Xd),Gd=Y({},sa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gi}),Qd=me(Gd),$d=Y({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vd=me($d),Zd=Y({},du,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),kd=me(Zd),Kd=Y({},Vn,{newState:0,oldState:0}),Jd=me(Kd),Wd=[9,13,27,32],Qi=Ie&&"CompositionEvent"in window,fa=null;Ie&&"documentMode"in document&&(fa=document.documentMode);var Fd=Ie&&"TextEvent"in window&&!fa,Er=Ie&&(!Qi||fa&&8<fa&&11>=fa),Tr=" ",Ar=!1;function Rr(t,e){switch(t){case"keyup":return Wd.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Or(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Tl=!1;function Pd(t,e){switch(t){case"compositionend":return Or(e);case"keypress":return e.which!==32?null:(Ar=!0,Tr);case"textInput":return t=e.data,t===Tr&&Ar?null:t;default:return null}}function Id(t,e){if(Tl)return t==="compositionend"||!Qi&&Rr(t,e)?(t=vr(),ru=ji=pn=null,Tl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Er&&e.locale!=="ko"?null:e.data;default:return null}}var ty={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 zr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!ty[t.type]:e==="textarea"}function Nr(t,e,n,l){_l?El?El.push(l):El=[l]:_l=l,e=Iu(e,"onChange"),0<e.length&&(n=new hu("onChange","change",null,n,l),t.push({event:n,listeners:e}))}var oa=null,ha=null;function ey(t){fh(t,0)}function yu(t){var e=ua(t);if(rr(e))return t}function xr(t,e){if(t==="change")return e}var Dr=!1;if(Ie){var $i;if(Ie){var Vi="oninput"in document;if(!Vi){var Ur=document.createElement("div");Ur.setAttribute("oninput","return;"),Vi=typeof Ur.oninput=="function"}$i=Vi}else $i=!1;Dr=$i&&(!document.documentMode||9<document.documentMode)}function Mr(){oa&&(oa.detachEvent("onpropertychange",Cr),ha=oa=null)}function Cr(t){if(t.propertyName==="value"&&yu(ha)){var e=[];Nr(e,ha,t,wi(t)),gr(ey,e)}}function ny(t,e,n){t==="focusin"?(Mr(),oa=e,ha=n,oa.attachEvent("onpropertychange",Cr)):t==="focusout"&&Mr()}function ly(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return yu(ha)}function ay(t,e){if(t==="click")return yu(e)}function uy(t,e){if(t==="input"||t==="change")return yu(e)}function iy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var be=typeof Object.is=="function"?Object.is:iy;function da(t,e){if(be(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),l=Object.keys(e);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Gn.call(e,a)||!be(t[a],e[a]))return!1}return!0}function Br(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function wr(t,e){var n=Br(t);t=0;for(var l;n;){if(n.nodeType===3){if(l=t+n.textContent.length,t<=e&&l>=e)return{node:n,offset:e-t};t=l}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=Br(n)}}function qr(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?qr(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Hr(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=cu(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=cu(t.document)}return e}function Zi(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var cy=Ie&&"documentMode"in document&&11>=document.documentMode,Al=null,ki=null,ya=null,Ki=!1;function jr(t,e,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ki||Al==null||Al!==cu(l)||(l=Al,"selectionStart"in l&&Zi(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}),ya&&da(ya,l)||(ya=l,l=Iu(ki,"onSelect"),0<l.length&&(e=new hu("onSelect","select",null,e,n),t.push({event:e,listeners:l}),e.target=Al)))}function Zn(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Rl={animationend:Zn("Animation","AnimationEnd"),animationiteration:Zn("Animation","AnimationIteration"),animationstart:Zn("Animation","AnimationStart"),transitionrun:Zn("Transition","TransitionRun"),transitionstart:Zn("Transition","TransitionStart"),transitioncancel:Zn("Transition","TransitionCancel"),transitionend:Zn("Transition","TransitionEnd")},Ji={},Lr={};Ie&&(Lr=document.createElement("div").style,"AnimationEvent"in window||(delete Rl.animationend.animation,delete Rl.animationiteration.animation,delete Rl.animationstart.animation),"TransitionEvent"in window||delete Rl.transitionend.transition);function kn(t){if(Ji[t])return Ji[t];if(!Rl[t])return t;var e=Rl[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Lr)return Ji[t]=e[n];return t}var Yr=kn("animationend"),Xr=kn("animationiteration"),Gr=kn("animationstart"),sy=kn("transitionrun"),ry=kn("transitionstart"),fy=kn("transitioncancel"),Qr=kn("transitionend"),$r=new Map,Wi="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(" ");Wi.push("scrollEnd");function Xe(t,e){$r.set(t,e),$n(e,[t])}var Vr=new WeakMap;function Ue(t,e){if(typeof t=="object"&&t!==null){var n=Vr.get(t);return n!==void 0?n:(e={value:t,source:e,stack:cr(e)},Vr.set(t,e),e)}return{value:t,source:e,stack:cr(e)}}var Me=[],Ol=0,Fi=0;function mu(){for(var t=Ol,e=Fi=Ol=0;e<t;){var n=Me[e];Me[e++]=null;var l=Me[e];Me[e++]=null;var a=Me[e];Me[e++]=null;var u=Me[e];if(Me[e++]=null,l!==null&&a!==null){var r=l.pending;r===null?a.next=a:(a.next=r.next,r.next=a),l.pending=a}u!==0&&Zr(n,a,u)}}function gu(t,e,n,l){Me[Ol++]=t,Me[Ol++]=e,Me[Ol++]=n,Me[Ol++]=l,Fi|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function Pi(t,e,n,l){return gu(t,e,n,l),vu(t)}function zl(t,e){return gu(t,null,null,e),vu(t)}function Zr(t,e,n){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n);for(var a=!1,u=t.return;u!==null;)u.childLanes|=n,l=u.alternate,l!==null&&(l.childLanes|=n),u.tag===22&&(t=u.stateNode,t===null||t._visibility&1||(a=!0)),t=u,u=u.return;return t.tag===3?(u=t.stateNode,a&&e!==null&&(a=31-h(n),t=u.hiddenUpdates,l=t[a],l===null?t[a]=[e]:l.push(e),e.lane=n|536870912),u):null}function vu(t){if(50<La)throw La=0,as=null,Error(s(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Nl={};function oy(t,e,n,l){this.tag=t,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=e,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 Se(t,e,n,l){return new oy(t,e,n,l)}function Ii(t){return t=t.prototype,!(!t||!t.isReactComponent)}function tn(t,e){var n=t.alternate;return n===null?(n=Se(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function kr(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function pu(t,e,n,l,a,u){var r=0;if(l=t,typeof t=="function")Ii(t)&&(r=1);else if(typeof t=="string")r=dm(t,n,Z.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case at:return t=Se(31,n,e,a),t.elementType=at,t.lanes=u,t;case qt:return Kn(n.children,a,u,e);case Ct:r=8,a|=24;break;case Ht:return t=Se(12,n,e,a|2),t.elementType=Ht,t.lanes=u,t;case ut:return t=Se(13,n,e,a),t.elementType=ut,t.lanes=u,t;case Wt:return t=Se(19,n,e,a),t.elementType=Wt,t.lanes=u,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Bt:case it:r=10;break t;case he:r=9;break t;case le:r=11;break t;case bt:r=14;break t;case C:r=16,l=null;break t}r=29,n=Error(s(130,t===null?"null":typeof t,"")),l=null}return e=Se(r,n,e,a),e.elementType=t,e.type=l,e.lanes=u,e}function Kn(t,e,n,l){return t=Se(7,t,l,e),t.lanes=n,t}function tc(t,e,n){return t=Se(6,t,null,e),t.lanes=n,t}function ec(t,e,n){return e=Se(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var xl=[],Dl=0,bu=null,Su=0,Ce=[],Be=0,Jn=null,en=1,nn="";function Wn(t,e){xl[Dl++]=Su,xl[Dl++]=bu,bu=t,Su=e}function Kr(t,e,n){Ce[Be++]=en,Ce[Be++]=nn,Ce[Be++]=Jn,Jn=t;var l=en;t=nn;var a=32-h(l)-1;l&=~(1<<a),n+=1;var u=32-h(e)+a;if(30<u){var r=a-a%5;u=(l&(1<<r)-1).toString(32),l>>=r,a-=r,en=1<<32-h(e)+a|n<<a|l,nn=u+t}else en=1<<u|n<<a|l,nn=t}function nc(t){t.return!==null&&(Wn(t,1),Kr(t,1,0))}function lc(t){for(;t===bu;)bu=xl[--Dl],xl[Dl]=null,Su=xl[--Dl],xl[Dl]=null;for(;t===Jn;)Jn=Ce[--Be],Ce[Be]=null,nn=Ce[--Be],Ce[Be]=null,en=Ce[--Be],Ce[Be]=null}var oe=null,Yt=null,Ot=!1,Fn=null,Ve=!1,ac=Error(s(519));function Pn(t){var e=Error(s(418,""));throw va(Ue(e,t)),ac}function Jr(t){var e=t.stateNode,n=t.type,l=t.memoizedProps;switch(e[se]=t,e[ye]=l,n){case"dialog":gt("cancel",e),gt("close",e);break;case"iframe":case"object":case"embed":gt("load",e);break;case"video":case"audio":for(n=0;n<Xa.length;n++)gt(Xa[n],e);break;case"source":gt("error",e);break;case"img":case"image":case"link":gt("error",e),gt("load",e);break;case"details":gt("toggle",e);break;case"input":gt("invalid",e),fr(e,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),iu(e);break;case"select":gt("invalid",e);break;case"textarea":gt("invalid",e),hr(e,l.value,l.defaultValue,l.children),iu(e)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||l.suppressHydrationWarning===!0||yh(e.textContent,n)?(l.popover!=null&&(gt("beforetoggle",e),gt("toggle",e)),l.onScroll!=null&>("scroll",e),l.onScrollEnd!=null&>("scrollend",e),l.onClick!=null&&(e.onclick=ti),e=!0):e=!1,e||Pn(t)}function Wr(t){for(oe=t.return;oe;)switch(oe.tag){case 5:case 13:Ve=!1;return;case 27:case 3:Ve=!0;return;default:oe=oe.return}}function ma(t){if(t!==oe)return!1;if(!Ot)return Wr(t),Ot=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Ss(t.type,t.memoizedProps)),n=!n),n&&Yt&&Pn(t),Wr(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));t:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8)if(n=t.data,n==="/$"){if(e===0){Yt=Qe(t.nextSibling);break t}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++;t=t.nextSibling}Yt=null}}else e===27?(e=Yt,Bn(t.type)?(t=As,As=null,Yt=t):Yt=e):Yt=oe?Qe(t.stateNode.nextSibling):null;return!0}function ga(){Yt=oe=null,Ot=!1}function Fr(){var t=Fn;return t!==null&&(pe===null?pe=t:pe.push.apply(pe,t),Fn=null),t}function va(t){Fn===null?Fn=[t]:Fn.push(t)}var uc=N(null),In=null,ln=null;function bn(t,e,n){B(uc,e._currentValue),e._currentValue=n}function an(t){t._currentValue=uc.current,H(uc)}function ic(t,e,n){for(;t!==null;){var l=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,l!==null&&(l.childLanes|=e)):l!==null&&(l.childLanes&e)!==e&&(l.childLanes|=e),t===n)break;t=t.return}}function cc(t,e,n,l){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var u=a.dependencies;if(u!==null){var r=a.child;u=u.firstContext;t:for(;u!==null;){var o=u;u=a;for(var d=0;d<e.length;d++)if(o.context===e[d]){u.lanes|=n,o=u.alternate,o!==null&&(o.lanes|=n),ic(u.return,n,t),l||(r=null);break t}u=o.next}}else if(a.tag===18){if(r=a.return,r===null)throw Error(s(341));r.lanes|=n,u=r.alternate,u!==null&&(u.lanes|=n),ic(r,n,t),r=null}else r=a.child;if(r!==null)r.return=a;else for(r=a;r!==null;){if(r===t){r=null;break}if(a=r.sibling,a!==null){a.return=r.return,r=a;break}r=r.return}a=r}}function pa(t,e,n,l){t=null;for(var a=e,u=!1;a!==null;){if(!u){if((a.flags&524288)!==0)u=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var r=a.alternate;if(r===null)throw Error(s(387));if(r=r.memoizedProps,r!==null){var o=a.type;be(a.pendingProps.value,r.value)||(t!==null?t.push(o):t=[o])}}else if(a===Et.current){if(r=a.alternate,r===null)throw Error(s(387));r.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(ka):t=[ka])}a=a.return}t!==null&&cc(e,t,n,l),e.flags|=262144}function _u(t){for(t=t.firstContext;t!==null;){if(!be(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function tl(t){In=t,ln=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function re(t){return Pr(In,t)}function Eu(t,e){return In===null&&tl(t),Pr(t,e)}function Pr(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},ln===null){if(t===null)throw Error(s(308));ln=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else ln=ln.next=e;return n}var hy=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},dy=f.unstable_scheduleCallback,yy=f.unstable_NormalPriority,Ft={$$typeof:it,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sc(){return{controller:new hy,data:new Map,refCount:0}}function ba(t){t.refCount--,t.refCount===0&&dy(yy,function(){t.controller.abort()})}var Sa=null,rc=0,Ul=0,Ml=null;function my(t,e){if(Sa===null){var n=Sa=[];rc=0,Ul=os(),Ml={status:"pending",value:void 0,then:function(l){n.push(l)}}}return rc++,e.then(Ir,Ir),e}function Ir(){if(--rc===0&&Sa!==null){Ml!==null&&(Ml.status="fulfilled");var t=Sa;Sa=null,Ul=0,Ml=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function gy(t,e){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return t.then(function(){l.status="fulfilled",l.value=e;for(var a=0;a<n.length;a++)(0,n[a])(e)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var tf=T.S;T.S=function(t,e){typeof e=="object"&&e!==null&&typeof e.then=="function"&&my(t,e),tf!==null&&tf(t,e)};var el=N(null);function fc(){var t=el.current;return t!==null?t:wt.pooledCache}function Tu(t,e){e===null?B(el,el.current):B(el,e.pool)}function ef(){var t=fc();return t===null?null:{parent:Ft._currentValue,pool:t}}var _a=Error(s(460)),nf=Error(s(474)),Au=Error(s(542)),oc={then:function(){}};function lf(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ru(){}function af(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Ru,Ru),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,cf(t),t;default:if(typeof e.status=="string")e.then(Ru,Ru);else{if(t=wt,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=e,t.status="pending",t.then(function(l){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=l}},function(l){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=l}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,cf(t),t}throw Ea=e,_a}}var Ea=null;function uf(){if(Ea===null)throw Error(s(459));var t=Ea;return Ea=null,t}function cf(t){if(t===_a||t===Au)throw Error(s(483))}var Sn=!1;function hc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function _n(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function En(t,e,n){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(zt&2)!==0){var a=l.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),l.pending=e,e=vu(t),Zr(t,null,n),e}return gu(t,l,e,n),vu(t)}function Ta(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,ea(t,n)}}function yc(t,e){var n=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?a=u=r:u=u.next=r,n=n.next}while(n!==null);u===null?a=u=e:u=u.next=e}else a=u=e;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var mc=!1;function Aa(){if(mc){var t=Ml;if(t!==null)throw t}}function Ra(t,e,n,l){mc=!1;var a=t.updateQueue;Sn=!1;var u=a.firstBaseUpdate,r=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var d=o,S=d.next;d.next=null,r===null?u=S:r.next=S,r=d;var z=t.alternate;z!==null&&(z=z.updateQueue,o=z.lastBaseUpdate,o!==r&&(o===null?z.firstBaseUpdate=S:o.next=S,z.lastBaseUpdate=d))}if(u!==null){var M=a.baseState;r=0,z=S=d=null,o=u;do{var _=o.lane&-536870913,E=_!==o.lane;if(E?(_t&_)===_:(l&_)===_){_!==0&&_===Ul&&(mc=!0),z!==null&&(z=z.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});t:{var et=t,F=o;_=e;var Ut=n;switch(F.tag){case 1:if(et=F.payload,typeof et=="function"){M=et.call(Ut,M,_);break t}M=et;break t;case 3:et.flags=et.flags&-65537|128;case 0:if(et=F.payload,_=typeof et=="function"?et.call(Ut,M,_):et,_==null)break t;M=Y({},M,_);break t;case 2:Sn=!0}}_=o.callback,_!==null&&(t.flags|=64,E&&(t.flags|=8192),E=a.callbacks,E===null?a.callbacks=[_]:E.push(_))}else E={lane:_,tag:o.tag,payload:o.payload,callback:o.callback,next:null},z===null?(S=z=E,d=M):z=z.next=E,r|=_;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;E=o,o=E.next,E.next=null,a.lastBaseUpdate=E,a.shared.pending=null}}while(!0);z===null&&(d=M),a.baseState=d,a.firstBaseUpdate=S,a.lastBaseUpdate=z,u===null&&(a.shared.lanes=0),Dn|=r,t.lanes=r,t.memoizedState=M}}function sf(t,e){if(typeof t!="function")throw Error(s(191,t));t.call(e)}function rf(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)sf(n[t],e)}var Cl=N(null),Ou=N(0);function ff(t,e){t=hn,B(Ou,t),B(Cl,e),hn=t|e.baseLanes}function gc(){B(Ou,hn),B(Cl,Cl.current)}function vc(){hn=Ou.current,H(Cl),H(Ou)}var Tn=0,ot=null,xt=null,kt=null,zu=!1,Bl=!1,nl=!1,Nu=0,Oa=0,wl=null,vy=0;function Qt(){throw Error(s(321))}function pc(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!be(t[n],e[n]))return!1;return!0}function bc(t,e,n,l,a,u){return Tn=u,ot=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,T.H=t===null||t.memoizedState===null?kf:Kf,nl=!1,u=n(l,a),nl=!1,Bl&&(u=hf(e,n,l,a)),of(t),u}function of(t){T.H=Bu;var e=xt!==null&&xt.next!==null;if(Tn=0,kt=xt=ot=null,zu=!1,Oa=0,wl=null,e)throw Error(s(300));t===null||te||(t=t.dependencies,t!==null&&_u(t)&&(te=!0))}function hf(t,e,n,l){ot=t;var a=0;do{if(Bl&&(wl=null),Oa=0,Bl=!1,25<=a)throw Error(s(301));if(a+=1,kt=xt=null,t.updateQueue!=null){var u=t.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}T.H=Ay,u=e(n,l)}while(Bl);return u}function py(){var t=T.H,e=t.useState()[0];return e=typeof e.then=="function"?za(e):e,t=t.useState()[0],(xt!==null?xt.memoizedState:null)!==t&&(ot.flags|=1024),e}function Sc(){var t=Nu!==0;return Nu=0,t}function _c(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function Ec(t){if(zu){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}zu=!1}Tn=0,kt=xt=ot=null,Bl=!1,Oa=Nu=0,wl=null}function ge(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?ot.memoizedState=kt=t:kt=kt.next=t,kt}function Kt(){if(xt===null){var t=ot.alternate;t=t!==null?t.memoizedState:null}else t=xt.next;var e=kt===null?ot.memoizedState:kt.next;if(e!==null)kt=e,xt=t;else{if(t===null)throw ot.alternate===null?Error(s(467)):Error(s(310));xt=t,t={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},kt===null?ot.memoizedState=kt=t:kt=kt.next=t}return kt}function Tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function za(t){var e=Oa;return Oa+=1,wl===null&&(wl=[]),t=af(wl,t,e),e=ot,(kt===null?e.memoizedState:kt.next)===null&&(e=e.alternate,T.H=e===null||e.memoizedState===null?kf:Kf),t}function xu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return za(t);if(t.$$typeof===it)return re(t)}throw Error(s(438,String(t)))}function Ac(t){var e=null,n=ot.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var l=ot.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(e={data:l.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=Tc(),ot.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),l=0;l<t;l++)n[l]=ht;return e.index++,n}function un(t,e){return typeof e=="function"?e(t):e}function Du(t){var e=Kt();return Rc(e,xt,t)}function Rc(t,e,n){var l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=n;var a=t.baseQueue,u=l.pending;if(u!==null){if(a!==null){var r=a.next;a.next=u.next,u.next=r}e.baseQueue=a=u,l.pending=null}if(u=t.baseState,a===null)t.memoizedState=u;else{e=a.next;var o=r=null,d=null,S=e,z=!1;do{var M=S.lane&-536870913;if(M!==S.lane?(_t&M)===M:(Tn&M)===M){var _=S.revertLane;if(_===0)d!==null&&(d=d.next={lane:0,revertLane:0,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null}),M===Ul&&(z=!0);else if((Tn&_)===_){S=S.next,_===Ul&&(z=!0);continue}else M={lane:0,revertLane:S.revertLane,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null},d===null?(o=d=M,r=u):d=d.next=M,ot.lanes|=_,Dn|=_;M=S.action,nl&&n(u,M),u=S.hasEagerState?S.eagerState:n(u,M)}else _={lane:M,revertLane:S.revertLane,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null},d===null?(o=d=_,r=u):d=d.next=_,ot.lanes|=M,Dn|=M;S=S.next}while(S!==null&&S!==e);if(d===null?r=u:d.next=o,!be(u,t.memoizedState)&&(te=!0,z&&(n=Ml,n!==null)))throw n;t.memoizedState=u,t.baseState=r,t.baseQueue=d,l.lastRenderedState=u}return a===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Oc(t){var e=Kt(),n=e.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=t;var l=n.dispatch,a=n.pending,u=e.memoizedState;if(a!==null){n.pending=null;var r=a=a.next;do u=t(u,r.action),r=r.next;while(r!==a);be(u,e.memoizedState)||(te=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),n.lastRenderedState=u}return[u,l]}function df(t,e,n){var l=ot,a=Kt(),u=Ot;if(u){if(n===void 0)throw Error(s(407));n=n()}else n=e();var r=!be((xt||a).memoizedState,n);r&&(a.memoizedState=n,te=!0),a=a.queue;var o=gf.bind(null,l,a,t);if(Na(2048,8,o,[t]),a.getSnapshot!==e||r||kt!==null&&kt.memoizedState.tag&1){if(l.flags|=2048,ql(9,Uu(),mf.bind(null,l,a,n,e),null),wt===null)throw Error(s(349));u||(Tn&124)!==0||yf(l,e,n)}return n}function yf(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ot.updateQueue,e===null?(e=Tc(),ot.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function mf(t,e,n,l){e.value=n,e.getSnapshot=l,vf(e)&&pf(t)}function gf(t,e,n){return n(function(){vf(e)&&pf(t)})}function vf(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!be(t,n)}catch{return!0}}function pf(t){var e=zl(t,2);e!==null&&Re(e,t,2)}function zc(t){var e=ge();if(typeof t=="function"){var n=t;if(t=n(),nl){Le(!0);try{n()}finally{Le(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:t},e}function bf(t,e,n,l){return t.baseState=n,Rc(t,xt,typeof l=="function"?l:un)}function by(t,e,n,l,a){if(Cu(t))throw Error(s(485));if(t=e.action,t!==null){var u={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){u.listeners.push(r)}};T.T!==null?n(!0):u.isTransition=!1,l(u),n=e.pending,n===null?(u.next=e.pending=u,Sf(e,u)):(u.next=n.next,e.pending=n.next=u)}}function Sf(t,e){var n=e.action,l=e.payload,a=t.state;if(e.isTransition){var u=T.T,r={};T.T=r;try{var o=n(a,l),d=T.S;d!==null&&d(r,o),_f(t,e,o)}catch(S){Nc(t,e,S)}finally{T.T=u}}else try{u=n(a,l),_f(t,e,u)}catch(S){Nc(t,e,S)}}function _f(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Ef(t,e,l)},function(l){return Nc(t,e,l)}):Ef(t,e,n)}function Ef(t,e,n){e.status="fulfilled",e.value=n,Tf(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,Sf(t,n)))}function Nc(t,e,n){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do e.status="rejected",e.reason=n,Tf(e),e=e.next;while(e!==l)}t.action=null}function Tf(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Af(t,e){return e}function Rf(t,e){if(Ot){var n=wt.formState;if(n!==null){t:{var l=ot;if(Ot){if(Yt){e:{for(var a=Yt,u=Ve;a.nodeType!==8;){if(!u){a=null;break e}if(a=Qe(a.nextSibling),a===null){a=null;break e}}u=a.data,a=u==="F!"||u==="F"?a:null}if(a){Yt=Qe(a.nextSibling),l=a.data==="F!";break t}}Pn(l)}l=!1}l&&(e=n[0])}}return n=ge(),n.memoizedState=n.baseState=e,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Af,lastRenderedState:e},n.queue=l,n=$f.bind(null,ot,l),l.dispatch=n,l=zc(!1),u=Cc.bind(null,ot,!1,l.queue),l=ge(),a={state:e,dispatch:null,action:t,pending:null},l.queue=a,n=by.bind(null,ot,a,u,n),a.dispatch=n,l.memoizedState=t,[e,n,!1]}function Of(t){var e=Kt();return zf(e,xt,t)}function zf(t,e,n){if(e=Rc(t,e,Af)[0],t=Du(un)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var l=za(e)}catch(r){throw r===_a?Au:r}else l=e;e=Kt();var a=e.queue,u=a.dispatch;return n!==e.memoizedState&&(ot.flags|=2048,ql(9,Uu(),Sy.bind(null,a,n),null)),[l,u,t]}function Sy(t,e){t.action=e}function Nf(t){var e=Kt(),n=xt;if(n!==null)return zf(e,n,t);Kt(),e=e.memoizedState,n=Kt();var l=n.queue.dispatch;return n.memoizedState=t,[e,l,!1]}function ql(t,e,n,l){return t={tag:t,create:n,deps:l,inst:e,next:null},e=ot.updateQueue,e===null&&(e=Tc(),ot.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(l=n.next,n.next=t,t.next=l,e.lastEffect=t),t}function Uu(){return{destroy:void 0,resource:void 0}}function xf(){return Kt().memoizedState}function Mu(t,e,n,l){var a=ge();l=l===void 0?null:l,ot.flags|=t,a.memoizedState=ql(1|e,Uu(),n,l)}function Na(t,e,n,l){var a=Kt();l=l===void 0?null:l;var u=a.memoizedState.inst;xt!==null&&l!==null&&pc(l,xt.memoizedState.deps)?a.memoizedState=ql(e,u,n,l):(ot.flags|=t,a.memoizedState=ql(1|e,u,n,l))}function Df(t,e){Mu(8390656,8,t,e)}function Uf(t,e){Na(2048,8,t,e)}function Mf(t,e){return Na(4,2,t,e)}function Cf(t,e){return Na(4,4,t,e)}function Bf(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function wf(t,e,n){n=n!=null?n.concat([t]):null,Na(4,4,Bf.bind(null,e,t),n)}function xc(){}function qf(t,e){var n=Kt();e=e===void 0?null:e;var l=n.memoizedState;return e!==null&&pc(e,l[1])?l[0]:(n.memoizedState=[t,e],t)}function Hf(t,e){var n=Kt();e=e===void 0?null:e;var l=n.memoizedState;if(e!==null&&pc(e,l[1]))return l[0];if(l=t(),nl){Le(!0);try{t()}finally{Le(!1)}}return n.memoizedState=[l,e],l}function Dc(t,e,n){return n===void 0||(Tn&1073741824)!==0?t.memoizedState=e:(t.memoizedState=n,t=Xo(),ot.lanes|=t,Dn|=t,n)}function jf(t,e,n,l){return be(n,e)?n:Cl.current!==null?(t=Dc(t,n,l),be(t,e)||(te=!0),t):(Tn&42)===0?(te=!0,t.memoizedState=n):(t=Xo(),ot.lanes|=t,Dn|=t,e)}function Lf(t,e,n,l,a){var u=j.p;j.p=u!==0&&8>u?u:8;var r=T.T,o={};T.T=o,Cc(t,!1,e,n);try{var d=a(),S=T.S;if(S!==null&&S(o,d),d!==null&&typeof d=="object"&&typeof d.then=="function"){var z=gy(d,l);xa(t,e,z,Ae(t))}else xa(t,e,l,Ae(t))}catch(M){xa(t,e,{then:function(){},status:"rejected",reason:M},Ae())}finally{j.p=u,T.T=r}}function _y(){}function Uc(t,e,n,l){if(t.tag!==5)throw Error(s(476));var a=Yf(t).queue;Lf(t,a,e,k,n===null?_y:function(){return Xf(t),n(l)})}function Yf(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:k,baseState:k,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:k},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Xf(t){var e=Yf(t).next.queue;xa(t,e,{},Ae())}function Mc(){return re(ka)}function Gf(){return Kt().memoizedState}function Qf(){return Kt().memoizedState}function Ey(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=Ae();t=_n(n);var l=En(e,t,n);l!==null&&(Re(l,e,n),Ta(l,e,n)),e={cache:sc()},t.payload=e;return}e=e.return}}function Ty(t,e,n){var l=Ae();n={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Cu(t)?Vf(e,n):(n=Pi(t,e,n,l),n!==null&&(Re(n,t,l),Zf(n,e,l)))}function $f(t,e,n){var l=Ae();xa(t,e,n,l)}function xa(t,e,n,l){var a={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cu(t))Vf(e,a);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var r=e.lastRenderedState,o=u(r,n);if(a.hasEagerState=!0,a.eagerState=o,be(o,r))return gu(t,e,a,0),wt===null&&mu(),!1}catch{}finally{}if(n=Pi(t,e,a,l),n!==null)return Re(n,t,l),Zf(n,e,l),!0}return!1}function Cc(t,e,n,l){if(l={lane:2,revertLane:os(),action:l,hasEagerState:!1,eagerState:null,next:null},Cu(t)){if(e)throw Error(s(479))}else e=Pi(t,n,l,2),e!==null&&Re(e,t,2)}function Cu(t){var e=t.alternate;return t===ot||e!==null&&e===ot}function Vf(t,e){Bl=zu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Zf(t,e,n){if((n&4194048)!==0){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,ea(t,n)}}var Bu={readContext:re,use:xu,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt},kf={readContext:re,use:xu,useCallback:function(t,e){return ge().memoizedState=[t,e===void 0?null:e],t},useContext:re,useEffect:Df,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Mu(4194308,4,Bf.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Mu(4194308,4,t,e)},useInsertionEffect:function(t,e){Mu(4,2,t,e)},useMemo:function(t,e){var n=ge();e=e===void 0?null:e;var l=t();if(nl){Le(!0);try{t()}finally{Le(!1)}}return n.memoizedState=[l,e],l},useReducer:function(t,e,n){var l=ge();if(n!==void 0){var a=n(e);if(nl){Le(!0);try{n(e)}finally{Le(!1)}}}else a=e;return l.memoizedState=l.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},l.queue=t,t=t.dispatch=Ty.bind(null,ot,t),[l.memoizedState,t]},useRef:function(t){var e=ge();return t={current:t},e.memoizedState=t},useState:function(t){t=zc(t);var e=t.queue,n=$f.bind(null,ot,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:xc,useDeferredValue:function(t,e){var n=ge();return Dc(n,t,e)},useTransition:function(){var t=zc(!1);return t=Lf.bind(null,ot,t.queue,!0,!1),ge().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var l=ot,a=ge();if(Ot){if(n===void 0)throw Error(s(407));n=n()}else{if(n=e(),wt===null)throw Error(s(349));(_t&124)!==0||yf(l,e,n)}a.memoizedState=n;var u={value:n,getSnapshot:e};return a.queue=u,Df(gf.bind(null,l,u,t),[t]),l.flags|=2048,ql(9,Uu(),mf.bind(null,l,u,n,e),null),n},useId:function(){var t=ge(),e=wt.identifierPrefix;if(Ot){var n=nn,l=en;n=(l&~(1<<32-h(l)-1)).toString(32)+n,e="«"+e+"R"+n,n=Nu++,0<n&&(e+="H"+n.toString(32)),e+="»"}else n=vy++,e="«"+e+"r"+n.toString(32)+"»";return t.memoizedState=e},useHostTransitionStatus:Mc,useFormState:Rf,useActionState:Rf,useOptimistic:function(t){var e=ge();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=Cc.bind(null,ot,!0,n),n.dispatch=e,[t,e]},useMemoCache:Ac,useCacheRefresh:function(){return ge().memoizedState=Ey.bind(null,ot)}},Kf={readContext:re,use:xu,useCallback:qf,useContext:re,useEffect:Uf,useImperativeHandle:wf,useInsertionEffect:Mf,useLayoutEffect:Cf,useMemo:Hf,useReducer:Du,useRef:xf,useState:function(){return Du(un)},useDebugValue:xc,useDeferredValue:function(t,e){var n=Kt();return jf(n,xt.memoizedState,t,e)},useTransition:function(){var t=Du(un)[0],e=Kt().memoizedState;return[typeof t=="boolean"?t:za(t),e]},useSyncExternalStore:df,useId:Gf,useHostTransitionStatus:Mc,useFormState:Of,useActionState:Of,useOptimistic:function(t,e){var n=Kt();return bf(n,xt,t,e)},useMemoCache:Ac,useCacheRefresh:Qf},Ay={readContext:re,use:xu,useCallback:qf,useContext:re,useEffect:Uf,useImperativeHandle:wf,useInsertionEffect:Mf,useLayoutEffect:Cf,useMemo:Hf,useReducer:Oc,useRef:xf,useState:function(){return Oc(un)},useDebugValue:xc,useDeferredValue:function(t,e){var n=Kt();return xt===null?Dc(n,t,e):jf(n,xt.memoizedState,t,e)},useTransition:function(){var t=Oc(un)[0],e=Kt().memoizedState;return[typeof t=="boolean"?t:za(t),e]},useSyncExternalStore:df,useId:Gf,useHostTransitionStatus:Mc,useFormState:Nf,useActionState:Nf,useOptimistic:function(t,e){var n=Kt();return xt!==null?bf(n,xt,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:Ac,useCacheRefresh:Qf},Hl=null,Da=0;function wu(t){var e=Da;return Da+=1,Hl===null&&(Hl=[]),af(Hl,t,e)}function Ua(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function qu(t,e){throw e.$$typeof===K?Error(s(525)):(t=Object.prototype.toString.call(e),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Jf(t){var e=t._init;return e(t._payload)}function Wf(t){function e(p,m){if(t){var b=p.deletions;b===null?(p.deletions=[m],p.flags|=16):b.push(m)}}function n(p,m){if(!t)return null;for(;m!==null;)e(p,m),m=m.sibling;return null}function l(p){for(var m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function a(p,m){return p=tn(p,m),p.index=0,p.sibling=null,p}function u(p,m,b){return p.index=b,t?(b=p.alternate,b!==null?(b=b.index,b<m?(p.flags|=67108866,m):b):(p.flags|=67108866,m)):(p.flags|=1048576,m)}function r(p){return t&&p.alternate===null&&(p.flags|=67108866),p}function o(p,m,b,x){return m===null||m.tag!==6?(m=tc(b,p.mode,x),m.return=p,m):(m=a(m,b),m.return=p,m)}function d(p,m,b,x){var $=b.type;return $===qt?z(p,m,b.props.children,x,b.key):m!==null&&(m.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===C&&Jf($)===m.type)?(m=a(m,b.props),Ua(m,b),m.return=p,m):(m=pu(b.type,b.key,b.props,null,p.mode,x),Ua(m,b),m.return=p,m)}function S(p,m,b,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==b.containerInfo||m.stateNode.implementation!==b.implementation?(m=ec(b,p.mode,x),m.return=p,m):(m=a(m,b.children||[]),m.return=p,m)}function z(p,m,b,x,$){return m===null||m.tag!==7?(m=Kn(b,p.mode,x,$),m.return=p,m):(m=a(m,b),m.return=p,m)}function M(p,m,b){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=tc(""+m,p.mode,b),m.return=p,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case J:return b=pu(m.type,m.key,m.props,null,p.mode,b),Ua(b,m),b.return=p,b;case pt:return m=ec(m,p.mode,b),m.return=p,m;case C:var x=m._init;return m=x(m._payload),M(p,m,b)}if(Gt(m)||At(m))return m=Kn(m,p.mode,b,null),m.return=p,m;if(typeof m.then=="function")return M(p,wu(m),b);if(m.$$typeof===it)return M(p,Eu(p,m),b);qu(p,m)}return null}function _(p,m,b,x){var $=m!==null?m.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return $!==null?null:o(p,m,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case J:return b.key===$?d(p,m,b,x):null;case pt:return b.key===$?S(p,m,b,x):null;case C:return $=b._init,b=$(b._payload),_(p,m,b,x)}if(Gt(b)||At(b))return $!==null?null:z(p,m,b,x,null);if(typeof b.then=="function")return _(p,m,wu(b),x);if(b.$$typeof===it)return _(p,m,Eu(p,b),x);qu(p,b)}return null}function E(p,m,b,x,$){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return p=p.get(b)||null,o(m,p,""+x,$);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case J:return p=p.get(x.key===null?b:x.key)||null,d(m,p,x,$);case pt:return p=p.get(x.key===null?b:x.key)||null,S(m,p,x,$);case C:var yt=x._init;return x=yt(x._payload),E(p,m,b,x,$)}if(Gt(x)||At(x))return p=p.get(b)||null,z(m,p,x,$,null);if(typeof x.then=="function")return E(p,m,b,wu(x),$);if(x.$$typeof===it)return E(p,m,b,Eu(m,x),$);qu(m,x)}return null}function et(p,m,b,x){for(var $=null,yt=null,W=m,P=m=0,ne=null;W!==null&&P<b.length;P++){W.index>P?(ne=W,W=null):ne=W.sibling;var Rt=_(p,W,b[P],x);if(Rt===null){W===null&&(W=ne);break}t&&W&&Rt.alternate===null&&e(p,W),m=u(Rt,m,P),yt===null?$=Rt:yt.sibling=Rt,yt=Rt,W=ne}if(P===b.length)return n(p,W),Ot&&Wn(p,P),$;if(W===null){for(;P<b.length;P++)W=M(p,b[P],x),W!==null&&(m=u(W,m,P),yt===null?$=W:yt.sibling=W,yt=W);return Ot&&Wn(p,P),$}for(W=l(W);P<b.length;P++)ne=E(W,p,P,b[P],x),ne!==null&&(t&&ne.alternate!==null&&W.delete(ne.key===null?P:ne.key),m=u(ne,m,P),yt===null?$=ne:yt.sibling=ne,yt=ne);return t&&W.forEach(function(Ln){return e(p,Ln)}),Ot&&Wn(p,P),$}function F(p,m,b,x){if(b==null)throw Error(s(151));for(var $=null,yt=null,W=m,P=m=0,ne=null,Rt=b.next();W!==null&&!Rt.done;P++,Rt=b.next()){W.index>P?(ne=W,W=null):ne=W.sibling;var Ln=_(p,W,Rt.value,x);if(Ln===null){W===null&&(W=ne);break}t&&W&&Ln.alternate===null&&e(p,W),m=u(Ln,m,P),yt===null?$=Ln:yt.sibling=Ln,yt=Ln,W=ne}if(Rt.done)return n(p,W),Ot&&Wn(p,P),$;if(W===null){for(;!Rt.done;P++,Rt=b.next())Rt=M(p,Rt.value,x),Rt!==null&&(m=u(Rt,m,P),yt===null?$=Rt:yt.sibling=Rt,yt=Rt);return Ot&&Wn(p,P),$}for(W=l(W);!Rt.done;P++,Rt=b.next())Rt=E(W,p,P,Rt.value,x),Rt!==null&&(t&&Rt.alternate!==null&&W.delete(Rt.key===null?P:Rt.key),m=u(Rt,m,P),yt===null?$=Rt:yt.sibling=Rt,yt=Rt);return t&&W.forEach(function(Rm){return e(p,Rm)}),Ot&&Wn(p,P),$}function Ut(p,m,b,x){if(typeof b=="object"&&b!==null&&b.type===qt&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case J:t:{for(var $=b.key;m!==null;){if(m.key===$){if($=b.type,$===qt){if(m.tag===7){n(p,m.sibling),x=a(m,b.props.children),x.return=p,p=x;break t}}else if(m.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===C&&Jf($)===m.type){n(p,m.sibling),x=a(m,b.props),Ua(x,b),x.return=p,p=x;break t}n(p,m);break}else e(p,m);m=m.sibling}b.type===qt?(x=Kn(b.props.children,p.mode,x,b.key),x.return=p,p=x):(x=pu(b.type,b.key,b.props,null,p.mode,x),Ua(x,b),x.return=p,p=x)}return r(p);case pt:t:{for($=b.key;m!==null;){if(m.key===$)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){n(p,m.sibling),x=a(m,b.children||[]),x.return=p,p=x;break t}else{n(p,m);break}else e(p,m);m=m.sibling}x=ec(b,p.mode,x),x.return=p,p=x}return r(p);case C:return $=b._init,b=$(b._payload),Ut(p,m,b,x)}if(Gt(b))return et(p,m,b,x);if(At(b)){if($=At(b),typeof $!="function")throw Error(s(150));return b=$.call(b),F(p,m,b,x)}if(typeof b.then=="function")return Ut(p,m,wu(b),x);if(b.$$typeof===it)return Ut(p,m,Eu(p,b),x);qu(p,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,m!==null&&m.tag===6?(n(p,m.sibling),x=a(m,b),x.return=p,p=x):(n(p,m),x=tc(b,p.mode,x),x.return=p,p=x),r(p)):n(p,m)}return function(p,m,b,x){try{Da=0;var $=Ut(p,m,b,x);return Hl=null,$}catch(W){if(W===_a||W===Au)throw W;var yt=Se(29,W,null,p.mode);return yt.lanes=x,yt.return=p,yt}finally{}}}var jl=Wf(!0),Ff=Wf(!1),we=N(null),Ze=null;function An(t){var e=t.alternate;B(Pt,Pt.current&1),B(we,t),Ze===null&&(e===null||Cl.current!==null||e.memoizedState!==null)&&(Ze=t)}function Pf(t){if(t.tag===22){if(B(Pt,Pt.current),B(we,t),Ze===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(Ze=t)}}else Rn()}function Rn(){B(Pt,Pt.current),B(we,we.current)}function cn(t){H(we),Ze===t&&(Ze=null),H(Pt)}var Pt=N(0);function Hu(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||Ts(n)))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function Bc(t,e,n,l){e=t.memoizedState,n=n(l,e),n=n==null?e:Y({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var wc={enqueueSetState:function(t,e,n){t=t._reactInternals;var l=Ae(),a=_n(l);a.payload=e,n!=null&&(a.callback=n),e=En(t,a,l),e!==null&&(Re(e,t,l),Ta(e,t,l))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var l=Ae(),a=_n(l);a.tag=1,a.payload=e,n!=null&&(a.callback=n),e=En(t,a,l),e!==null&&(Re(e,t,l),Ta(e,t,l))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Ae(),l=_n(n);l.tag=2,e!=null&&(l.callback=e),e=En(t,l,n),e!==null&&(Re(e,t,n),Ta(e,t,n))}};function If(t,e,n,l,a,u,r){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,u,r):e.prototype&&e.prototype.isPureReactComponent?!da(n,l)||!da(a,u):!0}function to(t,e,n,l){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,l),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,l),e.state!==t&&wc.enqueueReplaceState(e,e.state,null)}function ll(t,e){var n=e;if("ref"in e){n={};for(var l in e)l!=="ref"&&(n[l]=e[l])}if(t=t.defaultProps){n===e&&(n=Y({},n));for(var a in t)n[a]===void 0&&(n[a]=t[a])}return n}var ju=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function eo(t){ju(t)}function no(t){console.error(t)}function lo(t){ju(t)}function Lu(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(l){setTimeout(function(){throw l})}}function ao(t,e,n){try{var l=t.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function qc(t,e,n){return n=_n(n),n.tag=3,n.payload={element:null},n.callback=function(){Lu(t,e)},n}function uo(t){return t=_n(t),t.tag=3,t}function io(t,e,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var u=l.value;t.payload=function(){return a(u)},t.callback=function(){ao(e,n,l)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(t.callback=function(){ao(e,n,l),typeof a!="function"&&(Un===null?Un=new Set([this]):Un.add(this));var o=l.stack;this.componentDidCatch(l.value,{componentStack:o!==null?o:""})})}function Ry(t,e,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(e=n.alternate,e!==null&&pa(e,n,a,!0),n=we.current,n!==null){switch(n.tag){case 13:return Ze===null?is():n.alternate===null&&Xt===0&&(Xt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===oc?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([l]):e.add(l),ss(t,l,a)),!1;case 22:return n.flags|=65536,l===oc?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([l]):n.add(l)),ss(t,l,a)),!1}throw Error(s(435,n.tag))}return ss(t,l,a),is(),!1}if(Ot)return e=we.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,l!==ac&&(t=Error(s(422),{cause:l}),va(Ue(t,n)))):(l!==ac&&(e=Error(s(423),{cause:l}),va(Ue(e,n))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,l=Ue(l,n),a=qc(t.stateNode,l,a),yc(t,a),Xt!==4&&(Xt=2)),!1;var u=Error(s(520),{cause:l});if(u=Ue(u,n),ja===null?ja=[u]:ja.push(u),Xt!==4&&(Xt=2),e===null)return!0;l=Ue(l,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=a&-a,n.lanes|=t,t=qc(n.stateNode,l,t),yc(n,t),!1;case 1:if(e=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Un===null||!Un.has(u))))return n.flags|=65536,a&=-a,n.lanes|=a,a=uo(a),io(a,t,n,l),yc(n,a),!1}n=n.return}while(n!==null);return!1}var co=Error(s(461)),te=!1;function ae(t,e,n,l){e.child=t===null?Ff(e,null,n,l):jl(e,t.child,n,l)}function so(t,e,n,l,a){n=n.render;var u=e.ref;if("ref"in l){var r={};for(var o in l)o!=="ref"&&(r[o]=l[o])}else r=l;return tl(e),l=bc(t,e,n,r,u,a),o=Sc(),t!==null&&!te?(_c(t,e,a),sn(t,e,a)):(Ot&&o&&nc(e),e.flags|=1,ae(t,e,l,a),e.child)}function ro(t,e,n,l,a){if(t===null){var u=n.type;return typeof u=="function"&&!Ii(u)&&u.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=u,fo(t,e,u,l,a)):(t=pu(n.type,null,l,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!$c(t,a)){var r=u.memoizedProps;if(n=n.compare,n=n!==null?n:da,n(r,l)&&t.ref===e.ref)return sn(t,e,a)}return e.flags|=1,t=tn(u,l),t.ref=e.ref,t.return=e,e.child=t}function fo(t,e,n,l,a){if(t!==null){var u=t.memoizedProps;if(da(u,l)&&t.ref===e.ref)if(te=!1,e.pendingProps=l=u,$c(t,a))(t.flags&131072)!==0&&(te=!0);else return e.lanes=t.lanes,sn(t,e,a)}return Hc(t,e,n,l,a)}function oo(t,e,n){var l=e.pendingProps,a=l.children,u=t!==null?t.memoizedState:null;if(l.mode==="hidden"){if((e.flags&128)!==0){if(l=u!==null?u.baseLanes|n:n,t!==null){for(a=e.child=t.child,u=0;a!==null;)u=u|a.lanes|a.childLanes,a=a.sibling;e.childLanes=u&~l}else e.childLanes=0,e.child=null;return ho(t,e,l,n)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Tu(e,u!==null?u.cachePool:null),u!==null?ff(e,u):gc(),Pf(e);else return e.lanes=e.childLanes=536870912,ho(t,e,u!==null?u.baseLanes|n:n,n)}else u!==null?(Tu(e,u.cachePool),ff(e,u),Rn(),e.memoizedState=null):(t!==null&&Tu(e,null),gc(),Rn());return ae(t,e,a,n),e.child}function ho(t,e,n,l){var a=fc();return a=a===null?null:{parent:Ft._currentValue,pool:a},e.memoizedState={baseLanes:n,cachePool:a},t!==null&&Tu(e,null),gc(),Pf(e),t!==null&&pa(t,e,l,!0),null}function Yu(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(s(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function Hc(t,e,n,l,a){return tl(e),n=bc(t,e,n,l,void 0,a),l=Sc(),t!==null&&!te?(_c(t,e,a),sn(t,e,a)):(Ot&&l&&nc(e),e.flags|=1,ae(t,e,n,a),e.child)}function yo(t,e,n,l,a,u){return tl(e),e.updateQueue=null,n=hf(e,l,n,a),of(t),l=Sc(),t!==null&&!te?(_c(t,e,u),sn(t,e,u)):(Ot&&l&&nc(e),e.flags|=1,ae(t,e,n,u),e.child)}function mo(t,e,n,l,a){if(tl(e),e.stateNode===null){var u=Nl,r=n.contextType;typeof r=="object"&&r!==null&&(u=re(r)),u=new n(l,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=wc,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=l,u.state=e.memoizedState,u.refs={},hc(e),r=n.contextType,u.context=typeof r=="object"&&r!==null?re(r):Nl,u.state=e.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(Bc(e,n,r,l),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(r=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),r!==u.state&&wc.enqueueReplaceState(u,u.state,null),Ra(e,l,u,a),Aa(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),l=!0}else if(t===null){u=e.stateNode;var o=e.memoizedProps,d=ll(n,o);u.props=d;var S=u.context,z=n.contextType;r=Nl,typeof z=="object"&&z!==null&&(r=re(z));var M=n.getDerivedStateFromProps;z=typeof M=="function"||typeof u.getSnapshotBeforeUpdate=="function",o=e.pendingProps!==o,z||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(o||S!==r)&&to(e,u,l,r),Sn=!1;var _=e.memoizedState;u.state=_,Ra(e,l,u,a),Aa(),S=e.memoizedState,o||_!==S||Sn?(typeof M=="function"&&(Bc(e,n,M,l),S=e.memoizedState),(d=Sn||If(e,n,d,l,_,S,r))?(z||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=l,e.memoizedState=S),u.props=l,u.state=S,u.context=r,l=d):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),l=!1)}else{u=e.stateNode,dc(t,e),r=e.memoizedProps,z=ll(n,r),u.props=z,M=e.pendingProps,_=u.context,S=n.contextType,d=Nl,typeof S=="object"&&S!==null&&(d=re(S)),o=n.getDerivedStateFromProps,(S=typeof o=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(r!==M||_!==d)&&to(e,u,l,d),Sn=!1,_=e.memoizedState,u.state=_,Ra(e,l,u,a),Aa();var E=e.memoizedState;r!==M||_!==E||Sn||t!==null&&t.dependencies!==null&&_u(t.dependencies)?(typeof o=="function"&&(Bc(e,n,o,l),E=e.memoizedState),(z=Sn||If(e,n,z,l,_,E,d)||t!==null&&t.dependencies!==null&&_u(t.dependencies))?(S||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,E,d),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,E,d)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||r===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||r===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),e.memoizedProps=l,e.memoizedState=E),u.props=l,u.state=E,u.context=d,l=z):(typeof u.componentDidUpdate!="function"||r===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||r===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),l=!1)}return u=l,Yu(t,e),l=(e.flags&128)!==0,u||l?(u=e.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,t!==null&&l?(e.child=jl(e,t.child,null,a),e.child=jl(e,null,n,a)):ae(t,e,n,a),e.memoizedState=u.state,t=e.child):t=sn(t,e,a),t}function go(t,e,n,l){return ga(),e.flags|=256,ae(t,e,n,l),e.child}var jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lc(t){return{baseLanes:t,cachePool:ef()}}function Yc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=qe),t}function vo(t,e,n){var l=e.pendingProps,a=!1,u=(e.flags&128)!==0,r;if((r=u)||(r=t!==null&&t.memoizedState===null?!1:(Pt.current&2)!==0),r&&(a=!0,e.flags&=-129),r=(e.flags&32)!==0,e.flags&=-33,t===null){if(Ot){if(a?An(e):Rn(),Ot){var o=Yt,d;if(d=o){t:{for(d=o,o=Ve;d.nodeType!==8;){if(!o){o=null;break t}if(d=Qe(d.nextSibling),d===null){o=null;break t}}o=d}o!==null?(e.memoizedState={dehydrated:o,treeContext:Jn!==null?{id:en,overflow:nn}:null,retryLane:536870912,hydrationErrors:null},d=Se(18,null,null,0),d.stateNode=o,d.return=e,e.child=d,oe=e,Yt=null,d=!0):d=!1}d||Pn(e)}if(o=e.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return Ts(o)?e.lanes=32:e.lanes=536870912,null;cn(e)}return o=l.children,l=l.fallback,a?(Rn(),a=e.mode,o=Xu({mode:"hidden",children:o},a),l=Kn(l,a,n,null),o.return=e,l.return=e,o.sibling=l,e.child=o,a=e.child,a.memoizedState=Lc(n),a.childLanes=Yc(t,r,n),e.memoizedState=jc,l):(An(e),Xc(e,o))}if(d=t.memoizedState,d!==null&&(o=d.dehydrated,o!==null)){if(u)e.flags&256?(An(e),e.flags&=-257,e=Gc(t,e,n)):e.memoizedState!==null?(Rn(),e.child=t.child,e.flags|=128,e=null):(Rn(),a=l.fallback,o=e.mode,l=Xu({mode:"visible",children:l.children},o),a=Kn(a,o,n,null),a.flags|=2,l.return=e,a.return=e,l.sibling=a,e.child=l,jl(e,t.child,null,n),l=e.child,l.memoizedState=Lc(n),l.childLanes=Yc(t,r,n),e.memoizedState=jc,e=a);else if(An(e),Ts(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var S=r.dgst;r=S,l=Error(s(419)),l.stack="",l.digest=r,va({value:l,source:null,stack:null}),e=Gc(t,e,n)}else if(te||pa(t,e,n,!1),r=(n&t.childLanes)!==0,te||r){if(r=wt,r!==null&&(l=n&-n,l=(l&42)!==0?1:na(l),l=(l&(r.suspendedLanes|n))!==0?0:l,l!==0&&l!==d.retryLane))throw d.retryLane=l,zl(t,l),Re(r,t,l),co;o.data==="$?"||is(),e=Gc(t,e,n)}else o.data==="$?"?(e.flags|=192,e.child=t.child,e=null):(t=d.treeContext,Yt=Qe(o.nextSibling),oe=e,Ot=!0,Fn=null,Ve=!1,t!==null&&(Ce[Be++]=en,Ce[Be++]=nn,Ce[Be++]=Jn,en=t.id,nn=t.overflow,Jn=e),e=Xc(e,l.children),e.flags|=4096);return e}return a?(Rn(),a=l.fallback,o=e.mode,d=t.child,S=d.sibling,l=tn(d,{mode:"hidden",children:l.children}),l.subtreeFlags=d.subtreeFlags&65011712,S!==null?a=tn(S,a):(a=Kn(a,o,n,null),a.flags|=2),a.return=e,l.return=e,l.sibling=a,e.child=l,l=a,a=e.child,o=t.child.memoizedState,o===null?o=Lc(n):(d=o.cachePool,d!==null?(S=Ft._currentValue,d=d.parent!==S?{parent:S,pool:S}:d):d=ef(),o={baseLanes:o.baseLanes|n,cachePool:d}),a.memoizedState=o,a.childLanes=Yc(t,r,n),e.memoizedState=jc,l):(An(e),n=t.child,t=n.sibling,n=tn(n,{mode:"visible",children:l.children}),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n)}function Xc(t,e){return e=Xu({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Xu(t,e){return t=Se(22,t,null,e),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Gc(t,e,n){return jl(e,t.child,null,n),t=Xc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function po(t,e,n){t.lanes|=e;var l=t.alternate;l!==null&&(l.lanes|=e),ic(t.return,e,n)}function Qc(t,e,n,l,a){var u=t.memoizedState;u===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a}:(u.isBackwards=e,u.rendering=null,u.renderingStartTime=0,u.last=l,u.tail=n,u.tailMode=a)}function bo(t,e,n){var l=e.pendingProps,a=l.revealOrder,u=l.tail;if(ae(t,e,l.children,n),l=Pt.current,(l&2)!==0)l=l&1|2,e.flags|=128;else{if(t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&po(t,n,e);else if(t.tag===19)po(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}switch(B(Pt,l),a){case"forwards":for(n=e.child,a=null;n!==null;)t=n.alternate,t!==null&&Hu(t)===null&&(a=n),n=n.sibling;n=a,n===null?(a=e.child,e.child=null):(a=n.sibling,n.sibling=null),Qc(e,!1,a,n,u);break;case"backwards":for(n=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&Hu(t)===null){e.child=a;break}t=a.sibling,a.sibling=n,n=a,a=t}Qc(e,!0,n,null,u);break;case"together":Qc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function sn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Dn|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(pa(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(s(153));if(e.child!==null){for(t=e.child,n=tn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=tn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function $c(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&_u(t)))}function Oy(t,e,n){switch(e.tag){case 3:dt(e,e.stateNode.containerInfo),bn(e,Ft,t.memoizedState.cache),ga();break;case 27:case 5:cl(e);break;case 4:dt(e,e.stateNode.containerInfo);break;case 10:bn(e,e.type,e.memoizedProps.value);break;case 13:var l=e.memoizedState;if(l!==null)return l.dehydrated!==null?(An(e),e.flags|=128,null):(n&e.child.childLanes)!==0?vo(t,e,n):(An(e),t=sn(t,e,n),t!==null?t.sibling:null);An(e);break;case 19:var a=(t.flags&128)!==0;if(l=(n&e.childLanes)!==0,l||(pa(t,e,n,!1),l=(n&e.childLanes)!==0),a){if(l)return bo(t,e,n);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),B(Pt,Pt.current),l)break;return null;case 22:case 23:return e.lanes=0,oo(t,e,n);case 24:bn(e,Ft,t.memoizedState.cache)}return sn(t,e,n)}function So(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)te=!0;else{if(!$c(t,n)&&(e.flags&128)===0)return te=!1,Oy(t,e,n);te=(t.flags&131072)!==0}else te=!1,Ot&&(e.flags&1048576)!==0&&Kr(e,Su,e.index);switch(e.lanes=0,e.tag){case 16:t:{t=e.pendingProps;var l=e.elementType,a=l._init;if(l=a(l._payload),e.type=l,typeof l=="function")Ii(l)?(t=ll(l,t),e.tag=1,e=mo(null,e,l,t,n)):(e.tag=0,e=Hc(null,e,l,t,n));else{if(l!=null){if(a=l.$$typeof,a===le){e.tag=11,e=so(null,e,l,t,n);break t}else if(a===bt){e.tag=14,e=ro(null,e,l,t,n);break t}}throw e=Oe(l)||l,Error(s(306,e,""))}}return e;case 0:return Hc(t,e,e.type,e.pendingProps,n);case 1:return l=e.type,a=ll(l,e.pendingProps),mo(t,e,l,a,n);case 3:t:{if(dt(e,e.stateNode.containerInfo),t===null)throw Error(s(387));l=e.pendingProps;var u=e.memoizedState;a=u.element,dc(t,e),Ra(e,l,null,n);var r=e.memoizedState;if(l=r.cache,bn(e,Ft,l),l!==u.cache&&cc(e,[Ft],n,!0),Aa(),l=r.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:r.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=go(t,e,l,n);break t}else if(l!==a){a=Ue(Error(s(424)),e),va(a),e=go(t,e,l,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Yt=Qe(t.firstChild),oe=e,Ot=!0,Fn=null,Ve=!0,n=Ff(e,null,l,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ga(),l===a){e=sn(t,e,n);break t}ae(t,e,l,n)}e=e.child}return e;case 26:return Yu(t,e),t===null?(n=Ah(e.type,null,e.pendingProps,null))?e.memoizedState=n:Ot||(n=e.type,t=e.pendingProps,l=ei(nt.current).createElement(n),l[se]=e,l[ye]=t,ie(l,n,t),It(l),e.stateNode=l):e.memoizedState=Ah(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return cl(e),t===null&&Ot&&(l=e.stateNode=_h(e.type,e.pendingProps,nt.current),oe=e,Ve=!0,a=Yt,Bn(e.type)?(As=a,Yt=Qe(l.firstChild)):Yt=a),ae(t,e,e.pendingProps.children,n),Yu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Ot&&((a=l=Yt)&&(l=tm(l,e.type,e.pendingProps,Ve),l!==null?(e.stateNode=l,oe=e,Yt=Qe(l.firstChild),Ve=!1,a=!0):a=!1),a||Pn(e)),cl(e),a=e.type,u=e.pendingProps,r=t!==null?t.memoizedProps:null,l=u.children,Ss(a,u)?l=null:r!==null&&Ss(a,r)&&(e.flags|=32),e.memoizedState!==null&&(a=bc(t,e,py,null,null,n),ka._currentValue=a),Yu(t,e),ae(t,e,l,n),e.child;case 6:return t===null&&Ot&&((t=n=Yt)&&(n=em(n,e.pendingProps,Ve),n!==null?(e.stateNode=n,oe=e,Yt=null,t=!0):t=!1),t||Pn(e)),null;case 13:return vo(t,e,n);case 4:return dt(e,e.stateNode.containerInfo),l=e.pendingProps,t===null?e.child=jl(e,null,l,n):ae(t,e,l,n),e.child;case 11:return so(t,e,e.type,e.pendingProps,n);case 7:return ae(t,e,e.pendingProps,n),e.child;case 8:return ae(t,e,e.pendingProps.children,n),e.child;case 12:return ae(t,e,e.pendingProps.children,n),e.child;case 10:return l=e.pendingProps,bn(e,e.type,l.value),ae(t,e,l.children,n),e.child;case 9:return a=e.type._context,l=e.pendingProps.children,tl(e),a=re(a),l=l(a),e.flags|=1,ae(t,e,l,n),e.child;case 14:return ro(t,e,e.type,e.pendingProps,n);case 15:return fo(t,e,e.type,e.pendingProps,n);case 19:return bo(t,e,n);case 31:return l=e.pendingProps,n=e.mode,l={mode:l.mode,children:l.children},t===null?(n=Xu(l,n),n.ref=e.ref,e.child=n,n.return=e,e=n):(n=tn(t.child,l),n.ref=e.ref,e.child=n,n.return=e,e=n),e;case 22:return oo(t,e,n);case 24:return tl(e),l=re(Ft),t===null?(a=fc(),a===null&&(a=wt,u=sc(),a.pooledCache=u,u.refCount++,u!==null&&(a.pooledCacheLanes|=n),a=u),e.memoizedState={parent:l,cache:a},hc(e),bn(e,Ft,a)):((t.lanes&n)!==0&&(dc(t,e),Ra(e,null,null,n),Aa()),a=t.memoizedState,u=e.memoizedState,a.parent!==l?(a={parent:l,cache:l},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),bn(e,Ft,l)):(l=u.cache,bn(e,Ft,l),l!==a.cache&&cc(e,[Ft],n,!0))),ae(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(s(156,e.tag))}function rn(t){t.flags|=4}function _o(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!xh(e)){if(e=we.current,e!==null&&((_t&4194048)===_t?Ze!==null:(_t&62914560)!==_t&&(_t&536870912)===0||e!==Ze))throw Ea=oc,nf;t.flags|=8192}}function Gu(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Tt():536870912,t.lanes|=e,Gl|=e)}function Ma(t,e){if(!Ot)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Lt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,l=0;if(e)for(var a=t.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=l,t.childLanes=n,e}function zy(t,e,n){var l=e.pendingProps;switch(lc(e),e.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(e),null;case 1:return Lt(e),null;case 3:return n=e.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),an(Ft),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(ma(e)?rn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Fr())),Lt(e),null;case 26:return n=e.memoizedState,t===null?(rn(e),n!==null?(Lt(e),_o(e,n)):(Lt(e),e.flags&=-16777217)):n?n!==t.memoizedState?(rn(e),Lt(e),_o(e,n)):(Lt(e),e.flags&=-16777217):(t.memoizedProps!==l&&rn(e),Lt(e),e.flags&=-16777217),null;case 27:Xn(e),n=nt.current;var a=e.type;if(t!==null&&e.stateNode!=null)t.memoizedProps!==l&&rn(e);else{if(!l){if(e.stateNode===null)throw Error(s(166));return Lt(e),null}t=Z.current,ma(e)?Jr(e):(t=_h(a,l,n),e.stateNode=t,rn(e))}return Lt(e),null;case 5:if(Xn(e),n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&rn(e);else{if(!l){if(e.stateNode===null)throw Error(s(166));return Lt(e),null}if(t=Z.current,ma(e))Jr(e);else{switch(a=ei(nt.current),t){case 1:t=a.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:t=a.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":t=a.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":t=a.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?a.createElement("select",{is:l.is}):a.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?a.createElement(n,{is:l.is}):a.createElement(n)}}t[se]=e,t[ye]=l;t:for(a=e.child;a!==null;){if(a.tag===5||a.tag===6)t.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break t;for(;a.sibling===null;){if(a.return===null||a.return===e)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}e.stateNode=t;t:switch(ie(t,n,l),n){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&rn(e)}}return Lt(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&rn(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(s(166));if(t=nt.current,ma(e)){if(t=e.stateNode,n=e.memoizedProps,l=null,a=oe,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}t[se]=e,t=!!(t.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||yh(t.nodeValue,n)),t||Pn(e)}else t=ei(t).createTextNode(l),t[se]=e,e.stateNode=t}return Lt(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=ma(e),l!==null&&l.dehydrated!==null){if(t===null){if(!a)throw Error(s(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(s(317));a[se]=e}else ga(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Lt(e),a=!1}else a=Fr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(cn(e),e):(cn(e),null)}if(cn(e),(e.flags&128)!==0)return e.lanes=n,e;if(n=l!==null,t=t!==null&&t.memoizedState!==null,n){l=e.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool);var u=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==a&&(l.flags|=2048)}return n!==t&&n&&(e.child.flags|=8192),Gu(e,e.updateQueue),Lt(e),null;case 4:return de(),t===null&&ms(e.stateNode.containerInfo),Lt(e),null;case 10:return an(e.type),Lt(e),null;case 19:if(H(Pt),a=e.memoizedState,a===null)return Lt(e),null;if(l=(e.flags&128)!==0,u=a.rendering,u===null)if(l)Ma(a,!1);else{if(Xt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=Hu(t),u!==null){for(e.flags|=128,Ma(a,!1),t=u.updateQueue,e.updateQueue=t,Gu(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)kr(n,t),n=n.sibling;return B(Pt,Pt.current&1|2),e.child}t=t.sibling}a.tail!==null&&ze()>Vu&&(e.flags|=128,l=!0,Ma(a,!1),e.lanes=4194304)}else{if(!l)if(t=Hu(u),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Gu(e,t),Ma(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Ot)return Lt(e),null}else 2*ze()-a.renderingStartTime>Vu&&n!==536870912&&(e.flags|=128,l=!0,Ma(a,!1),e.lanes=4194304);a.isBackwards?(u.sibling=e.child,e.child=u):(t=a.last,t!==null?t.sibling=u:e.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ze(),e.sibling=null,t=Pt.current,B(Pt,l?t&1|2:t&1),e):(Lt(e),null);case 22:case 23:return cn(e),vc(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?(n&536870912)!==0&&(e.flags&128)===0&&(Lt(e),e.subtreeFlags&6&&(e.flags|=8192)):Lt(e),n=e.updateQueue,n!==null&&Gu(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==n&&(e.flags|=2048),t!==null&&H(el),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),an(Ft),Lt(e),null;case 25:return null;case 30:return null}throw Error(s(156,e.tag))}function Ny(t,e){switch(lc(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return an(Ft),de(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Xn(e),null;case 13:if(cn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(s(340));ga()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return H(Pt),null;case 4:return de(),null;case 10:return an(e.type),null;case 22:case 23:return cn(e),vc(),t!==null&&H(el),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return an(Ft),null;case 25:return null;default:return null}}function Eo(t,e){switch(lc(e),e.tag){case 3:an(Ft),de();break;case 26:case 27:case 5:Xn(e);break;case 4:de();break;case 13:cn(e);break;case 19:H(Pt);break;case 10:an(e.type);break;case 22:case 23:cn(e),vc(),t!==null&&H(el);break;case 24:an(Ft)}}function Ca(t,e){try{var n=e.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&t)===t){l=void 0;var u=n.create,r=n.inst;l=u(),r.destroy=l}n=n.next}while(n!==a)}}catch(o){Mt(e,e.return,o)}}function On(t,e,n){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var u=a.next;l=u;do{if((l.tag&t)===t){var r=l.inst,o=r.destroy;if(o!==void 0){r.destroy=void 0,a=e;var d=n,S=o;try{S()}catch(z){Mt(a,d,z)}}}l=l.next}while(l!==u)}}catch(z){Mt(e,e.return,z)}}function To(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{rf(e,n)}catch(l){Mt(t,t.return,l)}}}function Ao(t,e,n){n.props=ll(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(l){Mt(t,e,l)}}function Ba(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof n=="function"?t.refCleanup=n(l):n.current=l}}catch(a){Mt(t,e,a)}}function ke(t,e){var n=t.ref,l=t.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Mt(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Mt(t,e,a)}else n.current=null}function Ro(t){var e=t.type,n=t.memoizedProps,l=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break t;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Mt(t,t.return,a)}}function Vc(t,e,n){try{var l=t.stateNode;Jy(l,t.type,n,e),l[ye]=e}catch(a){Mt(t,t.return,a)}}function Oo(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Bn(t.type)||t.tag===4}function Zc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Oo(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Bn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function kc(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ti));else if(l!==4&&(l===27&&Bn(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(kc(t,e,n),t=t.sibling;t!==null;)kc(t,e,n),t=t.sibling}function Qu(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(l!==4&&(l===27&&Bn(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Qu(t,e,n),t=t.sibling;t!==null;)Qu(t,e,n),t=t.sibling}function zo(t){var e=t.stateNode,n=t.memoizedProps;try{for(var l=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);ie(e,l,n),e[se]=t,e[ye]=n}catch(u){Mt(t,t.return,u)}}var fn=!1,$t=!1,Kc=!1,No=typeof WeakSet=="function"?WeakSet:Set,ee=null;function xy(t,e){if(t=t.containerInfo,ps=ci,t=Hr(t),Zi(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break t}var r=0,o=-1,d=-1,S=0,z=0,M=t,_=null;e:for(;;){for(var E;M!==n||a!==0&&M.nodeType!==3||(o=r+a),M!==u||l!==0&&M.nodeType!==3||(d=r+l),M.nodeType===3&&(r+=M.nodeValue.length),(E=M.firstChild)!==null;)_=M,M=E;for(;;){if(M===t)break e;if(_===n&&++S===a&&(o=r),_===u&&++z===l&&(d=r),(E=M.nextSibling)!==null)break;M=_,_=M.parentNode}M=E}n=o===-1||d===-1?null:{start:o,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(bs={focusedElem:t,selectionRange:n},ci=!1,ee=e;ee!==null;)if(e=ee,t=e.child,(e.subtreeFlags&1024)!==0&&t!==null)t.return=e,ee=t;else for(;ee!==null;){switch(e=ee,u=e.alternate,t=e.flags,e.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&u!==null){t=void 0,n=e,a=u.memoizedProps,u=u.memoizedState,l=n.stateNode;try{var et=ll(n.type,a,n.elementType===n.type);t=l.getSnapshotBeforeUpdate(et,u),l.__reactInternalSnapshotBeforeUpdate=t}catch(F){Mt(n,n.return,F)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Es(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Es(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=e.sibling,t!==null){t.return=e.return,ee=t;break}ee=e.return}}function xo(t,e,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:zn(t,n),l&4&&Ca(5,n);break;case 1:if(zn(t,n),l&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(r){Mt(n,n.return,r)}else{var a=ll(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(r){Mt(n,n.return,r)}}l&64&&To(n),l&512&&Ba(n,n.return);break;case 3:if(zn(t,n),l&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{rf(t,e)}catch(r){Mt(n,n.return,r)}}break;case 27:e===null&&l&4&&zo(n);case 26:case 5:zn(t,n),e===null&&l&4&&Ro(n),l&512&&Ba(n,n.return);break;case 12:zn(t,n);break;case 13:zn(t,n),l&4&&Mo(t,n),l&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=jy.bind(null,n),nm(t,n))));break;case 22:if(l=n.memoizedState!==null||fn,!l){e=e!==null&&e.memoizedState!==null||$t,a=fn;var u=$t;fn=l,($t=e)&&!u?Nn(t,n,(n.subtreeFlags&8772)!==0):zn(t,n),fn=a,$t=u}break;case 30:break;default:zn(t,n)}}function Do(t){var e=t.alternate;e!==null&&(t.alternate=null,Do(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&zi(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var jt=null,ve=!1;function on(t,e,n){for(n=n.child;n!==null;)Uo(t,e,n),n=n.sibling}function Uo(t,e,n){if(ce&&typeof ce.onCommitFiberUnmount=="function")try{ce.onCommitFiberUnmount(gn,n)}catch{}switch(n.tag){case 26:$t||ke(n,e),on(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$t||ke(n,e);var l=jt,a=ve;Bn(n.type)&&(jt=n.stateNode,ve=!1),on(t,e,n),Qa(n.stateNode),jt=l,ve=a;break;case 5:$t||ke(n,e);case 6:if(l=jt,a=ve,jt=null,on(t,e,n),jt=l,ve=a,jt!==null)if(ve)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(n.stateNode)}catch(u){Mt(n,e,u)}else try{jt.removeChild(n.stateNode)}catch(u){Mt(n,e,u)}break;case 18:jt!==null&&(ve?(t=jt,bh(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Fa(t)):bh(jt,n.stateNode));break;case 4:l=jt,a=ve,jt=n.stateNode.containerInfo,ve=!0,on(t,e,n),jt=l,ve=a;break;case 0:case 11:case 14:case 15:$t||On(2,n,e),$t||On(4,n,e),on(t,e,n);break;case 1:$t||(ke(n,e),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Ao(n,e,l)),on(t,e,n);break;case 21:on(t,e,n);break;case 22:$t=(l=$t)||n.memoizedState!==null,on(t,e,n),$t=l;break;default:on(t,e,n)}}function Mo(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Fa(t)}catch(n){Mt(e,e.return,n)}}function Dy(t){switch(t.tag){case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new No),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new No),e;default:throw Error(s(435,t.tag))}}function Jc(t,e){var n=Dy(t);e.forEach(function(l){var a=Ly.bind(null,t,l);n.has(l)||(n.add(l),l.then(a,a))})}function _e(t,e){var n=e.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],u=t,r=e,o=r;t:for(;o!==null;){switch(o.tag){case 27:if(Bn(o.type)){jt=o.stateNode,ve=!1;break t}break;case 5:jt=o.stateNode,ve=!1;break t;case 3:case 4:jt=o.stateNode.containerInfo,ve=!0;break t}o=o.return}if(jt===null)throw Error(s(160));Uo(u,r,a),jt=null,ve=!1,u=a.alternate,u!==null&&(u.return=null),a.return=null}if(e.subtreeFlags&13878)for(e=e.child;e!==null;)Co(e,t),e=e.sibling}var Ge=null;function Co(t,e){var n=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:_e(e,t),Ee(t),l&4&&(On(3,t,t.return),Ca(3,t),On(5,t,t.return));break;case 1:_e(e,t),Ee(t),l&512&&($t||n===null||ke(n,n.return)),l&64&&fn&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Ge;if(_e(e,t),Ee(t),l&512&&($t||n===null||ke(n,n.return)),l&4){var u=n!==null?n.memoizedState:null;if(l=t.memoizedState,n===null)if(l===null)if(t.stateNode===null){t:{l=t.type,n=t.memoizedProps,a=a.ownerDocument||a;e:switch(l){case"title":u=a.getElementsByTagName("title")[0],(!u||u[aa]||u[se]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=a.createElement(l),a.head.insertBefore(u,a.querySelector("head > title"))),ie(u,l,n),u[se]=t,It(u),l=u;break t;case"link":var r=zh("link","href",a).get(l+(n.href||""));if(r){for(var o=0;o<r.length;o++)if(u=r[o],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(o,1);break e}}u=a.createElement(l),ie(u,l,n),a.head.appendChild(u);break;case"meta":if(r=zh("meta","content",a).get(l+(n.content||""))){for(o=0;o<r.length;o++)if(u=r[o],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(o,1);break e}}u=a.createElement(l),ie(u,l,n),a.head.appendChild(u);break;default:throw Error(s(468,l))}u[se]=t,It(u),l=u}t.stateNode=l}else Nh(a,t.type,t.stateNode);else t.stateNode=Oh(a,l,t.memoizedProps);else u!==l?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,l===null?Nh(a,t.type,t.stateNode):Oh(a,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Vc(t,t.memoizedProps,n.memoizedProps)}break;case 27:_e(e,t),Ee(t),l&512&&($t||n===null||ke(n,n.return)),n!==null&&l&4&&Vc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(_e(e,t),Ee(t),l&512&&($t||n===null||ke(n,n.return)),t.flags&32){a=t.stateNode;try{Sl(a,"")}catch(E){Mt(t,t.return,E)}}l&4&&t.stateNode!=null&&(a=t.memoizedProps,Vc(t,a,n!==null?n.memoizedProps:a)),l&1024&&(Kc=!0);break;case 6:if(_e(e,t),Ee(t),l&4){if(t.stateNode===null)throw Error(s(162));l=t.memoizedProps,n=t.stateNode;try{n.nodeValue=l}catch(E){Mt(t,t.return,E)}}break;case 3:if(ai=null,a=Ge,Ge=ni(e.containerInfo),_e(e,t),Ge=a,Ee(t),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Fa(e.containerInfo)}catch(E){Mt(t,t.return,E)}Kc&&(Kc=!1,Bo(t));break;case 4:l=Ge,Ge=ni(t.stateNode.containerInfo),_e(e,t),Ee(t),Ge=l;break;case 12:_e(e,t),Ee(t);break;case 13:_e(e,t),Ee(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(es=ze()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Jc(t,l)));break;case 22:a=t.memoizedState!==null;var d=n!==null&&n.memoizedState!==null,S=fn,z=$t;if(fn=S||a,$t=z||d,_e(e,t),$t=z,fn=S,Ee(t),l&8192)t:for(e=t.stateNode,e._visibility=a?e._visibility&-2:e._visibility|1,a&&(n===null||d||fn||$t||al(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){d=n=e;try{if(u=d.stateNode,a)r=u.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{o=d.stateNode;var M=d.memoizedProps.style,_=M!=null&&M.hasOwnProperty("display")?M.display:null;o.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(E){Mt(d,d.return,E)}}}else if(e.tag===6){if(n===null){d=e;try{d.stateNode.nodeValue=a?"":d.memoizedProps}catch(E){Mt(d,d.return,E)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}l&4&&(l=t.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Jc(t,n))));break;case 19:_e(e,t),Ee(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Jc(t,l)));break;case 30:break;case 21:break;default:_e(e,t),Ee(t)}}function Ee(t){var e=t.flags;if(e&2){try{for(var n,l=t.return;l!==null;){if(Oo(l)){n=l;break}l=l.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var a=n.stateNode,u=Zc(t);Qu(t,u,a);break;case 5:var r=n.stateNode;n.flags&32&&(Sl(r,""),n.flags&=-33);var o=Zc(t);Qu(t,o,r);break;case 3:case 4:var d=n.stateNode.containerInfo,S=Zc(t);kc(t,S,d);break;default:throw Error(s(161))}}catch(z){Mt(t,t.return,z)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Bo(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Bo(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function zn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)xo(t,e.alternate,e),e=e.sibling}function al(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:On(4,e,e.return),al(e);break;case 1:ke(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&Ao(e,e.return,n),al(e);break;case 27:Qa(e.stateNode);case 26:case 5:ke(e,e.return),al(e);break;case 22:e.memoizedState===null&&al(e);break;case 30:al(e);break;default:al(e)}t=t.sibling}}function Nn(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var l=e.alternate,a=t,u=e,r=u.flags;switch(u.tag){case 0:case 11:case 15:Nn(a,u,n),Ca(4,u);break;case 1:if(Nn(a,u,n),l=u,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(S){Mt(l,l.return,S)}if(l=u,a=l.updateQueue,a!==null){var o=l.stateNode;try{var d=a.shared.hiddenCallbacks;if(d!==null)for(a.shared.hiddenCallbacks=null,a=0;a<d.length;a++)sf(d[a],o)}catch(S){Mt(l,l.return,S)}}n&&r&64&&To(u),Ba(u,u.return);break;case 27:zo(u);case 26:case 5:Nn(a,u,n),n&&l===null&&r&4&&Ro(u),Ba(u,u.return);break;case 12:Nn(a,u,n);break;case 13:Nn(a,u,n),n&&r&4&&Mo(a,u);break;case 22:u.memoizedState===null&&Nn(a,u,n),Ba(u,u.return);break;case 30:break;default:Nn(a,u,n)}e=e.sibling}}function Wc(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&ba(n))}function Fc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ba(t))}function Ke(t,e,n,l){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wo(t,e,n,l),e=e.sibling}function wo(t,e,n,l){var a=e.flags;switch(e.tag){case 0:case 11:case 15:Ke(t,e,n,l),a&2048&&Ca(9,e);break;case 1:Ke(t,e,n,l);break;case 3:Ke(t,e,n,l),a&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ba(t)));break;case 12:if(a&2048){Ke(t,e,n,l),t=e.stateNode;try{var u=e.memoizedProps,r=u.id,o=u.onPostCommit;typeof o=="function"&&o(r,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(d){Mt(e,e.return,d)}}else Ke(t,e,n,l);break;case 13:Ke(t,e,n,l);break;case 23:break;case 22:u=e.stateNode,r=e.alternate,e.memoizedState!==null?u._visibility&2?Ke(t,e,n,l):wa(t,e):u._visibility&2?Ke(t,e,n,l):(u._visibility|=2,Ll(t,e,n,l,(e.subtreeFlags&10256)!==0)),a&2048&&Wc(r,e);break;case 24:Ke(t,e,n,l),a&2048&&Fc(e.alternate,e);break;default:Ke(t,e,n,l)}}function Ll(t,e,n,l,a){for(a=a&&(e.subtreeFlags&10256)!==0,e=e.child;e!==null;){var u=t,r=e,o=n,d=l,S=r.flags;switch(r.tag){case 0:case 11:case 15:Ll(u,r,o,d,a),Ca(8,r);break;case 23:break;case 22:var z=r.stateNode;r.memoizedState!==null?z._visibility&2?Ll(u,r,o,d,a):wa(u,r):(z._visibility|=2,Ll(u,r,o,d,a)),a&&S&2048&&Wc(r.alternate,r);break;case 24:Ll(u,r,o,d,a),a&&S&2048&&Fc(r.alternate,r);break;default:Ll(u,r,o,d,a)}e=e.sibling}}function wa(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,l=e,a=l.flags;switch(l.tag){case 22:wa(n,l),a&2048&&Wc(l.alternate,l);break;case 24:wa(n,l),a&2048&&Fc(l.alternate,l);break;default:wa(n,l)}e=e.sibling}}var qa=8192;function Yl(t){if(t.subtreeFlags&qa)for(t=t.child;t!==null;)qo(t),t=t.sibling}function qo(t){switch(t.tag){case 26:Yl(t),t.flags&qa&&t.memoizedState!==null&&mm(Ge,t.memoizedState,t.memoizedProps);break;case 5:Yl(t);break;case 3:case 4:var e=Ge;Ge=ni(t.stateNode.containerInfo),Yl(t),Ge=e;break;case 22:t.memoizedState===null&&(e=t.alternate,e!==null&&e.memoizedState!==null?(e=qa,qa=16777216,Yl(t),qa=e):Yl(t));break;default:Yl(t)}}function Ho(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Ha(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];ee=l,Lo(l,t)}Ho(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jo(t),t=t.sibling}function jo(t){switch(t.tag){case 0:case 11:case 15:Ha(t),t.flags&2048&&On(9,t,t.return);break;case 3:Ha(t);break;case 12:Ha(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,$u(t)):Ha(t);break;default:Ha(t)}}function $u(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];ee=l,Lo(l,t)}Ho(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:On(8,e,e.return),$u(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,$u(e));break;default:$u(e)}t=t.sibling}}function Lo(t,e){for(;ee!==null;){var n=ee;switch(n.tag){case 0:case 11:case 15:On(8,n,e);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:ba(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,ee=l;else t:for(n=t;ee!==null;){l=ee;var a=l.sibling,u=l.return;if(Do(l),l===n){ee=null;break t}if(a!==null){a.return=u,ee=a;break t}ee=u}}}var Uy={getCacheForType:function(t){var e=re(Ft),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n}},My=typeof WeakMap=="function"?WeakMap:Map,zt=0,wt=null,mt=null,_t=0,Nt=0,Te=null,xn=!1,Xl=!1,Pc=!1,hn=0,Xt=0,Dn=0,ul=0,Ic=0,qe=0,Gl=0,ja=null,pe=null,ts=!1,es=0,Vu=1/0,Zu=null,Un=null,ue=0,Mn=null,Ql=null,$l=0,ns=0,ls=null,Yo=null,La=0,as=null;function Ae(){if((zt&2)!==0&&_t!==0)return _t&-_t;if(T.T!==null){var t=Ul;return t!==0?t:os()}return hl()}function Xo(){qe===0&&(qe=(_t&536870912)===0||Ot?Zt():536870912);var t=we.current;return t!==null&&(t.flags|=32),qe}function Re(t,e,n){(t===wt&&(Nt===2||Nt===9)||t.cancelPendingCommit!==null)&&(Vl(t,0),Cn(t,_t,qe,!1)),Ne(t,n),((zt&2)===0||t!==wt)&&(t===wt&&((zt&2)===0&&(ul|=n),Xt===4&&Cn(t,_t,qe,!1)),Je(t))}function Go(t,e,n){if((zt&6)!==0)throw Error(s(327));var l=!n&&(e&124)===0&&(e&t.expiredLanes)===0||St(t,e),a=l?wy(t,e):cs(t,e,!0),u=l;do{if(a===0){Xl&&!l&&Cn(t,e,0,!1);break}else{if(n=t.current.alternate,u&&!Cy(n)){a=cs(t,e,!1),u=!1;continue}if(a===2){if(u=e,t.errorRecoveryDisabledLanes&u)var r=0;else r=t.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){e=r;t:{var o=t;a=ja;var d=o.current.memoizedState.isDehydrated;if(d&&(Vl(o,r).flags|=256),r=cs(o,r,!1),r!==2){if(Pc&&!d){o.errorRecoveryDisabledLanes|=u,ul|=u,a=4;break t}u=pe,pe=a,u!==null&&(pe===null?pe=u:pe.push.apply(pe,u))}a=r}if(u=!1,a!==2)continue}}if(a===1){Vl(t,0),Cn(t,e,0,!0);break}t:{switch(l=t,u=a,u){case 0:case 1:throw Error(s(345));case 4:if((e&4194048)!==e)break;case 6:Cn(l,e,qe,!xn);break t;case 2:pe=null;break;case 3:case 5:break;default:throw Error(s(329))}if((e&62914560)===e&&(a=es+300-ze(),10<a)){if(Cn(l,e,qe,!xn),X(l,0,!0)!==0)break t;l.timeoutHandle=vh(Qo.bind(null,l,n,pe,Zu,ts,e,qe,ul,Gl,xn,u,2,-0,0),a);break t}Qo(l,n,pe,Zu,ts,e,qe,ul,Gl,xn,u,0,-0,0)}}break}while(!0);Je(t)}function Qo(t,e,n,l,a,u,r,o,d,S,z,M,_,E){if(t.timeoutHandle=-1,M=e.subtreeFlags,(M&8192||(M&16785408)===16785408)&&(Za={stylesheets:null,count:0,unsuspend:ym},qo(e),M=gm(),M!==null)){t.cancelPendingCommit=M(Wo.bind(null,t,e,u,n,l,a,r,o,d,z,1,_,E)),Cn(t,u,r,!S);return}Wo(t,e,u,n,l,a,r,o,d)}function Cy(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],u=a.getSnapshot;a=a.value;try{if(!be(u(),a))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Cn(t,e,n,l){e&=~Ic,e&=~ul,t.suspendedLanes|=e,t.pingedLanes&=~e,l&&(t.warmLanes|=e),l=t.expirationTimes;for(var a=e;0<a;){var u=31-h(a),r=1<<u;l[u]=-1,a&=~r}n!==0&&Qn(t,n,e)}function ku(){return(zt&6)===0?(Ya(0),!1):!0}function us(){if(mt!==null){if(Nt===0)var t=mt.return;else t=mt,ln=In=null,Ec(t),Hl=null,Da=0,t=mt;for(;t!==null;)Eo(t.alternate,t),t=t.return;mt=null}}function Vl(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,Fy(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),us(),wt=t,mt=n=tn(t.current,null),_t=e,Nt=0,Te=null,xn=!1,Xl=St(t,e),Pc=!1,Gl=qe=Ic=ul=Dn=Xt=0,pe=ja=null,ts=!1,(e&8)!==0&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var a=31-h(l),u=1<<a;e|=t[a],l&=~u}return hn=e,mu(),n}function $o(t,e){ot=null,T.H=Bu,e===_a||e===Au?(e=uf(),Nt=3):e===nf?(e=uf(),Nt=4):Nt=e===co?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,Te=e,mt===null&&(Xt=1,Lu(t,Ue(e,t.current)))}function Vo(){var t=T.H;return T.H=Bu,t===null?Bu:t}function Zo(){var t=T.A;return T.A=Uy,t}function is(){Xt=4,xn||(_t&4194048)!==_t&&we.current!==null||(Xl=!0),(Dn&134217727)===0&&(ul&134217727)===0||wt===null||Cn(wt,_t,qe,!1)}function cs(t,e,n){var l=zt;zt|=2;var a=Vo(),u=Zo();(wt!==t||_t!==e)&&(Zu=null,Vl(t,e)),e=!1;var r=Xt;t:do try{if(Nt!==0&&mt!==null){var o=mt,d=Te;switch(Nt){case 8:us(),r=6;break t;case 3:case 2:case 9:case 6:we.current===null&&(e=!0);var S=Nt;if(Nt=0,Te=null,Zl(t,o,d,S),n&&Xl){r=0;break t}break;default:S=Nt,Nt=0,Te=null,Zl(t,o,d,S)}}By(),r=Xt;break}catch(z){$o(t,z)}while(!0);return e&&t.shellSuspendCounter++,ln=In=null,zt=l,T.H=a,T.A=u,mt===null&&(wt=null,_t=0,mu()),r}function By(){for(;mt!==null;)ko(mt)}function wy(t,e){var n=zt;zt|=2;var l=Vo(),a=Zo();wt!==t||_t!==e?(Zu=null,Vu=ze()+500,Vl(t,e)):Xl=St(t,e);t:do try{if(Nt!==0&&mt!==null){e=mt;var u=Te;e:switch(Nt){case 1:Nt=0,Te=null,Zl(t,e,u,1);break;case 2:case 9:if(lf(u)){Nt=0,Te=null,Ko(e);break}e=function(){Nt!==2&&Nt!==9||wt!==t||(Nt=7),Je(t)},u.then(e,e);break t;case 3:Nt=7;break t;case 4:Nt=5;break t;case 7:lf(u)?(Nt=0,Te=null,Ko(e)):(Nt=0,Te=null,Zl(t,e,u,7));break;case 5:var r=null;switch(mt.tag){case 26:r=mt.memoizedState;case 5:case 27:var o=mt;if(!r||xh(r)){Nt=0,Te=null;var d=o.sibling;if(d!==null)mt=d;else{var S=o.return;S!==null?(mt=S,Ku(S)):mt=null}break e}}Nt=0,Te=null,Zl(t,e,u,5);break;case 6:Nt=0,Te=null,Zl(t,e,u,6);break;case 8:us(),Xt=6;break t;default:throw Error(s(462))}}qy();break}catch(z){$o(t,z)}while(!0);return ln=In=null,T.H=l,T.A=a,zt=n,mt!==null?0:(wt=null,_t=0,mu(),Xt)}function qy(){for(;mt!==null&&!Ei();)ko(mt)}function ko(t){var e=So(t.alternate,t,hn);t.memoizedProps=t.pendingProps,e===null?Ku(t):mt=e}function Ko(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=yo(n,e,e.pendingProps,e.type,void 0,_t);break;case 11:e=yo(n,e,e.pendingProps,e.type.render,e.ref,_t);break;case 5:Ec(e);default:Eo(n,e),e=mt=kr(e,hn),e=So(n,e,hn)}t.memoizedProps=t.pendingProps,e===null?Ku(t):mt=e}function Zl(t,e,n,l){ln=In=null,Ec(e),Hl=null,Da=0;var a=e.return;try{if(Ry(t,a,e,n,_t)){Xt=1,Lu(t,Ue(n,t.current)),mt=null;return}}catch(u){if(a!==null)throw mt=a,u;Xt=1,Lu(t,Ue(n,t.current)),mt=null;return}e.flags&32768?(Ot||l===1?t=!0:Xl||(_t&536870912)!==0?t=!1:(xn=t=!0,(l===2||l===9||l===3||l===6)&&(l=we.current,l!==null&&l.tag===13&&(l.flags|=16384))),Jo(e,t)):Ku(e)}function Ku(t){var e=t;do{if((e.flags&32768)!==0){Jo(e,xn);return}t=e.return;var n=zy(e.alternate,e,hn);if(n!==null){mt=n;return}if(e=e.sibling,e!==null){mt=e;return}mt=e=t}while(e!==null);Xt===0&&(Xt=5)}function Jo(t,e){do{var n=Ny(t.alternate,t);if(n!==null){n.flags&=32767,mt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){mt=t;return}mt=t=n}while(t!==null);Xt=6,mt=null}function Wo(t,e,n,l,a,u,r,o,d){t.cancelPendingCommit=null;do Ju();while(ue!==0);if((zt&6)!==0)throw Error(s(327));if(e!==null){if(e===t.current)throw Error(s(177));if(u=e.lanes|e.childLanes,u|=Fi,lu(t,n,u,r,o,d),t===wt&&(mt=wt=null,_t=0),Ql=e,Mn=t,$l=n,ns=u,ls=a,Yo=l,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Yy(ol,function(){return eh(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,a=j.p,j.p=2,r=zt,zt|=4;try{xy(t,e,n)}finally{zt=r,j.p=a,T.T=l}}ue=1,Fo(),Po(),Io()}}function Fo(){if(ue===1){ue=0;var t=Mn,e=Ql,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var l=j.p;j.p=2;var a=zt;zt|=4;try{Co(e,t);var u=bs,r=Hr(t.containerInfo),o=u.focusedElem,d=u.selectionRange;if(r!==o&&o&&o.ownerDocument&&qr(o.ownerDocument.documentElement,o)){if(d!==null&&Zi(o)){var S=d.start,z=d.end;if(z===void 0&&(z=S),"selectionStart"in o)o.selectionStart=S,o.selectionEnd=Math.min(z,o.value.length);else{var M=o.ownerDocument||document,_=M&&M.defaultView||window;if(_.getSelection){var E=_.getSelection(),et=o.textContent.length,F=Math.min(d.start,et),Ut=d.end===void 0?F:Math.min(d.end,et);!E.extend&&F>Ut&&(r=Ut,Ut=F,F=r);var p=wr(o,F),m=wr(o,Ut);if(p&&m&&(E.rangeCount!==1||E.anchorNode!==p.node||E.anchorOffset!==p.offset||E.focusNode!==m.node||E.focusOffset!==m.offset)){var b=M.createRange();b.setStart(p.node,p.offset),E.removeAllRanges(),F>Ut?(E.addRange(b),E.extend(m.node,m.offset)):(b.setEnd(m.node,m.offset),E.addRange(b))}}}}for(M=[],E=o;E=E.parentNode;)E.nodeType===1&&M.push({element:E,left:E.scrollLeft,top:E.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<M.length;o++){var x=M[o];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}ci=!!ps,bs=ps=null}finally{zt=a,j.p=l,T.T=n}}t.current=e,ue=2}}function Po(){if(ue===2){ue=0;var t=Mn,e=Ql,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var l=j.p;j.p=2;var a=zt;zt|=4;try{xo(t,e.alternate,e)}finally{zt=a,j.p=l,T.T=n}}ue=3}}function Io(){if(ue===4||ue===3){ue=0,rl();var t=Mn,e=Ql,n=$l,l=Yo;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?ue=5:(ue=0,Ql=Mn=null,th(t,t.pendingLanes));var a=t.pendingLanes;if(a===0&&(Un=null),la(n),e=e.stateNode,ce&&typeof ce.onCommitFiberRoot=="function")try{ce.onCommitFiberRoot(gn,e,void 0,(e.current.flags&128)===128)}catch{}if(l!==null){e=T.T,a=j.p,j.p=2,T.T=null;try{for(var u=t.onRecoverableError,r=0;r<l.length;r++){var o=l[r];u(o.value,{componentStack:o.stack})}}finally{T.T=e,j.p=a}}($l&3)!==0&&Ju(),Je(t),a=t.pendingLanes,(n&4194090)!==0&&(a&42)!==0?t===as?La++:(La=0,as=t):La=0,Ya(0)}}function th(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ba(e)))}function Ju(t){return Fo(),Po(),Io(),eh()}function eh(){if(ue!==5)return!1;var t=Mn,e=ns;ns=0;var n=la($l),l=T.T,a=j.p;try{j.p=32>n?32:n,T.T=null,n=ls,ls=null;var u=Mn,r=$l;if(ue=0,Ql=Mn=null,$l=0,(zt&6)!==0)throw Error(s(331));var o=zt;if(zt|=4,jo(u.current),wo(u,u.current,r,n),zt=o,Ya(0,!1),ce&&typeof ce.onPostCommitFiberRoot=="function")try{ce.onPostCommitFiberRoot(gn,u)}catch{}return!0}finally{j.p=a,T.T=l,th(t,e)}}function nh(t,e,n){e=Ue(n,e),e=qc(t.stateNode,e,2),t=En(t,e,2),t!==null&&(Ne(t,2),Je(t))}function Mt(t,e,n){if(t.tag===3)nh(t,t,n);else for(;e!==null;){if(e.tag===3){nh(e,t,n);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Un===null||!Un.has(l))){t=Ue(n,t),n=uo(2),l=En(e,n,2),l!==null&&(io(n,l,e,t),Ne(l,2),Je(l));break}}e=e.return}}function ss(t,e,n){var l=t.pingCache;if(l===null){l=t.pingCache=new My;var a=new Set;l.set(e,a)}else a=l.get(e),a===void 0&&(a=new Set,l.set(e,a));a.has(n)||(Pc=!0,a.add(n),t=Hy.bind(null,t,e,n),e.then(t,t))}function Hy(t,e,n){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,wt===t&&(_t&n)===n&&(Xt===4||Xt===3&&(_t&62914560)===_t&&300>ze()-es?(zt&2)===0&&Vl(t,0):Ic|=n,Gl===_t&&(Gl=0)),Je(t)}function lh(t,e){e===0&&(e=Tt()),t=zl(t,e),t!==null&&(Ne(t,e),Je(t))}function jy(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),lh(t,n)}function Ly(t,e){var n=0;switch(t.tag){case 13:var l=t.stateNode,a=t.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(e),lh(t,n)}function Yy(t,e){return Il(t,e)}var Wu=null,kl=null,rs=!1,Fu=!1,fs=!1,il=0;function Je(t){t!==kl&&t.next===null&&(kl===null?Wu=kl=t:kl=kl.next=t),Fu=!0,rs||(rs=!0,Gy())}function Ya(t,e){if(!fs&&Fu){fs=!0;do for(var n=!1,l=Wu;l!==null;){if(t!==0){var a=l.pendingLanes;if(a===0)var u=0;else{var r=l.suspendedLanes,o=l.pingedLanes;u=(1<<31-h(42|t)+1)-1,u&=a&~(r&~o),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,ch(l,u))}else u=_t,u=X(l,l===wt?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||St(l,u)||(n=!0,ch(l,u));l=l.next}while(n);fs=!1}}function Xy(){ah()}function ah(){Fu=rs=!1;var t=0;il!==0&&(Wy()&&(t=il),il=0);for(var e=ze(),n=null,l=Wu;l!==null;){var a=l.next,u=uh(l,e);u===0?(l.next=null,n===null?Wu=a:n.next=a,a===null&&(kl=n)):(n=l,(t!==0||(u&3)!==0)&&(Fu=!0)),l=a}Ya(t)}function uh(t,e){for(var n=t.suspendedLanes,l=t.pingedLanes,a=t.expirationTimes,u=t.pendingLanes&-62914561;0<u;){var r=31-h(u),o=1<<r,d=a[r];d===-1?((o&n)===0||(o&l)!==0)&&(a[r]=ct(o,e)):d<=e&&(t.expiredLanes|=o),u&=~o}if(e=wt,n=_t,n=X(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,n===0||t===e&&(Nt===2||Nt===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&sl(l),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||St(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(l!==null&&sl(l),la(n)){case 2:case 8:n=mn;break;case 32:n=ol;break;case 268435456:n=nu;break;default:n=ol}return l=ih.bind(null,t),n=Il(n,l),t.callbackPriority=e,t.callbackNode=n,e}return l!==null&&l!==null&&sl(l),t.callbackPriority=2,t.callbackNode=null,2}function ih(t,e){if(ue!==0&&ue!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Ju()&&t.callbackNode!==n)return null;var l=_t;return l=X(t,t===wt?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(Go(t,l,e),uh(t,ze()),t.callbackNode!=null&&t.callbackNode===n?ih.bind(null,t):null)}function ch(t,e){if(Ju())return null;Go(t,e,!0)}function Gy(){Py(function(){(zt&6)!==0?Il(fl,Xy):ah()})}function os(){return il===0&&(il=Zt()),il}function sh(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:su(""+t)}function rh(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function Qy(t,e,n,l,a){if(e==="submit"&&n&&n.stateNode===a){var u=sh((a[ye]||null).action),r=l.submitter;r&&(e=(e=r[ye]||null)?sh(e.formAction):r.getAttribute("formAction"),e!==null&&(u=e,r=null));var o=new hu("action","action",null,l,a);t.push({event:o,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(il!==0){var d=r?rh(a,r):new FormData(a);Uc(n,{pending:!0,data:d,method:a.method,action:u},null,d)}}else typeof u=="function"&&(o.preventDefault(),d=r?rh(a,r):new FormData(a),Uc(n,{pending:!0,data:d,method:a.method,action:u},u,d))},currentTarget:a}]})}}for(var hs=0;hs<Wi.length;hs++){var ds=Wi[hs],$y=ds.toLowerCase(),Vy=ds[0].toUpperCase()+ds.slice(1);Xe($y,"on"+Vy)}Xe(Yr,"onAnimationEnd"),Xe(Xr,"onAnimationIteration"),Xe(Gr,"onAnimationStart"),Xe("dblclick","onDoubleClick"),Xe("focusin","onFocus"),Xe("focusout","onBlur"),Xe(sy,"onTransitionRun"),Xe(ry,"onTransitionStart"),Xe(fy,"onTransitionCancel"),Xe(Qr,"onTransitionEnd"),vl("onMouseEnter",["mouseout","mouseover"]),vl("onMouseLeave",["mouseout","mouseover"]),vl("onPointerEnter",["pointerout","pointerover"]),vl("onPointerLeave",["pointerout","pointerover"]),$n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$n("onBeforeInput",["compositionend","keypress","textInput","paste"]),$n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xa="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(" "),Zy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xa));function fh(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var l=t[n],a=l.event;l=l.listeners;t:{var u=void 0;if(e)for(var r=l.length-1;0<=r;r--){var o=l[r],d=o.instance,S=o.currentTarget;if(o=o.listener,d!==u&&a.isPropagationStopped())break t;u=o,a.currentTarget=S;try{u(a)}catch(z){ju(z)}a.currentTarget=null,u=d}else for(r=0;r<l.length;r++){if(o=l[r],d=o.instance,S=o.currentTarget,o=o.listener,d!==u&&a.isPropagationStopped())break t;u=o,a.currentTarget=S;try{u(a)}catch(z){ju(z)}a.currentTarget=null,u=d}}}}function gt(t,e){var n=e[Oi];n===void 0&&(n=e[Oi]=new Set);var l=t+"__bubble";n.has(l)||(oh(e,t,2,!1),n.add(l))}function ys(t,e,n){var l=0;e&&(l|=4),oh(n,t,l,e)}var Pu="_reactListening"+Math.random().toString(36).slice(2);function ms(t){if(!t[Pu]){t[Pu]=!0,nr.forEach(function(n){n!=="selectionchange"&&(Zy.has(n)||ys(n,!1,t),ys(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Pu]||(e[Pu]=!0,ys("selectionchange",!1,e))}}function oh(t,e,n,l){switch(wh(e)){case 2:var a=bm;break;case 8:a=Sm;break;default:a=xs}n=a.bind(null,e,n,t),a=void 0,!Hi||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),l?a!==void 0?t.addEventListener(e,n,{capture:!0,passive:a}):t.addEventListener(e,n,!0):a!==void 0?t.addEventListener(e,n,{passive:a}):t.addEventListener(e,n,!1)}function gs(t,e,n,l,a){var u=l;if((e&1)===0&&(e&2)===0&&l!==null)t:for(;;){if(l===null)return;var r=l.tag;if(r===3||r===4){var o=l.stateNode.containerInfo;if(o===a)break;if(r===4)for(r=l.return;r!==null;){var d=r.tag;if((d===3||d===4)&&r.stateNode.containerInfo===a)return;r=r.return}for(;o!==null;){if(r=yl(o),r===null)return;if(d=r.tag,d===5||d===6||d===26||d===27){l=u=r;continue t}o=o.parentNode}}l=l.return}gr(function(){var S=u,z=wi(n),M=[];t:{var _=$r.get(t);if(_!==void 0){var E=hu,et=t;switch(t){case"keypress":if(fu(n)===0)break t;case"keydown":case"keyup":E=Yd;break;case"focusin":et="focus",E=Xi;break;case"focusout":et="blur",E=Xi;break;case"beforeblur":case"afterblur":E=Xi;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":E=br;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=Nd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=Qd;break;case Yr:case Xr:case Gr:E=Ud;break;case Qr:E=Vd;break;case"scroll":case"scrollend":E=Od;break;case"wheel":E=kd;break;case"copy":case"cut":case"paste":E=Cd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=_r;break;case"toggle":case"beforetoggle":E=Jd}var F=(e&4)!==0,Ut=!F&&(t==="scroll"||t==="scrollend"),p=F?_!==null?_+"Capture":null:_;F=[];for(var m=S,b;m!==null;){var x=m;if(b=x.stateNode,x=x.tag,x!==5&&x!==26&&x!==27||b===null||p===null||(x=ia(m,p),x!=null&&F.push(Ga(m,x,b))),Ut)break;m=m.return}0<F.length&&(_=new E(_,et,null,n,z),M.push({event:_,listeners:F}))}}if((e&7)===0){t:{if(_=t==="mouseover"||t==="pointerover",E=t==="mouseout"||t==="pointerout",_&&n!==Bi&&(et=n.relatedTarget||n.fromElement)&&(yl(et)||et[dl]))break t;if((E||_)&&(_=z.window===z?z:(_=z.ownerDocument)?_.defaultView||_.parentWindow:window,E?(et=n.relatedTarget||n.toElement,E=S,et=et?yl(et):null,et!==null&&(Ut=A(et),F=et.tag,et!==Ut||F!==5&&F!==27&&F!==6)&&(et=null)):(E=null,et=S),E!==et)){if(F=br,x="onMouseLeave",p="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(F=_r,x="onPointerLeave",p="onPointerEnter",m="pointer"),Ut=E==null?_:ua(E),b=et==null?_:ua(et),_=new F(x,m+"leave",E,n,z),_.target=Ut,_.relatedTarget=b,x=null,yl(z)===S&&(F=new F(p,m+"enter",et,n,z),F.target=b,F.relatedTarget=Ut,x=F),Ut=x,E&&et)e:{for(F=E,p=et,m=0,b=F;b;b=Kl(b))m++;for(b=0,x=p;x;x=Kl(x))b++;for(;0<m-b;)F=Kl(F),m--;for(;0<b-m;)p=Kl(p),b--;for(;m--;){if(F===p||p!==null&&F===p.alternate)break e;F=Kl(F),p=Kl(p)}F=null}else F=null;E!==null&&hh(M,_,E,F,!1),et!==null&&Ut!==null&&hh(M,Ut,et,F,!0)}}t:{if(_=S?ua(S):window,E=_.nodeName&&_.nodeName.toLowerCase(),E==="select"||E==="input"&&_.type==="file")var $=xr;else if(zr(_))if(Dr)$=uy;else{$=ly;var yt=ny}else E=_.nodeName,!E||E.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?S&&Ci(S.elementType)&&($=xr):$=ay;if($&&($=$(t,S))){Nr(M,$,n,z);break t}yt&&yt(t,_,S),t==="focusout"&&S&&_.type==="number"&&S.memoizedProps.value!=null&&Mi(_,"number",_.value)}switch(yt=S?ua(S):window,t){case"focusin":(zr(yt)||yt.contentEditable==="true")&&(Al=yt,ki=S,ya=null);break;case"focusout":ya=ki=Al=null;break;case"mousedown":Ki=!0;break;case"contextmenu":case"mouseup":case"dragend":Ki=!1,jr(M,n,z);break;case"selectionchange":if(cy)break;case"keydown":case"keyup":jr(M,n,z)}var W;if(Qi)t:{switch(t){case"compositionstart":var P="onCompositionStart";break t;case"compositionend":P="onCompositionEnd";break t;case"compositionupdate":P="onCompositionUpdate";break t}P=void 0}else Tl?Rr(t,n)&&(P="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Er&&n.locale!=="ko"&&(Tl||P!=="onCompositionStart"?P==="onCompositionEnd"&&Tl&&(W=vr()):(pn=z,ji="value"in pn?pn.value:pn.textContent,Tl=!0)),yt=Iu(S,P),0<yt.length&&(P=new Sr(P,t,null,n,z),M.push({event:P,listeners:yt}),W?P.data=W:(W=Or(n),W!==null&&(P.data=W)))),(W=Fd?Pd(t,n):Id(t,n))&&(P=Iu(S,"onBeforeInput"),0<P.length&&(yt=new Sr("onBeforeInput","beforeinput",null,n,z),M.push({event:yt,listeners:P}),yt.data=W)),Qy(M,t,S,n,z)}fh(M,e)})}function Ga(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Iu(t,e){for(var n=e+"Capture",l=[];t!==null;){var a=t,u=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||u===null||(a=ia(t,n),a!=null&&l.unshift(Ga(t,a,u)),a=ia(t,e),a!=null&&l.push(Ga(t,a,u))),t.tag===3)return l;t=t.return}return[]}function Kl(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function hh(t,e,n,l,a){for(var u=e._reactName,r=[];n!==null&&n!==l;){var o=n,d=o.alternate,S=o.stateNode;if(o=o.tag,d!==null&&d===l)break;o!==5&&o!==26&&o!==27||S===null||(d=S,a?(S=ia(n,u),S!=null&&r.unshift(Ga(n,S,d))):a||(S=ia(n,u),S!=null&&r.push(Ga(n,S,d)))),n=n.return}r.length!==0&&t.push({event:e,listeners:r})}var ky=/\r\n?/g,Ky=/\u0000|\uFFFD/g;function dh(t){return(typeof t=="string"?t:""+t).replace(ky,`
`).replace(Ky,"")}function yh(t,e){return e=dh(e),dh(t)===e}function ti(){}function Dt(t,e,n,l,a,u){switch(n){case"children":typeof l=="string"?e==="body"||e==="textarea"&&l===""||Sl(t,l):(typeof l=="number"||typeof l=="bigint")&&e!=="body"&&Sl(t,""+l);break;case"className":uu(t,"class",l);break;case"tabIndex":uu(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":uu(t,n,l);break;case"style":yr(t,l,u);break;case"data":if(e!=="object"){uu(t,"data",l);break}case"src":case"href":if(l===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(n);break}l=su(""+l),t.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){t.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 u=="function"&&(n==="formAction"?(e!=="input"&&Dt(t,e,"name",a.name,a,null),Dt(t,e,"formEncType",a.formEncType,a,null),Dt(t,e,"formMethod",a.formMethod,a,null),Dt(t,e,"formTarget",a.formTarget,a,null)):(Dt(t,e,"encType",a.encType,a,null),Dt(t,e,"method",a.method,a,null),Dt(t,e,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(n);break}l=su(""+l),t.setAttribute(n,l);break;case"onClick":l!=null&&(t.onclick=ti);break;case"onScroll":l!=null&>("scroll",t);break;case"onScrollEnd":l!=null&>("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(s(60));t.innerHTML=n}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.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"){t.removeAttribute("xlink:href");break}n=su(""+l),t.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"?t.setAttribute(n,""+l):t.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"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":l===!0?t.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,l):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(n,l):t.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(n):t.setAttribute(n,l);break;case"popover":gt("beforetoggle",t),gt("toggle",t),au(t,"popover",l);break;case"xlinkActuate":Pe(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Pe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Pe(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Pe(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Pe(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Pe(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Pe(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Pe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Pe(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":au(t,"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=Ad.get(n)||n,au(t,n,l))}}function vs(t,e,n,l,a,u){switch(n){case"style":yr(t,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(s(60));t.innerHTML=n}}break;case"children":typeof l=="string"?Sl(t,l):(typeof l=="number"||typeof l=="bigint")&&Sl(t,""+l);break;case"onScroll":l!=null&>("scroll",t);break;case"onScrollEnd":l!=null&>("scrollend",t);break;case"onClick":l!=null&&(t.onclick=ti);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lr.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),e=n.slice(2,a?n.length-7:void 0),u=t[ye]||null,u=u!=null?u[n]:null,typeof u=="function"&&t.removeEventListener(e,u,a),typeof l=="function")){typeof u!="function"&&u!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,l,a);break t}n in t?t[n]=l:l===!0?t.setAttribute(n,""):au(t,n,l)}}}function ie(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":gt("error",t),gt("load",t);var l=!1,a=!1,u;for(u in n)if(n.hasOwnProperty(u)){var r=n[u];if(r!=null)switch(u){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,e));default:Dt(t,e,u,r,n,null)}}a&&Dt(t,e,"srcSet",n.srcSet,n,null),l&&Dt(t,e,"src",n.src,n,null);return;case"input":gt("invalid",t);var o=u=r=a=null,d=null,S=null;for(l in n)if(n.hasOwnProperty(l)){var z=n[l];if(z!=null)switch(l){case"name":a=z;break;case"type":r=z;break;case"checked":d=z;break;case"defaultChecked":S=z;break;case"value":u=z;break;case"defaultValue":o=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(137,e));break;default:Dt(t,e,l,z,n,null)}}fr(t,u,o,d,S,r,a,!1),iu(t);return;case"select":gt("invalid",t),l=r=u=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":u=o;break;case"defaultValue":r=o;break;case"multiple":l=o;default:Dt(t,e,a,o,n,null)}e=u,n=r,t.multiple=!!l,e!=null?bl(t,!!l,e,!1):n!=null&&bl(t,!!l,n,!0);return;case"textarea":gt("invalid",t),u=a=l=null;for(r in n)if(n.hasOwnProperty(r)&&(o=n[r],o!=null))switch(r){case"value":l=o;break;case"defaultValue":a=o;break;case"children":u=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:Dt(t,e,r,o,n,null)}hr(t,l,a,u),iu(t);return;case"option":for(d in n)if(n.hasOwnProperty(d)&&(l=n[d],l!=null))switch(d){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Dt(t,e,d,l,n,null)}return;case"dialog":gt("beforetoggle",t),gt("toggle",t),gt("cancel",t),gt("close",t);break;case"iframe":case"object":gt("load",t);break;case"video":case"audio":for(l=0;l<Xa.length;l++)gt(Xa[l],t);break;case"image":gt("error",t),gt("load",t);break;case"details":gt("toggle",t);break;case"embed":case"source":case"link":gt("error",t),gt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(S in n)if(n.hasOwnProperty(S)&&(l=n[S],l!=null))switch(S){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,e));default:Dt(t,e,S,l,n,null)}return;default:if(Ci(e)){for(z in n)n.hasOwnProperty(z)&&(l=n[z],l!==void 0&&vs(t,e,z,l,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(l=n[o],l!=null&&Dt(t,e,o,l,n,null))}function Jy(t,e,n,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,u=null,r=null,o=null,d=null,S=null,z=null;for(E in n){var M=n[E];if(n.hasOwnProperty(E)&&M!=null)switch(E){case"checked":break;case"value":break;case"defaultValue":d=M;default:l.hasOwnProperty(E)||Dt(t,e,E,null,l,M)}}for(var _ in l){var E=l[_];if(M=n[_],l.hasOwnProperty(_)&&(E!=null||M!=null))switch(_){case"type":u=E;break;case"name":a=E;break;case"checked":S=E;break;case"defaultChecked":z=E;break;case"value":r=E;break;case"defaultValue":o=E;break;case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(s(137,e));break;default:E!==M&&Dt(t,e,_,E,l,M)}}Ui(t,r,o,d,S,z,u,a);return;case"select":E=r=o=_=null;for(u in n)if(d=n[u],n.hasOwnProperty(u)&&d!=null)switch(u){case"value":break;case"multiple":E=d;default:l.hasOwnProperty(u)||Dt(t,e,u,null,l,d)}for(a in l)if(u=l[a],d=n[a],l.hasOwnProperty(a)&&(u!=null||d!=null))switch(a){case"value":_=u;break;case"defaultValue":o=u;break;case"multiple":r=u;default:u!==d&&Dt(t,e,a,u,l,d)}e=o,n=r,l=E,_!=null?bl(t,!!n,_,!1):!!l!=!!n&&(e!=null?bl(t,!!n,e,!0):bl(t,!!n,n?[]:"",!1));return;case"textarea":E=_=null;for(o in n)if(a=n[o],n.hasOwnProperty(o)&&a!=null&&!l.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Dt(t,e,o,null,l,a)}for(r in l)if(a=l[r],u=n[r],l.hasOwnProperty(r)&&(a!=null||u!=null))switch(r){case"value":_=a;break;case"defaultValue":E=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(s(91));break;default:a!==u&&Dt(t,e,r,a,l,u)}or(t,_,E);return;case"option":for(var et in n)if(_=n[et],n.hasOwnProperty(et)&&_!=null&&!l.hasOwnProperty(et))switch(et){case"selected":t.selected=!1;break;default:Dt(t,e,et,null,l,_)}for(d in l)if(_=l[d],E=n[d],l.hasOwnProperty(d)&&_!==E&&(_!=null||E!=null))switch(d){case"selected":t.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Dt(t,e,d,_,l,E)}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 F in n)_=n[F],n.hasOwnProperty(F)&&_!=null&&!l.hasOwnProperty(F)&&Dt(t,e,F,null,l,_);for(S in l)if(_=l[S],E=n[S],l.hasOwnProperty(S)&&_!==E&&(_!=null||E!=null))switch(S){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(137,e));break;default:Dt(t,e,S,_,l,E)}return;default:if(Ci(e)){for(var Ut in n)_=n[Ut],n.hasOwnProperty(Ut)&&_!==void 0&&!l.hasOwnProperty(Ut)&&vs(t,e,Ut,void 0,l,_);for(z in l)_=l[z],E=n[z],!l.hasOwnProperty(z)||_===E||_===void 0&&E===void 0||vs(t,e,z,_,l,E);return}}for(var p in n)_=n[p],n.hasOwnProperty(p)&&_!=null&&!l.hasOwnProperty(p)&&Dt(t,e,p,null,l,_);for(M in l)_=l[M],E=n[M],!l.hasOwnProperty(M)||_===E||_==null&&E==null||Dt(t,e,M,_,l,E)}var ps=null,bs=null;function ei(t){return t.nodeType===9?t:t.ownerDocument}function mh(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function gh(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Ss(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var _s=null;function Wy(){var t=window.event;return t&&t.type==="popstate"?t===_s?!1:(_s=t,!0):(_s=null,!1)}var vh=typeof setTimeout=="function"?setTimeout:void 0,Fy=typeof clearTimeout=="function"?clearTimeout:void 0,ph=typeof Promise=="function"?Promise:void 0,Py=typeof queueMicrotask=="function"?queueMicrotask:typeof ph<"u"?function(t){return ph.resolve(null).then(t).catch(Iy)}:vh;function Iy(t){setTimeout(function(){throw t})}function Bn(t){return t==="head"}function bh(t,e){var n=e,l=0,a=0;do{var u=n.nextSibling;if(t.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"){if(0<l&&8>l){n=l;var r=t.ownerDocument;if(n&1&&Qa(r.documentElement),n&2&&Qa(r.body),n&4)for(n=r.head,Qa(n),r=n.firstChild;r;){var o=r.nextSibling,d=r.nodeName;r[aa]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=o}}if(a===0){t.removeChild(u),Fa(e);return}a--}else n==="$"||n==="$?"||n==="$!"?a++:l=n.charCodeAt(0)-48;else l=0;n=u}while(n);Fa(e)}function Es(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Es(n),zi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function tm(t,e,n,l){for(;t.nodeType===1;){var a=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[aa])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=Qe(t.nextSibling),t===null)break}return null}function em(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Qe(t.nextSibling),t===null))return null;return t}function Ts(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function nm(t,e){var n=t.ownerDocument;if(t.data!=="$?"||n.readyState==="complete")e();else{var l=function(){e(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Qe(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="F!"||e==="F")break;if(e==="/$")return null}}return t}var As=null;function Sh(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}function _h(t,e,n){switch(e=ei(n),t){case"html":if(t=e.documentElement,!t)throw Error(s(452));return t;case"head":if(t=e.head,!t)throw Error(s(453));return t;case"body":if(t=e.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function Qa(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);zi(t)}var He=new Map,Eh=new Set;function ni(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var dn=j.d;j.d={f:lm,r:am,D:um,C:im,L:cm,m:sm,X:fm,S:rm,M:om};function lm(){var t=dn.f(),e=ku();return t||e}function am(t){var e=ml(t);e!==null&&e.tag===5&&e.type==="form"?Xf(e):dn.r(t)}var Jl=typeof document>"u"?null:document;function Th(t,e,n){var l=Jl;if(l&&typeof e=="string"&&e){var a=De(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Eh.has(a)||(Eh.add(a),t={rel:t,crossOrigin:n,href:e},l.querySelector(a)===null&&(e=l.createElement("link"),ie(e,"link",t),It(e),l.head.appendChild(e)))}}function um(t){dn.D(t),Th("dns-prefetch",t,null)}function im(t,e){dn.C(t,e),Th("preconnect",t,e)}function cm(t,e,n){dn.L(t,e,n);var l=Jl;if(l&&t&&e){var a='link[rel="preload"][as="'+De(e)+'"]';e==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+De(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+De(n.imageSizes)+'"]')):a+='[href="'+De(t)+'"]';var u=a;switch(e){case"style":u=Wl(t);break;case"script":u=Fl(t)}He.has(u)||(t=Y({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),He.set(u,t),l.querySelector(a)!==null||e==="style"&&l.querySelector($a(u))||e==="script"&&l.querySelector(Va(u))||(e=l.createElement("link"),ie(e,"link",t),It(e),l.head.appendChild(e)))}}function sm(t,e){dn.m(t,e);var n=Jl;if(n&&t){var l=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+De(l)+'"][href="'+De(t)+'"]',u=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Fl(t)}if(!He.has(u)&&(t=Y({rel:"modulepreload",href:t},e),He.set(u,t),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Va(u)))return}l=n.createElement("link"),ie(l,"link",t),It(l),n.head.appendChild(l)}}}function rm(t,e,n){dn.S(t,e,n);var l=Jl;if(l&&t){var a=gl(l).hoistableStyles,u=Wl(t);e=e||"default";var r=a.get(u);if(!r){var o={loading:0,preload:null};if(r=l.querySelector($a(u)))o.loading=5;else{t=Y({rel:"stylesheet",href:t,"data-precedence":e},n),(n=He.get(u))&&Rs(t,n);var d=r=l.createElement("link");It(d),ie(d,"link",t),d._p=new Promise(function(S,z){d.onload=S,d.onerror=z}),d.addEventListener("load",function(){o.loading|=1}),d.addEventListener("error",function(){o.loading|=2}),o.loading|=4,li(r,e,l)}r={type:"stylesheet",instance:r,count:1,state:o},a.set(u,r)}}}function fm(t,e){dn.X(t,e);var n=Jl;if(n&&t){var l=gl(n).hoistableScripts,a=Fl(t),u=l.get(a);u||(u=n.querySelector(Va(a)),u||(t=Y({src:t,async:!0},e),(e=He.get(a))&&Os(t,e),u=n.createElement("script"),It(u),ie(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(a,u))}}function om(t,e){dn.M(t,e);var n=Jl;if(n&&t){var l=gl(n).hoistableScripts,a=Fl(t),u=l.get(a);u||(u=n.querySelector(Va(a)),u||(t=Y({src:t,async:!0,type:"module"},e),(e=He.get(a))&&Os(t,e),u=n.createElement("script"),It(u),ie(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(a,u))}}function Ah(t,e,n,l){var a=(a=nt.current)?ni(a):null;if(!a)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Wl(n.href),n=gl(a).hoistableStyles,l=n.get(e),l||(l={type:"style",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Wl(n.href);var u=gl(a).hoistableStyles,r=u.get(t);if(r||(a=a.ownerDocument||a,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,r),(u=a.querySelector($a(t)))&&!u._p&&(r.instance=u,r.state.loading=5),He.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},He.set(t,n),u||hm(a,t,n,r.state))),e&&l===null)throw Error(s(528,""));return r}if(e&&l!==null)throw Error(s(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Fl(n),n=gl(a).hoistableScripts,l=n.get(e),l||(l={type:"script",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Wl(t){return'href="'+De(t)+'"'}function $a(t){return'link[rel="stylesheet"]['+t+"]"}function Rh(t){return Y({},t,{"data-precedence":t.precedence,precedence:null})}function hm(t,e,n,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),ie(e,"link",n),It(e),t.head.appendChild(e))}function Fl(t){return'[src="'+De(t)+'"]'}function Va(t){return"script[async]"+t}function Oh(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+De(n.href)+'"]');if(l)return e.instance=l,It(l),l;var a=Y({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),It(l),ie(l,"style",a),li(l,n.precedence,t),e.instance=l;case"stylesheet":a=Wl(n.href);var u=t.querySelector($a(a));if(u)return e.state.loading|=4,e.instance=u,It(u),u;l=Rh(n),(a=He.get(a))&&Rs(l,a),u=(t.ownerDocument||t).createElement("link"),It(u);var r=u;return r._p=new Promise(function(o,d){r.onload=o,r.onerror=d}),ie(u,"link",l),e.state.loading|=4,li(u,n.precedence,t),e.instance=u;case"script":return u=Fl(n.src),(a=t.querySelector(Va(u)))?(e.instance=a,It(a),a):(l=n,(a=He.get(u))&&(l=Y({},n),Os(l,a)),t=t.ownerDocument||t,a=t.createElement("script"),It(a),ie(a,"link",l),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(s(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(l=e.instance,e.state.loading|=4,li(l,n.precedence,t));return e.instance}function li(t,e,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,u=a,r=0;r<l.length;r++){var o=l[r];if(o.dataset.precedence===e)u=o;else if(u!==a)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function Rs(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Os(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var ai=null;function zh(t,e,n){if(ai===null){var l=new Map,a=ai=new Map;a.set(n,l)}else a=ai,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(t))return l;for(l.set(t,null),n=n.getElementsByTagName(t),a=0;a<n.length;a++){var u=n[a];if(!(u[aa]||u[se]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var r=u.getAttribute(e)||"";r=t+r;var o=l.get(r);o?o.push(u):l.set(r,[u])}}return l}function Nh(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function dm(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function xh(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var Za=null;function ym(){}function mm(t,e,n){if(Za===null)throw Error(s(475));var l=Za;if(e.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var a=Wl(n.href),u=t.querySelector($a(a));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=ui.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=u,It(u);return}u=t.ownerDocument||t,n=Rh(n),(a=He.get(a))&&Rs(n,a),u=u.createElement("link"),It(u);var r=u;r._p=new Promise(function(o,d){r.onload=o,r.onerror=d}),ie(u,"link",n),e.instance=u}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=ui.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}function gm(){if(Za===null)throw Error(s(475));var t=Za;return t.stylesheets&&t.count===0&&zs(t,t.stylesheets),0<t.count?function(e){var n=setTimeout(function(){if(t.stylesheets&&zs(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(n)}}:null}function ui(){if(this.count--,this.count===0){if(this.stylesheets)zs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ii=null;function zs(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ii=new Map,e.forEach(vm,t),ii=null,ui.call(t))}function vm(t,e){if(!(e.state.loading&4)){var n=ii.get(t);if(n)var l=n.get(null);else{n=new Map,ii.set(t,n);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<a.length;u++){var r=a[u];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),l=r)}l&&n.set(null,l)}a=e.instance,r=a.getAttribute("data-precedence"),u=n.get(r)||l,u===l&&n.set(null,a),n.set(r,a),this.count++,l=ui.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),u?u.parentNode.insertBefore(a,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var ka={$$typeof:it,Provider:null,Consumer:null,_currentValue:k,_currentValue2:k,_threadCount:0};function pm(t,e,n,l,a,u,r,o){this.tag=1,this.containerInfo=t,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=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function Dh(t,e,n,l,a,u,r,o,d,S,z,M){return t=new pm(t,e,n,r,o,d,S,M),e=1,u===!0&&(e|=24),u=Se(3,null,null,e),t.current=u,u.stateNode=t,e=sc(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:l,isDehydrated:n,cache:e},hc(u),t}function Uh(t){return t?(t=Nl,t):Nl}function Mh(t,e,n,l,a,u){a=Uh(a),l.context===null?l.context=a:l.pendingContext=a,l=_n(e),l.payload={element:n},u=u===void 0?null:u,u!==null&&(l.callback=u),n=En(t,l,e),n!==null&&(Re(n,t,e),Ta(n,t,e))}function Ch(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Ns(t,e){Ch(t,e),(t=t.alternate)&&Ch(t,e)}function Bh(t){if(t.tag===13){var e=zl(t,67108864);e!==null&&Re(e,t,67108864),Ns(t,67108864)}}var ci=!0;function bm(t,e,n,l){var a=T.T;T.T=null;var u=j.p;try{j.p=2,xs(t,e,n,l)}finally{j.p=u,T.T=a}}function Sm(t,e,n,l){var a=T.T;T.T=null;var u=j.p;try{j.p=8,xs(t,e,n,l)}finally{j.p=u,T.T=a}}function xs(t,e,n,l){if(ci){var a=Ds(l);if(a===null)gs(t,e,l,si,n),qh(t,l);else if(Em(a,t,e,n,l))l.stopPropagation();else if(qh(t,l),e&4&&-1<_m.indexOf(t)){for(;a!==null;){var u=ml(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var r=L(u.pendingLanes);if(r!==0){var o=u;for(o.pendingLanes|=2,o.entangledLanes|=2;r;){var d=1<<31-h(r);o.entanglements[1]|=d,r&=~d}Je(u),(zt&6)===0&&(Vu=ze()+500,Ya(0))}}break;case 13:o=zl(u,2),o!==null&&Re(o,u,2),ku(),Ns(u,2)}if(u=Ds(l),u===null&&gs(t,e,l,si,n),u===a)break;a=u}a!==null&&l.stopPropagation()}else gs(t,e,l,null,n)}}function Ds(t){return t=wi(t),Us(t)}var si=null;function Us(t){if(si=null,t=yl(t),t!==null){var e=A(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=w(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return si=t,null}function wh(t){switch(t){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(yn()){case fl:return 2;case mn:return 8;case ol:case Ti:return 32;case nu:return 268435456;default:return 32}default:return 32}}var Ms=!1,wn=null,qn=null,Hn=null,Ka=new Map,Ja=new Map,jn=[],_m="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 qh(t,e){switch(t){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":qn=null;break;case"mouseover":case"mouseout":Hn=null;break;case"pointerover":case"pointerout":Ka.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ja.delete(e.pointerId)}}function Wa(t,e,n,l,a,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:n,eventSystemFlags:l,nativeEvent:u,targetContainers:[a]},e!==null&&(e=ml(e),e!==null&&Bh(e)),t):(t.eventSystemFlags|=l,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Em(t,e,n,l,a){switch(e){case"focusin":return wn=Wa(wn,t,e,n,l,a),!0;case"dragenter":return qn=Wa(qn,t,e,n,l,a),!0;case"mouseover":return Hn=Wa(Hn,t,e,n,l,a),!0;case"pointerover":var u=a.pointerId;return Ka.set(u,Wa(Ka.get(u)||null,t,e,n,l,a)),!0;case"gotpointercapture":return u=a.pointerId,Ja.set(u,Wa(Ja.get(u)||null,t,e,n,l,a)),!0}return!1}function Hh(t){var e=yl(t.target);if(e!==null){var n=A(e);if(n!==null){if(e=n.tag,e===13){if(e=w(n),e!==null){t.blockedOn=e,Ri(t.priority,function(){if(n.tag===13){var l=Ae();l=na(l);var a=zl(n,l);a!==null&&Re(a,n,l),Ns(n,l)}});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ri(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Ds(t.nativeEvent);if(n===null){n=t.nativeEvent;var l=new n.constructor(n.type,n);Bi=l,n.target.dispatchEvent(l),Bi=null}else return e=ml(n),e!==null&&Bh(e),t.blockedOn=n,!1;e.shift()}return!0}function jh(t,e,n){ri(t)&&n.delete(e)}function Tm(){Ms=!1,wn!==null&&ri(wn)&&(wn=null),qn!==null&&ri(qn)&&(qn=null),Hn!==null&&ri(Hn)&&(Hn=null),Ka.forEach(jh),Ja.forEach(jh)}function fi(t,e){t.blockedOn===e&&(t.blockedOn=null,Ms||(Ms=!0,f.unstable_scheduleCallback(f.unstable_NormalPriority,Tm)))}var oi=null;function Lh(t){oi!==t&&(oi=t,f.unstable_scheduleCallback(f.unstable_NormalPriority,function(){oi===t&&(oi=null);for(var e=0;e<t.length;e+=3){var n=t[e],l=t[e+1],a=t[e+2];if(typeof l!="function"){if(Us(l||n)===null)continue;break}var u=ml(n);u!==null&&(t.splice(e,3),e-=3,Uc(u,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Fa(t){function e(d){return fi(d,t)}wn!==null&&fi(wn,t),qn!==null&&fi(qn,t),Hn!==null&&fi(Hn,t),Ka.forEach(e),Ja.forEach(e);for(var n=0;n<jn.length;n++){var l=jn[n];l.blockedOn===t&&(l.blockedOn=null)}for(;0<jn.length&&(n=jn[0],n.blockedOn===null);)Hh(n),n.blockedOn===null&&jn.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],u=n[l+1],r=a[ye]||null;if(typeof u=="function")r||Lh(n);else if(r){var o=null;if(u&&u.hasAttribute("formAction")){if(a=u,r=u[ye]||null)o=r.formAction;else if(Us(a)!==null)continue}else o=r.action;typeof o=="function"?n[l+1]=o:(n.splice(l,3),l-=3),Lh(n)}}}function Cs(t){this._internalRoot=t}hi.prototype.render=Cs.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(s(409));var n=e.current,l=Ae();Mh(n,l,t,e,null,null)},hi.prototype.unmount=Cs.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Mh(t.current,2,null,t,null,null),ku(),e[dl]=null}};function hi(t){this._internalRoot=t}hi.prototype.unstable_scheduleHydration=function(t){if(t){var e=hl();t={blockedOn:null,target:t,priority:e};for(var n=0;n<jn.length&&e!==0&&e<jn[n].priority;n++);jn.splice(n,0,t),n===0&&Hh(t)}};var Yh=i.version;if(Yh!=="19.1.1")throw Error(s(527,Yh,"19.1.1"));j.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=U(e),t=t!==null?R(t):null,t=t===null?null:t.stateNode,t};var Am={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!di.isDisabled&&di.supportsFiber)try{gn=di.inject(Am),ce=di}catch{}}return Ia.createRoot=function(t,e){if(!v(t))throw Error(s(299));var n=!1,l="",a=eo,u=no,r=lo,o=null;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(l=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(r=e.onRecoverableError),e.unstable_transitionCallbacks!==void 0&&(o=e.unstable_transitionCallbacks)),e=Dh(t,1,!1,null,null,n,l,a,u,r,o,null),t[dl]=e.current,ms(t),new Cs(e)},Ia.hydrateRoot=function(t,e,n){if(!v(t))throw Error(s(299));var l=!1,a="",u=eo,r=no,o=lo,d=null,S=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(d=n.unstable_transitionCallbacks),n.formState!==void 0&&(S=n.formState)),e=Dh(t,1,!0,e,n??null,l,a,u,r,o,d,S),e.context=Uh(null),n=e.current,l=Ae(),l=na(l),a=_n(l),a.callback=null,En(n,a,l),n=l,e.current.lanes=n,Ne(e,n),Je(e),t[dl]=e.current,ms(t),new hi(e)},Ia.version="19.1.1",Ia}var Wh;function Bm(){if(Wh)return qs.exports;Wh=1;function f(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(i){console.error(i)}}return f(),qs.exports=Cm(),qs.exports}var wm=Bm();const Fe=Object.create(null);Fe.open="0";Fe.close="1";Fe.ping="2";Fe.pong="3";Fe.message="4";Fe.upgrade="5";Fe.noop="6";const gi=Object.create(null);Object.keys(Fe).forEach(f=>{gi[Fe[f]]=f});const Qs={type:"error",data:"parser error"},ld=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ad=typeof ArrayBuffer=="function",ud=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer,Ws=({type:f,data:i},c,s)=>ld&&i instanceof Blob?c?s(i):Fh(i,s):ad&&(i instanceof ArrayBuffer||ud(i))?c?s(i):Fh(new Blob([i]),s):s(Fe[f]+(i||"")),Fh=(f,i)=>{const c=new FileReader;return c.onload=function(){const s=c.result.split(",")[1];i("b"+(s||""))},c.readAsDataURL(f)};function Ph(f){return f instanceof Uint8Array?f:f instanceof ArrayBuffer?new Uint8Array(f):new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}let Ys;function qm(f,i){if(ld&&f.data instanceof Blob)return f.data.arrayBuffer().then(Ph).then(i);if(ad&&(f.data instanceof ArrayBuffer||ud(f.data)))return i(Ph(f.data));Ws(f,!1,c=>{Ys||(Ys=new TextEncoder),i(Ys.encode(c))})}const Ih="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let f=0;f<Ih.length;f++)eu[Ih.charCodeAt(f)]=f;const Hm=f=>{let i=f.length*.75,c=f.length,s,v=0,A,w,V,U;f[f.length-1]==="="&&(i--,f[f.length-2]==="="&&i--);const R=new ArrayBuffer(i),Y=new Uint8Array(R);for(s=0;s<c;s+=4)A=eu[f.charCodeAt(s)],w=eu[f.charCodeAt(s+1)],V=eu[f.charCodeAt(s+2)],U=eu[f.charCodeAt(s+3)],Y[v++]=A<<2|w>>4,Y[v++]=(w&15)<<4|V>>2,Y[v++]=(V&3)<<6|U&63;return R},jm=typeof ArrayBuffer=="function",Fs=(f,i)=>{if(typeof f!="string")return{type:"message",data:id(f,i)};const c=f.charAt(0);return c==="b"?{type:"message",data:Lm(f.substring(1),i)}:gi[c]?f.length>1?{type:gi[c],data:f.substring(1)}:{type:gi[c]}:Qs},Lm=(f,i)=>{if(jm){const c=Hm(f);return id(c,i)}else return{base64:!0,data:f}},id=(f,i)=>{switch(i){case"blob":return f instanceof Blob?f:new Blob([f]);case"arraybuffer":default:return f instanceof ArrayBuffer?f:f.buffer}},cd="",Ym=(f,i)=>{const c=f.length,s=new Array(c);let v=0;f.forEach((A,w)=>{Ws(A,!1,V=>{s[w]=V,++v===c&&i(s.join(cd))})})},Xm=(f,i)=>{const c=f.split(cd),s=[];for(let v=0;v<c.length;v++){const A=Fs(c[v],i);if(s.push(A),A.type==="error")break}return s};function Gm(){return new TransformStream({transform(f,i){qm(f,c=>{const s=c.length;let v;if(s<126)v=new Uint8Array(1),new DataView(v.buffer).setUint8(0,s);else if(s<65536){v=new Uint8Array(3);const A=new DataView(v.buffer);A.setUint8(0,126),A.setUint16(1,s)}else{v=new Uint8Array(9);const A=new DataView(v.buffer);A.setUint8(0,127),A.setBigUint64(1,BigInt(s))}f.data&&typeof f.data!="string"&&(v[0]|=128),i.enqueue(v),i.enqueue(c)})}})}let Xs;function yi(f){return f.reduce((i,c)=>i+c.length,0)}function mi(f,i){if(f[0].length===i)return f.shift();const c=new Uint8Array(i);let s=0;for(let v=0;v<i;v++)c[v]=f[0][s++],s===f[0].length&&(f.shift(),s=0);return f.length&&s<f[0].length&&(f[0]=f[0].slice(s)),c}function Qm(f,i){Xs||(Xs=new TextDecoder);const c=[];let s=0,v=-1,A=!1;return new TransformStream({transform(w,V){for(c.push(w);;){if(s===0){if(yi(c)<1)break;const U=mi(c,1);A=(U[0]&128)===128,v=U[0]&127,v<126?s=3:v===126?s=1:s=2}else if(s===1){if(yi(c)<2)break;const U=mi(c,2);v=new DataView(U.buffer,U.byteOffset,U.length).getUint16(0),s=3}else if(s===2){if(yi(c)<8)break;const U=mi(c,8),R=new DataView(U.buffer,U.byteOffset,U.length),Y=R.getUint32(0);if(Y>Math.pow(2,21)-1){V.enqueue(Qs);break}v=Y*Math.pow(2,32)+R.getUint32(4),s=3}else{if(yi(c)<v)break;const U=mi(c,v);V.enqueue(Fs(A?U:Xs.decode(U),i)),s=0}if(v===0||v>f){V.enqueue(Qs);break}}}})}const sd=4;function Jt(f){if(f)return $m(f)}function $m(f){for(var i in Jt.prototype)f[i]=Jt.prototype[i];return f}Jt.prototype.on=Jt.prototype.addEventListener=function(f,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+f]=this._callbacks["$"+f]||[]).push(i),this};Jt.prototype.once=function(f,i){function c(){this.off(f,c),i.apply(this,arguments)}return c.fn=i,this.on(f,c),this};Jt.prototype.off=Jt.prototype.removeListener=Jt.prototype.removeAllListeners=Jt.prototype.removeEventListener=function(f,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var c=this._callbacks["$"+f];if(!c)return this;if(arguments.length==1)return delete this._callbacks["$"+f],this;for(var s,v=0;v<c.length;v++)if(s=c[v],s===i||s.fn===i){c.splice(v,1);break}return c.length===0&&delete this._callbacks["$"+f],this};Jt.prototype.emit=function(f){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),c=this._callbacks["$"+f],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(c){c=c.slice(0);for(var s=0,v=c.length;s<v;++s)c[s].apply(this,i)}return this};Jt.prototype.emitReserved=Jt.prototype.emit;Jt.prototype.listeners=function(f){return this._callbacks=this._callbacks||{},this._callbacks["$"+f]||[]};Jt.prototype.hasListeners=function(f){return!!this.listeners(f).length};const Si=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,c)=>c(i,0),je=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Vm="arraybuffer";function rd(f,...i){return i.reduce((c,s)=>(f.hasOwnProperty(s)&&(c[s]=f[s]),c),{})}const Zm=je.setTimeout,km=je.clearTimeout;function _i(f,i){i.useNativeTimers?(f.setTimeoutFn=Zm.bind(je),f.clearTimeoutFn=km.bind(je)):(f.setTimeoutFn=je.setTimeout.bind(je),f.clearTimeoutFn=je.clearTimeout.bind(je))}const Km=1.33;function Jm(f){return typeof f=="string"?Wm(f):Math.ceil((f.byteLength||f.size)*Km)}function Wm(f){let i=0,c=0;for(let s=0,v=f.length;s<v;s++)i=f.charCodeAt(s),i<128?c+=1:i<2048?c+=2:i<55296||i>=57344?c+=3:(s++,c+=4);return c}function fd(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fm(f){let i="";for(let c in f)f.hasOwnProperty(c)&&(i.length&&(i+="&"),i+=encodeURIComponent(c)+"="+encodeURIComponent(f[c]));return i}function Pm(f){let i={},c=f.split("&");for(let s=0,v=c.length;s<v;s++){let A=c[s].split("=");i[decodeURIComponent(A[0])]=decodeURIComponent(A[1])}return i}class Im extends Error{constructor(i,c,s){super(i),this.description=c,this.context=s,this.type="TransportError"}}class Ps extends Jt{constructor(i){super(),this.writable=!1,_i(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,c,s){return super.emitReserved("error",new Im(i,c,s)),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 c=Fs(i,this.socket.binaryType);this.onPacket(c)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,c={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(c)}_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 c=Fm(i);return c.length?"?"+c:""}}class tg extends Ps{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const c=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||c()})),this.writable||(s++,this.once("drain",function(){--s||c()}))}else c()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const c=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Xm(i,this.socket.binaryType).forEach(c),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,Ym(i,c=>{this.doWrite(c,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",c=this.query||{};return this.opts.timestampRequests!==!1&&(c[this.opts.timestampParam]=fd()),!this.supportsBinary&&!c.sid&&(c.b64=1),this.createUri(i,c)}}let od=!1;try{od=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const eg=od;function ng(){}class lg extends tg{constructor(i){if(super(i),typeof location<"u"){const c=location.protocol==="https:";let s=location.port;s||(s=c?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||s!==i.port}}doWrite(i,c){const s=this.request({method:"POST",data:i});s.on("success",c),s.on("error",(v,A)=>{this.onError("xhr post error",v,A)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(c,s)=>{this.onError("xhr poll error",c,s)}),this.pollXhr=i}}class We extends Jt{constructor(i,c,s){super(),this.createRequest=i,_i(this,s),this._opts=s,this._method=s.method||"GET",this._uri=c,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var i;const c=rd(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");c.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(c);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let v in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(v)&&s.setRequestHeader(v,this._opts.extraHeaders[v])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var v;s.readyState===3&&((v=this._opts.cookieJar)===null||v===void 0||v.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(v){this.setTimeoutFn(()=>{this._onError(v)},0);return}typeof document<"u"&&(this._index=We.requestsCount++,We.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=ng,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete We.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()}}We.requestsCount=0;We.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",td);else if(typeof addEventListener=="function"){const f="onpagehide"in je?"pagehide":"unload";addEventListener(f,td,!1)}}function td(){for(let f in We.requests)We.requests.hasOwnProperty(f)&&We.requests[f].abort()}const ag=function(){const f=hd({xdomain:!1});return f&&f.responseType!==null}();class ug extends lg{constructor(i){super(i);const c=i&&i.forceBase64;this.supportsBinary=ag&&!c}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new We(hd,this.uri(),i)}}function hd(f){const i=f.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||eg))return new XMLHttpRequest}catch{}if(!i)try{return new je[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const dd=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ig extends Ps{get name(){return"websocket"}doOpen(){const i=this.uri(),c=this.opts.protocols,s=dd?{}:rd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,c,s)}catch(v){return this.emitReserved("error",v)}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 c=0;c<i.length;c++){const s=i[c],v=c===i.length-1;Ws(s,this.supportsBinary,A=>{try{this.doWrite(s,A)}catch{}v&&Si(()=>{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",c=this.query||{};return this.opts.timestampRequests&&(c[this.opts.timestampParam]=fd()),this.supportsBinary||(c.b64=1),this.createUri(i,c)}}const Gs=je.WebSocket||je.MozWebSocket;class cg extends ig{createSocket(i,c,s){return dd?new Gs(i,c,s):c?new Gs(i,c):new Gs(i)}doWrite(i,c){this.ws.send(c)}}class sg extends Ps{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 c=Qm(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=i.readable.pipeThrough(c).getReader(),v=Gm();v.readable.pipeTo(i.writable),this._writer=v.writable.getWriter();const A=()=>{s.read().then(({done:V,value:U})=>{V||(this.onPacket(U),A())}).catch(V=>{})};A();const w={type:"open"};this.query.sid&&(w.data=`{"sid":"${this.query.sid}"}`),this._writer.write(w).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let c=0;c<i.length;c++){const s=i[c],v=c===i.length-1;this._writer.write(s).then(()=>{v&&Si(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const rg={websocket:cg,webtransport:sg,polling:ug},fg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,og=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $s(f){if(f.length>8e3)throw"URI too long";const i=f,c=f.indexOf("["),s=f.indexOf("]");c!=-1&&s!=-1&&(f=f.substring(0,c)+f.substring(c,s).replace(/:/g,";")+f.substring(s,f.length));let v=fg.exec(f||""),A={},w=14;for(;w--;)A[og[w]]=v[w]||"";return c!=-1&&s!=-1&&(A.source=i,A.host=A.host.substring(1,A.host.length-1).replace(/;/g,":"),A.authority=A.authority.replace("[","").replace("]","").replace(/;/g,":"),A.ipv6uri=!0),A.pathNames=hg(A,A.path),A.queryKey=dg(A,A.query),A}function hg(f,i){const c=/\/{2,9}/g,s=i.replace(c,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&s.splice(0,1),i.slice(-1)=="/"&&s.splice(s.length-1,1),s}function dg(f,i){const c={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,v,A){v&&(c[v]=A)}),c}const Vs=typeof addEventListener=="function"&&typeof removeEventListener=="function",vi=[];Vs&&addEventListener("offline",()=>{vi.forEach(f=>f())},!1);class Yn extends Jt{constructor(i,c){if(super(),this.binaryType=Vm,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(c=i,i=null),i){const s=$s(i);c.hostname=s.host,c.secure=s.protocol==="https"||s.protocol==="wss",c.port=s.port,s.query&&(c.query=s.query)}else c.host&&(c.hostname=$s(c.host).host);_i(this,c),this.secure=c.secure!=null?c.secure:typeof location<"u"&&location.protocol==="https:",c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.hostname=c.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=c.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},c.transports.forEach(s=>{const v=s.prototype.name;this.transports.push(v),this._transportsByName[v]=s}),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},c),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Pm(this.opts.query)),Vs&&(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"})},vi.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const c=Object.assign({},this.opts.query);c.EIO=sd,c.transport=i,this.id&&(c.sid=this.id);const s=Object.assign({},this.opts,{query:c,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&Yn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const c=this.createTransport(i);c.open(),this.setTransport(c)}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",c=>this._onClose("transport close",c))}onOpen(){this.readyState="open",Yn.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 c=new Error("server error");c.code=i.data,this._onError(c);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 c=1;for(let s=0;s<this.writeBuffer.length;s++){const v=this.writeBuffer[s].data;if(v&&(c+=Jm(v)),s>0&&c>this._maxPayload)return this.writeBuffer.slice(0,s);c+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Si(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,c,s){return this._sendPacket("message",i,c,s),this}send(i,c,s){return this._sendPacket("message",i,c,s),this}_sendPacket(i,c,s,v){if(typeof c=="function"&&(v=c,c=void 0),typeof s=="function"&&(v=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const A={type:i,data:c,options:s};this.emitReserved("packetCreate",A),this.writeBuffer.push(A),v&&this.once("flush",v),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},c=()=>{this.off("upgrade",c),this.off("upgradeError",c),i()},s=()=>{this.once("upgrade",c),this.once("upgradeError",c)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():i()}):this.upgrading?s():i()),this}_onError(i){if(Yn.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,c){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(),Vs&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=vi.indexOf(this._offlineEventListener);s!==-1&&vi.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,c),this.writeBuffer=[],this._prevBufferLen=0}}}Yn.protocol=sd;class yg extends Yn{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 c=this.createTransport(i),s=!1;Yn.priorWebsocketSuccess=!1;const v=()=>{s||(c.send([{type:"ping",data:"probe"}]),c.once("packet",K=>{if(!s)if(K.type==="pong"&&K.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",c),!c)return;Yn.priorWebsocketSuccess=c.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(Y(),this.setTransport(c),c.send([{type:"upgrade"}]),this.emitReserved("upgrade",c),c=null,this.upgrading=!1,this.flush())})}else{const J=new Error("probe error");J.transport=c.name,this.emitReserved("upgradeError",J)}}))};function A(){s||(s=!0,Y(),c.close(),c=null)}const w=K=>{const J=new Error("probe error: "+K);J.transport=c.name,A(),this.emitReserved("upgradeError",J)};function V(){w("transport closed")}function U(){w("socket closed")}function R(K){c&&K.name!==c.name&&A()}const Y=()=>{c.removeListener("open",v),c.removeListener("error",w),c.removeListener("close",V),this.off("close",U),this.off("upgrading",R)};c.once("open",v),c.once("error",w),c.once("close",V),this.once("close",U),this.once("upgrading",R),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{s||c.open()},200):c.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const c=[];for(let s=0;s<i.length;s++)~this.transports.indexOf(i[s])&&c.push(i[s]);return c}}let mg=class extends yg{constructor(i,c={}){const s=typeof i=="object"?i:c;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(v=>rg[v]).filter(v=>!!v)),super(i,s)}};function gg(f,i="",c){let s=f;c=c||typeof location<"u"&&location,f==null&&(f=c.protocol+"//"+c.host),typeof f=="string"&&(f.charAt(0)==="/"&&(f.charAt(1)==="/"?f=c.protocol+f:f=c.host+f),/^(https?|wss?):\/\//.test(f)||(typeof c<"u"?f=c.protocol+"//"+f:f="https://"+f),s=$s(f)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const A=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+A+":"+s.port+i,s.href=s.protocol+"://"+A+(c&&c.port===s.port?"":":"+s.port),s}const vg=typeof ArrayBuffer=="function",pg=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f.buffer instanceof ArrayBuffer,yd=Object.prototype.toString,bg=typeof Blob=="function"||typeof Blob<"u"&&yd.call(Blob)==="[object BlobConstructor]",Sg=typeof File=="function"||typeof File<"u"&&yd.call(File)==="[object FileConstructor]";function Is(f){return vg&&(f instanceof ArrayBuffer||pg(f))||bg&&f instanceof Blob||Sg&&f instanceof File}function pi(f,i){if(!f||typeof f!="object")return!1;if(Array.isArray(f)){for(let c=0,s=f.length;c<s;c++)if(pi(f[c]))return!0;return!1}if(Is(f))return!0;if(f.toJSON&&typeof f.toJSON=="function"&&arguments.length===1)return pi(f.toJSON(),!0);for(const c in f)if(Object.prototype.hasOwnProperty.call(f,c)&&pi(f[c]))return!0;return!1}function _g(f){const i=[],c=f.data,s=f;return s.data=Zs(c,i),s.attachments=i.length,{packet:s,buffers:i}}function Zs(f,i){if(!f)return f;if(Is(f)){const c={_placeholder:!0,num:i.length};return i.push(f),c}else if(Array.isArray(f)){const c=new Array(f.length);for(let s=0;s<f.length;s++)c[s]=Zs(f[s],i);return c}else if(typeof f=="object"&&!(f instanceof Date)){const c={};for(const s in f)Object.prototype.hasOwnProperty.call(f,s)&&(c[s]=Zs(f[s],i));return c}return f}function Eg(f,i){return f.data=ks(f.data,i),delete f.attachments,f}function ks(f,i){if(!f)return f;if(f&&f._placeholder===!0){if(typeof f.num=="number"&&f.num>=0&&f.num<i.length)return i[f.num];throw new Error("illegal attachments")}else if(Array.isArray(f))for(let c=0;c<f.length;c++)f[c]=ks(f[c],i);else if(typeof f=="object")for(const c in f)Object.prototype.hasOwnProperty.call(f,c)&&(f[c]=ks(f[c],i));return f}const Tg=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ag=5;var vt;(function(f){f[f.CONNECT=0]="CONNECT",f[f.DISCONNECT=1]="DISCONNECT",f[f.EVENT=2]="EVENT",f[f.ACK=3]="ACK",f[f.CONNECT_ERROR=4]="CONNECT_ERROR",f[f.BINARY_EVENT=5]="BINARY_EVENT",f[f.BINARY_ACK=6]="BINARY_ACK"})(vt||(vt={}));class Rg{constructor(i){this.replacer=i}encode(i){return(i.type===vt.EVENT||i.type===vt.ACK)&&pi(i)?this.encodeAsBinary({type:i.type===vt.EVENT?vt.BINARY_EVENT:vt.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let c=""+i.type;return(i.type===vt.BINARY_EVENT||i.type===vt.BINARY_ACK)&&(c+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(c+=i.nsp+","),i.id!=null&&(c+=i.id),i.data!=null&&(c+=JSON.stringify(i.data,this.replacer)),c}encodeAsBinary(i){const c=_g(i),s=this.encodeAsString(c.packet),v=c.buffers;return v.unshift(s),v}}function ed(f){return Object.prototype.toString.call(f)==="[object Object]"}class tr extends Jt{constructor(i){super(),this.reviver=i}add(i){let c;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");c=this.decodeString(i);const s=c.type===vt.BINARY_EVENT;s||c.type===vt.BINARY_ACK?(c.type=s?vt.EVENT:vt.ACK,this.reconstructor=new Og(c),c.attachments===0&&super.emitReserved("decoded",c)):super.emitReserved("decoded",c)}else if(Is(i)||i.base64)if(this.reconstructor)c=this.reconstructor.takeBinaryData(i),c&&(this.reconstructor=null,super.emitReserved("decoded",c));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let c=0;const s={type:Number(i.charAt(0))};if(vt[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===vt.BINARY_EVENT||s.type===vt.BINARY_ACK){const A=c+1;for(;i.charAt(++c)!=="-"&&c!=i.length;);const w=i.substring(A,c);if(w!=Number(w)||i.charAt(c)!=="-")throw new Error("Illegal attachments");s.attachments=Number(w)}if(i.charAt(c+1)==="/"){const A=c+1;for(;++c&&!(i.charAt(c)===","||c===i.length););s.nsp=i.substring(A,c)}else s.nsp="/";const v=i.charAt(c+1);if(v!==""&&Number(v)==v){const A=c+1;for(;++c;){const w=i.charAt(c);if(w==null||Number(w)!=w){--c;break}if(c===i.length)break}s.id=Number(i.substring(A,c+1))}if(i.charAt(++c)){const A=this.tryParse(i.substr(c));if(tr.isPayloadValid(s.type,A))s.data=A;else throw new Error("invalid payload")}return s}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,c){switch(i){case vt.CONNECT:return ed(c);case vt.DISCONNECT:return c===void 0;case vt.CONNECT_ERROR:return typeof c=="string"||ed(c);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(c)&&(typeof c[0]=="number"||typeof c[0]=="string"&&Tg.indexOf(c[0])===-1);case vt.ACK:case vt.BINARY_ACK:return Array.isArray(c)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Og{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const c=Eg(this.reconPack,this.buffers);return this.finishedReconstruction(),c}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const zg=Object.freeze(Object.defineProperty({__proto__:null,Decoder:tr,Encoder:Rg,get PacketType(){return vt},protocol:Ag},Symbol.toStringTag,{value:"Module"}));function $e(f,i,c){return f.on(i,c),function(){f.off(i,c)}}const Ng=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class md extends Jt{constructor(i,c,s){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=c,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[$e(i,"open",this.onopen.bind(this)),$e(i,"packet",this.onpacket.bind(this)),$e(i,"error",this.onerror.bind(this)),$e(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,...c){var s,v,A;if(Ng.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(c.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(c),this;const w={type:vt.EVENT,data:c};if(w.options={},w.options.compress=this.flags.compress!==!1,typeof c[c.length-1]=="function"){const Y=this.ids++,K=c.pop();this._registerAckCallback(Y,K),w.id=Y}const V=(v=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||v===void 0?void 0:v.writable,U=this.connected&&!(!((A=this.io.engine)===null||A===void 0)&&A._hasPingExpired());return this.flags.volatile&&!V||(U?(this.notifyOutgoingListeners(w),this.packet(w)):this.sendBuffer.push(w)),this.flags={},this}_registerAckCallback(i,c){var s;const v=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(v===void 0){this.acks[i]=c;return}const A=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let V=0;V<this.sendBuffer.length;V++)this.sendBuffer[V].id===i&&this.sendBuffer.splice(V,1);c.call(this,new Error("operation has timed out"))},v),w=(...V)=>{this.io.clearTimeoutFn(A),c.apply(this,V)};w.withError=!0,this.acks[i]=w}emitWithAck(i,...c){return new Promise((s,v)=>{const A=(w,V)=>w?v(w):s(V);A.withError=!0,c.push(A),this.emit(i,...c)})}_addToQueue(i){let c;typeof i[i.length-1]=="function"&&(c=i.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((v,...A)=>s!==this._queue[0]?void 0:(v!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),c&&c(v)):(this._queue.shift(),c&&c(null,...A)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const c=this._queue[0];c.pending&&!i||(c.pending=!0,c.tryCount++,this.flags=c.flags,this.emit.apply(this,c.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:vt.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,c){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,c),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(s=>String(s.id)===i)){const s=this.acks[i];delete this.acks[i],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case vt.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 vt.EVENT:case vt.BINARY_EVENT:this.onevent(i);break;case vt.ACK:case vt.BINARY_ACK:this.onack(i);break;case vt.DISCONNECT:this.ondisconnect();break;case vt.CONNECT_ERROR:this.destroy();const s=new Error(i.data.message);s.data=i.data.data,this.emitReserved("connect_error",s);break}}onevent(i){const c=i.data||[];i.id!=null&&c.push(this.ack(i.id)),this.connected?this.emitEvent(c):this.receiveBuffer.push(Object.freeze(c))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const c=this._anyListeners.slice();for(const s of c)s.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 c=this;let s=!1;return function(...v){s||(s=!0,c.packet({type:vt.ACK,id:i,data:v}))}}onack(i){const c=this.acks[i.id];typeof c=="function"&&(delete this.acks[i.id],c.withError&&i.data.unshift(null),c.apply(this,i.data))}onconnect(i,c){this.id=i,this.recovered=c&&this._pid===c,this._pid=c,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:vt.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 c=this._anyListeners;for(let s=0;s<c.length;s++)if(i===c[s])return c.splice(s,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 c=this._anyOutgoingListeners;for(let s=0;s<c.length;s++)if(i===c[s])return c.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const c=this._anyOutgoingListeners.slice();for(const s of c)s.apply(this,i.data)}}}function Pl(f){f=f||{},this.ms=f.min||100,this.max=f.max||1e4,this.factor=f.factor||2,this.jitter=f.jitter>0&&f.jitter<=1?f.jitter:0,this.attempts=0}Pl.prototype.duration=function(){var f=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),c=Math.floor(i*this.jitter*f);f=(Math.floor(i*10)&1)==0?f-c:f+c}return Math.min(f,this.max)|0};Pl.prototype.reset=function(){this.attempts=0};Pl.prototype.setMin=function(f){this.ms=f};Pl.prototype.setMax=function(f){this.max=f};Pl.prototype.setJitter=function(f){this.jitter=f};class Ks extends Jt{constructor(i,c){var s;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(c=i,i=void 0),c=c||{},c.path=c.path||"/socket.io",this.opts=c,_i(this,c),this.reconnection(c.reconnection!==!1),this.reconnectionAttempts(c.reconnectionAttempts||1/0),this.reconnectionDelay(c.reconnectionDelay||1e3),this.reconnectionDelayMax(c.reconnectionDelayMax||5e3),this.randomizationFactor((s=c.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Pl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(c.timeout==null?2e4:c.timeout),this._readyState="closed",this.uri=i;const v=c.parser||zg;this.encoder=new v.Encoder,this.decoder=new v.Decoder,this._autoConnect=c.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 c;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(c=this.backoff)===null||c===void 0||c.setMin(i),this)}randomizationFactor(i){var c;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(c=this.backoff)===null||c===void 0||c.setJitter(i),this)}reconnectionDelayMax(i){var c;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(c=this.backoff)===null||c===void 0||c.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 mg(this.uri,this.opts);const c=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const v=$e(c,"open",function(){s.onopen(),i&&i()}),A=V=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",V),i?i(V):this.maybeReconnectOnOpen()},w=$e(c,"error",A);if(this._timeout!==!1){const V=this._timeout,U=this.setTimeoutFn(()=>{v(),A(new Error("timeout")),c.close()},V);this.opts.autoUnref&&U.unref(),this.subs.push(()=>{this.clearTimeoutFn(U)})}return this.subs.push(v),this.subs.push(w),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push($e(i,"ping",this.onping.bind(this)),$e(i,"data",this.ondata.bind(this)),$e(i,"error",this.onerror.bind(this)),$e(i,"close",this.onclose.bind(this)),$e(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(c){this.onclose("parse error",c)}}ondecoded(i){Si(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,c){let s=this.nsps[i];return s?this._autoConnect&&!s.active&&s.connect():(s=new md(this,i,c),this.nsps[i]=s),s}_destroy(i){const c=Object.keys(this.nsps);for(const s of c)if(this.nsps[s].active)return;this._close()}_packet(i){const c=this.encoder.encode(i);for(let s=0;s<c.length;s++)this.engine.write(c[s],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,c){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,c),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 c=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(v=>{v?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",v)):i.onreconnect()}))},c);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const tu={};function bi(f,i){typeof f=="object"&&(i=f,f=void 0),i=i||{};const c=gg(f,i.path||"/socket.io"),s=c.source,v=c.id,A=c.path,w=tu[v]&&A in tu[v].nsps,V=i.forceNew||i["force new connection"]||i.multiplex===!1||w;let U;return V?U=new Ks(s,i):(tu[v]||(tu[v]=new Ks(s,i)),U=tu[v]),c.query&&!i.query&&(i.query=c.queryKey),U.socket(c.path,i)}Object.assign(bi,{Manager:Ks,Socket:md,io:bi,connect:bi});function xg({code:f,isConnected:i,onCreateRoom:c,onJoinRoom:s,joinCode:v,setJoinCode:A}){const w=()=>{if(v){const U=v.trim();s(U)}},V=U=>{U.key==="Enter"&&w()};return Q.jsx("div",{className:"mb-2",children:f?Q.jsx(Q.Fragment,{children:Q.jsxs("p",{className:"text-lg",children:["Code: ",Q.jsx("strong",{className:"text-3xl",children:f})]})}):Q.jsxs(Q.Fragment,{children:[Q.jsx("button",{onClick:c,className:"bg-purple-600 text-darkPurple px-4 py-2 rounded hover:bg-purple-500",children:"Create Room"}),Q.jsxs("div",{className:"inline-block whitespace-nowrap",children:[Q.jsx("input",{type:"text",className:"width-212",value:v,onChange:U=>A(U.target.value),onKeyDown:V,placeholder:"Enter code to join"}),Q.jsx("button",{onClick:w,className:"bg-purple-600 text-darkPurple px-4 py-2 rounded hover:bg-purple-500",children:"Join"})]})]})})}function Dg({files:f,setFiles:i,dataChannels:c,dataChannelsRef:s,useFallback:v,socket:A,code:w,socketId:V,localFilesRef:U,downloadStates:R,setDownloadStates:Y,cancelDownload:K,cancelRequestsRef:J,downloadCounts:pt,handleDeleteFile:qt,SERVER_URL:Ct}){const Ht=lt.useRef(null),Bt=lt.useRef({}),he=(C,at=256)=>new Promise(ht=>{if(!C.type.startsWith("image/")){ht(null);return}const rt=new Image,At=document.createElement("canvas"),Vt=At.getContext("2d");rt.onload=()=>{const{width:Oe,height:Gt}=rt,T=Math.min(at/Oe,at/Gt,1);At.width=Oe*T,At.height=Gt*T,Vt.drawImage(rt,0,0,At.width,At.height),At.toBlob(j=>{ht(j)},"image/jpeg",.7)},rt.src=URL.createObjectURL(C)}),it=async()=>{const C=Ht.current.files;if(!C||C.length===0)return;const at=Array.from(C).map(ht=>({name:ht.name,size:ht.size,peerId:V,thumbnail:!!ht.type.startsWith("image/")}));if(v){const ht=new FormData;Array.from(C).forEach(rt=>ht.append("files",rt));try{if(!(await fetch(`${Ct}/api/upload/${w}`,{method:"POST",body:ht,headers:{"x-socket-id":V}})).ok)throw new Error("File upload failed");console.log("Files uploaded to server:",at)}catch(rt){console.error("Error uploading files:",rt)}}else{const ht=await Promise.all(Array.from(C).map(async rt=>({name:rt.name,thumbnail:rt.type.startsWith("image/")?await he(rt):null})));U.current={...U.current,...Object.fromEntries(Array.from(C).map(rt=>[rt.name,rt])),...Object.fromEntries(ht.filter(({thumbnail:rt})=>rt).map(({name:rt,thumbnail:At})=>[`${rt}_thumbnail`,At]))},ht.forEach(({name:rt,thumbnail:At})=>{if(At){const Vt=URL.createObjectURL(At);Bt.current[rt]=Vt,console.log(`Cached thumbnail URL for ${rt}: ${Vt}`)}}),console.log("Stored files in localFilesRef:",Object.keys(U.current)),A.emit("file-list",{code:w,files:at}),console.log("Shared file list:",at)}i(ht=>[...ht,...at]),Ht.current.value=""},le=async C=>{if(J.current.has(C.name)&&(J.current.delete(C.name),console.log(`Cleared previous cancel for ${C.name}, starting new request to ${C.peerId}`)),R[C.name]?.status==="downloading"){K(C.name,C.peerId),console.log(`Canceling download for ${C.name}`);return}if(Y(at=>({...at,[C.name]:{status:"downloading",progress:0,total:C.size,peerId:C.peerId}})),console.log(`Starting download for ${C.name}, downloadStates:`,{...R,[C.name]:{status:"downloading",progress:0}}),v){A.emit("download-start-fallback",{code:w,fileName:C.name});const at=document.createElement("a");at.href=`${Ct}/uploads/${C.path.split("/").pop()}`,at.download=C.name,at.click(),console.log(`Downloading file via server: ${C.name}`),Y(ht=>({...ht,[C.name]:{status:"completed",progress:100}})),A.emit("download-end-fallback",{code:w,fileName:C.name})}else if(C.peerId===V){const at=U.current[C.name]||f.find(ht=>ht.name===C.name)?.file;if(at){A.emit("download-start-fallback",{code:w,fileName:C.name});const ht=URL.createObjectURL(at),rt=document.createElement("a");rt.href=ht,rt.download=C.name,rt.click(),URL.revokeObjectURL(ht),console.log(`Downloaded local file: ${C.name}`),Y(At=>({...At,[C.name]:{status:"saved",progress:100}})),A.emit("download-end-fallback",{code:w,fileName:C.name})}else console.error(`Local file not found: ${C.name}`)}else c[C.peerId]?.readyState==="open"?(s.current[C.peerId].send(JSON.stringify({type:"request-file",fileName:C.name})),console.log(`Requested file ${C.name} from ${C.peerId}`)):console.error(`Data channel not open for peer ${C.peerId}`)},ut=C=>{const at=C.split(".").pop().toLowerCase();return`/imgs/${{exe:"executable.png",bin:"executable.png",dll:"executable.png",jpg:"picture.png",jpeg:"picture.png",png:"picture.png",gif:"picture.png",mp3:"audio.png",wav:"audio.png",ogg:"audio.png",mp4:"video.png",mkv:"video.png",avi:"video.png",mov:"video.png",wma:"video.png",pdf:"unknown.png",doc:"unknown.png",docx:"unknown.png",txt:"text.png",log:"text.png",bat:"script.png",sh:"script.png",html:"html.png",xml:"xml.png",zip:"archive.png",gz:"archive.png",bz:"archive.png"}[at]||"unknown.png"}`},Wt=C=>C?C<1024?`${C} B`:C<1024*1024?`${(C/1024).toFixed(2)} KB`:C<1024*1024*1024?`${(C/(1024*1024)).toFixed(2)} MB`:`${(C/(1024*1024*1024)).toFixed(2)} GB`:"Unknown",bt=C=>{if(!C.thumbnail)return console.log(`No thumbnail flag for ${C.name}`),null;if(Bt.current[C.name])return Bt.current[C.name];const at=U.current[`${C.name}_thumbnail`];if(at){const ht=URL.createObjectURL(at);return Bt.current[C.name]=ht,console.log(`Generated and cached thumbnail URL for ${C.name}: ${ht}`),ht}return console.log(`No thumbnail available for ${C.name}`),null};return lt.useEffect(()=>()=>{Object.values(Bt.current).forEach(C=>{C&&URL.revokeObjectURL(C)}),Bt.current={},console.log("Revoked all thumbnail URLs on unmount")},[]),Q.jsxs("div",{children:[Q.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Files"}),Q.jsx("input",{type:"file",multiple:!0,ref:Ht,onChange:it,className:"mb-2"}),Q.jsx("ul",{className:"space-y-2",children:f.map((C,at)=>(R[C.name]?.status==="downloading"||R[C.name]?.status,Q.jsxs("li",{className:"flex items-center space-x-2",children:[C.thumbnail&&Q.jsx("img",{src:bt(C)||ut(C.name),alt:`${C.name} preview`,className:"w-16 h-16 object-cover mr-2",onError:()=>{console.log(`Thumbnail failed to load for ${C.name}, requesting...`)}})||Q.jsx("img",{src:ut(C.name),alt:"file icon",className:"w-6 h-6",onError:ht=>ht.target.style.display="none"}),Q.jsxs("span",{children:["(",Wt(C.size),")"]}),C.peerId!==V&&Q.jsx("button",{onClick:()=>le(C),className:`px-4 py-2 rounded ${R[C.name]?.status==="saved"?"bg-green-500 text-white":R[C.name]?.status==="downloading"?"bg-yellow-500 text-black":"bg-purple-600 text-darkPurple hover:bg-purple-500"}`,children:R[C.name]?.status==="saved"?"Saved ✓":R[C.name]?.status==="downloading"?`Cancel ${(R[C.name]?.progress||0).toFixed(2)}%`:"Download"}),C.peerId===V&&Q.jsx(Q.Fragment,{children:Q.jsx("button",{onClick:()=>qt(C.name),className:"bg-rose-800 text-darkPurple px-4 py-2 rounded hover:bg-rose-700",children:"Delete"})}),pt[C.name]>0&&Q.jsxs("span",{children:[pt[C.name]," downloading"]}),Q.jsx("span",{children:C.name})]},at)))})]})}function Ug({textHistory:f,setTextHistory:i,dataChannels:c,useFallback:s,socket:v,code:A}){const[w,V]=lt.useState(""),U=()=>{w.trim()&&(console.log("handleSend:",{dataChannels:c,useFallback:s,code:A}),!s&&Object.keys(c).length>0?Object.keys(c).forEach(K=>{c[K].readyState==="open"&&(c[K].send(JSON.stringify({type:"text",text:w})),console.log(`Sent text to peer ${K}`))}):s&&v&&A&&(v.emit("text",{code:A,text:w}),console.log(`Sending text via socket for room ${A}: ${w}`)),i(K=>[...K,w]),V(""))},R=K=>{K.key==="Enter"&&!K.shiftKey&&(K.preventDefault(),U())},Y=K=>{const J=document.getElementById(`msg-${K}`);if(J&&window.getSelection){const pt=window.getSelection();pt.removeAllRanges();const qt=document.createRange();qt.selectNodeContents(J),pt.addRange(qt)}else console.warn(`Element msg-${K} not found or selection API unavailable`)};return Q.jsxs("div",{className:"mb-4",children:[Q.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Share Text"}),Q.jsx("textarea",{className:"w-full p-2 border rounded bg-pink-100 text-purple-900",value:w,onChange:K=>V(K.target.value),onKeyDown:R,placeholder:"Enter text to share"}),Q.jsx("button",{className:"bg-emerald-600 text-darkPurple px-4 py-2 rounded hover:bg-emerald-500",onClick:U,children:"Send"}),Q.jsx("br",{}),Q.jsxs("div",{className:"mt-2",id:"textview",children:[Q.jsx("h3",{className:"text-lg font-semibold",children:"Messages"}),Q.jsx("ul",{className:"list-disc pl-5",children:f?.length>0?f.map((K,J)=>Q.jsxs("li",{children:[Q.jsx("button",{className:"bg-sky-600 text-darkPurple px-4 py-2 rounded hover:bg-sky-500",onClick:()=>Y(J),children:"{}"}),Q.jsx("pre",{id:`msg-${J}`,children:K})]},J)):Q.jsx("li",{children:Q.jsx("pre",{children:"No messages yet"})})})]})]})}const nd="",G=bi("/",{withCredentials:!0});function Mg(){const[f,i]=lt.useState(!0),[c,s]=lt.useState(""),[v,A]=lt.useState(""),[w,V]=lt.useState(!1),[U,R]=lt.useState(!1),[Y,K]=lt.useState(!1),[J,pt]=lt.useState(!1),[qt,Ct]=lt.useState(600),[Ht,Bt]=lt.useState([]),[he,it]=lt.useState(""),[le,ut]=lt.useState({}),[Wt,bt]=lt.useState([]),[C,at]=lt.useState({}),[ht,rt]=lt.useState([]),[At,Vt]=lt.useState({}),[Oe,Gt]=lt.useState(0),T=lt.useRef({}),j=lt.useRef([]),k=lt.useRef({}),ft=lt.useRef(new Set),y=lt.useRef({}),N=lt.useRef(new Set),H=lt.useRef({}),B=lt.useRef({}),Z=lt.useRef({}),I=lt.useRef({}),nt=lt.useRef(0),Et=lt.useRef({}),dt=lt.useRef({}),de=lt.useRef(Ht);window.binaryStateRef=Et,window.localFilesRef=T,window.downloadStates=C,lt.useEffect(()=>{window.downloadStates=C},[C]),lt.useEffect(()=>{de.current=Ht},[Ht]);const cl=window.location.protocol,Xn=window.location.hostname||"localhost",Gn=(c||"").replace(/ /g,"_"),Il=`${cl}//${Xn}/room/${Gn||""}`,sl=async h=>{if(!navigator.clipboard){console.error("Clipboard API not available. Ensure the app is running in a secure context (https or localhost).");return}try{const O=h==="link"?Il:Gn;await navigator.clipboard.writeText(O),V(h),setTimeout(()=>V(null),2e3)}catch(O){console.error(`Failed to copy ${h}:`,O)}},Ei=async()=>{try{const h=await fetch(`${nd}/api/generate-code`,{method:"GET",credentials:"include"}),{code:O,error:q}=await h.json();if(q){it(q);return}s(O),R(!0),it(""),pt(!1),G.emit("create",O,g=>{g?.error?(console.error(`Create room failed: ${g.error}`),it(`Failed to create room: ${g.error}`)):console.log(`Successfully created room ${O}`)})}catch(h){console.error("Error generating code:",h),it("Failed to generate room code")}},rl=h=>{if(!h){it("Please enter a room code");return}const O=h.replace(/_/g," ");s(O),it(""),pt(!1),G.emit("join",O,q=>{if(!q||q.error){const g=q?.error||"Failed to join room";g.includes("Already in room")?(bt([]),it(""),Gt(D=>D+1),console.error(`Re-enter room: ${g}`)):(console.error(`Join room failed: ${g}`),retryCount<3?(console.log(`Retrying join room ${O}, attempt ${retryCount+1}/3`),setTimeout(()=>rl(h,retryCount+1),2e3)):(yn(),it(`Failed to join room after retries: ${g}`),window.history.pushState({},"","/")))}else console.log(`Successfully joined room ${O}`),it("")})},ze=()=>{G.emit("leave",c,h=>{h?.error?(console.error(`Leave room failed: ${h.error}`),it(`Failed to leave room: ${h.error}`),yn(),bt([]),s(""),A(""),T.current={},j.current=[],window.history.pushState({},"","/")):(console.log(`Successfully left room ${c}: ${h.message}`),yn(),bt([]),s(""),A(""),T.current={},j.current=[],window.history.pushState({},"","/"))})},yn=()=>{s(""),R(!1),K(!1),pt(!1),Ct(600),bt([]),Bt([]),it(""),ut({}),rt([]),Vt({}),T.current={},Object.values(H.current).forEach(h=>{h.onicecandidate=null,h.oniceconnectionstatechange=null,h.onicecandidateerror=null,h.ondatachannel=null,h.onnegotiationneeded=null,h.close()}),Object.values(B.current).forEach(h=>{h.readyState==="open"&&h.close()}),Object.values(Z.current).forEach(h=>{h.readyState==="open"&&h.close()}),H.current={},B.current={},Z.current={},Object.keys(I.current).forEach(h=>clearTimeout(I.current[h])),I.current={},k.current={},ft.current=new Set,y.current={},N.current=new Set,Et.current={},dt.current={}},fl=(h,O,q=!1)=>{if(!h||h===G.id||h==="true"){console.log(`Skipping WebRTC setup for invalid peerId: ${h}`);return}if(J){console.log(`Skipping WebRTC setup for ${h} due to fallback mode`);return}if(H.current[h]){console.log(`WebRTC connection already exists for ${h}, skipping setup`);return}console.log(`Setting up WebRTC with peer ${h} (${q?"offerer":"answerer"}, attempt ${k.current[h]||1}/3)`);const g=new RTCPeerConnection({iceServers:[{urls:"turn:twily.info:5349",username:"ana",credential:"butt"},{urls:"stun:stun.l.google.com:19302"}]});k.current[h]=(k.current[h]||0)+1,H.current[h]=g,g.ondatachannel=L=>{const X=L.channel;X.label==="file-share"?(B.current[h]=X,X.onopen=()=>{console.log(`Main DataChannel opened with peer ${h}`),K(!0),Ct(0),Object.keys(I.current).forEach(ct=>{console.log(`Clearing timeout for ${ct}`),clearTimeout(I.current[ct])}),I.current={},k.current[h]=0,B.current.true&&delete B.current.true,ut({...B.current});const St=j.current.map(ct=>({name:ct.name,size:ct.size,peerId:ct.peerId,thumbnail:!!T.current[`${ct.name}_thumbnail`]}));X.send(JSON.stringify({type:"file-list",files:St})),St.forEach(ct=>{const Zt=`${ct.name}:${ct.peerId}`;ct.thumbnail&&ct.peerId!==G.id&&!T.current[`${ct.name}_thumbnail`]&&!N.current.has(Zt)&&mn(ct)}),U&&setTimeout(()=>{X.readyState==="open"?(X.send(JSON.stringify({type:"text-history",history:de.current})),console.log(`Sent text-history to ${h}:`,de.current)):console.warn(`Main channel not open for ${h}, skipping text-history send`)},1e3)},X.onmessage=St=>gn(h,St),X.onclose=()=>{console.log(`Main DataChannel closed with peer ${h}`),delete H.current[h],ut({...B.current})},X.onerror=St=>{console.error(`Main DataChannel error with ${h}:`,St)}):X.label==="binary-transfer"&&(X.binaryType="arraybuffer",Z.current[h]=X,X.onmessage=St=>ce(h,St),X.onclose=()=>{console.log(`Binary channel closed with peer ${h}`)},X.onerror=St=>{console.error(`Binary channel error with ${h}:`,St)})};let D=null,tt=null;return q&&(D=g.createDataChannel("file-share"),B.current[h]=D,D.onopen=()=>{console.log(`Main DataChannel opened with peer ${h} (joiner)`),K(!0),Ct(0),Object.keys(I.current).forEach(X=>{console.log(`Clearing timeout for ${X}`),clearTimeout(I.current[X])}),I.current={},k.current[h]=0,B.current.true&&delete B.current.true,ut({...B.current});const L=j.current.map(X=>({name:X.name,size:X.size,peerId:X.peerId,thumbnail:!!T.current[`${X.name}_thumbnail`]}));D.send(JSON.stringify({type:"file-list",files:L})),L.forEach(X=>{const St=`${X.name}:${X.peerId}`;X.thumbnail&&X.peerId!==G.id&&!T.current[`${X.name}_thumbnail`]&&!N.current.has(St)&&mn(X)}),U&&setTimeout(()=>{D.readyState==="open"?(D.send(JSON.stringify({type:"text-history",history:de.current})),console.log(`Sent text-history to ${h}:`,de.current)):console.warn(`Main channel not open for ${h}, skipping text-history send`)},1e3)},D.onmessage=L=>gn(h,L),D.onclose=()=>{console.log(`Main DataChannel closed with peer ${h}`),delete H.current[h],ut({...B.current})},D.onerror=L=>{console.error(`Main DataChannel error with ${h}:`,L)},tt=g.createDataChannel("binary-transfer"),tt.binaryType="arraybuffer",Z.current[h]=tt,tt.onmessage=L=>ce(h,L),tt.onclose=()=>{console.log(`Binary channel closed with peer ${h}`)},tt.onerror=L=>{console.error(`Binary channel error with ${h}:`,L)}),g.onicecandidate=L=>{L.candidate&&O&&(G.emit("ice-candidate",{code:O,candidate:L.candidate,to:h,from:G.id}),console.log(`Sent ICE candidate to ${h} from ${G.id}: ${L.candidate.candidate}`))},g.onicecandidateerror=L=>{console.error(`ICE candidate error for ${h}:`,L)},g.oniceconnectionstatechange=()=>{console.log(`ICE state with ${h} (${U?"creator":"joiner"}): ${g.iceConnectionState}`),typeof k.current[h]<"u"?g.iceConnectionState==="failed"||g.iceConnectionState==="disconnected"?(console.log(`WebRTC ${g.iceConnectionState} with ${h}, retrying in 5s (attempt ${k.current[h]}/3)`),setTimeout(()=>{g.iceConnectionState!=="connected"&&!J&&k.current[h]<3?fl(h,O,q):g.iceConnectionState!=="connected"&&!J&&(console.log(`Max retries reached for ${h}, switching to fallback`),pt(!0),it("WebRTC connection failed after retries, using server fallback"),Ct(0),bt([]),Bt([]),U&&G.emit("fallback",{code:O}))},5e3)):g.iceConnectionState==="connected"&&(K(!0),pt(!1),it(""),clearTimeout(I.current[h]),k.current[h]=0):(console.log(`err: peerId ${h} not found in retryCountsRef`),pt(!1))},g.onnegotiationneeded=async()=>{try{const L=await g.createOffer();await g.setLocalDescription(L),G.emit("offer",{code:O,offer:g.localDescription,to:h,from:G.id}),console.log(`Sent renegotiation offer to ${h} for room ${O}`)}catch(L){console.error(`Negotiation needed error for ${h}:`,L)}},q&&g.createOffer().then(L=>{g.setLocalDescription(L),G.emit("offer",{code:O,offer:L,to:h,from:G.id}),console.log(`Sent offer to ${h} for room ${O}`)}).catch(L=>{console.error(`Error creating offer for ${h}:`,L),it("Failed to create WebRTC offer"),pt(!0),Ct(0),bt([]),Bt([]),U&&G.emit("fallback",{code:O})}),()=>clearTimeout(I.current[h])};lt.useEffect(()=>(G.on("peer-joined",h=>{if(!h||!h.peerId||h.peerId==="true"){console.error("Invalid peer-joined data:",h);return}const{peerId:O}=h;console.log(`Peer ${O} joined room ${c}`),fl(O,c,!0)}),G.on("peer-left",h=>{const{peerId:O}=h;if(H.current[O]){H.current[O].close(),B.current[O]?.readyState==="open"&&B.current[O].close(),Z.current[O]?.readyState==="open"&&Z.current[O].close(),delete H.current[O],delete B.current[O],delete Z.current[O],delete I.current[O],Object.keys(Et.current).forEach(g=>{Et.current[g].peerId===O&&(delete Et.current[g],N.current.delete(`${Et.current[g]?.fileName}:${O}`))}),ut({...B.current}),console.log(`Peer ${O} left room`),bt(g=>{const D=g.filter(tt=>tt.peerId!==O);return Object.values(B.current).forEach(tt=>{tt.readyState==="open"&&tt.send(JSON.stringify({type:"file-list",files:D.map(L=>({name:L.name,size:L.size,peerId:L.peerId,thumbnail:!!T.current[`${L.name}_thumbnail`]}))}))}),D});let q=!1;Object.keys(dt.current).forEach(g=>{dt.current[g].delete(O)&&(q=!0,ta(g,dt.current[g].size))}),q&&Vt(g=>({...g}))}U&&Object.keys(H.current).length===0&&(K(!1),J?(pt(!1),it("")):Ct(600))}),G.on("offer",async({code:h,offer:O,to:q,from:g})=>{if(q!==G.id||J||h!==c){console.log(`Ignoring offer from ${g} (to=${q}, socket.id=${G.id}, useFallback=${J}, code mismatch: ${h} vs ${c})`);return}console.log(`Received offer from ${g} for room ${h}`),H.current[g]||(console.log(`No existing connection for ${g}, setting up as answerer`),fl(g,h,!1));try{const D=H.current[g];await D.setRemoteDescription(new RTCSessionDescription(O));const tt=await D.createAnswer();await D.setLocalDescription(tt),G.emit("answer",{code:h,answer:tt,to:g,from:G.id}),console.log(`Sent answer to ${g} from ${G.id} for room ${h}`)}catch(D){console.error(`Error handling offer from ${g}:`,D),it("Failed to process WebRTC offer"),pt(!0),Ct(0),bt([]),Bt([]),U&&G.emit("fallback",{code:h})}}),G.on("answer",async({code:h,answer:O,to:q,from:g})=>{if(q!==G.id||J||h!==c){console.log(`Ignoring answer from ${g} (to=${q}, socket.id=${G.id}, useFallback=${J}, code mismatch: ${h} vs ${c})`);return}if(console.log(`Received answer from ${g} for room ${h}`),H.current[g])try{await H.current[g].setRemoteDescription(new RTCSessionDescription(O)),console.log(`Successfully set remote description for answer from ${g}`)}catch(D){console.error(`Error handling answer from ${g}:`,D),it("Failed to process WebRTC answer"),pt(!0),Ct(0),bt([]),Bt([]),U&&G.emit("fallback",{code:h})}else console.warn(`No peer connection found for ${g} when receiving answer`)}),G.on("room-status",({useFallback:h,textHistory:O,files:q})=>{h&&(console.log(`Received room-status: useFallback=${h}, textHistory=`,O),pt(h),Bt(O||[]),bt(q||[]),K(!0),Ct(0),it("Room is in fallback mode"))}),G.on("fallback",()=>{console.log(`Received fallback signal for room ${roomCode}`),pt(!0),it("Room switched to fallback mode"),Ct(0),bt([]),Bt([]),Vt({}),Object.values(H.current).forEach(h=>h.close()),H.current={},B.current={},Z.current={},Object.keys(I.current).forEach(h=>clearTimeout(I.current[h])),I.current={},k.current={},N.current=new Set}),G.on("ice-candidate",async({code:h,candidate:O,from:q,to:g})=>{if(g!==G.id||h!==c){console.log(`Ignoring ICE candidate from ${q} (to=${g}, code mismatch: ${h} vs ${c})`);return}if(console.log(`Received ICE candidate from ${q}`),H.current[q])try{await H.current[q].addIceCandidate(new RTCIceCandidate(O)),console.log(`Added ICE candidate from ${q}`)}catch(D){console.error(`Error adding ICE candidate from ${q}:`,D)}else console.warn(`No peer connection found for ${q} when receiving ICE candidate`)}),G.on("error",h=>{yn(),console.log("Server error:",h),it(h),h.includes("Invalid code")||h.includes("room not found")?window.history.pushState({},"","/"):h.includes("Room closed by")&&A("")}),G.on("files",h=>{console.log("Received files:",h),bt(h)}),G.on("text",({text:h})=>{console.log(`Received text via socket for room ${c}:`,h),Bt(O=>[...O,h])}),G.on("file-list",({files:h})=>{bt(O=>{const q=h.filter(g=>!O.some(D=>D.name===g.name&&D.peerId===g.peerId)).map(g=>({...g,peerId:g.peerId||"unknown"}));return q.forEach(g=>{const D=`${g.name}:${g.peerId}`;g.thumbnail&&!T.current[`${g.name}_thumbnail`]&&!N.current.has(D)?(console.log(`Requesting thumbnail for ${g.name} from ${g.peerId}`),mn(g)):g.thumbnail&&console.log(`Thumbnail for ${g.name} already cached or requested, skipping request`)}),console.log("Received file-list from server:",h),[...O,...q]})}),G.on("update-count-fallback",({fileName:h,count:O})=>{Vt(q=>({...q,[h]:O}))}),G.on("room-status-check",({exists:h,isInRoom:O})=>{h?O||(console.log(`Rejoining room ${c}`),rl(c)):(yn(),it("Room closed"),A(""),console.log(`Room ${c} closed`))}),()=>{G.off("peer-joined"),G.off("offer"),G.off("answer"),G.off("room-status"),G.off("fallback"),G.off("peer-left"),G.off("ice-candidate"),G.off("error"),G.off("files"),G.off("text"),G.off("file-list"),G.off("update-count-fallback"),G.off("room-status-check")}),[c,U,J]),lt.useEffect(()=>{const h=()=>{c&&(G.emit("check-room-status",c),console.log(`Reconnected, checking room status for ${c}`))};return G.io.on("reconnect",h),()=>{G.io.off("reconnect",h)}},[c]),lt.useEffect(()=>{const h=()=>{document.visibilityState==="visible"&&c&&(G.disconnected&&(G.connect(),console.log("Tab visible, reconnecting socket")),G.emit("check-room-status",c),console.log(`Tab visible, checking room status for ${c}`))};return document.addEventListener("visibilitychange",h),()=>{document.removeEventListener("visibilitychange",h)}},[c]),lt.useEffect(()=>{if(U&&qt>0&&!Y&&!J){const h=setInterval(()=>{Ct(O=>O<=1?(yn(),it("No one joined the room"),0):O-1)},1e3);return()=>clearInterval(h)}},[U,qt,Y,J,c]),lt.useEffect(()=>{j.current=Wt,console.log("Updated filesRef:",j.current)},[Wt]),lt.useEffect(()=>{const h=Object.keys(H.current);rt([G.id,...h].sort())},[le,Oe]),lt.useEffect(()=>{if(!c){const h=window.location.pathname;if(h.startsWith("/room/")){const O=h.slice(6).replace(/_/g," ");rl(O)}}},[]);const mn=h=>{const O=`${h.name}:${h.peerId}`;if(h.thumbnail&&h.peerId!==G.id&&!J){const q=(y.current[h.name]||0)+1;if(q>3){console.error(`Max retries reached for thumbnail ${h.name} from ${h.peerId}`);return}if(N.current.has(O)){console.log(`Thumbnail request for ${h.name} from ${h.peerId} already in progress, skipping`);return}const g=B.current[h.peerId];g?.readyState==="open"?(y.current[h.name]=q,N.current.add(O),g.send(JSON.stringify({type:"request-thumbnail",fileName:h.name})),console.log(`Requested thumbnail for ${h.name} from ${h.peerId} via WebRTC (retry ${q})`)):(console.warn(`Data channel not ready for ${h.peerId}, retrying in 1s`),setTimeout(()=>{N.current.has(O)||mn(h)},1e3))}else console.error(`Cannot request thumbnail for ${h.name}:`,{isThumbnail:h.thumbnail,isLocal:h.peerId===G.id,useFallback:J,channelOpen:B.current[h.peerId]?.readyState})},ol=async(h,O,q,g)=>{const D=Z.current[h];if(!D||D.readyState!=="open"){console.error(`Binary channel not open for ${h}`);return}if(g.size>100*1024){console.warn(`Thumbnail ${q} size ${g.size} exceeds 100KB limit, skipping`);return}const tt=nt.current++;console.log(`Sending ${O} ${q} to ${h}, size: ${g.size}`),D.send(JSON.stringify({type:"start",transferId:tt,kind:O,fileName:q,size:g.size}));const L=new FileReader;L.onload=()=>{const X=L.result,St=new TextEncoder().encode(q),ct=8+St.length,Zt=new ArrayBuffer(ct+X.byteLength),Tt=new DataView(Zt);Tt.setUint32(0,tt),Tt.setUint32(4,St.length),new Uint8Array(Zt).set(St,8),new Uint8Array(Zt).set(new Uint8Array(X),ct),D.send(Zt),D.send(JSON.stringify({type:"end",transferId:tt}))},L.onerror=X=>{console.error(`Error reading ${O} ${q} for ${h}:`,X)},L.readAsArrayBuffer(g)},Ti=async(h,O,q)=>{if(!O){console.error(`No fileName provided for sendFileChunked to ${h}`);return}const g=Z.current[h];if(!g||g.readyState!=="open"){console.error(`Binary channel not open for ${h}`);return}ft.current.has(O)&&(ft.current.delete(O),console.log(`Cleared previous cancel for ${O}, starting new send to ${h}`));const D=nt.current++;console.log(`Sending start message for file ${O} to ${h}, transferId: ${D}, size: ${q.size}`),g.send(JSON.stringify({type:"start",transferId:D,kind:"file",fileName:O,size:q.size}));const tt=8*1024*1024,L=4*1024*1024;g.bufferedAmountLowThreshold=L;let X;g.onbufferedamountlow=()=>{X&&(X(),X=null)};const St=()=>g.bufferedAmount<=tt?Promise.resolve():new Promise(Tt=>{X=Tt});await St();const ct=16384;let Zt=0;for(console.log(`--- offset : ${Zt} --- file.size : ${q.size}`);Zt<q.size;){if(ft.current.has(O)){console.log(`Canceled sending ${O} to ${h}`),g.send(JSON.stringify({type:"cancel",transferId:D}));return}const Tt=q.slice(Zt,Zt+ct);if(console.log(`--- slice.size : ${Tt.size}`),Tt.size===0)break;try{const Ye=await new Promise((na,la)=>{const hl=new FileReader;hl.onload=Ri=>na(Ri.target.result),hl.onerror=la,hl.readAsArrayBuffer(Tt)});if(ft.current.has(O)){console.log(`Canceled sending ${O} to ${h} during read`),g.send(JSON.stringify({type:"cancel",transferId:D}));return}const Ne=new TextEncoder().encode(O),lu=8+Ne.length,Qn=new ArrayBuffer(lu+Ye.byteLength),ea=new DataView(Qn);ea.setUint32(0,D),ea.setUint32(4,Ne.length),new Uint8Array(Qn).set(Ne,8),new Uint8Array(Qn).set(new Uint8Array(Ye),lu),g.send(Qn),await St(),Zt+=Ye.byteLength}catch(Ye){console.error(`Error reading ${O}:`,Ye),g.send(JSON.stringify({type:"cancel",transferId:D}));return}}g.send(JSON.stringify({type:"end",transferId:D})),ft.current.delete(O),console.log(`Finished sending ${O} to ${h}`)},nu=(h,O)=>{if(!ft.current.has(h)){ft.current.add(h);const q=B.current[O];q&&q.readyState==="open"&&(q.send(JSON.stringify({type:"end-download",fileName:h})),q.send(JSON.stringify({type:"cancel-download",fileName:h})),console.log(`Sent end-download and cancel-download for ${h} to ${O}`)),at(g=>{const D=g[h]?.status==="saved",{[h]:tt,...L}=g;return D?{...L,[h]:{status:"saved",progress:100,peerId:O}}:L}),Object.keys(Et.current).forEach(g=>{const D=Et.current[g];D.fileName===h&&D.peerId===O&&(delete Et.current[g],N.current.delete(`${h}:${O}`))}),console.log(`Canceled download for ${h} locally`)}},Ai=h=>{bt(O=>O.filter(q=>q.name!==h)),delete T.current[h],delete T.current[`${h}_thumbnail`],Object.values(B.current).forEach(O=>{O.readyState==="open"&&O.send(JSON.stringify({type:"remove-file",fileName:h}))}),dt.current[h]&&(delete dt.current[h],Vt(O=>{const{[h]:q,...g}=O;return g}),ta(h,0)),console.log(`Deleted file ${h} and notified peers`)},ta=(h,O)=>{Vt(q=>({...q,[h]:O})),Object.values(B.current).forEach(q=>{q.readyState==="open"&&q.send(JSON.stringify({type:"update-count",fileName:h,count:O}))})},gn=(h,O)=>{const q=O.data;try{if(typeof q=="string"){const g=JSON.parse(q);if(g.type==="text")Bt(D=>[...D,g.text]),console.log(`Received text via WebRTC from ${h}: ${g.text}`);else if(g.type==="text-history")console.log(`Received text-history from ${h}:`,g.history,"Current textHistory:",Ht),Array.isArray(g.history)?Bt(g.history):console.warn(`Invalid text-history format from ${h}:`,g.history);else if(g.type==="request-file"){const D=T.current[g.fileName];D?(console.log(`Handling request-file for ${g.fileName} from ${h}`),Le(h,g.fileName,"start"),Ti(h,g.fileName,D)):console.error(`File not found: ${g.fileName}`)}else if(g.type==="request-thumbnail"){const D=T.current[`${g.fileName}_thumbnail`];D?(console.log(`Handling request-thumbnail for ${g.fileName} from ${h}`),ol(h,"thumbnail",g.fileName,D)):console.error(`Thumbnail not found for ${g.fileName}`)}else g.type==="end-download"?Le(h,g.fileName,"end"):g.type==="remove-file"?(bt(D=>D.filter(tt=>tt.name!==g.fileName)),console.log(`Removed file ${g.fileName} from list`)):g.type==="update-count"?Vt(D=>({...D,[g.fileName]:g.count})):g.type==="file-list"&&bt(D=>{const tt=g.files.filter(L=>!D.some(X=>X.name===L.name&&X.peerId===L.peerId)).map(L=>({...L,peerId:L.peerId||"unknown"}));return tt.forEach(L=>{const X=`${L.name}:${L.peerId}`;L.thumbnail&&!T.current[`${L.name}_thumbnail`]&&!N.current.has(X)?(console.log(`Requesting thumbnail for ${L.name} from ${L.peerId}`),mn(L)):L.thumbnail&&console.log(`Thumbnail for ${L.name} already cached or requested, skipping request`)}),console.log("Received file-list from server:",g.files),[...D,...tt]})}else console.warn(`Unexpected non-string message on main channel from ${h}`),console.log(q)}catch(g){console.error(`Error processing message from ${h}:`,g)}},ce=(h,O)=>{const q=O.data;if(typeof q=="string")try{const g=JSON.parse(q);if(g.type==="start"){if(g.transferId===void 0||g.transferId===null||!g.fileName||!g.kind||!g.size){console.error(`Invalid start message from ${h}:`,g);return}if(Et.current[g.transferId]){console.warn(`TransferId ${g.transferId} already exists for ${h}, ignoring new start for ${g.fileName}`);return}Et.current[g.transferId]={kind:g.kind,fileName:g.fileName,chunks:[],expectedSize:g.size,received:0,peerId:h},console.log(`Started ${g.kind} transfer ${g.transferId} for ${g.fileName} from ${h}, expected size: ${g.size}`),g.kind==="file"&&at(D=>({...D,[g.fileName]:{status:"downloading",progress:0,total:g.size,received:0,peerId:h}}))}else if(g.type==="end"){const D=Et.current[g.transferId];if(!D){console.warn(`No state for transferId ${g.transferId} from ${h}`);return}if(D.received>=D.expectedSize){const tt=new Blob(D.chunks,{type:D.kind==="thumbnail"?"image/jpeg":"application/octet-stream"});if(console.log(`Assembled ${D.kind} ${D.fileName}, size: ${tt.size}`),D.kind==="thumbnail")T.current[`${D.fileName}_thumbnail`]=tt,console.log(`Received thumbnail for ${D.fileName} from ${h}, size: ${tt.size}`),bt(L=>L.map(X=>X.name===D.fileName&&X.peerId!==G.id?{...X,thumbnail:!0}:X)),N.current.delete(`${D.fileName}:${h}`);else if(D.kind==="file"){T.current[D.fileName]=tt;const L=URL.createObjectURL(tt);Et.current[g.transferId].blobUrl=L,console.log(`Stored blobUrl ${L} for transferId ${g.transferId}, fileName: ${D.fileName}`),console.log("binaryStateRef.current keys: ",JSON.stringify(Object.keys(Et.current))),console.log(`binaryStateRef.current[${g.transferId}]: `,JSON.stringify(Et.current[g.transferId]));const X=document.createElement("a");X.href=L,X.download=D.fileName,X.click(),setTimeout(()=>{URL.revokeObjectURL(L),console.log(`Revoked blobUrl ${L} for transferId ${g.transferId}`)},5e3),at(ct=>({...ct,[D.fileName]:{status:"saved",progress:100,peerId:h}}));const St=B.current[h];St&&St.readyState==="open"&&St.send(JSON.stringify({type:"end-download",fileName:D.fileName}))}}else console.warn(`Size mismatch for ${D.kind} ${D.fileName}: received ${D.received}, expected ${D.expectedSize}`),D.kind==="file"&&at(tt=>({...tt,[D.fileName]:{status:"error",progress:D.received/D.expectedSize*100}})),N.current.delete(`${D.fileName}:${h}`)}else if(g.type==="cancel"){const D=Et.current[g.transferId];D&&D.kind==="file"&&at(tt=>({...tt,[D.fileName]:{status:"canceled",progress:0}})),N.current.delete(`${D.fileName}:${h}`),delete Et.current[g.transferId]}}catch(g){console.error(`Error processing binary control message from ${h}:`,g)}else if(q instanceof ArrayBuffer){if(q.byteLength<8){console.warn(`Invalid binary message size from ${h}: ${q.byteLength} bytes`);return}const g=new DataView(q),D=g.getUint32(0),tt=g.getUint32(4);if(q.byteLength<8+tt){console.warn(`Invalid binary message: insufficient length for fileName from ${h}`);return}const L=new Uint8Array(q,8,tt),X=new TextDecoder().decode(L),St=q.slice(8+tt),ct=Et.current[D];if(ct&&ct.fileName===X){if(ft.current.has(ct.fileName)){console.log(`Ignoring chunk for canceled ${ct.kind} ${ct.fileName}`);return}if(ct.chunks.push(St),ct.received+=St.byteLength,ct.kind==="file"){const Zt=Math.min(100,ct.received/ct.expectedSize*100);at(Tt=>({...Tt,[ct.fileName]:{...Tt[ct.fileName],progress:Zt,received:ct.received}}))}}else console.warn(`No state or fileName mismatch for transferId ${D} from ${h}: expected ${ct?.fileName}, got ${X}`)}else if(q instanceof Blob){console.log(`Received Blob message from ${h}, size: ${q.size}`),console.dir(q);const g=new FileReader;g.onload=()=>{const D=g.result;if(D.byteLength<4){console.warn(`Invalid Blob-converted ArrayBuffer size from ${h}: ${D.byteLength} bytes`);return}const tt=new DataView(D),L=tt.getUint32(0),X=tt.getUint32(4);if(D.byteLength<8+X){console.warn(`Invalid Blob-converted ArrayBuffer: insufficient length for fileName from ${h}`);return}const St=new Uint8Array(D,8,X),ct=new TextDecoder().decode(St),Zt=D.slice(8+X),Tt=Et.current[L];if(Tt&&Tt.fileName===ct){if(ft.current.has(Tt.fileName)){console.log(`Ignoring chunk for canceled ${Tt.kind} ${Tt.fileName}`);return}if(Tt.chunks.push(Zt),Tt.received+=Zt.byteLength,console.log(`Received Blob chunk for ${Tt.kind} ${Tt.fileName}, transferId ${L}: ${Tt.received}/${Tt.expectedSize}`),Tt.kind==="file"){const Ye=Math.min(100,Tt.received/Tt.expectedSize*100);at(Ne=>({...Ne,[Tt.fileName]:{...Ne[Tt.fileName],progress:Ye,received:Tt.received}}))}}else console.warn(`No state or fileName mismatch for transferId ${L} from ${h}: expected ${Tt?.fileName}, got ${ct}`)},g.onerror=D=>{console.error(`Error reading Blob from ${h}:`,D)},g.readAsArrayBuffer(q)}else console.warn(`Unexpected message type from ${h}:`,typeof q),console.log(q)},Le=(h,O,q)=>{if(T.current[O]){dt.current[O]=dt.current[O]||new Set,q==="start"?(dt.current[O].add(h),console.log(`Started download of ${O} by ${h}, count: ${dt.current[O].size}`)):q==="end"&&(dt.current[O].delete(h),console.log(`Ended download of ${O} by ${h}, count: ${dt.current[O].size}`));const g=dt.current[O].size;ta(O,g)}};return Q.jsxs("div",{className:"container mx-auto left",children:[Q.jsxs(Q.Fragment,{children:[c&&Q.jsx(Q.Fragment,{children:U&&qt>0&&!Y&&Q.jsxs("p",{children:["Waiting for peer(s) to connect [WebRTC]... ",qt,"s"]})}),Q.jsx("h1",{className:"text-2xl font-bold mb-2 cursor-default",children:"Quick File Share"}),he&&Q.jsx("p",{className:"text-red-500 mb-2",children:he}),Q.jsx(xg,{code:c,isConnected:Y,onCreateRoom:Ei,onJoinRoom:rl,joinCode:v,setJoinCode:A})]}),c&&Q.jsxs(Q.Fragment,{children:[Q.jsxs("p",{className:"text-lg",children:[cl,"//",Xn,"/room/",Q.jsx("strong",{children:Gn||"N/A"})]}),Q.jsx("button",{className:"bg-stone-600 text-darkPurple px-4 py-2 rounded hover:bg-stone-500 ",onClick:ze,children:U?"Close Room":"Leave Room"}),"●",Q.jsx("button",{onClick:()=>sl("link"),className:"bg-stone-600 text-darkPurple px-4 py-2 rounded hover:bg-stone-500",disabled:!navigator.clipboard,children:w==="link"?"Copied!":"Copy Link"}),Q.jsx("button",{onClick:()=>sl("code"),className:"bg-stone-600 text-darkPurple px-4 py-2 rounded hover:bg-stone-500",disabled:!navigator.clipboard,children:w==="code"?"Copied!":"Copy Code"}),Q.jsxs("div",{className:"mb-4 fixed top-0 right-10 text-right",children:[Q.jsxs("h2",{className:"text-xl font-bold text-right",children:["Connected Users (",ht.length,"):"]}),Q.jsx("ul",{children:ht.filter(h=>h!=null).map((h,O)=>Q.jsxs("li",{children:[G.id&&h===G.id?"(You)":""," ",h]},h||`user-${O}`))})]}),Q.jsx(Ug,{textHistory:Ht,setTextHistory:Bt,dataChannels:le,useFallback:J,socket:G,code:c}),Q.jsx(Dg,{files:Wt,setFiles:bt,dataChannels:le,dataChannelsRef:B,useFallback:J,socket:G,code:c,socketId:G.id,localFilesRef:T,downloadStates:C,setDownloadStates:at,cancelDownload:nu,cancelRequestsRef:ft,downloadCounts:At,handleDeleteFile:Ai,SERVER_URL:nd}),J&&Q.jsx("p",{className:"text-red-500",children:"Using server fallback"})]}),!c&&f&&Q.jsx("a",{href:"/apk/",id:"apk",children:Q.jsx("button",{children:"APK"})})]})}wm.createRoot(document.getElementById("root")).render(Q.jsx(lt.StrictMode,{children:Q.jsx(Mg,{})}));
Top