@source-repo/rpc-cli 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/app.js +12 -12
- package/dist/web/app.js.map +1 -1
- package/package.json +2 -2
package/dist/web/app.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var fv=Object.create;var xu=Object.defineProperty;var hv=Object.getOwnPropertyDescriptor;var fp=(l,i)=>(i=Symbol[l])?i:Symbol.for("Symbol."+l),fs=l=>{throw TypeError(l)};var hp=(l,i,s)=>i in l?xu(l,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[i]=s;var op=(l,i)=>xu(l,"name",{value:i,configurable:!0});var dp=l=>[,,,fv(l?.[fp("metadata")]??null)],pp=["class","method","getter","setter","accessor","field","value","get","set"],cs=l=>l!==void 0&&typeof l!="function"?fs("Function expected"):l,dv=(l,i,s,r,c)=>({kind:pp[l],name:i,metadata:r,addInitializer:f=>s._?fs("Already initialized"):c.push(cs(f||null))}),pv=(l,i)=>hp(i,fp("metadata"),l[3]),wu=(l,i,s,r)=>{for(var c=0,f=l[i>>1],p=f&&f.length;c<p;c++)i&1?f[c].call(s):r=f[c].call(s,r);return r},Yl=(l,i,s,r,c,f)=>{var p,m,v,x,N,w=i&7,q=!!(i&8),Y=!!(i&16),ee=w>3?l.length+1:w?q?1:2:0,Z=pp[w+5],I=w>3&&(l[ee-1]=[]),U=l[ee]||(l[ee]=[]),K=w&&(!Y&&!q&&(c=c.prototype),w<5&&(w>3||!Y)&&hv(w<4?c:{get[s](){return up(this,f)},set[s](j){return cp(this,f,j)}},s));w?Y&&w<4&&op(f,(w>2?"set ":w>1?"get ":"")+s):op(c,s);for(var ae=r.length-1;ae>=0;ae--)x=dv(w,s,v={},l[3],U),w&&(x.static=q,x.private=Y,N=x.access={has:Y?j=>mv(c,j):j=>s in j},w^3&&(N.get=Y?j=>(w^1?up:yv)(j,c,w^4?f:K.get):j=>j[s]),w>2&&(N.set=Y?(j,C)=>cp(j,c,C,w^4?f:K.set):(j,C)=>j[s]=C)),m=(0,r[ae])(w?w<4?Y?f:K[Z]:w>4?void 0:{get:K.get,set:K.set}:c,x),v._=1,w^4||m===void 0?cs(m)&&(w>4?I.unshift(m):w?Y?f=m:K[Z]=m:c=m):typeof m!="object"||m===null?fs("Object expected"):(cs(p=m.get)&&(K.get=p),cs(p=m.set)&&(K.set=p),cs(p=m.init)&&I.unshift(p));return w||pv(l,c),K&&xu(c,s,K),Y?w^4?f:K:c},mp=(l,i,s)=>hp(l,typeof i!="symbol"?i+"":i,s),Eu=(l,i,s)=>i.has(l)||fs("Cannot "+s),mv=(l,i)=>Object(i)!==i?fs('Cannot use the "in" operator on this value'):l.has(i),up=(l,i,s)=>(Eu(l,i,"read from private field"),s?s.call(l):i.get(l));var cp=(l,i,s,r)=>(Eu(l,i,"write to private field"),r?r.call(l,s):i.set(l,s),s),yv=(l,i,s)=>(Eu(l,i,"access private method"),s);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const p of f.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function s(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(c){if(c.ep)return;c.ep=!0;const f=s(c);fetch(c.href,f)}})();function gv(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Tu={exports:{}},hs={};var yp;function vv(){if(yp)return hs;yp=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,c,f){var p=null;if(f!==void 0&&(p=""+f),c.key!==void 0&&(p=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:l,type:r,key:p,ref:c!==void 0?c:null,props:f}}return hs.Fragment=i,hs.jsx=s,hs.jsxs=s,hs}var gp;function bv(){return gp||(gp=1,Tu.exports=vv()),Tu.exports}var y=bv(),ku={exports:{}},ce={};var vp;function Sv(){if(vp)return ce;vp=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),q=Symbol.iterator;function Y(b){return b===null||typeof b!="object"?null:(b=q&&b[q]||b["@@iterator"],typeof b=="function"?b:null)}var ee={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,I={};function U(b,B,V){this.props=b,this.context=B,this.refs=I,this.updater=V||ee}U.prototype.isReactComponent={},U.prototype.setState=function(b,B){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,B,"setState")},U.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function K(){}K.prototype=U.prototype;function ae(b,B,V){this.props=b,this.context=B,this.refs=I,this.updater=V||ee}var j=ae.prototype=new K;j.constructor=ae,Z(j,U.prototype),j.isPureReactComponent=!0;var C=Array.isArray;function L(){}var R={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function te(b,B,V){var W=V.ref;return{$$typeof:l,type:b,key:B,ref:W!==void 0?W:null,props:V}}function ie(b,B){return te(b.type,B,b.props)}function re(b){return typeof b=="object"&&b!==null&&b.$$typeof===l}function ve(b){var B={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(V){return B[V]})}var Le=/\/+/g;function tt(b,B){return typeof b=="object"&&b!==null&&b.key!=null?ve(""+b.key):B.toString(36)}function X(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(L,L):(b.status="pending",b.then(function(B){b.status==="pending"&&(b.status="fulfilled",b.value=B)},function(B){b.status==="pending"&&(b.status="rejected",b.reason=B)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function T(b,B,V,W,ue){var he=typeof b;(he==="undefined"||he==="boolean")&&(b=null);var Ee=!1;if(b===null)Ee=!0;else switch(he){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(b.$$typeof){case l:case i:Ee=!0;break;case N:return Ee=b._init,T(Ee(b._payload),B,V,W,ue)}}if(Ee)return ue=ue(b),Ee=W===""?"."+tt(b,0):W,C(ue)?(V="",Ee!=null&&(V=Ee.replace(Le,"$&/")+"/"),T(ue,B,V,"",function(ei){return ei})):ue!=null&&(re(ue)&&(ue=ie(ue,V+(ue.key==null||b&&b.key===ue.key?"":(""+ue.key).replace(Le,"$&/")+"/")+Ee)),B.push(ue)),1;Ee=0;var nt=W===""?".":W+":";if(C(b))for(var Re=0;Re<b.length;Re++)W=b[Re],he=nt+tt(W,Re),Ee+=T(W,B,V,he,ue);else if(Re=Y(b),typeof Re=="function")for(b=Re.call(b),Re=0;!(W=b.next()).done;)W=W.value,he=nt+tt(W,Re++),Ee+=T(W,B,V,he,ue);else if(he==="object"){if(typeof b.then=="function")return T(X(b),B,V,W,ue);throw B=String(b),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function H(b,B,V){if(b==null)return b;var W=[],ue=0;return T(b,W,"","",function(he){return B.call(V,he,ue++)}),W}function J(b){if(b._status===-1){var B=b._result;B=B(),B.then(function(V){(b._status===0||b._status===-1)&&(b._status=1,b._result=V)},function(V){(b._status===0||b._status===-1)&&(b._status=2,b._result=V)}),b._status===-1&&(b._status=0,b._result=B)}if(b._status===1)return b._result.default;throw b._result}var oe=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},pe={map:H,forEach:function(b,B,V){H(b,function(){B.apply(this,arguments)},V)},count:function(b){var B=0;return H(b,function(){B++}),B},toArray:function(b){return H(b,function(B){return B})||[]},only:function(b){if(!re(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return ce.Activity=w,ce.Children=pe,ce.Component=U,ce.Fragment=s,ce.Profiler=c,ce.PureComponent=ae,ce.StrictMode=r,ce.Suspense=v,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,ce.__COMPILER_RUNTIME={__proto__:null,c:function(b){return R.H.useMemoCache(b)}},ce.cache=function(b){return function(){return b.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(b,B,V){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var W=Z({},b.props),ue=b.key;if(B!=null)for(he in B.key!==void 0&&(ue=""+B.key),B)!G.call(B,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&B.ref===void 0||(W[he]=B[he]);var he=arguments.length-2;if(he===1)W.children=V;else if(1<he){for(var Ee=Array(he),nt=0;nt<he;nt++)Ee[nt]=arguments[nt+2];W.children=Ee}return te(b.type,ue,W)},ce.createContext=function(b){return b={$$typeof:p,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:f,_context:b},b},ce.createElement=function(b,B,V){var W,ue={},he=null;if(B!=null)for(W in B.key!==void 0&&(he=""+B.key),B)G.call(B,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ue[W]=B[W]);var Ee=arguments.length-2;if(Ee===1)ue.children=V;else if(1<Ee){for(var nt=Array(Ee),Re=0;Re<Ee;Re++)nt[Re]=arguments[Re+2];ue.children=nt}if(b&&b.defaultProps)for(W in Ee=b.defaultProps,Ee)ue[W]===void 0&&(ue[W]=Ee[W]);return te(b,he,ue)},ce.createRef=function(){return{current:null}},ce.forwardRef=function(b){return{$$typeof:m,render:b}},ce.isValidElement=re,ce.lazy=function(b){return{$$typeof:N,_payload:{_status:-1,_result:b},_init:J}},ce.memo=function(b,B){return{$$typeof:x,type:b,compare:B===void 0?null:B}},ce.startTransition=function(b){var B=R.T,V={};R.T=V;try{var W=b(),ue=R.S;ue!==null&&ue(V,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(L,oe)}catch(he){oe(he)}finally{B!==null&&V.types!==null&&(B.types=V.types),R.T=B}},ce.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},ce.use=function(b){return R.H.use(b)},ce.useActionState=function(b,B,V){return R.H.useActionState(b,B,V)},ce.useCallback=function(b,B){return R.H.useCallback(b,B)},ce.useContext=function(b){return R.H.useContext(b)},ce.useDebugValue=function(){},ce.useDeferredValue=function(b,B){return R.H.useDeferredValue(b,B)},ce.useEffect=function(b,B){return R.H.useEffect(b,B)},ce.useEffectEvent=function(b){return R.H.useEffectEvent(b)},ce.useId=function(){return R.H.useId()},ce.useImperativeHandle=function(b,B,V){return R.H.useImperativeHandle(b,B,V)},ce.useInsertionEffect=function(b,B){return R.H.useInsertionEffect(b,B)},ce.useLayoutEffect=function(b,B){return R.H.useLayoutEffect(b,B)},ce.useMemo=function(b,B){return R.H.useMemo(b,B)},ce.useOptimistic=function(b,B){return R.H.useOptimistic(b,B)},ce.useReducer=function(b,B,V){return R.H.useReducer(b,B,V)},ce.useRef=function(b){return R.H.useRef(b)},ce.useState=function(b){return R.H.useState(b)},ce.useSyncExternalStore=function(b,B,V){return R.H.useSyncExternalStore(b,B,V)},ce.useTransition=function(){return R.H.useTransition()},ce.version="19.2.8",ce}var bp;function Wu(){return bp||(bp=1,ku.exports=Sv()),ku.exports}var Q=Wu(),_u={exports:{}},ds={},Au={exports:{}},Nu={};var Sp;function xv(){return Sp||(Sp=1,(function(l){function i(T,H){var J=T.length;T.push(H);e:for(;0<J;){var oe=J-1>>>1,pe=T[oe];if(0<c(pe,H))T[oe]=H,T[J]=pe,J=oe;else break e}}function s(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var H=T[0],J=T.pop();if(J!==H){T[0]=J;e:for(var oe=0,pe=T.length,b=pe>>>1;oe<b;){var B=2*(oe+1)-1,V=T[B],W=B+1,ue=T[W];if(0>c(V,J))W<pe&&0>c(ue,V)?(T[oe]=ue,T[W]=J,oe=W):(T[oe]=V,T[B]=J,oe=B);else if(W<pe&&0>c(ue,J))T[oe]=ue,T[W]=J,oe=W;else break e}}return H}function c(T,H){var J=T.sortIndex-H.sortIndex;return J!==0?J:T.id-H.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var p=Date,m=p.now();l.unstable_now=function(){return p.now()-m}}var v=[],x=[],N=1,w=null,q=3,Y=!1,ee=!1,Z=!1,I=!1,U=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function j(T){for(var H=s(x);H!==null;){if(H.callback===null)r(x);else if(H.startTime<=T)r(x),H.sortIndex=H.expirationTime,i(v,H);else break;H=s(x)}}function C(T){if(Z=!1,j(T),!ee)if(s(v)!==null)ee=!0,L||(L=!0,ve());else{var H=s(x);H!==null&&X(C,H.startTime-T)}}var L=!1,R=-1,G=5,te=-1;function ie(){return I?!0:!(l.unstable_now()-te<G)}function re(){if(I=!1,L){var T=l.unstable_now();te=T;var H=!0;try{e:{ee=!1,Z&&(Z=!1,K(R),R=-1),Y=!0;var J=q;try{t:{for(j(T),w=s(v);w!==null&&!(w.expirationTime>T&&ie());){var oe=w.callback;if(typeof oe=="function"){w.callback=null,q=w.priorityLevel;var pe=oe(w.expirationTime<=T);if(T=l.unstable_now(),typeof pe=="function"){w.callback=pe,j(T),H=!0;break t}w===s(v)&&r(v),j(T)}else r(v);w=s(v)}if(w!==null)H=!0;else{var b=s(x);b!==null&&X(C,b.startTime-T),H=!1}}break e}finally{w=null,q=J,Y=!1}H=void 0}}finally{H?ve():L=!1}}}var ve;if(typeof ae=="function")ve=function(){ae(re)};else if(typeof MessageChannel<"u"){var Le=new MessageChannel,tt=Le.port2;Le.port1.onmessage=re,ve=function(){tt.postMessage(null)}}else ve=function(){U(re,0)};function X(T,H){R=U(function(){T(l.unstable_now())},H)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(T){T.callback=null},l.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"):G=0<T?Math.floor(1e3/T):5},l.unstable_getCurrentPriorityLevel=function(){return q},l.unstable_next=function(T){switch(q){case 1:case 2:case 3:var H=3;break;default:H=q}var J=q;q=H;try{return T()}finally{q=J}},l.unstable_requestPaint=function(){I=!0},l.unstable_runWithPriority=function(T,H){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var J=q;q=T;try{return H()}finally{q=J}},l.unstable_scheduleCallback=function(T,H,J){var oe=l.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?oe+J:oe):J=oe,T){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=J+pe,T={id:N++,callback:H,priorityLevel:T,startTime:J,expirationTime:pe,sortIndex:-1},J>oe?(T.sortIndex=J,i(x,T),s(v)===null&&T===s(x)&&(Z?(K(R),R=-1):Z=!0,X(C,J-oe))):(T.sortIndex=pe,i(v,T),ee||Y||(ee=!0,L||(L=!0,ve()))),T},l.unstable_shouldYield=ie,l.unstable_wrapCallback=function(T){var H=q;return function(){var J=q;q=H;try{return T.apply(this,arguments)}finally{q=J}}}})(Nu)),Nu}var xp;function wv(){return xp||(xp=1,Au.exports=xv()),Au.exports}var Ou={exports:{}},ct={};var wp;function Ev(){if(wp)return ct;wp=1;var l=Wu();function i(v){var x="https://react.dev/errors/"+v;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)x+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+v+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(v,x,N){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:w==null?null:""+w,children:v,containerInfo:x,implementation:N}}var p=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(v,x){if(v==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ct.createPortal=function(v,x){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(i(299));return f(v,x,null,N)},ct.flushSync=function(v){var x=p.T,N=r.p;try{if(p.T=null,r.p=2,v)return v()}finally{p.T=x,r.p=N,r.d.f()}},ct.preconnect=function(v,x){typeof v=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,r.d.C(v,x))},ct.prefetchDNS=function(v){typeof v=="string"&&r.d.D(v)},ct.preinit=function(v,x){if(typeof v=="string"&&x&&typeof x.as=="string"){var N=x.as,w=m(N,x.crossOrigin),q=typeof x.integrity=="string"?x.integrity:void 0,Y=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;N==="style"?r.d.S(v,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:w,integrity:q,fetchPriority:Y}):N==="script"&&r.d.X(v,{crossOrigin:w,integrity:q,fetchPriority:Y,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ct.preinitModule=function(v,x){if(typeof v=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var N=m(x.as,x.crossOrigin);r.d.M(v,{crossOrigin:N,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&r.d.M(v)},ct.preload=function(v,x){if(typeof v=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var N=x.as,w=m(N,x.crossOrigin);r.d.L(v,N,{crossOrigin:w,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ct.preloadModule=function(v,x){if(typeof v=="string")if(x){var N=m(x.as,x.crossOrigin);r.d.m(v,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:N,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else r.d.m(v)},ct.requestFormReset=function(v){r.d.r(v)},ct.unstable_batchedUpdates=function(v,x){return v(x)},ct.useFormState=function(v,x,N){return p.H.useFormState(v,x,N)},ct.useFormStatus=function(){return p.H.useHostTransitionStatus()},ct.version="19.2.8",ct}var Ep;function Tv(){if(Ep)return Ou.exports;Ep=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),Ou.exports=Ev(),Ou.exports}var Tp;function kv(){if(Tp)return ds;Tp=1;var l=wv(),i=Wu(),s=Tv();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(f(e)!==e)throw Error(r(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,a=t;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(a=o.return,a!==null){n=a;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return v(o),e;if(u===a)return v(o),t;u=u.sibling}throw Error(r(188))}if(n.return!==a.return)n=o,a=u;else{for(var h=!1,d=o.child;d;){if(d===n){h=!0,n=o,a=u;break}if(d===a){h=!0,a=o,n=u;break}d=d.sibling}if(!h){for(d=u.child;d;){if(d===n){h=!0,n=u,a=o;break}if(d===a){h=!0,a=u,n=o;break}d=d.sibling}if(!h)throw Error(r(189))}}if(n.alternate!==a)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function N(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,q=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),ee=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function ve(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Symbol.for("react.client.reference");function tt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Z:return"Fragment";case U:return"Profiler";case I:return"StrictMode";case C:return"Suspense";case L:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case ee:return"Portal";case ae:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case j:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:tt(e.type)||"Memo";case G:t=e._payload,e=e._init;try{return tt(e(t))}catch{}}return null}var X=Array.isArray,T=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},oe=[],pe=-1;function b(e){return{current:e}}function B(e){0>pe||(e.current=oe[pe],oe[pe]=null,pe--)}function V(e,t){pe++,oe[pe]=e.current,e.current=t}var W=b(null),ue=b(null),he=b(null),Ee=b(null);function nt(e,t){switch(V(he,t),V(ue,e),V(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jd(t),e=Rd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(W),V(W,e)}function Re(){B(W),B(ue),B(he)}function ei(e){e.memoizedState!==null&&V(Ee,e);var t=W.current,n=Rd(t,e.type);t!==n&&(V(ue,e),V(W,n))}function ln(e){ue.current===e&&(B(W),B(ue)),Ee.current===e&&(B(Ee),ls._currentValue=J)}var pa,ma;function rn(e){if(pa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);pa=t&&t[1]||"",ma=-1<n.stack.indexOf(`
|
|
1
|
+
var gv=Object.create;var Ec=Object.defineProperty;var vv=Object.getOwnPropertyDescriptor;var hp=(r,i)=>(i=Symbol[r])?i:Symbol.for("Symbol."+r),fa=r=>{throw TypeError(r)};var dp=(r,i,a)=>i in r?Ec(r,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[i]=a;var cp=(r,i)=>Ec(r,"name",{value:i,configurable:!0});var pp=r=>[,,,gv(r?.[hp("metadata")]??null)],mp=["class","method","getter","setter","accessor","field","value","get","set"],ua=r=>r!==void 0&&typeof r!="function"?fa("Function expected"):r,bv=(r,i,a,l,u)=>({kind:mp[r],name:i,metadata:l,addInitializer:f=>a._?fa("Already initialized"):u.push(ua(f||null))}),wv=(r,i)=>dp(i,hp("metadata"),r[3]),kc=(r,i,a,l)=>{for(var u=0,f=r[i>>1],d=f&&f.length;u<d;u++)i&1?f[u].call(a):l=f[u].call(a,l);return l},Yl=(r,i,a,l,u,f)=>{var d,m,y,b,A,x=i&7,q=!!(i&8),L=!!(i&16),K=x>3?r.length+1:x?q?1:2:0,Z=mp[x+5],F=x>3&&(r[K-1]=[]),z=r[K]||(r[K]=[]),G=x&&(!L&&!q&&(u=u.prototype),x<5&&(x>3||!L)&&vv(x<4?u:{get[a](){return up(this,f)},set[a](O){return fp(this,f,O)}},a));x?L&&x<4&&cp(f,(x>2?"set ":x>1?"get ":"")+a):cp(u,a);for(var te=l.length-1;te>=0;te--)b=bv(x,a,y={},r[3],z),x&&(b.static=q,b.private=L,A=b.access={has:L?O=>xv(u,O):O=>a in O},x^3&&(A.get=L?O=>(x^1?up:Sv)(O,u,x^4?f:G.get):O=>O[a]),x>2&&(A.set=L?(O,j)=>fp(O,u,j,x^4?f:G.set):(O,j)=>O[a]=j)),m=(0,l[te])(x?x<4?L?f:G[Z]:x>4?void 0:{get:G.get,set:G.set}:u,b),y._=1,x^4||m===void 0?ua(m)&&(x>4?F.unshift(m):x?L?f=m:G[Z]=m:u=m):typeof m!="object"||m===null?fa("Object expected"):(ua(d=m.get)&&(G.get=d),ua(d=m.set)&&(G.set=d),ua(d=m.init)&&F.unshift(d));return x||wv(r,u),G&&Ec(u,a,G),L?x^4?f:G:u},yp=(r,i,a)=>dp(r,typeof i!="symbol"?i+"":i,a),Tc=(r,i,a)=>i.has(r)||fa("Cannot "+a),xv=(r,i)=>Object(i)!==i?fa('Cannot use the "in" operator on this value'):r.has(i),up=(r,i,a)=>(Tc(r,i,"read from private field"),a?a.call(r):i.get(r));var fp=(r,i,a,l)=>(Tc(r,i,"write to private field"),l?l.call(r,a):i.set(r,a),a),Sv=(r,i,a)=>(Tc(r,i,"access private method"),a);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))l(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function a(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function l(u){if(u.ep)return;u.ep=!0;const f=a(u);fetch(u.href,f)}})();function Ev(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var _c={exports:{}},ha={};var gp;function kv(){if(gp)return ha;gp=1;var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function a(l,u,f){var d=null;if(f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),"key"in u){f={};for(var m in u)m!=="key"&&(f[m]=u[m])}else f=u;return u=f.ref,{$$typeof:r,type:l,key:d,ref:u!==void 0?u:null,props:f}}return ha.Fragment=i,ha.jsx=a,ha.jsxs=a,ha}var vp;function Tv(){return vp||(vp=1,_c.exports=kv()),_c.exports}var g=Tv(),Ac={exports:{}},ue={};var bp;function _v(){if(bp)return ue;bp=1;var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),q=Symbol.iterator;function L(w){return w===null||typeof w!="object"?null:(w=q&&w[q]||w["@@iterator"],typeof w=="function"?w:null)}var K={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,F={};function z(w,B,X){this.props=w,this.context=B,this.refs=F,this.updater=X||K}z.prototype.isReactComponent={},z.prototype.setState=function(w,B){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,B,"setState")},z.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function G(){}G.prototype=z.prototype;function te(w,B,X){this.props=w,this.context=B,this.refs=F,this.updater=X||K}var O=te.prototype=new G;O.constructor=te,Z(O,z.prototype),O.isPureReactComponent=!0;var j=Array.isArray;function H(){}var C={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function ne(w,B,X){var P=X.ref;return{$$typeof:r,type:w,key:B,ref:P!==void 0?P:null,props:X}}function se(w,B){return ne(w.type,B,w.props)}function re(w){return typeof w=="object"&&w!==null&&w.$$typeof===r}function ve(w){var B={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(X){return B[X]})}var Le=/\/+/g;function nt(w,B){return typeof w=="object"&&w!==null&&w.key!=null?ve(""+w.key):B.toString(36)}function V(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(H,H):(w.status="pending",w.then(function(B){w.status==="pending"&&(w.status="fulfilled",w.value=B)},function(B){w.status==="pending"&&(w.status="rejected",w.reason=B)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function k(w,B,X,P,ce){var he=typeof w;(he==="undefined"||he==="boolean")&&(w=null);var Ee=!1;if(w===null)Ee=!0;else switch(he){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(w.$$typeof){case r:case i:Ee=!0;break;case A:return Ee=w._init,k(Ee(w._payload),B,X,P,ce)}}if(Ee)return ce=ce(w),Ee=P===""?"."+nt(w,0):P,j(ce)?(X="",Ee!=null&&(X=Ee.replace(Le,"$&/")+"/"),k(ce,B,X,"",function(ti){return ti})):ce!=null&&(re(ce)&&(ce=se(ce,X+(ce.key==null||w&&w.key===ce.key?"":(""+ce.key).replace(Le,"$&/")+"/")+Ee)),B.push(ce)),1;Ee=0;var it=P===""?".":P+":";if(j(w))for(var Me=0;Me<w.length;Me++)P=w[Me],he=it+nt(P,Me),Ee+=k(P,B,X,he,ce);else if(Me=L(w),typeof Me=="function")for(w=Me.call(w),Me=0;!(P=w.next()).done;)P=P.value,he=it+nt(P,Me++),Ee+=k(P,B,X,he,ce);else if(he==="object"){if(typeof w.then=="function")return k(V(w),B,X,P,ce);throw B=String(w),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function $(w,B,X){if(w==null)return w;var P=[],ce=0;return k(w,P,"","",function(he){return B.call(X,he,ce++)}),P}function W(w){if(w._status===-1){var B=w._result;B=B(),B.then(function(X){(w._status===0||w._status===-1)&&(w._status=1,w._result=X)},function(X){(w._status===0||w._status===-1)&&(w._status=2,w._result=X)}),w._status===-1&&(w._status=0,w._result=B)}if(w._status===1)return w._result.default;throw w._result}var oe=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},pe={map:$,forEach:function(w,B,X){$(w,function(){B.apply(this,arguments)},X)},count:function(w){var B=0;return $(w,function(){B++}),B},toArray:function(w){return $(w,function(B){return B})||[]},only:function(w){if(!re(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return ue.Activity=x,ue.Children=pe,ue.Component=z,ue.Fragment=a,ue.Profiler=u,ue.PureComponent=te,ue.StrictMode=l,ue.Suspense=y,ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,ue.__COMPILER_RUNTIME={__proto__:null,c:function(w){return C.H.useMemoCache(w)}},ue.cache=function(w){return function(){return w.apply(null,arguments)}},ue.cacheSignal=function(){return null},ue.cloneElement=function(w,B,X){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var P=Z({},w.props),ce=w.key;if(B!=null)for(he in B.key!==void 0&&(ce=""+B.key),B)!Q.call(B,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&B.ref===void 0||(P[he]=B[he]);var he=arguments.length-2;if(he===1)P.children=X;else if(1<he){for(var Ee=Array(he),it=0;it<he;it++)Ee[it]=arguments[it+2];P.children=Ee}return ne(w.type,ce,P)},ue.createContext=function(w){return w={$$typeof:d,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:f,_context:w},w},ue.createElement=function(w,B,X){var P,ce={},he=null;if(B!=null)for(P in B.key!==void 0&&(he=""+B.key),B)Q.call(B,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(ce[P]=B[P]);var Ee=arguments.length-2;if(Ee===1)ce.children=X;else if(1<Ee){for(var it=Array(Ee),Me=0;Me<Ee;Me++)it[Me]=arguments[Me+2];ce.children=it}if(w&&w.defaultProps)for(P in Ee=w.defaultProps,Ee)ce[P]===void 0&&(ce[P]=Ee[P]);return ne(w,he,ce)},ue.createRef=function(){return{current:null}},ue.forwardRef=function(w){return{$$typeof:m,render:w}},ue.isValidElement=re,ue.lazy=function(w){return{$$typeof:A,_payload:{_status:-1,_result:w},_init:W}},ue.memo=function(w,B){return{$$typeof:b,type:w,compare:B===void 0?null:B}},ue.startTransition=function(w){var B=C.T,X={};C.T=X;try{var P=w(),ce=C.S;ce!==null&&ce(X,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(H,oe)}catch(he){oe(he)}finally{B!==null&&X.types!==null&&(B.types=X.types),C.T=B}},ue.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},ue.use=function(w){return C.H.use(w)},ue.useActionState=function(w,B,X){return C.H.useActionState(w,B,X)},ue.useCallback=function(w,B){return C.H.useCallback(w,B)},ue.useContext=function(w){return C.H.useContext(w)},ue.useDebugValue=function(){},ue.useDeferredValue=function(w,B){return C.H.useDeferredValue(w,B)},ue.useEffect=function(w,B){return C.H.useEffect(w,B)},ue.useEffectEvent=function(w){return C.H.useEffectEvent(w)},ue.useId=function(){return C.H.useId()},ue.useImperativeHandle=function(w,B,X){return C.H.useImperativeHandle(w,B,X)},ue.useInsertionEffect=function(w,B){return C.H.useInsertionEffect(w,B)},ue.useLayoutEffect=function(w,B){return C.H.useLayoutEffect(w,B)},ue.useMemo=function(w,B){return C.H.useMemo(w,B)},ue.useOptimistic=function(w,B){return C.H.useOptimistic(w,B)},ue.useReducer=function(w,B,X){return C.H.useReducer(w,B,X)},ue.useRef=function(w){return C.H.useRef(w)},ue.useState=function(w){return C.H.useState(w)},ue.useSyncExternalStore=function(w,B,X){return C.H.useSyncExternalStore(w,B,X)},ue.useTransition=function(){return C.H.useTransition()},ue.version="19.2.8",ue}var wp;function Ic(){return wp||(wp=1,Ac.exports=_v()),Ac.exports}var J=Ic(),Nc={exports:{}},da={},Oc={exports:{}},Rc={};var xp;function Av(){return xp||(xp=1,(function(r){function i(k,$){var W=k.length;k.push($);e:for(;0<W;){var oe=W-1>>>1,pe=k[oe];if(0<u(pe,$))k[oe]=$,k[W]=pe,W=oe;else break e}}function a(k){return k.length===0?null:k[0]}function l(k){if(k.length===0)return null;var $=k[0],W=k.pop();if(W!==$){k[0]=W;e:for(var oe=0,pe=k.length,w=pe>>>1;oe<w;){var B=2*(oe+1)-1,X=k[B],P=B+1,ce=k[P];if(0>u(X,W))P<pe&&0>u(ce,X)?(k[oe]=ce,k[P]=W,oe=P):(k[oe]=X,k[B]=W,oe=B);else if(P<pe&&0>u(ce,W))k[oe]=ce,k[P]=W,oe=P;else break e}}return $}function u(k,$){var W=k.sortIndex-$.sortIndex;return W!==0?W:k.id-$.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;r.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();r.unstable_now=function(){return d.now()-m}}var y=[],b=[],A=1,x=null,q=3,L=!1,K=!1,Z=!1,F=!1,z=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,te=typeof setImmediate<"u"?setImmediate:null;function O(k){for(var $=a(b);$!==null;){if($.callback===null)l(b);else if($.startTime<=k)l(b),$.sortIndex=$.expirationTime,i(y,$);else break;$=a(b)}}function j(k){if(Z=!1,O(k),!K)if(a(y)!==null)K=!0,H||(H=!0,ve());else{var $=a(b);$!==null&&V(j,$.startTime-k)}}var H=!1,C=-1,Q=5,ne=-1;function se(){return F?!0:!(r.unstable_now()-ne<Q)}function re(){if(F=!1,H){var k=r.unstable_now();ne=k;var $=!0;try{e:{K=!1,Z&&(Z=!1,G(C),C=-1),L=!0;var W=q;try{t:{for(O(k),x=a(y);x!==null&&!(x.expirationTime>k&&se());){var oe=x.callback;if(typeof oe=="function"){x.callback=null,q=x.priorityLevel;var pe=oe(x.expirationTime<=k);if(k=r.unstable_now(),typeof pe=="function"){x.callback=pe,O(k),$=!0;break t}x===a(y)&&l(y),O(k)}else l(y);x=a(y)}if(x!==null)$=!0;else{var w=a(b);w!==null&&V(j,w.startTime-k),$=!1}}break e}finally{x=null,q=W,L=!1}$=void 0}}finally{$?ve():H=!1}}}var ve;if(typeof te=="function")ve=function(){te(re)};else if(typeof MessageChannel<"u"){var Le=new MessageChannel,nt=Le.port2;Le.port1.onmessage=re,ve=function(){nt.postMessage(null)}}else ve=function(){z(re,0)};function V(k,$){C=z(function(){k(r.unstable_now())},$)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(k){k.callback=null},r.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<k?Math.floor(1e3/k):5},r.unstable_getCurrentPriorityLevel=function(){return q},r.unstable_next=function(k){switch(q){case 1:case 2:case 3:var $=3;break;default:$=q}var W=q;q=$;try{return k()}finally{q=W}},r.unstable_requestPaint=function(){F=!0},r.unstable_runWithPriority=function(k,$){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var W=q;q=k;try{return $()}finally{q=W}},r.unstable_scheduleCallback=function(k,$,W){var oe=r.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?oe+W:oe):W=oe,k){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=W+pe,k={id:A++,callback:$,priorityLevel:k,startTime:W,expirationTime:pe,sortIndex:-1},W>oe?(k.sortIndex=W,i(b,k),a(y)===null&&k===a(b)&&(Z?(G(C),C=-1):Z=!0,V(j,W-oe))):(k.sortIndex=pe,i(y,k),K||L||(K=!0,H||(H=!0,ve()))),k},r.unstable_shouldYield=se,r.unstable_wrapCallback=function(k){var $=q;return function(){var W=q;q=$;try{return k.apply(this,arguments)}finally{q=W}}}})(Rc)),Rc}var Sp;function Nv(){return Sp||(Sp=1,Oc.exports=Av()),Oc.exports}var zc={exports:{}},ft={};var Ep;function Ov(){if(Ep)return ft;Ep=1;var r=Ic();function i(y){var b="https://react.dev/errors/"+y;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)b+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+y+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(y,b,A){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:y,containerInfo:b,implementation:A}}var d=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,b){if(y==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,ft.createPortal=function(y,b){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(i(299));return f(y,b,null,A)},ft.flushSync=function(y){var b=d.T,A=l.p;try{if(d.T=null,l.p=2,y)return y()}finally{d.T=b,l.p=A,l.d.f()}},ft.preconnect=function(y,b){typeof y=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,l.d.C(y,b))},ft.prefetchDNS=function(y){typeof y=="string"&&l.d.D(y)},ft.preinit=function(y,b){if(typeof y=="string"&&b&&typeof b.as=="string"){var A=b.as,x=m(A,b.crossOrigin),q=typeof b.integrity=="string"?b.integrity:void 0,L=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;A==="style"?l.d.S(y,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:x,integrity:q,fetchPriority:L}):A==="script"&&l.d.X(y,{crossOrigin:x,integrity:q,fetchPriority:L,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},ft.preinitModule=function(y,b){if(typeof y=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var A=m(b.as,b.crossOrigin);l.d.M(y,{crossOrigin:A,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&l.d.M(y)},ft.preload=function(y,b){if(typeof y=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var A=b.as,x=m(A,b.crossOrigin);l.d.L(y,A,{crossOrigin:x,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},ft.preloadModule=function(y,b){if(typeof y=="string")if(b){var A=m(b.as,b.crossOrigin);l.d.m(y,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:A,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else l.d.m(y)},ft.requestFormReset=function(y){l.d.r(y)},ft.unstable_batchedUpdates=function(y,b){return y(b)},ft.useFormState=function(y,b,A){return d.H.useFormState(y,b,A)},ft.useFormStatus=function(){return d.H.useHostTransitionStatus()},ft.version="19.2.8",ft}var kp;function Rv(){if(kp)return zc.exports;kp=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}return r(),zc.exports=Ov(),zc.exports}var Tp;function zv(){if(Tp)return da;Tp=1;var r=Nv(),i=Ic(),a=Rv();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(f(e)!==e)throw Error(l(188))}function b(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(l(188));return t!==e?null:e}for(var n=e,s=t;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(s=o.return,s!==null){n=s;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return y(o),e;if(c===s)return y(o),t;c=c.sibling}throw Error(l(188))}if(n.return!==s.return)n=o,s=c;else{for(var h=!1,p=o.child;p;){if(p===n){h=!0,n=o,s=c;break}if(p===s){h=!0,s=o,n=c;break}p=p.sibling}if(!h){for(p=c.child;p;){if(p===n){h=!0,n=c,s=o;break}if(p===s){h=!0,s=c,n=o;break}p=p.sibling}if(!h)throw Error(l(189))}}if(n.alternate!==s)throw Error(l(190))}if(n.tag!==3)throw Error(l(188));return n.stateNode.current===n?e:t}function A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,q=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),K=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),te=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function ve(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Symbol.for("react.client.reference");function nt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Z:return"Fragment";case z:return"Profiler";case F:return"StrictMode";case j:return"Suspense";case H:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case K:return"Portal";case te:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case O:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case C:return t=e.displayName||null,t!==null?t:nt(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return nt(e(t))}catch{}}return null}var V=Array.isArray,k=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},oe=[],pe=-1;function w(e){return{current:e}}function B(e){0>pe||(e.current=oe[pe],oe[pe]=null,pe--)}function X(e,t){pe++,oe[pe]=e.current,e.current=t}var P=w(null),ce=w(null),he=w(null),Ee=w(null);function it(e,t){switch(X(he,t),X(ce,e),X(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jd(t),e=Md(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(P),X(P,e)}function Me(){B(P),B(ce),B(he)}function ti(e){e.memoizedState!==null&&X(Ee,e);var t=P.current,n=Md(t,e.type);t!==n&&(X(ce,e),X(P,n))}function ln(e){ce.current===e&&(B(P),B(ce)),Ee.current===e&&(B(Ee),la._currentValue=W)}var ps,ms;function rn(e){if(ps===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ps=t&&t[1]||"",ms=-1<n.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+
|
|
4
|
-
`),_=
|
|
5
|
-
`);for(o=
|
|
6
|
-
`+
|
|
7
|
-
Error generating stack: `+
|
|
8
|
-
`+a.stack}}var $=Object.prototype.hasOwnProperty,se=l.unstable_scheduleCallback,Ce=l.unstable_cancelCallback,me=l.unstable_shouldYield,it=l.unstable_requestPaint,Ve=l.unstable_now,Ei=l.unstable_getCurrentPriorityLevel,oc=l.unstable_ImmediatePriority,uc=l.unstable_UserBlockingPriority,Ts=l.unstable_NormalPriority,Qm=l.unstable_LowPriority,cc=l.unstable_IdlePriority,Km=l.log,Zm=l.unstable_setDisableYieldValue,va=null,xt=null;function _n(e){if(typeof Km=="function"&&Zm(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(va,e)}catch{}}var wt=Math.clz32?Math.clz32:Wm,Jm=Math.log,Fm=Math.LN2;function Wm(e){return e>>>=0,e===0?32:31-(Jm(e)/Fm|0)|0}var ks=256,_s=262144,As=4194304;function ni(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ns(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var d=a&134217727;return d!==0?(a=d&~u,a!==0?o=ni(a):(h&=d,h!==0?o=ni(h):n||(n=d&~e,n!==0&&(o=ni(n))))):(d=a&~u,d!==0?o=ni(d):h!==0?o=ni(h):n||(n=a&~e,n!==0&&(o=ni(n)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:o}function ba(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Im(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fc(){var e=As;return As<<=1,(As&62914560)===0&&(As=4194304),e}function or(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Sa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Pm(e,t,n,a,o,u){var h=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var d=e.entanglements,g=e.expirationTimes,_=e.hiddenUpdates;for(n=h&~n;0<n;){var z=31-wt(n),D=1<<z;d[z]=0,g[z]=-1;var A=_[z];if(A!==null)for(_[z]=null,z=0;z<A.length;z++){var O=A[z];O!==null&&(O.lane&=-536870913)}n&=~D}a!==0&&hc(e,a,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function hc(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-wt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function dc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-wt(n),o=1<<a;o&t|e[a]&t&&(e[a]|=t),n&=~o}}function pc(e,t){var n=t&-t;return n=(n&42)!==0?1:ur(n),(n&(e.suspendedLanes|t))!==0?0:n}function ur(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function cr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mc(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:tp(e.type))}function yc(e,t){var n=H.p;try{return H.p=e,t()}finally{H.p=n}}var An=Math.random().toString(36).slice(2),at="__reactFiber$"+An,pt="__reactProps$"+An,Ti="__reactContainer$"+An,fr="__reactEvents$"+An,ey="__reactListeners$"+An,ty="__reactHandles$"+An,gc="__reactResources$"+An,xa="__reactMarker$"+An;function hr(e){delete e[at],delete e[pt],delete e[fr],delete e[ey],delete e[ty]}function ki(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ti]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ld(e);e!==null;){if(n=e[at])return n;e=Ld(e)}return t}e=n,n=e.parentNode}return null}function _i(e){if(e=e[at]||e[Ti]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function wa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Ai(e){var t=e[gc];return t||(t=e[gc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Pe(e){e[xa]=!0}var vc=new Set,bc={};function ii(e,t){Ni(e,t),Ni(e+"Capture",t)}function Ni(e,t){for(bc[e]=t,e=0;e<t.length;e++)vc.add(t[e])}var ny=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]*$"),Sc={},xc={};function iy(e){return $.call(xc,e)?!0:$.call(Sc,e)?!1:ny.test(e)?xc[e]=!0:(Sc[e]=!0,!1)}function Os(e,t,n){if(iy(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function zs(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function on(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ay(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){n=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(h){n=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dr(e){if(!e._valueTracker){var t=wc(e)?"checked":"value";e._valueTracker=ay(e,t,""+e[t])}}function Ec(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=wc(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function js(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var sy=/[\n"\\]/g;function Rt(e){return e.replace(sy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pr(e,t,n,a,o,u,h,d){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?mr(e,h,jt(t)):n!=null?mr(e,h,jt(n)):a!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+jt(d):e.removeAttribute("name")}function Tc(e,t,n,a,o,u,h,d){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){dr(e);return}n=n!=null?""+jt(n):"",t=t!=null?""+jt(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=d?e.checked:!!a,e.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),dr(e)}function mr(e,t,n){t==="number"&&js(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Oi(e,t,n,a){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&a&&(e[n].defaultSelected=!0)}else{for(n=""+jt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function kc(e,t,n){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+jt(n):""}function _c(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(r(92));if(X(a)){if(1<a.length)throw Error(r(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=jt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),dr(e)}function zi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ly=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 Ac(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||ly.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Nc(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var o in t)a=t[o],t.hasOwnProperty(o)&&n[o]!==a&&Ac(e,o,a)}else for(var u in t)t.hasOwnProperty(u)&&Ac(e,u,t[u])}function yr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ry=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"]]),oy=/^[\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 Rs(e){return oy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function un(){}var gr=null;function vr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ji=null,Ri=null;function Oc(e){var t=_i(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(pr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Rt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var o=a[pt]||null;if(!o)throw Error(r(90));pr(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Ec(a)}break e;case"textarea":kc(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Oi(e,!!n.multiple,t,!1)}}}var br=!1;function zc(e,t,n){if(br)return e(t,n);br=!0;try{var a=e(t);return a}finally{if(br=!1,(ji!==null||Ri!==null)&&(bl(),ji&&(t=ji,e=Ri,Ri=ji=null,Oc(t),e)))for(t=0;t<e.length;t++)Oc(e[t])}}function Ea(e,t){var n=e.stateNode;if(n===null)return null;var a=n[pt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sr=!1;if(cn)try{var Ta={};Object.defineProperty(Ta,"passive",{get:function(){Sr=!0}}),window.addEventListener("test",Ta,Ta),window.removeEventListener("test",Ta,Ta)}catch{Sr=!1}var Nn=null,xr=null,Ms=null;function jc(){if(Ms)return Ms;var e,t=xr,n=t.length,a,o="value"in Nn?Nn.value:Nn.textContent,u=o.length;for(e=0;e<n&&t[e]===o[e];e++);var h=n-e;for(a=1;a<=h&&t[n-a]===o[u-a];a++);return Ms=o.slice(e,1<a?1-a:void 0)}function Us(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Cs(){return!0}function Rc(){return!1}function mt(e){function t(n,a,o,u,h){this._reactName=n,this._targetInst=o,this.type=a,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(u):u[d]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Cs:Rc,this.isPropagationStopped=Rc,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Cs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cs)},persist:function(){},isPersistent:Cs}),t}var ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ds=mt(ai),ka=w({},ai,{view:0,detail:0}),uy=mt(ka),wr,Er,_a,Bs=w({},ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_a&&(_a&&e.type==="mousemove"?(wr=e.screenX-_a.screenX,Er=e.screenY-_a.screenY):Er=wr=0,_a=e),wr)},movementY:function(e){return"movementY"in e?e.movementY:Er}}),Mc=mt(Bs),cy=w({},Bs,{dataTransfer:0}),fy=mt(cy),hy=w({},ka,{relatedTarget:0}),Tr=mt(hy),dy=w({},ai,{animationName:0,elapsedTime:0,pseudoElement:0}),py=mt(dy),my=w({},ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yy=mt(my),gy=w({},ai,{data:0}),Uc=mt(gy),vy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},by={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"},Sy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sy[e])?!!t[e]:!1}function kr(){return xy}var wy=w({},ka,{key:function(e){if(e.key){var t=vy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Us(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?by[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kr,charCode:function(e){return e.type==="keypress"?Us(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Us(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ey=mt(wy),Ty=w({},Bs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cc=mt(Ty),ky=w({},ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kr}),_y=mt(ky),Ay=w({},ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ny=mt(Ay),Oy=w({},Bs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zy=mt(Oy),jy=w({},ai,{newState:0,oldState:0}),Ry=mt(jy),My=[9,13,27,32],_r=cn&&"CompositionEvent"in window,Aa=null;cn&&"documentMode"in document&&(Aa=document.documentMode);var Uy=cn&&"TextEvent"in window&&!Aa,Dc=cn&&(!_r||Aa&&8<Aa&&11>=Aa),Bc=" ",qc=!1;function Lc(e,t){switch(e){case"keyup":return My.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mi=!1;function Cy(e,t){switch(e){case"compositionend":return Hc(t);case"keypress":return t.which!==32?null:(qc=!0,Bc);case"textInput":return e=t.data,e===Bc&&qc?null:e;default:return null}}function Dy(e,t){if(Mi)return e==="compositionend"||!_r&&Lc(e,t)?(e=jc(),Ms=xr=Nn=null,Mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dc&&t.locale!=="ko"?null:t.data;default:return null}}var By={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!By[e.type]:t==="textarea"}function $c(e,t,n,a){ji?Ri?Ri.push(a):Ri=[a]:ji=a,t=_l(t,"onChange"),0<t.length&&(n=new Ds("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Na=null,Oa=null;function qy(e){kd(e,0)}function qs(e){var t=wa(e);if(Ec(t))return e}function Xc(e,t){if(e==="change")return t}var Vc=!1;if(cn){var Ar;if(cn){var Nr="oninput"in document;if(!Nr){var Gc=document.createElement("div");Gc.setAttribute("oninput","return;"),Nr=typeof Gc.oninput=="function"}Ar=Nr}else Ar=!1;Vc=Ar&&(!document.documentMode||9<document.documentMode)}function Qc(){Na&&(Na.detachEvent("onpropertychange",Kc),Oa=Na=null)}function Kc(e){if(e.propertyName==="value"&&qs(Oa)){var t=[];$c(t,Oa,e,vr(e)),zc(qy,t)}}function Ly(e,t,n){e==="focusin"?(Qc(),Na=t,Oa=n,Na.attachEvent("onpropertychange",Kc)):e==="focusout"&&Qc()}function Hy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qs(Oa)}function Yy(e,t){if(e==="click")return qs(t)}function $y(e,t){if(e==="input"||e==="change")return qs(t)}function Xy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:Xy;function za(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var o=n[a];if(!$.call(t,o)||!Et(e[o],t[o]))return!1}return!0}function Zc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jc(e,t){var n=Zc(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zc(n)}}function Fc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=js(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=js(e.document)}return t}function Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Vy=cn&&"documentMode"in document&&11>=document.documentMode,Ui=null,zr=null,ja=null,jr=!1;function Ic(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Ui==null||Ui!==js(a)||(a=Ui,"selectionStart"in a&&Or(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ja&&za(ja,a)||(ja=a,a=_l(zr,"onSelect"),0<a.length&&(t=new Ds("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Ui)))}function si(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ci={animationend:si("Animation","AnimationEnd"),animationiteration:si("Animation","AnimationIteration"),animationstart:si("Animation","AnimationStart"),transitionrun:si("Transition","TransitionRun"),transitionstart:si("Transition","TransitionStart"),transitioncancel:si("Transition","TransitionCancel"),transitionend:si("Transition","TransitionEnd")},Rr={},Pc={};cn&&(Pc=document.createElement("div").style,"AnimationEvent"in window||(delete Ci.animationend.animation,delete Ci.animationiteration.animation,delete Ci.animationstart.animation),"TransitionEvent"in window||delete Ci.transitionend.transition);function li(e){if(Rr[e])return Rr[e];if(!Ci[e])return e;var t=Ci[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pc)return Rr[e]=t[n];return e}var ef=li("animationend"),tf=li("animationiteration"),nf=li("animationstart"),Gy=li("transitionrun"),Qy=li("transitionstart"),Ky=li("transitioncancel"),af=li("transitionend"),sf=new Map,Mr="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(" ");Mr.push("scrollEnd");function $t(e,t){sf.set(e,t),ii(t,[e])}var Ls=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Mt=[],Di=0,Ur=0;function Hs(){for(var e=Di,t=Ur=Di=0;t<e;){var n=Mt[t];Mt[t++]=null;var a=Mt[t];Mt[t++]=null;var o=Mt[t];Mt[t++]=null;var u=Mt[t];if(Mt[t++]=null,a!==null&&o!==null){var h=a.pending;h===null?o.next=o:(o.next=h.next,h.next=o),a.pending=o}u!==0&&lf(n,o,u)}}function Ys(e,t,n,a){Mt[Di++]=e,Mt[Di++]=t,Mt[Di++]=n,Mt[Di++]=a,Ur|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Cr(e,t,n,a){return Ys(e,t,n,a),$s(e)}function ri(e,t){return Ys(e,null,null,t),$s(e)}function lf(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var o=!1,u=e.return;u!==null;)u.childLanes|=n,a=u.alternate,a!==null&&(a.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-wt(n),e=u.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=n|536870912),u):null}function $s(e){if(50<Pa)throw Pa=0,Go=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Bi={};function Zy(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tt(e,t,n,a){return new Zy(e,t,n,a)}function Dr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fn(e,t){var n=e.alternate;return n===null?(n=Tt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function rf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Xs(e,t,n,a,o,u){var h=0;if(a=e,typeof e=="function")Dr(e)&&(h=1);else if(typeof e=="string")h=Pg(e,n,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=Tt(31,n,t,o),e.elementType=te,e.lanes=u,e;case Z:return oi(n.children,o,u,t);case I:h=8,o|=24;break;case U:return e=Tt(12,n,t,o|2),e.elementType=U,e.lanes=u,e;case C:return e=Tt(13,n,t,o),e.elementType=C,e.lanes=u,e;case L:return e=Tt(19,n,t,o),e.elementType=L,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ae:h=10;break e;case K:h=9;break e;case j:h=11;break e;case R:h=14;break e;case G:h=16,a=null;break e}h=29,n=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Tt(h,n,t,o),t.elementType=e,t.type=a,t.lanes=u,t}function oi(e,t,n,a){return e=Tt(7,e,a,t),e.lanes=n,e}function Br(e,t,n){return e=Tt(6,e,null,t),e.lanes=n,e}function of(e){var t=Tt(18,null,null,0);return t.stateNode=e,t}function qr(e,t,n){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var uf=new WeakMap;function Ut(e,t){if(typeof e=="object"&&e!==null){var n=uf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ga(t)},uf.set(e,t),t)}return{value:e,source:t,stack:ga(t)}}var qi=[],Li=0,Vs=null,Ra=0,Ct=[],Dt=0,On=null,Ft=1,Wt="";function hn(e,t){qi[Li++]=Ra,qi[Li++]=Vs,Vs=e,Ra=t}function cf(e,t,n){Ct[Dt++]=Ft,Ct[Dt++]=Wt,Ct[Dt++]=On,On=e;var a=Ft;e=Wt;var o=32-wt(a)-1;a&=~(1<<o),n+=1;var u=32-wt(t)+o;if(30<u){var h=o-o%5;u=(a&(1<<h)-1).toString(32),a>>=h,o-=h,Ft=1<<32-wt(t)+o|n<<o|a,Wt=u+e}else Ft=1<<u|n<<o|a,Wt=e}function Lr(e){e.return!==null&&(hn(e,1),cf(e,1,0))}function Hr(e){for(;e===Vs;)Vs=qi[--Li],qi[Li]=null,Ra=qi[--Li],qi[Li]=null;for(;e===On;)On=Ct[--Dt],Ct[Dt]=null,Wt=Ct[--Dt],Ct[Dt]=null,Ft=Ct[--Dt],Ct[Dt]=null}function ff(e,t){Ct[Dt++]=Ft,Ct[Dt++]=Wt,Ct[Dt++]=On,Ft=t.id,Wt=t.overflow,On=e}var st=null,De=null,xe=!1,zn=null,Bt=!1,Yr=Error(r(519));function jn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ma(Ut(t,e)),Yr}function hf(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[at]=e,t[pt]=a,n){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(n=0;n<ts.length;n++)ge(ts[n],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),Tc(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),_c(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Od(t.textContent,n)?(a.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),a.onScroll!=null&&ge("scroll",t),a.onScrollEnd!=null&&ge("scrollend",t),a.onClick!=null&&(t.onclick=un),t=!0):t=!1,t||jn(e,!0)}function df(e){for(st=e.return;st;)switch(st.tag){case 5:case 31:case 13:Bt=!1;return;case 27:case 3:Bt=!0;return;default:st=st.return}}function Hi(e){if(e!==st)return!1;if(!xe)return df(e),xe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||lu(e.type,e.memoizedProps)),n=!n),n&&De&&jn(e),df(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));De=qd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));De=qd(e)}else t===27?(t=De,Gn(e.type)?(e=fu,fu=null,De=e):De=t):De=st?Lt(e.stateNode.nextSibling):null;return!0}function ui(){De=st=null,xe=!1}function $r(){var e=zn;return e!==null&&(bt===null?bt=e:bt.push.apply(bt,e),zn=null),e}function Ma(e){zn===null?zn=[e]:zn.push(e)}var Xr=b(null),ci=null,dn=null;function Rn(e,t,n){V(Xr,t._currentValue),t._currentValue=n}function pn(e){e._currentValue=Xr.current,B(Xr)}function Vr(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Gr(e,t,n,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var h=o.child;u=u.firstContext;e:for(;u!==null;){var d=u;u=o;for(var g=0;g<t.length;g++)if(d.context===t[g]){u.lanes|=n,d=u.alternate,d!==null&&(d.lanes|=n),Vr(u.return,n,e),a||(h=null);break e}u=d.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(r(341));h.lanes|=n,u=h.alternate,u!==null&&(u.lanes|=n),Vr(h,n,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function Yi(e,t,n,a){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(r(387));if(h=h.memoizedProps,h!==null){var d=o.type;Et(o.pendingProps.value,h.value)||(e!==null?e.push(d):e=[d])}}else if(o===Ee.current){if(h=o.alternate,h===null)throw Error(r(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ls):e=[ls])}o=o.return}e!==null&&Gr(t,e,n,a),t.flags|=262144}function Gs(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fi(e){ci=e,dn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return pf(ci,e)}function Qs(e,t){return ci===null&&fi(e),pf(e,t)}function pf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},dn===null){if(e===null)throw Error(r(308));dn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else dn=dn.next=t;return n}var Jy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Fy=l.unstable_scheduleCallback,Wy=l.unstable_NormalPriority,Ge={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qr(){return{controller:new Jy,data:new Map,refCount:0}}function Ua(e){e.refCount--,e.refCount===0&&Fy(Wy,function(){e.controller.abort()})}var Ca=null,Kr=0,$i=0,Xi=null;function Iy(e,t){if(Ca===null){var n=Ca=[];Kr=0,$i=Wo(),Xi={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Kr++,t.then(mf,mf),t}function mf(){if(--Kr===0&&Ca!==null){Xi!==null&&(Xi.status="fulfilled");var e=Ca;Ca=null,$i=0,Xi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Py(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),a}var yf=T.S;T.S=function(e,t){Ph=Ve(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Iy(e,t),yf!==null&&yf(e,t)};var hi=b(null);function Zr(){var e=hi.current;return e!==null?e:Me.pooledCache}function Ks(e,t){t===null?V(hi,hi.current):V(hi,t.pool)}function gf(){var e=Zr();return e===null?null:{parent:Ge._currentValue,pool:e}}var Vi=Error(r(460)),Jr=Error(r(474)),Zs=Error(r(542)),Js={then:function(){}};function vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(un,un),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xf(e),e;default:if(typeof t.status=="string")t.then(un,un);else{if(e=Me,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xf(e),e}throw pi=t,Vi}}function di(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(pi=n,Vi):n}}var pi=null;function Sf(){if(pi===null)throw Error(r(459));var e=pi;return pi=null,e}function xf(e){if(e===Vi||e===Zs)throw Error(r(483))}var Gi=null,Da=0;function Fs(e){var t=Da;return Da+=1,Gi===null&&(Gi=[]),bf(Gi,e,t)}function Ba(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ws(e,t){throw t.$$typeof===q?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wf(e){function t(E,S){if(e){var k=E.deletions;k===null?(E.deletions=[S],E.flags|=16):k.push(S)}}function n(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function a(E){for(var S=new Map;E!==null;)E.key!==null?S.set(E.key,E):S.set(E.index,E),E=E.sibling;return S}function o(E,S){return E=fn(E,S),E.index=0,E.sibling=null,E}function u(E,S,k){return E.index=k,e?(k=E.alternate,k!==null?(k=k.index,k<S?(E.flags|=67108866,S):k):(E.flags|=67108866,S)):(E.flags|=1048576,S)}function h(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function d(E,S,k,M){return S===null||S.tag!==6?(S=Br(k,E.mode,M),S.return=E,S):(S=o(S,k),S.return=E,S)}function g(E,S,k,M){var ne=k.type;return ne===Z?z(E,S,k.props.children,M,k.key):S!==null&&(S.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===G&&di(ne)===S.type)?(S=o(S,k.props),Ba(S,k),S.return=E,S):(S=Xs(k.type,k.key,k.props,null,E.mode,M),Ba(S,k),S.return=E,S)}function _(E,S,k,M){return S===null||S.tag!==4||S.stateNode.containerInfo!==k.containerInfo||S.stateNode.implementation!==k.implementation?(S=qr(k,E.mode,M),S.return=E,S):(S=o(S,k.children||[]),S.return=E,S)}function z(E,S,k,M,ne){return S===null||S.tag!==7?(S=oi(k,E.mode,M,ne),S.return=E,S):(S=o(S,k),S.return=E,S)}function D(E,S,k){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Br(""+S,E.mode,k),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Y:return k=Xs(S.type,S.key,S.props,null,E.mode,k),Ba(k,S),k.return=E,k;case ee:return S=qr(S,E.mode,k),S.return=E,S;case G:return S=di(S),D(E,S,k)}if(X(S)||ve(S))return S=oi(S,E.mode,k,null),S.return=E,S;if(typeof S.then=="function")return D(E,Fs(S),k);if(S.$$typeof===ae)return D(E,Qs(E,S),k);Ws(E,S)}return null}function A(E,S,k,M){var ne=S!==null?S.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return ne!==null?null:d(E,S,""+k,M);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Y:return k.key===ne?g(E,S,k,M):null;case ee:return k.key===ne?_(E,S,k,M):null;case G:return k=di(k),A(E,S,k,M)}if(X(k)||ve(k))return ne!==null?null:z(E,S,k,M,null);if(typeof k.then=="function")return A(E,S,Fs(k),M);if(k.$$typeof===ae)return A(E,S,Qs(E,k),M);Ws(E,k)}return null}function O(E,S,k,M,ne){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return E=E.get(k)||null,d(S,E,""+M,ne);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Y:return E=E.get(M.key===null?k:M.key)||null,g(S,E,M,ne);case ee:return E=E.get(M.key===null?k:M.key)||null,_(S,E,M,ne);case G:return M=di(M),O(E,S,k,M,ne)}if(X(M)||ve(M))return E=E.get(k)||null,z(S,E,M,ne,null);if(typeof M.then=="function")return O(E,S,k,Fs(M),ne);if(M.$$typeof===ae)return O(E,S,k,Qs(S,M),ne);Ws(S,M)}return null}function F(E,S,k,M){for(var ne=null,Te=null,P=S,de=S=0,Se=null;P!==null&&de<k.length;de++){P.index>de?(Se=P,P=null):Se=P.sibling;var ke=A(E,P,k[de],M);if(ke===null){P===null&&(P=Se);break}e&&P&&ke.alternate===null&&t(E,P),S=u(ke,S,de),Te===null?ne=ke:Te.sibling=ke,Te=ke,P=Se}if(de===k.length)return n(E,P),xe&&hn(E,de),ne;if(P===null){for(;de<k.length;de++)P=D(E,k[de],M),P!==null&&(S=u(P,S,de),Te===null?ne=P:Te.sibling=P,Te=P);return xe&&hn(E,de),ne}for(P=a(P);de<k.length;de++)Se=O(P,E,de,k[de],M),Se!==null&&(e&&Se.alternate!==null&&P.delete(Se.key===null?de:Se.key),S=u(Se,S,de),Te===null?ne=Se:Te.sibling=Se,Te=Se);return e&&P.forEach(function(Fn){return t(E,Fn)}),xe&&hn(E,de),ne}function le(E,S,k,M){if(k==null)throw Error(r(151));for(var ne=null,Te=null,P=S,de=S=0,Se=null,ke=k.next();P!==null&&!ke.done;de++,ke=k.next()){P.index>de?(Se=P,P=null):Se=P.sibling;var Fn=A(E,P,ke.value,M);if(Fn===null){P===null&&(P=Se);break}e&&P&&Fn.alternate===null&&t(E,P),S=u(Fn,S,de),Te===null?ne=Fn:Te.sibling=Fn,Te=Fn,P=Se}if(ke.done)return n(E,P),xe&&hn(E,de),ne;if(P===null){for(;!ke.done;de++,ke=k.next())ke=D(E,ke.value,M),ke!==null&&(S=u(ke,S,de),Te===null?ne=ke:Te.sibling=ke,Te=ke);return xe&&hn(E,de),ne}for(P=a(P);!ke.done;de++,ke=k.next())ke=O(P,E,de,ke.value,M),ke!==null&&(e&&ke.alternate!==null&&P.delete(ke.key===null?de:ke.key),S=u(ke,S,de),Te===null?ne=ke:Te.sibling=ke,Te=ke);return e&&P.forEach(function(cv){return t(E,cv)}),xe&&hn(E,de),ne}function je(E,S,k,M){if(typeof k=="object"&&k!==null&&k.type===Z&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Y:e:{for(var ne=k.key;S!==null;){if(S.key===ne){if(ne=k.type,ne===Z){if(S.tag===7){n(E,S.sibling),M=o(S,k.props.children),M.return=E,E=M;break e}}else if(S.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===G&&di(ne)===S.type){n(E,S.sibling),M=o(S,k.props),Ba(M,k),M.return=E,E=M;break e}n(E,S);break}else t(E,S);S=S.sibling}k.type===Z?(M=oi(k.props.children,E.mode,M,k.key),M.return=E,E=M):(M=Xs(k.type,k.key,k.props,null,E.mode,M),Ba(M,k),M.return=E,E=M)}return h(E);case ee:e:{for(ne=k.key;S!==null;){if(S.key===ne)if(S.tag===4&&S.stateNode.containerInfo===k.containerInfo&&S.stateNode.implementation===k.implementation){n(E,S.sibling),M=o(S,k.children||[]),M.return=E,E=M;break e}else{n(E,S);break}else t(E,S);S=S.sibling}M=qr(k,E.mode,M),M.return=E,E=M}return h(E);case G:return k=di(k),je(E,S,k,M)}if(X(k))return F(E,S,k,M);if(ve(k)){if(ne=ve(k),typeof ne!="function")throw Error(r(150));return k=ne.call(k),le(E,S,k,M)}if(typeof k.then=="function")return je(E,S,Fs(k),M);if(k.$$typeof===ae)return je(E,S,Qs(E,k),M);Ws(E,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,S!==null&&S.tag===6?(n(E,S.sibling),M=o(S,k),M.return=E,E=M):(n(E,S),M=Br(k,E.mode,M),M.return=E,E=M),h(E)):n(E,S)}return function(E,S,k,M){try{Da=0;var ne=je(E,S,k,M);return Gi=null,ne}catch(P){if(P===Vi||P===Zs)throw P;var Te=Tt(29,P,null,E.mode);return Te.lanes=M,Te.return=E,Te}}}var mi=wf(!0),Ef=wf(!1),Mn=!1;function Fr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Un(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(_e&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=$s(e),lf(e,null,n),t}return Ys(e,a,t,n),$s(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,dc(e,n)}}function Ir(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var o=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?o=u=h:u=u.next=h,n=n.next}while(n!==null);u===null?o=u=t:u=u.next=t}else o=u=t;n={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Pr=!1;function La(){if(Pr){var e=Xi;if(e!==null)throw e}}function Ha(e,t,n,a){Pr=!1;var o=e.updateQueue;Mn=!1;var u=o.firstBaseUpdate,h=o.lastBaseUpdate,d=o.shared.pending;if(d!==null){o.shared.pending=null;var g=d,_=g.next;g.next=null,h===null?u=_:h.next=_,h=g;var z=e.alternate;z!==null&&(z=z.updateQueue,d=z.lastBaseUpdate,d!==h&&(d===null?z.firstBaseUpdate=_:d.next=_,z.lastBaseUpdate=g))}if(u!==null){var D=o.baseState;h=0,z=_=g=null,d=u;do{var A=d.lane&-536870913,O=A!==d.lane;if(O?(be&A)===A:(a&A)===A){A!==0&&A===$i&&(Pr=!0),z!==null&&(z=z.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var F=e,le=d;A=t;var je=n;switch(le.tag){case 1:if(F=le.payload,typeof F=="function"){D=F.call(je,D,A);break e}D=F;break e;case 3:F.flags=F.flags&-65537|128;case 0:if(F=le.payload,A=typeof F=="function"?F.call(je,D,A):F,A==null)break e;D=w({},D,A);break e;case 2:Mn=!0}}A=d.callback,A!==null&&(e.flags|=64,O&&(e.flags|=8192),O=o.callbacks,O===null?o.callbacks=[A]:O.push(A))}else O={lane:A,tag:d.tag,payload:d.payload,callback:d.callback,next:null},z===null?(_=z=O,g=D):z=z.next=O,h|=A;if(d=d.next,d===null){if(d=o.shared.pending,d===null)break;O=d,d=O.next,O.next=null,o.lastBaseUpdate=O,o.shared.pending=null}}while(!0);z===null&&(g=D),o.baseState=g,o.firstBaseUpdate=_,o.lastBaseUpdate=z,u===null&&(o.shared.lanes=0),Hn|=h,e.lanes=h,e.memoizedState=D}}function Tf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function kf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Tf(n[e],t)}var Qi=b(null),Is=b(0);function _f(e,t){e=En,V(Is,e),V(Qi,t),En=e|t.baseLanes}function eo(){V(Is,En),V(Qi,Qi.current)}function to(){En=Is.current,B(Qi),B(Is)}var kt=b(null),qt=null;function Dn(e){var t=e.alternate;V($e,$e.current&1),V(kt,e),qt===null&&(t===null||Qi.current!==null||t.memoizedState!==null)&&(qt=e)}function no(e){V($e,$e.current),V(kt,e),qt===null&&(qt=e)}function Af(e){e.tag===22?(V($e,$e.current),V(kt,e),qt===null&&(qt=e)):Bn()}function Bn(){V($e,$e.current),V(kt,kt.current)}function _t(e){B(kt),qt===e&&(qt=null),B($e)}var $e=b(0);function Ps(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uu(n)||cu(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=0,fe=null,Oe=null,Qe=null,el=!1,Ki=!1,yi=!1,tl=0,Ya=0,Zi=null,eg=0;function He(){throw Error(r(321))}function io(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Et(e[n],t[n]))return!1;return!0}function ao(e,t,n,a,o,u){return mn=u,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?ch:So,yi=!1,u=n(a,o),yi=!1,Ki&&(u=Of(t,n,a,o)),Nf(e),u}function Nf(e){T.H=Va;var t=Oe!==null&&Oe.next!==null;if(mn=0,Qe=Oe=fe=null,el=!1,Ya=0,Zi=null,t)throw Error(r(300));e===null||Ke||(e=e.dependencies,e!==null&&Gs(e)&&(Ke=!0))}function Of(e,t,n,a){fe=e;var o=0;do{if(Ki&&(Zi=null),Ya=0,Ki=!1,25<=o)throw Error(r(301));if(o+=1,Qe=Oe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}T.H=fh,u=t(n,a)}while(Ki);return u}function tg(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?$a(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(fe.flags|=1024),t}function so(){var e=tl!==0;return tl=0,e}function lo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ro(e){if(el){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}el=!1}mn=0,Qe=Oe=fe=null,Ki=!1,Ya=tl=0,Zi=null}function ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?fe.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Xe(){if(Oe===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Qe===null?fe.memoizedState:Qe.next;if(t!==null)Qe=t,Oe=e;else{if(e===null)throw fe.alternate===null?Error(r(467)):Error(r(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Qe===null?fe.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function nl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $a(e){var t=Ya;return Ya+=1,Zi===null&&(Zi=[]),e=bf(Zi,e,t),t=fe,(Qe===null?t.memoizedState:Qe.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?ch:So),e}function il(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return $a(e);if(e.$$typeof===ae)return lt(e)}throw Error(r(438,String(e)))}function oo(e){var t=null,n=fe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=fe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=nl(),fe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=ie;return t.index++,n}function yn(e,t){return typeof t=="function"?t(e):t}function al(e){var t=Xe();return uo(t,Oe,e)}function uo(e,t,n){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var o=e.baseQueue,u=a.pending;if(u!==null){if(o!==null){var h=o.next;o.next=u.next,u.next=h}t.baseQueue=o=u,a.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var d=h=null,g=null,_=t,z=!1;do{var D=_.lane&-536870913;if(D!==_.lane?(be&D)===D:(mn&D)===D){var A=_.revertLane;if(A===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),D===$i&&(z=!0);else if((mn&A)===A){_=_.next,A===$i&&(z=!0);continue}else D={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},g===null?(d=g=D,h=u):g=g.next=D,fe.lanes|=A,Hn|=A;D=_.action,yi&&n(u,D),u=_.hasEagerState?_.eagerState:n(u,D)}else A={lane:D,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},g===null?(d=g=A,h=u):g=g.next=A,fe.lanes|=D,Hn|=D;_=_.next}while(_!==null&&_!==t);if(g===null?h=u:g.next=d,!Et(u,e.memoizedState)&&(Ke=!0,z&&(n=Xi,n!==null)))throw n;e.memoizedState=u,e.baseState=h,e.baseQueue=g,a.lastRenderedState=u}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function co(e){var t=Xe(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var a=n.dispatch,o=n.pending,u=t.memoizedState;if(o!==null){n.pending=null;var h=o=o.next;do u=e(u,h.action),h=h.next;while(h!==o);Et(u,t.memoizedState)||(Ke=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,a]}function zf(e,t,n){var a=fe,o=Xe(),u=xe;if(u){if(n===void 0)throw Error(r(407));n=n()}else n=t();var h=!Et((Oe||o).memoizedState,n);if(h&&(o.memoizedState=n,Ke=!0),o=o.queue,po(Mf.bind(null,a,o,e),[e]),o.getSnapshot!==t||h||Qe!==null&&Qe.memoizedState.tag&1){if(a.flags|=2048,Ji(9,{destroy:void 0},Rf.bind(null,a,o,n,t),null),Me===null)throw Error(r(349));u||(mn&127)!==0||jf(a,t,n)}return n}function jf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t=nl(),fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Rf(e,t,n,a){t.value=n,t.getSnapshot=a,Uf(t)&&Cf(e)}function Mf(e,t,n){return n(function(){Uf(t)&&Cf(e)})}function Uf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Et(e,n)}catch{return!0}}function Cf(e){var t=ri(e,2);t!==null&&St(t,e,2)}function fo(e){var t=ft();if(typeof e=="function"){var n=e;if(e=n(),yi){_n(!0);try{n()}finally{_n(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:e},t}function Df(e,t,n,a){return e.baseState=n,uo(e,Oe,typeof a=="function"?a:yn)}function ng(e,t,n,a,o){if(rl(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};T.T!==null?n(!0):u.isTransition=!1,a(u),n=t.pending,n===null?(u.next=t.pending=u,Bf(t,u)):(u.next=n.next,t.pending=n.next=u)}}function Bf(e,t){var n=t.action,a=t.payload,o=e.state;if(t.isTransition){var u=T.T,h={};T.T=h;try{var d=n(o,a),g=T.S;g!==null&&g(h,d),qf(e,t,d)}catch(_){ho(e,t,_)}finally{u!==null&&h.types!==null&&(u.types=h.types),T.T=u}}else try{u=n(o,a),qf(e,t,u)}catch(_){ho(e,t,_)}}function qf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Lf(e,t,a)},function(a){return ho(e,t,a)}):Lf(e,t,n)}function Lf(e,t,n){t.status="fulfilled",t.value=n,Hf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Bf(e,n)))}function ho(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Hf(t),t=t.next;while(t!==a)}e.action=null}function Hf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yf(e,t){return t}function $f(e,t){if(xe){var n=Me.formState;if(n!==null){e:{var a=fe;if(xe){if(De){t:{for(var o=De,u=Bt;o.nodeType!==8;){if(!u){o=null;break t}if(o=Lt(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){De=Lt(o.nextSibling),a=o.data==="F!";break e}}jn(a)}a=!1}a&&(t=n[0])}}return n=ft(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yf,lastRenderedState:t},n.queue=a,n=rh.bind(null,fe,a),a.dispatch=n,a=fo(!1),u=bo.bind(null,fe,!1,a.queue),a=ft(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,n=ng.bind(null,fe,o,u,n),o.dispatch=n,a.memoizedState=e,[t,n,!1]}function Xf(e){var t=Xe();return Vf(t,Oe,e)}function Vf(e,t,n){if(t=uo(e,t,Yf)[0],e=al(yn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=$a(t)}catch(h){throw h===Vi?Zs:h}else a=t;t=Xe();var o=t.queue,u=o.dispatch;return n!==t.memoizedState&&(fe.flags|=2048,Ji(9,{destroy:void 0},ig.bind(null,o,n),null)),[a,u,e]}function ig(e,t){e.action=t}function Gf(e){var t=Xe(),n=Oe;if(n!==null)return Vf(t,n,e);Xe(),t=t.memoizedState,n=Xe();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ji(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=fe.updateQueue,t===null&&(t=nl(),fe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Qf(){return Xe().memoizedState}function sl(e,t,n,a){var o=ft();fe.flags|=e,o.memoizedState=Ji(1|t,{destroy:void 0},n,a===void 0?null:a)}function ll(e,t,n,a){var o=Xe();a=a===void 0?null:a;var u=o.memoizedState.inst;Oe!==null&&a!==null&&io(a,Oe.memoizedState.deps)?o.memoizedState=Ji(t,u,n,a):(fe.flags|=e,o.memoizedState=Ji(1|t,u,n,a))}function Kf(e,t){sl(8390656,8,e,t)}function po(e,t){ll(2048,8,e,t)}function ag(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=nl(),fe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Zf(e){var t=Xe().memoizedState;return ag({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jf(e,t){return ll(4,2,e,t)}function Ff(e,t){return ll(4,4,e,t)}function Wf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function If(e,t,n){n=n!=null?n.concat([e]):null,ll(4,4,Wf.bind(null,t,e),n)}function mo(){}function Pf(e,t){var n=Xe();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&io(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function eh(e,t){var n=Xe();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&io(t,a[1]))return a[0];if(a=e(),yi){_n(!0);try{e()}finally{_n(!1)}}return n.memoizedState=[a,t],a}function yo(e,t,n){return n===void 0||(mn&1073741824)!==0&&(be&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=td(),fe.lanes|=e,Hn|=e,n)}function th(e,t,n,a){return Et(n,t)?n:Qi.current!==null?(e=yo(e,n,a),Et(e,t)||(Ke=!0),e):(mn&42)===0||(mn&1073741824)!==0&&(be&261930)===0?(Ke=!0,e.memoizedState=n):(e=td(),fe.lanes|=e,Hn|=e,t)}function nh(e,t,n,a,o){var u=H.p;H.p=u!==0&&8>u?u:8;var h=T.T,d={};T.T=d,bo(e,!1,t,n);try{var g=o(),_=T.S;if(_!==null&&_(d,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var z=Py(g,a);Xa(e,t,z,Ot(e))}else Xa(e,t,a,Ot(e))}catch(D){Xa(e,t,{then:function(){},status:"rejected",reason:D},Ot())}finally{H.p=u,h!==null&&d.types!==null&&(h.types=d.types),T.T=h}}function sg(){}function go(e,t,n,a){if(e.tag!==5)throw Error(r(476));var o=ih(e).queue;nh(e,o,t,J,n===null?sg:function(){return ah(e),n(a)})}function ih(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:J},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ah(e){var t=ih(e);t.next===null&&(t=e.alternate.memoizedState),Xa(e,t.next.queue,{},Ot())}function vo(){return lt(ls)}function sh(){return Xe().memoizedState}function lh(){return Xe().memoizedState}function lg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ot();e=Un(n);var a=Cn(t,e,n);a!==null&&(St(a,t,n),qa(a,t,n)),t={cache:Qr()},e.payload=t;return}t=t.return}}function rg(e,t,n){var a=Ot();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},rl(e)?oh(t,n):(n=Cr(e,t,n,a),n!==null&&(St(n,e,a),uh(n,t,a)))}function rh(e,t,n){var a=Ot();Xa(e,t,n,a)}function Xa(e,t,n,a){var o={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(rl(e))oh(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,d=u(h,n);if(o.hasEagerState=!0,o.eagerState=d,Et(d,h))return Ys(e,t,o,0),Me===null&&Hs(),!1}catch{}if(n=Cr(e,t,o,a),n!==null)return St(n,e,a),uh(n,t,a),!0}return!1}function bo(e,t,n,a){if(a={lane:2,revertLane:Wo(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},rl(e)){if(t)throw Error(r(479))}else t=Cr(e,n,a,2),t!==null&&St(t,e,2)}function rl(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function oh(e,t){Ki=el=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uh(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,dc(e,n)}}var Va={readContext:lt,use:il,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useLayoutEffect:He,useInsertionEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useSyncExternalStore:He,useId:He,useHostTransitionStatus:He,useFormState:He,useActionState:He,useOptimistic:He,useMemoCache:He,useCacheRefresh:He};Va.useEffectEvent=He;var ch={readContext:lt,use:il,useCallback:function(e,t){return ft().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:Kf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,sl(4194308,4,Wf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sl(4194308,4,e,t)},useInsertionEffect:function(e,t){sl(4,2,e,t)},useMemo:function(e,t){var n=ft();t=t===void 0?null:t;var a=e();if(yi){_n(!0);try{e()}finally{_n(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=ft();if(n!==void 0){var o=n(t);if(yi){_n(!0);try{n(t)}finally{_n(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=rg.bind(null,fe,e),[a.memoizedState,e]},useRef:function(e){var t=ft();return e={current:e},t.memoizedState=e},useState:function(e){e=fo(e);var t=e.queue,n=rh.bind(null,fe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:mo,useDeferredValue:function(e,t){var n=ft();return yo(n,e,t)},useTransition:function(){var e=fo(!1);return e=nh.bind(null,fe,e.queue,!0,!1),ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=fe,o=ft();if(xe){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Me===null)throw Error(r(349));(be&127)!==0||jf(a,t,n)}o.memoizedState=n;var u={value:n,getSnapshot:t};return o.queue=u,Kf(Mf.bind(null,a,u,e),[e]),a.flags|=2048,Ji(9,{destroy:void 0},Rf.bind(null,a,u,n,t),null),n},useId:function(){var e=ft(),t=Me.identifierPrefix;if(xe){var n=Wt,a=Ft;n=(a&~(1<<32-wt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=tl++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=eg++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vo,useFormState:$f,useActionState:$f,useOptimistic:function(e){var t=ft();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=bo.bind(null,fe,!0,n),n.dispatch=t,[e,t]},useMemoCache:oo,useCacheRefresh:function(){return ft().memoizedState=lg.bind(null,fe)},useEffectEvent:function(e){var t=ft(),n={impl:e};return t.memoizedState=n,function(){if((_e&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},So={readContext:lt,use:il,useCallback:Pf,useContext:lt,useEffect:po,useImperativeHandle:If,useInsertionEffect:Jf,useLayoutEffect:Ff,useMemo:eh,useReducer:al,useRef:Qf,useState:function(){return al(yn)},useDebugValue:mo,useDeferredValue:function(e,t){var n=Xe();return th(n,Oe.memoizedState,e,t)},useTransition:function(){var e=al(yn)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:$a(e),t]},useSyncExternalStore:zf,useId:sh,useHostTransitionStatus:vo,useFormState:Xf,useActionState:Xf,useOptimistic:function(e,t){var n=Xe();return Df(n,Oe,e,t)},useMemoCache:oo,useCacheRefresh:lh};So.useEffectEvent=Zf;var fh={readContext:lt,use:il,useCallback:Pf,useContext:lt,useEffect:po,useImperativeHandle:If,useInsertionEffect:Jf,useLayoutEffect:Ff,useMemo:eh,useReducer:co,useRef:Qf,useState:function(){return co(yn)},useDebugValue:mo,useDeferredValue:function(e,t){var n=Xe();return Oe===null?yo(n,e,t):th(n,Oe.memoizedState,e,t)},useTransition:function(){var e=co(yn)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:$a(e),t]},useSyncExternalStore:zf,useId:sh,useHostTransitionStatus:vo,useFormState:Gf,useActionState:Gf,useOptimistic:function(e,t){var n=Xe();return Oe!==null?Df(n,Oe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:oo,useCacheRefresh:lh};fh.useEffectEvent=Zf;function xo(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wo={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Ot(),o=Un(a);o.payload=t,n!=null&&(o.callback=n),t=Cn(e,o,a),t!==null&&(St(t,e,a),qa(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Ot(),o=Un(a);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Cn(e,o,a),t!==null&&(St(t,e,a),qa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ot(),a=Un(n);a.tag=2,t!=null&&(a.callback=t),t=Cn(e,a,n),t!==null&&(St(t,e,n),qa(t,e,n))}};function hh(e,t,n,a,o,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,h):t.prototype&&t.prototype.isPureReactComponent?!za(n,a)||!za(o,u):!0}function dh(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&wo.enqueueReplaceState(t,t.state,null)}function gi(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=w({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function ph(e){Ls(e)}function mh(e){console.error(e)}function yh(e){Ls(e)}function ol(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function gh(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Eo(e,t,n){return n=Un(n),n.tag=3,n.payload={element:null},n.callback=function(){ol(e,t)},n}function vh(e){return e=Un(e),e.tag=3,e}function bh(e,t,n,a){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var u=a.value;e.payload=function(){return o(u)},e.callback=function(){gh(t,n,a)}}var h=n.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){gh(t,n,a),typeof o!="function"&&(Yn===null?Yn=new Set([this]):Yn.add(this));var d=a.stack;this.componentDidCatch(a.value,{componentStack:d!==null?d:""})})}function og(e,t,n,a,o){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Yi(t,n,o,!0),n=kt.current,n!==null){switch(n.tag){case 31:case 13:return qt===null?Sl():n.alternate===null&&Ye===0&&(Ye=3),n.flags&=-257,n.flags|=65536,n.lanes=o,a===Js?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Zo(e,a,o)),!1;case 22:return n.flags|=65536,a===Js?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Zo(e,a,o)),!1}throw Error(r(435,n.tag))}return Zo(e,a,o),Sl(),!1}if(xe)return t=kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==Yr&&(e=Error(r(422),{cause:a}),Ma(Ut(e,n)))):(a!==Yr&&(t=Error(r(423),{cause:a}),Ma(Ut(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=Ut(a,n),o=Eo(e.stateNode,a,o),Ir(e,o),Ye!==4&&(Ye=2)),!1;var u=Error(r(520),{cause:a});if(u=Ut(u,n),Ia===null?Ia=[u]:Ia.push(u),Ye!==4&&(Ye=2),t===null)return!0;a=Ut(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Eo(n.stateNode,a,e),Ir(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Yn===null||!Yn.has(u))))return n.flags|=65536,o&=-o,n.lanes|=o,o=vh(o),bh(o,e,n,a),Ir(n,o),!1}n=n.return}while(n!==null);return!1}var To=Error(r(461)),Ke=!1;function rt(e,t,n,a){t.child=e===null?Ef(t,null,n,a):mi(t,e.child,n,a)}function Sh(e,t,n,a,o){n=n.render;var u=t.ref;if("ref"in a){var h={};for(var d in a)d!=="ref"&&(h[d]=a[d])}else h=a;return fi(t),a=ao(e,t,n,h,u,o),d=so(),e!==null&&!Ke?(lo(e,t,o),gn(e,t,o)):(xe&&d&&Lr(t),t.flags|=1,rt(e,t,a,o),t.child)}function xh(e,t,n,a,o){if(e===null){var u=n.type;return typeof u=="function"&&!Dr(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,wh(e,t,u,a,o)):(e=Xs(n.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Ro(e,o)){var h=u.memoizedProps;if(n=n.compare,n=n!==null?n:za,n(h,a)&&e.ref===t.ref)return gn(e,t,o)}return t.flags|=1,e=fn(u,a),e.ref=t.ref,e.return=t,t.child=e}function wh(e,t,n,a,o){if(e!==null){var u=e.memoizedProps;if(za(u,a)&&e.ref===t.ref)if(Ke=!1,t.pendingProps=a=u,Ro(e,o))(e.flags&131072)!==0&&(Ke=!0);else return t.lanes=e.lanes,gn(e,t,o)}return ko(e,t,n,a,o)}function Eh(e,t,n,a){var o=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~u}else a=0,t.child=null;return Th(e,t,u,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ks(t,u!==null?u.cachePool:null),u!==null?_f(t,u):eo(),Af(t);else return a=t.lanes=536870912,Th(e,t,u!==null?u.baseLanes|n:n,n,a)}else u!==null?(Ks(t,u.cachePool),_f(t,u),Bn(),t.memoizedState=null):(e!==null&&Ks(t,null),eo(),Bn());return rt(e,t,o,n),t.child}function Ga(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Th(e,t,n,a,o){var u=Zr();return u=u===null?null:{parent:Ge._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&Ks(t,null),eo(),Af(t),e!==null&&Yi(e,t,a,!0),t.childLanes=o,null}function ul(e,t){return t=fl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kh(e,t,n){return mi(t,e.child,null,n),e=ul(t,t.pendingProps),e.flags|=2,_t(t),t.memoizedState=null,e}function ug(e,t,n){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(xe){if(a.mode==="hidden")return e=ul(t,a),t.lanes=536870912,Ga(null,e);if(no(t),(e=De)?(e=Bd(e,Bt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:On!==null?{id:Ft,overflow:Wt}:null,retryLane:536870912,hydrationErrors:null},n=of(e),n.return=t,t.child=n,st=t,De=null)):e=null,e===null)throw jn(t);return t.lanes=536870912,null}return ul(t,a)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(no(t),o)if(t.flags&256)t.flags&=-257,t=kh(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Ke||Yi(e,t,n,!1),o=(n&e.childLanes)!==0,Ke||o){if(a=Me,a!==null&&(h=pc(a,n),h!==0&&h!==u.retryLane))throw u.retryLane=h,ri(e,h),St(a,e,h),To;Sl(),t=kh(e,t,n)}else e=u.treeContext,De=Lt(h.nextSibling),st=t,xe=!0,zn=null,Bt=!1,e!==null&&ff(t,e),t=ul(t,a),t.flags|=4096;return t}return e=fn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function cl(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ko(e,t,n,a,o){return fi(t),n=ao(e,t,n,a,void 0,o),a=so(),e!==null&&!Ke?(lo(e,t,o),gn(e,t,o)):(xe&&a&&Lr(t),t.flags|=1,rt(e,t,n,o),t.child)}function _h(e,t,n,a,o,u){return fi(t),t.updateQueue=null,n=Of(t,a,n,o),Nf(e),a=so(),e!==null&&!Ke?(lo(e,t,u),gn(e,t,u)):(xe&&a&&Lr(t),t.flags|=1,rt(e,t,n,u),t.child)}function Ah(e,t,n,a,o){if(fi(t),t.stateNode===null){var u=Bi,h=n.contextType;typeof h=="object"&&h!==null&&(u=lt(h)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=wo,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Fr(t),h=n.contextType,u.context=typeof h=="object"&&h!==null?lt(h):Bi,u.state=t.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(xo(t,n,h,a),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&wo.enqueueReplaceState(u,u.state,null),Ha(t,a,u,o),La(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var d=t.memoizedProps,g=gi(n,d);u.props=g;var _=u.context,z=n.contextType;h=Bi,typeof z=="object"&&z!==null&&(h=lt(z));var D=n.getDerivedStateFromProps;z=typeof D=="function"||typeof u.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,z||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d||_!==h)&&dh(t,u,a,h),Mn=!1;var A=t.memoizedState;u.state=A,Ha(t,a,u,o),La(),_=t.memoizedState,d||A!==_||Mn?(typeof D=="function"&&(xo(t,n,D,a),_=t.memoizedState),(g=Mn||hh(t,n,g,a,A,_,h))?(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"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=_),u.props=a,u.state=_,u.context=h,a=g):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,Wr(e,t),h=t.memoizedProps,z=gi(n,h),u.props=z,D=t.pendingProps,A=u.context,_=n.contextType,g=Bi,typeof _=="object"&&_!==null&&(g=lt(_)),d=n.getDerivedStateFromProps,(_=typeof d=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==D||A!==g)&&dh(t,u,a,g),Mn=!1,A=t.memoizedState,u.state=A,Ha(t,a,u,o),La();var O=t.memoizedState;h!==D||A!==O||Mn||e!==null&&e.dependencies!==null&&Gs(e.dependencies)?(typeof d=="function"&&(xo(t,n,d,a),O=t.memoizedState),(z=Mn||hh(t,n,z,a,A,O,g)||e!==null&&e.dependencies!==null&&Gs(e.dependencies))?(_||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,O,g),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,O,g)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),u.props=a,u.state=O,u.context=g,a=z):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,cl(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=mi(t,e.child,null,o),t.child=mi(t,null,n,o)):rt(e,t,n,o),t.memoizedState=u.state,e=t.child):e=gn(e,t,o),e}function Nh(e,t,n,a){return ui(),t.flags|=256,rt(e,t,n,a),t.child}var _o={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ao(e){return{baseLanes:e,cachePool:gf()}}function No(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Nt),e}function Oh(e,t,n){var a=t.pendingProps,o=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:($e.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(o?Dn(t):Bn(),(e=De)?(e=Bd(e,Bt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:On!==null?{id:Ft,overflow:Wt}:null,retryLane:536870912,hydrationErrors:null},n=of(e),n.return=t,t.child=n,st=t,De=null)):e=null,e===null)throw jn(t);return cu(e)?t.lanes=32:t.lanes=536870912,null}var d=a.children;return a=a.fallback,o?(Bn(),o=t.mode,d=fl({mode:"hidden",children:d},o),a=oi(a,o,n,null),d.return=t,a.return=t,d.sibling=a,t.child=d,a=t.child,a.memoizedState=Ao(n),a.childLanes=No(e,h,n),t.memoizedState=_o,Ga(null,a)):(Dn(t),Oo(t,d))}var g=e.memoizedState;if(g!==null&&(d=g.dehydrated,d!==null)){if(u)t.flags&256?(Dn(t),t.flags&=-257,t=zo(e,t,n)):t.memoizedState!==null?(Bn(),t.child=e.child,t.flags|=128,t=null):(Bn(),d=a.fallback,o=t.mode,a=fl({mode:"visible",children:a.children},o),d=oi(d,o,n,null),d.flags|=2,a.return=t,d.return=t,a.sibling=d,t.child=a,mi(t,e.child,null,n),a=t.child,a.memoizedState=Ao(n),a.childLanes=No(e,h,n),t.memoizedState=_o,t=Ga(null,a));else if(Dn(t),cu(d)){if(h=d.nextSibling&&d.nextSibling.dataset,h)var _=h.dgst;h=_,a=Error(r(419)),a.stack="",a.digest=h,Ma({value:a,source:null,stack:null}),t=zo(e,t,n)}else if(Ke||Yi(e,t,n,!1),h=(n&e.childLanes)!==0,Ke||h){if(h=Me,h!==null&&(a=pc(h,n),a!==0&&a!==g.retryLane))throw g.retryLane=a,ri(e,a),St(h,e,a),To;uu(d)||Sl(),t=zo(e,t,n)}else uu(d)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,De=Lt(d.nextSibling),st=t,xe=!0,zn=null,Bt=!1,e!==null&&ff(t,e),t=Oo(t,a.children),t.flags|=4096);return t}return o?(Bn(),d=a.fallback,o=t.mode,g=e.child,_=g.sibling,a=fn(g,{mode:"hidden",children:a.children}),a.subtreeFlags=g.subtreeFlags&65011712,_!==null?d=fn(_,d):(d=oi(d,o,n,null),d.flags|=2),d.return=t,a.return=t,a.sibling=d,t.child=a,Ga(null,a),a=t.child,d=e.child.memoizedState,d===null?d=Ao(n):(o=d.cachePool,o!==null?(g=Ge._currentValue,o=o.parent!==g?{parent:g,pool:g}:o):o=gf(),d={baseLanes:d.baseLanes|n,cachePool:o}),a.memoizedState=d,a.childLanes=No(e,h,n),t.memoizedState=_o,Ga(e.child,a)):(Dn(t),n=e.child,e=n.sibling,n=fn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=n,t.memoizedState=null,n)}function Oo(e,t){return t=fl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fl(e,t){return e=Tt(22,e,null,t),e.lanes=0,e}function zo(e,t,n){return mi(t,e.child,null,n),e=Oo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zh(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Vr(e.return,t,n)}function jo(e,t,n,a,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:o,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=a,h.tail=n,h.tailMode=o,h.treeForkCount=u)}function jh(e,t,n){var a=t.pendingProps,o=a.revealOrder,u=a.tail;a=a.children;var h=$e.current,d=(h&2)!==0;if(d?(h=h&1|2,t.flags|=128):h&=1,V($e,h),rt(e,t,a,n),a=xe?Ra:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zh(e,n,t);else if(e.tag===19)zh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Ps(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),jo(t,!1,o,n,u,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ps(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}jo(t,!0,n,null,u,a);break;case"together":jo(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ro(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Gs(e)))}function cg(e,t,n){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),Rn(t,Ge,e.memoizedState.cache),ui();break;case 27:case 5:ei(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:Rn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Dn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Oh(e,t,n):(Dn(t),e=gn(e,t,n),e!==null?e.sibling:null);Dn(t);break;case 19:var o=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Yi(e,t,n,!1),a=(n&t.childLanes)!==0),o){if(a)return jh(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),V($e,$e.current),a)break;return null;case 22:return t.lanes=0,Eh(e,t,n,t.pendingProps);case 24:Rn(t,Ge,e.memoizedState.cache)}return gn(e,t,n)}function Rh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ke=!0;else{if(!Ro(e,n)&&(t.flags&128)===0)return Ke=!1,cg(e,t,n);Ke=(e.flags&131072)!==0}else Ke=!1,xe&&(t.flags&1048576)!==0&&cf(t,Ra,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=di(t.elementType),t.type=e,typeof e=="function")Dr(e)?(a=gi(e,a),t.tag=1,t=Ah(null,t,e,a,n)):(t.tag=0,t=ko(null,t,e,a,n));else{if(e!=null){var o=e.$$typeof;if(o===j){t.tag=11,t=Sh(null,t,e,a,n);break e}else if(o===R){t.tag=14,t=xh(null,t,e,a,n);break e}}throw t=tt(e)||e,Error(r(306,t,""))}}return t;case 0:return ko(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,o=gi(a,t.pendingProps),Ah(e,t,a,o,n);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var u=t.memoizedState;o=u.element,Wr(e,t),Ha(t,a,null,n);var h=t.memoizedState;if(a=h.cache,Rn(t,Ge,a),a!==u.cache&&Gr(t,[Ge],n,!0),La(),a=h.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Nh(e,t,a,n);break e}else if(a!==o){o=Ut(Error(r(424)),t),Ma(o),t=Nh(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,De=Lt(e.firstChild),st=t,xe=!0,zn=null,Bt=!0,n=Ef(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ui(),a===o){t=gn(e,t,n);break e}rt(e,t,a,n)}t=t.child}return t;case 26:return cl(e,t),e===null?(n=Xd(t.type,null,t.pendingProps,null))?t.memoizedState=n:xe||(n=t.type,e=t.pendingProps,a=Al(he.current).createElement(n),a[at]=t,a[pt]=e,ot(a,n,e),Pe(a),t.stateNode=a):t.memoizedState=Xd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ei(t),e===null&&xe&&(a=t.stateNode=Hd(t.type,t.pendingProps,he.current),st=t,Bt=!0,o=De,Gn(t.type)?(fu=o,De=Lt(a.firstChild)):De=o),rt(e,t,t.pendingProps.children,n),cl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((o=a=De)&&(a=Hg(a,t.type,t.pendingProps,Bt),a!==null?(t.stateNode=a,st=t,De=Lt(a.firstChild),Bt=!1,o=!0):o=!1),o||jn(t)),ei(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,a=u.children,lu(o,u)?a=null:h!==null&&lu(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=ao(e,t,tg,null,null,n),ls._currentValue=o),cl(e,t),rt(e,t,a,n),t.child;case 6:return e===null&&xe&&((e=n=De)&&(n=Yg(n,t.pendingProps,Bt),n!==null?(t.stateNode=n,st=t,De=null,e=!0):e=!1),e||jn(t)),null;case 13:return Oh(e,t,n);case 4:return nt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=mi(t,null,a,n):rt(e,t,a,n),t.child;case 11:return Sh(e,t,t.type,t.pendingProps,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Rn(t,t.type,a.value),rt(e,t,a.children,n),t.child;case 9:return o=t.type._context,a=t.pendingProps.children,fi(t),o=lt(o),a=a(o),t.flags|=1,rt(e,t,a,n),t.child;case 14:return xh(e,t,t.type,t.pendingProps,n);case 15:return wh(e,t,t.type,t.pendingProps,n);case 19:return jh(e,t,n);case 31:return ug(e,t,n);case 22:return Eh(e,t,n,t.pendingProps);case 24:return fi(t),a=lt(Ge),e===null?(o=Zr(),o===null&&(o=Me,u=Qr(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=n),o=u),t.memoizedState={parent:a,cache:o},Fr(t),Rn(t,Ge,o)):((e.lanes&n)!==0&&(Wr(e,t),Ha(t,null,null,n),La()),o=e.memoizedState,u=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Rn(t,Ge,a)):(a=u.cache,Rn(t,Ge,a),a!==o.cache&&Gr(t,[Ge],n,!0))),rt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function vn(e){e.flags|=4}function Mo(e,t,n,a,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(sd())e.flags|=8192;else throw pi=Js,Jr}else e.flags&=-16777217}function Mh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Zd(t))if(sd())e.flags|=8192;else throw pi=Js,Jr}function hl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?fc():536870912,e.lanes|=t,Pi|=t)}function Qa(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags&65011712,a|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function fg(e,t,n){var a=t.pendingProps;switch(Hr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),pn(Ge),Re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?vn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$r())),Be(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(vn(t),u!==null?(Be(t),Mh(t,u)):(Be(t),Mo(t,o,null,a,n))):u?u!==e.memoizedState?(vn(t),Be(t),Mh(t,u)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&vn(t),Be(t),Mo(t,o,e,a,n)),null;case 27:if(ln(t),n=he.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&vn(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Be(t),null}e=W.current,Hi(t)?hf(t):(e=Hd(o,a,n),t.stateNode=e,vn(t))}return Be(t),null;case 5:if(ln(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&vn(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Be(t),null}if(u=W.current,Hi(t))hf(t);else{var h=Al(he.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?h.createElement("select",{is:a.is}):h.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?h.createElement(o,{is:a.is}):h.createElement(o)}}u[at]=t,u[pt]=a;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(ot(u,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&vn(t)}}return Be(t),Mo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&vn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=he.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,o=st,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Od(e.nodeValue,n)),e||jn(t,!0)}else e=Al(e).createTextNode(a),e[at]=t,t.stateNode=e}return Be(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Hi(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[at]=t}else ui(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else n=$r(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(_t(t),t):(_t(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Be(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Hi(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[at]=t}else ui(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),o=!1}else o=$r(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(_t(t),t):(_t(t),null)}return _t(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),hl(t,t.updateQueue),Be(t),null);case 4:return Re(),e===null&&tu(t.stateNode.containerInfo),Be(t),null;case 10:return pn(t.type),Be(t),null;case 19:if(B($e),a=t.memoizedState,a===null)return Be(t),null;if(o=(t.flags&128)!==0,u=a.rendering,u===null)if(o)Qa(a,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ps(e),u!==null){for(t.flags|=128,Qa(a,!1),e=u.updateQueue,t.updateQueue=e,hl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)rf(n,e),n=n.sibling;return V($e,$e.current&1|2),xe&&hn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Ve()>gl&&(t.flags|=128,o=!0,Qa(a,!1),t.lanes=4194304)}else{if(!o)if(e=Ps(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,hl(t,e),Qa(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!xe)return Be(t),null}else 2*Ve()-a.renderingStartTime>gl&&n!==536870912&&(t.flags|=128,o=!0,Qa(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Ve(),e.sibling=null,n=$e.current,V($e,o?n&1|2:n&1),xe&&hn(t,a.treeForkCount),e):(Be(t),null);case 22:case 23:return _t(t),to(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),n=t.updateQueue,n!==null&&hl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&B(hi),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pn(Ge),Be(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function hg(e,t){switch(Hr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pn(Ge),Re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ln(t),null;case 31:if(t.memoizedState!==null){if(_t(t),t.alternate===null)throw Error(r(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_t(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B($e),null;case 4:return Re(),null;case 10:return pn(t.type),null;case 22:case 23:return _t(t),to(),e!==null&&B(hi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pn(Ge),null;case 25:return null;default:return null}}function Uh(e,t){switch(Hr(t),t.tag){case 3:pn(Ge),Re();break;case 26:case 27:case 5:ln(t);break;case 4:Re();break;case 31:t.memoizedState!==null&&_t(t);break;case 13:_t(t);break;case 19:B($e);break;case 10:pn(t.type);break;case 22:case 23:_t(t),to(),e!==null&&B(hi);break;case 24:pn(Ge)}}function Ka(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var o=a.next;n=o;do{if((n.tag&e)===e){a=void 0;var u=n.create,h=n.inst;a=u(),h.destroy=a}n=n.next}while(n!==o)}}catch(d){Ne(t,t.return,d)}}function qn(e,t,n){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var u=o.next;a=u;do{if((a.tag&e)===e){var h=a.inst,d=h.destroy;if(d!==void 0){h.destroy=void 0,o=t;var g=n,_=d;try{_()}catch(z){Ne(o,g,z)}}}a=a.next}while(a!==u)}}catch(z){Ne(t,t.return,z)}}function Ch(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{kf(t,n)}catch(a){Ne(e,e.return,a)}}}function Dh(e,t,n){n.props=gi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Ne(e,t,a)}}function Za(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(o){Ne(e,t,o)}}function It(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(o){Ne(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Ne(e,t,o)}else n.current=null}function Bh(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(o){Ne(e,e.return,o)}}function Uo(e,t,n){try{var a=e.stateNode;Ug(a,e.type,n,t),a[pt]=t}catch(o){Ne(e,e.return,o)}}function qh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gn(e.type)||e.tag===4}function Co(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Do(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=un));else if(a!==4&&(a===27&&Gn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Do(e,t,n),e=e.sibling;e!==null;)Do(e,t,n),e=e.sibling}function dl(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Gn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(dl(e,t,n),e=e.sibling;e!==null;)dl(e,t,n),e=e.sibling}function Lh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);ot(t,a,n),t[at]=e,t[pt]=n}catch(u){Ne(e,e.return,u)}}var bn=!1,Ze=!1,Bo=!1,Hh=typeof WeakSet=="function"?WeakSet:Set,et=null;function dg(e,t){if(e=e.containerInfo,au=Ul,e=Wc(e),Or(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var o=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var h=0,d=-1,g=-1,_=0,z=0,D=e,A=null;t:for(;;){for(var O;D!==n||o!==0&&D.nodeType!==3||(d=h+o),D!==u||a!==0&&D.nodeType!==3||(g=h+a),D.nodeType===3&&(h+=D.nodeValue.length),(O=D.firstChild)!==null;)A=D,D=O;for(;;){if(D===e)break t;if(A===n&&++_===o&&(d=h),A===u&&++z===a&&(g=h),(O=D.nextSibling)!==null)break;D=A,A=D.parentNode}D=O}n=d===-1||g===-1?null:{start:d,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(su={focusedElem:e,selectionRange:n},Ul=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,o=u.memoizedProps,u=u.memoizedState,a=n.stateNode;try{var F=gi(n.type,o);e=a.getSnapshotBeforeUpdate(F,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(le){Ne(n,n.return,le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ou(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ou(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function Yh(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:xn(e,n),a&4&&Ka(5,n);break;case 1:if(xn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(h){Ne(n,n.return,h)}else{var o=gi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ne(n,n.return,h)}}a&64&&Ch(n),a&512&&Za(n,n.return);break;case 3:if(xn(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{kf(e,t)}catch(h){Ne(n,n.return,h)}}break;case 27:t===null&&a&4&&Lh(n);case 26:case 5:xn(e,n),t===null&&a&4&&Bh(n),a&512&&Za(n,n.return);break;case 12:xn(e,n);break;case 31:xn(e,n),a&4&&Vh(e,n);break;case 13:xn(e,n),a&4&&Gh(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=wg.bind(null,n),$g(e,n))));break;case 22:if(a=n.memoizedState!==null||bn,!a){t=t!==null&&t.memoizedState!==null||Ze,o=bn;var u=Ze;bn=a,(Ze=t)&&!u?wn(e,n,(n.subtreeFlags&8772)!==0):xn(e,n),bn=o,Ze=u}break;case 30:break;default:xn(e,n)}}function $h(e){var t=e.alternate;t!==null&&(e.alternate=null,$h(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&hr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qe=null,yt=!1;function Sn(e,t,n){for(n=n.child;n!==null;)Xh(e,t,n),n=n.sibling}function Xh(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(va,n)}catch{}switch(n.tag){case 26:Ze||It(n,t),Sn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ze||It(n,t);var a=qe,o=yt;Gn(n.type)&&(qe=n.stateNode,yt=!1),Sn(e,t,n),is(n.stateNode),qe=a,yt=o;break;case 5:Ze||It(n,t);case 6:if(a=qe,o=yt,qe=null,Sn(e,t,n),qe=a,yt=o,qe!==null)if(yt)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(n.stateNode)}catch(u){Ne(n,t,u)}else try{qe.removeChild(n.stateNode)}catch(u){Ne(n,t,u)}break;case 18:qe!==null&&(yt?(e=qe,Cd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ra(e)):Cd(qe,n.stateNode));break;case 4:a=qe,o=yt,qe=n.stateNode.containerInfo,yt=!0,Sn(e,t,n),qe=a,yt=o;break;case 0:case 11:case 14:case 15:qn(2,n,t),Ze||qn(4,n,t),Sn(e,t,n);break;case 1:Ze||(It(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Dh(n,t,a)),Sn(e,t,n);break;case 21:Sn(e,t,n);break;case 22:Ze=(a=Ze)||n.memoizedState!==null,Sn(e,t,n),Ze=a;break;default:Sn(e,t,n)}}function Vh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ra(e)}catch(n){Ne(t,t.return,n)}}}function Gh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ra(e)}catch(n){Ne(t,t.return,n)}}function pg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hh),t;default:throw Error(r(435,e.tag))}}function pl(e,t){var n=pg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var o=Eg.bind(null,e,a);a.then(o,o)}})}function gt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var o=n[a],u=e,h=t,d=h;e:for(;d!==null;){switch(d.tag){case 27:if(Gn(d.type)){qe=d.stateNode,yt=!1;break e}break;case 5:qe=d.stateNode,yt=!1;break e;case 3:case 4:qe=d.stateNode.containerInfo,yt=!0;break e}d=d.return}if(qe===null)throw Error(r(160));Xh(u,h,o),qe=null,yt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qh(t,e),t=t.sibling}var Xt=null;function Qh(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gt(t,e),vt(e),a&4&&(qn(3,e,e.return),Ka(3,e),qn(5,e,e.return));break;case 1:gt(t,e),vt(e),a&512&&(Ze||n===null||It(n,n.return)),a&64&&bn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var o=Xt;if(gt(t,e),vt(e),a&512&&(Ze||n===null||It(n,n.return)),a&4){var u=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(a){case"title":u=o.getElementsByTagName("title")[0],(!u||u[xa]||u[at]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(a),o.head.insertBefore(u,o.querySelector("head > title"))),ot(u,a,n),u[at]=e,Pe(u),a=u;break e;case"link":var h=Qd("link","href",o).get(a+(n.href||""));if(h){for(var d=0;d<h.length;d++)if(u=h[d],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)){h.splice(d,1);break t}}u=o.createElement(a),ot(u,a,n),o.head.appendChild(u);break;case"meta":if(h=Qd("meta","content",o).get(a+(n.content||""))){for(d=0;d<h.length;d++)if(u=h[d],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)){h.splice(d,1);break t}}u=o.createElement(a),ot(u,a,n),o.head.appendChild(u);break;default:throw Error(r(468,a))}u[at]=e,Pe(u),a=u}e.stateNode=a}else Kd(o,e.type,e.stateNode);else e.stateNode=Gd(o,a,e.memoizedProps);else u!==a?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,a===null?Kd(o,e.type,e.stateNode):Gd(o,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Uo(e,e.memoizedProps,n.memoizedProps)}break;case 27:gt(t,e),vt(e),a&512&&(Ze||n===null||It(n,n.return)),n!==null&&a&4&&Uo(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gt(t,e),vt(e),a&512&&(Ze||n===null||It(n,n.return)),e.flags&32){o=e.stateNode;try{zi(o,"")}catch(F){Ne(e,e.return,F)}}a&4&&e.stateNode!=null&&(o=e.memoizedProps,Uo(e,o,n!==null?n.memoizedProps:o)),a&1024&&(Bo=!0);break;case 6:if(gt(t,e),vt(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(F){Ne(e,e.return,F)}}break;case 3:if(zl=null,o=Xt,Xt=Nl(t.containerInfo),gt(t,e),Xt=o,vt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ra(t.containerInfo)}catch(F){Ne(e,e.return,F)}Bo&&(Bo=!1,Kh(e));break;case 4:a=Xt,Xt=Nl(e.stateNode.containerInfo),gt(t,e),vt(e),Xt=a;break;case 12:gt(t,e),vt(e);break;case 31:gt(t,e),vt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,pl(e,a)));break;case 13:gt(t,e),vt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(yl=Ve()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,pl(e,a)));break;case 22:o=e.memoizedState!==null;var g=n!==null&&n.memoizedState!==null,_=bn,z=Ze;if(bn=_||o,Ze=z||g,gt(t,e),Ze=z,bn=_,vt(e),a&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||g||bn||Ze||vi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){g=n=t;try{if(u=g.stateNode,o)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{d=g.stateNode;var D=g.memoizedProps.style,A=D!=null&&D.hasOwnProperty("display")?D.display:null;d.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(F){Ne(g,g.return,F)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=o?"":g.memoizedProps}catch(F){Ne(g,g.return,F)}}}else if(t.tag===18){if(n===null){g=t;try{var O=g.stateNode;o?Dd(O,!0):Dd(g.stateNode,!1)}catch(F){Ne(g,g.return,F)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,pl(e,n))));break;case 19:gt(t,e),vt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,pl(e,a)));break;case 30:break;case 21:break;default:gt(t,e),vt(e)}}function vt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(qh(a)){n=a;break}a=a.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var o=n.stateNode,u=Co(e);dl(e,u,o);break;case 5:var h=n.stateNode;n.flags&32&&(zi(h,""),n.flags&=-33);var d=Co(e);dl(e,d,h);break;case 3:case 4:var g=n.stateNode.containerInfo,_=Co(e);Do(e,_,g);break;default:throw Error(r(161))}}catch(z){Ne(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Kh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Yh(e,t.alternate,t),t=t.sibling}function vi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qn(4,t,t.return),vi(t);break;case 1:It(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Dh(t,t.return,n),vi(t);break;case 27:is(t.stateNode);case 26:case 5:It(t,t.return),vi(t);break;case 22:t.memoizedState===null&&vi(t);break;case 30:vi(t);break;default:vi(t)}e=e.sibling}}function wn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,o=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:wn(o,u,n),Ka(4,u);break;case 1:if(wn(o,u,n),a=u,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(_){Ne(a,a.return,_)}if(a=u,o=a.updateQueue,o!==null){var d=a.stateNode;try{var g=o.shared.hiddenCallbacks;if(g!==null)for(o.shared.hiddenCallbacks=null,o=0;o<g.length;o++)Tf(g[o],d)}catch(_){Ne(a,a.return,_)}}n&&h&64&&Ch(u),Za(u,u.return);break;case 27:Lh(u);case 26:case 5:wn(o,u,n),n&&a===null&&h&4&&Bh(u),Za(u,u.return);break;case 12:wn(o,u,n);break;case 31:wn(o,u,n),n&&h&4&&Vh(o,u);break;case 13:wn(o,u,n),n&&h&4&&Gh(o,u);break;case 22:u.memoizedState===null&&wn(o,u,n),Za(u,u.return);break;case 30:break;default:wn(o,u,n)}t=t.sibling}}function qo(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ua(n))}function Lo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ua(e))}function Vt(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Zh(e,t,n,a),t=t.sibling}function Zh(e,t,n,a){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Vt(e,t,n,a),o&2048&&Ka(9,t);break;case 1:Vt(e,t,n,a);break;case 3:Vt(e,t,n,a),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ua(e)));break;case 12:if(o&2048){Vt(e,t,n,a),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,d=u.onPostCommit;typeof d=="function"&&d(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(g){Ne(t,t.return,g)}}else Vt(e,t,n,a);break;case 31:Vt(e,t,n,a);break;case 13:Vt(e,t,n,a);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?Vt(e,t,n,a):Ja(e,t):u._visibility&2?Vt(e,t,n,a):(u._visibility|=2,Fi(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),o&2048&&qo(h,t);break;case 24:Vt(e,t,n,a),o&2048&&Lo(t.alternate,t);break;default:Vt(e,t,n,a)}}function Fi(e,t,n,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,d=n,g=a,_=h.flags;switch(h.tag){case 0:case 11:case 15:Fi(u,h,d,g,o),Ka(8,h);break;case 23:break;case 22:var z=h.stateNode;h.memoizedState!==null?z._visibility&2?Fi(u,h,d,g,o):Ja(u,h):(z._visibility|=2,Fi(u,h,d,g,o)),o&&_&2048&&qo(h.alternate,h);break;case 24:Fi(u,h,d,g,o),o&&_&2048&&Lo(h.alternate,h);break;default:Fi(u,h,d,g,o)}t=t.sibling}}function Ja(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,o=a.flags;switch(a.tag){case 22:Ja(n,a),o&2048&&qo(a.alternate,a);break;case 24:Ja(n,a),o&2048&&Lo(a.alternate,a);break;default:Ja(n,a)}t=t.sibling}}var Fa=8192;function Wi(e,t,n){if(e.subtreeFlags&Fa)for(e=e.child;e!==null;)Jh(e,t,n),e=e.sibling}function Jh(e,t,n){switch(e.tag){case 26:Wi(e,t,n),e.flags&Fa&&e.memoizedState!==null&&ev(n,Xt,e.memoizedState,e.memoizedProps);break;case 5:Wi(e,t,n);break;case 3:case 4:var a=Xt;Xt=Nl(e.stateNode.containerInfo),Wi(e,t,n),Xt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Fa,Fa=16777216,Wi(e,t,n),Fa=a):Wi(e,t,n));break;default:Wi(e,t,n)}}function Fh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Wa(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];et=a,Ih(a,e)}Fh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wh(e),e=e.sibling}function Wh(e){switch(e.tag){case 0:case 11:case 15:Wa(e),e.flags&2048&&qn(9,e,e.return);break;case 3:Wa(e);break;case 12:Wa(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ml(e)):Wa(e);break;default:Wa(e)}}function ml(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];et=a,Ih(a,e)}Fh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qn(8,t,t.return),ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ml(t));break;default:ml(t)}e=e.sibling}}function Ih(e,t){for(;et!==null;){var n=et;switch(n.tag){case 0:case 11:case 15:qn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ua(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,et=a;else e:for(n=e;et!==null;){a=et;var o=a.sibling,u=a.return;if($h(a),a===n){et=null;break e}if(o!==null){o.return=u,et=o;break e}et=u}}}var mg={getCacheForType:function(e){var t=lt(Ge),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return lt(Ge).controller.signal}},yg=typeof WeakMap=="function"?WeakMap:Map,_e=0,Me=null,ye=null,be=0,Ae=0,At=null,Ln=!1,Ii=!1,Ho=!1,En=0,Ye=0,Hn=0,bi=0,Yo=0,Nt=0,Pi=0,Ia=null,bt=null,$o=!1,yl=0,Ph=0,gl=1/0,vl=null,Yn=null,We=0,$n=null,ea=null,Tn=0,Xo=0,Vo=null,ed=null,Pa=0,Go=null;function Ot(){return(_e&2)!==0&&be!==0?be&-be:T.T!==null?Wo():mc()}function td(){if(Nt===0)if((be&536870912)===0||xe){var e=_s;_s<<=1,(_s&3932160)===0&&(_s=262144),Nt=e}else Nt=536870912;return e=kt.current,e!==null&&(e.flags|=32),Nt}function St(e,t,n){(e===Me&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(ta(e,0),Xn(e,be,Nt,!1)),Sa(e,n),((_e&2)===0||e!==Me)&&(e===Me&&((_e&2)===0&&(bi|=n),Ye===4&&Xn(e,be,Nt,!1)),Pt(e))}function nd(e,t,n){if((_e&6)!==0)throw Error(r(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ba(e,t),o=a?bg(e,t):Ko(e,t,!0),u=a;do{if(o===0){Ii&&!a&&Xn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!gg(n)){o=Ko(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var d=e;o=Ia;var g=d.current.memoizedState.isDehydrated;if(g&&(ta(d,h).flags|=256),h=Ko(d,h,!1),h!==2){if(Ho&&!g){d.errorRecoveryDisabledLanes|=u,bi|=u,o=4;break e}u=bt,bt=o,u!==null&&(bt===null?bt=u:bt.push.apply(bt,u))}o=h}if(u=!1,o!==2)continue}}if(o===1){ta(e,0),Xn(e,t,0,!0);break}e:{switch(a=e,u=o,u){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Xn(a,t,Nt,!Ln);break e;case 2:bt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=yl+300-Ve(),10<o)){if(Xn(a,t,Nt,!Ln),Ns(a,0,!0)!==0)break e;Tn=t,a.timeoutHandle=Md(id.bind(null,a,n,bt,vl,$o,t,Nt,bi,Pi,Ln,u,"Throttled",-0,0),o);break e}id(a,n,bt,vl,$o,t,Nt,bi,Pi,Ln,u,null,-0,0)}}break}while(!0);Pt(e)}function id(e,t,n,a,o,u,h,d,g,_,z,D,A,O){if(e.timeoutHandle=-1,D=t.subtreeFlags,D&8192||(D&16785408)===16785408){D={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},Jh(t,u,D);var F=(u&62914560)===u?yl-Ve():(u&4194048)===u?Ph-Ve():0;if(F=tv(D,F),F!==null){Tn=u,e.cancelPendingCommit=F(fd.bind(null,e,t,u,n,a,o,h,d,g,z,D,null,A,O)),Xn(e,u,h,!_);return}}fd(e,t,u,n,a,o,h,d,g)}function gg(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var o=n[a],u=o.getSnapshot;o=o.value;try{if(!Et(u(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xn(e,t,n,a){t&=~Yo,t&=~bi,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var u=31-wt(o),h=1<<u;a[u]=-1,o&=~h}n!==0&&hc(e,n,t)}function bl(){return(_e&6)===0?(es(0),!1):!0}function Qo(){if(ye!==null){if(Ae===0)var e=ye.return;else e=ye,dn=ci=null,ro(e),Gi=null,Da=0,e=ye;for(;e!==null;)Uh(e.alternate,e),e=e.return;ye=null}}function ta(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Bg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Tn=0,Qo(),Me=e,ye=n=fn(e.current,null),be=t,Ae=0,At=null,Ln=!1,Ii=ba(e,t),Ho=!1,Pi=Nt=Yo=bi=Hn=Ye=0,bt=Ia=null,$o=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var o=31-wt(a),u=1<<o;t|=e[o],a&=~u}return En=t,Hs(),n}function ad(e,t){fe=null,T.H=Va,t===Vi||t===Zs?(t=Sf(),Ae=3):t===Jr?(t=Sf(),Ae=4):Ae=t===To?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,At=t,ye===null&&(Ye=1,ol(e,Ut(t,e.current)))}function sd(){var e=kt.current;return e===null?!0:(be&4194048)===be?qt===null:(be&62914560)===be||(be&536870912)!==0?e===qt:!1}function ld(){var e=T.H;return T.H=Va,e===null?Va:e}function rd(){var e=T.A;return T.A=mg,e}function Sl(){Ye=4,Ln||(be&4194048)!==be&&kt.current!==null||(Ii=!0),(Hn&134217727)===0&&(bi&134217727)===0||Me===null||Xn(Me,be,Nt,!1)}function Ko(e,t,n){var a=_e;_e|=2;var o=ld(),u=rd();(Me!==e||be!==t)&&(vl=null,ta(e,t)),t=!1;var h=Ye;e:do try{if(Ae!==0&&ye!==null){var d=ye,g=At;switch(Ae){case 8:Qo(),h=6;break e;case 3:case 2:case 9:case 6:kt.current===null&&(t=!0);var _=Ae;if(Ae=0,At=null,na(e,d,g,_),n&&Ii){h=0;break e}break;default:_=Ae,Ae=0,At=null,na(e,d,g,_)}}vg(),h=Ye;break}catch(z){ad(e,z)}while(!0);return t&&e.shellSuspendCounter++,dn=ci=null,_e=a,T.H=o,T.A=u,ye===null&&(Me=null,be=0,Hs()),h}function vg(){for(;ye!==null;)od(ye)}function bg(e,t){var n=_e;_e|=2;var a=ld(),o=rd();Me!==e||be!==t?(vl=null,gl=Ve()+500,ta(e,t)):Ii=ba(e,t);e:do try{if(Ae!==0&&ye!==null){t=ye;var u=At;t:switch(Ae){case 1:Ae=0,At=null,na(e,t,u,1);break;case 2:case 9:if(vf(u)){Ae=0,At=null,ud(t);break}t=function(){Ae!==2&&Ae!==9||Me!==e||(Ae=7),Pt(e)},u.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:vf(u)?(Ae=0,At=null,ud(t)):(Ae=0,At=null,na(e,t,u,7));break;case 5:var h=null;switch(ye.tag){case 26:h=ye.memoizedState;case 5:case 27:var d=ye;if(h?Zd(h):d.stateNode.complete){Ae=0,At=null;var g=d.sibling;if(g!==null)ye=g;else{var _=d.return;_!==null?(ye=_,xl(_)):ye=null}break t}}Ae=0,At=null,na(e,t,u,5);break;case 6:Ae=0,At=null,na(e,t,u,6);break;case 8:Qo(),Ye=6;break e;default:throw Error(r(462))}}Sg();break}catch(z){ad(e,z)}while(!0);return dn=ci=null,T.H=a,T.A=o,_e=n,ye!==null?0:(Me=null,be=0,Hs(),Ye)}function Sg(){for(;ye!==null&&!me();)od(ye)}function od(e){var t=Rh(e.alternate,e,En);e.memoizedProps=e.pendingProps,t===null?xl(e):ye=t}function ud(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_h(n,t,t.pendingProps,t.type,void 0,be);break;case 11:t=_h(n,t,t.pendingProps,t.type.render,t.ref,be);break;case 5:ro(t);default:Uh(n,t),t=ye=rf(t,En),t=Rh(n,t,En)}e.memoizedProps=e.pendingProps,t===null?xl(e):ye=t}function na(e,t,n,a){dn=ci=null,ro(t),Gi=null,Da=0;var o=t.return;try{if(og(e,o,t,n,be)){Ye=1,ol(e,Ut(n,e.current)),ye=null;return}}catch(u){if(o!==null)throw ye=o,u;Ye=1,ol(e,Ut(n,e.current)),ye=null;return}t.flags&32768?(xe||a===1?e=!0:Ii||(be&536870912)!==0?e=!1:(Ln=e=!0,(a===2||a===9||a===3||a===6)&&(a=kt.current,a!==null&&a.tag===13&&(a.flags|=16384))),cd(t,e)):xl(t)}function xl(e){var t=e;do{if((t.flags&32768)!==0){cd(t,Ln);return}e=t.return;var n=fg(t.alternate,t,En);if(n!==null){ye=n;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);Ye===0&&(Ye=5)}function cd(e,t){do{var n=hg(e.alternate,e);if(n!==null){n.flags&=32767,ye=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ye=e;return}ye=e=n}while(e!==null);Ye=6,ye=null}function fd(e,t,n,a,o,u,h,d,g){e.cancelPendingCommit=null;do wl();while(We!==0);if((_e&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=Ur,Pm(e,n,u,h,d,g),e===Me&&(ye=Me=null,be=0),ea=t,$n=e,Tn=n,Xo=u,Vo=o,ed=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tg(Ts,function(){return yd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null,o=H.p,H.p=2,h=_e,_e|=4;try{dg(e,t,n)}finally{_e=h,H.p=o,T.T=a}}We=1,hd(),dd(),pd()}}function hd(){if(We===1){We=0;var e=$n,t=ea,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var a=H.p;H.p=2;var o=_e;_e|=4;try{Qh(t,e);var u=su,h=Wc(e.containerInfo),d=u.focusedElem,g=u.selectionRange;if(h!==d&&d&&d.ownerDocument&&Fc(d.ownerDocument.documentElement,d)){if(g!==null&&Or(d)){var _=g.start,z=g.end;if(z===void 0&&(z=_),"selectionStart"in d)d.selectionStart=_,d.selectionEnd=Math.min(z,d.value.length);else{var D=d.ownerDocument||document,A=D&&D.defaultView||window;if(A.getSelection){var O=A.getSelection(),F=d.textContent.length,le=Math.min(g.start,F),je=g.end===void 0?le:Math.min(g.end,F);!O.extend&&le>je&&(h=je,je=le,le=h);var E=Jc(d,le),S=Jc(d,je);if(E&&S&&(O.rangeCount!==1||O.anchorNode!==E.node||O.anchorOffset!==E.offset||O.focusNode!==S.node||O.focusOffset!==S.offset)){var k=D.createRange();k.setStart(E.node,E.offset),O.removeAllRanges(),le>je?(O.addRange(k),O.extend(S.node,S.offset)):(k.setEnd(S.node,S.offset),O.addRange(k))}}}}for(D=[],O=d;O=O.parentNode;)O.nodeType===1&&D.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<D.length;d++){var M=D[d];M.element.scrollLeft=M.left,M.element.scrollTop=M.top}}Ul=!!au,su=au=null}finally{_e=o,H.p=a,T.T=n}}e.current=t,We=2}}function dd(){if(We===2){We=0;var e=$n,t=ea,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var a=H.p;H.p=2;var o=_e;_e|=4;try{Yh(e,t.alternate,t)}finally{_e=o,H.p=a,T.T=n}}We=3}}function pd(){if(We===4||We===3){We=0,it();var e=$n,t=ea,n=Tn,a=ed;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?We=5:(We=0,ea=$n=null,md(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Yn=null),cr(n),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(va,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,o=H.p,H.p=2,T.T=null;try{for(var u=e.onRecoverableError,h=0;h<a.length;h++){var d=a[h];u(d.value,{componentStack:d.stack})}}finally{T.T=t,H.p=o}}(Tn&3)!==0&&wl(),Pt(e),o=e.pendingLanes,(n&261930)!==0&&(o&42)!==0?e===Go?Pa++:(Pa=0,Go=e):Pa=0,es(0)}}function md(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ua(t)))}function wl(){return hd(),dd(),pd(),yd()}function yd(){if(We!==5)return!1;var e=$n,t=Xo;Xo=0;var n=cr(Tn),a=T.T,o=H.p;try{H.p=32>n?32:n,T.T=null,n=Vo,Vo=null;var u=$n,h=Tn;if(We=0,ea=$n=null,Tn=0,(_e&6)!==0)throw Error(r(331));var d=_e;if(_e|=4,Wh(u.current),Zh(u,u.current,h,n),_e=d,es(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(va,u)}catch{}return!0}finally{H.p=o,T.T=a,md(e,t)}}function gd(e,t,n){t=Ut(n,t),t=Eo(e.stateNode,t,2),e=Cn(e,t,2),e!==null&&(Sa(e,2),Pt(e))}function Ne(e,t,n){if(e.tag===3)gd(e,e,n);else for(;t!==null;){if(t.tag===3){gd(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Yn===null||!Yn.has(a))){e=Ut(n,e),n=vh(2),a=Cn(t,n,2),a!==null&&(bh(n,a,t,e),Sa(a,2),Pt(a));break}}t=t.return}}function Zo(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new yg;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(n)||(Ho=!0,o.add(n),e=xg.bind(null,e,t,n),t.then(e,e))}function xg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Me===e&&(be&n)===n&&(Ye===4||Ye===3&&(be&62914560)===be&&300>Ve()-yl?(_e&2)===0&&ta(e,0):Yo|=n,Pi===be&&(Pi=0)),Pt(e)}function vd(e,t){t===0&&(t=fc()),e=ri(e,t),e!==null&&(Sa(e,t),Pt(e))}function wg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vd(e,n)}function Eg(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),vd(e,n)}function Tg(e,t){return se(e,t)}var El=null,ia=null,Jo=!1,Tl=!1,Fo=!1,Vn=0;function Pt(e){e!==ia&&e.next===null&&(ia===null?El=ia=e:ia=ia.next=e),Tl=!0,Jo||(Jo=!0,_g())}function es(e,t){if(!Fo&&Tl){Fo=!0;do for(var n=!1,a=El;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var u=0;else{var h=a.suspendedLanes,d=a.pingedLanes;u=(1<<31-wt(42|e)+1)-1,u&=o&~(h&~d),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,wd(a,u))}else u=be,u=Ns(a,a===Me?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||ba(a,u)||(n=!0,wd(a,u));a=a.next}while(n);Fo=!1}}function kg(){bd()}function bd(){Tl=Jo=!1;var e=0;Vn!==0&&Dg()&&(e=Vn);for(var t=Ve(),n=null,a=El;a!==null;){var o=a.next,u=Sd(a,t);u===0?(a.next=null,n===null?El=o:n.next=o,o===null&&(ia=n)):(n=a,(e!==0||(u&3)!==0)&&(Tl=!0)),a=o}We!==0&&We!==5||es(e),Vn!==0&&(Vn=0)}function Sd(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-wt(u),d=1<<h,g=o[h];g===-1?((d&n)===0||(d&a)!==0)&&(o[h]=Im(d,t)):g<=t&&(e.expiredLanes|=d),u&=~d}if(t=Me,n=be,n=Ns(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ce(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||ba(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ce(a),cr(n)){case 2:case 8:n=uc;break;case 32:n=Ts;break;case 268435456:n=cc;break;default:n=Ts}return a=xd.bind(null,e),n=se(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ce(a),e.callbackPriority=2,e.callbackNode=null,2}function xd(e,t){if(We!==0&&We!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wl()&&e.callbackNode!==n)return null;var a=be;return a=Ns(e,e===Me?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(nd(e,a,t),Sd(e,Ve()),e.callbackNode!=null&&e.callbackNode===n?xd.bind(null,e):null)}function wd(e,t){if(wl())return null;nd(e,t,!0)}function _g(){qg(function(){(_e&6)!==0?se(oc,kg):bd()})}function Wo(){if(Vn===0){var e=$i;e===0&&(e=ks,ks<<=1,(ks&261888)===0&&(ks=256)),Vn=e}return Vn}function Ed(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rs(""+e)}function Td(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ag(e,t,n,a,o){if(t==="submit"&&n&&n.stateNode===o){var u=Ed((o[pt]||null).action),h=a.submitter;h&&(t=(t=h[pt]||null)?Ed(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var d=new Ds("action","action",null,a,o);e.push({event:d,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Vn!==0){var g=h?Td(o,h):new FormData(o);go(n,{pending:!0,data:g,method:o.method,action:u},null,g)}}else typeof u=="function"&&(d.preventDefault(),g=h?Td(o,h):new FormData(o),go(n,{pending:!0,data:g,method:o.method,action:u},u,g))},currentTarget:o}]})}}for(var Io=0;Io<Mr.length;Io++){var Po=Mr[Io],Ng=Po.toLowerCase(),Og=Po[0].toUpperCase()+Po.slice(1);$t(Ng,"on"+Og)}$t(ef,"onAnimationEnd"),$t(tf,"onAnimationIteration"),$t(nf,"onAnimationStart"),$t("dblclick","onDoubleClick"),$t("focusin","onFocus"),$t("focusout","onBlur"),$t(Gy,"onTransitionRun"),$t(Qy,"onTransitionStart"),$t(Ky,"onTransitionCancel"),$t(af,"onTransitionEnd"),Ni("onMouseEnter",["mouseout","mouseover"]),Ni("onMouseLeave",["mouseout","mouseover"]),Ni("onPointerEnter",["pointerout","pointerover"]),Ni("onPointerLeave",["pointerout","pointerover"]),ii("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ii("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ii("onBeforeInput",["compositionend","keypress","textInput","paste"]),ii("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ii("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ii("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ts="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(" "),zg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ts));function kd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],o=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var h=a.length-1;0<=h;h--){var d=a[h],g=d.instance,_=d.currentTarget;if(d=d.listener,g!==u&&o.isPropagationStopped())break e;u=d,o.currentTarget=_;try{u(o)}catch(z){Ls(z)}o.currentTarget=null,u=g}else for(h=0;h<a.length;h++){if(d=a[h],g=d.instance,_=d.currentTarget,d=d.listener,g!==u&&o.isPropagationStopped())break e;u=d,o.currentTarget=_;try{u(o)}catch(z){Ls(z)}o.currentTarget=null,u=g}}}}function ge(e,t){var n=t[fr];n===void 0&&(n=t[fr]=new Set);var a=e+"__bubble";n.has(a)||(_d(t,e,2,!1),n.add(a))}function eu(e,t,n){var a=0;t&&(a|=4),_d(n,e,a,t)}var kl="_reactListening"+Math.random().toString(36).slice(2);function tu(e){if(!e[kl]){e[kl]=!0,vc.forEach(function(n){n!=="selectionchange"&&(zg.has(n)||eu(n,!1,e),eu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kl]||(t[kl]=!0,eu("selectionchange",!1,t))}}function _d(e,t,n,a){switch(tp(t)){case 2:var o=av;break;case 8:o=sv;break;default:o=yu}n=o.bind(null,t,n,e),o=void 0,!Sr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function nu(e,t,n,a,o){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var h=a.tag;if(h===3||h===4){var d=a.stateNode.containerInfo;if(d===o)break;if(h===4)for(h=a.return;h!==null;){var g=h.tag;if((g===3||g===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;d!==null;){if(h=ki(d),h===null)return;if(g=h.tag,g===5||g===6||g===26||g===27){a=u=h;continue e}d=d.parentNode}}a=a.return}zc(function(){var _=u,z=vr(n),D=[];e:{var A=sf.get(e);if(A!==void 0){var O=Ds,F=e;switch(e){case"keypress":if(Us(n)===0)break e;case"keydown":case"keyup":O=Ey;break;case"focusin":F="focus",O=Tr;break;case"focusout":F="blur",O=Tr;break;case"beforeblur":case"afterblur":O=Tr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Mc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=fy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=_y;break;case ef:case tf:case nf:O=py;break;case af:O=Ny;break;case"scroll":case"scrollend":O=uy;break;case"wheel":O=zy;break;case"copy":case"cut":case"paste":O=yy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Cc;break;case"toggle":case"beforetoggle":O=Ry}var le=(t&4)!==0,je=!le&&(e==="scroll"||e==="scrollend"),E=le?A!==null?A+"Capture":null:A;le=[];for(var S=_,k;S!==null;){var M=S;if(k=M.stateNode,M=M.tag,M!==5&&M!==26&&M!==27||k===null||E===null||(M=Ea(S,E),M!=null&&le.push(ns(S,M,k))),je)break;S=S.return}0<le.length&&(A=new O(A,F,null,n,z),D.push({event:A,listeners:le}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",A&&n!==gr&&(F=n.relatedTarget||n.fromElement)&&(ki(F)||F[Ti]))break e;if((O||A)&&(A=z.window===z?z:(A=z.ownerDocument)?A.defaultView||A.parentWindow:window,O?(F=n.relatedTarget||n.toElement,O=_,F=F?ki(F):null,F!==null&&(je=f(F),le=F.tag,F!==je||le!==5&&le!==27&&le!==6)&&(F=null)):(O=null,F=_),O!==F)){if(le=Mc,M="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(le=Cc,M="onPointerLeave",E="onPointerEnter",S="pointer"),je=O==null?A:wa(O),k=F==null?A:wa(F),A=new le(M,S+"leave",O,n,z),A.target=je,A.relatedTarget=k,M=null,ki(z)===_&&(le=new le(E,S+"enter",F,n,z),le.target=k,le.relatedTarget=je,M=le),je=M,O&&F)t:{for(le=jg,E=O,S=F,k=0,M=E;M;M=le(M))k++;M=0;for(var ne=S;ne;ne=le(ne))M++;for(;0<k-M;)E=le(E),k--;for(;0<M-k;)S=le(S),M--;for(;k--;){if(E===S||S!==null&&E===S.alternate){le=E;break t}E=le(E),S=le(S)}le=null}else le=null;O!==null&&Ad(D,A,O,le,!1),F!==null&&je!==null&&Ad(D,je,F,le,!0)}}e:{if(A=_?wa(_):window,O=A.nodeName&&A.nodeName.toLowerCase(),O==="select"||O==="input"&&A.type==="file")var Te=Xc;else if(Yc(A))if(Vc)Te=$y;else{Te=Hy;var P=Ly}else O=A.nodeName,!O||O.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?_&&yr(_.elementType)&&(Te=Xc):Te=Yy;if(Te&&(Te=Te(e,_))){$c(D,Te,n,z);break e}P&&P(e,A,_),e==="focusout"&&_&&A.type==="number"&&_.memoizedProps.value!=null&&mr(A,"number",A.value)}switch(P=_?wa(_):window,e){case"focusin":(Yc(P)||P.contentEditable==="true")&&(Ui=P,zr=_,ja=null);break;case"focusout":ja=zr=Ui=null;break;case"mousedown":jr=!0;break;case"contextmenu":case"mouseup":case"dragend":jr=!1,Ic(D,n,z);break;case"selectionchange":if(Vy)break;case"keydown":case"keyup":Ic(D,n,z)}var de;if(_r)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Mi?Lc(e,n)&&(Se="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Se="onCompositionStart");Se&&(Dc&&n.locale!=="ko"&&(Mi||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Mi&&(de=jc()):(Nn=z,xr="value"in Nn?Nn.value:Nn.textContent,Mi=!0)),P=_l(_,Se),0<P.length&&(Se=new Uc(Se,e,null,n,z),D.push({event:Se,listeners:P}),de?Se.data=de:(de=Hc(n),de!==null&&(Se.data=de)))),(de=Uy?Cy(e,n):Dy(e,n))&&(Se=_l(_,"onBeforeInput"),0<Se.length&&(P=new Uc("onBeforeInput","beforeinput",null,n,z),D.push({event:P,listeners:Se}),P.data=de)),Ag(D,e,_,n,z)}kd(D,t)})}function ns(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _l(e,t){for(var n=t+"Capture",a=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Ea(e,n),o!=null&&a.unshift(ns(e,o,u)),o=Ea(e,t),o!=null&&a.push(ns(e,o,u))),e.tag===3)return a;e=e.return}return[]}function jg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ad(e,t,n,a,o){for(var u=t._reactName,h=[];n!==null&&n!==a;){var d=n,g=d.alternate,_=d.stateNode;if(d=d.tag,g!==null&&g===a)break;d!==5&&d!==26&&d!==27||_===null||(g=_,o?(_=Ea(n,u),_!=null&&h.unshift(ns(n,_,g))):o||(_=Ea(n,u),_!=null&&h.push(ns(n,_,g)))),n=n.return}h.length!==0&&e.push({event:t,listeners:h})}var Rg=/\r\n?/g,Mg=/\u0000|\uFFFD/g;function Nd(e){return(typeof e=="string"?e:""+e).replace(Rg,`
|
|
9
|
-
`).replace(Mg,"")}function Od(e,t){return t=Nd(t),Nd(e)===t}function ze(e,t,n,a,o,u){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||zi(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&zi(e,""+a);break;case"className":zs(e,"class",a);break;case"tabIndex":zs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":zs(e,n,a);break;case"style":Nc(e,a,u);break;case"data":if(t!=="object"){zs(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Rs(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(n==="formAction"?(t!=="input"&&ze(e,t,"name",o.name,o,null),ze(e,t,"formEncType",o.formEncType,o,null),ze(e,t,"formMethod",o.formMethod,o,null),ze(e,t,"formTarget",o.formTarget,o,null)):(ze(e,t,"encType",o.encType,o,null),ze(e,t,"method",o.method,o,null),ze(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Rs(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=un);break;case"onScroll":a!=null&&ge("scroll",e);break;case"onScrollEnd":a!=null&&ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=Rs(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":ge("beforetoggle",e),ge("toggle",e),Os(e,"popover",a);break;case"xlinkActuate":on(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":on(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":on(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":on(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":on(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":on(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":on(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":on(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":on(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Os(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=ry.get(n)||n,Os(e,n,a))}}function iu(e,t,n,a,o,u){switch(n){case"style":Nc(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof a=="string"?zi(e,a):(typeof a=="number"||typeof a=="bigint")&&zi(e,""+a);break;case"onScroll":a!=null&&ge("scroll",e);break;case"onScrollEnd":a!=null&&ge("scrollend",e);break;case"onClick":a!=null&&(e.onclick=un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bc.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),u=e[pt]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof a=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,o);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Os(e,n,a)}}}function ot(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ge("error",e),ge("load",e);var a=!1,o=!1,u;for(u in n)if(n.hasOwnProperty(u)){var h=n[u];if(h!=null)switch(u){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ze(e,t,u,h,n,null)}}o&&ze(e,t,"srcSet",n.srcSet,n,null),a&&ze(e,t,"src",n.src,n,null);return;case"input":ge("invalid",e);var d=u=h=o=null,g=null,_=null;for(a in n)if(n.hasOwnProperty(a)){var z=n[a];if(z!=null)switch(a){case"name":o=z;break;case"type":h=z;break;case"checked":g=z;break;case"defaultChecked":_=z;break;case"value":u=z;break;case"defaultValue":d=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:ze(e,t,a,z,n,null)}}Tc(e,u,d,g,_,h,o,!1);return;case"select":ge("invalid",e),a=h=u=null;for(o in n)if(n.hasOwnProperty(o)&&(d=n[o],d!=null))switch(o){case"value":u=d;break;case"defaultValue":h=d;break;case"multiple":a=d;default:ze(e,t,o,d,n,null)}t=u,n=h,e.multiple=!!a,t!=null?Oi(e,!!a,t,!1):n!=null&&Oi(e,!!a,n,!0);return;case"textarea":ge("invalid",e),u=o=a=null;for(h in n)if(n.hasOwnProperty(h)&&(d=n[h],d!=null))switch(h){case"value":a=d;break;case"defaultValue":o=d;break;case"children":u=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(r(91));break;default:ze(e,t,h,d,n,null)}_c(e,a,o,u);return;case"option":for(g in n)n.hasOwnProperty(g)&&(a=n[g],a!=null)&&(g==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":ze(e,t,g,a,n,null));return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(a=0;a<ts.length;a++)ge(ts[a],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_ in n)if(n.hasOwnProperty(_)&&(a=n[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ze(e,t,_,a,n,null)}return;default:if(yr(t)){for(z in n)n.hasOwnProperty(z)&&(a=n[z],a!==void 0&&iu(e,t,z,a,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(a=n[d],a!=null&&ze(e,t,d,a,n,null))}function Ug(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,h=null,d=null,g=null,_=null,z=null;for(O in n){var D=n[O];if(n.hasOwnProperty(O)&&D!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":g=D;default:a.hasOwnProperty(O)||ze(e,t,O,null,a,D)}}for(var A in a){var O=a[A];if(D=n[A],a.hasOwnProperty(A)&&(O!=null||D!=null))switch(A){case"type":u=O;break;case"name":o=O;break;case"checked":_=O;break;case"defaultChecked":z=O;break;case"value":h=O;break;case"defaultValue":d=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==D&&ze(e,t,A,O,a,D)}}pr(e,h,d,g,_,z,u,o);return;case"select":O=h=d=A=null;for(u in n)if(g=n[u],n.hasOwnProperty(u)&&g!=null)switch(u){case"value":break;case"multiple":O=g;default:a.hasOwnProperty(u)||ze(e,t,u,null,a,g)}for(o in a)if(u=a[o],g=n[o],a.hasOwnProperty(o)&&(u!=null||g!=null))switch(o){case"value":A=u;break;case"defaultValue":d=u;break;case"multiple":h=u;default:u!==g&&ze(e,t,o,u,a,g)}t=d,n=h,a=O,A!=null?Oi(e,!!n,A,!1):!!a!=!!n&&(t!=null?Oi(e,!!n,t,!0):Oi(e,!!n,n?[]:"",!1));return;case"textarea":O=A=null;for(d in n)if(o=n[d],n.hasOwnProperty(d)&&o!=null&&!a.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:ze(e,t,d,null,a,o)}for(h in a)if(o=a[h],u=n[h],a.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":A=o;break;case"defaultValue":O=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==u&&ze(e,t,h,o,a,u)}kc(e,A,O);return;case"option":for(var F in n)A=n[F],n.hasOwnProperty(F)&&A!=null&&!a.hasOwnProperty(F)&&(F==="selected"?e.selected=!1:ze(e,t,F,null,a,A));for(g in a)A=a[g],O=n[g],a.hasOwnProperty(g)&&A!==O&&(A!=null||O!=null)&&(g==="selected"?e.selected=A&&typeof A!="function"&&typeof A!="symbol":ze(e,t,g,A,a,O));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 le in n)A=n[le],n.hasOwnProperty(le)&&A!=null&&!a.hasOwnProperty(le)&&ze(e,t,le,null,a,A);for(_ in a)if(A=a[_],O=n[_],a.hasOwnProperty(_)&&A!==O&&(A!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(r(137,t));break;default:ze(e,t,_,A,a,O)}return;default:if(yr(t)){for(var je in n)A=n[je],n.hasOwnProperty(je)&&A!==void 0&&!a.hasOwnProperty(je)&&iu(e,t,je,void 0,a,A);for(z in a)A=a[z],O=n[z],!a.hasOwnProperty(z)||A===O||A===void 0&&O===void 0||iu(e,t,z,A,a,O);return}}for(var E in n)A=n[E],n.hasOwnProperty(E)&&A!=null&&!a.hasOwnProperty(E)&&ze(e,t,E,null,a,A);for(D in a)A=a[D],O=n[D],!a.hasOwnProperty(D)||A===O||A==null&&O==null||ze(e,t,D,A,a,O)}function zd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Cg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var o=n[a],u=o.transferSize,h=o.initiatorType,d=o.duration;if(u&&d&&zd(h)){for(h=0,d=o.responseEnd,a+=1;a<n.length;a++){var g=n[a],_=g.startTime;if(_>d)break;var z=g.transferSize,D=g.initiatorType;z&&zd(D)&&(g=g.responseEnd,h+=z*(g<d?1:(d-_)/(g-_)))}if(--a,t+=8*(u+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var au=null,su=null;function Al(e){return e.nodeType===9?e:e.ownerDocument}function jd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Rd(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function lu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ru=null;function Dg(){var e=window.event;return e&&e.type==="popstate"?e===ru?!1:(ru=e,!0):(ru=null,!1)}var Md=typeof setTimeout=="function"?setTimeout:void 0,Bg=typeof clearTimeout=="function"?clearTimeout:void 0,Ud=typeof Promise=="function"?Promise:void 0,qg=typeof queueMicrotask=="function"?queueMicrotask:typeof Ud<"u"?function(e){return Ud.resolve(null).then(e).catch(Lg)}:Md;function Lg(e){setTimeout(function(){throw e})}function Gn(e){return e==="head"}function Cd(e,t){var n=t,a=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(o),ra(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")is(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,is(n);for(var u=n.firstChild;u;){var h=u.nextSibling,d=u.nodeName;u[xa]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=h}}else n==="body"&&is(e.ownerDocument.body);n=o}while(n);ra(t)}function Dd(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function ou(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ou(n),hr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Hg(e,t,n,a){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[xa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Lt(e.nextSibling),e===null)break}return null}function Yg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Lt(e.nextSibling),e===null))return null;return e}function Bd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Lt(e.nextSibling),e===null))return null;return e}function uu(e){return e.data==="$?"||e.data==="$~"}function cu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $g(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Lt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var fu=null;function qd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Lt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Ld(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Hd(e,t,n){switch(t=Al(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function is(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);hr(e)}var Ht=new Map,Yd=new Set;function Nl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kn=H.d;H.d={f:Xg,r:Vg,D:Gg,C:Qg,L:Kg,m:Zg,X:Fg,S:Jg,M:Wg};function Xg(){var e=kn.f(),t=bl();return e||t}function Vg(e){var t=_i(e);t!==null&&t.tag===5&&t.type==="form"?ah(t):kn.r(e)}var aa=typeof document>"u"?null:document;function $d(e,t,n){var a=aa;if(a&&typeof t=="string"&&t){var o=Rt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),Yd.has(o)||(Yd.add(o),e={rel:e,crossOrigin:n,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),ot(t,"link",e),Pe(t),a.head.appendChild(t)))}}function Gg(e){kn.D(e),$d("dns-prefetch",e,null)}function Qg(e,t){kn.C(e,t),$d("preconnect",e,t)}function Kg(e,t,n){kn.L(e,t,n);var a=aa;if(a&&e&&t){var o='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+Rt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+Rt(n.imageSizes)+'"]')):o+='[href="'+Rt(e)+'"]';var u=o;switch(t){case"style":u=sa(e);break;case"script":u=la(e)}Ht.has(u)||(e=w({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ht.set(u,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(as(u))||t==="script"&&a.querySelector(ss(u))||(t=a.createElement("link"),ot(t,"link",e),Pe(t),a.head.appendChild(t)))}}function Zg(e,t){kn.m(e,t);var n=aa;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Rt(a)+'"][href="'+Rt(e)+'"]',u=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=la(e)}if(!Ht.has(u)&&(e=w({rel:"modulepreload",href:e},t),Ht.set(u,e),n.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ss(u)))return}a=n.createElement("link"),ot(a,"link",e),Pe(a),n.head.appendChild(a)}}}function Jg(e,t,n){kn.S(e,t,n);var a=aa;if(a&&e){var o=Ai(a).hoistableStyles,u=sa(e);t=t||"default";var h=o.get(u);if(!h){var d={loading:0,preload:null};if(h=a.querySelector(as(u)))d.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ht.get(u))&&hu(e,n);var g=h=a.createElement("link");Pe(g),ot(g,"link",e),g._p=new Promise(function(_,z){g.onload=_,g.onerror=z}),g.addEventListener("load",function(){d.loading|=1}),g.addEventListener("error",function(){d.loading|=2}),d.loading|=4,Ol(h,t,a)}h={type:"stylesheet",instance:h,count:1,state:d},o.set(u,h)}}}function Fg(e,t){kn.X(e,t);var n=aa;if(n&&e){var a=Ai(n).hoistableScripts,o=la(e),u=a.get(o);u||(u=n.querySelector(ss(o)),u||(e=w({src:e,async:!0},t),(t=Ht.get(o))&&du(e,t),u=n.createElement("script"),Pe(u),ot(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(o,u))}}function Wg(e,t){kn.M(e,t);var n=aa;if(n&&e){var a=Ai(n).hoistableScripts,o=la(e),u=a.get(o);u||(u=n.querySelector(ss(o)),u||(e=w({src:e,async:!0,type:"module"},t),(t=Ht.get(o))&&du(e,t),u=n.createElement("script"),Pe(u),ot(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(o,u))}}function Xd(e,t,n,a){var o=(o=he.current)?Nl(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=sa(n.href),n=Ai(o).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=sa(n.href);var u=Ai(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(as(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Ht.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ht.set(e,n),u||Ig(o,e,n,h.state))),t&&a===null)throw Error(r(528,""));return h}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=la(n),n=Ai(o).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function sa(e){return'href="'+Rt(e)+'"'}function as(e){return'link[rel="stylesheet"]['+e+"]"}function Vd(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Ig(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),ot(t,"link",n),Pe(t),e.head.appendChild(t))}function la(e){return'[src="'+Rt(e)+'"]'}function ss(e){return"script[async]"+e}function Gd(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Rt(n.href)+'"]');if(a)return t.instance=a,Pe(a),a;var o=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Pe(a),ot(a,"style",o),Ol(a,n.precedence,e),t.instance=a;case"stylesheet":o=sa(n.href);var u=e.querySelector(as(o));if(u)return t.state.loading|=4,t.instance=u,Pe(u),u;a=Vd(n),(o=Ht.get(o))&&hu(a,o),u=(e.ownerDocument||e).createElement("link"),Pe(u);var h=u;return h._p=new Promise(function(d,g){h.onload=d,h.onerror=g}),ot(u,"link",a),t.state.loading|=4,Ol(u,n.precedence,e),t.instance=u;case"script":return u=la(n.src),(o=e.querySelector(ss(u)))?(t.instance=o,Pe(o),o):(a=n,(o=Ht.get(u))&&(a=w({},n),du(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),Pe(o),ot(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ol(a,n.precedence,e));return t.instance}function Ol(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,u=o,h=0;h<a.length;h++){var d=a[h];if(d.dataset.precedence===t)u=d;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function hu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function du(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var zl=null;function Qd(e,t,n){if(zl===null){var a=new Map,o=zl=new Map;o.set(n,a)}else o=zl,a=o.get(n),a||(a=new Map,o.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var u=n[o];if(!(u[xa]||u[at]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var d=a.get(h);d?d.push(u):a.set(h,[u])}}return a}function Kd(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Pg(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Zd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ev(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=sa(a.href),u=t.querySelector(as(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=jl.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,Pe(u);return}u=t.ownerDocument||t,a=Vd(a),(o=Ht.get(o))&&hu(a,o),u=u.createElement("link"),Pe(u);var h=u;h._p=new Promise(function(d,g){h.onload=d,h.onerror=g}),ot(u,"link",a),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=jl.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var pu=0;function tv(e,t){return e.stylesheets&&e.count===0&&Ml(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Ml(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&pu===0&&(pu=62500*Cg());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ml(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>pu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function jl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ml(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rl=null;function Ml(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rl=new Map,t.forEach(nv,e),Rl=null,jl.call(e))}function nv(e,t){if(!(t.state.loading&4)){var n=Rl.get(e);if(n)var a=n.get(null);else{n=new Map,Rl.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var h=o[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),a=h)}a&&n.set(null,a)}o=t.instance,h=o.getAttribute("data-precedence"),u=n.get(h)||a,u===a&&n.set(null,o),n.set(h,o),this.count++,a=jl.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ls={$$typeof:ae,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function iv(e,t,n,a,o,u,h,d,g){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=or(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=or(0),this.hiddenUpdates=or(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function Jd(e,t,n,a,o,u,h,d,g,_,z,D){return e=new iv(e,t,n,h,g,_,z,D,d),t=1,u===!0&&(t|=24),u=Tt(3,null,null,t),e.current=u,u.stateNode=e,t=Qr(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},Fr(u),e}function Fd(e){return e?(e=Bi,e):Bi}function Wd(e,t,n,a,o,u){o=Fd(o),a.context===null?a.context=o:a.pendingContext=o,a=Un(t),a.payload={element:n},u=u===void 0?null:u,u!==null&&(a.callback=u),n=Cn(e,a,t),n!==null&&(St(n,e,t),qa(n,e,t))}function Id(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mu(e,t){Id(e,t),(e=e.alternate)&&Id(e,t)}function Pd(e){if(e.tag===13||e.tag===31){var t=ri(e,67108864);t!==null&&St(t,e,67108864),mu(e,67108864)}}function ep(e){if(e.tag===13||e.tag===31){var t=Ot();t=ur(t);var n=ri(e,t);n!==null&&St(n,e,t),mu(e,t)}}var Ul=!0;function av(e,t,n,a){var o=T.T;T.T=null;var u=H.p;try{H.p=2,yu(e,t,n,a)}finally{H.p=u,T.T=o}}function sv(e,t,n,a){var o=T.T;T.T=null;var u=H.p;try{H.p=8,yu(e,t,n,a)}finally{H.p=u,T.T=o}}function yu(e,t,n,a){if(Ul){var o=gu(a);if(o===null)nu(e,t,a,Cl,n),np(e,a);else if(rv(o,e,t,n,a))a.stopPropagation();else if(np(e,a),t&4&&-1<lv.indexOf(e)){for(;o!==null;){var u=_i(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=ni(u.pendingLanes);if(h!==0){var d=u;for(d.pendingLanes|=2,d.entangledLanes|=2;h;){var g=1<<31-wt(h);d.entanglements[1]|=g,h&=~g}Pt(u),(_e&6)===0&&(gl=Ve()+500,es(0))}}break;case 31:case 13:d=ri(u,2),d!==null&&St(d,u,2),bl(),mu(u,2)}if(u=gu(a),u===null&&nu(e,t,a,Cl,n),u===o)break;o=u}o!==null&&a.stopPropagation()}else nu(e,t,a,null,n)}}function gu(e){return e=vr(e),vu(e)}var Cl=null;function vu(e){if(Cl=null,e=ki(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=p(t),e!==null)return e;e=null}else if(n===31){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cl=e,null}function tp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ei()){case oc:return 2;case uc:return 8;case Ts:case Qm:return 32;case cc:return 268435456;default:return 32}default:return 32}}var bu=!1,Qn=null,Kn=null,Zn=null,rs=new Map,os=new Map,Jn=[],lv="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 np(e,t){switch(e){case"focusin":case"focusout":Qn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":os.delete(t.pointerId)}}function us(e,t,n,a,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:u,targetContainers:[o]},t!==null&&(t=_i(t),t!==null&&Pd(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function rv(e,t,n,a,o){switch(t){case"focusin":return Qn=us(Qn,e,t,n,a,o),!0;case"dragenter":return Kn=us(Kn,e,t,n,a,o),!0;case"mouseover":return Zn=us(Zn,e,t,n,a,o),!0;case"pointerover":var u=o.pointerId;return rs.set(u,us(rs.get(u)||null,e,t,n,a,o)),!0;case"gotpointercapture":return u=o.pointerId,os.set(u,us(os.get(u)||null,e,t,n,a,o)),!0}return!1}function ip(e){var t=ki(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=p(n),t!==null){e.blockedOn=t,yc(e.priority,function(){ep(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,yc(e.priority,function(){ep(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gu(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);gr=a,n.target.dispatchEvent(a),gr=null}else return t=_i(n),t!==null&&Pd(t),e.blockedOn=n,!1;t.shift()}return!0}function ap(e,t,n){Dl(e)&&n.delete(t)}function ov(){bu=!1,Qn!==null&&Dl(Qn)&&(Qn=null),Kn!==null&&Dl(Kn)&&(Kn=null),Zn!==null&&Dl(Zn)&&(Zn=null),rs.forEach(ap),os.forEach(ap)}function Bl(e,t){e.blockedOn===t&&(e.blockedOn=null,bu||(bu=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,ov)))}var ql=null;function sp(e){ql!==e&&(ql=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){ql===e&&(ql=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(vu(a||n)===null)continue;break}var u=_i(n);u!==null&&(e.splice(t,3),t-=3,go(u,{pending:!0,data:o,method:n.method,action:a},a,o))}}))}function ra(e){function t(g){return Bl(g,e)}Qn!==null&&Bl(Qn,e),Kn!==null&&Bl(Kn,e),Zn!==null&&Bl(Zn,e),rs.forEach(t),os.forEach(t);for(var n=0;n<Jn.length;n++){var a=Jn[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Jn.length&&(n=Jn[0],n.blockedOn===null);)ip(n),n.blockedOn===null&&Jn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var o=n[a],u=n[a+1],h=o[pt]||null;if(typeof u=="function")h||sp(n);else if(h){var d=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[pt]||null)d=h.formAction;else if(vu(o)!==null)continue}else d=h.action;typeof d=="function"?n[a+1]=d:(n.splice(a,3),a-=3),sp(n)}}}function lp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Su(e){this._internalRoot=e}Ll.prototype.render=Su.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,a=Ot();Wd(n,a,e,t,null,null)},Ll.prototype.unmount=Su.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wd(e.current,2,null,e,null,null),bl(),t[Ti]=null}};function Ll(e){this._internalRoot=e}Ll.prototype.unstable_scheduleHydration=function(e){if(e){var t=mc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jn.length&&t!==0&&t<Jn[n].priority;n++);Jn.splice(n,0,e),n===0&&ip(e)}};var rp=i.version;if(rp!=="19.2.8")throw Error(r(527,rp,"19.2.8"));H.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=x(t),e=e!==null?N(e):null,e=e===null?null:e.stateNode,e};var uv={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hl.isDisabled&&Hl.supportsFiber)try{va=Hl.inject(uv),xt=Hl}catch{}}return ds.createRoot=function(e,t){if(!c(e))throw Error(r(299));var n=!1,a="",o=ph,u=mh,h=yh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Jd(e,1,!1,null,null,n,a,null,o,u,h,lp),e[Ti]=t.current,tu(e),new Su(t)},ds.hydrateRoot=function(e,t,n){if(!c(e))throw Error(r(299));var a=!1,o="",u=ph,h=mh,d=yh,g=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(d=n.onRecoverableError),n.formState!==void 0&&(g=n.formState)),t=Jd(e,1,!0,t,n??null,a,o,g,u,h,d,lp),t.context=Fd(null),n=t.current,a=Ot(),a=ur(a),o=Un(a),o.callback=null,Cn(n,o,a),n=a,t.current.lanes=n,Sa(t,n),Pt(t),e[Ti]=t.current,tu(e),new Ll(t)},ds.version="19.2.8",ds}var kp;function _v(){if(kp)return _u.exports;kp=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),_u.exports=kv(),_u.exports}var Av=_v(),$l={exports:{}},_p;function Nv(){if(_p)return $l.exports;_p=1;var l=typeof Reflect=="object"?Reflect:null,i=l&&typeof l.apply=="function"?l.apply:function(C,L,R){return Function.prototype.apply.call(C,L,R)},s;l&&typeof l.ownKeys=="function"?s=l.ownKeys:Object.getOwnPropertySymbols?s=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:s=function(C){return Object.getOwnPropertyNames(C)};function r(j){console&&console.warn&&console.warn(j)}var c=Number.isNaN||function(C){return C!==C};function f(){f.init.call(this)}$l.exports=f,$l.exports.once=U,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var p=10;function m(j){if(typeof j!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof j)}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return p},set:function(j){if(typeof j!="number"||j<0||c(j))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+j+".");p=j}}),f.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||c(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function v(j){return j._maxListeners===void 0?f.defaultMaxListeners:j._maxListeners}f.prototype.getMaxListeners=function(){return v(this)},f.prototype.emit=function(C){for(var L=[],R=1;R<arguments.length;R++)L.push(arguments[R]);var G=C==="error",te=this._events;if(te!==void 0)G=G&&te.error===void 0;else if(!G)return!1;if(G){var ie;if(L.length>0&&(ie=L[0]),ie instanceof Error)throw ie;var re=new Error("Unhandled error."+(ie?" ("+ie.message+")":""));throw re.context=ie,re}var ve=te[C];if(ve===void 0)return!1;if(typeof ve=="function")i(ve,this,L);else for(var Le=ve.length,tt=ee(ve,Le),R=0;R<Le;++R)i(tt[R],this,L);return!0};function x(j,C,L,R){var G,te,ie;if(m(L),te=j._events,te===void 0?(te=j._events=Object.create(null),j._eventsCount=0):(te.newListener!==void 0&&(j.emit("newListener",C,L.listener?L.listener:L),te=j._events),ie=te[C]),ie===void 0)ie=te[C]=L,++j._eventsCount;else if(typeof ie=="function"?ie=te[C]=R?[L,ie]:[ie,L]:R?ie.unshift(L):ie.push(L),G=v(j),G>0&&ie.length>G&&!ie.warned){ie.warned=!0;var re=new Error("Possible EventEmitter memory leak detected. "+ie.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");re.name="MaxListenersExceededWarning",re.emitter=j,re.type=C,re.count=ie.length,r(re)}return j}f.prototype.addListener=function(C,L){return x(this,C,L,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(C,L){return x(this,C,L,!0)};function N(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function w(j,C,L){var R={fired:!1,wrapFn:void 0,target:j,type:C,listener:L},G=N.bind(R);return G.listener=L,R.wrapFn=G,G}f.prototype.once=function(C,L){return m(L),this.on(C,w(this,C,L)),this},f.prototype.prependOnceListener=function(C,L){return m(L),this.prependListener(C,w(this,C,L)),this},f.prototype.removeListener=function(C,L){var R,G,te,ie,re;if(m(L),G=this._events,G===void 0)return this;if(R=G[C],R===void 0)return this;if(R===L||R.listener===L)--this._eventsCount===0?this._events=Object.create(null):(delete G[C],G.removeListener&&this.emit("removeListener",C,R.listener||L));else if(typeof R!="function"){for(te=-1,ie=R.length-1;ie>=0;ie--)if(R[ie]===L||R[ie].listener===L){re=R[ie].listener,te=ie;break}if(te<0)return this;te===0?R.shift():Z(R,te),R.length===1&&(G[C]=R[0]),G.removeListener!==void 0&&this.emit("removeListener",C,re||L)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(C){var L,R,G;if(R=this._events,R===void 0)return this;if(R.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):R[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete R[C]),this;if(arguments.length===0){var te=Object.keys(R),ie;for(G=0;G<te.length;++G)ie=te[G],ie!=="removeListener"&&this.removeAllListeners(ie);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(L=R[C],typeof L=="function")this.removeListener(C,L);else if(L!==void 0)for(G=L.length-1;G>=0;G--)this.removeListener(C,L[G]);return this};function q(j,C,L){var R=j._events;if(R===void 0)return[];var G=R[C];return G===void 0?[]:typeof G=="function"?L?[G.listener||G]:[G]:L?I(G):ee(G,G.length)}f.prototype.listeners=function(C){return q(this,C,!0)},f.prototype.rawListeners=function(C){return q(this,C,!1)},f.listenerCount=function(j,C){return typeof j.listenerCount=="function"?j.listenerCount(C):Y.call(j,C)},f.prototype.listenerCount=Y;function Y(j){var C=this._events;if(C!==void 0){var L=C[j];if(typeof L=="function")return 1;if(L!==void 0)return L.length}return 0}f.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]};function ee(j,C){for(var L=new Array(C),R=0;R<C;++R)L[R]=j[R];return L}function Z(j,C){for(;C+1<j.length;C++)j[C]=j[C+1];j.pop()}function I(j){for(var C=new Array(j.length),L=0;L<C.length;++L)C[L]=j[L].listener||j[L];return C}function U(j,C){return new Promise(function(L,R){function G(ie){j.removeListener(C,te),R(ie)}function te(){typeof j.removeListener=="function"&&j.removeListener("error",G),L([].slice.call(arguments))}ae(j,C,te,{once:!0}),C!=="error"&&K(j,G,{once:!0})})}function K(j,C,L){typeof j.on=="function"&&ae(j,"error",C,L)}function ae(j,C,L,R){if(typeof j.on=="function")R.once?j.once(C,L):j.on(C,L);else if(typeof j.addEventListener=="function")j.addEventListener(C,function G(te){R.once&&j.removeEventListener(C,G),L(te)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof j)}return $l.exports}var xi=Nv();const Bu=gv(xi),Ov=Object.prototype.toString,zv="[object Uint8Array]",jv="[object ArrayBuffer]";function om(l,i,s){return l?l.constructor===i?!0:Ov.call(l)===s:!1}function Rv(l){return om(l,Uint8Array,zv)}function Mv(l){return om(l,ArrayBuffer,jv)}function Uv(l){return Rv(l)||Mv(l)}function Cv(l){if(!Uv(l))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof l}\``)}const Ap={utf8:new globalThis.TextDecoder("utf8")};function um(l,i="utf8"){return Cv(l),Ap[i]??=new globalThis.TextDecoder(i),Ap[i].decode(l)}function Dv(l){if(typeof l!="string")throw new TypeError(`Expected \`string\`, got \`${typeof l}\``)}const Bv=new globalThis.TextEncoder;function cm(l){return Dv(l),Bv.encode(l)}Array.from({length:256},(l,i)=>i.toString(16).padStart(2,"0"));const ut=[];for(let l=0;l<256;++l)ut.push((l+256).toString(16).slice(1));function qv(l,i=0){return(ut[l[i+0]]+ut[l[i+1]]+ut[l[i+2]]+ut[l[i+3]]+"-"+ut[l[i+4]]+ut[l[i+5]]+"-"+ut[l[i+6]]+ut[l[i+7]]+"-"+ut[l[i+8]]+ut[l[i+9]]+"-"+ut[l[i+10]]+ut[l[i+11]]+ut[l[i+12]]+ut[l[i+13]]+ut[l[i+14]]+ut[l[i+15]]).toLowerCase()}const Lv=new Uint8Array(16);function Hv(){return crypto.getRandomValues(Lv)}function dt(l,i,s){return crypto.randomUUID?crypto.randomUUID():Yv(l)}function Yv(l,i,s){l=l||{};const r=l.random??l.rng?.()??Hv();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,qv(r)}const qu=1024,Np="$",Si={openBrace:123,closeBrace:125,quote:34,backslash:92,delimiter:36},Op=(l,i)=>{if(i===0||l(0)!==Si.openBrace)return-1;const s=Math.min(i,qu);let r=0,c=!1,f=!1;for(let p=0;p<s;p++){const m=l(p);if(c){f?f=!1:m===Si.backslash?f=!0:m===Si.quote&&(c=!1);continue}if(m===Si.quote)c=!0;else if(m===Si.openBrace)r++;else if(m===Si.closeBrace&&--r===0){const v=p+1;return v<s&&l(v)===Si.delimiter?v:-1}}return-1},Ue={connected:"connected",disconnected:"disconnected",peerOnline:"peerOnline",peerGone:"peerGone",peerDisplaced:"peerDisplaced",rejected:"rejected",unroutable:"unroutable",transportError:"transportError",relayed:"relayed"};class fm{maxPeers;peers=new Map;constructor(i=1e4){this.maxPeers=i}set(i,s){for(this.peers.delete(i),this.peers.set(i,s);this.peers.size>this.maxPeers;){const r=this.peers.keys().next();if(r.done)break;this.peers.delete(r.value)}}get(i){return this.peers.get(i)}delete(i){return this.peers.delete(i)}clear(){this.peers.clear()}get size(){return this.peers.size}namesFor(i){const s=[];for(const[r,c]of this.peers)c===i&&s.push(r);return s}names(){return[...this.peers.keys()]}}class ar extends xi.EventEmitter{name;destinations=[];peerRegistry=new fm;readyFlag=!1;seq=0;constructor(i,s){super(),this.name=i,i||(this.name=dt()),s&&s.forEach(r=>{r.pipe(this)})}async ready(i=3e4){const s=Date.now()+i;for(;!this.readyFlag;){if(Date.now()>s)return!1;await new Promise(r=>setTimeout(r,10))}return!0}async open(){}async close(){}buildHeader(i,s,r){return{source:i,target:s,time:Date.now(),seq:this.seq++,...r}}prependHeader(i,s,r){return this.frameMessage(this.buildHeader(i,s),r)}frameMessage(i,s){const r=JSON.stringify(i)+Np,c=cm(r);if(c.length>qu)throw new Error(`message header is ${c.length} bytes, over the ${qu} byte limit (source '${i.source}', target '${i.target}') - shorten the peer names`);if(typeof s=="string")return r+s;const f=new Uint8Array(c.length+s.length);return f.set(c,0),f.set(s,c.length),f}extractHeader(i){const s=typeof i=="string",r=Op(s?v=>i.charCodeAt(v):v=>i[v],i.length);if(r<0)return[void 0,"","no msgrpc header"];const c=s?i.substring(0,r):um(i.subarray(0,r));let f;try{f=JSON.parse(c)}catch(v){return[void 0,"",`unparsable header: ${String(v)}`]}if(!f||typeof f!="object")return[void 0,"","header is not an object"];if(typeof f.target!="string"||!f.target)return[void 0,"","header names no target"];if(typeof f.source!="string"||!f.source)return[void 0,"","header names no source"];const p=r+Np.length,m=s?i.substring(p):i.slice(p);return this.setKnownSource(f.source),[f,m]}getName(){return this.name}targetExists(i,s){let r;this.name===i&&(r=this);const c=this.peerRegistry.get(i);return c&&(r=c),r||this.destinations.map(f=>{!r&&!f.target.isTransport()&&f.target.targetExists(i,(s||0)+1)&&(r=f.target)}),r}pipe(i){const s=dt();return this.destinations.push({id:s,target:i}),()=>{this.destinations=this.destinations.filter(r=>r.id!==s)}}async receive(i,s,r){}async receivePayload(i,s,r){}async send(i,s,r){await Promise.all(this.destinations.map(async c=>await c.target.receive(i,s,r)))}setKnownSource(i){this.peerRegistry.set(i,this)}usePeerRegistry(i){return this.peerRegistry=i,this}getIdentity(i){}async sendPayload(i,s,r,c){}isTransport(){return!1}}var Ie;(function(l){l.RequestMessage="REQUEST",l.ResponseMessage="RESPONSE",l.ErrorMessage="ERROR",l.EventMessage="EVENT",l.UnknownMessage="UNKNOWN"})(Ie||(Ie={}));class hm{type;payload}const $v=(l,i,s,r)=>{const c=new hm;return c.type=r||Ie.UnknownMessage,c.payload=l,c};class dm extends ar{name;constructor(i,s){super(i),this.name=i,i||(this.name=dt()),s&&s.forEach(r=>{r.pipe(this)})}pipe(i){const s=dt();return this.destinations.push({id:s,target:i}),()=>{this.destinations=this.destinations.filter(r=>r.id!==s)}}receive(i,s,r){return Promise.resolve()}async send(i,s,r){await Promise.all(this.destinations.map(async c=>await c.target.receive(i,s,r)))}async sendPayload(i,s,r,c){const f=$v(i,this.name,c,s);await this.send(f,r,c)}}const Xv=l=>l==="on"||l==="addListener"||l==="prependListener"||l==="once"||l==="prependOnceListener"||l==="off"||l==="removeListener"||l==="emit"||l==="removeListener"||l==="removeAllListeners"||l==="setMaxListeners"||l==="getMaxListeners";var Je;(function(l){l.CallInstanceMethod="POST",l.success="SUCCESS",l.error="ERROR",l.event="EVENT"})(Je||(Je={}));const Xl={query:0,"idempotent-command":1,"non-repeatable-command":2},zu=l=>{if(l instanceof Error)return{name:l.name,message:l.message,stack:l.stack};if(l&&typeof l=="object"){const i=l;if(typeof i.message=="string")return{name:typeof i.name=="string"?i.name:"Error",message:i.message}}return{name:"Error",message:String(l)}},Vv=l=>"code"in l,Lu=new WeakMap,Hu=new WeakMap,Yu=new WeakMap,$u=new WeakMap,Gv=(l,i,s,r,c)=>{let f=Lu.get(l);if(f||Lu.set(l,f=new Set),f.add(i),r){let m=Yu.get(l);m||Yu.set(l,m=new Set),m.add(i)}if(c){let m=$u.get(l);m||$u.set(l,m=new Set),m.add(i)}if(!s)return;let p=Hu.get(l);p||Hu.set(l,p=new Map),p.set(i,s)},zp=(l,i)=>{if(l.static)throw new Error("@rpc: static methods cannot be exposed");if(l.private)throw new Error("@rpc: private methods cannot be exposed");l.addInitializer(function(){Gv(this.constructor,String(l.name),i.semantics,i.conflate,i.requiresAuthority)})};function xs(l,i){if(typeof l=="function"&&i)return zp(i,{});const s=l;return(r,c)=>zp(c,s)}const pm=new WeakMap,mm=(l,i={})=>(s,r)=>(pm.set(s,{name:l,version:i.version,execution:i.execution,mailbox:i.mailbox}),s),Qv=l=>{for(let i=l.constructor;i;i=Object.getPrototypeOf(i)){const s=pm.get(i);if(s)return s}},Kv=l=>{const i=new Set;for(let s=l.constructor;s;s=Object.getPrototypeOf(s))for(const r of Lu.get(s)??[])i.add(r);return i.size?i:void 0},Zv=l=>{const i=new Map;for(let s=l.constructor;s;s=Object.getPrototypeOf(s))for(const[r,c]of Hu.get(s)??[])i.has(r)||i.set(r,c);return i},Jv=l=>{const i=new Set;for(let s=l.constructor;s;s=Object.getPrototypeOf(s))for(const r of Yu.get(s)??[])i.add(r);return i},Fv=l=>{const i=new Set;for(let s=l.constructor;s;s=Object.getPrototypeOf(s))for(const r of $u.get(s)??[])i.add(r);return i},In="$snapshot",ym=new WeakMap,Zt=l=>{const i=ym.get(l);if(!i)throw new Error("not an RpcComponent - components are constructed through the RpcComponent base class");return i},Vl=l=>Object.freeze({...l}),jp=(l,i)=>{const s=Zt(l),r=i.props??s.props,c=i.state??s.state,f=s.validate?.(r,c);if(f)throw new Error(`component snapshot rejected: ${f}`);s.props=r,s.state=c,s.revision++,s.notify?.()};class fa extends xi.EventEmitter{constructor(i,s){super(),ym.set(this,{epoch:dt(),revision:0,props:Vl(i),state:Vl(s),authority:Object.freeze({generation:0})})}get props(){return Zt(this).props}get state(){return Zt(this).state}setState=i=>{const s=this.state,r=typeof i=="function"?i(s):i;return jp(this,{state:Vl({...s,...r})}),this.state};replaceState=i=>{const s=typeof i=="function"?i(this.state):i;return jp(this,{state:Vl(s)}),this.state}}const Iu=l=>{const i=Zt(l);return{epoch:i.epoch,revision:i.revision,props:i.props,state:i.state,authority:i.authority}},Wv=l=>Zt(l).authority,Iv=6e4,Pu=(l,i,s)=>{const r=Zt(l),c=r.authority.holder;r.expiryTimer&&clearTimeout(r.expiryTimer),r.expiryTimer=void 0,r.authority=Object.freeze(i),r.revision++,i.expiresAt!==void 0&&(r.expiryTimer=setTimeout(()=>{r.expiryTimer=void 0,!(r.authority.holder!==i.holder||r.authority.generation!==i.generation)&&Pu(l,{generation:r.authority.generation+1},"expired")},i.expiresAt-Date.now()),r.expiryTimer.unref?.()),l instanceof xi.EventEmitter&&l.emit("authorityChanged",{reason:s,authority:r.authority,previousHolder:c}),r.notify?.()},Pv=(l,i,s,r)=>{const f=Zt(l).authority,p=Date.now(),m=f.holder!==void 0&&(f.expiresAt??0)>p;if(m&&f.holder!==i&&!r)return{granted:!1,holder:f.holder,expiresAt:f.expiresAt};const v=m&&f.holder===i;return Pu(l,{holder:i,expiresAt:p+s,generation:v?f.generation:f.generation+1},v?"renewed":m?"taken":"acquired"),{granted:!0,authority:Zt(l).authority}},e0=(l,i)=>{const s=Zt(l);return s.authority.holder!==i?"ok - was not holding":(Pu(l,{generation:s.authority.generation+1},"released"),"ok")},t0=1048576,n0=(l,i)=>{Zt(l).validate=i},i0=(l,i,s,r)=>{const c=Zt(l),f=i.minPublishIntervalMs??0,p=i.maxSnapshotBytes??t0;let m=!1,v=0,x;const N=()=>{v=Date.now();const w=Iu(l),q=JSON.stringify(w).length;if(q>p){r?.log("Error","component snapshot not published: {estimated} bytes exceeds the {maxBytes} byte bound",{estimated:q,maxBytes:p});return}s()};c.notify=()=>{m||(m=!0,queueMicrotask(()=>{m=!1;const w=v+f-Date.now();if(w<=0)return N();x||(x=setTimeout(()=>{x=void 0,N()},w),x.unref?.())}))}},a0=1,Rp=32,Gt=l=>l===null?"null":Array.isArray(l)?"array":l instanceof Uint8Array?"bytes":l instanceof Date?"date":typeof l,bs=l=>{switch(l.kind){case"literal":return JSON.stringify(l.value);case"array":return`${bs(l.items)}[]`;case"tuple":return`[${l.items.map(bs).join(", ")}]`;case"union":return l.options.map(bs).join(" | ");case"ref":return l.name;case"object":return"object";case"record":return`{ [key: string]: ${bs(l.values)} }`;default:return l.kind}},Mp=l=>typeof l=="object"&&l!==null&&!Array.isArray(l)&&!(l instanceof Uint8Array)&&!(l instanceof Date),en=(l,i,s={},r="",c=0)=>{if(c>Rp)return`${r||"value"}: nested deeper than ${Rp} levels`;const f=r||"value";switch(i.kind){case"any":return;case"null":return l===null?void 0:`${f}: expected null, got ${Gt(l)}`;case"boolean":return typeof l=="boolean"?void 0:`${f}: expected boolean, got ${Gt(l)}`;case"number":return typeof l!="number"||Number.isNaN(l)?`${f}: expected number, got ${Gt(l)}`:i.integer&&!Number.isInteger(l)?`${f}: expected an integer, got ${l}`:i.min!==void 0&&l<i.min?`${f}: ${l} is below the minimum ${i.min}`:i.max!==void 0&&l>i.max?`${f}: ${l} is above the maximum ${i.max}`:void 0;case"string":return typeof l!="string"?`${f}: expected string, got ${Gt(l)}`:i.minLength!==void 0&&l.length<i.minLength?`${f}: shorter than ${i.minLength} characters`:i.maxLength!==void 0&&l.length>i.maxLength?`${f}: longer than ${i.maxLength} characters`:i.pattern!==void 0&&!new RegExp(i.pattern).test(l)?`${f}: does not match ${i.pattern}`:void 0;case"bytes":return l instanceof Uint8Array?i.maxBytes!==void 0&&l.length>i.maxBytes?`${f}: longer than ${i.maxBytes} bytes`:void 0:`${f}: expected bytes, got ${Gt(l)}`;case"date":return l instanceof Date&&!Number.isNaN(l.getTime())?void 0:`${f}: expected a date, got ${Gt(l)}`;case"literal":return l===i.value?void 0:`${f}: expected ${JSON.stringify(i.value)}`;case"array":{if(!Array.isArray(l))return`${f}: expected an array, got ${Gt(l)}`;if(i.maxItems!==void 0&&l.length>i.maxItems)return`${f}: more than ${i.maxItems} items`;for(let p=0;p<l.length;p++){const m=en(l[p],i.items,s,`${f}[${p}]`,c+1);if(m)return m}return}case"tuple":{if(!Array.isArray(l))return`${f}: expected a tuple, got ${Gt(l)}`;if(l.length!==i.items.length)return`${f}: expected ${i.items.length} elements, got ${l.length}`;for(let p=0;p<i.items.length;p++){const m=en(l[p],i.items[p],s,`${f}[${p}]`,c+1);if(m)return m}return}case"object":{if(!Mp(l))return`${f}: expected an object, got ${Gt(l)}`;const p=l;for(const[m,v]of Object.entries(i.fields)){if(!(p[m]!==void 0)){if(v.optional)continue;return`${f}.${m}: missing`}const N=en(p[m],v.type,s,`${f}.${m}`,c+1);if(N)return N}if(!i.additional){const m=Object.keys(p).find(v=>!(v in i.fields));if(m!==void 0)return`${f}.${m}: not part of this type`}return}case"record":{if(!Mp(l))return`${f}: expected an object, got ${Gt(l)}`;const p=Object.keys(l);if(i.maxEntries!==void 0&&p.length>i.maxEntries)return`${f}: more than ${i.maxEntries} entries`;const m=i.keyPattern===void 0?void 0:new RegExp(i.keyPattern);for(const v of p){if(m&&!m.test(v))return`${f}.${v}: key does not match ${i.keyPattern}`;const x=en(l[v],i.values,s,`${f}.${v}`,c+1);if(x)return x}return}case"union":{for(const p of i.options)if(!en(l,p,s,f,c+1))return;return`${f}: expected ${bs(i)}, got ${Gt(l)}`}case"ref":{const p=s[i.name];return p?en(l,p,s,f,c+1):`${f}: unknown type '${i.name}'`}}return`${f}: unknown type kind '${i.kind}'`},s0=(l,i,s={})=>{const r=i.params.filter((c,f)=>!l0(i.params[f])).length;if(l.length<r)return`expected at least ${r} argument${r===1?"":"s"}, got ${l.length}`;if(l.length>i.params.length&&!i.rest)return`expected at most ${i.params.length} arguments, got ${l.length}`;for(let c=0;c<l.length;c++){const f=c<i.params.length?i.params[c]:i.rest,p=en(l[c],f,s,`argument ${c}`);if(p)return p}},l0=l=>l.kind==="any"||l.kind==="union"&&l.options.some(i=>i.kind==="literal"&&i.value===null),Xu=(l,i)=>l.kind==="ref"?Xu(i?.[l.name]??{kind:"any"},i):l,Up=(l,i)=>!(i.integer&&!l.integer||i.min!==void 0&&(l.min===void 0||l.min<i.min)||i.max!==void 0&&(l.max===void 0||l.max>i.max)),Kt=(l,i,s={},r=0,c=new Set)=>{if(r>64)return!1;if(l.kind==="ref"&&i.kind==="ref"){const m=`${l.name} <: ${i.name}`;if(c.has(m))return!0;c.add(m)}const f=Xu(l,s),p=Xu(i,s);if(p.kind==="any")return!0;if(f.kind==="any")return!1;if(f.kind==="union")return f.options.every(m=>Kt(m,p,s,r+1,c));if(p.kind==="union")return p.options.some(m=>Kt(f,m,s,r+1,c));if(f.kind==="literal")return p.kind==="literal"?f.value===p.value:(f.value===null?"null":typeof f.value)!==p.kind?!1:p.kind==="number"&&typeof f.value=="number"?Up({min:f.value,max:f.value,integer:Number.isInteger(f.value)},p):!0;if(f.kind!==p.kind)return!1;switch(f.kind){case"null":case"boolean":case"date":return!0;case"number":return Up(f,p);case"string":{const m=p;return!(m.minLength!==void 0&&(f.minLength===void 0||f.minLength<m.minLength)||m.maxLength!==void 0&&(f.maxLength===void 0||f.maxLength>m.maxLength)||m.pattern!==void 0&&m.pattern!==f.pattern)}case"bytes":{const m=p;return m.maxBytes===void 0||f.maxBytes!==void 0&&f.maxBytes<=m.maxBytes}case"array":{const m=p;return m.maxItems!==void 0&&(f.maxItems===void 0||f.maxItems>m.maxItems)?!1:Kt(f.items,m.items,s,r+1,c)}case"tuple":{const m=p;return f.items.length!==m.items.length?!1:f.items.every((v,x)=>Kt(v,m.items[x],s,r+1,c))}case"record":{const m=p;return m.maxEntries!==void 0&&(f.maxEntries===void 0||f.maxEntries>m.maxEntries)||m.keyPattern!==void 0&&m.keyPattern!==f.keyPattern?!1:Kt(f.values,m.values,s,r+1,c)}case"object":{const m=p;for(const[v,x]of Object.entries(m.fields)){const N=f.fields[v];if(!N){if(x.optional)continue;return!1}if(!x.optional&&N.optional||!Kt(N.type,x.type,s,r+1,c))return!1}if(!m.additional){for(const v of Object.keys(f.fields))if(!(v in m.fields))return!1}return!0}default:return!1}},Gl=l=>l.params.filter(i=>!(i.kind==="any"||i.kind==="union"&&i.options.some(s=>s.kind==="literal"&&s.value===null))).length,r0=(l,i,s,r)=>{const c=[];!s.rest&&s.params.length<i.params.length&&c.push({where:l,reason:`takes at most ${s.params.length} arguments, but a caller may send ${i.params.length}`}),Gl(s)>Gl(i)&&c.push({where:l,reason:`requires ${Gl(s)} arguments, but a caller may send as few as ${Gl(i)}`});for(let m=0;m<i.params.length;m++){const v=m<s.params.length?s.params[m]:s.rest;v&&(Kt(i.params[m],v,r)||c.push({where:`${l} argument ${m}`,reason:"narrowed, so a value the caller may send is no longer accepted"}))}i.returns&&s.returns&&!Kt(s.returns,i.returns,r)&&c.push({where:`${l} return`,reason:"widened, so a value this contract may return is not one the caller expects"});const f=i.semantics,p=s.semantics;return f&&p&&Xl[p]>Xl[f]&&c.push({where:l,reason:`is now ${p} where the caller was told ${f}, so a retry the caller may already make is no longer safe`}),f&&!p&&Xl[f]<Xl["non-repeatable-command"]&&c.push({where:l,reason:`no longer declares that it is ${f}, so a caller relying on that promise has nothing to rely on`}),c},o0=(l,i,s={})=>{const r=[];for(const[c,f]of Object.entries(l.methods)){const p=i.methods[c];if(!p){r.push({where:c,reason:"no longer exists"});continue}r.push(...r0(c,f,p,s))}for(const[c,f]of Object.entries(l.events??{})){const p=i.events?.[c];if(!p){r.push({where:`event ${c}`,reason:"is no longer emitted, so a subscription to it would never fire"});continue}for(let m=0;m<p.params.length;m++){const v=f.params[m];if(!v){r.push({where:`event ${c} argument ${m}`,reason:"is emitted but the caller does not expect it"});continue}Kt(p.params[m],v,s)||r.push({where:`event ${c} argument ${m}`,reason:"widened, so a value this contract may emit is not one the caller expects"})}}for(const c of l.capabilities??[])i.capabilities?.includes(c)||r.push({where:`capability ${c}`,reason:"is no longer declared, so whatever found this peer by it will stop finding it"});return l.component&&(i.component?(Kt(i.component.props,l.component.props,s)||r.push({where:"component props",reason:"widened, so a snapshot this contract may serve is not one the observer expects"}),Kt(i.component.state,l.component.state,s)||r.push({where:"component state",reason:"widened, so a snapshot this contract may serve is not one the observer expects"})):r.push({where:"component",reason:"is no longer served, so an observer would wait forever for a snapshot"})),r},u0=(l,i,s,r)=>r.length?`${l}@${i} is not compatible with ${l}@${s??"current"}: `+r.map(c=>`${c.where} ${c.reason}`).join("; "):void 0;class c0{rpcServer;instance;event;target;instanceName;listener=(...i)=>{this.rpcServer.sendEvent(this.target,this.event,i,this.instanceName).catch(s=>this.rpcServer.emit("deliveryError",{target:this.target,event:this.event,path:this.instanceName,error:s}))};constructor(i,s,r,c,f){this.rpcServer=i,this.instance=s,this.event=r,this.target=c,this.instanceName=f}attach(){this.instance.on(this.event,this.listener)}detach(){this.instance.removeListener(this.event,this.listener)}}const Cp=(l,i,s)=>`${l}\0${i}\0${s}`,Dp=l=>l.type===Je.CallInstanceMethod,f0=100,h0=new Set(["Unauthorized","Forbidden","InvalidParams","IncompatibleVersion","ClassNotFound","MethodNotFound","TransportError","Timeout","UnknownOutcome"]),d0=l=>{const i=l?.code;return typeof i=="string"&&h0.has(i)?i:"Exception"};class p0 extends dm{manageRpc=new m0;eventProxies=new Map;authorize;resolveIdentity;requireIdentity=!1;deduplicateRequests=!0;maxTrackedRequests=1e3;refuseExpiredCalls=!0;idempotency;schema;validation="described";hostTopology;allowTopologyMutation=!1;validateResults=!1;unknownVersion="allow";compatibility=new Map;recentResponses=new Map;inFlightRequests=new Set;constructor(i,s){super(i,s),this.manageRpc.logger?.log("Information","RpcServerHandler {name} starting",{name:i})}async checkAccess(i,s,r){const c=this.resolveIdentity?.(s);if(this.requireIdentity&&!c)return"Unauthorized";if(!this.authorize)return;const f={identity:c,source:s,instanceName:i.path,method:i.method,params:i.params,subscription:r};try{return await this.authorize(f)?void 0:"Forbidden"}catch{return"Forbidden"}}checkParams(i){if(!this.schema||this.validation==="off")return;const s=this.schema.namespaces[i.path];if(!s)return this.validation==="required"?`${i.path} is not described by the schema`:void 0;if(s.validate===!1)return;const r=s.methods[i.method];if(!r)return this.validation==="required"?`${i.path}.${i.method} is not described by the schema`:void 0;const c=s0(i.params,r,this.schema.types);if(c)return s.version?`${c} (this server serves ${i.path}@${s.version})`:c}checkVersion(i){if(!this.schema||this.validation==="off"||!i.version)return;const s=this.schema.namespaces[i.path];if(!s||i.version===s.version)return;const r=`${i.path}@${i.version}`;if(this.compatibility.has(r))return this.compatibility.get(r);const c=s.history?.[i.version];let f;return c?f=u0(i.path,i.version,s.version,o0(c,s,this.schema.types)):f=this.unknownVersion==="reject"?`${i.path}@${i.version} is unknown to this server, which serves ${i.path}@${s.version??"an unversioned contract"}`:void 0,this.compatibility.set(r,f),f}async receive(i,s,r){this.manageRpc.logger?.log("Debug","RpcServerHandler {name} received message type {type} from {source} to {target}: {message}",{name:this.name,type:i.type,source:s,target:r,message:JSON.stringify(i)}),i.payload&&this.receivePayload(i.payload,s,r).catch(c=>this.emit("handlerError",{source:s,target:r,error:c}))}respond(i,s,r,c){if(this.deduplicateRequests)for(this.inFlightRequests.delete(i),this.recentResponses.set(i,r);this.recentResponses.size>this.maxTrackedRequests;){const f=this.recentResponses.keys().next();if(f.done)break;this.recentResponses.delete(f.value)}return this.sendPayload(r,c,this.name,s)}async receivePayload(i,s,r){try{await this.dispatch(i,s,r)}catch(c){await this.reportDispatchFailure(i,s,c)}}async reportDispatchFailure(i,s,r){this.emit("handlerError",{source:s,payload:i,error:r});const c=i.id;if(!(!Dp(i)||!c)){this.deduplicateRequests&&this.inFlightRequests.delete(c);try{await this.sendPayload({type:Je.error,id:c,code:"Exception",error:zu(r)},Ie.ErrorMessage,this.name,s)}catch{}}}async dispatch(i,s,r){const c=Date.now();if(Dp(i)){if(this.deduplicateRequests){const Y=this.recentResponses.get(i.id);if(Y){const ee=Y.code?Ie.ErrorMessage:Ie.ResponseMessage;await this.sendPayload(Y,ee,this.name,s);return}if(this.inFlightRequests.has(i.id))return;this.inFlightRequests.add(i.id)}const f=this.manageRpc.findNameSpaceMethodMap(i.path),p=f?.get(i.method);if(!p){const Y=i.path,ee=i.params[0],Z=this.manageRpc.exposedNameSpaceInstances[Y];if(i.method==="on"&&ee===In&&Z&&!(Z instanceof fa)){await this.sendError(i.id,s,"ClassNotFound",`${i.path} is not an observable component`);return}if(i.method==="on"&&Z instanceof Bu){const I=await this.checkAccess(i,s,!0);if(I){await this.sendError(i.id,s,I,`not permitted to subscribe to ${i.path}.${ee}`);return}const U=Cp(Y,ee,s);let K=this.eventProxies.get(U),ae="ok - already exists";K||(K=new c0(this,Z,ee,s,Y),this.eventProxies.set(U,K),K.attach(),ae="ok"),ee===In&&await this.sendEvent(s,In,[Iu(Z)],Y),await this.respond(i.id,s,{type:Je.success,result:ae,id:i.id},Ie.ResponseMessage)}else if((i.method==="off"||i.method==="removeListener")&&Z instanceof Bu){const I=Cp(Y,ee,s),U=this.eventProxies.get(I);U&&(U.detach(),this.eventProxies.delete(I)),await this.respond(i.id,s,{type:Je.success,result:U?"ok":"ok - was not subscribed",id:i.id},Ie.ResponseMessage)}else if((i.method==="$acquire"||i.method==="$release")&&Z){if(!(Z instanceof fa)){await this.sendError(i.id,s,"ClassNotFound",`${i.path} is not an observable component, so it has no authority to hold`);return}const I=await this.checkAccess(i,s,!1);if(I){await this.sendError(i.id,s,I,`not permitted to call ${i.path}.${i.method}`);return}if(i.method==="$acquire"){const U=i.params[0]??Iv;if(typeof U!="number"||!Number.isFinite(U)||U<=0){await this.sendError(i.id,s,"InvalidParams","$acquire: the lease must expire, so its ttl is a positive number of milliseconds");return}const K=i.params[1]?.take===!0,ae=Pv(Z,s,U,K);if(!ae.granted){await this.sendError(i.id,s,"NotInControl",`${i.path} is controlled by ${ae.holder} until ${new Date(ae.expiresAt).toISOString()}`);return}await this.respond(i.id,s,{type:Je.success,result:ae.authority,id:i.id},Ie.ResponseMessage)}else{const U=e0(Z,s);await this.respond(i.id,s,{type:Je.success,result:U,id:i.id},Ie.ResponseMessage)}}else await this.sendError(i.id,s,f?"MethodNotFound":"ClassNotFound",`${i.path}.${i.method} is not exposed`);return}const m=await this.checkAccess(i,s,!1);if(m){await this.sendError(i.id,s,m,`not permitted to call ${i.path}.${i.method}`);return}const v=this.checkVersion(i);if(v){await this.sendError(i.id,s,"IncompatibleVersion",v);return}const x=this.checkParams(i);if(x){await this.sendError(i.id,s,"InvalidParams",x);return}const N=this.authorityRefusal(i,s);if(N){await this.sendError(i.id,s,"NotInControl",N);return}const w=this.fenceRefusal(i);if(w){await this.sendError(i.id,s,"OwnershipChanged",w);return}const q=this.executionKey(i,s);q===void 0?await this.invoke(i,s,c,p):await this.enqueue(q,i,s,c,p)}}async enqueue(i,s,r,c,f){const p=this.manageRpc.exposedConflation[s.path]?.has(s.method)?`${i}\0${s.method}`:void 0;let m=!1;if(p){const q=this.conflatable.get(p);q&&(q.supersede(),m=!0)}const v=this.executionWaiting.get(i)??0,x=this.manageRpc.exposedMailbox[s.path]??f0;if(!m&&v>=x){await this.sendError(s.id,r,"Busy",`${s.path}.${s.method} was not queued: ${v} calls are already waiting on this instance`);return}let N=!1;const w=p?{supersede:()=>{N=!0,this.sendError(s.id,r,"Superseded",`${s.path}.${s.method} was superseded by a newer call before it ran`).catch(()=>{})}}:void 0;p&&w&&this.conflatable.set(p,w),this.executionWaiting.set(i,v+1),await this.serialise(i,async()=>{const q=this.executionWaiting.get(i)??1;q<=1?this.executionWaiting.delete(i):this.executionWaiting.set(i,q-1),p&&this.conflatable.get(p)===w&&this.conflatable.delete(p),!N&&await this.invoke(s,r,c,f)})}executionWaiting=new Map;conflatable=new Map;async invoke(i,s,r,c){const f=this.expiredBy(i,r);if(f!==void 0){await this.sendError(i.id,s,"Timeout",`${i.path}.${i.method} was not run: its caller stopped waiting ${f} ms ago`);return}const p=this.authorityRefusal(i,s);if(p){await this.sendError(i.id,s,"NotInControl",p);return}const m=this.fenceRefusal(i);if(m){await this.sendError(i.id,s,"OwnershipChanged",m);return}const v=this.invocationFor(i,s);let x=!1;if(v){let q;try{q=await this.idempotency.begin(v)}catch(Y){await this.sendError(i.id,s,"UnknownOutcome",`${i.path}.${i.method} was not run: its idempotency store could not be reached (${Y instanceof Error?Y.message:String(Y)})`);return}if(q==="in-progress"){this.inFlightRequests.delete(i.id);return}if(q!=="acquired"){const Y=Vv(q)?{type:Je.error,id:i.id,code:q.code,error:q.error}:{type:Je.success,id:i.id,result:q.result};await this.respond(i.id,s,Y,Y.type===Je.error?Ie.ErrorMessage:Ie.ResponseMessage);return}x=!0}const N=[...i.params];let w;try{w=await c(...N);const q=this.checkResult(i,w);if(q){await this.settle(v,x,{code:"InvalidParams",error:{name:"RpcError",message:q}}),await this.sendError(i.id,s,"InvalidParams",q);return}await this.settle(v,x,{result:w}),await this.respond(i.id,s,{type:Je.success,id:i.id,result:w},Ie.ResponseMessage)}catch(q){const Y=d0(q);await this.settle(v,x,{code:Y,error:zu(q)}),await this.respond(i.id,s,{type:Je.error,id:i.id,code:Y,error:zu(q)},Ie.ErrorMessage)}}async settle(i,s,r){if(!(!i||!s))try{await this.idempotency.complete(i,r)}catch(c){this.emit("idempotencyError",{invocation:i,outcome:r,error:c})}}invocationFor(i,s){if(!(!this.idempotency||this.semanticsOf(i)!=="non-repeatable-command"))return{idempotencyKey:i.idempotencyKey??i.id,requestId:i.id,scope:`${i.path}.${i.method}`,source:s,...i.ttl!==void 0?{ttl:i.ttl}:{}}}authorityRefusal(i,s){if(!this.manageRpc.exposedAuthority[i.path]?.has(i.method))return;const r=this.manageRpc.exposedNameSpaceInstances[i.path];if(!(r instanceof fa))return;const c=Wv(r),f=c.holder!==void 0&&(c.expiresAt??0)>Date.now();if(!(f&&c.holder===s))return f?`${i.path}.${i.method} requires authority: ${c.holder} is in control`:`${i.path}.${i.method} requires authority: nobody is in control - $acquire it first`}fenceRefusal(i){const s=i.fence;if(!s)return;const r=this.hostTopology?.get(i.path);if(!r)return`${i.path} has no topology record here to check the owner fence against`;if(r.ownerEpoch!==s.ownerEpoch)return`${i.path} changed owner generation while this call was on its way - read the topology again and decide again`}semanticsOf(i){return this.manageRpc.exposedSemantics[i.path]?.get(i.method)??this.schema?.namespaces[i.path]?.methods[i.method]?.semantics}executionKey(i,s){const r=this.manageRpc.exposedExecution[i.path];if(!r){const f=this.semanticsOf(i);return f==="idempotent-command"||f==="non-repeatable-command"?i.path:void 0}if(r==="parallel")return;if(r==="serial")return i.path;const c={identity:this.resolveIdentity?.(s),source:s,instanceName:i.path,method:i.method,params:i.params,subscription:!1};try{return`${i.path}\0${r(c)}`}catch{return i.path}}executionQueues=new Map;async serialise(i,s){const r=this.executionQueues.get(i)??Promise.resolve();let c;const f=new Promise(m=>c=m),p=r.then(()=>f);this.executionQueues.set(i,p),await r;try{return await s()}finally{c(),this.executionQueues.get(i)===p&&this.executionQueues.delete(i)}}expiredBy(i,s){if(!this.refuseExpiredCalls||i.ttl===void 0||!Number.isFinite(i.ttl)||i.ttl<0)return;const r=Date.now()-(s+i.ttl);return r>0?r:void 0}checkResult(i,s){if(!this.validateResults||!this.schema)return;const r=this.schema.namespaces[i.path]?.methods[i.method]?.returns;if(!r)return;const c=en(s,r,this.schema.types,"result");return c?`${i.path}.${i.method} returned a value its own schema forbids: ${c}`:void 0}sendError(i,s,r,c){return this.respond(i,s,{type:Je.error,id:i,code:r,error:{name:"RpcError",message:c}},Ie.ErrorMessage)}removePeer(i){for(const[s,r]of this.eventProxies)r.target===i&&(r.detach(),this.eventProxies.delete(s))}async sendEvent(i,s,r,c){return await this.sendPayload({type:Je.event,event:s,params:r,path:c},Ie.EventMessage,this.name,i)}}class m0{logger;exposedNameSpaceMethodMaps={};exposedNameSpaceInstances={};exposedClasses={};createdInstances=new Map;exposedSemantics={};exposedExecution={};exposedConflation={};exposedAuthority={};exposedMailbox={};componentContractFor;constructor(i){this.logger=i}exposeManagement(){this.getNameSpaceMethodMap("manageRpc").set("createRpcInstance",(...s)=>this.createRpcInstance(s[0],s[1],...s.slice(2))),this.exposedNameSpaceInstances.manageRpc=this}getNameSpaceMethodMap(i){let s=this.exposedNameSpaceMethodMaps[i];return s||(s=new Map,this.exposedNameSpaceMethodMaps[i]=s),s}findNameSpaceMethodMap(i){return this.exposedNameSpaceMethodMaps[i]}requireExplicitExposure=!1;exposeClassInstance(i,s,r){const c=Qv(i),f=s??c?.name;if(!f)throw new Error(`exposeClassInstance: ${i.constructor.name} declares no @rpcNamespace, so a name is required`);const p=typeof r=="number"?{prototypeSteps:r}:r??{};let m=p.prototypeSteps;const v=Kv(i);if(!v&&this.requireExplicitExposure)throw new Error(`exposeClassInstance: ${i.constructor.name} marks no @rpc methods and requireExplicitExposure is on`);this.exposedNameSpaceInstances[f]=i;const x=p.execution??c?.execution;x&&(this.exposedExecution[f]=x);const N=Zv(i);N.size&&(this.exposedSemantics[f]=N);const w=Jv(i);if(w.size){for(const U of w)if(N.get(U)!=="idempotent-command")throw new Error(`exposeClassInstance: ${f}.${U} declares conflate without 'idempotent-command' semantics - only a command that is free to repeat is free to skip`);this.exposedConflation[f]=w}const q=Fv(i);if(q.size){if(!(i instanceof fa))throw new Error(`exposeClassInstance: ${f}.${[...q][0]} declares requiresAuthority, but ${i.constructor.name} is not an RpcComponent - there is no authority to check against`);this.exposedAuthority[f]=q}const Y=p.mailbox??c?.mailbox;if(Y!==void 0){if(!Number.isInteger(Y)||Y<1)throw new Error(`exposeClassInstance: ${f} declares a mailbox of ${Y}; the bound is a positive count of waiting calls`);this.exposedMailbox[f]=Y}if(i instanceof fa){const U=this.componentContractFor?.(f);U&&n0(i,(K,ae)=>en(K,U.component.props,U.types,"props")??en(ae,U.component.state,U.types,"state")),i0(i,p.component??{},()=>{i.emit(In,Iu(i))},this.logger)}let ee=Object.getOwnPropertyNames(i.constructor.prototype),Z=Object.getPrototypeOf(i.constructor.prototype);for(;Z&&Z.constructor.name!=="Object"&&Z.constructor.name!=="EventEmitter";){const U=Object.getOwnPropertyNames(Z);if(ee=ee.concat(U),Z=Object.getPrototypeOf(Z),m&&m--===0)break}const I=this.getNameSpaceMethodMap(f);for(const U of ee)U==="constructor"||typeof i[U]!="function"||v&&!v.has(U)||I.set(U,i[U].bind(i))}exposeClass(i,s){let r=i.name;s&&(r=s),this.exposedClasses[r]=i}exposeObject(i,s){this.exposedNameSpaceInstances[s]=i;const r=Object.getOwnPropertyNames(i);for(const c of r)c!=="constructor"&&typeof i[c]=="function"&&this.getNameSpaceMethodMap(s).set(c,i[c])}expose(i,s){this.getNameSpaceMethodMap(i).set(i,s)}async createRpcInstance(i,s,...r){let c="";const f=this.exposedClasses[i];if(f){const p=s||dt(),m=new f(...r);this.createdInstances.set(p,m),this.exposeClassInstance(m,p),c=p}return c}}const gm=1e4,ju=(l,i,s)=>`${l}\0${i}\0${s}`;class ps extends Error{code;remoteStack;constructor(i,s,r){super(s?`${i}: ${s}`:i),this.code=i,this.remoteStack=r,this.name="RpcError"}}function y0(l){return l.type===Je.success}function g0(l){return l.type===Je.event}function v0(l){return l.type===Je.error}class b0 extends dm{callTimeout;responsePromiseMap=new Map;responseTimeoutMap=new Map;schemaVersions;subscriptions=new Map;eventEmitter=new xi.EventEmitter;constructor(i,s,r=gm){super(i,s),this.callTimeout=r}async receive(i,s,r){const c=i.payload;if(c){if(g0(c)){this.deliverEvent(c,s);return}if(y0(c)){this.takePending(c.id)?.resolve(c.result);return}v0(c)&&this.takePending(c.id)?.reject(new ps(c.code,c.error?.message,c.error?.stack))}}deliverEvent(i,s){const r=this.eventEmitter;if(r instanceof xi.EventEmitter){const c=s??"",f=i.path?[ju(c,i.path,i.event),ju("",i.path,i.event)]:r.eventNames().filter(p=>typeof p=="string").filter(p=>{const[m,,v]=p.split("\0");return v===i.event&&(m===c||m==="")});for(const p of new Set(f))this.deliverSafely(()=>r.emit(p,...i.params),i)}this.deliverSafely(()=>this.emit(i.event,i.params),i)}deliverSafely(i,s){try{i()}catch(r){this.emit("subscriberError",{event:s.event,path:s.path,error:r})}}async resubscribe(){const i=[...this.subscriptions.values()],s=await Promise.allSettled(i.map(c=>this.call(c.remote,c.instanceName,"on",c.event))),r=s.flatMap((c,f)=>c.status==="rejected"?[{peer:i[f].remote,namespace:i[f].instanceName,event:i[f].event,error:c.reason}]:[]);return r.length&&this.emit("resubscribeFailed",r),s.length-r.length}failPendingCalls(i){for(const s of[...this.responsePromiseMap.keys()]){const r=this.sentRequests.has(s);this.sentRequests.delete(s),this.takePending(s)?.reject(r?new ps("UnknownOutcome",`${i}, after the request was sent - it may or may not have run`):new ps("TransportError",`${i}, before the request was sent`))}}sentRequests=new Set;takePending(i){if(i===void 0)return;const s=this.responsePromiseMap.get(i);this.responsePromiseMap.delete(i),this.sentRequests.delete(i);const r=this.responseTimeoutMap.get(i);return r!==void 0&&(clearTimeout(r),this.responseTimeoutMap.delete(i)),s}call(i,s,r,...c){return this.callWith({},i,s,r,...c)}callWith(i,s,r,c,...f){const p=i.timeoutMs??this.callTimeout;if(!Number.isInteger(p)||p<0)return Promise.reject(new Error(`${r}.${c}: timeoutMs must be a finite non-negative integer, not ${String(i.timeoutMs)}`));const m={id:dt(),type:Je.CallInstanceMethod,path:r,method:c,params:f,version:this.schemaVersions?.[r],ttl:p>0?p:void 0,...i.idempotencyKey?{idempotencyKey:i.idempotencyKey}:{},...i.ownerEpoch?{fence:{ownerEpoch:i.ownerEpoch}}:{}};return new Promise((v,x)=>{this.responsePromiseMap.set(m.id,{resolve:v,reject:x}),p>0&&this.responseTimeoutMap.set(m.id,setTimeout(()=>{this.takePending(m.id)?.reject(new ps("Timeout",`no response to ${r}.${c} within ${p} ms`))},p)),this.sendPayload(m,Ie.RequestMessage,this.name,s).then(()=>{this.responsePromiseMap.has(m.id)&&this.sentRequests.add(m.id)},N=>{this.takePending(m.id)?.reject(new ps("TransportError",N instanceof Error?N.message:String(N)))})})}proxy(i,s,r={}){const c={};return new Proxy(c,{get:(f,p)=>{let m;if(typeof p=="string"){if(f[p])return f[p];if(p==="then")return;p==="$with"?f[p]=v=>this.proxy(i,s,{...r,...v}):Xv(p)?f[p]=(...v)=>{const x=v[0];if(typeof x=="string"){const N=ju(s??"",i,x);if(this.eventEmitter[p](N,...v.slice(1)),p==="on")this.subscriptions.set(N,{remote:s,instanceName:i,event:x});else if(p==="off"||p==="removeListener"){if(this.eventEmitter.listenerCount(N)>0)return Promise.resolve("ok - other local handlers remain");this.subscriptions.delete(N)}}else this.eventEmitter[p](...v);return this.call(s,i,p,v[0])}:f[p]=(...v)=>this.callWith(r,s,i,p,...v),m=f[p]}return m}})}}const vm=Symbol("@source-repo/rpc/component");class S0{namespace;target;release;view={epoch:"",revision:-1,props:Object.freeze({}),state:Object.freeze({}),status:"initializing",receivedAt:0};users=0;inner;store;first;listeners=new Set;retired=new Set;settleFirst;handler=i=>this.accept(i);constructor(i,s,r,c){this.namespace=s,this.target=r,this.release=c,this.inner=i.proxy(s,r),this.first=new Promise(f=>this.settleFirst=f),this.store={getSnapshot:()=>this.view,subscribe:f=>(this.listeners.add(f),()=>this.listeners.delete(f)),close:()=>this.close()}}async open(){await this.inner.on(In,this.handler),await this.first}accept(i){this.view.status!=="closed"&&(this.retired.has(i.epoch)||this.view.epoch===i.epoch&&i.revision<=this.view.revision||(this.view.epoch&&this.view.epoch!==i.epoch&&this.retired.add(this.view.epoch),this.view={...i,status:"live",receivedAt:Date.now()},this.settleFirst(),this.notify()))}markStale(){this.view.status==="live"&&(this.view={...this.view,status:"stale",staleSince:Date.now()},this.notify())}async close(){this.users>0&&this.users--,!(this.users>0)&&(this.view={...this.view,status:"closed"},this.notify(),this.release(),await this.inner.off(In,this.handler).catch(()=>{}))}markClosed(){this.view.status!=="closed"&&(this.view={...this.view,status:"closed"},this.notify())}notify(){for(const i of[...this.listeners])try{i()}catch{}}}class x0{handler;channels=new Map;constructor(i,s){this.handler=i,s.on(Ue.disconnected,()=>{for(const r of this.channels.values())r.markStale()});for(const r of[Ue.peerGone,Ue.peerDisplaced])s.on(r,c=>{for(const f of this.channels.values())f.target===c&&f.markStale()})}async open(i,s){const r=`${s??""}\0${i}`;let c=this.channels.get(r);if(c)await c.first;else{c=new S0(this.handler,i,s,()=>{this.channels.delete(r)}),this.channels.set(r,c);try{await c.open()}catch(f){throw this.channels.delete(r),f}}return c.users++,c}closeAll(){for(const i of this.channels.values())i.markClosed();this.channels.clear()}}const bm=(l,i)=>new Proxy(i,{get:(s,r)=>r==="props"?l.view.props:r==="state"?l.view.state:r===vm?l.store:r==="$with"?c=>bm(l,i.$with(c)):s[r],set:(s,r,c)=>{if(r==="props"||r==="state")throw new TypeError(`${String(r)} is read-only on a component proxy - call a method to change the world`);return s[r]=c,!0}}),sn=Object.create(null);sn.open="0";sn.close="1";sn.ping="2";sn.pong="3";sn.message="4";sn.upgrade="5";sn.noop="6";const Wl=Object.create(null);Object.keys(sn).forEach(l=>{Wl[sn[l]]=l});const Vu={type:"error",data:"parser error"},Sm=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",xm=typeof ArrayBuffer=="function",wm=l=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(l):l&&l.buffer instanceof ArrayBuffer,ec=({type:l,data:i},s,r)=>Sm&&i instanceof Blob?s?r(i):Bp(i,r):xm&&(i instanceof ArrayBuffer||wm(i))?s?r(i):Bp(new Blob([i]),r):r(sn[l]+(i||"")),Bp=(l,i)=>{const s=new FileReader;return s.onload=function(){const r=s.result.split(",")[1];i("b"+(r||""))},s.readAsDataURL(l)};function qp(l){return l instanceof Uint8Array?l:l instanceof ArrayBuffer?new Uint8Array(l):new Uint8Array(l.buffer,l.byteOffset,l.byteLength)}let Ru;function w0(l,i){if(Sm&&l.data instanceof Blob)return l.data.arrayBuffer().then(qp).then(i);if(xm&&(l.data instanceof ArrayBuffer||wm(l.data)))return i(qp(l.data));ec(l,!1,s=>{Ru||(Ru=new TextEncoder),i(Ru.encode(s))})}const Lp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ss=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let l=0;l<Lp.length;l++)Ss[Lp.charCodeAt(l)]=l;const E0=l=>{let i=l.length*.75,s=l.length,r,c=0,f,p,m,v;l[l.length-1]==="="&&(i--,l[l.length-2]==="="&&i--);const x=new ArrayBuffer(i),N=new Uint8Array(x);for(r=0;r<s;r+=4)f=Ss[l.charCodeAt(r)],p=Ss[l.charCodeAt(r+1)],m=Ss[l.charCodeAt(r+2)],v=Ss[l.charCodeAt(r+3)],N[c++]=f<<2|p>>4,N[c++]=(p&15)<<4|m>>2,N[c++]=(m&3)<<6|v&63;return x},T0=typeof ArrayBuffer=="function",tc=(l,i)=>{if(typeof l!="string")return{type:"message",data:Em(l,i)};const s=l.charAt(0);return s==="b"?{type:"message",data:k0(l.substring(1),i)}:Wl[s]?l.length>1?{type:Wl[s],data:l.substring(1)}:{type:Wl[s]}:Vu},k0=(l,i)=>{if(T0){const s=E0(l);return Em(s,i)}else return{base64:!0,data:l}},Em=(l,i)=>i==="blob"?l instanceof Blob?l:new Blob([l]):l instanceof ArrayBuffer?l:l.buffer,Tm="",_0=(l,i)=>{const s=l.length,r=new Array(s);let c=0;l.forEach((f,p)=>{ec(f,!1,m=>{r[p]=m,++c===s&&i(r.join(Tm))})})},A0=(l,i)=>{const s=l.split(Tm),r=[];for(let c=0;c<s.length;c++){const f=tc(s[c],i);if(r.push(f),f.type==="error")break}return r};function N0(){return new TransformStream({transform(l,i){w0(l,s=>{const r=s.length;let c;if(r<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,r);else if(r<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,r)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(r))}l.data&&typeof l.data!="string"&&(c[0]|=128),i.enqueue(c),i.enqueue(s)})}})}let Mu;function Ql(l){return l.reduce((i,s)=>i+s.length,0)}function Kl(l,i){if(l[0].length===i)return l.shift();const s=new Uint8Array(i);let r=0;for(let c=0;c<i;c++)s[c]=l[0][r++],r===l[0].length&&(l.shift(),r=0);return l.length&&r<l[0].length&&(l[0]=l[0].slice(r)),s}function O0(l,i){Mu||(Mu=new TextDecoder);const s=[];let r=0,c=-1,f=!1;return new TransformStream({transform(p,m){for(s.push(p);;){if(r===0){if(Ql(s)<1)break;const v=Kl(s,1);f=(v[0]&128)===128,c=v[0]&127,c<126?r=3:c===126?r=1:r=2}else if(r===1){if(Ql(s)<2)break;const v=Kl(s,2);c=new DataView(v.buffer,v.byteOffset,v.length).getUint16(0),r=3}else if(r===2){if(Ql(s)<8)break;const v=Kl(s,8),x=new DataView(v.buffer,v.byteOffset,v.length),N=x.getUint32(0);if(N>Math.pow(2,21)-1){m.enqueue(Vu);break}c=N*Math.pow(2,32)+x.getUint32(4),r=3}else{if(Ql(s)<c)break;const v=Kl(s,c);m.enqueue(tc(f?v:Mu.decode(v),i)),r=0}if(c===0||c>l){m.enqueue(Vu);break}}}})}const km=4;function Fe(l){if(l)return z0(l)}function z0(l){for(var i in Fe.prototype)l[i]=Fe.prototype[i];return l}Fe.prototype.on=Fe.prototype.addEventListener=function(l,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+l]=this._callbacks["$"+l]||[]).push(i),this};Fe.prototype.once=function(l,i){function s(){this.off(l,s),i.apply(this,arguments)}return s.fn=i,this.on(l,s),this};Fe.prototype.off=Fe.prototype.removeListener=Fe.prototype.removeAllListeners=Fe.prototype.removeEventListener=function(l,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+l];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+l],this;for(var r,c=0;c<s.length;c++)if(r=s[c],r===i||r.fn===i){s.splice(c,1);break}return s.length===0&&delete this._callbacks["$"+l],this};Fe.prototype.emit=function(l){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),s=this._callbacks["$"+l],r=1;r<arguments.length;r++)i[r-1]=arguments[r];if(s){s=s.slice(0);for(var r=0,c=s.length;r<c;++r)s[r].apply(this,i)}return this};Fe.prototype.emitReserved=Fe.prototype.emit;Fe.prototype.listeners=function(l){return this._callbacks=this._callbacks||{},this._callbacks["$"+l]||[]};Fe.prototype.hasListeners=function(l){return!!this.listeners(l).length};const sr=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,s)=>s(i,0),Yt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),j0="arraybuffer";function _m(l,...i){return i.reduce((s,r)=>(l.hasOwnProperty(r)&&(s[r]=l[r]),s),{})}const R0=Yt.setTimeout,M0=Yt.clearTimeout;function lr(l,i){i.useNativeTimers?(l.setTimeoutFn=R0.bind(Yt),l.clearTimeoutFn=M0.bind(Yt)):(l.setTimeoutFn=Yt.setTimeout.bind(Yt),l.clearTimeoutFn=Yt.clearTimeout.bind(Yt))}const U0=1.33;function C0(l){return typeof l=="string"?D0(l):Math.ceil((l.byteLength||l.size)*U0)}function D0(l){let i=0,s=0;for(let r=0,c=l.length;r<c;r++)i=l.charCodeAt(r),i<128?s+=1:i<2048?s+=2:i<55296||i>=57344?s+=3:(r++,s+=4);return s}function Am(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function B0(l){let i="";for(let s in l)l.hasOwnProperty(s)&&(i.length&&(i+="&"),i+=encodeURIComponent(s)+"="+encodeURIComponent(l[s]));return i}function q0(l){let i={},s=l.split("&");for(let r=0,c=s.length;r<c;r++){let f=s[r].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class L0 extends Error{constructor(i,s,r){super(i),this.description=s,this.context=r,this.type="TransportError"}}class nc extends Fe{constructor(i){super(),this.writable=!1,lr(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,s,r){return super.emitReserved("error",new L0(i,s,r)),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 s=tc(i,this.socket.binaryType);this.onPacket(s)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,s={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(s)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const s=B0(i);return s.length?"?"+s:""}}class H0 extends nc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const s=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||s()})),this.writable||(r++,this.once("drain",function(){--r||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const s=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};A0(i,this.socket.binaryType).forEach(s),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,_0(i,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=Am()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(i,s)}}let Nm=!1;try{Nm=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Y0=Nm;function $0(){}class X0 extends H0{constructor(i){if(super(i),typeof location<"u"){const s=location.protocol==="https:";let r=location.port;r||(r=s?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||r!==i.port}}doWrite(i,s){const r=this.request({method:"POST",data:i});r.on("success",s),r.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(s,r)=>{this.onError("xhr poll error",s,r)}),this.pollXhr=i}}class an extends Fe{constructor(i,s,r){super(),this.createRequest=i,lr(this,r),this._opts=r,this._method=r.method||"GET",this._uri=s,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var i;const s=_m(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(s);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&r.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var c;r.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=an.requestsCount++,an.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=$0,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete an.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()}}an.requestsCount=0;an.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Hp);else if(typeof addEventListener=="function"){const l="onpagehide"in Yt?"pagehide":"unload";addEventListener(l,Hp,!1)}}function Hp(){for(let l in an.requests)an.requests.hasOwnProperty(l)&&an.requests[l].abort()}const V0=(function(){const l=Om({xdomain:!1});return l&&l.responseType!==null})();class G0 extends X0{constructor(i){super(i);const s=i&&i.forceBase64;this.supportsBinary=V0&&!s}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new an(Om,this.uri(),i)}}function Om(l){const i=l.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||Y0))return new XMLHttpRequest}catch{}if(!i)try{return new Yt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const zm=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Q0 extends nc{get name(){return"websocket"}doOpen(){const i=this.uri(),s=this.opts.protocols,r=zm?{}:_m(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,s,r)}catch(c){return this.emitReserved("error",c)}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 s=0;s<i.length;s++){const r=i[s],c=s===i.length-1;ec(r,this.supportsBinary,f=>{try{this.doWrite(r,f)}catch{}c&&sr(()=>{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",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=Am()),this.supportsBinary||(s.b64=1),this.createUri(i,s)}}const Uu=Yt.WebSocket||Yt.MozWebSocket;class K0 extends Q0{createSocket(i,s,r){return zm?new Uu(i,s,r):s?new Uu(i,s):new Uu(i)}doWrite(i,s){this.ws.send(s)}}class Z0 extends nc{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 s=O0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=i.readable.pipeThrough(s).getReader(),c=N0();c.readable.pipeTo(i.writable),this._writer=c.writable.getWriter();const f=()=>{r.read().then(({done:m,value:v})=>{m||(this.onPacket(v),f())}).catch(m=>{})};f();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let s=0;s<i.length;s++){const r=i[s],c=s===i.length-1;this._writer.write(r).then(()=>{c&&sr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const J0={websocket:K0,webtransport:Z0,polling:G0},F0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,W0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Gu(l){if(l.length>8e3)throw"URI too long";const i=l,s=l.indexOf("["),r=l.indexOf("]");s!=-1&&r!=-1&&(l=l.substring(0,s)+l.substring(s,r).replace(/:/g,";")+l.substring(r,l.length));let c=F0.exec(l||""),f={},p=14;for(;p--;)f[W0[p]]=c[p]||"";return s!=-1&&r!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=I0(f,f.path),f.queryKey=P0(f,f.query),f}function I0(l,i){const s=/\/{2,9}/g,r=i.replace(s,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&r.splice(0,1),i.slice(-1)=="/"&&r.splice(r.length-1,1),r}function P0(l,i){const s={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,c,f){c&&(s[c]=f)}),s}const Qu=typeof addEventListener=="function"&&typeof removeEventListener=="function",Il=[];Qu&&addEventListener("offline",()=>{Il.forEach(l=>l())},!1);class Pn extends Fe{constructor(i,s){if(super(),this.binaryType=j0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(s=i,i=null),i){const r=Gu(i);s.hostname=r.host,s.secure=r.protocol==="https"||r.protocol==="wss",s.port=r.port,r.query&&(s.query=r.query)}else s.host&&(s.hostname=Gu(s.host).host);lr(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(r=>{const c=r.prototype.name;this.transports.push(c),this._transportsByName[c]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=q0(this.opts.query)),Qu&&(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"})},Il.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const s=Object.assign({},this.opts.query);s.EIO=km,s.transport=i,this.id&&(s.sid=this.id);const r=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&Pn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(i);s.open(),this.setTransport(s)}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",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",Pn.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 s=new Error("server error");s.code=i.data,this._onError(s);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 s=1;for(let r=0;r<this.writeBuffer.length;r++){const c=this.writeBuffer[r].data;if(c&&(s+=C0(c)),r>0&&s>this._maxPayload)return this.writeBuffer.slice(0,r);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,sr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,s,r){return this._sendPacket("message",i,s,r),this}send(i,s,r){return this._sendPacket("message",i,s,r),this}_sendPacket(i,s,r,c){if(typeof s=="function"&&(c=s,s=void 0),typeof r=="function"&&(c=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const f={type:i,data:s,options:r};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),i()},r=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():i()}):this.upgrading?r():i()),this}_onError(i){if(Pn.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,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Qu&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Il.indexOf(this._offlineEventListener);r!==-1&&Il.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,s),this.writeBuffer=[],this._prevBufferLen=0}}}Pn.protocol=km;class eb extends Pn{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 s=this.createTransport(i),r=!1;Pn.priorWebsocketSuccess=!1;const c=()=>{r||(s.send([{type:"ping",data:"probe"}]),s.once("packet",w=>{if(!r)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;Pn.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(N(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const q=new Error("probe error");q.transport=s.name,this.emitReserved("upgradeError",q)}}))};function f(){r||(r=!0,N(),s.close(),s=null)}const p=w=>{const q=new Error("probe error: "+w);q.transport=s.name,f(),this.emitReserved("upgradeError",q)};function m(){p("transport closed")}function v(){p("socket closed")}function x(w){s&&w.name!==s.name&&f()}const N=()=>{s.removeListener("open",c),s.removeListener("error",p),s.removeListener("close",m),this.off("close",v),this.off("upgrading",x)};s.once("open",c),s.once("error",p),s.once("close",m),this.once("close",v),this.once("upgrading",x),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{r||s.open()},200):s.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const s=[];for(let r=0;r<i.length;r++)~this.transports.indexOf(i[r])&&s.push(i[r]);return s}}let tb=class extends eb{constructor(i,s={}){const r=typeof i=="object",c=r?{...i}:{...s};(!c.transports||c.transports&&typeof c.transports[0]=="string")&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(f=>J0[f]).filter(f=>!!f)),super(r?c:i,c)}};function nb(l,i="",s){let r=l;s=s||typeof location<"u"&&location,l==null&&(l=s.protocol+"//"+s.host),typeof l=="string"&&(l.charAt(0)==="/"&&(l.charAt(1)==="/"?l=s.protocol+l:l=s.host+l),/^(https?|wss?):\/\//.test(l)||(typeof s<"u"?l=s.protocol+"//"+l:l="https://"+l),r=Gu(l)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const f=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+f+":"+r.port+i,r.href=r.protocol+"://"+f+(s&&s.port===r.port?"":":"+r.port),r}const ib=typeof ArrayBuffer=="function",ab=l=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(l):l.buffer instanceof ArrayBuffer,jm=Object.prototype.toString,sb=typeof Blob=="function"||typeof Blob<"u"&&jm.call(Blob)==="[object BlobConstructor]",lb=typeof File=="function"||typeof File<"u"&&jm.call(File)==="[object FileConstructor]";function ic(l){return ib&&(l instanceof ArrayBuffer||ab(l))||sb&&l instanceof Blob||lb&&l instanceof File}function Pl(l,i){if(!l||typeof l!="object")return!1;if(Array.isArray(l)){for(let s=0,r=l.length;s<r;s++)if(Pl(l[s]))return!0;return!1}if(ic(l))return!0;if(l.toJSON&&typeof l.toJSON=="function"&&arguments.length===1)return Pl(l.toJSON(),!0);for(const s in l)if(Object.prototype.hasOwnProperty.call(l,s)&&Pl(l[s]))return!0;return!1}function rb(l){const i=[],s=l.data,r=l;return r.data=er(s,i),r.attachments=i.length,{packet:r,buffers:i}}function er(l,i,s){if(!l)return l;if(ic(l)){const r={_placeholder:!0,num:i.length};return i.push(l),r}else if(Array.isArray(l)){const r=new Array(l.length);for(let c=0;c<l.length;c++)r[c]=er(l[c],i);return r}else if(typeof l=="object"&&!(l instanceof Date)){if(l.toJSON&&typeof l.toJSON=="function"&&!s)return er(l.toJSON(),i,!0);const r={};for(const c in l)Object.prototype.hasOwnProperty.call(l,c)&&(r[c]=er(l[c],i));return r}return l}function ob(l,i){return l.data=Ku(l.data,i),delete l.attachments,l}function Ku(l,i){if(!l)return l;if(l&&l._placeholder===!0){if(typeof l.num=="number"&&l.num>=0&&l.num<i.length)return i[l.num];throw new Error("illegal attachments")}else if(Array.isArray(l))for(let s=0;s<l.length;s++)l[s]=Ku(l[s],i);else if(typeof l=="object")for(const s in l)Object.prototype.hasOwnProperty.call(l,s)&&(l[s]=Ku(l[s],i));return l}const ub=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var we;(function(l){l[l.CONNECT=0]="CONNECT",l[l.DISCONNECT=1]="DISCONNECT",l[l.EVENT=2]="EVENT",l[l.ACK=3]="ACK",l[l.CONNECT_ERROR=4]="CONNECT_ERROR",l[l.BINARY_EVENT=5]="BINARY_EVENT",l[l.BINARY_ACK=6]="BINARY_ACK"})(we||(we={}));let cb=class{constructor(i){this.replacer=i}encode(i){return(i.type===we.EVENT||i.type===we.ACK)&&Pl(i)?this.encodeAsBinary({type:i.type===we.EVENT?we.BINARY_EVENT:we.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let s=""+i.type;return(i.type===we.BINARY_EVENT||i.type===we.BINARY_ACK)&&(s+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(s+=i.nsp+","),i.id!=null&&(s+=i.id),i.data!=null&&(s+=JSON.stringify(i.data,this.replacer)),s}encodeAsBinary(i){const s=rb(i),r=this.encodeAsString(s.packet),c=s.buffers;return c.unshift(r),c}},fb=class Rm extends Fe{constructor(i){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof i=="function"?{reviver:i}:i)}add(i){let s;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");s=this.decodeString(i);const r=s.type===we.BINARY_EVENT;r||s.type===we.BINARY_ACK?(s.type=r?we.EVENT:we.ACK,this.reconstructor=new hb(s)):super.emitReserved("decoded",s)}else if(ic(i)||i.base64)if(this.reconstructor)s=this.reconstructor.takeBinaryData(i),s&&(this.reconstructor=null,super.emitReserved("decoded",s));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let s=0;const r={type:Number(i.charAt(0))};if(we[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===we.BINARY_EVENT||r.type===we.BINARY_ACK){const f=s+1;for(;i.charAt(++s)!=="-"&&s!=i.length;);const p=i.substring(f,s);if(p!=Number(p)||i.charAt(s)!=="-")throw new Error("Illegal attachments");const m=Number(p);if(!db(m)||m<1)throw new Error("Illegal attachments");if(m>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=m}if(i.charAt(s+1)==="/"){const f=s+1;for(;++s&&!(i.charAt(s)===","||s===i.length););r.nsp=i.substring(f,s)}else r.nsp="/";const c=i.charAt(s+1);if(c!==""&&Number(c)==c){const f=s+1;for(;++s;){const p=i.charAt(s);if(p==null||Number(p)!=p){--s;break}if(s===i.length)break}r.id=Number(i.substring(f,s+1))}if(i.charAt(++s)){const f=this.tryParse(i.substr(s));if(Rm.isPayloadValid(r.type,f))r.data=f;else throw new Error("invalid payload")}return r}tryParse(i){try{return JSON.parse(i,this.opts.reviver)}catch{return!1}}static isPayloadValid(i,s){switch(i){case we.CONNECT:return Yp(s);case we.DISCONNECT:return s===void 0;case we.CONNECT_ERROR:return typeof s=="string"||Yp(s);case we.EVENT:case we.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&ub.indexOf(s[0])===-1);case we.ACK:case we.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}};class hb{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const s=ob(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const db=Number.isInteger||function(l){return typeof l=="number"&&isFinite(l)&&Math.floor(l)===l};function Yp(l){return Object.prototype.toString.call(l)==="[object Object]"}const pb=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fb,Encoder:cb,get PacketType(){return we}},Symbol.toStringTag,{value:"Module"}));function Qt(l,i,s){return l.on(i,s),function(){l.off(i,s)}}const mb=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Mm extends Fe{constructor(i,s,r){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=s,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[Qt(i,"open",this.onopen.bind(this)),Qt(i,"packet",this.onpacket.bind(this)),Qt(i,"error",this.onerror.bind(this)),Qt(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,...s){var r,c,f;if(mb.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(s.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const p={type:we.EVENT,data:s};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const N=this.ids++,w=s.pop();this._registerAckCallback(N,w),p.id=N}const m=(c=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||c===void 0?void 0:c.writable,v=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(v?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),this.flags={},this}_registerAckCallback(i,s){var r;const c=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(c===void 0){this.acks[i]=s;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);s.call(this,new Error("operation has timed out"))},c),p=(...m)=>{this.io.clearTimeoutFn(f),s.apply(this,m)};p.withError=!0,this.acks[i]=p}emitWithAck(i,...s){return new Promise((r,c)=>{const f=(p,m)=>p?c(p):r(m);f.withError=!0,s.push(f),this.emit(i,...s)})}_addToQueue(i){let s;typeof i[i.length-1]=="function"&&(s=i.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((c,...f)=>(this._queue[0],c!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(c)):(this._queue.shift(),s&&s(null,...f)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!i||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.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:we.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,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(r=>String(r.id)===i)){const r=this.acks[i];delete this.acks[i],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case we.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 we.EVENT:case we.BINARY_EVENT:this.onevent(i);break;case we.ACK:case we.BINARY_ACK:this.onack(i);break;case we.DISCONNECT:this.ondisconnect();break;case we.CONNECT_ERROR:this.destroy();const r=new Error(i.data.message);r.data=i.data.data,this.emitReserved("connect_error",r);break}}onevent(i){const s=i.data||[];i.id!=null&&s.push(this.ack(i.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const r of s)r.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 s=this;let r=!1;return function(...c){r||(r=!0,s.packet({type:we.ACK,id:i,data:c}))}}onack(i){const s=this.acks[i.id];typeof s=="function"&&(delete this.acks[i.id],s.withError&&i.data.unshift(null),s.apply(this,i.data))}onconnect(i,s){this.id=i,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}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:we.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 s=this._anyListeners;for(let r=0;r<s.length;r++)if(i===s[r])return s.splice(r,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 s=this._anyOutgoingListeners;for(let r=0;r<s.length;r++)if(i===s[r])return s.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const s=this._anyOutgoingListeners.slice();for(const r of s)r.apply(this,i.data)}}}function ha(l){l=l||{},this.ms=l.min||100,this.max=l.max||1e4,this.factor=l.factor||2,this.jitter=l.jitter>0&&l.jitter<=1?l.jitter:0,this.attempts=0}ha.prototype.duration=function(){var l=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),s=Math.floor(i*this.jitter*l);l=(Math.floor(i*10)&1)==0?l-s:l+s}return Math.min(l,this.max)|0};ha.prototype.reset=function(){this.attempts=0};ha.prototype.setMin=function(l){this.ms=l};ha.prototype.setMax=function(l){this.max=l};ha.prototype.setJitter=function(l){this.jitter=l};class Zu extends Fe{constructor(i,s){var r;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(s=i,i=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,lr(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((r=s.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ha({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=i;const c=s.parser||pb;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=s.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 s;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(s=this.backoff)===null||s===void 0||s.setMin(i),this)}randomizationFactor(i){var s;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(s=this.backoff)===null||s===void 0||s.setJitter(i),this)}reconnectionDelayMax(i){var s;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(s=this.backoff)===null||s===void 0||s.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 tb(this.uri,this.opts);const s=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const c=Qt(s,"open",function(){r.onopen(),i&&i()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),i?i(m):this.maybeReconnectOnOpen()},p=Qt(s,"error",f);if(this._timeout!==!1){const m=this._timeout,v=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),s.close()},m);this.opts.autoUnref&&v.unref(),this.subs.push(()=>{this.clearTimeoutFn(v)})}return this.subs.push(c),this.subs.push(p),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Qt(i,"ping",this.onping.bind(this)),Qt(i,"data",this.ondata.bind(this)),Qt(i,"error",this.onerror.bind(this)),Qt(i,"close",this.onclose.bind(this)),Qt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(s){this.onclose("parse error",s)}}ondecoded(i){sr(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,s){let r=this.nsps[i];return r?this._autoConnect&&!r.active&&r.connect():(r=new Mm(this,i,s),this.nsps[i]=r),r}_destroy(i){const s=Object.keys(this.nsps);for(const r of s)if(this.nsps[r].active)return;this._close()}_packet(i){const s=this.encoder.encode(i);for(let r=0;r<s.length;r++)this.engine.write(s[r],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,s){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,s),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 s=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(c=>{c?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",c)):i.onreconnect()}))},s);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const ms={};function ws(l,i){typeof l=="object"&&(i=l,l=void 0),i=i||{};const s=nb(l,i.path||"/socket.io"),r=s.source,c=s.id,f=s.path,p=ms[c]&&f in ms[c].nsps,m=i.forceNew||i["force new connection"]||i.multiplex===!1||p;let v;return m?v=new Zu(r,i):(ms[c]||(ms[c]=new Zu(r,i)),v=ms[c]),s.query&&!i.query&&(i.query=s.queryKey),v.socket(s.path,i)}Object.assign(ws,{Manager:Zu,Socket:Mm,io:ws,connect:ws});function yb(l){const i=l.length;let s=0,r=0;for(;r<i;){let c=l.charCodeAt(r++);if((c&4294967168)===0){s++;continue}else if((c&4294965248)===0)s+=2;else{if(c>=55296&&c<=56319&&r<i){const f=l.charCodeAt(r);(f&64512)===56320&&(++r,c=((c&1023)<<10)+(f&1023)+65536)}(c&4294901760)===0?s+=3:s+=4}}return s}function gb(l,i,s){const r=l.length;let c=s,f=0;for(;f<r;){let p=l.charCodeAt(f++);if((p&4294967168)===0){i[c++]=p;continue}else if((p&4294965248)===0)i[c++]=p>>6&31|192;else{if(p>=55296&&p<=56319&&f<r){const m=l.charCodeAt(f);(m&64512)===56320&&(++f,p=((p&1023)<<10)+(m&1023)+65536)}(p&4294901760)===0?(i[c++]=p>>12&15|224,i[c++]=p>>6&63|128):(i[c++]=p>>18&7|240,i[c++]=p>>12&63|128,i[c++]=p>>6&63|128)}i[c++]=p&63|128}}const vb=new TextEncoder,bb=50;function Sb(l,i,s){vb.encodeInto(l,i.subarray(s))}function xb(l,i,s){l.length>bb?Sb(l,i,s):gb(l,i,s)}const wb=4096;function Um(l,i,s){let r=i;const c=r+s,f=[];let p="";for(;r<c;){const m=l[r++];if((m&128)===0)f.push(m);else if((m&224)===192){const v=l[r++]&63;f.push((m&31)<<6|v)}else if((m&240)===224){const v=l[r++]&63,x=l[r++]&63;f.push((m&31)<<12|v<<6|x)}else if((m&248)===240){const v=l[r++]&63,x=l[r++]&63,N=l[r++]&63;let w=(m&7)<<18|v<<12|x<<6|N;w>65535&&(w-=65536,f.push(w>>>10&1023|55296),w=56320|w&1023),f.push(w)}else f.push(m);f.length>=wb&&(p+=String.fromCharCode(...f),f.length=0)}return f.length>0&&(p+=String.fromCharCode(...f)),p}const Eb=new TextDecoder,Tb=200;function kb(l,i,s){const r=l.subarray(i,i+s);return Eb.decode(r)}function _b(l,i,s){return s>Tb?kb(l,i,s):Um(l,i,s)}class Zl{type;data;constructor(i,s){this.type=i,this.data=s}}class zt extends Error{constructor(i){super(i);const s=Object.create(zt.prototype);Object.setPrototypeOf(this,s),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:zt.name})}}const ys=4294967295;function Ab(l,i,s){const r=s/4294967296,c=s;l.setUint32(i,r),l.setUint32(i+4,c)}function Cm(l,i,s){const r=Math.floor(s/4294967296),c=s;l.setUint32(i,r),l.setUint32(i+4,c)}function Dm(l,i){const s=l.getInt32(i),r=l.getUint32(i+4);return s*4294967296+r}function Nb(l,i){const s=l.getUint32(i),r=l.getUint32(i+4);return s*4294967296+r}const Ob=-1,zb=4294967296-1,jb=17179869184-1;function Rb({sec:l,nsec:i}){if(l>=0&&i>=0&&l<=jb)if(i===0&&l<=zb){const s=new Uint8Array(4);return new DataView(s.buffer).setUint32(0,l),s}else{const s=l/4294967296,r=l&4294967295,c=new Uint8Array(8),f=new DataView(c.buffer);return f.setUint32(0,i<<2|s&3),f.setUint32(4,r),c}else{const s=new Uint8Array(12),r=new DataView(s.buffer);return r.setUint32(0,i),Cm(r,4,l),s}}function Mb(l){const i=l.getTime(),s=Math.floor(i/1e3),r=(i-s*1e3)*1e6,c=Math.floor(r/1e9);return{sec:s+c,nsec:r-c*1e9}}function Ub(l){if(l instanceof Date){const i=Mb(l);return Rb(i)}else return null}function Cb(l){const i=new DataView(l.buffer,l.byteOffset,l.byteLength);switch(l.byteLength){case 4:return{sec:i.getUint32(0),nsec:0};case 8:{const s=i.getUint32(0),r=i.getUint32(4),c=(s&3)*4294967296+r,f=s>>>2;return{sec:c,nsec:f}}case 12:{const s=Dm(i,4),r=i.getUint32(0);return{sec:s,nsec:r}}default:throw new zt(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${l.length}`)}}function Db(l){const i=Cb(l);return new Date(i.sec*1e3+i.nsec/1e6)}const Bb={type:Ob,encode:Ub,decode:Db};class rr{static defaultCodec=new rr;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Bb)}register({type:i,encode:s,decode:r}){if(i>=0)this.encoders[i]=s,this.decoders[i]=r;else{const c=-1-i;this.builtInEncoders[c]=s,this.builtInDecoders[c]=r}}tryToEncode(i,s){for(let r=0;r<this.builtInEncoders.length;r++){const c=this.builtInEncoders[r];if(c!=null){const f=c(i,s);if(f!=null){const p=-1-r;return new Zl(p,f)}}}for(let r=0;r<this.encoders.length;r++){const c=this.encoders[r];if(c!=null){const f=c(i,s);if(f!=null){const p=r;return new Zl(p,f)}}}return i instanceof Zl?i:null}decode(i,s,r){const c=s<0?this.builtInDecoders[-1-s]:this.decoders[s];return c?c(i,s,r):new Zl(s,i)}}function qb(l){return l instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&l instanceof SharedArrayBuffer}function Ju(l){return l instanceof Uint8Array?l:ArrayBuffer.isView(l)?new Uint8Array(l.buffer,l.byteOffset,l.byteLength):qb(l)?new Uint8Array(l):Uint8Array.from(l)}const Lb=100,Hb=2048;class ac{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(i){this.extensionCodec=i?.extensionCodec??rr.defaultCodec,this.context=i?.context,this.useBigInt64=i?.useBigInt64??!1,this.maxDepth=i?.maxDepth??Lb,this.initialBufferSize=i?.initialBufferSize??Hb,this.sortKeys=i?.sortKeys??!1,this.forceFloat32=i?.forceFloat32??!1,this.ignoreUndefined=i?.ignoreUndefined??!1,this.forceIntegerToFloat=i?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new ac({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(i){if(this.entered)return this.clone().encodeSharedRef(i);try{return this.entered=!0,this.reinitializeState(),this.doEncode(i,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(i){if(this.entered)return this.clone().encode(i);try{return this.entered=!0,this.reinitializeState(),this.doEncode(i,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(i,s){if(s>this.maxDepth)throw new Error(`Too deep objects in depth ${s}`);i==null?this.encodeNil():typeof i=="boolean"?this.encodeBoolean(i):typeof i=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(i):this.encodeNumber(i):typeof i=="string"?this.encodeString(i):this.useBigInt64&&typeof i=="bigint"?this.encodeBigInt64(i):this.encodeObject(i,s)}ensureBufferSizeToWrite(i){const s=this.pos+i;this.view.byteLength<s&&this.resizeBuffer(s*2)}resizeBuffer(i){const s=new ArrayBuffer(i),r=new Uint8Array(s),c=new DataView(s);r.set(this.bytes),this.view=c,this.bytes=r}encodeNil(){this.writeU8(192)}encodeBoolean(i){i===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(i){!this.forceIntegerToFloat&&Number.isSafeInteger(i)?i>=0?i<128?this.writeU8(i):i<256?(this.writeU8(204),this.writeU8(i)):i<65536?(this.writeU8(205),this.writeU16(i)):i<4294967296?(this.writeU8(206),this.writeU32(i)):this.useBigInt64?this.encodeNumberAsFloat(i):(this.writeU8(207),this.writeU64(i)):i>=-32?this.writeU8(224|i+32):i>=-128?(this.writeU8(208),this.writeI8(i)):i>=-32768?(this.writeU8(209),this.writeI16(i)):i>=-2147483648?(this.writeU8(210),this.writeI32(i)):this.useBigInt64?this.encodeNumberAsFloat(i):(this.writeU8(211),this.writeI64(i)):this.encodeNumberAsFloat(i)}encodeNumberAsFloat(i){this.forceFloat32?(this.writeU8(202),this.writeF32(i)):(this.writeU8(203),this.writeF64(i))}encodeBigInt64(i){i>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(i)):(this.writeU8(211),this.writeBigInt64(i))}writeStringHeader(i){if(i<32)this.writeU8(160+i);else if(i<256)this.writeU8(217),this.writeU8(i);else if(i<65536)this.writeU8(218),this.writeU16(i);else if(i<4294967296)this.writeU8(219),this.writeU32(i);else throw new Error(`Too long string: ${i} bytes in UTF-8`)}encodeString(i){const r=yb(i);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),xb(i,this.bytes,this.pos),this.pos+=r}encodeObject(i,s){const r=this.extensionCodec.tryToEncode(i,this.context);if(r!=null)this.encodeExtension(r);else if(Array.isArray(i))this.encodeArray(i,s);else if(ArrayBuffer.isView(i))this.encodeBinary(i);else if(typeof i=="object")this.encodeMap(i,s);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(i)}`)}encodeBinary(i){const s=i.byteLength;if(s<256)this.writeU8(196),this.writeU8(s);else if(s<65536)this.writeU8(197),this.writeU16(s);else if(s<4294967296)this.writeU8(198),this.writeU32(s);else throw new Error(`Too large binary: ${s}`);const r=Ju(i);this.writeU8a(r)}encodeArray(i,s){const r=i.length;if(r<16)this.writeU8(144+r);else if(r<65536)this.writeU8(220),this.writeU16(r);else if(r<4294967296)this.writeU8(221),this.writeU32(r);else throw new Error(`Too large array: ${r}`);for(const c of i)this.doEncode(c,s+1)}countWithoutUndefined(i,s){let r=0;for(const c of s)i[c]!==void 0&&r++;return r}encodeMap(i,s){const r=Object.keys(i);this.sortKeys&&r.sort();const c=this.ignoreUndefined?this.countWithoutUndefined(i,r):r.length;if(c<16)this.writeU8(128+c);else if(c<65536)this.writeU8(222),this.writeU16(c);else if(c<4294967296)this.writeU8(223),this.writeU32(c);else throw new Error(`Too large map object: ${c}`);for(const f of r){const p=i[f];this.ignoreUndefined&&p===void 0||(this.encodeString(f),this.doEncode(p,s+1))}}encodeExtension(i){if(typeof i.data=="function"){const r=i.data(this.pos+6),c=r.length;if(c>=4294967296)throw new Error(`Too large extension object: ${c}`);this.writeU8(201),this.writeU32(c),this.writeI8(i.type),this.writeU8a(r);return}const s=i.data.length;if(s===1)this.writeU8(212);else if(s===2)this.writeU8(213);else if(s===4)this.writeU8(214);else if(s===8)this.writeU8(215);else if(s===16)this.writeU8(216);else if(s<256)this.writeU8(199),this.writeU8(s);else if(s<65536)this.writeU8(200),this.writeU16(s);else if(s<4294967296)this.writeU8(201),this.writeU32(s);else throw new Error(`Too large extension object: ${s}`);this.writeI8(i.type),this.writeU8a(i.data)}writeU8(i){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,i),this.pos++}writeU8a(i){const s=i.length;this.ensureBufferSizeToWrite(s),this.bytes.set(i,this.pos),this.pos+=s}writeI8(i){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,i),this.pos++}writeU16(i){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,i),this.pos+=2}writeI16(i){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,i),this.pos+=2}writeU32(i){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,i),this.pos+=4}writeI32(i){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,i),this.pos+=4}writeF32(i){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,i),this.pos+=4}writeF64(i){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,i),this.pos+=8}writeU64(i){this.ensureBufferSizeToWrite(8),Ab(this.view,this.pos,i),this.pos+=8}writeI64(i){this.ensureBufferSizeToWrite(8),Cm(this.view,this.pos,i),this.pos+=8}writeBigUint64(i){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,i),this.pos+=8}writeBigInt64(i){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,i),this.pos+=8}}function Yb(l,i){return new ac(i).encodeSharedRef(l)}function Cu(l){return`${l<0?"-":""}0x${Math.abs(l).toString(16).padStart(2,"0")}`}const $b=16,Xb=16;class Vb{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(i=$b,s=Xb){this.maxKeyLength=i,this.maxLengthPerKey=s,this.caches=[];for(let r=0;r<this.maxKeyLength;r++)this.caches.push([])}canBeCached(i){return i>0&&i<=this.maxKeyLength}find(i,s,r){const c=this.caches[r-1];e:for(const f of c){const p=f.bytes;for(let m=0;m<r;m++)if(p[m]!==i[s+m])continue e;return f.str}return null}store(i,s){const r=this.caches[i.length-1],c={bytes:i,str:s};r.length>=this.maxLengthPerKey?r[Math.random()*r.length|0]=c:r.push(c)}decode(i,s,r){const c=this.find(i,s,r);if(c!=null)return this.hit++,c;this.miss++;const f=Um(i,s,r),p=Uint8Array.prototype.slice.call(i,s,s+r);return this.store(p,f),f}}const Fu="array",Es="map_key",Bm="map_value",Gb=l=>{if(typeof l=="string"||typeof l=="number")return l;throw new zt("The type of key must be string or number but "+typeof l)};class Qb{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(i){const s=this.getUninitializedStateFromPool();s.type=Fu,s.position=0,s.size=i,s.array=new Array(i)}pushMapState(i){const s=this.getUninitializedStateFromPool();s.type=Es,s.readCount=0,s.size=i,s.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const i={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(i)}return this.stack[this.stackHeadPosition]}release(i){if(this.stack[this.stackHeadPosition]!==i)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(i.type===Fu){const r=i;r.size=0,r.array=void 0,r.position=0,r.type=void 0}if(i.type===Es||i.type===Bm){const r=i;r.size=0,r.map=void 0,r.readCount=0,r.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}const gs=-1,sc=new DataView(new ArrayBuffer(0)),Kb=new Uint8Array(sc.buffer);try{sc.getInt8(0)}catch(l){if(!(l instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}const $p=new RangeError("Insufficient data"),Zb=new Vb;class lc{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=sc;bytes=Kb;headByte=gs;stack=new Qb;entered=!1;constructor(i){this.extensionCodec=i?.extensionCodec??rr.defaultCodec,this.context=i?.context,this.useBigInt64=i?.useBigInt64??!1,this.rawStrings=i?.rawStrings??!1,this.maxStrLength=i?.maxStrLength??ys,this.maxBinLength=i?.maxBinLength??ys,this.maxArrayLength=i?.maxArrayLength??ys,this.maxMapLength=i?.maxMapLength??ys,this.maxExtLength=i?.maxExtLength??ys,this.keyDecoder=i?.keyDecoder!==void 0?i.keyDecoder:Zb,this.mapKeyConverter=i?.mapKeyConverter??Gb}clone(){return new lc({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=gs,this.stack.reset()}setBuffer(i){const s=Ju(i);this.bytes=s,this.view=new DataView(s.buffer,s.byteOffset,s.byteLength),this.pos=0}appendBuffer(i){if(this.headByte===gs&&!this.hasRemaining(1))this.setBuffer(i);else{const s=this.bytes.subarray(this.pos),r=Ju(i),c=new Uint8Array(s.length+r.length);c.set(s),c.set(r,s.length),this.setBuffer(c)}}hasRemaining(i){return this.view.byteLength-this.pos>=i}createExtraByteError(i){const{view:s,pos:r}=this;return new RangeError(`Extra ${s.byteLength-r} of ${s.byteLength} byte(s) found at buffer[${i}]`)}decode(i){if(this.entered)return this.clone().decode(i);try{this.entered=!0,this.reinitializeState(),this.setBuffer(i);const s=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return s}finally{this.entered=!1}}*decodeMulti(i){if(this.entered){yield*this.clone().decodeMulti(i);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(i);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(i){if(this.entered)return this.clone().decodeAsync(i);try{this.entered=!0;let s=!1,r;for await(const m of i){if(s)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(m);try{r=this.doDecodeSync(),s=!0}catch(v){if(!(v instanceof RangeError))throw v}this.totalPos+=this.pos}if(s){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return r}const{headByte:c,pos:f,totalPos:p}=this;throw new RangeError(`Insufficient data in parsing ${Cu(c)} at ${p} (${f} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(i){return this.decodeMultiAsync(i,!0)}decodeStream(i){return this.decodeMultiAsync(i,!1)}async*decodeMultiAsync(i,s){if(this.entered){yield*this.clone().decodeMultiAsync(i,s);return}try{this.entered=!0;let r=s,c=-1;for await(const f of i){if(s&&c===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(f),r&&(c=this.readArraySize(),r=!1,this.complete());try{for(;yield this.doDecodeSync(),--c!==0;);}catch(p){if(!(p instanceof RangeError))throw p}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const i=this.readHeadByte();let s;if(i>=224)s=i-256;else if(i<192)if(i<128)s=i;else if(i<144){const c=i-128;if(c!==0){this.pushMapState(c),this.complete();continue e}else s={}}else if(i<160){const c=i-144;if(c!==0){this.pushArrayState(c),this.complete();continue e}else s=[]}else{const c=i-160;s=this.decodeString(c,0)}else if(i===192)s=null;else if(i===194)s=!1;else if(i===195)s=!0;else if(i===202)s=this.readF32();else if(i===203)s=this.readF64();else if(i===204)s=this.readU8();else if(i===205)s=this.readU16();else if(i===206)s=this.readU32();else if(i===207)this.useBigInt64?s=this.readU64AsBigInt():s=this.readU64();else if(i===208)s=this.readI8();else if(i===209)s=this.readI16();else if(i===210)s=this.readI32();else if(i===211)this.useBigInt64?s=this.readI64AsBigInt():s=this.readI64();else if(i===217){const c=this.lookU8();s=this.decodeString(c,1)}else if(i===218){const c=this.lookU16();s=this.decodeString(c,2)}else if(i===219){const c=this.lookU32();s=this.decodeString(c,4)}else if(i===220){const c=this.readU16();if(c!==0){this.pushArrayState(c),this.complete();continue e}else s=[]}else if(i===221){const c=this.readU32();if(c!==0){this.pushArrayState(c),this.complete();continue e}else s=[]}else if(i===222){const c=this.readU16();if(c!==0){this.pushMapState(c),this.complete();continue e}else s={}}else if(i===223){const c=this.readU32();if(c!==0){this.pushMapState(c),this.complete();continue e}else s={}}else if(i===196){const c=this.lookU8();s=this.decodeBinary(c,1)}else if(i===197){const c=this.lookU16();s=this.decodeBinary(c,2)}else if(i===198){const c=this.lookU32();s=this.decodeBinary(c,4)}else if(i===212)s=this.decodeExtension(1,0);else if(i===213)s=this.decodeExtension(2,0);else if(i===214)s=this.decodeExtension(4,0);else if(i===215)s=this.decodeExtension(8,0);else if(i===216)s=this.decodeExtension(16,0);else if(i===199){const c=this.lookU8();s=this.decodeExtension(c,1)}else if(i===200){const c=this.lookU16();s=this.decodeExtension(c,2)}else if(i===201){const c=this.lookU32();s=this.decodeExtension(c,4)}else throw new zt(`Unrecognized type byte: ${Cu(i)}`);this.complete();const r=this.stack;for(;r.length>0;){const c=r.top();if(c.type===Fu)if(c.array[c.position]=s,c.position++,c.position===c.size)s=c.array,r.release(c);else continue e;else if(c.type===Es){if(s==="__proto__")throw new zt("The key __proto__ is not allowed");c.key=this.mapKeyConverter(s),c.type=Bm;continue e}else if(c.map[c.key]=s,c.readCount++,c.readCount===c.size)s=c.map,r.release(c);else{c.key=null,c.type=Es;continue e}}return s}}readHeadByte(){return this.headByte===gs&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=gs}readArraySize(){const i=this.readHeadByte();switch(i){case 220:return this.readU16();case 221:return this.readU32();default:{if(i<160)return i-144;throw new zt(`Unrecognized array type byte: ${Cu(i)}`)}}}pushMapState(i){if(i>this.maxMapLength)throw new zt(`Max length exceeded: map length (${i}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(i)}pushArrayState(i){if(i>this.maxArrayLength)throw new zt(`Max length exceeded: array length (${i}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(i)}decodeString(i,s){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(i,s):this.decodeBinary(i,s)}decodeUtf8String(i,s){if(i>this.maxStrLength)throw new zt(`Max length exceeded: UTF-8 byte length (${i}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+s+i)throw $p;const r=this.pos+s;let c;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(i)?c=this.keyDecoder.decode(this.bytes,r,i):c=_b(this.bytes,r,i),this.pos+=s+i,c}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===Es:!1}decodeBinary(i,s){if(i>this.maxBinLength)throw new zt(`Max length exceeded: bin length (${i}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(i+s))throw $p;const r=this.pos+s,c=this.bytes.subarray(r,r+i);return this.pos+=s+i,c}decodeExtension(i,s){if(i>this.maxExtLength)throw new zt(`Max length exceeded: ext length (${i}) > maxExtLength (${this.maxExtLength})`);const r=this.view.getInt8(this.pos+s),c=this.decodeBinary(i,s+1);return this.extensionCodec.decode(c,r,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const i=this.view.getUint8(this.pos);return this.pos++,i}readI8(){const i=this.view.getInt8(this.pos);return this.pos++,i}readU16(){const i=this.view.getUint16(this.pos);return this.pos+=2,i}readI16(){const i=this.view.getInt16(this.pos);return this.pos+=2,i}readU32(){const i=this.view.getUint32(this.pos);return this.pos+=4,i}readI32(){const i=this.view.getInt32(this.pos);return this.pos+=4,i}readU64(){const i=Nb(this.view,this.pos);return this.pos+=8,i}readI64(){const i=Dm(this.view,this.pos);return this.pos+=8,i}readU64AsBigInt(){const i=this.view.getBigUint64(this.pos);return this.pos+=8,i}readI64AsBigInt(){const i=this.view.getBigInt64(this.pos);return this.pos+=8,i}readF32(){const i=this.view.getFloat32(this.pos);return this.pos+=4,i}readF64(){const i=this.view.getFloat64(this.pos);return this.pos+=8,i}}function Jb(l,i){return new lc(i).decode(l)}const qm={contentType:"application/msgpack",encode:l=>Yb(l,{ignoreUndefined:!0}),decode:l=>Jb(l)},Fb={contentType:"application/json",encode:l=>cm(JSON.stringify(l)),decode:l=>JSON.parse(um(l))},Wb=l=>l?qm:Fb,Xp=async(l,i,s,r,c,f)=>{if(l.emit(Ue.unroutable,{source:s,target:r,reason:f}),i.type!==Ie.RequestMessage)return;const p=i.payload?.id;if(!p)return;const m={type:Je.error,id:p,code:c,error:{name:"RpcError",message:`${l.name}: ${f}`}},v=new hm;v.type=Ie.ErrorMessage,v.payload=m;try{await l.receive(v,l.name,s)}catch{}},Vp="presence",Ib=128,Gp=8,Qp=l=>typeof l=="string"&&l.length>0&&l.length<=Ib&&![...l].some(i=>i===" "||i.charCodeAt(0)<32||i.charCodeAt(0)===127);class Kp extends ar{url;options;announcePresence;allowInsecureTls;socket;connected=!1;codec=qm;knownPeers=new Set;carrying=[];constructor(i,s,r,c={},f=!0,p=!1){super(i,r),this.url=s,this.options=c,this.announcePresence=f,this.allowInsecureTls=p,queueMicrotask(()=>{this.open().catch(m=>this.emit(Ue.transportError,m))})}closing=!1;async close(){this.closing=!0;const i=this.socket;if(this.socket=void 0,this.connected=!1,this.readyFlag=!1,!i)return;i.io.reconnection(!1);const s=i.io.engine,r=i.connected&&s?new Promise(c=>{const f=setTimeout(c,2e3);f.unref?.(),s.once("close",()=>{clearTimeout(f),c()})}):Promise.resolve();i.disconnect(),await r,i.removeAllListeners(),this.knownPeers.clear()}async open(){if(this.socket)return;super.open();const i=this.url;this.allowInsecureTls&&(this.options={rejectUnauthorized:!1,...this.options},this.warnAboutInsecureTls()),this.socket=i?ws(i,this.options):ws(this.options),this.socket.on("message",async s=>{try{const[r,c,f]=this.extractHeader(new Uint8Array(s));if(!r){this.emit(Ue.rejected,{source:"unknown",reason:f??"no msgrpc header"});return}const p=this.codec.decode(c);await this.deliver(p,r.source,r.target,r.hops??0)}catch(r){this.emit(Ue.rejected,{source:"unknown",reason:`undecodable frame: ${String(r)}`,error:r})}}),this.socket.on(Vp,s=>{try{this.onPresence(s)}catch(r){this.emit(Ue.rejected,{source:"unknown",reason:`bad presence update: ${String(r)}`,error:r})}}),this.socket.on("connect",()=>{this.connected=!0,this.readyFlag=!0,this.announcePresence&&this.announce(),this.emit(Ue.connected)}),this.socket.on("disconnect",s=>{this.connected=!1,this.readyFlag=!1;for(const r of[...this.knownPeers])this.knownPeers.delete(r),this.emit(Ue.peerGone,r);this.emit(Ue.disconnected,s),s==="io server disconnect"&&!this.closing&&setTimeout(()=>{!this.closing&&this.socket?.disconnected&&this.socket.connect()},1e3).unref?.()})}warnAboutInsecureTls(){!this.url||!/^(https|wss):/i.test(this.url)||console.warn(`source-rpc: '${this.name}' is connecting to ${this.url} with allowInsecureTls, so the server's certificate is not checked. Anything able to answer on that address can read and rewrite this link. Use it for a development server, not a plant.`)}registerIfUnrouted(i){this.peerRegistry.get(i)||this.setKnownSource(i)}announce(){const i={name:this.name};this.carrying.length&&(i.carrying=this.carrying),this.socket?.emit(Vp,i)}advertise(i){const s=[...i].sort();s.length===this.carrying.length&&s.every((r,c)=>r===this.carrying[c])||(this.carrying=s,this.connected&&this.announcePresence&&this.announce())}onPresence(i){if(Array.isArray(i.peers)){for(const s of i.peers)!Qp(s)||s===this.name||this.knownPeers.has(s)||(this.knownPeers.add(s),this.registerIfUnrouted(s),this.emit(Ue.peerOnline,s));return}if(!(!Qp(i.peer)||i.peer===this.name))if(i.state==="offline"){if(!this.knownPeers.delete(i.peer))return;this.emit(Ue.peerGone,i.peer)}else{if(this.knownPeers.has(i.peer))return;this.knownPeers.add(i.peer),this.registerIfUnrouted(i.peer),this.emit(Ue.peerOnline,i.peer)}}async deliver(i,s,r,c){if(r!==this.name){const f=this.peerRegistry.get(r);if(f&&f!==this&&f.isTransport()){if(c+1>Gp){await Xp(this,i,s,r,"TransportError",`over ${Gp} relays`);return}const p=f;p.forward?p.forward(i,s,r,c+1):await f.receive(i,s,r);return}}if(this.targetExists(r)){await this.send(i,s,r);return}await Xp(this,i,s,r,"TransportError",`no route to '${r}'`)}forward(i,s,r,c){try{this.requireSocket().emit("message",this.frameMessage(this.buildHeader(s,r,{hops:c}),this.codec.encode(i)))}catch(f){this.emit(Ue.unroutable,{source:s,target:r,reason:`cannot forward: ${String(f)}`,error:f})}}requireSocket(){if(!this.socket)throw new Error(`SocketIoClientTransport '${this.name}': not connected to ${this.url??"the default url"}`);return this.socket}async receive(i,s,r){this.requireSocket().emit("message",this.frameMessage(this.buildHeader(s,r),this.codec.encode(i)))}isTransport(){return!0}}const rc=Object.freeze(`abandon
|
|
3
|
+
`+ps+e+ms}var ys=!1;function ni(e,t){if(!e||ys)return"";ys=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(R){var N=R}Reflect.construct(e,[],D)}else{try{D.call()}catch(R){N=R}e.call(D.prototype)}}else{try{throw Error()}catch(R){N=R}(D=e())&&typeof D.catch=="function"&&D.catch(function(){})}}catch(R){if(R&&N&&typeof R.stack=="string")return[R.stack,N.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),h=c[0],p=c[1];if(h&&p){var v=h.split(`
|
|
4
|
+
`),_=p.split(`
|
|
5
|
+
`);for(o=s=0;s<v.length&&!v[s].includes("DetermineComponentFrameRoot");)s++;for(;o<_.length&&!_[o].includes("DetermineComponentFrameRoot");)o++;if(s===v.length||o===_.length)for(s=v.length-1,o=_.length-1;1<=s&&0<=o&&v[s]!==_[o];)o--;for(;1<=s&&0<=o;s--,o--)if(v[s]!==_[o]){if(s!==1||o!==1)do if(s--,o--,0>o||v[s]!==_[o]){var M=`
|
|
6
|
+
`+v[s].replace(" at new "," at ");return e.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",e.displayName)),M}while(1<=s&&0<=o);break}}}finally{ys=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?rn(n):""}function Jt(e,t){switch(e.tag){case 26:case 27:case 5:return rn(e.type);case 16:return rn("Lazy");case 13:return e.child!==t&&t!==null?rn("Suspense Fallback"):rn("Suspense");case 19:return rn("SuspenseList");case 0:case 15:return ni(e.type,!1);case 11:return ni(e.type.render,!1);case 1:return ni(e.type,!0);case 31:return rn("Activity");default:return""}}function gs(e){try{var t="",n=null;do t+=Jt(e,n),n=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}}var Y=Object.prototype.hasOwnProperty,ae=r.unstable_scheduleCallback,Ue=r.unstable_cancelCallback,me=r.unstable_shouldYield,st=r.unstable_requestPaint,Ge=r.unstable_now,Ei=r.unstable_getCurrentPriorityLevel,cu=r.unstable_ImmediatePriority,uu=r.unstable_UserBlockingPriority,Ta=r.unstable_NormalPriority,Im=r.unstable_LowPriority,fu=r.unstable_IdlePriority,Pm=r.log,ey=r.unstable_setDisableYieldValue,vs=null,xt=null;function _n(e){if(typeof Pm=="function"&&ey(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(vs,e)}catch{}}var St=Math.clz32?Math.clz32:iy,ty=Math.log,ny=Math.LN2;function iy(e){return e>>>=0,e===0?32:31-(ty(e)/ny|0)|0}var _a=256,Aa=262144,Na=4194304;function ii(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Oa(e,t,n){var s=e.pendingLanes;if(s===0)return 0;var o=0,c=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var p=s&134217727;return p!==0?(s=p&~c,s!==0?o=ii(s):(h&=p,h!==0?o=ii(h):n||(n=p&~e,n!==0&&(o=ii(n))))):(p=s&~c,p!==0?o=ii(p):h!==0?o=ii(h):n||(n=s&~e,n!==0&&(o=ii(n)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:o}function bs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function sy(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hu(){var e=Na;return Na<<=1,(Na&62914560)===0&&(Na=4194304),e}function ur(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ws(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ay(e,t,n,s,o,c){var h=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,v=e.expirationTimes,_=e.hiddenUpdates;for(n=h&~n;0<n;){var M=31-St(n),D=1<<M;p[M]=0,v[M]=-1;var N=_[M];if(N!==null)for(_[M]=null,M=0;M<N.length;M++){var R=N[M];R!==null&&(R.lane&=-536870913)}n&=~D}s!==0&&du(e,s,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(h&~t))}function du(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-St(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|n&261930}function pu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-St(n),o=1<<s;o&t|e[s]&t&&(e[s]|=t),n&=~o}}function mu(e,t){var n=t&-t;return n=(n&42)!==0?1:fr(n),(n&(e.suspendedLanes|t))!==0?0:n}function fr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function hr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function yu(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:np(e.type))}function gu(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}var An=Math.random().toString(36).slice(2),at="__reactFiber$"+An,pt="__reactProps$"+An,ki="__reactContainer$"+An,dr="__reactEvents$"+An,ly="__reactListeners$"+An,ry="__reactHandles$"+An,vu="__reactResources$"+An,xs="__reactMarker$"+An;function pr(e){delete e[at],delete e[pt],delete e[dr],delete e[ly],delete e[ry]}function Ti(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ki]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hd(e);e!==null;){if(n=e[at])return n;e=Hd(e)}return t}e=n,n=e.parentNode}return null}function _i(e){if(e=e[at]||e[ki]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ss(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function Ai(e){var t=e[vu];return t||(t=e[vu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Pe(e){e[xs]=!0}var bu=new Set,wu={};function si(e,t){Ni(e,t),Ni(e+"Capture",t)}function Ni(e,t){for(wu[e]=t,e=0;e<t.length;e++)bu.add(t[e])}var oy=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]*$"),xu={},Su={};function cy(e){return Y.call(Su,e)?!0:Y.call(xu,e)?!1:oy.test(e)?Su[e]=!0:(xu[e]=!0,!1)}function Ra(e,t,n){if(cy(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function za(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function on(e,t,n,s){if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+s)}}function zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uy(e,t,n){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,c=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){n=""+h,c.call(this,h)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(h){n=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function mr(e){if(!e._valueTracker){var t=Eu(e)?"checked":"value";e._valueTracker=uy(e,t,""+e[t])}}function ku(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=Eu(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}function ja(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var fy=/[\n"\\]/g;function jt(e){return e.replace(fy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function yr(e,t,n,s,o,c,h,p){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zt(t)):e.value!==""+zt(t)&&(e.value=""+zt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?gr(e,h,zt(t)):n!=null?gr(e,h,zt(n)):s!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+zt(p):e.removeAttribute("name")}function Tu(e,t,n,s,o,c,h,p){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){mr(e);return}n=n!=null?""+zt(n):"",t=t!=null?""+zt(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=p?e.checked:!!s,e.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),mr(e)}function gr(e,t,n){t==="number"&&ja(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Oi(e,t,n,s){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&s&&(e[n].defaultSelected=!0)}else{for(n=""+zt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,s&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function _u(e,t,n){if(t!=null&&(t=""+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zt(n):""}function Au(e,t,n,s){if(t==null){if(s!=null){if(n!=null)throw Error(l(92));if(V(s)){if(1<s.length)throw Error(l(93));s=s[0]}n=s}n==null&&(n=""),t=n}n=zt(t),e.defaultValue=n,s=e.textContent,s===n&&s!==""&&s!==null&&(e.value=s),mr(e)}function Ri(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hy=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 Nu(e,t,n){var s=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,n):typeof n!="number"||n===0||hy.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ou(e,t,n){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var o in t)s=t[o],t.hasOwnProperty(o)&&n[o]!==s&&Nu(e,o,s)}else for(var c in t)t.hasOwnProperty(c)&&Nu(e,c,t[c])}function vr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var dy=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"]]),py=/^[\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 Ma(e){return py.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function cn(){}var br=null;function wr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zi=null,ji=null;function Ru(e){var t=_i(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(yr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+jt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var o=s[pt]||null;if(!o)throw Error(l(90));yr(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)s=n[t],s.form===e.form&&ku(s)}break e;case"textarea":_u(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Oi(e,!!n.multiple,t,!1)}}}var xr=!1;function zu(e,t,n){if(xr)return e(t,n);xr=!0;try{var s=e(t);return s}finally{if(xr=!1,(zi!==null||ji!==null)&&(wl(),zi&&(t=zi,e=ji,ji=zi=null,Ru(t),e)))for(t=0;t<e.length;t++)Ru(e[t])}}function Es(e,t){var n=e.stateNode;if(n===null)return null;var s=n[pt]||null;if(s===null)return null;n=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(l(231,t,typeof n));return n}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sr=!1;if(un)try{var ks={};Object.defineProperty(ks,"passive",{get:function(){Sr=!0}}),window.addEventListener("test",ks,ks),window.removeEventListener("test",ks,ks)}catch{Sr=!1}var Nn=null,Er=null,Ca=null;function ju(){if(Ca)return Ca;var e,t=Er,n=t.length,s,o="value"in Nn?Nn.value:Nn.textContent,c=o.length;for(e=0;e<n&&t[e]===o[e];e++);var h=n-e;for(s=1;s<=h&&t[n-s]===o[c-s];s++);return Ca=o.slice(e,1<s?1-s:void 0)}function Ua(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Da(){return!0}function Mu(){return!1}function mt(e){function t(n,s,o,c,h){this._reactName=n,this._targetInst=o,this.type=s,this.nativeEvent=c,this.target=h,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(c):c[p]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Da:Mu,this.isPropagationStopped=Mu,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Da)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Da)},persist:function(){},isPersistent:Da}),t}var ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ba=mt(ai),Ts=x({},ai,{view:0,detail:0}),my=mt(Ts),kr,Tr,_s,qa=x({},Ts,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ar,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_s&&(_s&&e.type==="mousemove"?(kr=e.screenX-_s.screenX,Tr=e.screenY-_s.screenY):Tr=kr=0,_s=e),kr)},movementY:function(e){return"movementY"in e?e.movementY:Tr}}),Cu=mt(qa),yy=x({},qa,{dataTransfer:0}),gy=mt(yy),vy=x({},Ts,{relatedTarget:0}),_r=mt(vy),by=x({},ai,{animationName:0,elapsedTime:0,pseudoElement:0}),wy=mt(by),xy=x({},ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sy=mt(xy),Ey=x({},ai,{data:0}),Uu=mt(Ey),ky={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ty={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"},_y={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ay(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_y[e])?!!t[e]:!1}function Ar(){return Ay}var Ny=x({},Ts,{key:function(e){if(e.key){var t=ky[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ua(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ty[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ar,charCode:function(e){return e.type==="keypress"?Ua(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ua(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Oy=mt(Ny),Ry=x({},qa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Du=mt(Ry),zy=x({},Ts,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ar}),jy=mt(zy),My=x({},ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cy=mt(My),Uy=x({},qa,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dy=mt(Uy),By=x({},ai,{newState:0,oldState:0}),qy=mt(By),Ly=[9,13,27,32],Nr=un&&"CompositionEvent"in window,As=null;un&&"documentMode"in document&&(As=document.documentMode);var Hy=un&&"TextEvent"in window&&!As,Bu=un&&(!Nr||As&&8<As&&11>=As),qu=" ",Lu=!1;function Hu(e,t){switch(e){case"keyup":return Ly.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $u(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mi=!1;function $y(e,t){switch(e){case"compositionend":return $u(t);case"keypress":return t.which!==32?null:(Lu=!0,qu);case"textInput":return e=t.data,e===qu&&Lu?null:e;default:return null}}function Yy(e,t){if(Mi)return e==="compositionend"||!Nr&&Hu(e,t)?(e=ju(),Ca=Er=Nn=null,Mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bu&&t.locale!=="ko"?null:t.data;default:return null}}var Vy={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 Yu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Vy[e.type]:t==="textarea"}function Vu(e,t,n,s){zi?ji?ji.push(s):ji=[s]:zi=s,t=Al(t,"onChange"),0<t.length&&(n=new Ba("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var Ns=null,Os=null;function Xy(e){_d(e,0)}function La(e){var t=Ss(e);if(ku(t))return e}function Xu(e,t){if(e==="change")return t}var Gu=!1;if(un){var Or;if(un){var Rr="oninput"in document;if(!Rr){var Qu=document.createElement("div");Qu.setAttribute("oninput","return;"),Rr=typeof Qu.oninput=="function"}Or=Rr}else Or=!1;Gu=Or&&(!document.documentMode||9<document.documentMode)}function Ku(){Ns&&(Ns.detachEvent("onpropertychange",Zu),Os=Ns=null)}function Zu(e){if(e.propertyName==="value"&&La(Os)){var t=[];Vu(t,Os,e,wr(e)),zu(Xy,t)}}function Gy(e,t,n){e==="focusin"?(Ku(),Ns=t,Os=n,Ns.attachEvent("onpropertychange",Zu)):e==="focusout"&&Ku()}function Qy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return La(Os)}function Ky(e,t){if(e==="click")return La(t)}function Zy(e,t){if(e==="input"||e==="change")return La(t)}function Jy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:Jy;function Rs(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var o=n[s];if(!Y.call(t,o)||!Et(e[o],t[o]))return!1}return!0}function Ju(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fu(e,t){var n=Ju(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ju(n)}}function Wu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Iu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ja(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ja(e.document)}return t}function zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Fy=un&&"documentMode"in document&&11>=document.documentMode,Ci=null,jr=null,zs=null,Mr=!1;function Pu(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mr||Ci==null||Ci!==ja(s)||(s=Ci,"selectionStart"in s&&zr(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),zs&&Rs(zs,s)||(zs=s,s=Al(jr,"onSelect"),0<s.length&&(t=new Ba("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=Ci)))}function li(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ui={animationend:li("Animation","AnimationEnd"),animationiteration:li("Animation","AnimationIteration"),animationstart:li("Animation","AnimationStart"),transitionrun:li("Transition","TransitionRun"),transitionstart:li("Transition","TransitionStart"),transitioncancel:li("Transition","TransitionCancel"),transitionend:li("Transition","TransitionEnd")},Cr={},ef={};un&&(ef=document.createElement("div").style,"AnimationEvent"in window||(delete Ui.animationend.animation,delete Ui.animationiteration.animation,delete Ui.animationstart.animation),"TransitionEvent"in window||delete Ui.transitionend.transition);function ri(e){if(Cr[e])return Cr[e];if(!Ui[e])return e;var t=Ui[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ef)return Cr[e]=t[n];return e}var tf=ri("animationend"),nf=ri("animationiteration"),sf=ri("animationstart"),Wy=ri("transitionrun"),Iy=ri("transitionstart"),Py=ri("transitioncancel"),af=ri("transitionend"),lf=new Map,Ur="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(" ");Ur.push("scrollEnd");function Yt(e,t){lf.set(e,t),si(t,[e])}var Ha=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Mt=[],Di=0,Dr=0;function $a(){for(var e=Di,t=Dr=Di=0;t<e;){var n=Mt[t];Mt[t++]=null;var s=Mt[t];Mt[t++]=null;var o=Mt[t];Mt[t++]=null;var c=Mt[t];if(Mt[t++]=null,s!==null&&o!==null){var h=s.pending;h===null?o.next=o:(o.next=h.next,h.next=o),s.pending=o}c!==0&&rf(n,o,c)}}function Ya(e,t,n,s){Mt[Di++]=e,Mt[Di++]=t,Mt[Di++]=n,Mt[Di++]=s,Dr|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Br(e,t,n,s){return Ya(e,t,n,s),Va(e)}function oi(e,t){return Ya(e,null,null,t),Va(e)}function rf(e,t,n){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n);for(var o=!1,c=e.return;c!==null;)c.childLanes|=n,s=c.alternate,s!==null&&(s.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-St(n),e=c.hiddenUpdates,s=e[o],s===null?e[o]=[t]:s.push(t),t.lane=n|536870912),c):null}function Va(e){if(50<Ps)throw Ps=0,Ko=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Bi={};function eg(e,t,n,s){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,t,n,s){return new eg(e,t,n,s)}function qr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fn(e,t){var n=e.alternate;return n===null?(n=kt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function of(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Xa(e,t,n,s,o,c){var h=0;if(s=e,typeof e=="function")qr(e)&&(h=1);else if(typeof e=="string")h=av(e,n,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=kt(31,n,t,o),e.elementType=ne,e.lanes=c,e;case Z:return ci(n.children,o,c,t);case F:h=8,o|=24;break;case z:return e=kt(12,n,t,o|2),e.elementType=z,e.lanes=c,e;case j:return e=kt(13,n,t,o),e.elementType=j,e.lanes=c,e;case H:return e=kt(19,n,t,o),e.elementType=H,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:h=10;break e;case G:h=9;break e;case O:h=11;break e;case C:h=14;break e;case Q:h=16,s=null;break e}h=29,n=Error(l(130,e===null?"null":typeof e,"")),s=null}return t=kt(h,n,t,o),t.elementType=e,t.type=s,t.lanes=c,t}function ci(e,t,n,s){return e=kt(7,e,s,t),e.lanes=n,e}function Lr(e,t,n){return e=kt(6,e,null,t),e.lanes=n,e}function cf(e){var t=kt(18,null,null,0);return t.stateNode=e,t}function Hr(e,t,n){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var uf=new WeakMap;function Ct(e,t){if(typeof e=="object"&&e!==null){var n=uf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:gs(t)},uf.set(e,t),t)}return{value:e,source:t,stack:gs(t)}}var qi=[],Li=0,Ga=null,js=0,Ut=[],Dt=0,On=null,Ft=1,Wt="";function hn(e,t){qi[Li++]=js,qi[Li++]=Ga,Ga=e,js=t}function ff(e,t,n){Ut[Dt++]=Ft,Ut[Dt++]=Wt,Ut[Dt++]=On,On=e;var s=Ft;e=Wt;var o=32-St(s)-1;s&=~(1<<o),n+=1;var c=32-St(t)+o;if(30<c){var h=o-o%5;c=(s&(1<<h)-1).toString(32),s>>=h,o-=h,Ft=1<<32-St(t)+o|n<<o|s,Wt=c+e}else Ft=1<<c|n<<o|s,Wt=e}function $r(e){e.return!==null&&(hn(e,1),ff(e,1,0))}function Yr(e){for(;e===Ga;)Ga=qi[--Li],qi[Li]=null,js=qi[--Li],qi[Li]=null;for(;e===On;)On=Ut[--Dt],Ut[Dt]=null,Wt=Ut[--Dt],Ut[Dt]=null,Ft=Ut[--Dt],Ut[Dt]=null}function hf(e,t){Ut[Dt++]=Ft,Ut[Dt++]=Wt,Ut[Dt++]=On,Ft=t.id,Wt=t.overflow,On=e}var lt=null,De=null,xe=!1,Rn=null,Bt=!1,Vr=Error(l(519));function zn(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ms(Ct(t,e)),Vr}function df(e){var t=e.stateNode,n=e.type,s=e.memoizedProps;switch(t[at]=e,t[pt]=s,n){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(n=0;n<ta.length;n++)ge(ta[n],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),Tu(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),Au(t,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||s.suppressHydrationWarning===!0||Rd(t.textContent,n)?(s.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),s.onScroll!=null&&ge("scroll",t),s.onScrollEnd!=null&&ge("scrollend",t),s.onClick!=null&&(t.onclick=cn),t=!0):t=!1,t||zn(e,!0)}function pf(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Bt=!1;return;case 27:case 3:Bt=!0;return;default:lt=lt.return}}function Hi(e){if(e!==lt)return!1;if(!xe)return pf(e),xe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||oc(e.type,e.memoizedProps)),n=!n),n&&De&&zn(e),pf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));De=Ld(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));De=Ld(e)}else t===27?(t=De,Gn(e.type)?(e=dc,dc=null,De=e):De=t):De=lt?Lt(e.stateNode.nextSibling):null;return!0}function ui(){De=lt=null,xe=!1}function Xr(){var e=Rn;return e!==null&&(bt===null?bt=e:bt.push.apply(bt,e),Rn=null),e}function Ms(e){Rn===null?Rn=[e]:Rn.push(e)}var Gr=w(null),fi=null,dn=null;function jn(e,t,n){X(Gr,t._currentValue),t._currentValue=n}function pn(e){e._currentValue=Gr.current,B(Gr)}function Qr(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function Kr(e,t,n,s){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var h=o.child;c=c.firstContext;e:for(;c!==null;){var p=c;c=o;for(var v=0;v<t.length;v++)if(p.context===t[v]){c.lanes|=n,p=c.alternate,p!==null&&(p.lanes|=n),Qr(c.return,n,e),s||(h=null);break e}c=p.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(l(341));h.lanes|=n,c=h.alternate,c!==null&&(c.lanes|=n),Qr(h,n,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function $i(e,t,n,s){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(l(387));if(h=h.memoizedProps,h!==null){var p=o.type;Et(o.pendingProps.value,h.value)||(e!==null?e.push(p):e=[p])}}else if(o===Ee.current){if(h=o.alternate,h===null)throw Error(l(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(la):e=[la])}o=o.return}e!==null&&Kr(t,e,n,s),t.flags|=262144}function Qa(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hi(e){fi=e,dn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rt(e){return mf(fi,e)}function Ka(e,t){return fi===null&&hi(e),mf(e,t)}function mf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},dn===null){if(e===null)throw Error(l(308));dn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else dn=dn.next=t;return n}var tg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},ng=r.unstable_scheduleCallback,ig=r.unstable_NormalPriority,Qe={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zr(){return{controller:new tg,data:new Map,refCount:0}}function Cs(e){e.refCount--,e.refCount===0&&ng(ig,function(){e.controller.abort()})}var Us=null,Jr=0,Yi=0,Vi=null;function sg(e,t){if(Us===null){var n=Us=[];Jr=0,Yi=Po(),Vi={status:"pending",value:void 0,then:function(s){n.push(s)}}}return Jr++,t.then(yf,yf),t}function yf(){if(--Jr===0&&Us!==null){Vi!==null&&(Vi.status="fulfilled");var e=Us;Us=null,Yi=0,Vi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ag(e,t){var n=[],s={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(s.status="rejected",s.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),s}var gf=k.S;k.S=function(e,t){ed=Ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sg(e,t),gf!==null&&gf(e,t)};var di=w(null);function Fr(){var e=di.current;return e!==null?e:Ce.pooledCache}function Za(e,t){t===null?X(di,di.current):X(di,t.pool)}function vf(){var e=Fr();return e===null?null:{parent:Qe._currentValue,pool:e}}var Xi=Error(l(460)),Wr=Error(l(474)),Ja=Error(l(542)),Fa={then:function(){}};function bf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sf(e),e;default:if(typeof t.status=="string")t.then(cn,cn);else{if(e=Ce,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=s}},function(s){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sf(e),e}throw mi=t,Xi}}function pi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(mi=n,Xi):n}}var mi=null;function xf(){if(mi===null)throw Error(l(459));var e=mi;return mi=null,e}function Sf(e){if(e===Xi||e===Ja)throw Error(l(483))}var Gi=null,Ds=0;function Wa(e){var t=Ds;return Ds+=1,Gi===null&&(Gi=[]),wf(Gi,e,t)}function Bs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ia(e,t){throw t.$$typeof===q?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ef(e){function t(E,S){if(e){var T=E.deletions;T===null?(E.deletions=[S],E.flags|=16):T.push(S)}}function n(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function s(E){for(var S=new Map;E!==null;)E.key!==null?S.set(E.key,E):S.set(E.index,E),E=E.sibling;return S}function o(E,S){return E=fn(E,S),E.index=0,E.sibling=null,E}function c(E,S,T){return E.index=T,e?(T=E.alternate,T!==null?(T=T.index,T<S?(E.flags|=67108866,S):T):(E.flags|=67108866,S)):(E.flags|=1048576,S)}function h(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function p(E,S,T,U){return S===null||S.tag!==6?(S=Lr(T,E.mode,U),S.return=E,S):(S=o(S,T),S.return=E,S)}function v(E,S,T,U){var ie=T.type;return ie===Z?M(E,S,T.props.children,U,T.key):S!==null&&(S.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===Q&&pi(ie)===S.type)?(S=o(S,T.props),Bs(S,T),S.return=E,S):(S=Xa(T.type,T.key,T.props,null,E.mode,U),Bs(S,T),S.return=E,S)}function _(E,S,T,U){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=Hr(T,E.mode,U),S.return=E,S):(S=o(S,T.children||[]),S.return=E,S)}function M(E,S,T,U,ie){return S===null||S.tag!==7?(S=ci(T,E.mode,U,ie),S.return=E,S):(S=o(S,T),S.return=E,S)}function D(E,S,T){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Lr(""+S,E.mode,T),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case L:return T=Xa(S.type,S.key,S.props,null,E.mode,T),Bs(T,S),T.return=E,T;case K:return S=Hr(S,E.mode,T),S.return=E,S;case Q:return S=pi(S),D(E,S,T)}if(V(S)||ve(S))return S=ci(S,E.mode,T,null),S.return=E,S;if(typeof S.then=="function")return D(E,Wa(S),T);if(S.$$typeof===te)return D(E,Ka(E,S),T);Ia(E,S)}return null}function N(E,S,T,U){var ie=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return ie!==null?null:p(E,S,""+T,U);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case L:return T.key===ie?v(E,S,T,U):null;case K:return T.key===ie?_(E,S,T,U):null;case Q:return T=pi(T),N(E,S,T,U)}if(V(T)||ve(T))return ie!==null?null:M(E,S,T,U,null);if(typeof T.then=="function")return N(E,S,Wa(T),U);if(T.$$typeof===te)return N(E,S,Ka(E,T),U);Ia(E,T)}return null}function R(E,S,T,U,ie){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return E=E.get(T)||null,p(S,E,""+U,ie);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case L:return E=E.get(U.key===null?T:U.key)||null,v(S,E,U,ie);case K:return E=E.get(U.key===null?T:U.key)||null,_(S,E,U,ie);case Q:return U=pi(U),R(E,S,T,U,ie)}if(V(U)||ve(U))return E=E.get(T)||null,M(S,E,U,ie,null);if(typeof U.then=="function")return R(E,S,T,Wa(U),ie);if(U.$$typeof===te)return R(E,S,T,Ka(S,U),ie);Ia(S,U)}return null}function I(E,S,T,U){for(var ie=null,ke=null,ee=S,de=S=0,we=null;ee!==null&&de<T.length;de++){ee.index>de?(we=ee,ee=null):we=ee.sibling;var Te=N(E,ee,T[de],U);if(Te===null){ee===null&&(ee=we);break}e&&ee&&Te.alternate===null&&t(E,ee),S=c(Te,S,de),ke===null?ie=Te:ke.sibling=Te,ke=Te,ee=we}if(de===T.length)return n(E,ee),xe&&hn(E,de),ie;if(ee===null){for(;de<T.length;de++)ee=D(E,T[de],U),ee!==null&&(S=c(ee,S,de),ke===null?ie=ee:ke.sibling=ee,ke=ee);return xe&&hn(E,de),ie}for(ee=s(ee);de<T.length;de++)we=R(ee,E,de,T[de],U),we!==null&&(e&&we.alternate!==null&&ee.delete(we.key===null?de:we.key),S=c(we,S,de),ke===null?ie=we:ke.sibling=we,ke=we);return e&&ee.forEach(function(Fn){return t(E,Fn)}),xe&&hn(E,de),ie}function le(E,S,T,U){if(T==null)throw Error(l(151));for(var ie=null,ke=null,ee=S,de=S=0,we=null,Te=T.next();ee!==null&&!Te.done;de++,Te=T.next()){ee.index>de?(we=ee,ee=null):we=ee.sibling;var Fn=N(E,ee,Te.value,U);if(Fn===null){ee===null&&(ee=we);break}e&&ee&&Fn.alternate===null&&t(E,ee),S=c(Fn,S,de),ke===null?ie=Fn:ke.sibling=Fn,ke=Fn,ee=we}if(Te.done)return n(E,ee),xe&&hn(E,de),ie;if(ee===null){for(;!Te.done;de++,Te=T.next())Te=D(E,Te.value,U),Te!==null&&(S=c(Te,S,de),ke===null?ie=Te:ke.sibling=Te,ke=Te);return xe&&hn(E,de),ie}for(ee=s(ee);!Te.done;de++,Te=T.next())Te=R(ee,E,de,Te.value,U),Te!==null&&(e&&Te.alternate!==null&&ee.delete(Te.key===null?de:Te.key),S=c(Te,S,de),ke===null?ie=Te:ke.sibling=Te,ke=Te);return e&&ee.forEach(function(yv){return t(E,yv)}),xe&&hn(E,de),ie}function je(E,S,T,U){if(typeof T=="object"&&T!==null&&T.type===Z&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case L:e:{for(var ie=T.key;S!==null;){if(S.key===ie){if(ie=T.type,ie===Z){if(S.tag===7){n(E,S.sibling),U=o(S,T.props.children),U.return=E,E=U;break e}}else if(S.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===Q&&pi(ie)===S.type){n(E,S.sibling),U=o(S,T.props),Bs(U,T),U.return=E,E=U;break e}n(E,S);break}else t(E,S);S=S.sibling}T.type===Z?(U=ci(T.props.children,E.mode,U,T.key),U.return=E,E=U):(U=Xa(T.type,T.key,T.props,null,E.mode,U),Bs(U,T),U.return=E,E=U)}return h(E);case K:e:{for(ie=T.key;S!==null;){if(S.key===ie)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){n(E,S.sibling),U=o(S,T.children||[]),U.return=E,E=U;break e}else{n(E,S);break}else t(E,S);S=S.sibling}U=Hr(T,E.mode,U),U.return=E,E=U}return h(E);case Q:return T=pi(T),je(E,S,T,U)}if(V(T))return I(E,S,T,U);if(ve(T)){if(ie=ve(T),typeof ie!="function")throw Error(l(150));return T=ie.call(T),le(E,S,T,U)}if(typeof T.then=="function")return je(E,S,Wa(T),U);if(T.$$typeof===te)return je(E,S,Ka(E,T),U);Ia(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,S!==null&&S.tag===6?(n(E,S.sibling),U=o(S,T),U.return=E,E=U):(n(E,S),U=Lr(T,E.mode,U),U.return=E,E=U),h(E)):n(E,S)}return function(E,S,T,U){try{Ds=0;var ie=je(E,S,T,U);return Gi=null,ie}catch(ee){if(ee===Xi||ee===Ja)throw ee;var ke=kt(29,ee,null,E.mode);return ke.lanes=U,ke.return=E,ke}}}var yi=Ef(!0),kf=Ef(!1),Mn=!1;function Ir(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Cn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Un(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(_e&2)!==0){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,t=Va(e),rf(e,null,n),t}return Ya(e,s,t,n),Va(e)}function qs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,pu(e,n)}}function eo(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var o=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?o=c=h:c=c.next=h,n=n.next}while(n!==null);c===null?o=c=t:c=c.next=t}else o=c=t;n={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var to=!1;function Ls(){if(to){var e=Vi;if(e!==null)throw e}}function Hs(e,t,n,s){to=!1;var o=e.updateQueue;Mn=!1;var c=o.firstBaseUpdate,h=o.lastBaseUpdate,p=o.shared.pending;if(p!==null){o.shared.pending=null;var v=p,_=v.next;v.next=null,h===null?c=_:h.next=_,h=v;var M=e.alternate;M!==null&&(M=M.updateQueue,p=M.lastBaseUpdate,p!==h&&(p===null?M.firstBaseUpdate=_:p.next=_,M.lastBaseUpdate=v))}if(c!==null){var D=o.baseState;h=0,M=_=v=null,p=c;do{var N=p.lane&-536870913,R=N!==p.lane;if(R?(be&N)===N:(s&N)===N){N!==0&&N===Yi&&(to=!0),M!==null&&(M=M.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var I=e,le=p;N=t;var je=n;switch(le.tag){case 1:if(I=le.payload,typeof I=="function"){D=I.call(je,D,N);break e}D=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=le.payload,N=typeof I=="function"?I.call(je,D,N):I,N==null)break e;D=x({},D,N);break e;case 2:Mn=!0}}N=p.callback,N!==null&&(e.flags|=64,R&&(e.flags|=8192),R=o.callbacks,R===null?o.callbacks=[N]:R.push(N))}else R={lane:N,tag:p.tag,payload:p.payload,callback:p.callback,next:null},M===null?(_=M=R,v=D):M=M.next=R,h|=N;if(p=p.next,p===null){if(p=o.shared.pending,p===null)break;R=p,p=R.next,R.next=null,o.lastBaseUpdate=R,o.shared.pending=null}}while(!0);M===null&&(v=D),o.baseState=v,o.firstBaseUpdate=_,o.lastBaseUpdate=M,c===null&&(o.shared.lanes=0),Hn|=h,e.lanes=h,e.memoizedState=D}}function Tf(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function _f(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Tf(n[e],t)}var Qi=w(null),Pa=w(0);function Af(e,t){e=En,X(Pa,e),X(Qi,t),En=e|t.baseLanes}function no(){X(Pa,En),X(Qi,Qi.current)}function io(){En=Pa.current,B(Qi),B(Pa)}var Tt=w(null),qt=null;function Dn(e){var t=e.alternate;X(Ye,Ye.current&1),X(Tt,e),qt===null&&(t===null||Qi.current!==null||t.memoizedState!==null)&&(qt=e)}function so(e){X(Ye,Ye.current),X(Tt,e),qt===null&&(qt=e)}function Nf(e){e.tag===22?(X(Ye,Ye.current),X(Tt,e),qt===null&&(qt=e)):Bn()}function Bn(){X(Ye,Ye.current),X(Tt,Tt.current)}function _t(e){B(Tt),qt===e&&(qt=null),B(Ye)}var Ye=w(0);function el(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||fc(n)||hc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=0,fe=null,Re=null,Ke=null,tl=!1,Ki=!1,gi=!1,nl=0,$s=0,Zi=null,lg=0;function He(){throw Error(l(321))}function ao(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Et(e[n],t[n]))return!1;return!0}function lo(e,t,n,s,o,c){return mn=c,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?fh:So,gi=!1,c=n(s,o),gi=!1,Ki&&(c=Rf(t,n,s,o)),Of(e),c}function Of(e){k.H=Xs;var t=Re!==null&&Re.next!==null;if(mn=0,Ke=Re=fe=null,tl=!1,$s=0,Zi=null,t)throw Error(l(300));e===null||Ze||(e=e.dependencies,e!==null&&Qa(e)&&(Ze=!0))}function Rf(e,t,n,s){fe=e;var o=0;do{if(Ki&&(Zi=null),$s=0,Ki=!1,25<=o)throw Error(l(301));if(o+=1,Ke=Re=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}k.H=hh,c=t(n,s)}while(Ki);return c}function rg(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Ys(t):t,e=e.useState()[0],(Re!==null?Re.memoizedState:null)!==e&&(fe.flags|=1024),t}function ro(){var e=nl!==0;return nl=0,e}function oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function co(e){if(tl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}tl=!1}mn=0,Ke=Re=fe=null,Ki=!1,$s=nl=0,Zi=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?fe.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function Ve(){if(Re===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Re.next;var t=Ke===null?fe.memoizedState:Ke.next;if(t!==null)Ke=t,Re=e;else{if(e===null)throw fe.alternate===null?Error(l(467)):Error(l(310));Re=e,e={memoizedState:Re.memoizedState,baseState:Re.baseState,baseQueue:Re.baseQueue,queue:Re.queue,next:null},Ke===null?fe.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function il(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ys(e){var t=$s;return $s+=1,Zi===null&&(Zi=[]),e=wf(Zi,e,t),t=fe,(Ke===null?t.memoizedState:Ke.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?fh:So),e}function sl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ys(e);if(e.$$typeof===te)return rt(e)}throw Error(l(438,String(e)))}function uo(e){var t=null,n=fe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var s=fe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=il(),fe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),s=0;s<e;s++)n[s]=se;return t.index++,n}function yn(e,t){return typeof t=="function"?t(e):t}function al(e){var t=Ve();return fo(t,Re,e)}function fo(e,t,n){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=n;var o=e.baseQueue,c=s.pending;if(c!==null){if(o!==null){var h=o.next;o.next=c.next,c.next=h}t.baseQueue=o=c,s.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var p=h=null,v=null,_=t,M=!1;do{var D=_.lane&-536870913;if(D!==_.lane?(be&D)===D:(mn&D)===D){var N=_.revertLane;if(N===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),D===Yi&&(M=!0);else if((mn&N)===N){_=_.next,N===Yi&&(M=!0);continue}else D={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},v===null?(p=v=D,h=c):v=v.next=D,fe.lanes|=N,Hn|=N;D=_.action,gi&&n(c,D),c=_.hasEagerState?_.eagerState:n(c,D)}else N={lane:D,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},v===null?(p=v=N,h=c):v=v.next=N,fe.lanes|=D,Hn|=D;_=_.next}while(_!==null&&_!==t);if(v===null?h=c:v.next=p,!Et(c,e.memoizedState)&&(Ze=!0,M&&(n=Vi,n!==null)))throw n;e.memoizedState=c,e.baseState=h,e.baseQueue=v,s.lastRenderedState=c}return o===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ho(e){var t=Ve(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var s=n.dispatch,o=n.pending,c=t.memoizedState;if(o!==null){n.pending=null;var h=o=o.next;do c=e(c,h.action),h=h.next;while(h!==o);Et(c,t.memoizedState)||(Ze=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,s]}function zf(e,t,n){var s=fe,o=Ve(),c=xe;if(c){if(n===void 0)throw Error(l(407));n=n()}else n=t();var h=!Et((Re||o).memoizedState,n);if(h&&(o.memoizedState=n,Ze=!0),o=o.queue,yo(Cf.bind(null,s,o,e),[e]),o.getSnapshot!==t||h||Ke!==null&&Ke.memoizedState.tag&1){if(s.flags|=2048,Ji(9,{destroy:void 0},Mf.bind(null,s,o,n,t),null),Ce===null)throw Error(l(349));c||(mn&127)!==0||jf(s,t,n)}return n}function jf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t=il(),fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mf(e,t,n,s){t.value=n,t.getSnapshot=s,Uf(t)&&Df(e)}function Cf(e,t,n){return n(function(){Uf(t)&&Df(e)})}function Uf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Et(e,n)}catch{return!0}}function Df(e){var t=oi(e,2);t!==null&&wt(t,e,2)}function po(e){var t=ht();if(typeof e=="function"){var n=e;if(e=n(),gi){_n(!0);try{n()}finally{_n(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:e},t}function Bf(e,t,n,s){return e.baseState=n,fo(e,Re,typeof s=="function"?s:yn)}function og(e,t,n,s,o){if(ol(e))throw Error(l(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){c.listeners.push(h)}};k.T!==null?n(!0):c.isTransition=!1,s(c),n=t.pending,n===null?(c.next=t.pending=c,qf(t,c)):(c.next=n.next,t.pending=n.next=c)}}function qf(e,t){var n=t.action,s=t.payload,o=e.state;if(t.isTransition){var c=k.T,h={};k.T=h;try{var p=n(o,s),v=k.S;v!==null&&v(h,p),Lf(e,t,p)}catch(_){mo(e,t,_)}finally{c!==null&&h.types!==null&&(c.types=h.types),k.T=c}}else try{c=n(o,s),Lf(e,t,c)}catch(_){mo(e,t,_)}}function Lf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){Hf(e,t,s)},function(s){return mo(e,t,s)}):Hf(e,t,n)}function Hf(e,t,n){t.status="fulfilled",t.value=n,$f(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,qf(e,n)))}function mo(e,t,n){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=n,$f(t),t=t.next;while(t!==s)}e.action=null}function $f(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yf(e,t){return t}function Vf(e,t){if(xe){var n=Ce.formState;if(n!==null){e:{var s=fe;if(xe){if(De){t:{for(var o=De,c=Bt;o.nodeType!==8;){if(!c){o=null;break t}if(o=Lt(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){De=Lt(o.nextSibling),s=o.data==="F!";break e}}zn(s)}s=!1}s&&(t=n[0])}}return n=ht(),n.memoizedState=n.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yf,lastRenderedState:t},n.queue=s,n=oh.bind(null,fe,s),s.dispatch=n,s=po(!1),c=xo.bind(null,fe,!1,s.queue),s=ht(),o={state:t,dispatch:null,action:e,pending:null},s.queue=o,n=og.bind(null,fe,o,c,n),o.dispatch=n,s.memoizedState=e,[t,n,!1]}function Xf(e){var t=Ve();return Gf(t,Re,e)}function Gf(e,t,n){if(t=fo(e,t,Yf)[0],e=al(yn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ys(t)}catch(h){throw h===Xi?Ja:h}else s=t;t=Ve();var o=t.queue,c=o.dispatch;return n!==t.memoizedState&&(fe.flags|=2048,Ji(9,{destroy:void 0},cg.bind(null,o,n),null)),[s,c,e]}function cg(e,t){e.action=t}function Qf(e){var t=Ve(),n=Re;if(n!==null)return Gf(t,n,e);Ve(),t=t.memoizedState,n=Ve();var s=n.queue.dispatch;return n.memoizedState=e,[t,s,!1]}function Ji(e,t,n,s){return e={tag:e,create:n,deps:s,inst:t,next:null},t=fe.updateQueue,t===null&&(t=il(),fe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e),e}function Kf(){return Ve().memoizedState}function ll(e,t,n,s){var o=ht();fe.flags|=e,o.memoizedState=Ji(1|t,{destroy:void 0},n,s===void 0?null:s)}function rl(e,t,n,s){var o=Ve();s=s===void 0?null:s;var c=o.memoizedState.inst;Re!==null&&s!==null&&ao(s,Re.memoizedState.deps)?o.memoizedState=Ji(t,c,n,s):(fe.flags|=e,o.memoizedState=Ji(1|t,c,n,s))}function Zf(e,t){ll(8390656,8,e,t)}function yo(e,t){rl(2048,8,e,t)}function ug(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=il(),fe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Jf(e){var t=Ve().memoizedState;return ug({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function Ff(e,t){return rl(4,2,e,t)}function Wf(e,t){return rl(4,4,e,t)}function If(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pf(e,t,n){n=n!=null?n.concat([e]):null,rl(4,4,If.bind(null,t,e),n)}function go(){}function eh(e,t){var n=Ve();t=t===void 0?null:t;var s=n.memoizedState;return t!==null&&ao(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function th(e,t){var n=Ve();t=t===void 0?null:t;var s=n.memoizedState;if(t!==null&&ao(t,s[1]))return s[0];if(s=e(),gi){_n(!0);try{e()}finally{_n(!1)}}return n.memoizedState=[s,t],s}function vo(e,t,n){return n===void 0||(mn&1073741824)!==0&&(be&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=nd(),fe.lanes|=e,Hn|=e,n)}function nh(e,t,n,s){return Et(n,t)?n:Qi.current!==null?(e=vo(e,n,s),Et(e,t)||(Ze=!0),e):(mn&42)===0||(mn&1073741824)!==0&&(be&261930)===0?(Ze=!0,e.memoizedState=n):(e=nd(),fe.lanes|=e,Hn|=e,t)}function ih(e,t,n,s,o){var c=$.p;$.p=c!==0&&8>c?c:8;var h=k.T,p={};k.T=p,xo(e,!1,t,n);try{var v=o(),_=k.S;if(_!==null&&_(p,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var M=ag(v,s);Vs(e,t,M,Ot(e))}else Vs(e,t,s,Ot(e))}catch(D){Vs(e,t,{then:function(){},status:"rejected",reason:D},Ot())}finally{$.p=c,h!==null&&p.types!==null&&(h.types=p.types),k.T=h}}function fg(){}function bo(e,t,n,s){if(e.tag!==5)throw Error(l(476));var o=sh(e).queue;ih(e,o,t,W,n===null?fg:function(){return ah(e),n(s)})}function sh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:W},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ah(e){var t=sh(e);t.next===null&&(t=e.alternate.memoizedState),Vs(e,t.next.queue,{},Ot())}function wo(){return rt(la)}function lh(){return Ve().memoizedState}function rh(){return Ve().memoizedState}function hg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ot();e=Cn(n);var s=Un(t,e,n);s!==null&&(wt(s,t,n),qs(s,t,n)),t={cache:Zr()},e.payload=t;return}t=t.return}}function dg(e,t,n){var s=Ot();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ol(e)?ch(t,n):(n=Br(e,t,n,s),n!==null&&(wt(n,e,s),uh(n,t,s)))}function oh(e,t,n){var s=Ot();Vs(e,t,n,s)}function Vs(e,t,n,s){var o={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ol(e))ch(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var h=t.lastRenderedState,p=c(h,n);if(o.hasEagerState=!0,o.eagerState=p,Et(p,h))return Ya(e,t,o,0),Ce===null&&$a(),!1}catch{}if(n=Br(e,t,o,s),n!==null)return wt(n,e,s),uh(n,t,s),!0}return!1}function xo(e,t,n,s){if(s={lane:2,revertLane:Po(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},ol(e)){if(t)throw Error(l(479))}else t=Br(e,n,s,2),t!==null&&wt(t,e,2)}function ol(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function ch(e,t){Ki=tl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uh(e,t,n){if((n&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,pu(e,n)}}var Xs={readContext:rt,use:sl,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useLayoutEffect:He,useInsertionEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useSyncExternalStore:He,useId:He,useHostTransitionStatus:He,useFormState:He,useActionState:He,useOptimistic:He,useMemoCache:He,useCacheRefresh:He};Xs.useEffectEvent=He;var fh={readContext:rt,use:sl,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:Zf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ll(4194308,4,If.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ll(4194308,4,e,t)},useInsertionEffect:function(e,t){ll(4,2,e,t)},useMemo:function(e,t){var n=ht();t=t===void 0?null:t;var s=e();if(gi){_n(!0);try{e()}finally{_n(!1)}}return n.memoizedState=[s,t],s},useReducer:function(e,t,n){var s=ht();if(n!==void 0){var o=n(t);if(gi){_n(!0);try{n(t)}finally{_n(!1)}}}else o=t;return s.memoizedState=s.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},s.queue=e,e=e.dispatch=dg.bind(null,fe,e),[s.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=po(e);var t=e.queue,n=oh.bind(null,fe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:go,useDeferredValue:function(e,t){var n=ht();return vo(n,e,t)},useTransition:function(){var e=po(!1);return e=ih.bind(null,fe,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var s=fe,o=ht();if(xe){if(n===void 0)throw Error(l(407));n=n()}else{if(n=t(),Ce===null)throw Error(l(349));(be&127)!==0||jf(s,t,n)}o.memoizedState=n;var c={value:n,getSnapshot:t};return o.queue=c,Zf(Cf.bind(null,s,c,e),[e]),s.flags|=2048,Ji(9,{destroy:void 0},Mf.bind(null,s,c,n,t),null),n},useId:function(){var e=ht(),t=Ce.identifierPrefix;if(xe){var n=Wt,s=Ft;n=(s&~(1<<32-St(s)-1)).toString(32)+n,t="_"+t+"R_"+n,n=nl++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=lg++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wo,useFormState:Vf,useActionState:Vf,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=xo.bind(null,fe,!0,n),n.dispatch=t,[e,t]},useMemoCache:uo,useCacheRefresh:function(){return ht().memoizedState=hg.bind(null,fe)},useEffectEvent:function(e){var t=ht(),n={impl:e};return t.memoizedState=n,function(){if((_e&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}},So={readContext:rt,use:sl,useCallback:eh,useContext:rt,useEffect:yo,useImperativeHandle:Pf,useInsertionEffect:Ff,useLayoutEffect:Wf,useMemo:th,useReducer:al,useRef:Kf,useState:function(){return al(yn)},useDebugValue:go,useDeferredValue:function(e,t){var n=Ve();return nh(n,Re.memoizedState,e,t)},useTransition:function(){var e=al(yn)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:zf,useId:lh,useHostTransitionStatus:wo,useFormState:Xf,useActionState:Xf,useOptimistic:function(e,t){var n=Ve();return Bf(n,Re,e,t)},useMemoCache:uo,useCacheRefresh:rh};So.useEffectEvent=Jf;var hh={readContext:rt,use:sl,useCallback:eh,useContext:rt,useEffect:yo,useImperativeHandle:Pf,useInsertionEffect:Ff,useLayoutEffect:Wf,useMemo:th,useReducer:ho,useRef:Kf,useState:function(){return ho(yn)},useDebugValue:go,useDeferredValue:function(e,t){var n=Ve();return Re===null?vo(n,e,t):nh(n,Re.memoizedState,e,t)},useTransition:function(){var e=ho(yn)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:zf,useId:lh,useHostTransitionStatus:wo,useFormState:Qf,useActionState:Qf,useOptimistic:function(e,t){var n=Ve();return Re!==null?Bf(n,Re,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:uo,useCacheRefresh:rh};hh.useEffectEvent=Jf;function Eo(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:x({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ko={enqueueSetState:function(e,t,n){e=e._reactInternals;var s=Ot(),o=Cn(s);o.payload=t,n!=null&&(o.callback=n),t=Un(e,o,s),t!==null&&(wt(t,e,s),qs(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=Ot(),o=Cn(s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Un(e,o,s),t!==null&&(wt(t,e,s),qs(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ot(),s=Cn(n);s.tag=2,t!=null&&(s.callback=t),t=Un(e,s,n),t!==null&&(wt(t,e,n),qs(t,e,n))}};function dh(e,t,n,s,o,c,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,h):t.prototype&&t.prototype.isPureReactComponent?!Rs(n,s)||!Rs(o,c):!0}function ph(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&ko.enqueueReplaceState(t,t.state,null)}function vi(e,t){var n=t;if("ref"in t){n={};for(var s in t)s!=="ref"&&(n[s]=t[s])}if(e=e.defaultProps){n===t&&(n=x({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function mh(e){Ha(e)}function yh(e){console.error(e)}function gh(e){Ha(e)}function cl(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function vh(e,t,n){try{var s=e.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function To(e,t,n){return n=Cn(n),n.tag=3,n.payload={element:null},n.callback=function(){cl(e,t)},n}function bh(e){return e=Cn(e),e.tag=3,e}function wh(e,t,n,s){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var c=s.value;e.payload=function(){return o(c)},e.callback=function(){vh(t,n,s)}}var h=n.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){vh(t,n,s),typeof o!="function"&&($n===null?$n=new Set([this]):$n.add(this));var p=s.stack;this.componentDidCatch(s.value,{componentStack:p!==null?p:""})})}function pg(e,t,n,s,o){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=n.alternate,t!==null&&$i(t,n,o,!0),n=Tt.current,n!==null){switch(n.tag){case 31:case 13:return qt===null?xl():n.alternate===null&&$e===0&&($e=3),n.flags&=-257,n.flags|=65536,n.lanes=o,s===Fa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([s]):t.add(s),Fo(e,s,o)),!1;case 22:return n.flags|=65536,s===Fa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([s]):n.add(s)),Fo(e,s,o)),!1}throw Error(l(435,n.tag))}return Fo(e,s,o),xl(),!1}if(xe)return t=Tt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,s!==Vr&&(e=Error(l(422),{cause:s}),Ms(Ct(e,n)))):(s!==Vr&&(t=Error(l(423),{cause:s}),Ms(Ct(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,s=Ct(s,n),o=To(e.stateNode,s,o),eo(e,o),$e!==4&&($e=2)),!1;var c=Error(l(520),{cause:s});if(c=Ct(c,n),Is===null?Is=[c]:Is.push(c),$e!==4&&($e=2),t===null)return!0;s=Ct(s,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=To(n.stateNode,s,e),eo(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&($n===null||!$n.has(c))))return n.flags|=65536,o&=-o,n.lanes|=o,o=bh(o),wh(o,e,n,s),eo(n,o),!1}n=n.return}while(n!==null);return!1}var _o=Error(l(461)),Ze=!1;function ot(e,t,n,s){t.child=e===null?kf(t,null,n,s):yi(t,e.child,n,s)}function xh(e,t,n,s,o){n=n.render;var c=t.ref;if("ref"in s){var h={};for(var p in s)p!=="ref"&&(h[p]=s[p])}else h=s;return hi(t),s=lo(e,t,n,h,c,o),p=ro(),e!==null&&!Ze?(oo(e,t,o),gn(e,t,o)):(xe&&p&&$r(t),t.flags|=1,ot(e,t,s,o),t.child)}function Sh(e,t,n,s,o){if(e===null){var c=n.type;return typeof c=="function"&&!qr(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,Eh(e,t,c,s,o)):(e=Xa(n.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Co(e,o)){var h=c.memoizedProps;if(n=n.compare,n=n!==null?n:Rs,n(h,s)&&e.ref===t.ref)return gn(e,t,o)}return t.flags|=1,e=fn(c,s),e.ref=t.ref,e.return=t,t.child=e}function Eh(e,t,n,s,o){if(e!==null){var c=e.memoizedProps;if(Rs(c,s)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=s=c,Co(e,o))(e.flags&131072)!==0&&(Ze=!0);else return t.lanes=e.lanes,gn(e,t,o)}return Ao(e,t,n,s,o)}function kh(e,t,n,s){var o=s.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(s=t.child=e.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~c}else s=0,t.child=null;return Th(e,t,c,n,s)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Za(t,c!==null?c.cachePool:null),c!==null?Af(t,c):no(),Nf(t);else return s=t.lanes=536870912,Th(e,t,c!==null?c.baseLanes|n:n,n,s)}else c!==null?(Za(t,c.cachePool),Af(t,c),Bn(),t.memoizedState=null):(e!==null&&Za(t,null),no(),Bn());return ot(e,t,o,n),t.child}function Gs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Th(e,t,n,s,o){var c=Fr();return c=c===null?null:{parent:Qe._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&Za(t,null),no(),Nf(t),e!==null&&$i(e,t,s,!0),t.childLanes=o,null}function ul(e,t){return t=hl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _h(e,t,n){return yi(t,e.child,null,n),e=ul(t,t.pendingProps),e.flags|=2,_t(t),t.memoizedState=null,e}function mg(e,t,n){var s=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(xe){if(s.mode==="hidden")return e=ul(t,s),t.lanes=536870912,Gs(null,e);if(so(t),(e=De)?(e=qd(e,Bt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:On!==null?{id:Ft,overflow:Wt}:null,retryLane:536870912,hydrationErrors:null},n=cf(e),n.return=t,t.child=n,lt=t,De=null)):e=null,e===null)throw zn(t);return t.lanes=536870912,null}return ul(t,s)}var c=e.memoizedState;if(c!==null){var h=c.dehydrated;if(so(t),o)if(t.flags&256)t.flags&=-257,t=_h(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(Ze||$i(e,t,n,!1),o=(n&e.childLanes)!==0,Ze||o){if(s=Ce,s!==null&&(h=mu(s,n),h!==0&&h!==c.retryLane))throw c.retryLane=h,oi(e,h),wt(s,e,h),_o;xl(),t=_h(e,t,n)}else e=c.treeContext,De=Lt(h.nextSibling),lt=t,xe=!0,Rn=null,Bt=!1,e!==null&&hf(t,e),t=ul(t,s),t.flags|=4096;return t}return e=fn(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fl(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(l(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ao(e,t,n,s,o){return hi(t),n=lo(e,t,n,s,void 0,o),s=ro(),e!==null&&!Ze?(oo(e,t,o),gn(e,t,o)):(xe&&s&&$r(t),t.flags|=1,ot(e,t,n,o),t.child)}function Ah(e,t,n,s,o,c){return hi(t),t.updateQueue=null,n=Rf(t,s,n,o),Of(e),s=ro(),e!==null&&!Ze?(oo(e,t,c),gn(e,t,c)):(xe&&s&&$r(t),t.flags|=1,ot(e,t,n,c),t.child)}function Nh(e,t,n,s,o){if(hi(t),t.stateNode===null){var c=Bi,h=n.contextType;typeof h=="object"&&h!==null&&(c=rt(h)),c=new n(s,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=ko,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=s,c.state=t.memoizedState,c.refs={},Ir(t),h=n.contextType,c.context=typeof h=="object"&&h!==null?rt(h):Bi,c.state=t.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(Eo(t,n,h,s),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(h=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),h!==c.state&&ko.enqueueReplaceState(c,c.state,null),Hs(t,s,c,o),Ls(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){c=t.stateNode;var p=t.memoizedProps,v=vi(n,p);c.props=v;var _=c.context,M=n.contextType;h=Bi,typeof M=="object"&&M!==null&&(h=rt(M));var D=n.getDerivedStateFromProps;M=typeof D=="function"||typeof c.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,M||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(p||_!==h)&&ph(t,c,s,h),Mn=!1;var N=t.memoizedState;c.state=N,Hs(t,s,c,o),Ls(),_=t.memoizedState,p||N!==_||Mn?(typeof D=="function"&&(Eo(t,n,D,s),_=t.memoizedState),(v=Mn||dh(t,n,v,s,N,_,h))?(M||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=_),c.props=s,c.state=_,c.context=h,s=v):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,Pr(e,t),h=t.memoizedProps,M=vi(n,h),c.props=M,D=t.pendingProps,N=c.context,_=n.contextType,v=Bi,typeof _=="object"&&_!==null&&(v=rt(_)),p=n.getDerivedStateFromProps,(_=typeof p=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==D||N!==v)&&ph(t,c,s,v),Mn=!1,N=t.memoizedState,c.state=N,Hs(t,s,c,o),Ls();var R=t.memoizedState;h!==D||N!==R||Mn||e!==null&&e.dependencies!==null&&Qa(e.dependencies)?(typeof p=="function"&&(Eo(t,n,p,s),R=t.memoizedState),(M=Mn||dh(t,n,M,s,N,R,v)||e!==null&&e.dependencies!==null&&Qa(e.dependencies))?(_||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,R,v),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,R,v)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&N===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&N===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=R),c.props=s,c.state=R,c.context=v,s=M):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&N===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&N===e.memoizedState||(t.flags|=1024),s=!1)}return c=s,fl(e,t),s=(t.flags&128)!==0,c||s?(c=t.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&s?(t.child=yi(t,e.child,null,o),t.child=yi(t,null,n,o)):ot(e,t,n,o),t.memoizedState=c.state,e=t.child):e=gn(e,t,o),e}function Oh(e,t,n,s){return ui(),t.flags|=256,ot(e,t,n,s),t.child}var No={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oo(e){return{baseLanes:e,cachePool:vf()}}function Ro(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Nt),e}function Rh(e,t,n){var s=t.pendingProps,o=!1,c=(t.flags&128)!==0,h;if((h=c)||(h=e!==null&&e.memoizedState===null?!1:(Ye.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(o?Dn(t):Bn(),(e=De)?(e=qd(e,Bt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:On!==null?{id:Ft,overflow:Wt}:null,retryLane:536870912,hydrationErrors:null},n=cf(e),n.return=t,t.child=n,lt=t,De=null)):e=null,e===null)throw zn(t);return hc(e)?t.lanes=32:t.lanes=536870912,null}var p=s.children;return s=s.fallback,o?(Bn(),o=t.mode,p=hl({mode:"hidden",children:p},o),s=ci(s,o,n,null),p.return=t,s.return=t,p.sibling=s,t.child=p,s=t.child,s.memoizedState=Oo(n),s.childLanes=Ro(e,h,n),t.memoizedState=No,Gs(null,s)):(Dn(t),zo(t,p))}var v=e.memoizedState;if(v!==null&&(p=v.dehydrated,p!==null)){if(c)t.flags&256?(Dn(t),t.flags&=-257,t=jo(e,t,n)):t.memoizedState!==null?(Bn(),t.child=e.child,t.flags|=128,t=null):(Bn(),p=s.fallback,o=t.mode,s=hl({mode:"visible",children:s.children},o),p=ci(p,o,n,null),p.flags|=2,s.return=t,p.return=t,s.sibling=p,t.child=s,yi(t,e.child,null,n),s=t.child,s.memoizedState=Oo(n),s.childLanes=Ro(e,h,n),t.memoizedState=No,t=Gs(null,s));else if(Dn(t),hc(p)){if(h=p.nextSibling&&p.nextSibling.dataset,h)var _=h.dgst;h=_,s=Error(l(419)),s.stack="",s.digest=h,Ms({value:s,source:null,stack:null}),t=jo(e,t,n)}else if(Ze||$i(e,t,n,!1),h=(n&e.childLanes)!==0,Ze||h){if(h=Ce,h!==null&&(s=mu(h,n),s!==0&&s!==v.retryLane))throw v.retryLane=s,oi(e,s),wt(h,e,s),_o;fc(p)||xl(),t=jo(e,t,n)}else fc(p)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,De=Lt(p.nextSibling),lt=t,xe=!0,Rn=null,Bt=!1,e!==null&&hf(t,e),t=zo(t,s.children),t.flags|=4096);return t}return o?(Bn(),p=s.fallback,o=t.mode,v=e.child,_=v.sibling,s=fn(v,{mode:"hidden",children:s.children}),s.subtreeFlags=v.subtreeFlags&65011712,_!==null?p=fn(_,p):(p=ci(p,o,n,null),p.flags|=2),p.return=t,s.return=t,s.sibling=p,t.child=s,Gs(null,s),s=t.child,p=e.child.memoizedState,p===null?p=Oo(n):(o=p.cachePool,o!==null?(v=Qe._currentValue,o=o.parent!==v?{parent:v,pool:v}:o):o=vf(),p={baseLanes:p.baseLanes|n,cachePool:o}),s.memoizedState=p,s.childLanes=Ro(e,h,n),t.memoizedState=No,Gs(e.child,s)):(Dn(t),n=e.child,e=n.sibling,n=fn(n,{mode:"visible",children:s.children}),n.return=t,n.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=n,t.memoizedState=null,n)}function zo(e,t){return t=hl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function hl(e,t){return e=kt(22,e,null,t),e.lanes=0,e}function jo(e,t,n){return yi(t,e.child,null,n),e=zo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zh(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Qr(e.return,t,n)}function Mo(e,t,n,s,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:o,treeForkCount:c}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=n,h.tailMode=o,h.treeForkCount=c)}function jh(e,t,n){var s=t.pendingProps,o=s.revealOrder,c=s.tail;s=s.children;var h=Ye.current,p=(h&2)!==0;if(p?(h=h&1|2,t.flags|=128):h&=1,X(Ye,h),ot(e,t,s,n),s=xe?js:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zh(e,n,t);else if(e.tag===19)zh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&el(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Mo(t,!1,o,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&el(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Mo(t,!0,n,null,c,s);break;case"together":Mo(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,n=fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Co(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Qa(e)))}function yg(e,t,n){switch(t.tag){case 3:it(t,t.stateNode.containerInfo),jn(t,Qe,e.memoizedState.cache),ui();break;case 27:case 5:ti(t);break;case 4:it(t,t.stateNode.containerInfo);break;case 10:jn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,so(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Dn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Rh(e,t,n):(Dn(t),e=gn(e,t,n),e!==null?e.sibling:null);Dn(t);break;case 19:var o=(e.flags&128)!==0;if(s=(n&t.childLanes)!==0,s||($i(e,t,n,!1),s=(n&t.childLanes)!==0),o){if(s)return jh(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),X(Ye,Ye.current),s)break;return null;case 22:return t.lanes=0,kh(e,t,n,t.pendingProps);case 24:jn(t,Qe,e.memoizedState.cache)}return gn(e,t,n)}function Mh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ze=!0;else{if(!Co(e,n)&&(t.flags&128)===0)return Ze=!1,yg(e,t,n);Ze=(e.flags&131072)!==0}else Ze=!1,xe&&(t.flags&1048576)!==0&&ff(t,js,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=pi(t.elementType),t.type=e,typeof e=="function")qr(e)?(s=vi(e,s),t.tag=1,t=Nh(null,t,e,s,n)):(t.tag=0,t=Ao(null,t,e,s,n));else{if(e!=null){var o=e.$$typeof;if(o===O){t.tag=11,t=xh(null,t,e,s,n);break e}else if(o===C){t.tag=14,t=Sh(null,t,e,s,n);break e}}throw t=nt(e)||e,Error(l(306,t,""))}}return t;case 0:return Ao(e,t,t.type,t.pendingProps,n);case 1:return s=t.type,o=vi(s,t.pendingProps),Nh(e,t,s,o,n);case 3:e:{if(it(t,t.stateNode.containerInfo),e===null)throw Error(l(387));s=t.pendingProps;var c=t.memoizedState;o=c.element,Pr(e,t),Hs(t,s,null,n);var h=t.memoizedState;if(s=h.cache,jn(t,Qe,s),s!==c.cache&&Kr(t,[Qe],n,!0),Ls(),s=h.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Oh(e,t,s,n);break e}else if(s!==o){o=Ct(Error(l(424)),t),Ms(o),t=Oh(e,t,s,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,De=Lt(e.firstChild),lt=t,xe=!0,Rn=null,Bt=!0,n=kf(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ui(),s===o){t=gn(e,t,n);break e}ot(e,t,s,n)}t=t.child}return t;case 26:return fl(e,t),e===null?(n=Xd(t.type,null,t.pendingProps,null))?t.memoizedState=n:xe||(n=t.type,e=t.pendingProps,s=Nl(he.current).createElement(n),s[at]=t,s[pt]=e,ct(s,n,e),Pe(s),t.stateNode=s):t.memoizedState=Xd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ti(t),e===null&&xe&&(s=t.stateNode=$d(t.type,t.pendingProps,he.current),lt=t,Bt=!0,o=De,Gn(t.type)?(dc=o,De=Lt(s.firstChild)):De=o),ot(e,t,t.pendingProps.children,n),fl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((o=s=De)&&(s=Qg(s,t.type,t.pendingProps,Bt),s!==null?(t.stateNode=s,lt=t,De=Lt(s.firstChild),Bt=!1,o=!0):o=!1),o||zn(t)),ti(t),o=t.type,c=t.pendingProps,h=e!==null?e.memoizedProps:null,s=c.children,oc(o,c)?s=null:h!==null&&oc(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=lo(e,t,rg,null,null,n),la._currentValue=o),fl(e,t),ot(e,t,s,n),t.child;case 6:return e===null&&xe&&((e=n=De)&&(n=Kg(n,t.pendingProps,Bt),n!==null?(t.stateNode=n,lt=t,De=null,e=!0):e=!1),e||zn(t)),null;case 13:return Rh(e,t,n);case 4:return it(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=yi(t,null,s,n):ot(e,t,s,n),t.child;case 11:return xh(e,t,t.type,t.pendingProps,n);case 7:return ot(e,t,t.pendingProps,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(e,t,t.pendingProps.children,n),t.child;case 10:return s=t.pendingProps,jn(t,t.type,s.value),ot(e,t,s.children,n),t.child;case 9:return o=t.type._context,s=t.pendingProps.children,hi(t),o=rt(o),s=s(o),t.flags|=1,ot(e,t,s,n),t.child;case 14:return Sh(e,t,t.type,t.pendingProps,n);case 15:return Eh(e,t,t.type,t.pendingProps,n);case 19:return jh(e,t,n);case 31:return mg(e,t,n);case 22:return kh(e,t,n,t.pendingProps);case 24:return hi(t),s=rt(Qe),e===null?(o=Fr(),o===null&&(o=Ce,c=Zr(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=n),o=c),t.memoizedState={parent:s,cache:o},Ir(t),jn(t,Qe,o)):((e.lanes&n)!==0&&(Pr(e,t),Hs(t,null,null,n),Ls()),o=e.memoizedState,c=t.memoizedState,o.parent!==s?(o={parent:s,cache:s},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),jn(t,Qe,s)):(s=c.cache,jn(t,Qe,s),s!==o.cache&&Kr(t,[Qe],n,!0))),ot(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function vn(e){e.flags|=4}function Uo(e,t,n,s,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(ld())e.flags|=8192;else throw mi=Fa,Wr}else e.flags&=-16777217}function Ch(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Jd(t))if(ld())e.flags|=8192;else throw mi=Fa,Wr}function dl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hu():536870912,e.lanes|=t,Pi|=t)}function Qs(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function gg(e,t,n){var s=t.pendingProps;switch(Yr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return n=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),pn(Qe),Me(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?vn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xr())),Be(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(vn(t),c!==null?(Be(t),Ch(t,c)):(Be(t),Uo(t,o,null,s,n))):c?c!==e.memoizedState?(vn(t),Be(t),Ch(t,c)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&vn(t),Be(t),Uo(t,o,e,s,n)),null;case 27:if(ln(t),n=he.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&vn(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return Be(t),null}e=P.current,Hi(t)?df(t):(e=$d(o,s,n),t.stateNode=e,vn(t))}return Be(t),null;case 5:if(ln(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&vn(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return Be(t),null}if(c=P.current,Hi(t))df(t);else{var h=Nl(he.current);switch(c){case 1:c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=h.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?h.createElement(o,{is:s.is}):h.createElement(o)}}c[at]=t,c[pt]=s;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)c.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=c;e:switch(ct(c,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&vn(t)}}return Be(t),Uo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&vn(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(l(166));if(e=he.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,s=null,o=lt,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||Rd(e.nodeValue,n)),e||zn(t,!0)}else e=Nl(e).createTextNode(s),e[at]=t,t.stateNode=e}return Be(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(s=Hi(t),n!==null){if(e===null){if(!s)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[at]=t}else ui(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else n=Xr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(_t(t),t):(_t(t),null);if((t.flags&128)!==0)throw Error(l(558))}return Be(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Hi(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(l(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(l(317));o[at]=t}else ui(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),o=!1}else o=Xr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(_t(t),t):(_t(t),null)}return _t(t),(t.flags&128)!==0?(t.lanes=n,t):(n=s!==null,e=e!==null&&e.memoizedState!==null,n&&(s=t.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==o&&(s.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),dl(t,t.updateQueue),Be(t),null);case 4:return Me(),e===null&&ic(t.stateNode.containerInfo),Be(t),null;case 10:return pn(t.type),Be(t),null;case 19:if(B(Ye),s=t.memoizedState,s===null)return Be(t),null;if(o=(t.flags&128)!==0,c=s.rendering,c===null)if(o)Qs(s,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=el(e),c!==null){for(t.flags|=128,Qs(s,!1),e=c.updateQueue,t.updateQueue=e,dl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)of(n,e),n=n.sibling;return X(Ye,Ye.current&1|2),xe&&hn(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ge()>vl&&(t.flags|=128,o=!0,Qs(s,!1),t.lanes=4194304)}else{if(!o)if(e=el(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,dl(t,e),Qs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!xe)return Be(t),null}else 2*Ge()-s.renderingStartTime>vl&&n!==536870912&&(t.flags|=128,o=!0,Qs(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(e=s.last,e!==null?e.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ge(),e.sibling=null,n=Ye.current,X(Ye,o?n&1|2:n&1),xe&&hn(t,s.treeForkCount),e):(Be(t),null);case 22:case 23:return _t(t),io(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(n&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),n=t.updateQueue,n!==null&&dl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==n&&(t.flags|=2048),e!==null&&B(di),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pn(Qe),Be(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function vg(e,t){switch(Yr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pn(Qe),Me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ln(t),null;case 31:if(t.memoizedState!==null){if(_t(t),t.alternate===null)throw Error(l(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_t(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Ye),null;case 4:return Me(),null;case 10:return pn(t.type),null;case 22:case 23:return _t(t),io(),e!==null&&B(di),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pn(Qe),null;case 25:return null;default:return null}}function Uh(e,t){switch(Yr(t),t.tag){case 3:pn(Qe),Me();break;case 26:case 27:case 5:ln(t);break;case 4:Me();break;case 31:t.memoizedState!==null&&_t(t);break;case 13:_t(t);break;case 19:B(Ye);break;case 10:pn(t.type);break;case 22:case 23:_t(t),io(),e!==null&&B(di);break;case 24:pn(Qe)}}function Ks(e,t){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var o=s.next;n=o;do{if((n.tag&e)===e){s=void 0;var c=n.create,h=n.inst;s=c(),h.destroy=s}n=n.next}while(n!==o)}}catch(p){Oe(t,t.return,p)}}function qn(e,t,n){try{var s=t.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&e)===e){var h=s.inst,p=h.destroy;if(p!==void 0){h.destroy=void 0,o=t;var v=n,_=p;try{_()}catch(M){Oe(o,v,M)}}}s=s.next}while(s!==c)}}catch(M){Oe(t,t.return,M)}}function Dh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_f(t,n)}catch(s){Oe(e,e.return,s)}}}function Bh(e,t,n){n.props=vi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(s){Oe(e,t,s)}}function Zs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof n=="function"?e.refCleanup=n(s):n.current=s}}catch(o){Oe(e,t,o)}}function It(e,t){var n=e.ref,s=e.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(o){Oe(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Oe(e,t,o)}else n.current=null}function qh(e){var t=e.type,n=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break e;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(o){Oe(e,e.return,o)}}function Do(e,t,n){try{var s=e.stateNode;Hg(s,e.type,n,t),s[pt]=t}catch(o){Oe(e,e.return,o)}}function Lh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gn(e.type)||e.tag===4}function Bo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qo(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cn));else if(s!==4&&(s===27&&Gn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qo(e,t,n),e=e.sibling;e!==null;)qo(e,t,n),e=e.sibling}function pl(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(s===27&&Gn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(pl(e,t,n),e=e.sibling;e!==null;)pl(e,t,n),e=e.sibling}function Hh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var s=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);ct(t,s,n),t[at]=e,t[pt]=n}catch(c){Oe(e,e.return,c)}}var bn=!1,Je=!1,Lo=!1,$h=typeof WeakSet=="function"?WeakSet:Set,et=null;function bg(e,t){if(e=e.containerInfo,lc=Ul,e=Iu(e),zr(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var h=0,p=-1,v=-1,_=0,M=0,D=e,N=null;t:for(;;){for(var R;D!==n||o!==0&&D.nodeType!==3||(p=h+o),D!==c||s!==0&&D.nodeType!==3||(v=h+s),D.nodeType===3&&(h+=D.nodeValue.length),(R=D.firstChild)!==null;)N=D,D=R;for(;;){if(D===e)break t;if(N===n&&++_===o&&(p=h),N===c&&++M===s&&(v=h),(R=D.nextSibling)!==null)break;D=N,N=D.parentNode}D=R}n=p===-1||v===-1?null:{start:p,end:v}}else n=null}n=n||{start:0,end:0}}else n=null;for(rc={focusedElem:e,selectionRange:n},Ul=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,n=t,o=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var I=vi(n.type,o);e=s.getSnapshotBeforeUpdate(I,c),s.__reactInternalSnapshotBeforeUpdate=e}catch(le){Oe(n,n.return,le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)uc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function Yh(e,t,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:xn(e,n),s&4&&Ks(5,n);break;case 1:if(xn(e,n),s&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(h){Oe(n,n.return,h)}else{var o=vi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Oe(n,n.return,h)}}s&64&&Dh(n),s&512&&Zs(n,n.return);break;case 3:if(xn(e,n),s&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{_f(e,t)}catch(h){Oe(n,n.return,h)}}break;case 27:t===null&&s&4&&Hh(n);case 26:case 5:xn(e,n),t===null&&s&4&&qh(n),s&512&&Zs(n,n.return);break;case 12:xn(e,n);break;case 31:xn(e,n),s&4&&Gh(e,n);break;case 13:xn(e,n),s&4&&Qh(e,n),s&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ng.bind(null,n),Zg(e,n))));break;case 22:if(s=n.memoizedState!==null||bn,!s){t=t!==null&&t.memoizedState!==null||Je,o=bn;var c=Je;bn=s,(Je=t)&&!c?Sn(e,n,(n.subtreeFlags&8772)!==0):xn(e,n),bn=o,Je=c}break;case 30:break;default:xn(e,n)}}function Vh(e){var t=e.alternate;t!==null&&(e.alternate=null,Vh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qe=null,yt=!1;function wn(e,t,n){for(n=n.child;n!==null;)Xh(e,t,n),n=n.sibling}function Xh(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(vs,n)}catch{}switch(n.tag){case 26:Je||It(n,t),wn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Je||It(n,t);var s=qe,o=yt;Gn(n.type)&&(qe=n.stateNode,yt=!1),wn(e,t,n),ia(n.stateNode),qe=s,yt=o;break;case 5:Je||It(n,t);case 6:if(s=qe,o=yt,qe=null,wn(e,t,n),qe=s,yt=o,qe!==null)if(yt)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(n.stateNode)}catch(c){Oe(n,t,c)}else try{qe.removeChild(n.stateNode)}catch(c){Oe(n,t,c)}break;case 18:qe!==null&&(yt?(e=qe,Dd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),rs(e)):Dd(qe,n.stateNode));break;case 4:s=qe,o=yt,qe=n.stateNode.containerInfo,yt=!0,wn(e,t,n),qe=s,yt=o;break;case 0:case 11:case 14:case 15:qn(2,n,t),Je||qn(4,n,t),wn(e,t,n);break;case 1:Je||(It(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"&&Bh(n,t,s)),wn(e,t,n);break;case 21:wn(e,t,n);break;case 22:Je=(s=Je)||n.memoizedState!==null,wn(e,t,n),Je=s;break;default:wn(e,t,n)}}function Gh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{rs(e)}catch(n){Oe(t,t.return,n)}}}function Qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rs(e)}catch(n){Oe(t,t.return,n)}}function wg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $h),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $h),t;default:throw Error(l(435,e.tag))}}function ml(e,t){var n=wg(e);t.forEach(function(s){if(!n.has(s)){n.add(s);var o=Og.bind(null,e,s);s.then(o,o)}})}function gt(e,t){var n=t.deletions;if(n!==null)for(var s=0;s<n.length;s++){var o=n[s],c=e,h=t,p=h;e:for(;p!==null;){switch(p.tag){case 27:if(Gn(p.type)){qe=p.stateNode,yt=!1;break e}break;case 5:qe=p.stateNode,yt=!1;break e;case 3:case 4:qe=p.stateNode.containerInfo,yt=!0;break e}p=p.return}if(qe===null)throw Error(l(160));Xh(c,h,o),qe=null,yt=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Kh(t,e),t=t.sibling}var Vt=null;function Kh(e,t){var n=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gt(t,e),vt(e),s&4&&(qn(3,e,e.return),Ks(3,e),qn(5,e,e.return));break;case 1:gt(t,e),vt(e),s&512&&(Je||n===null||It(n,n.return)),s&64&&bn&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:var o=Vt;if(gt(t,e),vt(e),s&512&&(Je||n===null||It(n,n.return)),s&4){var c=n!==null?n.memoizedState:null;if(s=e.memoizedState,n===null)if(s===null)if(e.stateNode===null){e:{s=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(s){case"title":c=o.getElementsByTagName("title")[0],(!c||c[xs]||c[at]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(s),o.head.insertBefore(c,o.querySelector("head > title"))),ct(c,s,n),c[at]=e,Pe(c),s=c;break e;case"link":var h=Kd("link","href",o).get(s+(n.href||""));if(h){for(var p=0;p<h.length;p++)if(c=h[p],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){h.splice(p,1);break t}}c=o.createElement(s),ct(c,s,n),o.head.appendChild(c);break;case"meta":if(h=Kd("meta","content",o).get(s+(n.content||""))){for(p=0;p<h.length;p++)if(c=h[p],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){h.splice(p,1);break t}}c=o.createElement(s),ct(c,s,n),o.head.appendChild(c);break;default:throw Error(l(468,s))}c[at]=e,Pe(c),s=c}e.stateNode=s}else Zd(o,e.type,e.stateNode);else e.stateNode=Qd(o,s,e.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?Zd(o,e.type,e.stateNode):Qd(o,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Do(e,e.memoizedProps,n.memoizedProps)}break;case 27:gt(t,e),vt(e),s&512&&(Je||n===null||It(n,n.return)),n!==null&&s&4&&Do(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gt(t,e),vt(e),s&512&&(Je||n===null||It(n,n.return)),e.flags&32){o=e.stateNode;try{Ri(o,"")}catch(I){Oe(e,e.return,I)}}s&4&&e.stateNode!=null&&(o=e.memoizedProps,Do(e,o,n!==null?n.memoizedProps:o)),s&1024&&(Lo=!0);break;case 6:if(gt(t,e),vt(e),s&4){if(e.stateNode===null)throw Error(l(162));s=e.memoizedProps,n=e.stateNode;try{n.nodeValue=s}catch(I){Oe(e,e.return,I)}}break;case 3:if(zl=null,o=Vt,Vt=Ol(t.containerInfo),gt(t,e),Vt=o,vt(e),s&4&&n!==null&&n.memoizedState.isDehydrated)try{rs(t.containerInfo)}catch(I){Oe(e,e.return,I)}Lo&&(Lo=!1,Zh(e));break;case 4:s=Vt,Vt=Ol(e.stateNode.containerInfo),gt(t,e),vt(e),Vt=s;break;case 12:gt(t,e),vt(e);break;case 31:gt(t,e),vt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ml(e,s)));break;case 13:gt(t,e),vt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(gl=Ge()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ml(e,s)));break;case 22:o=e.memoizedState!==null;var v=n!==null&&n.memoizedState!==null,_=bn,M=Je;if(bn=_||o,Je=M||v,gt(t,e),Je=M,bn=_,vt(e),s&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||v||bn||Je||bi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){v=n=t;try{if(c=v.stateNode,o)h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{p=v.stateNode;var D=v.memoizedProps.style,N=D!=null&&D.hasOwnProperty("display")?D.display:null;p.style.display=N==null||typeof N=="boolean"?"":(""+N).trim()}}catch(I){Oe(v,v.return,I)}}}else if(t.tag===6){if(n===null){v=t;try{v.stateNode.nodeValue=o?"":v.memoizedProps}catch(I){Oe(v,v.return,I)}}}else if(t.tag===18){if(n===null){v=t;try{var R=v.stateNode;o?Bd(R,!0):Bd(v.stateNode,!1)}catch(I){Oe(v,v.return,I)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,ml(e,n))));break;case 19:gt(t,e),vt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ml(e,s)));break;case 30:break;case 21:break;default:gt(t,e),vt(e)}}function vt(e){var t=e.flags;if(t&2){try{for(var n,s=e.return;s!==null;){if(Lh(s)){n=s;break}s=s.return}if(n==null)throw Error(l(160));switch(n.tag){case 27:var o=n.stateNode,c=Bo(e);pl(e,c,o);break;case 5:var h=n.stateNode;n.flags&32&&(Ri(h,""),n.flags&=-33);var p=Bo(e);pl(e,p,h);break;case 3:case 4:var v=n.stateNode.containerInfo,_=Bo(e);qo(e,_,v);break;default:throw Error(l(161))}}catch(M){Oe(e,e.return,M)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Zh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Yh(e,t.alternate,t),t=t.sibling}function bi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qn(4,t,t.return),bi(t);break;case 1:It(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Bh(t,t.return,n),bi(t);break;case 27:ia(t.stateNode);case 26:case 5:It(t,t.return),bi(t);break;case 22:t.memoizedState===null&&bi(t);break;case 30:bi(t);break;default:bi(t)}e=e.sibling}}function Sn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,o=e,c=t,h=c.flags;switch(c.tag){case 0:case 11:case 15:Sn(o,c,n),Ks(4,c);break;case 1:if(Sn(o,c,n),s=c,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(_){Oe(s,s.return,_)}if(s=c,o=s.updateQueue,o!==null){var p=s.stateNode;try{var v=o.shared.hiddenCallbacks;if(v!==null)for(o.shared.hiddenCallbacks=null,o=0;o<v.length;o++)Tf(v[o],p)}catch(_){Oe(s,s.return,_)}}n&&h&64&&Dh(c),Zs(c,c.return);break;case 27:Hh(c);case 26:case 5:Sn(o,c,n),n&&s===null&&h&4&&qh(c),Zs(c,c.return);break;case 12:Sn(o,c,n);break;case 31:Sn(o,c,n),n&&h&4&&Gh(o,c);break;case 13:Sn(o,c,n),n&&h&4&&Qh(o,c);break;case 22:c.memoizedState===null&&Sn(o,c,n),Zs(c,c.return);break;case 30:break;default:Sn(o,c,n)}t=t.sibling}}function Ho(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Cs(n))}function $o(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cs(e))}function Xt(e,t,n,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Jh(e,t,n,s),t=t.sibling}function Jh(e,t,n,s){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Xt(e,t,n,s),o&2048&&Ks(9,t);break;case 1:Xt(e,t,n,s);break;case 3:Xt(e,t,n,s),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cs(e)));break;case 12:if(o&2048){Xt(e,t,n,s),e=t.stateNode;try{var c=t.memoizedProps,h=c.id,p=c.onPostCommit;typeof p=="function"&&p(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){Oe(t,t.return,v)}}else Xt(e,t,n,s);break;case 31:Xt(e,t,n,s);break;case 13:Xt(e,t,n,s);break;case 23:break;case 22:c=t.stateNode,h=t.alternate,t.memoizedState!==null?c._visibility&2?Xt(e,t,n,s):Js(e,t):c._visibility&2?Xt(e,t,n,s):(c._visibility|=2,Fi(e,t,n,s,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Ho(h,t);break;case 24:Xt(e,t,n,s),o&2048&&$o(t.alternate,t);break;default:Xt(e,t,n,s)}}function Fi(e,t,n,s,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,h=t,p=n,v=s,_=h.flags;switch(h.tag){case 0:case 11:case 15:Fi(c,h,p,v,o),Ks(8,h);break;case 23:break;case 22:var M=h.stateNode;h.memoizedState!==null?M._visibility&2?Fi(c,h,p,v,o):Js(c,h):(M._visibility|=2,Fi(c,h,p,v,o)),o&&_&2048&&Ho(h.alternate,h);break;case 24:Fi(c,h,p,v,o),o&&_&2048&&$o(h.alternate,h);break;default:Fi(c,h,p,v,o)}t=t.sibling}}function Js(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,s=t,o=s.flags;switch(s.tag){case 22:Js(n,s),o&2048&&Ho(s.alternate,s);break;case 24:Js(n,s),o&2048&&$o(s.alternate,s);break;default:Js(n,s)}t=t.sibling}}var Fs=8192;function Wi(e,t,n){if(e.subtreeFlags&Fs)for(e=e.child;e!==null;)Fh(e,t,n),e=e.sibling}function Fh(e,t,n){switch(e.tag){case 26:Wi(e,t,n),e.flags&Fs&&e.memoizedState!==null&&lv(n,Vt,e.memoizedState,e.memoizedProps);break;case 5:Wi(e,t,n);break;case 3:case 4:var s=Vt;Vt=Ol(e.stateNode.containerInfo),Wi(e,t,n),Vt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Fs,Fs=16777216,Wi(e,t,n),Fs=s):Wi(e,t,n));break;default:Wi(e,t,n)}}function Wh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ws(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];et=s,Ph(s,e)}Wh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ih(e),e=e.sibling}function Ih(e){switch(e.tag){case 0:case 11:case 15:Ws(e),e.flags&2048&&qn(9,e,e.return);break;case 3:Ws(e);break;case 12:Ws(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,yl(e)):Ws(e);break;default:Ws(e)}}function yl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];et=s,Ph(s,e)}Wh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qn(8,t,t.return),yl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,yl(t));break;default:yl(t)}e=e.sibling}}function Ph(e,t){for(;et!==null;){var n=et;switch(n.tag){case 0:case 11:case 15:qn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Cs(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,et=s;else e:for(n=e;et!==null;){s=et;var o=s.sibling,c=s.return;if(Vh(s),s===n){et=null;break e}if(o!==null){o.return=c,et=o;break e}et=c}}}var xg={getCacheForType:function(e){var t=rt(Qe),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return rt(Qe).controller.signal}},Sg=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ce=null,ye=null,be=0,Ne=0,At=null,Ln=!1,Ii=!1,Yo=!1,En=0,$e=0,Hn=0,wi=0,Vo=0,Nt=0,Pi=0,Is=null,bt=null,Xo=!1,gl=0,ed=0,vl=1/0,bl=null,$n=null,Ie=0,Yn=null,es=null,kn=0,Go=0,Qo=null,td=null,Ps=0,Ko=null;function Ot(){return(_e&2)!==0&&be!==0?be&-be:k.T!==null?Po():yu()}function nd(){if(Nt===0)if((be&536870912)===0||xe){var e=Aa;Aa<<=1,(Aa&3932160)===0&&(Aa=262144),Nt=e}else Nt=536870912;return e=Tt.current,e!==null&&(e.flags|=32),Nt}function wt(e,t,n){(e===Ce&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)&&(ts(e,0),Vn(e,be,Nt,!1)),ws(e,n),((_e&2)===0||e!==Ce)&&(e===Ce&&((_e&2)===0&&(wi|=n),$e===4&&Vn(e,be,Nt,!1)),Pt(e))}function id(e,t,n){if((_e&6)!==0)throw Error(l(327));var s=!n&&(t&127)===0&&(t&e.expiredLanes)===0||bs(e,t),o=s?Tg(e,t):Jo(e,t,!0),c=s;do{if(o===0){Ii&&!s&&Vn(e,t,0,!1);break}else{if(n=e.current.alternate,c&&!Eg(n)){o=Jo(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var p=e;o=Is;var v=p.current.memoizedState.isDehydrated;if(v&&(ts(p,h).flags|=256),h=Jo(p,h,!1),h!==2){if(Yo&&!v){p.errorRecoveryDisabledLanes|=c,wi|=c,o=4;break e}c=bt,bt=o,c!==null&&(bt===null?bt=c:bt.push.apply(bt,c))}o=h}if(c=!1,o!==2)continue}}if(o===1){ts(e,0),Vn(e,t,0,!0);break}e:{switch(s=e,c=o,c){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:Vn(s,t,Nt,!Ln);break e;case 2:bt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(o=gl+300-Ge(),10<o)){if(Vn(s,t,Nt,!Ln),Oa(s,0,!0)!==0)break e;kn=t,s.timeoutHandle=Cd(sd.bind(null,s,n,bt,bl,Xo,t,Nt,wi,Pi,Ln,c,"Throttled",-0,0),o);break e}sd(s,n,bt,bl,Xo,t,Nt,wi,Pi,Ln,c,null,-0,0)}}break}while(!0);Pt(e)}function sd(e,t,n,s,o,c,h,p,v,_,M,D,N,R){if(e.timeoutHandle=-1,D=t.subtreeFlags,D&8192||(D&16785408)===16785408){D={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cn},Fh(t,c,D);var I=(c&62914560)===c?gl-Ge():(c&4194048)===c?ed-Ge():0;if(I=rv(D,I),I!==null){kn=c,e.cancelPendingCommit=I(hd.bind(null,e,t,c,n,s,o,h,p,v,M,D,null,N,R)),Vn(e,c,h,!_);return}}hd(e,t,c,n,s,o,h,p,v)}function Eg(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var o=n[s],c=o.getSnapshot;o=o.value;try{if(!Et(c(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vn(e,t,n,s){t&=~Vo,t&=~wi,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var o=t;0<o;){var c=31-St(o),h=1<<c;s[c]=-1,o&=~h}n!==0&&du(e,n,t)}function wl(){return(_e&6)===0?(ea(0),!1):!0}function Zo(){if(ye!==null){if(Ne===0)var e=ye.return;else e=ye,dn=fi=null,co(e),Gi=null,Ds=0,e=ye;for(;e!==null;)Uh(e.alternate,e),e=e.return;ye=null}}function ts(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Vg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),kn=0,Zo(),Ce=e,ye=n=fn(e.current,null),be=t,Ne=0,At=null,Ln=!1,Ii=bs(e,t),Yo=!1,Pi=Nt=Vo=wi=Hn=$e=0,bt=Is=null,Xo=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var o=31-St(s),c=1<<o;t|=e[o],s&=~c}return En=t,$a(),n}function ad(e,t){fe=null,k.H=Xs,t===Xi||t===Ja?(t=xf(),Ne=3):t===Wr?(t=xf(),Ne=4):Ne=t===_o?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,At=t,ye===null&&($e=1,cl(e,Ct(t,e.current)))}function ld(){var e=Tt.current;return e===null?!0:(be&4194048)===be?qt===null:(be&62914560)===be||(be&536870912)!==0?e===qt:!1}function rd(){var e=k.H;return k.H=Xs,e===null?Xs:e}function od(){var e=k.A;return k.A=xg,e}function xl(){$e=4,Ln||(be&4194048)!==be&&Tt.current!==null||(Ii=!0),(Hn&134217727)===0&&(wi&134217727)===0||Ce===null||Vn(Ce,be,Nt,!1)}function Jo(e,t,n){var s=_e;_e|=2;var o=rd(),c=od();(Ce!==e||be!==t)&&(bl=null,ts(e,t)),t=!1;var h=$e;e:do try{if(Ne!==0&&ye!==null){var p=ye,v=At;switch(Ne){case 8:Zo(),h=6;break e;case 3:case 2:case 9:case 6:Tt.current===null&&(t=!0);var _=Ne;if(Ne=0,At=null,ns(e,p,v,_),n&&Ii){h=0;break e}break;default:_=Ne,Ne=0,At=null,ns(e,p,v,_)}}kg(),h=$e;break}catch(M){ad(e,M)}while(!0);return t&&e.shellSuspendCounter++,dn=fi=null,_e=s,k.H=o,k.A=c,ye===null&&(Ce=null,be=0,$a()),h}function kg(){for(;ye!==null;)cd(ye)}function Tg(e,t){var n=_e;_e|=2;var s=rd(),o=od();Ce!==e||be!==t?(bl=null,vl=Ge()+500,ts(e,t)):Ii=bs(e,t);e:do try{if(Ne!==0&&ye!==null){t=ye;var c=At;t:switch(Ne){case 1:Ne=0,At=null,ns(e,t,c,1);break;case 2:case 9:if(bf(c)){Ne=0,At=null,ud(t);break}t=function(){Ne!==2&&Ne!==9||Ce!==e||(Ne=7),Pt(e)},c.then(t,t);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:bf(c)?(Ne=0,At=null,ud(t)):(Ne=0,At=null,ns(e,t,c,7));break;case 5:var h=null;switch(ye.tag){case 26:h=ye.memoizedState;case 5:case 27:var p=ye;if(h?Jd(h):p.stateNode.complete){Ne=0,At=null;var v=p.sibling;if(v!==null)ye=v;else{var _=p.return;_!==null?(ye=_,Sl(_)):ye=null}break t}}Ne=0,At=null,ns(e,t,c,5);break;case 6:Ne=0,At=null,ns(e,t,c,6);break;case 8:Zo(),$e=6;break e;default:throw Error(l(462))}}_g();break}catch(M){ad(e,M)}while(!0);return dn=fi=null,k.H=s,k.A=o,_e=n,ye!==null?0:(Ce=null,be=0,$a(),$e)}function _g(){for(;ye!==null&&!me();)cd(ye)}function cd(e){var t=Mh(e.alternate,e,En);e.memoizedProps=e.pendingProps,t===null?Sl(e):ye=t}function ud(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ah(n,t,t.pendingProps,t.type,void 0,be);break;case 11:t=Ah(n,t,t.pendingProps,t.type.render,t.ref,be);break;case 5:co(t);default:Uh(n,t),t=ye=of(t,En),t=Mh(n,t,En)}e.memoizedProps=e.pendingProps,t===null?Sl(e):ye=t}function ns(e,t,n,s){dn=fi=null,co(t),Gi=null,Ds=0;var o=t.return;try{if(pg(e,o,t,n,be)){$e=1,cl(e,Ct(n,e.current)),ye=null;return}}catch(c){if(o!==null)throw ye=o,c;$e=1,cl(e,Ct(n,e.current)),ye=null;return}t.flags&32768?(xe||s===1?e=!0:Ii||(be&536870912)!==0?e=!1:(Ln=e=!0,(s===2||s===9||s===3||s===6)&&(s=Tt.current,s!==null&&s.tag===13&&(s.flags|=16384))),fd(t,e)):Sl(t)}function Sl(e){var t=e;do{if((t.flags&32768)!==0){fd(t,Ln);return}e=t.return;var n=gg(t.alternate,t,En);if(n!==null){ye=n;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);$e===0&&($e=5)}function fd(e,t){do{var n=vg(e.alternate,e);if(n!==null){n.flags&=32767,ye=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ye=e;return}ye=e=n}while(e!==null);$e=6,ye=null}function hd(e,t,n,s,o,c,h,p,v){e.cancelPendingCommit=null;do El();while(Ie!==0);if((_e&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(c=t.lanes|t.childLanes,c|=Dr,ay(e,n,c,h,p,v),e===Ce&&(ye=Ce=null,be=0),es=t,Yn=e,kn=n,Go=c,Qo=o,td=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Rg(Ta,function(){return gd(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=k.T,k.T=null,o=$.p,$.p=2,h=_e,_e|=4;try{bg(e,t,n)}finally{_e=h,$.p=o,k.T=s}}Ie=1,dd(),pd(),md()}}function dd(){if(Ie===1){Ie=0;var e=Yn,t=es,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null;var s=$.p;$.p=2;var o=_e;_e|=4;try{Kh(t,e);var c=rc,h=Iu(e.containerInfo),p=c.focusedElem,v=c.selectionRange;if(h!==p&&p&&p.ownerDocument&&Wu(p.ownerDocument.documentElement,p)){if(v!==null&&zr(p)){var _=v.start,M=v.end;if(M===void 0&&(M=_),"selectionStart"in p)p.selectionStart=_,p.selectionEnd=Math.min(M,p.value.length);else{var D=p.ownerDocument||document,N=D&&D.defaultView||window;if(N.getSelection){var R=N.getSelection(),I=p.textContent.length,le=Math.min(v.start,I),je=v.end===void 0?le:Math.min(v.end,I);!R.extend&&le>je&&(h=je,je=le,le=h);var E=Fu(p,le),S=Fu(p,je);if(E&&S&&(R.rangeCount!==1||R.anchorNode!==E.node||R.anchorOffset!==E.offset||R.focusNode!==S.node||R.focusOffset!==S.offset)){var T=D.createRange();T.setStart(E.node,E.offset),R.removeAllRanges(),le>je?(R.addRange(T),R.extend(S.node,S.offset)):(T.setEnd(S.node,S.offset),R.addRange(T))}}}}for(D=[],R=p;R=R.parentNode;)R.nodeType===1&&D.push({element:R,left:R.scrollLeft,top:R.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<D.length;p++){var U=D[p];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}Ul=!!lc,rc=lc=null}finally{_e=o,$.p=s,k.T=n}}e.current=t,Ie=2}}function pd(){if(Ie===2){Ie=0;var e=Yn,t=es,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=k.T,k.T=null;var s=$.p;$.p=2;var o=_e;_e|=4;try{Yh(e,t.alternate,t)}finally{_e=o,$.p=s,k.T=n}}Ie=3}}function md(){if(Ie===4||Ie===3){Ie=0,st();var e=Yn,t=es,n=kn,s=td;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ie=5:(Ie=0,es=Yn=null,yd(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&($n=null),hr(n),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(vs,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=k.T,o=$.p,$.p=2,k.T=null;try{for(var c=e.onRecoverableError,h=0;h<s.length;h++){var p=s[h];c(p.value,{componentStack:p.stack})}}finally{k.T=t,$.p=o}}(kn&3)!==0&&El(),Pt(e),o=e.pendingLanes,(n&261930)!==0&&(o&42)!==0?e===Ko?Ps++:(Ps=0,Ko=e):Ps=0,ea(0)}}function yd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Cs(t)))}function El(){return dd(),pd(),md(),gd()}function gd(){if(Ie!==5)return!1;var e=Yn,t=Go;Go=0;var n=hr(kn),s=k.T,o=$.p;try{$.p=32>n?32:n,k.T=null,n=Qo,Qo=null;var c=Yn,h=kn;if(Ie=0,es=Yn=null,kn=0,(_e&6)!==0)throw Error(l(331));var p=_e;if(_e|=4,Ih(c.current),Jh(c,c.current,h,n),_e=p,ea(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(vs,c)}catch{}return!0}finally{$.p=o,k.T=s,yd(e,t)}}function vd(e,t,n){t=Ct(n,t),t=To(e.stateNode,t,2),e=Un(e,t,2),e!==null&&(ws(e,2),Pt(e))}function Oe(e,t,n){if(e.tag===3)vd(e,e,n);else for(;t!==null;){if(t.tag===3){vd(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&($n===null||!$n.has(s))){e=Ct(n,e),n=bh(2),s=Un(t,n,2),s!==null&&(wh(n,s,t,e),ws(s,2),Pt(s));break}}t=t.return}}function Fo(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new Sg;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(n)||(Yo=!0,o.add(n),e=Ag.bind(null,e,t,n),t.then(e,e))}function Ag(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ce===e&&(be&n)===n&&($e===4||$e===3&&(be&62914560)===be&&300>Ge()-gl?(_e&2)===0&&ts(e,0):Vo|=n,Pi===be&&(Pi=0)),Pt(e)}function bd(e,t){t===0&&(t=hu()),e=oi(e,t),e!==null&&(ws(e,t),Pt(e))}function Ng(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bd(e,n)}function Og(e,t){var n=0;switch(e.tag){case 31:case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(t),bd(e,n)}function Rg(e,t){return ae(e,t)}var kl=null,is=null,Wo=!1,Tl=!1,Io=!1,Xn=0;function Pt(e){e!==is&&e.next===null&&(is===null?kl=is=e:is=is.next=e),Tl=!0,Wo||(Wo=!0,jg())}function ea(e,t){if(!Io&&Tl){Io=!0;do for(var n=!1,s=kl;s!==null;){if(e!==0){var o=s.pendingLanes;if(o===0)var c=0;else{var h=s.suspendedLanes,p=s.pingedLanes;c=(1<<31-St(42|e)+1)-1,c&=o&~(h&~p),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Ed(s,c))}else c=be,c=Oa(s,s===Ce?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||bs(s,c)||(n=!0,Ed(s,c));s=s.next}while(n);Io=!1}}function zg(){wd()}function wd(){Tl=Wo=!1;var e=0;Xn!==0&&Yg()&&(e=Xn);for(var t=Ge(),n=null,s=kl;s!==null;){var o=s.next,c=xd(s,t);c===0?(s.next=null,n===null?kl=o:n.next=o,o===null&&(is=n)):(n=s,(e!==0||(c&3)!==0)&&(Tl=!0)),s=o}Ie!==0&&Ie!==5||ea(e),Xn!==0&&(Xn=0)}function xd(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var h=31-St(c),p=1<<h,v=o[h];v===-1?((p&n)===0||(p&s)!==0)&&(o[h]=sy(p,t)):v<=t&&(e.expiredLanes|=p),c&=~p}if(t=Ce,n=be,n=Oa(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,n===0||e===t&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ue(s),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||bs(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(s!==null&&Ue(s),hr(n)){case 2:case 8:n=uu;break;case 32:n=Ta;break;case 268435456:n=fu;break;default:n=Ta}return s=Sd.bind(null,e),n=ae(n,s),e.callbackPriority=t,e.callbackNode=n,t}return s!==null&&s!==null&&Ue(s),e.callbackPriority=2,e.callbackNode=null,2}function Sd(e,t){if(Ie!==0&&Ie!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(El()&&e.callbackNode!==n)return null;var s=be;return s=Oa(e,e===Ce?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(id(e,s,t),xd(e,Ge()),e.callbackNode!=null&&e.callbackNode===n?Sd.bind(null,e):null)}function Ed(e,t){if(El())return null;id(e,t,!0)}function jg(){Xg(function(){(_e&6)!==0?ae(cu,zg):wd()})}function Po(){if(Xn===0){var e=Yi;e===0&&(e=_a,_a<<=1,(_a&261888)===0&&(_a=256)),Xn=e}return Xn}function kd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ma(""+e)}function Td(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Mg(e,t,n,s,o){if(t==="submit"&&n&&n.stateNode===o){var c=kd((o[pt]||null).action),h=s.submitter;h&&(t=(t=h[pt]||null)?kd(t.formAction):h.getAttribute("formAction"),t!==null&&(c=t,h=null));var p=new Ba("action","action",null,s,o);e.push({event:p,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Xn!==0){var v=h?Td(o,h):new FormData(o);bo(n,{pending:!0,data:v,method:o.method,action:c},null,v)}}else typeof c=="function"&&(p.preventDefault(),v=h?Td(o,h):new FormData(o),bo(n,{pending:!0,data:v,method:o.method,action:c},c,v))},currentTarget:o}]})}}for(var ec=0;ec<Ur.length;ec++){var tc=Ur[ec],Cg=tc.toLowerCase(),Ug=tc[0].toUpperCase()+tc.slice(1);Yt(Cg,"on"+Ug)}Yt(tf,"onAnimationEnd"),Yt(nf,"onAnimationIteration"),Yt(sf,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(Wy,"onTransitionRun"),Yt(Iy,"onTransitionStart"),Yt(Py,"onTransitionCancel"),Yt(af,"onTransitionEnd"),Ni("onMouseEnter",["mouseout","mouseover"]),Ni("onMouseLeave",["mouseout","mouseover"]),Ni("onPointerEnter",["pointerout","pointerover"]),Ni("onPointerLeave",["pointerout","pointerover"]),si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),si("onBeforeInput",["compositionend","keypress","textInput","paste"]),si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ta="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(" "),Dg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ta));function _d(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],o=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var h=s.length-1;0<=h;h--){var p=s[h],v=p.instance,_=p.currentTarget;if(p=p.listener,v!==c&&o.isPropagationStopped())break e;c=p,o.currentTarget=_;try{c(o)}catch(M){Ha(M)}o.currentTarget=null,c=v}else for(h=0;h<s.length;h++){if(p=s[h],v=p.instance,_=p.currentTarget,p=p.listener,v!==c&&o.isPropagationStopped())break e;c=p,o.currentTarget=_;try{c(o)}catch(M){Ha(M)}o.currentTarget=null,c=v}}}}function ge(e,t){var n=t[dr];n===void 0&&(n=t[dr]=new Set);var s=e+"__bubble";n.has(s)||(Ad(t,e,2,!1),n.add(s))}function nc(e,t,n){var s=0;t&&(s|=4),Ad(n,e,s,t)}var _l="_reactListening"+Math.random().toString(36).slice(2);function ic(e){if(!e[_l]){e[_l]=!0,bu.forEach(function(n){n!=="selectionchange"&&(Dg.has(n)||nc(n,!1,e),nc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_l]||(t[_l]=!0,nc("selectionchange",!1,t))}}function Ad(e,t,n,s){switch(np(t)){case 2:var o=uv;break;case 8:o=fv;break;default:o=vc}n=o.bind(null,t,n,e),o=void 0,!Sr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),s?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function sc(e,t,n,s,o){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var h=s.tag;if(h===3||h===4){var p=s.stateNode.containerInfo;if(p===o)break;if(h===4)for(h=s.return;h!==null;){var v=h.tag;if((v===3||v===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;p!==null;){if(h=Ti(p),h===null)return;if(v=h.tag,v===5||v===6||v===26||v===27){s=c=h;continue e}p=p.parentNode}}s=s.return}zu(function(){var _=c,M=wr(n),D=[];e:{var N=lf.get(e);if(N!==void 0){var R=Ba,I=e;switch(e){case"keypress":if(Ua(n)===0)break e;case"keydown":case"keyup":R=Oy;break;case"focusin":I="focus",R=_r;break;case"focusout":I="blur",R=_r;break;case"beforeblur":case"afterblur":R=_r;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":R=Cu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":R=gy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":R=jy;break;case tf:case nf:case sf:R=wy;break;case af:R=Cy;break;case"scroll":case"scrollend":R=my;break;case"wheel":R=Dy;break;case"copy":case"cut":case"paste":R=Sy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":R=Du;break;case"toggle":case"beforetoggle":R=qy}var le=(t&4)!==0,je=!le&&(e==="scroll"||e==="scrollend"),E=le?N!==null?N+"Capture":null:N;le=[];for(var S=_,T;S!==null;){var U=S;if(T=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||T===null||E===null||(U=Es(S,E),U!=null&&le.push(na(S,U,T))),je)break;S=S.return}0<le.length&&(N=new R(N,I,null,n,M),D.push({event:N,listeners:le}))}}if((t&7)===0){e:{if(N=e==="mouseover"||e==="pointerover",R=e==="mouseout"||e==="pointerout",N&&n!==br&&(I=n.relatedTarget||n.fromElement)&&(Ti(I)||I[ki]))break e;if((R||N)&&(N=M.window===M?M:(N=M.ownerDocument)?N.defaultView||N.parentWindow:window,R?(I=n.relatedTarget||n.toElement,R=_,I=I?Ti(I):null,I!==null&&(je=f(I),le=I.tag,I!==je||le!==5&&le!==27&&le!==6)&&(I=null)):(R=null,I=_),R!==I)){if(le=Cu,U="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(le=Du,U="onPointerLeave",E="onPointerEnter",S="pointer"),je=R==null?N:Ss(R),T=I==null?N:Ss(I),N=new le(U,S+"leave",R,n,M),N.target=je,N.relatedTarget=T,U=null,Ti(M)===_&&(le=new le(E,S+"enter",I,n,M),le.target=T,le.relatedTarget=je,U=le),je=U,R&&I)t:{for(le=Bg,E=R,S=I,T=0,U=E;U;U=le(U))T++;U=0;for(var ie=S;ie;ie=le(ie))U++;for(;0<T-U;)E=le(E),T--;for(;0<U-T;)S=le(S),U--;for(;T--;){if(E===S||S!==null&&E===S.alternate){le=E;break t}E=le(E),S=le(S)}le=null}else le=null;R!==null&&Nd(D,N,R,le,!1),I!==null&&je!==null&&Nd(D,je,I,le,!0)}}e:{if(N=_?Ss(_):window,R=N.nodeName&&N.nodeName.toLowerCase(),R==="select"||R==="input"&&N.type==="file")var ke=Xu;else if(Yu(N))if(Gu)ke=Zy;else{ke=Qy;var ee=Gy}else R=N.nodeName,!R||R.toLowerCase()!=="input"||N.type!=="checkbox"&&N.type!=="radio"?_&&vr(_.elementType)&&(ke=Xu):ke=Ky;if(ke&&(ke=ke(e,_))){Vu(D,ke,n,M);break e}ee&&ee(e,N,_),e==="focusout"&&_&&N.type==="number"&&_.memoizedProps.value!=null&&gr(N,"number",N.value)}switch(ee=_?Ss(_):window,e){case"focusin":(Yu(ee)||ee.contentEditable==="true")&&(Ci=ee,jr=_,zs=null);break;case"focusout":zs=jr=Ci=null;break;case"mousedown":Mr=!0;break;case"contextmenu":case"mouseup":case"dragend":Mr=!1,Pu(D,n,M);break;case"selectionchange":if(Fy)break;case"keydown":case"keyup":Pu(D,n,M)}var de;if(Nr)e:{switch(e){case"compositionstart":var we="onCompositionStart";break e;case"compositionend":we="onCompositionEnd";break e;case"compositionupdate":we="onCompositionUpdate";break e}we=void 0}else Mi?Hu(e,n)&&(we="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(we="onCompositionStart");we&&(Bu&&n.locale!=="ko"&&(Mi||we!=="onCompositionStart"?we==="onCompositionEnd"&&Mi&&(de=ju()):(Nn=M,Er="value"in Nn?Nn.value:Nn.textContent,Mi=!0)),ee=Al(_,we),0<ee.length&&(we=new Uu(we,e,null,n,M),D.push({event:we,listeners:ee}),de?we.data=de:(de=$u(n),de!==null&&(we.data=de)))),(de=Hy?$y(e,n):Yy(e,n))&&(we=Al(_,"onBeforeInput"),0<we.length&&(ee=new Uu("onBeforeInput","beforeinput",null,n,M),D.push({event:ee,listeners:we}),ee.data=de)),Mg(D,e,_,n,M)}_d(D,t)})}function na(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Al(e,t){for(var n=t+"Capture",s=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=Es(e,n),o!=null&&s.unshift(na(e,o,c)),o=Es(e,t),o!=null&&s.push(na(e,o,c))),e.tag===3)return s;e=e.return}return[]}function Bg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nd(e,t,n,s,o){for(var c=t._reactName,h=[];n!==null&&n!==s;){var p=n,v=p.alternate,_=p.stateNode;if(p=p.tag,v!==null&&v===s)break;p!==5&&p!==26&&p!==27||_===null||(v=_,o?(_=Es(n,c),_!=null&&h.unshift(na(n,_,v))):o||(_=Es(n,c),_!=null&&h.push(na(n,_,v)))),n=n.return}h.length!==0&&e.push({event:t,listeners:h})}var qg=/\r\n?/g,Lg=/\u0000|\uFFFD/g;function Od(e){return(typeof e=="string"?e:""+e).replace(qg,`
|
|
9
|
+
`).replace(Lg,"")}function Rd(e,t){return t=Od(t),Od(e)===t}function ze(e,t,n,s,o,c){switch(n){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Ri(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Ri(e,""+s);break;case"className":za(e,"class",s);break;case"tabIndex":za(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":za(e,n,s);break;case"style":Ou(e,s,c);break;case"data":if(t!=="object"){za(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=Ma(""+s),e.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(t!=="input"&&ze(e,t,"name",o.name,o,null),ze(e,t,"formEncType",o.formEncType,o,null),ze(e,t,"formMethod",o.formMethod,o,null),ze(e,t,"formTarget",o.formTarget,o,null)):(ze(e,t,"encType",o.encType,o,null),ze(e,t,"method",o.method,o,null),ze(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=Ma(""+s),e.setAttribute(n,s);break;case"onClick":s!=null&&(e.onclick=cn);break;case"onScroll":s!=null&&ge("scroll",e);break;case"onScrollEnd":s!=null&&ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=n}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}n=Ma(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,""+s):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":s===!0?e.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,s):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(n,s):e.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(n):e.setAttribute(n,s);break;case"popover":ge("beforetoggle",e),ge("toggle",e),Ra(e,"popover",s);break;case"xlinkActuate":on(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":on(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":on(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":on(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":on(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":on(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":on(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":on(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":on(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ra(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=dy.get(n)||n,Ra(e,n,s))}}function ac(e,t,n,s,o,c){switch(n){case"style":Ou(e,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=n}}break;case"children":typeof s=="string"?Ri(e,s):(typeof s=="number"||typeof s=="bigint")&&Ri(e,""+s);break;case"onScroll":s!=null&&ge("scroll",e);break;case"onScrollEnd":s!=null&&ge("scrollend",e);break;case"onClick":s!=null&&(e.onclick=cn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),c=e[pt]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof s=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,s,o);break e}n in e?e[n]=s:s===!0?e.setAttribute(n,""):Ra(e,n,s)}}}function ct(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ge("error",e),ge("load",e);var s=!1,o=!1,c;for(c in n)if(n.hasOwnProperty(c)){var h=n[c];if(h!=null)switch(c){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:ze(e,t,c,h,n,null)}}o&&ze(e,t,"srcSet",n.srcSet,n,null),s&&ze(e,t,"src",n.src,n,null);return;case"input":ge("invalid",e);var p=c=h=o=null,v=null,_=null;for(s in n)if(n.hasOwnProperty(s)){var M=n[s];if(M!=null)switch(s){case"name":o=M;break;case"type":h=M;break;case"checked":v=M;break;case"defaultChecked":_=M;break;case"value":c=M;break;case"defaultValue":p=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(l(137,t));break;default:ze(e,t,s,M,n,null)}}Tu(e,c,p,v,_,h,o,!1);return;case"select":ge("invalid",e),s=h=c=null;for(o in n)if(n.hasOwnProperty(o)&&(p=n[o],p!=null))switch(o){case"value":c=p;break;case"defaultValue":h=p;break;case"multiple":s=p;default:ze(e,t,o,p,n,null)}t=c,n=h,e.multiple=!!s,t!=null?Oi(e,!!s,t,!1):n!=null&&Oi(e,!!s,n,!0);return;case"textarea":ge("invalid",e),c=o=s=null;for(h in n)if(n.hasOwnProperty(h)&&(p=n[h],p!=null))switch(h){case"value":s=p;break;case"defaultValue":o=p;break;case"children":c=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(l(91));break;default:ze(e,t,h,p,n,null)}Au(e,s,o,c);return;case"option":for(v in n)n.hasOwnProperty(v)&&(s=n[v],s!=null)&&(v==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":ze(e,t,v,s,n,null));return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(s=0;s<ta.length;s++)ge(ta[s],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_ in n)if(n.hasOwnProperty(_)&&(s=n[_],s!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:ze(e,t,_,s,n,null)}return;default:if(vr(t)){for(M in n)n.hasOwnProperty(M)&&(s=n[M],s!==void 0&&ac(e,t,M,s,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(s=n[p],s!=null&&ze(e,t,p,s,n,null))}function Hg(e,t,n,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,h=null,p=null,v=null,_=null,M=null;for(R in n){var D=n[R];if(n.hasOwnProperty(R)&&D!=null)switch(R){case"checked":break;case"value":break;case"defaultValue":v=D;default:s.hasOwnProperty(R)||ze(e,t,R,null,s,D)}}for(var N in s){var R=s[N];if(D=n[N],s.hasOwnProperty(N)&&(R!=null||D!=null))switch(N){case"type":c=R;break;case"name":o=R;break;case"checked":_=R;break;case"defaultChecked":M=R;break;case"value":h=R;break;case"defaultValue":p=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(l(137,t));break;default:R!==D&&ze(e,t,N,R,s,D)}}yr(e,h,p,v,_,M,c,o);return;case"select":R=h=p=N=null;for(c in n)if(v=n[c],n.hasOwnProperty(c)&&v!=null)switch(c){case"value":break;case"multiple":R=v;default:s.hasOwnProperty(c)||ze(e,t,c,null,s,v)}for(o in s)if(c=s[o],v=n[o],s.hasOwnProperty(o)&&(c!=null||v!=null))switch(o){case"value":N=c;break;case"defaultValue":p=c;break;case"multiple":h=c;default:c!==v&&ze(e,t,o,c,s,v)}t=p,n=h,s=R,N!=null?Oi(e,!!n,N,!1):!!s!=!!n&&(t!=null?Oi(e,!!n,t,!0):Oi(e,!!n,n?[]:"",!1));return;case"textarea":R=N=null;for(p in n)if(o=n[p],n.hasOwnProperty(p)&&o!=null&&!s.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:ze(e,t,p,null,s,o)}for(h in s)if(o=s[h],c=n[h],s.hasOwnProperty(h)&&(o!=null||c!=null))switch(h){case"value":N=o;break;case"defaultValue":R=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(l(91));break;default:o!==c&&ze(e,t,h,o,s,c)}_u(e,N,R);return;case"option":for(var I in n)N=n[I],n.hasOwnProperty(I)&&N!=null&&!s.hasOwnProperty(I)&&(I==="selected"?e.selected=!1:ze(e,t,I,null,s,N));for(v in s)N=s[v],R=n[v],s.hasOwnProperty(v)&&N!==R&&(N!=null||R!=null)&&(v==="selected"?e.selected=N&&typeof N!="function"&&typeof N!="symbol":ze(e,t,v,N,s,R));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 le in n)N=n[le],n.hasOwnProperty(le)&&N!=null&&!s.hasOwnProperty(le)&&ze(e,t,le,null,s,N);for(_ in s)if(N=s[_],R=n[_],s.hasOwnProperty(_)&&N!==R&&(N!=null||R!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(l(137,t));break;default:ze(e,t,_,N,s,R)}return;default:if(vr(t)){for(var je in n)N=n[je],n.hasOwnProperty(je)&&N!==void 0&&!s.hasOwnProperty(je)&&ac(e,t,je,void 0,s,N);for(M in s)N=s[M],R=n[M],!s.hasOwnProperty(M)||N===R||N===void 0&&R===void 0||ac(e,t,M,N,s,R);return}}for(var E in n)N=n[E],n.hasOwnProperty(E)&&N!=null&&!s.hasOwnProperty(E)&&ze(e,t,E,null,s,N);for(D in s)N=s[D],R=n[D],!s.hasOwnProperty(D)||N===R||N==null&&R==null||ze(e,t,D,N,s,R)}function zd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $g(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var o=n[s],c=o.transferSize,h=o.initiatorType,p=o.duration;if(c&&p&&zd(h)){for(h=0,p=o.responseEnd,s+=1;s<n.length;s++){var v=n[s],_=v.startTime;if(_>p)break;var M=v.transferSize,D=v.initiatorType;M&&zd(D)&&(v=v.responseEnd,h+=M*(v<p?1:(p-_)/(v-_)))}if(--s,t+=8*(c+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var lc=null,rc=null;function Nl(e){return e.nodeType===9?e:e.ownerDocument}function jd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Md(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function oc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cc=null;function Yg(){var e=window.event;return e&&e.type==="popstate"?e===cc?!1:(cc=e,!0):(cc=null,!1)}var Cd=typeof setTimeout=="function"?setTimeout:void 0,Vg=typeof clearTimeout=="function"?clearTimeout:void 0,Ud=typeof Promise=="function"?Promise:void 0,Xg=typeof queueMicrotask=="function"?queueMicrotask:typeof Ud<"u"?function(e){return Ud.resolve(null).then(e).catch(Gg)}:Cd;function Gg(e){setTimeout(function(){throw e})}function Gn(e){return e==="head"}function Dd(e,t){var n=t,s=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(s===0){e.removeChild(o),rs(t);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")ia(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ia(n);for(var c=n.firstChild;c;){var h=c.nextSibling,p=c.nodeName;c[xs]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=h}}else n==="body"&&ia(e.ownerDocument.body);n=o}while(n);rs(t)}function Bd(e,t){var n=e;e=0;do{var s=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=s}while(n)}function uc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":uc(n),pr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Qg(e,t,n,s){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[xs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Lt(e.nextSibling),e===null)break}return null}function Kg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Lt(e.nextSibling),e===null))return null;return e}function qd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Lt(e.nextSibling),e===null))return null;return e}function fc(e){return e.data==="$?"||e.data==="$~"}function hc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Zg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var s=function(){t(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Lt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var dc=null;function Ld(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Lt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Hd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function $d(e,t,n){switch(t=Nl(n),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function ia(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pr(e)}var Ht=new Map,Yd=new Set;function Ol(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tn=$.d;$.d={f:Jg,r:Fg,D:Wg,C:Ig,L:Pg,m:ev,X:nv,S:tv,M:iv};function Jg(){var e=Tn.f(),t=wl();return e||t}function Fg(e){var t=_i(e);t!==null&&t.tag===5&&t.type==="form"?ah(t):Tn.r(e)}var ss=typeof document>"u"?null:document;function Vd(e,t,n){var s=ss;if(s&&typeof t=="string"&&t){var o=jt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),Yd.has(o)||(Yd.add(o),e={rel:e,crossOrigin:n,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),ct(t,"link",e),Pe(t),s.head.appendChild(t)))}}function Wg(e){Tn.D(e),Vd("dns-prefetch",e,null)}function Ig(e,t){Tn.C(e,t),Vd("preconnect",e,t)}function Pg(e,t,n){Tn.L(e,t,n);var s=ss;if(s&&e&&t){var o='link[rel="preload"][as="'+jt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+jt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+jt(n.imageSizes)+'"]')):o+='[href="'+jt(e)+'"]';var c=o;switch(t){case"style":c=as(e);break;case"script":c=ls(e)}Ht.has(c)||(e=x({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ht.set(c,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(sa(c))||t==="script"&&s.querySelector(aa(c))||(t=s.createElement("link"),ct(t,"link",e),Pe(t),s.head.appendChild(t)))}}function ev(e,t){Tn.m(e,t);var n=ss;if(n&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+jt(s)+'"][href="'+jt(e)+'"]',c=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ls(e)}if(!Ht.has(c)&&(e=x({rel:"modulepreload",href:e},t),Ht.set(c,e),n.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(aa(c)))return}s=n.createElement("link"),ct(s,"link",e),Pe(s),n.head.appendChild(s)}}}function tv(e,t,n){Tn.S(e,t,n);var s=ss;if(s&&e){var o=Ai(s).hoistableStyles,c=as(e);t=t||"default";var h=o.get(c);if(!h){var p={loading:0,preload:null};if(h=s.querySelector(sa(c)))p.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ht.get(c))&&pc(e,n);var v=h=s.createElement("link");Pe(v),ct(v,"link",e),v._p=new Promise(function(_,M){v.onload=_,v.onerror=M}),v.addEventListener("load",function(){p.loading|=1}),v.addEventListener("error",function(){p.loading|=2}),p.loading|=4,Rl(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:p},o.set(c,h)}}}function nv(e,t){Tn.X(e,t);var n=ss;if(n&&e){var s=Ai(n).hoistableScripts,o=ls(e),c=s.get(o);c||(c=n.querySelector(aa(o)),c||(e=x({src:e,async:!0},t),(t=Ht.get(o))&&mc(e,t),c=n.createElement("script"),Pe(c),ct(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function iv(e,t){Tn.M(e,t);var n=ss;if(n&&e){var s=Ai(n).hoistableScripts,o=ls(e),c=s.get(o);c||(c=n.querySelector(aa(o)),c||(e=x({src:e,async:!0,type:"module"},t),(t=Ht.get(o))&&mc(e,t),c=n.createElement("script"),Pe(c),ct(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function Xd(e,t,n,s){var o=(o=he.current)?Ol(o):null;if(!o)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=as(n.href),n=Ai(o).hoistableStyles,s=n.get(t),s||(s={type:"style",instance:null,count:0,state:null},n.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=as(n.href);var c=Ai(o).hoistableStyles,h=c.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,h),(c=o.querySelector(sa(e)))&&!c._p&&(h.instance=c,h.state.loading=5),Ht.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ht.set(e,n),c||sv(o,e,n,h.state))),t&&s===null)throw Error(l(528,""));return h}if(t&&s!==null)throw Error(l(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ls(n),n=Ai(o).hoistableScripts,s=n.get(t),s||(s={type:"script",instance:null,count:0,state:null},n.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function as(e){return'href="'+jt(e)+'"'}function sa(e){return'link[rel="stylesheet"]['+e+"]"}function Gd(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function sv(e,t,n,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ct(t,"link",n),Pe(t),e.head.appendChild(t))}function ls(e){return'[src="'+jt(e)+'"]'}function aa(e){return"script[async]"+e}function Qd(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+jt(n.href)+'"]');if(s)return t.instance=s,Pe(s),s;var o=x({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Pe(s),ct(s,"style",o),Rl(s,n.precedence,e),t.instance=s;case"stylesheet":o=as(n.href);var c=e.querySelector(sa(o));if(c)return t.state.loading|=4,t.instance=c,Pe(c),c;s=Gd(n),(o=Ht.get(o))&&pc(s,o),c=(e.ownerDocument||e).createElement("link"),Pe(c);var h=c;return h._p=new Promise(function(p,v){h.onload=p,h.onerror=v}),ct(c,"link",s),t.state.loading|=4,Rl(c,n.precedence,e),t.instance=c;case"script":return c=ls(n.src),(o=e.querySelector(aa(c)))?(t.instance=o,Pe(o),o):(s=n,(o=Ht.get(c))&&(s=x({},n),mc(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),Pe(o),ct(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Rl(s,n.precedence,e));return t.instance}function Rl(e,t,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,c=o,h=0;h<s.length;h++){var p=s[h];if(p.dataset.precedence===t)c=p;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function pc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function mc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var zl=null;function Kd(e,t,n){if(zl===null){var s=new Map,o=zl=new Map;o.set(n,s)}else o=zl,s=o.get(n),s||(s=new Map,o.set(n,s));if(s.has(e))return s;for(s.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var c=n[o];if(!(c[xs]||c[at]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var h=c.getAttribute(t)||"";h=e+h;var p=s.get(h);p?p.push(c):s.set(h,[c])}}return s}function Zd(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function av(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Jd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function lv(e,t,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=as(s.href),c=t.querySelector(sa(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=jl.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,Pe(c);return}c=t.ownerDocument||t,s=Gd(s),(o=Ht.get(o))&&pc(s,o),c=c.createElement("link"),Pe(c);var h=c;h._p=new Promise(function(p,v){h.onload=p,h.onerror=v}),ct(c,"link",s),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=jl.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var yc=0;function rv(e,t){return e.stylesheets&&e.count===0&&Cl(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var s=setTimeout(function(){if(e.stylesheets&&Cl(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&yc===0&&(yc=62500*$g());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cl(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>yc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function jl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ml=null;function Cl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ml=new Map,t.forEach(ov,e),Ml=null,jl.call(e))}function ov(e,t){if(!(t.state.loading&4)){var n=Ml.get(e);if(n)var s=n.get(null);else{n=new Map,Ml.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var h=o[c];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),s=h)}s&&n.set(null,s)}o=t.instance,h=o.getAttribute("data-precedence"),c=n.get(h)||s,c===s&&n.set(null,o),n.set(h,o),this.count++,s=jl.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var la={$$typeof:te,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function cv(e,t,n,s,o,c,h,p,v){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ur(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ur(0),this.hiddenUpdates=ur(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function Fd(e,t,n,s,o,c,h,p,v,_,M,D){return e=new cv(e,t,n,h,v,_,M,D,p),t=1,c===!0&&(t|=24),c=kt(3,null,null,t),e.current=c,c.stateNode=e,t=Zr(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:s,isDehydrated:n,cache:t},Ir(c),e}function Wd(e){return e?(e=Bi,e):Bi}function Id(e,t,n,s,o,c){o=Wd(o),s.context===null?s.context=o:s.pendingContext=o,s=Cn(t),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=Un(e,s,t),n!==null&&(wt(n,e,t),qs(n,e,t))}function Pd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gc(e,t){Pd(e,t),(e=e.alternate)&&Pd(e,t)}function ep(e){if(e.tag===13||e.tag===31){var t=oi(e,67108864);t!==null&&wt(t,e,67108864),gc(e,67108864)}}function tp(e){if(e.tag===13||e.tag===31){var t=Ot();t=fr(t);var n=oi(e,t);n!==null&&wt(n,e,t),gc(e,t)}}var Ul=!0;function uv(e,t,n,s){var o=k.T;k.T=null;var c=$.p;try{$.p=2,vc(e,t,n,s)}finally{$.p=c,k.T=o}}function fv(e,t,n,s){var o=k.T;k.T=null;var c=$.p;try{$.p=8,vc(e,t,n,s)}finally{$.p=c,k.T=o}}function vc(e,t,n,s){if(Ul){var o=bc(s);if(o===null)sc(e,t,s,Dl,n),ip(e,s);else if(dv(o,e,t,n,s))s.stopPropagation();else if(ip(e,s),t&4&&-1<hv.indexOf(e)){for(;o!==null;){var c=_i(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var h=ii(c.pendingLanes);if(h!==0){var p=c;for(p.pendingLanes|=2,p.entangledLanes|=2;h;){var v=1<<31-St(h);p.entanglements[1]|=v,h&=~v}Pt(c),(_e&6)===0&&(vl=Ge()+500,ea(0))}}break;case 31:case 13:p=oi(c,2),p!==null&&wt(p,c,2),wl(),gc(c,2)}if(c=bc(s),c===null&&sc(e,t,s,Dl,n),c===o)break;o=c}o!==null&&s.stopPropagation()}else sc(e,t,s,null,n)}}function bc(e){return e=wr(e),wc(e)}var Dl=null;function wc(e){if(Dl=null,e=Ti(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=d(t),e!==null)return e;e=null}else if(n===31){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dl=e,null}function np(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ei()){case cu:return 2;case uu:return 8;case Ta:case Im:return 32;case fu:return 268435456;default:return 32}default:return 32}}var xc=!1,Qn=null,Kn=null,Zn=null,ra=new Map,oa=new Map,Jn=[],hv="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 ip(e,t){switch(e){case"focusin":case"focusout":Qn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":ra.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":oa.delete(t.pointerId)}}function ca(e,t,n,s,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[o]},t!==null&&(t=_i(t),t!==null&&ep(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function dv(e,t,n,s,o){switch(t){case"focusin":return Qn=ca(Qn,e,t,n,s,o),!0;case"dragenter":return Kn=ca(Kn,e,t,n,s,o),!0;case"mouseover":return Zn=ca(Zn,e,t,n,s,o),!0;case"pointerover":var c=o.pointerId;return ra.set(c,ca(ra.get(c)||null,e,t,n,s,o)),!0;case"gotpointercapture":return c=o.pointerId,oa.set(c,ca(oa.get(c)||null,e,t,n,s,o)),!0}return!1}function sp(e){var t=Ti(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=d(n),t!==null){e.blockedOn=t,gu(e.priority,function(){tp(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,gu(e.priority,function(){tp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bc(e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);br=s,n.target.dispatchEvent(s),br=null}else return t=_i(n),t!==null&&ep(t),e.blockedOn=n,!1;t.shift()}return!0}function ap(e,t,n){Bl(e)&&n.delete(t)}function pv(){xc=!1,Qn!==null&&Bl(Qn)&&(Qn=null),Kn!==null&&Bl(Kn)&&(Kn=null),Zn!==null&&Bl(Zn)&&(Zn=null),ra.forEach(ap),oa.forEach(ap)}function ql(e,t){e.blockedOn===t&&(e.blockedOn=null,xc||(xc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,pv)))}var Ll=null;function lp(e){Ll!==e&&(Ll=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Ll===e&&(Ll=null);for(var t=0;t<e.length;t+=3){var n=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(wc(s||n)===null)continue;break}var c=_i(n);c!==null&&(e.splice(t,3),t-=3,bo(c,{pending:!0,data:o,method:n.method,action:s},s,o))}}))}function rs(e){function t(v){return ql(v,e)}Qn!==null&&ql(Qn,e),Kn!==null&&ql(Kn,e),Zn!==null&&ql(Zn,e),ra.forEach(t),oa.forEach(t);for(var n=0;n<Jn.length;n++){var s=Jn[n];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Jn.length&&(n=Jn[0],n.blockedOn===null);)sp(n),n.blockedOn===null&&Jn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var o=n[s],c=n[s+1],h=o[pt]||null;if(typeof c=="function")h||lp(n);else if(h){var p=null;if(c&&c.hasAttribute("formAction")){if(o=c,h=c[pt]||null)p=h.formAction;else if(wc(o)!==null)continue}else p=h.action;typeof p=="function"?n[s+1]=p:(n.splice(s,3),s-=3),lp(n)}}}function rp(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Sc(e){this._internalRoot=e}Hl.prototype.render=Sc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var n=t.current,s=Ot();Id(n,s,e,t,null,null)},Hl.prototype.unmount=Sc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Id(e.current,2,null,e,null,null),wl(),t[ki]=null}};function Hl(e){this._internalRoot=e}Hl.prototype.unstable_scheduleHydration=function(e){if(e){var t=yu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jn.length&&t!==0&&t<Jn[n].priority;n++);Jn.splice(n,0,e),n===0&&sp(e)}};var op=i.version;if(op!=="19.2.8")throw Error(l(527,op,"19.2.8"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=b(t),e=e!==null?A(e):null,e=e===null?null:e.stateNode,e};var mv={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$l.isDisabled&&$l.supportsFiber)try{vs=$l.inject(mv),xt=$l}catch{}}return da.createRoot=function(e,t){if(!u(e))throw Error(l(299));var n=!1,s="",o=mh,c=yh,h=gh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Fd(e,1,!1,null,null,n,s,null,o,c,h,rp),e[ki]=t.current,ic(e),new Sc(t)},da.hydrateRoot=function(e,t,n){if(!u(e))throw Error(l(299));var s=!1,o="",c=mh,h=yh,p=gh,v=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(v=n.formState)),t=Fd(e,1,!0,t,n??null,s,o,v,c,h,p,rp),t.context=Wd(null),n=t.current,s=Ot(),s=fr(s),o=Cn(s),o.callback=null,Un(n,o,s),n=s,t.current.lanes=n,ws(t,n),Pt(t),e[ki]=t.current,ic(e),new Hl(t)},da.version="19.2.8",da}var _p;function jv(){if(_p)return Nc.exports;_p=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}return r(),Nc.exports=zv(),Nc.exports}var Mv=jv(),Vl={exports:{}},Ap;function Cv(){if(Ap)return Vl.exports;Ap=1;var r=typeof Reflect=="object"?Reflect:null,i=r&&typeof r.apply=="function"?r.apply:function(j,H,C){return Function.prototype.apply.call(j,H,C)},a;r&&typeof r.ownKeys=="function"?a=r.ownKeys:Object.getOwnPropertySymbols?a=function(j){return Object.getOwnPropertyNames(j).concat(Object.getOwnPropertySymbols(j))}:a=function(j){return Object.getOwnPropertyNames(j)};function l(O){console&&console.warn&&console.warn(O)}var u=Number.isNaN||function(j){return j!==j};function f(){f.init.call(this)}Vl.exports=f,Vl.exports.once=z,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var d=10;function m(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return d},set:function(O){if(typeof O!="number"||O<0||u(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");d=O}}),f.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(j){if(typeof j!="number"||j<0||u(j))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+j+".");return this._maxListeners=j,this};function y(O){return O._maxListeners===void 0?f.defaultMaxListeners:O._maxListeners}f.prototype.getMaxListeners=function(){return y(this)},f.prototype.emit=function(j){for(var H=[],C=1;C<arguments.length;C++)H.push(arguments[C]);var Q=j==="error",ne=this._events;if(ne!==void 0)Q=Q&&ne.error===void 0;else if(!Q)return!1;if(Q){var se;if(H.length>0&&(se=H[0]),se instanceof Error)throw se;var re=new Error("Unhandled error."+(se?" ("+se.message+")":""));throw re.context=se,re}var ve=ne[j];if(ve===void 0)return!1;if(typeof ve=="function")i(ve,this,H);else for(var Le=ve.length,nt=K(ve,Le),C=0;C<Le;++C)i(nt[C],this,H);return!0};function b(O,j,H,C){var Q,ne,se;if(m(H),ne=O._events,ne===void 0?(ne=O._events=Object.create(null),O._eventsCount=0):(ne.newListener!==void 0&&(O.emit("newListener",j,H.listener?H.listener:H),ne=O._events),se=ne[j]),se===void 0)se=ne[j]=H,++O._eventsCount;else if(typeof se=="function"?se=ne[j]=C?[H,se]:[se,H]:C?se.unshift(H):se.push(H),Q=y(O),Q>0&&se.length>Q&&!se.warned){se.warned=!0;var re=new Error("Possible EventEmitter memory leak detected. "+se.length+" "+String(j)+" listeners added. Use emitter.setMaxListeners() to increase limit");re.name="MaxListenersExceededWarning",re.emitter=O,re.type=j,re.count=se.length,l(re)}return O}f.prototype.addListener=function(j,H){return b(this,j,H,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(j,H){return b(this,j,H,!0)};function A(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function x(O,j,H){var C={fired:!1,wrapFn:void 0,target:O,type:j,listener:H},Q=A.bind(C);return Q.listener=H,C.wrapFn=Q,Q}f.prototype.once=function(j,H){return m(H),this.on(j,x(this,j,H)),this},f.prototype.prependOnceListener=function(j,H){return m(H),this.prependListener(j,x(this,j,H)),this},f.prototype.removeListener=function(j,H){var C,Q,ne,se,re;if(m(H),Q=this._events,Q===void 0)return this;if(C=Q[j],C===void 0)return this;if(C===H||C.listener===H)--this._eventsCount===0?this._events=Object.create(null):(delete Q[j],Q.removeListener&&this.emit("removeListener",j,C.listener||H));else if(typeof C!="function"){for(ne=-1,se=C.length-1;se>=0;se--)if(C[se]===H||C[se].listener===H){re=C[se].listener,ne=se;break}if(ne<0)return this;ne===0?C.shift():Z(C,ne),C.length===1&&(Q[j]=C[0]),Q.removeListener!==void 0&&this.emit("removeListener",j,re||H)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(j){var H,C,Q;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[j]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[j]),this;if(arguments.length===0){var ne=Object.keys(C),se;for(Q=0;Q<ne.length;++Q)se=ne[Q],se!=="removeListener"&&this.removeAllListeners(se);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(H=C[j],typeof H=="function")this.removeListener(j,H);else if(H!==void 0)for(Q=H.length-1;Q>=0;Q--)this.removeListener(j,H[Q]);return this};function q(O,j,H){var C=O._events;if(C===void 0)return[];var Q=C[j];return Q===void 0?[]:typeof Q=="function"?H?[Q.listener||Q]:[Q]:H?F(Q):K(Q,Q.length)}f.prototype.listeners=function(j){return q(this,j,!0)},f.prototype.rawListeners=function(j){return q(this,j,!1)},f.listenerCount=function(O,j){return typeof O.listenerCount=="function"?O.listenerCount(j):L.call(O,j)},f.prototype.listenerCount=L;function L(O){var j=this._events;if(j!==void 0){var H=j[O];if(typeof H=="function")return 1;if(H!==void 0)return H.length}return 0}f.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]};function K(O,j){for(var H=new Array(j),C=0;C<j;++C)H[C]=O[C];return H}function Z(O,j){for(;j+1<O.length;j++)O[j]=O[j+1];O.pop()}function F(O){for(var j=new Array(O.length),H=0;H<j.length;++H)j[H]=O[H].listener||O[H];return j}function z(O,j){return new Promise(function(H,C){function Q(se){O.removeListener(j,ne),C(se)}function ne(){typeof O.removeListener=="function"&&O.removeListener("error",Q),H([].slice.call(arguments))}te(O,j,ne,{once:!0}),j!=="error"&&G(O,Q,{once:!0})})}function G(O,j,H){typeof O.on=="function"&&te(O,"error",j,H)}function te(O,j,H,C){if(typeof O.on=="function")C.once?O.once(j,H):O.on(j,H);else if(typeof O.addEventListener=="function")O.addEventListener(j,function Q(ne){C.once&&O.removeEventListener(j,Q),H(ne)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O)}return Vl.exports}var ei=Cv();const qc=Ev(ei),Uv=Object.prototype.toString,Dv="[object Uint8Array]",Bv="[object ArrayBuffer]";function hm(r,i,a){return r?r.constructor===i?!0:Uv.call(r)===a:!1}function qv(r){return hm(r,Uint8Array,Dv)}function Lv(r){return hm(r,ArrayBuffer,Bv)}function Hv(r){return qv(r)||Lv(r)}function $v(r){if(!Hv(r))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof r}\``)}const Np={utf8:new globalThis.TextDecoder("utf8")};function dm(r,i="utf8"){return $v(r),Np[i]??=new globalThis.TextDecoder(i),Np[i].decode(r)}function Yv(r){if(typeof r!="string")throw new TypeError(`Expected \`string\`, got \`${typeof r}\``)}const Vv=new globalThis.TextEncoder;function pm(r){return Yv(r),Vv.encode(r)}Array.from({length:256},(r,i)=>i.toString(16).padStart(2,"0"));const ut=[];for(let r=0;r<256;++r)ut.push((r+256).toString(16).slice(1));function Xv(r,i=0){return(ut[r[i+0]]+ut[r[i+1]]+ut[r[i+2]]+ut[r[i+3]]+"-"+ut[r[i+4]]+ut[r[i+5]]+"-"+ut[r[i+6]]+ut[r[i+7]]+"-"+ut[r[i+8]]+ut[r[i+9]]+"-"+ut[r[i+10]]+ut[r[i+11]]+ut[r[i+12]]+ut[r[i+13]]+ut[r[i+14]]+ut[r[i+15]]).toLowerCase()}const Gv=new Uint8Array(16);function Qv(){return crypto.getRandomValues(Gv)}function tt(r,i,a){return crypto.randomUUID?crypto.randomUUID():Kv(r)}function Kv(r,i,a){r=r||{};const l=r.random??r.rng?.()??Qv();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,Xv(l)}const Lc=1024,Op="$",xi={openBrace:123,closeBrace:125,quote:34,backslash:92,delimiter:36},Rp=(r,i)=>{if(i===0||r(0)!==xi.openBrace)return-1;const a=Math.min(i,Lc);let l=0,u=!1,f=!1;for(let d=0;d<a;d++){const m=r(d);if(u){f?f=!1:m===xi.backslash?f=!0:m===xi.quote&&(u=!1);continue}if(m===xi.quote)u=!0;else if(m===xi.openBrace)l++;else if(m===xi.closeBrace&&--l===0){const y=d+1;return y<a&&r(y)===xi.delimiter?y:-1}}return-1},Ae={connected:"connected",disconnected:"disconnected",peerOnline:"peerOnline",peerGone:"peerGone",peerDisplaced:"peerDisplaced",rejected:"rejected",unroutable:"unroutable",transportError:"transportError",relayed:"relayed"};class mm{maxPeers;peers=new Map;constructor(i=1e4){this.maxPeers=i}set(i,a){for(this.peers.delete(i),this.peers.set(i,a);this.peers.size>this.maxPeers;){const l=this.peers.keys().next();if(l.done)break;this.peers.delete(l.value)}}get(i){return this.peers.get(i)}delete(i){return this.peers.delete(i)}clear(){this.peers.clear()}get size(){return this.peers.size}namesFor(i){const a=[];for(const[l,u]of this.peers)u===i&&a.push(l);return a}names(){return[...this.peers.keys()]}}class lr extends ei.EventEmitter{name;destinations=[];peerRegistry=new mm;readyFlag=!1;seq=0;constructor(i,a){super(),this.name=i,i||(this.name=tt()),a&&a.forEach(l=>{l.pipe(this)})}async ready(i=3e4){const a=Date.now()+i;for(;!this.readyFlag;){if(Date.now()>a)return!1;await new Promise(l=>setTimeout(l,10))}return!0}async open(){}async close(){}buildHeader(i,a,l){return{source:i,target:a,time:Date.now(),seq:this.seq++,...l}}prependHeader(i,a,l){return this.frameMessage(this.buildHeader(i,a),l)}frameMessage(i,a){const l=JSON.stringify(i)+Op,u=pm(l);if(u.length>Lc)throw new Error(`message header is ${u.length} bytes, over the ${Lc} byte limit (source '${i.source}', target '${i.target}') - shorten the peer names`);if(typeof a=="string")return l+a;const f=new Uint8Array(u.length+a.length);return f.set(u,0),f.set(a,u.length),f}extractHeader(i){const a=typeof i=="string",l=Rp(a?y=>i.charCodeAt(y):y=>i[y],i.length);if(l<0)return[void 0,"","no msgrpc header"];const u=a?i.substring(0,l):dm(i.subarray(0,l));let f;try{f=JSON.parse(u)}catch(y){return[void 0,"",`unparsable header: ${String(y)}`]}if(!f||typeof f!="object")return[void 0,"","header is not an object"];if(typeof f.target!="string"||!f.target)return[void 0,"","header names no target"];if(typeof f.source!="string"||!f.source)return[void 0,"","header names no source"];const d=l+Op.length,m=a?i.substring(d):i.slice(d);return this.setKnownSource(f.source),[f,m]}getName(){return this.name}targetExists(i,a){let l;this.name===i&&(l=this);const u=this.peerRegistry.get(i);return u&&(l=u),l||this.destinations.map(f=>{!l&&!f.target.isTransport()&&f.target.targetExists(i,(a||0)+1)&&(l=f.target)}),l}pipe(i){const a=tt();return this.destinations.push({id:a,target:i}),()=>{this.destinations=this.destinations.filter(l=>l.id!==a)}}async receive(i,a,l){}async receivePayload(i,a,l){}async send(i,a,l){await Promise.all(this.destinations.map(async u=>await u.target.receive(i,a,l)))}setKnownSource(i){this.peerRegistry.set(i,this)}usePeerRegistry(i){return this.peerRegistry=i,this}getIdentity(i){}async sendPayload(i,a,l,u){}isTransport(){return!1}}var Fe;(function(r){r.RequestMessage="REQUEST",r.ResponseMessage="RESPONSE",r.ErrorMessage="ERROR",r.EventMessage="EVENT",r.UnknownMessage="UNKNOWN"})(Fe||(Fe={}));class ym{type;payload}const Zv=(r,i,a,l)=>{const u=new ym;return u.type=l||Fe.UnknownMessage,u.payload=r,u};class gm extends lr{name;constructor(i,a){super(i),this.name=i,i||(this.name=tt()),a&&a.forEach(l=>{l.pipe(this)})}pipe(i){const a=tt();return this.destinations.push({id:a,target:i}),()=>{this.destinations=this.destinations.filter(l=>l.id!==a)}}receive(i,a,l){return Promise.resolve()}async send(i,a,l){await Promise.all(this.destinations.map(async u=>await u.target.receive(i,a,l)))}async sendPayload(i,a,l,u){const f=Zv(i,this.name,u,a);await this.send(f,l,u)}}const Jv=r=>r==="on"||r==="addListener"||r==="prependListener"||r==="once"||r==="prependOnceListener"||r==="off"||r==="removeListener"||r==="emit"||r==="removeListener"||r==="removeAllListeners"||r==="setMaxListeners"||r==="getMaxListeners";var Xe;(function(r){r.CallInstanceMethod="POST",r.success="SUCCESS",r.error="ERROR",r.event="EVENT"})(Xe||(Xe={}));const Xl={query:0,"idempotent-command":1,"non-repeatable-command":2},jc=r=>{if(r instanceof Error)return{name:r.name,message:r.message,stack:r.stack};if(r&&typeof r=="object"){const i=r;if(typeof i.message=="string")return{name:typeof i.name=="string"?i.name:"Error",message:i.message}}return{name:"Error",message:String(r)}},Fv=r=>"code"in r,Hc=new WeakMap,$c=new WeakMap,Yc=new WeakMap,Vc=new WeakMap,Wv=(r,i,a,l,u)=>{let f=Hc.get(r);if(f||Hc.set(r,f=new Set),f.add(i),l){let m=Yc.get(r);m||Yc.set(r,m=new Set),m.add(i)}if(u){let m=Vc.get(r);m||Vc.set(r,m=new Set),m.add(i)}if(!a)return;let d=$c.get(r);d||$c.set(r,d=new Map),d.set(i,a)},zp=(r,i)=>{if(r.static)throw new Error("@rpc: static methods cannot be exposed");if(r.private)throw new Error("@rpc: private methods cannot be exposed");r.addInitializer(function(){Wv(this.constructor,String(r.name),i.semantics,i.conflate,i.requiresAuthority)})};function xa(r,i){if(typeof r=="function"&&i)return zp(i,{});const a=r;return(l,u)=>zp(u,a)}const vm=new WeakMap,bm=(r,i={})=>(a,l)=>(vm.set(a,{name:r,version:i.version,execution:i.execution,mailbox:i.mailbox}),a),Iv=r=>{for(let i=r.constructor;i;i=Object.getPrototypeOf(i)){const a=vm.get(i);if(a)return a}},Pv=r=>{const i=new Set;for(let a=r.constructor;a;a=Object.getPrototypeOf(a))for(const l of Hc.get(a)??[])i.add(l);return i.size?i:void 0},e0=r=>{const i=new Map;for(let a=r.constructor;a;a=Object.getPrototypeOf(a))for(const[l,u]of $c.get(a)??[])i.has(l)||i.set(l,u);return i},t0=r=>{const i=new Set;for(let a=r.constructor;a;a=Object.getPrototypeOf(a))for(const l of Yc.get(a)??[])i.add(l);return i},n0=r=>{const i=new Set;for(let a=r.constructor;a;a=Object.getPrototypeOf(a))for(const l of Vc.get(a)??[])i.add(l);return i},jp=(r,i)=>!!r&&!!i&&r.peer===i.peer&&r.instance===i.instance;class i0{durable=!1;async load(){}async save(){}}const dt="$host",Gl=128,wm=/[\u0000-\u001f\u007f]/,Wn=(r,i)=>{if(!r)throw new Error(`topology: ${i} is empty`);if(wm.test(r))throw new Error(`topology: ${i} contains a control character, and ids never do`)},Mc=r=>{if(r!==void 0&&wm.test(r))throw new Error("topology: a label contains a control character")};class s0{peer;options;records=new Map;onCommitted;listeners=new Map;store;loaded=!1;constructor(i,a={}){this.peer=i,this.options=a;for(const l of a.place??[])Wn(l,`place segment '${l}'`);Mc(a.label),this.store=a.store??new i0}async init(){const i=await this.store.load();if(i)for(const a of i)this.records.set(a.ref.instance,a);this.records.has(dt)||this.records.set(dt,{ref:{peer:this.peer,instance:dt},parent:null,owner:null,parentEpoch:tt(),ownerEpoch:tt(),version:{epoch:tt(),revision:0},...this.options.label!==void 0?{label:this.options.label}:{}}),this.loaded=!0,await this.persist()}ref(i){return{peer:this.peer,instance:i}}get(i){return this.records.get(i)}all(){return[...this.records.values()]}get place(){return this.options.place}capabilities(){return{authorityScope:"host",cycleGuarantee:"detected",reverseIndex:"eventual",deletion:"tombstone",durability:this.store.durable?"durable":"volatile"}}async declare(i,a={}){if(this.assertLoaded(),Wn(i,`instance '${i}'`),i===dt)throw new Error(`topology: ${dt} is the synthetic root - set its links with updateHost()`);if(this.records.has(i))throw new Error(`topology: ${i} is already declared - changes go through update() with the expected version`);Mc(a.label);const l=a.parent===void 0?this.ref(dt):a.parent;this.checkParent(i,l),this.checkOwner(i,a.owner??null);const u={ref:this.ref(i),parent:l,owner:a.owner??null,parentEpoch:tt(),ownerEpoch:tt(),version:{epoch:tt(),revision:0},...a.label!==void 0?{label:a.label}:{}};return this.records.set(i,u),await this.persist(),this.notify(i),u}async update(i,a,l){this.assertLoaded();const u=this.records.get(i);if(!u)throw new Error(`topology: ${i} is not declared here`);if(u.version.epoch!==l.expectedVersion.epoch||u.version.revision!==l.expectedVersion.revision)throw new Error(`topology: ${i} is at revision ${u.version.revision}, not ${l.expectedVersion.revision} - read it again and decide again`);Mc(a.label),a.parent!==void 0&&(i===dt?this.checkRootParent(a.parent):this.checkParent(i,a.parent)),a.owner!==void 0&&this.checkOwner(i,a.owner);const f={...u,...a.parent!==void 0?{parent:a.parent,parentEpoch:tt()}:{},...a.owner!==void 0?{owner:a.owner,ownerEpoch:tt()}:{},...a.label!==void 0?{label:a.label}:{},version:{epoch:u.version.epoch,revision:u.version.revision+1}};return this.records.set(i,f),await this.persist(),this.notify(i),f}async updateHost(i,a){return this.update(dt,i,a)}checkParent(i,a){if(a===null)return;if(Wn(a.peer,"parent peer"),Wn(a.instance,"parent instance"),a.peer!==this.peer)throw new Error(`topology: ${i} cannot have a remote physical parent - only the ${dt} root may, root to root`);if(a.instance===i)throw new Error(`topology: ${i} cannot be its own parent`);const l=new Set([i]);let u=a.instance;for(;u!==void 0;){if(l.has(u))throw new Error(`topology: parenting ${i} under ${a.instance} closes a physical cycle`);l.add(u);const f=this.records.get(u);u=f?.parent&&f.parent.peer===this.peer?f.parent.instance:void 0}}checkRootParent(i){if(i!==null){if(Wn(i.peer,"parent peer"),Wn(i.instance,"parent instance"),i.peer===this.peer)throw new Error(`topology: the ${dt} root's parent is another host's root, not something on this host`);if(i.instance!==dt)throw new Error("topology: a host root's parent must be another host root - physical edges cross hosts only root to root")}}checkOwner(i,a){if(a!==null&&(Wn(a.peer,"owner peer"),Wn(a.instance,"owner instance"),a.peer===this.peer&&a.instance===i))throw new Error(`topology: ${i} cannot own itself`)}physicalPath(i){const a=this.options.place??[this.peer],l=[],u=new Set;let f=i;for(let d=0;d<=Gl;d++){if(f===void 0)return{segments:l,validity:{status:"valid"}};if(f===dt)return{segments:[...a,...l],validity:{status:"valid"}};if(u.has(f))return{segments:l,validity:{status:"cycle",path:[...u].map(y=>this.ref(y))}};u.add(f);const m=this.records.get(f);if(!m)return{segments:l,validity:{status:"unresolved",at:this.ref(f)}};l.unshift(f),f=m.parent===null?void 0:m.parent.peer===this.peer?m.parent.instance:dt}return{segments:l,validity:{status:"depth-exceeded",maxDepth:Gl}}}ownerChain(i){const a=[],l=new Set;let u=i;for(let f=0;f<=Gl;f++){if(u===void 0)return{chain:a,validity:{status:"valid"}};if(l.has(u))return{chain:a,validity:{status:"cycle",path:a.slice(a.findIndex(m=>m.instance===u))}};l.add(u);const d=this.records.get(u);if(!d)return{chain:a,validity:{status:"unresolved",at:this.ref(u)}};if(a.push(d.ref),d.owner===null)return{chain:a,validity:{status:"valid"}};if(d.owner.peer!==this.peer)return{chain:a,continuesAt:d.owner,validity:{status:"valid"}};u=d.owner.instance}return{chain:a,validity:{status:"depth-exceeded",maxDepth:Gl}}}externalStore(i){return{getSnapshot:()=>this.records.get(i),subscribe:a=>{let l=this.listeners.get(i);return l||this.listeners.set(i,l=new Set),l.add(a),()=>l.delete(a)}}}notify(i){try{this.onCommitted?.()}catch{}for(const a of[...this.listeners.get(i)??[]])try{a()}catch{}}assertLoaded(){if(!this.loaded)throw new Error("topology: not loaded yet - await the server ready()")}async persist(){await this.store.save(this.all())}}const a0=16*1024,Mp=64*1024,l0=128,xm=r=>{const i=JSON.stringify(r);return i===void 0?8:i.length};class r0 extends ei.EventEmitter{topology;providers=new Map;subscriptions=new Map;push;constructor(i){super(),this.topology=i}key(i,a){return`${i}\0${a}`}provide(i,a,l){const u=this.key(i,a.id);if(this.providers.has(u))throw new Error(`context: ${i} already provides ${a.id} - one provider owns one value`);const f=a.maxSerializedBytes??a0,d=y=>{const b=xm(y);if(b>f)throw new Error(`context: a ${a.id} value of ${b} bytes exceeds its ${f} byte bound - context is ambient data, not a payload`);return y},m={token:a,value:d(l),epoch:tt(),revision:0};return this.providers.set(u,m),this.changed(),{set:y=>{m.value=d(y),m.revision++,this.changed()},clear:()=>{this.providers.get(u)===m&&(this.providers.delete(u),this.changed())}}}changed(){for(const[i,a]of this.subscriptions)a.queued||(a.queued=!0,queueMicrotask(()=>{a.queued=!1,this.subscriptions.has(i)&&(a.seq++,this.push?.(a.source,{subscriptionId:a.subscriptionId,snapshot:this.snapshotFor(a.node,a.tokenIds,a.seq,!0)}))}));this.emit("contextChanged")}walk(i,a){const l=[],u=new Set;let f=i;for(let d=0;d<=l0;d++){if(f===void 0)return{refs:l};if(u.has(f))return{refs:l,trouble:{axis:a,status:"cycle",path:l.slice(l.findIndex(b=>b.instance===f))}};u.add(f);const m=this.topology.get(f);if(!m)return{refs:l,trouble:{axis:a,status:"invalid-reference",at:{peer:this.topology.peer,instance:f}}};l.push(m.ref);const y=a==="physical"?m.parent:m.owner;if(y===null)return{refs:l};if(y.peer!==this.topology.peer)return{refs:l,continues:y};f=y.instance}return{refs:l,trouble:{axis:a,status:"depth-exceeded"}}}chainKeyOf(i,a){return i.map(l=>{const u=this.topology.get(l.instance);return u?a==="physical"?u.parentEpoch:u.ownerEpoch:"missing"}).join("\0")}snapshotFor(i,a,l,u){const f=this.walk(i,"physical"),d=this.walk(i,"logical"),m=[...f.trouble?[f.trouble]:[],...d.trouble?[d.trouble]:[]],y=a.map(b=>{const A=[];for(const[x,q]of[["physical",f.refs],["logical",d.refs]])for(const L of q){const K=this.providers.get(this.key(L.instance,b));!K||K.token.axis!==x||u&&(K.token.exposure??"remote")==="local"||A.push({node:L,axis:x,value:K.value,provider:{epoch:K.epoch,revision:K.revision}})}return{tokenId:b,entries:A}});return{node:this.topology.ref(i),walked:{physical:f.refs,logical:d.refs},continues:{...f.continues?{physical:f.continues}:{},...d.continues?{logical:d.continues}:{}},trouble:m,chainKey:{physical:this.chainKeyOf(f.refs,"physical"),logical:this.chainKeyOf(d.refs,"logical")},tokens:y,seq:l}}subscribe(i,a,l,u){const f=`${i}\0${a}`,d=this.subscriptions.get(f),m=d?++d.seq:0;return this.subscriptions.set(f,{source:i,subscriptionId:a,node:l,tokenIds:u,seq:m,queued:!1}),this.snapshotFor(l,u,m,!0)}unsubscribe(i,a){this.subscriptions.delete(`${i}\0${a}`)}dropSubscriber(i){for(const[a,l]of this.subscriptions)l.source===i&&this.subscriptions.delete(a)}get subscriptionCount(){return this.subscriptions.size}}const Sa="$context",Sm="$context",o0=(r,i)=>{const a=[];for(const{token:u,entry:f}of i){if((u.capture??"never")!=="explicit")throw new Error(`context: ${u.id} declares capture '${u.capture??"never"}', so it stays on its chain`);if((u.exposure??"remote")==="local")throw new Error(`context: ${u.id} is local-only, and a capture is precisely a value leaving the host`);f&&a.push(f)}const l=a.reduce((u,f)=>u+xm(f.value),0);if(l>Mp)throw new Error(`context: a capture of ${l} bytes exceeds the ${Mp} byte bound`);return{source:r,entries:a}},In="$snapshot",Em=new WeakMap,Zt=r=>{const i=Em.get(r);if(!i)throw new Error("not an RpcComponent - components are constructed through the RpcComponent base class");return i},Ql=r=>Object.freeze({...r}),Cp=(r,i)=>{const a=Zt(r),l=i.props??a.props,u=i.state??a.state,f=a.validate?.(l,u);if(f)throw new Error(`component snapshot rejected: ${f}`);a.props=l,a.state=u,a.revision++,a.notify?.()};class fs extends ei.EventEmitter{constructor(i,a){super(),Em.set(this,{epoch:tt(),revision:0,props:Ql(i),state:Ql(a),authority:Object.freeze({generation:0})})}get props(){return Zt(this).props}get state(){return Zt(this).state}setState=i=>{const a=this.state,l=typeof i=="function"?i(a):i;return Cp(this,{state:Ql({...a,...l})}),this.state};replaceState=i=>{const a=typeof i=="function"?i(this.state):i;return Cp(this,{state:Ql(a)}),this.state}}const Pc=r=>{const i=Zt(r);return{epoch:i.epoch,revision:i.revision,props:i.props,state:i.state,authority:i.authority}},c0=r=>Zt(r).authority,u0=6e4,eu=(r,i,a)=>{const l=Zt(r),u=l.authority.holder;l.expiryTimer&&clearTimeout(l.expiryTimer),l.expiryTimer=void 0,l.authority=Object.freeze(i),l.revision++,i.expiresAt!==void 0&&(l.expiryTimer=setTimeout(()=>{l.expiryTimer=void 0,!(l.authority.holder!==i.holder||l.authority.generation!==i.generation)&&eu(r,{generation:l.authority.generation+1},"expired")},i.expiresAt-Date.now()),l.expiryTimer.unref?.()),r instanceof ei.EventEmitter&&r.emit("authorityChanged",{reason:a,authority:l.authority,previousHolder:u}),l.notify?.()},f0=(r,i,a,l)=>{const f=Zt(r).authority,d=Date.now(),m=f.holder!==void 0&&(f.expiresAt??0)>d;if(m&&f.holder!==i&&!l)return{granted:!1,holder:f.holder,expiresAt:f.expiresAt};const y=m&&f.holder===i;return eu(r,{holder:i,expiresAt:d+a,generation:y?f.generation:f.generation+1},y?"renewed":m?"taken":"acquired"),{granted:!0,authority:Zt(r).authority}},h0=(r,i)=>{const a=Zt(r);return a.authority.holder!==i?"ok - was not holding":(eu(r,{generation:a.authority.generation+1},"released"),"ok")},d0=1048576,p0=(r,i)=>{Zt(r).validate=i},m0=(r,i,a,l)=>{const u=Zt(r),f=i.minPublishIntervalMs??0,d=i.maxSnapshotBytes??d0;let m=!1,y=0,b;const A=()=>{y=Date.now();const x=Pc(r),q=JSON.stringify(x).length;if(q>d){l?.log("Error","component snapshot not published: {estimated} bytes exceeds the {maxBytes} byte bound",{estimated:q,maxBytes:d});return}a()};u.notify=()=>{m||(m=!0,queueMicrotask(()=>{m=!1;const x=y+f-Date.now();if(x<=0)return A();b||(b=setTimeout(()=>{b=void 0,A()},x),b.unref?.())}))}},y0=1,Up=32,Gt=r=>r===null?"null":Array.isArray(r)?"array":r instanceof Uint8Array?"bytes":r instanceof Date?"date":typeof r,ba=r=>{switch(r.kind){case"literal":return JSON.stringify(r.value);case"array":return`${ba(r.items)}[]`;case"tuple":return`[${r.items.map(ba).join(", ")}]`;case"union":return r.options.map(ba).join(" | ");case"ref":return r.name;case"object":return"object";case"record":return`{ [key: string]: ${ba(r.values)} }`;default:return r.kind}},Dp=r=>typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof Uint8Array)&&!(r instanceof Date),en=(r,i,a={},l="",u=0)=>{if(u>Up)return`${l||"value"}: nested deeper than ${Up} levels`;const f=l||"value";switch(i.kind){case"any":return;case"null":return r===null?void 0:`${f}: expected null, got ${Gt(r)}`;case"boolean":return typeof r=="boolean"?void 0:`${f}: expected boolean, got ${Gt(r)}`;case"number":return typeof r!="number"||Number.isNaN(r)?`${f}: expected number, got ${Gt(r)}`:i.integer&&!Number.isInteger(r)?`${f}: expected an integer, got ${r}`:i.min!==void 0&&r<i.min?`${f}: ${r} is below the minimum ${i.min}`:i.max!==void 0&&r>i.max?`${f}: ${r} is above the maximum ${i.max}`:void 0;case"string":return typeof r!="string"?`${f}: expected string, got ${Gt(r)}`:i.minLength!==void 0&&r.length<i.minLength?`${f}: shorter than ${i.minLength} characters`:i.maxLength!==void 0&&r.length>i.maxLength?`${f}: longer than ${i.maxLength} characters`:i.pattern!==void 0&&!new RegExp(i.pattern).test(r)?`${f}: does not match ${i.pattern}`:void 0;case"bytes":return r instanceof Uint8Array?i.maxBytes!==void 0&&r.length>i.maxBytes?`${f}: longer than ${i.maxBytes} bytes`:void 0:`${f}: expected bytes, got ${Gt(r)}`;case"date":return r instanceof Date&&!Number.isNaN(r.getTime())?void 0:`${f}: expected a date, got ${Gt(r)}`;case"literal":return r===i.value?void 0:`${f}: expected ${JSON.stringify(i.value)}`;case"array":{if(!Array.isArray(r))return`${f}: expected an array, got ${Gt(r)}`;if(i.maxItems!==void 0&&r.length>i.maxItems)return`${f}: more than ${i.maxItems} items`;for(let d=0;d<r.length;d++){const m=en(r[d],i.items,a,`${f}[${d}]`,u+1);if(m)return m}return}case"tuple":{if(!Array.isArray(r))return`${f}: expected a tuple, got ${Gt(r)}`;if(r.length!==i.items.length)return`${f}: expected ${i.items.length} elements, got ${r.length}`;for(let d=0;d<i.items.length;d++){const m=en(r[d],i.items[d],a,`${f}[${d}]`,u+1);if(m)return m}return}case"object":{if(!Dp(r))return`${f}: expected an object, got ${Gt(r)}`;const d=r;for(const[m,y]of Object.entries(i.fields)){if(!(d[m]!==void 0)){if(y.optional)continue;return`${f}.${m}: missing`}const A=en(d[m],y.type,a,`${f}.${m}`,u+1);if(A)return A}if(!i.additional){const m=Object.keys(d).find(y=>!(y in i.fields));if(m!==void 0)return`${f}.${m}: not part of this type`}return}case"record":{if(!Dp(r))return`${f}: expected an object, got ${Gt(r)}`;const d=Object.keys(r);if(i.maxEntries!==void 0&&d.length>i.maxEntries)return`${f}: more than ${i.maxEntries} entries`;const m=i.keyPattern===void 0?void 0:new RegExp(i.keyPattern);for(const y of d){if(m&&!m.test(y))return`${f}.${y}: key does not match ${i.keyPattern}`;const b=en(r[y],i.values,a,`${f}.${y}`,u+1);if(b)return b}return}case"union":{for(const d of i.options)if(!en(r,d,a,f,u+1))return;return`${f}: expected ${ba(i)}, got ${Gt(r)}`}case"ref":{const d=a[i.name];return d?en(r,d,a,f,u+1):`${f}: unknown type '${i.name}'`}}return`${f}: unknown type kind '${i.kind}'`},g0=(r,i,a={})=>{const l=i.params.filter((u,f)=>!v0(i.params[f])).length;if(r.length<l)return`expected at least ${l} argument${l===1?"":"s"}, got ${r.length}`;if(r.length>i.params.length&&!i.rest)return`expected at most ${i.params.length} arguments, got ${r.length}`;for(let u=0;u<r.length;u++){const f=u<i.params.length?i.params[u]:i.rest,d=en(r[u],f,a,`argument ${u}`);if(d)return d}},v0=r=>r.kind==="any"||r.kind==="union"&&r.options.some(i=>i.kind==="literal"&&i.value===null),Xc=(r,i)=>r.kind==="ref"?Xc(i?.[r.name]??{kind:"any"},i):r,Bp=(r,i)=>!(i.integer&&!r.integer||i.min!==void 0&&(r.min===void 0||r.min<i.min)||i.max!==void 0&&(r.max===void 0||r.max>i.max)),Kt=(r,i,a={},l=0,u=new Set)=>{if(l>64)return!1;if(r.kind==="ref"&&i.kind==="ref"){const m=`${r.name} <: ${i.name}`;if(u.has(m))return!0;u.add(m)}const f=Xc(r,a),d=Xc(i,a);if(d.kind==="any")return!0;if(f.kind==="any")return!1;if(f.kind==="union")return f.options.every(m=>Kt(m,d,a,l+1,u));if(d.kind==="union")return d.options.some(m=>Kt(f,m,a,l+1,u));if(f.kind==="literal")return d.kind==="literal"?f.value===d.value:(f.value===null?"null":typeof f.value)!==d.kind?!1:d.kind==="number"&&typeof f.value=="number"?Bp({min:f.value,max:f.value,integer:Number.isInteger(f.value)},d):!0;if(f.kind!==d.kind)return!1;switch(f.kind){case"null":case"boolean":case"date":return!0;case"number":return Bp(f,d);case"string":{const m=d;return!(m.minLength!==void 0&&(f.minLength===void 0||f.minLength<m.minLength)||m.maxLength!==void 0&&(f.maxLength===void 0||f.maxLength>m.maxLength)||m.pattern!==void 0&&m.pattern!==f.pattern)}case"bytes":{const m=d;return m.maxBytes===void 0||f.maxBytes!==void 0&&f.maxBytes<=m.maxBytes}case"array":{const m=d;return m.maxItems!==void 0&&(f.maxItems===void 0||f.maxItems>m.maxItems)?!1:Kt(f.items,m.items,a,l+1,u)}case"tuple":{const m=d;return f.items.length!==m.items.length?!1:f.items.every((y,b)=>Kt(y,m.items[b],a,l+1,u))}case"record":{const m=d;return m.maxEntries!==void 0&&(f.maxEntries===void 0||f.maxEntries>m.maxEntries)||m.keyPattern!==void 0&&m.keyPattern!==f.keyPattern?!1:Kt(f.values,m.values,a,l+1,u)}case"object":{const m=d;for(const[y,b]of Object.entries(m.fields)){const A=f.fields[y];if(!A){if(b.optional)continue;return!1}if(!b.optional&&A.optional||!Kt(A.type,b.type,a,l+1,u))return!1}if(!m.additional){for(const y of Object.keys(f.fields))if(!(y in m.fields))return!1}return!0}default:return!1}},Kl=r=>r.params.filter(i=>!(i.kind==="any"||i.kind==="union"&&i.options.some(a=>a.kind==="literal"&&a.value===null))).length,b0=(r,i,a,l)=>{const u=[];!a.rest&&a.params.length<i.params.length&&u.push({where:r,reason:`takes at most ${a.params.length} arguments, but a caller may send ${i.params.length}`}),Kl(a)>Kl(i)&&u.push({where:r,reason:`requires ${Kl(a)} arguments, but a caller may send as few as ${Kl(i)}`});for(let m=0;m<i.params.length;m++){const y=m<a.params.length?a.params[m]:a.rest;y&&(Kt(i.params[m],y,l)||u.push({where:`${r} argument ${m}`,reason:"narrowed, so a value the caller may send is no longer accepted"}))}i.returns&&a.returns&&!Kt(a.returns,i.returns,l)&&u.push({where:`${r} return`,reason:"widened, so a value this contract may return is not one the caller expects"});const f=i.semantics,d=a.semantics;return f&&d&&Xl[d]>Xl[f]&&u.push({where:r,reason:`is now ${d} where the caller was told ${f}, so a retry the caller may already make is no longer safe`}),f&&!d&&Xl[f]<Xl["non-repeatable-command"]&&u.push({where:r,reason:`no longer declares that it is ${f}, so a caller relying on that promise has nothing to rely on`}),u},w0=(r,i,a={})=>{const l=[];for(const[u,f]of Object.entries(r.methods)){const d=i.methods[u];if(!d){l.push({where:u,reason:"no longer exists"});continue}l.push(...b0(u,f,d,a))}for(const[u,f]of Object.entries(r.events??{})){const d=i.events?.[u];if(!d){l.push({where:`event ${u}`,reason:"is no longer emitted, so a subscription to it would never fire"});continue}for(let m=0;m<d.params.length;m++){const y=f.params[m];if(!y){l.push({where:`event ${u} argument ${m}`,reason:"is emitted but the caller does not expect it"});continue}Kt(d.params[m],y,a)||l.push({where:`event ${u} argument ${m}`,reason:"widened, so a value this contract may emit is not one the caller expects"})}}for(const u of r.capabilities??[])i.capabilities?.includes(u)||l.push({where:`capability ${u}`,reason:"is no longer declared, so whatever found this peer by it will stop finding it"});return r.component&&(i.component?(Kt(i.component.props,r.component.props,a)||l.push({where:"component props",reason:"widened, so a snapshot this contract may serve is not one the observer expects"}),Kt(i.component.state,r.component.state,a)||l.push({where:"component state",reason:"widened, so a snapshot this contract may serve is not one the observer expects"})):l.push({where:"component",reason:"is no longer served, so an observer would wait forever for a snapshot"})),l},x0=(r,i,a,l)=>l.length?`${r}@${i} is not compatible with ${r}@${a??"current"}: `+l.map(u=>`${u.where} ${u.reason}`).join("; "):void 0;class S0{rpcServer;instance;event;target;instanceName;listener=(...i)=>{this.rpcServer.sendEvent(this.target,this.event,i,this.instanceName).catch(a=>this.rpcServer.emit("deliveryError",{target:this.target,event:this.event,path:this.instanceName,error:a}))};constructor(i,a,l,u,f){this.rpcServer=i,this.instance=a,this.event=l,this.target=u,this.instanceName=f}attach(){this.instance.on(this.event,this.listener)}detach(){this.instance.removeListener(this.event,this.listener)}}const qp=(r,i,a)=>`${r}\0${i}\0${a}`,Lp=r=>r.type===Xe.CallInstanceMethod,E0=100,k0=new Set(["Unauthorized","Forbidden","InvalidParams","IncompatibleVersion","ClassNotFound","MethodNotFound","TransportError","Timeout","UnknownOutcome"]),T0=r=>{const i=r?.code;return typeof i=="string"&&k0.has(i)?i:"Exception"};class _0 extends gm{manageRpc=new A0;eventProxies=new Map;authorize;resolveIdentity;requireIdentity=!1;deduplicateRequests=!0;maxTrackedRequests=1e3;refuseExpiredCalls=!0;idempotency;schema;validation="described";hostTopology;hostContext;allowTopologyMutation=!1;validateResults=!1;unknownVersion="allow";compatibility=new Map;recentResponses=new Map;inFlightRequests=new Set;constructor(i,a){super(i,a),this.manageRpc.logger?.log("Information","RpcServerHandler {name} starting",{name:i})}async checkAccess(i,a,l){const u=this.resolveIdentity?.(a);if(this.requireIdentity&&!u)return"Unauthorized";if(!this.authorize)return;const f={identity:u,source:a,instanceName:i.path,method:i.method,params:i.params,subscription:l};try{return await this.authorize(f)?void 0:"Forbidden"}catch{return"Forbidden"}}checkParams(i){if(!this.schema||this.validation==="off")return;const a=this.schema.namespaces[i.path];if(!a)return this.validation==="required"?`${i.path} is not described by the schema`:void 0;if(a.validate===!1)return;const l=a.methods[i.method];if(!l)return this.validation==="required"?`${i.path}.${i.method} is not described by the schema`:void 0;const u=g0(i.params,l,this.schema.types);if(u)return a.version?`${u} (this server serves ${i.path}@${a.version})`:u}checkVersion(i){if(!this.schema||this.validation==="off"||!i.version)return;const a=this.schema.namespaces[i.path];if(!a||i.version===a.version)return;const l=`${i.path}@${i.version}`;if(this.compatibility.has(l))return this.compatibility.get(l);const u=a.history?.[i.version];let f;return u?f=x0(i.path,i.version,a.version,w0(u,a,this.schema.types)):f=this.unknownVersion==="reject"?`${i.path}@${i.version} is unknown to this server, which serves ${i.path}@${a.version??"an unversioned contract"}`:void 0,this.compatibility.set(l,f),f}async receive(i,a,l){this.manageRpc.logger?.log("Debug","RpcServerHandler {name} received message type {type} from {source} to {target}: {message}",{name:this.name,type:i.type,source:a,target:l,message:JSON.stringify(i)}),i.payload&&this.receivePayload(i.payload,a,l).catch(u=>this.emit("handlerError",{source:a,target:l,error:u}))}respond(i,a,l,u){if(this.deduplicateRequests)for(this.inFlightRequests.delete(i),this.recentResponses.set(i,l);this.recentResponses.size>this.maxTrackedRequests;){const f=this.recentResponses.keys().next();if(f.done)break;this.recentResponses.delete(f.value)}return this.sendPayload(l,u,this.name,a)}async receivePayload(i,a,l){try{await this.dispatch(i,a,l)}catch(u){await this.reportDispatchFailure(i,a,u)}}async reportDispatchFailure(i,a,l){this.emit("handlerError",{source:a,payload:i,error:l});const u=i.id;if(!(!Lp(i)||!u)){this.deduplicateRequests&&this.inFlightRequests.delete(u);try{await this.sendPayload({type:Xe.error,id:u,code:"Exception",error:jc(l)},Fe.ErrorMessage,this.name,a)}catch{}}}async dispatch(i,a,l){const u=Date.now();if(Lp(i)){if(this.deduplicateRequests){const L=this.recentResponses.get(i.id);if(L){const K=L.code?Fe.ErrorMessage:Fe.ResponseMessage;await this.sendPayload(L,K,this.name,a);return}if(this.inFlightRequests.has(i.id))return;this.inFlightRequests.add(i.id)}const f=this.manageRpc.findNameSpaceMethodMap(i.path),d=f?.get(i.method);if(!d){const L=i.path,K=i.params[0],Z=this.manageRpc.exposedNameSpaceInstances[L];if(i.method==="on"&&K===In&&Z&&!(Z instanceof fs)){await this.sendError(i.id,a,"ClassNotFound",`${i.path} is not an observable component`);return}if(i.method==="on"&&Z instanceof qc){const F=await this.checkAccess(i,a,!0);if(F){await this.sendError(i.id,a,F,`not permitted to subscribe to ${i.path}.${K}`);return}const z=qp(L,K,a);let G=this.eventProxies.get(z),te="ok - already exists";G||(G=new S0(this,Z,K,a,L),this.eventProxies.set(z,G),G.attach(),te="ok"),K===In&&await this.sendEvent(a,In,[Pc(Z)],L),await this.respond(i.id,a,{type:Xe.success,result:te,id:i.id},Fe.ResponseMessage)}else if((i.method==="off"||i.method==="removeListener")&&Z instanceof qc){const F=qp(L,K,a),z=this.eventProxies.get(F);z&&(z.detach(),this.eventProxies.delete(F)),await this.respond(i.id,a,{type:Xe.success,result:z?"ok":"ok - was not subscribed",id:i.id},Fe.ResponseMessage)}else if(i.path===Sa&&(i.method==="read"||i.method==="subscribe"||i.method==="unsubscribe")){if(!this.hostContext){await this.sendError(i.id,a,"ClassNotFound","this host serves no context");return}const F=await this.checkAccess(i,a,!1);if(F){await this.sendError(i.id,a,F,`not permitted to call ${i.path}.${i.method}`);return}const z=te=>Array.isArray(te)?te.map(String):[];let G;i.method==="read"?G=this.hostContext.snapshotFor(String(i.params[0]),z(i.params[1]),0,!0):i.method==="subscribe"?G=this.hostContext.subscribe(a,String(i.params[0]),String(i.params[1]),z(i.params[2])):(this.hostContext.unsubscribe(a,String(i.params[0])),G="ok"),await this.respond(i.id,a,{type:Xe.success,result:G,id:i.id},Fe.ResponseMessage)}else if((i.method==="$acquire"||i.method==="$release")&&Z){if(!(Z instanceof fs)){await this.sendError(i.id,a,"ClassNotFound",`${i.path} is not an observable component, so it has no authority to hold`);return}const F=await this.checkAccess(i,a,!1);if(F){await this.sendError(i.id,a,F,`not permitted to call ${i.path}.${i.method}`);return}if(i.method==="$acquire"){const z=i.params[0]??u0;if(typeof z!="number"||!Number.isFinite(z)||z<=0){await this.sendError(i.id,a,"InvalidParams","$acquire: the lease must expire, so its ttl is a positive number of milliseconds");return}const G=i.params[1]?.take===!0,te=f0(Z,a,z,G);if(!te.granted){await this.sendError(i.id,a,"NotInControl",`${i.path} is controlled by ${te.holder} until ${new Date(te.expiresAt).toISOString()}`);return}await this.respond(i.id,a,{type:Xe.success,result:te.authority,id:i.id},Fe.ResponseMessage)}else{const z=h0(Z,a);await this.respond(i.id,a,{type:Xe.success,result:z,id:i.id},Fe.ResponseMessage)}}else await this.sendError(i.id,a,f?"MethodNotFound":"ClassNotFound",`${i.path}.${i.method} is not exposed`);return}const m=await this.checkAccess(i,a,!1);if(m){await this.sendError(i.id,a,m,`not permitted to call ${i.path}.${i.method}`);return}const y=this.checkVersion(i);if(y){await this.sendError(i.id,a,"IncompatibleVersion",y);return}const b=this.checkParams(i);if(b){await this.sendError(i.id,a,"InvalidParams",b);return}const A=this.authorityRefusal(i,a);if(A){await this.sendError(i.id,a,"NotInControl",A);return}const x=this.fenceRefusal(i);if(x){await this.sendError(i.id,a,"OwnershipChanged",x);return}const q=this.executionKey(i,a);q===void 0?await this.invoke(i,a,u,d):await this.enqueue(q,i,a,u,d)}}async enqueue(i,a,l,u,f){const d=this.manageRpc.exposedConflation[a.path]?.has(a.method)?`${i}\0${a.method}`:void 0;let m=!1;if(d){const q=this.conflatable.get(d);q&&(q.supersede(),m=!0)}const y=this.executionWaiting.get(i)??0,b=this.manageRpc.exposedMailbox[a.path]??E0;if(!m&&y>=b){await this.sendError(a.id,l,"Busy",`${a.path}.${a.method} was not queued: ${y} calls are already waiting on this instance`);return}let A=!1;const x=d?{supersede:()=>{A=!0,this.sendError(a.id,l,"Superseded",`${a.path}.${a.method} was superseded by a newer call before it ran`).catch(()=>{})}}:void 0;d&&x&&this.conflatable.set(d,x),this.executionWaiting.set(i,y+1),await this.serialise(i,async()=>{const q=this.executionWaiting.get(i)??1;q<=1?this.executionWaiting.delete(i):this.executionWaiting.set(i,q-1),d&&this.conflatable.get(d)===x&&this.conflatable.delete(d),!A&&await this.invoke(a,l,u,f)})}executionWaiting=new Map;conflatable=new Map;async invoke(i,a,l,u){const f=this.expiredBy(i,l);if(f!==void 0){await this.sendError(i.id,a,"Timeout",`${i.path}.${i.method} was not run: its caller stopped waiting ${f} ms ago`);return}const d=this.authorityRefusal(i,a);if(d){await this.sendError(i.id,a,"NotInControl",d);return}const m=this.fenceRefusal(i);if(m){await this.sendError(i.id,a,"OwnershipChanged",m);return}const y=this.invocationFor(i,a);let b=!1;if(y){let q;try{q=await this.idempotency.begin(y)}catch(L){await this.sendError(i.id,a,"UnknownOutcome",`${i.path}.${i.method} was not run: its idempotency store could not be reached (${L instanceof Error?L.message:String(L)})`);return}if(q==="in-progress"){this.inFlightRequests.delete(i.id);return}if(q!=="acquired"){const L=Fv(q)?{type:Xe.error,id:i.id,code:q.code,error:q.error}:{type:Xe.success,id:i.id,result:q.result};await this.respond(i.id,a,L,L.type===Xe.error?Fe.ErrorMessage:Fe.ResponseMessage);return}b=!0}const A=[...i.params];let x;try{x=await u(...A);const q=this.checkResult(i,x);if(q){await this.settle(y,b,{code:"InvalidParams",error:{name:"RpcError",message:q}}),await this.sendError(i.id,a,"InvalidParams",q);return}await this.settle(y,b,{result:x}),await this.respond(i.id,a,{type:Xe.success,id:i.id,result:x},Fe.ResponseMessage)}catch(q){const L=T0(q);await this.settle(y,b,{code:L,error:jc(q)}),await this.respond(i.id,a,{type:Xe.error,id:i.id,code:L,error:jc(q)},Fe.ErrorMessage)}}async settle(i,a,l){if(!(!i||!a))try{await this.idempotency.complete(i,l)}catch(u){this.emit("idempotencyError",{invocation:i,outcome:l,error:u})}}invocationFor(i,a){if(!(!this.idempotency||this.semanticsOf(i)!=="non-repeatable-command"))return{idempotencyKey:i.idempotencyKey??i.id,requestId:i.id,scope:`${i.path}.${i.method}`,source:a,...i.ttl!==void 0?{ttl:i.ttl}:{}}}authorityRefusal(i,a){if(!this.manageRpc.exposedAuthority[i.path]?.has(i.method))return;const l=this.manageRpc.exposedNameSpaceInstances[i.path];if(!(l instanceof fs))return;const u=c0(l),f=u.holder!==void 0&&(u.expiresAt??0)>Date.now();if(!(f&&u.holder===a))return f?`${i.path}.${i.method} requires authority: ${u.holder} is in control`:`${i.path}.${i.method} requires authority: nobody is in control - $acquire it first`}fenceRefusal(i){const a=i.fence;if(!a)return;const l=this.hostTopology?.get(i.path);if(!l)return`${i.path} has no topology record here to check the owner fence against`;if(l.ownerEpoch!==a.ownerEpoch)return`${i.path} changed owner generation while this call was on its way - read the topology again and decide again`}semanticsOf(i){return this.manageRpc.exposedSemantics[i.path]?.get(i.method)??this.schema?.namespaces[i.path]?.methods[i.method]?.semantics}executionKey(i,a){const l=this.manageRpc.exposedExecution[i.path];if(!l){const f=this.semanticsOf(i);return f==="idempotent-command"||f==="non-repeatable-command"?i.path:void 0}if(l==="parallel")return;if(l==="serial")return i.path;const u={identity:this.resolveIdentity?.(a),source:a,instanceName:i.path,method:i.method,params:i.params,subscription:!1};try{return`${i.path}\0${l(u)}`}catch{return i.path}}executionQueues=new Map;async serialise(i,a){const l=this.executionQueues.get(i)??Promise.resolve();let u;const f=new Promise(m=>u=m),d=l.then(()=>f);this.executionQueues.set(i,d),await l;try{return await a()}finally{u(),this.executionQueues.get(i)===d&&this.executionQueues.delete(i)}}expiredBy(i,a){if(!this.refuseExpiredCalls||i.ttl===void 0||!Number.isFinite(i.ttl)||i.ttl<0)return;const l=Date.now()-(a+i.ttl);return l>0?l:void 0}checkResult(i,a){if(!this.validateResults||!this.schema)return;const l=this.schema.namespaces[i.path]?.methods[i.method]?.returns;if(!l)return;const u=en(a,l,this.schema.types,"result");return u?`${i.path}.${i.method} returned a value its own schema forbids: ${u}`:void 0}sendError(i,a,l,u){return this.respond(i,a,{type:Xe.error,id:i,code:l,error:{name:"RpcError",message:u}},Fe.ErrorMessage)}removePeer(i){for(const[a,l]of this.eventProxies)l.target===i&&(l.detach(),this.eventProxies.delete(a))}async sendEvent(i,a,l,u){return await this.sendPayload({type:Xe.event,event:a,params:l,path:u},Fe.EventMessage,this.name,i)}}class A0{logger;exposedNameSpaceMethodMaps={};exposedNameSpaceInstances={};exposedClasses={};createdInstances=new Map;exposedSemantics={};exposedExecution={};exposedConflation={};exposedAuthority={};exposedMailbox={};componentContractFor;constructor(i){this.logger=i}exposeManagement(){this.getNameSpaceMethodMap("manageRpc").set("createRpcInstance",(...a)=>this.createRpcInstance(a[0],a[1],...a.slice(2))),this.exposedNameSpaceInstances.manageRpc=this}getNameSpaceMethodMap(i){let a=this.exposedNameSpaceMethodMaps[i];return a||(a=new Map,this.exposedNameSpaceMethodMaps[i]=a),a}findNameSpaceMethodMap(i){return this.exposedNameSpaceMethodMaps[i]}requireExplicitExposure=!1;exposeClassInstance(i,a,l){const u=Iv(i),f=a??u?.name;if(!f)throw new Error(`exposeClassInstance: ${i.constructor.name} declares no @rpcNamespace, so a name is required`);const d=typeof l=="number"?{prototypeSteps:l}:l??{};let m=d.prototypeSteps;const y=Pv(i);if(!y&&this.requireExplicitExposure)throw new Error(`exposeClassInstance: ${i.constructor.name} marks no @rpc methods and requireExplicitExposure is on`);this.exposedNameSpaceInstances[f]=i;const b=d.execution??u?.execution;b&&(this.exposedExecution[f]=b);const A=e0(i);A.size&&(this.exposedSemantics[f]=A);const x=t0(i);if(x.size){for(const z of x)if(A.get(z)!=="idempotent-command")throw new Error(`exposeClassInstance: ${f}.${z} declares conflate without 'idempotent-command' semantics - only a command that is free to repeat is free to skip`);this.exposedConflation[f]=x}const q=n0(i);if(q.size){if(!(i instanceof fs))throw new Error(`exposeClassInstance: ${f}.${[...q][0]} declares requiresAuthority, but ${i.constructor.name} is not an RpcComponent - there is no authority to check against`);this.exposedAuthority[f]=q}const L=d.mailbox??u?.mailbox;if(L!==void 0){if(!Number.isInteger(L)||L<1)throw new Error(`exposeClassInstance: ${f} declares a mailbox of ${L}; the bound is a positive count of waiting calls`);this.exposedMailbox[f]=L}if(i instanceof fs){const z=this.componentContractFor?.(f);z&&p0(i,(G,te)=>en(G,z.component.props,z.types,"props")??en(te,z.component.state,z.types,"state")),m0(i,d.component??{},()=>{i.emit(In,Pc(i))},this.logger)}let K=Object.getOwnPropertyNames(i.constructor.prototype),Z=Object.getPrototypeOf(i.constructor.prototype);for(;Z&&Z.constructor.name!=="Object"&&Z.constructor.name!=="EventEmitter";){const z=Object.getOwnPropertyNames(Z);if(K=K.concat(z),Z=Object.getPrototypeOf(Z),m&&m--===0)break}const F=this.getNameSpaceMethodMap(f);for(const z of K)z==="constructor"||typeof i[z]!="function"||y&&!y.has(z)||F.set(z,i[z].bind(i))}exposeClass(i,a){let l=i.name;a&&(l=a),this.exposedClasses[l]=i}exposeObject(i,a){this.exposedNameSpaceInstances[a]=i;const l=Object.getOwnPropertyNames(i);for(const u of l)u!=="constructor"&&typeof i[u]=="function"&&this.getNameSpaceMethodMap(a).set(u,i[u])}expose(i,a){this.getNameSpaceMethodMap(i).set(i,a)}async createRpcInstance(i,a,...l){let u="";const f=this.exposedClasses[i];if(f){const d=a||tt(),m=new f(...l);this.createdInstances.set(d,m),this.exposeClassInstance(m,d),u=d}return u}}const km=1e4,Il=(r,i,a)=>`${r}\0${i}\0${a}`;class pa extends Error{code;remoteStack;constructor(i,a,l){super(a?`${i}: ${a}`:i),this.code=i,this.remoteStack=l,this.name="RpcError"}}function N0(r){return r.type===Xe.success}function O0(r){return r.type===Xe.event}function R0(r){return r.type===Xe.error}class z0 extends gm{callTimeout;responsePromiseMap=new Map;responseTimeoutMap=new Map;schemaVersions;subscriptions=new Map;eventEmitter=new ei.EventEmitter;constructor(i,a,l=km){super(i,a),this.callTimeout=l}async receive(i,a,l){const u=i.payload;if(u){if(O0(u)){this.deliverEvent(u,a);return}if(N0(u)){this.takePending(u.id)?.resolve(u.result);return}R0(u)&&this.takePending(u.id)?.reject(new pa(u.code,u.error?.message,u.error?.stack))}}deliverEvent(i,a){const l=this.eventEmitter;if(l instanceof ei.EventEmitter){const u=a??"",f=i.path?[Il(u,i.path,i.event),Il("",i.path,i.event)]:l.eventNames().filter(d=>typeof d=="string").filter(d=>{const[m,,y]=d.split("\0");return y===i.event&&(m===u||m==="")});for(const d of new Set(f))this.deliverSafely(()=>l.emit(d,...i.params),i)}this.deliverSafely(()=>this.emit(i.event,i.params),i)}deliverSafely(i,a){try{i()}catch(l){this.emit("subscriberError",{event:a.event,path:a.path,error:l})}}async resubscribe(){const i=[...this.subscriptions.values()],a=await Promise.allSettled(i.map(u=>this.call(u.remote,u.instanceName,"on",u.event))),l=a.flatMap((u,f)=>u.status==="rejected"?[{peer:i[f].remote,namespace:i[f].instanceName,event:i[f].event,error:u.reason}]:[]);return l.length&&this.emit("resubscribeFailed",l),a.length-l.length}failPendingCalls(i){for(const a of[...this.responsePromiseMap.keys()]){const l=this.sentRequests.has(a);this.sentRequests.delete(a),this.takePending(a)?.reject(l?new pa("UnknownOutcome",`${i}, after the request was sent - it may or may not have run`):new pa("TransportError",`${i}, before the request was sent`))}}sentRequests=new Set;takePending(i){if(i===void 0)return;const a=this.responsePromiseMap.get(i);this.responsePromiseMap.delete(i),this.sentRequests.delete(i);const l=this.responseTimeoutMap.get(i);return l!==void 0&&(clearTimeout(l),this.responseTimeoutMap.delete(i)),a}call(i,a,l,...u){return this.callWith({},i,a,l,...u)}callWith(i,a,l,u,...f){const d=i.timeoutMs??this.callTimeout;if(!Number.isInteger(d)||d<0)return Promise.reject(new Error(`${l}.${u}: timeoutMs must be a finite non-negative integer, not ${String(i.timeoutMs)}`));const m={id:tt(),type:Xe.CallInstanceMethod,path:l,method:u,params:f,version:this.schemaVersions?.[l],ttl:d>0?d:void 0,...i.idempotencyKey?{idempotencyKey:i.idempotencyKey}:{},...i.ownerEpoch?{fence:{ownerEpoch:i.ownerEpoch}}:{}};return new Promise((y,b)=>{this.responsePromiseMap.set(m.id,{resolve:y,reject:b}),d>0&&this.responseTimeoutMap.set(m.id,setTimeout(()=>{this.takePending(m.id)?.reject(new pa("Timeout",`no response to ${l}.${u} within ${d} ms`))},d)),this.sendPayload(m,Fe.RequestMessage,this.name,a).then(()=>{this.responsePromiseMap.has(m.id)&&this.sentRequests.add(m.id)},A=>{this.takePending(m.id)?.reject(new pa("TransportError",A instanceof Error?A.message:String(A)))})})}proxy(i,a,l={}){const u={};return new Proxy(u,{get:(f,d)=>{let m;if(typeof d=="string"){if(f[d])return f[d];if(d==="then")return;d==="$with"?f[d]=y=>this.proxy(i,a,{...l,...y}):Jv(d)?f[d]=(...y)=>{const b=y[0];if(typeof b=="string"){const A=Il(a??"",i,b);if(this.eventEmitter[d](A,...y.slice(1)),d==="on")this.subscriptions.set(A,{remote:a,instanceName:i,event:b});else if(d==="off"||d==="removeListener"){if(this.eventEmitter.listenerCount(A)>0)return Promise.resolve("ok - other local handlers remain");this.subscriptions.delete(A)}}else this.eventEmitter[d](...y);return this.call(a,i,d,y[0])}:f[d]=(...y)=>this.callWith(l,a,i,d,...y),m=f[d]}return m}})}}const Tm=Symbol("@source-repo/rpc/component");class j0{namespace;target;release;view={epoch:"",revision:-1,props:Object.freeze({}),state:Object.freeze({}),status:"initializing",receivedAt:0};users=0;inner;store;first;listeners=new Set;retired=new Set;settleFirst;handler=i=>this.accept(i);constructor(i,a,l,u){this.namespace=a,this.target=l,this.release=u,this.inner=i.proxy(a,l),this.first=new Promise(f=>this.settleFirst=f),this.store={getSnapshot:()=>this.view,subscribe:f=>(this.listeners.add(f),()=>this.listeners.delete(f)),close:()=>this.close()}}async open(){await this.inner.on(In,this.handler),await this.first}accept(i){this.view.status!=="closed"&&(this.retired.has(i.epoch)||this.view.epoch===i.epoch&&i.revision<=this.view.revision||(this.view.epoch&&this.view.epoch!==i.epoch&&this.retired.add(this.view.epoch),this.view={...i,status:"live",receivedAt:Date.now()},this.settleFirst(),this.notify()))}markStale(){this.view.status==="live"&&(this.view={...this.view,status:"stale",staleSince:Date.now()},this.notify())}async close(){this.users>0&&this.users--,!(this.users>0)&&(this.view={...this.view,status:"closed"},this.notify(),this.release(),await this.inner.off(In,this.handler).catch(()=>{}))}markClosed(){this.view.status!=="closed"&&(this.view={...this.view,status:"closed"},this.notify())}notify(){for(const i of[...this.listeners])try{i()}catch{}}}class M0{handler;channels=new Map;constructor(i,a){this.handler=i,a.on(Ae.disconnected,()=>{for(const l of this.channels.values())l.markStale()});for(const l of[Ae.peerGone,Ae.peerDisplaced])a.on(l,u=>{for(const f of this.channels.values())f.target===u&&f.markStale()})}async open(i,a){const l=`${a??""}\0${i}`;let u=this.channels.get(l);if(u)await u.first;else{u=new j0(this.handler,i,a,()=>{this.channels.delete(l)}),this.channels.set(l,u);try{await u.open()}catch(f){throw this.channels.delete(l),f}}return u.users++,u}closeAll(){for(const i of this.channels.values())i.markClosed();this.channels.clear()}}const _m=(r,i)=>new Proxy(i,{get:(a,l)=>l==="props"?r.view.props:l==="state"?r.view.state:l===Tm?r.store:l==="$with"?u=>_m(r,i.$with(u)):a[l],set:(a,l,u)=>{if(l==="props"||l==="state")throw new TypeError(`${String(l)} is read-only on a component proxy - call a method to change the world`);return a[l]=u,!0}}),an=Object.create(null);an.open="0";an.close="1";an.ping="2";an.pong="3";an.message="4";an.upgrade="5";an.noop="6";const Pl=Object.create(null);Object.keys(an).forEach(r=>{Pl[an[r]]=r});const Gc={type:"error",data:"parser error"},Am=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Nm=typeof ArrayBuffer=="function",Om=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,tu=({type:r,data:i},a,l)=>Am&&i instanceof Blob?a?l(i):Hp(i,l):Nm&&(i instanceof ArrayBuffer||Om(i))?a?l(i):Hp(new Blob([i]),l):l(an[r]+(i||"")),Hp=(r,i)=>{const a=new FileReader;return a.onload=function(){const l=a.result.split(",")[1];i("b"+(l||""))},a.readAsDataURL(r)};function $p(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let Cc;function C0(r,i){if(Am&&r.data instanceof Blob)return r.data.arrayBuffer().then($p).then(i);if(Nm&&(r.data instanceof ArrayBuffer||Om(r.data)))return i($p(r.data));tu(r,!1,a=>{Cc||(Cc=new TextEncoder),i(Cc.encode(a))})}const Yp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<Yp.length;r++)wa[Yp.charCodeAt(r)]=r;const U0=r=>{let i=r.length*.75,a=r.length,l,u=0,f,d,m,y;r[r.length-1]==="="&&(i--,r[r.length-2]==="="&&i--);const b=new ArrayBuffer(i),A=new Uint8Array(b);for(l=0;l<a;l+=4)f=wa[r.charCodeAt(l)],d=wa[r.charCodeAt(l+1)],m=wa[r.charCodeAt(l+2)],y=wa[r.charCodeAt(l+3)],A[u++]=f<<2|d>>4,A[u++]=(d&15)<<4|m>>2,A[u++]=(m&3)<<6|y&63;return b},D0=typeof ArrayBuffer=="function",nu=(r,i)=>{if(typeof r!="string")return{type:"message",data:Rm(r,i)};const a=r.charAt(0);return a==="b"?{type:"message",data:B0(r.substring(1),i)}:Pl[a]?r.length>1?{type:Pl[a],data:r.substring(1)}:{type:Pl[a]}:Gc},B0=(r,i)=>{if(D0){const a=U0(r);return Rm(a,i)}else return{base64:!0,data:r}},Rm=(r,i)=>i==="blob"?r instanceof Blob?r:new Blob([r]):r instanceof ArrayBuffer?r:r.buffer,zm="",q0=(r,i)=>{const a=r.length,l=new Array(a);let u=0;r.forEach((f,d)=>{tu(f,!1,m=>{l[d]=m,++u===a&&i(l.join(zm))})})},L0=(r,i)=>{const a=r.split(zm),l=[];for(let u=0;u<a.length;u++){const f=nu(a[u],i);if(l.push(f),f.type==="error")break}return l};function H0(){return new TransformStream({transform(r,i){C0(r,a=>{const l=a.length;let u;if(l<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,l);else if(l<65536){u=new Uint8Array(3);const f=new DataView(u.buffer);f.setUint8(0,126),f.setUint16(1,l)}else{u=new Uint8Array(9);const f=new DataView(u.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(l))}r.data&&typeof r.data!="string"&&(u[0]|=128),i.enqueue(u),i.enqueue(a)})}})}let Uc;function Zl(r){return r.reduce((i,a)=>i+a.length,0)}function Jl(r,i){if(r[0].length===i)return r.shift();const a=new Uint8Array(i);let l=0;for(let u=0;u<i;u++)a[u]=r[0][l++],l===r[0].length&&(r.shift(),l=0);return r.length&&l<r[0].length&&(r[0]=r[0].slice(l)),a}function $0(r,i){Uc||(Uc=new TextDecoder);const a=[];let l=0,u=-1,f=!1;return new TransformStream({transform(d,m){for(a.push(d);;){if(l===0){if(Zl(a)<1)break;const y=Jl(a,1);f=(y[0]&128)===128,u=y[0]&127,u<126?l=3:u===126?l=1:l=2}else if(l===1){if(Zl(a)<2)break;const y=Jl(a,2);u=new DataView(y.buffer,y.byteOffset,y.length).getUint16(0),l=3}else if(l===2){if(Zl(a)<8)break;const y=Jl(a,8),b=new DataView(y.buffer,y.byteOffset,y.length),A=b.getUint32(0);if(A>Math.pow(2,21)-1){m.enqueue(Gc);break}u=A*Math.pow(2,32)+b.getUint32(4),l=3}else{if(Zl(a)<u)break;const y=Jl(a,u);m.enqueue(nu(f?y:Uc.decode(y),i)),l=0}if(u===0||u>r){m.enqueue(Gc);break}}}})}const jm=4;function We(r){if(r)return Y0(r)}function Y0(r){for(var i in We.prototype)r[i]=We.prototype[i];return r}We.prototype.on=We.prototype.addEventListener=function(r,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(i),this};We.prototype.once=function(r,i){function a(){this.off(r,a),i.apply(this,arguments)}return a.fn=i,this.on(r,a),this};We.prototype.off=We.prototype.removeListener=We.prototype.removeAllListeners=We.prototype.removeEventListener=function(r,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+r];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var l,u=0;u<a.length;u++)if(l=a[u],l===i||l.fn===i){a.splice(u,1);break}return a.length===0&&delete this._callbacks["$"+r],this};We.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+r],l=1;l<arguments.length;l++)i[l-1]=arguments[l];if(a){a=a.slice(0);for(var l=0,u=a.length;l<u;++l)a[l].apply(this,i)}return this};We.prototype.emitReserved=We.prototype.emit;We.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};We.prototype.hasListeners=function(r){return!!this.listeners(r).length};const rr=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,a)=>a(i,0),$t=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),V0="arraybuffer";function Mm(r,...i){return i.reduce((a,l)=>(r.hasOwnProperty(l)&&(a[l]=r[l]),a),{})}const X0=$t.setTimeout,G0=$t.clearTimeout;function or(r,i){i.useNativeTimers?(r.setTimeoutFn=X0.bind($t),r.clearTimeoutFn=G0.bind($t)):(r.setTimeoutFn=$t.setTimeout.bind($t),r.clearTimeoutFn=$t.clearTimeout.bind($t))}const Q0=1.33;function K0(r){return typeof r=="string"?Z0(r):Math.ceil((r.byteLength||r.size)*Q0)}function Z0(r){let i=0,a=0;for(let l=0,u=r.length;l<u;l++)i=r.charCodeAt(l),i<128?a+=1:i<2048?a+=2:i<55296||i>=57344?a+=3:(l++,a+=4);return a}function Cm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function J0(r){let i="";for(let a in r)r.hasOwnProperty(a)&&(i.length&&(i+="&"),i+=encodeURIComponent(a)+"="+encodeURIComponent(r[a]));return i}function F0(r){let i={},a=r.split("&");for(let l=0,u=a.length;l<u;l++){let f=a[l].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class W0 extends Error{constructor(i,a,l){super(i),this.description=a,this.context=l,this.type="TransportError"}}class iu extends We{constructor(i){super(),this.writable=!1,or(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,a,l){return super.emitReserved("error",new W0(i,a,l)),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 a=nu(i,this.socket.binaryType);this.onPacket(a)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,a={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(a)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const a=J0(i);return a.length?"?"+a:""}}class I0 extends iu{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const a=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||a()})),this.writable||(l++,this.once("drain",function(){--l||a()}))}else a()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const a=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};L0(i,this.socket.binaryType).forEach(a),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,q0(i,a=>{this.doWrite(a,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",a=this.query||{};return this.opts.timestampRequests!==!1&&(a[this.opts.timestampParam]=Cm()),!this.supportsBinary&&!a.sid&&(a.b64=1),this.createUri(i,a)}}let Um=!1;try{Um=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const P0=Um;function eb(){}class tb extends I0{constructor(i){if(super(i),typeof location<"u"){const a=location.protocol==="https:";let l=location.port;l||(l=a?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||l!==i.port}}doWrite(i,a){const l=this.request({method:"POST",data:i});l.on("success",a),l.on("error",(u,f)=>{this.onError("xhr post error",u,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(a,l)=>{this.onError("xhr poll error",a,l)}),this.pollXhr=i}}class sn extends We{constructor(i,a,l){super(),this.createRequest=i,or(this,l),this._opts=l,this._method=l.method||"GET",this._uri=a,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var i;const a=Mm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");a.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(a);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&l.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var u;l.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=sn.requestsCount++,sn.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=eb,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete sn.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()}}sn.requestsCount=0;sn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Vp);else if(typeof addEventListener=="function"){const r="onpagehide"in $t?"pagehide":"unload";addEventListener(r,Vp,!1)}}function Vp(){for(let r in sn.requests)sn.requests.hasOwnProperty(r)&&sn.requests[r].abort()}const nb=(function(){const r=Dm({xdomain:!1});return r&&r.responseType!==null})();class ib extends tb{constructor(i){super(i);const a=i&&i.forceBase64;this.supportsBinary=nb&&!a}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new sn(Dm,this.uri(),i)}}function Dm(r){const i=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||P0))return new XMLHttpRequest}catch{}if(!i)try{return new $t[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Bm=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class sb extends iu{get name(){return"websocket"}doOpen(){const i=this.uri(),a=this.opts.protocols,l=Bm?{}:Mm(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,a,l)}catch(u){return this.emitReserved("error",u)}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 a=0;a<i.length;a++){const l=i[a],u=a===i.length-1;tu(l,this.supportsBinary,f=>{try{this.doWrite(l,f)}catch{}u&&rr(()=>{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",a=this.query||{};return this.opts.timestampRequests&&(a[this.opts.timestampParam]=Cm()),this.supportsBinary||(a.b64=1),this.createUri(i,a)}}const Dc=$t.WebSocket||$t.MozWebSocket;class ab extends sb{createSocket(i,a,l){return Bm?new Dc(i,a,l):a?new Dc(i,a):new Dc(i)}doWrite(i,a){this.ws.send(a)}}class lb extends iu{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 a=$0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=i.readable.pipeThrough(a).getReader(),u=H0();u.readable.pipeTo(i.writable),this._writer=u.writable.getWriter();const f=()=>{l.read().then(({done:m,value:y})=>{m||(this.onPacket(y),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let a=0;a<i.length;a++){const l=i[a],u=a===i.length-1;this._writer.write(l).then(()=>{u&&rr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const rb={websocket:ab,webtransport:lb,polling:ib},ob=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cb=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Qc(r){if(r.length>8e3)throw"URI too long";const i=r,a=r.indexOf("["),l=r.indexOf("]");a!=-1&&l!=-1&&(r=r.substring(0,a)+r.substring(a,l).replace(/:/g,";")+r.substring(l,r.length));let u=ob.exec(r||""),f={},d=14;for(;d--;)f[cb[d]]=u[d]||"";return a!=-1&&l!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=ub(f,f.path),f.queryKey=fb(f,f.query),f}function ub(r,i){const a=/\/{2,9}/g,l=i.replace(a,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&l.splice(0,1),i.slice(-1)=="/"&&l.splice(l.length-1,1),l}function fb(r,i){const a={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,u,f){u&&(a[u]=f)}),a}const Kc=typeof addEventListener=="function"&&typeof removeEventListener=="function",er=[];Kc&&addEventListener("offline",()=>{er.forEach(r=>r())},!1);class Pn extends We{constructor(i,a){if(super(),this.binaryType=V0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(a=i,i=null),i){const l=Qc(i);a.hostname=l.host,a.secure=l.protocol==="https"||l.protocol==="wss",a.port=l.port,l.query&&(a.query=l.query)}else a.host&&(a.hostname=Qc(a.host).host);or(this,a),this.secure=a.secure!=null?a.secure:typeof location<"u"&&location.protocol==="https:",a.hostname&&!a.port&&(a.port=this.secure?"443":"80"),this.hostname=a.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=a.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},a.transports.forEach(l=>{const u=l.prototype.name;this.transports.push(u),this._transportsByName[u]=l}),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},a),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=F0(this.opts.query)),Kc&&(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"})},er.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const a=Object.assign({},this.opts.query);a.EIO=jm,a.transport=i,this.id&&(a.sid=this.id);const l=Object.assign({},this.opts,{query:a,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&Pn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const a=this.createTransport(i);a.open(),this.setTransport(a)}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",a=>this._onClose("transport close",a))}onOpen(){this.readyState="open",Pn.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 a=new Error("server error");a.code=i.data,this._onError(a);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 a=1;for(let l=0;l<this.writeBuffer.length;l++){const u=this.writeBuffer[l].data;if(u&&(a+=K0(u)),l>0&&a>this._maxPayload)return this.writeBuffer.slice(0,l);a+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,rr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,a,l){return this._sendPacket("message",i,a,l),this}send(i,a,l){return this._sendPacket("message",i,a,l),this}_sendPacket(i,a,l,u){if(typeof a=="function"&&(u=a,a=void 0),typeof l=="function"&&(u=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const f={type:i,data:a,options:l};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),u&&this.once("flush",u),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},a=()=>{this.off("upgrade",a),this.off("upgradeError",a),i()},l=()=>{this.once("upgrade",a),this.once("upgradeError",a)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():i()}):this.upgrading?l():i()),this}_onError(i){if(Pn.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,a){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(),Kc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=er.indexOf(this._offlineEventListener);l!==-1&&er.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,a),this.writeBuffer=[],this._prevBufferLen=0}}}Pn.protocol=jm;class hb extends Pn{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 a=this.createTransport(i),l=!1;Pn.priorWebsocketSuccess=!1;const u=()=>{l||(a.send([{type:"ping",data:"probe"}]),a.once("packet",x=>{if(!l)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",a),!a)return;Pn.priorWebsocketSuccess=a.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(A(),this.setTransport(a),a.send([{type:"upgrade"}]),this.emitReserved("upgrade",a),a=null,this.upgrading=!1,this.flush())})}else{const q=new Error("probe error");q.transport=a.name,this.emitReserved("upgradeError",q)}}))};function f(){l||(l=!0,A(),a.close(),a=null)}const d=x=>{const q=new Error("probe error: "+x);q.transport=a.name,f(),this.emitReserved("upgradeError",q)};function m(){d("transport closed")}function y(){d("socket closed")}function b(x){a&&x.name!==a.name&&f()}const A=()=>{a.removeListener("open",u),a.removeListener("error",d),a.removeListener("close",m),this.off("close",y),this.off("upgrading",b)};a.once("open",u),a.once("error",d),a.once("close",m),this.once("close",y),this.once("upgrading",b),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{l||a.open()},200):a.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const a=[];for(let l=0;l<i.length;l++)~this.transports.indexOf(i[l])&&a.push(i[l]);return a}}let db=class extends hb{constructor(i,a={}){const l=typeof i=="object",u=l?{...i}:{...a};(!u.transports||u.transports&&typeof u.transports[0]=="string")&&(u.transports=(u.transports||["polling","websocket","webtransport"]).map(f=>rb[f]).filter(f=>!!f)),super(l?u:i,u)}};function pb(r,i="",a){let l=r;a=a||typeof location<"u"&&location,r==null&&(r=a.protocol+"//"+a.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=a.protocol+r:r=a.host+r),/^(https?|wss?):\/\//.test(r)||(typeof a<"u"?r=a.protocol+"//"+r:r="https://"+r),l=Qc(r)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const f=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+f+":"+l.port+i,l.href=l.protocol+"://"+f+(a&&a.port===l.port?"":":"+l.port),l}const mb=typeof ArrayBuffer=="function",yb=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,qm=Object.prototype.toString,gb=typeof Blob=="function"||typeof Blob<"u"&&qm.call(Blob)==="[object BlobConstructor]",vb=typeof File=="function"||typeof File<"u"&&qm.call(File)==="[object FileConstructor]";function su(r){return mb&&(r instanceof ArrayBuffer||yb(r))||gb&&r instanceof Blob||vb&&r instanceof File}function tr(r,i){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let a=0,l=r.length;a<l;a++)if(tr(r[a]))return!0;return!1}if(su(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return tr(r.toJSON(),!0);for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)&&tr(r[a]))return!0;return!1}function bb(r){const i=[],a=r.data,l=r;return l.data=nr(a,i),l.attachments=i.length,{packet:l,buffers:i}}function nr(r,i,a){if(!r)return r;if(su(r)){const l={_placeholder:!0,num:i.length};return i.push(r),l}else if(Array.isArray(r)){const l=new Array(r.length);for(let u=0;u<r.length;u++)l[u]=nr(r[u],i);return l}else if(typeof r=="object"&&!(r instanceof Date)){if(r.toJSON&&typeof r.toJSON=="function"&&!a)return nr(r.toJSON(),i,!0);const l={};for(const u in r)Object.prototype.hasOwnProperty.call(r,u)&&(l[u]=nr(r[u],i));return l}return r}function wb(r,i){return r.data=Zc(r.data,i),delete r.attachments,r}function Zc(r,i){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<i.length)return i[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let a=0;a<r.length;a++)r[a]=Zc(r[a],i);else if(typeof r=="object")for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(r[a]=Zc(r[a],i));return r}const xb=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Se;(function(r){r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK"})(Se||(Se={}));let Sb=class{constructor(i){this.replacer=i}encode(i){return(i.type===Se.EVENT||i.type===Se.ACK)&&tr(i)?this.encodeAsBinary({type:i.type===Se.EVENT?Se.BINARY_EVENT:Se.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let a=""+i.type;return(i.type===Se.BINARY_EVENT||i.type===Se.BINARY_ACK)&&(a+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(a+=i.nsp+","),i.id!=null&&(a+=i.id),i.data!=null&&(a+=JSON.stringify(i.data,this.replacer)),a}encodeAsBinary(i){const a=bb(i),l=this.encodeAsString(a.packet),u=a.buffers;return u.unshift(l),u}},Eb=class Lm extends We{constructor(i){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof i=="function"?{reviver:i}:i)}add(i){let a;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");a=this.decodeString(i);const l=a.type===Se.BINARY_EVENT;l||a.type===Se.BINARY_ACK?(a.type=l?Se.EVENT:Se.ACK,this.reconstructor=new kb(a)):super.emitReserved("decoded",a)}else if(su(i)||i.base64)if(this.reconstructor)a=this.reconstructor.takeBinaryData(i),a&&(this.reconstructor=null,super.emitReserved("decoded",a));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let a=0;const l={type:Number(i.charAt(0))};if(Se[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===Se.BINARY_EVENT||l.type===Se.BINARY_ACK){const f=a+1;for(;i.charAt(++a)!=="-"&&a!=i.length;);const d=i.substring(f,a);if(d!=Number(d)||i.charAt(a)!=="-")throw new Error("Illegal attachments");const m=Number(d);if(!Tb(m)||m<1)throw new Error("Illegal attachments");if(m>this.opts.maxAttachments)throw new Error("too many attachments");l.attachments=m}if(i.charAt(a+1)==="/"){const f=a+1;for(;++a&&!(i.charAt(a)===","||a===i.length););l.nsp=i.substring(f,a)}else l.nsp="/";const u=i.charAt(a+1);if(u!==""&&Number(u)==u){const f=a+1;for(;++a;){const d=i.charAt(a);if(d==null||Number(d)!=d){--a;break}if(a===i.length)break}l.id=Number(i.substring(f,a+1))}if(i.charAt(++a)){const f=this.tryParse(i.substr(a));if(Lm.isPayloadValid(l.type,f))l.data=f;else throw new Error("invalid payload")}return l}tryParse(i){try{return JSON.parse(i,this.opts.reviver)}catch{return!1}}static isPayloadValid(i,a){switch(i){case Se.CONNECT:return Xp(a);case Se.DISCONNECT:return a===void 0;case Se.CONNECT_ERROR:return typeof a=="string"||Xp(a);case Se.EVENT:case Se.BINARY_EVENT:return Array.isArray(a)&&(typeof a[0]=="number"||typeof a[0]=="string"&&xb.indexOf(a[0])===-1);case Se.ACK:case Se.BINARY_ACK:return Array.isArray(a)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}};class kb{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const a=wb(this.reconPack,this.buffers);return this.finishedReconstruction(),a}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Tb=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function Xp(r){return Object.prototype.toString.call(r)==="[object Object]"}const _b=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Eb,Encoder:Sb,get PacketType(){return Se}},Symbol.toStringTag,{value:"Module"}));function Qt(r,i,a){return r.on(i,a),function(){r.off(i,a)}}const Ab=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Hm extends We{constructor(i,a,l){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=a,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[Qt(i,"open",this.onopen.bind(this)),Qt(i,"packet",this.onpacket.bind(this)),Qt(i,"error",this.onerror.bind(this)),Qt(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,...a){var l,u,f;if(Ab.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(a.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(a),this;const d={type:Se.EVENT,data:a};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof a[a.length-1]=="function"){const A=this.ids++,x=a.pop();this._registerAckCallback(A,x),d.id=A}const m=(u=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||u===void 0?void 0:u.writable,y=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(y?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(i,a){var l;const u=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(u===void 0){this.acks[i]=a;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);a.call(this,new Error("operation has timed out"))},u),d=(...m)=>{this.io.clearTimeoutFn(f),a.apply(this,m)};d.withError=!0,this.acks[i]=d}emitWithAck(i,...a){return new Promise((l,u)=>{const f=(d,m)=>d?u(d):l(m);f.withError=!0,a.push(f),this.emit(i,...a)})}_addToQueue(i){let a;typeof i[i.length-1]=="function"&&(a=i.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((u,...f)=>(this._queue[0],u!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),a&&a(u)):(this._queue.shift(),a&&a(null,...f)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const a=this._queue[0];a.pending&&!i||(a.pending=!0,a.tryCount++,this.flags=a.flags,this.emit.apply(this,a.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:Se.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,a){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,a),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(l=>String(l.id)===i)){const l=this.acks[i];delete this.acks[i],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Se.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 Se.EVENT:case Se.BINARY_EVENT:this.onevent(i);break;case Se.ACK:case Se.BINARY_ACK:this.onack(i);break;case Se.DISCONNECT:this.ondisconnect();break;case Se.CONNECT_ERROR:this.destroy();const l=new Error(i.data.message);l.data=i.data.data,this.emitReserved("connect_error",l);break}}onevent(i){const a=i.data||[];i.id!=null&&a.push(this.ack(i.id)),this.connected?this.emitEvent(a):this.receiveBuffer.push(Object.freeze(a))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const a=this._anyListeners.slice();for(const l of a)l.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 a=this;let l=!1;return function(...u){l||(l=!0,a.packet({type:Se.ACK,id:i,data:u}))}}onack(i){const a=this.acks[i.id];typeof a=="function"&&(delete this.acks[i.id],a.withError&&i.data.unshift(null),a.apply(this,i.data))}onconnect(i,a){this.id=i,this.recovered=a&&this._pid===a,this._pid=a,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}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:Se.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 a=this._anyListeners;for(let l=0;l<a.length;l++)if(i===a[l])return a.splice(l,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 a=this._anyOutgoingListeners;for(let l=0;l<a.length;l++)if(i===a[l])return a.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const a=this._anyOutgoingListeners.slice();for(const l of a)l.apply(this,i.data)}}}function hs(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}hs.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),a=Math.floor(i*this.jitter*r);r=(Math.floor(i*10)&1)==0?r-a:r+a}return Math.min(r,this.max)|0};hs.prototype.reset=function(){this.attempts=0};hs.prototype.setMin=function(r){this.ms=r};hs.prototype.setMax=function(r){this.max=r};hs.prototype.setJitter=function(r){this.jitter=r};class Jc extends We{constructor(i,a){var l;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(a=i,i=void 0),a=a||{},a.path=a.path||"/socket.io",this.opts=a,or(this,a),this.reconnection(a.reconnection!==!1),this.reconnectionAttempts(a.reconnectionAttempts||1/0),this.reconnectionDelay(a.reconnectionDelay||1e3),this.reconnectionDelayMax(a.reconnectionDelayMax||5e3),this.randomizationFactor((l=a.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new hs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(a.timeout==null?2e4:a.timeout),this._readyState="closed",this.uri=i;const u=a.parser||_b;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=a.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 a;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(a=this.backoff)===null||a===void 0||a.setMin(i),this)}randomizationFactor(i){var a;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(a=this.backoff)===null||a===void 0||a.setJitter(i),this)}reconnectionDelayMax(i){var a;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(a=this.backoff)===null||a===void 0||a.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 db(this.uri,this.opts);const a=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const u=Qt(a,"open",function(){l.onopen(),i&&i()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),i?i(m):this.maybeReconnectOnOpen()},d=Qt(a,"error",f);if(this._timeout!==!1){const m=this._timeout,y=this.setTimeoutFn(()=>{u(),f(new Error("timeout")),a.close()},m);this.opts.autoUnref&&y.unref(),this.subs.push(()=>{this.clearTimeoutFn(y)})}return this.subs.push(u),this.subs.push(d),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Qt(i,"ping",this.onping.bind(this)),Qt(i,"data",this.ondata.bind(this)),Qt(i,"error",this.onerror.bind(this)),Qt(i,"close",this.onclose.bind(this)),Qt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(a){this.onclose("parse error",a)}}ondecoded(i){rr(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,a){let l=this.nsps[i];return l?this._autoConnect&&!l.active&&l.connect():(l=new Hm(this,i,a),this.nsps[i]=l),l}_destroy(i){const a=Object.keys(this.nsps);for(const l of a)if(this.nsps[l].active)return;this._close()}_packet(i){const a=this.encoder.encode(i);for(let l=0;l<a.length;l++)this.engine.write(a[l],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,a){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,a),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 a=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(u=>{u?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",u)):i.onreconnect()}))},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const ma={};function Ea(r,i){typeof r=="object"&&(i=r,r=void 0),i=i||{};const a=pb(r,i.path||"/socket.io"),l=a.source,u=a.id,f=a.path,d=ma[u]&&f in ma[u].nsps,m=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let y;return m?y=new Jc(l,i):(ma[u]||(ma[u]=new Jc(l,i)),y=ma[u]),a.query&&!i.query&&(i.query=a.queryKey),y.socket(a.path,i)}Object.assign(Ea,{Manager:Jc,Socket:Hm,io:Ea,connect:Ea});function Nb(r){const i=r.length;let a=0,l=0;for(;l<i;){let u=r.charCodeAt(l++);if((u&4294967168)===0){a++;continue}else if((u&4294965248)===0)a+=2;else{if(u>=55296&&u<=56319&&l<i){const f=r.charCodeAt(l);(f&64512)===56320&&(++l,u=((u&1023)<<10)+(f&1023)+65536)}(u&4294901760)===0?a+=3:a+=4}}return a}function Ob(r,i,a){const l=r.length;let u=a,f=0;for(;f<l;){let d=r.charCodeAt(f++);if((d&4294967168)===0){i[u++]=d;continue}else if((d&4294965248)===0)i[u++]=d>>6&31|192;else{if(d>=55296&&d<=56319&&f<l){const m=r.charCodeAt(f);(m&64512)===56320&&(++f,d=((d&1023)<<10)+(m&1023)+65536)}(d&4294901760)===0?(i[u++]=d>>12&15|224,i[u++]=d>>6&63|128):(i[u++]=d>>18&7|240,i[u++]=d>>12&63|128,i[u++]=d>>6&63|128)}i[u++]=d&63|128}}const Rb=new TextEncoder,zb=50;function jb(r,i,a){Rb.encodeInto(r,i.subarray(a))}function Mb(r,i,a){r.length>zb?jb(r,i,a):Ob(r,i,a)}const Cb=4096;function $m(r,i,a){let l=i;const u=l+a,f=[];let d="";for(;l<u;){const m=r[l++];if((m&128)===0)f.push(m);else if((m&224)===192){const y=r[l++]&63;f.push((m&31)<<6|y)}else if((m&240)===224){const y=r[l++]&63,b=r[l++]&63;f.push((m&31)<<12|y<<6|b)}else if((m&248)===240){const y=r[l++]&63,b=r[l++]&63,A=r[l++]&63;let x=(m&7)<<18|y<<12|b<<6|A;x>65535&&(x-=65536,f.push(x>>>10&1023|55296),x=56320|x&1023),f.push(x)}else f.push(m);f.length>=Cb&&(d+=String.fromCharCode(...f),f.length=0)}return f.length>0&&(d+=String.fromCharCode(...f)),d}const Ub=new TextDecoder,Db=200;function Bb(r,i,a){const l=r.subarray(i,i+a);return Ub.decode(l)}function qb(r,i,a){return a>Db?Bb(r,i,a):$m(r,i,a)}class Fl{type;data;constructor(i,a){this.type=i,this.data=a}}class Rt extends Error{constructor(i){super(i);const a=Object.create(Rt.prototype);Object.setPrototypeOf(this,a),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:Rt.name})}}const ya=4294967295;function Lb(r,i,a){const l=a/4294967296,u=a;r.setUint32(i,l),r.setUint32(i+4,u)}function Ym(r,i,a){const l=Math.floor(a/4294967296),u=a;r.setUint32(i,l),r.setUint32(i+4,u)}function Vm(r,i){const a=r.getInt32(i),l=r.getUint32(i+4);return a*4294967296+l}function Hb(r,i){const a=r.getUint32(i),l=r.getUint32(i+4);return a*4294967296+l}const $b=-1,Yb=4294967296-1,Vb=17179869184-1;function Xb({sec:r,nsec:i}){if(r>=0&&i>=0&&r<=Vb)if(i===0&&r<=Yb){const a=new Uint8Array(4);return new DataView(a.buffer).setUint32(0,r),a}else{const a=r/4294967296,l=r&4294967295,u=new Uint8Array(8),f=new DataView(u.buffer);return f.setUint32(0,i<<2|a&3),f.setUint32(4,l),u}else{const a=new Uint8Array(12),l=new DataView(a.buffer);return l.setUint32(0,i),Ym(l,4,r),a}}function Gb(r){const i=r.getTime(),a=Math.floor(i/1e3),l=(i-a*1e3)*1e6,u=Math.floor(l/1e9);return{sec:a+u,nsec:l-u*1e9}}function Qb(r){if(r instanceof Date){const i=Gb(r);return Xb(i)}else return null}function Kb(r){const i=new DataView(r.buffer,r.byteOffset,r.byteLength);switch(r.byteLength){case 4:return{sec:i.getUint32(0),nsec:0};case 8:{const a=i.getUint32(0),l=i.getUint32(4),u=(a&3)*4294967296+l,f=a>>>2;return{sec:u,nsec:f}}case 12:{const a=Vm(i,4),l=i.getUint32(0);return{sec:a,nsec:l}}default:throw new Rt(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${r.length}`)}}function Zb(r){const i=Kb(r);return new Date(i.sec*1e3+i.nsec/1e6)}const Jb={type:$b,encode:Qb,decode:Zb};class cr{static defaultCodec=new cr;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Jb)}register({type:i,encode:a,decode:l}){if(i>=0)this.encoders[i]=a,this.decoders[i]=l;else{const u=-1-i;this.builtInEncoders[u]=a,this.builtInDecoders[u]=l}}tryToEncode(i,a){for(let l=0;l<this.builtInEncoders.length;l++){const u=this.builtInEncoders[l];if(u!=null){const f=u(i,a);if(f!=null){const d=-1-l;return new Fl(d,f)}}}for(let l=0;l<this.encoders.length;l++){const u=this.encoders[l];if(u!=null){const f=u(i,a);if(f!=null){const d=l;return new Fl(d,f)}}}return i instanceof Fl?i:null}decode(i,a,l){const u=a<0?this.builtInDecoders[-1-a]:this.decoders[a];return u?u(i,a,l):new Fl(a,i)}}function Fb(r){return r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer}function Fc(r){return r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Fb(r)?new Uint8Array(r):Uint8Array.from(r)}const Wb=100,Ib=2048;class au{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(i){this.extensionCodec=i?.extensionCodec??cr.defaultCodec,this.context=i?.context,this.useBigInt64=i?.useBigInt64??!1,this.maxDepth=i?.maxDepth??Wb,this.initialBufferSize=i?.initialBufferSize??Ib,this.sortKeys=i?.sortKeys??!1,this.forceFloat32=i?.forceFloat32??!1,this.ignoreUndefined=i?.ignoreUndefined??!1,this.forceIntegerToFloat=i?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new au({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(i){if(this.entered)return this.clone().encodeSharedRef(i);try{return this.entered=!0,this.reinitializeState(),this.doEncode(i,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(i){if(this.entered)return this.clone().encode(i);try{return this.entered=!0,this.reinitializeState(),this.doEncode(i,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(i,a){if(a>this.maxDepth)throw new Error(`Too deep objects in depth ${a}`);i==null?this.encodeNil():typeof i=="boolean"?this.encodeBoolean(i):typeof i=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(i):this.encodeNumber(i):typeof i=="string"?this.encodeString(i):this.useBigInt64&&typeof i=="bigint"?this.encodeBigInt64(i):this.encodeObject(i,a)}ensureBufferSizeToWrite(i){const a=this.pos+i;this.view.byteLength<a&&this.resizeBuffer(a*2)}resizeBuffer(i){const a=new ArrayBuffer(i),l=new Uint8Array(a),u=new DataView(a);l.set(this.bytes),this.view=u,this.bytes=l}encodeNil(){this.writeU8(192)}encodeBoolean(i){i===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(i){!this.forceIntegerToFloat&&Number.isSafeInteger(i)?i>=0?i<128?this.writeU8(i):i<256?(this.writeU8(204),this.writeU8(i)):i<65536?(this.writeU8(205),this.writeU16(i)):i<4294967296?(this.writeU8(206),this.writeU32(i)):this.useBigInt64?this.encodeNumberAsFloat(i):(this.writeU8(207),this.writeU64(i)):i>=-32?this.writeU8(224|i+32):i>=-128?(this.writeU8(208),this.writeI8(i)):i>=-32768?(this.writeU8(209),this.writeI16(i)):i>=-2147483648?(this.writeU8(210),this.writeI32(i)):this.useBigInt64?this.encodeNumberAsFloat(i):(this.writeU8(211),this.writeI64(i)):this.encodeNumberAsFloat(i)}encodeNumberAsFloat(i){this.forceFloat32?(this.writeU8(202),this.writeF32(i)):(this.writeU8(203),this.writeF64(i))}encodeBigInt64(i){i>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(i)):(this.writeU8(211),this.writeBigInt64(i))}writeStringHeader(i){if(i<32)this.writeU8(160+i);else if(i<256)this.writeU8(217),this.writeU8(i);else if(i<65536)this.writeU8(218),this.writeU16(i);else if(i<4294967296)this.writeU8(219),this.writeU32(i);else throw new Error(`Too long string: ${i} bytes in UTF-8`)}encodeString(i){const l=Nb(i);this.ensureBufferSizeToWrite(5+l),this.writeStringHeader(l),Mb(i,this.bytes,this.pos),this.pos+=l}encodeObject(i,a){const l=this.extensionCodec.tryToEncode(i,this.context);if(l!=null)this.encodeExtension(l);else if(Array.isArray(i))this.encodeArray(i,a);else if(ArrayBuffer.isView(i))this.encodeBinary(i);else if(typeof i=="object")this.encodeMap(i,a);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(i)}`)}encodeBinary(i){const a=i.byteLength;if(a<256)this.writeU8(196),this.writeU8(a);else if(a<65536)this.writeU8(197),this.writeU16(a);else if(a<4294967296)this.writeU8(198),this.writeU32(a);else throw new Error(`Too large binary: ${a}`);const l=Fc(i);this.writeU8a(l)}encodeArray(i,a){const l=i.length;if(l<16)this.writeU8(144+l);else if(l<65536)this.writeU8(220),this.writeU16(l);else if(l<4294967296)this.writeU8(221),this.writeU32(l);else throw new Error(`Too large array: ${l}`);for(const u of i)this.doEncode(u,a+1)}countWithoutUndefined(i,a){let l=0;for(const u of a)i[u]!==void 0&&l++;return l}encodeMap(i,a){const l=Object.keys(i);this.sortKeys&&l.sort();const u=this.ignoreUndefined?this.countWithoutUndefined(i,l):l.length;if(u<16)this.writeU8(128+u);else if(u<65536)this.writeU8(222),this.writeU16(u);else if(u<4294967296)this.writeU8(223),this.writeU32(u);else throw new Error(`Too large map object: ${u}`);for(const f of l){const d=i[f];this.ignoreUndefined&&d===void 0||(this.encodeString(f),this.doEncode(d,a+1))}}encodeExtension(i){if(typeof i.data=="function"){const l=i.data(this.pos+6),u=l.length;if(u>=4294967296)throw new Error(`Too large extension object: ${u}`);this.writeU8(201),this.writeU32(u),this.writeI8(i.type),this.writeU8a(l);return}const a=i.data.length;if(a===1)this.writeU8(212);else if(a===2)this.writeU8(213);else if(a===4)this.writeU8(214);else if(a===8)this.writeU8(215);else if(a===16)this.writeU8(216);else if(a<256)this.writeU8(199),this.writeU8(a);else if(a<65536)this.writeU8(200),this.writeU16(a);else if(a<4294967296)this.writeU8(201),this.writeU32(a);else throw new Error(`Too large extension object: ${a}`);this.writeI8(i.type),this.writeU8a(i.data)}writeU8(i){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,i),this.pos++}writeU8a(i){const a=i.length;this.ensureBufferSizeToWrite(a),this.bytes.set(i,this.pos),this.pos+=a}writeI8(i){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,i),this.pos++}writeU16(i){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,i),this.pos+=2}writeI16(i){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,i),this.pos+=2}writeU32(i){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,i),this.pos+=4}writeI32(i){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,i),this.pos+=4}writeF32(i){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,i),this.pos+=4}writeF64(i){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,i),this.pos+=8}writeU64(i){this.ensureBufferSizeToWrite(8),Lb(this.view,this.pos,i),this.pos+=8}writeI64(i){this.ensureBufferSizeToWrite(8),Ym(this.view,this.pos,i),this.pos+=8}writeBigUint64(i){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,i),this.pos+=8}writeBigInt64(i){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,i),this.pos+=8}}function Pb(r,i){return new au(i).encodeSharedRef(r)}function Bc(r){return`${r<0?"-":""}0x${Math.abs(r).toString(16).padStart(2,"0")}`}const ew=16,tw=16;class nw{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(i=ew,a=tw){this.maxKeyLength=i,this.maxLengthPerKey=a,this.caches=[];for(let l=0;l<this.maxKeyLength;l++)this.caches.push([])}canBeCached(i){return i>0&&i<=this.maxKeyLength}find(i,a,l){const u=this.caches[l-1];e:for(const f of u){const d=f.bytes;for(let m=0;m<l;m++)if(d[m]!==i[a+m])continue e;return f.str}return null}store(i,a){const l=this.caches[i.length-1],u={bytes:i,str:a};l.length>=this.maxLengthPerKey?l[Math.random()*l.length|0]=u:l.push(u)}decode(i,a,l){const u=this.find(i,a,l);if(u!=null)return this.hit++,u;this.miss++;const f=$m(i,a,l),d=Uint8Array.prototype.slice.call(i,a,a+l);return this.store(d,f),f}}const Wc="array",ka="map_key",Xm="map_value",iw=r=>{if(typeof r=="string"||typeof r=="number")return r;throw new Rt("The type of key must be string or number but "+typeof r)};class sw{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(i){const a=this.getUninitializedStateFromPool();a.type=Wc,a.position=0,a.size=i,a.array=new Array(i)}pushMapState(i){const a=this.getUninitializedStateFromPool();a.type=ka,a.readCount=0,a.size=i,a.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const i={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(i)}return this.stack[this.stackHeadPosition]}release(i){if(this.stack[this.stackHeadPosition]!==i)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(i.type===Wc){const l=i;l.size=0,l.array=void 0,l.position=0,l.type=void 0}if(i.type===ka||i.type===Xm){const l=i;l.size=0,l.map=void 0,l.readCount=0,l.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}const ga=-1,lu=new DataView(new ArrayBuffer(0)),aw=new Uint8Array(lu.buffer);try{lu.getInt8(0)}catch(r){if(!(r instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}const Gp=new RangeError("Insufficient data"),lw=new nw;class ru{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=lu;bytes=aw;headByte=ga;stack=new sw;entered=!1;constructor(i){this.extensionCodec=i?.extensionCodec??cr.defaultCodec,this.context=i?.context,this.useBigInt64=i?.useBigInt64??!1,this.rawStrings=i?.rawStrings??!1,this.maxStrLength=i?.maxStrLength??ya,this.maxBinLength=i?.maxBinLength??ya,this.maxArrayLength=i?.maxArrayLength??ya,this.maxMapLength=i?.maxMapLength??ya,this.maxExtLength=i?.maxExtLength??ya,this.keyDecoder=i?.keyDecoder!==void 0?i.keyDecoder:lw,this.mapKeyConverter=i?.mapKeyConverter??iw}clone(){return new ru({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=ga,this.stack.reset()}setBuffer(i){const a=Fc(i);this.bytes=a,this.view=new DataView(a.buffer,a.byteOffset,a.byteLength),this.pos=0}appendBuffer(i){if(this.headByte===ga&&!this.hasRemaining(1))this.setBuffer(i);else{const a=this.bytes.subarray(this.pos),l=Fc(i),u=new Uint8Array(a.length+l.length);u.set(a),u.set(l,a.length),this.setBuffer(u)}}hasRemaining(i){return this.view.byteLength-this.pos>=i}createExtraByteError(i){const{view:a,pos:l}=this;return new RangeError(`Extra ${a.byteLength-l} of ${a.byteLength} byte(s) found at buffer[${i}]`)}decode(i){if(this.entered)return this.clone().decode(i);try{this.entered=!0,this.reinitializeState(),this.setBuffer(i);const a=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return a}finally{this.entered=!1}}*decodeMulti(i){if(this.entered){yield*this.clone().decodeMulti(i);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(i);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(i){if(this.entered)return this.clone().decodeAsync(i);try{this.entered=!0;let a=!1,l;for await(const m of i){if(a)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(m);try{l=this.doDecodeSync(),a=!0}catch(y){if(!(y instanceof RangeError))throw y}this.totalPos+=this.pos}if(a){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return l}const{headByte:u,pos:f,totalPos:d}=this;throw new RangeError(`Insufficient data in parsing ${Bc(u)} at ${d} (${f} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(i){return this.decodeMultiAsync(i,!0)}decodeStream(i){return this.decodeMultiAsync(i,!1)}async*decodeMultiAsync(i,a){if(this.entered){yield*this.clone().decodeMultiAsync(i,a);return}try{this.entered=!0;let l=a,u=-1;for await(const f of i){if(a&&u===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(f),l&&(u=this.readArraySize(),l=!1,this.complete());try{for(;yield this.doDecodeSync(),--u!==0;);}catch(d){if(!(d instanceof RangeError))throw d}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const i=this.readHeadByte();let a;if(i>=224)a=i-256;else if(i<192)if(i<128)a=i;else if(i<144){const u=i-128;if(u!==0){this.pushMapState(u),this.complete();continue e}else a={}}else if(i<160){const u=i-144;if(u!==0){this.pushArrayState(u),this.complete();continue e}else a=[]}else{const u=i-160;a=this.decodeString(u,0)}else if(i===192)a=null;else if(i===194)a=!1;else if(i===195)a=!0;else if(i===202)a=this.readF32();else if(i===203)a=this.readF64();else if(i===204)a=this.readU8();else if(i===205)a=this.readU16();else if(i===206)a=this.readU32();else if(i===207)this.useBigInt64?a=this.readU64AsBigInt():a=this.readU64();else if(i===208)a=this.readI8();else if(i===209)a=this.readI16();else if(i===210)a=this.readI32();else if(i===211)this.useBigInt64?a=this.readI64AsBigInt():a=this.readI64();else if(i===217){const u=this.lookU8();a=this.decodeString(u,1)}else if(i===218){const u=this.lookU16();a=this.decodeString(u,2)}else if(i===219){const u=this.lookU32();a=this.decodeString(u,4)}else if(i===220){const u=this.readU16();if(u!==0){this.pushArrayState(u),this.complete();continue e}else a=[]}else if(i===221){const u=this.readU32();if(u!==0){this.pushArrayState(u),this.complete();continue e}else a=[]}else if(i===222){const u=this.readU16();if(u!==0){this.pushMapState(u),this.complete();continue e}else a={}}else if(i===223){const u=this.readU32();if(u!==0){this.pushMapState(u),this.complete();continue e}else a={}}else if(i===196){const u=this.lookU8();a=this.decodeBinary(u,1)}else if(i===197){const u=this.lookU16();a=this.decodeBinary(u,2)}else if(i===198){const u=this.lookU32();a=this.decodeBinary(u,4)}else if(i===212)a=this.decodeExtension(1,0);else if(i===213)a=this.decodeExtension(2,0);else if(i===214)a=this.decodeExtension(4,0);else if(i===215)a=this.decodeExtension(8,0);else if(i===216)a=this.decodeExtension(16,0);else if(i===199){const u=this.lookU8();a=this.decodeExtension(u,1)}else if(i===200){const u=this.lookU16();a=this.decodeExtension(u,2)}else if(i===201){const u=this.lookU32();a=this.decodeExtension(u,4)}else throw new Rt(`Unrecognized type byte: ${Bc(i)}`);this.complete();const l=this.stack;for(;l.length>0;){const u=l.top();if(u.type===Wc)if(u.array[u.position]=a,u.position++,u.position===u.size)a=u.array,l.release(u);else continue e;else if(u.type===ka){if(a==="__proto__")throw new Rt("The key __proto__ is not allowed");u.key=this.mapKeyConverter(a),u.type=Xm;continue e}else if(u.map[u.key]=a,u.readCount++,u.readCount===u.size)a=u.map,l.release(u);else{u.key=null,u.type=ka;continue e}}return a}}readHeadByte(){return this.headByte===ga&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=ga}readArraySize(){const i=this.readHeadByte();switch(i){case 220:return this.readU16();case 221:return this.readU32();default:{if(i<160)return i-144;throw new Rt(`Unrecognized array type byte: ${Bc(i)}`)}}}pushMapState(i){if(i>this.maxMapLength)throw new Rt(`Max length exceeded: map length (${i}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(i)}pushArrayState(i){if(i>this.maxArrayLength)throw new Rt(`Max length exceeded: array length (${i}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(i)}decodeString(i,a){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(i,a):this.decodeBinary(i,a)}decodeUtf8String(i,a){if(i>this.maxStrLength)throw new Rt(`Max length exceeded: UTF-8 byte length (${i}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+a+i)throw Gp;const l=this.pos+a;let u;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(i)?u=this.keyDecoder.decode(this.bytes,l,i):u=qb(this.bytes,l,i),this.pos+=a+i,u}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===ka:!1}decodeBinary(i,a){if(i>this.maxBinLength)throw new Rt(`Max length exceeded: bin length (${i}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(i+a))throw Gp;const l=this.pos+a,u=this.bytes.subarray(l,l+i);return this.pos+=a+i,u}decodeExtension(i,a){if(i>this.maxExtLength)throw new Rt(`Max length exceeded: ext length (${i}) > maxExtLength (${this.maxExtLength})`);const l=this.view.getInt8(this.pos+a),u=this.decodeBinary(i,a+1);return this.extensionCodec.decode(u,l,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const i=this.view.getUint8(this.pos);return this.pos++,i}readI8(){const i=this.view.getInt8(this.pos);return this.pos++,i}readU16(){const i=this.view.getUint16(this.pos);return this.pos+=2,i}readI16(){const i=this.view.getInt16(this.pos);return this.pos+=2,i}readU32(){const i=this.view.getUint32(this.pos);return this.pos+=4,i}readI32(){const i=this.view.getInt32(this.pos);return this.pos+=4,i}readU64(){const i=Hb(this.view,this.pos);return this.pos+=8,i}readI64(){const i=Vm(this.view,this.pos);return this.pos+=8,i}readU64AsBigInt(){const i=this.view.getBigUint64(this.pos);return this.pos+=8,i}readI64AsBigInt(){const i=this.view.getBigInt64(this.pos);return this.pos+=8,i}readF32(){const i=this.view.getFloat32(this.pos);return this.pos+=4,i}readF64(){const i=this.view.getFloat64(this.pos);return this.pos+=8,i}}function rw(r,i){return new ru(i).decode(r)}const Gm={contentType:"application/msgpack",encode:r=>Pb(r,{ignoreUndefined:!0}),decode:r=>rw(r)},ow={contentType:"application/json",encode:r=>pm(JSON.stringify(r)),decode:r=>JSON.parse(dm(r))},cw=r=>r?Gm:ow,Qp=async(r,i,a,l,u,f)=>{if(r.emit(Ae.unroutable,{source:a,target:l,reason:f}),i.type!==Fe.RequestMessage)return;const d=i.payload?.id;if(!d)return;const m={type:Xe.error,id:d,code:u,error:{name:"RpcError",message:`${r.name}: ${f}`}},y=new ym;y.type=Fe.ErrorMessage,y.payload=m;try{await r.receive(y,r.name,a)}catch{}},Kp="presence",uw=128,Zp=8,Jp=r=>typeof r=="string"&&r.length>0&&r.length<=uw&&![...r].some(i=>i===" "||i.charCodeAt(0)<32||i.charCodeAt(0)===127);class Fp extends lr{url;options;announcePresence;allowInsecureTls;socket;connected=!1;codec=Gm;knownPeers=new Set;carrying=[];constructor(i,a,l,u={},f=!0,d=!1){super(i,l),this.url=a,this.options=u,this.announcePresence=f,this.allowInsecureTls=d,queueMicrotask(()=>{this.open().catch(m=>this.emit(Ae.transportError,m))})}closing=!1;async close(){this.closing=!0;const i=this.socket;if(this.socket=void 0,this.connected=!1,this.readyFlag=!1,!i)return;i.io.reconnection(!1);const a=i.io.engine,l=i.connected&&a?new Promise(u=>{const f=setTimeout(u,2e3);f.unref?.(),a.once("close",()=>{clearTimeout(f),u()})}):Promise.resolve();i.disconnect(),await l,i.removeAllListeners(),this.knownPeers.clear()}async open(){if(this.socket)return;super.open();const i=this.url;this.allowInsecureTls&&(this.options={rejectUnauthorized:!1,...this.options},this.warnAboutInsecureTls()),this.socket=i?Ea(i,this.options):Ea(this.options),this.socket.on("message",async a=>{try{const[l,u,f]=this.extractHeader(new Uint8Array(a));if(!l){this.emit(Ae.rejected,{source:"unknown",reason:f??"no msgrpc header"});return}const d=this.codec.decode(u);await this.deliver(d,l.source,l.target,l.hops??0)}catch(l){this.emit(Ae.rejected,{source:"unknown",reason:`undecodable frame: ${String(l)}`,error:l})}}),this.socket.on(Kp,a=>{try{this.onPresence(a)}catch(l){this.emit(Ae.rejected,{source:"unknown",reason:`bad presence update: ${String(l)}`,error:l})}}),this.socket.on("connect",()=>{this.connected=!0,this.readyFlag=!0,this.announcePresence&&this.announce(),this.emit(Ae.connected)}),this.socket.on("disconnect",a=>{this.connected=!1,this.readyFlag=!1;for(const l of[...this.knownPeers])this.knownPeers.delete(l),this.emit(Ae.peerGone,l);this.emit(Ae.disconnected,a),a==="io server disconnect"&&!this.closing&&setTimeout(()=>{!this.closing&&this.socket?.disconnected&&this.socket.connect()},1e3).unref?.()})}warnAboutInsecureTls(){!this.url||!/^(https|wss):/i.test(this.url)||console.warn(`source-rpc: '${this.name}' is connecting to ${this.url} with allowInsecureTls, so the server's certificate is not checked. Anything able to answer on that address can read and rewrite this link. Use it for a development server, not a plant.`)}registerIfUnrouted(i){this.peerRegistry.get(i)||this.setKnownSource(i)}announce(){const i={name:this.name};this.carrying.length&&(i.carrying=this.carrying),this.socket?.emit(Kp,i)}advertise(i){const a=[...i].sort();a.length===this.carrying.length&&a.every((l,u)=>l===this.carrying[u])||(this.carrying=a,this.connected&&this.announcePresence&&this.announce())}onPresence(i){if(Array.isArray(i.peers)){for(const a of i.peers)!Jp(a)||a===this.name||this.knownPeers.has(a)||(this.knownPeers.add(a),this.registerIfUnrouted(a),this.emit(Ae.peerOnline,a));return}if(!(!Jp(i.peer)||i.peer===this.name))if(i.state==="offline"){if(!this.knownPeers.delete(i.peer))return;this.emit(Ae.peerGone,i.peer)}else{if(this.knownPeers.has(i.peer))return;this.knownPeers.add(i.peer),this.registerIfUnrouted(i.peer),this.emit(Ae.peerOnline,i.peer)}}async deliver(i,a,l,u){if(l!==this.name){const f=this.peerRegistry.get(l);if(f&&f!==this&&f.isTransport()){if(u+1>Zp){await Qp(this,i,a,l,"TransportError",`over ${Zp} relays`);return}const d=f;d.forward?d.forward(i,a,l,u+1):await f.receive(i,a,l);return}}if(this.targetExists(l)){await this.send(i,a,l);return}await Qp(this,i,a,l,"TransportError",`no route to '${l}'`)}forward(i,a,l,u){try{this.requireSocket().emit("message",this.frameMessage(this.buildHeader(a,l,{hops:u}),this.codec.encode(i)))}catch(f){this.emit(Ae.unroutable,{source:a,target:l,reason:`cannot forward: ${String(f)}`,error:f})}}requireSocket(){if(!this.socket)throw new Error(`SocketIoClientTransport '${this.name}': not connected to ${this.url??"the default url"}`);return this.socket}async receive(i,a,l){this.requireSocket().emit("message",this.frameMessage(this.buildHeader(a,l),this.codec.encode(i)))}isTransport(){return!0}}const ou=Object.freeze(`abandon
|
|
10
10
|
ability
|
|
11
11
|
able
|
|
12
12
|
about
|
|
@@ -2054,10 +2054,10 @@ zebra
|
|
|
2054
2054
|
zero
|
|
2055
2055
|
zone
|
|
2056
2056
|
zoo`.split(`
|
|
2057
|
-
`));rc.length;const Pb=l=>{const i=new Uint32Array(l);return crypto.getRandomValues(i),[...i].map(s=>s%rc.length)},e1=(l=3)=>Pb(l).map(i=>rc[i]).join("-"),t1=(l,i=3)=>`${l}-${e1(i)}`;class n1{durable=!1;async load(){}async save(){}}const ht="$host",Jl=128,Lm=/[\u0000-\u001f\u007f]/,Wn=(l,i)=>{if(!l)throw new Error(`topology: ${i} is empty`);if(Lm.test(l))throw new Error(`topology: ${i} contains a control character, and ids never do`)},Du=l=>{if(l!==void 0&&Lm.test(l))throw new Error("topology: a label contains a control character")};class i1{peer;options;records=new Map;listeners=new Map;store;loaded=!1;constructor(i,s={}){this.peer=i,this.options=s;for(const r of s.place??[])Wn(r,`place segment '${r}'`);Du(s.label),this.store=s.store??new n1}async init(){const i=await this.store.load();if(i)for(const s of i)this.records.set(s.ref.instance,s);this.records.has(ht)||this.records.set(ht,{ref:{peer:this.peer,instance:ht},parent:null,owner:null,parentEpoch:dt(),ownerEpoch:dt(),version:{epoch:dt(),revision:0},...this.options.label!==void 0?{label:this.options.label}:{}}),this.loaded=!0,await this.persist()}ref(i){return{peer:this.peer,instance:i}}get(i){return this.records.get(i)}all(){return[...this.records.values()]}get place(){return this.options.place}capabilities(){return{authorityScope:"host",cycleGuarantee:"detected",reverseIndex:"eventual",deletion:"tombstone",durability:this.store.durable?"durable":"volatile"}}async declare(i,s={}){if(this.assertLoaded(),Wn(i,`instance '${i}'`),i===ht)throw new Error(`topology: ${ht} is the synthetic root - set its links with updateHost()`);if(this.records.has(i))throw new Error(`topology: ${i} is already declared - changes go through update() with the expected version`);Du(s.label);const r=s.parent===void 0?this.ref(ht):s.parent;this.checkParent(i,r),this.checkOwner(i,s.owner??null);const c={ref:this.ref(i),parent:r,owner:s.owner??null,parentEpoch:dt(),ownerEpoch:dt(),version:{epoch:dt(),revision:0},...s.label!==void 0?{label:s.label}:{}};return this.records.set(i,c),await this.persist(),this.notify(i),c}async update(i,s,r){this.assertLoaded();const c=this.records.get(i);if(!c)throw new Error(`topology: ${i} is not declared here`);if(c.version.epoch!==r.expectedVersion.epoch||c.version.revision!==r.expectedVersion.revision)throw new Error(`topology: ${i} is at revision ${c.version.revision}, not ${r.expectedVersion.revision} - read it again and decide again`);Du(s.label),s.parent!==void 0&&(i===ht?this.checkRootParent(s.parent):this.checkParent(i,s.parent)),s.owner!==void 0&&this.checkOwner(i,s.owner);const f={...c,...s.parent!==void 0?{parent:s.parent,parentEpoch:dt()}:{},...s.owner!==void 0?{owner:s.owner,ownerEpoch:dt()}:{},...s.label!==void 0?{label:s.label}:{},version:{epoch:c.version.epoch,revision:c.version.revision+1}};return this.records.set(i,f),await this.persist(),this.notify(i),f}async updateHost(i,s){return this.update(ht,i,s)}checkParent(i,s){if(s===null)return;if(Wn(s.peer,"parent peer"),Wn(s.instance,"parent instance"),s.peer!==this.peer)throw new Error(`topology: ${i} cannot have a remote physical parent - only the ${ht} root may, root to root`);if(s.instance===i)throw new Error(`topology: ${i} cannot be its own parent`);const r=new Set([i]);let c=s.instance;for(;c!==void 0;){if(r.has(c))throw new Error(`topology: parenting ${i} under ${s.instance} closes a physical cycle`);r.add(c);const f=this.records.get(c);c=f?.parent&&f.parent.peer===this.peer?f.parent.instance:void 0}}checkRootParent(i){if(i!==null){if(Wn(i.peer,"parent peer"),Wn(i.instance,"parent instance"),i.peer===this.peer)throw new Error(`topology: the ${ht} root's parent is another host's root, not something on this host`);if(i.instance!==ht)throw new Error("topology: a host root's parent must be another host root - physical edges cross hosts only root to root")}}checkOwner(i,s){if(s!==null&&(Wn(s.peer,"owner peer"),Wn(s.instance,"owner instance"),s.peer===this.peer&&s.instance===i))throw new Error(`topology: ${i} cannot own itself`)}physicalPath(i){const s=this.options.place??[this.peer],r=[],c=new Set;let f=i;for(let p=0;p<=Jl;p++){if(f===void 0)return{segments:r,validity:{status:"valid"}};if(f===ht)return{segments:[...s,...r],validity:{status:"valid"}};if(c.has(f))return{segments:r,validity:{status:"cycle",path:[...c].map(v=>this.ref(v))}};c.add(f);const m=this.records.get(f);if(!m)return{segments:r,validity:{status:"unresolved",at:this.ref(f)}};r.unshift(f),f=m.parent===null?void 0:m.parent.peer===this.peer?m.parent.instance:ht}return{segments:r,validity:{status:"depth-exceeded",maxDepth:Jl}}}ownerChain(i){const s=[],r=new Set;let c=i;for(let f=0;f<=Jl;f++){if(c===void 0)return{chain:s,validity:{status:"valid"}};if(r.has(c))return{chain:s,validity:{status:"cycle",path:s.slice(s.findIndex(m=>m.instance===c))}};r.add(c);const p=this.records.get(c);if(!p)return{chain:s,validity:{status:"unresolved",at:this.ref(c)}};if(s.push(p.ref),p.owner===null)return{chain:s,validity:{status:"valid"}};if(p.owner.peer!==this.peer)return{chain:s,continuesAt:p.owner,validity:{status:"valid"}};c=p.owner.instance}return{chain:s,validity:{status:"depth-exceeded",maxDepth:Jl}}}externalStore(i){return{getSnapshot:()=>this.records.get(i),subscribe:s=>{let r=this.listeners.get(i);return r||this.listeners.set(i,r=new Set),r.add(s),()=>r.delete(s)}}}notify(i){for(const s of[...this.listeners.get(i)??[]])try{s()}catch{}}assertLoaded(){if(!this.loaded)throw new Error("topology: not loaded yet - await the server ready()")}async persist(){await this.store.save(this.all())}}const a1=JSON.parse('{"RpcTopologyRecord":{"kind":"object","fields":{"ref":{"type":{"kind":"ref","name":"RpcRef"}},"parent":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"owner":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"parentEpoch":{"type":{"kind":"string"}},"ownerEpoch":{"type":{"kind":"string"}},"version":{"type":{"kind":"ref","name":"RpcTopologyVersion"}},"label":{"type":{"kind":"string"},"optional":true}}},"RpcRef":{"kind":"object","fields":{"peer":{"type":{"kind":"string"}},"instance":{"type":{"kind":"string"}}}},"RpcTopologyVersion":{"kind":"object","fields":{"epoch":{"type":{"kind":"string"}},"revision":{"type":{"kind":"number"}}}},"RpcTopologyCapabilities":{"kind":"object","fields":{"authorityScope":{"type":{"kind":"literal","value":"host"}},"cycleGuarantee":{"type":{"kind":"literal","value":"detected"}},"reverseIndex":{"type":{"kind":"literal","value":"eventual"}},"deletion":{"type":{"kind":"literal","value":"tombstone"}},"durability":{"type":{"kind":"union","options":[{"kind":"literal","value":"volatile"},{"kind":"literal","value":"durable"}]}}}},"RpcTopologyPatch":{"kind":"object","fields":{"parent":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"owner":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"label":{"type":{"kind":"string"},"optional":true}}},"RpcTopologyMutation":{"kind":"object","fields":{"expectedVersion":{"type":{"kind":"ref","name":"RpcTopologyVersion"}},"reason":{"type":{"kind":"string"},"optional":true}}},"ServerDescription":{"kind":"object","fields":{"name":{"type":{"kind":"string"}},"version":{"type":{"kind":"string"},"optional":true},"validating":{"type":{"kind":"boolean"}},"namespaces":{"type":{"kind":"array","items":{"kind":"ref","name":"DescribedNamespace"}}},"host":{"type":{"kind":"object","fields":{"root":{"type":{"kind":"ref","name":"RpcRef"}},"parent":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"owner":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"place":{"type":{"kind":"array","items":{"kind":"string"}},"optional":true},"label":{"type":{"kind":"string"},"optional":true},"capabilities":{"type":{"kind":"ref","name":"RpcTopologyCapabilities"}}}},"optional":true},"types":{"type":{"kind":"record","values":{"kind":"ref","name":"TypeNode"}},"optional":true}}},"DescribedNamespace":{"kind":"object","fields":{"name":{"type":{"kind":"string"}},"version":{"type":{"kind":"string"},"optional":true},"className":{"type":{"kind":"string"},"optional":true},"created":{"type":{"kind":"boolean"}},"emitter":{"type":{"kind":"boolean"}},"serialised":{"type":{"kind":"boolean"},"optional":true},"component":{"type":{"kind":"ref","name":"DescribedComponent"},"optional":true},"topology":{"type":{"kind":"ref","name":"DescribedTopology"},"optional":true},"capabilities":{"type":{"kind":"array","items":{"kind":"string"}},"optional":true},"methods":{"type":{"kind":"array","items":{"kind":"ref","name":"DescribedMethod"}}},"events":{"type":{"kind":"array","items":{"kind":"ref","name":"DescribedEvent"}}}}},"DescribedComponent":{"kind":"object","fields":{"props":{"type":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"optional":true},"state":{"type":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"optional":true},"subscribers":{"type":{"kind":"number"}}}},"TypeNode":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"FieldNode":{"kind":"object","fields":{"type":{"type":{"kind":"ref","name":"TypeNode"}},"optional":{"type":{"kind":"boolean"},"optional":true}}},"DescribedTopology":{"kind":"object","fields":{"parent":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"owner":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"parentEpoch":{"type":{"kind":"string"}},"ownerEpoch":{"type":{"kind":"string"}},"label":{"type":{"kind":"string"},"optional":true}}},"DescribedMethod":{"kind":"object","fields":{"name":{"type":{"kind":"string"}},"params":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}},"optional":true},"paramNames":{"type":{"kind":"array","items":{"kind":"string"}},"optional":true},"rest":{"type":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"optional":true},"returns":{"type":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"optional":true},"semantics":{"type":{"kind":"union","options":[{"kind":"literal","value":"query"},{"kind":"literal","value":"idempotent-command"},{"kind":"literal","value":"non-repeatable-command"}]},"optional":true},"requiresAuthority":{"type":{"kind":"boolean"},"optional":true}}},"DescribedEvent":{"kind":"object","fields":{"name":{"type":{"kind":"string"}},"params":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}},"optional":true},"subscribers":{"type":{"kind":"number"}}}}}'),s1={msgrpc:{methods:{topology:{params:[],returns:{kind:"object",fields:{records:{type:{kind:"array",items:{kind:"ref",name:"RpcTopologyRecord"}}},place:{type:{kind:"array",items:{kind:"string"}},optional:!0},capabilities:{type:{kind:"ref",name:"RpcTopologyCapabilities"}}}},semantics:"query"},updateTopology:{params:[{kind:"string"},{kind:"ref",name:"RpcTopologyPatch"},{kind:"ref",name:"RpcTopologyMutation"}],paramNames:["instance","patch","mutation"],returns:{kind:"ref",name:"RpcTopologyRecord"},semantics:"idempotent-command"},describe:{params:[],returns:{kind:"ref",name:"ServerDescription"}}}}},l1={types:a1,namespaces:s1};var Zp=function(l,i,s){for(var r=arguments.length>2,c=0;c<i.length;c++)s=r?i[c].call(l,s):i[c].call(l);return r?s:void 0},Fl=function(l,i,s,r,c,f){function p(U){if(U!==void 0&&typeof U!="function")throw new TypeError("Function expected");return U}for(var m=r.kind,v=m==="getter"?"get":m==="setter"?"set":"value",x=!i&&l?r.static?l:l.prototype:null,N=i||(x?Object.getOwnPropertyDescriptor(x,r.name):{}),w,q=!1,Y=s.length-1;Y>=0;Y--){var ee={};for(var Z in r)ee[Z]=Z==="access"?{}:r[Z];for(var Z in r.access)ee.access[Z]=r.access[Z];ee.addInitializer=function(U){if(q)throw new TypeError("Cannot add initializers after decoration has completed");f.push(p(U||null))};var I=(0,s[Y])(m==="accessor"?{get:N.get,set:N.set}:N[v],ee);if(m==="accessor"){if(I===void 0)continue;if(I===null||typeof I!="object")throw new TypeError("Object expected");(w=p(I.get))&&(N.get=w),(w=p(I.set))&&(N.set=w),(w=p(I.init))&&c.unshift(w)}else(w=p(I))&&(m==="field"?c.unshift(w):N[v]=w)}x&&Object.defineProperty(x,r.name,N),q=!0};const Hm="msgrpc.",tn=l=>{switch(l.kind){case"ref":return{...l,name:Hm+l.name};case"array":return{...l,items:tn(l.items)};case"record":return{...l,values:tn(l.values)};case"tuple":return{...l,items:l.items.map(tn)};case"union":return{...l,options:l.options.map(tn)};case"object":return{...l,fields:Object.fromEntries(Object.entries(l.fields).map(([i,s])=>[i,{...s,type:tn(s.type)}]))};default:return l}},r1=l=>({...l,params:l.params.map(tn),...l.rest?{rest:tn(l.rest)}:{},...l.returns?{returns:tn(l.returns)}:{}}),vs=l1,Jp={namespace:{...vs.namespaces.msgrpc,methods:Object.fromEntries(Object.entries(vs.namespaces.msgrpc.methods).map(([l,i])=>[l,r1(i)])),...vs.namespaces.msgrpc.events?{events:Object.fromEntries(Object.entries(vs.namespaces.msgrpc.events).map(([l,i])=>[l,{params:i.params.map(tn)}]))}:{}},types:Object.fromEntries(Object.entries(vs.types??{}).map(([l,i])=>[Hm+l,tn(i)]))},o1=l=>l?.namespaces.msgrpc?l:{schema:a0,...l,types:{...l?.types,...Jp.types},namespaces:{...l?.namespaces,msgrpc:Jp.namespace}};let u1=(()=>{var v;let l=[mm("msgrpc")],i,s=[],r,c=[],f,p,m;return v=class{handler=Zp(this,c);constructor(N){this.handler=N}async topology(){const N=this.handler.hostTopology;if(N)return{records:N.all(),...N.place?{place:N.place}:{},capabilities:N.capabilities()}}async updateTopology(N,w,q){const Y=this.handler.hostTopology;if(!Y)throw new Error("this host keeps no topology records");if(!this.handler.allowTopologyMutation)throw new Error("this host does not accept remote topology mutation - it is enabled with topology.allowRemoteMutation, and gated by authorize() like any call");return N===ht?Y.updateHost(w,q):Y.update(N,w,q)}async describe(){const N=this.handler.manageRpc,w=this.handler.schema,q=new Set(N.createdInstances.keys()),Y=Object.entries(N.exposedNameSpaceInstances).map(([I,U])=>{const K=w?.namespaces[I],j=[...N.findNameSpaceMethodMap(I)?.keys()??[]].sort().map(re=>{const ve=K?.methods[re],Le=this.handler.semanticsOf({path:I,method:re});return{name:re,...ve?{params:ve.params,paramNames:ve.paramNames,rest:ve.rest,returns:ve.returns}:{},...Le?{semantics:Le}:{},...N.exposedAuthority[I]?.has(re)?{requiresAuthority:!0}:{}}}),C=new Set(Object.keys(K?.events??{}));for(const re of this.handler.eventProxies.values())re.instanceName===I&&C.add(re.event);C.delete(In);const L=[...C].sort().map(re=>({name:re,...K?.events?.[re]?{params:K.events[re].params}:{},subscribers:[...this.handler.eventProxies.values()].filter(ve=>ve.instanceName===I&&ve.event===re).length})),R=this.handler.hostTopology?.get(I),G=R?{parent:R.parent,owner:R.owner,parentEpoch:R.parentEpoch,ownerEpoch:R.ownerEpoch,...R.label!==void 0?{label:R.label}:{}}:void 0,te=N.exposedExecution[I],ie=U instanceof fa?{...K?.component?{props:K.component.props,state:K.component.state}:{},subscribers:[...this.handler.eventProxies.values()].filter(re=>re.instanceName===I&&re.event===In).length}:void 0;return{name:I,...K?.version?{version:K.version}:{},...te&&te!=="parallel"?{serialised:!0}:{},className:U.constructor?.name,created:q.has(I),emitter:U instanceof Bu,...ie?{component:ie}:{},...G?{topology:G}:{},...K?.capabilities?{capabilities:K.capabilities}:{},methods:j,events:L}}),ee=this.handler.hostTopology,Z=ee?.get(ht);return{name:this.handler.name,...w?.version?{version:w.version}:{},validating:!!w&&this.handler.validation!=="off",namespaces:Y.sort((I,U)=>I.name.localeCompare(U.name)),...ee&&Z?{host:{root:Z.ref,parent:Z.parent,...Z.owner?{owner:Z.owner}:{},...ee.place?{place:ee.place}:{},...Z.label!==void 0?{label:Z.label}:{},capabilities:ee.capabilities()}}:{},...w?.types?{types:w.types}:{}}}},r=v,(()=>{const N=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;f=[xs({semantics:"query"})],p=[xs({semantics:"idempotent-command"})],m=[xs],Fl(v,null,f,{kind:"method",name:"topology",static:!1,private:!1,access:{has:w=>"topology"in w,get:w=>w.topology},metadata:N},null,c),Fl(v,null,p,{kind:"method",name:"updateTopology",static:!1,private:!1,access:{has:w=>"updateTopology"in w,get:w=>w.updateTopology},metadata:N},null,c),Fl(v,null,m,{kind:"method",name:"describe",static:!1,private:!1,access:{has:w=>"describe"in w,get:w=>w.describe},metadata:N},null,c),Fl(null,i={value:r},l,{kind:"class",name:r.name,metadata:N},null,s),r=i.value,N&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:N}),Zp(r,s)})(),r})();class c1 extends ar{getTarget;targets=new Map;constructor(i,s){super("",i),this.getTarget=s}async receive(i,s,r){let c;if(this.getTarget&&(c=this.getTarget(r)),c||(c=this.targetExists(r)),c||(c=super.targetExists(r)),!c)throw this.emit(Ue.unroutable,{source:s,target:r,reason:"no switch target for this peer"}),new Error(`no route to '${r}': nothing here reaches that peer. If it has only just connected, its presence may not have arrived yet - await it before calling.`);await c.receive(i,s,r)}setTarget(i,s){const c=s===void 0?(p=>p.getName())(i):s;this.targets.set(c,i);let f=!1;return()=>{f||(f=!0,this.targets.delete(c))}}setTargets(i){for(const s of i)this.setTarget(s)}targetExists(i,s=0){let r;return this.targets.forEach(c=>{!r&&!c.isTransport()&&c.targetExists(i,s+1)&&(r=c)}),r}}class f1{rpc;caller;readyFlag=!1;switch;transports=[];peers=new fm;topology;componentChannels;componentLifecycle=new xi.EventEmitter;options={name:"*",transports:[],useMsgPack:!0,readyTimeout:3e4};constructor(i={}){this.options={...this.options,...i},this.rpc=new p0(this.options.name),this.caller=new b0(this.options.name,[],this.options.callTimeout??gm),this.switch=new c1([this.rpc,this.caller]);for(const s of[this.rpc,this.caller,this.switch])s.usePeerRegistry(this.peers);this.rpc.authorize=this.options.authorize,this.rpc.requireIdentity=this.options.requireAuthenticatedPeers??!!this.options.authenticate,this.rpc.resolveIdentity=s=>{for(const r of this.transports){const c=r.getIdentity(s);if(c)return c}},this.rpc.schema=this.options.schema,this.rpc.validation=this.options.validation??(this.options.schema?"described":"off"),this.rpc.validateResults=this.options.validateResults??!1,this.options.validateComponentSnapshots&&(this.rpc.manageRpc.componentContractFor=s=>{const r=this.rpc.schema?.namespaces[s]?.component;return r?{component:r,types:this.rpc.schema?.types}:void 0}),this.rpc.unknownVersion=this.options.unknownVersion??"allow",this.rpc.idempotency=this.options.idempotency,this.rpc.manageRpc.requireExplicitExposure=this.options.requireExplicitExposure??!1,this.options.exposeManagement&&this.rpc.manageRpc.exposeManagement(),this.options.exposeIntrospection&&(this.rpc.manageRpc.exposeClassInstance(new u1(this.rpc)),this.rpc.schema=o1(this.rpc.schema)),this.topology=new i1(this.options.name,this.options.topology),this.rpc.hostTopology=this.topology,this.rpc.allowTopologyMutation=this.options.topology?.allowRemoteMutation??!1,this.starting=this.topology.init().then(()=>this.buildTransports()).then(()=>{this.readyFlag=!0},s=>{this.initError=s}),this.init().catch(s=>{this.initError=s,this.emitSafely("initError",s)})}initError;starting=Promise.resolve();configuredTransports(){return this.options.transports}async buildTransport(i){if(i instanceof ar)return i;if(i.connect){const s=i;return new Kp(this.options.name,s.connect,[],{...s.path?{path:s.path}:{},...s.credentials?{auth:s.credentials}:{},...s.ca?{ca:s.ca}:{}},!0,s.allowInsecureTls)}}async buildTransports(){const i=Wb(this.options.useMsgPack);for(const s of this.configuredTransports()){const r=await this.buildTransport(s);if(!r)throw new Error(`RpcServer '${this.options.name}': no transport can be built from ${JSON.stringify(s)}`);r.codec=i,this.options.relay!==void 0&&"relay"in r&&(r.relay=this.options.relay),this.attach(r)}}attach(i){this.transports.push(i),i.usePeerRegistry(this.peers),i.pipe(this.rpc),i.pipe(this.caller),this.switch?.setTarget(i),i.on(Ue.peerGone,s=>this.safely("peerGone",s,()=>{this.rpc.removePeer(s),this.peers.delete(s),this.relayPresence(i,s,"offline");for(const r of this.transports){const c=r;c.stopWatchingFor&&c.stopWatchingFor(s).catch(f=>this.emitSafely("presenceError",{peer:s,error:f}))}})),i.on(Ue.peerOnline,s=>this.safely("peerOnline",s,()=>this.relayPresence(i,s,"online"))),i.on(Ue.connected,()=>{this.caller.resubscribe().catch(s=>this.emitSafely("resubscribeError",s))});for(const s of[Ue.disconnected,Ue.peerGone,Ue.peerDisplaced])i.on(s,r=>this.componentLifecycle.emit(s,r))}relayPresence(i,s,r){for(const c of this.transports){if(c===i)continue;const f=c;f.announcePeer&&f.announcePeer(s,r)}this.advertiseReachability()}advertiseReachability(){for(const i of this.transports)i instanceof Kp&&i.advertise(this.peers.names().filter(s=>s!==this.options.name&&this.peers.get(s)!==i))}emitSafely(i,s){for(const r of this.transports)r.emit(i,s)}safely(i,s,r){try{r()}catch(c){this.emitSafely("presenceError",{what:i,peer:s,error:c})}}async proxy(i,s){return await this.ready(),this.caller.proxy(i,s??"*")}async component(i,s){await this.ready(),this.componentChannels??=new x0(this.caller,this.componentLifecycle);const r=await this.componentChannels.open(i,s);return bm(r,r.inner)}async close(){await this.starting.catch(()=>{}),this.componentChannels?.closeAll(),this.caller.failPendingCalls("server closed"),this.caller.subscriptions.clear(),await this.caller.close(),await Promise.all(this.transports.map(i=>i.close())),this.transports=[],this.peers.clear()}exposeClassInstance(i,s,r){this.rpc.manageRpc.exposeClassInstance(i,s,r)}exposeClass(i,s){this.rpc.manageRpc.exposeClass(i,s)}exposeObject(i,s){this.rpc.manageRpc.exposeObject(i,s)}expose(i,s){this.rpc.manageRpc.expose(i,s)}createRpcInstance(i,s,...r){return this.rpc.manageRpc.createRpcInstance(i,s,...r)}addTarget(i,s){this.switch?.setTarget(s)}async init(){}async ready(){await this.starting;const i=()=>this.transports.filter(r=>!r.readyFlag).length==0,s=Date.now()+this.options.readyTimeout;for(;!i()||!this.readyFlag;){const r=this.transports.find(c=>c.startupError!==void 0);if(r&&(this.initError=r.startupError),this.initError!==void 0)throw new Error(`RpcServer '${this.options.name}': could not start: ${this.initError instanceof Error?this.initError.message:String(this.initError)}`,{cause:this.initError});if(this.options.readyTimeout>0&&Date.now()>s){const c=this.transports.filter(f=>!f.readyFlag).map(f=>f.getName());throw new Error(`RpcServer '${this.options.name}': transports not ready within ${this.options.readyTimeout} ms: ${c.join(", ")}`)}await new Promise(c=>setTimeout(c,10))}}async awaitPeer(i,s=5e3){const r=Date.now()+s;for(;;){if(this.peers.get(i))return!0;if(Date.now()>=r)return!1;await new Promise(c=>setTimeout(c,20))}}}const Fp="msgrpc-page-name",h1=()=>{const l=new URLSearchParams(window.location.search).get("name")?.trim();if(l)return l;let i=sessionStorage.getItem(Fp);return i||sessionStorage.setItem(Fp,i=t1("page")),i},d1=({peer:l,messages:i,onSend:s})=>{const[r,c]=Q.useState(""),[f,p]=Q.useState(null),[m,v]=Q.useState(!1),x=Q.useRef(null);Q.useEffect(()=>{x.current?.scrollIntoView({block:"end"})},[i.length]);const N=async()=>{!r.trim()||!l||(v(!0),p(await s(r.trim()).finally(()=>v(!1))??null),c(""))};return y.jsxs("div",{className:"chat",children:[y.jsxs("header",{children:[y.jsx("h1",{children:"Chat"}),y.jsx("span",{className:"muted mono",children:l??"—"})]}),!l&&y.jsx("p",{className:"muted",children:"Select a peer to talk to it. Any peer running this console can answer."}),l&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"chat-log",children:[i.length===0&&y.jsxs("p",{className:"muted",children:["Nothing yet. Say something to ",l,"."]}),i.map((w,q)=>y.jsx("div",{className:w.mine?"said mine":"said",children:y.jsx("span",{className:"text",children:w.text})},`${w.at}-${q}`)),y.jsx("div",{ref:x})]}),y.jsxs("div",{className:"chat-send",children:[y.jsx("input",{className:"control",value:r,placeholder:`say something to ${l}`,onChange:w=>c(w.target.value),onKeyDown:w=>{w.key==="Enter"&&N()}}),y.jsx("button",{className:"primary",disabled:m||!r.trim(),onClick:()=>{N()},children:m?"…":"Send"})]}),f&&y.jsx("p",{className:"muted bad",children:f})]})]})};var sm,lm,rm,oa;rm=[mm("chat")],lm=[xs],sm=[xs];class ua{constructor(i){wu(oa,5,this);mp(this,"onMessage");this.onMessage=i}async say(i,s){return this.onMessage(String(i),String(s)),"delivered"}async who(){return{app:"source-rpc console",kind:"browser page"}}}oa=dp(null),Yl(oa,1,"say",lm,ua),Yl(oa,1,"who",sm,ua),ua=Yl(oa,0,"ChatService",rm,ua),wu(oa,1,ua);const p1=1,m1={chat:{methods:{say:{params:[{kind:"string"},{kind:"string"}],paramNames:["from","text"],returns:{kind:"string"}},who:{params:[],returns:{kind:"object",fields:{app:{type:{kind:"string"}},kind:{type:{kind:"string"}}}}}}}},y1={schema:p1,namespaces:m1},g1=l=>{if(typeof l!="object"||l===null||Array.isArray(l))return null;const i=l;return!("value"in i)||!("quality"in i)&&!("unit"in i)&&!("forced"in i)?null:{value:i.value,quality:typeof i.quality=="string"?i.quality:void 0,unit:typeof i.unit=="string"?i.unit:void 0,forced:i.forced===!0}},Wp=l=>typeof l=="string"?l:JSON.stringify(l)??"undefined",Ip=({name:l,value:i})=>{const s=g1(i);return y.jsxs("div",{className:"value-row",children:[y.jsx("span",{className:"value-name mono",children:l}),s?y.jsxs("span",{className:"value mono",children:[Wp(s.value),s.unit&&y.jsxs("span",{className:"unit",children:[" ",s.unit]})]}):y.jsx("span",{className:"value mono",children:Wp(i)}),s?.forced&&y.jsx("span",{className:"quality forced",children:"forced"}),s?.quality&&y.jsx("span",{className:`quality q-${s.quality}`,children:s.quality})]})},v1=({peer:l,namespace:i,component:s,server:r,onSubscribed:c})=>{const[f,p]=Q.useState(null),[m,v]=Q.useState(null),[x,N]=Q.useState(!1),w=Q.useCallback(U=>f?f.subscribe(U):()=>{},[f]),q=Q.useCallback(()=>f?.getSnapshot()??null,[f]),Y=Q.useSyncExternalStore(w,q);Q.useEffect(()=>()=>{f?.close()},[f]);const ee=async()=>{const U=r.current;if(U){N(!0),v(null);try{const K=await U.component(i,l);p(K[vm]),c?.()}catch(K){v(K.message??String(K))}finally{N(!1)}}},Z=()=>{p(null),c?.()},I=Y?.status==="stale";return y.jsxs("div",{className:`component${I?" stale":""}`,children:[y.jsxs("div",{className:"component-head",children:[y.jsx("span",{className:"comp-label",children:"component"}),Y&&y.jsx("span",{className:`status-badge ${Y.status}`,children:Y.status}),Y&&Y.receivedAt>0&&y.jsxs("span",{className:"muted",children:["rev ",Y.revision," ·"," ",I&&Y.staleSince?`last known ${new Date(Y.receivedAt).toLocaleTimeString()}, stale since ${new Date(Y.staleSince).toLocaleTimeString()}`:`updated ${new Date(Y.receivedAt).toLocaleTimeString()}`]}),y.jsxs("span",{className:"muted",children:[s.subscribers," observer",s.subscribers===1?"":"s"]}),!f&&y.jsx("button",{className:"toggle",onClick:()=>{ee()},disabled:x,children:x?"observing…":"observe"}),f&&y.jsx("button",{className:"toggle on",onClick:Z,children:"stop"})]}),m&&y.jsx("p",{className:"component-error",children:m}),!f&&!m&&y.jsx("p",{className:"muted",children:"Cached props and state, read without a call. Observe to subscribe."}),f&&Y&&Y.receivedAt>0&&y.jsxs("div",{className:"component-body",children:[y.jsxs("div",{className:"value-table",children:[y.jsx("h4",{children:"props"}),Object.entries(Y.props).map(([U,K])=>y.jsx(Ip,{name:U,value:K},U)),Object.keys(Y.props).length===0&&y.jsx("p",{className:"muted",children:"empty"})]}),y.jsxs("div",{className:"value-table",children:[y.jsx("h4",{children:"state"}),Object.entries(Y.state).map(([U,K])=>y.jsx(Ip,{name:U,value:K},U)),Object.keys(Y.state).length===0&&y.jsx("p",{className:"muted",children:"empty"})]})]})]})},Pp=(l,i)=>l.peer===i?l.instance:`${l.peer}/${l.instance}`,b1=({owner:l,home:i,peers:s,onSelectPeer:r})=>l.peer!==i&&s.includes(l.peer)?y.jsxs("button",{className:"owner-chip link",onClick:()=>r(l.peer),title:`owned by ${l.peer}/${l.instance} - select that peer`,children:["⤳ ",Pp(l,i)]}):y.jsxs("span",{className:"owner-chip",title:"logical owner",children:["⤳ ",Pp(l,i)]}),Ym=({namespace:l,childrenOf:i,home:s,peers:r,onSelectPeer:c})=>y.jsxs("li",{children:[y.jsxs("span",{className:"node",children:[y.jsx("span",{className:"mono",children:l.name}),l.topology?.label&&y.jsx("span",{className:"node-label",children:l.topology.label}),l.topology?.owner&&y.jsx(b1,{owner:l.topology.owner,home:s,peers:r,onSelectPeer:c})]}),i(l.name).length>0&&y.jsx("ul",{children:i(l.name).map(f=>y.jsx(Ym,{namespace:f,childrenOf:i,home:s,peers:r,onSelectPeer:c},f.name))})]}),S1=({description:l,peers:i,onSelectPeer:s})=>{const r=l.name,c=l.namespaces.filter(x=>x.topology);if(!l.host&&c.length===0)return null;const f=new Set,p=x=>f.has(x)?[]:(f.add(x),c.filter(N=>N.topology.parent?.instance===x&&N.topology.parent?.peer===r)),m=c.filter(x=>x.topology.parent===null||x.topology.parent.instance==="$host"),v=l.host?.place?.join(" / ")??r;return y.jsxs("div",{className:"structure",children:[y.jsxs("div",{className:"structure-head",children:[y.jsx("span",{className:"comp-label",children:"structure"}),y.jsx("span",{className:"mono",children:v}),l.host?.label&&y.jsx("span",{className:"node-label",children:l.host.label}),l.host?.parent&&y.jsxs("span",{className:"muted",children:["attached under"," ",i.includes(l.host.parent.peer)?y.jsx("button",{className:"owner-chip link",onClick:()=>s(l.host.parent.peer),children:l.host.parent.peer}):y.jsx("span",{className:"mono",children:l.host.parent.peer})]}),l.host&&y.jsxs("span",{className:"muted",title:"which topology guarantees this host actually offers",children:[l.host.capabilities.durability," · cycles ",l.host.capabilities.cycleGuarantee]})]}),m.length===0&&y.jsx("p",{className:"muted",children:"Nothing declares a place on this host yet."}),m.length>0&&y.jsx("ul",{className:"tree",children:m.map(x=>y.jsx(Ym,{namespace:x,childrenOf:p,home:r,peers:i,onSelectPeer:s},x.name))})]})},$m=()=>new URL(".",document.baseURI),x1="console.json",w1=async()=>{const l=await fetch(new URL(x1,$m()));if(!l.ok)throw new Error(`the console did not say who it is (${l.status})`);return(await l.json()).name},E1=()=>`${$m().pathname}socket.io`,da=(l,i)=>l?.kind==="ref"?da(i?.[l.name],i):l,nn=l=>{if(!l)return"unknown";switch(l.kind){case"literal":return JSON.stringify(l.value);case"array":return`${nn(l.items)}[]`;case"tuple":return`[${l.items.map(nn).join(", ")}]`;case"union":return l.options.map(nn).join(" | ");case"ref":return l.name;case"object":return`{ ${Object.entries(l.fields).map(([i,s])=>`${i}${s.optional?"?":""}: ${nn(s.type)}`).join(", ")} }`;case"record":return`{ [key: string]: ${nn(l.values)} }`;case"number":return l.min!==void 0||l.max!==void 0?`number(${l.min??""}..${l.max??""})`:"number";default:return l.kind}},tr=l=>l?.kind==="any"||l?.kind==="union"&&l.options.some(i=>i.kind==="literal"&&i.value===null),wi=l=>{if(l?.kind!=="union")return l;const i=l.options.filter(s=>!(s.kind==="literal"&&s.value===null));return i.length===1?i[0]:{...l,options:i}},ir=l=>{if(l?.kind!=="union")return;const i=l.options.filter(s=>s.kind==="literal").map(s=>s.value);return i.length===l.options.length&&i.length>0?i:void 0},Xm=l=>{const i=l.replace(/[\s:]/g,"");if(i.length%2)throw new Error("expected an even number of hex digits");if(i&&!/^[0-9a-fA-F]+$/.test(i))throw new Error("expected hex digits");return Uint8Array.from(i.match(/../g)?.map(s=>parseInt(s,16))??[])},T1=l=>l.options.find(i=>!(i.kind==="literal"&&i.value===null))??l.options[0],nr=(l,i,s=0)=>{const r=da(wi(l),i);if(!r||s>4)return null;switch(r.kind){case"number":return r.min??0;case"string":case"bytes":return"";case"boolean":return!1;case"date":return new Date;case"literal":return r.value;case"array":return[];case"record":return{};case"tuple":return r.items.map(c=>nr(c,i,s+1));case"union":return nr(T1(r),i,s+1);case"object":return Object.fromEntries(Object.entries(r.fields).filter(([,c])=>!c.optional).map(([c,f])=>[c,nr(f.type,i,s+1)]));default:return null}},ca=(l,i,s,r=0)=>{const c=da(i,s);if(!c||l===null||l===void 0||r>8)return l;switch(c.kind){case"date":return typeof l=="string"||typeof l=="number"?new Date(l):l;case"bytes":return typeof l=="string"?Xm(l):l;case"array":return Array.isArray(l)?l.map(f=>ca(f,c.items,s,r+1)):l;case"tuple":return Array.isArray(l)?l.map((f,p)=>ca(f,c.items[p],s,r+1)):l;case"object":return typeof l!="object"||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).map(([f,p])=>[f,ca(p,c.fields[f]?.type,s,r+1)]));case"record":return typeof l!="object"||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).map(([f,p])=>[f,ca(p,c.values,s,r+1)]));case"union":{const f=c.options.filter(p=>!(p.kind==="literal"&&p.value===null));return f.length===1?ca(l,f[0],s,r+1):l}default:return l}},k1=(l,i,s)=>{const r=da(wi(i),s),c=l.trim();switch(r?.kind){case"number":{if(c==="")throw new Error("expected a number");const f=Number(c);if(Number.isNaN(f))throw new Error(`${c} is not a number`);return f}case"boolean":return c==="true";case"string":return l;case"date":{const f=new Date(c);if(Number.isNaN(f.getTime()))throw new Error("expected a date");return f}case"bytes":return Xm(c);case"literal":return r.value;default:{if(ir(r)){const p=ir(r).find(m=>String(m)===c);if(p!==void 0)return p}if(c==="")return;let f;try{f=JSON.parse(c)}catch{throw new Error("expected JSON")}return ca(f,wi(i),s)}}},_1=(l,i)=>{const s=da(wi(l),i),r=ir(s);if(r)return String(r[0]);switch(s?.kind){case"number":return String(s.min??0);case"boolean":return"false";case"date":return new Date().toISOString().slice(0,16);case"array":return"[]";case"record":return"{}";case"tuple":case"object":return JSON.stringify(nr(s,i),null,2);default:return""}},A1=({name:l,type:i,types:s,state:r,onChange:c})=>{const f=tr(i),p=da(wi(i),s),m=ir(p),v=w=>c({...r,text:w}),x=f&&!r.include,N=()=>{if(m)return y.jsx("select",{className:"control",value:r.text,disabled:x,onChange:w=>v(w.target.value),children:m.map(w=>y.jsx("option",{value:String(w),children:String(w)},String(w)))});switch(p?.kind){case"boolean":return y.jsxs("label",{className:"checkbox",children:[y.jsx("input",{type:"checkbox",checked:r.text==="true",disabled:x,onChange:w=>v(String(w.target.checked))}),y.jsx("span",{children:r.text==="true"?"true":"false"})]});case"number":return y.jsx("input",{className:"control",type:"number",value:r.text,disabled:x,min:p.min,max:p.max,step:p.integer?1:"any",onChange:w=>v(w.target.value)});case"date":return y.jsx("input",{className:"control",type:"datetime-local",value:r.text,disabled:x,onChange:w=>v(w.target.value)});case"string":return y.jsx("input",{className:"control",type:"text",value:r.text,disabled:x,onChange:w=>v(w.target.value)});case"bytes":return y.jsx("input",{className:"control mono",type:"text",placeholder:"hex, e.g. 01 ff 2a",value:r.text,disabled:x,onChange:w=>v(w.target.value)});default:return y.jsx("textarea",{className:"control mono",rows:Math.min(12,Math.max(2,r.text.split(`
|
|
2058
|
-
`).length)),placeholder:"JSON",value:
|
|
2057
|
+
`));ou.length;const fw=r=>{const i=new Uint32Array(r);return crypto.getRandomValues(i),[...i].map(a=>a%ou.length)},hw=(r=3)=>fw(r).map(i=>ou[i]).join("-"),dw=(r,i=3)=>`${r}-${hw(i)}`,Wp=128;class pw{local;peer;caller;chains=new Map;constructor(i,a,l,u){this.local=i,this.peer=a,this.caller=l,i.on("contextChanged",()=>{for(const f of this.chains.values())f.localChanged()}),u.on(Ae.disconnected,()=>{for(const f of this.chains.values())f.markStale()});for(const f of[Ae.peerGone,Ae.peerDisplaced])u.on(f,d=>{for(const m of this.chains.values())m.peerLost(String(d))});u.on(Ae.connected,()=>{for(const f of this.chains.values())f.reconnect()})}store(i,a){let l=this.chains.get(i);return l||this.chains.set(i,l=new mw(this,i,()=>this.chains.delete(i))),l.storeFor(a)}require(i,a){const l=this.store(i,a).getSnapshot();if(l.status==="invalid")throw new Error(`context: ${a.id} at ${i} is invalid (${l.invalidReason}) - topology-dependent decisions fail closed`);if(l.status==="missing")throw new Error(`context: nothing provides ${a.id} on ${i}'s ${a.axis} chain`);if(l.status==="stale"&&(a.stalePolicy??"allow")==="reject")throw new Error(`context: ${a.id} at ${i} is stale, and this token rejects stale answers`);if(l.status!=="live"&&l.status!=="stale")throw new Error(`context: ${a.id} at ${i} is still ${l.status}`);const u=l.entry??l.entries?.[0];if(!u)throw new Error(`context: nothing provides ${a.id} on ${i}'s ${a.axis} chain`);return u.value}capture(i,a){return o0({peer:this.peer,instance:i},a.map(l=>{const u=this.store(i,l).getSnapshot(),f=u.entry??u.entries?.[0];return{token:l,...f&&(u.status==="live"||u.status==="stale")?{entry:{tokenId:l.id,schemaVersion:l.schemaVersion,axis:l.axis,provider:f.provider,providerVersion:f.providerVersion,mountEpoch:u.mountEpoch,value:f.value}}:{}}}))}}class mw{resolver;node;release;tokens=new Map;hops={physical:[],logical:[]};localSnapshot;retired=new Set;cycles={};mountKeys={};mountEpochs={};reasons={};constructor(i,a,l){this.resolver=i,this.node=a,this.release=l}storeFor(i){let a=this.tokens.get(i.id);a||(a={token:i,view:{tokenId:i.id,axis:i.axis,status:"initializing",mountEpoch:"",resolvedAt:0,transitionReason:"initial-load"},listeners:new Set,users:0},this.tokens.set(i.id,a),this.localChanged()),a.users++;const l=a;return{getSnapshot:()=>l.view,subscribe:u=>(l.listeners.add(u),()=>l.listeners.delete(u)),close:()=>{if(l.users--,!(l.users>0)&&(l.view={...l.view,status:"closed"},this.notify(l),this.tokens.delete(l.token.id),this.tokens.size===0)){for(const u of["physical","logical"])this.retireFrom(u,0);this.release()}}}}localChanged(){this.localSnapshot=this.resolver.local.snapshotFor(this.node,[...this.tokens.keys()],0,!1),this.rebuild("physical"),this.rebuild("logical");for(const i of["physical","logical"])for(const a of this.hops[i])a.retired||(a.peer===this.resolver.peer||a.tokenKey!==this.tokensFor(i).join(","))&&this.open(a);this.recompute()}markStale(){for(const i of["physical","logical"])for(const a of this.hops[i])a.stale=!0;this.recompute()}peerLost(i){for(const a of["physical","logical"])for(const l of this.hops[a])l.peer===i&&(l.stale=!0);this.recompute()}reconnect(){for(const i of["physical","logical"])for(const a of this.hops[i])a.stale&&!a.retired&&(this.reasons[i]="reconnect",this.open(a))}rebuild(i){const a=this.hops[i];this.cycles[i]=void 0;let l=[...this.localSnapshot?.walked[i]??[]],u=this.localSnapshot?.continues[i],f=0;for(;u;){const d=u,m=l.findIndex(A=>jp(A,d));if(m!==-1){this.cycles[i]=l.slice(m),this.retireFrom(i,f);return}const y=a[f];if(y&&y.peer===u.peer&&y.node===u.instance){y.snapshot&&(l=[...l,...y.snapshot.walked[i]]),u=y.snapshot?.continues[i],f++;continue}this.retireFrom(i,f);const b={peer:u.peer,node:u.instance,axis:i,subscriptionId:tt(),stale:!1,retired:!1};a[f]=b,this.open(b),u=void 0,f++}this.retireFrom(i,f)}retireFrom(i,a){const l=this.hops[i];for(const u of l.splice(a)){u.retired=!0,this.retired.add(u.subscriptionId),u.detach?.();const f=this.resolver.caller.proxy(Sa,u.peer);Promise.resolve(f.unsubscribe(u.subscriptionId)).catch(()=>{})}}tokensFor(i){return[...this.tokens.values()].filter(a=>a.token.axis===i).map(a=>a.token.id)}async open(i){if(i.tokenKey=this.tokensFor(i.axis).join(","),i.peer===this.resolver.peer){this.accept(i,this.resolver.local.snapshotFor(i.node,this.tokensFor(i.axis),0,!1));return}const a=this.resolver.caller.eventEmitter;if(!i.detach){const l=Il(i.peer,Sa,Sm),u=f=>{const d=f;d.subscriptionId!==i.subscriptionId||i.retired||i.snapshot&&d.snapshot.seq<=i.snapshot.seq||this.accept(i,d.snapshot)};a.on(l,u),i.detach=()=>{a.removeListener(l,u)}}try{const u=await this.resolver.caller.proxy(Sa,i.peer).subscribe(i.subscriptionId,i.node,this.tokensFor(i.axis));if(i.retired)return;i.stale=!1,this.accept(i,u)}catch{i.retired||(i.stale=!0,this.recompute(),setTimeout(()=>{!i.retired&&i.stale&&this.open(i)},2e3).unref?.())}}accept(i,a){const l=!i.snapshot||!jp(i.snapshot.continues[i.axis]??null,a.continues[i.axis]??null);i.snapshot=a,i.stale=!1,l&&this.rebuild(i.axis),this.recompute()}recompute(){for(const i of this.tokens.values()){const a=i.token.axis,l=this.hops[a],u=[...this.localSnapshot?[this.localSnapshot]:[],...l.flatMap(O=>O.snapshot?[O.snapshot]:[])],f=u.map(O=>O.chainKey[a]).join(" ")+" "+l.map(O=>O.subscriptionId).join(" ");let d=!1;this.mountKeys[a]!==f&&(this.mountKeys[a]!==void 0&&this.reasons[a]!=="reconnect"&&(this.reasons[a]=a==="logical"?"owner-remount":"parent-remount"),this.mountKeys[a]=f,this.mountEpochs[a]=tt(),d=!0);const m=this.mountEpochs[a]??"",y=this.reasons[a]??"initial-load",b=u.flatMap(O=>O.trouble.filter(j=>j.axis===a)),A=l.some(O=>!O.snapshot&&!O.retired),x=l.some(O=>O.stale&&!O.retired),q=u.flatMap(O=>O.walked[a]),L=this.cycles[a],K=u.flatMap(O=>(O.tokens.find(j=>j.tokenId===i.token.id)?.entries??[]).filter(j=>j.axis===a).map(j=>({value:j.value,provider:j.node,providerVersion:j.provider}))),Z=!A&&!x,F=d&&(i.view.entry||i.view.entries)?{previous:i.view.entry??i.view.entries}:i.view.previous?{previous:i.view.previous}:{};let z;const G={tokenId:i.token.id,axis:a,mountEpoch:m,resolvedAt:Date.now(),transitionReason:y,...F};if(b.length||L||q.length>Wp){const O=b[0];z={...G,status:"invalid",invalidReason:L?"cycle":q.length>Wp?"depth-exceeded":O.status==="cycle"?"cycle":O.status,...L?{invalidPath:L}:O?.path?{invalidPath:O.path}:{}}}else if(A)z={...G,status:"initializing"};else if(K.length===0)z={...G,status:x?"stale":"missing",...x?{staleSince:i.view.staleSince??Date.now()}:{}};else{const O=i.token.resolution??"nearest";z={...G,status:x?"stale":"live",...x?{staleSince:i.view.staleSince??Date.now()}:{},...O==="nearest"?{entry:K[0]}:{entries:K}}}z.status==="stale"&&!z.entry&&!z.entries&&(i.view.entry||i.view.entries)&&(z={...z,...i.view.entry?{entry:i.view.entry}:{},...i.view.entries?{entries:i.view.entries}:{}}),Z&&z.status==="live"&&(this.reasons[a]=void 0),JSON.stringify({...i.view,resolvedAt:0})!==JSON.stringify({...z,resolvedAt:0})&&(i.view=z,this.notify(i))}}notify(i){for(const a of[...i.listeners])try{a()}catch{}}}const yw=JSON.parse('{"RpcTopologyRecord":{"kind":"object","fields":{"ref":{"type":{"kind":"ref","name":"RpcRef"}},"parent":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"owner":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"parentEpoch":{"type":{"kind":"string"}},"ownerEpoch":{"type":{"kind":"string"}},"version":{"type":{"kind":"ref","name":"RpcTopologyVersion"}},"label":{"type":{"kind":"string"},"optional":true}}},"RpcRef":{"kind":"object","fields":{"peer":{"type":{"kind":"string"}},"instance":{"type":{"kind":"string"}}}},"RpcTopologyVersion":{"kind":"object","fields":{"epoch":{"type":{"kind":"string"}},"revision":{"type":{"kind":"number"}}}},"RpcTopologyCapabilities":{"kind":"object","fields":{"authorityScope":{"type":{"kind":"literal","value":"host"}},"cycleGuarantee":{"type":{"kind":"literal","value":"detected"}},"reverseIndex":{"type":{"kind":"literal","value":"eventual"}},"deletion":{"type":{"kind":"literal","value":"tombstone"}},"durability":{"type":{"kind":"union","options":[{"kind":"literal","value":"volatile"},{"kind":"literal","value":"durable"}]}}}},"RpcTopologyPatch":{"kind":"object","fields":{"parent":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"owner":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"label":{"type":{"kind":"string"},"optional":true}}},"RpcTopologyMutation":{"kind":"object","fields":{"expectedVersion":{"type":{"kind":"ref","name":"RpcTopologyVersion"}},"reason":{"type":{"kind":"string"},"optional":true}}},"ServerDescription":{"kind":"object","fields":{"name":{"type":{"kind":"string"}},"version":{"type":{"kind":"string"},"optional":true},"validating":{"type":{"kind":"boolean"}},"namespaces":{"type":{"kind":"array","items":{"kind":"ref","name":"DescribedNamespace"}}},"host":{"type":{"kind":"object","fields":{"root":{"type":{"kind":"ref","name":"RpcRef"}},"parent":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"owner":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"place":{"type":{"kind":"array","items":{"kind":"string"}},"optional":true},"label":{"type":{"kind":"string"},"optional":true},"capabilities":{"type":{"kind":"ref","name":"RpcTopologyCapabilities"}}}},"optional":true},"types":{"type":{"kind":"record","values":{"kind":"ref","name":"TypeNode"}},"optional":true}}},"DescribedNamespace":{"kind":"object","fields":{"name":{"type":{"kind":"string"}},"version":{"type":{"kind":"string"},"optional":true},"className":{"type":{"kind":"string"},"optional":true},"created":{"type":{"kind":"boolean"}},"emitter":{"type":{"kind":"boolean"}},"serialised":{"type":{"kind":"boolean"},"optional":true},"component":{"type":{"kind":"ref","name":"DescribedComponent"},"optional":true},"topology":{"type":{"kind":"ref","name":"DescribedTopology"},"optional":true},"capabilities":{"type":{"kind":"array","items":{"kind":"string"}},"optional":true},"methods":{"type":{"kind":"array","items":{"kind":"ref","name":"DescribedMethod"}}},"events":{"type":{"kind":"array","items":{"kind":"ref","name":"DescribedEvent"}}}}},"DescribedComponent":{"kind":"object","fields":{"props":{"type":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"optional":true},"state":{"type":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"optional":true},"subscribers":{"type":{"kind":"number"}}}},"TypeNode":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"FieldNode":{"kind":"object","fields":{"type":{"type":{"kind":"ref","name":"TypeNode"}},"optional":{"type":{"kind":"boolean"},"optional":true}}},"DescribedTopology":{"kind":"object","fields":{"parent":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"owner":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"ref","name":"RpcRef"}]},"optional":true},"parentEpoch":{"type":{"kind":"string"}},"ownerEpoch":{"type":{"kind":"string"}},"label":{"type":{"kind":"string"},"optional":true}}},"DescribedMethod":{"kind":"object","fields":{"name":{"type":{"kind":"string"}},"params":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}},"optional":true},"paramNames":{"type":{"kind":"array","items":{"kind":"string"}},"optional":true},"rest":{"type":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"optional":true},"returns":{"type":{"kind":"union","options":[{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"any"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"null"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"boolean"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"number"}},"integer":{"type":{"kind":"boolean"},"optional":true},"min":{"type":{"kind":"number"},"optional":true},"max":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"string"}},"pattern":{"type":{"kind":"string"},"optional":true},"minLength":{"type":{"kind":"number"},"optional":true},"maxLength":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"bytes"}},"maxBytes":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"date"}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"literal"}},"value":{"type":{"kind":"union","options":[{"kind":"null"},{"kind":"string"},{"kind":"number"},{"kind":"literal","value":false},{"kind":"literal","value":true}]},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"array"}},"items":{"type":{"kind":"ref","name":"TypeNode"}},"maxItems":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"tuple"}},"items":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"object"}},"fields":{"type":{"kind":"record","values":{"kind":"ref","name":"FieldNode"}}},"additional":{"type":{"kind":"boolean"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"record"}},"values":{"type":{"kind":"ref","name":"TypeNode"}},"keyPattern":{"type":{"kind":"string"},"optional":true},"maxEntries":{"type":{"kind":"number"},"optional":true}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"union"}},"options":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}}}}},{"kind":"object","fields":{"kind":{"type":{"kind":"literal","value":"ref"}},"name":{"type":{"kind":"string"}}}}]},"optional":true},"semantics":{"type":{"kind":"union","options":[{"kind":"literal","value":"query"},{"kind":"literal","value":"idempotent-command"},{"kind":"literal","value":"non-repeatable-command"}]},"optional":true},"requiresAuthority":{"type":{"kind":"boolean"},"optional":true}}},"DescribedEvent":{"kind":"object","fields":{"name":{"type":{"kind":"string"}},"params":{"type":{"kind":"array","items":{"kind":"ref","name":"TypeNode"}},"optional":true},"subscribers":{"type":{"kind":"number"}}}}}'),gw={msgrpc:{methods:{topology:{params:[],returns:{kind:"object",fields:{records:{type:{kind:"array",items:{kind:"ref",name:"RpcTopologyRecord"}}},place:{type:{kind:"array",items:{kind:"string"}},optional:!0},capabilities:{type:{kind:"ref",name:"RpcTopologyCapabilities"}}}},semantics:"query"},updateTopology:{params:[{kind:"string"},{kind:"ref",name:"RpcTopologyPatch"},{kind:"ref",name:"RpcTopologyMutation"}],paramNames:["instance","patch","mutation"],returns:{kind:"ref",name:"RpcTopologyRecord"},semantics:"idempotent-command"},describe:{params:[],returns:{kind:"ref",name:"ServerDescription"}}}}},vw={types:yw,namespaces:gw};var Ip=function(r,i,a){for(var l=arguments.length>2,u=0;u<i.length;u++)a=l?i[u].call(r,a):i[u].call(r);return l?a:void 0},Wl=function(r,i,a,l,u,f){function d(z){if(z!==void 0&&typeof z!="function")throw new TypeError("Function expected");return z}for(var m=l.kind,y=m==="getter"?"get":m==="setter"?"set":"value",b=!i&&r?l.static?r:r.prototype:null,A=i||(b?Object.getOwnPropertyDescriptor(b,l.name):{}),x,q=!1,L=a.length-1;L>=0;L--){var K={};for(var Z in l)K[Z]=Z==="access"?{}:l[Z];for(var Z in l.access)K.access[Z]=l.access[Z];K.addInitializer=function(z){if(q)throw new TypeError("Cannot add initializers after decoration has completed");f.push(d(z||null))};var F=(0,a[L])(m==="accessor"?{get:A.get,set:A.set}:A[y],K);if(m==="accessor"){if(F===void 0)continue;if(F===null||typeof F!="object")throw new TypeError("Object expected");(x=d(F.get))&&(A.get=x),(x=d(F.set))&&(A.set=x),(x=d(F.init))&&u.unshift(x)}else(x=d(F))&&(m==="field"?u.unshift(x):A[y]=x)}b&&Object.defineProperty(b,l.name,A),q=!0};const Qm="msgrpc.",tn=r=>{switch(r.kind){case"ref":return{...r,name:Qm+r.name};case"array":return{...r,items:tn(r.items)};case"record":return{...r,values:tn(r.values)};case"tuple":return{...r,items:r.items.map(tn)};case"union":return{...r,options:r.options.map(tn)};case"object":return{...r,fields:Object.fromEntries(Object.entries(r.fields).map(([i,a])=>[i,{...a,type:tn(a.type)}]))};default:return r}},bw=r=>({...r,params:r.params.map(tn),...r.rest?{rest:tn(r.rest)}:{},...r.returns?{returns:tn(r.returns)}:{}}),va=vw,Pp={namespace:{...va.namespaces.msgrpc,methods:Object.fromEntries(Object.entries(va.namespaces.msgrpc.methods).map(([r,i])=>[r,bw(i)])),...va.namespaces.msgrpc.events?{events:Object.fromEntries(Object.entries(va.namespaces.msgrpc.events).map(([r,i])=>[r,{params:i.params.map(tn)}]))}:{}},types:Object.fromEntries(Object.entries(va.types??{}).map(([r,i])=>[Qm+r,tn(i)]))},ww=r=>r?.namespaces.msgrpc?r:{schema:y0,...r,types:{...r?.types,...Pp.types},namespaces:{...r?.namespaces,msgrpc:Pp.namespace}};let xw=(()=>{var y;let r=[bm("msgrpc")],i,a=[],l,u=[],f,d,m;return y=class{handler=Ip(this,u);constructor(A){this.handler=A}async topology(){const A=this.handler.hostTopology;if(A)return{records:A.all(),...A.place?{place:A.place}:{},capabilities:A.capabilities()}}async updateTopology(A,x,q){const L=this.handler.hostTopology;if(!L)throw new Error("this host keeps no topology records");if(!this.handler.allowTopologyMutation)throw new Error("this host does not accept remote topology mutation - it is enabled with topology.allowRemoteMutation, and gated by authorize() like any call");return A===dt?L.updateHost(x,q):L.update(A,x,q)}async describe(){const A=this.handler.manageRpc,x=this.handler.schema,q=new Set(A.createdInstances.keys()),L=Object.entries(A.exposedNameSpaceInstances).map(([F,z])=>{const G=x?.namespaces[F],O=[...A.findNameSpaceMethodMap(F)?.keys()??[]].sort().map(re=>{const ve=G?.methods[re],Le=this.handler.semanticsOf({path:F,method:re});return{name:re,...ve?{params:ve.params,paramNames:ve.paramNames,rest:ve.rest,returns:ve.returns}:{},...Le?{semantics:Le}:{},...A.exposedAuthority[F]?.has(re)?{requiresAuthority:!0}:{}}}),j=new Set(Object.keys(G?.events??{}));for(const re of this.handler.eventProxies.values())re.instanceName===F&&j.add(re.event);j.delete(In);const H=[...j].sort().map(re=>({name:re,...G?.events?.[re]?{params:G.events[re].params}:{},subscribers:[...this.handler.eventProxies.values()].filter(ve=>ve.instanceName===F&&ve.event===re).length})),C=this.handler.hostTopology?.get(F),Q=C?{parent:C.parent,owner:C.owner,parentEpoch:C.parentEpoch,ownerEpoch:C.ownerEpoch,...C.label!==void 0?{label:C.label}:{}}:void 0,ne=A.exposedExecution[F],se=z instanceof fs?{...G?.component?{props:G.component.props,state:G.component.state}:{},subscribers:[...this.handler.eventProxies.values()].filter(re=>re.instanceName===F&&re.event===In).length}:void 0;return{name:F,...G?.version?{version:G.version}:{},...ne&&ne!=="parallel"?{serialised:!0}:{},className:z.constructor?.name,created:q.has(F),emitter:z instanceof qc,...se?{component:se}:{},...Q?{topology:Q}:{},...G?.capabilities?{capabilities:G.capabilities}:{},methods:O,events:H}}),K=this.handler.hostTopology,Z=K?.get(dt);return{name:this.handler.name,...x?.version?{version:x.version}:{},validating:!!x&&this.handler.validation!=="off",namespaces:L.sort((F,z)=>F.name.localeCompare(z.name)),...K&&Z?{host:{root:Z.ref,parent:Z.parent,...Z.owner?{owner:Z.owner}:{},...K.place?{place:K.place}:{},...Z.label!==void 0?{label:Z.label}:{},capabilities:K.capabilities()}}:{},...x?.types?{types:x.types}:{}}}},l=y,(()=>{const A=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;f=[xa({semantics:"query"})],d=[xa({semantics:"idempotent-command"})],m=[xa],Wl(y,null,f,{kind:"method",name:"topology",static:!1,private:!1,access:{has:x=>"topology"in x,get:x=>x.topology},metadata:A},null,u),Wl(y,null,d,{kind:"method",name:"updateTopology",static:!1,private:!1,access:{has:x=>"updateTopology"in x,get:x=>x.updateTopology},metadata:A},null,u),Wl(y,null,m,{kind:"method",name:"describe",static:!1,private:!1,access:{has:x=>"describe"in x,get:x=>x.describe},metadata:A},null,u),Wl(null,i={value:l},r,{kind:"class",name:l.name,metadata:A},null,a),l=i.value,A&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:A}),Ip(l,a)})(),l})();class Sw extends lr{getTarget;targets=new Map;constructor(i,a){super("",i),this.getTarget=a}async receive(i,a,l){let u;if(this.getTarget&&(u=this.getTarget(l)),u||(u=this.targetExists(l)),u||(u=super.targetExists(l)),!u)throw this.emit(Ae.unroutable,{source:a,target:l,reason:"no switch target for this peer"}),new Error(`no route to '${l}': nothing here reaches that peer. If it has only just connected, its presence may not have arrived yet - await it before calling.`);await u.receive(i,a,l)}setTarget(i,a){const u=a===void 0?(d=>d.getName())(i):a;this.targets.set(u,i);let f=!1;return()=>{f||(f=!0,this.targets.delete(u))}}setTargets(i){for(const a of i)this.setTarget(a)}targetExists(i,a=0){let l;return this.targets.forEach(u=>{!l&&!u.isTransport()&&u.targetExists(i,a+1)&&(l=u)}),l}}class Ew{rpc;caller;readyFlag=!1;switch;transports=[];peers=new mm;topology;context;contextResolver;componentChannels;componentLifecycle=new ei.EventEmitter;options={name:"*",transports:[],useMsgPack:!0,readyTimeout:3e4};constructor(i={}){this.options={...this.options,...i},this.rpc=new _0(this.options.name),this.caller=new z0(this.options.name,[],this.options.callTimeout??km),this.switch=new Sw([this.rpc,this.caller]);for(const a of[this.rpc,this.caller,this.switch])a.usePeerRegistry(this.peers);this.rpc.authorize=this.options.authorize,this.rpc.requireIdentity=this.options.requireAuthenticatedPeers??!!this.options.authenticate,this.rpc.resolveIdentity=a=>{for(const l of this.transports){const u=l.getIdentity(a);if(u)return u}},this.rpc.schema=this.options.schema,this.rpc.validation=this.options.validation??(this.options.schema?"described":"off"),this.rpc.validateResults=this.options.validateResults??!1,this.options.validateComponentSnapshots&&(this.rpc.manageRpc.componentContractFor=a=>{const l=this.rpc.schema?.namespaces[a]?.component;return l?{component:l,types:this.rpc.schema?.types}:void 0}),this.rpc.unknownVersion=this.options.unknownVersion??"allow",this.rpc.idempotency=this.options.idempotency,this.rpc.manageRpc.requireExplicitExposure=this.options.requireExplicitExposure??!1,this.options.exposeManagement&&this.rpc.manageRpc.exposeManagement(),this.options.exposeIntrospection&&(this.rpc.manageRpc.exposeClassInstance(new xw(this.rpc)),this.rpc.schema=ww(this.rpc.schema)),this.topology=new s0(this.options.name,this.options.topology),this.rpc.hostTopology=this.topology,this.rpc.allowTopologyMutation=this.options.topology?.allowRemoteMutation??!1,this.context=new r0(this.topology),this.topology.onCommitted=()=>this.context.changed(),this.rpc.hostContext=this.context,this.context.push=(a,l)=>{this.rpc.sendEvent(a,Sm,[l],Sa).catch(()=>{})},this.contextResolver=new pw(this.context,this.options.name,this.caller,this.componentLifecycle),this.starting=this.topology.init().then(()=>this.buildTransports()).then(()=>{this.readyFlag=!0},a=>{this.initError=a}),this.init().catch(a=>{this.initError=a,this.emitSafely("initError",a)})}initError;starting=Promise.resolve();configuredTransports(){return this.options.transports}async buildTransport(i){if(i instanceof lr)return i;if(i.connect){const a=i;return new Fp(this.options.name,a.connect,[],{...a.path?{path:a.path}:{},...a.credentials?{auth:a.credentials}:{},...a.ca?{ca:a.ca}:{}},!0,a.allowInsecureTls)}}async buildTransports(){const i=cw(this.options.useMsgPack);for(const a of this.configuredTransports()){const l=await this.buildTransport(a);if(!l)throw new Error(`RpcServer '${this.options.name}': no transport can be built from ${JSON.stringify(a)}`);l.codec=i,this.options.relay!==void 0&&"relay"in l&&(l.relay=this.options.relay),this.attach(l)}}attach(i){this.transports.push(i),i.usePeerRegistry(this.peers),i.pipe(this.rpc),i.pipe(this.caller),this.switch?.setTarget(i),i.on(Ae.peerGone,a=>this.safely("peerGone",a,()=>{this.rpc.removePeer(a),this.context.dropSubscriber(a),this.peers.delete(a),this.relayPresence(i,a,"offline");for(const l of this.transports){const u=l;u.stopWatchingFor&&u.stopWatchingFor(a).catch(f=>this.emitSafely("presenceError",{peer:a,error:f}))}})),i.on(Ae.peerOnline,a=>this.safely("peerOnline",a,()=>this.relayPresence(i,a,"online"))),i.on(Ae.connected,()=>{this.caller.resubscribe().catch(a=>this.emitSafely("resubscribeError",a))});for(const a of[Ae.disconnected,Ae.peerGone,Ae.peerDisplaced,Ae.connected])i.on(a,l=>this.componentLifecycle.emit(a,l))}relayPresence(i,a,l){for(const u of this.transports){if(u===i)continue;const f=u;f.announcePeer&&f.announcePeer(a,l)}this.advertiseReachability()}advertiseReachability(){for(const i of this.transports)i instanceof Fp&&i.advertise(this.peers.names().filter(a=>a!==this.options.name&&this.peers.get(a)!==i))}emitSafely(i,a){for(const l of this.transports)l.emit(i,a)}safely(i,a,l){try{l()}catch(u){this.emitSafely("presenceError",{what:i,peer:a,error:u})}}async proxy(i,a){return await this.ready(),this.caller.proxy(i,a??"*")}async component(i,a){await this.ready(),this.componentChannels??=new M0(this.caller,this.componentLifecycle);const l=await this.componentChannels.open(i,a);return _m(l,l.inner)}provideContext(i,a,l){return this.context.provide(i,a,l)}contextOf(i,a){return this.contextResolver.store(i,a)}requireContext(i,a){return this.contextResolver.require(i,a)}captureContext(i,a){return this.contextResolver.capture(i,a)}async close(){await this.starting.catch(()=>{}),this.componentChannels?.closeAll(),this.caller.failPendingCalls("server closed"),this.caller.subscriptions.clear(),await this.caller.close(),await Promise.all(this.transports.map(i=>i.close())),this.transports=[],this.peers.clear()}exposeClassInstance(i,a,l){this.rpc.manageRpc.exposeClassInstance(i,a,l)}exposeClass(i,a){this.rpc.manageRpc.exposeClass(i,a)}exposeObject(i,a){this.rpc.manageRpc.exposeObject(i,a)}expose(i,a){this.rpc.manageRpc.expose(i,a)}createRpcInstance(i,a,...l){return this.rpc.manageRpc.createRpcInstance(i,a,...l)}addTarget(i,a){this.switch?.setTarget(a)}async init(){}async ready(){await this.starting;const i=()=>this.transports.filter(l=>!l.readyFlag).length==0,a=Date.now()+this.options.readyTimeout;for(;!i()||!this.readyFlag;){const l=this.transports.find(u=>u.startupError!==void 0);if(l&&(this.initError=l.startupError),this.initError!==void 0)throw new Error(`RpcServer '${this.options.name}': could not start: ${this.initError instanceof Error?this.initError.message:String(this.initError)}`,{cause:this.initError});if(this.options.readyTimeout>0&&Date.now()>a){const u=this.transports.filter(f=>!f.readyFlag).map(f=>f.getName());throw new Error(`RpcServer '${this.options.name}': transports not ready within ${this.options.readyTimeout} ms: ${u.join(", ")}`)}await new Promise(u=>setTimeout(u,10))}}async awaitPeer(i,a=5e3){const l=Date.now()+a;for(;;){if(this.peers.get(i))return!0;if(Date.now()>=l)return!1;await new Promise(u=>setTimeout(u,20))}}}const em="msgrpc-page-name",kw=()=>{const r=new URLSearchParams(window.location.search).get("name")?.trim();if(r)return r;let i=sessionStorage.getItem(em);return i||sessionStorage.setItem(em,i=dw("page")),i},Tw=({peer:r,messages:i,onSend:a})=>{const[l,u]=J.useState(""),[f,d]=J.useState(null),[m,y]=J.useState(!1),b=J.useRef(null);J.useEffect(()=>{b.current?.scrollIntoView({block:"end"})},[i.length]);const A=async()=>{!l.trim()||!r||(y(!0),d(await a(l.trim()).finally(()=>y(!1))??null),u(""))};return g.jsxs("div",{className:"chat",children:[g.jsxs("header",{children:[g.jsx("h1",{children:"Chat"}),g.jsx("span",{className:"muted mono",children:r??"—"})]}),!r&&g.jsx("p",{className:"muted",children:"Select a peer to talk to it. Any peer running this console can answer."}),r&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"chat-log",children:[i.length===0&&g.jsxs("p",{className:"muted",children:["Nothing yet. Say something to ",r,"."]}),i.map((x,q)=>g.jsx("div",{className:x.mine?"said mine":"said",children:g.jsx("span",{className:"text",children:x.text})},`${x.at}-${q}`)),g.jsx("div",{ref:b})]}),g.jsxs("div",{className:"chat-send",children:[g.jsx("input",{className:"control",value:l,placeholder:`say something to ${r}`,onChange:x=>u(x.target.value),onKeyDown:x=>{x.key==="Enter"&&A()}}),g.jsx("button",{className:"primary",disabled:m||!l.trim(),onClick:()=>{A()},children:m?"…":"Send"})]}),f&&g.jsx("p",{className:"muted bad",children:f})]})]})};var cm,um,fm,os;fm=[bm("chat")],um=[xa],cm=[xa];class cs{constructor(i){kc(os,5,this);yp(this,"onMessage");this.onMessage=i}async say(i,a){return this.onMessage(String(i),String(a)),"delivered"}async who(){return{app:"source-rpc console",kind:"browser page"}}}os=pp(null),Yl(os,1,"say",um,cs),Yl(os,1,"who",cm,cs),cs=Yl(os,0,"ChatService",fm,cs),kc(os,1,cs);const _w=1,Aw={chat:{methods:{say:{params:[{kind:"string"},{kind:"string"}],paramNames:["from","text"],returns:{kind:"string"}},who:{params:[],returns:{kind:"object",fields:{app:{type:{kind:"string"}},kind:{type:{kind:"string"}}}}}}}},Nw={schema:_w,namespaces:Aw},Ow=r=>{if(typeof r!="object"||r===null||Array.isArray(r))return null;const i=r;return!("value"in i)||!("quality"in i)&&!("unit"in i)&&!("forced"in i)?null:{value:i.value,quality:typeof i.quality=="string"?i.quality:void 0,unit:typeof i.unit=="string"?i.unit:void 0,forced:i.forced===!0}},tm=r=>typeof r=="string"?r:JSON.stringify(r)??"undefined",nm=({name:r,value:i})=>{const a=Ow(i);return g.jsxs("div",{className:"value-row",children:[g.jsx("span",{className:"value-name mono",children:r}),a?g.jsxs("span",{className:"value mono",children:[tm(a.value),a.unit&&g.jsxs("span",{className:"unit",children:[" ",a.unit]})]}):g.jsx("span",{className:"value mono",children:tm(i)}),a?.forced&&g.jsx("span",{className:"quality forced",children:"forced"}),a?.quality&&g.jsx("span",{className:`quality q-${a.quality}`,children:a.quality})]})},Rw=({peer:r,namespace:i,component:a,server:l,onSubscribed:u})=>{const[f,d]=J.useState(null),[m,y]=J.useState(null),[b,A]=J.useState(!1),x=J.useCallback(z=>f?f.subscribe(z):()=>{},[f]),q=J.useCallback(()=>f?.getSnapshot()??null,[f]),L=J.useSyncExternalStore(x,q);J.useEffect(()=>()=>{f?.close()},[f]);const K=async()=>{const z=l.current;if(z){A(!0),y(null);try{const G=await z.component(i,r);d(G[Tm]),u?.()}catch(G){y(G.message??String(G))}finally{A(!1)}}},Z=()=>{d(null),u?.()},F=L?.status==="stale";return g.jsxs("div",{className:`component${F?" stale":""}`,children:[g.jsxs("div",{className:"component-head",children:[g.jsx("span",{className:"comp-label",children:"component"}),L&&g.jsx("span",{className:`status-badge ${L.status}`,children:L.status}),L&&L.receivedAt>0&&g.jsxs("span",{className:"muted",children:["rev ",L.revision," ·"," ",F&&L.staleSince?`last known ${new Date(L.receivedAt).toLocaleTimeString()}, stale since ${new Date(L.staleSince).toLocaleTimeString()}`:`updated ${new Date(L.receivedAt).toLocaleTimeString()}`]}),g.jsxs("span",{className:"muted",children:[a.subscribers," observer",a.subscribers===1?"":"s"]}),!f&&g.jsx("button",{className:"toggle",onClick:()=>{K()},disabled:b,children:b?"observing…":"observe"}),f&&g.jsx("button",{className:"toggle on",onClick:Z,children:"stop"})]}),m&&g.jsx("p",{className:"component-error",children:m}),!f&&!m&&g.jsx("p",{className:"muted",children:"Cached props and state, read without a call. Observe to subscribe."}),f&&L&&L.receivedAt>0&&g.jsxs("div",{className:"component-body",children:[g.jsxs("div",{className:"value-table",children:[g.jsx("h4",{children:"props"}),Object.entries(L.props).map(([z,G])=>g.jsx(nm,{name:z,value:G},z)),Object.keys(L.props).length===0&&g.jsx("p",{className:"muted",children:"empty"})]}),g.jsxs("div",{className:"value-table",children:[g.jsx("h4",{children:"state"}),Object.entries(L.state).map(([z,G])=>g.jsx(nm,{name:z,value:G},z)),Object.keys(L.state).length===0&&g.jsx("p",{className:"muted",children:"empty"})]})]})]})},im=(r,i)=>r.peer===i?r.instance:`${r.peer}/${r.instance}`,zw=({owner:r,home:i,peers:a,onSelectPeer:l})=>r.peer!==i&&a.includes(r.peer)?g.jsxs("button",{className:"owner-chip link",onClick:()=>l(r.peer),title:`owned by ${r.peer}/${r.instance} - select that peer`,children:["⤳ ",im(r,i)]}):g.jsxs("span",{className:"owner-chip",title:"logical owner",children:["⤳ ",im(r,i)]}),Km=({namespace:r,childrenOf:i,home:a,peers:l,onSelectPeer:u})=>g.jsxs("li",{children:[g.jsxs("span",{className:"node",children:[g.jsx("span",{className:"mono",children:r.name}),r.topology?.label&&g.jsx("span",{className:"node-label",children:r.topology.label}),r.topology?.owner&&g.jsx(zw,{owner:r.topology.owner,home:a,peers:l,onSelectPeer:u})]}),i(r.name).length>0&&g.jsx("ul",{children:i(r.name).map(f=>g.jsx(Km,{namespace:f,childrenOf:i,home:a,peers:l,onSelectPeer:u},f.name))})]}),jw=({description:r,peers:i,onSelectPeer:a})=>{const l=r.name,u=r.namespaces.filter(b=>b.topology);if(!r.host&&u.length===0)return null;const f=new Set,d=b=>f.has(b)?[]:(f.add(b),u.filter(A=>A.topology.parent?.instance===b&&A.topology.parent?.peer===l)),m=u.filter(b=>b.topology.parent===null||b.topology.parent.instance==="$host"),y=r.host?.place?.join(" / ")??l;return g.jsxs("div",{className:"structure",children:[g.jsxs("div",{className:"structure-head",children:[g.jsx("span",{className:"comp-label",children:"structure"}),g.jsx("span",{className:"mono",children:y}),r.host?.label&&g.jsx("span",{className:"node-label",children:r.host.label}),r.host?.parent&&g.jsxs("span",{className:"muted",children:["attached under"," ",i.includes(r.host.parent.peer)?g.jsx("button",{className:"owner-chip link",onClick:()=>a(r.host.parent.peer),children:r.host.parent.peer}):g.jsx("span",{className:"mono",children:r.host.parent.peer})]}),r.host&&g.jsxs("span",{className:"muted",title:"which topology guarantees this host actually offers",children:[r.host.capabilities.durability," · cycles ",r.host.capabilities.cycleGuarantee]})]}),m.length===0&&g.jsx("p",{className:"muted",children:"Nothing declares a place on this host yet."}),m.length>0&&g.jsx("ul",{className:"tree",children:m.map(b=>g.jsx(Km,{namespace:b,childrenOf:d,home:l,peers:i,onSelectPeer:a},b.name))})]})},Zm=()=>new URL(".",document.baseURI),Mw="console.json",Cw=async()=>{const r=await fetch(new URL(Mw,Zm()));if(!r.ok)throw new Error(`the console did not say who it is (${r.status})`);return(await r.json()).name},Uw=()=>`${Zm().pathname}socket.io`,ds=(r,i)=>r?.kind==="ref"?ds(i?.[r.name],i):r,nn=r=>{if(!r)return"unknown";switch(r.kind){case"literal":return JSON.stringify(r.value);case"array":return`${nn(r.items)}[]`;case"tuple":return`[${r.items.map(nn).join(", ")}]`;case"union":return r.options.map(nn).join(" | ");case"ref":return r.name;case"object":return`{ ${Object.entries(r.fields).map(([i,a])=>`${i}${a.optional?"?":""}: ${nn(a.type)}`).join(", ")} }`;case"record":return`{ [key: string]: ${nn(r.values)} }`;case"number":return r.min!==void 0||r.max!==void 0?`number(${r.min??""}..${r.max??""})`:"number";default:return r.kind}},ir=r=>r?.kind==="any"||r?.kind==="union"&&r.options.some(i=>i.kind==="literal"&&i.value===null),Si=r=>{if(r?.kind!=="union")return r;const i=r.options.filter(a=>!(a.kind==="literal"&&a.value===null));return i.length===1?i[0]:{...r,options:i}},ar=r=>{if(r?.kind!=="union")return;const i=r.options.filter(a=>a.kind==="literal").map(a=>a.value);return i.length===r.options.length&&i.length>0?i:void 0},Jm=r=>{const i=r.replace(/[\s:]/g,"");if(i.length%2)throw new Error("expected an even number of hex digits");if(i&&!/^[0-9a-fA-F]+$/.test(i))throw new Error("expected hex digits");return Uint8Array.from(i.match(/../g)?.map(a=>parseInt(a,16))??[])},Dw=r=>r.options.find(i=>!(i.kind==="literal"&&i.value===null))??r.options[0],sr=(r,i,a=0)=>{const l=ds(Si(r),i);if(!l||a>4)return null;switch(l.kind){case"number":return l.min??0;case"string":case"bytes":return"";case"boolean":return!1;case"date":return new Date;case"literal":return l.value;case"array":return[];case"record":return{};case"tuple":return l.items.map(u=>sr(u,i,a+1));case"union":return sr(Dw(l),i,a+1);case"object":return Object.fromEntries(Object.entries(l.fields).filter(([,u])=>!u.optional).map(([u,f])=>[u,sr(f.type,i,a+1)]));default:return null}},us=(r,i,a,l=0)=>{const u=ds(i,a);if(!u||r===null||r===void 0||l>8)return r;switch(u.kind){case"date":return typeof r=="string"||typeof r=="number"?new Date(r):r;case"bytes":return typeof r=="string"?Jm(r):r;case"array":return Array.isArray(r)?r.map(f=>us(f,u.items,a,l+1)):r;case"tuple":return Array.isArray(r)?r.map((f,d)=>us(f,u.items[d],a,l+1)):r;case"object":return typeof r!="object"||Array.isArray(r)?r:Object.fromEntries(Object.entries(r).map(([f,d])=>[f,us(d,u.fields[f]?.type,a,l+1)]));case"record":return typeof r!="object"||Array.isArray(r)?r:Object.fromEntries(Object.entries(r).map(([f,d])=>[f,us(d,u.values,a,l+1)]));case"union":{const f=u.options.filter(d=>!(d.kind==="literal"&&d.value===null));return f.length===1?us(r,f[0],a,l+1):r}default:return r}},Bw=(r,i,a)=>{const l=ds(Si(i),a),u=r.trim();switch(l?.kind){case"number":{if(u==="")throw new Error("expected a number");const f=Number(u);if(Number.isNaN(f))throw new Error(`${u} is not a number`);return f}case"boolean":return u==="true";case"string":return r;case"date":{const f=new Date(u);if(Number.isNaN(f.getTime()))throw new Error("expected a date");return f}case"bytes":return Jm(u);case"literal":return l.value;default:{if(ar(l)){const d=ar(l).find(m=>String(m)===u);if(d!==void 0)return d}if(u==="")return;let f;try{f=JSON.parse(u)}catch{throw new Error("expected JSON")}return us(f,Si(i),a)}}},qw=(r,i)=>{const a=ds(Si(r),i),l=ar(a);if(l)return String(l[0]);switch(a?.kind){case"number":return String(a.min??0);case"boolean":return"false";case"date":return new Date().toISOString().slice(0,16);case"array":return"[]";case"record":return"{}";case"tuple":case"object":return JSON.stringify(sr(a,i),null,2);default:return""}},Lw=({name:r,type:i,types:a,state:l,onChange:u})=>{const f=ir(i),d=ds(Si(i),a),m=ar(d),y=x=>u({...l,text:x}),b=f&&!l.include,A=()=>{if(m)return g.jsx("select",{className:"control",value:l.text,disabled:b,onChange:x=>y(x.target.value),children:m.map(x=>g.jsx("option",{value:String(x),children:String(x)},String(x)))});switch(d?.kind){case"boolean":return g.jsxs("label",{className:"checkbox",children:[g.jsx("input",{type:"checkbox",checked:l.text==="true",disabled:b,onChange:x=>y(String(x.target.checked))}),g.jsx("span",{children:l.text==="true"?"true":"false"})]});case"number":return g.jsx("input",{className:"control",type:"number",value:l.text,disabled:b,min:d.min,max:d.max,step:d.integer?1:"any",onChange:x=>y(x.target.value)});case"date":return g.jsx("input",{className:"control",type:"datetime-local",value:l.text,disabled:b,onChange:x=>y(x.target.value)});case"string":return g.jsx("input",{className:"control",type:"text",value:l.text,disabled:b,onChange:x=>y(x.target.value)});case"bytes":return g.jsx("input",{className:"control mono",type:"text",placeholder:"hex, e.g. 01 ff 2a",value:l.text,disabled:b,onChange:x=>y(x.target.value)});default:return g.jsx("textarea",{className:"control mono",rows:Math.min(12,Math.max(2,l.text.split(`
|
|
2058
|
+
`).length)),placeholder:"JSON",value:l.text,disabled:b,onChange:x=>y(x.target.value)})}};return g.jsxs("div",{className:`field${b?" off":""}`,children:[g.jsxs("div",{className:"field-label",children:[f&&g.jsx("input",{type:"checkbox",className:"include",checked:l.include,title:"send this argument",onChange:x=>u({...l,include:x.target.checked})}),g.jsxs("span",{className:"name",children:[r,f?"?":""]}),g.jsx("span",{className:"type",children:nn(Si(i))})]}),A()]})},sm=20,Hw=(r,i,a,l,u)=>{const f=[...u.broker?["--broker",u.broker]:[],...u.hub?["--hub",u.hub]:[],...u.prefix?["--prefix",u.prefix]:[]],d=m=>{const y=typeof m=="string"?m:JSON.stringify(m);return/^[A-Za-z0-9._@/:+-]+$/.test(y??"")?y:`'${String(y).replace(/'/g,"'\\''")}'`};return["msgrpc","call",r,`${i}.${a}`,...l.map(d),...f].join(" ")},Fm=(r,i)=>`msgrpc.presets.${r}.${i}`,$w=(r,i)=>{try{const a=window.localStorage.getItem(Fm(r,i));return a?JSON.parse(a):[]}catch{return[]}},am=(r,i,a)=>{try{window.localStorage.setItem(Fm(r,i),JSON.stringify(a))}catch{}},Yw=r=>{if(!r.length)return 0;const i=[...r].sort((a,l)=>a-l);return i[Math.floor(i.length/2)]},Vw=({peer:r,namespace:i,method:a,types:l,service:u,network:f})=>{const d=a.params??[],m=a.paramNames??d.map((V,k)=>`argument ${k}`),[y,b]=J.useState(!1),[A,x]=J.useState(()=>d.map(V=>({text:qw(V,l),include:!ir(V)}))),[q,L]=J.useState(!1),[K,Z]=J.useState(!1),[F,z]=J.useState(null),[G,te]=J.useState([]),[O,j]=J.useState(!1),[H,C]=J.useState(()=>$w(i,a.name)),Q=`${a.name}(${a.params?d.map((V,k)=>`${m[k]}${ir(V)?"?":""}: ${nn(Si(V))}`).join(", "):"…"})${a.returns?`: ${nn(a.returns)}`:""}`,ne=()=>{const V=d.map((k,$)=>A[$].include?Bw(A[$].text,k,l):void 0);for(;V.length&&V[V.length-1]===void 0&&ir(d[V.length-1]);)V.pop();return V},se=async(V=1)=>{let k;try{k=ne()}catch(oe){z({ok:!1,text:oe.message});return}L(!0),z(null);const $=[];let W=null;try{for(let oe=0;oe<V;oe++){const pe=await u.call(r,i,a.name,k);if($.push(pe.ms),W=pe.error?{ok:!1,text:`${pe.code?pe.code+": ":""}${pe.error}`}:{ok:!0,text:`${JSON.stringify(pe.result,null,2)??"undefined"}
|
|
2059
2059
|
|
|
2060
|
-
// ${pe.ms} ms`},pe.error)break}U(J)}catch(oe){U({ok:!1,text:oe.message})}finally{ae(oe=>[...oe,...H].slice(-200)),Y(!1)}},re=()=>{const X=N.map(J=>J.include?J.text:"—").join(", ")||"no arguments",H=[{label:X,texts:N.map(J=>J.text),include:N.map(J=>J.include)},...L.filter(J=>J.label!==X)].slice(0,8);R(H),tm(i,s.name,H)},ve=X=>w(N.map((T,H)=>({text:X.texts[H]??T.text,include:X.include[H]??T.include}))),Le=X=>{const T=L.filter(H=>H.label!==X);R(T),tm(i,s.name,T)},tt=()=>{let X;try{X=te()}catch{X=[]}navigator.clipboard?.writeText(N1(l,i,s.name,X,f)).then(()=>{C(!0),setTimeout(()=>C(!1),1500)})};return y.jsxs("div",{className:`method${v?" open":""}`,children:[y.jsxs("button",{className:"method-head",onClick:()=>x(!v),"aria-expanded":v,children:[y.jsx("span",{className:"chevron",children:v?"▾":"▸"}),y.jsx("code",{children:G}),s.semantics==="query"&&y.jsx("span",{className:"sem query",children:"query"}),s.semantics==="idempotent-command"&&y.jsx("span",{className:"sem idempotent",children:"idempotent"}),s.semantics==="non-repeatable-command"&&y.jsx("span",{className:"sem once",children:"won't repeat"})]}),v&&y.jsxs("div",{className:"method-body",children:[p.length===0&&y.jsx("p",{className:"muted",children:"No arguments."}),p.map((X,T)=>y.jsx(A1,{name:m[T],type:X,types:r,state:N[T],onChange:H=>w(N.map((J,oe)=>oe===T?H:J))},T)),p.length>0&&(L.length>0||N.length>0)&&y.jsxs("div",{className:"presets",children:[L.map(X=>y.jsxs("span",{className:"preset",children:[y.jsx("button",{className:"toggle",onClick:()=>ve(X),title:"put these arguments back in the form",children:X.label}),y.jsx("button",{className:"forget",onClick:()=>Le(X.label),title:"forget this one",children:"×"})]},X.label)),y.jsx("button",{className:"toggle",onClick:re,title:"keep these arguments for next time",children:"save"})]}),s.rest&&y.jsxs("p",{className:"muted",children:["Takes further ",nn(s.rest)," arguments, which this form does not send."]}),!s.params&&y.jsx("p",{className:"muted",children:"No schema describes this method, so its arguments cannot be shown as fields."}),!s.semantics&&y.jsx("p",{className:"muted",children:"The contract does not say what calling this does. Treat it as a command until someone who knows says otherwise."}),ee&&y.jsxs("div",{className:"confirm",children:[y.jsxs("span",{children:["Not free to repeat — sent once, it has happened. Send ",y.jsx("code",{children:s.name}),"?"]}),y.jsx("button",{className:"primary",onClick:()=>{Z(!1),ie()},children:"send once"}),y.jsx("button",{className:"toggle",onClick:()=>Z(!1),children:"cancel"})]}),y.jsxs("div",{className:"actions",children:[y.jsx("button",{className:"primary",onClick:()=>s.semantics==="non-repeatable-command"?Z(!0):void ie(),disabled:q||ee,children:q?"calling…":"Call"}),(s.semantics==="query"||s.semantics==="idempotent-command")&&y.jsxs("button",{className:"toggle",onClick:()=>{ie(em)},disabled:q,title:"call it repeatedly and keep the timings",children:["×",em]}),y.jsx("button",{className:"toggle",onClick:tt,title:"the command line that makes the same call",children:j?"copied":"copy as CLI"}),K.length>0&&y.jsxs("span",{className:"muted timing",children:[K.length," call",K.length===1?"":"s"," · p50 ",z1(K)," ms · last ",K[K.length-1]," ms"]})]}),I&&y.jsx("pre",{className:I.ok?"result":"result bad",children:I.text})]})]})},R1=["POST","SUCCESS","ERROR","EVENT"],Gm=500,M1=l=>l==="POST"?"→":l==="EVENT"?"⇒":"←",nm=l=>`${l.namespace??"?"}.${l.method??l.event??"?"}`,im=l=>{if(l.params!==void 0)return JSON.stringify(l.params);if(l.result!==void 0)return JSON.stringify(l.result)},U1=({service:l,selected:i,frames:s,onClear:r,paused:c,onPaused:f,hidden:p})=>{const[m,v]=Q.useState(null),[x,N]=Q.useState([]),[w,q]=Q.useState(!1),[Y,ee]=Q.useState(null),[Z,I]=Q.useState(!0),[U,K]=Q.useState(!1),[ae,j]=Q.useState([]),[C,L]=Q.useState(""),[R,G]=Q.useState(new Set),te=Q.useRef(null);Q.useEffect(()=>{te.current=m},[m]),Q.useEffect(()=>()=>{te.current&&l?.untap(te.current)},[l]);const ie=async()=>{if(l){q(!0),ee(null);try{const X={payloads:Z,...U&&i?{peer:i}:{},...ae.length?{kinds:ae}:{}},T=await l.tap(X);v(T.token),N(T.sources),T.sources.length||ee("Nothing here can watch traffic: no broker exposing a bus, and no MQTT link.")}catch(X){ee(X.message)}finally{q(!1)}}},re=async()=>{if(!(!l||!m)){q(!0);try{await l.untap(m)}catch{}finally{v(null),N([]),q(!1)}}},ve=X=>j(T=>T.includes(X)?T.filter(H=>H!==X):[...T,X]),Le=C.trim().toLowerCase(),tt=s.filter(X=>!Le||`${X.source} ${X.target} ${nm(X)} ${im(X)??""}`.toLowerCase().includes(Le)).slice(0,Gm);return y.jsxs("div",{className:p?"traffic hidden":"traffic",children:[y.jsxs("header",{children:[y.jsx("h1",{children:"Traffic"}),y.jsxs("div",{className:"traffic-actions",children:[s.length>0&&y.jsx("button",{className:"toggle",onClick:r,children:"clear"}),m&&y.jsx("button",{className:c?"toggle on":"toggle",onClick:()=>f(!c),children:c?"paused":"pause"}),y.jsx("button",{className:m?"toggle on":"toggle",onClick:()=>{m?re():ie()},disabled:w||!l,children:w?"…":m?"tapping":"tap"})]})]}),!m&&y.jsxs("div",{className:"tap-setup",children:[y.jsxs("label",{className:"checkbox",children:[y.jsx("input",{type:"checkbox",checked:Z,onChange:X=>I(X.target.checked)}),"arguments and results"]}),y.jsxs("label",{className:"checkbox",children:[y.jsx("input",{type:"checkbox",checked:U,disabled:!i,onChange:X=>K(X.target.checked)}),"only ",i??"the selected peer"]}),y.jsxs("div",{className:"kinds",children:[R1.map(X=>y.jsx("button",{className:ae.includes(X)?"toggle on":"toggle",onClick:()=>ve(X),children:X},X)),ae.length===0&&y.jsx("span",{className:"muted",children:"all kinds"})]}),y.jsx("p",{className:"muted",children:"Watches what other peers say to each other. It costs something at the other end, so it is off until asked and stops when this tab does."})]}),Y&&y.jsx("p",{className:"bad",children:Y}),m&&x.length>0&&y.jsxs("p",{className:"muted tap-where",children:["watching via ",y.jsx("span",{className:"mono",children:x.join(", ")}),c&&" · paused"]}),m&&y.jsx("input",{className:"control",placeholder:"filter by peer, method or payload",value:C,onChange:X=>L(X.target.value)}),m&&s.length===0&&y.jsx("p",{className:"muted",children:"Nothing has crossed yet."}),tt.map((X,T)=>{const H=im(X),J=R.has(X.at*1e3+T),oe=X.at*1e3+T;return y.jsxs("div",{className:`frame ${X.kind.toLowerCase()}`,children:[y.jsxs("div",{className:"frame-head",children:[y.jsx("time",{children:new Date(X.at).toLocaleTimeString()}),y.jsx("span",{className:"arrow",children:M1(X.kind)}),y.jsxs("span",{className:"mono peers",children:[X.source," → ",X.target]}),y.jsx("code",{children:nm(X)}),X.ms!==void 0&&y.jsxs("span",{className:"muted ms",children:[X.ms," ms"]}),X.code&&y.jsx("span",{className:"code",children:X.code})]}),X.error&&y.jsx("p",{className:"frame-error",children:X.error}),H&&y.jsx("pre",{className:J?"frame-payload open":"frame-payload",onClick:()=>G(pe=>{const b=new Set(pe);return b.has(oe)?b.delete(oe):b.add(oe),b}),children:H})]},`${X.at}-${T}`)})]})},C1=Gm,D1={rejected:"refused before it reached the RPC layer",unroutable:"nowhere to deliver it",peerDisplaced:"two peers are answering to one name",transportError:"the link itself failed"},B1=({problems:l,onClear:i})=>y.jsxs("div",{className:"problems",children:[y.jsxs("header",{children:[y.jsx("h1",{children:"Problems"}),l.length>0&&y.jsx("button",{className:"toggle",onClick:i,children:"clear"})]}),l.length===0&&y.jsx("p",{className:"muted",children:"Nothing refused, undeliverable or displaced. This is where a call that never comes back says why."}),l.map((s,r)=>y.jsxs("div",{className:`problem ${s.kind}`,children:[y.jsxs("div",{className:"problem-head",children:[y.jsx("time",{children:new Date(s.at).toLocaleTimeString()}),y.jsx("span",{className:"kind",children:s.kind}),y.jsxs("span",{className:"muted link",children:["on ",s.link]})]}),y.jsxs("div",{className:"problem-body",children:[s.peer&&y.jsxs("code",{className:"mono",children:[s.peer,s.target?` → ${s.target}`:""]}),y.jsx("p",{children:s.reason??D1[s.kind]??""})]})]},`${s.at}-${r}`))]}),q1=3,L1=({changes:l,onClear:i})=>{const s=new Map;for(const c of l)c.state==="online"&&s.set(c.peer,(s.get(c.peer)??0)+1);const r=[...s.entries()].filter(([,c])=>c>=q1).sort((c,f)=>f[1]-c[1]);return y.jsxs("div",{className:"presence",children:[y.jsxs("header",{children:[y.jsx("h1",{children:"Presence"}),l.length>0&&y.jsx("button",{className:"toggle",onClick:i,children:"clear"})]}),r.length>0&&y.jsx("div",{className:"flapping",children:r.map(([c,f])=>y.jsxs("p",{children:[y.jsx("span",{className:"mono",children:c})," has arrived ",f," times"]},c))}),l.length===0&&y.jsx("p",{className:"muted",children:"Nobody has arrived or left since this console started."}),l.map((c,f)=>y.jsxs("div",{className:`coming ${c.state}`,children:[y.jsx("time",{children:new Date(c.at).toLocaleTimeString()}),y.jsx("span",{className:"mark",children:c.state==="online"?"+":"−"}),y.jsx("span",{className:"mono",children:c.peer}),c.link&&c.link!=="this console"&&y.jsx("span",{className:"muted link",children:c.link})]},`${c.at}-${f}`))]})},am=3,H1=()=>{const[l,i]=Q.useState(null),[s,r]=Q.useState(""),[c,f]=Q.useState("connecting"),p=Q.useRef(null),m=Q.useRef(null),v=Q.useRef(null),x=Q.useRef(null),N=Q.useRef(null),w=Q.useRef(null);return Q.useEffect(()=>{let q,Y=0,ee=!1;const Z=()=>{q?.close()};window.addEventListener("pagehide",Z);const I=async()=>{try{const U=await w1(),K=h1();r(K),q=new f1({name:K,transports:[{connect:window.location.origin,path:E1()}],readyTimeout:1e4,schema:y1,exposeIntrospection:!0}),q.exposeClassInstance(new ua((R,G)=>v.current?.(R,G)));const ae=q.transports[0];ae?.on(Ue.disconnected,()=>f("reconnecting")),ae?.on(Ue.connected,()=>f("connected")),await q.ready();for(const R of q.transports)R.on(Ue.disconnected,()=>f("reconnecting")),R.on(Ue.connected,()=>f("connected"));w.current=q;const j=await q.proxy("console",U);await j.on("event",R=>p.current?.(R)),await j.on("peer",R=>{const G=R;m.current?.(G.peer,G.state,G)}),await j.on("frame",R=>x.current?.(R)),await j.on("problem",R=>N.current?.(R));const C=j,{callTimeout:L}=await C.peers();L&&(q.caller.callTimeout=L+5e3),i(C),f("connected")}catch(U){if(ee)return;if(await q?.close().catch(()=>{}),q=void 0,++Y<=am){f(`cannot reach the console, trying again (${Y}/${am})`),await new Promise(K=>setTimeout(K,Y*1e3)),ee||await I();return}f(`cannot reach the console: ${U.message}`)}};return I(),()=>{ee=!0,window.removeEventListener("pagehide",Z),q?.close()}},[]),{service:l,status:c,me:s,events:p,peerChange:m,said:v,frames:x,problems:N,peer:w}},Y1=(l,i)=>{const s=new Blob([l.map(f=>JSON.stringify(f)).join(`
|
|
2060
|
+
// ${pe.ms} ms`},pe.error)break}z(W)}catch(oe){z({ok:!1,text:oe.message})}finally{te(oe=>[...oe,...$].slice(-200)),L(!1)}},re=()=>{const V=A.map(W=>W.include?W.text:"—").join(", ")||"no arguments",$=[{label:V,texts:A.map(W=>W.text),include:A.map(W=>W.include)},...H.filter(W=>W.label!==V)].slice(0,8);C($),am(i,a.name,$)},ve=V=>x(A.map((k,$)=>({text:V.texts[$]??k.text,include:V.include[$]??k.include}))),Le=V=>{const k=H.filter($=>$.label!==V);C(k),am(i,a.name,k)},nt=()=>{let V;try{V=ne()}catch{V=[]}navigator.clipboard?.writeText(Hw(r,i,a.name,V,f)).then(()=>{j(!0),setTimeout(()=>j(!1),1500)})};return g.jsxs("div",{className:`method${y?" open":""}`,children:[g.jsxs("button",{className:"method-head",onClick:()=>b(!y),"aria-expanded":y,children:[g.jsx("span",{className:"chevron",children:y?"▾":"▸"}),g.jsx("code",{children:Q}),a.semantics==="query"&&g.jsx("span",{className:"sem query",children:"query"}),a.semantics==="idempotent-command"&&g.jsx("span",{className:"sem idempotent",children:"idempotent"}),a.semantics==="non-repeatable-command"&&g.jsx("span",{className:"sem once",children:"won't repeat"})]}),y&&g.jsxs("div",{className:"method-body",children:[d.length===0&&g.jsx("p",{className:"muted",children:"No arguments."}),d.map((V,k)=>g.jsx(Lw,{name:m[k],type:V,types:l,state:A[k],onChange:$=>x(A.map((W,oe)=>oe===k?$:W))},k)),d.length>0&&(H.length>0||A.length>0)&&g.jsxs("div",{className:"presets",children:[H.map(V=>g.jsxs("span",{className:"preset",children:[g.jsx("button",{className:"toggle",onClick:()=>ve(V),title:"put these arguments back in the form",children:V.label}),g.jsx("button",{className:"forget",onClick:()=>Le(V.label),title:"forget this one",children:"×"})]},V.label)),g.jsx("button",{className:"toggle",onClick:re,title:"keep these arguments for next time",children:"save"})]}),a.rest&&g.jsxs("p",{className:"muted",children:["Takes further ",nn(a.rest)," arguments, which this form does not send."]}),!a.params&&g.jsx("p",{className:"muted",children:"No schema describes this method, so its arguments cannot be shown as fields."}),!a.semantics&&g.jsx("p",{className:"muted",children:"The contract does not say what calling this does. Treat it as a command until someone who knows says otherwise."}),K&&g.jsxs("div",{className:"confirm",children:[g.jsxs("span",{children:["Not free to repeat — sent once, it has happened. Send ",g.jsx("code",{children:a.name}),"?"]}),g.jsx("button",{className:"primary",onClick:()=>{Z(!1),se()},children:"send once"}),g.jsx("button",{className:"toggle",onClick:()=>Z(!1),children:"cancel"})]}),g.jsxs("div",{className:"actions",children:[g.jsx("button",{className:"primary",onClick:()=>a.semantics==="non-repeatable-command"?Z(!0):void se(),disabled:q||K,children:q?"calling…":"Call"}),(a.semantics==="query"||a.semantics==="idempotent-command")&&g.jsxs("button",{className:"toggle",onClick:()=>{se(sm)},disabled:q,title:"call it repeatedly and keep the timings",children:["×",sm]}),g.jsx("button",{className:"toggle",onClick:nt,title:"the command line that makes the same call",children:O?"copied":"copy as CLI"}),G.length>0&&g.jsxs("span",{className:"muted timing",children:[G.length," call",G.length===1?"":"s"," · p50 ",Yw(G)," ms · last ",G[G.length-1]," ms"]})]}),F&&g.jsx("pre",{className:F.ok?"result":"result bad",children:F.text})]})]})},Xw=["POST","SUCCESS","ERROR","EVENT"],Wm=500,Gw=r=>r==="POST"?"→":r==="EVENT"?"⇒":"←",lm=r=>`${r.namespace??"?"}.${r.method??r.event??"?"}`,rm=r=>{if(r.params!==void 0)return JSON.stringify(r.params);if(r.result!==void 0)return JSON.stringify(r.result)},Qw=({service:r,selected:i,frames:a,onClear:l,paused:u,onPaused:f,hidden:d})=>{const[m,y]=J.useState(null),[b,A]=J.useState([]),[x,q]=J.useState(!1),[L,K]=J.useState(null),[Z,F]=J.useState(!0),[z,G]=J.useState(!1),[te,O]=J.useState([]),[j,H]=J.useState(""),[C,Q]=J.useState(new Set),ne=J.useRef(null);J.useEffect(()=>{ne.current=m},[m]),J.useEffect(()=>()=>{ne.current&&r?.untap(ne.current)},[r]);const se=async()=>{if(r){q(!0),K(null);try{const V={payloads:Z,...z&&i?{peer:i}:{},...te.length?{kinds:te}:{}},k=await r.tap(V);y(k.token),A(k.sources),k.sources.length||K("Nothing here can watch traffic: no broker exposing a bus, and no MQTT link.")}catch(V){K(V.message)}finally{q(!1)}}},re=async()=>{if(!(!r||!m)){q(!0);try{await r.untap(m)}catch{}finally{y(null),A([]),q(!1)}}},ve=V=>O(k=>k.includes(V)?k.filter($=>$!==V):[...k,V]),Le=j.trim().toLowerCase(),nt=a.filter(V=>!Le||`${V.source} ${V.target} ${lm(V)} ${rm(V)??""}`.toLowerCase().includes(Le)).slice(0,Wm);return g.jsxs("div",{className:d?"traffic hidden":"traffic",children:[g.jsxs("header",{children:[g.jsx("h1",{children:"Traffic"}),g.jsxs("div",{className:"traffic-actions",children:[a.length>0&&g.jsx("button",{className:"toggle",onClick:l,children:"clear"}),m&&g.jsx("button",{className:u?"toggle on":"toggle",onClick:()=>f(!u),children:u?"paused":"pause"}),g.jsx("button",{className:m?"toggle on":"toggle",onClick:()=>{m?re():se()},disabled:x||!r,children:x?"…":m?"tapping":"tap"})]})]}),!m&&g.jsxs("div",{className:"tap-setup",children:[g.jsxs("label",{className:"checkbox",children:[g.jsx("input",{type:"checkbox",checked:Z,onChange:V=>F(V.target.checked)}),"arguments and results"]}),g.jsxs("label",{className:"checkbox",children:[g.jsx("input",{type:"checkbox",checked:z,disabled:!i,onChange:V=>G(V.target.checked)}),"only ",i??"the selected peer"]}),g.jsxs("div",{className:"kinds",children:[Xw.map(V=>g.jsx("button",{className:te.includes(V)?"toggle on":"toggle",onClick:()=>ve(V),children:V},V)),te.length===0&&g.jsx("span",{className:"muted",children:"all kinds"})]}),g.jsx("p",{className:"muted",children:"Watches what other peers say to each other. It costs something at the other end, so it is off until asked and stops when this tab does."})]}),L&&g.jsx("p",{className:"bad",children:L}),m&&b.length>0&&g.jsxs("p",{className:"muted tap-where",children:["watching via ",g.jsx("span",{className:"mono",children:b.join(", ")}),u&&" · paused"]}),m&&g.jsx("input",{className:"control",placeholder:"filter by peer, method or payload",value:j,onChange:V=>H(V.target.value)}),m&&a.length===0&&g.jsx("p",{className:"muted",children:"Nothing has crossed yet."}),nt.map((V,k)=>{const $=rm(V),W=C.has(V.at*1e3+k),oe=V.at*1e3+k;return g.jsxs("div",{className:`frame ${V.kind.toLowerCase()}`,children:[g.jsxs("div",{className:"frame-head",children:[g.jsx("time",{children:new Date(V.at).toLocaleTimeString()}),g.jsx("span",{className:"arrow",children:Gw(V.kind)}),g.jsxs("span",{className:"mono peers",children:[V.source," → ",V.target]}),g.jsx("code",{children:lm(V)}),V.ms!==void 0&&g.jsxs("span",{className:"muted ms",children:[V.ms," ms"]}),V.code&&g.jsx("span",{className:"code",children:V.code})]}),V.error&&g.jsx("p",{className:"frame-error",children:V.error}),$&&g.jsx("pre",{className:W?"frame-payload open":"frame-payload",onClick:()=>Q(pe=>{const w=new Set(pe);return w.has(oe)?w.delete(oe):w.add(oe),w}),children:$})]},`${V.at}-${k}`)})]})},Kw=Wm,Zw={rejected:"refused before it reached the RPC layer",unroutable:"nowhere to deliver it",peerDisplaced:"two peers are answering to one name",transportError:"the link itself failed"},Jw=({problems:r,onClear:i})=>g.jsxs("div",{className:"problems",children:[g.jsxs("header",{children:[g.jsx("h1",{children:"Problems"}),r.length>0&&g.jsx("button",{className:"toggle",onClick:i,children:"clear"})]}),r.length===0&&g.jsx("p",{className:"muted",children:"Nothing refused, undeliverable or displaced. This is where a call that never comes back says why."}),r.map((a,l)=>g.jsxs("div",{className:`problem ${a.kind}`,children:[g.jsxs("div",{className:"problem-head",children:[g.jsx("time",{children:new Date(a.at).toLocaleTimeString()}),g.jsx("span",{className:"kind",children:a.kind}),g.jsxs("span",{className:"muted link",children:["on ",a.link]})]}),g.jsxs("div",{className:"problem-body",children:[a.peer&&g.jsxs("code",{className:"mono",children:[a.peer,a.target?` → ${a.target}`:""]}),g.jsx("p",{children:a.reason??Zw[a.kind]??""})]})]},`${a.at}-${l}`))]}),Fw=3,Ww=({changes:r,onClear:i})=>{const a=new Map;for(const u of r)u.state==="online"&&a.set(u.peer,(a.get(u.peer)??0)+1);const l=[...a.entries()].filter(([,u])=>u>=Fw).sort((u,f)=>f[1]-u[1]);return g.jsxs("div",{className:"presence",children:[g.jsxs("header",{children:[g.jsx("h1",{children:"Presence"}),r.length>0&&g.jsx("button",{className:"toggle",onClick:i,children:"clear"})]}),l.length>0&&g.jsx("div",{className:"flapping",children:l.map(([u,f])=>g.jsxs("p",{children:[g.jsx("span",{className:"mono",children:u})," has arrived ",f," times"]},u))}),r.length===0&&g.jsx("p",{className:"muted",children:"Nobody has arrived or left since this console started."}),r.map((u,f)=>g.jsxs("div",{className:`coming ${u.state}`,children:[g.jsx("time",{children:new Date(u.at).toLocaleTimeString()}),g.jsx("span",{className:"mark",children:u.state==="online"?"+":"−"}),g.jsx("span",{className:"mono",children:u.peer}),u.link&&u.link!=="this console"&&g.jsx("span",{className:"muted link",children:u.link})]},`${u.at}-${f}`))]})},om=3,Iw=()=>{const[r,i]=J.useState(null),[a,l]=J.useState(""),[u,f]=J.useState("connecting"),d=J.useRef(null),m=J.useRef(null),y=J.useRef(null),b=J.useRef(null),A=J.useRef(null),x=J.useRef(null);return J.useEffect(()=>{let q,L=0,K=!1;const Z=()=>{q?.close()};window.addEventListener("pagehide",Z);const F=async()=>{try{const z=await Cw(),G=kw();l(G),q=new Ew({name:G,transports:[{connect:window.location.origin,path:Uw()}],readyTimeout:1e4,schema:Nw,exposeIntrospection:!0}),q.exposeClassInstance(new cs((C,Q)=>y.current?.(C,Q)));const te=q.transports[0];te?.on(Ae.disconnected,()=>f("reconnecting")),te?.on(Ae.connected,()=>f("connected")),await q.ready();for(const C of q.transports)C.on(Ae.disconnected,()=>f("reconnecting")),C.on(Ae.connected,()=>f("connected"));x.current=q;const O=await q.proxy("console",z);await O.on("event",C=>d.current?.(C)),await O.on("peer",C=>{const Q=C;m.current?.(Q.peer,Q.state,Q)}),await O.on("frame",C=>b.current?.(C)),await O.on("problem",C=>A.current?.(C));const j=O,{callTimeout:H}=await j.peers();H&&(q.caller.callTimeout=H+5e3),i(j),f("connected")}catch(z){if(K)return;if(await q?.close().catch(()=>{}),q=void 0,++L<=om){f(`cannot reach the console, trying again (${L}/${om})`),await new Promise(G=>setTimeout(G,L*1e3)),K||await F();return}f(`cannot reach the console: ${z.message}`)}};return F(),()=>{K=!0,window.removeEventListener("pagehide",Z),q?.close()}},[]),{service:r,status:u,me:a,events:d,peerChange:m,said:y,frames:b,problems:A,peer:x}},Pw=(r,i)=>{const a=new Blob([r.map(f=>JSON.stringify(f)).join(`
|
|
2061
2061
|
`)+`
|
|
2062
|
-
`],{type:"application/x-ndjson"}),
|
|
2062
|
+
`],{type:"application/x-ndjson"}),l=URL.createObjectURL(a),u=document.createElement("a");u.href=l,u.download=i,u.click(),URL.revokeObjectURL(l)},ex=()=>{const{service:r,status:i,me:a,events:l,peerChange:u,said:f,frames:d,problems:m,peer:y}=Iw(),[b,A]=J.useState({}),[x,q]=J.useState({}),[L,K]=J.useState([]),[Z,F]=J.useState(new Set),[z,G]=J.useState(null),[te,O]=J.useState(null),[j,H]=J.useState(new Set),[C,Q]=J.useState([]),[ne,se]=J.useState("events"),[re,ve]=J.useState([]),[Le,nt]=J.useState(!1),[V,k]=J.useState([]),[$,W]=J.useState({}),[oe,pe]=J.useState({}),[w,B]=J.useState({}),[X,P]=J.useState({}),[ce,he]=J.useState([]),[Ee,it]=J.useState(""),[Me,ti]=J.useState(!1),ln=J.useCallback(async()=>{if(!r)return;const Y=await r.peers();K(Y.peers),H(new Set(Y.watching)),W(Y.links??{}),pe(Y.network??{}),B(Y.roles??{}),P(Y.structure??{})},[r]);J.useEffect(()=>{a&&(document.title=a)},[a]),J.useEffect(()=>{f.current=(Y,ae)=>{A(Ue=>({...Ue,[Y]:[...Ue[Y]??[],{from:Y,text:ae,at:Date.now(),mine:!1}]})),q(Ue=>({...Ue,[Y]:(Ue[Y]??0)+1}))}},[f]),J.useEffect(()=>{ne!=="chat"||!z||q(Y=>Y[z]?{...Y,[z]:0}:Y)},[ne,z,b]);const ps=async Y=>{if(!y.current||!z)return"not connected";A(ae=>({...ae,[z]:[...ae[z]??[],{from:a,text:Y,at:Date.now(),mine:!0}]}));try{await(await y.current.proxy("chat",z)).say(a,Y);return}catch(ae){return`${z} did not take it: ${ae.message??String(ae)}`}};J.useEffect(()=>{ln(),l.current=Y=>{Me||Q(ae=>[Y,...ae].slice(0,500))},u.current=(Y,ae,Ue)=>{F(me=>{const st=new Set(me);return ae==="offline"?st.add(Y):st.delete(Y),st}),he(me=>[Ue,...me].slice(0,200)),ln()}},[r,ln,l,u,Me]),J.useEffect(()=>{d.current=Y=>{Le||ve(ae=>[Y,...ae].slice(0,Kw))}},[d,Le]),J.useEffect(()=>{m.current=Y=>k(ae=>[Y,...ae].slice(0,200)),r&&r.problems().then(({problems:Y})=>k(Y)).catch(()=>{}),r&&r.presence().then(({changes:Y})=>he(Y)).catch(()=>{})},[r,m]);const ms=async Y=>{G(Y),O(null),r&&(O(await r.describe(Y)),await ln())},rn=async(Y,ae)=>{if(!(!r||!z)){for(const Ue of ae){if(j.has(`${z}/${Y}/${Ue.name}`))continue;(await r.watch(z,Y,Ue.name)).watching&&H(st=>new Set(st).add(`${z}/${Y}/${Ue.name}`))}O(await r.describe(z))}},ys=async(Y,ae)=>{if(!r||!z)return;const Ue=`${z}/${Y}/${ae.name}`,me=j.has(Ue)?await r.unwatch(z,Y,ae.name):await r.watch(z,Y,ae.name);H(st=>{const Ge=new Set(st);return me.watching?Ge.add(Ue):Ge.delete(Ue),Ge}),z&&O(await r.describe(z))},ni=te&&"error"in te?te:null,Jt=te&&!("error"in te)?te:null,gs=Object.values(x).reduce((Y,ae)=>Y+ae,0);return g.jsxs("div",{className:"app",children:[g.jsxs("aside",{children:[g.jsxs("div",{className:"identity",children:[g.jsx("span",{className:"muted",children:"this page is"}),g.jsx("span",{className:"mono name",title:"the peer name this page serves and calls under",children:a||"…"})]}),g.jsxs("header",{children:[g.jsx("h1",{children:"Peers"}),g.jsx("span",{className:`status ${i==="connected"?"ok":"warn"}`,children:i})]}),L.length===0&&g.jsx("p",{className:"muted",children:"Waiting for a peer to announce itself…"}),(()=>{const Y=new Set(L),ae=L.filter(me=>{const st=X[me]?.parent;return!st||st===me||!Y.has(st)}),Ue=(me,st,Ge)=>g.jsxs("div",{children:[g.jsxs("button",{className:`peer${me===z?" selected":""}`,style:st>0?{paddingLeft:10+st*14}:void 0,onClick:()=>{ms(me)},children:[g.jsx("span",{className:`dot${Z.has(me)?" off":""}`}),g.jsxs("span",{className:"peer-lines",children:[g.jsxs("span",{children:[me,me===a&&g.jsx("span",{className:"you",children:"you"}),x[me]>0&&g.jsx("span",{className:"count",children:x[me]}),w[me]&&g.jsx("span",{className:`role ${w[me]}`,children:w[me]==="undescribed"?"no contract":w[me]}),$[me]&&$[me]!=="this console"&&g.jsx("span",{className:"link",children:$[me]})]}),(X[me]?.place||X[me]?.label)&&g.jsxs("span",{className:"peer-place",children:[X[me]?.place?.join(" / ")??"",X[me]?.label?` ${X[me].label}`:""]})]})]}),!Ge.has(me)&&L.filter(Ei=>X[Ei]?.parent===me&&Ei!==me).map(Ei=>Ue(Ei,st+1,new Set([...Ge,me])))]},me);return ae.map(me=>Ue(me,0,new Set))})()]}),g.jsxs("main",{children:[!z&&g.jsx("p",{className:"muted",children:"Select a peer to see what it exposes."}),z&&!te&&g.jsxs("p",{className:"muted",children:["Describing ",z,"…"]}),ni&&g.jsxs("div",{className:"notice",children:[g.jsx("strong",{children:ni.code??"Error"}),g.jsx("p",{children:ni.error}),g.jsx("p",{className:"muted",children:"A server answers this only when it is started with exposeIntrospection."})]}),Jt&&g.jsxs(g.Fragment,{children:[g.jsxs("header",{className:"peer-head",children:[g.jsx("h1",{children:Jt.name}),g.jsxs("span",{className:"muted",children:[Jt.version?`contract ${Jt.version} · `:"",Jt.validating?"arguments checked":"arguments not checked"]})]}),g.jsx(jw,{description:Jt,peers:L,onSelectPeer:Y=>{ms(Y)}}),Jt.namespaces.map(Y=>g.jsxs("section",{className:"namespace",children:[g.jsxs("h2",{children:[Y.name,Y.version&&g.jsxs("span",{className:"badge",children:["@",Y.version]}),g.jsxs("span",{className:"muted mono",children:[Y.className,Y.created?" · created at runtime":""]}),Y.capabilities?.map(ae=>g.jsx("span",{className:"capability",title:"implements this contract interface",children:ae},ae))]}),Y.component&&g.jsx(Rw,{peer:z,namespace:Y.name,component:Y.component,server:y,onSubscribed:()=>{r&&z&&r.describe(z).then(O).catch(()=>{})}}),Y.methods.map(ae=>g.jsx(Vw,{peer:z,namespace:Y.name,method:ae,types:Jt.types,service:r,network:oe},ae.name)),Y.events.length>0&&g.jsxs("div",{className:"events",children:[g.jsxs("h3",{children:["events",Y.events.some(ae=>!j.has(`${z}/${Y.name}/${ae.name}`))&&g.jsx("button",{className:"toggle",onClick:()=>{rn(Y.name,Y.events)},children:"watch all"})]}),Y.events.map(ae=>{const Ue=j.has(`${z}/${Y.name}/${ae.name}`);return g.jsxs("div",{className:"event-row",children:[g.jsxs("code",{children:[ae.name,"(",ae.params?ae.params.map(nn).join(", "):"…",")"]}),g.jsx("button",{className:Ue?"toggle on":"toggle",onClick:()=>{ys(Y.name,ae)},children:Ue?"unwatch":"watch"}),g.jsxs("span",{className:"muted",children:[ae.subscribers," subscriber",ae.subscribers===1?"":"s"]})]},ae.name)})]})]},Y.name))]})]}),g.jsxs("section",{className:"side",children:[g.jsx("nav",{className:"tabs",children:["events","traffic","problems","presence","chat"].map(Y=>g.jsxs("button",{className:ne===Y?"tab on":"tab",onClick:()=>se(Y),children:[Y,Y==="traffic"&&re.length>0&&g.jsx("span",{className:"count",children:re.length}),Y==="problems"&&V.length>0&&g.jsx("span",{className:"count bad",children:V.length}),Y==="chat"&&gs>0&&g.jsx("span",{className:"count",children:gs})]},Y))}),ne==="chat"&&g.jsx(Tw,{peer:z,messages:z?b[z]??[]:[],onSend:ps}),ne==="problems"&&g.jsx(Jw,{problems:V,onClear:()=>k([])}),ne==="presence"&&g.jsx(Ww,{changes:ce,onClear:()=>he([])}),g.jsx(Qw,{service:r,selected:z,frames:re,onClear:()=>ve([]),paused:Le,onPaused:nt,hidden:ne!=="traffic"}),ne==="events"&&g.jsxs("div",{className:"stream",children:[g.jsxs("header",{children:[g.jsx("h1",{children:"Events"}),g.jsxs("div",{className:"traffic-actions",children:[C.length>0&&g.jsx("button",{className:"toggle",onClick:()=>Pw(C,"events.jsonl"),title:"save what is here as jsonl",children:"export"}),C.length>0&&g.jsx("button",{className:"toggle",onClick:()=>Q([]),children:"clear"}),g.jsx("button",{className:Me?"toggle on":"toggle",onClick:()=>ti(!Me),children:Me?"paused":"pause"})]})]}),C.length>0&&g.jsx("input",{className:"control",placeholder:"filter by peer, event or payload",value:Ee,onChange:Y=>it(Y.target.value)}),C.length===0&&g.jsx("p",{className:"muted",children:"Watch an event to see it here."}),C.filter(Y=>{const ae=Ee.trim().toLowerCase();return!ae||`${Y.peer} ${Y.namespace}.${Y.event} ${JSON.stringify(Y.args)}`.toLowerCase().includes(ae)}).map((Y,ae)=>g.jsxs("div",{className:"streamed",children:[g.jsx("time",{children:new Date(Y.at).toLocaleTimeString()}),g.jsxs("code",{children:[Y.peer,"/",Y.namespace,".",Y.event]}),g.jsx("pre",{children:JSON.stringify(Y.args)})]},`${Y.at}-${ae}`))]})]})]})};Mv.createRoot(document.getElementById("root")).render(g.jsx(J.StrictMode,{children:g.jsx(ex,{})}));
|
|
2063
2063
|
//# sourceMappingURL=app.js.map
|