@openscout/scout 0.2.47 → 0.2.49

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.
@@ -1,9 +0,0 @@
1
- function my(c,u){for(var o=0;o<u.length;o++){const f=u[o];if(typeof f!="string"&&!Array.isArray(f)){for(const h in f)if(h!=="default"&&!(h in c)){const v=Object.getOwnPropertyDescriptor(f,h);v&&Object.defineProperty(c,h,v.get?v:{enumerable:!0,get:()=>f[h]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))f(h);new MutationObserver(h=>{for(const v of h)if(v.type==="childList")for(const b of v.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&f(b)}).observe(document,{childList:!0,subtree:!0});function o(h){const v={};return h.integrity&&(v.integrity=h.integrity),h.referrerPolicy&&(v.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?v.credentials="include":h.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function f(h){if(h.ep)return;h.ep=!0;const v=o(h);fetch(h.href,v)}})();function vy(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var Mu={exports:{}},qn={};var ah;function yy(){if(ah)return qn;ah=1;var c=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function o(f,h,v){var b=null;if(v!==void 0&&(b=""+v),h.key!==void 0&&(b=""+h.key),"key"in h){v={};for(var w in h)w!=="key"&&(v[w]=h[w])}else v=h;return h=v.ref,{$$typeof:c,type:f,key:b,ref:h!==void 0?h:null,props:v}}return qn.Fragment=u,qn.jsx=o,qn.jsxs=o,qn}var lh;function gy(){return lh||(lh=1,Mu.exports=yy()),Mu.exports}var s=gy(),_u={exports:{}},ne={};var nh;function py(){if(nh)return ne;nh=1;var c=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),b=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),k=Symbol.iterator;function Y(p){return p===null||typeof p!="object"?null:(p=k&&p[k]||p["@@iterator"],typeof p=="function"?p:null)}var J={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,ue={};function oe(p,D,Q){this.props=p,this.context=D,this.refs=ue,this.updater=Q||J}oe.prototype.isReactComponent={},oe.prototype.setState=function(p,D){if(typeof p!="object"&&typeof p!="function"&&p!=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,p,D,"setState")},oe.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")};function ye(){}ye.prototype=oe.prototype;function le(p,D,Q){this.props=p,this.context=D,this.refs=ue,this.updater=Q||J}var fe=le.prototype=new ye;fe.constructor=le,U(fe,oe.prototype),fe.isPureReactComponent=!0;var Z=Array.isArray;function G(){}var R={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function ge(p,D,Q){var V=Q.ref;return{$$typeof:c,type:p,key:D,ref:V!==void 0?V:null,props:Q}}function q(p,D){return ge(p.type,D,p.props)}function W(p){return typeof p=="object"&&p!==null&&p.$$typeof===c}function se(p){var D={"=":"=0",":":"=2"};return"$"+p.replace(/[=:]/g,function(Q){return D[Q]})}var Ke=/\/+/g;function Re(p,D){return typeof p=="object"&&p!==null&&p.key!=null?se(""+p.key):D.toString(36)}function Qe(p){switch(p.status){case"fulfilled":return p.value;case"rejected":throw p.reason;default:switch(typeof p.status=="string"?p.then(G,G):(p.status="pending",p.then(function(D){p.status==="pending"&&(p.status="fulfilled",p.value=D)},function(D){p.status==="pending"&&(p.status="rejected",p.reason=D)})),p.status){case"fulfilled":return p.value;case"rejected":throw p.reason}}throw p}function z(p,D,Q,V,H){var ae=typeof p;(ae==="undefined"||ae==="boolean")&&(p=null);var re=!1;if(p===null)re=!0;else switch(ae){case"bigint":case"string":case"number":re=!0;break;case"object":switch(p.$$typeof){case c:case u:re=!0;break;case B:return re=p._init,z(re(p._payload),D,Q,V,H)}}if(re)return H=H(p),re=V===""?"."+Re(p,0):V,Z(H)?(Q="",re!=null&&(Q=re.replace(Ke,"$&/")+"/"),z(H,D,Q,"",function(X){return X})):H!=null&&(W(H)&&(H=q(H,Q+(H.key==null||p&&p.key===H.key?"":(""+H.key).replace(Ke,"$&/")+"/")+re)),D.push(H)),1;re=0;var qe=V===""?".":V+":";if(Z(p))for(var Ye=0;Ye<p.length;Ye++)V=p[Ye],ae=qe+Re(V,Ye),re+=z(V,D,Q,ae,H);else if(Ye=Y(p),typeof Ye=="function")for(p=Ye.call(p),Ye=0;!(V=p.next()).done;)V=V.value,ae=qe+Re(V,Ye++),re+=z(V,D,Q,ae,H);else if(ae==="object"){if(typeof p.then=="function")return z(Qe(p),D,Q,V,H);throw D=String(p),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return re}function L(p,D,Q){if(p==null)return p;var V=[],H=0;return z(p,V,"","",function(ae){return D.call(Q,ae,H++)}),V}function F(p){if(p._status===-1){var D=p._result;D=D(),D.then(function(Q){(p._status===0||p._status===-1)&&(p._status=1,p._result=Q)},function(Q){(p._status===0||p._status===-1)&&(p._status=2,p._result=Q)}),p._status===-1&&(p._status=0,p._result=D)}if(p._status===1)return p._result.default;throw p._result}var be=typeof reportError=="function"?reportError:function(p){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof p=="object"&&p!==null&&typeof p.message=="string"?String(p.message):String(p),error:p});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",p);return}console.error(p)},Se={map:L,forEach:function(p,D,Q){L(p,function(){D.apply(this,arguments)},Q)},count:function(p){var D=0;return L(p,function(){D++}),D},toArray:function(p){return L(p,function(D){return D})||[]},only:function(p){if(!W(p))throw Error("React.Children.only expected to receive a single React element child.");return p}};return ne.Activity=_,ne.Children=Se,ne.Component=oe,ne.Fragment=o,ne.Profiler=h,ne.PureComponent=le,ne.StrictMode=f,ne.Suspense=S,ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,ne.__COMPILER_RUNTIME={__proto__:null,c:function(p){return R.H.useMemoCache(p)}},ne.cache=function(p){return function(){return p.apply(null,arguments)}},ne.cacheSignal=function(){return null},ne.cloneElement=function(p,D,Q){if(p==null)throw Error("The argument must be a React element, but you passed "+p+".");var V=U({},p.props),H=p.key;if(D!=null)for(ae in D.key!==void 0&&(H=""+D.key),D)!ee.call(D,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&D.ref===void 0||(V[ae]=D[ae]);var ae=arguments.length-2;if(ae===1)V.children=Q;else if(1<ae){for(var re=Array(ae),qe=0;qe<ae;qe++)re[qe]=arguments[qe+2];V.children=re}return ge(p.type,H,V)},ne.createContext=function(p){return p={$$typeof:b,_currentValue:p,_currentValue2:p,_threadCount:0,Provider:null,Consumer:null},p.Provider=p,p.Consumer={$$typeof:v,_context:p},p},ne.createElement=function(p,D,Q){var V,H={},ae=null;if(D!=null)for(V in D.key!==void 0&&(ae=""+D.key),D)ee.call(D,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(H[V]=D[V]);var re=arguments.length-2;if(re===1)H.children=Q;else if(1<re){for(var qe=Array(re),Ye=0;Ye<re;Ye++)qe[Ye]=arguments[Ye+2];H.children=qe}if(p&&p.defaultProps)for(V in re=p.defaultProps,re)H[V]===void 0&&(H[V]=re[V]);return ge(p,ae,H)},ne.createRef=function(){return{current:null}},ne.forwardRef=function(p){return{$$typeof:w,render:p}},ne.isValidElement=W,ne.lazy=function(p){return{$$typeof:B,_payload:{_status:-1,_result:p},_init:F}},ne.memo=function(p,D){return{$$typeof:y,type:p,compare:D===void 0?null:D}},ne.startTransition=function(p){var D=R.T,Q={};R.T=Q;try{var V=p(),H=R.S;H!==null&&H(Q,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(G,be)}catch(ae){be(ae)}finally{D!==null&&Q.types!==null&&(D.types=Q.types),R.T=D}},ne.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},ne.use=function(p){return R.H.use(p)},ne.useActionState=function(p,D,Q){return R.H.useActionState(p,D,Q)},ne.useCallback=function(p,D){return R.H.useCallback(p,D)},ne.useContext=function(p){return R.H.useContext(p)},ne.useDebugValue=function(){},ne.useDeferredValue=function(p,D){return R.H.useDeferredValue(p,D)},ne.useEffect=function(p,D){return R.H.useEffect(p,D)},ne.useEffectEvent=function(p){return R.H.useEffectEvent(p)},ne.useId=function(){return R.H.useId()},ne.useImperativeHandle=function(p,D,Q){return R.H.useImperativeHandle(p,D,Q)},ne.useInsertionEffect=function(p,D){return R.H.useInsertionEffect(p,D)},ne.useLayoutEffect=function(p,D){return R.H.useLayoutEffect(p,D)},ne.useMemo=function(p,D){return R.H.useMemo(p,D)},ne.useOptimistic=function(p,D){return R.H.useOptimistic(p,D)},ne.useReducer=function(p,D,Q){return R.H.useReducer(p,D,Q)},ne.useRef=function(p){return R.H.useRef(p)},ne.useState=function(p){return R.H.useState(p)},ne.useSyncExternalStore=function(p,D,Q){return R.H.useSyncExternalStore(p,D,Q)},ne.useTransition=function(){return R.H.useTransition()},ne.version="19.2.3",ne}var sh;function Iu(){return sh||(sh=1,_u.exports=py()),_u.exports}var A=Iu();const by=vy(A),I0=my({__proto__:null,default:by},[A]);var Cu={exports:{}},Ln={},Du={exports:{}},Ru={};var ih;function xy(){return ih||(ih=1,(function(c){function u(z,L){var F=z.length;z.push(L);e:for(;0<F;){var be=F-1>>>1,Se=z[be];if(0<h(Se,L))z[be]=L,z[F]=Se,F=be;else break e}}function o(z){return z.length===0?null:z[0]}function f(z){if(z.length===0)return null;var L=z[0],F=z.pop();if(F!==L){z[0]=F;e:for(var be=0,Se=z.length,p=Se>>>1;be<p;){var D=2*(be+1)-1,Q=z[D],V=D+1,H=z[V];if(0>h(Q,F))V<Se&&0>h(H,Q)?(z[be]=H,z[V]=F,be=V):(z[be]=Q,z[D]=F,be=D);else if(V<Se&&0>h(H,F))z[be]=H,z[V]=F,be=V;else break e}}return L}function h(z,L){var F=z.sortIndex-L.sortIndex;return F!==0?F:z.id-L.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;c.unstable_now=function(){return v.now()}}else{var b=Date,w=b.now();c.unstable_now=function(){return b.now()-w}}var S=[],y=[],B=1,_=null,k=3,Y=!1,J=!1,U=!1,ue=!1,oe=typeof setTimeout=="function"?setTimeout:null,ye=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function fe(z){for(var L=o(y);L!==null;){if(L.callback===null)f(y);else if(L.startTime<=z)f(y),L.sortIndex=L.expirationTime,u(S,L);else break;L=o(y)}}function Z(z){if(U=!1,fe(z),!J)if(o(S)!==null)J=!0,G||(G=!0,se());else{var L=o(y);L!==null&&Qe(Z,L.startTime-z)}}var G=!1,R=-1,ee=5,ge=-1;function q(){return ue?!0:!(c.unstable_now()-ge<ee)}function W(){if(ue=!1,G){var z=c.unstable_now();ge=z;var L=!0;try{e:{J=!1,U&&(U=!1,ye(R),R=-1),Y=!0;var F=k;try{t:{for(fe(z),_=o(S);_!==null&&!(_.expirationTime>z&&q());){var be=_.callback;if(typeof be=="function"){_.callback=null,k=_.priorityLevel;var Se=be(_.expirationTime<=z);if(z=c.unstable_now(),typeof Se=="function"){_.callback=Se,fe(z),L=!0;break t}_===o(S)&&f(S),fe(z)}else f(S);_=o(S)}if(_!==null)L=!0;else{var p=o(y);p!==null&&Qe(Z,p.startTime-z),L=!1}}break e}finally{_=null,k=F,Y=!1}L=void 0}}finally{L?se():G=!1}}}var se;if(typeof le=="function")se=function(){le(W)};else if(typeof MessageChannel<"u"){var Ke=new MessageChannel,Re=Ke.port2;Ke.port1.onmessage=W,se=function(){Re.postMessage(null)}}else se=function(){oe(W,0)};function Qe(z,L){R=oe(function(){z(c.unstable_now())},L)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(z){z.callback=null},c.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<z?Math.floor(1e3/z):5},c.unstable_getCurrentPriorityLevel=function(){return k},c.unstable_next=function(z){switch(k){case 1:case 2:case 3:var L=3;break;default:L=k}var F=k;k=L;try{return z()}finally{k=F}},c.unstable_requestPaint=function(){ue=!0},c.unstable_runWithPriority=function(z,L){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var F=k;k=z;try{return L()}finally{k=F}},c.unstable_scheduleCallback=function(z,L,F){var be=c.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?be+F:be):F=be,z){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=F+Se,z={id:B++,callback:L,priorityLevel:z,startTime:F,expirationTime:Se,sortIndex:-1},F>be?(z.sortIndex=F,u(y,z),o(S)===null&&z===o(y)&&(U?(ye(R),R=-1):U=!0,Qe(Z,F-be))):(z.sortIndex=Se,u(S,z),J||Y||(J=!0,G||(G=!0,se()))),z},c.unstable_shouldYield=q,c.unstable_wrapCallback=function(z){var L=k;return function(){var F=k;k=L;try{return z.apply(this,arguments)}finally{k=F}}}})(Ru)),Ru}var ch;function Ny(){return ch||(ch=1,Du.exports=xy()),Du.exports}var Ou={exports:{}},ct={};var uh;function jy(){if(uh)return ct;uh=1;var c=Iu();function u(S){var y="https://react.dev/errors/"+S;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var B=2;B<arguments.length;B++)y+="&args[]="+encodeURIComponent(arguments[B])}return"Minified React error #"+S+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var f={d:{f:o,r:function(){throw Error(u(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},h=Symbol.for("react.portal");function v(S,y,B){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:_==null?null:""+_,children:S,containerInfo:y,implementation:B}}var b=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function w(S,y){if(S==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,ct.createPortal=function(S,y){var B=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(u(299));return v(S,y,null,B)},ct.flushSync=function(S){var y=b.T,B=f.p;try{if(b.T=null,f.p=2,S)return S()}finally{b.T=y,f.p=B,f.d.f()}},ct.preconnect=function(S,y){typeof S=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,f.d.C(S,y))},ct.prefetchDNS=function(S){typeof S=="string"&&f.d.D(S)},ct.preinit=function(S,y){if(typeof S=="string"&&y&&typeof y.as=="string"){var B=y.as,_=w(B,y.crossOrigin),k=typeof y.integrity=="string"?y.integrity:void 0,Y=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;B==="style"?f.d.S(S,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:_,integrity:k,fetchPriority:Y}):B==="script"&&f.d.X(S,{crossOrigin:_,integrity:k,fetchPriority:Y,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},ct.preinitModule=function(S,y){if(typeof S=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var B=w(y.as,y.crossOrigin);f.d.M(S,{crossOrigin:B,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&f.d.M(S)},ct.preload=function(S,y){if(typeof S=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var B=y.as,_=w(B,y.crossOrigin);f.d.L(S,B,{crossOrigin:_,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},ct.preloadModule=function(S,y){if(typeof S=="string")if(y){var B=w(y.as,y.crossOrigin);f.d.m(S,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:B,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else f.d.m(S)},ct.requestFormReset=function(S){f.d.r(S)},ct.unstable_batchedUpdates=function(S,y){return S(y)},ct.useFormState=function(S,y,B){return b.H.useFormState(S,y,B)},ct.useFormStatus=function(){return b.H.useHostTransitionStatus()},ct.version="19.2.3",ct}var rh;function Sy(){if(rh)return Ou.exports;rh=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(u){console.error(u)}}return c(),Ou.exports=jy(),Ou.exports}var oh;function Ay(){if(oh)return Ln;oh=1;var c=Ny(),u=Iu(),o=Sy();function f(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function v(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function b(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 w(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 S(e){if(v(e)!==e)throw Error(f(188))}function y(e){var t=e.alternate;if(!t){if(t=v(e),t===null)throw Error(f(188));return t!==e?null:e}for(var a=e,l=t;;){var n=a.return;if(n===null)break;var i=n.alternate;if(i===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===a)return S(n),e;if(i===l)return S(n),t;i=i.sibling}throw Error(f(188))}if(a.return!==l.return)a=n,l=i;else{for(var r=!1,d=n.child;d;){if(d===a){r=!0,a=n,l=i;break}if(d===l){r=!0,l=n,a=i;break}d=d.sibling}if(!r){for(d=i.child;d;){if(d===a){r=!0,a=i,l=n;break}if(d===l){r=!0,l=i,a=n;break}d=d.sibling}if(!r)throw Error(f(189))}}if(a.alternate!==l)throw Error(f(190))}if(a.tag!==3)throw Error(f(188));return a.stateNode.current===a?e:t}function B(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=B(e),t!==null)return t;e=e.sibling}return null}var _=Object.assign,k=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),ye=Symbol.for("react.consumer"),le=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Symbol.for("react.client.reference");function Re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ke?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case oe:return"Profiler";case ue:return"StrictMode";case Z:return"Suspense";case G:return"SuspenseList";case ge:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case J:return"Portal";case le:return e.displayName||"Context";case ye:return(e._context.displayName||"Context")+".Consumer";case fe: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:Re(e.type)||"Memo";case ee:t=e._payload,e=e._init;try{return Re(e(t))}catch{}}return null}var Qe=Array.isArray,z=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},be=[],Se=-1;function p(e){return{current:e}}function D(e){0>Se||(e.current=be[Se],be[Se]=null,Se--)}function Q(e,t){Se++,be[Se]=e.current,e.current=t}var V=p(null),H=p(null),ae=p(null),re=p(null);function qe(e,t){switch(Q(ae,t),Q(H,e),Q(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ed(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ed(t),e=wd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D(V),Q(V,e)}function Ye(){D(V),D(H),D(ae)}function X(e){e.memoizedState!==null&&Q(re,e);var t=V.current,a=wd(t,e.type);t!==a&&(Q(H,e),Q(V,a))}function I(e){H.current===e&&(D(V),D(H)),re.current===e&&(D(re),Un._currentValue=F)}var xe,Oe;function Ae(e){if(xe===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||"",Oe=-1<a.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+xe+e+Oe}var Ue=!1;function Je(e,t){if(!e||Ue)return"";Ue=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(T){var E=T}Reflect.construct(e,[],O)}else{try{O.call()}catch(T){E=T}e.call(O.prototype)}}else{try{throw Error()}catch(T){E=T}(O=e())&&typeof O.catch=="function"&&O.catch(function(){})}}catch(T){if(T&&E&&typeof T.stack=="string")return[T.stack,E.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),r=i[0],d=i[1];if(r&&d){var m=r.split(`
4
- `),j=d.split(`
5
- `);for(n=l=0;l<m.length&&!m[l].includes("DetermineComponentFrameRoot");)l++;for(;n<j.length&&!j[n].includes("DetermineComponentFrameRoot");)n++;if(l===m.length||n===j.length)for(l=m.length-1,n=j.length-1;1<=l&&0<=n&&m[l]!==j[n];)n--;for(;1<=l&&0<=n;l--,n--)if(m[l]!==j[n]){if(l!==1||n!==1)do if(l--,n--,0>n||m[l]!==j[n]){var M=`
6
- `+m[l].replace(" at new "," at ");return e.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",e.displayName)),M}while(1<=l&&0<=n);break}}}finally{Ue=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ae(a):""}function Gn(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae("Lazy");case 13:return e.child!==t&&t!==null?Ae("Suspense Fallback"):Ae("Suspense");case 19:return Ae("SuspenseList");case 0:case 15:return Je(e.type,!1);case 11:return Je(e.type.render,!1);case 1:return Je(e.type,!0);case 31:return Ae("Activity");default:return""}}function Ht(e){try{var t="",a=null;do t+=Gn(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
- Error generating stack: `+l.message+`
8
- `+l.stack}}var mi=Object.prototype.hasOwnProperty,vi=c.unstable_scheduleCallback,yi=c.unstable_cancelCallback,Vh=c.unstable_shouldYield,Kh=c.unstable_requestPaint,gt=c.unstable_now,Jh=c.unstable_getCurrentPriorityLevel,tr=c.unstable_ImmediatePriority,ar=c.unstable_UserBlockingPriority,Xn=c.unstable_NormalPriority,$h=c.unstable_LowPriority,lr=c.unstable_IdlePriority,Wh=c.log,Ih=c.unstable_setDisableYieldValue,Vl=null,pt=null;function ya(e){if(typeof Wh=="function"&&Ih(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Vl,e)}catch{}}var bt=Math.clz32?Math.clz32:em,Fh=Math.log,Ph=Math.LN2;function em(e){return e>>>=0,e===0?32:31-(Fh(e)/Ph|0)|0}var Zn=256,Vn=262144,Kn=4194304;function Ya(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 Jn(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var n=0,i=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~i,l!==0?n=Ya(l):(r&=d,r!==0?n=Ya(r):a||(a=d&~e,a!==0&&(n=Ya(a))))):(d=l&~i,d!==0?n=Ya(d):r!==0?n=Ya(r):a||(a=l&~e,a!==0&&(n=Ya(a)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:n}function Kl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tm(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 nr(){var e=Kn;return Kn<<=1,(Kn&62914560)===0&&(Kn=4194304),e}function gi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Jl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function am(e,t,a,l,n,i){var r=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var d=e.entanglements,m=e.expirationTimes,j=e.hiddenUpdates;for(a=r&~a;0<a;){var M=31-bt(a),O=1<<M;d[M]=0,m[M]=-1;var E=j[M];if(E!==null)for(j[M]=null,M=0;M<E.length;M++){var T=E[M];T!==null&&(T.lane&=-536870913)}a&=~O}l!==0&&sr(e,l,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(r&~t))}function sr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-bt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function ir(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-bt(a),n=1<<l;n&t|e[l]&t&&(e[l]|=t),a&=~n}}function cr(e,t){var a=t&-t;return a=(a&42)!==0?1:pi(a),(a&(e.suspendedLanes|t))!==0?0:a}function pi(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 bi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ur(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:$d(e.type))}function rr(e,t){var a=L.p;try{return L.p=e,t()}finally{L.p=a}}var ga=Math.random().toString(36).slice(2),at="__reactFiber$"+ga,rt="__reactProps$"+ga,cl="__reactContainer$"+ga,xi="__reactEvents$"+ga,lm="__reactListeners$"+ga,nm="__reactHandles$"+ga,or="__reactResources$"+ga,$l="__reactMarker$"+ga;function Ni(e){delete e[at],delete e[rt],delete e[xi],delete e[lm],delete e[nm]}function ul(e){var t=e[at];if(t)return t;for(var a=e.parentNode;a;){if(t=a[cl]||a[at]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Rd(e);e!==null;){if(a=e[at])return a;e=Rd(e)}return t}e=a,a=e.parentNode}return null}function rl(e){if(e=e[at]||e[cl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Wl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(f(33))}function ol(e){var t=e[or];return t||(t=e[or]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[$l]=!0}var fr=new Set,dr={};function Qa(e,t){fl(e,t),fl(e+"Capture",t)}function fl(e,t){for(dr[e]=t,e=0;e<t.length;e++)fr.add(t[e])}var sm=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]*$"),hr={},mr={};function im(e){return mi.call(mr,e)?!0:mi.call(hr,e)?!1:sm.test(e)?mr[e]=!0:(hr[e]=!0,!1)}function $n(e,t,a){if(im(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Wn(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Wt(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}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 vr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cm(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var n=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(r){a=""+r,i.call(this,r)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(r){a=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ji(e){if(!e._valueTracker){var t=vr(e)?"checked":"value";e._valueTracker=cm(e,t,""+e[t])}}function yr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=vr(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function In(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 um=/[\n"\\]/g;function Mt(e){return e.replace(um,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Si(e,t,a,l,n,i,r,d){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zt(t)):e.value!==""+zt(t)&&(e.value=""+zt(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?Ai(e,r,zt(t)):a!=null?Ai(e,r,zt(a)):l!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+zt(d):e.removeAttribute("name")}function gr(e,t,a,l,n,i,r,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){ji(e);return}a=a!=null?""+zt(a):"",t=t!=null?""+zt(t):a,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),ji(e)}function Ai(e,t,a){t==="number"&&In(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function dl(e,t,a,l){if(e=e.options,t){t={};for(var n=0;n<a.length;n++)t["$"+a[n]]=!0;for(a=0;a<e.length;a++)n=t.hasOwnProperty("$"+e[a].value),e[a].selected!==n&&(e[a].selected=n),n&&l&&(e[a].defaultSelected=!0)}else{for(a=""+zt(a),t=null,n=0;n<e.length;n++){if(e[n].value===a){e[n].selected=!0,l&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function pr(e,t,a){if(t!=null&&(t=""+zt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+zt(a):""}function br(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(f(92));if(Qe(l)){if(1<l.length)throw Error(f(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=zt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),ji(e)}function hl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var rm=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 xr(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||rm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Nr(e,t,a){if(t!=null&&typeof t!="object")throw Error(f(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var n in t)l=t[n],t.hasOwnProperty(n)&&a[n]!==l&&xr(e,n,l)}else for(var i in t)t.hasOwnProperty(i)&&xr(e,i,t[i])}function Ei(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 om=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"]]),fm=/^[\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 Fn(e){return fm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function It(){}var wi=null;function Ti(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ml=null,vl=null;function jr(e){var t=rl(e);if(t&&(e=t.stateNode)){var a=e[rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Si(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Mt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var n=l[rt]||null;if(!n)throw Error(f(90));Si(l,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&yr(l)}break e;case"textarea":pr(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&dl(e,!!a.multiple,t,!1)}}}var zi=!1;function Sr(e,t,a){if(zi)return e(t,a);zi=!0;try{var l=e(t);return l}finally{if(zi=!1,(ml!==null||vl!==null)&&(qs(),ml&&(t=ml,e=vl,vl=ml=null,jr(t),e)))for(t=0;t<e.length;t++)jr(e[t])}}function Il(e,t){var a=e.stateNode;if(a===null)return null;var l=a[rt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(f(231,t,typeof a));return a}var Ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mi=!1;if(Ft)try{var Fl={};Object.defineProperty(Fl,"passive",{get:function(){Mi=!0}}),window.addEventListener("test",Fl,Fl),window.removeEventListener("test",Fl,Fl)}catch{Mi=!1}var pa=null,_i=null,Pn=null;function Ar(){if(Pn)return Pn;var e,t=_i,a=t.length,l,n="value"in pa?pa.value:pa.textContent,i=n.length;for(e=0;e<a&&t[e]===n[e];e++);var r=a-e;for(l=1;l<=r&&t[a-l]===n[i-l];l++);return Pn=n.slice(e,1<l?1-l:void 0)}function es(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 ts(){return!0}function Er(){return!1}function ot(e){function t(a,l,n,i,r){this._reactName=a,this._targetInst=n,this.type=l,this.nativeEvent=i,this.target=r,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(a=e[d],this[d]=a?a(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ts:Er,this.isPropagationStopped=Er,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ts)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ts)},persist:function(){},isPersistent:ts}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},as=ot(Ga),Pl=_({},Ga,{view:0,detail:0}),dm=ot(Pl),Ci,Di,en,ls=_({},Pl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oi,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!==en&&(en&&e.type==="mousemove"?(Ci=e.screenX-en.screenX,Di=e.screenY-en.screenY):Di=Ci=0,en=e),Ci)},movementY:function(e){return"movementY"in e?e.movementY:Di}}),wr=ot(ls),hm=_({},ls,{dataTransfer:0}),mm=ot(hm),vm=_({},Pl,{relatedTarget:0}),Ri=ot(vm),ym=_({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),gm=ot(ym),pm=_({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bm=ot(pm),xm=_({},Ga,{data:0}),Tr=ot(xm),Nm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jm={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"},Sm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Am(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sm[e])?!!t[e]:!1}function Oi(){return Am}var Em=_({},Pl,{key:function(e){if(e.key){var t=Nm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oi,charCode:function(e){return e.type==="keypress"?es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wm=ot(Em),Tm=_({},ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zr=ot(Tm),zm=_({},Pl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oi}),Mm=ot(zm),_m=_({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cm=ot(_m),Dm=_({},ls,{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}),Rm=ot(Dm),Om=_({},Ga,{newState:0,oldState:0}),Um=ot(Om),km=[9,13,27,32],Ui=Ft&&"CompositionEvent"in window,tn=null;Ft&&"documentMode"in document&&(tn=document.documentMode);var Bm=Ft&&"TextEvent"in window&&!tn,Mr=Ft&&(!Ui||tn&&8<tn&&11>=tn),_r=" ",Cr=!1;function Dr(e,t){switch(e){case"keyup":return km.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yl=!1;function Hm(e,t){switch(e){case"compositionend":return Rr(t);case"keypress":return t.which!==32?null:(Cr=!0,_r);case"textInput":return e=t.data,e===_r&&Cr?null:e;default:return null}}function qm(e,t){if(yl)return e==="compositionend"||!Ui&&Dr(e,t)?(e=Ar(),Pn=_i=pa=null,yl=!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 Mr&&t.locale!=="ko"?null:t.data;default:return null}}var Lm={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 Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Lm[e.type]:t==="textarea"}function Ur(e,t,a,l){ml?vl?vl.push(l):vl=[l]:ml=l,t=Vs(t,"onChange"),0<t.length&&(a=new as("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var an=null,ln=null;function Ym(e){bd(e,0)}function ns(e){var t=Wl(e);if(yr(t))return e}function kr(e,t){if(e==="change")return t}var Br=!1;if(Ft){var ki;if(Ft){var Bi="oninput"in document;if(!Bi){var Hr=document.createElement("div");Hr.setAttribute("oninput","return;"),Bi=typeof Hr.oninput=="function"}ki=Bi}else ki=!1;Br=ki&&(!document.documentMode||9<document.documentMode)}function qr(){an&&(an.detachEvent("onpropertychange",Lr),ln=an=null)}function Lr(e){if(e.propertyName==="value"&&ns(ln)){var t=[];Ur(t,ln,e,Ti(e)),Sr(Ym,t)}}function Qm(e,t,a){e==="focusin"?(qr(),an=t,ln=a,an.attachEvent("onpropertychange",Lr)):e==="focusout"&&qr()}function Gm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ns(ln)}function Xm(e,t){if(e==="click")return ns(t)}function Zm(e,t){if(e==="input"||e==="change")return ns(t)}function Vm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:Vm;function nn(e,t){if(xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var n=a[l];if(!mi.call(t,n)||!xt(e[n],t[n]))return!1}return!0}function Yr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qr(e,t){var a=Yr(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Yr(a)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=In(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=In(e.document)}return t}function Hi(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 Km=Ft&&"documentMode"in document&&11>=document.documentMode,gl=null,qi=null,sn=null,Li=!1;function Zr(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Li||gl==null||gl!==In(l)||(l=gl,"selectionStart"in l&&Hi(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),sn&&nn(sn,l)||(sn=l,l=Vs(qi,"onSelect"),0<l.length&&(t=new as("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=gl)))}function Xa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var pl={animationend:Xa("Animation","AnimationEnd"),animationiteration:Xa("Animation","AnimationIteration"),animationstart:Xa("Animation","AnimationStart"),transitionrun:Xa("Transition","TransitionRun"),transitionstart:Xa("Transition","TransitionStart"),transitioncancel:Xa("Transition","TransitionCancel"),transitionend:Xa("Transition","TransitionEnd")},Yi={},Vr={};Ft&&(Vr=document.createElement("div").style,"AnimationEvent"in window||(delete pl.animationend.animation,delete pl.animationiteration.animation,delete pl.animationstart.animation),"TransitionEvent"in window||delete pl.transitionend.transition);function Za(e){if(Yi[e])return Yi[e];if(!pl[e])return e;var t=pl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Vr)return Yi[e]=t[a];return e}var Kr=Za("animationend"),Jr=Za("animationiteration"),$r=Za("animationstart"),Jm=Za("transitionrun"),$m=Za("transitionstart"),Wm=Za("transitioncancel"),Wr=Za("transitionend"),Ir=new Map,Qi="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(" ");Qi.push("scrollEnd");function qt(e,t){Ir.set(e,t),Qa(t,[e])}var ss=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)},_t=[],bl=0,Gi=0;function is(){for(var e=bl,t=Gi=bl=0;t<e;){var a=_t[t];_t[t++]=null;var l=_t[t];_t[t++]=null;var n=_t[t];_t[t++]=null;var i=_t[t];if(_t[t++]=null,l!==null&&n!==null){var r=l.pending;r===null?n.next=n:(n.next=r.next,r.next=n),l.pending=n}i!==0&&Fr(a,n,i)}}function cs(e,t,a,l){_t[bl++]=e,_t[bl++]=t,_t[bl++]=a,_t[bl++]=l,Gi|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Xi(e,t,a,l){return cs(e,t,a,l),us(e)}function Va(e,t){return cs(e,null,null,t),us(e)}function Fr(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var n=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-bt(a),e=i.hiddenUpdates,l=e[n],l===null?e[n]=[t]:l.push(t),t.lane=a|536870912),i):null}function us(e){if(50<zn)throw zn=0,Pc=null,Error(f(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xl={};function Im(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,t,a,l){return new Im(e,t,a,l)}function Zi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pt(e,t){var a=e.alternate;return a===null?(a=Nt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Pr(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function rs(e,t,a,l,n,i){var r=0;if(l=e,typeof e=="function")Zi(e)&&(r=1);else if(typeof e=="string")r=ay(e,a,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ge:return e=Nt(31,a,t,n),e.elementType=ge,e.lanes=i,e;case U:return Ka(a.children,n,i,t);case ue:r=8,n|=24;break;case oe:return e=Nt(12,a,t,n|2),e.elementType=oe,e.lanes=i,e;case Z:return e=Nt(13,a,t,n),e.elementType=Z,e.lanes=i,e;case G:return e=Nt(19,a,t,n),e.elementType=G,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:r=10;break e;case ye:r=9;break e;case fe:r=11;break e;case R:r=14;break e;case ee:r=16,l=null;break e}r=29,a=Error(f(130,e===null?"null":typeof e,"")),l=null}return t=Nt(r,a,t,n),t.elementType=e,t.type=l,t.lanes=i,t}function Ka(e,t,a,l){return e=Nt(7,e,l,t),e.lanes=a,e}function Vi(e,t,a){return e=Nt(6,e,null,t),e.lanes=a,e}function eo(e){var t=Nt(18,null,null,0);return t.stateNode=e,t}function Ki(e,t,a){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var to=new WeakMap;function Ct(e,t){if(typeof e=="object"&&e!==null){var a=to.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ht(t)},to.set(e,t),t)}return{value:e,source:t,stack:Ht(t)}}var Nl=[],jl=0,os=null,cn=0,Dt=[],Rt=0,ba=null,Gt=1,Xt="";function ea(e,t){Nl[jl++]=cn,Nl[jl++]=os,os=e,cn=t}function ao(e,t,a){Dt[Rt++]=Gt,Dt[Rt++]=Xt,Dt[Rt++]=ba,ba=e;var l=Gt;e=Xt;var n=32-bt(l)-1;l&=~(1<<n),a+=1;var i=32-bt(t)+n;if(30<i){var r=n-n%5;i=(l&(1<<r)-1).toString(32),l>>=r,n-=r,Gt=1<<32-bt(t)+n|a<<n|l,Xt=i+e}else Gt=1<<i|a<<n|l,Xt=e}function Ji(e){e.return!==null&&(ea(e,1),ao(e,1,0))}function $i(e){for(;e===os;)os=Nl[--jl],Nl[jl]=null,cn=Nl[--jl],Nl[jl]=null;for(;e===ba;)ba=Dt[--Rt],Dt[Rt]=null,Xt=Dt[--Rt],Dt[Rt]=null,Gt=Dt[--Rt],Dt[Rt]=null}function lo(e,t){Dt[Rt++]=Gt,Dt[Rt++]=Xt,Dt[Rt++]=ba,Gt=t.id,Xt=t.overflow,ba=e}var lt=null,ke=null,pe=!1,xa=null,Ot=!1,Wi=Error(f(519));function Na(e){var t=Error(f(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw un(Ct(t,e)),Wi}function no(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[at]=e,t[rt]=l,a){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(a=0;a<_n.length;a++)he(_n[a],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),gr(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),br(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Sd(t.textContent,a)?(l.popover!=null&&(he("beforetoggle",t),he("toggle",t)),l.onScroll!=null&&he("scroll",t),l.onScrollEnd!=null&&he("scrollend",t),l.onClick!=null&&(t.onclick=It),t=!0):t=!1,t||Na(e,!0)}function so(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Ot=!1;return;case 27:case 3:Ot=!0;return;default:lt=lt.return}}function Sl(e){if(e!==lt)return!1;if(!pe)return so(e),pe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||mu(e.type,e.memoizedProps)),a=!a),a&&ke&&Na(e),so(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(317));ke=Dd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(317));ke=Dd(e)}else t===27?(t=ke,Ua(e.type)?(e=bu,bu=null,ke=e):ke=t):ke=lt?kt(e.stateNode.nextSibling):null;return!0}function Ja(){ke=lt=null,pe=!1}function Ii(){var e=xa;return e!==null&&(mt===null?mt=e:mt.push.apply(mt,e),xa=null),e}function un(e){xa===null?xa=[e]:xa.push(e)}var Fi=p(null),$a=null,ta=null;function ja(e,t,a){Q(Fi,t._currentValue),t._currentValue=a}function aa(e){e._currentValue=Fi.current,D(Fi)}function Pi(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function ec(e,t,a,l){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var r=n.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=n;for(var m=0;m<t.length;m++)if(d.context===t[m]){i.lanes|=a,d=i.alternate,d!==null&&(d.lanes|=a),Pi(i.return,a,e),l||(r=null);break e}i=d.next}}else if(n.tag===18){if(r=n.return,r===null)throw Error(f(341));r.lanes|=a,i=r.alternate,i!==null&&(i.lanes|=a),Pi(r,a,e),r=null}else r=n.child;if(r!==null)r.return=n;else for(r=n;r!==null;){if(r===e){r=null;break}if(n=r.sibling,n!==null){n.return=r.return,r=n;break}r=r.return}n=r}}function Al(e,t,a,l){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var r=n.alternate;if(r===null)throw Error(f(387));if(r=r.memoizedProps,r!==null){var d=n.type;xt(n.pendingProps.value,r.value)||(e!==null?e.push(d):e=[d])}}else if(n===re.current){if(r=n.alternate,r===null)throw Error(f(387));r.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Un):e=[Un])}n=n.return}e!==null&&ec(t,e,a,l),t.flags|=262144}function fs(e){for(e=e.firstContext;e!==null;){if(!xt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wa(e){$a=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function nt(e){return io($a,e)}function ds(e,t){return $a===null&&Wa(e),io(e,t)}function io(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ta===null){if(e===null)throw Error(f(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return a}var Fm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Pm=c.unstable_scheduleCallback,ev=c.unstable_NormalPriority,$e={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tc(){return{controller:new Fm,data:new Map,refCount:0}}function rn(e){e.refCount--,e.refCount===0&&Pm(ev,function(){e.controller.abort()})}var on=null,ac=0,El=0,wl=null;function tv(e,t){if(on===null){var a=on=[];ac=0,El=su(),wl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return ac++,t.then(co,co),t}function co(){if(--ac===0&&on!==null){wl!==null&&(wl.status="fulfilled");var e=on;on=null,El=0,wl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function av(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var n=0;n<a.length;n++)(0,a[n])(t)},function(n){for(l.status="rejected",l.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),l}var uo=z.S;z.S=function(e,t){Kf=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&tv(e,t),uo!==null&&uo(e,t)};var Ia=p(null);function lc(){var e=Ia.current;return e!==null?e:De.pooledCache}function hs(e,t){t===null?Q(Ia,Ia.current):Q(Ia,t.pool)}function ro(){var e=lc();return e===null?null:{parent:$e._currentValue,pool:e}}var Tl=Error(f(460)),nc=Error(f(474)),ms=Error(f(542)),vs={then:function(){}};function oo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function fo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(It,It),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mo(e),e;default:if(typeof t.status=="string")t.then(It,It);else{if(e=De,e!==null&&100<e.shellSuspendCounter)throw Error(f(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=l}},function(l){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mo(e),e}throw Pa=t,Tl}}function Fa(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Pa=a,Tl):a}}var Pa=null;function ho(){if(Pa===null)throw Error(f(459));var e=Pa;return Pa=null,e}function mo(e){if(e===Tl||e===ms)throw Error(f(483))}var zl=null,fn=0;function ys(e){var t=fn;return fn+=1,zl===null&&(zl=[]),fo(zl,e,t)}function dn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function gs(e,t){throw t.$$typeof===k?Error(f(525)):(e=Object.prototype.toString.call(t),Error(f(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function vo(e){function t(x,g){if(e){var N=x.deletions;N===null?(x.deletions=[g],x.flags|=16):N.push(g)}}function a(x,g){if(!e)return null;for(;g!==null;)t(x,g),g=g.sibling;return null}function l(x){for(var g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function n(x,g){return x=Pt(x,g),x.index=0,x.sibling=null,x}function i(x,g,N){return x.index=N,e?(N=x.alternate,N!==null?(N=N.index,N<g?(x.flags|=67108866,g):N):(x.flags|=67108866,g)):(x.flags|=1048576,g)}function r(x){return e&&x.alternate===null&&(x.flags|=67108866),x}function d(x,g,N,C){return g===null||g.tag!==6?(g=Vi(N,x.mode,C),g.return=x,g):(g=n(g,N),g.return=x,g)}function m(x,g,N,C){var P=N.type;return P===U?M(x,g,N.props.children,C,N.key):g!==null&&(g.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ee&&Fa(P)===g.type)?(g=n(g,N.props),dn(g,N),g.return=x,g):(g=rs(N.type,N.key,N.props,null,x.mode,C),dn(g,N),g.return=x,g)}function j(x,g,N,C){return g===null||g.tag!==4||g.stateNode.containerInfo!==N.containerInfo||g.stateNode.implementation!==N.implementation?(g=Ki(N,x.mode,C),g.return=x,g):(g=n(g,N.children||[]),g.return=x,g)}function M(x,g,N,C,P){return g===null||g.tag!==7?(g=Ka(N,x.mode,C,P),g.return=x,g):(g=n(g,N),g.return=x,g)}function O(x,g,N){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Vi(""+g,x.mode,N),g.return=x,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Y:return N=rs(g.type,g.key,g.props,null,x.mode,N),dn(N,g),N.return=x,N;case J:return g=Ki(g,x.mode,N),g.return=x,g;case ee:return g=Fa(g),O(x,g,N)}if(Qe(g)||se(g))return g=Ka(g,x.mode,N,null),g.return=x,g;if(typeof g.then=="function")return O(x,ys(g),N);if(g.$$typeof===le)return O(x,ds(x,g),N);gs(x,g)}return null}function E(x,g,N,C){var P=g!==null?g.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return P!==null?null:d(x,g,""+N,C);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Y:return N.key===P?m(x,g,N,C):null;case J:return N.key===P?j(x,g,N,C):null;case ee:return N=Fa(N),E(x,g,N,C)}if(Qe(N)||se(N))return P!==null?null:M(x,g,N,C,null);if(typeof N.then=="function")return E(x,g,ys(N),C);if(N.$$typeof===le)return E(x,g,ds(x,N),C);gs(x,N)}return null}function T(x,g,N,C,P){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return x=x.get(N)||null,d(g,x,""+C,P);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Y:return x=x.get(C.key===null?N:C.key)||null,m(g,x,C,P);case J:return x=x.get(C.key===null?N:C.key)||null,j(g,x,C,P);case ee:return C=Fa(C),T(x,g,N,C,P)}if(Qe(C)||se(C))return x=x.get(N)||null,M(g,x,C,P,null);if(typeof C.then=="function")return T(x,g,N,ys(C),P);if(C.$$typeof===le)return T(x,g,N,ds(g,C),P);gs(g,C)}return null}function K(x,g,N,C){for(var P=null,Ne=null,$=g,ce=g=0,ve=null;$!==null&&ce<N.length;ce++){$.index>ce?(ve=$,$=null):ve=$.sibling;var je=E(x,$,N[ce],C);if(je===null){$===null&&($=ve);break}e&&$&&je.alternate===null&&t(x,$),g=i(je,g,ce),Ne===null?P=je:Ne.sibling=je,Ne=je,$=ve}if(ce===N.length)return a(x,$),pe&&ea(x,ce),P;if($===null){for(;ce<N.length;ce++)$=O(x,N[ce],C),$!==null&&(g=i($,g,ce),Ne===null?P=$:Ne.sibling=$,Ne=$);return pe&&ea(x,ce),P}for($=l($);ce<N.length;ce++)ve=T($,x,ce,N[ce],C),ve!==null&&(e&&ve.alternate!==null&&$.delete(ve.key===null?ce:ve.key),g=i(ve,g,ce),Ne===null?P=ve:Ne.sibling=ve,Ne=ve);return e&&$.forEach(function(La){return t(x,La)}),pe&&ea(x,ce),P}function te(x,g,N,C){if(N==null)throw Error(f(151));for(var P=null,Ne=null,$=g,ce=g=0,ve=null,je=N.next();$!==null&&!je.done;ce++,je=N.next()){$.index>ce?(ve=$,$=null):ve=$.sibling;var La=E(x,$,je.value,C);if(La===null){$===null&&($=ve);break}e&&$&&La.alternate===null&&t(x,$),g=i(La,g,ce),Ne===null?P=La:Ne.sibling=La,Ne=La,$=ve}if(je.done)return a(x,$),pe&&ea(x,ce),P;if($===null){for(;!je.done;ce++,je=N.next())je=O(x,je.value,C),je!==null&&(g=i(je,g,ce),Ne===null?P=je:Ne.sibling=je,Ne=je);return pe&&ea(x,ce),P}for($=l($);!je.done;ce++,je=N.next())je=T($,x,ce,je.value,C),je!==null&&(e&&je.alternate!==null&&$.delete(je.key===null?ce:je.key),g=i(je,g,ce),Ne===null?P=je:Ne.sibling=je,Ne=je);return e&&$.forEach(function(hy){return t(x,hy)}),pe&&ea(x,ce),P}function Ce(x,g,N,C){if(typeof N=="object"&&N!==null&&N.type===U&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case Y:e:{for(var P=N.key;g!==null;){if(g.key===P){if(P=N.type,P===U){if(g.tag===7){a(x,g.sibling),C=n(g,N.props.children),C.return=x,x=C;break e}}else if(g.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ee&&Fa(P)===g.type){a(x,g.sibling),C=n(g,N.props),dn(C,N),C.return=x,x=C;break e}a(x,g);break}else t(x,g);g=g.sibling}N.type===U?(C=Ka(N.props.children,x.mode,C,N.key),C.return=x,x=C):(C=rs(N.type,N.key,N.props,null,x.mode,C),dn(C,N),C.return=x,x=C)}return r(x);case J:e:{for(P=N.key;g!==null;){if(g.key===P)if(g.tag===4&&g.stateNode.containerInfo===N.containerInfo&&g.stateNode.implementation===N.implementation){a(x,g.sibling),C=n(g,N.children||[]),C.return=x,x=C;break e}else{a(x,g);break}else t(x,g);g=g.sibling}C=Ki(N,x.mode,C),C.return=x,x=C}return r(x);case ee:return N=Fa(N),Ce(x,g,N,C)}if(Qe(N))return K(x,g,N,C);if(se(N)){if(P=se(N),typeof P!="function")throw Error(f(150));return N=P.call(N),te(x,g,N,C)}if(typeof N.then=="function")return Ce(x,g,ys(N),C);if(N.$$typeof===le)return Ce(x,g,ds(x,N),C);gs(x,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,g!==null&&g.tag===6?(a(x,g.sibling),C=n(g,N),C.return=x,x=C):(a(x,g),C=Vi(N,x.mode,C),C.return=x,x=C),r(x)):a(x,g)}return function(x,g,N,C){try{fn=0;var P=Ce(x,g,N,C);return zl=null,P}catch($){if($===Tl||$===ms)throw $;var Ne=Nt(29,$,null,x.mode);return Ne.lanes=C,Ne.return=x,Ne}}}var el=vo(!0),yo=vo(!1),Sa=!1;function sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ic(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 Aa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ea(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ee&2)!==0){var n=l.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),l.pending=t,t=us(e),Fr(e,null,a),t}return cs(e,l,t,a),us(e)}function hn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ir(e,a)}}function cc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var n=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var r={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?n=i=r:i=i.next=r,a=a.next}while(a!==null);i===null?n=i=t:i=i.next=t}else n=i=t;a={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var uc=!1;function mn(){if(uc){var e=wl;if(e!==null)throw e}}function vn(e,t,a,l){uc=!1;var n=e.updateQueue;Sa=!1;var i=n.firstBaseUpdate,r=n.lastBaseUpdate,d=n.shared.pending;if(d!==null){n.shared.pending=null;var m=d,j=m.next;m.next=null,r===null?i=j:r.next=j,r=m;var M=e.alternate;M!==null&&(M=M.updateQueue,d=M.lastBaseUpdate,d!==r&&(d===null?M.firstBaseUpdate=j:d.next=j,M.lastBaseUpdate=m))}if(i!==null){var O=n.baseState;r=0,M=j=m=null,d=i;do{var E=d.lane&-536870913,T=E!==d.lane;if(T?(me&E)===E:(l&E)===E){E!==0&&E===El&&(uc=!0),M!==null&&(M=M.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var K=e,te=d;E=t;var Ce=a;switch(te.tag){case 1:if(K=te.payload,typeof K=="function"){O=K.call(Ce,O,E);break e}O=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=te.payload,E=typeof K=="function"?K.call(Ce,O,E):K,E==null)break e;O=_({},O,E);break e;case 2:Sa=!0}}E=d.callback,E!==null&&(e.flags|=64,T&&(e.flags|=8192),T=n.callbacks,T===null?n.callbacks=[E]:T.push(E))}else T={lane:E,tag:d.tag,payload:d.payload,callback:d.callback,next:null},M===null?(j=M=T,m=O):M=M.next=T,r|=E;if(d=d.next,d===null){if(d=n.shared.pending,d===null)break;T=d,d=T.next,T.next=null,n.lastBaseUpdate=T,n.shared.pending=null}}while(!0);M===null&&(m=O),n.baseState=m,n.firstBaseUpdate=j,n.lastBaseUpdate=M,i===null&&(n.shared.lanes=0),_a|=r,e.lanes=r,e.memoizedState=O}}function go(e,t){if(typeof e!="function")throw Error(f(191,e));e.call(t)}function po(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)go(a[e],t)}var Ml=p(null),ps=p(0);function bo(e,t){e=fa,Q(ps,e),Q(Ml,t),fa=e|t.baseLanes}function rc(){Q(ps,fa),Q(Ml,Ml.current)}function oc(){fa=ps.current,D(Ml),D(ps)}var jt=p(null),Ut=null;function wa(e){var t=e.alternate;Q(Ze,Ze.current&1),Q(jt,e),Ut===null&&(t===null||Ml.current!==null||t.memoizedState!==null)&&(Ut=e)}function fc(e){Q(Ze,Ze.current),Q(jt,e),Ut===null&&(Ut=e)}function xo(e){e.tag===22?(Q(Ze,Ze.current),Q(jt,e),Ut===null&&(Ut=e)):Ta()}function Ta(){Q(Ze,Ze.current),Q(jt,jt.current)}function St(e){D(jt),Ut===e&&(Ut=null),D(Ze)}var Ze=p(0);function bs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||gu(a)||pu(a)))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 la=0,ie=null,Me=null,We=null,xs=!1,_l=!1,tl=!1,Ns=0,yn=0,Cl=null,lv=0;function Ge(){throw Error(f(321))}function dc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!xt(e[a],t[a]))return!1;return!0}function hc(e,t,a,l,n,i){return la=i,ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?lf:zc,tl=!1,i=a(l,n),tl=!1,_l&&(i=jo(t,a,l,n)),No(e),i}function No(e){z.H=bn;var t=Me!==null&&Me.next!==null;if(la=0,We=Me=ie=null,xs=!1,yn=0,Cl=null,t)throw Error(f(300));e===null||Ie||(e=e.dependencies,e!==null&&fs(e)&&(Ie=!0))}function jo(e,t,a,l){ie=e;var n=0;do{if(_l&&(Cl=null),yn=0,_l=!1,25<=n)throw Error(f(301));if(n+=1,We=Me=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}z.H=nf,i=t(a,l)}while(_l);return i}function nv(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?gn(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(ie.flags|=1024),t}function mc(){var e=Ns!==0;return Ns=0,e}function vc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function yc(e){if(xs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xs=!1}la=0,We=Me=ie=null,_l=!1,yn=Ns=0,Cl=null}function ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ie.memoizedState=We=e:We=We.next=e,We}function Ve(){if(Me===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=We===null?ie.memoizedState:We.next;if(t!==null)We=t,Me=e;else{if(e===null)throw ie.alternate===null?Error(f(467)):Error(f(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},We===null?ie.memoizedState=We=e:We=We.next=e}return We}function js(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gn(e){var t=yn;return yn+=1,Cl===null&&(Cl=[]),e=fo(Cl,e,t),t=ie,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?lf:zc),e}function Ss(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return gn(e);if(e.$$typeof===le)return nt(e)}throw Error(f(438,String(e)))}function gc(e){var t=null,a=ie.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ie.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=js(),ie.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=q;return t.index++,a}function na(e,t){return typeof t=="function"?t(e):t}function As(e){var t=Ve();return pc(t,Me,e)}function pc(e,t,a){var l=e.queue;if(l===null)throw Error(f(311));l.lastRenderedReducer=a;var n=e.baseQueue,i=l.pending;if(i!==null){if(n!==null){var r=n.next;n.next=i.next,i.next=r}t.baseQueue=n=i,l.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var d=r=null,m=null,j=t,M=!1;do{var O=j.lane&-536870913;if(O!==j.lane?(me&O)===O:(la&O)===O){var E=j.revertLane;if(E===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),O===El&&(M=!0);else if((la&E)===E){j=j.next,E===El&&(M=!0);continue}else O={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},m===null?(d=m=O,r=i):m=m.next=O,ie.lanes|=E,_a|=E;O=j.action,tl&&a(i,O),i=j.hasEagerState?j.eagerState:a(i,O)}else E={lane:O,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},m===null?(d=m=E,r=i):m=m.next=E,ie.lanes|=O,_a|=O;j=j.next}while(j!==null&&j!==t);if(m===null?r=i:m.next=d,!xt(i,e.memoizedState)&&(Ie=!0,M&&(a=wl,a!==null)))throw a;e.memoizedState=i,e.baseState=r,e.baseQueue=m,l.lastRenderedState=i}return n===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function bc(e){var t=Ve(),a=t.queue;if(a===null)throw Error(f(311));a.lastRenderedReducer=e;var l=a.dispatch,n=a.pending,i=t.memoizedState;if(n!==null){a.pending=null;var r=n=n.next;do i=e(i,r.action),r=r.next;while(r!==n);xt(i,t.memoizedState)||(Ie=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function So(e,t,a){var l=ie,n=Ve(),i=pe;if(i){if(a===void 0)throw Error(f(407));a=a()}else a=t();var r=!xt((Me||n).memoizedState,a);if(r&&(n.memoizedState=a,Ie=!0),n=n.queue,jc(wo.bind(null,l,n,e),[e]),n.getSnapshot!==t||r||We!==null&&We.memoizedState.tag&1){if(l.flags|=2048,Dl(9,{destroy:void 0},Eo.bind(null,l,n,a,t),null),De===null)throw Error(f(349));i||(la&127)!==0||Ao(l,t,a)}return a}function Ao(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ie.updateQueue,t===null?(t=js(),ie.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Eo(e,t,a,l){t.value=a,t.getSnapshot=l,To(t)&&zo(e)}function wo(e,t,a){return a(function(){To(t)&&zo(e)})}function To(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!xt(e,a)}catch{return!0}}function zo(e){var t=Va(e,2);t!==null&&vt(t,e,2)}function xc(e){var t=ut();if(typeof e=="function"){var a=e;if(e=a(),tl){ya(!0);try{a()}finally{ya(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:e},t}function Mo(e,t,a,l){return e.baseState=a,pc(e,Me,typeof l=="function"?l:na)}function sv(e,t,a,l,n){if(Ts(e))throw Error(f(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){i.listeners.push(r)}};z.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,_o(t,i)):(i.next=a.next,t.pending=a.next=i)}}function _o(e,t){var a=t.action,l=t.payload,n=e.state;if(t.isTransition){var i=z.T,r={};z.T=r;try{var d=a(n,l),m=z.S;m!==null&&m(r,d),Co(e,t,d)}catch(j){Nc(e,t,j)}finally{i!==null&&r.types!==null&&(i.types=r.types),z.T=i}}else try{i=a(n,l),Co(e,t,i)}catch(j){Nc(e,t,j)}}function Co(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Do(e,t,l)},function(l){return Nc(e,t,l)}):Do(e,t,a)}function Do(e,t,a){t.status="fulfilled",t.value=a,Ro(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,_o(e,a)))}function Nc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Ro(t),t=t.next;while(t!==l)}e.action=null}function Ro(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oo(e,t){return t}function Uo(e,t){if(pe){var a=De.formState;if(a!==null){e:{var l=ie;if(pe){if(ke){t:{for(var n=ke,i=Ot;n.nodeType!==8;){if(!i){n=null;break t}if(n=kt(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){ke=kt(n.nextSibling),l=n.data==="F!";break e}}Na(l)}l=!1}l&&(t=a[0])}}return a=ut(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:t},a.queue=l,a=ef.bind(null,ie,l),l.dispatch=a,l=xc(!1),i=Tc.bind(null,ie,!1,l.queue),l=ut(),n={state:t,dispatch:null,action:e,pending:null},l.queue=n,a=sv.bind(null,ie,n,i,a),n.dispatch=a,l.memoizedState=e,[t,a,!1]}function ko(e){var t=Ve();return Bo(t,Me,e)}function Bo(e,t,a){if(t=pc(e,t,Oo)[0],e=As(na)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=gn(t)}catch(r){throw r===Tl?ms:r}else l=t;t=Ve();var n=t.queue,i=n.dispatch;return a!==t.memoizedState&&(ie.flags|=2048,Dl(9,{destroy:void 0},iv.bind(null,n,a),null)),[l,i,e]}function iv(e,t){e.action=t}function Ho(e){var t=Ve(),a=Me;if(a!==null)return Bo(t,a,e);Ve(),t=t.memoizedState,a=Ve();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Dl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ie.updateQueue,t===null&&(t=js(),ie.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function qo(){return Ve().memoizedState}function Es(e,t,a,l){var n=ut();ie.flags|=e,n.memoizedState=Dl(1|t,{destroy:void 0},a,l===void 0?null:l)}function ws(e,t,a,l){var n=Ve();l=l===void 0?null:l;var i=n.memoizedState.inst;Me!==null&&l!==null&&dc(l,Me.memoizedState.deps)?n.memoizedState=Dl(t,i,a,l):(ie.flags|=e,n.memoizedState=Dl(1|t,i,a,l))}function Lo(e,t){Es(8390656,8,e,t)}function jc(e,t){ws(2048,8,e,t)}function cv(e){ie.flags|=4;var t=ie.updateQueue;if(t===null)t=js(),ie.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Yo(e){var t=Ve().memoizedState;return cv({ref:t,nextImpl:e}),function(){if((Ee&2)!==0)throw Error(f(440));return t.impl.apply(void 0,arguments)}}function Qo(e,t){return ws(4,2,e,t)}function Go(e,t){return ws(4,4,e,t)}function Xo(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Zo(e,t,a){a=a!=null?a.concat([e]):null,ws(4,4,Xo.bind(null,t,e),a)}function Sc(){}function Vo(e,t){var a=Ve();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&dc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Ko(e,t){var a=Ve();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&dc(t,l[1]))return l[0];if(l=e(),tl){ya(!0);try{e()}finally{ya(!1)}}return a.memoizedState=[l,t],l}function Ac(e,t,a){return a===void 0||(la&1073741824)!==0&&(me&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=$f(),ie.lanes|=e,_a|=e,a)}function Jo(e,t,a,l){return xt(a,t)?a:Ml.current!==null?(e=Ac(e,a,l),xt(e,t)||(Ie=!0),e):(la&42)===0||(la&1073741824)!==0&&(me&261930)===0?(Ie=!0,e.memoizedState=a):(e=$f(),ie.lanes|=e,_a|=e,t)}function $o(e,t,a,l,n){var i=L.p;L.p=i!==0&&8>i?i:8;var r=z.T,d={};z.T=d,Tc(e,!1,t,a);try{var m=n(),j=z.S;if(j!==null&&j(d,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var M=av(m,l);pn(e,t,M,wt(e))}else pn(e,t,l,wt(e))}catch(O){pn(e,t,{then:function(){},status:"rejected",reason:O},wt())}finally{L.p=i,r!==null&&d.types!==null&&(r.types=d.types),z.T=r}}function uv(){}function Ec(e,t,a,l){if(e.tag!==5)throw Error(f(476));var n=Wo(e).queue;$o(e,n,t,F,a===null?uv:function(){return Io(e),a(l)})}function Wo(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:F},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Io(e){var t=Wo(e);t.next===null&&(t=e.alternate.memoizedState),pn(e,t.next.queue,{},wt())}function wc(){return nt(Un)}function Fo(){return Ve().memoizedState}function Po(){return Ve().memoizedState}function rv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=wt();e=Aa(a);var l=Ea(t,e,a);l!==null&&(vt(l,t,a),hn(l,t,a)),t={cache:tc()},e.payload=t;return}t=t.return}}function ov(e,t,a){var l=wt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ts(e)?tf(t,a):(a=Xi(e,t,a,l),a!==null&&(vt(a,e,l),af(a,t,l)))}function ef(e,t,a){var l=wt();pn(e,t,a,l)}function pn(e,t,a,l){var n={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ts(e))tf(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var r=t.lastRenderedState,d=i(r,a);if(n.hasEagerState=!0,n.eagerState=d,xt(d,r))return cs(e,t,n,0),De===null&&is(),!1}catch{}if(a=Xi(e,t,n,l),a!==null)return vt(a,e,l),af(a,t,l),!0}return!1}function Tc(e,t,a,l){if(l={lane:2,revertLane:su(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ts(e)){if(t)throw Error(f(479))}else t=Xi(e,a,l,2),t!==null&&vt(t,e,2)}function Ts(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function tf(e,t){_l=xs=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function af(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ir(e,a)}}var bn={readContext:nt,use:Ss,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};bn.useEffectEvent=Ge;var lf={readContext:nt,use:Ss,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:Lo,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Es(4194308,4,Xo.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Es(4194308,4,e,t)},useInsertionEffect:function(e,t){Es(4,2,e,t)},useMemo:function(e,t){var a=ut();t=t===void 0?null:t;var l=e();if(tl){ya(!0);try{e()}finally{ya(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=ut();if(a!==void 0){var n=a(t);if(tl){ya(!0);try{a(t)}finally{ya(!1)}}}else n=t;return l.memoizedState=l.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=ov.bind(null,ie,e),[l.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:function(e){e=xc(e);var t=e.queue,a=ef.bind(null,ie,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Sc,useDeferredValue:function(e,t){var a=ut();return Ac(a,e,t)},useTransition:function(){var e=xc(!1);return e=$o.bind(null,ie,e.queue,!0,!1),ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ie,n=ut();if(pe){if(a===void 0)throw Error(f(407));a=a()}else{if(a=t(),De===null)throw Error(f(349));(me&127)!==0||Ao(l,t,a)}n.memoizedState=a;var i={value:a,getSnapshot:t};return n.queue=i,Lo(wo.bind(null,l,i,e),[e]),l.flags|=2048,Dl(9,{destroy:void 0},Eo.bind(null,l,i,a,t),null),a},useId:function(){var e=ut(),t=De.identifierPrefix;if(pe){var a=Xt,l=Gt;a=(l&~(1<<32-bt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ns++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=lv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wc,useFormState:Uo,useActionState:Uo,useOptimistic:function(e){var t=ut();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Tc.bind(null,ie,!0,a),a.dispatch=t,[e,t]},useMemoCache:gc,useCacheRefresh:function(){return ut().memoizedState=rv.bind(null,ie)},useEffectEvent:function(e){var t=ut(),a={impl:e};return t.memoizedState=a,function(){if((Ee&2)!==0)throw Error(f(440));return a.impl.apply(void 0,arguments)}}},zc={readContext:nt,use:Ss,useCallback:Vo,useContext:nt,useEffect:jc,useImperativeHandle:Zo,useInsertionEffect:Qo,useLayoutEffect:Go,useMemo:Ko,useReducer:As,useRef:qo,useState:function(){return As(na)},useDebugValue:Sc,useDeferredValue:function(e,t){var a=Ve();return Jo(a,Me.memoizedState,e,t)},useTransition:function(){var e=As(na)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:gn(e),t]},useSyncExternalStore:So,useId:Fo,useHostTransitionStatus:wc,useFormState:ko,useActionState:ko,useOptimistic:function(e,t){var a=Ve();return Mo(a,Me,e,t)},useMemoCache:gc,useCacheRefresh:Po};zc.useEffectEvent=Yo;var nf={readContext:nt,use:Ss,useCallback:Vo,useContext:nt,useEffect:jc,useImperativeHandle:Zo,useInsertionEffect:Qo,useLayoutEffect:Go,useMemo:Ko,useReducer:bc,useRef:qo,useState:function(){return bc(na)},useDebugValue:Sc,useDeferredValue:function(e,t){var a=Ve();return Me===null?Ac(a,e,t):Jo(a,Me.memoizedState,e,t)},useTransition:function(){var e=bc(na)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:gn(e),t]},useSyncExternalStore:So,useId:Fo,useHostTransitionStatus:wc,useFormState:Ho,useActionState:Ho,useOptimistic:function(e,t){var a=Ve();return Me!==null?Mo(a,Me,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:gc,useCacheRefresh:Po};nf.useEffectEvent=Yo;function Mc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:_({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var _c={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=wt(),n=Aa(l);n.payload=t,a!=null&&(n.callback=a),t=Ea(e,n,l),t!==null&&(vt(t,e,l),hn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=wt(),n=Aa(l);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=Ea(e,n,l),t!==null&&(vt(t,e,l),hn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=wt(),l=Aa(a);l.tag=2,t!=null&&(l.callback=t),t=Ea(e,l,a),t!==null&&(vt(t,e,a),hn(t,e,a))}};function sf(e,t,a,l,n,i,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,r):t.prototype&&t.prototype.isPureReactComponent?!nn(a,l)||!nn(n,i):!0}function cf(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function al(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=_({},a));for(var n in e)a[n]===void 0&&(a[n]=e[n])}return a}function uf(e){ss(e)}function rf(e){console.error(e)}function of(e){ss(e)}function zs(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function ff(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Cc(e,t,a){return a=Aa(a),a.tag=3,a.payload={element:null},a.callback=function(){zs(e,t)},a}function df(e){return e=Aa(e),e.tag=3,e}function hf(e,t,a,l){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var i=l.value;e.payload=function(){return n(i)},e.callback=function(){ff(t,a,l)}}var r=a.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){ff(t,a,l),typeof n!="function"&&(Ca===null?Ca=new Set([this]):Ca.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function fv(e,t,a,l,n){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Al(t,a,n,!0),a=jt.current,a!==null){switch(a.tag){case 31:case 13:return Ut===null?Ls():a.alternate===null&&Xe===0&&(Xe=3),a.flags&=-257,a.flags|=65536,a.lanes=n,l===vs?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),au(e,l,n)),!1;case 22:return a.flags|=65536,l===vs?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),au(e,l,n)),!1}throw Error(f(435,a.tag))}return au(e,l,n),Ls(),!1}if(pe)return t=jt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,l!==Wi&&(e=Error(f(422),{cause:l}),un(Ct(e,a)))):(l!==Wi&&(t=Error(f(423),{cause:l}),un(Ct(t,a))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,l=Ct(l,a),n=Cc(e.stateNode,l,n),cc(e,n),Xe!==4&&(Xe=2)),!1;var i=Error(f(520),{cause:l});if(i=Ct(i,a),Tn===null?Tn=[i]:Tn.push(i),Xe!==4&&(Xe=2),t===null)return!0;l=Ct(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=n&-n,a.lanes|=e,e=Cc(a.stateNode,l,e),cc(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ca===null||!Ca.has(i))))return a.flags|=65536,n&=-n,a.lanes|=n,n=df(n),hf(n,e,a,l),cc(a,n),!1}a=a.return}while(a!==null);return!1}var Dc=Error(f(461)),Ie=!1;function st(e,t,a,l){t.child=e===null?yo(t,null,a,l):el(t,e.child,a,l)}function mf(e,t,a,l,n){a=a.render;var i=t.ref;if("ref"in l){var r={};for(var d in l)d!=="ref"&&(r[d]=l[d])}else r=l;return Wa(t),l=hc(e,t,a,r,i,n),d=mc(),e!==null&&!Ie?(vc(e,t,n),sa(e,t,n)):(pe&&d&&Ji(t),t.flags|=1,st(e,t,l,n),t.child)}function vf(e,t,a,l,n){if(e===null){var i=a.type;return typeof i=="function"&&!Zi(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,yf(e,t,i,l,n)):(e=rs(a.type,null,l,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Lc(e,n)){var r=i.memoizedProps;if(a=a.compare,a=a!==null?a:nn,a(r,l)&&e.ref===t.ref)return sa(e,t,n)}return t.flags|=1,e=Pt(i,l),e.ref=t.ref,e.return=t,t.child=e}function yf(e,t,a,l,n){if(e!==null){var i=e.memoizedProps;if(nn(i,l)&&e.ref===t.ref)if(Ie=!1,t.pendingProps=l=i,Lc(e,n))(e.flags&131072)!==0&&(Ie=!0);else return t.lanes=e.lanes,sa(e,t,n)}return Rc(e,t,a,l,n)}function gf(e,t,a,l){var n=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,n=0;l!==null;)n=n|l.lanes|l.childLanes,l=l.sibling;l=n&~i}else l=0,t.child=null;return pf(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&hs(t,i!==null?i.cachePool:null),i!==null?bo(t,i):rc(),xo(t);else return l=t.lanes=536870912,pf(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(hs(t,i.cachePool),bo(t,i),Ta(),t.memoizedState=null):(e!==null&&hs(t,null),rc(),Ta());return st(e,t,n,a),t.child}function xn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function pf(e,t,a,l,n){var i=lc();return i=i===null?null:{parent:$e._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&hs(t,null),rc(),xo(t),e!==null&&Al(e,t,l,!0),t.childLanes=n,null}function Ms(e,t){return t=Cs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bf(e,t,a){return el(t,e.child,null,a),e=Ms(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function dv(e,t,a){var l=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(pe){if(l.mode==="hidden")return e=Ms(t,l),t.lanes=536870912,xn(null,e);if(fc(t),(e=ke)?(e=Cd(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Gt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},a=eo(e),a.return=t,t.child=a,lt=t,ke=null)):e=null,e===null)throw Na(t);return t.lanes=536870912,null}return Ms(t,l)}var i=e.memoizedState;if(i!==null){var r=i.dehydrated;if(fc(t),n)if(t.flags&256)t.flags&=-257,t=bf(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(f(558));else if(Ie||Al(e,t,a,!1),n=(a&e.childLanes)!==0,Ie||n){if(l=De,l!==null&&(r=cr(l,a),r!==0&&r!==i.retryLane))throw i.retryLane=r,Va(e,r),vt(l,e,r),Dc;Ls(),t=bf(e,t,a)}else e=i.treeContext,ke=kt(r.nextSibling),lt=t,pe=!0,xa=null,Ot=!1,e!==null&&lo(t,e),t=Ms(t,l),t.flags|=4096;return t}return e=Pt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _s(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(f(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Rc(e,t,a,l,n){return Wa(t),a=hc(e,t,a,l,void 0,n),l=mc(),e!==null&&!Ie?(vc(e,t,n),sa(e,t,n)):(pe&&l&&Ji(t),t.flags|=1,st(e,t,a,n),t.child)}function xf(e,t,a,l,n,i){return Wa(t),t.updateQueue=null,a=jo(t,l,a,n),No(e),l=mc(),e!==null&&!Ie?(vc(e,t,i),sa(e,t,i)):(pe&&l&&Ji(t),t.flags|=1,st(e,t,a,i),t.child)}function Nf(e,t,a,l,n){if(Wa(t),t.stateNode===null){var i=xl,r=a.contextType;typeof r=="object"&&r!==null&&(i=nt(r)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=_c,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},sc(t),r=a.contextType,i.context=typeof r=="object"&&r!==null?nt(r):xl,i.state=t.memoizedState,r=a.getDerivedStateFromProps,typeof r=="function"&&(Mc(t,a,r,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(r=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),r!==i.state&&_c.enqueueReplaceState(i,i.state,null),vn(t,l,i,n),mn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,m=al(a,d);i.props=m;var j=i.context,M=a.contextType;r=xl,typeof M=="object"&&M!==null&&(r=nt(M));var O=a.getDerivedStateFromProps;M=typeof O=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,M||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||j!==r)&&cf(t,i,l,r),Sa=!1;var E=t.memoizedState;i.state=E,vn(t,l,i,n),mn(),j=t.memoizedState,d||E!==j||Sa?(typeof O=="function"&&(Mc(t,a,O,l),j=t.memoizedState),(m=Sa||sf(t,a,m,l,E,j,r))?(M||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=j),i.props=l,i.state=j,i.context=r,l=m):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,ic(e,t),r=t.memoizedProps,M=al(a,r),i.props=M,O=t.pendingProps,E=i.context,j=a.contextType,m=xl,typeof j=="object"&&j!==null&&(m=nt(j)),d=a.getDerivedStateFromProps,(j=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(r!==O||E!==m)&&cf(t,i,l,m),Sa=!1,E=t.memoizedState,i.state=E,vn(t,l,i,n),mn();var T=t.memoizedState;r!==O||E!==T||Sa||e!==null&&e.dependencies!==null&&fs(e.dependencies)?(typeof d=="function"&&(Mc(t,a,d,l),T=t.memoizedState),(M=Sa||sf(t,a,M,l,E,T,m)||e!==null&&e.dependencies!==null&&fs(e.dependencies))?(j||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,T,m),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,T,m)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=T),i.props=l,i.state=T,i.context=m,l=M):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,_s(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=el(t,e.child,null,n),t.child=el(t,null,a,n)):st(e,t,a,n),t.memoizedState=i.state,e=t.child):e=sa(e,t,n),e}function jf(e,t,a,l){return Ja(),t.flags|=256,st(e,t,a,l),t.child}var Oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uc(e){return{baseLanes:e,cachePool:ro()}}function kc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Et),e}function Sf(e,t,a){var l=t.pendingProps,n=!1,i=(t.flags&128)!==0,r;if((r=i)||(r=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),r&&(n=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(pe){if(n?wa(t):Ta(),(e=ke)?(e=Cd(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Gt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},a=eo(e),a.return=t,t.child=a,lt=t,ke=null)):e=null,e===null)throw Na(t);return pu(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,n?(Ta(),n=t.mode,d=Cs({mode:"hidden",children:d},n),l=Ka(l,n,a,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=Uc(a),l.childLanes=kc(e,r,a),t.memoizedState=Oc,xn(null,l)):(wa(t),Bc(t,d))}var m=e.memoizedState;if(m!==null&&(d=m.dehydrated,d!==null)){if(i)t.flags&256?(wa(t),t.flags&=-257,t=Hc(e,t,a)):t.memoizedState!==null?(Ta(),t.child=e.child,t.flags|=128,t=null):(Ta(),d=l.fallback,n=t.mode,l=Cs({mode:"visible",children:l.children},n),d=Ka(d,n,a,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,el(t,e.child,null,a),l=t.child,l.memoizedState=Uc(a),l.childLanes=kc(e,r,a),t.memoizedState=Oc,t=xn(null,l));else if(wa(t),pu(d)){if(r=d.nextSibling&&d.nextSibling.dataset,r)var j=r.dgst;r=j,l=Error(f(419)),l.stack="",l.digest=r,un({value:l,source:null,stack:null}),t=Hc(e,t,a)}else if(Ie||Al(e,t,a,!1),r=(a&e.childLanes)!==0,Ie||r){if(r=De,r!==null&&(l=cr(r,a),l!==0&&l!==m.retryLane))throw m.retryLane=l,Va(e,l),vt(r,e,l),Dc;gu(d)||Ls(),t=Hc(e,t,a)}else gu(d)?(t.flags|=192,t.child=e.child,t=null):(e=m.treeContext,ke=kt(d.nextSibling),lt=t,pe=!0,xa=null,Ot=!1,e!==null&&lo(t,e),t=Bc(t,l.children),t.flags|=4096);return t}return n?(Ta(),d=l.fallback,n=t.mode,m=e.child,j=m.sibling,l=Pt(m,{mode:"hidden",children:l.children}),l.subtreeFlags=m.subtreeFlags&65011712,j!==null?d=Pt(j,d):(d=Ka(d,n,a,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,xn(null,l),l=t.child,d=e.child.memoizedState,d===null?d=Uc(a):(n=d.cachePool,n!==null?(m=$e._currentValue,n=n.parent!==m?{parent:m,pool:m}:n):n=ro(),d={baseLanes:d.baseLanes|a,cachePool:n}),l.memoizedState=d,l.childLanes=kc(e,r,a),t.memoizedState=Oc,xn(e.child,l)):(wa(t),a=e.child,e=a.sibling,a=Pt(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=a,t.memoizedState=null,a)}function Bc(e,t){return t=Cs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Cs(e,t){return e=Nt(22,e,null,t),e.lanes=0,e}function Hc(e,t,a){return el(t,e.child,null,a),e=Bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Af(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Pi(e.return,t,a)}function qc(e,t,a,l,n,i){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:n,treeForkCount:i}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=l,r.tail=a,r.tailMode=n,r.treeForkCount=i)}function Ef(e,t,a){var l=t.pendingProps,n=l.revealOrder,i=l.tail;l=l.children;var r=Ze.current,d=(r&2)!==0;if(d?(r=r&1|2,t.flags|=128):r&=1,Q(Ze,r),st(e,t,l,a),l=pe?cn:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Af(e,a,t);else if(e.tag===19)Af(e,a,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(n){case"forwards":for(a=t.child,n=null;a!==null;)e=a.alternate,e!==null&&bs(e)===null&&(n=a),a=a.sibling;a=n,a===null?(n=t.child,t.child=null):(n=a.sibling,a.sibling=null),qc(t,!1,n,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&bs(e)===null){t.child=n;break}e=n.sibling,n.sibling=a,a=n,n=e}qc(t,!0,a,null,i,l);break;case"together":qc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function sa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),_a|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Al(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(f(153));if(t.child!==null){for(e=t.child,a=Pt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Pt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Lc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fs(e)))}function hv(e,t,a){switch(t.tag){case 3:qe(t,t.stateNode.containerInfo),ja(t,$e,e.memoizedState.cache),Ja();break;case 27:case 5:X(t);break;case 4:qe(t,t.stateNode.containerInfo);break;case 10:ja(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(wa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Sf(e,t,a):(wa(t),e=sa(e,t,a),e!==null?e.sibling:null);wa(t);break;case 19:var n=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Al(e,t,a,!1),l=(a&t.childLanes)!==0),n){if(l)return Ef(e,t,a);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Q(Ze,Ze.current),l)break;return null;case 22:return t.lanes=0,gf(e,t,a,t.pendingProps);case 24:ja(t,$e,e.memoizedState.cache)}return sa(e,t,a)}function wf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ie=!0;else{if(!Lc(e,a)&&(t.flags&128)===0)return Ie=!1,hv(e,t,a);Ie=(e.flags&131072)!==0}else Ie=!1,pe&&(t.flags&1048576)!==0&&ao(t,cn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Fa(t.elementType),t.type=e,typeof e=="function")Zi(e)?(l=al(e,l),t.tag=1,t=Nf(null,t,e,l,a)):(t.tag=0,t=Rc(null,t,e,l,a));else{if(e!=null){var n=e.$$typeof;if(n===fe){t.tag=11,t=mf(null,t,e,l,a);break e}else if(n===R){t.tag=14,t=vf(null,t,e,l,a);break e}}throw t=Re(e)||e,Error(f(306,t,""))}}return t;case 0:return Rc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,n=al(l,t.pendingProps),Nf(e,t,l,n,a);case 3:e:{if(qe(t,t.stateNode.containerInfo),e===null)throw Error(f(387));l=t.pendingProps;var i=t.memoizedState;n=i.element,ic(e,t),vn(t,l,null,a);var r=t.memoizedState;if(l=r.cache,ja(t,$e,l),l!==i.cache&&ec(t,[$e],a,!0),mn(),l=r.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=jf(e,t,l,a);break e}else if(l!==n){n=Ct(Error(f(424)),t),un(n),t=jf(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ke=kt(e.firstChild),lt=t,pe=!0,xa=null,Ot=!0,a=yo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ja(),l===n){t=sa(e,t,a);break e}st(e,t,l,a)}t=t.child}return t;case 26:return _s(e,t),e===null?(a=Bd(t.type,null,t.pendingProps,null))?t.memoizedState=a:pe||(a=t.type,e=t.pendingProps,l=Ks(ae.current).createElement(a),l[at]=t,l[rt]=e,it(l,a,e),et(l),t.stateNode=l):t.memoizedState=Bd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return X(t),e===null&&pe&&(l=t.stateNode=Od(t.type,t.pendingProps,ae.current),lt=t,Ot=!0,n=ke,Ua(t.type)?(bu=n,ke=kt(l.firstChild)):ke=n),st(e,t,t.pendingProps.children,a),_s(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&pe&&((n=l=ke)&&(l=Gv(l,t.type,t.pendingProps,Ot),l!==null?(t.stateNode=l,lt=t,ke=kt(l.firstChild),Ot=!1,n=!0):n=!1),n||Na(t)),X(t),n=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,l=i.children,mu(n,i)?l=null:r!==null&&mu(n,r)&&(t.flags|=32),t.memoizedState!==null&&(n=hc(e,t,nv,null,null,a),Un._currentValue=n),_s(e,t),st(e,t,l,a),t.child;case 6:return e===null&&pe&&((e=a=ke)&&(a=Xv(a,t.pendingProps,Ot),a!==null?(t.stateNode=a,lt=t,ke=null,e=!0):e=!1),e||Na(t)),null;case 13:return Sf(e,t,a);case 4:return qe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=el(t,null,l,a):st(e,t,l,a),t.child;case 11:return mf(e,t,t.type,t.pendingProps,a);case 7:return st(e,t,t.pendingProps,a),t.child;case 8:return st(e,t,t.pendingProps.children,a),t.child;case 12:return st(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,ja(t,t.type,l.value),st(e,t,l.children,a),t.child;case 9:return n=t.type._context,l=t.pendingProps.children,Wa(t),n=nt(n),l=l(n),t.flags|=1,st(e,t,l,a),t.child;case 14:return vf(e,t,t.type,t.pendingProps,a);case 15:return yf(e,t,t.type,t.pendingProps,a);case 19:return Ef(e,t,a);case 31:return dv(e,t,a);case 22:return gf(e,t,a,t.pendingProps);case 24:return Wa(t),l=nt($e),e===null?(n=lc(),n===null&&(n=De,i=tc(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=a),n=i),t.memoizedState={parent:l,cache:n},sc(t),ja(t,$e,n)):((e.lanes&a)!==0&&(ic(e,t),vn(t,null,null,a),mn()),n=e.memoizedState,i=t.memoizedState,n.parent!==l?(n={parent:l,cache:l},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),ja(t,$e,l)):(l=i.cache,ja(t,$e,l),l!==n.cache&&ec(t,[$e],a,!0))),st(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(f(156,t.tag))}function ia(e){e.flags|=4}function Yc(e,t,a,l,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Pf())e.flags|=8192;else throw Pa=vs,nc}else e.flags&=-16777217}function Tf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qd(t))if(Pf())e.flags|=8192;else throw Pa=vs,nc}function Ds(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nr():536870912,e.lanes|=t,kl|=t)}function Nn(e,t){if(!pe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags&65011712,l|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags,l|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function mv(e,t,a){var l=t.pendingProps;switch($i(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 a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),aa($e),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?ia(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ii())),Be(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(ia(t),i!==null?(Be(t),Tf(t,i)):(Be(t),Yc(t,n,null,l,a))):i?i!==e.memoizedState?(ia(t),Be(t),Tf(t,i)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ia(t),Be(t),Yc(t,n,e,l,a)),null;case 27:if(I(t),a=ae.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ia(t);else{if(!l){if(t.stateNode===null)throw Error(f(166));return Be(t),null}e=V.current,Sl(t)?no(t):(e=Od(n,l,a),t.stateNode=e,ia(t))}return Be(t),null;case 5:if(I(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ia(t);else{if(!l){if(t.stateNode===null)throw Error(f(166));return Be(t),null}if(i=V.current,Sl(t))no(t);else{var r=Ks(ae.current);switch(i){case 1:i=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=r.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?r.createElement(n,{is:l.is}):r.createElement(n)}}i[at]=t,i[rt]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)i.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=i;e:switch(it(i,n,l),n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ia(t)}}return Be(t),Yc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ia(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(f(166));if(e=ae.current,Sl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,n=lt,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}e[at]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Sd(e.nodeValue,a)),e||Na(t,!0)}else e=Ks(e).createTextNode(l),e[at]=t,t.stateNode=e}return Be(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Sl(t),a!==null){if(e===null){if(!l)throw Error(f(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(557));e[at]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else a=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(f(558))}return Be(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Sl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!n)throw Error(f(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(f(317));n[at]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),n=!1}else n=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==n&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Ds(t,t.updateQueue),Be(t),null);case 4:return Ye(),e===null&&ru(t.stateNode.containerInfo),Be(t),null;case 10:return aa(t.type),Be(t),null;case 19:if(D(Ze),l=t.memoizedState,l===null)return Be(t),null;if(n=(t.flags&128)!==0,i=l.rendering,i===null)if(n)Nn(l,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=bs(e),i!==null){for(t.flags|=128,Nn(l,!1),e=i.updateQueue,t.updateQueue=e,Ds(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Pr(a,e),a=a.sibling;return Q(Ze,Ze.current&1|2),pe&&ea(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&gt()>Bs&&(t.flags|=128,n=!0,Nn(l,!1),t.lanes=4194304)}else{if(!n)if(e=bs(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Ds(t,e),Nn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!pe)return Be(t),null}else 2*gt()-l.renderingStartTime>Bs&&a!==536870912&&(t.flags|=128,n=!0,Nn(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=gt(),e.sibling=null,a=Ze.current,Q(Ze,n?a&1|2:a&1),pe&&ea(t,l.treeForkCount),e):(Be(t),null);case 22:case 23:return St(t),oc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),a=t.updateQueue,a!==null&&Ds(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&D(Ia),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),aa($e),Be(t),null;case 25:return null;case 30:return null}throw Error(f(156,t.tag))}function vv(e,t){switch($i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return aa($e),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return I(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(f(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(f(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return D(Ze),null;case 4:return Ye(),null;case 10:return aa(t.type),null;case 22:case 23:return St(t),oc(),e!==null&&D(Ia),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return aa($e),null;case 25:return null;default:return null}}function zf(e,t){switch($i(t),t.tag){case 3:aa($e),Ye();break;case 26:case 27:case 5:I(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:D(Ze);break;case 10:aa(t.type);break;case 22:case 23:St(t),oc(),e!==null&&D(Ia);break;case 24:aa($e)}}function jn(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var n=l.next;a=n;do{if((a.tag&e)===e){l=void 0;var i=a.create,r=a.inst;l=i(),r.destroy=l}a=a.next}while(a!==n)}}catch(d){Te(t,t.return,d)}}function za(e,t,a){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&e)===e){var r=l.inst,d=r.destroy;if(d!==void 0){r.destroy=void 0,n=t;var m=a,j=d;try{j()}catch(M){Te(n,m,M)}}}l=l.next}while(l!==i)}}catch(M){Te(t,t.return,M)}}function Mf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{po(t,a)}catch(l){Te(e,e.return,l)}}}function _f(e,t,a){a.props=al(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Te(e,t,l)}}function Sn(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(n){Te(e,t,n)}}function Zt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(n){Te(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){Te(e,t,n)}else a.current=null}function Cf(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(n){Te(e,e.return,n)}}function Qc(e,t,a){try{var l=e.stateNode;Bv(l,e.type,a,t),l[rt]=t}catch(n){Te(e,e.return,n)}}function Df(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function Gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Df(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&&Ua(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 Xc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=It));else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,a),e=e.sibling;e!==null;)Xc(e,t,a),e=e.sibling}function Rs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Rs(e,t,a),e=e.sibling;e!==null;)Rs(e,t,a),e=e.sibling}function Rf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);it(t,l,a),t[at]=e,t[rt]=a}catch(i){Te(e,e.return,i)}}var ca=!1,Fe=!1,Zc=!1,Of=typeof WeakSet=="function"?WeakSet:Set,tt=null;function yv(e,t){if(e=e.containerInfo,du=ei,e=Xr(e),Hi(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var n=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var r=0,d=-1,m=-1,j=0,M=0,O=e,E=null;t:for(;;){for(var T;O!==a||n!==0&&O.nodeType!==3||(d=r+n),O!==i||l!==0&&O.nodeType!==3||(m=r+l),O.nodeType===3&&(r+=O.nodeValue.length),(T=O.firstChild)!==null;)E=O,O=T;for(;;){if(O===e)break t;if(E===a&&++j===n&&(d=r),E===i&&++M===l&&(m=r),(T=O.nextSibling)!==null)break;O=E,E=O.parentNode}O=T}a=d===-1||m===-1?null:{start:d,end:m}}else a=null}a=a||{start:0,end:0}}else a=null;for(hu={focusedElem:e,selectionRange:a},ei=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){switch(t=tt,i=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(a=0;a<e.length;a++)n=e[a],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,n=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var K=al(a.type,n);e=l.getSnapshotBeforeUpdate(K,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(te){Te(a,a.return,te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)yu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":yu(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(f(163))}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}}function Uf(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ra(e,a),l&4&&jn(5,a);break;case 1:if(ra(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(r){Te(a,a.return,r)}else{var n=al(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Te(a,a.return,r)}}l&64&&Mf(a),l&512&&Sn(a,a.return);break;case 3:if(ra(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{po(e,t)}catch(r){Te(a,a.return,r)}}break;case 27:t===null&&l&4&&Rf(a);case 26:case 5:ra(e,a),t===null&&l&4&&Cf(a),l&512&&Sn(a,a.return);break;case 12:ra(e,a);break;case 31:ra(e,a),l&4&&Hf(e,a);break;case 13:ra(e,a),l&4&&qf(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ev.bind(null,a),Zv(e,a))));break;case 22:if(l=a.memoizedState!==null||ca,!l){t=t!==null&&t.memoizedState!==null||Fe,n=ca;var i=Fe;ca=l,(Fe=t)&&!i?oa(e,a,(a.subtreeFlags&8772)!==0):ra(e,a),ca=n,Fe=i}break;case 30:break;default:ra(e,a)}}function kf(e){var t=e.alternate;t!==null&&(e.alternate=null,kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ni(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 Le=null,ft=!1;function ua(e,t,a){for(a=a.child;a!==null;)Bf(e,t,a),a=a.sibling}function Bf(e,t,a){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Vl,a)}catch{}switch(a.tag){case 26:Fe||Zt(a,t),ua(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Fe||Zt(a,t);var l=Le,n=ft;Ua(a.type)&&(Le=a.stateNode,ft=!1),ua(e,t,a),Dn(a.stateNode),Le=l,ft=n;break;case 5:Fe||Zt(a,t);case 6:if(l=Le,n=ft,Le=null,ua(e,t,a),Le=l,ft=n,Le!==null)if(ft)try{(Le.nodeType===9?Le.body:Le.nodeName==="HTML"?Le.ownerDocument.body:Le).removeChild(a.stateNode)}catch(i){Te(a,t,i)}else try{Le.removeChild(a.stateNode)}catch(i){Te(a,t,i)}break;case 18:Le!==null&&(ft?(e=Le,Md(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Xl(e)):Md(Le,a.stateNode));break;case 4:l=Le,n=ft,Le=a.stateNode.containerInfo,ft=!0,ua(e,t,a),Le=l,ft=n;break;case 0:case 11:case 14:case 15:za(2,a,t),Fe||za(4,a,t),ua(e,t,a);break;case 1:Fe||(Zt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&_f(a,t,l)),ua(e,t,a);break;case 21:ua(e,t,a);break;case 22:Fe=(l=Fe)||a.memoizedState!==null,ua(e,t,a),Fe=l;break;default:ua(e,t,a)}}function Hf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xl(e)}catch(a){Te(t,t.return,a)}}}function qf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xl(e)}catch(a){Te(t,t.return,a)}}function gv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Of),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Of),t;default:throw Error(f(435,e.tag))}}function Os(e,t){var a=gv(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var n=wv.bind(null,e,l);l.then(n,n)}})}function dt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var n=a[l],i=e,r=t,d=r;e:for(;d!==null;){switch(d.tag){case 27:if(Ua(d.type)){Le=d.stateNode,ft=!1;break e}break;case 5:Le=d.stateNode,ft=!1;break e;case 3:case 4:Le=d.stateNode.containerInfo,ft=!0;break e}d=d.return}if(Le===null)throw Error(f(160));Bf(i,r,n),Le=null,ft=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Lf(t,e),t=t.sibling}var Lt=null;function Lf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:dt(t,e),ht(e),l&4&&(za(3,e,e.return),jn(3,e),za(5,e,e.return));break;case 1:dt(t,e),ht(e),l&512&&(Fe||a===null||Zt(a,a.return)),l&64&&ca&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var n=Lt;if(dt(t,e),ht(e),l&512&&(Fe||a===null||Zt(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,n=n.ownerDocument||n;t:switch(l){case"title":i=n.getElementsByTagName("title")[0],(!i||i[$l]||i[at]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(l),n.head.insertBefore(i,n.querySelector("head > title"))),it(i,l,a),i[at]=e,et(i),l=i;break e;case"link":var r=Ld("link","href",n).get(l+(a.href||""));if(r){for(var d=0;d<r.length;d++)if(i=r[d],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){r.splice(d,1);break t}}i=n.createElement(l),it(i,l,a),n.head.appendChild(i);break;case"meta":if(r=Ld("meta","content",n).get(l+(a.content||""))){for(d=0;d<r.length;d++)if(i=r[d],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){r.splice(d,1);break t}}i=n.createElement(l),it(i,l,a),n.head.appendChild(i);break;default:throw Error(f(468,l))}i[at]=e,et(i),l=i}e.stateNode=l}else Yd(n,e.type,e.stateNode);else e.stateNode=qd(n,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?Yd(n,e.type,e.stateNode):qd(n,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,a.memoizedProps)}break;case 27:dt(t,e),ht(e),l&512&&(Fe||a===null||Zt(a,a.return)),a!==null&&l&4&&Qc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(dt(t,e),ht(e),l&512&&(Fe||a===null||Zt(a,a.return)),e.flags&32){n=e.stateNode;try{hl(n,"")}catch(K){Te(e,e.return,K)}}l&4&&e.stateNode!=null&&(n=e.memoizedProps,Qc(e,n,a!==null?a.memoizedProps:n)),l&1024&&(Zc=!0);break;case 6:if(dt(t,e),ht(e),l&4){if(e.stateNode===null)throw Error(f(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(K){Te(e,e.return,K)}}break;case 3:if(Ws=null,n=Lt,Lt=Js(t.containerInfo),dt(t,e),Lt=n,ht(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Xl(t.containerInfo)}catch(K){Te(e,e.return,K)}Zc&&(Zc=!1,Yf(e));break;case 4:l=Lt,Lt=Js(e.stateNode.containerInfo),dt(t,e),ht(e),Lt=l;break;case 12:dt(t,e),ht(e);break;case 31:dt(t,e),ht(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Os(e,l)));break;case 13:dt(t,e),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ks=gt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Os(e,l)));break;case 22:n=e.memoizedState!==null;var m=a!==null&&a.memoizedState!==null,j=ca,M=Fe;if(ca=j||n,Fe=M||m,dt(t,e),Fe=M,ca=j,ht(e),l&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(a===null||m||ca||Fe||ll(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){m=a=t;try{if(i=m.stateNode,n)r=i.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{d=m.stateNode;var O=m.memoizedProps.style,E=O!=null&&O.hasOwnProperty("display")?O.display:null;d.style.display=E==null||typeof E=="boolean"?"":(""+E).trim()}}catch(K){Te(m,m.return,K)}}}else if(t.tag===6){if(a===null){m=t;try{m.stateNode.nodeValue=n?"":m.memoizedProps}catch(K){Te(m,m.return,K)}}}else if(t.tag===18){if(a===null){m=t;try{var T=m.stateNode;n?_d(T,!0):_d(m.stateNode,!1)}catch(K){Te(m,m.return,K)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Os(e,a))));break;case 19:dt(t,e),ht(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Os(e,l)));break;case 30:break;case 21:break;default:dt(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Df(l)){a=l;break}l=l.return}if(a==null)throw Error(f(160));switch(a.tag){case 27:var n=a.stateNode,i=Gc(e);Rs(e,i,n);break;case 5:var r=a.stateNode;a.flags&32&&(hl(r,""),a.flags&=-33);var d=Gc(e);Rs(e,d,r);break;case 3:case 4:var m=a.stateNode.containerInfo,j=Gc(e);Xc(e,j,m);break;default:throw Error(f(161))}}catch(M){Te(e,e.return,M)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Yf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Yf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ra(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Uf(e,t.alternate,t),t=t.sibling}function ll(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),ll(t);break;case 1:Zt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&_f(t,t.return,a),ll(t);break;case 27:Dn(t.stateNode);case 26:case 5:Zt(t,t.return),ll(t);break;case 22:t.memoizedState===null&&ll(t);break;case 30:ll(t);break;default:ll(t)}e=e.sibling}}function oa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,n=e,i=t,r=i.flags;switch(i.tag){case 0:case 11:case 15:oa(n,i,a),jn(4,i);break;case 1:if(oa(n,i,a),l=i,n=l.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(j){Te(l,l.return,j)}if(l=i,n=l.updateQueue,n!==null){var d=l.stateNode;try{var m=n.shared.hiddenCallbacks;if(m!==null)for(n.shared.hiddenCallbacks=null,n=0;n<m.length;n++)go(m[n],d)}catch(j){Te(l,l.return,j)}}a&&r&64&&Mf(i),Sn(i,i.return);break;case 27:Rf(i);case 26:case 5:oa(n,i,a),a&&l===null&&r&4&&Cf(i),Sn(i,i.return);break;case 12:oa(n,i,a);break;case 31:oa(n,i,a),a&&r&4&&Hf(n,i);break;case 13:oa(n,i,a),a&&r&4&&qf(n,i);break;case 22:i.memoizedState===null&&oa(n,i,a),Sn(i,i.return);break;case 30:break;default:oa(n,i,a)}t=t.sibling}}function Vc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&rn(a))}function Kc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rn(e))}function Yt(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qf(e,t,a,l),t=t.sibling}function Qf(e,t,a,l){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Yt(e,t,a,l),n&2048&&jn(9,t);break;case 1:Yt(e,t,a,l);break;case 3:Yt(e,t,a,l),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rn(e)));break;case 12:if(n&2048){Yt(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,r=i.id,d=i.onPostCommit;typeof d=="function"&&d(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(m){Te(t,t.return,m)}}else Yt(e,t,a,l);break;case 31:Yt(e,t,a,l);break;case 13:Yt(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?i._visibility&2?Yt(e,t,a,l):An(e,t):i._visibility&2?Yt(e,t,a,l):(i._visibility|=2,Rl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Vc(r,t);break;case 24:Yt(e,t,a,l),n&2048&&Kc(t.alternate,t);break;default:Yt(e,t,a,l)}}function Rl(e,t,a,l,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,r=t,d=a,m=l,j=r.flags;switch(r.tag){case 0:case 11:case 15:Rl(i,r,d,m,n),jn(8,r);break;case 23:break;case 22:var M=r.stateNode;r.memoizedState!==null?M._visibility&2?Rl(i,r,d,m,n):An(i,r):(M._visibility|=2,Rl(i,r,d,m,n)),n&&j&2048&&Vc(r.alternate,r);break;case 24:Rl(i,r,d,m,n),n&&j&2048&&Kc(r.alternate,r);break;default:Rl(i,r,d,m,n)}t=t.sibling}}function An(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,n=l.flags;switch(l.tag){case 22:An(a,l),n&2048&&Vc(l.alternate,l);break;case 24:An(a,l),n&2048&&Kc(l.alternate,l);break;default:An(a,l)}t=t.sibling}}var En=8192;function Ol(e,t,a){if(e.subtreeFlags&En)for(e=e.child;e!==null;)Gf(e,t,a),e=e.sibling}function Gf(e,t,a){switch(e.tag){case 26:Ol(e,t,a),e.flags&En&&e.memoizedState!==null&&ly(a,Lt,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,a);break;case 3:case 4:var l=Lt;Lt=Js(e.stateNode.containerInfo),Ol(e,t,a),Lt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=En,En=16777216,Ol(e,t,a),En=l):Ol(e,t,a));break;default:Ol(e,t,a)}}function Xf(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 wn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];tt=l,Vf(l,e)}Xf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zf(e),e=e.sibling}function Zf(e){switch(e.tag){case 0:case 11:case 15:wn(e),e.flags&2048&&za(9,e,e.return);break;case 3:wn(e);break;case 12:wn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Us(e)):wn(e);break;default:wn(e)}}function Us(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];tt=l,Vf(l,e)}Xf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:za(8,t,t.return),Us(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Us(t));break;default:Us(t)}e=e.sibling}}function Vf(e,t){for(;tt!==null;){var a=tt;switch(a.tag){case 0:case 11:case 15:za(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:rn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,tt=l;else e:for(a=e;tt!==null;){l=tt;var n=l.sibling,i=l.return;if(kf(l),l===a){tt=null;break e}if(n!==null){n.return=i,tt=n;break e}tt=i}}}var pv={getCacheForType:function(e){var t=nt($e),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return nt($e).controller.signal}},bv=typeof WeakMap=="function"?WeakMap:Map,Ee=0,De=null,de=null,me=0,we=0,At=null,Ma=!1,Ul=!1,Jc=!1,fa=0,Xe=0,_a=0,nl=0,$c=0,Et=0,kl=0,Tn=null,mt=null,Wc=!1,ks=0,Kf=0,Bs=1/0,Hs=null,Ca=null,Pe=0,Da=null,Bl=null,da=0,Ic=0,Fc=null,Jf=null,zn=0,Pc=null;function wt(){return(Ee&2)!==0&&me!==0?me&-me:z.T!==null?su():ur()}function $f(){if(Et===0)if((me&536870912)===0||pe){var e=Vn;Vn<<=1,(Vn&3932160)===0&&(Vn=262144),Et=e}else Et=536870912;return e=jt.current,e!==null&&(e.flags|=32),Et}function vt(e,t,a){(e===De&&(we===2||we===9)||e.cancelPendingCommit!==null)&&(Hl(e,0),Ra(e,me,Et,!1)),Jl(e,a),((Ee&2)===0||e!==De)&&(e===De&&((Ee&2)===0&&(nl|=a),Xe===4&&Ra(e,me,Et,!1)),Vt(e))}function Wf(e,t,a){if((Ee&6)!==0)throw Error(f(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Kl(e,t),n=l?jv(e,t):tu(e,t,!0),i=l;do{if(n===0){Ul&&!l&&Ra(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!xv(a)){n=tu(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var d=e;n=Tn;var m=d.current.memoizedState.isDehydrated;if(m&&(Hl(d,r).flags|=256),r=tu(d,r,!1),r!==2){if(Jc&&!m){d.errorRecoveryDisabledLanes|=i,nl|=i,n=4;break e}i=mt,mt=n,i!==null&&(mt===null?mt=i:mt.push.apply(mt,i))}n=r}if(i=!1,n!==2)continue}}if(n===1){Hl(e,0),Ra(e,t,0,!0);break}e:{switch(l=e,i=n,i){case 0:case 1:throw Error(f(345));case 4:if((t&4194048)!==t)break;case 6:Ra(l,t,Et,!Ma);break e;case 2:mt=null;break;case 3:case 5:break;default:throw Error(f(329))}if((t&62914560)===t&&(n=ks+300-gt(),10<n)){if(Ra(l,t,Et,!Ma),Jn(l,0,!0)!==0)break e;da=t,l.timeoutHandle=Td(If.bind(null,l,a,mt,Hs,Wc,t,Et,nl,kl,Ma,i,"Throttled",-0,0),n);break e}If(l,a,mt,Hs,Wc,t,Et,nl,kl,Ma,i,null,-0,0)}}break}while(!0);Vt(e)}function If(e,t,a,l,n,i,r,d,m,j,M,O,E,T){if(e.timeoutHandle=-1,O=t.subtreeFlags,O&8192||(O&16785408)===16785408){O={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:It},Gf(t,i,O);var K=(i&62914560)===i?ks-gt():(i&4194048)===i?Kf-gt():0;if(K=ny(O,K),K!==null){da=i,e.cancelPendingCommit=K(sd.bind(null,e,t,i,a,l,n,r,d,m,M,O,null,E,T)),Ra(e,i,r,!j);return}}sd(e,t,i,a,l,n,r,d,m)}function xv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var n=a[l],i=n.getSnapshot;n=n.value;try{if(!xt(i(),n))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Ra(e,t,a,l){t&=~$c,t&=~nl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var n=t;0<n;){var i=31-bt(n),r=1<<i;l[i]=-1,n&=~r}a!==0&&sr(e,a,t)}function qs(){return(Ee&6)===0?(Mn(0),!1):!0}function eu(){if(de!==null){if(we===0)var e=de.return;else e=de,ta=$a=null,yc(e),zl=null,fn=0,e=de;for(;e!==null;)zf(e.alternate,e),e=e.return;de=null}}function Hl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Lv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),da=0,eu(),De=e,de=a=Pt(e.current,null),me=t,we=0,At=null,Ma=!1,Ul=Kl(e,t),Jc=!1,kl=Et=$c=nl=_a=Xe=0,mt=Tn=null,Wc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-bt(l),i=1<<n;t|=e[n],l&=~i}return fa=t,is(),a}function Ff(e,t){ie=null,z.H=bn,t===Tl||t===ms?(t=ho(),we=3):t===nc?(t=ho(),we=4):we=t===Dc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,At=t,de===null&&(Xe=1,zs(e,Ct(t,e.current)))}function Pf(){var e=jt.current;return e===null?!0:(me&4194048)===me?Ut===null:(me&62914560)===me||(me&536870912)!==0?e===Ut:!1}function ed(){var e=z.H;return z.H=bn,e===null?bn:e}function td(){var e=z.A;return z.A=pv,e}function Ls(){Xe=4,Ma||(me&4194048)!==me&&jt.current!==null||(Ul=!0),(_a&134217727)===0&&(nl&134217727)===0||De===null||Ra(De,me,Et,!1)}function tu(e,t,a){var l=Ee;Ee|=2;var n=ed(),i=td();(De!==e||me!==t)&&(Hs=null,Hl(e,t)),t=!1;var r=Xe;e:do try{if(we!==0&&de!==null){var d=de,m=At;switch(we){case 8:eu(),r=6;break e;case 3:case 2:case 9:case 6:jt.current===null&&(t=!0);var j=we;if(we=0,At=null,ql(e,d,m,j),a&&Ul){r=0;break e}break;default:j=we,we=0,At=null,ql(e,d,m,j)}}Nv(),r=Xe;break}catch(M){Ff(e,M)}while(!0);return t&&e.shellSuspendCounter++,ta=$a=null,Ee=l,z.H=n,z.A=i,de===null&&(De=null,me=0,is()),r}function Nv(){for(;de!==null;)ad(de)}function jv(e,t){var a=Ee;Ee|=2;var l=ed(),n=td();De!==e||me!==t?(Hs=null,Bs=gt()+500,Hl(e,t)):Ul=Kl(e,t);e:do try{if(we!==0&&de!==null){t=de;var i=At;t:switch(we){case 1:we=0,At=null,ql(e,t,i,1);break;case 2:case 9:if(oo(i)){we=0,At=null,ld(t);break}t=function(){we!==2&&we!==9||De!==e||(we=7),Vt(e)},i.then(t,t);break e;case 3:we=7;break e;case 4:we=5;break e;case 7:oo(i)?(we=0,At=null,ld(t)):(we=0,At=null,ql(e,t,i,7));break;case 5:var r=null;switch(de.tag){case 26:r=de.memoizedState;case 5:case 27:var d=de;if(r?Qd(r):d.stateNode.complete){we=0,At=null;var m=d.sibling;if(m!==null)de=m;else{var j=d.return;j!==null?(de=j,Ys(j)):de=null}break t}}we=0,At=null,ql(e,t,i,5);break;case 6:we=0,At=null,ql(e,t,i,6);break;case 8:eu(),Xe=6;break e;default:throw Error(f(462))}}Sv();break}catch(M){Ff(e,M)}while(!0);return ta=$a=null,z.H=l,z.A=n,Ee=a,de!==null?0:(De=null,me=0,is(),Xe)}function Sv(){for(;de!==null&&!Vh();)ad(de)}function ad(e){var t=wf(e.alternate,e,fa);e.memoizedProps=e.pendingProps,t===null?Ys(e):de=t}function ld(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=xf(a,t,t.pendingProps,t.type,void 0,me);break;case 11:t=xf(a,t,t.pendingProps,t.type.render,t.ref,me);break;case 5:yc(t);default:zf(a,t),t=de=Pr(t,fa),t=wf(a,t,fa)}e.memoizedProps=e.pendingProps,t===null?Ys(e):de=t}function ql(e,t,a,l){ta=$a=null,yc(t),zl=null,fn=0;var n=t.return;try{if(fv(e,n,t,a,me)){Xe=1,zs(e,Ct(a,e.current)),de=null;return}}catch(i){if(n!==null)throw de=n,i;Xe=1,zs(e,Ct(a,e.current)),de=null;return}t.flags&32768?(pe||l===1?e=!0:Ul||(me&536870912)!==0?e=!1:(Ma=e=!0,(l===2||l===9||l===3||l===6)&&(l=jt.current,l!==null&&l.tag===13&&(l.flags|=16384))),nd(t,e)):Ys(t)}function Ys(e){var t=e;do{if((t.flags&32768)!==0){nd(t,Ma);return}e=t.return;var a=mv(t.alternate,t,fa);if(a!==null){de=a;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);Xe===0&&(Xe=5)}function nd(e,t){do{var a=vv(e.alternate,e);if(a!==null){a.flags&=32767,de=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=a}while(e!==null);Xe=6,de=null}function sd(e,t,a,l,n,i,r,d,m){e.cancelPendingCommit=null;do Qs();while(Pe!==0);if((Ee&6)!==0)throw Error(f(327));if(t!==null){if(t===e.current)throw Error(f(177));if(i=t.lanes|t.childLanes,i|=Gi,am(e,a,i,r,d,m),e===De&&(de=De=null,me=0),Bl=t,Da=e,da=a,Ic=i,Fc=n,Jf=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tv(Xn,function(){return od(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=z.T,z.T=null,n=L.p,L.p=2,r=Ee,Ee|=4;try{yv(e,t,a)}finally{Ee=r,L.p=n,z.T=l}}Pe=1,id(),cd(),ud()}}function id(){if(Pe===1){Pe=0;var e=Da,t=Bl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null;var l=L.p;L.p=2;var n=Ee;Ee|=4;try{Lf(t,e);var i=hu,r=Xr(e.containerInfo),d=i.focusedElem,m=i.selectionRange;if(r!==d&&d&&d.ownerDocument&&Gr(d.ownerDocument.documentElement,d)){if(m!==null&&Hi(d)){var j=m.start,M=m.end;if(M===void 0&&(M=j),"selectionStart"in d)d.selectionStart=j,d.selectionEnd=Math.min(M,d.value.length);else{var O=d.ownerDocument||document,E=O&&O.defaultView||window;if(E.getSelection){var T=E.getSelection(),K=d.textContent.length,te=Math.min(m.start,K),Ce=m.end===void 0?te:Math.min(m.end,K);!T.extend&&te>Ce&&(r=Ce,Ce=te,te=r);var x=Qr(d,te),g=Qr(d,Ce);if(x&&g&&(T.rangeCount!==1||T.anchorNode!==x.node||T.anchorOffset!==x.offset||T.focusNode!==g.node||T.focusOffset!==g.offset)){var N=O.createRange();N.setStart(x.node,x.offset),T.removeAllRanges(),te>Ce?(T.addRange(N),T.extend(g.node,g.offset)):(N.setEnd(g.node,g.offset),T.addRange(N))}}}}for(O=[],T=d;T=T.parentNode;)T.nodeType===1&&O.push({element:T,left:T.scrollLeft,top:T.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<O.length;d++){var C=O[d];C.element.scrollLeft=C.left,C.element.scrollTop=C.top}}ei=!!du,hu=du=null}finally{Ee=n,L.p=l,z.T=a}}e.current=t,Pe=2}}function cd(){if(Pe===2){Pe=0;var e=Da,t=Bl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=z.T,z.T=null;var l=L.p;L.p=2;var n=Ee;Ee|=4;try{Uf(e,t.alternate,t)}finally{Ee=n,L.p=l,z.T=a}}Pe=3}}function ud(){if(Pe===4||Pe===3){Pe=0,Kh();var e=Da,t=Bl,a=da,l=Jf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pe=5:(Pe=0,Bl=Da=null,rd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Ca=null),bi(a),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Vl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=z.T,n=L.p,L.p=2,z.T=null;try{for(var i=e.onRecoverableError,r=0;r<l.length;r++){var d=l[r];i(d.value,{componentStack:d.stack})}}finally{z.T=t,L.p=n}}(da&3)!==0&&Qs(),Vt(e),n=e.pendingLanes,(a&261930)!==0&&(n&42)!==0?e===Pc?zn++:(zn=0,Pc=e):zn=0,Mn(0)}}function rd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,rn(t)))}function Qs(){return id(),cd(),ud(),od()}function od(){if(Pe!==5)return!1;var e=Da,t=Ic;Ic=0;var a=bi(da),l=z.T,n=L.p;try{L.p=32>a?32:a,z.T=null,a=Fc,Fc=null;var i=Da,r=da;if(Pe=0,Bl=Da=null,da=0,(Ee&6)!==0)throw Error(f(331));var d=Ee;if(Ee|=4,Zf(i.current),Qf(i,i.current,r,a),Ee=d,Mn(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Vl,i)}catch{}return!0}finally{L.p=n,z.T=l,rd(e,t)}}function fd(e,t,a){t=Ct(a,t),t=Cc(e.stateNode,t,2),e=Ea(e,t,2),e!==null&&(Jl(e,2),Vt(e))}function Te(e,t,a){if(e.tag===3)fd(e,e,a);else for(;t!==null;){if(t.tag===3){fd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ca===null||!Ca.has(l))){e=Ct(a,e),a=df(2),l=Ea(t,a,2),l!==null&&(hf(a,l,t,e),Jl(l,2),Vt(l));break}}t=t.return}}function au(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new bv;var n=new Set;l.set(t,n)}else n=l.get(t),n===void 0&&(n=new Set,l.set(t,n));n.has(a)||(Jc=!0,n.add(a),e=Av.bind(null,e,t,a),t.then(e,e))}function Av(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,De===e&&(me&a)===a&&(Xe===4||Xe===3&&(me&62914560)===me&&300>gt()-ks?(Ee&2)===0&&Hl(e,0):$c|=a,kl===me&&(kl=0)),Vt(e)}function dd(e,t){t===0&&(t=nr()),e=Va(e,t),e!==null&&(Jl(e,t),Vt(e))}function Ev(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),dd(e,a)}function wv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(f(314))}l!==null&&l.delete(t),dd(e,a)}function Tv(e,t){return vi(e,t)}var Gs=null,Ll=null,lu=!1,Xs=!1,nu=!1,Oa=0;function Vt(e){e!==Ll&&e.next===null&&(Ll===null?Gs=Ll=e:Ll=Ll.next=e),Xs=!0,lu||(lu=!0,Mv())}function Mn(e,t){if(!nu&&Xs){nu=!0;do for(var a=!1,l=Gs;l!==null;){if(e!==0){var n=l.pendingLanes;if(n===0)var i=0;else{var r=l.suspendedLanes,d=l.pingedLanes;i=(1<<31-bt(42|e)+1)-1,i&=n&~(r&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,yd(l,i))}else i=me,i=Jn(l,l===De?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Kl(l,i)||(a=!0,yd(l,i));l=l.next}while(a);nu=!1}}function zv(){hd()}function hd(){Xs=lu=!1;var e=0;Oa!==0&&qv()&&(e=Oa);for(var t=gt(),a=null,l=Gs;l!==null;){var n=l.next,i=md(l,t);i===0?(l.next=null,a===null?Gs=n:a.next=n,n===null&&(Ll=a)):(a=l,(e!==0||(i&3)!==0)&&(Xs=!0)),l=n}Pe!==0&&Pe!==5||Mn(e),Oa!==0&&(Oa=0)}function md(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var r=31-bt(i),d=1<<r,m=n[r];m===-1?((d&a)===0||(d&l)!==0)&&(n[r]=tm(d,t)):m<=t&&(e.expiredLanes|=d),i&=~d}if(t=De,a=me,a=Jn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(we===2||we===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&yi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Kl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&yi(l),bi(a)){case 2:case 8:a=ar;break;case 32:a=Xn;break;case 268435456:a=lr;break;default:a=Xn}return l=vd.bind(null,e),a=vi(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&yi(l),e.callbackPriority=2,e.callbackNode=null,2}function vd(e,t){if(Pe!==0&&Pe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Qs()&&e.callbackNode!==a)return null;var l=me;return l=Jn(e,e===De?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Wf(e,l,t),md(e,gt()),e.callbackNode!=null&&e.callbackNode===a?vd.bind(null,e):null)}function yd(e,t){if(Qs())return null;Wf(e,t,!0)}function Mv(){Yv(function(){(Ee&6)!==0?vi(tr,zv):hd()})}function su(){if(Oa===0){var e=El;e===0&&(e=Zn,Zn<<=1,(Zn&261888)===0&&(Zn=256)),Oa=e}return Oa}function gd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Fn(""+e)}function pd(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function _v(e,t,a,l,n){if(t==="submit"&&a&&a.stateNode===n){var i=gd((n[rt]||null).action),r=l.submitter;r&&(t=(t=r[rt]||null)?gd(t.formAction):r.getAttribute("formAction"),t!==null&&(i=t,r=null));var d=new as("action","action",null,l,n);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Oa!==0){var m=r?pd(n,r):new FormData(n);Ec(a,{pending:!0,data:m,method:n.method,action:i},null,m)}}else typeof i=="function"&&(d.preventDefault(),m=r?pd(n,r):new FormData(n),Ec(a,{pending:!0,data:m,method:n.method,action:i},i,m))},currentTarget:n}]})}}for(var iu=0;iu<Qi.length;iu++){var cu=Qi[iu],Cv=cu.toLowerCase(),Dv=cu[0].toUpperCase()+cu.slice(1);qt(Cv,"on"+Dv)}qt(Kr,"onAnimationEnd"),qt(Jr,"onAnimationIteration"),qt($r,"onAnimationStart"),qt("dblclick","onDoubleClick"),qt("focusin","onFocus"),qt("focusout","onBlur"),qt(Jm,"onTransitionRun"),qt($m,"onTransitionStart"),qt(Wm,"onTransitionCancel"),qt(Wr,"onTransitionEnd"),fl("onMouseEnter",["mouseout","mouseover"]),fl("onMouseLeave",["mouseout","mouseover"]),fl("onPointerEnter",["pointerout","pointerover"]),fl("onPointerLeave",["pointerout","pointerover"]),Qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _n="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(" "),Rv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_n));function bd(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],n=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var r=l.length-1;0<=r;r--){var d=l[r],m=d.instance,j=d.currentTarget;if(d=d.listener,m!==i&&n.isPropagationStopped())break e;i=d,n.currentTarget=j;try{i(n)}catch(M){ss(M)}n.currentTarget=null,i=m}else for(r=0;r<l.length;r++){if(d=l[r],m=d.instance,j=d.currentTarget,d=d.listener,m!==i&&n.isPropagationStopped())break e;i=d,n.currentTarget=j;try{i(n)}catch(M){ss(M)}n.currentTarget=null,i=m}}}}function he(e,t){var a=t[xi];a===void 0&&(a=t[xi]=new Set);var l=e+"__bubble";a.has(l)||(xd(t,e,2,!1),a.add(l))}function uu(e,t,a){var l=0;t&&(l|=4),xd(a,e,l,t)}var Zs="_reactListening"+Math.random().toString(36).slice(2);function ru(e){if(!e[Zs]){e[Zs]=!0,fr.forEach(function(a){a!=="selectionchange"&&(Rv.has(a)||uu(a,!1,e),uu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zs]||(t[Zs]=!0,uu("selectionchange",!1,t))}}function xd(e,t,a,l){switch($d(t)){case 2:var n=cy;break;case 8:n=uy;break;default:n=Au}a=n.bind(null,t,a,e),n=void 0,!Mi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),l?n!==void 0?e.addEventListener(t,a,{capture:!0,passive:n}):e.addEventListener(t,a,!0):n!==void 0?e.addEventListener(t,a,{passive:n}):e.addEventListener(t,a,!1)}function ou(e,t,a,l,n){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var r=l.tag;if(r===3||r===4){var d=l.stateNode.containerInfo;if(d===n)break;if(r===4)for(r=l.return;r!==null;){var m=r.tag;if((m===3||m===4)&&r.stateNode.containerInfo===n)return;r=r.return}for(;d!==null;){if(r=ul(d),r===null)return;if(m=r.tag,m===5||m===6||m===26||m===27){l=i=r;continue e}d=d.parentNode}}l=l.return}Sr(function(){var j=i,M=Ti(a),O=[];e:{var E=Ir.get(e);if(E!==void 0){var T=as,K=e;switch(e){case"keypress":if(es(a)===0)break e;case"keydown":case"keyup":T=wm;break;case"focusin":K="focus",T=Ri;break;case"focusout":K="blur",T=Ri;break;case"beforeblur":case"afterblur":T=Ri;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":T=wr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":T=mm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":T=Mm;break;case Kr:case Jr:case $r:T=gm;break;case Wr:T=Cm;break;case"scroll":case"scrollend":T=dm;break;case"wheel":T=Rm;break;case"copy":case"cut":case"paste":T=bm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":T=zr;break;case"toggle":case"beforetoggle":T=Um}var te=(t&4)!==0,Ce=!te&&(e==="scroll"||e==="scrollend"),x=te?E!==null?E+"Capture":null:E;te=[];for(var g=j,N;g!==null;){var C=g;if(N=C.stateNode,C=C.tag,C!==5&&C!==26&&C!==27||N===null||x===null||(C=Il(g,x),C!=null&&te.push(Cn(g,C,N))),Ce)break;g=g.return}0<te.length&&(E=new T(E,K,null,a,M),O.push({event:E,listeners:te}))}}if((t&7)===0){e:{if(E=e==="mouseover"||e==="pointerover",T=e==="mouseout"||e==="pointerout",E&&a!==wi&&(K=a.relatedTarget||a.fromElement)&&(ul(K)||K[cl]))break e;if((T||E)&&(E=M.window===M?M:(E=M.ownerDocument)?E.defaultView||E.parentWindow:window,T?(K=a.relatedTarget||a.toElement,T=j,K=K?ul(K):null,K!==null&&(Ce=v(K),te=K.tag,K!==Ce||te!==5&&te!==27&&te!==6)&&(K=null)):(T=null,K=j),T!==K)){if(te=wr,C="onMouseLeave",x="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(te=zr,C="onPointerLeave",x="onPointerEnter",g="pointer"),Ce=T==null?E:Wl(T),N=K==null?E:Wl(K),E=new te(C,g+"leave",T,a,M),E.target=Ce,E.relatedTarget=N,C=null,ul(M)===j&&(te=new te(x,g+"enter",K,a,M),te.target=N,te.relatedTarget=Ce,C=te),Ce=C,T&&K)t:{for(te=Ov,x=T,g=K,N=0,C=x;C;C=te(C))N++;C=0;for(var P=g;P;P=te(P))C++;for(;0<N-C;)x=te(x),N--;for(;0<C-N;)g=te(g),C--;for(;N--;){if(x===g||g!==null&&x===g.alternate){te=x;break t}x=te(x),g=te(g)}te=null}else te=null;T!==null&&Nd(O,E,T,te,!1),K!==null&&Ce!==null&&Nd(O,Ce,K,te,!0)}}e:{if(E=j?Wl(j):window,T=E.nodeName&&E.nodeName.toLowerCase(),T==="select"||T==="input"&&E.type==="file")var Ne=kr;else if(Or(E))if(Br)Ne=Zm;else{Ne=Gm;var $=Qm}else T=E.nodeName,!T||T.toLowerCase()!=="input"||E.type!=="checkbox"&&E.type!=="radio"?j&&Ei(j.elementType)&&(Ne=kr):Ne=Xm;if(Ne&&(Ne=Ne(e,j))){Ur(O,Ne,a,M);break e}$&&$(e,E,j),e==="focusout"&&j&&E.type==="number"&&j.memoizedProps.value!=null&&Ai(E,"number",E.value)}switch($=j?Wl(j):window,e){case"focusin":(Or($)||$.contentEditable==="true")&&(gl=$,qi=j,sn=null);break;case"focusout":sn=qi=gl=null;break;case"mousedown":Li=!0;break;case"contextmenu":case"mouseup":case"dragend":Li=!1,Zr(O,a,M);break;case"selectionchange":if(Km)break;case"keydown":case"keyup":Zr(O,a,M)}var ce;if(Ui)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else yl?Dr(e,a)&&(ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ve="onCompositionStart");ve&&(Mr&&a.locale!=="ko"&&(yl||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&yl&&(ce=Ar()):(pa=M,_i="value"in pa?pa.value:pa.textContent,yl=!0)),$=Vs(j,ve),0<$.length&&(ve=new Tr(ve,e,null,a,M),O.push({event:ve,listeners:$}),ce?ve.data=ce:(ce=Rr(a),ce!==null&&(ve.data=ce)))),(ce=Bm?Hm(e,a):qm(e,a))&&(ve=Vs(j,"onBeforeInput"),0<ve.length&&($=new Tr("onBeforeInput","beforeinput",null,a,M),O.push({event:$,listeners:ve}),$.data=ce)),_v(O,e,j,a,M)}bd(O,t)})}function Cn(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Vs(e,t){for(var a=t+"Capture",l=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=Il(e,a),n!=null&&l.unshift(Cn(e,n,i)),n=Il(e,t),n!=null&&l.push(Cn(e,n,i))),e.tag===3)return l;e=e.return}return[]}function Ov(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,a,l,n){for(var i=t._reactName,r=[];a!==null&&a!==l;){var d=a,m=d.alternate,j=d.stateNode;if(d=d.tag,m!==null&&m===l)break;d!==5&&d!==26&&d!==27||j===null||(m=j,n?(j=Il(a,i),j!=null&&r.unshift(Cn(a,j,m))):n||(j=Il(a,i),j!=null&&r.push(Cn(a,j,m)))),a=a.return}r.length!==0&&e.push({event:t,listeners:r})}var Uv=/\r\n?/g,kv=/\u0000|\uFFFD/g;function jd(e){return(typeof e=="string"?e:""+e).replace(Uv,`
9
- `).replace(kv,"")}function Sd(e,t){return t=jd(t),jd(e)===t}function _e(e,t,a,l,n,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||hl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&hl(e,""+l);break;case"className":Wn(e,"class",l);break;case"tabIndex":Wn(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Wn(e,a,l);break;case"style":Nr(e,l,i);break;case"data":if(t!=="object"){Wn(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Fn(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 i=="function"&&(a==="formAction"?(t!=="input"&&_e(e,t,"name",n.name,n,null),_e(e,t,"formEncType",n.formEncType,n,null),_e(e,t,"formMethod",n.formMethod,n,null),_e(e,t,"formTarget",n.formTarget,n,null)):(_e(e,t,"encType",n.encType,n,null),_e(e,t,"method",n.method,n,null),_e(e,t,"target",n.target,n,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Fn(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=It);break;case"onScroll":l!=null&&he("scroll",e);break;case"onScrollEnd":l!=null&&he("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(f(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(f(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Fn(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":he("beforetoggle",e),he("toggle",e),$n(e,"popover",l);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":$n(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=om.get(a)||a,$n(e,a,l))}}function fu(e,t,a,l,n,i){switch(a){case"style":Nr(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(f(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(f(60));e.innerHTML=a}}break;case"children":typeof l=="string"?hl(e,l):(typeof l=="number"||typeof l=="bigint")&&hl(e,""+l);break;case"onScroll":l!=null&&he("scroll",e);break;case"onScrollEnd":l!=null&&he("scrollend",e);break;case"onClick":l!=null&&(e.onclick=It);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),t=a.slice(2,n?a.length-7:void 0),i=e[rt]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,n);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):$n(e,a,l)}}}function it(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var l=!1,n=!1,i;for(i in a)if(a.hasOwnProperty(i)){var r=a[i];if(r!=null)switch(i){case"src":l=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(f(137,t));default:_e(e,t,i,r,a,null)}}n&&_e(e,t,"srcSet",a.srcSet,a,null),l&&_e(e,t,"src",a.src,a,null);return;case"input":he("invalid",e);var d=i=r=n=null,m=null,j=null;for(l in a)if(a.hasOwnProperty(l)){var M=a[l];if(M!=null)switch(l){case"name":n=M;break;case"type":r=M;break;case"checked":m=M;break;case"defaultChecked":j=M;break;case"value":i=M;break;case"defaultValue":d=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(f(137,t));break;default:_e(e,t,l,M,a,null)}}gr(e,i,d,m,j,r,n,!1);return;case"select":he("invalid",e),l=r=i=null;for(n in a)if(a.hasOwnProperty(n)&&(d=a[n],d!=null))switch(n){case"value":i=d;break;case"defaultValue":r=d;break;case"multiple":l=d;default:_e(e,t,n,d,a,null)}t=i,a=r,e.multiple=!!l,t!=null?dl(e,!!l,t,!1):a!=null&&dl(e,!!l,a,!0);return;case"textarea":he("invalid",e),i=n=l=null;for(r in a)if(a.hasOwnProperty(r)&&(d=a[r],d!=null))switch(r){case"value":l=d;break;case"defaultValue":n=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(f(91));break;default:_e(e,t,r,d,a,null)}br(e,l,n,i);return;case"option":for(m in a)a.hasOwnProperty(m)&&(l=a[m],l!=null)&&(m==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":_e(e,t,m,l,a,null));return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(l=0;l<_n.length;l++)he(_n[l],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("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(j in a)if(a.hasOwnProperty(j)&&(l=a[j],l!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(f(137,t));default:_e(e,t,j,l,a,null)}return;default:if(Ei(t)){for(M in a)a.hasOwnProperty(M)&&(l=a[M],l!==void 0&&fu(e,t,M,l,a,void 0));return}}for(d in a)a.hasOwnProperty(d)&&(l=a[d],l!=null&&_e(e,t,d,l,a,null))}function Bv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,r=null,d=null,m=null,j=null,M=null;for(T in a){var O=a[T];if(a.hasOwnProperty(T)&&O!=null)switch(T){case"checked":break;case"value":break;case"defaultValue":m=O;default:l.hasOwnProperty(T)||_e(e,t,T,null,l,O)}}for(var E in l){var T=l[E];if(O=a[E],l.hasOwnProperty(E)&&(T!=null||O!=null))switch(E){case"type":i=T;break;case"name":n=T;break;case"checked":j=T;break;case"defaultChecked":M=T;break;case"value":r=T;break;case"defaultValue":d=T;break;case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(f(137,t));break;default:T!==O&&_e(e,t,E,T,l,O)}}Si(e,r,d,m,j,M,i,n);return;case"select":T=r=d=E=null;for(i in a)if(m=a[i],a.hasOwnProperty(i)&&m!=null)switch(i){case"value":break;case"multiple":T=m;default:l.hasOwnProperty(i)||_e(e,t,i,null,l,m)}for(n in l)if(i=l[n],m=a[n],l.hasOwnProperty(n)&&(i!=null||m!=null))switch(n){case"value":E=i;break;case"defaultValue":d=i;break;case"multiple":r=i;default:i!==m&&_e(e,t,n,i,l,m)}t=d,a=r,l=T,E!=null?dl(e,!!a,E,!1):!!l!=!!a&&(t!=null?dl(e,!!a,t,!0):dl(e,!!a,a?[]:"",!1));return;case"textarea":T=E=null;for(d in a)if(n=a[d],a.hasOwnProperty(d)&&n!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:_e(e,t,d,null,l,n)}for(r in l)if(n=l[r],i=a[r],l.hasOwnProperty(r)&&(n!=null||i!=null))switch(r){case"value":E=n;break;case"defaultValue":T=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(f(91));break;default:n!==i&&_e(e,t,r,n,l,i)}pr(e,E,T);return;case"option":for(var K in a)E=a[K],a.hasOwnProperty(K)&&E!=null&&!l.hasOwnProperty(K)&&(K==="selected"?e.selected=!1:_e(e,t,K,null,l,E));for(m in l)E=l[m],T=a[m],l.hasOwnProperty(m)&&E!==T&&(E!=null||T!=null)&&(m==="selected"?e.selected=E&&typeof E!="function"&&typeof E!="symbol":_e(e,t,m,E,l,T));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 te in a)E=a[te],a.hasOwnProperty(te)&&E!=null&&!l.hasOwnProperty(te)&&_e(e,t,te,null,l,E);for(j in l)if(E=l[j],T=a[j],l.hasOwnProperty(j)&&E!==T&&(E!=null||T!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(f(137,t));break;default:_e(e,t,j,E,l,T)}return;default:if(Ei(t)){for(var Ce in a)E=a[Ce],a.hasOwnProperty(Ce)&&E!==void 0&&!l.hasOwnProperty(Ce)&&fu(e,t,Ce,void 0,l,E);for(M in l)E=l[M],T=a[M],!l.hasOwnProperty(M)||E===T||E===void 0&&T===void 0||fu(e,t,M,E,l,T);return}}for(var x in a)E=a[x],a.hasOwnProperty(x)&&E!=null&&!l.hasOwnProperty(x)&&_e(e,t,x,null,l,E);for(O in l)E=l[O],T=a[O],!l.hasOwnProperty(O)||E===T||E==null&&T==null||_e(e,t,O,E,l,T)}function Ad(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var n=a[l],i=n.transferSize,r=n.initiatorType,d=n.duration;if(i&&d&&Ad(r)){for(r=0,d=n.responseEnd,l+=1;l<a.length;l++){var m=a[l],j=m.startTime;if(j>d)break;var M=m.transferSize,O=m.initiatorType;M&&Ad(O)&&(m=m.responseEnd,r+=M*(m<d?1:(d-j)/(m-j)))}if(--l,t+=8*(i+r)/(n.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 du=null,hu=null;function Ks(e){return e.nodeType===9?e:e.ownerDocument}function Ed(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 wd(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 mu(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 vu=null;function qv(){var e=window.event;return e&&e.type==="popstate"?e===vu?!1:(vu=e,!0):(vu=null,!1)}var Td=typeof setTimeout=="function"?setTimeout:void 0,Lv=typeof clearTimeout=="function"?clearTimeout:void 0,zd=typeof Promise=="function"?Promise:void 0,Yv=typeof queueMicrotask=="function"?queueMicrotask:typeof zd<"u"?function(e){return zd.resolve(null).then(e).catch(Qv)}:Td;function Qv(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Md(e,t){var a=t,l=0;do{var n=a.nextSibling;if(e.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(n),Xl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Dn(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Dn(a);for(var i=a.firstChild;i;){var r=i.nextSibling,d=i.nodeName;i[$l]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=r}}else a==="body"&&Dn(e.ownerDocument.body);a=n}while(a);Xl(t)}function _d(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function yu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":yu(a),Ni(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Gv(e,t,a,l){for(;e.nodeType===1;){var n=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[$l])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=kt(e.nextSibling),e===null)break}return null}function Xv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=kt(e.nextSibling),e===null))return null;return e}function Cd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kt(e.nextSibling),e===null))return null;return e}function gu(e){return e.data==="$?"||e.data==="$~"}function pu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Zv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function kt(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 bu=null;function Dd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return kt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Rd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Od(e,t,a){switch(t=Ks(a),e){case"html":if(e=t.documentElement,!e)throw Error(f(452));return e;case"head":if(e=t.head,!e)throw Error(f(453));return e;case"body":if(e=t.body,!e)throw Error(f(454));return e;default:throw Error(f(451))}}function Dn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ni(e)}var Bt=new Map,Ud=new Set;function Js(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ha=L.d;L.d={f:Vv,r:Kv,D:Jv,C:$v,L:Wv,m:Iv,X:Pv,S:Fv,M:ey};function Vv(){var e=ha.f(),t=qs();return e||t}function Kv(e){var t=rl(e);t!==null&&t.tag===5&&t.type==="form"?Io(t):ha.r(e)}var Yl=typeof document>"u"?null:document;function kd(e,t,a){var l=Yl;if(l&&typeof t=="string"&&t){var n=Mt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),Ud.has(n)||(Ud.add(n),e={rel:e,crossOrigin:a,href:t},l.querySelector(n)===null&&(t=l.createElement("link"),it(t,"link",e),et(t),l.head.appendChild(t)))}}function Jv(e){ha.D(e),kd("dns-prefetch",e,null)}function $v(e,t){ha.C(e,t),kd("preconnect",e,t)}function Wv(e,t,a){ha.L(e,t,a);var l=Yl;if(l&&e&&t){var n='link[rel="preload"][as="'+Mt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+Mt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+Mt(a.imageSizes)+'"]')):n+='[href="'+Mt(e)+'"]';var i=n;switch(t){case"style":i=Ql(e);break;case"script":i=Gl(e)}Bt.has(i)||(e=_({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bt.set(i,e),l.querySelector(n)!==null||t==="style"&&l.querySelector(Rn(i))||t==="script"&&l.querySelector(On(i))||(t=l.createElement("link"),it(t,"link",e),et(t),l.head.appendChild(t)))}}function Iv(e,t){ha.m(e,t);var a=Yl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Mt(l)+'"][href="'+Mt(e)+'"]',i=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Gl(e)}if(!Bt.has(i)&&(e=_({rel:"modulepreload",href:e},t),Bt.set(i,e),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(On(i)))return}l=a.createElement("link"),it(l,"link",e),et(l),a.head.appendChild(l)}}}function Fv(e,t,a){ha.S(e,t,a);var l=Yl;if(l&&e){var n=ol(l).hoistableStyles,i=Ql(e);t=t||"default";var r=n.get(i);if(!r){var d={loading:0,preload:null};if(r=l.querySelector(Rn(i)))d.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bt.get(i))&&xu(e,a);var m=r=l.createElement("link");et(m),it(m,"link",e),m._p=new Promise(function(j,M){m.onload=j,m.onerror=M}),m.addEventListener("load",function(){d.loading|=1}),m.addEventListener("error",function(){d.loading|=2}),d.loading|=4,$s(r,t,l)}r={type:"stylesheet",instance:r,count:1,state:d},n.set(i,r)}}}function Pv(e,t){ha.X(e,t);var a=Yl;if(a&&e){var l=ol(a).hoistableScripts,n=Gl(e),i=l.get(n);i||(i=a.querySelector(On(n)),i||(e=_({src:e,async:!0},t),(t=Bt.get(n))&&Nu(e,t),i=a.createElement("script"),et(i),it(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function ey(e,t){ha.M(e,t);var a=Yl;if(a&&e){var l=ol(a).hoistableScripts,n=Gl(e),i=l.get(n);i||(i=a.querySelector(On(n)),i||(e=_({src:e,async:!0,type:"module"},t),(t=Bt.get(n))&&Nu(e,t),i=a.createElement("script"),et(i),it(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function Bd(e,t,a,l){var n=(n=ae.current)?Js(n):null;if(!n)throw Error(f(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ql(a.href),a=ol(n).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ql(a.href);var i=ol(n).hoistableStyles,r=i.get(e);if(r||(n=n.ownerDocument||n,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,r),(i=n.querySelector(Rn(e)))&&!i._p&&(r.instance=i,r.state.loading=5),Bt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Bt.set(e,a),i||ty(n,e,a,r.state))),t&&l===null)throw Error(f(528,""));return r}if(t&&l!==null)throw Error(f(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Gl(a),a=ol(n).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(f(444,e))}}function Ql(e){return'href="'+Mt(e)+'"'}function Rn(e){return'link[rel="stylesheet"]['+e+"]"}function Hd(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function ty(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),it(t,"link",a),et(t),e.head.appendChild(t))}function Gl(e){return'[src="'+Mt(e)+'"]'}function On(e){return"script[async]"+e}function qd(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Mt(a.href)+'"]');if(l)return t.instance=l,et(l),l;var n=_({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),et(l),it(l,"style",n),$s(l,a.precedence,e),t.instance=l;case"stylesheet":n=Ql(a.href);var i=e.querySelector(Rn(n));if(i)return t.state.loading|=4,t.instance=i,et(i),i;l=Hd(a),(n=Bt.get(n))&&xu(l,n),i=(e.ownerDocument||e).createElement("link"),et(i);var r=i;return r._p=new Promise(function(d,m){r.onload=d,r.onerror=m}),it(i,"link",l),t.state.loading|=4,$s(i,a.precedence,e),t.instance=i;case"script":return i=Gl(a.src),(n=e.querySelector(On(i)))?(t.instance=n,et(n),n):(l=a,(n=Bt.get(i))&&(l=_({},a),Nu(l,n)),e=e.ownerDocument||e,n=e.createElement("script"),et(n),it(n,"link",l),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(f(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,$s(l,a.precedence,e));return t.instance}function $s(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,i=n,r=0;r<l.length;r++){var d=l[r];if(d.dataset.precedence===t)i=d;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function xu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Nu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ws=null;function Ld(e,t,a){if(Ws===null){var l=new Map,n=Ws=new Map;n.set(a,l)}else n=Ws,l=n.get(a),l||(l=new Map,n.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),n=0;n<a.length;n++){var i=a[n];if(!(i[$l]||i[at]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var r=i.getAttribute(t)||"";r=e+r;var d=l.get(r);d?d.push(i):l.set(r,[i])}}return l}function Yd(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ay(e,t,a){if(a===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 Qd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ly(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Ql(l.href),i=t.querySelector(Rn(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Is.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,et(i);return}i=t.ownerDocument||t,l=Hd(l),(n=Bt.get(n))&&xu(l,n),i=i.createElement("link"),et(i);var r=i;r._p=new Promise(function(d,m){r.onload=d,r.onerror=m}),it(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Is.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var ju=0;function ny(e,t){return e.stylesheets&&e.count===0&&Ps(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ps(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&ju===0&&(ju=62500*Hv());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ps(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>ju?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(n)}}:null}function Is(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ps(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Fs=null;function Ps(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Fs=new Map,t.forEach(sy,e),Fs=null,Is.call(e))}function sy(e,t){if(!(t.state.loading&4)){var a=Fs.get(e);if(a)var l=a.get(null);else{a=new Map,Fs.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var r=n[i];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(a.set(r.dataset.precedence,r),l=r)}l&&a.set(null,l)}n=t.instance,r=n.getAttribute("data-precedence"),i=a.get(r)||l,i===l&&a.set(null,n),a.set(r,n),this.count++,l=Is.bind(this),n.addEventListener("load",l),n.addEventListener("error",l),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Un={$$typeof:le,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function iy(e,t,a,l,n,i,r,d,m){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=gi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gi(0),this.hiddenUpdates=gi(null),this.identifierPrefix=l,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function Gd(e,t,a,l,n,i,r,d,m,j,M,O){return e=new iy(e,t,a,r,m,j,M,O,d),t=1,i===!0&&(t|=24),i=Nt(3,null,null,t),e.current=i,i.stateNode=e,t=tc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},sc(i),e}function Xd(e){return e?(e=xl,e):xl}function Zd(e,t,a,l,n,i){n=Xd(n),l.context===null?l.context=n:l.pendingContext=n,l=Aa(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=Ea(e,l,t),a!==null&&(vt(a,e,t),hn(a,e,t))}function Vd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Su(e,t){Vd(e,t),(e=e.alternate)&&Vd(e,t)}function Kd(e){if(e.tag===13||e.tag===31){var t=Va(e,67108864);t!==null&&vt(t,e,67108864),Su(e,67108864)}}function Jd(e){if(e.tag===13||e.tag===31){var t=wt();t=pi(t);var a=Va(e,t);a!==null&&vt(a,e,t),Su(e,t)}}var ei=!0;function cy(e,t,a,l){var n=z.T;z.T=null;var i=L.p;try{L.p=2,Au(e,t,a,l)}finally{L.p=i,z.T=n}}function uy(e,t,a,l){var n=z.T;z.T=null;var i=L.p;try{L.p=8,Au(e,t,a,l)}finally{L.p=i,z.T=n}}function Au(e,t,a,l){if(ei){var n=Eu(l);if(n===null)ou(e,t,l,ti,a),Wd(e,l);else if(oy(n,e,t,a,l))l.stopPropagation();else if(Wd(e,l),t&4&&-1<ry.indexOf(e)){for(;n!==null;){var i=rl(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var r=Ya(i.pendingLanes);if(r!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;r;){var m=1<<31-bt(r);d.entanglements[1]|=m,r&=~m}Vt(i),(Ee&6)===0&&(Bs=gt()+500,Mn(0))}}break;case 31:case 13:d=Va(i,2),d!==null&&vt(d,i,2),qs(),Su(i,2)}if(i=Eu(l),i===null&&ou(e,t,l,ti,a),i===n)break;n=i}n!==null&&l.stopPropagation()}else ou(e,t,l,null,a)}}function Eu(e){return e=Ti(e),wu(e)}var ti=null;function wu(e){if(ti=null,e=ul(e),e!==null){var t=v(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=b(t),e!==null)return e;e=null}else if(a===31){if(e=w(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ti=e,null}function $d(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(Jh()){case tr:return 2;case ar:return 8;case Xn:case $h:return 32;case lr:return 268435456;default:return 32}default:return 32}}var Tu=!1,ka=null,Ba=null,Ha=null,kn=new Map,Bn=new Map,qa=[],ry="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 Wd(e,t){switch(e){case"focusin":case"focusout":ka=null;break;case"dragenter":case"dragleave":Ba=null;break;case"mouseover":case"mouseout":Ha=null;break;case"pointerover":case"pointerout":kn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bn.delete(t.pointerId)}}function Hn(e,t,a,l,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[n]},t!==null&&(t=rl(t),t!==null&&Kd(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function oy(e,t,a,l,n){switch(t){case"focusin":return ka=Hn(ka,e,t,a,l,n),!0;case"dragenter":return Ba=Hn(Ba,e,t,a,l,n),!0;case"mouseover":return Ha=Hn(Ha,e,t,a,l,n),!0;case"pointerover":var i=n.pointerId;return kn.set(i,Hn(kn.get(i)||null,e,t,a,l,n)),!0;case"gotpointercapture":return i=n.pointerId,Bn.set(i,Hn(Bn.get(i)||null,e,t,a,l,n)),!0}return!1}function Id(e){var t=ul(e.target);if(t!==null){var a=v(t);if(a!==null){if(t=a.tag,t===13){if(t=b(a),t!==null){e.blockedOn=t,rr(e.priority,function(){Jd(a)});return}}else if(t===31){if(t=w(a),t!==null){e.blockedOn=t,rr(e.priority,function(){Jd(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ai(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Eu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);wi=l,a.target.dispatchEvent(l),wi=null}else return t=rl(a),t!==null&&Kd(t),e.blockedOn=a,!1;t.shift()}return!0}function Fd(e,t,a){ai(e)&&a.delete(t)}function fy(){Tu=!1,ka!==null&&ai(ka)&&(ka=null),Ba!==null&&ai(Ba)&&(Ba=null),Ha!==null&&ai(Ha)&&(Ha=null),kn.forEach(Fd),Bn.forEach(Fd)}function li(e,t){e.blockedOn===t&&(e.blockedOn=null,Tu||(Tu=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,fy)))}var ni=null;function Pd(e){ni!==e&&(ni=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){ni===e&&(ni=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],n=e[t+2];if(typeof l!="function"){if(wu(l||a)===null)continue;break}var i=rl(a);i!==null&&(e.splice(t,3),t-=3,Ec(i,{pending:!0,data:n,method:a.method,action:l},l,n))}}))}function Xl(e){function t(m){return li(m,e)}ka!==null&&li(ka,e),Ba!==null&&li(Ba,e),Ha!==null&&li(Ha,e),kn.forEach(t),Bn.forEach(t);for(var a=0;a<qa.length;a++){var l=qa[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<qa.length&&(a=qa[0],a.blockedOn===null);)Id(a),a.blockedOn===null&&qa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var n=a[l],i=a[l+1],r=n[rt]||null;if(typeof i=="function")r||Pd(a);else if(r){var d=null;if(i&&i.hasAttribute("formAction")){if(n=i,r=i[rt]||null)d=r.formAction;else if(wu(n)!==null)continue}else d=r.action;typeof d=="function"?a[l+1]=d:(a.splice(l,3),l-=3),Pd(a)}}}function eh(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(r){return n=r})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function zu(e){this._internalRoot=e}si.prototype.render=zu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(f(409));var a=t.current,l=wt();Zd(a,l,e,t,null,null)},si.prototype.unmount=zu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zd(e.current,2,null,e,null,null),qs(),t[cl]=null}};function si(e){this._internalRoot=e}si.prototype.unstable_scheduleHydration=function(e){if(e){var t=ur();e={blockedOn:null,target:e,priority:t};for(var a=0;a<qa.length&&t!==0&&t<qa[a].priority;a++);qa.splice(a,0,e),a===0&&Id(e)}};var th=u.version;if(th!=="19.2.3")throw Error(f(527,th,"19.2.3"));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(f(188)):(e=Object.keys(e).join(","),Error(f(268,e)));return e=y(t),e=e!==null?B(e):null,e=e===null?null:e.stateNode,e};var dy={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ii=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ii.isDisabled&&ii.supportsFiber)try{Vl=ii.inject(dy),pt=ii}catch{}}return Ln.createRoot=function(e,t){if(!h(e))throw Error(f(299));var a=!1,l="",n=uf,i=rf,r=of;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=Gd(e,1,!1,null,null,a,l,null,n,i,r,eh),e[cl]=t.current,ru(e),new zu(t)},Ln.hydrateRoot=function(e,t,a){if(!h(e))throw Error(f(299));var l=!1,n="",i=uf,r=rf,d=of,m=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(r=a.onCaughtError),a.onRecoverableError!==void 0&&(d=a.onRecoverableError),a.formState!==void 0&&(m=a.formState)),t=Gd(e,1,!0,t,a??null,l,n,m,i,r,d,eh),t.context=Xd(null),a=t.current,l=wt(),l=pi(l),n=Aa(l),n.callback=null,Ea(a,n,l),a=l,t.current.lanes=a,Jl(t,a),Vt(t),e[cl]=t.current,ru(e),new si(t)},Ln.version="19.2.3",Ln}var fh;function Ey(){if(fh)return Cu.exports;fh=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(u){console.error(u)}}return c(),Cu.exports=Ay(),Cu.exports}var wy=Ey();function Uu(){const c=window.location.pathname.replace(/^\/+/,"").split("/").filter(Boolean);return c[0]==="agent"&&c[1]?{view:"agent-info",conversationId:decodeURIComponent(c[1])}:c[0]==="agents"&&c[1]&&c[2]==="c"&&c[3]?{view:"agents",agentId:decodeURIComponent(c[1]),conversationId:decodeURIComponent(c[3])}:c[0]==="agents"&&c[1]?{view:"agents",agentId:decodeURIComponent(c[1])}:c[0]==="agents"?{view:"agents"}:c[0]==="fleet"?{view:"fleet"}:c[0]==="c"&&c[1]?{view:"conversation",conversationId:decodeURIComponent(c[1])}:c[0]==="sessions"&&c[1]?{view:"sessions",sessionId:decodeURIComponent(c[1])}:c[0]==="sessions"?{view:"sessions"}:c[0]==="mesh"?{view:"mesh"}:c[0]==="activity"?{view:"activity"}:c[0]==="work"&&c[1]?{view:"work",workId:decodeURIComponent(c[1])}:c[0]==="settings"?{view:"settings"}:{view:"inbox"}}function Ty(c){switch(c.view){case"inbox":return"/";case"conversation":return`/c/${encodeURIComponent(c.conversationId)}`;case"agent-info":return`/agent/${encodeURIComponent(c.conversationId)}`;case"agents":return c.agentId?c.conversationId?`/agents/${encodeURIComponent(c.agentId)}/c/${encodeURIComponent(c.conversationId)}`:`/agents/${encodeURIComponent(c.agentId)}`:"/agents";case"fleet":return"/fleet";case"sessions":return c.sessionId?`/sessions/${encodeURIComponent(c.sessionId)}`:"/sessions";case"mesh":return"/mesh";case"activity":return"/activity";case"work":return`/work/${encodeURIComponent(c.workId)}`;case"settings":return"/settings"}}function ku(c){switch(c.view){case"conversation":return`conv:${c.conversationId}`;case"agent-info":return`agent-info:${c.conversationId}`;case"agents":return c.conversationId?`agent-conv:${c.conversationId}`:c.agentId?`agent:${c.agentId}`:"agents";case"sessions":return c.sessionId?`session:${c.sessionId}`:"sessions";case"work":return`work:${c.workId}`;default:return c.view}}function zy(){const[c,u]=A.useState(Uu),o=A.useRef({});A.useEffect(()=>{const h=()=>{const v=Uu();u(v),requestAnimationFrame(()=>{window.scrollTo(0,o.current[ku(v)]??0)})};return window.addEventListener("popstate",h),()=>window.removeEventListener("popstate",h)},[]);const f=A.useCallback(h=>{o.current[ku(Uu())]=window.scrollY,window.history.pushState(null,"",Ty(h)),u(h),requestAnimationFrame(()=>{window.scrollTo(0,o.current[ku(h)]??0)})},[]);return{route:c,navigate:f}}function Th(c){const u=c.match(/^dm\.operator\.(.+)$/);return u?u[1]:null}function My(c){return`dm.operator.${c}`}async function He(c,u){const o=await fetch(c,{...u,headers:{...u?.headers??{},...u?.body?{"content-type":"application/json"}:{}}});if(!o.ok){const h=await o.text();throw new Error(h||`HTTP ${o.status}`)}const f=await o.text();if(f)return JSON.parse(f)}const _y=["hello","node.upserted","actor.registered","agent.registered","agent.endpoint.upserted","conversation.upserted","binding.upserted","message.posted","invocation.requested","flight.updated","delivery.planned","delivery.attempted","delivery.state.changed","collaboration.upserted","collaboration.event.appended","scout.dispatched"];function Cy(c){try{return JSON.parse(c)}catch{return{kind:"unknown"}}}function Jt(c){const u=A.useRef(c);u.current=c,A.useEffect(()=>{let o=null,f=null;function h(){o=new EventSource("/api/events");const v=b=>{u.current(Cy(b.data))};o.onmessage=v;for(const b of _y)o.addEventListener(b,v);o.onerror=()=>{o?.close(),f=setTimeout(h,3e3)}}return h(),()=>{o?.close(),f&&clearTimeout(f)}},[])}function Qt(c){return c==="working"||c==="active"||c==="waiting"?"working":!c||c==="offline"?"offline":"available"}function di(c){return Qt(c)!=="offline"}function Qn(c){switch(Qt(c)){case"working":return"Working";case"available":return"Available";default:return"Offline"}}function ze(c){const u=c<1e12?c*1e3:c,o=Math.floor((Date.now()-u)/1e3);return o<5?"now":o<60?`${o}s`:o<3600?`${Math.floor(o/60)}m`:o<86400?`${Math.floor(o/3600)}h`:`${Math.floor(o/86400)}d`}function il(c){return new Date(c<1e12?c*1e3:c).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}const Dy={ask_sent:"asked",ask_replied:"replied",ask_failed:"failed",ask_working:"working",flight_created:"task started",flight_updated:"task updated",message_sent:"sent",message_received:"received",agent_online:"online",agent_offline:"offline"};function Ry(c){return Dy[c]??c.replace(/_/g," ")}const dh=["#6366f1","#8b5cf6","#0ea5e9","#14b8a6","#f59e0b","#ef4444","#ec4899","#10b981"];function $t(c){let u=0;for(let o=0;o<c.length;o++)u=(u<<5)-u+c.charCodeAt(o)|0;return dh[Math.abs(u)%dh.length]}function Zl(c){switch(Qt(c)){case"working":return"var(--green)";case"available":return"var(--accent)";default:return"var(--dim)"}}const Oy={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",node:"node",host:"node"};function Uy(c){return c.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function Kt(c){return c.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const ky="scout";function By(c){return Oy[Kt(c)]??null}function zh(c){const u=Kt(c.definitionId),o=c.workspaceQualifier?Kt(c.workspaceQualifier):void 0,f=c.profile?Kt(c.profile):void 0,h=c.harness?Kt(c.harness):void 0,v=c.nodeQualifier?Kt(c.nodeQualifier):void 0;return u?{definitionId:u,...o?{workspaceQualifier:o}:{},...f?{profile:f}:{},...h?{harness:h}:{},...v?{nodeQualifier:v}:{}}:null}function Hy(c){const u=c.split(".").filter(Boolean),o=u.shift();if(!o)return null;const f={definitionId:o},h=[];for(const v of u){if(v.includes(":")){const[b,w=""]=v.split(":",2),S=By(b),y=Kt(w);if(!S||!y)return null;S==="workspace"?f.workspaceQualifier=y:S==="profile"?f.profile=y:S==="harness"?f.harness=y:S==="node"&&(f.nodeQualifier=y);continue}h.push(v)}if(h.length===1){const v=Kt(h[0]);if(!v)return null;f.workspaceQualifier=v}else if(h.length===2){const v=Kt(h[0]),b=Kt(h[1]);if(!v||!b)return null;f.workspaceQualifier||(f.workspaceQualifier=v),f.nodeQualifier||(f.nodeQualifier=b)}else if(h.length>2)return null;return Ly(f,{raw:c})}function qy(c){const u=Uy(c);return!u||u.includes("@")||u.includes("#")?null:Hy(u)}function hh(c,u={}){const o=zh(c);if(!o)return u.includeSigil===!1?"":"@";const h=[`${u.includeSigil===!1?"":"@"}${o.definitionId}`];return o.workspaceQualifier&&h.push(o.workspaceQualifier),o.profile&&h.push(`profile:${o.profile}`),o.harness&&h.push(`harness:${o.harness}`),o.nodeQualifier&&h.push(`node:${o.nodeQualifier}`),h.join(".")}function Ly(c,u={}){const o=zh(c);return o?{raw:u.raw??hh(o,{includeSigil:!1}),label:hh(o),definitionId:o.definitionId,...o.nodeQualifier?{nodeQualifier:o.nodeQualifier}:{},...o.workspaceQualifier?{workspaceQualifier:o.workspaceQualifier}:{},...o.profile?{profile:o.profile}:{},...o.harness?{harness:o.harness}:{}}:null}function Yy(c){return Qy(c).parsed}function Qy(c){const u=Array.from(c.matchAll(/(^|\s)@([a-z0-9][a-z0-9._/:-]*)/gi)),o=new Map,f=[];for(const h of u){const v=h[2]??"",b=qy(v);if(!b){v&&f.push(`@${v}`);continue}o.set(b.label,b)}return{parsed:Array.from(o.values()),unparsed:Array.from(new Set(f))}}function Gy(c,u){if(u.length===0)return[{kind:"text",value:c}];const o=new Map;for(const b of u)o.set(b.label.toLowerCase(),b);const f=[];let h=c;const v=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;h.length>0;){const b=v.exec(h);if(!b||b.index===void 0){f.push({kind:"text",value:h});break}b.index>0&&f.push({kind:"text",value:h.slice(0,b.index)});const w=b[0],S=w.toLowerCase(),y=o.get(S);y?f.push({kind:"mention",identity:y}):f.push({kind:"text",value:w}),h=h.slice(b.index+w.length)}return f}function Xy(c,u){const o=[],f=/\*\*(.+?)\*\*/g;let h=0,v,b=0;for(;(v=f.exec(c))!==null;)v.index>h&&o.push(s.jsx("span",{children:c.slice(h,v.index)},`${u}-${b++}`)),o.push(s.jsx("strong",{children:v[1]},`${u}-${b++}`)),h=v.index+v[0].length;return h<c.length&&o.push(s.jsx("span",{children:c.slice(h)},`${u}-${b++}`)),o.length>0?o:[s.jsx("span",{children:c},u)]}function Tt(c){if(!c)return c??"";const u=Yy(c);return Gy(c,u).flatMap((f,h)=>{if(f.kind==="text")return Xy(f.value,h*100);const{identity:v}=f,w=v.definitionId===ky?"var(--accent)":$t(v.definitionId);return s.jsx("span",{className:"s-mention",style:{"--mention-color":w},children:v.label},h)})}const Xu=new Set(["completed","failed","cancelled"]),Zy={direct:"Direct message",channel:"Channel",group_direct:"Group",thread:"Thread"};function yt(c){return typeof c!="number"||!Number.isFinite(c)||c<=0?null:c<1e12?c*1e3:c}function Vy(c){if(!c)return null;const u=c.replace(/[\\/]+$/,"");return u?u.split(/[\\/]/).filter(Boolean).at(-1)??u:null}function Ky(c){return c.kind==="direct"&&c.agentName?c.agentName:c.title.replace(/\s*<>\s*/g," · ")}function Bu(c){const u=yt(c);return u===null?"":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(u)}function Jy(c,u){const o=yt(c),f=yt(u);if(o===null||f===null)return!1;const h=new Date(o),v=new Date(f);return h.getFullYear()===v.getFullYear()&&h.getMonth()===v.getMonth()&&h.getDate()===v.getDate()}function mh(c){const u=yt(c);if(u===null)return"";const o=new Date(u),f=new Date,h=new Date(f.getFullYear(),f.getMonth(),f.getDate()).getTime(),v=new Date(o.getFullYear(),o.getMonth(),o.getDate()).getTime(),b=1440*60*1e3;return v===h?"Today":v===h-b?"Yesterday":new Intl.DateTimeFormat(void 0,{weekday:"short",month:"short",day:"numeric"}).format(u)}function $y(c){switch(c){case"status":return"Status";case"system":return"System";case"scout.dispatch":return"Dispatch";default:return null}}function ci(c){return[...c].sort((u,o)=>(yt(u.createdAt)??0)-(yt(o.createdAt)??0))}function Wy(c){return c.filter(u=>!Xu.has(u.state)).sort((u,o)=>(yt(o.startedAt)??0)-(yt(u.startedAt)??0))[0]??null}function vh(c,u,o){return{id:c.id,invocationId:c.invocationId,agentId:c.targetAgentId||o,agentName:null,conversationId:u,collaborationRecordId:null,state:c.state,summary:c.summary??null,startedAt:c.startedAt??null,completedAt:c.completedAt??null}}function Iy(c){const u=c.metadata?.scoutDispatch;if(!u||typeof u!="object")return null;const o=u;return!o.id||!o.kind||!Array.isArray(o.candidates)?null:o}function Mh(c,u){if(c.class==="operator")return!0;const o=c.actorName?.toLowerCase()??"";return o===u.toLowerCase()||o==="operator"||o==="you"}function Fy(c,u){return c.reduce((o,f)=>{if(Mh(f,u))return o;const h=yt(f.createdAt);return h===null?o:o===null||h>o?h:o},null)}function Py(c,u){switch(u){case"queued":return`${c} has your message and is waiting to start.`;case"waking":return`${c} is waking up now.`;case"waiting":return`${c} is thinking through the request.`;case"running":return`${c} is working on your request.`;default:return`${c} is working on it.`}}function eg(c){const{agentName:u,agentState:o,sending:f,currentFlight:h,showWorkingTurn:v}=c;if(f&&!h)return{label:"Sending",detail:`Handing your message to ${u}.`,tone:"pending",showStrip:!0,showTyping:!1};if(h&&v){const b=h.summary?.trim()||Py(u,h.state);switch(h.state){case"queued":return{label:"Queued",detail:b,tone:"pending",showStrip:!0,showTyping:!0};case"waking":return{label:"Coming online",detail:b,tone:"working",showStrip:!0,showTyping:!0};case"waiting":return{label:"Thinking",detail:b,tone:"working",showStrip:!0,showTyping:!0};default:return{label:"Working",detail:b,tone:"working",showStrip:!0,showTyping:!0}}}return di(o)?{label:"Available",detail:`${u} is connected.`,tone:"idle",showStrip:!1,showTyping:!1}:{label:"Offline",detail:`${u} is offline right now. Sending a message will wake it up.`,tone:"offline",showStrip:!0,showTyping:!1}}function tg(c,u){switch(c.tone){case"pending":return"var(--accent)";case"working":return"var(--green)";case"offline":return"var(--dim)";default:return Zl(u)}}function ag(){return s.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("path",{d:"m3 11 18-8-8 18-2.8-7.2L3 11Z"}),s.jsx("path",{d:"M10.2 13.8 21 3"})]})}function yh({label:c,value:u}){return s.jsxs("div",{className:"s-conv-meta-row",children:[s.jsx("span",{className:"s-conv-meta-label",children:c}),s.jsx("span",{className:"s-conv-meta-value",children:u})]})}function lg(c){if(!c)return null;const u=c.participantIds.filter(o=>o!=="operator");return u.length===0?null:u.join(", ")}function Zu({conversationId:c,navigate:u}){const[o,f]=A.useState(null),[h,v]=A.useState(null),[b,w]=A.useState([]),[S,y]=A.useState(null),[B,_]=A.useState(null),k=A.useRef(null),Y=A.useRef(null),J=A.useRef(new Set),U=A.useRef(null),ue=A.useRef(0),oe=Th(c),ye=h?.agentId??oe,le=h?.kind==="direct"||oe!==null,fe=A.useCallback(async()=>{_(null);try{const[X,I]=await Promise.all([He("/api/agents"),He(`/api/session/${encodeURIComponent(c)}`).catch(()=>null)]);v(I);const xe=I?.agentId??oe;f(xe?X.find(Je=>Je.id===xe)??null:null);const Oe=I?.kind==="direct"&&xe&&xe.startsWith("local-session-agent-")?My(xe):c;if(Oe!==c){u({view:"conversation",conversationId:Oe});return}const[Ae,Ue]=await Promise.all([He(`/api/messages?conversationId=${encodeURIComponent(Oe)}&limit=300`),He(`/api/flights?conversationId=${encodeURIComponent(Oe)}`)]);w(ci(Ae)),J.current=new Set(Ue.map(Je=>Je.invocationId)),y(Wy(Ue))}catch(X){_(X instanceof Error?X.message:String(X))}},[c,oe,u]);A.useEffect(()=>{fe()},[fe]),A.useEffect(()=>{U.current=S},[S]);const[Z,G]=A.useState(""),[R,ee]=A.useState(!1),[ge,q]=A.useState("operator"),[W,se]=A.useState(null);A.useEffect(()=>{const X=Y.current;if(!X)return;X.style.height="0px";const I=Math.min(Math.max(X.scrollHeight,40),160);X.style.height=`${I}px`,X.style.overflowY=X.scrollHeight>I?"auto":"hidden"},[Z]),A.useEffect(()=>{He("/api/user").then(X=>q(X.name)).catch(()=>{})},[]);const Ke=A.useMemo(()=>Fy(b,ge),[b,ge]);A.useEffect(()=>{W===null||Ke===null||Ke>=W&&se(null)},[W,Ke]);const Re=A.useMemo(()=>!S||Xu.has(S.state)?!1:(yt(S.startedAt)??W??Date.now())>=(Ke??0),[W,S,Ke]),Qe=R||W!==null||Re,z=o?.name??h?.agentName??h?.title??ye??"Conversation",L=A.useMemo(()=>eg({agentName:z,agentState:o?.state??null,sending:R,currentFlight:S,showWorkingTurn:Re}),[o?.state,z,S,R,Re]),F=h?Ky(h):z,be=h?.kind?Zy[h.kind]??h.kind:"Conversation",Se=lg(h)??c,p=Vy(h?.workspaceRoot),D=h?.lastMessageAt??b[b.length-1]?.createdAt??null,Q=[p?{label:p,title:h?.workspaceRoot??void 0}:null,h?.currentBranch?{label:h.currentBranch,title:h.currentBranch}:null,o?.harness??h?.harness?{label:o?.harness??h?.harness??"",title:void 0}:null].filter(X=>!!X);Jt(A.useCallback(X=>{if(X.kind==="message.posted"){const I=X.payload?.message;if(!I||I.conversationId!==c)return;const xe=I.actorId===ye,Oe={id:I.id,conversationId:I.conversationId,actorName:xe?z:ge,body:I.body,createdAt:I.createdAt,class:xe?I.class:"operator"};if(w(Ae=>{if(Ae.some(Ue=>Ue.id===I.id))return Ae;if(!xe){const Ue=Ae.findIndex(Je=>Je.id.startsWith("optimistic-")&&Je.body===I.body&&Math.abs((yt(Je.createdAt)??0)-(yt(I.createdAt)??0))<=6e4);if(Ue!==-1){const Je=[...Ae];return Je[Ue]=Oe,ci(Je)}}return ci([...Ae,Oe])}),xe){const Ae=yt(I.createdAt)??Date.now();se(Ue=>Ue===null||Ae<Ue?Ue:null),y(Ue=>{if(!Ue)return Ue;const Je=yt(Ue.startedAt)??0;return Ae>=Je?null:Ue})}return}if(X.kind==="invocation.requested"){const I=X.payload?.invocation;if(!I||I.targetAgentId!==ye||I.conversationId!==c)return;J.current.add(I.id),se(xe=>xe??Date.now());return}if(X.kind==="flight.updated"){const I=X.payload?.flight;if(!I||I.targetAgentId!==ye||!(J.current.has(I.invocationId)||U.current?.id===I.id))return;if(Xu.has(I.state)){y(Oe=>Oe?.id===I.id?null:Oe),fe();return}J.current.add(I.invocationId),y(vh(I,c,ye??""));return}if(X.kind==="agent.endpoint.upserted"){const I=X.payload?.endpoint;if(!I||I.agentId!==ye)return;f(xe=>xe&&{...xe,harness:I.harness??xe.harness,state:I.state,updatedAt:Date.now()});return}X.kind==="unknown"&&fe()},[ye,z,c,fe,ge])),A.useEffect(()=>{if(!Qe)return;const X=setInterval(()=>{fe()},5e3);return()=>clearInterval(X)},[Qe,fe]),A.useEffect(()=>{const X=()=>{if(document.visibilityState!=="visible")return;const I=Date.now();I-ue.current<1e3||(ue.current=I,fe())};return window.addEventListener("focus",X),document.addEventListener("visibilitychange",X),()=>{window.removeEventListener("focus",X),document.removeEventListener("visibilitychange",X)}},[fe]);const V=b.length+(L.showTyping?1:0),H=A.useRef(0);A.useEffect(()=>{V>H.current&&k.current?.scrollIntoView({behavior:"smooth"}),H.current=V},[V]);const[,ae]=A.useState(0);A.useEffect(()=>{const X=setInterval(()=>ae(I=>I+1),15e3);return()=>clearInterval(X)},[]);const re=async X=>{const I=X.trim();if(!I||R)return;const xe=Date.now(),Oe={id:`optimistic-${xe}`,conversationId:c,actorName:ge,body:I,createdAt:xe,class:"operator"};ee(!0),se(xe),_(null),w(Ae=>ci([...Ae,Oe]));try{const Ae=await He("/api/send",{method:"POST",body:JSON.stringify({body:I,conversationId:c})});Ae.flight&&(J.current.add(Ae.flight.invocationId),y(vh(Ae.flight,c,ye??"")))}catch(Ae){w(Ue=>Ue.filter(Je=>Je.id!==Oe.id)),se(null),_(Ae instanceof Error?Ae.message:String(Ae))}finally{ee(!1)}},qe=async()=>{const X=Z.trim();X&&(G(""),await re(X))},Ye=async(X,I)=>{const xe=`@${I.agentId} `,Oe=Z.trim();if(Oe){G(""),await re(`${xe}${Oe}`);return}G(xe),Y.current?.focus()};return s.jsxs("div",{className:"s-conversation s-inbox-thread-redesign",children:[s.jsxs("div",{className:"s-conv-header",onClick:()=>le?u({view:"agent-info",conversationId:c}):void 0,style:le?void 0:{cursor:"default"},children:[s.jsx("button",{type:"button",className:"s-back",onClick:X=>{X.stopPropagation(),u(le?{view:"inbox"}:{view:"sessions"})},children:"←"}),s.jsxs("div",{className:"s-thread-header-copy",children:[s.jsxs("div",{className:"s-thread-header-main",children:[s.jsx("div",{className:"s-avatar s-avatar-sm",style:{background:$t(z)},children:z[0]?.toUpperCase()??"?"}),s.jsxs("div",{className:"s-conv-header-info",children:[s.jsx("span",{className:"s-conv-header-name",children:F}),s.jsxs("span",{className:"s-conv-header-state",title:le?L.detail:Se,children:[s.jsx("span",{className:"s-dot s-dot-sm",style:{background:tg(L,o?.state??null)}}),le?L.label:Se]})]})]}),s.jsxs("div",{className:"s-thread-header-meta",children:[s.jsx("span",{className:"s-thread-kicker",children:be}),D&&s.jsx("span",{className:"s-thread-header-updated s-tabular",title:Bu(D),children:ze(D)})]})]}),Q.length>0&&s.jsx("div",{className:"s-thread-header-chips","aria-label":"Thread details",children:Q.map((X,I)=>s.jsx("span",{className:"s-thread-chip",title:X.title,children:X.label},`${X.label}-${I}`))}),le&&ye&&s.jsx("span",{className:"s-chevron"})]}),L.showStrip&&s.jsxs("div",{className:`s-conv-status s-conv-status-${L.tone}`,"aria-live":"polite",children:[s.jsx("span",{className:"s-conv-status-dot"}),s.jsxs("div",{className:"s-conv-status-copy",children:[s.jsx("span",{className:"s-conv-status-label",children:L.label}),s.jsx("span",{className:"s-conv-status-detail",children:L.detail})]})]}),le&&o&&(o.harnessSessionId||o.harnessLogPath)&&s.jsxs("details",{className:"s-conv-meta-disclosure",children:[s.jsx("summary",{className:"s-conv-meta-toggle",children:"Session details"}),s.jsxs("div",{className:"s-conv-meta","aria-label":"Agent session metadata",children:[o.harnessSessionId&&s.jsx(yh,{label:"Harness Session",value:o.harnessSessionId}),o.harnessLogPath&&s.jsx(yh,{label:"Harness Log",value:o.harnessLogPath})]})]}),B&&s.jsx("p",{className:"s-error",children:B}),s.jsxs("div",{className:"s-messages",children:[b.length===0?s.jsxs("div",{className:"s-empty s-thread-empty",children:[s.jsx("p",{children:"No messages yet"}),s.jsx("p",{children:le?`Start a conversation with ${z}.`:"Start the thread below."})]}):b.map((X,I)=>{const xe=Mh(X,ge),Oe=Iy(X),Ae=Oe?"scout.dispatch":X.class,Ue=$y(Ae),Je=I===0||!Jy(b[I-1]?.createdAt,X.createdAt),Gn=Bu(X.createdAt);return s.jsxs("div",{className:"s-thread-message-block",children:[Je&&s.jsxs("div",{className:"s-thread-day-divider","aria-label":mh(X.createdAt),children:[s.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"}),s.jsx("span",{className:"s-thread-day-label",children:mh(X.createdAt)}),s.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"})]}),s.jsx("article",{className:`s-msg s-row-message${xe?" s-msg-you":""}`,"data-class":Ae,children:s.jsxs("div",{className:"s-msg-card",children:[s.jsxs("div",{className:"s-msg-header",children:[s.jsxs("div",{className:"s-msg-meta",children:[s.jsx("span",{className:"s-msg-actor",children:xe?"You":X.actorName}),Ue&&s.jsx("span",{className:"s-msg-kind",children:Ue})]}),s.jsx("span",{className:"s-msg-time",title:Gn,children:ze(X.createdAt)})]}),s.jsx("div",{className:"s-msg-body",title:Gn,children:Tt(X.body)}),Oe&&Oe.candidates.length>0&&s.jsx("div",{className:"s-scout-dispatch",children:Oe.candidates.map(Ht=>s.jsxs("button",{type:"button",className:"s-scout-tile",onClick:()=>{Ye(Oe,Ht)},children:[s.jsxs("span",{className:"s-scout-tile-id",children:["@",Ht.agentId]}),s.jsx("span",{className:"s-scout-tile-state",children:Ht.endpointState}),s.jsx("span",{className:"s-scout-tile-meta",children:[Ht.workspace,Ht.node,Ht.projectRoot].filter(Boolean).join(" · ")||Ht.displayName})]},Ht.agentId))})]})})]},X.id)}),L.showTyping&&s.jsx("div",{className:"s-thread-message-block",children:s.jsx("div",{className:"s-msg s-msg-working","aria-live":"polite",children:s.jsxs("div",{className:"s-msg-card s-msg-working-card",children:[s.jsxs("div",{className:"s-msg-header",children:[s.jsxs("div",{className:"s-msg-meta",children:[s.jsx("span",{className:"s-msg-actor",children:z}),s.jsx("span",{className:"s-msg-kind",children:"Live"})]}),s.jsx("span",{className:"s-msg-time",title:S?.startedAt?Bu(S.startedAt):"now",children:S?.startedAt?ze(S.startedAt):"now"})]}),s.jsxs("div",{className:"s-msg-working-body",children:[s.jsxs("span",{className:"s-typing-indicator","aria-hidden":"true",children:[s.jsx("span",{className:"s-typing-dot"}),s.jsx("span",{className:"s-typing-dot"}),s.jsx("span",{className:"s-typing-dot"})]}),s.jsx("span",{className:"s-msg-working-copy",children:L.detail})]})]})})}),s.jsx("div",{ref:k})]}),s.jsx("form",{className:"s-compose",onSubmit:X=>{X.preventDefault(),qe()},children:s.jsxs("div",{className:"s-thread-compose-shell",children:[s.jsx("textarea",{ref:Y,className:"s-compose-input",placeholder:`Message ${z}...`,value:Z,onChange:X=>G(X.target.value),onKeyDown:X=>{X.key!=="Enter"||X.shiftKey||X.nativeEvent.isComposing||(X.preventDefault(),!R&&Z.trim()&&qe())},disabled:R,rows:1}),s.jsxs("div",{className:"s-thread-compose-footer",children:[s.jsx("span",{className:"s-thread-compose-hint",children:R?`Sending to ${z}…`:"Enter to send · Shift+Enter for newline"}),s.jsx("button",{type:"submit",className:"s-compose-send",disabled:R||!Z.trim(),"aria-label":"Send message",children:s.jsx(ag,{})})]})]})})]})}var sl=(c=>(c[c.Border=-1]="Border",c[c.Data=0]="Data",c[c.Function=1]="Function",c[c.Position=2]="Position",c[c.Timing=3]="Timing",c[c.Alignment=4]="Alignment",c))(sl||{});const ng=[0,1],_h=[1,0],Ch=[2,3],Dh=[3,2],sg={L:ng,M:_h,Q:Ch,H:Dh},ig=/^\d*$/,cg=/^[A-Z0-9 $%*+./:-]*$/,Hu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Fu=1,Pu=40,gh=3,ug=3,ui=40,rg=10,Rh=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],Oh=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class og{constructor(u,o,f,h){if(this.version=u,this.ecc=o,u<Fu||u>Pu)throw new RangeError("Version value out of range");if(h<-1||h>7)throw new RangeError("Mask value out of range");this.size=u*4+17;const v=Array.from({length:this.size}).fill(!1);for(let w=0;w<this.size;w++)this.modules.push(v.slice()),this.types.push(v.map(()=>0));this.drawFunctionPatterns();const b=this.addEccAndInterleave(f);if(this.drawCodewords(b),h===-1){let w=1e9;for(let S=0;S<8;S++){this.applyMask(S),this.drawFormatBits(S);const y=this.getPenaltyScore();y<w&&(h=S,w=y),this.applyMask(S)}}this.mask=h,this.applyMask(h),this.drawFormatBits(h)}size;mask;modules=[];types=[];getModule(u,o){return u>=0&&u<this.size&&o>=0&&o<this.size&&this.modules[o][u]}drawFunctionPatterns(){for(let f=0;f<this.size;f++)this.setFunctionModule(6,f,f%2===0,sl.Timing),this.setFunctionModule(f,6,f%2===0,sl.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),o=u.length;for(let f=0;f<o;f++)for(let h=0;h<o;h++)f===0&&h===0||f===0&&h===o-1||f===o-1&&h===0||this.drawAlignmentPattern(u[f],u[h]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const o=this.ecc[1]<<3|u;let f=o;for(let v=0;v<10;v++)f=f<<1^(f>>>9)*1335;const h=(o<<10|f)^21522;for(let v=0;v<=5;v++)this.setFunctionModule(8,v,ma(h,v));this.setFunctionModule(8,7,ma(h,6)),this.setFunctionModule(8,8,ma(h,7)),this.setFunctionModule(7,8,ma(h,8));for(let v=9;v<15;v++)this.setFunctionModule(14-v,8,ma(h,v));for(let v=0;v<8;v++)this.setFunctionModule(this.size-1-v,8,ma(h,v));for(let v=8;v<15;v++)this.setFunctionModule(8,this.size-15+v,ma(h,v));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let f=0;f<12;f++)u=u<<1^(u>>>11)*7973;const o=this.version<<12|u;for(let f=0;f<18;f++){const h=ma(o,f),v=this.size-11+f%3,b=Math.floor(f/3);this.setFunctionModule(v,b,h),this.setFunctionModule(b,v,h)}}drawFinderPattern(u,o){for(let f=-4;f<=4;f++)for(let h=-4;h<=4;h++){const v=Math.max(Math.abs(h),Math.abs(f)),b=u+h,w=o+f;b>=0&&b<this.size&&w>=0&&w<this.size&&this.setFunctionModule(b,w,v!==2&&v!==4,sl.Position)}}drawAlignmentPattern(u,o){for(let f=-2;f<=2;f++)for(let h=-2;h<=2;h++)this.setFunctionModule(u+h,o+f,Math.max(Math.abs(h),Math.abs(f))!==1,sl.Alignment)}setFunctionModule(u,o,f,h=sl.Function){this.modules[o][u]=f,this.types[o][u]=h}addEccAndInterleave(u){const o=this.version,f=this.ecc;if(u.length!==fi(o,f))throw new RangeError("Invalid argument");const h=Oh[f[0]][o],v=Rh[f[0]][o],b=Math.floor(Vu(o)/8),w=h-b%h,S=Math.floor(b/h),y=[],B=bg(v);for(let k=0,Y=0;k<h;k++){const J=u.slice(Y,Y+S-v+(k<w?0:1));Y+=J.length;const U=xg(J,B);k<w&&J.push(0),y.push(J.concat(U))}const _=[];for(let k=0;k<y[0].length;k++)y.forEach((Y,J)=>{(k!==S-v||J>=w)&&_.push(Y[k])});return _}drawCodewords(u){if(u.length!==Math.floor(Vu(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let f=this.size-1;f>=1;f-=2){f===6&&(f=5);for(let h=0;h<this.size;h++)for(let v=0;v<2;v++){const b=f-v,S=(f+1&2)===0?this.size-1-h:h;!this.types[S][b]&&o<u.length*8&&(this.modules[S][b]=ma(u[o>>>3],7-(o&7)),o++)}}}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let o=0;o<this.size;o++)for(let f=0;f<this.size;f++){let h;switch(u){case 0:h=(f+o)%2===0;break;case 1:h=o%2===0;break;case 2:h=f%3===0;break;case 3:h=(f+o)%3===0;break;case 4:h=(Math.floor(f/3)+Math.floor(o/2))%2===0;break;case 5:h=f*o%2+f*o%3===0;break;case 6:h=(f*o%2+f*o%3)%2===0;break;case 7:h=((f+o)%2+f*o%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[o][f]&&h&&(this.modules[o][f]=!this.modules[o][f])}}getPenaltyScore(){let u=0;for(let v=0;v<this.size;v++){let b=!1,w=0;const S=[0,0,0,0,0,0,0];for(let y=0;y<this.size;y++)this.modules[v][y]===b?(w++,w===5?u+=gh:w>5&&u++):(this.finderPenaltyAddHistory(w,S),b||(u+=this.finderPenaltyCountPatterns(S)*ui),b=this.modules[v][y],w=1);u+=this.finderPenaltyTerminateAndCount(b,w,S)*ui}for(let v=0;v<this.size;v++){let b=!1,w=0;const S=[0,0,0,0,0,0,0];for(let y=0;y<this.size;y++)this.modules[y][v]===b?(w++,w===5?u+=gh:w>5&&u++):(this.finderPenaltyAddHistory(w,S),b||(u+=this.finderPenaltyCountPatterns(S)*ui),b=this.modules[y][v],w=1);u+=this.finderPenaltyTerminateAndCount(b,w,S)*ui}for(let v=0;v<this.size-1;v++)for(let b=0;b<this.size-1;b++){const w=this.modules[v][b];w===this.modules[v][b+1]&&w===this.modules[v+1][b]&&w===this.modules[v+1][b+1]&&(u+=ug)}let o=0;for(const v of this.modules)o=v.reduce((b,w)=>b+(w?1:0),o);const f=this.size*this.size,h=Math.ceil(Math.abs(o*20-f*10)/f)-1;return u+=h*rg,u}getAlignmentPatternPositions(){if(this.version===1)return[];{const u=Math.floor(this.version/7)+2,o=this.version===32?26:Math.ceil((this.version*4+4)/(u*2-2))*2,f=[6];for(let h=this.size-7;f.length<u;h-=o)f.splice(1,0,h);return f}}finderPenaltyCountPatterns(u){const o=u[1],f=o>0&&u[2]===o&&u[3]===o*3&&u[4]===o&&u[5]===o;return(f&&u[0]>=o*4&&u[6]>=o?1:0)+(f&&u[6]>=o*4&&u[0]>=o?1:0)}finderPenaltyTerminateAndCount(u,o,f){return u&&(this.finderPenaltyAddHistory(o,f),o=0),o+=this.size,this.finderPenaltyAddHistory(o,f),this.finderPenaltyCountPatterns(f)}finderPenaltyAddHistory(u,o){o[0]===0&&(u+=this.size),o.pop(),o.unshift(u)}}function va(c,u,o){if(u<0||u>31||c>>>u)throw new RangeError("Value out of range");for(let f=u-1;f>=0;f--)o.push(c>>>f&1)}function ma(c,u){return(c>>>u&1)!==0}class er{constructor(u,o,f){if(this.mode=u,this.numChars=o,this.bitData=f,o<0)throw new RangeError("Invalid argument");this.bitData=f.slice()}getData(){return this.bitData.slice()}}const fg=[1,10,12,14],dg=[2,9,11,13],hg=[4,8,16,16];function Uh(c,u){return c[Math.floor((u+7)/17)+1]}function kh(c){const u=[];for(const o of c)va(o,8,u);return new er(hg,c.length,u)}function mg(c){if(!Bh(c))throw new RangeError("String contains non-numeric characters");const u=[];for(let o=0;o<c.length;){const f=Math.min(c.length-o,3);va(Number.parseInt(c.substring(o,o+f),10),f*3+1,u),o+=f}return new er(fg,c.length,u)}function vg(c){if(!Hh(c))throw new RangeError("String contains unencodable characters in alphanumeric mode");const u=[];let o;for(o=0;o+2<=c.length;o+=2){let f=Hu.indexOf(c.charAt(o))*45;f+=Hu.indexOf(c.charAt(o+1)),va(f,11,u)}return o<c.length&&va(Hu.indexOf(c.charAt(o)),6,u),new er(dg,c.length,u)}function yg(c){return c===""?[]:Bh(c)?[mg(c)]:Hh(c)?[vg(c)]:[kh(pg(c))]}function Bh(c){return ig.test(c)}function Hh(c){return cg.test(c)}function gg(c,u){let o=0;for(const f of c){const h=Uh(f.mode,u);if(f.numChars>=1<<h)return Number.POSITIVE_INFINITY;o+=4+h+f.bitData.length}return o}function pg(c){c=encodeURI(c);const u=[];for(let o=0;o<c.length;o++)c.charAt(o)!=="%"?u.push(c.charCodeAt(o)):(u.push(Number.parseInt(c.substring(o+1,o+3),16)),o+=2);return u}function Vu(c){if(c<Fu||c>Pu)throw new RangeError("Version number out of range");let u=(16*c+128)*c+64;if(c>=2){const o=Math.floor(c/7)+2;u-=(25*o-10)*o-55,c>=7&&(u-=36)}return u}function fi(c,u){return Math.floor(Vu(c)/8)-Rh[u[0]][c]*Oh[u[0]][c]}function bg(c){if(c<1||c>255)throw new RangeError("Degree out of range");const u=[];for(let f=0;f<c-1;f++)u.push(0);u.push(1);let o=1;for(let f=0;f<c;f++){for(let h=0;h<u.length;h++)u[h]=Ku(u[h],o),h+1<u.length&&(u[h]^=u[h+1]);o=Ku(o,2)}return u}function xg(c,u){const o=u.map(f=>0);for(const f of c){const h=f^o.shift();o.push(0),u.forEach((v,b)=>o[b]^=Ku(v,h))}return o}function Ku(c,u){if(c>>>8||u>>>8)throw new RangeError("Byte out of range");let o=0;for(let f=7;f>=0;f--)o=o<<1^(o>>>7)*285,o^=(u>>>f&1)*c;return o}function Ng(c,u,o=1,f=40,h=-1,v=!0){if(!(Fu<=o&&o<=f&&f<=Pu)||h<-1||h>7)throw new RangeError("Invalid value");let b,w;for(b=o;;b++){const _=fi(b,u)*8,k=gg(c,b);if(k<=_){w=k;break}if(b>=f)throw new RangeError("Data too long")}for(const _ of[_h,Ch,Dh])v&&w<=fi(b,_)*8&&(u=_);const S=[];for(const _ of c){va(_.mode[0],4,S),va(_.numChars,Uh(_.mode,b),S);for(const k of _.getData())S.push(k)}const y=fi(b,u)*8;va(0,Math.min(4,y-S.length),S),va(0,(8-S.length%8)%8,S);for(let _=236;S.length<y;_^=253)va(_,8,S);const B=Array.from({length:Math.ceil(S.length/8)},()=>0);return S.forEach((_,k)=>B[k>>>3]|=_<<7-(k&7)),new og(b,u,B,h)}function jg(c,u){const{ecc:o="L",boostEcc:f=!1,minVersion:h=1,maxVersion:v=40,maskPattern:b=-1,border:w=1}=u||{},S=typeof c=="string"?yg(c):Array.isArray(c)?[kh(c)]:void 0;if(!S)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof c}`);const y=Ng(S,sg[o],h,v,b,f),B=Sg({version:y.version,maskPattern:y.mask,size:y.size,data:y.modules,types:y.types},w);return u?.invert&&(B.data=B.data.map(_=>_.map(k=>!k))),u?.onEncoded?.(B),B}function Sg(c,u=1){if(!u)return c;const{size:o}=c,f=o+u*2;c.size=f,c.data.forEach(v=>{for(let b=0;b<u;b++)v.unshift(!1),v.push(!1)});for(let v=0;v<u;v++)c.data.unshift(Array.from({length:f},b=>!1)),c.data.push(Array.from({length:f},b=>!1));const h=sl.Border;c.types.forEach(v=>{for(let b=0;b<u;b++)v.unshift(h),v.push(h)});for(let v=0;v<u;v++)c.types.unshift(Array.from({length:f},b=>h)),c.types.push(Array.from({length:f},b=>h));return c}function ph(c){return c.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ag(c,u={}){const o=jg(c,u),{pixelSize:f=10,whiteColor:h="white",blackColor:v="black"}=u,b=o.size*f,w=o.size*f;let S=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${w} ${b}">`;const y=[];for(let B=0;B<o.size;B++)for(let _=0;_<o.size;_++){const k=_*f,Y=B*f;o.data[B][_]&&y.push(`M${k},${Y}h${f}v${f}h-${f}z`)}return S+=`<rect fill="${ph(h)}" width="${w}" height="${b}"/>`,S+=`<path fill="${ph(v)}" d="${y.join("")}"/>`,S+="</svg>",S}function Eg(c){return c?c.replace(/^wss?:\/\//,"").replace(/:\d+$/,""):null}function bh(c){return c?c.length<=18?c:`${c.slice(0,10)}...${c.slice(-6)}`:null}function wg(c){return c?c.status==="paired"||c.status==="connected"?"success":c.status==="error"||c.status==="closed"?"danger":"warning":"warning"}function Tg(c,u){if(!c)return null;const o=Math.max(0,Math.floor((c-u)/1e3));if(o===0)return null;if(o<60)return`${o}s`;const f=Math.floor(o/60),h=o%60;return h>0?`${f}m ${h}s`:`${f}m`}function xh({value:c}){const[u,o]=A.useState(!1),f=A.useCallback(()=>{navigator.clipboard.writeText(c).then(()=>{o(!0),setTimeout(()=>o(!1),1500)})},[c]);return s.jsx("button",{type:"button",className:"sys-copy-btn",onClick:f,title:"Copy",children:u?s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}):s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})}function zg({navigate:c}){const[u,o]=A.useState(null),[f,h]=A.useState(""),[v,b]=A.useState(""),[w,S]=A.useState(!0),[y,B]=A.useState(!1),[_,k]=A.useState(!1),[Y,J]=A.useState(null),[U,ue]=A.useState(null),[oe,ye]=A.useState(null),[le,fe]=A.useState(null),[Z,G]=A.useState(()=>Date.now()),[R,ee]=A.useState(null),ge=A.useRef(null),q=A.useRef(0),W=A.useRef(null);A.useEffect(()=>{ge.current=u},[u]),A.useEffect(()=>{W.current=Y},[Y]);const se=A.useCallback(async(H="initial")=>{if(H==="background"&&W.current)return;const ae=++q.current;!(ge.current!==null)&&H!=="background"?(S(!0),ue(null)):B(!0);try{const qe=await He(H==="manual"?"/api/pairing-state/refresh":"/api/pairing-state");if(ae!==q.current)return;o(qe),ue(null),fe(Date.now())}catch(qe){if(ae!==q.current)return;ue(qe instanceof Error?qe.message:String(qe))}finally{ae===q.current&&(S(!1),B(!1))}},[]),Ke=A.useCallback(async()=>{try{const H=await He("/api/user");b(H.name),h(H.name),ye(null)}catch(H){ye(H instanceof Error?H.message:String(H))}},[]);A.useEffect(()=>{se("initial"),Ke()},[se,Ke]),A.useEffect(()=>{const H=setInterval(()=>{se("background")},1e4);return()=>clearInterval(H)},[se]),A.useEffect(()=>{if(!u?.pairing?.expiresAt)return;G(Date.now());const H=setInterval(()=>{G(Date.now())},1e3);return()=>clearInterval(H)},[u?.pairing?.expiresAt]);const Re=A.useCallback(async()=>{k(!0),ye(null);try{const H=await He("/api/user",{method:"POST",body:JSON.stringify({name:f})});b(H.name),h(H.name)}catch(H){ye(H instanceof Error?H.message:String(H))}finally{k(!1)}},[f]),Qe=A.useCallback(async H=>{const ae=++q.current;J(H),ue(null);try{const re=await He("/api/pairing/control",{method:"POST",body:JSON.stringify({action:H})});if(ae!==q.current)return;o(re),fe(Date.now())}catch(re){if(ae!==q.current)return;ue(re instanceof Error?re.message:String(re))}finally{ae===q.current&&J(null)}},[]),z=A.useCallback(async H=>{ee(H);try{await He(`/api/pairing/peers/${encodeURIComponent(H)}`,{method:"DELETE"}),se("manual")}catch{}finally{ee(null)}},[se]),L=A.useMemo(()=>{const H=u?.pairing?.qrValue?.trim();return H?Ag(H,{border:2,ecc:"M",pixelSize:8}):null},[u?.pairing?.qrValue]),F=Eg(u?.pairing?.relay??u?.relay??null),be=Tg(u?.pairing?.expiresAt,Z),p=(u?.trustedPeers.find(H=>H.fingerprint===u.connectedPeerFingerprint)??null)?.name??bh(u?.connectedPeerFingerprint??null),D=wg(u),Q=f.trim()!==v,V=!w&&!u&&!!U;return s.jsxs("div",{className:"sys-surface-page sys-settings-page",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Settings"}),s.jsx("p",{className:"sys-page-subtitle",children:"Identity, pairing, and trusted devices."})]}),s.jsxs("div",{className:"sys-page-actions",children:[u&&s.jsx("span",{className:`sys-chip sys-chip-${D}`,children:u.statusLabel}),s.jsx("div",{className:"sys-sync-note",children:w?"Loading...":U&&u?`Snapshot from ${le?ze(le):"earlier"}`:le?`Updated ${ze(le)}`:""}),s.jsx("button",{type:"button",className:"s-btn",disabled:w||y||!!Y,onClick:()=>{se("manual")},children:y?"Refreshing...":"Refresh"})]})]}),U&&u&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:U})]}),oe&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Identity error."}),s.jsx("span",{children:oe})]}),w&&!u&&s.jsxs("div",{className:"sys-panel sys-state-card",children:[s.jsx("h3",{className:"sys-state-title",children:"Loading settings"}),s.jsx("p",{className:"sys-state-body",children:"Checking relay status and trusted peers."})]}),V&&s.jsxs("div",{className:"sys-panel sys-state-card sys-state-card-error",children:[s.jsx("h3",{className:"sys-state-title",children:"Pairing unavailable"}),s.jsx("p",{className:"sys-state-body",children:U}),s.jsx("div",{className:"sys-inline-actions",children:s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{se("manual")},children:"Try again"})})]}),s.jsxs("div",{className:"sys-settings-hero",children:[s.jsx("div",{className:"sys-settings-qr-col",children:L?s.jsxs("div",{className:"sys-settings-qr-frame",children:[s.jsx("div",{className:"s-qr",dangerouslySetInnerHTML:{__html:L}}),be&&s.jsxs("span",{className:"sys-settings-qr-expires",children:["Expires in ",be]})]}):s.jsx("div",{className:"sys-settings-qr-empty",children:s.jsx("span",{className:"sys-settings-qr-empty-label",children:u?.isRunning?"Waiting for QR...":"Start pairing to generate QR"})})}),s.jsxs("div",{className:"sys-settings-info-col",children:[s.jsxs("div",{className:"sys-input-row",children:[s.jsx("input",{className:"sys-input",type:"text",placeholder:"Your name",value:f,onChange:H=>h(H.target.value),onKeyDown:H=>{H.key==="Enter"&&Q&&!_&&Re()}}),s.jsx("button",{type:"button",className:"s-btn s-btn-primary",disabled:!Q||_,onClick:()=>{Re()},children:_?"Saving...":"Save"})]}),s.jsxs("div",{className:"sys-settings-kv-list",children:[u?.identityFingerprint&&s.jsxs("div",{className:"sys-settings-kv",children:[s.jsx("span",{className:"sys-settings-kv-label",children:"Fingerprint"}),s.jsxs("span",{className:"sys-settings-kv-value",children:[s.jsx("code",{children:u.identityFingerprint}),s.jsx(xh,{value:u.identityFingerprint})]})]}),F&&s.jsxs("div",{className:"sys-settings-kv",children:[s.jsx("span",{className:"sys-settings-kv-label",children:"Relay"}),s.jsxs("span",{className:"sys-settings-kv-value",children:[s.jsx("code",{children:F}),s.jsx(xh,{value:F})]})]}),u?.statusDetail&&s.jsxs("div",{className:"sys-settings-kv",children:[s.jsx("span",{className:"sys-settings-kv-label",children:"Status"}),s.jsx("span",{className:"sys-settings-kv-value sys-settings-kv-nowrap",children:u.statusDetail})]}),p&&s.jsxs("div",{className:"sys-settings-kv",children:[s.jsx("span",{className:"sys-settings-kv-label",children:"Connected"}),s.jsx("span",{className:"sys-settings-kv-value",children:p})]}),u?.secure&&s.jsxs("div",{className:"sys-settings-kv",children:[s.jsx("span",{className:"sys-settings-kv-label",children:"Security"}),s.jsx("span",{className:"sys-settings-kv-value",children:s.jsx("span",{className:"sys-chip sys-chip-success",style:{margin:0},children:"Noise XX"})})]})]}),u&&s.jsx("div",{className:"sys-inline-actions sys-settings-controls",children:u.isRunning?s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",className:"s-btn",disabled:!!Y,onClick:()=>{Qe("restart")},children:Y==="restart"?"Restarting...":"Restart"}),s.jsx("button",{type:"button",className:"s-btn",disabled:!!Y,onClick:()=>{Qe("stop")},children:Y==="stop"?"Stopping...":"Stop"})]}):s.jsx("button",{type:"button",className:"s-btn s-btn-primary",disabled:!!Y,onClick:()=>{Qe("start")},children:Y==="start"?"Starting...":"Start pairing"})})]})]}),u&&s.jsxs("section",{className:"sys-settings-peers",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Trusted peers"}),s.jsxs("p",{className:"sys-section-subtitle",children:[u.trustedPeers.length," device",u.trustedPeers.length!==1?"s":""," paired with this broker."]})]})}),u.trustedPeers.length===0?s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No trusted peers"}),s.jsx("p",{children:"Devices appear here after completing pairing."})]}):s.jsxs("table",{className:"sys-peers-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Device"}),s.jsx("th",{children:"Fingerprint"}),s.jsx("th",{children:"Paired"}),s.jsx("th",{children:"Last seen"}),s.jsx("th",{})]})}),s.jsx("tbody",{children:u.trustedPeers.map(H=>{const ae=H.fingerprint===u.connectedPeerFingerprint;return s.jsxs("tr",{className:ae?"sys-peers-row-connected":"",children:[s.jsx("td",{children:s.jsxs("span",{className:"sys-peers-name",children:[H.name??bh(H.fingerprint)??"Peer",ae&&s.jsx("span",{className:"sys-chip sys-chip-success sys-peers-badge",children:"Connected"})]})}),s.jsx("td",{children:s.jsx("code",{className:"sys-peers-fp",children:H.fingerprint})}),s.jsx("td",{children:H.pairedAtLabel??"—"}),s.jsx("td",{children:H.lastSeenLabel??"—"}),s.jsx("td",{children:s.jsx("button",{type:"button",className:"sys-peers-remove",disabled:R===H.fingerprint,onClick:()=>{z(H.fingerprint)},title:"Remove peer",children:R===H.fingerprint?"...":"Remove"})})]},H.fingerprint)})})]})]})]})}const Mg={"agent.registered":"registered","agent.online":"came online","agent.offline":"went offline","flight.started":"started task","flight.completed":"completed task","flight.updated":"updated task","message.sent":"sent message","message.received":"received message","collaboration.ask":"asked a question","collaboration.answer":"answered",ask_sent:"asked",ask_replied:"replied",ask_working:"working",flight_created:"started task",flight_updated:"updated task",message_sent:"sent",message_received:"received"},_g={presence:{label:"Presence",tone:"notice"},work:{label:"Execution",tone:"working"},message:{label:"Delivery",tone:"completed"},collaboration:{label:"Coordination",tone:"working"},system:{label:"System",tone:"notice"}};function qh(c){return Mg[c]??c.replace(/[._]/g," ")}function Cg(c){return c.startsWith("agent.")||c.includes("registered")||c.includes("online")||c.includes("offline")?"presence":c.startsWith("flight")||c.startsWith("ask_")?"work":c.startsWith("message")?"message":c.startsWith("collaboration")?"collaboration":"system"}function Dg(c){return(c??"system").charAt(0).toUpperCase()}function Lh(c){return c.length<=14?c:`${c.slice(0,8)}...${c.slice(-4)}`}function Rg(c){if(!c)return null;const u=c.split("/").filter(Boolean);return u[u.length-1]??c}function Og(c){return`${c.actorName??"system"} ${qh(c.kind)}`}function Ug(c){return c.workspaceRoot?`Recorded from ${c.workspaceRoot}.`:c.conversationId?`Linked to thread ${Lh(c.conversationId)}.`:"No additional detail was captured for this event."}function kg({navigate:c}){const[u,o]=A.useState([]),[f,h]=A.useState(null),[v,b]=A.useState(!0),[w,S]=A.useState(!1),[y,B]=A.useState(null),[_,k]=A.useState(null),Y=A.useRef([]),J=A.useRef(0),U=A.useRef(null);A.useEffect(()=>{Y.current=u},[u]);const ue=A.useCallback(async(Z="initial")=>{const G=++J.current;!(Y.current.length>0)&&Z!=="background"?(b(!0),B(null)):S(!0);try{const ee=await He("/api/activity");if(G!==J.current)return;o(ee),B(null),k(Date.now()),h(ge=>ee.some(q=>q.id===ge)?ge:null)}catch(ee){if(G!==J.current)return;B(ee instanceof Error?ee.message:String(ee))}finally{G===J.current&&(b(!1),S(!1))}},[]),oe=A.useCallback(()=>{U.current||(U.current=setTimeout(()=>{U.current=null,ue("background")},250))},[ue]);A.useEffect(()=>(ue("initial"),()=>{U.current&&clearTimeout(U.current)}),[ue]),Jt(oe);const ye=A.useMemo(()=>{const Z=new Set(u.map(R=>R.actorName??"system")),G=new Set(u.map(R=>R.conversationId).filter(R=>!!R));return[{label:"Events",value:`${u.length}`,detail:u.length>0?`Latest ${ze(u[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${Z.size}`,detail:Z.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${G.size}`,detail:G.size>0?"Conversation-linked records":"No linked threads"}]},[u]),le=!v&&u.length===0&&!!y,fe=!v&&u.length===0&&!y;return s.jsxs("div",{className:"sys-surface-page",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Activity"}),s.jsx("p",{className:"sys-page-subtitle",children:"Broker events, task execution, and collaboration handoffs."})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("div",{className:"sys-sync-note",children:v?"Loading audit ledger...":y&&u.length>0?`Showing last confirmed snapshot from ${_?ze(_):"earlier"}`:_?`Updated ${ze(_)}`:"Waiting for first snapshot"}),s.jsx("button",{type:"button",className:"s-btn",disabled:v||w,onClick:()=>{ue("manual")},children:w?"Refreshing...":"Refresh"})]})]}),s.jsx("div",{className:"sys-stat-grid",children:ye.map(Z=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:Z.label}),s.jsx("strong",{className:"sys-stat-value",children:Z.value}),s.jsx("span",{className:"sys-stat-detail",children:Z.detail})]},Z.label))}),y&&u.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:y})]}),v&&u.length===0&&s.jsxs("div",{className:"sys-panel sys-state-card",children:[s.jsx("h3",{className:"sys-state-title",children:"Loading activity"}),s.jsx("p",{className:"sys-state-body",children:"Pulling the latest records from the broker database."})]}),le&&s.jsxs("div",{className:"sys-panel sys-state-card sys-state-card-error",children:[s.jsx("h3",{className:"sys-state-title",children:"Activity is unavailable"}),s.jsx("p",{className:"sys-state-body",children:y}),s.jsx("div",{className:"sys-inline-actions",children:s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{ue("manual")},children:"Try again"})})]}),fe&&s.jsxs("div",{className:"sys-panel sys-state-card",children:[s.jsx("h3",{className:"sys-state-title",children:"No activity yet"}),s.jsx("p",{className:"sys-state-body",children:"Events appear here after agents register, send messages, or advance work."})]}),u.length>0&&s.jsx("div",{className:"sys-audit-list",children:u.map(Z=>{const G=f===Z.id,R=Cg(Z.kind),ee=_g[R],ge=Rg(Z.workspaceRoot),q=Z.summary&&Z.summary!==Z.title?Z.summary:Ug(Z);return s.jsxs("article",{className:`sys-audit-entry${G?" sys-audit-entry-expanded":""}`,children:[s.jsxs("button",{type:"button",className:"sys-audit-toggle","aria-expanded":G,onClick:()=>h(G?null:Z.id),children:[s.jsxs("div",{className:"sys-audit-stamp",children:[s.jsx("span",{className:"sys-audit-time",children:ze(Z.ts)}),s.jsx("span",{className:"sys-audit-date",children:il(Z.ts)})]}),s.jsx("div",{className:`sys-audit-marker sys-audit-marker-${ee.tone}`,children:s.jsx("span",{})}),s.jsxs("div",{className:"sys-audit-body",children:[s.jsxs("div",{className:"sys-audit-topline",children:[s.jsx("span",{className:"sys-audit-category",children:ee.label}),s.jsx("span",{className:"sys-audit-kind",children:qh(Z.kind)})]}),s.jsx("h3",{className:"sys-audit-title",children:Tt(Z.title??Og(Z))}),s.jsx("p",{className:"sys-audit-summary",children:Tt(q)}),s.jsxs("div",{className:"sys-audit-meta",children:[s.jsxs("span",{className:"sys-audit-meta-item",children:[s.jsx("span",{className:"sys-audit-avatar",style:{background:$t(Z.actorName??"system")},children:Dg(Z.actorName)}),Z.actorName??"system"]}),ge&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Workspace ",ge]}),Z.conversationId&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Thread ",Lh(Z.conversationId)]})]})]}),s.jsx("div",{className:"sys-audit-expand",children:G?"Close":"Details"})]}),G&&s.jsxs("div",{className:"sys-audit-details",children:[s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Event"}),s.jsx("code",{className:"sys-detail-value",children:Z.kind})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Recorded"}),s.jsx("span",{className:"sys-detail-value",children:il(Z.ts)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Actor"}),s.jsx("span",{className:"sys-detail-value",children:Z.actorName??"system"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Workspace"}),s.jsx("span",{className:"sys-detail-value",children:Z.workspaceRoot??"Not attached"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Thread"}),s.jsx("span",{className:"sys-detail-value",children:Z.conversationId??"Not attached"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Record id"}),s.jsx("code",{className:"sys-detail-value",children:Z.id})]})]}),Z.conversationId&&s.jsx("div",{className:"sys-inline-actions",children:s.jsx("button",{type:"button",className:"s-btn s-btn-sm",onClick:()=>c({view:"conversation",conversationId:Z.conversationId}),children:"Open thread"})})]})]},Z.id)})})]})}function Bg(c){const u=c.split(".");return u[u.length-1]||c}function Yn(c){return c?c.replace(/_/g," "):null}function Hg({values:c}){return s.jsx("span",{className:"s-agent-token-list",children:c.map(u=>s.jsx("span",{className:"s-agent-token",children:u},u))})}function ri({title:c,items:u}){return u.length===0?null:s.jsxs("section",{className:"s-agent-profile-card",children:[s.jsx("div",{className:"s-agent-profile-card-header",children:s.jsx("div",{className:"s-agent-profile-card-title",children:c})}),s.jsx("div",{className:"s-agent-meta-card-body",children:u.map(o=>s.jsxs("div",{className:"s-agent-meta-row",children:[s.jsx("span",{className:"s-agent-meta-label",children:o.label}),s.jsx("span",{className:"s-agent-meta-value",children:o.value})]},o.label))})]})}function qg({conversationId:c,navigate:u}){const[o,f]=A.useState(null),[h,v]=A.useState(null),[b,w]=A.useState(null),S=Th(c),y=A.useCallback(async()=>{w(null);try{const[J,U]=await Promise.all([He("/api/agents"),He(`/api/session/${encodeURIComponent(c)}`).catch(()=>null)]),ue=U?.agentId??S;f(J.find(oe=>oe.id===ue)??null),v(U)}catch(J){w(J instanceof Error?J.message:String(J)),v(null)}},[c,S]);if(A.useEffect(()=>{y()},[y]),Jt(y),!o)return s.jsxs("div",{children:[s.jsx("button",{type:"button",className:"s-back",onClick:()=>u({view:"conversation",conversationId:c}),children:"← Back"}),b&&s.jsx("p",{className:"s-error",children:b}),s.jsx("div",{className:"s-empty",children:s.jsx("p",{children:"Agent not found"})})]});const B=[{label:"Agent ID",value:o.id},...o.handle?[{label:"Handle",value:`@${o.handle}`}]:[],{label:"Class",value:Yn(o.agentClass)??"—"},...o.role?[{label:"Role",value:o.role}]:[],...o.selector?[{label:"Selector",value:o.selector}]:[]],_=[...o.project?[{label:"Project",value:o.project}]:[],...o.branch?[{label:"Branch",value:o.branch}]:[],...o.projectRoot?[{label:"Path",value:o.projectRoot}]:[],...o.cwd?[{label:"Working dir",value:o.cwd}]:[]],k=[{label:"State",value:Qn(o.state)},...o.harness?[{label:"Harness",value:o.harness}]:[],...o.transport?[{label:"Transport",value:Yn(o.transport)??o.transport}]:[],...o.wakePolicy?[{label:"Wake policy",value:Yn(o.wakePolicy)??o.wakePolicy}]:[],...o.capabilities.length>0?[{label:"Capabilities",value:s.jsx(Hg,{values:o.capabilities})}]:[]],Y=[{label:"Conversation ID",value:c},...h?.title?[{label:"Title",value:h.title}]:[],...h?.workspaceRoot?[{label:"Workspace",value:h.workspaceRoot}]:[],...h?.currentBranch?[{label:"Session branch",value:h.currentBranch}]:[],...h?.messageCount!=null?[{label:"Messages",value:String(h.messageCount)}]:[],...h?.lastMessageAt?[{label:"Last message",value:il(h.lastMessageAt)}]:[],...o.harnessSessionId?[{label:"Harness session",value:o.harnessSessionId}]:[],...o.harnessLogPath?[{label:"Harness log",value:o.harnessLogPath}]:[]];return s.jsxs("div",{className:"s-agent-profile-page",children:[s.jsxs("div",{className:"s-agent-profile-page-topbar",children:[s.jsx("button",{type:"button",className:"s-back",onClick:()=>u({view:"conversation",conversationId:c}),children:"← Conversation"}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>u({view:"agents",agentId:o.id}),children:"Open in Agents"})]}),b&&s.jsx("p",{className:"s-error",children:b}),s.jsxs("section",{className:"s-agent-profile-hero",children:[s.jsx("div",{className:"s-agent-profile-hero-main",children:s.jsxs("div",{className:"s-agent-profile-hero-title-row",children:[s.jsx("div",{className:"s-avatar s-agent-profile-hero-avatar",style:{background:$t(o.name)},children:o.name[0].toUpperCase()}),s.jsxs("div",{className:"s-agent-profile-hero-copy",children:[s.jsxs("div",{className:"s-agent-casefile-title-meta",children:[s.jsx("span",{className:"s-agent-casefile-record",children:Bg(o.id)}),s.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${Qt(o.state)}`,children:[s.jsx("span",{className:"s-dot",style:{background:Zl(o.state)}}),Qn(o.state)]})]}),s.jsx("h1",{className:"s-agent-profile-hero-title",children:o.name}),s.jsx("p",{className:"s-agent-profile-hero-copyline",children:[o.handle?`@${o.handle}`:null,o.project,o.branch,Yn(o.role)??Yn(o.agentClass)].filter(Boolean).join(" • ")}),s.jsxs("p",{className:"s-agent-profile-hero-context",children:[h?.title?`Conversation: ${h.title}.`:"Attached to the current conversation.",o.updatedAt?` Updated ${ze(o.updatedAt)}.`:""]})]})]})}),s.jsx("div",{className:"s-agent-profile-hero-actions",children:s.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>u({view:"conversation",conversationId:c}),children:"Open conversation"})})]}),s.jsxs("div",{className:"s-agent-profile-grid",children:[s.jsx(ri,{title:"Identity",items:B}),s.jsx(ri,{title:"Workspace",items:_}),s.jsx(ri,{title:"Runtime",items:k}),s.jsx(ri,{title:"Conversation context",items:Y})]})]})}function Lg(c){return c.attention==="interrupt"?"failed":c.state==="done"?"completed":c.attention==="badge"||c.state==="waiting"||c.state==="review"?"updated":"working"}function Yg(c){switch(c){case"review":return"In review";case"waiting":return"Waiting";case"working":return"Working";case"done":return"Done";default:return c.replace(/_/g," ")}}function Qg(c){switch(c){case"badge":return"Needs attention";case"interrupt":return"Blocked";default:return null}}function Gg({items:c,navigate:u,emptyTitle:o,emptyDetail:f}){if(c.length===0){const h=[{titleWidth:"56%",metaWidths:["18%","14%","16%"],summaryWidth:"74%"},{titleWidth:"48%",metaWidths:["16%","20%","12%"],summaryWidth:"62%"}];return s.jsxs("div",{className:"s-work-empty-state",children:[s.jsxs("div",{className:"s-work-empty-copy",children:[s.jsx("p",{className:"s-work-empty-kicker",children:"Quiet for now"}),s.jsx("p",{className:"s-work-empty-title",children:o}),f&&s.jsx("p",{className:"s-work-empty-detail",children:f})]}),s.jsx("div",{className:"s-work-empty-skeleton","aria-hidden":"true",children:h.map((v,b)=>s.jsxs("div",{className:"s-work-empty-row",children:[s.jsxs("div",{className:"s-work-empty-row-header",children:[s.jsx("span",{className:"s-work-empty-line s-work-empty-line-title",style:{width:v.titleWidth}}),s.jsx("span",{className:"s-work-empty-pill"})]}),s.jsx("div",{className:"s-work-empty-row-meta",children:v.metaWidths.map(w=>s.jsx("span",{className:"s-work-empty-line s-work-empty-line-meta",style:{width:w}},w))}),s.jsx("span",{className:"s-work-empty-line s-work-empty-line-summary",style:{width:v.summaryWidth}})]},b))})]})}return s.jsx("div",{className:"s-work-list",children:c.map(h=>{const v=!!h.id||!!h.conversationId,b=Qg(h.attention),w=h.ownerName??h.ownerId??"Unassigned",S=h.id?()=>u({view:"work",workId:h.id}):h.conversationId?()=>u({view:"conversation",conversationId:h.conversationId}):void 0;return s.jsxs("div",{className:`s-work-row${v?" s-work-row-clickable":""}`,onClick:S,children:[s.jsxs("div",{className:"s-work-row-header",children:[s.jsxs("div",{className:"s-work-row-title-wrap",children:[s.jsx("span",{className:"s-work-row-title",children:h.title}),h.priority&&s.jsx("span",{className:"s-badge",children:h.priority})]}),s.jsx("span",{className:`s-pill s-pill-${Lg(h)}`,children:h.currentPhase})]}),s.jsxs("div",{className:"s-work-row-meta",children:[s.jsx("span",{children:w}),s.jsx("span",{children:Yg(h.state)}),h.activeChildWorkCount>0&&s.jsxs("span",{children:[h.activeChildWorkCount," child",h.activeChildWorkCount===1?"":"ren"]}),h.activeFlightCount>0&&s.jsxs("span",{children:[h.activeFlightCount," flight",h.activeFlightCount===1?"":"s"]}),b&&s.jsx("span",{children:b}),s.jsx("span",{children:ze(h.lastMeaningfulAt)})]}),h.lastMeaningfulSummary&&s.jsx("p",{className:"s-work-row-summary",children:Tt(h.lastMeaningfulSummary)})]},h.id)})})}function Yh(c,u){if(u.filter(h=>h.name===c.name).length<=1)return{name:c.name,qualifier:null};const f=c.project??c.branch??c.id.replace(/^.*\./,"");return{name:c.name,qualifier:f}}function qu(c){return c?c.replace(/_/g," "):null}function Xg(c){return c?ze(c):"—"}function Zg(c){const u=[...c].filter(h=>h.kind==="direct"&&!!h.agentId).sort((h,v)=>(v.lastMessageAt??0)-(h.lastMessageAt??0)),o=new Map,f=new Map;for(const h of u){const v=h.agentId;o.has(v)||(o.set(v,h.id),f.set(v,h))}return{conversationByAgentId:o,sessionByAgentId:f}}function Vg({label:c,value:u}){return s.jsxs("div",{className:"s-agent-meta-row",children:[s.jsx("span",{className:"s-agent-meta-label",children:c}),s.jsx("span",{className:"s-agent-meta-value",children:u})]})}function Kg({values:c}){return s.jsx("span",{className:"s-agent-token-list",children:c.map(u=>s.jsx("span",{className:"s-agent-token",children:u},u))})}function Jg({title:c,count:u,children:o}){return s.jsxs("section",{className:"s-agent-roster-section",children:[s.jsxs("div",{className:"s-agent-roster-section-header",children:[s.jsx("div",{className:"s-agent-roster-section-title",children:c}),s.jsx("span",{className:"s-agent-roster-section-count",children:u})]}),s.jsx("div",{className:"s-agent-roster-stack",children:o})]})}function $g({agents:c}){return c.length===0?null:s.jsxs("div",{className:"s-agent-overview-empty",children:[s.jsx("h2",{className:"s-agent-overview-empty-title",children:"Select an agent"}),s.jsx("p",{className:"s-agent-overview-empty-copy",children:"Pick an agent from the roster to view its profile, current work, and session context."})]})}function Wg({agent:c,allAgents:u,session:o,conversationId:f,navigate:h}){const{name:v,qualifier:b}=Yh(c,u),[w,S]=A.useState([]),y=Qt(c.state),B=A.useCallback(async()=>{try{S(await He(`/api/work?agentId=${encodeURIComponent(c.id)}`))}catch{S([])}},[c.id]);A.useEffect(()=>{B()},[B]),Jt(B);const _=[...c.project?[{label:"Project",value:c.project}]:[],...c.branch?[{label:"Branch",value:c.branch}]:[],...c.harness?[{label:"Harness",value:c.harness}]:[],...c.transport?[{label:"Transport",value:qu(c.transport)??c.transport}]:[],...c.projectRoot?[{label:"Path",value:c.projectRoot}]:[],...o?.workspaceRoot?[{label:"Workspace",value:o.workspaceRoot}]:[],...o?.currentBranch?[{label:"Session branch",value:o.currentBranch}]:[]];return s.jsxs("div",{className:"s-agent-casefile",children:[s.jsx("button",{type:"button",className:"s-back s-agent-mobile-back",onClick:()=>h({view:"agents"}),children:"← All agents"}),s.jsxs("section",{className:"s-agent-detail-identity",children:[s.jsx("div",{className:"s-avatar s-agent-casefile-avatar",style:{background:$t(c.name)},children:c.name[0].toUpperCase()}),s.jsxs("div",{className:"s-agent-detail-identity-copy",children:[s.jsxs("h2",{className:"s-agent-detail-identity-name",children:[v,b&&s.jsx("span",{className:"s-agent-casefile-title-qualifier",children:b})]}),s.jsxs("div",{className:"s-agent-detail-identity-meta",children:[c.handle&&s.jsxs("span",{className:"s-agent-detail-handle",children:["@",c.handle]}),s.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${y}`,children:[s.jsx("span",{className:"s-dot",style:{background:Zl(c.state)}}),Qn(c.state)]}),c.updatedAt&&s.jsx("span",{className:"s-agent-detail-updated",children:ze(c.updatedAt)})]}),s.jsx("p",{className:"s-agent-detail-identity-desc",children:[qu(c.role)??qu(c.agentClass),c.project].filter(Boolean).join(" · ")}),s.jsxs("div",{className:"s-agent-detail-actions",children:[s.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>f&&h({view:"agents",agentId:c.id,conversationId:f}),disabled:!f,children:f?"Open conversation":"No conversation"}),c.capabilities.length>0&&s.jsx("div",{className:"s-agent-detail-capabilities",children:s.jsx(Kg,{values:c.capabilities})})]})]})]}),_.length>0&&s.jsxs("section",{className:"s-agent-detail-context",children:[s.jsx("h3",{className:"s-agent-detail-section-title",children:"Context"}),s.jsx("div",{className:"s-agent-meta-card-body",children:_.map(k=>s.jsx(Vg,{label:k.label,value:k.value},k.label))})]}),s.jsxs("section",{className:"s-agent-detail-work",children:[s.jsx("h3",{className:"s-agent-detail-section-title",children:"Active work"}),s.jsx(Gg,{items:w,navigate:h,emptyTitle:"Nothing in flight",emptyDetail:"New asks, handoffs, and follow-ups will stack here once this agent picks up work."})]})]})}function Ig({navigate:c,selectedAgentId:u,conversationId:o}){const[f,h]=A.useState([]),[v,b]=A.useState([]),w=A.useCallback(async()=>{const[G,R]=await Promise.allSettled([He("/api/agents"),He("/api/sessions")]);G.status==="fulfilled"&&h(G.value),R.status==="fulfilled"&&b(R.value)},[]);A.useEffect(()=>{w()},[w]),Jt(w);const S=[...f].sort((G,R)=>{const ee={working:0,available:1,offline:2},ge=ee[Qt(G.state)]-ee[Qt(R.state)];if(ge!==0)return ge;const q=(R.updatedAt??0)-(G.updatedAt??0);return q!==0?q:G.name.localeCompare(R.name)}),y=[{key:"working",title:"Working",agents:S.filter(G=>Qt(G.state)==="working")},{key:"available",title:"Available",agents:S.filter(G=>Qt(G.state)==="available")},{key:"offline",title:"Offline",agents:S.filter(G=>Qt(G.state)==="offline")}],B=u?f.find(G=>G.id===u)??null:null,{conversationByAgentId:_,sessionByAgentId:k}=Zg(v),Y=f.length>0,J=200,U=440,ue="scout-agents-roster-w",[oe,ye]=A.useState(()=>{try{const G=localStorage.getItem(ue);if(G){const R=Number(G);if(R>=J&&R<=U)return R}}catch{}return 280}),le=A.useRef(!1),fe=A.useRef(null);A.useEffect(()=>{try{localStorage.setItem(ue,String(oe))}catch{}},[oe]);const Z=A.useCallback(G=>{G.preventDefault(),le.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none";const R=fe.current?.getBoundingClientRect().left??0,ee=q=>{le.current&&ye(Math.min(U,Math.max(J,q.clientX-R)))},ge=()=>{le.current=!1,document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",ee),document.removeEventListener("mouseup",ge)};document.addEventListener("mousemove",ee),document.addEventListener("mouseup",ge)},[]);return s.jsxs("div",{className:["s-agents-layout","s-agents-browser",Y?"s-agents-layout-split":"",B?"s-agents-browser-selected":""].filter(Boolean).join(" "),style:{"--agents-roster-w":`${oe}px`},children:[s.jsx("div",{ref:fe,className:"s-agents-list-panel s-agents-browser-list",children:s.jsxs("div",{className:"s-agent-roster",children:[s.jsx("div",{className:"s-agent-roster-header",children:s.jsxs("div",{children:[s.jsx("h2",{className:"s-section-title s-agent-roster-title",children:"Agents"}),s.jsxs("p",{className:"s-agent-roster-copy",children:[f.length," total · ",y[0].agents.length," working · ",y[1].agents.length," available"]})]})}),f.length===0?s.jsxs("div",{className:"s-empty s-agent-roster-empty",children:[s.jsx("p",{children:"No agents"}),s.jsx("p",{children:"Agents appear here when they connect to the broker."})]}):y.filter(G=>G.agents.length>0).map(G=>s.jsx(Jg,{title:G.title,count:G.agents.length,children:G.agents.map(R=>s.jsx(Fg,{agent:R,allAgents:f,selected:R.id===u,onClick:()=>c({view:"agents",agentId:R.id})},R.id))},G.key))]})}),Y&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"s-agents-roster-resize",onMouseDown:Z,role:"separator","aria-orientation":"vertical"}),s.jsx("div",{className:"s-agents-detail-panel s-agents-browser-detail",children:o&&B?s.jsx(Zu,{conversationId:o,navigate:c}):B?s.jsx(Wg,{agent:B,allAgents:f,session:k.get(B.id)??null,conversationId:_.get(B.id)??B.conversationId??null,navigate:c}):s.jsx($g,{agents:f})})]})]})}function Fg({agent:c,allAgents:u,selected:o,onClick:f}){const{name:h,qualifier:v}=Yh(c,u),b=Qt(c.state);return s.jsxs("div",{className:`s-agent-list-row s-agent-roster-row${o?" s-agent-list-row-active":""}`,onClick:f,children:[s.jsxs("div",{className:"s-agent-roster-avatar-wrap",children:[s.jsx("div",{className:"s-avatar s-avatar-sm",style:{background:$t(c.name)},children:c.name[0].toUpperCase()}),s.jsx("span",{className:`s-agent-roster-avatar-status s-agent-roster-avatar-status-${b}`,style:{background:Zl(c.state)}})]}),s.jsx("div",{className:"s-agent-list-body s-agent-roster-row-body",children:s.jsxs("div",{className:"s-agent-roster-row-top",children:[s.jsxs("div",{className:"s-agent-list-header",children:[s.jsx("span",{className:"s-agent-list-name",children:h}),v&&s.jsx("span",{className:"s-agent-list-qualifier",children:v})]}),s.jsx("span",{className:"s-agent-roster-row-time",children:Xg(c.updatedAt)})]})})]})}function Pg(c){switch(c){case"queued":case"working":return"working";case"needs_attention":return"updated";case"failed":return"failed";default:return"completed"}}function e0(c){return c.conversationId?{view:"conversation",conversationId:c.conversationId}:{view:"agents",agentId:c.agentId}}function t0(c){return c.kind==="work_item"&&c.recordId?{view:"work",workId:c.recordId}:c.conversationId?{view:"conversation",conversationId:c.conversationId}:c.agentId?{view:"agents",agentId:c.agentId}:null}function a0(c){return c.recordId?{view:"work",workId:c.recordId}:c.conversationId?{view:"conversation",conversationId:c.conversationId}:c.agentId?{view:"agents",agentId:c.agentId}:null}function oi({title:c,detail:u,count:o}){return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"s-dashboard-panel-header",children:[s.jsx("div",{children:s.jsx("h3",{children:c})}),s.jsx("span",{className:"s-dashboard-count",style:o===0?{opacity:.4}:void 0,children:o})]}),s.jsx("p",{className:"s-dashboard-panel-copy",children:u})]})}function Nh({ask:c,navigate:u,section:o}){const f=e0(c),h=c.completedAt?`finished ${ze(c.completedAt)}`:c.startedAt?`started ${ze(c.startedAt)}`:`updated ${ze(c.updatedAt)}`;return s.jsxs("div",{className:`s-work-row s-work-row-clickable s-dashboard-fleet-row s-dashboard-fleet-row-${o}`,"data-status":c.status,onClick:()=>u(f),children:[s.jsxs("div",{className:"s-work-row-header",children:[s.jsxs("div",{className:"s-fleet-row-title-wrap",children:[s.jsx("div",{className:"s-avatar s-avatar-sm",style:{background:$t(c.agentName??c.agentId)},children:(c.agentName??c.agentId)[0]?.toUpperCase()??"?"}),s.jsxs("div",{className:"s-fleet-row-title-copy",children:[s.jsxs("div",{className:"s-work-row-title-wrap",children:[s.jsx("span",{className:"s-work-row-title",children:c.agentName??c.agentId}),c.harness&&s.jsx("span",{className:"s-badge",children:c.harness})]}),s.jsxs("div",{className:"s-work-row-meta",style:{marginTop:2},children:[s.jsx("span",{className:"s-dot",style:{background:Zl(c.agentState)}}),s.jsx("span",{children:Qn(c.agentState)}),s.jsx("span",{children:h})]})]})]}),s.jsx("span",{className:`s-pill s-pill-${Pg(c.status)}`,children:c.statusLabel})]}),s.jsx("p",{className:"s-work-row-summary",children:Tt(c.task)}),c.summary&&s.jsx("p",{className:"s-work-row-summary",style:{marginTop:8},children:Tt(c.summary)})]})}function l0({item:c,navigate:u}){const o=t0(c),f=c.kind==="question"?"question":c.state.replace(/_/g," "),h=c.acceptanceState!=="none"?c.acceptanceState.replace(/_/g," "):c.kind==="question"?"awaiting answer":"your move";return s.jsxs("div",{className:`s-work-row s-dashboard-fleet-row s-dashboard-fleet-attention-row${o?" s-work-row-clickable":""}`,onClick:o?()=>u(o):void 0,children:[s.jsxs("div",{className:"s-work-row-header",children:[s.jsx("div",{className:"s-work-row-title-wrap",children:s.jsx("span",{className:"s-work-row-title",children:c.title})}),s.jsx("span",{className:"s-pill s-pill-updated",children:"Needs your input"})]}),s.jsxs("div",{className:"s-work-row-meta",children:[s.jsx("span",{children:c.kind==="question"?"question":"work item"}),c.agentName&&s.jsx("span",{children:c.agentName}),s.jsx("span",{children:f}),s.jsx("span",{children:h}),s.jsx("span",{children:ze(c.updatedAt)})]}),c.summary&&s.jsx("p",{className:"s-work-row-summary",children:Tt(c.summary)})]})}function n0({item:c,navigate:u}){const o=a0(c);return s.jsxs("div",{className:`s-dashboard-activity-row${o?" s-dashboard-activity-row-clickable":""}`,onClick:o?()=>u(o):void 0,children:[s.jsx("div",{className:"s-avatar s-avatar-sm",style:{background:$t(c.actorName??c.agentId??"system")},children:(c.actorName??c.agentId??"S")[0]?.toUpperCase()??"S"}),s.jsxs("div",{className:"s-dashboard-activity-body",children:[s.jsxs("div",{className:"s-dashboard-activity-header",children:[s.jsx("span",{className:"s-dashboard-activity-actor",children:c.actorName??"system"}),s.jsx("span",{className:"s-dashboard-activity-kind",children:Ry(c.kind)}),s.jsx("span",{className:"s-time",children:ze(c.ts)})]}),(c.title||c.summary)&&s.jsx("p",{className:"s-dashboard-activity-summary",children:Tt(c.title??c.summary??"")}),c.title&&c.summary&&s.jsx("p",{className:"s-dashboard-activity-note",children:Tt(c.summary)})]})]})}function s0({navigate:c}){const[u,o]=A.useState(null),f=A.useCallback(async()=>{try{o(await He("/api/fleet"))}catch{o(null)}},[]);A.useEffect(()=>{f()},[f]),Jt(f);const h=u?.activeAsks??[],v=u?.recentCompleted??[],b=u?.needsAttention??[],w=u?.activity??[],S=b.length>0?`${b.length} item${b.length===1?" is":"s are"} waiting on you. Clear ${b.length===1?"it":"those"} first, then monitor the rest of the queue.`:h.length>0?`${h.length} ask${h.length===1?" is":"s are"} currently in flight. The queue is clear of interruptions.`:v.length>0?"Nothing is actively running right now. Recent finishes are ready for review.":"No asks have moved through the fleet yet. Start work and this becomes the operations board.";return s.jsxs("div",{className:"s-home s-dashboard-screen s-dashboard-fleet",children:[s.jsx("div",{className:"s-dashboard-hero s-dashboard-hero-fleet",children:s.jsxs("div",{className:"s-dashboard-hero-copy",children:[s.jsxs("div",{className:"s-dashboard-hero-head",children:[s.jsx("h2",{children:"Fleet"}),u&&s.jsxs("span",{className:"s-time",children:["Updated ",ze(u.generatedAt)]})]}),s.jsx("p",{children:S}),s.jsxs("div",{className:"s-dashboard-summary-grid",children:[s.jsxs("div",{className:`s-dashboard-summary-card${(u?.totals.needsAttention??0)>0?" s-dashboard-summary-card-attention":""}`,children:[s.jsx("div",{className:"s-dashboard-summary-label",children:"Needs input"}),s.jsx("div",{className:"s-dashboard-summary-value",children:u?.totals.needsAttention??0}),s.jsx("div",{className:"s-dashboard-summary-meta",children:"Questions, reviews, or decisions waiting on you"})]}),s.jsxs("div",{className:"s-dashboard-summary-card",children:[s.jsx("div",{className:"s-dashboard-summary-label",children:"Active asks"}),s.jsx("div",{className:"s-dashboard-summary-value",children:u?.totals.active??0}),s.jsx("div",{className:"s-dashboard-summary-meta",children:"Currently in flight across the fleet"})]}),s.jsxs("div",{className:`s-dashboard-summary-card${(u?.totals.recentCompleted??0)>0?" s-dashboard-summary-card-finished":""}`,children:[s.jsx("div",{className:"s-dashboard-summary-label",children:"Finished"}),s.jsx("div",{className:"s-dashboard-summary-value",children:u?.totals.recentCompleted??0}),s.jsx("div",{className:"s-dashboard-summary-meta",children:"Recent completions and failures to review"})]}),s.jsxs("div",{className:"s-dashboard-summary-card",children:[s.jsx("div",{className:"s-dashboard-summary-label",children:"Activity"}),s.jsx("div",{className:"s-dashboard-summary-value",children:u?.totals.activity??0}),s.jsx("div",{className:"s-dashboard-summary-meta",children:"Recent events across the fleet"})]})]})]})}),s.jsxs("div",{className:"s-dashboard-fleet-stack",children:[s.jsxs("section",{className:`s-dashboard-panel${b.length>0?" s-dashboard-panel-attention":""}`,children:[s.jsx(oi,{title:"Needs your input",detail:"Handle interruptions, pending answers, and review requests first.",count:b.length}),b.length===0?s.jsxs("div",{className:"s-empty",children:[s.jsx("p",{children:"Nothing is waiting on you"}),s.jsx("p",{children:"When agents ask a question or a work item needs review, it will land here first."})]}):s.jsx("div",{className:"s-work-list",children:b.map(y=>s.jsx(l0,{item:y,navigate:c},y.recordId))})]}),s.jsxs("div",{className:"s-dashboard-fleet-columns",children:[s.jsxs("section",{className:"s-dashboard-panel s-dashboard-panel-active",children:[s.jsx(oi,{title:"Active asks",detail:"The asks still in flight across the fleet.",count:h.length}),h.length===0?s.jsxs("div",{className:"s-empty",children:[s.jsx("p",{children:"No active asks"}),s.jsx("p",{children:"New agent work will appear here while it is still in progress."})]}):s.jsx("div",{className:"s-work-list",children:h.map(y=>s.jsx(Nh,{ask:y,navigate:c,section:"active"},y.invocationId))})]}),s.jsxs("section",{className:"s-dashboard-panel s-dashboard-panel-finished",children:[s.jsx(oi,{title:"Recent finishes",detail:"Review completions and failures once the active queue is stable.",count:v.length}),v.length===0?s.jsxs("div",{className:"s-empty",children:[s.jsx("p",{children:"No recent finishes"}),s.jsx("p",{children:"Completed asks and failures will show up here once they settle."})]}):s.jsx("div",{className:"s-work-list",children:v.map(y=>s.jsx(Nh,{ask:y,navigate:c,section:"finished"},y.invocationId))})]})]}),s.jsxs("section",{className:"s-dashboard-panel s-dashboard-panel-activity",children:[s.jsx(oi,{title:"Recent activity",detail:"The broader event stream behind the queue.",count:w.length}),w.length===0?s.jsxs("div",{className:"s-empty",children:[s.jsx("p",{children:"No recent fleet activity"}),s.jsx("p",{children:"Messages, asks, and other agent activity will stream here."})]}):s.jsx("div",{className:"s-dashboard-activity-feed",children:w.slice(0,20).map(y=>s.jsx(n0,{item:y,navigate:c},y.id))})]})]})]})}const i0=[[/```[\s\S]*?```/g," "],[/`([^`]+)`/g,"$1"],[/!\[([^\]]*)\]\([^)]+\)/g,"$1"],[/\[([^\]]+)\]\([^)]+\)/g,"$1"],[/\*\*(.+?)\*\*/g,"$1"],[/__(.+?)__/g,"$1"],[new RegExp("(?<!\\*)\\*(?!\\*)([^*\\n]+)\\*(?!\\*)","g"),"$1"],[new RegExp("(?<!_)_(?!_)([^_\\n]+)_(?!_)","g"),"$1"],[/~~(.+?)~~/g,"$1"],[/^#{1,6}\s+/gm,""],[/^>\s?/gm,""],[/^[-*+]\s+/gm,""],[/^\d+\.\s+/gm,""],[/^---+\s*$/gm,""],[/^\s*\|.*\|\s*$/gm,""]];function c0(c,u=140){if(!c)return"";let o=c;for(const[f,h]of i0)o=o.replace(f,h);return o=o.replace(/\s+/g," ").trim(),o.length>u&&(o=`${o.slice(0,u-1)}…`),o}const Qh="scout:sessions:lastViewed";function Gh(){if(typeof localStorage>"u")return{};try{const c=localStorage.getItem(Qh);if(!c)return{};const u=JSON.parse(c);return u&&typeof u=="object"?u:{}}catch{return{}}}function u0(c,u=Date.now()){const o=Gh();o[c]=u;try{localStorage.setItem(Qh,JSON.stringify(o))}catch{}return o}function Lu(c,u,o){return c?c>(o[u]??0):!1}const jh={direct:"DM",channel:"Channel",group_direct:"Group",thread:"Thread"},r0=new Set(["all","direct","channel","group_direct","thread"]);function Ju(c){return typeof window>"u"?"":new URLSearchParams(window.location.search).get(c)??""}function o0(c){if(typeof window>"u")return;const u=new URLSearchParams(window.location.search);for(const[f,h]of Object.entries(c))h===null||h===""?u.delete(f):u.set(f,h);const o=u.toString();window.history.replaceState(null,"",window.location.pathname+(o?`?${o}`:""))}function f0(){const c=Ju("view");return r0.has(c)?c:"all"}function d0(c){return c.kind==="direct"&&c.agentName?c.agentName:c.title.replace(/\s*<>\s*/g," · ")}function h0(c){if(!c)return null;const u=c.replace(/[\\/]+$/,"");return u?u.split(/[\\/]/).filter(Boolean).at(-1)??u:null}function m0(c){if(typeof c!="number"||!Number.isFinite(c)||c<=0)return"";const u=c<1e12?c*1e3:c;return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(u)}function v0({navigate:c}){const[u,o]=A.useState([]),[f,h]=A.useState(()=>f0()),[v,b]=A.useState(()=>Ju("q")),[w,S]=A.useState(()=>Ju("unread")==="1"),[y,B]=A.useState(()=>Gh()),[_,k]=A.useState(0),[Y,J]=A.useState(null),U=A.useRef(null),ue=A.useRef(null),oe=A.useCallback(async()=>{J(null);try{const q=await He("/api/sessions");o(q.sort((W,se)=>(se.lastMessageAt??0)-(W.lastMessageAt??0)))}catch(q){J(q instanceof Error?q.message:String(q))}},[]);A.useEffect(()=>{oe()},[oe]),Jt(oe);const[,ye]=A.useState(0);A.useEffect(()=>{const q=setInterval(()=>ye(W=>W+1),15e3);return()=>clearInterval(q)},[]),A.useEffect(()=>{o0({view:f==="all"?null:f,q:v.trim()||null,unread:w?"1":null})},[f,v,w]);const le=A.useMemo(()=>Array.from(new Set(u.map(q=>q.kind))),[u]),fe=A.useMemo(()=>{const q={all:u.length};for(const W of u)q[W.kind]=(q[W.kind]??0)+1;return q},[u]),Z=A.useMemo(()=>u.filter(q=>Lu(q.lastMessageAt,q.id,y)).length,[u,y]),G=A.useMemo(()=>{const q=v.trim().toLowerCase();return u.filter(W=>!(f!=="all"&&W.kind!==f||w&&!Lu(W.lastMessageAt,W.id,y)||q&&![W.title,W.preview,W.agentName??"",W.harness??"",...W.participantIds].join(" ").toLowerCase().includes(q)))},[u,f,w,y,v]);A.useEffect(()=>{_>=G.length&&k(Math.max(0,G.length-1))},[G.length,_]);const R=A.useCallback(q=>{B(u0(q.id)),c({view:"conversation",conversationId:q.id})},[c]);A.useEffect(()=>{function q(W){const se=W.target,Ke=se instanceof HTMLInputElement||se instanceof HTMLTextAreaElement||se instanceof HTMLElement&&se.isContentEditable;if((W.metaKey||W.ctrlKey)&&W.key.toLowerCase()==="k"){W.preventDefault(),U.current?.focus(),U.current?.select();return}if(Ke){W.key==="Escape"&&se===U.current&&U.current?.blur();return}if(W.key==="/"){W.preventDefault(),U.current?.focus();return}if(W.key==="j"||W.key==="ArrowDown"){W.preventDefault(),k(Re=>Math.min(G.length-1,Re+1));return}if(W.key==="k"||W.key==="ArrowUp"){W.preventDefault(),k(Re=>Math.max(0,Re-1));return}if(W.key==="Enter"||W.key==="o"){const Re=G[_];Re&&(W.preventDefault(),R(Re))}}return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[G,_,R]),A.useEffect(()=>{ue.current?.querySelector(`[data-idx="${_}"]`)?.scrollIntoView({block:"nearest"})},[_]);const ee=le.length>1,ge=w?Z>0?`${Z} unread threads need attention.`:"No unread threads right now.":G.length===u.length?"Recent activity across every conversation.":`${G.length} conversations match the current filters.`;return s.jsxs("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:[s.jsx("section",{className:"s-thread-overview",children:s.jsxs("div",{className:"s-thread-overview-copy",children:[s.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[s.jsx("h2",{className:"s-page-title",children:"Sessions"}),s.jsxs("span",{className:"s-meta s-tabular",children:[G.length," of ",u.length]})]}),s.jsx("p",{className:"s-thread-overview-summary",children:ge})]})}),s.jsxs("section",{className:"s-thread-panel s-thread-panel-list",children:[s.jsxs("div",{className:"s-sessions-toolbar",children:[ee&&s.jsxs("div",{className:"s-seg",role:"tablist","aria-label":"Session kind",children:[s.jsx(Sh,{label:"All",count:fe.all,pressed:f==="all",onClick:()=>h("all")}),le.map(q=>s.jsx(Sh,{label:jh[q]??q,count:fe[q]??0,pressed:f===q,onClick:()=>h(q)},q))]}),s.jsxs("button",{type:"button",className:`s-seg-standalone${w?" is-on":""}`,onClick:()=>S(q=>!q),"aria-pressed":w,title:"Show unread only",children:[s.jsx("span",{className:"s-dot s-dot-sm","aria-hidden":"true"}),s.jsx("span",{children:"Unread"}),Z>0&&s.jsx("span",{className:"s-seg-count",children:Z})]}),s.jsxs("div",{className:"s-search",children:[s.jsx("input",{ref:U,type:"text",className:"s-search-input",placeholder:"Search conversations…",value:v,onChange:q=>b(q.target.value),onKeyDown:q=>{q.key==="Escape"&&(v?b(""):q.target.blur())}}),s.jsx("kbd",{className:"s-search-kbd",children:"⌘K"})]})]}),Y&&s.jsx("p",{className:"s-error",children:Y}),G.length===0?s.jsxs("div",{className:"s-empty s-thread-empty-state",children:[s.jsx("p",{children:v||w?"No matches":"No conversations"}),s.jsx("p",{children:v?"Try a different search term.":w?"You're all caught up.":"Conversations appear here when agents communicate."})]}):s.jsx("div",{className:"s-inbox",ref:ue,role:"listbox","aria-label":"Sessions",children:G.map((q,W)=>{const se=d0(q),Ke=(q.agentName??se)[0]?.toUpperCase()??"?",Re=Lu(q.lastMessageAt,q.id,y),Qe=W===_,z=c0(q.preview,160),L=jh[q.kind]??q.kind,F=h0(q.workspaceRoot);return s.jsxs("div",{"data-idx":W,"data-unread":Re?"true":"false","data-selected":Qe?"true":"false",className:"s-inbox-row",role:"option","aria-selected":Qe,tabIndex:Qe?0:-1,onClick:()=>{k(W),R(q)},onMouseEnter:()=>k(W),children:[s.jsxs("div",{className:"s-session-avatar-wrap",children:[s.jsx("div",{className:"s-avatar",style:{background:$t(q.agentName??se)},"aria-hidden":"true",children:Ke}),Re&&s.jsx("span",{className:"s-session-unread-dot","aria-hidden":"true"})]}),s.jsxs("div",{className:"s-inbox-body",children:[s.jsxs("div",{className:"s-inbox-header",children:[s.jsx("div",{className:"s-session-heading",children:s.jsx("span",{className:"s-inbox-name",title:se,children:se})}),s.jsx("div",{className:"s-session-trailing",children:q.lastMessageAt&&s.jsx("span",{className:"s-inbox-time s-tabular",title:m0(q.lastMessageAt),children:ze(q.lastMessageAt)})})]}),z?s.jsx("p",{className:"s-inbox-preview",children:z}):s.jsx("p",{className:"s-inbox-preview s-inbox-preview-empty",children:"No messages yet"}),s.jsxs("div",{className:"s-session-meta-row","aria-label":"Conversation details",children:[s.jsx("span",{className:"s-session-pill",children:L}),F&&s.jsx("span",{className:"s-session-pill",title:q.workspaceRoot??void 0,children:F}),q.currentBranch&&s.jsx("span",{className:"s-session-pill",title:q.currentBranch,children:q.currentBranch})]})]})]},q.id)})})]})]})}function Sh({label:c,count:u,pressed:o,onClick:f}){return s.jsxs("button",{type:"button",className:"s-seg-btn","aria-pressed":o,onClick:f,children:[s.jsx("span",{children:c}),s.jsx("span",{className:"s-seg-count",children:u})]})}const y0="modulepreload",g0=function(c){return"/"+c},Ah={},p0=function(u,o,f){let h=Promise.resolve();if(o&&o.length>0){let S=function(y){return Promise.all(y.map(B=>Promise.resolve(B).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const b=document.querySelector("meta[property=csp-nonce]"),w=b?.nonce||b?.getAttribute("nonce");h=S(o.map(y=>{if(y=g0(y),y in Ah)return;Ah[y]=!0;const B=y.endsWith(".css"),_=B?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${_}`))return;const k=document.createElement("link");if(k.rel=B?"stylesheet":y0,B||(k.as="script"),k.crossOrigin="",k.href=y,w&&k.setAttribute("nonce",w),document.head.appendChild(k),B)return new Promise((Y,J)=>{k.addEventListener("load",Y),k.addEventListener("error",()=>J(new Error(`Unable to preload CSS for ${y}`)))})}))}function v(b){const w=new Event("vite:preloadError",{cancelable:!0});if(w.payload=b,window.dispatchEvent(w),!w.defaultPrevented)throw b}return h.then(b=>{for(const w of b||[])w.status==="rejected"&&v(w.reason);return u().catch(v)})},b0=A.lazy(()=>p0(()=>import("./arc.es-BkYc1VKe.js"),[]).then(c=>({default:c.ArcDiagram})));function hi(c){if(!c)return"";const u=c.replace(/^https?:\/\//,"").split("/")[0],[o]=u.split(":");return o.split(".")[0]}function x0(c){return c.brokerUrl?hi(c.brokerUrl):c.hostName?hi(c.hostName):c.id.slice(0,10)}function N0(c,u){return Math.abs(c)>=Math.abs(u)?c>=0?["right","left"]:["left","right"]:u>=0?["bottom","top"]:["top","bottom"]}function j0(c){if(!c.localNode)return null;const u=c.localNode.id,o=Object.values(c.nodes).filter(B=>B.id!==u),f=800,h=300,v=f/2,b=h/2,w={[u]:{x:v,y:b,size:"m"}},S={[u]:{icon:"Database",name:hi(c.localNode.hostName)||c.localNode.name||"broker",subtitle:"this node",color:"violet"}},y=[];if(o.length===0)w.__placeholder={x:v+220,y:b,size:"m"},S.__placeholder={icon:"CircleDashed",name:"No peers yet",subtitle:"awaiting discovery",color:"zinc"},y.push({from:u,to:"__placeholder",fromAnchor:"right",toAnchor:"left",style:"pending"});else{const B=o.length,_=Math.min(170,100+B*10);o.forEach((k,Y)=>{const J=Y/B*Math.PI*2-Math.PI/2,U=Math.round(v+_*Math.cos(J)),ue=Math.round(b+_*Math.sin(J));w[k.id]={x:U,y:ue,size:"m"},S[k.id]={icon:"Database",name:hi(k.hostName)||k.name||"peer",subtitle:x0(k),color:k.advertiseScope==="mesh"?"emerald":"zinc"};const[oe,ye]=N0(U-v,ue-b);y.push({from:u,to:k.id,fromAnchor:oe,toAnchor:ye,style:k.advertiseScope==="mesh"?"mesh":"local"})})}return{layout:{width:f,height:h},nodes:w,nodeData:S,connectors:y,connectorStyles:{mesh:{color:"emerald",strokeWidth:2,label:"mesh"},local:{color:"zinc",strokeWidth:1.5},pending:{color:"zinc",strokeWidth:1.5,dashed:!0}}}}function S0({mesh:c}){const u=A.useMemo(()=>j0(c),[c]);return u?s.jsx("div",{className:"s-mesh-topology",children:s.jsx(A.Suspense,{fallback:s.jsx("div",{className:"s-mesh-topology-fallback"}),children:s.jsx(b0,{data:u,className:"s-mesh-topology-canvas",mode:"light",theme:"cool",interactive:!0,showArcToggle:!1,defaultZoom:"fit",maxFitZoom:.95,hoverEffects:{dim:!0,lift:!0,glow:!0,highlightEdges:!0}})})}):null}function A0(c){return c.code==="local_only"?"notice":c.severity==="error"?"error":"warning"}function E0(c){switch(c.code){case"local_only":return"Local only";case"mesh_loopback":return"Unreachable";case"discovery_unconfigured":return"Needs setup";default:return"Offline"}}function w0(c){return c?c.replace(/^https?:\/\//,"").split("/")[0]??c:"Unavailable"}function Yu(c){return c==="mesh"?"Mesh visible":c==="local"?"Local only":c||"Not advertised"}function T0(c){return!c.health.reachable||c.issues.some(u=>u.severity==="error")?"danger":c.issues.length>0?"warning":"success"}function z0(c){return c.health.reachable?c.issues.some(u=>u.severity==="error")?"Degraded":c.issues.length>0?"Needs attention":"Healthy":"Broker unreachable"}function M0({issue:c}){const u=A0(c);return s.jsxs("article",{className:`sys-issue-card sys-issue-card-${u}`,children:[s.jsxs("div",{className:"sys-issue-head",children:[s.jsx("h3",{className:"sys-issue-title",children:c.title}),s.jsx("span",{className:`sys-chip sys-chip-${u==="error"?"failed":u}`,children:E0(c)})]}),s.jsx("p",{className:"sys-issue-body",children:c.summary}),(c.action||c.actionCommand)&&s.jsxs("div",{className:"sys-issue-action",children:[c.actionCommand&&s.jsx("code",{className:"sys-code-inline",children:c.actionCommand}),c.action&&s.jsx("span",{children:c.action})]})]})}function _0({navigate:c}){const[u,o]=A.useState(null),[f,h]=A.useState(!0),[v,b]=A.useState(!1),[w,S]=A.useState(null),[y,B]=A.useState(null),_=A.useRef(null),k=A.useRef(0);A.useEffect(()=>{_.current=u},[u]);const Y=A.useCallback(async(R="initial")=>{const ee=++k.current;!(_.current!==null)&&R!=="background"?(h(!0),S(null)):b(!0);try{const q=await He("/api/mesh");if(ee!==k.current)return;o(q),S(null),B(Date.now())}catch(q){if(ee!==k.current)return;S(q instanceof Error?q.message:String(q))}finally{ee===k.current&&(h(!1),b(!1))}},[]);A.useEffect(()=>{Y("initial")},[Y]),A.useEffect(()=>{const R=setInterval(()=>{Y("background")},1e4);return()=>clearInterval(R)},[Y]);const J=u?T0(u):"warning",U=u?z0(u):"Loading",ue=u?Object.values(u.nodes):[],oe=u?.localNode?.id,ye=u?.localNode?.hostName?.toLowerCase(),le=ue.filter(R=>R.id!==oe),fe=(u?.tailscale.peers??[]).filter(R=>{const ee=R.hostName?.toLowerCase();return ee?!(ee==="localhost"||ye&&(ee===ye||ee.startsWith(`${ye.split(".")[0]}.`))):!0}),Z=u?u.issues.length>0?u.issues:u.warnings.map((R,ee)=>({code:`fallback-${ee}`,severity:"warning",title:"Mesh notice",summary:R,action:null,actionCommand:null})):[],G=A.useMemo(()=>u?[{label:"Broker",value:u.health.reachable?"Reachable":"Unavailable",detail:u.health.error??w0(u.brokerUrl)},{label:"Visibility",value:Yu(u.localNode?.advertiseScope),detail:u.localNode?.hostName??"Local registration unavailable"},{label:"Mesh peers",value:`${le.length}`,detail:le.length>0?"Remote brokers in this mesh":"No remote brokers discovered"},{label:"Tailnet",value:u.tailscale.available?`${fe.filter(R=>R.online).length}/${fe.length}`:"Unavailable",detail:u.tailscale.available?"Online peers / visible peers":"Tailscale peers not detected"}]:[],[fe,u,le.length]);return s.jsxs("div",{className:"sys-surface-page",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Mesh"}),s.jsx("p",{className:"sys-page-subtitle",children:"Broker reachability, discovery posture, and peer visibility."})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("span",{className:`sys-chip sys-chip-${J}`,children:U}),s.jsx("div",{className:"sys-sync-note",children:f?"Loading system snapshot...":w&&u?`Showing last confirmed snapshot from ${y?ze(y):"earlier"}`:y?`Confirmed ${ze(y)}`:"Waiting for first snapshot"}),s.jsx("button",{type:"button",className:"s-btn",disabled:f||v,onClick:()=>{Y("manual")},children:v?"Refreshing...":"Refresh"})]})]}),w&&u&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Mesh refresh failed."}),s.jsx("span",{children:w})]}),f&&!u&&s.jsxs("div",{className:"sys-panel sys-state-card",children:[s.jsx("h3",{className:"sys-state-title",children:"Loading mesh status"}),s.jsx("p",{className:"sys-state-body",children:"Inspecting broker reachability and peer discovery inputs."})]}),!f&&!u&&w&&s.jsxs("div",{className:"sys-panel sys-state-card sys-state-card-error",children:[s.jsx("h3",{className:"sys-state-title",children:"Mesh status is unavailable"}),s.jsx("p",{className:"sys-state-body",children:w}),s.jsx("div",{className:"sys-inline-actions",children:s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{Y("manual")},children:"Try again"})})]}),u&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sys-stat-grid",children:G.map(R=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:R.label}),s.jsx("strong",{className:"sys-stat-value",children:R.value}),s.jsx("span",{className:"sys-stat-detail",children:R.detail})]},R.label))}),s.jsxs("section",{className:"sys-panel sys-mesh-identity",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Local node"}),s.jsx("p",{className:"sys-section-subtitle",children:"The broker identity other peers can discover and dial."})]})}),u.localNode?s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Node"}),s.jsx("span",{className:"sys-detail-value",children:u.localNode.name})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Node id"}),s.jsx("code",{className:"sys-detail-value",children:u.localNode.id})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Mesh"}),s.jsx("code",{className:"sys-detail-value",children:u.meshId??"Unassigned"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Advertise scope"}),s.jsx("span",{className:"sys-detail-value",children:Yu(u.localNode.advertiseScope)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Broker URL"}),s.jsx("code",{className:"sys-detail-value",children:u.localNode.brokerUrl??u.brokerUrl})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Host"}),s.jsx("span",{className:"sys-detail-value",children:u.localNode.hostName??"Unavailable"})]})]}):s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No local node registration"}),s.jsx("p",{children:"The broker answered health checks, but it has not published a local node record yet."})]})]}),s.jsxs("section",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Health notices"}),s.jsx("p",{className:"sys-section-subtitle",children:"Warnings and errors from the current broker and discovery snapshot."})]})}),Z.length>0?s.jsx("div",{className:"sys-issue-grid",children:Z.map((R,ee)=>s.jsx(M0,{issue:R},`${R.code}-${ee}`))}):s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No active mesh warnings"}),s.jsx("p",{children:"The broker is reachable and discovery inputs look healthy from this page."})]})]}),s.jsxs("section",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Topology"}),s.jsx("p",{className:"sys-section-subtitle",children:"Current broker relationships inside the visible mesh."})]})}),u.localNode?s.jsx(S0,{mesh:u}):s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"Topology unavailable"}),s.jsx("p",{children:"A local node record is required before the topology view can render."})]})]}),s.jsxs("section",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Discovered peers"}),s.jsxs("p",{className:"sys-section-subtitle",children:["Remote brokers registered in ",u.meshId??"this mesh","."]})]})}),le.length===0?s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No remote brokers discovered"}),s.jsx("p",{children:"This can be normal on a single-node setup. If you expect peers, check the health notices above."})]}):s.jsx("div",{className:"sys-list-grid",children:le.map(R=>s.jsxs("article",{className:"sys-list-card",children:[s.jsxs("div",{className:"sys-list-card-head",children:[s.jsx("h3",{className:"sys-list-card-title",children:R.name}),s.jsx("span",{className:`sys-chip sys-chip-${R.advertiseScope==="mesh"?"success":"neutral"}`,children:Yu(R.advertiseScope)})]}),s.jsxs("div",{className:"sys-list-card-detail",children:[s.jsx("span",{className:"sys-detail-label",children:"Node id"}),s.jsx("code",{className:"sys-detail-value",children:R.id})]}),R.brokerUrl&&s.jsxs("div",{className:"sys-list-card-detail",children:[s.jsx("span",{className:"sys-detail-label",children:"Broker"}),s.jsx("code",{className:"sys-detail-value",children:R.brokerUrl})]}),s.jsxs("div",{className:"sys-list-card-detail",children:[s.jsx("span",{className:"sys-detail-label",children:"Last seen"}),s.jsx("span",{className:"sys-detail-value",children:R.lastSeenAt?ze(R.lastSeenAt):"Recently registered"})]})]},R.id))})]}),s.jsxs("section",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Tailnet"}),s.jsx("p",{className:"sys-section-subtitle",children:"External Tailscale peers visible from this machine."})]})}),fe.length===0?s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No external tailnet peers"}),s.jsx("p",{children:u.tailscale.available?"Only this host is visible in the current tailnet snapshot.":"Tailscale peers were not detected on this machine."})]}):s.jsx("div",{className:"sys-list-grid",children:fe.map(R=>s.jsxs("article",{className:"sys-list-card",children:[s.jsxs("div",{className:"sys-list-card-head",children:[s.jsx("h3",{className:"sys-list-card-title",children:R.hostName||R.name}),s.jsx("span",{className:`sys-chip sys-chip-${R.online?"success":"failed"}`,children:R.online?"Online":"Offline"})]}),s.jsxs("div",{className:"sys-list-card-detail",children:[s.jsx("span",{className:"sys-detail-label",children:"Address"}),s.jsx("code",{className:"sys-detail-value",children:R.addresses?.[0]??"Unavailable"})]}),s.jsxs("div",{className:"sys-list-card-detail",children:[s.jsx("span",{className:"sys-detail-label",children:"Platform"}),s.jsx("span",{className:"sys-detail-value",children:R.os??"Unknown"})]})]},R.id))})]})]})]})}const C0={"agent.registered":"registered","agent.online":"came online","agent.offline":"went offline","flight.started":"started task","flight.completed":"completed task","message.sent":"sent message","message.received":"received message","collaboration.ask":"asked a question","collaboration.answer":"answered"};function D0(c){return C0[c]??c.replace(/[._]/g," ")}function R0({agent:c,navigate:u}){return s.jsxs("button",{type:"button",className:"s-dashboard-agent-row",onClick:()=>u({view:"agents",agentId:c.id}),children:[s.jsx("div",{className:"s-avatar s-avatar-xs",style:{background:$t(c.name)},children:c.name[0]?.toUpperCase()??"?"}),s.jsxs("div",{className:"s-dashboard-agent-copy",children:[s.jsx("span",{className:"s-dashboard-agent-name",children:c.name}),s.jsxs("span",{className:"s-dashboard-agent-meta",children:[s.jsx("span",{className:"s-dot",style:{background:Zl(c.state)}}),Qn(c.state)]})]})]})}function O0({item:c,navigate:u}){const o=c.conversationId?{view:"conversation",conversationId:c.conversationId}:null;return s.jsxs("div",{className:`s-dashboard-activity-row${o?" s-dashboard-activity-row-clickable":""}`,onClick:o?()=>u(o):void 0,children:[s.jsx("div",{className:"s-dashboard-activity-time",children:ze(c.ts)}),s.jsxs("div",{className:"s-dashboard-activity-body",children:[s.jsxs("div",{className:"s-dashboard-activity-header",children:[s.jsx("span",{className:"s-dashboard-activity-actor",children:c.actorName??"system"}),s.jsx("span",{className:"s-dashboard-activity-kind",children:D0(c.kind)})]}),(c.title||c.summary)&&s.jsx("p",{className:"s-dashboard-activity-summary",children:Tt(c.title??c.summary??"")})]})]})}function U0({agents:c,navigate:u}){const[o,f]=A.useState(null),[h,v]=A.useState([]),b=A.useCallback(async()=>{try{const[Y,J]=await Promise.all([He("/api/shell-state"),He("/api/activity")]);f(Y),v(J)}catch{}},[]);A.useEffect(()=>{b()},[b]),Jt(b);const w=o?.runtime,S=w?.brokerReachable??!1,y=c.filter(Y=>di(Y.state)),B=c.filter(Y=>!di(Y.state)),_=c.length>0,k=h.slice(0,20);return s.jsxs("div",{className:"s-home s-dashboard-screen",children:[s.jsxs("div",{className:"s-dashboard-body",children:[s.jsxs("main",{className:"s-dashboard-main",children:[s.jsxs("div",{className:"s-dashboard-section-head",children:[s.jsx("h3",{children:"Activity"}),h.length>0&&s.jsx("span",{className:"s-dashboard-count",children:h.length})]}),k.length===0?s.jsxs("div",{className:"s-empty",children:[s.jsx("p",{children:"No activity yet"}),s.jsx("p",{children:"Events appear here as agents connect and work."})]}):s.jsx("div",{className:"s-dashboard-activity-feed",children:k.map(Y=>s.jsx(O0,{item:Y,navigate:u},Y.id))}),h.length>20&&s.jsx("button",{type:"button",className:"s-dashboard-see-all",onClick:()=>u({view:"activity"}),children:"See all activity"})]}),s.jsxs("aside",{className:"s-dashboard-rail",children:[s.jsxs("div",{className:"s-dashboard-section-head",children:[s.jsx("h3",{children:"Agents"}),c.length>0&&s.jsx("span",{className:"s-dashboard-count",children:c.length})]}),y.length>0?s.jsxs("div",{className:"s-dashboard-roster-block",children:[s.jsx("div",{className:"s-dashboard-roster-label",children:"Online"}),s.jsx("div",{className:"s-dashboard-agent-list",children:y.map(Y=>s.jsx(R0,{agent:Y,navigate:u},Y.id))})]}):s.jsxs("div",{className:"s-empty",children:[s.jsx("p",{children:_?"All agents offline":"No agents connected"}),s.jsx("p",{children:_?"Agents appear here when they reconnect.":"Connect an agent to see your roster."})]}),B.length>0&&s.jsxs("div",{className:"s-dashboard-roster-block",children:[s.jsx("div",{className:"s-dashboard-roster-label",children:"Standby"}),s.jsx("div",{className:"s-dashboard-chip-row",children:B.map(Y=>s.jsx("button",{type:"button",className:"s-dashboard-chip",onClick:()=>u({view:"agents",agentId:Y.id}),children:Y.name},Y.id))})]})]})]}),s.jsxs("footer",{className:"s-dashboard-statusbar",children:[s.jsxs("span",{className:"s-dashboard-statusbar-item",children:[s.jsx("span",{className:"s-dot",style:{background:S?"var(--green)":"var(--red)"}}),w?.brokerLabel??(S?"Broker healthy":"Broker offline")]}),w?.nodeId&&s.jsx("span",{className:"s-dashboard-statusbar-item s-dashboard-statusbar-mono",children:w.nodeId.length>14?`${w.nodeId.slice(0,10)}…`:w.nodeId}),s.jsxs("span",{className:"s-dashboard-statusbar-item",children:[w?.agentCount??c.length," agent",(w?.agentCount??c.length)===1?"":"s"]}),s.jsxs("span",{className:"s-dashboard-statusbar-item",children:[w?.messageCount??0," msg",(w?.messageCount??0)===1?"":"s"]})]})]})}function k0(c){return c.attention==="interrupt"?"failed":c.state==="done"?"completed":c.attention==="badge"||c.state==="waiting"||c.state==="review"?"updated":"working"}function Qu(c){switch(c){case"review":return"In review";case"waiting":return"Waiting";case"working":return"Working";case"done":return"Done";default:return c.replace(/_/g," ")}}function B0(c){switch(c){case"badge":return"Needs attention";case"interrupt":return"Blocked";default:return null}}function H0(c){switch(c.kind){case"flight_started":return"flight started";case"flight_completed":return c.detailKind?`flight ${c.detailKind}`:"flight ended";case"message":return"message";default:return c.title??c.detailKind??"event"}}function Eh(c){return c.kind==="message"?"message":c.kind==="flight_started"?"flight":c.kind==="flight_completed"?c.detailKind?.includes("fail")?"alert":"done":c.detailKind?.includes("interrupt")||c.detailKind?.includes("block")?"alert":"system"}function Gu({title:c,items:u}){return u.length===0?null:s.jsxs("section",{className:"s-work-fact-card",children:[s.jsx("div",{className:"s-work-fact-card-header",children:s.jsx("div",{className:"s-work-fact-card-title",children:c})}),s.jsx("div",{className:"s-work-fact-card-body",children:u.map(o=>s.jsxs("div",{className:"s-work-fact-row",children:[s.jsx("span",{className:"s-work-fact-label",children:o.label}),s.jsx("span",{className:"s-work-fact-value",children:o.value})]},o.label))})]})}function wh({label:c,value:u,onClick:o}){return s.jsxs("button",{type:"button",className:"s-work-action-row",onClick:o,children:[s.jsx("span",{className:"s-work-action-row-label",children:c}),s.jsx("span",{className:"s-work-action-row-value",children:u})]})}function q0(c){const u=c.split(".");return u[u.length-1]||c}function L0({workId:c,navigate:u}){const[o,f]=A.useState(null),[h,v]=A.useState(null),[b,w]=A.useState(!1),S=A.useCallback(async()=>{v(null);try{const U=await He(`/api/work/${encodeURIComponent(c)}`);f(U)}catch(U){v(U instanceof Error?U.message:String(U)),f(null)}finally{w(!0)}},[c]);if(A.useEffect(()=>{w(!1),S()},[S]),Jt(S),!b)return s.jsxs("div",{children:[s.jsx("button",{type:"button",className:"s-back",onClick:()=>u({view:"inbox"}),children:"← Back"}),s.jsx("div",{className:"s-empty",children:s.jsx("p",{children:"Loading…"})})]});if(!o)return s.jsxs("div",{children:[s.jsx("button",{type:"button",className:"s-back",onClick:()=>u({view:"inbox"}),children:"← Back"}),h&&s.jsx("p",{className:"s-error",children:h}),s.jsx("div",{className:"s-empty",children:s.jsx("p",{children:"Work item not found"})})]});const y=B0(o.attention),B=o.ownerName??o.ownerId??"Unassigned",_=o.nextMoveOwnerName??o.nextMoveOwnerId??"—",k=[{label:"State",value:Qu(o.state)},{label:"Acceptance",value:o.acceptanceState.replace(/_/g," ")},{label:"Phase",value:o.currentPhase},...y?[{label:"Attention",value:y}]:[]],Y=[{label:"Owner",value:B},{label:"Next move",value:_},...o.priority?[{label:"Priority",value:o.priority}]:[],{label:"Conversation",value:o.conversationId?"Attached":"None"}],J=[{label:"Case ID",value:o.id},{label:"Created",value:il(o.createdAt)},{label:"Updated",value:il(o.updatedAt)},{label:"Last activity",value:il(o.lastMeaningfulAt)}];return s.jsxs("div",{className:"s-work-detail s-work-casefile",children:[s.jsxs("div",{className:"s-work-casefile-topbar",children:[s.jsx("button",{type:"button",className:"s-back",onClick:()=>u({view:"inbox"}),children:"← Back"}),s.jsxs("span",{className:"s-work-casefile-record",children:["Case ",q0(o.id)]})]}),h&&s.jsx("p",{className:"s-error",children:h}),s.jsx("section",{className:"s-work-casefile-hero",children:s.jsxs("div",{className:"s-work-casefile-hero-main",children:[s.jsxs("div",{className:"s-work-casefile-title-row",children:[s.jsx("h1",{className:"s-work-casefile-title",children:o.title}),s.jsx("span",{className:`s-pill s-pill-${k0(o)}`,children:o.currentPhase})]}),o.lastMeaningfulSummary&&s.jsx("div",{className:"s-work-casefile-summary",children:Tt(o.lastMeaningfulSummary)}),s.jsxs("div",{className:"s-work-casefile-meta",children:[s.jsxs("span",{children:["Updated ",ze(o.updatedAt)]}),s.jsx("span",{children:B}),s.jsx("span",{children:Qu(o.state)}),y&&s.jsx("span",{children:y}),o.priority&&s.jsxs("span",{children:["Priority ",o.priority]})]})]})}),s.jsxs("div",{className:"s-work-casefile-layout",children:[s.jsxs("div",{className:"s-work-casefile-main",children:[s.jsxs("section",{className:"s-work-casefile-section",children:[s.jsx("div",{className:"s-agent-section-heading",children:s.jsx("h2",{className:"s-agent-section-title",children:"Case facts"})}),s.jsxs("div",{className:"s-work-fact-grid",children:[s.jsx(Gu,{title:"Status",items:k}),s.jsx(Gu,{title:"Assignment",items:Y})]})]}),o.activeFlights.length>0&&s.jsxs("section",{className:"s-work-casefile-section",children:[s.jsx("div",{className:"s-agent-section-heading",children:s.jsx("h2",{className:"s-agent-section-title",children:"Flights"})}),s.jsx("div",{className:"s-work-flight-list",children:o.activeFlights.map(U=>s.jsxs("button",{type:"button",className:"s-work-flight-card",onClick:U.conversationId?()=>u({view:"conversation",conversationId:U.conversationId}):void 0,disabled:!U.conversationId,children:[s.jsxs("div",{className:"s-work-flight-card-header",children:[s.jsx("span",{className:"s-work-flight-card-title",children:U.agentName??U.agentId}),s.jsx("span",{className:"s-pill s-pill-working",children:U.state})]}),s.jsxs("div",{className:"s-work-flight-card-meta",children:[s.jsx("span",{children:U.startedAt?`Started ${ze(U.startedAt)}`:"Start time unavailable"}),U.completedAt&&s.jsxs("span",{children:["Completed ",ze(U.completedAt)]})]}),U.summary&&s.jsx("div",{className:"s-work-flight-card-copy",children:U.summary})]},U.id))})]}),o.childWork.length>0&&s.jsxs("section",{className:"s-work-casefile-section",children:[s.jsx("div",{className:"s-agent-section-heading",children:s.jsx("h2",{className:"s-agent-section-title",children:"Child work"})}),s.jsx("div",{className:"s-work-related-list",children:o.childWork.map(U=>s.jsxs("button",{type:"button",className:"s-work-related-card",onClick:()=>u({view:"work",workId:U.id}),children:[s.jsxs("div",{className:"s-work-related-card-header",children:[s.jsx("span",{className:"s-work-related-card-title",children:U.title}),s.jsx("span",{className:`s-pill s-pill-${U.attention==="interrupt"?"failed":"updated"}`,children:U.currentPhase})]}),s.jsxs("div",{className:"s-work-related-card-meta",children:[s.jsx("span",{children:U.ownerName??U.ownerId??"Unassigned"}),s.jsx("span",{children:Qu(U.state)}),s.jsx("span",{children:ze(U.lastMeaningfulAt)})]}),U.lastMeaningfulSummary&&s.jsx("div",{className:"s-work-related-card-copy",children:Tt(U.lastMeaningfulSummary)})]},U.id))})]}),s.jsxs("section",{className:"s-work-casefile-section",children:[s.jsx("div",{className:"s-agent-section-heading",children:s.jsx("h2",{className:"s-agent-section-title",children:"Timeline"})}),o.timeline.length===0?s.jsxs("div",{className:"s-empty",children:[s.jsx("p",{children:"No activity yet."}),s.jsx("p",{children:"Timeline events will appear once the case receives messages or coordination updates."})]}):s.jsx("div",{className:"s-work-timeline",children:o.timeline.map(U=>s.jsxs("button",{type:"button",className:`s-work-timeline-entry${U.conversationId?" s-work-timeline-entry-clickable":""}`,onClick:U.conversationId?()=>u({view:"conversation",conversationId:U.conversationId}):void 0,disabled:!U.conversationId,children:[s.jsx("span",{className:`s-work-timeline-marker s-work-timeline-marker-${Eh(U)}`}),s.jsxs("div",{className:"s-work-timeline-content",children:[s.jsxs("div",{className:"s-work-timeline-header",children:[s.jsx("span",{className:"s-work-timeline-time",children:ze(U.at)}),s.jsx("span",{className:`s-work-timeline-kind s-work-timeline-kind-${Eh(U)}`,children:H0(U)})]}),s.jsx("div",{className:"s-work-timeline-actor",children:U.actorName??"system"}),U.title&&s.jsx("div",{className:"s-work-timeline-title",children:U.title}),U.summary&&s.jsx("div",{className:"s-work-timeline-summary",children:Tt(U.summary)}),s.jsx("div",{className:"s-work-timeline-stamp",children:il(U.at)})]})]},U.id))})]})]}),s.jsxs("aside",{className:"s-work-casefile-side",children:[s.jsx(Gu,{title:"Record",items:J}),s.jsxs("section",{className:"s-work-fact-card",children:[s.jsx("div",{className:"s-work-fact-card-header",children:s.jsx("div",{className:"s-work-fact-card-title",children:"Links"})}),s.jsxs("div",{className:"s-work-action-list",children:[o.conversationId?s.jsx(wh,{label:"Conversation",value:"Open thread",onClick:()=>u({view:"conversation",conversationId:o.conversationId})}):s.jsx("div",{className:"s-work-action-list-empty",children:"No conversation attached."}),o.parentId&&o.parentTitle?s.jsx(wh,{label:"Parent",value:o.parentTitle,onClick:()=>u({view:"work",workId:o.parentId})}):s.jsx("div",{className:"s-work-action-list-empty",children:"No parent work item."})]})]})]})]})]})}function Y0(){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),s.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})}function Q0(){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),s.jsx("circle",{cx:"9",cy:"7",r:"4"}),s.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),s.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}function G0(){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.jsx("circle",{cx:"12",cy:"4",r:"2"}),s.jsx("circle",{cx:"4",cy:"12",r:"2"}),s.jsx("circle",{cx:"20",cy:"12",r:"2"}),s.jsx("circle",{cx:"12",cy:"20",r:"2"}),s.jsx("path",{d:"M12 6v3"}),s.jsx("path",{d:"M6 12h3"}),s.jsx("path",{d:"M15 12h3"}),s.jsx("path",{d:"M12 15v3"})]})}function X0(){return s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}function Z0(){return s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function V0(){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),s.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function K0(){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}function J0({route:c,navigate:u,agents:o,messages:f}){switch(c.view){case"conversation":return s.jsx(Zu,{conversationId:c.conversationId,navigate:u});case"agent-info":return s.jsx(qg,{conversationId:c.conversationId,navigate:u});case"settings":return s.jsx(zg,{navigate:u});case"agents":return s.jsx(Ig,{navigate:u,selectedAgentId:c.agentId,conversationId:c.conversationId});case"fleet":return s.jsx(s0,{navigate:u});case"sessions":return c.sessionId?s.jsx(Zu,{conversationId:c.sessionId,navigate:u}):s.jsx(v0,{navigate:u});case"mesh":return s.jsx(_0,{navigate:u});case"activity":return s.jsx(kg,{navigate:u});case"work":return s.jsx(L0,{workId:c.workId,navigate:u});default:return s.jsx(U0,{agents:o,messages:f,navigate:u})}}const $u=140,Wu=400,Xh="scout-sidebar-w";function $0(){try{const c=localStorage.getItem(Xh);if(c){const u=Number(c);if(u>=$u&&u<=Wu)return u}}catch{}return 280}function W0(){const{route:c,navigate:u}=zy(),[o,f]=A.useState($0),h=A.useRef(!1);A.useEffect(()=>{document.documentElement.style.setProperty("--sidebar-w",`${o}px`);try{localStorage.setItem(Xh,String(o))}catch{}},[o]);const v=A.useCallback(Y=>{Y.preventDefault(),h.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none";const J=ue=>{if(!h.current)return;const oe=Math.min(Wu,Math.max($u,ue.clientX));f(oe)},U=()=>{h.current=!1,document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",J),document.removeEventListener("mouseup",U)};document.addEventListener("mousemove",J),document.addEventListener("mouseup",U)},[]),[b,w]=A.useState([]),[S,y]=A.useState([]),B=A.useCallback(async()=>{const[Y,J]=await Promise.allSettled([He("/api/agents"),He("/api/messages")]);Y.status==="fulfilled"&&w(Y.value),J.status==="fulfilled"&&y(J.value)},[]);A.useEffect(()=>{B()},[B]),Jt(B);const _=b.filter(Y=>di(Y.state)).length,k=c.view!=="inbox"&&c.view!=="sessions"&&c.view!=="mesh";return s.jsxs("div",{className:`s-app${k?" s-app-content-open":""}`,children:[s.jsxs("header",{className:"s-topbar",children:[s.jsx("div",{className:"s-topbar-left",children:s.jsxs("h1",{className:"s-logo",onClick:()=>u({view:"inbox"}),children:[s.jsx("img",{src:"/openscout-icon.png",alt:"",className:"s-logo-mark"}),"Scout"]})}),s.jsx("div",{className:"s-topbar-right",children:s.jsx("button",{type:"button",className:"s-topbar-btn",onClick:()=>u({view:"settings"}),children:"Pair device"})})]}),s.jsxs("div",{className:"s-app-body",children:[s.jsxs("aside",{className:"s-sidebar",children:[s.jsxs("nav",{className:"s-sidebar-nav",children:[s.jsxs("button",{type:"button",className:`s-nav-item${c.view==="inbox"?" s-nav-item-active":""}`,onClick:()=>u({view:"inbox"}),children:[s.jsx(Y0,{}),s.jsx("span",{children:"Home"})]}),s.jsxs("button",{type:"button",className:`s-nav-item${c.view==="agents"?" s-nav-item-active":""}`,onClick:()=>u({view:"agents"}),children:[s.jsx(Q0,{}),s.jsx("span",{children:"Agents"})]}),s.jsxs("button",{type:"button",className:`s-nav-item${c.view==="fleet"?" s-nav-item-active":""}`,onClick:()=>u({view:"fleet"}),children:[s.jsx(G0,{}),s.jsx("span",{children:"Fleet"})]}),s.jsxs("button",{type:"button",className:`s-nav-item${c.view==="sessions"?" s-nav-item-active":""}`,onClick:()=>u({view:"sessions"}),children:[s.jsx(Z0,{}),s.jsx("span",{children:"Sessions"})]}),s.jsxs("button",{type:"button",className:`s-nav-item${c.view==="activity"?" s-nav-item-active":""}`,onClick:()=>u({view:"activity"}),children:[s.jsx(X0,{}),s.jsx("span",{children:"Activity"})]}),s.jsxs("button",{type:"button",className:`s-nav-item${c.view==="mesh"?" s-nav-item-active":""}`,onClick:()=>u({view:"mesh"}),children:[s.jsx(V0,{}),s.jsx("span",{children:"Mesh"})]})]}),s.jsx("div",{className:"s-spacer"}),s.jsx("nav",{className:"s-sidebar-footer",children:s.jsxs("button",{type:"button",className:`s-nav-item${c.view==="settings"?" s-nav-item-active":""}`,onClick:()=>u({view:"settings"}),children:[s.jsx(K0,{}),s.jsx("span",{children:"Settings"})]})})]}),s.jsx("div",{className:"s-sidebar-resize",onMouseDown:v,role:"separator","aria-orientation":"vertical","aria-valuenow":o,"aria-valuemin":$u,"aria-valuemax":Wu}),s.jsx("main",{className:"s-content",children:s.jsx(J0,{route:c,navigate:u,agents:b,messages:S})})]}),s.jsxs("footer",{className:"s-statusbar",children:[s.jsx("div",{className:"s-statusbar-left",children:s.jsxs("span",{className:"s-statusbar-item",children:[s.jsx("span",{className:"s-dot",style:{background:b.length>0?"var(--green)":"var(--dim)"}}),b.length>0?"Online":"Offline"]})}),s.jsxs("div",{className:"s-statusbar-right",children:[s.jsxs("span",{className:"s-statusbar-item",children:[_,"/",b.length," agents"]}),s.jsx("span",{className:"s-statusbar-item s-statusbar-time",children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),s.jsx("button",{type:"button",className:"s-statusbar-link",onClick:()=>u({view:"activity"}),children:"Logs"})]})]})]})}const Zh=document.getElementById("root");if(!Zh)throw new Error("missing #root");wy.createRoot(Zh).render(s.jsx(A.StrictMode,{children:s.jsx(W0,{})}));export{I0 as F,by as f,s as j,A as r};