@ouro.bot/cli 0.1.0-alpha.455 → 0.1.0-alpha.457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.json +16 -0
- package/dist/heart/daemon/cli-exec.js +16 -7
- package/dist/heart/daemon/cli-help.js +4 -4
- package/dist/heart/daemon/cli-parse.js +75 -12
- package/dist/heart/daemon/sense-manager.js +1 -1
- package/dist/mailroom/reader.js +1 -1
- package/dist/mind/prompt.js +4 -3
- package/dist/outlook-ui/assets/{index-BSNvyKGt.js → index-BBM5EysT.js} +14 -14
- package/dist/outlook-ui/index.html +1 -1
- package/dist/senses/mail.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function x2(n,a){for(var s=0;s<a.length;s++){const r=a[s];if(typeof r!="string"&&!Array.isArray(r)){for(const u in r)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(r,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>r[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();function y2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var uf={exports:{}},Qs={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ function v2(n,a){for(var s=0;s<a.length;s++){const r=a[s];if(typeof r!="string"&
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var cv;function
|
|
9
|
+
*/var cv;function b2(){if(cv)return Qs;cv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(r,u,d){var h=null;if(d!==void 0&&(h=""+d),u.key!==void 0&&(h=""+u.key),"key"in u){d={};for(var p in u)p!=="key"&&(d[p]=u[p])}else d=u;return u=d.ref,{$$typeof:n,type:r,key:h,ref:u!==void 0?u:null,props:d}}return Qs.Fragment=a,Qs.jsx=s,Qs.jsxs=s,Qs}var fv;function S2(){return fv||(fv=1,uf.exports=b2()),uf.exports}var f=S2(),cf={exports:{}},fe={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ function v2(n,a){for(var s=0;s<a.length;s++){const r=a[s];if(typeof r!="string"&
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var dv;function
|
|
17
|
+
*/var dv;function w2(){if(dv)return fe;dv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function w(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,D={};function R(A,G,K){this.props=A,this.context=G,this.refs=D,this.updater=K||j}R.prototype.isReactComponent={},R.prototype.setState=function(A,G){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,G,"setState")},R.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function M(){}M.prototype=R.prototype;function z(A,G,K){this.props=A,this.context=G,this.refs=D,this.updater=K||j}var k=z.prototype=new M;k.constructor=z,E(k,R.prototype),k.isPureReactComponent=!0;var U=Array.isArray;function P(){}var F={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function re(A,G,K){var I=K.ref;return{$$typeof:n,type:A,key:G,ref:I!==void 0?I:null,props:K}}function B(A,G){return re(A.type,G,A.props)}function Z(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function ie(A){var G={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(K){return G[K]})}var le=/\/+/g;function Se(A,G){return typeof A=="object"&&A!==null&&A.key!=null?ie(""+A.key):G.toString(36)}function De(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(P,P):(A.status="pending",A.then(function(G){A.status==="pending"&&(A.status="fulfilled",A.value=G)},function(G){A.status==="pending"&&(A.status="rejected",A.reason=G)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function $(A,G,K,I,ue){var pe=typeof A;(pe==="undefined"||pe==="boolean")&&(A=null);var Te=!1;if(A===null)Te=!0;else switch(pe){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(A.$$typeof){case n:case a:Te=!0;break;case x:return Te=A._init,$(Te(A._payload),G,K,I,ue)}}if(Te)return ue=ue(A),Te=I===""?"."+Se(A,0):I,U(ue)?(K="",Te!=null&&(K=Te.replace(le,"$&/")+"/"),$(ue,G,K,"",function(ns){return ns})):ue!=null&&(Z(ue)&&(ue=B(ue,K+(ue.key==null||A&&A.key===ue.key?"":(""+ue.key).replace(le,"$&/")+"/")+Te)),G.push(ue)),1;Te=0;var Ze=I===""?".":I+":";if(U(A))for(var Le=0;Le<A.length;Le++)I=A[Le],pe=Ze+Se(I,Le),Te+=$(I,G,K,pe,ue);else if(Le=w(A),typeof Le=="function")for(A=Le.call(A),Le=0;!(I=A.next()).done;)I=I.value,pe=Ze+Se(I,Le++),Te+=$(I,G,K,pe,ue);else if(pe==="object"){if(typeof A.then=="function")return $(De(A),G,K,I,ue);throw G=String(A),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(A,G,K){if(A==null)return A;var I=[],ue=0;return $(A,I,"","",function(pe){return G.call(K,pe,ue++)}),I}function J(A){if(A._status===-1){var G=A._result;G=G(),G.then(function(K){(A._status===0||A._status===-1)&&(A._status=1,A._result=K)},function(K){(A._status===0||A._status===-1)&&(A._status=2,A._result=K)}),A._status===-1&&(A._status=0,A._result=G)}if(A._status===1)return A._result.default;throw A._result}var oe=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},me={map:Q,forEach:function(A,G,K){Q(A,function(){G.apply(this,arguments)},K)},count:function(A){var G=0;return Q(A,function(){G++}),G},toArray:function(A){return Q(A,function(G){return G})||[]},only:function(A){if(!Z(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return fe.Activity=y,fe.Children=me,fe.Component=R,fe.Fragment=s,fe.Profiler=u,fe.PureComponent=z,fe.StrictMode=r,fe.Suspense=m,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,fe.__COMPILER_RUNTIME={__proto__:null,c:function(A){return F.H.useMemoCache(A)}},fe.cache=function(A){return function(){return A.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(A,G,K){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var I=E({},A.props),ue=A.key;if(G!=null)for(pe in G.key!==void 0&&(ue=""+G.key),G)!W.call(G,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&G.ref===void 0||(I[pe]=G[pe]);var pe=arguments.length-2;if(pe===1)I.children=K;else if(1<pe){for(var Te=Array(pe),Ze=0;Ze<pe;Ze++)Te[Ze]=arguments[Ze+2];I.children=Te}return re(A.type,ue,I)},fe.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},fe.createElement=function(A,G,K){var I,ue={},pe=null;if(G!=null)for(I in G.key!==void 0&&(pe=""+G.key),G)W.call(G,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ue[I]=G[I]);var Te=arguments.length-2;if(Te===1)ue.children=K;else if(1<Te){for(var Ze=Array(Te),Le=0;Le<Te;Le++)Ze[Le]=arguments[Le+2];ue.children=Ze}if(A&&A.defaultProps)for(I in Te=A.defaultProps,Te)ue[I]===void 0&&(ue[I]=Te[I]);return re(A,pe,ue)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(A){return{$$typeof:p,render:A}},fe.isValidElement=Z,fe.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:J}},fe.memo=function(A,G){return{$$typeof:g,type:A,compare:G===void 0?null:G}},fe.startTransition=function(A){var G=F.T,K={};F.T=K;try{var I=A(),ue=F.S;ue!==null&&ue(K,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(P,oe)}catch(pe){oe(pe)}finally{G!==null&&K.types!==null&&(G.types=K.types),F.T=G}},fe.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},fe.use=function(A){return F.H.use(A)},fe.useActionState=function(A,G,K){return F.H.useActionState(A,G,K)},fe.useCallback=function(A,G){return F.H.useCallback(A,G)},fe.useContext=function(A){return F.H.useContext(A)},fe.useDebugValue=function(){},fe.useDeferredValue=function(A,G){return F.H.useDeferredValue(A,G)},fe.useEffect=function(A,G){return F.H.useEffect(A,G)},fe.useEffectEvent=function(A){return F.H.useEffectEvent(A)},fe.useId=function(){return F.H.useId()},fe.useImperativeHandle=function(A,G,K){return F.H.useImperativeHandle(A,G,K)},fe.useInsertionEffect=function(A,G){return F.H.useInsertionEffect(A,G)},fe.useLayoutEffect=function(A,G){return F.H.useLayoutEffect(A,G)},fe.useMemo=function(A,G){return F.H.useMemo(A,G)},fe.useOptimistic=function(A,G){return F.H.useOptimistic(A,G)},fe.useReducer=function(A,G,K){return F.H.useReducer(A,G,K)},fe.useRef=function(A){return F.H.useRef(A)},fe.useState=function(A){return F.H.useState(A)},fe.useSyncExternalStore=function(A,G,K){return F.H.useSyncExternalStore(A,G,K)},fe.useTransition=function(){return F.H.useTransition()},fe.version="19.2.4",fe}var hv;function Mo(){return hv||(hv=1,cf.exports=w2()),cf.exports}var T=Mo();const ce=y2(T),mv=x2({__proto__:null,default:ce},[T]);var ff={exports:{}},Ps={},df={exports:{}},hf={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ function v2(n,a){for(var s=0;s<a.length;s++){const r=a[s];if(typeof r!="string"&
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var pv;function
|
|
25
|
+
*/var pv;function T2(){return pv||(pv=1,(function(n){function a($,Q){var J=$.length;$.push(Q);e:for(;0<J;){var oe=J-1>>>1,me=$[oe];if(0<u(me,Q))$[oe]=Q,$[J]=me,J=oe;else break e}}function s($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var Q=$[0],J=$.pop();if(J!==Q){$[0]=J;e:for(var oe=0,me=$.length,A=me>>>1;oe<A;){var G=2*(oe+1)-1,K=$[G],I=G+1,ue=$[I];if(0>u(K,J))I<me&&0>u(ue,K)?($[oe]=ue,$[I]=J,oe=I):($[oe]=K,$[G]=J,oe=G);else if(I<me&&0>u(ue,J))$[oe]=ue,$[I]=J,oe=I;else break e}}return Q}function u($,Q){var J=$.sortIndex-Q.sortIndex;return J!==0?J:$.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var m=[],g=[],x=1,y=null,S=3,w=!1,j=!1,E=!1,D=!1,R=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function k($){for(var Q=s(g);Q!==null;){if(Q.callback===null)r(g);else if(Q.startTime<=$)r(g),Q.sortIndex=Q.expirationTime,a(m,Q);else break;Q=s(g)}}function U($){if(E=!1,k($),!j)if(s(m)!==null)j=!0,P||(P=!0,ie());else{var Q=s(g);Q!==null&&De(U,Q.startTime-$)}}var P=!1,F=-1,W=5,re=-1;function B(){return D?!0:!(n.unstable_now()-re<W)}function Z(){if(D=!1,P){var $=n.unstable_now();re=$;var Q=!0;try{e:{j=!1,E&&(E=!1,M(F),F=-1),w=!0;var J=S;try{t:{for(k($),y=s(m);y!==null&&!(y.expirationTime>$&&B());){var oe=y.callback;if(typeof oe=="function"){y.callback=null,S=y.priorityLevel;var me=oe(y.expirationTime<=$);if($=n.unstable_now(),typeof me=="function"){y.callback=me,k($),Q=!0;break t}y===s(m)&&r(m),k($)}else r(m);y=s(m)}if(y!==null)Q=!0;else{var A=s(g);A!==null&&De(U,A.startTime-$),Q=!1}}break e}finally{y=null,S=J,w=!1}Q=void 0}}finally{Q?ie():P=!1}}}var ie;if(typeof z=="function")ie=function(){z(Z)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,Se=le.port2;le.port1.onmessage=Z,ie=function(){Se.postMessage(null)}}else ie=function(){R(Z,0)};function De($,Q){F=R(function(){$(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function($){$.callback=null},n.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<$?Math.floor(1e3/$):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function($){switch(S){case 1:case 2:case 3:var Q=3;break;default:Q=S}var J=S;S=Q;try{return $()}finally{S=J}},n.unstable_requestPaint=function(){D=!0},n.unstable_runWithPriority=function($,Q){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var J=S;S=$;try{return Q()}finally{S=J}},n.unstable_scheduleCallback=function($,Q,J){var oe=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?oe+J:oe):J=oe,$){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=J+me,$={id:x++,callback:Q,priorityLevel:$,startTime:J,expirationTime:me,sortIndex:-1},J>oe?($.sortIndex=J,a(g,$),s(m)===null&&$===s(g)&&(E?(M(F),F=-1):E=!0,De(U,J-oe))):($.sortIndex=me,a(m,$),j||w||(j=!0,P||(P=!0,ie()))),$},n.unstable_shouldYield=B,n.unstable_wrapCallback=function($){var Q=S;return function(){var J=S;S=Q;try{return $.apply(this,arguments)}finally{S=J}}}})(hf)),hf}var gv;function j2(){return gv||(gv=1,df.exports=T2()),df.exports}var mf={exports:{}},ht={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ function v2(n,a){for(var s=0;s<a.length;s++){const r=a[s];if(typeof r!="string"&
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var vv;function
|
|
33
|
+
*/var vv;function E2(){if(vv)return ht;vv=1;var n=Mo();function a(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(a(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},u=Symbol.for("react.portal");function d(m,g,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:y==null?null:""+y,children:m,containerInfo:g,implementation:x}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ht.createPortal=function(m,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return d(m,g,null,x)},ht.flushSync=function(m){var g=h.T,x=r.p;try{if(h.T=null,r.p=2,m)return m()}finally{h.T=g,r.p=x,r.d.f()}},ht.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(m,g))},ht.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},ht.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var x=g.as,y=p(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?r.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:w}):x==="script"&&r.d.X(m,{crossOrigin:y,integrity:S,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ht.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=p(g.as,g.crossOrigin);r.d.M(m,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(m)},ht.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,y=p(x,g.crossOrigin);r.d.L(m,x,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ht.preloadModule=function(m,g){if(typeof m=="string")if(g){var x=p(g.as,g.crossOrigin);r.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(m)},ht.requestFormReset=function(m){r.d.r(m)},ht.unstable_batchedUpdates=function(m,g){return m(g)},ht.useFormState=function(m,g,x){return h.H.useFormState(m,g,x)},ht.useFormStatus=function(){return h.H.useHostTransitionStatus()},ht.version="19.2.4",ht}var xv;function sx(){if(xv)return mf.exports;xv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),mf.exports=E2(),mf.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,18 +38,18 @@ function v2(n,a){for(var s=0;s<a.length;s++){const r=a[s];if(typeof r!="string"&
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var yv;function
|
|
41
|
+
*/var yv;function N2(){if(yv)return Ps;yv=1;var n=j2(),a=Mo(),s=sx();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function h(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 p(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 m(e){if(d(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var i=e,l=t;;){var o=i.return;if(o===null)break;var c=o.alternate;if(c===null){if(l=o.return,l!==null){i=l;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===i)return m(o),e;if(c===l)return m(o),t;c=c.sibling}throw Error(r(188))}if(i.return!==l.return)i=o,l=c;else{for(var v=!1,b=o.child;b;){if(b===i){v=!0,i=o,l=c;break}if(b===l){v=!0,l=o,i=c;break}b=b.sibling}if(!v){for(b=c.child;b;){if(b===i){v=!0,i=c,l=o;break}if(b===l){v=!0,l=c,i=o;break}b=b.sibling}if(!v)throw Error(r(189))}}if(i.alternate!==l)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),z=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function Se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case R:return"Profiler";case D:return"StrictMode";case U:return"Suspense";case P:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case z:return e.displayName||"Context";case M:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:Se(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}var De=Array.isArray,$=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},oe=[],me=-1;function A(e){return{current:e}}function G(e){0>me||(e.current=oe[me],oe[me]=null,me--)}function K(e,t){me++,oe[me]=e.current,e.current=t}var I=A(null),ue=A(null),pe=A(null),Te=A(null);function Ze(e,t){switch(K(pe,t),K(ue,e),K(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?zg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=zg(t),e=kg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(I),K(I,e)}function Le(){G(I),G(ue),G(pe)}function ns(e){e.memoizedState!==null&&K(Te,e);var t=I.current,i=kg(t,e.type);t!==i&&(K(ue,e),K(I,i))}function Dl(e){ue.current===e&&(G(I),G(ue)),Te.current===e&&(G(Te),Xs._currentValue=J)}var Go,uh;function wa(e){if(Go===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Go=t&&t[1]||"",uh=-1<i.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
43
|
`+Go+e+uh}var Xo=!1;function Ko(e,t){if(!e||Xo)return"";Xo=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(H){var _=H}Reflect.construct(e,[],X)}else{try{X.call()}catch(H){_=H}e.call(X.prototype)}}else{try{throw Error()}catch(H){_=H}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(H){if(H&&_&&typeof H.stack=="string")return[H.stack,_.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),v=c[0],b=c[1];if(v&&b){var N=v.split(`
|
|
44
|
-
`),
|
|
45
|
-
`);for(o=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;o<
|
|
46
|
-
`+N[l].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=l&&0<=o);break}}}finally{Xo=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?wa(i):""}function
|
|
44
|
+
`),V=b.split(`
|
|
45
|
+
`);for(o=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;o<V.length&&!V[o].includes("DetermineComponentFrameRoot");)o++;if(l===N.length||o===V.length)for(l=N.length-1,o=V.length-1;1<=l&&0<=o&&N[l]!==V[o];)o--;for(;1<=l&&0<=o;l--,o--)if(N[l]!==V[o]){if(l!==1||o!==1)do if(l--,o--,0>o||N[l]!==V[o]){var q=`
|
|
46
|
+
`+N[l].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=l&&0<=o);break}}}finally{Xo=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?wa(i):""}function Qb(e,t){switch(e.tag){case 26:case 27:case 5:return wa(e.type);case 16:return wa("Lazy");case 13:return e.child!==t&&t!==null?wa("Suspense Fallback"):wa("Suspense");case 19:return wa("SuspenseList");case 0:case 15:return Ko(e.type,!1);case 11:return Ko(e.type.render,!1);case 1:return Ko(e.type,!0);case 31:return wa("Activity");default:return""}}function ch(e){try{var t="",i=null;do t+=Qb(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
47
|
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var Fo=Object.prototype.hasOwnProperty,Zo=n.unstable_scheduleCallback,Qo=n.unstable_cancelCallback,Qb=n.unstable_shouldYield,Pb=n.unstable_requestPaint,Ct=n.unstable_now,Jb=n.unstable_getCurrentPriorityLevel,fh=n.unstable_ImmediatePriority,dh=n.unstable_UserBlockingPriority,Ol=n.unstable_NormalPriority,Wb=n.unstable_LowPriority,hh=n.unstable_IdlePriority,Ib=n.log,e1=n.unstable_setDisableYieldValue,as=null,Mt=null;function Bn(e){if(typeof Ib=="function"&&e1(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(as,e)}catch{}}var Dt=Math.clz32?Math.clz32:a1,t1=Math.log,n1=Math.LN2;function a1(e){return e>>>=0,e===0?32:31-(t1(e)/n1|0)|0}var Rl=256,zl=262144,kl=4194304;function Ta(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 Ll(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var o=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~c,l!==0?o=Ta(l):(v&=b,v!==0?o=Ta(v):i||(i=b&~e,i!==0&&(o=Ta(i))))):(b=l&~c,b!==0?o=Ta(b):v!==0?o=Ta(v):i||(i=l&~e,i!==0&&(o=Ta(i)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,i=t&-t,c>=i||c===32&&(i&4194048)!==0)?t:o}function is(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function i1(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 mh(){var e=kl;return kl<<=1,(kl&62914560)===0&&(kl=4194304),e}function Po(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ss(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function s1(e,t,i,l,o,c){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,N=e.expirationTimes,L=e.hiddenUpdates;for(i=v&~i;0<i;){var q=31-Dt(i),X=1<<q;b[q]=0,N[q]=-1;var _=L[q];if(_!==null)for(L[q]=null,q=0;q<_.length;q++){var H=_[q];H!==null&&(H.lane&=-536870913)}i&=~X}l!==0&&ph(e,l,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(v&~t))}function ph(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Dt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function gh(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Dt(i),o=1<<l;o&t|e[l]&t&&(e[l]|=t),i&=~o}}function vh(e,t){var i=t&-t;return i=(i&42)!==0?1:Jo(i),(i&(e.suspendedLanes|t))!==0?0:i}function Jo(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 Wo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function xh(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:av(e.type))}function yh(e,t){var i=Q.p;try{return Q.p=e,t()}finally{Q.p=i}}var Hn=Math.random().toString(36).slice(2),st="__reactFiber$"+Hn,yt="__reactProps$"+Hn,ni="__reactContainer$"+Hn,Io="__reactEvents$"+Hn,l1="__reactListeners$"+Hn,r1="__reactHandles$"+Hn,bh="__reactResources$"+Hn,ls="__reactMarker$"+Hn;function eu(e){delete e[st],delete e[yt],delete e[Io],delete e[l1],delete e[r1]}function ai(e){var t=e[st];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ni]||i[st]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=$g(e);e!==null;){if(i=e[st])return i;e=$g(e)}return t}e=i,i=e.parentNode}return null}function ii(e){if(e=e[st]||e[ni]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function si(e){var t=e[bh];return t||(t=e[bh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[ls]=!0}var Sh=new Set,wh={};function ja(e,t){li(e,t),li(e+"Capture",t)}function li(e,t){for(wh[e]=t,e=0;e<t.length;e++)Sh.add(t[e])}var o1=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]*$"),Th={},jh={};function u1(e){return Fo.call(jh,e)?!0:Fo.call(Th,e)?!1:o1.test(e)?jh[e]=!0:(Th[e]=!0,!1)}function Vl(e,t,i){if(u1(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){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,""+i)}}function _l(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function vn(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}function Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function c1(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(v){i=""+v,c.call(this,v)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tu(e){if(!e._valueTracker){var t=Eh(e)?"checked":"value";e._valueTracker=c1(e,t,""+e[t])}}function Nh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=Eh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function Ul(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 f1=/[\n"\\]/g;function Ht(e){return e.replace(f1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nu(e,t,i,l,o,c,v,b){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?au(e,v,Bt(t)):i!=null?au(e,v,Bt(i)):l!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Bt(b):e.removeAttribute("name")}function Ah(e,t,i,l,o,c,v,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||i!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){tu(e);return}i=i!=null?""+Bt(i):"",t=t!=null?""+Bt(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=b?e.checked:!!l,e.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),tu(e)}function au(e,t,i){t==="number"&&Ul(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ri(e,t,i,l){if(e=e.options,t){t={};for(var o=0;o<i.length;o++)t["$"+i[o]]=!0;for(i=0;i<e.length;i++)o=t.hasOwnProperty("$"+e[i].value),e[i].selected!==o&&(e[i].selected=o),o&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Bt(i),t=null,o=0;o<e.length;o++){if(e[o].value===i){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ch(e,t,i){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Bt(i):""}function Mh(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(r(92));if(De(l)){if(1<l.length)throw Error(r(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=Bt(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),tu(e)}function oi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var d1=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 Dh(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||d1.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Oh(e,t,i){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&i[o]!==l&&Dh(e,o,l)}else for(var c in t)t.hasOwnProperty(c)&&Dh(e,c,t[c])}function iu(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 h1=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"]]),m1=/^[\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 Bl(e){return m1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xn(){}var su=null;function lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,ci=null;function Rh(e){var t=ii(e);if(t&&(e=t.stateNode)){var i=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(nu(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var o=l[yt]||null;if(!o)throw Error(r(90));nu(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&Nh(l)}break e;case"textarea":Ch(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ri(e,!!i.multiple,t,!1)}}}var ru=!1;function zh(e,t,i){if(ru)return e(t,i);ru=!0;try{var l=e(t);return l}finally{if(ru=!1,(ui!==null||ci!==null)&&(Nr(),ui&&(t=ui,e=ci,ci=ui=null,Rh(t),e)))for(t=0;t<e.length;t++)Rh(e[t])}}function os(e,t){var i=e.stateNode;if(i===null)return null;var l=i[yt]||null;if(l===null)return null;i=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(i&&typeof i!="function")throw Error(r(231,t,typeof i));return i}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ou=!1;if(yn)try{var us={};Object.defineProperty(us,"passive",{get:function(){ou=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{ou=!1}var $n=null,uu=null,Hl=null;function kh(){if(Hl)return Hl;var e,t=uu,i=t.length,l,o="value"in $n?$n.value:$n.textContent,c=o.length;for(e=0;e<i&&t[e]===o[e];e++);var v=i-e;for(l=1;l<=v&&t[i-l]===o[c-l];l++);return Hl=o.slice(e,1<l?1-l:void 0)}function $l(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 ql(){return!0}function Lh(){return!1}function bt(e){function t(i,l,o,c,v){this._reactName=i,this._targetInst=o,this.type=l,this.nativeEvent=c,this.target=v,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ql:Lh,this.isPropagationStopped=Lh,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yl=bt(Ea),cs=y({},Ea,{view:0,detail:0}),p1=bt(cs),cu,fu,fs,Gl=y({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==fs&&(fs&&e.type==="mousemove"?(cu=e.screenX-fs.screenX,fu=e.screenY-fs.screenY):fu=cu=0,fs=e),cu)},movementY:function(e){return"movementY"in e?e.movementY:fu}}),Vh=bt(Gl),g1=y({},Gl,{dataTransfer:0}),v1=bt(g1),x1=y({},cs,{relatedTarget:0}),du=bt(x1),y1=y({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),b1=bt(y1),S1=y({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),w1=bt(S1),T1=y({},Ea,{data:0}),_h=bt(T1),j1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E1={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"},N1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function A1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=N1[e])?!!t[e]:!1}function hu(){return A1}var C1=y({},cs,{key:function(e){if(e.key){var t=j1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$l(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?$l(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$l(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),M1=bt(C1),D1=y({},Gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uh=bt(D1),O1=y({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),R1=bt(O1),z1=y({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),k1=bt(z1),L1=y({},Gl,{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}),V1=bt(L1),_1=y({},Ea,{newState:0,oldState:0}),U1=bt(_1),B1=[9,13,27,32],mu=yn&&"CompositionEvent"in window,ds=null;yn&&"documentMode"in document&&(ds=document.documentMode);var H1=yn&&"TextEvent"in window&&!ds,Bh=yn&&(!mu||ds&&8<ds&&11>=ds),Hh=" ",$h=!1;function qh(e,t){switch(e){case"keyup":return B1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function $1(e,t){switch(e){case"compositionend":return Yh(t);case"keypress":return t.which!==32?null:($h=!0,Hh);case"textInput":return e=t.data,e===Hh&&$h?null:e;default:return null}}function q1(e,t){if(fi)return e==="compositionend"||!mu&&qh(e,t)?(e=kh(),Hl=uu=$n=null,fi=!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 Bh&&t.locale!=="ko"?null:t.data;default:return null}}var Y1={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 Gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Y1[e.type]:t==="textarea"}function Xh(e,t,i,l){ui?ci?ci.push(l):ci=[l]:ui=l,t=zr(t,"onChange"),0<t.length&&(i=new Yl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var hs=null,ms=null;function G1(e){Ag(e,0)}function Xl(e){var t=rs(e);if(Nh(t))return e}function Kh(e,t){if(e==="change")return t}var Fh=!1;if(yn){var pu;if(yn){var gu="oninput"in document;if(!gu){var Zh=document.createElement("div");Zh.setAttribute("oninput","return;"),gu=typeof Zh.oninput=="function"}pu=gu}else pu=!1;Fh=pu&&(!document.documentMode||9<document.documentMode)}function Qh(){hs&&(hs.detachEvent("onpropertychange",Ph),ms=hs=null)}function Ph(e){if(e.propertyName==="value"&&Xl(ms)){var t=[];Xh(t,ms,e,lu(e)),zh(G1,t)}}function X1(e,t,i){e==="focusin"?(Qh(),hs=t,ms=i,hs.attachEvent("onpropertychange",Ph)):e==="focusout"&&Qh()}function K1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xl(ms)}function F1(e,t){if(e==="click")return Xl(t)}function Z1(e,t){if(e==="input"||e==="change")return Xl(t)}function Q1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:Q1;function ps(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var o=i[l];if(!Fo.call(t,o)||!Ot(e[o],t[o]))return!1}return!0}function Jh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wh(e,t){var i=Jh(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Jh(i)}}function Ih(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ih(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function em(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ul(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Ul(e.document)}return t}function vu(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 P1=yn&&"documentMode"in document&&11>=document.documentMode,di=null,xu=null,gs=null,yu=!1;function tm(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;yu||di==null||di!==Ul(l)||(l=di,"selectionStart"in l&&vu(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}),gs&&ps(gs,l)||(gs=l,l=zr(xu,"onSelect"),0<l.length&&(t=new Yl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=di)))}function Na(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var hi={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionrun:Na("Transition","TransitionRun"),transitionstart:Na("Transition","TransitionStart"),transitioncancel:Na("Transition","TransitionCancel"),transitionend:Na("Transition","TransitionEnd")},bu={},nm={};yn&&(nm=document.createElement("div").style,"AnimationEvent"in window||(delete hi.animationend.animation,delete hi.animationiteration.animation,delete hi.animationstart.animation),"TransitionEvent"in window||delete hi.transitionend.transition);function Aa(e){if(bu[e])return bu[e];if(!hi[e])return e;var t=hi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in nm)return bu[e]=t[i];return e}var am=Aa("animationend"),im=Aa("animationiteration"),sm=Aa("animationstart"),J1=Aa("transitionrun"),W1=Aa("transitionstart"),I1=Aa("transitioncancel"),lm=Aa("transitionend"),rm=new Map,Su="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(" ");Su.push("scrollEnd");function Wt(e,t){rm.set(e,t),ja(t,[e])}var Kl=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=[],mi=0,wu=0;function Fl(){for(var e=mi,t=wu=mi=0;t<e;){var i=$t[t];$t[t++]=null;var l=$t[t];$t[t++]=null;var o=$t[t];$t[t++]=null;var c=$t[t];if($t[t++]=null,l!==null&&o!==null){var v=l.pending;v===null?o.next=o:(o.next=v.next,v.next=o),l.pending=o}c!==0&&om(i,o,c)}}function Zl(e,t,i,l){$t[mi++]=e,$t[mi++]=t,$t[mi++]=i,$t[mi++]=l,wu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Tu(e,t,i,l){return Zl(e,t,i,l),Ql(e)}function Ca(e,t){return Zl(e,null,null,t),Ql(e)}function om(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var o=!1,c=e.return;c!==null;)c.childLanes|=i,l=c.alternate,l!==null&&(l.childLanes|=i),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Dt(i),e=c.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=i|536870912),c):null}function Ql(e){if(50<Us)throw Us=0,Rc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function eS(e,t,i,l){this.tag=e,this.key=i,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 Rt(e,t,i,l){return new eS(e,t,i,l)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bn(e,t){var i=e.alternate;return i===null?(i=Rt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function um(e,t){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Pl(e,t,i,l,o,c){var v=0;if(l=e,typeof e=="function")ju(e)&&(v=1);else if(typeof e=="string")v=s2(e,i,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=Rt(31,i,t,o),e.elementType=re,e.lanes=c,e;case E:return Ma(i.children,o,c,t);case D:v=8,o|=24;break;case R:return e=Rt(12,i,t,o|2),e.elementType=R,e.lanes=c,e;case U:return e=Rt(13,i,t,o),e.elementType=U,e.lanes=c,e;case P:return e=Rt(19,i,t,o),e.elementType=P,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:v=10;break e;case M:v=9;break e;case z:v=11;break e;case F:v=14;break e;case W:v=16,l=null;break e}v=29,i=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Rt(v,i,t,o),t.elementType=e,t.type=l,t.lanes=c,t}function Ma(e,t,i,l){return e=Rt(7,e,l,t),e.lanes=i,e}function Eu(e,t,i){return e=Rt(6,e,null,t),e.lanes=i,e}function cm(e){var t=Rt(18,null,null,0);return t.stateNode=e,t}function Nu(e,t,i){return t=Rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fm=new WeakMap;function qt(e,t){if(typeof e=="object"&&e!==null){var i=fm.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ch(t)},fm.set(e,t),t)}return{value:e,source:t,stack:ch(t)}}var gi=[],vi=0,Jl=null,vs=0,Yt=[],Gt=0,qn=null,ln=1,rn="";function Sn(e,t){gi[vi++]=vs,gi[vi++]=Jl,Jl=e,vs=t}function dm(e,t,i){Yt[Gt++]=ln,Yt[Gt++]=rn,Yt[Gt++]=qn,qn=e;var l=ln;e=rn;var o=32-Dt(l)-1;l&=~(1<<o),i+=1;var c=32-Dt(t)+o;if(30<c){var v=o-o%5;c=(l&(1<<v)-1).toString(32),l>>=v,o-=v,ln=1<<32-Dt(t)+o|i<<o|l,rn=c+e}else ln=1<<c|i<<o|l,rn=e}function Au(e){e.return!==null&&(Sn(e,1),dm(e,1,0))}function Cu(e){for(;e===Jl;)Jl=gi[--vi],gi[vi]=null,vs=gi[--vi],gi[vi]=null;for(;e===qn;)qn=Yt[--Gt],Yt[Gt]=null,rn=Yt[--Gt],Yt[Gt]=null,ln=Yt[--Gt],Yt[Gt]=null}function hm(e,t){Yt[Gt++]=ln,Yt[Gt++]=rn,Yt[Gt++]=qn,ln=t.id,rn=t.overflow,qn=e}var lt=null,Ue=null,we=!1,Yn=null,Xt=!1,Mu=Error(r(519));function Gn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xs(qt(t,e)),Mu}function mm(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[st]=e,t[yt]=l,i){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(i=0;i<Hs.length;i++)ve(Hs[i],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),Ah(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),Mh(t,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||Og(t.textContent,i)?(l.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),l.onScroll!=null&&ve("scroll",t),l.onScrollEnd!=null&&ve("scrollend",t),l.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||Gn(e,!0)}function pm(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:lt=lt.return}}function xi(e){if(e!==lt)return!1;if(!we)return pm(e),we=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Fc(e.type,e.memoizedProps)),i=!i),i&&Ue&&Gn(e),pm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=Hg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=Hg(e)}else t===27?(t=Ue,ia(e.type)?(e=Wc,Wc=null,Ue=e):Ue=t):Ue=lt?Ft(e.stateNode.nextSibling):null;return!0}function Da(){Ue=lt=null,we=!1}function Du(){var e=Yn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),Yn=null),e}function xs(e){Yn===null?Yn=[e]:Yn.push(e)}var Ou=A(null),Oa=null,wn=null;function Xn(e,t,i){K(Ou,t._currentValue),t._currentValue=i}function Tn(e){e._currentValue=Ou.current,G(Ou)}function Ru(e,t,i){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===i)break;e=e.return}}function zu(e,t,i,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var v=o.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=o;for(var N=0;N<t.length;N++)if(b.context===t[N]){c.lanes|=i,b=c.alternate,b!==null&&(b.lanes|=i),Ru(c.return,i,e),l||(v=null);break e}c=b.next}}else if(o.tag===18){if(v=o.return,v===null)throw Error(r(341));v.lanes|=i,c=v.alternate,c!==null&&(c.lanes|=i),Ru(v,i,e),v=null}else v=o.child;if(v!==null)v.return=o;else for(v=o;v!==null;){if(v===e){v=null;break}if(o=v.sibling,o!==null){o.return=v.return,v=o;break}v=v.return}o=v}}function yi(e,t,i,l){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var v=o.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var b=o.type;Ot(o.pendingProps.value,v.value)||(e!==null?e.push(b):e=[b])}}else if(o===Te.current){if(v=o.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Xs):e=[Xs])}o=o.return}e!==null&&zu(t,e,i,l),t.flags|=262144}function Wl(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ra(e){Oa=e,wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rt(e){return gm(Oa,e)}function Il(e,t){return Oa===null&&Ra(e),gm(e,t)}function gm(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},wn===null){if(e===null)throw Error(r(308));wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wn=wn.next=t;return i}var tS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},nS=n.unstable_scheduleCallback,aS=n.unstable_NormalPriority,Qe={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ku(){return{controller:new tS,data:new Map,refCount:0}}function ys(e){e.refCount--,e.refCount===0&&nS(aS,function(){e.controller.abort()})}var bs=null,Lu=0,bi=0,Si=null;function iS(e,t){if(bs===null){var i=bs=[];Lu=0,bi=Uc(),Si={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Lu++,t.then(vm,vm),t}function vm(){if(--Lu===0&&bs!==null){Si!==null&&(Si.status="fulfilled");var e=bs;bs=null,bi=0,Si=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sS(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(o){i.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<i.length;o++)(0,i[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<i.length;o++)(0,i[o])(void 0)}),l}var xm=$.S;$.S=function(e,t){tg=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&iS(e,t),xm!==null&&xm(e,t)};var za=A(null);function Vu(){var e=za.current;return e!==null?e:Ve.pooledCache}function er(e,t){t===null?K(za,za.current):K(za,t.pool)}function ym(){var e=Vu();return e===null?null:{parent:Qe._currentValue,pool:e}}var wi=Error(r(460)),_u=Error(r(474)),tr=Error(r(542)),nr={then:function(){}};function bm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sm(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(xn,xn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Tm(e),e;default:if(typeof t.status=="string")t.then(xn,xn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Tm(e),e}throw La=t,wi}}function ka(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(La=i,wi):i}}var La=null;function wm(){if(La===null)throw Error(r(459));var e=La;return La=null,e}function Tm(e){if(e===wi||e===tr)throw Error(r(483))}var Ti=null,Ss=0;function ar(e){var t=Ss;return Ss+=1,Ti===null&&(Ti=[]),Sm(Ti,e,t)}function ws(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ir(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jm(e){function t(O,C){if(e){var k=O.deletions;k===null?(O.deletions=[C],O.flags|=16):k.push(C)}}function i(O,C){if(!e)return null;for(;C!==null;)t(O,C),C=C.sibling;return null}function l(O){for(var C=new Map;O!==null;)O.key!==null?C.set(O.key,O):C.set(O.index,O),O=O.sibling;return C}function o(O,C){return O=bn(O,C),O.index=0,O.sibling=null,O}function c(O,C,k){return O.index=k,e?(k=O.alternate,k!==null?(k=k.index,k<C?(O.flags|=67108866,C):k):(O.flags|=67108866,C)):(O.flags|=1048576,C)}function v(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,C,k,Y){return C===null||C.tag!==6?(C=Eu(k,O.mode,Y),C.return=O,C):(C=o(C,k),C.return=O,C)}function N(O,C,k,Y){var ae=k.type;return ae===E?q(O,C,k.props.children,Y,k.key):C!==null&&(C.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===W&&ka(ae)===C.type)?(C=o(C,k.props),ws(C,k),C.return=O,C):(C=Pl(k.type,k.key,k.props,null,O.mode,Y),ws(C,k),C.return=O,C)}function L(O,C,k,Y){return C===null||C.tag!==4||C.stateNode.containerInfo!==k.containerInfo||C.stateNode.implementation!==k.implementation?(C=Nu(k,O.mode,Y),C.return=O,C):(C=o(C,k.children||[]),C.return=O,C)}function q(O,C,k,Y,ae){return C===null||C.tag!==7?(C=Ma(k,O.mode,Y,ae),C.return=O,C):(C=o(C,k),C.return=O,C)}function X(O,C,k){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Eu(""+C,O.mode,k),C.return=O,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case T:return k=Pl(C.type,C.key,C.props,null,O.mode,k),ws(k,C),k.return=O,k;case j:return C=Nu(C,O.mode,k),C.return=O,C;case W:return C=ka(C),X(O,C,k)}if(De(C)||ie(C))return C=Ma(C,O.mode,k,null),C.return=O,C;if(typeof C.then=="function")return X(O,ar(C),k);if(C.$$typeof===V)return X(O,Il(O,C),k);ir(O,C)}return null}function _(O,C,k,Y){var ae=C!==null?C.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return ae!==null?null:b(O,C,""+k,Y);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case T:return k.key===ae?N(O,C,k,Y):null;case j:return k.key===ae?L(O,C,k,Y):null;case W:return k=ka(k),_(O,C,k,Y)}if(De(k)||ie(k))return ae!==null?null:q(O,C,k,Y,null);if(typeof k.then=="function")return _(O,C,ar(k),Y);if(k.$$typeof===V)return _(O,C,Il(O,k),Y);ir(O,k)}return null}function H(O,C,k,Y,ae){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(k)||null,b(C,O,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case T:return O=O.get(Y.key===null?k:Y.key)||null,N(C,O,Y,ae);case j:return O=O.get(Y.key===null?k:Y.key)||null,L(C,O,Y,ae);case W:return Y=ka(Y),H(O,C,k,Y,ae)}if(De(Y)||ie(Y))return O=O.get(k)||null,q(C,O,Y,ae,null);if(typeof Y.then=="function")return H(O,C,k,ar(Y),ae);if(Y.$$typeof===V)return H(O,C,k,Il(C,Y),ae);ir(C,Y)}return null}function ee(O,C,k,Y){for(var ae=null,je=null,ne=C,he=C=0,be=null;ne!==null&&he<k.length;he++){ne.index>he?(be=ne,ne=null):be=ne.sibling;var Ee=_(O,ne,k[he],Y);if(Ee===null){ne===null&&(ne=be);break}e&&ne&&Ee.alternate===null&&t(O,ne),C=c(Ee,C,he),je===null?ae=Ee:je.sibling=Ee,je=Ee,ne=be}if(he===k.length)return i(O,ne),we&&Sn(O,he),ae;if(ne===null){for(;he<k.length;he++)ne=X(O,k[he],Y),ne!==null&&(C=c(ne,C,he),je===null?ae=ne:je.sibling=ne,je=ne);return we&&Sn(O,he),ae}for(ne=l(ne);he<k.length;he++)be=H(ne,O,he,k[he],Y),be!==null&&(e&&be.alternate!==null&&ne.delete(be.key===null?he:be.key),C=c(be,C,he),je===null?ae=be:je.sibling=be,je=be);return e&&ne.forEach(function(ua){return t(O,ua)}),we&&Sn(O,he),ae}function se(O,C,k,Y){if(k==null)throw Error(r(151));for(var ae=null,je=null,ne=C,he=C=0,be=null,Ee=k.next();ne!==null&&!Ee.done;he++,Ee=k.next()){ne.index>he?(be=ne,ne=null):be=ne.sibling;var ua=_(O,ne,Ee.value,Y);if(ua===null){ne===null&&(ne=be);break}e&&ne&&ua.alternate===null&&t(O,ne),C=c(ua,C,he),je===null?ae=ua:je.sibling=ua,je=ua,ne=be}if(Ee.done)return i(O,ne),we&&Sn(O,he),ae;if(ne===null){for(;!Ee.done;he++,Ee=k.next())Ee=X(O,Ee.value,Y),Ee!==null&&(C=c(Ee,C,he),je===null?ae=Ee:je.sibling=Ee,je=Ee);return we&&Sn(O,he),ae}for(ne=l(ne);!Ee.done;he++,Ee=k.next())Ee=H(ne,O,he,Ee.value,Y),Ee!==null&&(e&&Ee.alternate!==null&&ne.delete(Ee.key===null?he:Ee.key),C=c(Ee,C,he),je===null?ae=Ee:je.sibling=Ee,je=Ee);return e&&ne.forEach(function(g2){return t(O,g2)}),we&&Sn(O,he),ae}function ze(O,C,k,Y){if(typeof k=="object"&&k!==null&&k.type===E&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case T:e:{for(var ae=k.key;C!==null;){if(C.key===ae){if(ae=k.type,ae===E){if(C.tag===7){i(O,C.sibling),Y=o(C,k.props.children),Y.return=O,O=Y;break e}}else if(C.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===W&&ka(ae)===C.type){i(O,C.sibling),Y=o(C,k.props),ws(Y,k),Y.return=O,O=Y;break e}i(O,C);break}else t(O,C);C=C.sibling}k.type===E?(Y=Ma(k.props.children,O.mode,Y,k.key),Y.return=O,O=Y):(Y=Pl(k.type,k.key,k.props,null,O.mode,Y),ws(Y,k),Y.return=O,O=Y)}return v(O);case j:e:{for(ae=k.key;C!==null;){if(C.key===ae)if(C.tag===4&&C.stateNode.containerInfo===k.containerInfo&&C.stateNode.implementation===k.implementation){i(O,C.sibling),Y=o(C,k.children||[]),Y.return=O,O=Y;break e}else{i(O,C);break}else t(O,C);C=C.sibling}Y=Nu(k,O.mode,Y),Y.return=O,O=Y}return v(O);case W:return k=ka(k),ze(O,C,k,Y)}if(De(k))return ee(O,C,k,Y);if(ie(k)){if(ae=ie(k),typeof ae!="function")throw Error(r(150));return k=ae.call(k),se(O,C,k,Y)}if(typeof k.then=="function")return ze(O,C,ar(k),Y);if(k.$$typeof===V)return ze(O,C,Il(O,k),Y);ir(O,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,C!==null&&C.tag===6?(i(O,C.sibling),Y=o(C,k),Y.return=O,O=Y):(i(O,C),Y=Eu(k,O.mode,Y),Y.return=O,O=Y),v(O)):i(O,C)}return function(O,C,k,Y){try{Ss=0;var ae=ze(O,C,k,Y);return Ti=null,ae}catch(ne){if(ne===wi||ne===tr)throw ne;var je=Rt(29,ne,null,O.mode);return je.lanes=Y,je.return=O,je}finally{}}}var Va=jm(!0),Em=jm(!1),Kn=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bu(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 Fn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Ql(e),om(e,null,i),t}return Zl(e,l,t,i),Ql(e)}function Ts(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,gh(e,i)}}function Hu(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var o=null,c=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};c===null?o=c=v:c=c.next=v,i=i.next}while(i!==null);c===null?o=c=t:c=c.next=t}else o=c=t;i={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var $u=!1;function js(){if($u){var e=Si;if(e!==null)throw e}}function Es(e,t,i,l){$u=!1;var o=e.updateQueue;Kn=!1;var c=o.firstBaseUpdate,v=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var N=b,L=N.next;N.next=null,v===null?c=L:v.next=L,v=N;var q=e.alternate;q!==null&&(q=q.updateQueue,b=q.lastBaseUpdate,b!==v&&(b===null?q.firstBaseUpdate=L:b.next=L,q.lastBaseUpdate=N))}if(c!==null){var X=o.baseState;v=0,q=L=N=null,b=c;do{var _=b.lane&-536870913,H=_!==b.lane;if(H?(ye&_)===_:(l&_)===_){_!==0&&_===bi&&($u=!0),q!==null&&(q=q.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ee=e,se=b;_=t;var ze=i;switch(se.tag){case 1:if(ee=se.payload,typeof ee=="function"){X=ee.call(ze,X,_);break e}X=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=se.payload,_=typeof ee=="function"?ee.call(ze,X,_):ee,_==null)break e;X=y({},X,_);break e;case 2:Kn=!0}}_=b.callback,_!==null&&(e.flags|=64,H&&(e.flags|=8192),H=o.callbacks,H===null?o.callbacks=[_]:H.push(_))}else H={lane:_,tag:b.tag,payload:b.payload,callback:b.callback,next:null},q===null?(L=q=H,N=X):q=q.next=H,v|=_;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;H=b,b=H.next,H.next=null,o.lastBaseUpdate=H,o.shared.pending=null}}while(!0);q===null&&(N=X),o.baseState=N,o.firstBaseUpdate=L,o.lastBaseUpdate=q,c===null&&(o.shared.lanes=0),In|=v,e.lanes=v,e.memoizedState=X}}function Nm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Am(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Nm(i[e],t)}var ji=A(null),sr=A(0);function Cm(e,t){e=Rn,K(sr,e),K(ji,t),Rn=e|t.baseLanes}function qu(){K(sr,Rn),K(ji,ji.current)}function Yu(){Rn=sr.current,G(ji),G(sr)}var zt=A(null),Kt=null;function Qn(e){var t=e.alternate;K(Xe,Xe.current&1),K(zt,e),Kt===null&&(t===null||ji.current!==null||t.memoizedState!==null)&&(Kt=e)}function Gu(e){K(Xe,Xe.current),K(zt,e),Kt===null&&(Kt=e)}function Mm(e){e.tag===22?(K(Xe,Xe.current),K(zt,e),Kt===null&&(Kt=e)):Pn()}function Pn(){K(Xe,Xe.current),K(zt,zt.current)}function kt(e){G(zt),Kt===e&&(Kt=null),G(Xe)}var Xe=A(0);function lr(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Pc(i)||Jc(i)))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 jn=0,de=null,Oe=null,Pe=null,rr=!1,Ei=!1,_a=!1,or=0,Ns=0,Ni=null,lS=0;function qe(){throw Error(r(321))}function Xu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ot(e[i],t[i]))return!1;return!0}function Ku(e,t,i,l,o,c){return jn=c,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?dp:rc,_a=!1,c=i(l,o),_a=!1,Ei&&(c=Om(t,i,l,o)),Dm(e),c}function Dm(e){$.H=Ms;var t=Oe!==null&&Oe.next!==null;if(jn=0,Pe=Oe=de=null,rr=!1,Ns=0,Ni=null,t)throw Error(r(300));e===null||Je||(e=e.dependencies,e!==null&&Wl(e)&&(Je=!0))}function Om(e,t,i,l){de=e;var o=0;do{if(Ei&&(Ni=null),Ns=0,Ei=!1,25<=o)throw Error(r(301));if(o+=1,Pe=Oe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}$.H=hp,c=t(i,l)}while(Ei);return c}function rS(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?As(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(de.flags|=1024),t}function Fu(){var e=or!==0;return or=0,e}function Zu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Qu(e){if(rr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}rr=!1}jn=0,Pe=Oe=de=null,Ei=!1,Ns=or=0,Ni=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?de.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function Ke(){if(Oe===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Pe===null?de.memoizedState:Pe.next;if(t!==null)Pe=t,Oe=e;else{if(e===null)throw de.alternate===null?Error(r(467)):Error(r(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Pe===null?de.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function ur(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function As(e){var t=Ns;return Ns+=1,Ni===null&&(Ni=[]),e=Sm(Ni,e,t),t=de,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?dp:rc),e}function cr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return As(e);if(e.$$typeof===V)return rt(e)}throw Error(r(438,String(e)))}function Pu(e){var t=null,i=de.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=de.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ur(),de.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=B;return t.index++,i}function En(e,t){return typeof t=="function"?t(e):t}function fr(e){var t=Ke();return Ju(t,Oe,e)}function Ju(e,t,i){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=i;var o=e.baseQueue,c=l.pending;if(c!==null){if(o!==null){var v=o.next;o.next=c.next,c.next=v}t.baseQueue=o=c,l.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var b=v=null,N=null,L=t,q=!1;do{var X=L.lane&-536870913;if(X!==L.lane?(ye&X)===X:(jn&X)===X){var _=L.revertLane;if(_===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),X===bi&&(q=!0);else if((jn&_)===_){L=L.next,_===bi&&(q=!0);continue}else X={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},N===null?(b=N=X,v=c):N=N.next=X,de.lanes|=_,In|=_;X=L.action,_a&&i(c,X),c=L.hasEagerState?L.eagerState:i(c,X)}else _={lane:X,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},N===null?(b=N=_,v=c):N=N.next=_,de.lanes|=X,In|=X;L=L.next}while(L!==null&&L!==t);if(N===null?v=c:N.next=b,!Ot(c,e.memoizedState)&&(Je=!0,q&&(i=Si,i!==null)))throw i;e.memoizedState=c,e.baseState=v,e.baseQueue=N,l.lastRenderedState=c}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Wu(e){var t=Ke(),i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var l=i.dispatch,o=i.pending,c=t.memoizedState;if(o!==null){i.pending=null;var v=o=o.next;do c=e(c,v.action),v=v.next;while(v!==o);Ot(c,t.memoizedState)||(Je=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),i.lastRenderedState=c}return[c,l]}function Rm(e,t,i){var l=de,o=Ke(),c=we;if(c){if(i===void 0)throw Error(r(407));i=i()}else i=t();var v=!Ot((Oe||o).memoizedState,i);if(v&&(o.memoizedState=i,Je=!0),o=o.queue,tc(Lm.bind(null,l,o,e),[e]),o.getSnapshot!==t||v||Pe!==null&&Pe.memoizedState.tag&1){if(l.flags|=2048,Ai(9,{destroy:void 0},km.bind(null,l,o,i,t),null),Ve===null)throw Error(r(349));c||(jn&127)!==0||zm(l,t,i)}return i}function zm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=de.updateQueue,t===null?(t=ur(),de.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function km(e,t,i,l){t.value=i,t.getSnapshot=l,Vm(t)&&_m(e)}function Lm(e,t,i){return i(function(){Vm(t)&&_m(e)})}function Vm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function _m(e){var t=Ca(e,2);t!==null&&Et(t,e,2)}function Iu(e){var t=mt();if(typeof e=="function"){var i=e;if(e=i(),_a){Bn(!0);try{i()}finally{Bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:e},t}function Um(e,t,i,l){return e.baseState=i,Ju(e,Oe,typeof l=="function"?l:En)}function oS(e,t,i,l,o){if(mr(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){c.listeners.push(v)}};$.T!==null?i(!0):c.isTransition=!1,l(c),i=t.pending,i===null?(c.next=t.pending=c,Bm(t,c)):(c.next=i.next,t.pending=i.next=c)}}function Bm(e,t){var i=t.action,l=t.payload,o=e.state;if(t.isTransition){var c=$.T,v={};$.T=v;try{var b=i(o,l),N=$.S;N!==null&&N(v,b),Hm(e,t,b)}catch(L){ec(e,t,L)}finally{c!==null&&v.types!==null&&(c.types=v.types),$.T=c}}else try{c=i(o,l),Hm(e,t,c)}catch(L){ec(e,t,L)}}function Hm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){$m(e,t,l)},function(l){return ec(e,t,l)}):$m(e,t,i)}function $m(e,t,i){t.status="fulfilled",t.value=i,qm(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Bm(e,i)))}function ec(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,qm(t),t=t.next;while(t!==l)}e.action=null}function qm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ym(e,t){return t}function Gm(e,t){if(we){var i=Ve.formState;if(i!==null){e:{var l=de;if(we){if(Ue){t:{for(var o=Ue,c=Xt;o.nodeType!==8;){if(!c){o=null;break t}if(o=Ft(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){Ue=Ft(o.nextSibling),l=o.data==="F!";break e}}Gn(l)}l=!1}l&&(t=i[0])}}return i=mt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ym,lastRenderedState:t},i.queue=l,i=up.bind(null,de,l),l.dispatch=i,l=Iu(!1),c=lc.bind(null,de,!1,l.queue),l=mt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,i=oS.bind(null,de,o,c,i),o.dispatch=i,l.memoizedState=e,[t,i,!1]}function Xm(e){var t=Ke();return Km(t,Oe,e)}function Km(e,t,i){if(t=Ju(e,t,Ym)[0],e=fr(En)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=As(t)}catch(v){throw v===wi?tr:v}else l=t;t=Ke();var o=t.queue,c=o.dispatch;return i!==t.memoizedState&&(de.flags|=2048,Ai(9,{destroy:void 0},uS.bind(null,o,i),null)),[l,c,e]}function uS(e,t){e.action=t}function Fm(e){var t=Ke(),i=Oe;if(i!==null)return Km(t,i,e);Ke(),t=t.memoizedState,i=Ke();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Ai(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=de.updateQueue,t===null&&(t=ur(),de.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Zm(){return Ke().memoizedState}function dr(e,t,i,l){var o=mt();de.flags|=e,o.memoizedState=Ai(1|t,{destroy:void 0},i,l===void 0?null:l)}function hr(e,t,i,l){var o=Ke();l=l===void 0?null:l;var c=o.memoizedState.inst;Oe!==null&&l!==null&&Xu(l,Oe.memoizedState.deps)?o.memoizedState=Ai(t,c,i,l):(de.flags|=e,o.memoizedState=Ai(1|t,c,i,l))}function Qm(e,t){dr(8390656,8,e,t)}function tc(e,t){hr(2048,8,e,t)}function cS(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=ur(),de.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Pm(e){var t=Ke().memoizedState;return cS({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jm(e,t){return hr(4,2,e,t)}function Wm(e,t){return hr(4,4,e,t)}function Im(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ep(e,t,i){i=i!=null?i.concat([e]):null,hr(4,4,Im.bind(null,t,e),i)}function nc(){}function tp(e,t){var i=Ke();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&Xu(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function np(e,t){var i=Ke();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&Xu(t,l[1]))return l[0];if(l=e(),_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[l,t],l}function ac(e,t,i){return i===void 0||(jn&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=ag(),de.lanes|=e,In|=e,i)}function ap(e,t,i,l){return Ot(i,t)?i:ji.current!==null?(e=ac(e,i,l),Ot(e,t)||(Je=!0),e):(jn&42)===0||(jn&1073741824)!==0&&(ye&261930)===0?(Je=!0,e.memoizedState=i):(e=ag(),de.lanes|=e,In|=e,t)}function ip(e,t,i,l,o){var c=Q.p;Q.p=c!==0&&8>c?c:8;var v=$.T,b={};$.T=b,lc(e,!1,t,i);try{var N=o(),L=$.S;if(L!==null&&L(b,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var q=sS(N,l);Cs(e,t,q,_t(e))}else Cs(e,t,l,_t(e))}catch(X){Cs(e,t,{then:function(){},status:"rejected",reason:X},_t())}finally{Q.p=c,v!==null&&b.types!==null&&(v.types=b.types),$.T=v}}function fS(){}function ic(e,t,i,l){if(e.tag!==5)throw Error(r(476));var o=sp(e).queue;ip(e,o,t,J,i===null?fS:function(){return lp(e),i(l)})}function sp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function lp(e){var t=sp(e);t.next===null&&(t=e.alternate.memoizedState),Cs(e,t.next.queue,{},_t())}function sc(){return rt(Xs)}function rp(){return Ke().memoizedState}function op(){return Ke().memoizedState}function dS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_t();e=Fn(i);var l=Zn(t,e,i);l!==null&&(Et(l,t,i),Ts(l,t,i)),t={cache:ku()},e.payload=t;return}t=t.return}}function hS(e,t,i){var l=_t();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},mr(e)?cp(t,i):(i=Tu(e,t,i,l),i!==null&&(Et(i,e,l),fp(i,t,l)))}function up(e,t,i){var l=_t();Cs(e,t,i,l)}function Cs(e,t,i,l){var o={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(mr(e))cp(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var v=t.lastRenderedState,b=c(v,i);if(o.hasEagerState=!0,o.eagerState=b,Ot(b,v))return Zl(e,t,o,0),Ve===null&&Fl(),!1}catch{}finally{}if(i=Tu(e,t,o,l),i!==null)return Et(i,e,l),fp(i,t,l),!0}return!1}function lc(e,t,i,l){if(l={lane:2,revertLane:Uc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},mr(e)){if(t)throw Error(r(479))}else t=Tu(e,i,l,2),t!==null&&Et(t,e,2)}function mr(e){var t=e.alternate;return e===de||t!==null&&t===de}function cp(e,t){Ei=rr=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function fp(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,gh(e,i)}}var Ms={readContext:rt,use:cr,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useLayoutEffect:qe,useInsertionEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useSyncExternalStore:qe,useId:qe,useHostTransitionStatus:qe,useFormState:qe,useActionState:qe,useOptimistic:qe,useMemoCache:qe,useCacheRefresh:qe};Ms.useEffectEvent=qe;var dp={readContext:rt,use:cr,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:Qm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,dr(4194308,4,Im.bind(null,t,e),i)},useLayoutEffect:function(e,t){return dr(4194308,4,e,t)},useInsertionEffect:function(e,t){dr(4,2,e,t)},useMemo:function(e,t){var i=mt();t=t===void 0?null:t;var l=e();if(_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=mt();if(i!==void 0){var o=i(t);if(_a){Bn(!0);try{i(t)}finally{Bn(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=hS.bind(null,de,e),[l.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Iu(e);var t=e.queue,i=up.bind(null,de,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:nc,useDeferredValue:function(e,t){var i=mt();return ac(i,e,t)},useTransition:function(){var e=Iu(!1);return e=ip.bind(null,de,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=de,o=mt();if(we){if(i===void 0)throw Error(r(407));i=i()}else{if(i=t(),Ve===null)throw Error(r(349));(ye&127)!==0||zm(l,t,i)}o.memoizedState=i;var c={value:i,getSnapshot:t};return o.queue=c,Qm(Lm.bind(null,l,c,e),[e]),l.flags|=2048,Ai(9,{destroy:void 0},km.bind(null,l,c,i,t),null),i},useId:function(){var e=mt(),t=Ve.identifierPrefix;if(we){var i=rn,l=ln;i=(l&~(1<<32-Dt(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=or++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=lS++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:sc,useFormState:Gm,useActionState:Gm,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=lc.bind(null,de,!0,i),i.dispatch=t,[e,t]},useMemoCache:Pu,useCacheRefresh:function(){return mt().memoizedState=dS.bind(null,de)},useEffectEvent:function(e){var t=mt(),i={impl:e};return t.memoizedState=i,function(){if((Ne&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},rc={readContext:rt,use:cr,useCallback:tp,useContext:rt,useEffect:tc,useImperativeHandle:ep,useInsertionEffect:Jm,useLayoutEffect:Wm,useMemo:np,useReducer:fr,useRef:Zm,useState:function(){return fr(En)},useDebugValue:nc,useDeferredValue:function(e,t){var i=Ke();return ap(i,Oe.memoizedState,e,t)},useTransition:function(){var e=fr(En)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:Rm,useId:rp,useHostTransitionStatus:sc,useFormState:Xm,useActionState:Xm,useOptimistic:function(e,t){var i=Ke();return Um(i,Oe,e,t)},useMemoCache:Pu,useCacheRefresh:op};rc.useEffectEvent=Pm;var hp={readContext:rt,use:cr,useCallback:tp,useContext:rt,useEffect:tc,useImperativeHandle:ep,useInsertionEffect:Jm,useLayoutEffect:Wm,useMemo:np,useReducer:Wu,useRef:Zm,useState:function(){return Wu(En)},useDebugValue:nc,useDeferredValue:function(e,t){var i=Ke();return Oe===null?ac(i,e,t):ap(i,Oe.memoizedState,e,t)},useTransition:function(){var e=Wu(En)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:Rm,useId:rp,useHostTransitionStatus:sc,useFormState:Fm,useActionState:Fm,useOptimistic:function(e,t){var i=Ke();return Oe!==null?Um(i,Oe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:op};hp.useEffectEvent=Pm;function oc(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:y({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var uc={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=_t(),o=Fn(l);o.payload=t,i!=null&&(o.callback=i),t=Zn(e,o,l),t!==null&&(Et(t,e,l),Ts(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=_t(),o=Fn(l);o.tag=1,o.payload=t,i!=null&&(o.callback=i),t=Zn(e,o,l),t!==null&&(Et(t,e,l),Ts(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),l=Fn(i);l.tag=2,t!=null&&(l.callback=t),t=Zn(e,l,i),t!==null&&(Et(t,e,i),Ts(t,e,i))}};function mp(e,t,i,l,o,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,v):t.prototype&&t.prototype.isPureReactComponent?!ps(i,l)||!ps(o,c):!0}function pp(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=y({},i));for(var o in e)i[o]===void 0&&(i[o]=e[o])}return i}function gp(e){Kl(e)}function vp(e){console.error(e)}function xp(e){Kl(e)}function pr(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function yp(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function cc(e,t,i){return i=Fn(i),i.tag=3,i.payload={element:null},i.callback=function(){pr(e,t)},i}function bp(e){return e=Fn(e),e.tag=3,e}function Sp(e,t,i,l){var o=i.type.getDerivedStateFromError;if(typeof o=="function"){var c=l.value;e.payload=function(){return o(c)},e.callback=function(){yp(t,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){yp(t,i,l),typeof o!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function mS(e,t,i,l,o){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&yi(t,i,o,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?Ar():i.alternate===null&&Ye===0&&(Ye=3),i.flags&=-257,i.flags|=65536,i.lanes=o,l===nr?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Lc(e,l,o)),!1;case 22:return i.flags|=65536,l===nr?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),Lc(e,l,o)),!1}throw Error(r(435,i.tag))}return Lc(e,l,o),Ar(),!1}if(we)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Mu&&(e=Error(r(422),{cause:l}),xs(qt(e,i)))):(l!==Mu&&(t=Error(r(423),{cause:l}),xs(qt(t,i))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=qt(l,i),o=cc(e.stateNode,l,o),Hu(e,o),Ye!==4&&(Ye=2)),!1;var c=Error(r(520),{cause:l});if(c=qt(c,i),_s===null?_s=[c]:_s.push(c),Ye!==4&&(Ye=2),t===null)return!0;l=qt(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=o&-o,i.lanes|=e,e=cc(i.stateNode,l,e),Hu(i,e),!1;case 1:if(t=i.type,c=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ea===null||!ea.has(c))))return i.flags|=65536,o&=-o,i.lanes|=o,o=bp(o),Sp(o,e,i,l),Hu(i,o),!1}i=i.return}while(i!==null);return!1}var fc=Error(r(461)),Je=!1;function ot(e,t,i,l){t.child=e===null?Em(t,null,i,l):Va(t,e.child,i,l)}function wp(e,t,i,l,o){i=i.render;var c=t.ref;if("ref"in l){var v={};for(var b in l)b!=="ref"&&(v[b]=l[b])}else v=l;return Ra(t),l=Ku(e,t,i,v,c,o),b=Fu(),e!==null&&!Je?(Zu(e,t,o),Nn(e,t,o)):(we&&b&&Au(t),t.flags|=1,ot(e,t,l,o),t.child)}function Tp(e,t,i,l,o){if(e===null){var c=i.type;return typeof c=="function"&&!ju(c)&&c.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=c,jp(e,t,c,l,o)):(e=Pl(i.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yc(e,o)){var v=c.memoizedProps;if(i=i.compare,i=i!==null?i:ps,i(v,l)&&e.ref===t.ref)return Nn(e,t,o)}return t.flags|=1,e=bn(c,l),e.ref=t.ref,e.return=t,t.child=e}function jp(e,t,i,l,o){if(e!==null){var c=e.memoizedProps;if(ps(c,l)&&e.ref===t.ref)if(Je=!1,t.pendingProps=l=c,yc(e,o))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,Nn(e,t,o)}return dc(e,t,i,l,o)}function Ep(e,t,i,l){var o=l.children,c=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(c=c!==null?c.baseLanes|i:i,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~c}else l=0,t.child=null;return Np(e,t,c,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&er(t,c!==null?c.cachePool:null),c!==null?Cm(t,c):qu(),Mm(t);else return l=t.lanes=536870912,Np(e,t,c!==null?c.baseLanes|i:i,i,l)}else c!==null?(er(t,c.cachePool),Cm(t,c),Pn(),t.memoizedState=null):(e!==null&&er(t,null),qu(),Pn());return ot(e,t,o,i),t.child}function Ds(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Np(e,t,i,l,o){var c=Vu();return c=c===null?null:{parent:Qe._currentValue,pool:c},t.memoizedState={baseLanes:i,cachePool:c},e!==null&&er(t,null),qu(),Mm(t),e!==null&&yi(e,t,l,!0),t.childLanes=o,null}function gr(e,t){return t=xr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ap(e,t,i){return Va(t,e.child,null,i),e=gr(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function pS(e,t,i){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(l.mode==="hidden")return e=gr(t,l),t.lanes=536870912,Ds(null,e);if(Gu(t),(e=Ue)?(e=Bg(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:ln,overflow:rn}:null,retryLane:536870912,hydrationErrors:null},i=cm(e),i.return=t,t.child=i,lt=t,Ue=null)):e=null,e===null)throw Gn(t);return t.lanes=536870912,null}return gr(t,l)}var c=e.memoizedState;if(c!==null){var v=c.dehydrated;if(Gu(t),o)if(t.flags&256)t.flags&=-257,t=Ap(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Je||yi(e,t,i,!1),o=(i&e.childLanes)!==0,Je||o){if(l=Ve,l!==null&&(v=vh(l,i),v!==0&&v!==c.retryLane))throw c.retryLane=v,Ca(e,v),Et(l,e,v),fc;Ar(),t=Ap(e,t,i)}else e=c.treeContext,Ue=Ft(v.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&hm(t,e),t=gr(t,l),t.flags|=4096;return t}return e=bn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vr(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function dc(e,t,i,l,o){return Ra(t),i=Ku(e,t,i,l,void 0,o),l=Fu(),e!==null&&!Je?(Zu(e,t,o),Nn(e,t,o)):(we&&l&&Au(t),t.flags|=1,ot(e,t,i,o),t.child)}function Cp(e,t,i,l,o,c){return Ra(t),t.updateQueue=null,i=Om(t,l,i,o),Dm(e),l=Fu(),e!==null&&!Je?(Zu(e,t,c),Nn(e,t,c)):(we&&l&&Au(t),t.flags|=1,ot(e,t,i,c),t.child)}function Mp(e,t,i,l,o){if(Ra(t),t.stateNode===null){var c=pi,v=i.contextType;typeof v=="object"&&v!==null&&(c=rt(v)),c=new i(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=uc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},Uu(t),v=i.contextType,c.context=typeof v=="object"&&v!==null?rt(v):pi,c.state=t.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(oc(t,i,v,l),c.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(v=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),v!==c.state&&uc.enqueueReplaceState(c,c.state,null),Es(t,l,c,o),js(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,N=Ua(i,b);c.props=N;var L=c.context,q=i.contextType;v=pi,typeof q=="object"&&q!==null&&(v=rt(q));var X=i.getDerivedStateFromProps;q=typeof X=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||L!==v)&&pp(t,c,l,v),Kn=!1;var _=t.memoizedState;c.state=_,Es(t,l,c,o),js(),L=t.memoizedState,b||_!==L||Kn?(typeof X=="function"&&(oc(t,i,X,l),L=t.memoizedState),(N=Kn||mp(t,i,N,l,_,L,v))?(q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=L),c.props=l,c.state=L,c.context=v,l=N):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,Bu(e,t),v=t.memoizedProps,q=Ua(i,v),c.props=q,X=t.pendingProps,_=c.context,L=i.contextType,N=pi,typeof L=="object"&&L!==null&&(N=rt(L)),b=i.getDerivedStateFromProps,(L=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==X||_!==N)&&pp(t,c,l,N),Kn=!1,_=t.memoizedState,c.state=_,Es(t,l,c,o),js();var H=t.memoizedState;v!==X||_!==H||Kn||e!==null&&e.dependencies!==null&&Wl(e.dependencies)?(typeof b=="function"&&(oc(t,i,b,l),H=t.memoizedState),(q=Kn||mp(t,i,q,l,_,H,N)||e!==null&&e.dependencies!==null&&Wl(e.dependencies))?(L||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,H,N),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,H,N)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=H),c.props=l,c.state=H,c.context=N,l=q):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,vr(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=Va(t,e.child,null,o),t.child=Va(t,null,i,o)):ot(e,t,i,o),t.memoizedState=c.state,e=t.child):e=Nn(e,t,o),e}function Dp(e,t,i,l){return Da(),t.flags|=256,ot(e,t,i,l),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mc(e){return{baseLanes:e,cachePool:ym()}}function pc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Vt),e}function Op(e,t,i){var l=t.pendingProps,o=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),v&&(o=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(we){if(o?Qn(t):Pn(),(e=Ue)?(e=Bg(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:ln,overflow:rn}:null,retryLane:536870912,hydrationErrors:null},i=cm(e),i.return=t,t.child=i,lt=t,Ue=null)):e=null,e===null)throw Gn(t);return Jc(e)?t.lanes=32:t.lanes=536870912,null}var b=l.children;return l=l.fallback,o?(Pn(),o=t.mode,b=xr({mode:"hidden",children:b},o),l=Ma(l,o,i,null),b.return=t,l.return=t,b.sibling=l,t.child=b,l=t.child,l.memoizedState=mc(i),l.childLanes=pc(e,v,i),t.memoizedState=hc,Ds(null,l)):(Qn(t),gc(t,b))}var N=e.memoizedState;if(N!==null&&(b=N.dehydrated,b!==null)){if(c)t.flags&256?(Qn(t),t.flags&=-257,t=vc(e,t,i)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),b=l.fallback,o=t.mode,l=xr({mode:"visible",children:l.children},o),b=Ma(b,o,i,null),b.flags|=2,l.return=t,b.return=t,l.sibling=b,t.child=l,Va(t,e.child,null,i),l=t.child,l.memoizedState=mc(i),l.childLanes=pc(e,v,i),t.memoizedState=hc,t=Ds(null,l));else if(Qn(t),Jc(b)){if(v=b.nextSibling&&b.nextSibling.dataset,v)var L=v.dgst;v=L,l=Error(r(419)),l.stack="",l.digest=v,xs({value:l,source:null,stack:null}),t=vc(e,t,i)}else if(Je||yi(e,t,i,!1),v=(i&e.childLanes)!==0,Je||v){if(v=Ve,v!==null&&(l=vh(v,i),l!==0&&l!==N.retryLane))throw N.retryLane=l,Ca(e,l),Et(v,e,l),fc;Pc(b)||Ar(),t=vc(e,t,i)}else Pc(b)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Ue=Ft(b.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&hm(t,e),t=gc(t,l.children),t.flags|=4096);return t}return o?(Pn(),b=l.fallback,o=t.mode,N=e.child,L=N.sibling,l=bn(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,L!==null?b=bn(L,b):(b=Ma(b,o,i,null),b.flags|=2),b.return=t,l.return=t,l.sibling=b,t.child=l,Ds(null,l),l=t.child,b=e.child.memoizedState,b===null?b=mc(i):(o=b.cachePool,o!==null?(N=Qe._currentValue,o=o.parent!==N?{parent:N,pool:N}:o):o=ym(),b={baseLanes:b.baseLanes|i,cachePool:o}),l.memoizedState=b,l.childLanes=pc(e,v,i),t.memoizedState=hc,Ds(e.child,l)):(Qn(t),i=e.child,e=i.sibling,i=bn(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=i,t.memoizedState=null,i)}function gc(e,t){return t=xr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xr(e,t){return e=Rt(22,e,null,t),e.lanes=0,e}function vc(e,t,i){return Va(t,e.child,null,i),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rp(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ru(e.return,t,i)}function xc(e,t,i,l,o,c){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:o,treeForkCount:c}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=o,v.treeForkCount=c)}function zp(e,t,i){var l=t.pendingProps,o=l.revealOrder,c=l.tail;l=l.children;var v=Xe.current,b=(v&2)!==0;if(b?(v=v&1|2,t.flags|=128):v&=1,K(Xe,v),ot(e,t,l,i),l=we?vs:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rp(e,i,t);else if(e.tag===19)Rp(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(i=t.child,o=null;i!==null;)e=i.alternate,e!==null&&lr(e)===null&&(o=i),i=i.sibling;i=o,i===null?(o=t.child,t.child=null):(o=i.sibling,i.sibling=null),xc(t,!1,o,i,c,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&lr(e)===null){t.child=o;break}e=o.sibling,o.sibling=i,i=o,o=e}xc(t,!0,i,null,c,l);break;case"together":xc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Nn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),In|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(yi(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,i=bn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function yc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wl(e)))}function gS(e,t,i){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),Xn(t,Qe,e.memoizedState.cache),Da();break;case 27:case 5:ns(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:Xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Gu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Qn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Op(e,t,i):(Qn(t),e=Nn(e,t,i),e!==null?e.sibling:null);Qn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(yi(e,t,i,!1),l=(i&t.childLanes)!==0),o){if(l)return zp(e,t,i);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),K(Xe,Xe.current),l)break;return null;case 22:return t.lanes=0,Ep(e,t,i,t.pendingProps);case 24:Xn(t,Qe,e.memoizedState.cache)}return Nn(e,t,i)}function kp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!yc(e,i)&&(t.flags&128)===0)return Je=!1,gS(e,t,i);Je=(e.flags&131072)!==0}else Je=!1,we&&(t.flags&1048576)!==0&&dm(t,vs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")ju(e)?(l=Ua(e,l),t.tag=1,t=Mp(null,t,e,l,i)):(t.tag=0,t=dc(null,t,e,l,i));else{if(e!=null){var o=e.$$typeof;if(o===z){t.tag=11,t=wp(null,t,e,l,i);break e}else if(o===F){t.tag=14,t=Tp(null,t,e,l,i);break e}}throw t=Se(e)||e,Error(r(306,t,""))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,o=Ua(l,t.pendingProps),Mp(e,t,l,o,i);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var c=t.memoizedState;o=c.element,Bu(e,t),Es(t,l,null,i);var v=t.memoizedState;if(l=v.cache,Xn(t,Qe,l),l!==c.cache&&zu(t,[Qe],i,!0),js(),l=v.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Dp(e,t,l,i);break e}else if(l!==o){o=qt(Error(r(424)),t),xs(o),t=Dp(e,t,l,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ue=Ft(e.firstChild),lt=t,we=!0,Yn=null,Xt=!0,i=Em(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Da(),l===o){t=Nn(e,t,i);break e}ot(e,t,l,i)}t=t.child}return t;case 26:return vr(e,t),e===null?(i=Xg(t.type,null,t.pendingProps,null))?t.memoizedState=i:we||(i=t.type,e=t.pendingProps,l=kr(pe.current).createElement(i),l[st]=t,l[yt]=e,ut(l,i,e),at(l),t.stateNode=l):t.memoizedState=Xg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ns(t),e===null&&we&&(l=t.stateNode=qg(t.type,t.pendingProps,pe.current),lt=t,Xt=!0,o=Ue,ia(t.type)?(Wc=o,Ue=Ft(l.firstChild)):Ue=o),ot(e,t,t.pendingProps.children,i),vr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((o=l=Ue)&&(l=KS(l,t.type,t.pendingProps,Xt),l!==null?(t.stateNode=l,lt=t,Ue=Ft(l.firstChild),Xt=!1,o=!0):o=!1),o||Gn(t)),ns(t),o=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,l=c.children,Fc(o,c)?l=null:v!==null&&Fc(o,v)&&(t.flags|=32),t.memoizedState!==null&&(o=Ku(e,t,rS,null,null,i),Xs._currentValue=o),vr(e,t),ot(e,t,l,i),t.child;case 6:return e===null&&we&&((e=i=Ue)&&(i=FS(i,t.pendingProps,Xt),i!==null?(t.stateNode=i,lt=t,Ue=null,e=!0):e=!1),e||Gn(t)),null;case 13:return Op(e,t,i);case 4:return Ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Va(t,null,l,i):ot(e,t,l,i),t.child;case 11:return wp(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,Xn(t,t.type,l.value),ot(e,t,l.children,i),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,Ra(t),o=rt(o),l=l(o),t.flags|=1,ot(e,t,l,i),t.child;case 14:return Tp(e,t,t.type,t.pendingProps,i);case 15:return jp(e,t,t.type,t.pendingProps,i);case 19:return zp(e,t,i);case 31:return pS(e,t,i);case 22:return Ep(e,t,i,t.pendingProps);case 24:return Ra(t),l=rt(Qe),e===null?(o=Vu(),o===null&&(o=Ve,c=ku(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=i),o=c),t.memoizedState={parent:l,cache:o},Uu(t),Xn(t,Qe,o)):((e.lanes&i)!==0&&(Bu(e,t),Es(t,null,null,i),js()),o=e.memoizedState,c=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Xn(t,Qe,l)):(l=c.cache,Xn(t,Qe,l),l!==o.cache&&zu(t,[Qe],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function An(e){e.flags|=4}function bc(e,t,i,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(rg())e.flags|=8192;else throw La=nr,_u}else e.flags&=-16777217}function Lp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t))if(rg())e.flags|=8192;else throw La=nr,_u}function yr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mh():536870912,e.lanes|=t,Oi|=t)}function Os(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.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,i=0,l=0;if(t)for(var o=e.child;o!==null;)i|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)i|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function vS(e,t,i){var l=t.pendingProps;switch(Cu(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 i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Tn(Qe),Le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(xi(t)?An(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Du())),Be(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(An(t),c!==null?(Be(t),Lp(t,c)):(Be(t),bc(t,o,null,l,i))):c?c!==e.memoizedState?(An(t),Be(t),Lp(t,c)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&An(t),Be(t),bc(t,o,e,l,i)),null;case 27:if(Dl(t),i=pe.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Be(t),null}e=I.current,xi(t)?mm(t):(e=qg(o,l,i),t.stateNode=e,An(t))}return Be(t),null;case 5:if(Dl(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Be(t),null}if(c=I.current,xi(t))mm(t);else{var v=kr(pe.current);switch(c){case 1:c=v.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=v.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=v.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=v.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=v.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?v.createElement(o,{is:l.is}):v.createElement(o)}}c[st]=t,c[yt]=l;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)c.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=c;e:switch(ut(c,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&An(t)}}return Be(t),bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=pe.current,xi(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,o=lt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[st]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Og(e.nodeValue,i)),e||Gn(t,!0)}else e=kr(e).createTextNode(l),e[st]=t,t.stateNode=e}return Be(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=xi(t),i!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[st]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else i=Du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Be(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=xi(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[st]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),o=!1}else o=Du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==o&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),yr(t,t.updateQueue),Be(t),null);case 4:return Le(),e===null&&qc(t.stateNode.containerInfo),Be(t),null;case 10:return Tn(t.type),Be(t),null;case 19:if(G(Xe),l=t.memoizedState,l===null)return Be(t),null;if(o=(t.flags&128)!==0,c=l.rendering,c===null)if(o)Os(l,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=lr(e),c!==null){for(t.flags|=128,Os(l,!1),e=c.updateQueue,t.updateQueue=e,yr(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)um(i,e),i=i.sibling;return K(Xe,Xe.current&1|2),we&&Sn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ct()>jr&&(t.flags|=128,o=!0,Os(l,!1),t.lanes=4194304)}else{if(!o)if(e=lr(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,yr(t,e),Os(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!we)return Be(t),null}else 2*Ct()-l.renderingStartTime>jr&&i!==536870912&&(t.flags|=128,o=!0,Os(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ct(),e.sibling=null,i=Xe.current,K(Xe,o?i&1|2:i&1),we&&Sn(t,l.treeForkCount),e):(Be(t),null);case 22:case 23:return kt(t),Yu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),i=t.updateQueue,i!==null&&yr(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&G(za),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Tn(Qe),Be(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function xS(e,t){switch(Cu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tn(Qe),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Dl(t),null;case 31:if(t.memoizedState!==null){if(kt(t),t.alternate===null)throw Error(r(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Xe),null;case 4:return Le(),null;case 10:return Tn(t.type),null;case 22:case 23:return kt(t),Yu(),e!==null&&G(za),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Tn(Qe),null;case 25:return null;default:return null}}function Vp(e,t){switch(Cu(t),t.tag){case 3:Tn(Qe),Le();break;case 26:case 27:case 5:Dl(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:G(Xe);break;case 10:Tn(t.type);break;case 22:case 23:kt(t),Yu(),e!==null&&G(za);break;case 24:Tn(Qe)}}function Rs(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var o=l.next;i=o;do{if((i.tag&e)===e){l=void 0;var c=i.create,v=i.inst;l=c(),v.destroy=l}i=i.next}while(i!==o)}}catch(b){Ce(t,t.return,b)}}function Jn(e,t,i){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){var v=l.inst,b=v.destroy;if(b!==void 0){v.destroy=void 0,o=t;var N=i,L=b;try{L()}catch(q){Ce(o,N,q)}}}l=l.next}while(l!==c)}}catch(q){Ce(t,t.return,q)}}function _p(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Am(t,i)}catch(l){Ce(e,e.return,l)}}}function Up(e,t,i){i.props=Ua(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){Ce(e,t,l)}}function zs(e,t){try{var i=e.ref;if(i!==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 i=="function"?e.refCleanup=i(l):i.current=l}}catch(o){Ce(e,t,o)}}function on(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(o){Ce(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(o){Ce(e,t,o)}else i.current=null}function Bp(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(o){Ce(e,e.return,o)}}function Sc(e,t,i){try{var l=e.stateNode;HS(l,e.type,i,t),l[yt]=t}catch(o){Ce(e,e.return,o)}}function Hp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ia(e.type)||e.tag===4}function wc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hp(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&&ia(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 Tc(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=xn));else if(l!==4&&(l===27&&ia(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Tc(e,t,i),e=e.sibling;e!==null;)Tc(e,t,i),e=e.sibling}function br(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&ia(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(br(e,t,i),e=e.sibling;e!==null;)br(e,t,i),e=e.sibling}function $p(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);ut(t,l,i),t[st]=e,t[yt]=i}catch(c){Ce(e,e.return,c)}}var Cn=!1,We=!1,jc=!1,qp=typeof WeakSet=="function"?WeakSet:Set,it=null;function yS(e,t){if(e=e.containerInfo,Xc=$r,e=em(e),vu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var o=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{i.nodeType,c.nodeType}catch{i=null;break e}var v=0,b=-1,N=-1,L=0,q=0,X=e,_=null;t:for(;;){for(var H;X!==i||o!==0&&X.nodeType!==3||(b=v+o),X!==c||l!==0&&X.nodeType!==3||(N=v+l),X.nodeType===3&&(v+=X.nodeValue.length),(H=X.firstChild)!==null;)_=X,X=H;for(;;){if(X===e)break t;if(_===i&&++L===o&&(b=v),_===c&&++q===l&&(N=v),(H=X.nextSibling)!==null)break;X=_,_=X.parentNode}X=H}i=b===-1||N===-1?null:{start:b,end:N}}else i=null}i=i||{start:0,end:0}}else i=null;for(Kc={focusedElem:e,selectionRange:i},$r=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){switch(t=it,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)o=e[i],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,i=t,o=c.memoizedProps,c=c.memoizedState,l=i.stateNode;try{var ee=Ua(i.type,o);e=l.getSnapshotBeforeUpdate(ee,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(se){Ce(i,i.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Qc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}}function Yp(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Dn(e,i),l&4&&Rs(5,i);break;case 1:if(Dn(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(v){Ce(i,i.return,v)}else{var o=Ua(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ce(i,i.return,v)}}l&64&&_p(i),l&512&&zs(i,i.return);break;case 3:if(Dn(e,i),l&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Am(e,t)}catch(v){Ce(i,i.return,v)}}break;case 27:t===null&&l&4&&$p(i);case 26:case 5:Dn(e,i),t===null&&l&4&&Bp(i),l&512&&zs(i,i.return);break;case 12:Dn(e,i);break;case 31:Dn(e,i),l&4&&Kp(e,i);break;case 13:Dn(e,i),l&4&&Fp(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=CS.bind(null,i),ZS(e,i))));break;case 22:if(l=i.memoizedState!==null||Cn,!l){t=t!==null&&t.memoizedState!==null||We,o=Cn;var c=We;Cn=l,(We=t)&&!c?On(e,i,(i.subtreeFlags&8772)!==0):Dn(e,i),Cn=o,We=c}break;case 30:break;default:Dn(e,i)}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&eu(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 $e=null,St=!1;function Mn(e,t,i){for(i=i.child;i!==null;)Xp(e,t,i),i=i.sibling}function Xp(e,t,i){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(as,i)}catch{}switch(i.tag){case 26:We||on(i,t),Mn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:We||on(i,t);var l=$e,o=St;ia(i.type)&&($e=i.stateNode,St=!1),Mn(e,t,i),qs(i.stateNode),$e=l,St=o;break;case 5:We||on(i,t);case 6:if(l=$e,o=St,$e=null,Mn(e,t,i),$e=l,St=o,$e!==null)if(St)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(i.stateNode)}catch(c){Ce(i,t,c)}else try{$e.removeChild(i.stateNode)}catch(c){Ce(i,t,c)}break;case 18:$e!==null&&(St?(e=$e,_g(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Bi(e)):_g($e,i.stateNode));break;case 4:l=$e,o=St,$e=i.stateNode.containerInfo,St=!0,Mn(e,t,i),$e=l,St=o;break;case 0:case 11:case 14:case 15:Jn(2,i,t),We||Jn(4,i,t),Mn(e,t,i);break;case 1:We||(on(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Up(i,t,l)),Mn(e,t,i);break;case 21:Mn(e,t,i);break;case 22:We=(l=We)||i.memoizedState!==null,Mn(e,t,i),We=l;break;default:Mn(e,t,i)}}function Kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bi(e)}catch(i){Ce(t,t.return,i)}}}function Fp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bi(e)}catch(i){Ce(t,t.return,i)}}function bS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qp),t;default:throw Error(r(435,e.tag))}}function Sr(e,t){var i=bS(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var o=MS.bind(null,e,l);l.then(o,o)}})}function wt(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var o=i[l],c=e,v=t,b=v;e:for(;b!==null;){switch(b.tag){case 27:if(ia(b.type)){$e=b.stateNode,St=!1;break e}break;case 5:$e=b.stateNode,St=!1;break e;case 3:case 4:$e=b.stateNode.containerInfo,St=!0;break e}b=b.return}if($e===null)throw Error(r(160));Xp(c,v,o),$e=null,St=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zp(t,e),t=t.sibling}var It=null;function Zp(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wt(t,e),Tt(e),l&4&&(Jn(3,e,e.return),Rs(3,e),Jn(5,e,e.return));break;case 1:wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),l&64&&Cn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var o=It;if(wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),l&4){var c=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":c=o.getElementsByTagName("title")[0],(!c||c[ls]||c[st]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(l),o.head.insertBefore(c,o.querySelector("head > title"))),ut(c,l,i),c[st]=e,at(c),l=c;break e;case"link":var v=Zg("link","href",o).get(l+(i.href||""));if(v){for(var b=0;b<v.length;b++)if(c=v[b],c.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&c.getAttribute("rel")===(i.rel==null?null:i.rel)&&c.getAttribute("title")===(i.title==null?null:i.title)&&c.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(b,1);break t}}c=o.createElement(l),ut(c,l,i),o.head.appendChild(c);break;case"meta":if(v=Zg("meta","content",o).get(l+(i.content||""))){for(b=0;b<v.length;b++)if(c=v[b],c.getAttribute("content")===(i.content==null?null:""+i.content)&&c.getAttribute("name")===(i.name==null?null:i.name)&&c.getAttribute("property")===(i.property==null?null:i.property)&&c.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&c.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(b,1);break t}}c=o.createElement(l),ut(c,l,i),o.head.appendChild(c);break;default:throw Error(r(468,l))}c[st]=e,at(c),l=c}e.stateNode=l}else Qg(o,e.type,e.stateNode);else e.stateNode=Fg(o,l,e.memoizedProps);else c!==l?(c===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):c.count--,l===null?Qg(o,e.type,e.stateNode):Fg(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Sc(e,e.memoizedProps,i.memoizedProps)}break;case 27:wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),i!==null&&l&4&&Sc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),e.flags&32){o=e.stateNode;try{oi(o,"")}catch(ee){Ce(e,e.return,ee)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Sc(e,o,i!==null?i.memoizedProps:o)),l&1024&&(jc=!0);break;case 6:if(wt(t,e),Tt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(ee){Ce(e,e.return,ee)}}break;case 3:if(_r=null,o=It,It=Lr(t.containerInfo),wt(t,e),It=o,Tt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Bi(t.containerInfo)}catch(ee){Ce(e,e.return,ee)}jc&&(jc=!1,Qp(e));break;case 4:l=It,It=Lr(e.stateNode.containerInfo),wt(t,e),Tt(e),It=l;break;case 12:wt(t,e),Tt(e);break;case 31:wt(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 13:wt(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Tr=Ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 22:o=e.memoizedState!==null;var N=i!==null&&i.memoizedState!==null,L=Cn,q=We;if(Cn=L||o,We=q||N,wt(t,e),We=q,Cn=L,Tt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(i===null||N||Cn||We||Ba(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){N=i=t;try{if(c=N.stateNode,o)v=c.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{b=N.stateNode;var X=N.memoizedProps.style,_=X!=null&&X.hasOwnProperty("display")?X.display:null;b.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ee){Ce(N,N.return,ee)}}}else if(t.tag===6){if(i===null){N=t;try{N.stateNode.nodeValue=o?"":N.memoizedProps}catch(ee){Ce(N,N.return,ee)}}}else if(t.tag===18){if(i===null){N=t;try{var H=N.stateNode;o?Ug(H,!0):Ug(N.stateNode,!1)}catch(ee){Ce(N,N.return,ee)}}}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;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Sr(e,i))));break;case 19:wt(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 30:break;case 21:break;default:wt(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(Hp(l)){i=l;break}l=l.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var o=i.stateNode,c=wc(e);br(e,c,o);break;case 5:var v=i.stateNode;i.flags&32&&(oi(v,""),i.flags&=-33);var b=wc(e);br(e,b,v);break;case 3:case 4:var N=i.stateNode.containerInfo,L=wc(e);Tc(e,L,N);break;default:throw Error(r(161))}}catch(q){Ce(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Qp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Yp(e,t.alternate,t),t=t.sibling}function Ba(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jn(4,t,t.return),Ba(t);break;case 1:on(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Up(t,t.return,i),Ba(t);break;case 27:qs(t.stateNode);case 26:case 5:on(t,t.return),Ba(t);break;case 22:t.memoizedState===null&&Ba(t);break;case 30:Ba(t);break;default:Ba(t)}e=e.sibling}}function On(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,c=t,v=c.flags;switch(c.tag){case 0:case 11:case 15:On(o,c,i),Rs(4,c);break;case 1:if(On(o,c,i),l=c,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(L){Ce(l,l.return,L)}if(l=c,o=l.updateQueue,o!==null){var b=l.stateNode;try{var N=o.shared.hiddenCallbacks;if(N!==null)for(o.shared.hiddenCallbacks=null,o=0;o<N.length;o++)Nm(N[o],b)}catch(L){Ce(l,l.return,L)}}i&&v&64&&_p(c),zs(c,c.return);break;case 27:$p(c);case 26:case 5:On(o,c,i),i&&l===null&&v&4&&Bp(c),zs(c,c.return);break;case 12:On(o,c,i);break;case 31:On(o,c,i),i&&v&4&&Kp(o,c);break;case 13:On(o,c,i),i&&v&4&&Fp(o,c);break;case 22:c.memoizedState===null&&On(o,c,i),zs(c,c.return);break;case 30:break;default:On(o,c,i)}t=t.sibling}}function Ec(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ys(i))}function Nc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e))}function en(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pp(e,t,i,l),t=t.sibling}function Pp(e,t,i,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:en(e,t,i,l),o&2048&&Rs(9,t);break;case 1:en(e,t,i,l);break;case 3:en(e,t,i,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e)));break;case 12:if(o&2048){en(e,t,i,l),e=t.stateNode;try{var c=t.memoizedProps,v=c.id,b=c.onPostCommit;typeof b=="function"&&b(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ce(t,t.return,N)}}else en(e,t,i,l);break;case 31:en(e,t,i,l);break;case 13:en(e,t,i,l);break;case 23:break;case 22:c=t.stateNode,v=t.alternate,t.memoizedState!==null?c._visibility&2?en(e,t,i,l):ks(e,t):c._visibility&2?en(e,t,i,l):(c._visibility|=2,Ci(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Ec(v,t);break;case 24:en(e,t,i,l),o&2048&&Nc(t.alternate,t);break;default:en(e,t,i,l)}}function Ci(e,t,i,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,v=t,b=i,N=l,L=v.flags;switch(v.tag){case 0:case 11:case 15:Ci(c,v,b,N,o),Rs(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?Ci(c,v,b,N,o):ks(c,v):(q._visibility|=2,Ci(c,v,b,N,o)),o&&L&2048&&Ec(v.alternate,v);break;case 24:Ci(c,v,b,N,o),o&&L&2048&&Nc(v.alternate,v);break;default:Ci(c,v,b,N,o)}t=t.sibling}}function ks(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,o=l.flags;switch(l.tag){case 22:ks(i,l),o&2048&&Ec(l.alternate,l);break;case 24:ks(i,l),o&2048&&Nc(l.alternate,l);break;default:ks(i,l)}t=t.sibling}}var Ls=8192;function Mi(e,t,i){if(e.subtreeFlags&Ls)for(e=e.child;e!==null;)Jp(e,t,i),e=e.sibling}function Jp(e,t,i){switch(e.tag){case 26:Mi(e,t,i),e.flags&Ls&&e.memoizedState!==null&&l2(i,It,e.memoizedState,e.memoizedProps);break;case 5:Mi(e,t,i);break;case 3:case 4:var l=It;It=Lr(e.stateNode.containerInfo),Mi(e,t,i),It=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ls,Ls=16777216,Mi(e,t,i),Ls=l):Mi(e,t,i));break;default:Mi(e,t,i)}}function Wp(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 Vs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];it=l,eg(l,e)}Wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ip(e),e=e.sibling}function Ip(e){switch(e.tag){case 0:case 11:case 15:Vs(e),e.flags&2048&&Jn(9,e,e.return);break;case 3:Vs(e);break;case 12:Vs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,wr(e)):Vs(e);break;default:Vs(e)}}function wr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];it=l,eg(l,e)}Wp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jn(8,t,t.return),wr(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,wr(t));break;default:wr(t)}e=e.sibling}}function eg(e,t){for(;it!==null;){var i=it;switch(i.tag){case 0:case 11:case 15:Jn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ys(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,it=l;else e:for(i=e;it!==null;){l=it;var o=l.sibling,c=l.return;if(Gp(l),l===i){it=null;break e}if(o!==null){o.return=c,it=o;break e}it=c}}}var SS={getCacheForType:function(e){var t=rt(Qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return rt(Qe).controller.signal}},wS=typeof WeakMap=="function"?WeakMap:Map,Ne=0,Ve=null,ge=null,ye=0,Ae=0,Lt=null,Wn=!1,Di=!1,Ac=!1,Rn=0,Ye=0,In=0,Ha=0,Cc=0,Vt=0,Oi=0,_s=null,jt=null,Mc=!1,Tr=0,tg=0,jr=1/0,Er=null,ea=null,tt=0,ta=null,Ri=null,zn=0,Dc=0,Oc=null,ng=null,Us=0,Rc=null;function _t(){return(Ne&2)!==0&&ye!==0?ye&-ye:$.T!==null?Uc():xh()}function ag(){if(Vt===0)if((ye&536870912)===0||we){var e=zl;zl<<=1,(zl&3932160)===0&&(zl=262144),Vt=e}else Vt=536870912;return e=zt.current,e!==null&&(e.flags|=32),Vt}function Et(e,t,i){(e===Ve&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(zi(e,0),na(e,ye,Vt,!1)),ss(e,i),((Ne&2)===0||e!==Ve)&&(e===Ve&&((Ne&2)===0&&(Ha|=i),Ye===4&&na(e,ye,Vt,!1)),un(e))}function ig(e,t,i){if((Ne&6)!==0)throw Error(r(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||is(e,t),o=l?ES(e,t):kc(e,t,!0),c=l;do{if(o===0){Di&&!l&&na(e,t,0,!1);break}else{if(i=e.current.alternate,c&&!TS(i)){o=kc(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var b=e;o=_s;var N=b.current.memoizedState.isDehydrated;if(N&&(zi(b,v).flags|=256),v=kc(b,v,!1),v!==2){if(Ac&&!N){b.errorRecoveryDisabledLanes|=c,Ha|=c,o=4;break e}c=jt,jt=o,c!==null&&(jt===null?jt=c:jt.push.apply(jt,c))}o=v}if(c=!1,o!==2)continue}}if(o===1){zi(e,0),na(e,t,0,!0);break}e:{switch(l=e,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:na(l,t,Vt,!Wn);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=Tr+300-Ct(),10<o)){if(na(l,t,Vt,!Wn),Ll(l,0,!0)!==0)break e;zn=t,l.timeoutHandle=Lg(sg.bind(null,l,i,jt,Er,Mc,t,Vt,Ha,Oi,Wn,c,"Throttled",-0,0),o);break e}sg(l,i,jt,Er,Mc,t,Vt,Ha,Oi,Wn,c,null,-0,0)}}break}while(!0);un(e)}function sg(e,t,i,l,o,c,v,b,N,L,q,X,_,H){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Jp(t,c,X);var ee=(c&62914560)===c?Tr-Ct():(c&4194048)===c?tg-Ct():0;if(ee=r2(X,ee),ee!==null){zn=c,e.cancelPendingCommit=ee(hg.bind(null,e,t,c,i,l,o,v,b,N,q,X,null,_,H)),na(e,c,v,!L);return}}hg(e,t,c,i,l,o,v,b,N)}function TS(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var o=i[l],c=o.getSnapshot;o=o.value;try{if(!Ot(c(),o))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;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 na(e,t,i,l){t&=~Cc,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var c=31-Dt(o),v=1<<c;l[c]=-1,o&=~v}i!==0&&ph(e,i,t)}function Nr(){return(Ne&6)===0?(Bs(0),!1):!0}function zc(){if(ge!==null){if(Ae===0)var e=ge.return;else e=ge,wn=Oa=null,Qu(e),Ti=null,Ss=0,e=ge;for(;e!==null;)Vp(e.alternate,e),e=e.return;ge=null}}function zi(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,YS(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),zn=0,zc(),Ve=e,ge=i=bn(e.current,null),ye=t,Ae=0,Lt=null,Wn=!1,Di=is(e,t),Ac=!1,Oi=Vt=Cc=Ha=In=Ye=0,jt=_s=null,Mc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Dt(l),c=1<<o;t|=e[o],l&=~c}return Rn=t,Fl(),i}function lg(e,t){de=null,$.H=Ms,t===wi||t===tr?(t=wm(),Ae=3):t===_u?(t=wm(),Ae=4):Ae=t===fc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Lt=t,ge===null&&(Ye=1,pr(e,qt(t,e.current)))}function rg(){var e=zt.current;return e===null?!0:(ye&4194048)===ye?Kt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Kt:!1}function og(){var e=$.H;return $.H=Ms,e===null?Ms:e}function ug(){var e=$.A;return $.A=SS,e}function Ar(){Ye=4,Wn||(ye&4194048)!==ye&&zt.current!==null||(Di=!0),(In&134217727)===0&&(Ha&134217727)===0||Ve===null||na(Ve,ye,Vt,!1)}function kc(e,t,i){var l=Ne;Ne|=2;var o=og(),c=ug();(Ve!==e||ye!==t)&&(Er=null,zi(e,t)),t=!1;var v=Ye;e:do try{if(Ae!==0&&ge!==null){var b=ge,N=Lt;switch(Ae){case 8:zc(),v=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var L=Ae;if(Ae=0,Lt=null,ki(e,b,N,L),i&&Di){v=0;break e}break;default:L=Ae,Ae=0,Lt=null,ki(e,b,N,L)}}jS(),v=Ye;break}catch(q){lg(e,q)}while(!0);return t&&e.shellSuspendCounter++,wn=Oa=null,Ne=l,$.H=o,$.A=c,ge===null&&(Ve=null,ye=0,Fl()),v}function jS(){for(;ge!==null;)cg(ge)}function ES(e,t){var i=Ne;Ne|=2;var l=og(),o=ug();Ve!==e||ye!==t?(Er=null,jr=Ct()+500,zi(e,t)):Di=is(e,t);e:do try{if(Ae!==0&&ge!==null){t=ge;var c=Lt;t:switch(Ae){case 1:Ae=0,Lt=null,ki(e,t,c,1);break;case 2:case 9:if(bm(c)){Ae=0,Lt=null,fg(t);break}t=function(){Ae!==2&&Ae!==9||Ve!==e||(Ae=7),un(e)},c.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:bm(c)?(Ae=0,Lt=null,fg(t)):(Ae=0,Lt=null,ki(e,t,c,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var b=ge;if(v?Pg(v):b.stateNode.complete){Ae=0,Lt=null;var N=b.sibling;if(N!==null)ge=N;else{var L=b.return;L!==null?(ge=L,Cr(L)):ge=null}break t}}Ae=0,Lt=null,ki(e,t,c,5);break;case 6:Ae=0,Lt=null,ki(e,t,c,6);break;case 8:zc(),Ye=6;break e;default:throw Error(r(462))}}NS();break}catch(q){lg(e,q)}while(!0);return wn=Oa=null,$.H=l,$.A=o,Ne=i,ge!==null?0:(Ve=null,ye=0,Fl(),Ye)}function NS(){for(;ge!==null&&!Qb();)cg(ge)}function cg(e){var t=kp(e.alternate,e,Rn);e.memoizedProps=e.pendingProps,t===null?Cr(e):ge=t}function fg(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Cp(i,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=Cp(i,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Qu(t);default:Vp(i,t),t=ge=um(t,Rn),t=kp(i,t,Rn)}e.memoizedProps=e.pendingProps,t===null?Cr(e):ge=t}function ki(e,t,i,l){wn=Oa=null,Qu(t),Ti=null,Ss=0;var o=t.return;try{if(mS(e,o,t,i,ye)){Ye=1,pr(e,qt(i,e.current)),ge=null;return}}catch(c){if(o!==null)throw ge=o,c;Ye=1,pr(e,qt(i,e.current)),ge=null;return}t.flags&32768?(we||l===1?e=!0:Di||(ye&536870912)!==0?e=!1:(Wn=e=!0,(l===2||l===9||l===3||l===6)&&(l=zt.current,l!==null&&l.tag===13&&(l.flags|=16384))),dg(t,e)):Cr(t)}function Cr(e){var t=e;do{if((t.flags&32768)!==0){dg(t,Wn);return}e=t.return;var i=vS(t.alternate,t,Rn);if(i!==null){ge=i;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Ye===0&&(Ye=5)}function dg(e,t){do{var i=xS(e.alternate,e);if(i!==null){i.flags&=32767,ge=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=i}while(e!==null);Ye=6,ge=null}function hg(e,t,i,l,o,c,v,b,N){e.cancelPendingCommit=null;do Mr();while(tt!==0);if((Ne&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=wu,s1(e,i,c,v,b,N),e===Ve&&(ge=Ve=null,ye=0),Ri=t,ta=e,zn=i,Dc=c,Oc=o,ng=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,DS(Ol,function(){return xg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,o=Q.p,Q.p=2,v=Ne,Ne|=4;try{yS(e,t,i)}finally{Ne=v,Q.p=o,$.T=l}}tt=1,mg(),pg(),gg()}}function mg(){if(tt===1){tt=0;var e=ta,t=Ri,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=$.T,$.T=null;var l=Q.p;Q.p=2;var o=Ne;Ne|=4;try{Zp(t,e);var c=Kc,v=em(e.containerInfo),b=c.focusedElem,N=c.selectionRange;if(v!==b&&b&&b.ownerDocument&&Ih(b.ownerDocument.documentElement,b)){if(N!==null&&vu(b)){var L=N.start,q=N.end;if(q===void 0&&(q=L),"selectionStart"in b)b.selectionStart=L,b.selectionEnd=Math.min(q,b.value.length);else{var X=b.ownerDocument||document,_=X&&X.defaultView||window;if(_.getSelection){var H=_.getSelection(),ee=b.textContent.length,se=Math.min(N.start,ee),ze=N.end===void 0?se:Math.min(N.end,ee);!H.extend&&se>ze&&(v=ze,ze=se,se=v);var O=Wh(b,se),C=Wh(b,ze);if(O&&C&&(H.rangeCount!==1||H.anchorNode!==O.node||H.anchorOffset!==O.offset||H.focusNode!==C.node||H.focusOffset!==C.offset)){var k=X.createRange();k.setStart(O.node,O.offset),H.removeAllRanges(),se>ze?(H.addRange(k),H.extend(C.node,C.offset)):(k.setEnd(C.node,C.offset),H.addRange(k))}}}}for(X=[],H=b;H=H.parentNode;)H.nodeType===1&&X.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<X.length;b++){var Y=X[b];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}$r=!!Xc,Kc=Xc=null}finally{Ne=o,Q.p=l,$.T=i}}e.current=t,tt=2}}function pg(){if(tt===2){tt=0;var e=ta,t=Ri,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=$.T,$.T=null;var l=Q.p;Q.p=2;var o=Ne;Ne|=4;try{Yp(e,t.alternate,t)}finally{Ne=o,Q.p=l,$.T=i}}tt=3}}function gg(){if(tt===4||tt===3){tt=0,Pb();var e=ta,t=Ri,i=zn,l=ng;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?tt=5:(tt=0,Ri=ta=null,vg(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ea=null),Wo(i),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(as,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=$.T,o=Q.p,Q.p=2,$.T=null;try{for(var c=e.onRecoverableError,v=0;v<l.length;v++){var b=l[v];c(b.value,{componentStack:b.stack})}}finally{$.T=t,Q.p=o}}(zn&3)!==0&&Mr(),un(e),o=e.pendingLanes,(i&261930)!==0&&(o&42)!==0?e===Rc?Us++:(Us=0,Rc=e):Us=0,Bs(0)}}function vg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ys(t)))}function Mr(){return mg(),pg(),gg(),xg()}function xg(){if(tt!==5)return!1;var e=ta,t=Dc;Dc=0;var i=Wo(zn),l=$.T,o=Q.p;try{Q.p=32>i?32:i,$.T=null,i=Oc,Oc=null;var c=ta,v=zn;if(tt=0,Ri=ta=null,zn=0,(Ne&6)!==0)throw Error(r(331));var b=Ne;if(Ne|=4,Ip(c.current),Pp(c,c.current,v,i),Ne=b,Bs(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(as,c)}catch{}return!0}finally{Q.p=o,$.T=l,vg(e,t)}}function yg(e,t,i){t=qt(i,t),t=cc(e.stateNode,t,2),e=Zn(e,t,2),e!==null&&(ss(e,2),un(e))}function Ce(e,t,i){if(e.tag===3)yg(e,e,i);else for(;t!==null;){if(t.tag===3){yg(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ea===null||!ea.has(l))){e=qt(i,e),i=bp(2),l=Zn(t,i,2),l!==null&&(Sp(i,l,t,e),ss(l,2),un(l));break}}t=t.return}}function Lc(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new wS;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(i)||(Ac=!0,o.add(i),e=AS.bind(null,e,t,i),t.then(e,e))}function AS(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ve===e&&(ye&i)===i&&(Ye===4||Ye===3&&(ye&62914560)===ye&&300>Ct()-Tr?(Ne&2)===0&&zi(e,0):Cc|=i,Oi===ye&&(Oi=0)),un(e)}function bg(e,t){t===0&&(t=mh()),e=Ca(e,t),e!==null&&(ss(e,t),un(e))}function CS(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),bg(e,i)}function MS(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(i=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),bg(e,i)}function DS(e,t){return Zo(e,t)}var Dr=null,Li=null,Vc=!1,Or=!1,_c=!1,aa=0;function un(e){e!==Li&&e.next===null&&(Li===null?Dr=Li=e:Li=Li.next=e),Or=!0,Vc||(Vc=!0,RS())}function Bs(e,t){if(!_c&&Or){_c=!0;do for(var i=!1,l=Dr;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var c=0;else{var v=l.suspendedLanes,b=l.pingedLanes;c=(1<<31-Dt(42|e)+1)-1,c&=o&~(v&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(i=!0,jg(l,c))}else c=ye,c=Ll(l,l===Ve?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||is(l,c)||(i=!0,jg(l,c));l=l.next}while(i);_c=!1}}function OS(){Sg()}function Sg(){Or=Vc=!1;var e=0;aa!==0&&qS()&&(e=aa);for(var t=Ct(),i=null,l=Dr;l!==null;){var o=l.next,c=wg(l,t);c===0?(l.next=null,i===null?Dr=o:i.next=o,o===null&&(Li=i)):(i=l,(e!==0||(c&3)!==0)&&(Or=!0)),l=o}tt!==0&&tt!==5||Bs(e),aa!==0&&(aa=0)}function wg(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var v=31-Dt(c),b=1<<v,N=o[v];N===-1?((b&i)===0||(b&l)!==0)&&(o[v]=i1(b,t)):N<=t&&(e.expiredLanes|=b),c&=~b}if(t=Ve,i=ye,i=Ll(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qo(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||is(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Qo(l),Wo(i)){case 2:case 8:i=dh;break;case 32:i=Ol;break;case 268435456:i=hh;break;default:i=Ol}return l=Tg.bind(null,e),i=Zo(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Qo(l),e.callbackPriority=2,e.callbackNode=null,2}function Tg(e,t){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Mr()&&e.callbackNode!==i)return null;var l=ye;return l=Ll(e,e===Ve?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(ig(e,l,t),wg(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?Tg.bind(null,e):null)}function jg(e,t){if(Mr())return null;ig(e,t,!0)}function RS(){GS(function(){(Ne&6)!==0?Zo(fh,OS):Sg()})}function Uc(){if(aa===0){var e=bi;e===0&&(e=Rl,Rl<<=1,(Rl&261888)===0&&(Rl=256)),aa=e}return aa}function Eg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bl(""+e)}function Ng(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function zS(e,t,i,l,o){if(t==="submit"&&i&&i.stateNode===o){var c=Eg((o[yt]||null).action),v=l.submitter;v&&(t=(t=v[yt]||null)?Eg(t.formAction):v.getAttribute("formAction"),t!==null&&(c=t,v=null));var b=new Yl("action","action",null,l,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(aa!==0){var N=v?Ng(o,v):new FormData(o);ic(i,{pending:!0,data:N,method:o.method,action:c},null,N)}}else typeof c=="function"&&(b.preventDefault(),N=v?Ng(o,v):new FormData(o),ic(i,{pending:!0,data:N,method:o.method,action:c},c,N))},currentTarget:o}]})}}for(var Bc=0;Bc<Su.length;Bc++){var Hc=Su[Bc],kS=Hc.toLowerCase(),LS=Hc[0].toUpperCase()+Hc.slice(1);Wt(kS,"on"+LS)}Wt(am,"onAnimationEnd"),Wt(im,"onAnimationIteration"),Wt(sm,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(J1,"onTransitionRun"),Wt(W1,"onTransitionStart"),Wt(I1,"onTransitionCancel"),Wt(lm,"onTransitionEnd"),li("onMouseEnter",["mouseout","mouseover"]),li("onMouseLeave",["mouseout","mouseover"]),li("onPointerEnter",["pointerout","pointerover"]),li("onPointerLeave",["pointerout","pointerover"]),ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hs="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(" "),VS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hs));function Ag(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],o=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var v=l.length-1;0<=v;v--){var b=l[v],N=b.instance,L=b.currentTarget;if(b=b.listener,N!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=L;try{c(o)}catch(q){Kl(q)}o.currentTarget=null,c=N}else for(v=0;v<l.length;v++){if(b=l[v],N=b.instance,L=b.currentTarget,b=b.listener,N!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=L;try{c(o)}catch(q){Kl(q)}o.currentTarget=null,c=N}}}}function ve(e,t){var i=t[Io];i===void 0&&(i=t[Io]=new Set);var l=e+"__bubble";i.has(l)||(Cg(t,e,2,!1),i.add(l))}function $c(e,t,i){var l=0;t&&(l|=4),Cg(i,e,l,t)}var Rr="_reactListening"+Math.random().toString(36).slice(2);function qc(e){if(!e[Rr]){e[Rr]=!0,Sh.forEach(function(i){i!=="selectionchange"&&(VS.has(i)||$c(i,!1,e),$c(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rr]||(t[Rr]=!0,$c("selectionchange",!1,t))}}function Cg(e,t,i,l){switch(av(t)){case 2:var o=c2;break;case 8:o=f2;break;default:o=af}i=o.bind(null,t,i,e),o=void 0,!ou||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,i,{capture:!0,passive:o}):e.addEventListener(t,i,!0):o!==void 0?e.addEventListener(t,i,{passive:o}):e.addEventListener(t,i,!1)}function Yc(e,t,i,l,o){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var b=l.stateNode.containerInfo;if(b===o)break;if(v===4)for(v=l.return;v!==null;){var N=v.tag;if((N===3||N===4)&&v.stateNode.containerInfo===o)return;v=v.return}for(;b!==null;){if(v=ai(b),v===null)return;if(N=v.tag,N===5||N===6||N===26||N===27){l=c=v;continue e}b=b.parentNode}}l=l.return}zh(function(){var L=c,q=lu(i),X=[];e:{var _=rm.get(e);if(_!==void 0){var H=Yl,ee=e;switch(e){case"keypress":if($l(i)===0)break e;case"keydown":case"keyup":H=M1;break;case"focusin":ee="focus",H=du;break;case"focusout":ee="blur",H=du;break;case"beforeblur":case"afterblur":H=du;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=v1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=R1;break;case am:case im:case sm:H=b1;break;case lm:H=k1;break;case"scroll":case"scrollend":H=p1;break;case"wheel":H=V1;break;case"copy":case"cut":case"paste":H=w1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Uh;break;case"toggle":case"beforetoggle":H=U1}var se=(t&4)!==0,ze=!se&&(e==="scroll"||e==="scrollend"),O=se?_!==null?_+"Capture":null:_;se=[];for(var C=L,k;C!==null;){var Y=C;if(k=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||k===null||O===null||(Y=os(C,O),Y!=null&&se.push($s(C,Y,k))),ze)break;C=C.return}0<se.length&&(_=new H(_,ee,null,i,q),X.push({event:_,listeners:se}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",_&&i!==su&&(ee=i.relatedTarget||i.fromElement)&&(ai(ee)||ee[ni]))break e;if((H||_)&&(_=q.window===q?q:(_=q.ownerDocument)?_.defaultView||_.parentWindow:window,H?(ee=i.relatedTarget||i.toElement,H=L,ee=ee?ai(ee):null,ee!==null&&(ze=d(ee),se=ee.tag,ee!==ze||se!==5&&se!==27&&se!==6)&&(ee=null)):(H=null,ee=L),H!==ee)){if(se=Vh,Y="onMouseLeave",O="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(se=Uh,Y="onPointerLeave",O="onPointerEnter",C="pointer"),ze=H==null?_:rs(H),k=ee==null?_:rs(ee),_=new se(Y,C+"leave",H,i,q),_.target=ze,_.relatedTarget=k,Y=null,ai(q)===L&&(se=new se(O,C+"enter",ee,i,q),se.target=k,se.relatedTarget=ze,Y=se),ze=Y,H&&ee)t:{for(se=_S,O=H,C=ee,k=0,Y=O;Y;Y=se(Y))k++;Y=0;for(var ae=C;ae;ae=se(ae))Y++;for(;0<k-Y;)O=se(O),k--;for(;0<Y-k;)C=se(C),Y--;for(;k--;){if(O===C||C!==null&&O===C.alternate){se=O;break t}O=se(O),C=se(C)}se=null}else se=null;H!==null&&Mg(X,_,H,se,!1),ee!==null&&ze!==null&&Mg(X,ze,ee,se,!0)}}e:{if(_=L?rs(L):window,H=_.nodeName&&_.nodeName.toLowerCase(),H==="select"||H==="input"&&_.type==="file")var je=Kh;else if(Gh(_))if(Fh)je=Z1;else{je=K1;var ne=X1}else H=_.nodeName,!H||H.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?L&&iu(L.elementType)&&(je=Kh):je=F1;if(je&&(je=je(e,L))){Xh(X,je,i,q);break e}ne&&ne(e,_,L),e==="focusout"&&L&&_.type==="number"&&L.memoizedProps.value!=null&&au(_,"number",_.value)}switch(ne=L?rs(L):window,e){case"focusin":(Gh(ne)||ne.contentEditable==="true")&&(di=ne,xu=L,gs=null);break;case"focusout":gs=xu=di=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,tm(X,i,q);break;case"selectionchange":if(P1)break;case"keydown":case"keyup":tm(X,i,q)}var he;if(mu)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else fi?qh(e,i)&&(be="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(be="onCompositionStart");be&&(Bh&&i.locale!=="ko"&&(fi||be!=="onCompositionStart"?be==="onCompositionEnd"&&fi&&(he=kh()):($n=q,uu="value"in $n?$n.value:$n.textContent,fi=!0)),ne=zr(L,be),0<ne.length&&(be=new _h(be,e,null,i,q),X.push({event:be,listeners:ne}),he?be.data=he:(he=Yh(i),he!==null&&(be.data=he)))),(he=H1?$1(e,i):q1(e,i))&&(be=zr(L,"onBeforeInput"),0<be.length&&(ne=new _h("onBeforeInput","beforeinput",null,i,q),X.push({event:ne,listeners:be}),ne.data=he)),zS(X,e,L,i,q)}Ag(X,t)})}function $s(e,t,i){return{instance:e,listener:t,currentTarget:i}}function zr(e,t){for(var i=t+"Capture",l=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=os(e,i),o!=null&&l.unshift($s(e,o,c)),o=os(e,t),o!=null&&l.push($s(e,o,c))),e.tag===3)return l;e=e.return}return[]}function _S(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mg(e,t,i,l,o){for(var c=t._reactName,v=[];i!==null&&i!==l;){var b=i,N=b.alternate,L=b.stateNode;if(b=b.tag,N!==null&&N===l)break;b!==5&&b!==26&&b!==27||L===null||(N=L,o?(L=os(i,c),L!=null&&v.unshift($s(i,L,N))):o||(L=os(i,c),L!=null&&v.push($s(i,L,N)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var US=/\r\n?/g,BS=/\u0000|\uFFFD/g;function Dg(e){return(typeof e=="string"?e:""+e).replace(US,`
|
|
49
|
-
`).replace(BS,"")}function Og(e,t){return t=Dg(t),Dg(e)===t}function Re(e,t,i,l,o,c){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||oi(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&oi(e,""+l);break;case"className":_l(e,"class",l);break;case"tabIndex":_l(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":_l(e,i,l);break;case"style":Oh(e,l,c);break;case"data":if(t!=="object"){_l(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Bl(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(i==="formAction"?(t!=="input"&&Re(e,t,"name",o.name,o,null),Re(e,t,"formEncType",o.formEncType,o,null),Re(e,t,"formMethod",o.formMethod,o,null),Re(e,t,"formTarget",o.formTarget,o,null)):(Re(e,t,"encType",o.encType,o,null),Re(e,t,"method",o.method,o,null),Re(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Bl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=xn);break;case"onScroll":l!=null&&ve("scroll",e);break;case"onScrollEnd":l!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(i=l.__html,i!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=i}}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}i=Bl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+l):e.removeAttribute(i);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(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":ve("beforetoggle",e),ve("toggle",e),Vl(e,"popover",l);break;case"xlinkActuate":vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":vn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":vn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":vn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":vn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Vl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=h1.get(i)||i,Vl(e,i,l))}}function Gc(e,t,i,l,o,c){switch(i){case"style":Oh(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(i=l.__html,i!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof l=="string"?oi(e,l):(typeof l=="number"||typeof l=="bigint")&&oi(e,""+l);break;case"onScroll":l!=null&&ve("scroll",e);break;case"onScrollEnd":l!=null&&ve("scrollend",e);break;case"onClick":l!=null&&(e.onclick=xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(o=i.endsWith("Capture"),t=i.slice(2,o?i.length-7:void 0),c=e[yt]||null,c=c!=null?c[i]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof l=="function")){typeof c!="function"&&c!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,o);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):Vl(e,i,l)}}}function ut(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var l=!1,o=!1,c;for(c in i)if(i.hasOwnProperty(c)){var v=i[c];if(v!=null)switch(c){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,c,v,i,null)}}o&&Re(e,t,"srcSet",i.srcSet,i,null),l&&Re(e,t,"src",i.src,i,null);return;case"input":ve("invalid",e);var b=c=v=o=null,N=null,L=null;for(l in i)if(i.hasOwnProperty(l)){var q=i[l];if(q!=null)switch(l){case"name":o=q;break;case"type":v=q;break;case"checked":N=q;break;case"defaultChecked":L=q;break;case"value":c=q;break;case"defaultValue":b=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:Re(e,t,l,q,i,null)}}Ah(e,c,b,N,L,v,o,!1);return;case"select":ve("invalid",e),l=v=c=null;for(o in i)if(i.hasOwnProperty(o)&&(b=i[o],b!=null))switch(o){case"value":c=b;break;case"defaultValue":v=b;break;case"multiple":l=b;default:Re(e,t,o,b,i,null)}t=c,i=v,e.multiple=!!l,t!=null?ri(e,!!l,t,!1):i!=null&&ri(e,!!l,i,!0);return;case"textarea":ve("invalid",e),c=o=l=null;for(v in i)if(i.hasOwnProperty(v)&&(b=i[v],b!=null))switch(v){case"value":l=b;break;case"defaultValue":o=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Re(e,t,v,b,i,null)}Mh(e,l,o,c);return;case"option":for(N in i)if(i.hasOwnProperty(N)&&(l=i[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Re(e,t,N,l,i,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(l=0;l<Hs.length;l++)ve(Hs[l],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(L in i)if(i.hasOwnProperty(L)&&(l=i[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,L,l,i,null)}return;default:if(iu(t)){for(q in i)i.hasOwnProperty(q)&&(l=i[q],l!==void 0&&Gc(e,t,q,l,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(l=i[b],l!=null&&Re(e,t,b,l,i,null))}function HS(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,v=null,b=null,N=null,L=null,q=null;for(H in i){var X=i[H];if(i.hasOwnProperty(H)&&X!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":N=X;default:l.hasOwnProperty(H)||Re(e,t,H,null,l,X)}}for(var _ in l){var H=l[_];if(X=i[_],l.hasOwnProperty(_)&&(H!=null||X!=null))switch(_){case"type":c=H;break;case"name":o=H;break;case"checked":L=H;break;case"defaultChecked":q=H;break;case"value":v=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:H!==X&&Re(e,t,_,H,l,X)}}nu(e,v,b,N,L,q,c,o);return;case"select":H=v=b=_=null;for(c in i)if(N=i[c],i.hasOwnProperty(c)&&N!=null)switch(c){case"value":break;case"multiple":H=N;default:l.hasOwnProperty(c)||Re(e,t,c,null,l,N)}for(o in l)if(c=l[o],N=i[o],l.hasOwnProperty(o)&&(c!=null||N!=null))switch(o){case"value":_=c;break;case"defaultValue":b=c;break;case"multiple":v=c;default:c!==N&&Re(e,t,o,c,l,N)}t=b,i=v,l=H,_!=null?ri(e,!!i,_,!1):!!l!=!!i&&(t!=null?ri(e,!!i,t,!0):ri(e,!!i,i?[]:"",!1));return;case"textarea":H=_=null;for(b in i)if(o=i[b],i.hasOwnProperty(b)&&o!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Re(e,t,b,null,l,o)}for(v in l)if(o=l[v],c=i[v],l.hasOwnProperty(v)&&(o!=null||c!=null))switch(v){case"value":_=o;break;case"defaultValue":H=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Re(e,t,v,o,l,c)}Ch(e,_,H);return;case"option":for(var ee in i)if(_=i[ee],i.hasOwnProperty(ee)&&_!=null&&!l.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Re(e,t,ee,null,l,_)}for(N in l)if(_=l[N],H=i[N],l.hasOwnProperty(N)&&_!==H&&(_!=null||H!=null))switch(N){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Re(e,t,N,_,l,H)}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 se in i)_=i[se],i.hasOwnProperty(se)&&_!=null&&!l.hasOwnProperty(se)&&Re(e,t,se,null,l,_);for(L in l)if(_=l[L],H=i[L],l.hasOwnProperty(L)&&_!==H&&(_!=null||H!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(137,t));break;default:Re(e,t,L,_,l,H)}return;default:if(iu(t)){for(var ze in i)_=i[ze],i.hasOwnProperty(ze)&&_!==void 0&&!l.hasOwnProperty(ze)&&Gc(e,t,ze,void 0,l,_);for(q in l)_=l[q],H=i[q],!l.hasOwnProperty(q)||_===H||_===void 0&&H===void 0||Gc(e,t,q,_,l,H);return}}for(var O in i)_=i[O],i.hasOwnProperty(O)&&_!=null&&!l.hasOwnProperty(O)&&Re(e,t,O,null,l,_);for(X in l)_=l[X],H=i[X],!l.hasOwnProperty(X)||_===H||_==null&&H==null||Re(e,t,X,_,l,H)}function Rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $S(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var o=i[l],c=o.transferSize,v=o.initiatorType,b=o.duration;if(c&&b&&Rg(v)){for(v=0,b=o.responseEnd,l+=1;l<i.length;l++){var N=i[l],L=N.startTime;if(L>b)break;var q=N.transferSize,X=N.initiatorType;q&&Rg(X)&&(N=N.responseEnd,v+=q*(N<b?1:(b-L)/(N-L)))}if(--l,t+=8*(c+v)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Xc=null,Kc=null;function kr(e){return e.nodeType===9?e:e.ownerDocument}function zg(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 kg(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 Fc(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 Zc=null;function qS(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var Lg=typeof setTimeout=="function"?setTimeout:void 0,YS=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,GS=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(e){return Vg.resolve(null).then(e).catch(XS)}:Lg;function XS(e){setTimeout(function(){throw e})}function ia(e){return e==="head"}function _g(e,t){var i=t,l=0;do{var o=i.nextSibling;if(e.removeChild(i),o&&o.nodeType===8)if(i=o.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(o),Bi(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")qs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,qs(i);for(var c=i.firstChild;c;){var v=c.nextSibling,b=c.nodeName;c[ls]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||i.removeChild(c),c=v}}else i==="body"&&qs(e.ownerDocument.body);i=o}while(i);Bi(t)}function Ug(e,t){var i=e;e=0;do{var l=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function Qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Qc(i),eu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function KS(e,t,i,l){for(;e.nodeType===1;){var o=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ls])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ft(e.nextSibling),e===null)break}return null}function FS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ft(e.nextSibling),e===null))return null;return e}function Bg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ft(e.nextSibling),e===null))return null;return e}function Pc(e){return e.data==="$?"||e.data==="$~"}function Jc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ZS(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ft(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 Wc=null;function Hg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ft(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function $g(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function qg(e,t,i){switch(t=kr(i),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function qs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eu(e)}var Zt=new Map,Yg=new Set;function Lr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kn=Q.d;Q.d={f:QS,r:PS,D:JS,C:WS,L:IS,m:e2,X:n2,S:t2,M:a2};function QS(){var e=kn.f(),t=Nr();return e||t}function PS(e){var t=ii(e);t!==null&&t.tag===5&&t.type==="form"?lp(t):kn.r(e)}var Vi=typeof document>"u"?null:document;function Gg(e,t,i){var l=Vi;if(l&&typeof t=="string"&&t){var o=Ht(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof i=="string"&&(o+='[crossorigin="'+i+'"]'),Yg.has(o)||(Yg.add(o),e={rel:e,crossOrigin:i,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),ut(t,"link",e),at(t),l.head.appendChild(t)))}}function JS(e){kn.D(e),Gg("dns-prefetch",e,null)}function WS(e,t){kn.C(e,t),Gg("preconnect",e,t)}function IS(e,t,i){kn.L(e,t,i);var l=Vi;if(l&&e&&t){var o='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&i&&i.imageSrcSet?(o+='[imagesrcset="'+Ht(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(o+='[imagesizes="'+Ht(i.imageSizes)+'"]')):o+='[href="'+Ht(e)+'"]';var c=o;switch(t){case"style":c=_i(e);break;case"script":c=Ui(e)}Zt.has(c)||(e=y({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(c,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Ys(c))||t==="script"&&l.querySelector(Gs(c))||(t=l.createElement("link"),ut(t,"link",e),at(t),l.head.appendChild(t)))}}function e2(e,t){kn.m(e,t);var i=Vi;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Ht(l)+'"][href="'+Ht(e)+'"]',c=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ui(e)}if(!Zt.has(c)&&(e=y({rel:"modulepreload",href:e},t),Zt.set(c,e),i.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Gs(c)))return}l=i.createElement("link"),ut(l,"link",e),at(l),i.head.appendChild(l)}}}function t2(e,t,i){kn.S(e,t,i);var l=Vi;if(l&&e){var o=si(l).hoistableStyles,c=_i(e);t=t||"default";var v=o.get(c);if(!v){var b={loading:0,preload:null};if(v=l.querySelector(Ys(c)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(c))&&Ic(e,i);var N=v=l.createElement("link");at(N),ut(N,"link",e),N._p=new Promise(function(L,q){N.onload=L,N.onerror=q}),N.addEventListener("load",function(){b.loading|=1}),N.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Vr(v,t,l)}v={type:"stylesheet",instance:v,count:1,state:b},o.set(c,v)}}}function n2(e,t){kn.X(e,t);var i=Vi;if(i&&e){var l=si(i).hoistableScripts,o=Ui(e),c=l.get(o);c||(c=i.querySelector(Gs(o)),c||(e=y({src:e,async:!0},t),(t=Zt.get(o))&&ef(e,t),c=i.createElement("script"),at(c),ut(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function a2(e,t){kn.M(e,t);var i=Vi;if(i&&e){var l=si(i).hoistableScripts,o=Ui(e),c=l.get(o);c||(c=i.querySelector(Gs(o)),c||(e=y({src:e,async:!0,type:"module"},t),(t=Zt.get(o))&&ef(e,t),c=i.createElement("script"),at(c),ut(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function Xg(e,t,i,l){var o=(o=pe.current)?Lr(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=_i(i.href),i=si(o).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=_i(i.href);var c=si(o).hoistableStyles,v=c.get(e);if(v||(o=o.ownerDocument||o,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,v),(c=o.querySelector(Ys(e)))&&!c._p&&(v.instance=c,v.state.loading=5),Zt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Zt.set(e,i),c||i2(o,e,i,v.state))),t&&l===null)throw Error(r(528,""));return v}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(i),i=si(o).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function _i(e){return'href="'+Ht(e)+'"'}function Ys(e){return'link[rel="stylesheet"]['+e+"]"}function Kg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function i2(e,t,i,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}),ut(t,"link",i),at(t),e.head.appendChild(t))}function Ui(e){return'[src="'+Ht(e)+'"]'}function Gs(e){return"script[async]"+e}function Fg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ht(i.href)+'"]');if(l)return t.instance=l,at(l),l;var o=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),at(l),ut(l,"style",o),Vr(l,i.precedence,e),t.instance=l;case"stylesheet":o=_i(i.href);var c=e.querySelector(Ys(o));if(c)return t.state.loading|=4,t.instance=c,at(c),c;l=Kg(i),(o=Zt.get(o))&&Ic(l,o),c=(e.ownerDocument||e).createElement("link"),at(c);var v=c;return v._p=new Promise(function(b,N){v.onload=b,v.onerror=N}),ut(c,"link",l),t.state.loading|=4,Vr(c,i.precedence,e),t.instance=c;case"script":return c=Ui(i.src),(o=e.querySelector(Gs(c)))?(t.instance=o,at(o),o):(l=i,(o=Zt.get(c))&&(l=y({},i),ef(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),at(o),ut(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Vr(l,i.precedence,e));return t.instance}function Vr(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,c=o,v=0;v<l.length;v++){var b=l[v];if(b.dataset.precedence===t)c=b;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Ic(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _r=null;function Zg(e,t,i){if(_r===null){var l=new Map,o=_r=new Map;o.set(i,l)}else o=_r,l=o.get(i),l||(l=new Map,o.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),o=0;o<i.length;o++){var c=i[o];if(!(c[ls]||c[st]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var v=c.getAttribute(t)||"";v=e+v;var b=l.get(v);b?b.push(c):l.set(v,[c])}}return l}function Qg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function s2(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function l2(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var o=_i(l.href),c=t.querySelector(Ys(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ur.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=c,at(c);return}c=t.ownerDocument||t,l=Kg(l),(o=Zt.get(o))&&Ic(l,o),c=c.createElement("link"),at(c);var v=c;v._p=new Promise(function(b,N){v.onload=b,v.onerror=N}),ut(c,"link",l),i.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ur.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var tf=0;function r2(e,t){return e.stylesheets&&e.count===0&&Hr(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Hr(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&tf===0&&(tf=62500*$S());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Hr(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>tf?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Ur(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Br=null;function Hr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Br=new Map,t.forEach(o2,e),Br=null,Ur.call(e))}function o2(e,t){if(!(t.state.loading&4)){var i=Br.get(e);if(i)var l=i.get(null);else{i=new Map,Br.set(e,i);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var v=o[c];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}o=t.instance,v=o.getAttribute("data-precedence"),c=i.get(v)||l,c===l&&i.set(null,o),i.set(v,o),this.count++,l=Ur.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Xs={$$typeof:V,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function u2(e,t,i,l,o,c,v,b,N){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=Po(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Po(0),this.hiddenUpdates=Po(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Jg(e,t,i,l,o,c,v,b,N,L,q,X){return e=new u2(e,t,i,v,N,L,q,X,b),t=1,c===!0&&(t|=24),c=Rt(3,null,null,t),e.current=c,c.stateNode=e,t=ku(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:i,cache:t},Uu(c),e}function Wg(e){return e?(e=pi,e):pi}function Ig(e,t,i,l,o,c){o=Wg(o),l.context===null?l.context=o:l.pendingContext=o,l=Fn(t),l.payload={element:i},c=c===void 0?null:c,c!==null&&(l.callback=c),i=Zn(e,l,t),i!==null&&(Et(i,e,t),Ts(i,e,t))}function ev(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function nf(e,t){ev(e,t),(e=e.alternate)&&ev(e,t)}function tv(e){if(e.tag===13||e.tag===31){var t=Ca(e,67108864);t!==null&&Et(t,e,67108864),nf(e,67108864)}}function nv(e){if(e.tag===13||e.tag===31){var t=_t();t=Jo(t);var i=Ca(e,t);i!==null&&Et(i,e,t),nf(e,t)}}var $r=!0;function c2(e,t,i,l){var o=$.T;$.T=null;var c=Q.p;try{Q.p=2,af(e,t,i,l)}finally{Q.p=c,$.T=o}}function f2(e,t,i,l){var o=$.T;$.T=null;var c=Q.p;try{Q.p=8,af(e,t,i,l)}finally{Q.p=c,$.T=o}}function af(e,t,i,l){if($r){var o=sf(l);if(o===null)Yc(e,t,l,qr,i),iv(e,l);else if(h2(o,e,t,i,l))l.stopPropagation();else if(iv(e,l),t&4&&-1<d2.indexOf(e)){for(;o!==null;){var c=ii(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var v=Ta(c.pendingLanes);if(v!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;v;){var N=1<<31-Dt(v);b.entanglements[1]|=N,v&=~N}un(c),(Ne&6)===0&&(jr=Ct()+500,Bs(0))}}break;case 31:case 13:b=Ca(c,2),b!==null&&Et(b,c,2),Nr(),nf(c,2)}if(c=sf(l),c===null&&Yc(e,t,l,qr,i),c===o)break;o=c}o!==null&&l.stopPropagation()}else Yc(e,t,l,null,i)}}function sf(e){return e=lu(e),lf(e)}var qr=null;function lf(e){if(qr=null,e=ai(e),e!==null){var t=d(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=h(t),e!==null)return e;e=null}else if(i===31){if(e=p(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qr=e,null}function av(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(Jb()){case fh:return 2;case dh:return 8;case Ol:case Wb:return 32;case hh:return 268435456;default:return 32}default:return 32}}var rf=!1,sa=null,la=null,ra=null,Ks=new Map,Fs=new Map,oa=[],d2="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 iv(e,t){switch(e){case"focusin":case"focusout":sa=null;break;case"dragenter":case"dragleave":la=null;break;case"mouseover":case"mouseout":ra=null;break;case"pointerover":case"pointerout":Ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(t.pointerId)}}function Zs(e,t,i,l,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:c,targetContainers:[o]},t!==null&&(t=ii(t),t!==null&&tv(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function h2(e,t,i,l,o){switch(t){case"focusin":return sa=Zs(sa,e,t,i,l,o),!0;case"dragenter":return la=Zs(la,e,t,i,l,o),!0;case"mouseover":return ra=Zs(ra,e,t,i,l,o),!0;case"pointerover":var c=o.pointerId;return Ks.set(c,Zs(Ks.get(c)||null,e,t,i,l,o)),!0;case"gotpointercapture":return c=o.pointerId,Fs.set(c,Zs(Fs.get(c)||null,e,t,i,l,o)),!0}return!1}function sv(e){var t=ai(e.target);if(t!==null){var i=d(t);if(i!==null){if(t=i.tag,t===13){if(t=h(i),t!==null){e.blockedOn=t,yh(e.priority,function(){nv(i)});return}}else if(t===31){if(t=p(i),t!==null){e.blockedOn=t,yh(e.priority,function(){nv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=sf(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);su=l,i.target.dispatchEvent(l),su=null}else return t=ii(i),t!==null&&tv(t),e.blockedOn=i,!1;t.shift()}return!0}function lv(e,t,i){Yr(e)&&i.delete(t)}function m2(){rf=!1,sa!==null&&Yr(sa)&&(sa=null),la!==null&&Yr(la)&&(la=null),ra!==null&&Yr(ra)&&(ra=null),Ks.forEach(lv),Fs.forEach(lv)}function Gr(e,t){e.blockedOn===t&&(e.blockedOn=null,rf||(rf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,m2)))}var Xr=null;function rv(e){Xr!==e&&(Xr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Xr===e&&(Xr=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(lf(l||i)===null)continue;break}var c=ii(i);c!==null&&(e.splice(t,3),t-=3,ic(c,{pending:!0,data:o,method:i.method,action:l},l,o))}}))}function Bi(e){function t(N){return Gr(N,e)}sa!==null&&Gr(sa,e),la!==null&&Gr(la,e),ra!==null&&Gr(ra,e),Ks.forEach(t),Fs.forEach(t);for(var i=0;i<oa.length;i++){var l=oa[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<oa.length&&(i=oa[0],i.blockedOn===null);)sv(i),i.blockedOn===null&&oa.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var o=i[l],c=i[l+1],v=o[yt]||null;if(typeof c=="function")v||rv(i);else if(v){var b=null;if(c&&c.hasAttribute("formAction")){if(o=c,v=c[yt]||null)b=v.formAction;else if(lf(o)!==null)continue}else b=v.action;typeof b=="function"?i[l+1]=b:(i.splice(l,3),l-=3),rv(i)}}}function ov(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(v){return o=v})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function of(e){this._internalRoot=e}Kr.prototype.render=of.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var i=t.current,l=_t();Ig(i,l,e,t,null,null)},Kr.prototype.unmount=of.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ig(e.current,2,null,e,null,null),Nr(),t[ni]=null}};function Kr(e){this._internalRoot=e}Kr.prototype.unstable_scheduleHydration=function(e){if(e){var t=xh();e={blockedOn:null,target:e,priority:t};for(var i=0;i<oa.length&&t!==0&&t<oa[i].priority;i++);oa.splice(i,0,e),i===0&&sv(e)}};var uv=a.version;if(uv!=="19.2.4")throw Error(r(527,uv,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var p2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fr.isDisabled&&Fr.supportsFiber)try{as=Fr.inject(p2),Mt=Fr}catch{}}return Ps.createRoot=function(e,t){if(!u(e))throw Error(r(299));var i=!1,l="",o=gp,c=vp,v=xp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=Jg(e,1,!1,null,null,i,l,null,o,c,v,ov),e[ni]=t.current,qc(e),new of(t)},Ps.hydrateRoot=function(e,t,i){if(!u(e))throw Error(r(299));var l=!1,o="",c=gp,v=vp,b=xp,N=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(c=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(N=i.formState)),t=Jg(e,1,!0,t,i??null,l,o,N,c,v,b,ov),t.context=Wg(null),i=t.current,l=_t(),l=Jo(l),o=Fn(l),o.callback=null,Zn(i,o,l),i=l,t.current.lanes=i,ss(t,i),un(t),e[ni]=t.current,qc(e),new Kr(t)},Ps.version="19.2.4",Ps}var bv;function N2(){if(bv)return ff.exports;bv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),ff.exports=E2(),ff.exports}var A2=N2();const lx="/api";async function _e(n){const a=await fetch(`${lx}${n}`,{headers:{accept:"application/json"}});if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function C2(n){const a=new EventSource(`${lx}/events`);return a.addEventListener("state-changed",s=>{try{const r=JSON.parse(s.data);n("state-changed",r)}catch{n("state-changed",{})}}),a.onerror=()=>{},()=>a.close()}function et(n){if(!n)return"unknown";const a=Date.now()-new Date(n).getTime();return a<0||a<6e4?"just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}function pt(n,a){if(!n)return"";if(n.length<=a)return n;const s=n.lastIndexOf(" ",a);return(s>a*.6?n.slice(0,s):n.slice(0,a))+"…"}const rx=w.createContext(()=>{});function Pi(){return w.useContext(rx)}const M2=new Set(["overview","mail","sessions","work","connections","inner","notes","runtime"]);function ox(n){const a=n.replace(/^#\/?/,"");if(!a.startsWith("agent/"))return null;const s=a.split("/"),r=s[1]?decodeURIComponent(s[1]):"";if(!r)return null;const u=s[2]??"overview",d=M2.has(u)?u:"overview",h=s.slice(3),p=h.length>0?h.map(decodeURIComponent).join("/"):void 0;return{agent:r,tab:d,focus:p}}function $f(n){let a=`#/agent/${encodeURIComponent(n.agent)}`;return(n.tab!=="overview"||n.focus)&&(a+=`/${n.tab}`),n.focus&&(a+=`/${n.focus.split("/").map(encodeURIComponent).join("/")}`),a}const D2=typeof document<"u"?ce.useLayoutEffect:()=>{},ba=n=>{var a;return(a=n==null?void 0:n.ownerDocument)!==null&&a!==void 0?a:document},Xa=n=>n&&"window"in n&&n.window===n?n:ba(n).defaultView||window;function O2(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function R2(n){return O2(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let z2=!1;function Ed(){return z2}function Ka(n,a){if(!Ed())return a&&n?n.contains(a):!1;if(!n||!a)return!1;let s=a;for(;s!==null;){if(s===n)return!0;s.tagName==="SLOT"&&s.assignedSlot?s=s.assignedSlot.parentNode:R2(s)?s=s.host:s=s.parentNode}return!1}const Fi=(n=document)=>{var a;if(!Ed())return n.activeElement;let s=n.activeElement;for(;s&&"shadowRoot"in s&&(!((a=s.shadowRoot)===null||a===void 0)&&a.activeElement);)s=s.shadowRoot.activeElement;return s};function gt(n){if(Ed()&&n.target instanceof Element&&n.target.shadowRoot){var a,s;if("composedPath"in n)return(a=n.composedPath()[0])!==null&&a!==void 0?a:null;if("composedPath"in n.nativeEvent)return(s=n.nativeEvent.composedPath()[0])!==null&&s!==void 0?s:null}return n.target}function ux(n){var a,s,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(a=0;a<u;a++)n[a]&&(s=ux(n[a]))&&(r&&(r+=" "),r+=s)}else for(s in n)n[s]&&(r&&(r+=" "),r+=s);return r}function Fe(){for(var n,a,s=0,r="",u=arguments.length;s<u;s++)(n=arguments[s])&&(a=ux(n))&&(r&&(r+=" "),r+=a);return r}function k2(n){if(L2())n.focus({preventScroll:!0});else{let a=V2(n);n.focus(),_2(a)}}let Zr=null;function L2(){if(Zr==null){Zr=!1;try{document.createElement("div").focus({get preventScroll(){return Zr=!0,!0}})}catch{}}return Zr}function V2(n){let a=n.parentNode,s=[],r=document.scrollingElement||document.documentElement;for(;a instanceof HTMLElement&&a!==r;)(a.offsetHeight<a.scrollHeight||a.offsetWidth<a.scrollWidth)&&s.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),a=a.parentNode;return r instanceof HTMLElement&&s.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),s}function _2(n){for(let{element:a,scrollTop:s,scrollLeft:r}of n)a.scrollTop=s,a.scrollLeft=r}function Do(n){var a;if(typeof window>"u"||window.navigator==null)return!1;let s=(a=window.navigator.userAgentData)===null||a===void 0?void 0:a.brands;return Array.isArray(s)&&s.some(r=>n.test(r.brand))||n.test(window.navigator.userAgent)}function cx(n){var a;return typeof window<"u"&&window.navigator!=null?n.test(((a=window.navigator.userAgentData)===null||a===void 0?void 0:a.platform)||window.navigator.platform):!1}function Ji(n){let a=null;return()=>(a==null&&(a=n()),a)}const mo=Ji(function(){return cx(/^Mac/i)}),U2=Ji(function(){return cx(/^iPad/i)||mo()&&navigator.maxTouchPoints>1}),B2=Ji(function(){return Do(/AppleWebKit/i)&&!H2()}),H2=Ji(function(){return Do(/Chrome/i)}),$2=Ji(function(){return Do(/Android/i)}),q2=Ji(function(){return Do(/Firefox/i)});function gl(n,a,s=!0){var r,u;let{metaKey:d,ctrlKey:h,altKey:p,shiftKey:m}=a;q2()&&(!((u=window.event)===null||u===void 0||(r=u.type)===null||r===void 0)&&r.startsWith("key"))&&n.target==="_blank"&&(mo()?d=!0:h=!0);let g=B2()&&mo()&&!U2()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:d,ctrlKey:h,altKey:p,shiftKey:m}):new MouseEvent("click",{metaKey:d,ctrlKey:h,altKey:p,shiftKey:m,detail:1,bubbles:!0,cancelable:!0});gl.isOpening=s,k2(n),n.dispatchEvent(g),gl.isOpening=!1}gl.isOpening=!1;function fx(){let n=w.useRef(new Map),a=w.useCallback((u,d,h,p)=>{let m=p!=null&&p.once?(...g)=>{n.current.delete(h),h(...g)}:h;n.current.set(h,{type:d,eventTarget:u,fn:m,options:p}),u.addEventListener(d,m,p)},[]),s=w.useCallback((u,d,h,p)=>{var m;let g=((m=n.current.get(h))===null||m===void 0?void 0:m.fn)||h;u.removeEventListener(d,g,p),n.current.delete(h)},[]),r=w.useCallback(()=>{n.current.forEach((u,d)=>{s(u.eventTarget,u.type,d,u.options)})},[s]);return w.useEffect(()=>r,[r]),{addGlobalListener:a,removeGlobalListener:s,removeAllGlobalListeners:r}}function Y2(n){return n.pointerType===""&&n.isTrusted?!0:$2()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}var G2=sx();function dx(n){let a=n;return a.nativeEvent=n,a.isDefaultPrevented=()=>a.defaultPrevented,a.isPropagationStopped=()=>a.cancelBubble,a.persist=()=>{},a}function X2(n,a){Object.defineProperty(n,"target",{value:a}),Object.defineProperty(n,"currentTarget",{value:a})}function hx(n){let a=w.useRef({isFocused:!1,observer:null});return D2(()=>{const s=a.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]),w.useCallback(s=>{let r=gt(s);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){a.current.isFocused=!0;let u=r,d=h=>{if(a.current.isFocused=!1,u.disabled){let p=dx(h);n==null||n(p)}a.current.observer&&(a.current.observer.disconnect(),a.current.observer=null)};u.addEventListener("focusout",d,{once:!0}),a.current.observer=new MutationObserver(()=>{if(a.current.isFocused&&u.disabled){var h;(h=a.current.observer)===null||h===void 0||h.disconnect();let p=u===Fi()?null:Fi();u.dispatchEvent(new FocusEvent("blur",{relatedTarget:p})),u.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:p}))}}),a.current.observer.observe(u,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let K2=!1,Sl=null;const qf=new Set;let rl=new Map,Wa=!1,Yf=!1;const F2={Tab:!0,Escape:!0};function Nd(n,a){for(let s of qf)s(n,a)}function Z2(n){return!(n.metaKey||!mo()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function po(n){Wa=!0,!gl.isOpening&&Z2(n)&&(Sl="keyboard",Nd("keyboard",n))}function Ki(n){Sl="pointer","pointerType"in n&&n.pointerType,(n.type==="mousedown"||n.type==="pointerdown")&&(Wa=!0,Nd("pointer",n))}function mx(n){!gl.isOpening&&Y2(n)&&(Wa=!0,Sl="virtual")}function px(n){gt(n)===window||gt(n)===document||K2||!n.isTrusted||(!Wa&&!Yf&&(Sl="virtual",Nd("virtual",n)),Wa=!1,Yf=!1)}function gx(){Wa=!1,Yf=!0}function Gf(n){if(typeof window>"u"||typeof document>"u"||rl.get(Xa(n)))return;const a=Xa(n),s=ba(n);let r=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){Wa=!0,r.apply(this,arguments)},s.addEventListener("keydown",po,!0),s.addEventListener("keyup",po,!0),s.addEventListener("click",mx,!0),a.addEventListener("focus",px,!0),a.addEventListener("blur",gx,!1),typeof PointerEvent<"u"&&(s.addEventListener("pointerdown",Ki,!0),s.addEventListener("pointermove",Ki,!0),s.addEventListener("pointerup",Ki,!0)),a.addEventListener("beforeunload",()=>{vx(n)},{once:!0}),rl.set(a,{focus:r})}const vx=(n,a)=>{const s=Xa(n),r=ba(n);a&&r.removeEventListener("DOMContentLoaded",a),rl.has(s)&&(s.HTMLElement.prototype.focus=rl.get(s).focus,r.removeEventListener("keydown",po,!0),r.removeEventListener("keyup",po,!0),r.removeEventListener("click",mx,!0),s.removeEventListener("focus",px,!0),s.removeEventListener("blur",gx,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",Ki,!0),r.removeEventListener("pointermove",Ki,!0),r.removeEventListener("pointerup",Ki,!0)),rl.delete(s))};function Q2(n){const a=ba(n);let s;return a.readyState!=="loading"?Gf(n):(s=()=>{Gf(n)},a.addEventListener("DOMContentLoaded",s)),()=>vx(n,s)}typeof document<"u"&&Q2();function Xf(){return Sl!=="pointer"}const P2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function J2(n,a,s){let r=ba(s?gt(s):void 0),u=s?gt(s):void 0;const d=typeof window<"u"?Xa(u).HTMLInputElement:HTMLInputElement,h=typeof window<"u"?Xa(u).HTMLTextAreaElement:HTMLTextAreaElement,p=typeof window<"u"?Xa(u).HTMLElement:HTMLElement,m=typeof window<"u"?Xa(u).KeyboardEvent:KeyboardEvent;let g=Fi(r);return n=n||g instanceof d&&!P2.has(g.type)||g instanceof h||g instanceof p&&g.isContentEditable,!(n&&a==="keyboard"&&s instanceof m&&!F2[s.key])}function W2(n,a,s){Gf(),w.useEffect(()=>{if((s==null?void 0:s.enabled)===!1)return;let r=(u,d)=>{J2(!!(s!=null&&s.isTextInput),u,d)&&n(Xf())};return qf.add(r),()=>{qf.delete(r)}},a)}function I2(n){let{isDisabled:a,onFocus:s,onBlur:r,onFocusChange:u}=n;const d=w.useCallback(m=>{if(gt(m)===m.currentTarget)return r&&r(m),u&&u(!1),!0},[r,u]),h=hx(d),p=w.useCallback(m=>{let g=gt(m);const x=ba(g),y=x?Fi(x):Fi();g===m.currentTarget&&g===y&&(s&&s(m),u&&u(!0),h(m))},[u,s,h]);return{focusProps:{onFocus:!a&&(s||u||r)?p:void 0,onBlur:!a&&(r||u)?d:void 0}}}function ew(n){let{isDisabled:a,onBlurWithin:s,onFocusWithin:r,onFocusWithinChange:u}=n,d=w.useRef({isFocusWithin:!1}),{addGlobalListener:h,removeAllGlobalListeners:p}=fx(),m=w.useCallback(y=>{Ka(y.currentTarget,gt(y))&&d.current.isFocusWithin&&!Ka(y.currentTarget,y.relatedTarget)&&(d.current.isFocusWithin=!1,p(),s&&s(y),u&&u(!1))},[s,u,d,p]),g=hx(m),x=w.useCallback(y=>{if(!Ka(y.currentTarget,gt(y)))return;let S=gt(y);const T=ba(S),j=Fi(T);if(!d.current.isFocusWithin&&j===S){r&&r(y),u&&u(!0),d.current.isFocusWithin=!0,g(y);let E=y.currentTarget;h(T,"focus",D=>{let R=gt(D);if(d.current.isFocusWithin&&!Ka(E,R)){let M=new T.defaultView.FocusEvent("blur",{relatedTarget:R});X2(M,E);let V=dx(M);m(V)}},{capture:!0})}},[r,u,g,h,m]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:x,onBlur:m}}}let Kf=!1,Qr=0;function tw(){Kf=!0,setTimeout(()=>{Kf=!1},50)}function Sv(n){n.pointerType==="touch"&&tw()}function nw(){if(!(typeof document>"u"))return Qr===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",Sv),Qr++,()=>{Qr--,!(Qr>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",Sv)}}function xx(n){let{onHoverStart:a,onHoverChange:s,onHoverEnd:r,isDisabled:u}=n,[d,h]=w.useState(!1),p=w.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;w.useEffect(nw,[]);let{addGlobalListener:m,removeAllGlobalListeners:g}=fx(),{hoverProps:x,triggerHoverEnd:y}=w.useMemo(()=>{let S=(E,D)=>{if(p.pointerType=D,u||D==="touch"||p.isHovered||!Ka(E.currentTarget,gt(E)))return;p.isHovered=!0;let R=E.currentTarget;p.target=R,m(ba(gt(E)),"pointerover",M=>{p.isHovered&&p.target&&!Ka(p.target,gt(M))&&T(M,M.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:R,pointerType:D}),s&&s(!0),h(!0)},T=(E,D)=>{let R=p.target;p.pointerType="",p.target=null,!(D==="touch"||!p.isHovered||!R)&&(p.isHovered=!1,g(),r&&r({type:"hoverend",target:R,pointerType:D}),s&&s(!1),h(!1))},j={};return typeof PointerEvent<"u"&&(j.onPointerEnter=E=>{Kf&&E.pointerType==="mouse"||S(E,E.pointerType)},j.onPointerLeave=E=>{!u&&Ka(E.currentTarget,gt(E))&&T(E,E.pointerType)}),{hoverProps:j,triggerHoverEnd:T}},[a,s,r,u,p,m,g]);return w.useEffect(()=>{u&&y({currentTarget:p.target},p.pointerType)},[u]),{hoverProps:x,isHovered:d}}function yx(n={}){let{autoFocus:a=!1,isTextInput:s,within:r}=n,u=w.useRef({isFocused:!1,isFocusVisible:a||Xf()}),[d,h]=w.useState(!1),[p,m]=w.useState(()=>u.current.isFocused&&u.current.isFocusVisible),g=w.useCallback(()=>m(u.current.isFocused&&u.current.isFocusVisible),[]),x=w.useCallback(T=>{u.current.isFocused=T,u.current.isFocusVisible=Xf(),h(T),g()},[g]);W2(T=>{u.current.isFocusVisible=T,g()},[s,d],{enabled:d,isTextInput:s});let{focusProps:y}=I2({isDisabled:r,onFocusChange:x}),{focusWithinProps:S}=ew({isDisabled:!r,onFocusWithinChange:x});return{isFocused:d,isFocusVisible:p,focusProps:r?S:y}}var aw=Object.defineProperty,iw=(n,a,s)=>a in n?aw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,pf=(n,a,s)=>(iw(n,typeof a!="symbol"?a+"":a,s),s);let sw=class{constructor(){pf(this,"current",this.detect()),pf(this,"handoffState","pending"),pf(this,"currentId",0)}set(a){this.current!==a&&(this.handoffState="pending",this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},hn=new sw;function Wi(n){var a;return hn.isServer?null:n==null?document:(a=n==null?void 0:n.ownerDocument)!=null?a:document}function Ff(n){var a,s;return hn.isServer?null:n==null?document:(s=(a=n==null?void 0:n.getRootNode)==null?void 0:a.call(n))!=null?s:document}function bx(n){var a,s;return(s=(a=Ff(n))==null?void 0:a.activeElement)!=null?s:null}function lw(n){return bx(n)===n}function Oo(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(a=>setTimeout(()=>{throw a}))}function Un(){let n=[],a={addEventListener(s,r,u,d){return s.addEventListener(r,u,d),a.add(()=>s.removeEventListener(r,u,d))},requestAnimationFrame(...s){let r=requestAnimationFrame(...s);return a.add(()=>cancelAnimationFrame(r))},nextFrame(...s){return a.requestAnimationFrame(()=>a.requestAnimationFrame(...s))},setTimeout(...s){let r=setTimeout(...s);return a.add(()=>clearTimeout(r))},microTask(...s){let r={current:!0};return Oo(()=>{r.current&&s[0]()}),a.add(()=>{r.current=!1})},style(s,r,u){let d=s.style.getPropertyValue(r);return Object.assign(s.style,{[r]:u}),this.add(()=>{Object.assign(s.style,{[r]:d})})},group(s){let r=Un();return s(r),this.add(()=>r.dispose())},add(s){return n.includes(s)||n.push(s),()=>{let r=n.indexOf(s);if(r>=0)for(let u of n.splice(r,1))u()}},dispose(){for(let s of n.splice(0))s()}};return a}function wl(){let[n]=w.useState(Un);return w.useEffect(()=>()=>n.dispose(),[n]),n}let Nt=(n,a)=>{hn.isServer?w.useEffect(n,a):w.useLayoutEffect(n,a)};function ei(n){let a=w.useRef(n);return Nt(()=>{a.current=n},[n]),a}let Me=function(n){let a=ei(n);return ce.useCallback((...s)=>a.current(...s),[a])};function rw(n){let a=n.width/2,s=n.height/2;return{top:n.clientY-s,right:n.clientX+a,bottom:n.clientY+s,left:n.clientX-a}}function ow(n,a){return!(!n||!a||n.right<a.left||n.left>a.right||n.bottom<a.top||n.top>a.bottom)}function Sx({disabled:n=!1}={}){let a=w.useRef(null),[s,r]=w.useState(!1),u=wl(),d=Me(()=>{a.current=null,r(!1),u.dispose()}),h=Me(p=>{if(u.dispose(),a.current===null){a.current=p.currentTarget,r(!0);{let m=Wi(p.currentTarget);u.addEventListener(m,"pointerup",d,!1),u.addEventListener(m,"pointermove",g=>{if(a.current){let x=rw(g);r(ow(x,a.current.getBoundingClientRect()))}},!1),u.addEventListener(m,"pointercancel",d,!1)}}});return{pressed:s,pressProps:n?{}:{onPointerDown:h,onPointerUp:d,onClick:d}}}function ti(n){return w.useMemo(()=>n,Object.values(n))}let uw=w.createContext(void 0);function wx(){return w.useContext(uw)}function Zf(...n){return Array.from(new Set(n.flatMap(a=>typeof a=="string"?a.split(" "):[]))).filter(Boolean).join(" ")}function _n(n,a,...s){if(n in a){let u=a[n];return typeof u=="function"?u(...s):u}let r=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,_n),r}var go=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(go||{}),ha=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(ha||{});function At(){let n=fw();return w.useCallback(a=>cw({mergeRefs:n,...a}),[n])}function cw({ourProps:n,theirProps:a,slot:s,defaultTag:r,features:u,visible:d=!0,name:h,mergeRefs:p}){p=p??dw;let m=Tx(a,n);if(d)return Pr(m,s,r,h,p);let g=u??0;if(g&2){let{static:x=!1,...y}=m;if(x)return Pr(y,s,r,h,p)}if(g&1){let{unmount:x=!0,...y}=m;return _n(x?0:1,{0(){return null},1(){return Pr({...y,hidden:!0,style:{display:"none"}},s,r,h,p)}})}return Pr(m,s,r,h,p)}function Pr(n,a={},s,r,u){let{as:d=s,children:h,refName:p="ref",...m}=gf(n,["unmount","static"]),g=n.ref!==void 0?{[p]:n.ref}:{},x=typeof h=="function"?h(a):h;"className"in m&&m.className&&typeof m.className=="function"&&(m.className=m.className(a)),m["aria-labelledby"]&&m["aria-labelledby"]===m.id&&(m["aria-labelledby"]=void 0);let y={};if(a){let S=!1,T=[];for(let[j,E]of Object.entries(a))typeof E=="boolean"&&(S=!0),E===!0&&T.push(j.replace(/([A-Z])/g,D=>`-${D.toLowerCase()}`));if(S){y["data-headlessui-state"]=T.join(" ");for(let j of T)y[`data-${j}`]=""}}if(ol(d)&&(Object.keys(qa(m)).length>0||Object.keys(qa(y)).length>0))if(!w.isValidElement(x)||Array.isArray(x)&&x.length>1||mw(x)){if(Object.keys(qa(m)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(qa(m)).concat(Object.keys(qa(y))).map(S=>` - ${S}`).join(`
|
|
48
|
+
`+l.stack}}var Fo=Object.prototype.hasOwnProperty,Zo=n.unstable_scheduleCallback,Qo=n.unstable_cancelCallback,Pb=n.unstable_shouldYield,Jb=n.unstable_requestPaint,Ct=n.unstable_now,Wb=n.unstable_getCurrentPriorityLevel,fh=n.unstable_ImmediatePriority,dh=n.unstable_UserBlockingPriority,Ol=n.unstable_NormalPriority,Ib=n.unstable_LowPriority,hh=n.unstable_IdlePriority,e1=n.log,t1=n.unstable_setDisableYieldValue,as=null,Mt=null;function Bn(e){if(typeof e1=="function"&&t1(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(as,e)}catch{}}var Dt=Math.clz32?Math.clz32:i1,n1=Math.log,a1=Math.LN2;function i1(e){return e>>>=0,e===0?32:31-(n1(e)/a1|0)|0}var Rl=256,zl=262144,kl=4194304;function Ta(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 Ll(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var o=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~c,l!==0?o=Ta(l):(v&=b,v!==0?o=Ta(v):i||(i=b&~e,i!==0&&(o=Ta(i))))):(b=l&~c,b!==0?o=Ta(b):v!==0?o=Ta(v):i||(i=l&~e,i!==0&&(o=Ta(i)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,i=t&-t,c>=i||c===32&&(i&4194048)!==0)?t:o}function is(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function s1(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 mh(){var e=kl;return kl<<=1,(kl&62914560)===0&&(kl=4194304),e}function Po(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ss(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function l1(e,t,i,l,o,c){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,N=e.expirationTimes,V=e.hiddenUpdates;for(i=v&~i;0<i;){var q=31-Dt(i),X=1<<q;b[q]=0,N[q]=-1;var _=V[q];if(_!==null)for(V[q]=null,q=0;q<_.length;q++){var H=_[q];H!==null&&(H.lane&=-536870913)}i&=~X}l!==0&&ph(e,l,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(v&~t))}function ph(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Dt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function gh(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Dt(i),o=1<<l;o&t|e[l]&t&&(e[l]|=t),i&=~o}}function vh(e,t){var i=t&-t;return i=(i&42)!==0?1:Jo(i),(i&(e.suspendedLanes|t))!==0?0:i}function Jo(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 Wo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function xh(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:av(e.type))}function yh(e,t){var i=Q.p;try{return Q.p=e,t()}finally{Q.p=i}}var Hn=Math.random().toString(36).slice(2),st="__reactFiber$"+Hn,yt="__reactProps$"+Hn,ni="__reactContainer$"+Hn,Io="__reactEvents$"+Hn,r1="__reactListeners$"+Hn,o1="__reactHandles$"+Hn,bh="__reactResources$"+Hn,ls="__reactMarker$"+Hn;function eu(e){delete e[st],delete e[yt],delete e[Io],delete e[r1],delete e[o1]}function ai(e){var t=e[st];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ni]||i[st]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=$g(e);e!==null;){if(i=e[st])return i;e=$g(e)}return t}e=i,i=e.parentNode}return null}function ii(e){if(e=e[st]||e[ni]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function si(e){var t=e[bh];return t||(t=e[bh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[ls]=!0}var Sh=new Set,wh={};function ja(e,t){li(e,t),li(e+"Capture",t)}function li(e,t){for(wh[e]=t,e=0;e<t.length;e++)Sh.add(t[e])}var u1=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]*$"),Th={},jh={};function c1(e){return Fo.call(jh,e)?!0:Fo.call(Th,e)?!1:u1.test(e)?jh[e]=!0:(Th[e]=!0,!1)}function Vl(e,t,i){if(c1(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){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,""+i)}}function _l(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function vn(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}function Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function f1(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(v){i=""+v,c.call(this,v)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tu(e){if(!e._valueTracker){var t=Eh(e)?"checked":"value";e._valueTracker=f1(e,t,""+e[t])}}function Nh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=Eh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function Ul(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 d1=/[\n"\\]/g;function Ht(e){return e.replace(d1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nu(e,t,i,l,o,c,v,b){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?au(e,v,Bt(t)):i!=null?au(e,v,Bt(i)):l!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Bt(b):e.removeAttribute("name")}function Ah(e,t,i,l,o,c,v,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||i!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){tu(e);return}i=i!=null?""+Bt(i):"",t=t!=null?""+Bt(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=b?e.checked:!!l,e.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),tu(e)}function au(e,t,i){t==="number"&&Ul(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ri(e,t,i,l){if(e=e.options,t){t={};for(var o=0;o<i.length;o++)t["$"+i[o]]=!0;for(i=0;i<e.length;i++)o=t.hasOwnProperty("$"+e[i].value),e[i].selected!==o&&(e[i].selected=o),o&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Bt(i),t=null,o=0;o<e.length;o++){if(e[o].value===i){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ch(e,t,i){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Bt(i):""}function Mh(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(r(92));if(De(l)){if(1<l.length)throw Error(r(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=Bt(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),tu(e)}function oi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var h1=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 Dh(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||h1.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Oh(e,t,i){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&i[o]!==l&&Dh(e,o,l)}else for(var c in t)t.hasOwnProperty(c)&&Dh(e,c,t[c])}function iu(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 m1=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"]]),p1=/^[\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 Bl(e){return p1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xn(){}var su=null;function lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,ci=null;function Rh(e){var t=ii(e);if(t&&(e=t.stateNode)){var i=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(nu(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var o=l[yt]||null;if(!o)throw Error(r(90));nu(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&Nh(l)}break e;case"textarea":Ch(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ri(e,!!i.multiple,t,!1)}}}var ru=!1;function zh(e,t,i){if(ru)return e(t,i);ru=!0;try{var l=e(t);return l}finally{if(ru=!1,(ui!==null||ci!==null)&&(Nr(),ui&&(t=ui,e=ci,ci=ui=null,Rh(t),e)))for(t=0;t<e.length;t++)Rh(e[t])}}function os(e,t){var i=e.stateNode;if(i===null)return null;var l=i[yt]||null;if(l===null)return null;i=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(i&&typeof i!="function")throw Error(r(231,t,typeof i));return i}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ou=!1;if(yn)try{var us={};Object.defineProperty(us,"passive",{get:function(){ou=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{ou=!1}var $n=null,uu=null,Hl=null;function kh(){if(Hl)return Hl;var e,t=uu,i=t.length,l,o="value"in $n?$n.value:$n.textContent,c=o.length;for(e=0;e<i&&t[e]===o[e];e++);var v=i-e;for(l=1;l<=v&&t[i-l]===o[c-l];l++);return Hl=o.slice(e,1<l?1-l:void 0)}function $l(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 ql(){return!0}function Lh(){return!1}function bt(e){function t(i,l,o,c,v){this._reactName=i,this._targetInst=o,this.type=l,this.nativeEvent=c,this.target=v,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ql:Lh,this.isPropagationStopped=Lh,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yl=bt(Ea),cs=y({},Ea,{view:0,detail:0}),g1=bt(cs),cu,fu,fs,Gl=y({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==fs&&(fs&&e.type==="mousemove"?(cu=e.screenX-fs.screenX,fu=e.screenY-fs.screenY):fu=cu=0,fs=e),cu)},movementY:function(e){return"movementY"in e?e.movementY:fu}}),Vh=bt(Gl),v1=y({},Gl,{dataTransfer:0}),x1=bt(v1),y1=y({},cs,{relatedTarget:0}),du=bt(y1),b1=y({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),S1=bt(b1),w1=y({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),T1=bt(w1),j1=y({},Ea,{data:0}),_h=bt(j1),E1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N1={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"},A1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=A1[e])?!!t[e]:!1}function hu(){return C1}var M1=y({},cs,{key:function(e){if(e.key){var t=E1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$l(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?N1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(e){return e.type==="keypress"?$l(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$l(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),D1=bt(M1),O1=y({},Gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uh=bt(O1),R1=y({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),z1=bt(R1),k1=y({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),L1=bt(k1),V1=y({},Gl,{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}),_1=bt(V1),U1=y({},Ea,{newState:0,oldState:0}),B1=bt(U1),H1=[9,13,27,32],mu=yn&&"CompositionEvent"in window,ds=null;yn&&"documentMode"in document&&(ds=document.documentMode);var $1=yn&&"TextEvent"in window&&!ds,Bh=yn&&(!mu||ds&&8<ds&&11>=ds),Hh=" ",$h=!1;function qh(e,t){switch(e){case"keyup":return H1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function q1(e,t){switch(e){case"compositionend":return Yh(t);case"keypress":return t.which!==32?null:($h=!0,Hh);case"textInput":return e=t.data,e===Hh&&$h?null:e;default:return null}}function Y1(e,t){if(fi)return e==="compositionend"||!mu&&qh(e,t)?(e=kh(),Hl=uu=$n=null,fi=!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 Bh&&t.locale!=="ko"?null:t.data;default:return null}}var G1={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 Gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!G1[e.type]:t==="textarea"}function Xh(e,t,i,l){ui?ci?ci.push(l):ci=[l]:ui=l,t=zr(t,"onChange"),0<t.length&&(i=new Yl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var hs=null,ms=null;function X1(e){Ag(e,0)}function Xl(e){var t=rs(e);if(Nh(t))return e}function Kh(e,t){if(e==="change")return t}var Fh=!1;if(yn){var pu;if(yn){var gu="oninput"in document;if(!gu){var Zh=document.createElement("div");Zh.setAttribute("oninput","return;"),gu=typeof Zh.oninput=="function"}pu=gu}else pu=!1;Fh=pu&&(!document.documentMode||9<document.documentMode)}function Qh(){hs&&(hs.detachEvent("onpropertychange",Ph),ms=hs=null)}function Ph(e){if(e.propertyName==="value"&&Xl(ms)){var t=[];Xh(t,ms,e,lu(e)),zh(X1,t)}}function K1(e,t,i){e==="focusin"?(Qh(),hs=t,ms=i,hs.attachEvent("onpropertychange",Ph)):e==="focusout"&&Qh()}function F1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xl(ms)}function Z1(e,t){if(e==="click")return Xl(t)}function Q1(e,t){if(e==="input"||e==="change")return Xl(t)}function P1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:P1;function ps(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var o=i[l];if(!Fo.call(t,o)||!Ot(e[o],t[o]))return!1}return!0}function Jh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wh(e,t){var i=Jh(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Jh(i)}}function Ih(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ih(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function em(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ul(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Ul(e.document)}return t}function vu(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 J1=yn&&"documentMode"in document&&11>=document.documentMode,di=null,xu=null,gs=null,yu=!1;function tm(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;yu||di==null||di!==Ul(l)||(l=di,"selectionStart"in l&&vu(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}),gs&&ps(gs,l)||(gs=l,l=zr(xu,"onSelect"),0<l.length&&(t=new Yl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=di)))}function Na(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var hi={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionrun:Na("Transition","TransitionRun"),transitionstart:Na("Transition","TransitionStart"),transitioncancel:Na("Transition","TransitionCancel"),transitionend:Na("Transition","TransitionEnd")},bu={},nm={};yn&&(nm=document.createElement("div").style,"AnimationEvent"in window||(delete hi.animationend.animation,delete hi.animationiteration.animation,delete hi.animationstart.animation),"TransitionEvent"in window||delete hi.transitionend.transition);function Aa(e){if(bu[e])return bu[e];if(!hi[e])return e;var t=hi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in nm)return bu[e]=t[i];return e}var am=Aa("animationend"),im=Aa("animationiteration"),sm=Aa("animationstart"),W1=Aa("transitionrun"),I1=Aa("transitionstart"),eS=Aa("transitioncancel"),lm=Aa("transitionend"),rm=new Map,Su="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(" ");Su.push("scrollEnd");function Wt(e,t){rm.set(e,t),ja(t,[e])}var Kl=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=[],mi=0,wu=0;function Fl(){for(var e=mi,t=wu=mi=0;t<e;){var i=$t[t];$t[t++]=null;var l=$t[t];$t[t++]=null;var o=$t[t];$t[t++]=null;var c=$t[t];if($t[t++]=null,l!==null&&o!==null){var v=l.pending;v===null?o.next=o:(o.next=v.next,v.next=o),l.pending=o}c!==0&&om(i,o,c)}}function Zl(e,t,i,l){$t[mi++]=e,$t[mi++]=t,$t[mi++]=i,$t[mi++]=l,wu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Tu(e,t,i,l){return Zl(e,t,i,l),Ql(e)}function Ca(e,t){return Zl(e,null,null,t),Ql(e)}function om(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var o=!1,c=e.return;c!==null;)c.childLanes|=i,l=c.alternate,l!==null&&(l.childLanes|=i),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Dt(i),e=c.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=i|536870912),c):null}function Ql(e){if(50<Us)throw Us=0,Rc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function tS(e,t,i,l){this.tag=e,this.key=i,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 Rt(e,t,i,l){return new tS(e,t,i,l)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bn(e,t){var i=e.alternate;return i===null?(i=Rt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function um(e,t){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Pl(e,t,i,l,o,c){var v=0;if(l=e,typeof e=="function")ju(e)&&(v=1);else if(typeof e=="string")v=l2(e,i,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=Rt(31,i,t,o),e.elementType=re,e.lanes=c,e;case E:return Ma(i.children,o,c,t);case D:v=8,o|=24;break;case R:return e=Rt(12,i,t,o|2),e.elementType=R,e.lanes=c,e;case U:return e=Rt(13,i,t,o),e.elementType=U,e.lanes=c,e;case P:return e=Rt(19,i,t,o),e.elementType=P,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:v=10;break e;case M:v=9;break e;case k:v=11;break e;case F:v=14;break e;case W:v=16,l=null;break e}v=29,i=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Rt(v,i,t,o),t.elementType=e,t.type=l,t.lanes=c,t}function Ma(e,t,i,l){return e=Rt(7,e,l,t),e.lanes=i,e}function Eu(e,t,i){return e=Rt(6,e,null,t),e.lanes=i,e}function cm(e){var t=Rt(18,null,null,0);return t.stateNode=e,t}function Nu(e,t,i){return t=Rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fm=new WeakMap;function qt(e,t){if(typeof e=="object"&&e!==null){var i=fm.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ch(t)},fm.set(e,t),t)}return{value:e,source:t,stack:ch(t)}}var gi=[],vi=0,Jl=null,vs=0,Yt=[],Gt=0,qn=null,ln=1,rn="";function Sn(e,t){gi[vi++]=vs,gi[vi++]=Jl,Jl=e,vs=t}function dm(e,t,i){Yt[Gt++]=ln,Yt[Gt++]=rn,Yt[Gt++]=qn,qn=e;var l=ln;e=rn;var o=32-Dt(l)-1;l&=~(1<<o),i+=1;var c=32-Dt(t)+o;if(30<c){var v=o-o%5;c=(l&(1<<v)-1).toString(32),l>>=v,o-=v,ln=1<<32-Dt(t)+o|i<<o|l,rn=c+e}else ln=1<<c|i<<o|l,rn=e}function Au(e){e.return!==null&&(Sn(e,1),dm(e,1,0))}function Cu(e){for(;e===Jl;)Jl=gi[--vi],gi[vi]=null,vs=gi[--vi],gi[vi]=null;for(;e===qn;)qn=Yt[--Gt],Yt[Gt]=null,rn=Yt[--Gt],Yt[Gt]=null,ln=Yt[--Gt],Yt[Gt]=null}function hm(e,t){Yt[Gt++]=ln,Yt[Gt++]=rn,Yt[Gt++]=qn,ln=t.id,rn=t.overflow,qn=e}var lt=null,Ue=null,we=!1,Yn=null,Xt=!1,Mu=Error(r(519));function Gn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xs(qt(t,e)),Mu}function mm(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[st]=e,t[yt]=l,i){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(i=0;i<Hs.length;i++)ve(Hs[i],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),Ah(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),Mh(t,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||Og(t.textContent,i)?(l.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),l.onScroll!=null&&ve("scroll",t),l.onScrollEnd!=null&&ve("scrollend",t),l.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||Gn(e,!0)}function pm(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:lt=lt.return}}function xi(e){if(e!==lt)return!1;if(!we)return pm(e),we=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Fc(e.type,e.memoizedProps)),i=!i),i&&Ue&&Gn(e),pm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=Hg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ue=Hg(e)}else t===27?(t=Ue,ia(e.type)?(e=Wc,Wc=null,Ue=e):Ue=t):Ue=lt?Ft(e.stateNode.nextSibling):null;return!0}function Da(){Ue=lt=null,we=!1}function Du(){var e=Yn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),Yn=null),e}function xs(e){Yn===null?Yn=[e]:Yn.push(e)}var Ou=A(null),Oa=null,wn=null;function Xn(e,t,i){K(Ou,t._currentValue),t._currentValue=i}function Tn(e){e._currentValue=Ou.current,G(Ou)}function Ru(e,t,i){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===i)break;e=e.return}}function zu(e,t,i,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var v=o.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=o;for(var N=0;N<t.length;N++)if(b.context===t[N]){c.lanes|=i,b=c.alternate,b!==null&&(b.lanes|=i),Ru(c.return,i,e),l||(v=null);break e}c=b.next}}else if(o.tag===18){if(v=o.return,v===null)throw Error(r(341));v.lanes|=i,c=v.alternate,c!==null&&(c.lanes|=i),Ru(v,i,e),v=null}else v=o.child;if(v!==null)v.return=o;else for(v=o;v!==null;){if(v===e){v=null;break}if(o=v.sibling,o!==null){o.return=v.return,v=o;break}v=v.return}o=v}}function yi(e,t,i,l){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var v=o.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var b=o.type;Ot(o.pendingProps.value,v.value)||(e!==null?e.push(b):e=[b])}}else if(o===Te.current){if(v=o.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Xs):e=[Xs])}o=o.return}e!==null&&zu(t,e,i,l),t.flags|=262144}function Wl(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ra(e){Oa=e,wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rt(e){return gm(Oa,e)}function Il(e,t){return Oa===null&&Ra(e),gm(e,t)}function gm(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},wn===null){if(e===null)throw Error(r(308));wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wn=wn.next=t;return i}var nS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},aS=n.unstable_scheduleCallback,iS=n.unstable_NormalPriority,Qe={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ku(){return{controller:new nS,data:new Map,refCount:0}}function ys(e){e.refCount--,e.refCount===0&&aS(iS,function(){e.controller.abort()})}var bs=null,Lu=0,bi=0,Si=null;function sS(e,t){if(bs===null){var i=bs=[];Lu=0,bi=Uc(),Si={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Lu++,t.then(vm,vm),t}function vm(){if(--Lu===0&&bs!==null){Si!==null&&(Si.status="fulfilled");var e=bs;bs=null,bi=0,Si=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function lS(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(o){i.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<i.length;o++)(0,i[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<i.length;o++)(0,i[o])(void 0)}),l}var xm=$.S;$.S=function(e,t){tg=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sS(e,t),xm!==null&&xm(e,t)};var za=A(null);function Vu(){var e=za.current;return e!==null?e:Ve.pooledCache}function er(e,t){t===null?K(za,za.current):K(za,t.pool)}function ym(){var e=Vu();return e===null?null:{parent:Qe._currentValue,pool:e}}var wi=Error(r(460)),_u=Error(r(474)),tr=Error(r(542)),nr={then:function(){}};function bm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sm(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(xn,xn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Tm(e),e;default:if(typeof t.status=="string")t.then(xn,xn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Tm(e),e}throw La=t,wi}}function ka(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(La=i,wi):i}}var La=null;function wm(){if(La===null)throw Error(r(459));var e=La;return La=null,e}function Tm(e){if(e===wi||e===tr)throw Error(r(483))}var Ti=null,Ss=0;function ar(e){var t=Ss;return Ss+=1,Ti===null&&(Ti=[]),Sm(Ti,e,t)}function ws(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ir(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jm(e){function t(O,C){if(e){var L=O.deletions;L===null?(O.deletions=[C],O.flags|=16):L.push(C)}}function i(O,C){if(!e)return null;for(;C!==null;)t(O,C),C=C.sibling;return null}function l(O){for(var C=new Map;O!==null;)O.key!==null?C.set(O.key,O):C.set(O.index,O),O=O.sibling;return C}function o(O,C){return O=bn(O,C),O.index=0,O.sibling=null,O}function c(O,C,L){return O.index=L,e?(L=O.alternate,L!==null?(L=L.index,L<C?(O.flags|=67108866,C):L):(O.flags|=67108866,C)):(O.flags|=1048576,C)}function v(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,C,L,Y){return C===null||C.tag!==6?(C=Eu(L,O.mode,Y),C.return=O,C):(C=o(C,L),C.return=O,C)}function N(O,C,L,Y){var ae=L.type;return ae===E?q(O,C,L.props.children,Y,L.key):C!==null&&(C.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===W&&ka(ae)===C.type)?(C=o(C,L.props),ws(C,L),C.return=O,C):(C=Pl(L.type,L.key,L.props,null,O.mode,Y),ws(C,L),C.return=O,C)}function V(O,C,L,Y){return C===null||C.tag!==4||C.stateNode.containerInfo!==L.containerInfo||C.stateNode.implementation!==L.implementation?(C=Nu(L,O.mode,Y),C.return=O,C):(C=o(C,L.children||[]),C.return=O,C)}function q(O,C,L,Y,ae){return C===null||C.tag!==7?(C=Ma(L,O.mode,Y,ae),C.return=O,C):(C=o(C,L),C.return=O,C)}function X(O,C,L){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Eu(""+C,O.mode,L),C.return=O,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case w:return L=Pl(C.type,C.key,C.props,null,O.mode,L),ws(L,C),L.return=O,L;case j:return C=Nu(C,O.mode,L),C.return=O,C;case W:return C=ka(C),X(O,C,L)}if(De(C)||ie(C))return C=Ma(C,O.mode,L,null),C.return=O,C;if(typeof C.then=="function")return X(O,ar(C),L);if(C.$$typeof===z)return X(O,Il(O,C),L);ir(O,C)}return null}function _(O,C,L,Y){var ae=C!==null?C.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ae!==null?null:b(O,C,""+L,Y);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case w:return L.key===ae?N(O,C,L,Y):null;case j:return L.key===ae?V(O,C,L,Y):null;case W:return L=ka(L),_(O,C,L,Y)}if(De(L)||ie(L))return ae!==null?null:q(O,C,L,Y,null);if(typeof L.then=="function")return _(O,C,ar(L),Y);if(L.$$typeof===z)return _(O,C,Il(O,L),Y);ir(O,L)}return null}function H(O,C,L,Y,ae){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(L)||null,b(C,O,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return O=O.get(Y.key===null?L:Y.key)||null,N(C,O,Y,ae);case j:return O=O.get(Y.key===null?L:Y.key)||null,V(C,O,Y,ae);case W:return Y=ka(Y),H(O,C,L,Y,ae)}if(De(Y)||ie(Y))return O=O.get(L)||null,q(C,O,Y,ae,null);if(typeof Y.then=="function")return H(O,C,L,ar(Y),ae);if(Y.$$typeof===z)return H(O,C,L,Il(C,Y),ae);ir(C,Y)}return null}function ee(O,C,L,Y){for(var ae=null,je=null,ne=C,he=C=0,be=null;ne!==null&&he<L.length;he++){ne.index>he?(be=ne,ne=null):be=ne.sibling;var Ee=_(O,ne,L[he],Y);if(Ee===null){ne===null&&(ne=be);break}e&&ne&&Ee.alternate===null&&t(O,ne),C=c(Ee,C,he),je===null?ae=Ee:je.sibling=Ee,je=Ee,ne=be}if(he===L.length)return i(O,ne),we&&Sn(O,he),ae;if(ne===null){for(;he<L.length;he++)ne=X(O,L[he],Y),ne!==null&&(C=c(ne,C,he),je===null?ae=ne:je.sibling=ne,je=ne);return we&&Sn(O,he),ae}for(ne=l(ne);he<L.length;he++)be=H(ne,O,he,L[he],Y),be!==null&&(e&&be.alternate!==null&&ne.delete(be.key===null?he:be.key),C=c(be,C,he),je===null?ae=be:je.sibling=be,je=be);return e&&ne.forEach(function(ua){return t(O,ua)}),we&&Sn(O,he),ae}function se(O,C,L,Y){if(L==null)throw Error(r(151));for(var ae=null,je=null,ne=C,he=C=0,be=null,Ee=L.next();ne!==null&&!Ee.done;he++,Ee=L.next()){ne.index>he?(be=ne,ne=null):be=ne.sibling;var ua=_(O,ne,Ee.value,Y);if(ua===null){ne===null&&(ne=be);break}e&&ne&&ua.alternate===null&&t(O,ne),C=c(ua,C,he),je===null?ae=ua:je.sibling=ua,je=ua,ne=be}if(Ee.done)return i(O,ne),we&&Sn(O,he),ae;if(ne===null){for(;!Ee.done;he++,Ee=L.next())Ee=X(O,Ee.value,Y),Ee!==null&&(C=c(Ee,C,he),je===null?ae=Ee:je.sibling=Ee,je=Ee);return we&&Sn(O,he),ae}for(ne=l(ne);!Ee.done;he++,Ee=L.next())Ee=H(ne,O,he,Ee.value,Y),Ee!==null&&(e&&Ee.alternate!==null&&ne.delete(Ee.key===null?he:Ee.key),C=c(Ee,C,he),je===null?ae=Ee:je.sibling=Ee,je=Ee);return e&&ne.forEach(function(v2){return t(O,v2)}),we&&Sn(O,he),ae}function ze(O,C,L,Y){if(typeof L=="object"&&L!==null&&L.type===E&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case w:e:{for(var ae=L.key;C!==null;){if(C.key===ae){if(ae=L.type,ae===E){if(C.tag===7){i(O,C.sibling),Y=o(C,L.props.children),Y.return=O,O=Y;break e}}else if(C.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===W&&ka(ae)===C.type){i(O,C.sibling),Y=o(C,L.props),ws(Y,L),Y.return=O,O=Y;break e}i(O,C);break}else t(O,C);C=C.sibling}L.type===E?(Y=Ma(L.props.children,O.mode,Y,L.key),Y.return=O,O=Y):(Y=Pl(L.type,L.key,L.props,null,O.mode,Y),ws(Y,L),Y.return=O,O=Y)}return v(O);case j:e:{for(ae=L.key;C!==null;){if(C.key===ae)if(C.tag===4&&C.stateNode.containerInfo===L.containerInfo&&C.stateNode.implementation===L.implementation){i(O,C.sibling),Y=o(C,L.children||[]),Y.return=O,O=Y;break e}else{i(O,C);break}else t(O,C);C=C.sibling}Y=Nu(L,O.mode,Y),Y.return=O,O=Y}return v(O);case W:return L=ka(L),ze(O,C,L,Y)}if(De(L))return ee(O,C,L,Y);if(ie(L)){if(ae=ie(L),typeof ae!="function")throw Error(r(150));return L=ae.call(L),se(O,C,L,Y)}if(typeof L.then=="function")return ze(O,C,ar(L),Y);if(L.$$typeof===z)return ze(O,C,Il(O,L),Y);ir(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,C!==null&&C.tag===6?(i(O,C.sibling),Y=o(C,L),Y.return=O,O=Y):(i(O,C),Y=Eu(L,O.mode,Y),Y.return=O,O=Y),v(O)):i(O,C)}return function(O,C,L,Y){try{Ss=0;var ae=ze(O,C,L,Y);return Ti=null,ae}catch(ne){if(ne===wi||ne===tr)throw ne;var je=Rt(29,ne,null,O.mode);return je.lanes=Y,je.return=O,je}finally{}}}var Va=jm(!0),Em=jm(!1),Kn=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bu(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 Fn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Ql(e),om(e,null,i),t}return Zl(e,l,t,i),Ql(e)}function Ts(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,gh(e,i)}}function Hu(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var o=null,c=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};c===null?o=c=v:c=c.next=v,i=i.next}while(i!==null);c===null?o=c=t:c=c.next=t}else o=c=t;i={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var $u=!1;function js(){if($u){var e=Si;if(e!==null)throw e}}function Es(e,t,i,l){$u=!1;var o=e.updateQueue;Kn=!1;var c=o.firstBaseUpdate,v=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var N=b,V=N.next;N.next=null,v===null?c=V:v.next=V,v=N;var q=e.alternate;q!==null&&(q=q.updateQueue,b=q.lastBaseUpdate,b!==v&&(b===null?q.firstBaseUpdate=V:b.next=V,q.lastBaseUpdate=N))}if(c!==null){var X=o.baseState;v=0,q=V=N=null,b=c;do{var _=b.lane&-536870913,H=_!==b.lane;if(H?(ye&_)===_:(l&_)===_){_!==0&&_===bi&&($u=!0),q!==null&&(q=q.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ee=e,se=b;_=t;var ze=i;switch(se.tag){case 1:if(ee=se.payload,typeof ee=="function"){X=ee.call(ze,X,_);break e}X=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=se.payload,_=typeof ee=="function"?ee.call(ze,X,_):ee,_==null)break e;X=y({},X,_);break e;case 2:Kn=!0}}_=b.callback,_!==null&&(e.flags|=64,H&&(e.flags|=8192),H=o.callbacks,H===null?o.callbacks=[_]:H.push(_))}else H={lane:_,tag:b.tag,payload:b.payload,callback:b.callback,next:null},q===null?(V=q=H,N=X):q=q.next=H,v|=_;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;H=b,b=H.next,H.next=null,o.lastBaseUpdate=H,o.shared.pending=null}}while(!0);q===null&&(N=X),o.baseState=N,o.firstBaseUpdate=V,o.lastBaseUpdate=q,c===null&&(o.shared.lanes=0),In|=v,e.lanes=v,e.memoizedState=X}}function Nm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Am(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Nm(i[e],t)}var ji=A(null),sr=A(0);function Cm(e,t){e=Rn,K(sr,e),K(ji,t),Rn=e|t.baseLanes}function qu(){K(sr,Rn),K(ji,ji.current)}function Yu(){Rn=sr.current,G(ji),G(sr)}var zt=A(null),Kt=null;function Qn(e){var t=e.alternate;K(Xe,Xe.current&1),K(zt,e),Kt===null&&(t===null||ji.current!==null||t.memoizedState!==null)&&(Kt=e)}function Gu(e){K(Xe,Xe.current),K(zt,e),Kt===null&&(Kt=e)}function Mm(e){e.tag===22?(K(Xe,Xe.current),K(zt,e),Kt===null&&(Kt=e)):Pn()}function Pn(){K(Xe,Xe.current),K(zt,zt.current)}function kt(e){G(zt),Kt===e&&(Kt=null),G(Xe)}var Xe=A(0);function lr(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Pc(i)||Jc(i)))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 jn=0,de=null,Oe=null,Pe=null,rr=!1,Ei=!1,_a=!1,or=0,Ns=0,Ni=null,rS=0;function qe(){throw Error(r(321))}function Xu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ot(e[i],t[i]))return!1;return!0}function Ku(e,t,i,l,o,c){return jn=c,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?dp:rc,_a=!1,c=i(l,o),_a=!1,Ei&&(c=Om(t,i,l,o)),Dm(e),c}function Dm(e){$.H=Ms;var t=Oe!==null&&Oe.next!==null;if(jn=0,Pe=Oe=de=null,rr=!1,Ns=0,Ni=null,t)throw Error(r(300));e===null||Je||(e=e.dependencies,e!==null&&Wl(e)&&(Je=!0))}function Om(e,t,i,l){de=e;var o=0;do{if(Ei&&(Ni=null),Ns=0,Ei=!1,25<=o)throw Error(r(301));if(o+=1,Pe=Oe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}$.H=hp,c=t(i,l)}while(Ei);return c}function oS(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?As(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(de.flags|=1024),t}function Fu(){var e=or!==0;return or=0,e}function Zu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Qu(e){if(rr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}rr=!1}jn=0,Pe=Oe=de=null,Ei=!1,Ns=or=0,Ni=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?de.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function Ke(){if(Oe===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Pe===null?de.memoizedState:Pe.next;if(t!==null)Pe=t,Oe=e;else{if(e===null)throw de.alternate===null?Error(r(467)):Error(r(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Pe===null?de.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function ur(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function As(e){var t=Ns;return Ns+=1,Ni===null&&(Ni=[]),e=Sm(Ni,e,t),t=de,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?dp:rc),e}function cr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return As(e);if(e.$$typeof===z)return rt(e)}throw Error(r(438,String(e)))}function Pu(e){var t=null,i=de.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=de.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ur(),de.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=B;return t.index++,i}function En(e,t){return typeof t=="function"?t(e):t}function fr(e){var t=Ke();return Ju(t,Oe,e)}function Ju(e,t,i){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=i;var o=e.baseQueue,c=l.pending;if(c!==null){if(o!==null){var v=o.next;o.next=c.next,c.next=v}t.baseQueue=o=c,l.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var b=v=null,N=null,V=t,q=!1;do{var X=V.lane&-536870913;if(X!==V.lane?(ye&X)===X:(jn&X)===X){var _=V.revertLane;if(_===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),X===bi&&(q=!0);else if((jn&_)===_){V=V.next,_===bi&&(q=!0);continue}else X={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},N===null?(b=N=X,v=c):N=N.next=X,de.lanes|=_,In|=_;X=V.action,_a&&i(c,X),c=V.hasEagerState?V.eagerState:i(c,X)}else _={lane:X,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},N===null?(b=N=_,v=c):N=N.next=_,de.lanes|=X,In|=X;V=V.next}while(V!==null&&V!==t);if(N===null?v=c:N.next=b,!Ot(c,e.memoizedState)&&(Je=!0,q&&(i=Si,i!==null)))throw i;e.memoizedState=c,e.baseState=v,e.baseQueue=N,l.lastRenderedState=c}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Wu(e){var t=Ke(),i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var l=i.dispatch,o=i.pending,c=t.memoizedState;if(o!==null){i.pending=null;var v=o=o.next;do c=e(c,v.action),v=v.next;while(v!==o);Ot(c,t.memoizedState)||(Je=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),i.lastRenderedState=c}return[c,l]}function Rm(e,t,i){var l=de,o=Ke(),c=we;if(c){if(i===void 0)throw Error(r(407));i=i()}else i=t();var v=!Ot((Oe||o).memoizedState,i);if(v&&(o.memoizedState=i,Je=!0),o=o.queue,tc(Lm.bind(null,l,o,e),[e]),o.getSnapshot!==t||v||Pe!==null&&Pe.memoizedState.tag&1){if(l.flags|=2048,Ai(9,{destroy:void 0},km.bind(null,l,o,i,t),null),Ve===null)throw Error(r(349));c||(jn&127)!==0||zm(l,t,i)}return i}function zm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=de.updateQueue,t===null?(t=ur(),de.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function km(e,t,i,l){t.value=i,t.getSnapshot=l,Vm(t)&&_m(e)}function Lm(e,t,i){return i(function(){Vm(t)&&_m(e)})}function Vm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function _m(e){var t=Ca(e,2);t!==null&&Et(t,e,2)}function Iu(e){var t=mt();if(typeof e=="function"){var i=e;if(e=i(),_a){Bn(!0);try{i()}finally{Bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:e},t}function Um(e,t,i,l){return e.baseState=i,Ju(e,Oe,typeof l=="function"?l:En)}function uS(e,t,i,l,o){if(mr(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){c.listeners.push(v)}};$.T!==null?i(!0):c.isTransition=!1,l(c),i=t.pending,i===null?(c.next=t.pending=c,Bm(t,c)):(c.next=i.next,t.pending=i.next=c)}}function Bm(e,t){var i=t.action,l=t.payload,o=e.state;if(t.isTransition){var c=$.T,v={};$.T=v;try{var b=i(o,l),N=$.S;N!==null&&N(v,b),Hm(e,t,b)}catch(V){ec(e,t,V)}finally{c!==null&&v.types!==null&&(c.types=v.types),$.T=c}}else try{c=i(o,l),Hm(e,t,c)}catch(V){ec(e,t,V)}}function Hm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){$m(e,t,l)},function(l){return ec(e,t,l)}):$m(e,t,i)}function $m(e,t,i){t.status="fulfilled",t.value=i,qm(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Bm(e,i)))}function ec(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,qm(t),t=t.next;while(t!==l)}e.action=null}function qm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ym(e,t){return t}function Gm(e,t){if(we){var i=Ve.formState;if(i!==null){e:{var l=de;if(we){if(Ue){t:{for(var o=Ue,c=Xt;o.nodeType!==8;){if(!c){o=null;break t}if(o=Ft(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){Ue=Ft(o.nextSibling),l=o.data==="F!";break e}}Gn(l)}l=!1}l&&(t=i[0])}}return i=mt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ym,lastRenderedState:t},i.queue=l,i=up.bind(null,de,l),l.dispatch=i,l=Iu(!1),c=lc.bind(null,de,!1,l.queue),l=mt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,i=uS.bind(null,de,o,c,i),o.dispatch=i,l.memoizedState=e,[t,i,!1]}function Xm(e){var t=Ke();return Km(t,Oe,e)}function Km(e,t,i){if(t=Ju(e,t,Ym)[0],e=fr(En)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=As(t)}catch(v){throw v===wi?tr:v}else l=t;t=Ke();var o=t.queue,c=o.dispatch;return i!==t.memoizedState&&(de.flags|=2048,Ai(9,{destroy:void 0},cS.bind(null,o,i),null)),[l,c,e]}function cS(e,t){e.action=t}function Fm(e){var t=Ke(),i=Oe;if(i!==null)return Km(t,i,e);Ke(),t=t.memoizedState,i=Ke();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Ai(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=de.updateQueue,t===null&&(t=ur(),de.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Zm(){return Ke().memoizedState}function dr(e,t,i,l){var o=mt();de.flags|=e,o.memoizedState=Ai(1|t,{destroy:void 0},i,l===void 0?null:l)}function hr(e,t,i,l){var o=Ke();l=l===void 0?null:l;var c=o.memoizedState.inst;Oe!==null&&l!==null&&Xu(l,Oe.memoizedState.deps)?o.memoizedState=Ai(t,c,i,l):(de.flags|=e,o.memoizedState=Ai(1|t,c,i,l))}function Qm(e,t){dr(8390656,8,e,t)}function tc(e,t){hr(2048,8,e,t)}function fS(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=ur(),de.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Pm(e){var t=Ke().memoizedState;return fS({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jm(e,t){return hr(4,2,e,t)}function Wm(e,t){return hr(4,4,e,t)}function Im(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ep(e,t,i){i=i!=null?i.concat([e]):null,hr(4,4,Im.bind(null,t,e),i)}function nc(){}function tp(e,t){var i=Ke();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&Xu(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function np(e,t){var i=Ke();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&Xu(t,l[1]))return l[0];if(l=e(),_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[l,t],l}function ac(e,t,i){return i===void 0||(jn&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=ag(),de.lanes|=e,In|=e,i)}function ap(e,t,i,l){return Ot(i,t)?i:ji.current!==null?(e=ac(e,i,l),Ot(e,t)||(Je=!0),e):(jn&42)===0||(jn&1073741824)!==0&&(ye&261930)===0?(Je=!0,e.memoizedState=i):(e=ag(),de.lanes|=e,In|=e,t)}function ip(e,t,i,l,o){var c=Q.p;Q.p=c!==0&&8>c?c:8;var v=$.T,b={};$.T=b,lc(e,!1,t,i);try{var N=o(),V=$.S;if(V!==null&&V(b,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var q=lS(N,l);Cs(e,t,q,_t(e))}else Cs(e,t,l,_t(e))}catch(X){Cs(e,t,{then:function(){},status:"rejected",reason:X},_t())}finally{Q.p=c,v!==null&&b.types!==null&&(v.types=b.types),$.T=v}}function dS(){}function ic(e,t,i,l){if(e.tag!==5)throw Error(r(476));var o=sp(e).queue;ip(e,o,t,J,i===null?dS:function(){return lp(e),i(l)})}function sp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function lp(e){var t=sp(e);t.next===null&&(t=e.alternate.memoizedState),Cs(e,t.next.queue,{},_t())}function sc(){return rt(Xs)}function rp(){return Ke().memoizedState}function op(){return Ke().memoizedState}function hS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_t();e=Fn(i);var l=Zn(t,e,i);l!==null&&(Et(l,t,i),Ts(l,t,i)),t={cache:ku()},e.payload=t;return}t=t.return}}function mS(e,t,i){var l=_t();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},mr(e)?cp(t,i):(i=Tu(e,t,i,l),i!==null&&(Et(i,e,l),fp(i,t,l)))}function up(e,t,i){var l=_t();Cs(e,t,i,l)}function Cs(e,t,i,l){var o={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(mr(e))cp(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var v=t.lastRenderedState,b=c(v,i);if(o.hasEagerState=!0,o.eagerState=b,Ot(b,v))return Zl(e,t,o,0),Ve===null&&Fl(),!1}catch{}finally{}if(i=Tu(e,t,o,l),i!==null)return Et(i,e,l),fp(i,t,l),!0}return!1}function lc(e,t,i,l){if(l={lane:2,revertLane:Uc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},mr(e)){if(t)throw Error(r(479))}else t=Tu(e,i,l,2),t!==null&&Et(t,e,2)}function mr(e){var t=e.alternate;return e===de||t!==null&&t===de}function cp(e,t){Ei=rr=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function fp(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,gh(e,i)}}var Ms={readContext:rt,use:cr,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useLayoutEffect:qe,useInsertionEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useSyncExternalStore:qe,useId:qe,useHostTransitionStatus:qe,useFormState:qe,useActionState:qe,useOptimistic:qe,useMemoCache:qe,useCacheRefresh:qe};Ms.useEffectEvent=qe;var dp={readContext:rt,use:cr,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:Qm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,dr(4194308,4,Im.bind(null,t,e),i)},useLayoutEffect:function(e,t){return dr(4194308,4,e,t)},useInsertionEffect:function(e,t){dr(4,2,e,t)},useMemo:function(e,t){var i=mt();t=t===void 0?null:t;var l=e();if(_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=mt();if(i!==void 0){var o=i(t);if(_a){Bn(!0);try{i(t)}finally{Bn(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=mS.bind(null,de,e),[l.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Iu(e);var t=e.queue,i=up.bind(null,de,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:nc,useDeferredValue:function(e,t){var i=mt();return ac(i,e,t)},useTransition:function(){var e=Iu(!1);return e=ip.bind(null,de,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=de,o=mt();if(we){if(i===void 0)throw Error(r(407));i=i()}else{if(i=t(),Ve===null)throw Error(r(349));(ye&127)!==0||zm(l,t,i)}o.memoizedState=i;var c={value:i,getSnapshot:t};return o.queue=c,Qm(Lm.bind(null,l,c,e),[e]),l.flags|=2048,Ai(9,{destroy:void 0},km.bind(null,l,c,i,t),null),i},useId:function(){var e=mt(),t=Ve.identifierPrefix;if(we){var i=rn,l=ln;i=(l&~(1<<32-Dt(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=or++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=rS++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:sc,useFormState:Gm,useActionState:Gm,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=lc.bind(null,de,!0,i),i.dispatch=t,[e,t]},useMemoCache:Pu,useCacheRefresh:function(){return mt().memoizedState=hS.bind(null,de)},useEffectEvent:function(e){var t=mt(),i={impl:e};return t.memoizedState=i,function(){if((Ne&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},rc={readContext:rt,use:cr,useCallback:tp,useContext:rt,useEffect:tc,useImperativeHandle:ep,useInsertionEffect:Jm,useLayoutEffect:Wm,useMemo:np,useReducer:fr,useRef:Zm,useState:function(){return fr(En)},useDebugValue:nc,useDeferredValue:function(e,t){var i=Ke();return ap(i,Oe.memoizedState,e,t)},useTransition:function(){var e=fr(En)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:Rm,useId:rp,useHostTransitionStatus:sc,useFormState:Xm,useActionState:Xm,useOptimistic:function(e,t){var i=Ke();return Um(i,Oe,e,t)},useMemoCache:Pu,useCacheRefresh:op};rc.useEffectEvent=Pm;var hp={readContext:rt,use:cr,useCallback:tp,useContext:rt,useEffect:tc,useImperativeHandle:ep,useInsertionEffect:Jm,useLayoutEffect:Wm,useMemo:np,useReducer:Wu,useRef:Zm,useState:function(){return Wu(En)},useDebugValue:nc,useDeferredValue:function(e,t){var i=Ke();return Oe===null?ac(i,e,t):ap(i,Oe.memoizedState,e,t)},useTransition:function(){var e=Wu(En)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:Rm,useId:rp,useHostTransitionStatus:sc,useFormState:Fm,useActionState:Fm,useOptimistic:function(e,t){var i=Ke();return Oe!==null?Um(i,Oe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:op};hp.useEffectEvent=Pm;function oc(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:y({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var uc={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=_t(),o=Fn(l);o.payload=t,i!=null&&(o.callback=i),t=Zn(e,o,l),t!==null&&(Et(t,e,l),Ts(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=_t(),o=Fn(l);o.tag=1,o.payload=t,i!=null&&(o.callback=i),t=Zn(e,o,l),t!==null&&(Et(t,e,l),Ts(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),l=Fn(i);l.tag=2,t!=null&&(l.callback=t),t=Zn(e,l,i),t!==null&&(Et(t,e,i),Ts(t,e,i))}};function mp(e,t,i,l,o,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,v):t.prototype&&t.prototype.isPureReactComponent?!ps(i,l)||!ps(o,c):!0}function pp(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=y({},i));for(var o in e)i[o]===void 0&&(i[o]=e[o])}return i}function gp(e){Kl(e)}function vp(e){console.error(e)}function xp(e){Kl(e)}function pr(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function yp(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function cc(e,t,i){return i=Fn(i),i.tag=3,i.payload={element:null},i.callback=function(){pr(e,t)},i}function bp(e){return e=Fn(e),e.tag=3,e}function Sp(e,t,i,l){var o=i.type.getDerivedStateFromError;if(typeof o=="function"){var c=l.value;e.payload=function(){return o(c)},e.callback=function(){yp(t,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){yp(t,i,l),typeof o!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function pS(e,t,i,l,o){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&yi(t,i,o,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?Ar():i.alternate===null&&Ye===0&&(Ye=3),i.flags&=-257,i.flags|=65536,i.lanes=o,l===nr?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Lc(e,l,o)),!1;case 22:return i.flags|=65536,l===nr?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),Lc(e,l,o)),!1}throw Error(r(435,i.tag))}return Lc(e,l,o),Ar(),!1}if(we)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Mu&&(e=Error(r(422),{cause:l}),xs(qt(e,i)))):(l!==Mu&&(t=Error(r(423),{cause:l}),xs(qt(t,i))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=qt(l,i),o=cc(e.stateNode,l,o),Hu(e,o),Ye!==4&&(Ye=2)),!1;var c=Error(r(520),{cause:l});if(c=qt(c,i),_s===null?_s=[c]:_s.push(c),Ye!==4&&(Ye=2),t===null)return!0;l=qt(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=o&-o,i.lanes|=e,e=cc(i.stateNode,l,e),Hu(i,e),!1;case 1:if(t=i.type,c=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ea===null||!ea.has(c))))return i.flags|=65536,o&=-o,i.lanes|=o,o=bp(o),Sp(o,e,i,l),Hu(i,o),!1}i=i.return}while(i!==null);return!1}var fc=Error(r(461)),Je=!1;function ot(e,t,i,l){t.child=e===null?Em(t,null,i,l):Va(t,e.child,i,l)}function wp(e,t,i,l,o){i=i.render;var c=t.ref;if("ref"in l){var v={};for(var b in l)b!=="ref"&&(v[b]=l[b])}else v=l;return Ra(t),l=Ku(e,t,i,v,c,o),b=Fu(),e!==null&&!Je?(Zu(e,t,o),Nn(e,t,o)):(we&&b&&Au(t),t.flags|=1,ot(e,t,l,o),t.child)}function Tp(e,t,i,l,o){if(e===null){var c=i.type;return typeof c=="function"&&!ju(c)&&c.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=c,jp(e,t,c,l,o)):(e=Pl(i.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yc(e,o)){var v=c.memoizedProps;if(i=i.compare,i=i!==null?i:ps,i(v,l)&&e.ref===t.ref)return Nn(e,t,o)}return t.flags|=1,e=bn(c,l),e.ref=t.ref,e.return=t,t.child=e}function jp(e,t,i,l,o){if(e!==null){var c=e.memoizedProps;if(ps(c,l)&&e.ref===t.ref)if(Je=!1,t.pendingProps=l=c,yc(e,o))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,Nn(e,t,o)}return dc(e,t,i,l,o)}function Ep(e,t,i,l){var o=l.children,c=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(c=c!==null?c.baseLanes|i:i,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~c}else l=0,t.child=null;return Np(e,t,c,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&er(t,c!==null?c.cachePool:null),c!==null?Cm(t,c):qu(),Mm(t);else return l=t.lanes=536870912,Np(e,t,c!==null?c.baseLanes|i:i,i,l)}else c!==null?(er(t,c.cachePool),Cm(t,c),Pn(),t.memoizedState=null):(e!==null&&er(t,null),qu(),Pn());return ot(e,t,o,i),t.child}function Ds(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Np(e,t,i,l,o){var c=Vu();return c=c===null?null:{parent:Qe._currentValue,pool:c},t.memoizedState={baseLanes:i,cachePool:c},e!==null&&er(t,null),qu(),Mm(t),e!==null&&yi(e,t,l,!0),t.childLanes=o,null}function gr(e,t){return t=xr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ap(e,t,i){return Va(t,e.child,null,i),e=gr(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function gS(e,t,i){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(l.mode==="hidden")return e=gr(t,l),t.lanes=536870912,Ds(null,e);if(Gu(t),(e=Ue)?(e=Bg(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:ln,overflow:rn}:null,retryLane:536870912,hydrationErrors:null},i=cm(e),i.return=t,t.child=i,lt=t,Ue=null)):e=null,e===null)throw Gn(t);return t.lanes=536870912,null}return gr(t,l)}var c=e.memoizedState;if(c!==null){var v=c.dehydrated;if(Gu(t),o)if(t.flags&256)t.flags&=-257,t=Ap(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Je||yi(e,t,i,!1),o=(i&e.childLanes)!==0,Je||o){if(l=Ve,l!==null&&(v=vh(l,i),v!==0&&v!==c.retryLane))throw c.retryLane=v,Ca(e,v),Et(l,e,v),fc;Ar(),t=Ap(e,t,i)}else e=c.treeContext,Ue=Ft(v.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&hm(t,e),t=gr(t,l),t.flags|=4096;return t}return e=bn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vr(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function dc(e,t,i,l,o){return Ra(t),i=Ku(e,t,i,l,void 0,o),l=Fu(),e!==null&&!Je?(Zu(e,t,o),Nn(e,t,o)):(we&&l&&Au(t),t.flags|=1,ot(e,t,i,o),t.child)}function Cp(e,t,i,l,o,c){return Ra(t),t.updateQueue=null,i=Om(t,l,i,o),Dm(e),l=Fu(),e!==null&&!Je?(Zu(e,t,c),Nn(e,t,c)):(we&&l&&Au(t),t.flags|=1,ot(e,t,i,c),t.child)}function Mp(e,t,i,l,o){if(Ra(t),t.stateNode===null){var c=pi,v=i.contextType;typeof v=="object"&&v!==null&&(c=rt(v)),c=new i(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=uc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},Uu(t),v=i.contextType,c.context=typeof v=="object"&&v!==null?rt(v):pi,c.state=t.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(oc(t,i,v,l),c.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(v=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),v!==c.state&&uc.enqueueReplaceState(c,c.state,null),Es(t,l,c,o),js(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,N=Ua(i,b);c.props=N;var V=c.context,q=i.contextType;v=pi,typeof q=="object"&&q!==null&&(v=rt(q));var X=i.getDerivedStateFromProps;q=typeof X=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||V!==v)&&pp(t,c,l,v),Kn=!1;var _=t.memoizedState;c.state=_,Es(t,l,c,o),js(),V=t.memoizedState,b||_!==V||Kn?(typeof X=="function"&&(oc(t,i,X,l),V=t.memoizedState),(N=Kn||mp(t,i,N,l,_,V,v))?(q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=V),c.props=l,c.state=V,c.context=v,l=N):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,Bu(e,t),v=t.memoizedProps,q=Ua(i,v),c.props=q,X=t.pendingProps,_=c.context,V=i.contextType,N=pi,typeof V=="object"&&V!==null&&(N=rt(V)),b=i.getDerivedStateFromProps,(V=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==X||_!==N)&&pp(t,c,l,N),Kn=!1,_=t.memoizedState,c.state=_,Es(t,l,c,o),js();var H=t.memoizedState;v!==X||_!==H||Kn||e!==null&&e.dependencies!==null&&Wl(e.dependencies)?(typeof b=="function"&&(oc(t,i,b,l),H=t.memoizedState),(q=Kn||mp(t,i,q,l,_,H,N)||e!==null&&e.dependencies!==null&&Wl(e.dependencies))?(V||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,H,N),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,H,N)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=H),c.props=l,c.state=H,c.context=N,l=q):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,vr(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=Va(t,e.child,null,o),t.child=Va(t,null,i,o)):ot(e,t,i,o),t.memoizedState=c.state,e=t.child):e=Nn(e,t,o),e}function Dp(e,t,i,l){return Da(),t.flags|=256,ot(e,t,i,l),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mc(e){return{baseLanes:e,cachePool:ym()}}function pc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Vt),e}function Op(e,t,i){var l=t.pendingProps,o=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),v&&(o=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(we){if(o?Qn(t):Pn(),(e=Ue)?(e=Bg(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:ln,overflow:rn}:null,retryLane:536870912,hydrationErrors:null},i=cm(e),i.return=t,t.child=i,lt=t,Ue=null)):e=null,e===null)throw Gn(t);return Jc(e)?t.lanes=32:t.lanes=536870912,null}var b=l.children;return l=l.fallback,o?(Pn(),o=t.mode,b=xr({mode:"hidden",children:b},o),l=Ma(l,o,i,null),b.return=t,l.return=t,b.sibling=l,t.child=b,l=t.child,l.memoizedState=mc(i),l.childLanes=pc(e,v,i),t.memoizedState=hc,Ds(null,l)):(Qn(t),gc(t,b))}var N=e.memoizedState;if(N!==null&&(b=N.dehydrated,b!==null)){if(c)t.flags&256?(Qn(t),t.flags&=-257,t=vc(e,t,i)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),b=l.fallback,o=t.mode,l=xr({mode:"visible",children:l.children},o),b=Ma(b,o,i,null),b.flags|=2,l.return=t,b.return=t,l.sibling=b,t.child=l,Va(t,e.child,null,i),l=t.child,l.memoizedState=mc(i),l.childLanes=pc(e,v,i),t.memoizedState=hc,t=Ds(null,l));else if(Qn(t),Jc(b)){if(v=b.nextSibling&&b.nextSibling.dataset,v)var V=v.dgst;v=V,l=Error(r(419)),l.stack="",l.digest=v,xs({value:l,source:null,stack:null}),t=vc(e,t,i)}else if(Je||yi(e,t,i,!1),v=(i&e.childLanes)!==0,Je||v){if(v=Ve,v!==null&&(l=vh(v,i),l!==0&&l!==N.retryLane))throw N.retryLane=l,Ca(e,l),Et(v,e,l),fc;Pc(b)||Ar(),t=vc(e,t,i)}else Pc(b)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Ue=Ft(b.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&hm(t,e),t=gc(t,l.children),t.flags|=4096);return t}return o?(Pn(),b=l.fallback,o=t.mode,N=e.child,V=N.sibling,l=bn(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,V!==null?b=bn(V,b):(b=Ma(b,o,i,null),b.flags|=2),b.return=t,l.return=t,l.sibling=b,t.child=l,Ds(null,l),l=t.child,b=e.child.memoizedState,b===null?b=mc(i):(o=b.cachePool,o!==null?(N=Qe._currentValue,o=o.parent!==N?{parent:N,pool:N}:o):o=ym(),b={baseLanes:b.baseLanes|i,cachePool:o}),l.memoizedState=b,l.childLanes=pc(e,v,i),t.memoizedState=hc,Ds(e.child,l)):(Qn(t),i=e.child,e=i.sibling,i=bn(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=i,t.memoizedState=null,i)}function gc(e,t){return t=xr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xr(e,t){return e=Rt(22,e,null,t),e.lanes=0,e}function vc(e,t,i){return Va(t,e.child,null,i),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rp(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ru(e.return,t,i)}function xc(e,t,i,l,o,c){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:o,treeForkCount:c}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=o,v.treeForkCount=c)}function zp(e,t,i){var l=t.pendingProps,o=l.revealOrder,c=l.tail;l=l.children;var v=Xe.current,b=(v&2)!==0;if(b?(v=v&1|2,t.flags|=128):v&=1,K(Xe,v),ot(e,t,l,i),l=we?vs:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rp(e,i,t);else if(e.tag===19)Rp(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(i=t.child,o=null;i!==null;)e=i.alternate,e!==null&&lr(e)===null&&(o=i),i=i.sibling;i=o,i===null?(o=t.child,t.child=null):(o=i.sibling,i.sibling=null),xc(t,!1,o,i,c,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&lr(e)===null){t.child=o;break}e=o.sibling,o.sibling=i,i=o,o=e}xc(t,!0,i,null,c,l);break;case"together":xc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Nn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),In|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(yi(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,i=bn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function yc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wl(e)))}function vS(e,t,i){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),Xn(t,Qe,e.memoizedState.cache),Da();break;case 27:case 5:ns(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:Xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Gu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Qn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Op(e,t,i):(Qn(t),e=Nn(e,t,i),e!==null?e.sibling:null);Qn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(yi(e,t,i,!1),l=(i&t.childLanes)!==0),o){if(l)return zp(e,t,i);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),K(Xe,Xe.current),l)break;return null;case 22:return t.lanes=0,Ep(e,t,i,t.pendingProps);case 24:Xn(t,Qe,e.memoizedState.cache)}return Nn(e,t,i)}function kp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!yc(e,i)&&(t.flags&128)===0)return Je=!1,vS(e,t,i);Je=(e.flags&131072)!==0}else Je=!1,we&&(t.flags&1048576)!==0&&dm(t,vs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")ju(e)?(l=Ua(e,l),t.tag=1,t=Mp(null,t,e,l,i)):(t.tag=0,t=dc(null,t,e,l,i));else{if(e!=null){var o=e.$$typeof;if(o===k){t.tag=11,t=wp(null,t,e,l,i);break e}else if(o===F){t.tag=14,t=Tp(null,t,e,l,i);break e}}throw t=Se(e)||e,Error(r(306,t,""))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,o=Ua(l,t.pendingProps),Mp(e,t,l,o,i);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var c=t.memoizedState;o=c.element,Bu(e,t),Es(t,l,null,i);var v=t.memoizedState;if(l=v.cache,Xn(t,Qe,l),l!==c.cache&&zu(t,[Qe],i,!0),js(),l=v.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Dp(e,t,l,i);break e}else if(l!==o){o=qt(Error(r(424)),t),xs(o),t=Dp(e,t,l,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ue=Ft(e.firstChild),lt=t,we=!0,Yn=null,Xt=!0,i=Em(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Da(),l===o){t=Nn(e,t,i);break e}ot(e,t,l,i)}t=t.child}return t;case 26:return vr(e,t),e===null?(i=Xg(t.type,null,t.pendingProps,null))?t.memoizedState=i:we||(i=t.type,e=t.pendingProps,l=kr(pe.current).createElement(i),l[st]=t,l[yt]=e,ut(l,i,e),at(l),t.stateNode=l):t.memoizedState=Xg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ns(t),e===null&&we&&(l=t.stateNode=qg(t.type,t.pendingProps,pe.current),lt=t,Xt=!0,o=Ue,ia(t.type)?(Wc=o,Ue=Ft(l.firstChild)):Ue=o),ot(e,t,t.pendingProps.children,i),vr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((o=l=Ue)&&(l=FS(l,t.type,t.pendingProps,Xt),l!==null?(t.stateNode=l,lt=t,Ue=Ft(l.firstChild),Xt=!1,o=!0):o=!1),o||Gn(t)),ns(t),o=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,l=c.children,Fc(o,c)?l=null:v!==null&&Fc(o,v)&&(t.flags|=32),t.memoizedState!==null&&(o=Ku(e,t,oS,null,null,i),Xs._currentValue=o),vr(e,t),ot(e,t,l,i),t.child;case 6:return e===null&&we&&((e=i=Ue)&&(i=ZS(i,t.pendingProps,Xt),i!==null?(t.stateNode=i,lt=t,Ue=null,e=!0):e=!1),e||Gn(t)),null;case 13:return Op(e,t,i);case 4:return Ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Va(t,null,l,i):ot(e,t,l,i),t.child;case 11:return wp(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,Xn(t,t.type,l.value),ot(e,t,l.children,i),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,Ra(t),o=rt(o),l=l(o),t.flags|=1,ot(e,t,l,i),t.child;case 14:return Tp(e,t,t.type,t.pendingProps,i);case 15:return jp(e,t,t.type,t.pendingProps,i);case 19:return zp(e,t,i);case 31:return gS(e,t,i);case 22:return Ep(e,t,i,t.pendingProps);case 24:return Ra(t),l=rt(Qe),e===null?(o=Vu(),o===null&&(o=Ve,c=ku(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=i),o=c),t.memoizedState={parent:l,cache:o},Uu(t),Xn(t,Qe,o)):((e.lanes&i)!==0&&(Bu(e,t),Es(t,null,null,i),js()),o=e.memoizedState,c=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Xn(t,Qe,l)):(l=c.cache,Xn(t,Qe,l),l!==o.cache&&zu(t,[Qe],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function An(e){e.flags|=4}function bc(e,t,i,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(rg())e.flags|=8192;else throw La=nr,_u}else e.flags&=-16777217}function Lp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t))if(rg())e.flags|=8192;else throw La=nr,_u}function yr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mh():536870912,e.lanes|=t,Oi|=t)}function Os(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.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,i=0,l=0;if(t)for(var o=e.child;o!==null;)i|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)i|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function xS(e,t,i){var l=t.pendingProps;switch(Cu(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 i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Tn(Qe),Le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(xi(t)?An(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Du())),Be(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(An(t),c!==null?(Be(t),Lp(t,c)):(Be(t),bc(t,o,null,l,i))):c?c!==e.memoizedState?(An(t),Be(t),Lp(t,c)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&An(t),Be(t),bc(t,o,e,l,i)),null;case 27:if(Dl(t),i=pe.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Be(t),null}e=I.current,xi(t)?mm(t):(e=qg(o,l,i),t.stateNode=e,An(t))}return Be(t),null;case 5:if(Dl(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Be(t),null}if(c=I.current,xi(t))mm(t);else{var v=kr(pe.current);switch(c){case 1:c=v.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=v.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=v.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=v.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=v.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?v.createElement(o,{is:l.is}):v.createElement(o)}}c[st]=t,c[yt]=l;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)c.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=c;e:switch(ut(c,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&An(t)}}return Be(t),bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=pe.current,xi(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,o=lt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[st]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Og(e.nodeValue,i)),e||Gn(t,!0)}else e=kr(e).createTextNode(l),e[st]=t,t.stateNode=e}return Be(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=xi(t),i!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[st]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else i=Du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Be(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=xi(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[st]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),o=!1}else o=Du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==o&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),yr(t,t.updateQueue),Be(t),null);case 4:return Le(),e===null&&qc(t.stateNode.containerInfo),Be(t),null;case 10:return Tn(t.type),Be(t),null;case 19:if(G(Xe),l=t.memoizedState,l===null)return Be(t),null;if(o=(t.flags&128)!==0,c=l.rendering,c===null)if(o)Os(l,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=lr(e),c!==null){for(t.flags|=128,Os(l,!1),e=c.updateQueue,t.updateQueue=e,yr(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)um(i,e),i=i.sibling;return K(Xe,Xe.current&1|2),we&&Sn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ct()>jr&&(t.flags|=128,o=!0,Os(l,!1),t.lanes=4194304)}else{if(!o)if(e=lr(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,yr(t,e),Os(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!we)return Be(t),null}else 2*Ct()-l.renderingStartTime>jr&&i!==536870912&&(t.flags|=128,o=!0,Os(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ct(),e.sibling=null,i=Xe.current,K(Xe,o?i&1|2:i&1),we&&Sn(t,l.treeForkCount),e):(Be(t),null);case 22:case 23:return kt(t),Yu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),i=t.updateQueue,i!==null&&yr(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&G(za),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Tn(Qe),Be(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function yS(e,t){switch(Cu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tn(Qe),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Dl(t),null;case 31:if(t.memoizedState!==null){if(kt(t),t.alternate===null)throw Error(r(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Xe),null;case 4:return Le(),null;case 10:return Tn(t.type),null;case 22:case 23:return kt(t),Yu(),e!==null&&G(za),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Tn(Qe),null;case 25:return null;default:return null}}function Vp(e,t){switch(Cu(t),t.tag){case 3:Tn(Qe),Le();break;case 26:case 27:case 5:Dl(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:G(Xe);break;case 10:Tn(t.type);break;case 22:case 23:kt(t),Yu(),e!==null&&G(za);break;case 24:Tn(Qe)}}function Rs(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var o=l.next;i=o;do{if((i.tag&e)===e){l=void 0;var c=i.create,v=i.inst;l=c(),v.destroy=l}i=i.next}while(i!==o)}}catch(b){Ce(t,t.return,b)}}function Jn(e,t,i){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){var v=l.inst,b=v.destroy;if(b!==void 0){v.destroy=void 0,o=t;var N=i,V=b;try{V()}catch(q){Ce(o,N,q)}}}l=l.next}while(l!==c)}}catch(q){Ce(t,t.return,q)}}function _p(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Am(t,i)}catch(l){Ce(e,e.return,l)}}}function Up(e,t,i){i.props=Ua(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){Ce(e,t,l)}}function zs(e,t){try{var i=e.ref;if(i!==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 i=="function"?e.refCleanup=i(l):i.current=l}}catch(o){Ce(e,t,o)}}function on(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(o){Ce(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(o){Ce(e,t,o)}else i.current=null}function Bp(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(o){Ce(e,e.return,o)}}function Sc(e,t,i){try{var l=e.stateNode;$S(l,e.type,i,t),l[yt]=t}catch(o){Ce(e,e.return,o)}}function Hp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ia(e.type)||e.tag===4}function wc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hp(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&&ia(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 Tc(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=xn));else if(l!==4&&(l===27&&ia(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Tc(e,t,i),e=e.sibling;e!==null;)Tc(e,t,i),e=e.sibling}function br(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&ia(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(br(e,t,i),e=e.sibling;e!==null;)br(e,t,i),e=e.sibling}function $p(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);ut(t,l,i),t[st]=e,t[yt]=i}catch(c){Ce(e,e.return,c)}}var Cn=!1,We=!1,jc=!1,qp=typeof WeakSet=="function"?WeakSet:Set,it=null;function bS(e,t){if(e=e.containerInfo,Xc=$r,e=em(e),vu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var o=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{i.nodeType,c.nodeType}catch{i=null;break e}var v=0,b=-1,N=-1,V=0,q=0,X=e,_=null;t:for(;;){for(var H;X!==i||o!==0&&X.nodeType!==3||(b=v+o),X!==c||l!==0&&X.nodeType!==3||(N=v+l),X.nodeType===3&&(v+=X.nodeValue.length),(H=X.firstChild)!==null;)_=X,X=H;for(;;){if(X===e)break t;if(_===i&&++V===o&&(b=v),_===c&&++q===l&&(N=v),(H=X.nextSibling)!==null)break;X=_,_=X.parentNode}X=H}i=b===-1||N===-1?null:{start:b,end:N}}else i=null}i=i||{start:0,end:0}}else i=null;for(Kc={focusedElem:e,selectionRange:i},$r=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){switch(t=it,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)o=e[i],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,i=t,o=c.memoizedProps,c=c.memoizedState,l=i.stateNode;try{var ee=Ua(i.type,o);e=l.getSnapshotBeforeUpdate(ee,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(se){Ce(i,i.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Qc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}}function Yp(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Dn(e,i),l&4&&Rs(5,i);break;case 1:if(Dn(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(v){Ce(i,i.return,v)}else{var o=Ua(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ce(i,i.return,v)}}l&64&&_p(i),l&512&&zs(i,i.return);break;case 3:if(Dn(e,i),l&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Am(e,t)}catch(v){Ce(i,i.return,v)}}break;case 27:t===null&&l&4&&$p(i);case 26:case 5:Dn(e,i),t===null&&l&4&&Bp(i),l&512&&zs(i,i.return);break;case 12:Dn(e,i);break;case 31:Dn(e,i),l&4&&Kp(e,i);break;case 13:Dn(e,i),l&4&&Fp(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=MS.bind(null,i),QS(e,i))));break;case 22:if(l=i.memoizedState!==null||Cn,!l){t=t!==null&&t.memoizedState!==null||We,o=Cn;var c=We;Cn=l,(We=t)&&!c?On(e,i,(i.subtreeFlags&8772)!==0):Dn(e,i),Cn=o,We=c}break;case 30:break;default:Dn(e,i)}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&eu(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 $e=null,St=!1;function Mn(e,t,i){for(i=i.child;i!==null;)Xp(e,t,i),i=i.sibling}function Xp(e,t,i){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(as,i)}catch{}switch(i.tag){case 26:We||on(i,t),Mn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:We||on(i,t);var l=$e,o=St;ia(i.type)&&($e=i.stateNode,St=!1),Mn(e,t,i),qs(i.stateNode),$e=l,St=o;break;case 5:We||on(i,t);case 6:if(l=$e,o=St,$e=null,Mn(e,t,i),$e=l,St=o,$e!==null)if(St)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(i.stateNode)}catch(c){Ce(i,t,c)}else try{$e.removeChild(i.stateNode)}catch(c){Ce(i,t,c)}break;case 18:$e!==null&&(St?(e=$e,_g(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Bi(e)):_g($e,i.stateNode));break;case 4:l=$e,o=St,$e=i.stateNode.containerInfo,St=!0,Mn(e,t,i),$e=l,St=o;break;case 0:case 11:case 14:case 15:Jn(2,i,t),We||Jn(4,i,t),Mn(e,t,i);break;case 1:We||(on(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Up(i,t,l)),Mn(e,t,i);break;case 21:Mn(e,t,i);break;case 22:We=(l=We)||i.memoizedState!==null,Mn(e,t,i),We=l;break;default:Mn(e,t,i)}}function Kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bi(e)}catch(i){Ce(t,t.return,i)}}}function Fp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bi(e)}catch(i){Ce(t,t.return,i)}}function SS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qp),t;default:throw Error(r(435,e.tag))}}function Sr(e,t){var i=SS(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var o=DS.bind(null,e,l);l.then(o,o)}})}function wt(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var o=i[l],c=e,v=t,b=v;e:for(;b!==null;){switch(b.tag){case 27:if(ia(b.type)){$e=b.stateNode,St=!1;break e}break;case 5:$e=b.stateNode,St=!1;break e;case 3:case 4:$e=b.stateNode.containerInfo,St=!0;break e}b=b.return}if($e===null)throw Error(r(160));Xp(c,v,o),$e=null,St=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zp(t,e),t=t.sibling}var It=null;function Zp(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wt(t,e),Tt(e),l&4&&(Jn(3,e,e.return),Rs(3,e),Jn(5,e,e.return));break;case 1:wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),l&64&&Cn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var o=It;if(wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),l&4){var c=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":c=o.getElementsByTagName("title")[0],(!c||c[ls]||c[st]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(l),o.head.insertBefore(c,o.querySelector("head > title"))),ut(c,l,i),c[st]=e,at(c),l=c;break e;case"link":var v=Zg("link","href",o).get(l+(i.href||""));if(v){for(var b=0;b<v.length;b++)if(c=v[b],c.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&c.getAttribute("rel")===(i.rel==null?null:i.rel)&&c.getAttribute("title")===(i.title==null?null:i.title)&&c.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(b,1);break t}}c=o.createElement(l),ut(c,l,i),o.head.appendChild(c);break;case"meta":if(v=Zg("meta","content",o).get(l+(i.content||""))){for(b=0;b<v.length;b++)if(c=v[b],c.getAttribute("content")===(i.content==null?null:""+i.content)&&c.getAttribute("name")===(i.name==null?null:i.name)&&c.getAttribute("property")===(i.property==null?null:i.property)&&c.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&c.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(b,1);break t}}c=o.createElement(l),ut(c,l,i),o.head.appendChild(c);break;default:throw Error(r(468,l))}c[st]=e,at(c),l=c}e.stateNode=l}else Qg(o,e.type,e.stateNode);else e.stateNode=Fg(o,l,e.memoizedProps);else c!==l?(c===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):c.count--,l===null?Qg(o,e.type,e.stateNode):Fg(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Sc(e,e.memoizedProps,i.memoizedProps)}break;case 27:wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),i!==null&&l&4&&Sc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(wt(t,e),Tt(e),l&512&&(We||i===null||on(i,i.return)),e.flags&32){o=e.stateNode;try{oi(o,"")}catch(ee){Ce(e,e.return,ee)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Sc(e,o,i!==null?i.memoizedProps:o)),l&1024&&(jc=!0);break;case 6:if(wt(t,e),Tt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(ee){Ce(e,e.return,ee)}}break;case 3:if(_r=null,o=It,It=Lr(t.containerInfo),wt(t,e),It=o,Tt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Bi(t.containerInfo)}catch(ee){Ce(e,e.return,ee)}jc&&(jc=!1,Qp(e));break;case 4:l=It,It=Lr(e.stateNode.containerInfo),wt(t,e),Tt(e),It=l;break;case 12:wt(t,e),Tt(e);break;case 31:wt(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 13:wt(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Tr=Ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 22:o=e.memoizedState!==null;var N=i!==null&&i.memoizedState!==null,V=Cn,q=We;if(Cn=V||o,We=q||N,wt(t,e),We=q,Cn=V,Tt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(i===null||N||Cn||We||Ba(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){N=i=t;try{if(c=N.stateNode,o)v=c.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{b=N.stateNode;var X=N.memoizedProps.style,_=X!=null&&X.hasOwnProperty("display")?X.display:null;b.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ee){Ce(N,N.return,ee)}}}else if(t.tag===6){if(i===null){N=t;try{N.stateNode.nodeValue=o?"":N.memoizedProps}catch(ee){Ce(N,N.return,ee)}}}else if(t.tag===18){if(i===null){N=t;try{var H=N.stateNode;o?Ug(H,!0):Ug(N.stateNode,!1)}catch(ee){Ce(N,N.return,ee)}}}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;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Sr(e,i))));break;case 19:wt(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sr(e,l)));break;case 30:break;case 21:break;default:wt(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(Hp(l)){i=l;break}l=l.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var o=i.stateNode,c=wc(e);br(e,c,o);break;case 5:var v=i.stateNode;i.flags&32&&(oi(v,""),i.flags&=-33);var b=wc(e);br(e,b,v);break;case 3:case 4:var N=i.stateNode.containerInfo,V=wc(e);Tc(e,V,N);break;default:throw Error(r(161))}}catch(q){Ce(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Qp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Yp(e,t.alternate,t),t=t.sibling}function Ba(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jn(4,t,t.return),Ba(t);break;case 1:on(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Up(t,t.return,i),Ba(t);break;case 27:qs(t.stateNode);case 26:case 5:on(t,t.return),Ba(t);break;case 22:t.memoizedState===null&&Ba(t);break;case 30:Ba(t);break;default:Ba(t)}e=e.sibling}}function On(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,c=t,v=c.flags;switch(c.tag){case 0:case 11:case 15:On(o,c,i),Rs(4,c);break;case 1:if(On(o,c,i),l=c,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(V){Ce(l,l.return,V)}if(l=c,o=l.updateQueue,o!==null){var b=l.stateNode;try{var N=o.shared.hiddenCallbacks;if(N!==null)for(o.shared.hiddenCallbacks=null,o=0;o<N.length;o++)Nm(N[o],b)}catch(V){Ce(l,l.return,V)}}i&&v&64&&_p(c),zs(c,c.return);break;case 27:$p(c);case 26:case 5:On(o,c,i),i&&l===null&&v&4&&Bp(c),zs(c,c.return);break;case 12:On(o,c,i);break;case 31:On(o,c,i),i&&v&4&&Kp(o,c);break;case 13:On(o,c,i),i&&v&4&&Fp(o,c);break;case 22:c.memoizedState===null&&On(o,c,i),zs(c,c.return);break;case 30:break;default:On(o,c,i)}t=t.sibling}}function Ec(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ys(i))}function Nc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e))}function en(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pp(e,t,i,l),t=t.sibling}function Pp(e,t,i,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:en(e,t,i,l),o&2048&&Rs(9,t);break;case 1:en(e,t,i,l);break;case 3:en(e,t,i,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e)));break;case 12:if(o&2048){en(e,t,i,l),e=t.stateNode;try{var c=t.memoizedProps,v=c.id,b=c.onPostCommit;typeof b=="function"&&b(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ce(t,t.return,N)}}else en(e,t,i,l);break;case 31:en(e,t,i,l);break;case 13:en(e,t,i,l);break;case 23:break;case 22:c=t.stateNode,v=t.alternate,t.memoizedState!==null?c._visibility&2?en(e,t,i,l):ks(e,t):c._visibility&2?en(e,t,i,l):(c._visibility|=2,Ci(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Ec(v,t);break;case 24:en(e,t,i,l),o&2048&&Nc(t.alternate,t);break;default:en(e,t,i,l)}}function Ci(e,t,i,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,v=t,b=i,N=l,V=v.flags;switch(v.tag){case 0:case 11:case 15:Ci(c,v,b,N,o),Rs(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?Ci(c,v,b,N,o):ks(c,v):(q._visibility|=2,Ci(c,v,b,N,o)),o&&V&2048&&Ec(v.alternate,v);break;case 24:Ci(c,v,b,N,o),o&&V&2048&&Nc(v.alternate,v);break;default:Ci(c,v,b,N,o)}t=t.sibling}}function ks(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,o=l.flags;switch(l.tag){case 22:ks(i,l),o&2048&&Ec(l.alternate,l);break;case 24:ks(i,l),o&2048&&Nc(l.alternate,l);break;default:ks(i,l)}t=t.sibling}}var Ls=8192;function Mi(e,t,i){if(e.subtreeFlags&Ls)for(e=e.child;e!==null;)Jp(e,t,i),e=e.sibling}function Jp(e,t,i){switch(e.tag){case 26:Mi(e,t,i),e.flags&Ls&&e.memoizedState!==null&&r2(i,It,e.memoizedState,e.memoizedProps);break;case 5:Mi(e,t,i);break;case 3:case 4:var l=It;It=Lr(e.stateNode.containerInfo),Mi(e,t,i),It=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ls,Ls=16777216,Mi(e,t,i),Ls=l):Mi(e,t,i));break;default:Mi(e,t,i)}}function Wp(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 Vs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];it=l,eg(l,e)}Wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ip(e),e=e.sibling}function Ip(e){switch(e.tag){case 0:case 11:case 15:Vs(e),e.flags&2048&&Jn(9,e,e.return);break;case 3:Vs(e);break;case 12:Vs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,wr(e)):Vs(e);break;default:Vs(e)}}function wr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];it=l,eg(l,e)}Wp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jn(8,t,t.return),wr(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,wr(t));break;default:wr(t)}e=e.sibling}}function eg(e,t){for(;it!==null;){var i=it;switch(i.tag){case 0:case 11:case 15:Jn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ys(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,it=l;else e:for(i=e;it!==null;){l=it;var o=l.sibling,c=l.return;if(Gp(l),l===i){it=null;break e}if(o!==null){o.return=c,it=o;break e}it=c}}}var wS={getCacheForType:function(e){var t=rt(Qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return rt(Qe).controller.signal}},TS=typeof WeakMap=="function"?WeakMap:Map,Ne=0,Ve=null,ge=null,ye=0,Ae=0,Lt=null,Wn=!1,Di=!1,Ac=!1,Rn=0,Ye=0,In=0,Ha=0,Cc=0,Vt=0,Oi=0,_s=null,jt=null,Mc=!1,Tr=0,tg=0,jr=1/0,Er=null,ea=null,tt=0,ta=null,Ri=null,zn=0,Dc=0,Oc=null,ng=null,Us=0,Rc=null;function _t(){return(Ne&2)!==0&&ye!==0?ye&-ye:$.T!==null?Uc():xh()}function ag(){if(Vt===0)if((ye&536870912)===0||we){var e=zl;zl<<=1,(zl&3932160)===0&&(zl=262144),Vt=e}else Vt=536870912;return e=zt.current,e!==null&&(e.flags|=32),Vt}function Et(e,t,i){(e===Ve&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(zi(e,0),na(e,ye,Vt,!1)),ss(e,i),((Ne&2)===0||e!==Ve)&&(e===Ve&&((Ne&2)===0&&(Ha|=i),Ye===4&&na(e,ye,Vt,!1)),un(e))}function ig(e,t,i){if((Ne&6)!==0)throw Error(r(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||is(e,t),o=l?NS(e,t):kc(e,t,!0),c=l;do{if(o===0){Di&&!l&&na(e,t,0,!1);break}else{if(i=e.current.alternate,c&&!jS(i)){o=kc(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var b=e;o=_s;var N=b.current.memoizedState.isDehydrated;if(N&&(zi(b,v).flags|=256),v=kc(b,v,!1),v!==2){if(Ac&&!N){b.errorRecoveryDisabledLanes|=c,Ha|=c,o=4;break e}c=jt,jt=o,c!==null&&(jt===null?jt=c:jt.push.apply(jt,c))}o=v}if(c=!1,o!==2)continue}}if(o===1){zi(e,0),na(e,t,0,!0);break}e:{switch(l=e,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:na(l,t,Vt,!Wn);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=Tr+300-Ct(),10<o)){if(na(l,t,Vt,!Wn),Ll(l,0,!0)!==0)break e;zn=t,l.timeoutHandle=Lg(sg.bind(null,l,i,jt,Er,Mc,t,Vt,Ha,Oi,Wn,c,"Throttled",-0,0),o);break e}sg(l,i,jt,Er,Mc,t,Vt,Ha,Oi,Wn,c,null,-0,0)}}break}while(!0);un(e)}function sg(e,t,i,l,o,c,v,b,N,V,q,X,_,H){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Jp(t,c,X);var ee=(c&62914560)===c?Tr-Ct():(c&4194048)===c?tg-Ct():0;if(ee=o2(X,ee),ee!==null){zn=c,e.cancelPendingCommit=ee(hg.bind(null,e,t,c,i,l,o,v,b,N,q,X,null,_,H)),na(e,c,v,!V);return}}hg(e,t,c,i,l,o,v,b,N)}function jS(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var o=i[l],c=o.getSnapshot;o=o.value;try{if(!Ot(c(),o))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;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 na(e,t,i,l){t&=~Cc,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var c=31-Dt(o),v=1<<c;l[c]=-1,o&=~v}i!==0&&ph(e,i,t)}function Nr(){return(Ne&6)===0?(Bs(0),!1):!0}function zc(){if(ge!==null){if(Ae===0)var e=ge.return;else e=ge,wn=Oa=null,Qu(e),Ti=null,Ss=0,e=ge;for(;e!==null;)Vp(e.alternate,e),e=e.return;ge=null}}function zi(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,GS(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),zn=0,zc(),Ve=e,ge=i=bn(e.current,null),ye=t,Ae=0,Lt=null,Wn=!1,Di=is(e,t),Ac=!1,Oi=Vt=Cc=Ha=In=Ye=0,jt=_s=null,Mc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Dt(l),c=1<<o;t|=e[o],l&=~c}return Rn=t,Fl(),i}function lg(e,t){de=null,$.H=Ms,t===wi||t===tr?(t=wm(),Ae=3):t===_u?(t=wm(),Ae=4):Ae=t===fc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Lt=t,ge===null&&(Ye=1,pr(e,qt(t,e.current)))}function rg(){var e=zt.current;return e===null?!0:(ye&4194048)===ye?Kt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Kt:!1}function og(){var e=$.H;return $.H=Ms,e===null?Ms:e}function ug(){var e=$.A;return $.A=wS,e}function Ar(){Ye=4,Wn||(ye&4194048)!==ye&&zt.current!==null||(Di=!0),(In&134217727)===0&&(Ha&134217727)===0||Ve===null||na(Ve,ye,Vt,!1)}function kc(e,t,i){var l=Ne;Ne|=2;var o=og(),c=ug();(Ve!==e||ye!==t)&&(Er=null,zi(e,t)),t=!1;var v=Ye;e:do try{if(Ae!==0&&ge!==null){var b=ge,N=Lt;switch(Ae){case 8:zc(),v=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var V=Ae;if(Ae=0,Lt=null,ki(e,b,N,V),i&&Di){v=0;break e}break;default:V=Ae,Ae=0,Lt=null,ki(e,b,N,V)}}ES(),v=Ye;break}catch(q){lg(e,q)}while(!0);return t&&e.shellSuspendCounter++,wn=Oa=null,Ne=l,$.H=o,$.A=c,ge===null&&(Ve=null,ye=0,Fl()),v}function ES(){for(;ge!==null;)cg(ge)}function NS(e,t){var i=Ne;Ne|=2;var l=og(),o=ug();Ve!==e||ye!==t?(Er=null,jr=Ct()+500,zi(e,t)):Di=is(e,t);e:do try{if(Ae!==0&&ge!==null){t=ge;var c=Lt;t:switch(Ae){case 1:Ae=0,Lt=null,ki(e,t,c,1);break;case 2:case 9:if(bm(c)){Ae=0,Lt=null,fg(t);break}t=function(){Ae!==2&&Ae!==9||Ve!==e||(Ae=7),un(e)},c.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:bm(c)?(Ae=0,Lt=null,fg(t)):(Ae=0,Lt=null,ki(e,t,c,7));break;case 5:var v=null;switch(ge.tag){case 26:v=ge.memoizedState;case 5:case 27:var b=ge;if(v?Pg(v):b.stateNode.complete){Ae=0,Lt=null;var N=b.sibling;if(N!==null)ge=N;else{var V=b.return;V!==null?(ge=V,Cr(V)):ge=null}break t}}Ae=0,Lt=null,ki(e,t,c,5);break;case 6:Ae=0,Lt=null,ki(e,t,c,6);break;case 8:zc(),Ye=6;break e;default:throw Error(r(462))}}AS();break}catch(q){lg(e,q)}while(!0);return wn=Oa=null,$.H=l,$.A=o,Ne=i,ge!==null?0:(Ve=null,ye=0,Fl(),Ye)}function AS(){for(;ge!==null&&!Pb();)cg(ge)}function cg(e){var t=kp(e.alternate,e,Rn);e.memoizedProps=e.pendingProps,t===null?Cr(e):ge=t}function fg(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Cp(i,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=Cp(i,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Qu(t);default:Vp(i,t),t=ge=um(t,Rn),t=kp(i,t,Rn)}e.memoizedProps=e.pendingProps,t===null?Cr(e):ge=t}function ki(e,t,i,l){wn=Oa=null,Qu(t),Ti=null,Ss=0;var o=t.return;try{if(pS(e,o,t,i,ye)){Ye=1,pr(e,qt(i,e.current)),ge=null;return}}catch(c){if(o!==null)throw ge=o,c;Ye=1,pr(e,qt(i,e.current)),ge=null;return}t.flags&32768?(we||l===1?e=!0:Di||(ye&536870912)!==0?e=!1:(Wn=e=!0,(l===2||l===9||l===3||l===6)&&(l=zt.current,l!==null&&l.tag===13&&(l.flags|=16384))),dg(t,e)):Cr(t)}function Cr(e){var t=e;do{if((t.flags&32768)!==0){dg(t,Wn);return}e=t.return;var i=xS(t.alternate,t,Rn);if(i!==null){ge=i;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Ye===0&&(Ye=5)}function dg(e,t){do{var i=yS(e.alternate,e);if(i!==null){i.flags&=32767,ge=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=i}while(e!==null);Ye=6,ge=null}function hg(e,t,i,l,o,c,v,b,N){e.cancelPendingCommit=null;do Mr();while(tt!==0);if((Ne&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=wu,l1(e,i,c,v,b,N),e===Ve&&(ge=Ve=null,ye=0),Ri=t,ta=e,zn=i,Dc=c,Oc=o,ng=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,OS(Ol,function(){return xg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,o=Q.p,Q.p=2,v=Ne,Ne|=4;try{bS(e,t,i)}finally{Ne=v,Q.p=o,$.T=l}}tt=1,mg(),pg(),gg()}}function mg(){if(tt===1){tt=0;var e=ta,t=Ri,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=$.T,$.T=null;var l=Q.p;Q.p=2;var o=Ne;Ne|=4;try{Zp(t,e);var c=Kc,v=em(e.containerInfo),b=c.focusedElem,N=c.selectionRange;if(v!==b&&b&&b.ownerDocument&&Ih(b.ownerDocument.documentElement,b)){if(N!==null&&vu(b)){var V=N.start,q=N.end;if(q===void 0&&(q=V),"selectionStart"in b)b.selectionStart=V,b.selectionEnd=Math.min(q,b.value.length);else{var X=b.ownerDocument||document,_=X&&X.defaultView||window;if(_.getSelection){var H=_.getSelection(),ee=b.textContent.length,se=Math.min(N.start,ee),ze=N.end===void 0?se:Math.min(N.end,ee);!H.extend&&se>ze&&(v=ze,ze=se,se=v);var O=Wh(b,se),C=Wh(b,ze);if(O&&C&&(H.rangeCount!==1||H.anchorNode!==O.node||H.anchorOffset!==O.offset||H.focusNode!==C.node||H.focusOffset!==C.offset)){var L=X.createRange();L.setStart(O.node,O.offset),H.removeAllRanges(),se>ze?(H.addRange(L),H.extend(C.node,C.offset)):(L.setEnd(C.node,C.offset),H.addRange(L))}}}}for(X=[],H=b;H=H.parentNode;)H.nodeType===1&&X.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<X.length;b++){var Y=X[b];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}$r=!!Xc,Kc=Xc=null}finally{Ne=o,Q.p=l,$.T=i}}e.current=t,tt=2}}function pg(){if(tt===2){tt=0;var e=ta,t=Ri,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=$.T,$.T=null;var l=Q.p;Q.p=2;var o=Ne;Ne|=4;try{Yp(e,t.alternate,t)}finally{Ne=o,Q.p=l,$.T=i}}tt=3}}function gg(){if(tt===4||tt===3){tt=0,Jb();var e=ta,t=Ri,i=zn,l=ng;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?tt=5:(tt=0,Ri=ta=null,vg(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ea=null),Wo(i),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(as,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=$.T,o=Q.p,Q.p=2,$.T=null;try{for(var c=e.onRecoverableError,v=0;v<l.length;v++){var b=l[v];c(b.value,{componentStack:b.stack})}}finally{$.T=t,Q.p=o}}(zn&3)!==0&&Mr(),un(e),o=e.pendingLanes,(i&261930)!==0&&(o&42)!==0?e===Rc?Us++:(Us=0,Rc=e):Us=0,Bs(0)}}function vg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ys(t)))}function Mr(){return mg(),pg(),gg(),xg()}function xg(){if(tt!==5)return!1;var e=ta,t=Dc;Dc=0;var i=Wo(zn),l=$.T,o=Q.p;try{Q.p=32>i?32:i,$.T=null,i=Oc,Oc=null;var c=ta,v=zn;if(tt=0,Ri=ta=null,zn=0,(Ne&6)!==0)throw Error(r(331));var b=Ne;if(Ne|=4,Ip(c.current),Pp(c,c.current,v,i),Ne=b,Bs(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(as,c)}catch{}return!0}finally{Q.p=o,$.T=l,vg(e,t)}}function yg(e,t,i){t=qt(i,t),t=cc(e.stateNode,t,2),e=Zn(e,t,2),e!==null&&(ss(e,2),un(e))}function Ce(e,t,i){if(e.tag===3)yg(e,e,i);else for(;t!==null;){if(t.tag===3){yg(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ea===null||!ea.has(l))){e=qt(i,e),i=bp(2),l=Zn(t,i,2),l!==null&&(Sp(i,l,t,e),ss(l,2),un(l));break}}t=t.return}}function Lc(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new TS;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(i)||(Ac=!0,o.add(i),e=CS.bind(null,e,t,i),t.then(e,e))}function CS(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ve===e&&(ye&i)===i&&(Ye===4||Ye===3&&(ye&62914560)===ye&&300>Ct()-Tr?(Ne&2)===0&&zi(e,0):Cc|=i,Oi===ye&&(Oi=0)),un(e)}function bg(e,t){t===0&&(t=mh()),e=Ca(e,t),e!==null&&(ss(e,t),un(e))}function MS(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),bg(e,i)}function DS(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(i=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),bg(e,i)}function OS(e,t){return Zo(e,t)}var Dr=null,Li=null,Vc=!1,Or=!1,_c=!1,aa=0;function un(e){e!==Li&&e.next===null&&(Li===null?Dr=Li=e:Li=Li.next=e),Or=!0,Vc||(Vc=!0,zS())}function Bs(e,t){if(!_c&&Or){_c=!0;do for(var i=!1,l=Dr;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var c=0;else{var v=l.suspendedLanes,b=l.pingedLanes;c=(1<<31-Dt(42|e)+1)-1,c&=o&~(v&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(i=!0,jg(l,c))}else c=ye,c=Ll(l,l===Ve?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||is(l,c)||(i=!0,jg(l,c));l=l.next}while(i);_c=!1}}function RS(){Sg()}function Sg(){Or=Vc=!1;var e=0;aa!==0&&YS()&&(e=aa);for(var t=Ct(),i=null,l=Dr;l!==null;){var o=l.next,c=wg(l,t);c===0?(l.next=null,i===null?Dr=o:i.next=o,o===null&&(Li=i)):(i=l,(e!==0||(c&3)!==0)&&(Or=!0)),l=o}tt!==0&&tt!==5||Bs(e),aa!==0&&(aa=0)}function wg(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var v=31-Dt(c),b=1<<v,N=o[v];N===-1?((b&i)===0||(b&l)!==0)&&(o[v]=s1(b,t)):N<=t&&(e.expiredLanes|=b),c&=~b}if(t=Ve,i=ye,i=Ll(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qo(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||is(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Qo(l),Wo(i)){case 2:case 8:i=dh;break;case 32:i=Ol;break;case 268435456:i=hh;break;default:i=Ol}return l=Tg.bind(null,e),i=Zo(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Qo(l),e.callbackPriority=2,e.callbackNode=null,2}function Tg(e,t){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Mr()&&e.callbackNode!==i)return null;var l=ye;return l=Ll(e,e===Ve?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(ig(e,l,t),wg(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?Tg.bind(null,e):null)}function jg(e,t){if(Mr())return null;ig(e,t,!0)}function zS(){XS(function(){(Ne&6)!==0?Zo(fh,RS):Sg()})}function Uc(){if(aa===0){var e=bi;e===0&&(e=Rl,Rl<<=1,(Rl&261888)===0&&(Rl=256)),aa=e}return aa}function Eg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bl(""+e)}function Ng(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function kS(e,t,i,l,o){if(t==="submit"&&i&&i.stateNode===o){var c=Eg((o[yt]||null).action),v=l.submitter;v&&(t=(t=v[yt]||null)?Eg(t.formAction):v.getAttribute("formAction"),t!==null&&(c=t,v=null));var b=new Yl("action","action",null,l,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(aa!==0){var N=v?Ng(o,v):new FormData(o);ic(i,{pending:!0,data:N,method:o.method,action:c},null,N)}}else typeof c=="function"&&(b.preventDefault(),N=v?Ng(o,v):new FormData(o),ic(i,{pending:!0,data:N,method:o.method,action:c},c,N))},currentTarget:o}]})}}for(var Bc=0;Bc<Su.length;Bc++){var Hc=Su[Bc],LS=Hc.toLowerCase(),VS=Hc[0].toUpperCase()+Hc.slice(1);Wt(LS,"on"+VS)}Wt(am,"onAnimationEnd"),Wt(im,"onAnimationIteration"),Wt(sm,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(W1,"onTransitionRun"),Wt(I1,"onTransitionStart"),Wt(eS,"onTransitionCancel"),Wt(lm,"onTransitionEnd"),li("onMouseEnter",["mouseout","mouseover"]),li("onMouseLeave",["mouseout","mouseover"]),li("onPointerEnter",["pointerout","pointerover"]),li("onPointerLeave",["pointerout","pointerover"]),ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hs="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(" "),_S=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hs));function Ag(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],o=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var v=l.length-1;0<=v;v--){var b=l[v],N=b.instance,V=b.currentTarget;if(b=b.listener,N!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=V;try{c(o)}catch(q){Kl(q)}o.currentTarget=null,c=N}else for(v=0;v<l.length;v++){if(b=l[v],N=b.instance,V=b.currentTarget,b=b.listener,N!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=V;try{c(o)}catch(q){Kl(q)}o.currentTarget=null,c=N}}}}function ve(e,t){var i=t[Io];i===void 0&&(i=t[Io]=new Set);var l=e+"__bubble";i.has(l)||(Cg(t,e,2,!1),i.add(l))}function $c(e,t,i){var l=0;t&&(l|=4),Cg(i,e,l,t)}var Rr="_reactListening"+Math.random().toString(36).slice(2);function qc(e){if(!e[Rr]){e[Rr]=!0,Sh.forEach(function(i){i!=="selectionchange"&&(_S.has(i)||$c(i,!1,e),$c(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rr]||(t[Rr]=!0,$c("selectionchange",!1,t))}}function Cg(e,t,i,l){switch(av(t)){case 2:var o=f2;break;case 8:o=d2;break;default:o=af}i=o.bind(null,t,i,e),o=void 0,!ou||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,i,{capture:!0,passive:o}):e.addEventListener(t,i,!0):o!==void 0?e.addEventListener(t,i,{passive:o}):e.addEventListener(t,i,!1)}function Yc(e,t,i,l,o){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var b=l.stateNode.containerInfo;if(b===o)break;if(v===4)for(v=l.return;v!==null;){var N=v.tag;if((N===3||N===4)&&v.stateNode.containerInfo===o)return;v=v.return}for(;b!==null;){if(v=ai(b),v===null)return;if(N=v.tag,N===5||N===6||N===26||N===27){l=c=v;continue e}b=b.parentNode}}l=l.return}zh(function(){var V=c,q=lu(i),X=[];e:{var _=rm.get(e);if(_!==void 0){var H=Yl,ee=e;switch(e){case"keypress":if($l(i)===0)break e;case"keydown":case"keyup":H=D1;break;case"focusin":ee="focus",H=du;break;case"focusout":ee="blur",H=du;break;case"beforeblur":case"afterblur":H=du;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=x1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=z1;break;case am:case im:case sm:H=S1;break;case lm:H=L1;break;case"scroll":case"scrollend":H=g1;break;case"wheel":H=_1;break;case"copy":case"cut":case"paste":H=T1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Uh;break;case"toggle":case"beforetoggle":H=B1}var se=(t&4)!==0,ze=!se&&(e==="scroll"||e==="scrollend"),O=se?_!==null?_+"Capture":null:_;se=[];for(var C=V,L;C!==null;){var Y=C;if(L=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||L===null||O===null||(Y=os(C,O),Y!=null&&se.push($s(C,Y,L))),ze)break;C=C.return}0<se.length&&(_=new H(_,ee,null,i,q),X.push({event:_,listeners:se}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",_&&i!==su&&(ee=i.relatedTarget||i.fromElement)&&(ai(ee)||ee[ni]))break e;if((H||_)&&(_=q.window===q?q:(_=q.ownerDocument)?_.defaultView||_.parentWindow:window,H?(ee=i.relatedTarget||i.toElement,H=V,ee=ee?ai(ee):null,ee!==null&&(ze=d(ee),se=ee.tag,ee!==ze||se!==5&&se!==27&&se!==6)&&(ee=null)):(H=null,ee=V),H!==ee)){if(se=Vh,Y="onMouseLeave",O="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(se=Uh,Y="onPointerLeave",O="onPointerEnter",C="pointer"),ze=H==null?_:rs(H),L=ee==null?_:rs(ee),_=new se(Y,C+"leave",H,i,q),_.target=ze,_.relatedTarget=L,Y=null,ai(q)===V&&(se=new se(O,C+"enter",ee,i,q),se.target=L,se.relatedTarget=ze,Y=se),ze=Y,H&&ee)t:{for(se=US,O=H,C=ee,L=0,Y=O;Y;Y=se(Y))L++;Y=0;for(var ae=C;ae;ae=se(ae))Y++;for(;0<L-Y;)O=se(O),L--;for(;0<Y-L;)C=se(C),Y--;for(;L--;){if(O===C||C!==null&&O===C.alternate){se=O;break t}O=se(O),C=se(C)}se=null}else se=null;H!==null&&Mg(X,_,H,se,!1),ee!==null&&ze!==null&&Mg(X,ze,ee,se,!0)}}e:{if(_=V?rs(V):window,H=_.nodeName&&_.nodeName.toLowerCase(),H==="select"||H==="input"&&_.type==="file")var je=Kh;else if(Gh(_))if(Fh)je=Q1;else{je=F1;var ne=K1}else H=_.nodeName,!H||H.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?V&&iu(V.elementType)&&(je=Kh):je=Z1;if(je&&(je=je(e,V))){Xh(X,je,i,q);break e}ne&&ne(e,_,V),e==="focusout"&&V&&_.type==="number"&&V.memoizedProps.value!=null&&au(_,"number",_.value)}switch(ne=V?rs(V):window,e){case"focusin":(Gh(ne)||ne.contentEditable==="true")&&(di=ne,xu=V,gs=null);break;case"focusout":gs=xu=di=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,tm(X,i,q);break;case"selectionchange":if(J1)break;case"keydown":case"keyup":tm(X,i,q)}var he;if(mu)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else fi?qh(e,i)&&(be="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(be="onCompositionStart");be&&(Bh&&i.locale!=="ko"&&(fi||be!=="onCompositionStart"?be==="onCompositionEnd"&&fi&&(he=kh()):($n=q,uu="value"in $n?$n.value:$n.textContent,fi=!0)),ne=zr(V,be),0<ne.length&&(be=new _h(be,e,null,i,q),X.push({event:be,listeners:ne}),he?be.data=he:(he=Yh(i),he!==null&&(be.data=he)))),(he=$1?q1(e,i):Y1(e,i))&&(be=zr(V,"onBeforeInput"),0<be.length&&(ne=new _h("onBeforeInput","beforeinput",null,i,q),X.push({event:ne,listeners:be}),ne.data=he)),kS(X,e,V,i,q)}Ag(X,t)})}function $s(e,t,i){return{instance:e,listener:t,currentTarget:i}}function zr(e,t){for(var i=t+"Capture",l=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=os(e,i),o!=null&&l.unshift($s(e,o,c)),o=os(e,t),o!=null&&l.push($s(e,o,c))),e.tag===3)return l;e=e.return}return[]}function US(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mg(e,t,i,l,o){for(var c=t._reactName,v=[];i!==null&&i!==l;){var b=i,N=b.alternate,V=b.stateNode;if(b=b.tag,N!==null&&N===l)break;b!==5&&b!==26&&b!==27||V===null||(N=V,o?(V=os(i,c),V!=null&&v.unshift($s(i,V,N))):o||(V=os(i,c),V!=null&&v.push($s(i,V,N)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var BS=/\r\n?/g,HS=/\u0000|\uFFFD/g;function Dg(e){return(typeof e=="string"?e:""+e).replace(BS,`
|
|
49
|
+
`).replace(HS,"")}function Og(e,t){return t=Dg(t),Dg(e)===t}function Re(e,t,i,l,o,c){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||oi(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&oi(e,""+l);break;case"className":_l(e,"class",l);break;case"tabIndex":_l(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":_l(e,i,l);break;case"style":Oh(e,l,c);break;case"data":if(t!=="object"){_l(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Bl(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(i==="formAction"?(t!=="input"&&Re(e,t,"name",o.name,o,null),Re(e,t,"formEncType",o.formEncType,o,null),Re(e,t,"formMethod",o.formMethod,o,null),Re(e,t,"formTarget",o.formTarget,o,null)):(Re(e,t,"encType",o.encType,o,null),Re(e,t,"method",o.method,o,null),Re(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Bl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=xn);break;case"onScroll":l!=null&&ve("scroll",e);break;case"onScrollEnd":l!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(i=l.__html,i!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=i}}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}i=Bl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+l):e.removeAttribute(i);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(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":ve("beforetoggle",e),ve("toggle",e),Vl(e,"popover",l);break;case"xlinkActuate":vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":vn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":vn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":vn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":vn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Vl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=m1.get(i)||i,Vl(e,i,l))}}function Gc(e,t,i,l,o,c){switch(i){case"style":Oh(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(i=l.__html,i!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof l=="string"?oi(e,l):(typeof l=="number"||typeof l=="bigint")&&oi(e,""+l);break;case"onScroll":l!=null&&ve("scroll",e);break;case"onScrollEnd":l!=null&&ve("scrollend",e);break;case"onClick":l!=null&&(e.onclick=xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(o=i.endsWith("Capture"),t=i.slice(2,o?i.length-7:void 0),c=e[yt]||null,c=c!=null?c[i]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof l=="function")){typeof c!="function"&&c!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,o);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):Vl(e,i,l)}}}function ut(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var l=!1,o=!1,c;for(c in i)if(i.hasOwnProperty(c)){var v=i[c];if(v!=null)switch(c){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,c,v,i,null)}}o&&Re(e,t,"srcSet",i.srcSet,i,null),l&&Re(e,t,"src",i.src,i,null);return;case"input":ve("invalid",e);var b=c=v=o=null,N=null,V=null;for(l in i)if(i.hasOwnProperty(l)){var q=i[l];if(q!=null)switch(l){case"name":o=q;break;case"type":v=q;break;case"checked":N=q;break;case"defaultChecked":V=q;break;case"value":c=q;break;case"defaultValue":b=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:Re(e,t,l,q,i,null)}}Ah(e,c,b,N,V,v,o,!1);return;case"select":ve("invalid",e),l=v=c=null;for(o in i)if(i.hasOwnProperty(o)&&(b=i[o],b!=null))switch(o){case"value":c=b;break;case"defaultValue":v=b;break;case"multiple":l=b;default:Re(e,t,o,b,i,null)}t=c,i=v,e.multiple=!!l,t!=null?ri(e,!!l,t,!1):i!=null&&ri(e,!!l,i,!0);return;case"textarea":ve("invalid",e),c=o=l=null;for(v in i)if(i.hasOwnProperty(v)&&(b=i[v],b!=null))switch(v){case"value":l=b;break;case"defaultValue":o=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Re(e,t,v,b,i,null)}Mh(e,l,o,c);return;case"option":for(N in i)if(i.hasOwnProperty(N)&&(l=i[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Re(e,t,N,l,i,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(l=0;l<Hs.length;l++)ve(Hs[l],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(V in i)if(i.hasOwnProperty(V)&&(l=i[V],l!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,V,l,i,null)}return;default:if(iu(t)){for(q in i)i.hasOwnProperty(q)&&(l=i[q],l!==void 0&&Gc(e,t,q,l,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(l=i[b],l!=null&&Re(e,t,b,l,i,null))}function $S(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,v=null,b=null,N=null,V=null,q=null;for(H in i){var X=i[H];if(i.hasOwnProperty(H)&&X!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":N=X;default:l.hasOwnProperty(H)||Re(e,t,H,null,l,X)}}for(var _ in l){var H=l[_];if(X=i[_],l.hasOwnProperty(_)&&(H!=null||X!=null))switch(_){case"type":c=H;break;case"name":o=H;break;case"checked":V=H;break;case"defaultChecked":q=H;break;case"value":v=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:H!==X&&Re(e,t,_,H,l,X)}}nu(e,v,b,N,V,q,c,o);return;case"select":H=v=b=_=null;for(c in i)if(N=i[c],i.hasOwnProperty(c)&&N!=null)switch(c){case"value":break;case"multiple":H=N;default:l.hasOwnProperty(c)||Re(e,t,c,null,l,N)}for(o in l)if(c=l[o],N=i[o],l.hasOwnProperty(o)&&(c!=null||N!=null))switch(o){case"value":_=c;break;case"defaultValue":b=c;break;case"multiple":v=c;default:c!==N&&Re(e,t,o,c,l,N)}t=b,i=v,l=H,_!=null?ri(e,!!i,_,!1):!!l!=!!i&&(t!=null?ri(e,!!i,t,!0):ri(e,!!i,i?[]:"",!1));return;case"textarea":H=_=null;for(b in i)if(o=i[b],i.hasOwnProperty(b)&&o!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Re(e,t,b,null,l,o)}for(v in l)if(o=l[v],c=i[v],l.hasOwnProperty(v)&&(o!=null||c!=null))switch(v){case"value":_=o;break;case"defaultValue":H=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Re(e,t,v,o,l,c)}Ch(e,_,H);return;case"option":for(var ee in i)if(_=i[ee],i.hasOwnProperty(ee)&&_!=null&&!l.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Re(e,t,ee,null,l,_)}for(N in l)if(_=l[N],H=i[N],l.hasOwnProperty(N)&&_!==H&&(_!=null||H!=null))switch(N){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Re(e,t,N,_,l,H)}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 se in i)_=i[se],i.hasOwnProperty(se)&&_!=null&&!l.hasOwnProperty(se)&&Re(e,t,se,null,l,_);for(V in l)if(_=l[V],H=i[V],l.hasOwnProperty(V)&&_!==H&&(_!=null||H!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(137,t));break;default:Re(e,t,V,_,l,H)}return;default:if(iu(t)){for(var ze in i)_=i[ze],i.hasOwnProperty(ze)&&_!==void 0&&!l.hasOwnProperty(ze)&&Gc(e,t,ze,void 0,l,_);for(q in l)_=l[q],H=i[q],!l.hasOwnProperty(q)||_===H||_===void 0&&H===void 0||Gc(e,t,q,_,l,H);return}}for(var O in i)_=i[O],i.hasOwnProperty(O)&&_!=null&&!l.hasOwnProperty(O)&&Re(e,t,O,null,l,_);for(X in l)_=l[X],H=i[X],!l.hasOwnProperty(X)||_===H||_==null&&H==null||Re(e,t,X,_,l,H)}function Rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var o=i[l],c=o.transferSize,v=o.initiatorType,b=o.duration;if(c&&b&&Rg(v)){for(v=0,b=o.responseEnd,l+=1;l<i.length;l++){var N=i[l],V=N.startTime;if(V>b)break;var q=N.transferSize,X=N.initiatorType;q&&Rg(X)&&(N=N.responseEnd,v+=q*(N<b?1:(b-V)/(N-V)))}if(--l,t+=8*(c+v)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Xc=null,Kc=null;function kr(e){return e.nodeType===9?e:e.ownerDocument}function zg(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 kg(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 Fc(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 Zc=null;function YS(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var Lg=typeof setTimeout=="function"?setTimeout:void 0,GS=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,XS=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(e){return Vg.resolve(null).then(e).catch(KS)}:Lg;function KS(e){setTimeout(function(){throw e})}function ia(e){return e==="head"}function _g(e,t){var i=t,l=0;do{var o=i.nextSibling;if(e.removeChild(i),o&&o.nodeType===8)if(i=o.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(o),Bi(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")qs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,qs(i);for(var c=i.firstChild;c;){var v=c.nextSibling,b=c.nodeName;c[ls]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||i.removeChild(c),c=v}}else i==="body"&&qs(e.ownerDocument.body);i=o}while(i);Bi(t)}function Ug(e,t){var i=e;e=0;do{var l=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function Qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Qc(i),eu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function FS(e,t,i,l){for(;e.nodeType===1;){var o=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ls])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ft(e.nextSibling),e===null)break}return null}function ZS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ft(e.nextSibling),e===null))return null;return e}function Bg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ft(e.nextSibling),e===null))return null;return e}function Pc(e){return e.data==="$?"||e.data==="$~"}function Jc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function QS(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ft(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 Wc=null;function Hg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ft(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function $g(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function qg(e,t,i){switch(t=kr(i),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function qs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eu(e)}var Zt=new Map,Yg=new Set;function Lr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kn=Q.d;Q.d={f:PS,r:JS,D:WS,C:IS,L:e2,m:t2,X:a2,S:n2,M:i2};function PS(){var e=kn.f(),t=Nr();return e||t}function JS(e){var t=ii(e);t!==null&&t.tag===5&&t.type==="form"?lp(t):kn.r(e)}var Vi=typeof document>"u"?null:document;function Gg(e,t,i){var l=Vi;if(l&&typeof t=="string"&&t){var o=Ht(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof i=="string"&&(o+='[crossorigin="'+i+'"]'),Yg.has(o)||(Yg.add(o),e={rel:e,crossOrigin:i,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),ut(t,"link",e),at(t),l.head.appendChild(t)))}}function WS(e){kn.D(e),Gg("dns-prefetch",e,null)}function IS(e,t){kn.C(e,t),Gg("preconnect",e,t)}function e2(e,t,i){kn.L(e,t,i);var l=Vi;if(l&&e&&t){var o='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&i&&i.imageSrcSet?(o+='[imagesrcset="'+Ht(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(o+='[imagesizes="'+Ht(i.imageSizes)+'"]')):o+='[href="'+Ht(e)+'"]';var c=o;switch(t){case"style":c=_i(e);break;case"script":c=Ui(e)}Zt.has(c)||(e=y({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(c,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Ys(c))||t==="script"&&l.querySelector(Gs(c))||(t=l.createElement("link"),ut(t,"link",e),at(t),l.head.appendChild(t)))}}function t2(e,t){kn.m(e,t);var i=Vi;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Ht(l)+'"][href="'+Ht(e)+'"]',c=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ui(e)}if(!Zt.has(c)&&(e=y({rel:"modulepreload",href:e},t),Zt.set(c,e),i.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Gs(c)))return}l=i.createElement("link"),ut(l,"link",e),at(l),i.head.appendChild(l)}}}function n2(e,t,i){kn.S(e,t,i);var l=Vi;if(l&&e){var o=si(l).hoistableStyles,c=_i(e);t=t||"default";var v=o.get(c);if(!v){var b={loading:0,preload:null};if(v=l.querySelector(Ys(c)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(c))&&Ic(e,i);var N=v=l.createElement("link");at(N),ut(N,"link",e),N._p=new Promise(function(V,q){N.onload=V,N.onerror=q}),N.addEventListener("load",function(){b.loading|=1}),N.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Vr(v,t,l)}v={type:"stylesheet",instance:v,count:1,state:b},o.set(c,v)}}}function a2(e,t){kn.X(e,t);var i=Vi;if(i&&e){var l=si(i).hoistableScripts,o=Ui(e),c=l.get(o);c||(c=i.querySelector(Gs(o)),c||(e=y({src:e,async:!0},t),(t=Zt.get(o))&&ef(e,t),c=i.createElement("script"),at(c),ut(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function i2(e,t){kn.M(e,t);var i=Vi;if(i&&e){var l=si(i).hoistableScripts,o=Ui(e),c=l.get(o);c||(c=i.querySelector(Gs(o)),c||(e=y({src:e,async:!0,type:"module"},t),(t=Zt.get(o))&&ef(e,t),c=i.createElement("script"),at(c),ut(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function Xg(e,t,i,l){var o=(o=pe.current)?Lr(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=_i(i.href),i=si(o).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=_i(i.href);var c=si(o).hoistableStyles,v=c.get(e);if(v||(o=o.ownerDocument||o,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,v),(c=o.querySelector(Ys(e)))&&!c._p&&(v.instance=c,v.state.loading=5),Zt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Zt.set(e,i),c||s2(o,e,i,v.state))),t&&l===null)throw Error(r(528,""));return v}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(i),i=si(o).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function _i(e){return'href="'+Ht(e)+'"'}function Ys(e){return'link[rel="stylesheet"]['+e+"]"}function Kg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function s2(e,t,i,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}),ut(t,"link",i),at(t),e.head.appendChild(t))}function Ui(e){return'[src="'+Ht(e)+'"]'}function Gs(e){return"script[async]"+e}function Fg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ht(i.href)+'"]');if(l)return t.instance=l,at(l),l;var o=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),at(l),ut(l,"style",o),Vr(l,i.precedence,e),t.instance=l;case"stylesheet":o=_i(i.href);var c=e.querySelector(Ys(o));if(c)return t.state.loading|=4,t.instance=c,at(c),c;l=Kg(i),(o=Zt.get(o))&&Ic(l,o),c=(e.ownerDocument||e).createElement("link"),at(c);var v=c;return v._p=new Promise(function(b,N){v.onload=b,v.onerror=N}),ut(c,"link",l),t.state.loading|=4,Vr(c,i.precedence,e),t.instance=c;case"script":return c=Ui(i.src),(o=e.querySelector(Gs(c)))?(t.instance=o,at(o),o):(l=i,(o=Zt.get(c))&&(l=y({},i),ef(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),at(o),ut(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Vr(l,i.precedence,e));return t.instance}function Vr(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,c=o,v=0;v<l.length;v++){var b=l[v];if(b.dataset.precedence===t)c=b;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Ic(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _r=null;function Zg(e,t,i){if(_r===null){var l=new Map,o=_r=new Map;o.set(i,l)}else o=_r,l=o.get(i),l||(l=new Map,o.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),o=0;o<i.length;o++){var c=i[o];if(!(c[ls]||c[st]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var v=c.getAttribute(t)||"";v=e+v;var b=l.get(v);b?b.push(c):l.set(v,[c])}}return l}function Qg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function l2(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r2(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var o=_i(l.href),c=t.querySelector(Ys(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ur.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=c,at(c);return}c=t.ownerDocument||t,l=Kg(l),(o=Zt.get(o))&&Ic(l,o),c=c.createElement("link"),at(c);var v=c;v._p=new Promise(function(b,N){v.onload=b,v.onerror=N}),ut(c,"link",l),i.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ur.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var tf=0;function o2(e,t){return e.stylesheets&&e.count===0&&Hr(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Hr(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&tf===0&&(tf=62500*qS());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Hr(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>tf?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Ur(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Br=null;function Hr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Br=new Map,t.forEach(u2,e),Br=null,Ur.call(e))}function u2(e,t){if(!(t.state.loading&4)){var i=Br.get(e);if(i)var l=i.get(null);else{i=new Map,Br.set(e,i);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var v=o[c];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}o=t.instance,v=o.getAttribute("data-precedence"),c=i.get(v)||l,c===l&&i.set(null,o),i.set(v,o),this.count++,l=Ur.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Xs={$$typeof:z,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function c2(e,t,i,l,o,c,v,b,N){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=Po(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Po(0),this.hiddenUpdates=Po(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Jg(e,t,i,l,o,c,v,b,N,V,q,X){return e=new c2(e,t,i,v,N,V,q,X,b),t=1,c===!0&&(t|=24),c=Rt(3,null,null,t),e.current=c,c.stateNode=e,t=ku(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:i,cache:t},Uu(c),e}function Wg(e){return e?(e=pi,e):pi}function Ig(e,t,i,l,o,c){o=Wg(o),l.context===null?l.context=o:l.pendingContext=o,l=Fn(t),l.payload={element:i},c=c===void 0?null:c,c!==null&&(l.callback=c),i=Zn(e,l,t),i!==null&&(Et(i,e,t),Ts(i,e,t))}function ev(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function nf(e,t){ev(e,t),(e=e.alternate)&&ev(e,t)}function tv(e){if(e.tag===13||e.tag===31){var t=Ca(e,67108864);t!==null&&Et(t,e,67108864),nf(e,67108864)}}function nv(e){if(e.tag===13||e.tag===31){var t=_t();t=Jo(t);var i=Ca(e,t);i!==null&&Et(i,e,t),nf(e,t)}}var $r=!0;function f2(e,t,i,l){var o=$.T;$.T=null;var c=Q.p;try{Q.p=2,af(e,t,i,l)}finally{Q.p=c,$.T=o}}function d2(e,t,i,l){var o=$.T;$.T=null;var c=Q.p;try{Q.p=8,af(e,t,i,l)}finally{Q.p=c,$.T=o}}function af(e,t,i,l){if($r){var o=sf(l);if(o===null)Yc(e,t,l,qr,i),iv(e,l);else if(m2(o,e,t,i,l))l.stopPropagation();else if(iv(e,l),t&4&&-1<h2.indexOf(e)){for(;o!==null;){var c=ii(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var v=Ta(c.pendingLanes);if(v!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;v;){var N=1<<31-Dt(v);b.entanglements[1]|=N,v&=~N}un(c),(Ne&6)===0&&(jr=Ct()+500,Bs(0))}}break;case 31:case 13:b=Ca(c,2),b!==null&&Et(b,c,2),Nr(),nf(c,2)}if(c=sf(l),c===null&&Yc(e,t,l,qr,i),c===o)break;o=c}o!==null&&l.stopPropagation()}else Yc(e,t,l,null,i)}}function sf(e){return e=lu(e),lf(e)}var qr=null;function lf(e){if(qr=null,e=ai(e),e!==null){var t=d(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=h(t),e!==null)return e;e=null}else if(i===31){if(e=p(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qr=e,null}function av(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(Wb()){case fh:return 2;case dh:return 8;case Ol:case Ib:return 32;case hh:return 268435456;default:return 32}default:return 32}}var rf=!1,sa=null,la=null,ra=null,Ks=new Map,Fs=new Map,oa=[],h2="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 iv(e,t){switch(e){case"focusin":case"focusout":sa=null;break;case"dragenter":case"dragleave":la=null;break;case"mouseover":case"mouseout":ra=null;break;case"pointerover":case"pointerout":Ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(t.pointerId)}}function Zs(e,t,i,l,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:c,targetContainers:[o]},t!==null&&(t=ii(t),t!==null&&tv(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function m2(e,t,i,l,o){switch(t){case"focusin":return sa=Zs(sa,e,t,i,l,o),!0;case"dragenter":return la=Zs(la,e,t,i,l,o),!0;case"mouseover":return ra=Zs(ra,e,t,i,l,o),!0;case"pointerover":var c=o.pointerId;return Ks.set(c,Zs(Ks.get(c)||null,e,t,i,l,o)),!0;case"gotpointercapture":return c=o.pointerId,Fs.set(c,Zs(Fs.get(c)||null,e,t,i,l,o)),!0}return!1}function sv(e){var t=ai(e.target);if(t!==null){var i=d(t);if(i!==null){if(t=i.tag,t===13){if(t=h(i),t!==null){e.blockedOn=t,yh(e.priority,function(){nv(i)});return}}else if(t===31){if(t=p(i),t!==null){e.blockedOn=t,yh(e.priority,function(){nv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=sf(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);su=l,i.target.dispatchEvent(l),su=null}else return t=ii(i),t!==null&&tv(t),e.blockedOn=i,!1;t.shift()}return!0}function lv(e,t,i){Yr(e)&&i.delete(t)}function p2(){rf=!1,sa!==null&&Yr(sa)&&(sa=null),la!==null&&Yr(la)&&(la=null),ra!==null&&Yr(ra)&&(ra=null),Ks.forEach(lv),Fs.forEach(lv)}function Gr(e,t){e.blockedOn===t&&(e.blockedOn=null,rf||(rf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,p2)))}var Xr=null;function rv(e){Xr!==e&&(Xr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Xr===e&&(Xr=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(lf(l||i)===null)continue;break}var c=ii(i);c!==null&&(e.splice(t,3),t-=3,ic(c,{pending:!0,data:o,method:i.method,action:l},l,o))}}))}function Bi(e){function t(N){return Gr(N,e)}sa!==null&&Gr(sa,e),la!==null&&Gr(la,e),ra!==null&&Gr(ra,e),Ks.forEach(t),Fs.forEach(t);for(var i=0;i<oa.length;i++){var l=oa[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<oa.length&&(i=oa[0],i.blockedOn===null);)sv(i),i.blockedOn===null&&oa.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var o=i[l],c=i[l+1],v=o[yt]||null;if(typeof c=="function")v||rv(i);else if(v){var b=null;if(c&&c.hasAttribute("formAction")){if(o=c,v=c[yt]||null)b=v.formAction;else if(lf(o)!==null)continue}else b=v.action;typeof b=="function"?i[l+1]=b:(i.splice(l,3),l-=3),rv(i)}}}function ov(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(v){return o=v})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function of(e){this._internalRoot=e}Kr.prototype.render=of.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var i=t.current,l=_t();Ig(i,l,e,t,null,null)},Kr.prototype.unmount=of.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ig(e.current,2,null,e,null,null),Nr(),t[ni]=null}};function Kr(e){this._internalRoot=e}Kr.prototype.unstable_scheduleHydration=function(e){if(e){var t=xh();e={blockedOn:null,target:e,priority:t};for(var i=0;i<oa.length&&t!==0&&t<oa[i].priority;i++);oa.splice(i,0,e),i===0&&sv(e)}};var uv=a.version;if(uv!=="19.2.4")throw Error(r(527,uv,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var g2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fr.isDisabled&&Fr.supportsFiber)try{as=Fr.inject(g2),Mt=Fr}catch{}}return Ps.createRoot=function(e,t){if(!u(e))throw Error(r(299));var i=!1,l="",o=gp,c=vp,v=xp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=Jg(e,1,!1,null,null,i,l,null,o,c,v,ov),e[ni]=t.current,qc(e),new of(t)},Ps.hydrateRoot=function(e,t,i){if(!u(e))throw Error(r(299));var l=!1,o="",c=gp,v=vp,b=xp,N=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(c=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(N=i.formState)),t=Jg(e,1,!0,t,i??null,l,o,N,c,v,b,ov),t.context=Wg(null),i=t.current,l=_t(),l=Jo(l),o=Fn(l),o.callback=null,Zn(i,o,l),i=l,t.current.lanes=i,ss(t,i),un(t),e[ni]=t.current,qc(e),new Kr(t)},Ps.version="19.2.4",Ps}var bv;function A2(){if(bv)return ff.exports;bv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),ff.exports=N2(),ff.exports}var C2=A2();const lx="/api";async function _e(n){const a=await fetch(`${lx}${n}`,{headers:{accept:"application/json"}});if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function M2(n){const a=new EventSource(`${lx}/events`);return a.addEventListener("state-changed",s=>{try{const r=JSON.parse(s.data);n("state-changed",r)}catch{n("state-changed",{})}}),a.onerror=()=>{},()=>a.close()}function et(n){if(!n)return"unknown";const a=Date.now()-new Date(n).getTime();return a<0||a<6e4?"just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}function pt(n,a){if(!n)return"";if(n.length<=a)return n;const s=n.lastIndexOf(" ",a);return(s>a*.6?n.slice(0,s):n.slice(0,a))+"…"}const rx=T.createContext(()=>{});function Pi(){return T.useContext(rx)}const D2=new Set(["overview","mail","sessions","work","connections","inner","notes","runtime"]);function ox(n){const a=n.replace(/^#\/?/,"");if(!a.startsWith("agent/"))return null;const s=a.split("/"),r=s[1]?decodeURIComponent(s[1]):"";if(!r)return null;const u=s[2]??"overview",d=D2.has(u)?u:"overview",h=s.slice(3),p=h.length>0?h.map(decodeURIComponent).join("/"):void 0;return{agent:r,tab:d,focus:p}}function $f(n){let a=`#/agent/${encodeURIComponent(n.agent)}`;return(n.tab!=="overview"||n.focus)&&(a+=`/${n.tab}`),n.focus&&(a+=`/${n.focus.split("/").map(encodeURIComponent).join("/")}`),a}const O2=typeof document<"u"?ce.useLayoutEffect:()=>{},ba=n=>{var a;return(a=n==null?void 0:n.ownerDocument)!==null&&a!==void 0?a:document},Xa=n=>n&&"window"in n&&n.window===n?n:ba(n).defaultView||window;function R2(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function z2(n){return R2(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let k2=!1;function Ed(){return k2}function Ka(n,a){if(!Ed())return a&&n?n.contains(a):!1;if(!n||!a)return!1;let s=a;for(;s!==null;){if(s===n)return!0;s.tagName==="SLOT"&&s.assignedSlot?s=s.assignedSlot.parentNode:z2(s)?s=s.host:s=s.parentNode}return!1}const Fi=(n=document)=>{var a;if(!Ed())return n.activeElement;let s=n.activeElement;for(;s&&"shadowRoot"in s&&(!((a=s.shadowRoot)===null||a===void 0)&&a.activeElement);)s=s.shadowRoot.activeElement;return s};function gt(n){if(Ed()&&n.target instanceof Element&&n.target.shadowRoot){var a,s;if("composedPath"in n)return(a=n.composedPath()[0])!==null&&a!==void 0?a:null;if("composedPath"in n.nativeEvent)return(s=n.nativeEvent.composedPath()[0])!==null&&s!==void 0?s:null}return n.target}function ux(n){var a,s,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(a=0;a<u;a++)n[a]&&(s=ux(n[a]))&&(r&&(r+=" "),r+=s)}else for(s in n)n[s]&&(r&&(r+=" "),r+=s);return r}function Fe(){for(var n,a,s=0,r="",u=arguments.length;s<u;s++)(n=arguments[s])&&(a=ux(n))&&(r&&(r+=" "),r+=a);return r}function L2(n){if(V2())n.focus({preventScroll:!0});else{let a=_2(n);n.focus(),U2(a)}}let Zr=null;function V2(){if(Zr==null){Zr=!1;try{document.createElement("div").focus({get preventScroll(){return Zr=!0,!0}})}catch{}}return Zr}function _2(n){let a=n.parentNode,s=[],r=document.scrollingElement||document.documentElement;for(;a instanceof HTMLElement&&a!==r;)(a.offsetHeight<a.scrollHeight||a.offsetWidth<a.scrollWidth)&&s.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),a=a.parentNode;return r instanceof HTMLElement&&s.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),s}function U2(n){for(let{element:a,scrollTop:s,scrollLeft:r}of n)a.scrollTop=s,a.scrollLeft=r}function Do(n){var a;if(typeof window>"u"||window.navigator==null)return!1;let s=(a=window.navigator.userAgentData)===null||a===void 0?void 0:a.brands;return Array.isArray(s)&&s.some(r=>n.test(r.brand))||n.test(window.navigator.userAgent)}function cx(n){var a;return typeof window<"u"&&window.navigator!=null?n.test(((a=window.navigator.userAgentData)===null||a===void 0?void 0:a.platform)||window.navigator.platform):!1}function Ji(n){let a=null;return()=>(a==null&&(a=n()),a)}const mo=Ji(function(){return cx(/^Mac/i)}),B2=Ji(function(){return cx(/^iPad/i)||mo()&&navigator.maxTouchPoints>1}),H2=Ji(function(){return Do(/AppleWebKit/i)&&!$2()}),$2=Ji(function(){return Do(/Chrome/i)}),q2=Ji(function(){return Do(/Android/i)}),Y2=Ji(function(){return Do(/Firefox/i)});function gl(n,a,s=!0){var r,u;let{metaKey:d,ctrlKey:h,altKey:p,shiftKey:m}=a;Y2()&&(!((u=window.event)===null||u===void 0||(r=u.type)===null||r===void 0)&&r.startsWith("key"))&&n.target==="_blank"&&(mo()?d=!0:h=!0);let g=H2()&&mo()&&!B2()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:d,ctrlKey:h,altKey:p,shiftKey:m}):new MouseEvent("click",{metaKey:d,ctrlKey:h,altKey:p,shiftKey:m,detail:1,bubbles:!0,cancelable:!0});gl.isOpening=s,L2(n),n.dispatchEvent(g),gl.isOpening=!1}gl.isOpening=!1;function fx(){let n=T.useRef(new Map),a=T.useCallback((u,d,h,p)=>{let m=p!=null&&p.once?(...g)=>{n.current.delete(h),h(...g)}:h;n.current.set(h,{type:d,eventTarget:u,fn:m,options:p}),u.addEventListener(d,m,p)},[]),s=T.useCallback((u,d,h,p)=>{var m;let g=((m=n.current.get(h))===null||m===void 0?void 0:m.fn)||h;u.removeEventListener(d,g,p),n.current.delete(h)},[]),r=T.useCallback(()=>{n.current.forEach((u,d)=>{s(u.eventTarget,u.type,d,u.options)})},[s]);return T.useEffect(()=>r,[r]),{addGlobalListener:a,removeGlobalListener:s,removeAllGlobalListeners:r}}function G2(n){return n.pointerType===""&&n.isTrusted?!0:q2()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}var X2=sx();function dx(n){let a=n;return a.nativeEvent=n,a.isDefaultPrevented=()=>a.defaultPrevented,a.isPropagationStopped=()=>a.cancelBubble,a.persist=()=>{},a}function K2(n,a){Object.defineProperty(n,"target",{value:a}),Object.defineProperty(n,"currentTarget",{value:a})}function hx(n){let a=T.useRef({isFocused:!1,observer:null});return O2(()=>{const s=a.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]),T.useCallback(s=>{let r=gt(s);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){a.current.isFocused=!0;let u=r,d=h=>{if(a.current.isFocused=!1,u.disabled){let p=dx(h);n==null||n(p)}a.current.observer&&(a.current.observer.disconnect(),a.current.observer=null)};u.addEventListener("focusout",d,{once:!0}),a.current.observer=new MutationObserver(()=>{if(a.current.isFocused&&u.disabled){var h;(h=a.current.observer)===null||h===void 0||h.disconnect();let p=u===Fi()?null:Fi();u.dispatchEvent(new FocusEvent("blur",{relatedTarget:p})),u.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:p}))}}),a.current.observer.observe(u,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let F2=!1,Sl=null;const qf=new Set;let rl=new Map,Wa=!1,Yf=!1;const Z2={Tab:!0,Escape:!0};function Nd(n,a){for(let s of qf)s(n,a)}function Q2(n){return!(n.metaKey||!mo()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function po(n){Wa=!0,!gl.isOpening&&Q2(n)&&(Sl="keyboard",Nd("keyboard",n))}function Ki(n){Sl="pointer","pointerType"in n&&n.pointerType,(n.type==="mousedown"||n.type==="pointerdown")&&(Wa=!0,Nd("pointer",n))}function mx(n){!gl.isOpening&&G2(n)&&(Wa=!0,Sl="virtual")}function px(n){gt(n)===window||gt(n)===document||F2||!n.isTrusted||(!Wa&&!Yf&&(Sl="virtual",Nd("virtual",n)),Wa=!1,Yf=!1)}function gx(){Wa=!1,Yf=!0}function Gf(n){if(typeof window>"u"||typeof document>"u"||rl.get(Xa(n)))return;const a=Xa(n),s=ba(n);let r=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){Wa=!0,r.apply(this,arguments)},s.addEventListener("keydown",po,!0),s.addEventListener("keyup",po,!0),s.addEventListener("click",mx,!0),a.addEventListener("focus",px,!0),a.addEventListener("blur",gx,!1),typeof PointerEvent<"u"&&(s.addEventListener("pointerdown",Ki,!0),s.addEventListener("pointermove",Ki,!0),s.addEventListener("pointerup",Ki,!0)),a.addEventListener("beforeunload",()=>{vx(n)},{once:!0}),rl.set(a,{focus:r})}const vx=(n,a)=>{const s=Xa(n),r=ba(n);a&&r.removeEventListener("DOMContentLoaded",a),rl.has(s)&&(s.HTMLElement.prototype.focus=rl.get(s).focus,r.removeEventListener("keydown",po,!0),r.removeEventListener("keyup",po,!0),r.removeEventListener("click",mx,!0),s.removeEventListener("focus",px,!0),s.removeEventListener("blur",gx,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",Ki,!0),r.removeEventListener("pointermove",Ki,!0),r.removeEventListener("pointerup",Ki,!0)),rl.delete(s))};function P2(n){const a=ba(n);let s;return a.readyState!=="loading"?Gf(n):(s=()=>{Gf(n)},a.addEventListener("DOMContentLoaded",s)),()=>vx(n,s)}typeof document<"u"&&P2();function Xf(){return Sl!=="pointer"}const J2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function W2(n,a,s){let r=ba(s?gt(s):void 0),u=s?gt(s):void 0;const d=typeof window<"u"?Xa(u).HTMLInputElement:HTMLInputElement,h=typeof window<"u"?Xa(u).HTMLTextAreaElement:HTMLTextAreaElement,p=typeof window<"u"?Xa(u).HTMLElement:HTMLElement,m=typeof window<"u"?Xa(u).KeyboardEvent:KeyboardEvent;let g=Fi(r);return n=n||g instanceof d&&!J2.has(g.type)||g instanceof h||g instanceof p&&g.isContentEditable,!(n&&a==="keyboard"&&s instanceof m&&!Z2[s.key])}function I2(n,a,s){Gf(),T.useEffect(()=>{if((s==null?void 0:s.enabled)===!1)return;let r=(u,d)=>{W2(!!(s!=null&&s.isTextInput),u,d)&&n(Xf())};return qf.add(r),()=>{qf.delete(r)}},a)}function ew(n){let{isDisabled:a,onFocus:s,onBlur:r,onFocusChange:u}=n;const d=T.useCallback(m=>{if(gt(m)===m.currentTarget)return r&&r(m),u&&u(!1),!0},[r,u]),h=hx(d),p=T.useCallback(m=>{let g=gt(m);const x=ba(g),y=x?Fi(x):Fi();g===m.currentTarget&&g===y&&(s&&s(m),u&&u(!0),h(m))},[u,s,h]);return{focusProps:{onFocus:!a&&(s||u||r)?p:void 0,onBlur:!a&&(r||u)?d:void 0}}}function tw(n){let{isDisabled:a,onBlurWithin:s,onFocusWithin:r,onFocusWithinChange:u}=n,d=T.useRef({isFocusWithin:!1}),{addGlobalListener:h,removeAllGlobalListeners:p}=fx(),m=T.useCallback(y=>{Ka(y.currentTarget,gt(y))&&d.current.isFocusWithin&&!Ka(y.currentTarget,y.relatedTarget)&&(d.current.isFocusWithin=!1,p(),s&&s(y),u&&u(!1))},[s,u,d,p]),g=hx(m),x=T.useCallback(y=>{if(!Ka(y.currentTarget,gt(y)))return;let S=gt(y);const w=ba(S),j=Fi(w);if(!d.current.isFocusWithin&&j===S){r&&r(y),u&&u(!0),d.current.isFocusWithin=!0,g(y);let E=y.currentTarget;h(w,"focus",D=>{let R=gt(D);if(d.current.isFocusWithin&&!Ka(E,R)){let M=new w.defaultView.FocusEvent("blur",{relatedTarget:R});K2(M,E);let z=dx(M);m(z)}},{capture:!0})}},[r,u,g,h,m]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:x,onBlur:m}}}let Kf=!1,Qr=0;function nw(){Kf=!0,setTimeout(()=>{Kf=!1},50)}function Sv(n){n.pointerType==="touch"&&nw()}function aw(){if(!(typeof document>"u"))return Qr===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",Sv),Qr++,()=>{Qr--,!(Qr>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",Sv)}}function xx(n){let{onHoverStart:a,onHoverChange:s,onHoverEnd:r,isDisabled:u}=n,[d,h]=T.useState(!1),p=T.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;T.useEffect(aw,[]);let{addGlobalListener:m,removeAllGlobalListeners:g}=fx(),{hoverProps:x,triggerHoverEnd:y}=T.useMemo(()=>{let S=(E,D)=>{if(p.pointerType=D,u||D==="touch"||p.isHovered||!Ka(E.currentTarget,gt(E)))return;p.isHovered=!0;let R=E.currentTarget;p.target=R,m(ba(gt(E)),"pointerover",M=>{p.isHovered&&p.target&&!Ka(p.target,gt(M))&&w(M,M.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:R,pointerType:D}),s&&s(!0),h(!0)},w=(E,D)=>{let R=p.target;p.pointerType="",p.target=null,!(D==="touch"||!p.isHovered||!R)&&(p.isHovered=!1,g(),r&&r({type:"hoverend",target:R,pointerType:D}),s&&s(!1),h(!1))},j={};return typeof PointerEvent<"u"&&(j.onPointerEnter=E=>{Kf&&E.pointerType==="mouse"||S(E,E.pointerType)},j.onPointerLeave=E=>{!u&&Ka(E.currentTarget,gt(E))&&w(E,E.pointerType)}),{hoverProps:j,triggerHoverEnd:w}},[a,s,r,u,p,m,g]);return T.useEffect(()=>{u&&y({currentTarget:p.target},p.pointerType)},[u]),{hoverProps:x,isHovered:d}}function yx(n={}){let{autoFocus:a=!1,isTextInput:s,within:r}=n,u=T.useRef({isFocused:!1,isFocusVisible:a||Xf()}),[d,h]=T.useState(!1),[p,m]=T.useState(()=>u.current.isFocused&&u.current.isFocusVisible),g=T.useCallback(()=>m(u.current.isFocused&&u.current.isFocusVisible),[]),x=T.useCallback(w=>{u.current.isFocused=w,u.current.isFocusVisible=Xf(),h(w),g()},[g]);I2(w=>{u.current.isFocusVisible=w,g()},[s,d],{enabled:d,isTextInput:s});let{focusProps:y}=ew({isDisabled:r,onFocusChange:x}),{focusWithinProps:S}=tw({isDisabled:!r,onFocusWithinChange:x});return{isFocused:d,isFocusVisible:p,focusProps:r?S:y}}var iw=Object.defineProperty,sw=(n,a,s)=>a in n?iw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,pf=(n,a,s)=>(sw(n,typeof a!="symbol"?a+"":a,s),s);let lw=class{constructor(){pf(this,"current",this.detect()),pf(this,"handoffState","pending"),pf(this,"currentId",0)}set(a){this.current!==a&&(this.handoffState="pending",this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},hn=new lw;function Wi(n){var a;return hn.isServer?null:n==null?document:(a=n==null?void 0:n.ownerDocument)!=null?a:document}function Ff(n){var a,s;return hn.isServer?null:n==null?document:(s=(a=n==null?void 0:n.getRootNode)==null?void 0:a.call(n))!=null?s:document}function bx(n){var a,s;return(s=(a=Ff(n))==null?void 0:a.activeElement)!=null?s:null}function rw(n){return bx(n)===n}function Oo(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(a=>setTimeout(()=>{throw a}))}function Un(){let n=[],a={addEventListener(s,r,u,d){return s.addEventListener(r,u,d),a.add(()=>s.removeEventListener(r,u,d))},requestAnimationFrame(...s){let r=requestAnimationFrame(...s);return a.add(()=>cancelAnimationFrame(r))},nextFrame(...s){return a.requestAnimationFrame(()=>a.requestAnimationFrame(...s))},setTimeout(...s){let r=setTimeout(...s);return a.add(()=>clearTimeout(r))},microTask(...s){let r={current:!0};return Oo(()=>{r.current&&s[0]()}),a.add(()=>{r.current=!1})},style(s,r,u){let d=s.style.getPropertyValue(r);return Object.assign(s.style,{[r]:u}),this.add(()=>{Object.assign(s.style,{[r]:d})})},group(s){let r=Un();return s(r),this.add(()=>r.dispose())},add(s){return n.includes(s)||n.push(s),()=>{let r=n.indexOf(s);if(r>=0)for(let u of n.splice(r,1))u()}},dispose(){for(let s of n.splice(0))s()}};return a}function wl(){let[n]=T.useState(Un);return T.useEffect(()=>()=>n.dispose(),[n]),n}let Nt=(n,a)=>{hn.isServer?T.useEffect(n,a):T.useLayoutEffect(n,a)};function ei(n){let a=T.useRef(n);return Nt(()=>{a.current=n},[n]),a}let Me=function(n){let a=ei(n);return ce.useCallback((...s)=>a.current(...s),[a])};function ow(n){let a=n.width/2,s=n.height/2;return{top:n.clientY-s,right:n.clientX+a,bottom:n.clientY+s,left:n.clientX-a}}function uw(n,a){return!(!n||!a||n.right<a.left||n.left>a.right||n.bottom<a.top||n.top>a.bottom)}function Sx({disabled:n=!1}={}){let a=T.useRef(null),[s,r]=T.useState(!1),u=wl(),d=Me(()=>{a.current=null,r(!1),u.dispose()}),h=Me(p=>{if(u.dispose(),a.current===null){a.current=p.currentTarget,r(!0);{let m=Wi(p.currentTarget);u.addEventListener(m,"pointerup",d,!1),u.addEventListener(m,"pointermove",g=>{if(a.current){let x=ow(g);r(uw(x,a.current.getBoundingClientRect()))}},!1),u.addEventListener(m,"pointercancel",d,!1)}}});return{pressed:s,pressProps:n?{}:{onPointerDown:h,onPointerUp:d,onClick:d}}}function ti(n){return T.useMemo(()=>n,Object.values(n))}let cw=T.createContext(void 0);function wx(){return T.useContext(cw)}function Zf(...n){return Array.from(new Set(n.flatMap(a=>typeof a=="string"?a.split(" "):[]))).filter(Boolean).join(" ")}function _n(n,a,...s){if(n in a){let u=a[n];return typeof u=="function"?u(...s):u}let r=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,_n),r}var go=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(go||{}),ha=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(ha||{});function At(){let n=dw();return T.useCallback(a=>fw({mergeRefs:n,...a}),[n])}function fw({ourProps:n,theirProps:a,slot:s,defaultTag:r,features:u,visible:d=!0,name:h,mergeRefs:p}){p=p??hw;let m=Tx(a,n);if(d)return Pr(m,s,r,h,p);let g=u??0;if(g&2){let{static:x=!1,...y}=m;if(x)return Pr(y,s,r,h,p)}if(g&1){let{unmount:x=!0,...y}=m;return _n(x?0:1,{0(){return null},1(){return Pr({...y,hidden:!0,style:{display:"none"}},s,r,h,p)}})}return Pr(m,s,r,h,p)}function Pr(n,a={},s,r,u){let{as:d=s,children:h,refName:p="ref",...m}=gf(n,["unmount","static"]),g=n.ref!==void 0?{[p]:n.ref}:{},x=typeof h=="function"?h(a):h;"className"in m&&m.className&&typeof m.className=="function"&&(m.className=m.className(a)),m["aria-labelledby"]&&m["aria-labelledby"]===m.id&&(m["aria-labelledby"]=void 0);let y={};if(a){let S=!1,w=[];for(let[j,E]of Object.entries(a))typeof E=="boolean"&&(S=!0),E===!0&&w.push(j.replace(/([A-Z])/g,D=>`-${D.toLowerCase()}`));if(S){y["data-headlessui-state"]=w.join(" ");for(let j of w)y[`data-${j}`]=""}}if(ol(d)&&(Object.keys(qa(m)).length>0||Object.keys(qa(y)).length>0))if(!T.isValidElement(x)||Array.isArray(x)&&x.length>1||pw(x)){if(Object.keys(qa(m)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(qa(m)).concat(Object.keys(qa(y))).map(S=>` - ${S}`).join(`
|
|
50
50
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(S=>` - ${S}`).join(`
|
|
51
51
|
`)].join(`
|
|
52
|
-
`))}else{let S=x.props,
|
|
52
|
+
`))}else{let S=x.props,w=S==null?void 0:S.className,j=typeof w=="function"?(...R)=>Zf(w(...R),m.className):Zf(w,m.className),E=j?{className:j}:{},D=Tx(x.props,qa(gf(m,["ref"])));for(let R in y)R in D&&delete y[R];return T.cloneElement(x,Object.assign({},D,y,g,{ref:u(mw(x),g.ref)},E))}return T.createElement(d,Object.assign({},gf(m,["ref"]),!ol(d)&&g,!ol(d)&&y),x)}function dw(){let n=T.useRef([]),a=T.useCallback(s=>{for(let r of n.current)r!=null&&(typeof r=="function"?r(s):r.current=s)},[]);return(...s)=>{if(!s.every(r=>r==null))return n.current=s,a}}function hw(...n){return n.every(a=>a==null)?void 0:a=>{for(let s of n)s!=null&&(typeof s=="function"?s(a):s.current=a)}}function Tx(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},s={};for(let r of n)for(let u in r)u.startsWith("on")&&typeof r[u]=="function"?(s[u]!=null||(s[u]=[]),s[u].push(r[u])):a[u]=r[u];if(a.disabled||a["aria-disabled"])for(let r in s)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(s[r]=[u=>{var d;return(d=u==null?void 0:u.preventDefault)==null?void 0:d.call(u)}]);for(let r in s)Object.assign(a,{[r](u,...d){let h=s[r];for(let p of h){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;p(u,...d)}}});return a}function Ad(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},s={};for(let r of n)for(let u in r)u.startsWith("on")&&typeof r[u]=="function"?(s[u]!=null||(s[u]=[]),s[u].push(r[u])):a[u]=r[u];for(let r in s)Object.assign(a,{[r](...u){let d=s[r];for(let h of d)h==null||h(...u)}});return a}function dt(n){var a;return Object.assign(T.forwardRef(n),{displayName:(a=n.displayName)!=null?a:n.name})}function qa(n){let a=Object.assign({},n);for(let s in a)a[s]===void 0&&delete a[s];return a}function gf(n,a=[]){let s=Object.assign({},n);for(let r of a)r in s&&delete s[r];return s}function mw(n){return ce.version.split(".")[0]>="19"?n.props.ref:n.ref}function ol(n){return n===T.Fragment||n===Symbol.for("react.fragment")}function pw(n){return ol(n.type)}let gw="button";function vw(n,a){var s;let r=wx(),{disabled:u=r||!1,autoFocus:d=!1,...h}=n,{isFocusVisible:p,focusProps:m}=yx({autoFocus:d}),{isHovered:g,hoverProps:x}=xx({isDisabled:u}),{pressed:y,pressProps:S}=Sx({disabled:u}),w=Ad({ref:a,type:(s=h.type)!=null?s:"button",disabled:u||void 0,autoFocus:d},m,x,S),j=ti({disabled:u,hover:g,focus:p,active:y,autofocus:d});return At()({ourProps:w,theirProps:h,slot:j,defaultTag:gw,name:"Button"})}let Tl=dt(vw),xw="span";var vo=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(vo||{});function yw(n,a){var s;let{features:r=1,...u}=n,d={ref:a,"aria-hidden":(r&2)===2?!0:(s=u["aria-hidden"])!=null?s:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return At()({ourProps:d,theirProps:u,slot:{},defaultTag:xw,name:"Hidden"})}let Qf=dt(yw);function bw(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function ga(n){return bw(n)&&"tagName"in n}function Ia(n){return ga(n)&&"accessKey"in n}function ma(n){return ga(n)&&"tabIndex"in n}function Sw(n){return ga(n)&&"style"in n}function ww(n){return Ia(n)&&n.nodeName==="IFRAME"}function Tw(n){return Ia(n)&&n.nodeName==="INPUT"}let jx=Symbol();function jw(n,a=!0){return Object.assign(n,{[jx]:a})}function gn(...n){let a=T.useRef(n);T.useEffect(()=>{a.current=n},[n]);let s=Me(r=>{for(let u of a.current)u!=null&&(typeof u=="function"?u(r):u.current=r)});return n.every(r=>r==null||(r==null?void 0:r[jx]))?void 0:s}let Cd=T.createContext(null);Cd.displayName="DescriptionContext";function Ex(){let n=T.useContext(Cd);if(n===null){let a=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(a,Ex),a}return n}function Ew(){let[n,a]=T.useState([]);return[n.length>0?n.join(" "):void 0,T.useMemo(()=>function(s){let r=Me(d=>(a(h=>[...h,d]),()=>a(h=>{let p=h.slice(),m=p.indexOf(d);return m!==-1&&p.splice(m,1),p}))),u=T.useMemo(()=>({register:r,slot:s.slot,name:s.name,props:s.props,value:s.value}),[r,s.slot,s.name,s.props,s.value]);return ce.createElement(Cd.Provider,{value:u},s.children)},[a])]}let Nw="p";function Aw(n,a){let s=T.useId(),r=wx(),{id:u=`headlessui-description-${s}`,...d}=n,h=Ex(),p=gn(a);Nt(()=>h.register(u),[u,h.register]);let m=ti({...h.slot,disabled:r||!1}),g={ref:p,...h.props,id:u};return At()({ourProps:g,theirProps:d,slot:m,defaultTag:Nw,name:h.name||"Description"})}let Cw=dt(Aw),Mw=Object.assign(Cw,{});var Nx=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(Nx||{});let Ax=T.createContext(()=>{});function Dw(){return T.useContext(Ax)}function Ow({value:n,children:a}){return ce.createElement(Ax.Provider,{value:n},a)}function Rw(n,a){let s=Dw();return ce.createElement(Tl,{ref:a,...Ad({onClick:s},n)})}let Cx=dt(Rw),Mx=class extends Map{constructor(a){super(),this.factory=a}get(a){let s=super.get(a);return s===void 0&&(s=this.factory(a),this.set(a,s)),s}};var zw=Object.defineProperty,kw=(n,a,s)=>a in n?zw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,Lw=(n,a,s)=>(kw(n,a+"",s),s),Dx=(n,a,s)=>{if(!a.has(n))throw TypeError("Cannot "+s)},Qt=(n,a,s)=>(Dx(n,a,"read from private field"),s?s.call(n):a.get(n)),vf=(n,a,s)=>{if(a.has(n))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(n):a.set(n,s)},wv=(n,a,s,r)=>(Dx(n,a,"write to private field"),a.set(n,s),s),cn,tl,nl;let Vw=class{constructor(a){vf(this,cn,{}),vf(this,tl,new Mx(()=>new Set)),vf(this,nl,new Set),Lw(this,"disposables",Un()),wv(this,cn,a),hn.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Qt(this,cn)}subscribe(a,s){if(hn.isServer)return()=>{};let r={selector:a,callback:s,current:a(Qt(this,cn))};return Qt(this,nl).add(r),this.disposables.add(()=>{Qt(this,nl).delete(r)})}on(a,s){return hn.isServer?()=>{}:(Qt(this,tl).get(a).add(s),this.disposables.add(()=>{Qt(this,tl).get(a).delete(s)}))}send(a){let s=this.reduce(Qt(this,cn),a);if(s!==Qt(this,cn)){wv(this,cn,s);for(let r of Qt(this,nl)){let u=r.selector(Qt(this,cn));Ox(r.current,u)||(r.current=u,r.callback(u))}for(let r of Qt(this,tl).get(a.type))r(Qt(this,cn),a)}}};cn=new WeakMap,tl=new WeakMap,nl=new WeakMap;function Ox(n,a){return Object.is(n,a)?!0:typeof n!="object"||n===null||typeof a!="object"||a===null?!1:Array.isArray(n)&&Array.isArray(a)?n.length!==a.length?!1:xf(n[Symbol.iterator](),a[Symbol.iterator]()):n instanceof Map&&a instanceof Map||n instanceof Set&&a instanceof Set?n.size!==a.size?!1:xf(n.entries(),a.entries()):Tv(n)&&Tv(a)?xf(Object.entries(n)[Symbol.iterator](),Object.entries(a)[Symbol.iterator]()):!1}function xf(n,a){do{let s=n.next(),r=a.next();if(s.done&&r.done)return!0;if(s.done||r.done||!Object.is(s.value,r.value))return!1}while(!0)}function Tv(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let a=Object.getPrototypeOf(n);return a===null||Object.getPrototypeOf(a)===null}var _w=Object.defineProperty,Uw=(n,a,s)=>a in n?_w(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,jv=(n,a,s)=>(Uw(n,typeof a!="symbol"?a+"":a,s),s),Bw=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(Bw||{});let Hw={0(n,a){let s=a.id,r=n.stack,u=n.stack.indexOf(s);if(u!==-1){let d=n.stack.slice();return d.splice(u,1),d.push(s),r=d,{...n,stack:r}}return{...n,stack:[...n.stack,s]}},1(n,a){let s=a.id,r=n.stack.indexOf(s);if(r===-1)return n;let u=n.stack.slice();return u.splice(r,1),{...n,stack:u}}},$w=class Rx extends Vw{constructor(){super(...arguments),jv(this,"actions",{push:a=>this.send({type:0,id:a}),pop:a=>this.send({type:1,id:a})}),jv(this,"selectors",{isTop:(a,s)=>a.stack[a.stack.length-1]===s,inStack:(a,s)=>a.stack.includes(s)})}static new(){return new Rx({stack:[]})}reduce(a,s){return _n(s.type,Hw,a,s)}};const zx=new Mx(()=>$w.new());var yf={exports:{}},bf={};/**
|
|
53
53
|
* @license React
|
|
54
54
|
* use-sync-external-store-with-selector.production.js
|
|
55
55
|
*
|
|
@@ -57,5 +57,5 @@ Error generating stack: `+l.message+`
|
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the MIT license found in the
|
|
59
59
|
* LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/var Ev;function $w(){if(Ev)return bf;Ev=1;var n=Mo();function a(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var s=typeof Object.is=="function"?Object.is:a,r=n.useSyncExternalStore,u=n.useRef,d=n.useEffect,h=n.useMemo,p=n.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(m,g,x,y,S){var T=u(null);if(T.current===null){var j={hasValue:!1,value:null};T.current=j}else j=T.current;T=h(function(){function D(U){if(!R){if(R=!0,M=U,U=y(U),S!==void 0&&j.hasValue){var P=j.value;if(S(P,U))return V=P}return V=U}if(P=V,s(M,U))return P;var F=y(U);return S!==void 0&&S(P,F)?(M=U,P):(M=U,V=F)}var R=!1,M,V,z=x===void 0?null:x;return[function(){return D(g())},z===null?void 0:function(){return D(z())}]},[g,x,y,S]);var E=r(m,T[0],T[1]);return d(function(){j.hasValue=!0,j.value=E},[E]),p(E),E},bf}var Nv;function qw(){return Nv||(Nv=1,yf.exports=$w()),yf.exports}var Yw=qw();function kx(n,a,s=Ox){return Yw.useSyncExternalStoreWithSelector(Me(r=>n.subscribe(Gw,r)),Me(()=>n.state),Me(()=>n.state),Me(a),s)}function Gw(n){return n}function jl(n,a){let s=w.useId(),r=zx.get(a),[u,d]=kx(r,w.useCallback(h=>[r.selectors.isTop(h,s),r.selectors.inStack(h,s)],[r,s]));return Nt(()=>{if(n)return r.actions.push(s),()=>r.actions.pop(s)},[r,n,s]),n?d?u:!0:!1}let Pf=new Map,ul=new Map;function Av(n){var a;let s=(a=ul.get(n))!=null?a:0;return ul.set(n,s+1),s!==0?()=>Cv(n):(Pf.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>Cv(n))}function Cv(n){var a;let s=(a=ul.get(n))!=null?a:1;if(s===1?ul.delete(n):ul.set(n,s-1),s!==1)return;let r=Pf.get(n);r&&(r["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",r["aria-hidden"]),n.inert=r.inert,Pf.delete(n))}function Xw(n,{allowed:a,disallowed:s}={}){let r=jl(n,"inert-others");Nt(()=>{var u,d;if(!r)return;let h=Un();for(let m of(u=s==null?void 0:s())!=null?u:[])m&&h.add(Av(m));let p=(d=a==null?void 0:a())!=null?d:[];for(let m of p){if(!m)continue;let g=Wi(m);if(!g)continue;let x=m.parentElement;for(;x&&x!==g.body;){for(let y of x.children)p.some(S=>y.contains(S))||h.add(Av(y));x=x.parentElement}}return h.dispose},[r,a,s])}function Kw(n,a,s){let r=ei(u=>{let d=u.getBoundingClientRect();d.x===0&&d.y===0&&d.width===0&&d.height===0&&s()});w.useEffect(()=>{if(!n)return;let u=a===null?null:Ia(a)?a:a.current;if(!u)return;let d=Un();if(typeof ResizeObserver<"u"){let h=new ResizeObserver(()=>r.current(u));h.observe(u),d.add(()=>h.disconnect())}if(typeof IntersectionObserver<"u"){let h=new IntersectionObserver(()=>r.current(u));h.observe(u),d.add(()=>h.disconnect())}return()=>d.dispose()},[a,r,n])}let xo=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),Fw=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var Ln=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(Ln||{}),Jf=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Jf||{}),Zw=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Zw||{});function Qw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(xo)).sort((a,s)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(s.tabIndex||Number.MAX_SAFE_INTEGER)))}function Pw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Fw)).sort((a,s)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(s.tabIndex||Number.MAX_SAFE_INTEGER)))}var Lx=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Lx||{});function Jw(n,a=0){var s;return n===((s=Wi(n))==null?void 0:s.body)?!1:_n(a,{0(){return n.matches(xo)},1(){let r=n;for(;r!==null;){if(r.matches(xo))return!0;r=r.parentElement}return!1}})}var Ww=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Ww||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Vn(n){n==null||n.focus({preventScroll:!0})}let Iw=["textarea","input"].join(",");function eT(n){var a,s;return(s=(a=n==null?void 0:n.matches)==null?void 0:a.call(n,Iw))!=null?s:!1}function tT(n,a=s=>s){return n.slice().sort((s,r)=>{let u=a(s),d=a(r);if(u===null||d===null)return 0;let h=u.compareDocumentPosition(d);return h&Node.DOCUMENT_POSITION_FOLLOWING?-1:h&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function cl(n,a,{sorted:s=!0,relativeTo:r=null,skipElements:u=[]}={}){let d=Array.isArray(n)?n.length>0?Ff(n[0]):document:Ff(n),h=Array.isArray(n)?s?tT(n):n:a&64?Pw(n):Qw(n);u.length>0&&h.length>1&&(h=h.filter(T=>!u.some(j=>j!=null&&"current"in j?(j==null?void 0:j.current)===T:j===T))),r=r??(d==null?void 0:d.activeElement);let p=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,h.indexOf(r))-1;if(a&4)return Math.max(0,h.indexOf(r))+1;if(a&8)return h.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=a&32?{preventScroll:!0}:{},x=0,y=h.length,S;do{if(x>=y||x+y<=0)return 0;let T=m+x;if(a&16)T=(T+y)%y;else{if(T<0)return 3;if(T>=y)return 1}S=h[T],S==null||S.focus(g),x+=p}while(S!==bx(S));return a&6&&eT(S)&&S.select(),2}function Vx(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function nT(){return/Android/gi.test(window.navigator.userAgent)}function Mv(){return Vx()||nT()}function Jr(n,a,s,r){let u=ei(s);w.useEffect(()=>{if(!n)return;function d(h){u.current(h)}return document.addEventListener(a,d,r),()=>document.removeEventListener(a,d,r)},[n,a,r])}function _x(n,a,s,r){let u=ei(s);w.useEffect(()=>{if(!n)return;function d(h){u.current(h)}return window.addEventListener(a,d,r),()=>window.removeEventListener(a,d,r)},[n,a,r])}const Dv=30;function aT(n,a,s){let r=ei(s),u=w.useCallback(function(p,m){if(p.defaultPrevented)return;let g=m(p);if(g===null||!g.getRootNode().contains(g)||!g.isConnected)return;let x=(function y(S){return typeof S=="function"?y(S()):Array.isArray(S)||S instanceof Set?S:[S]})(a);for(let y of x)if(y!==null&&(y.contains(g)||p.composed&&p.composedPath().includes(y)))return;return!Jw(g,Lx.Loose)&&g.tabIndex!==-1&&p.preventDefault(),r.current(p,g)},[r,a]),d=w.useRef(null);Jr(n,"pointerdown",p=>{var m,g;Mv()||(d.current=((g=(m=p.composedPath)==null?void 0:m.call(p))==null?void 0:g[0])||p.target)},!0),Jr(n,"pointerup",p=>{if(Mv()||!d.current)return;let m=d.current;return d.current=null,u(p,()=>m)},!0);let h=w.useRef({x:0,y:0});Jr(n,"touchstart",p=>{h.current.x=p.touches[0].clientX,h.current.y=p.touches[0].clientY},!0),Jr(n,"touchend",p=>{let m={x:p.changedTouches[0].clientX,y:p.changedTouches[0].clientY};if(!(Math.abs(m.x-h.current.x)>=Dv||Math.abs(m.y-h.current.y)>=Dv))return u(p,()=>ma(p.target)?p.target:null)},!0),_x(n,"blur",p=>u(p,()=>Sw(window.document.activeElement)?window.document.activeElement:null),!0)}function Md(...n){return w.useMemo(()=>Wi(...n),[...n])}function Ux(n,a,s,r){let u=ei(s);w.useEffect(()=>{n=n??window;function d(h){u.current(h)}return n.addEventListener(a,d,r),()=>n.removeEventListener(a,d,r)},[n,a,r])}function iT(n){return w.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function sT(n,a){let s=n(),r=new Set;return{getSnapshot(){return s},subscribe(u){return r.add(u),()=>r.delete(u)},dispatch(u,...d){let h=a[u].call(s,...d);h&&(s=h,r.forEach(p=>p()))}}}function lT(){let n;return{before({doc:a}){var s;let r=a.documentElement,u=(s=a.defaultView)!=null?s:window;n=Math.max(0,u.innerWidth-r.clientWidth)},after({doc:a,d:s}){let r=a.documentElement,u=Math.max(0,r.clientWidth-r.offsetWidth),d=Math.max(0,n-u);s.style(r,"paddingRight",`${d}px`)}}}function rT(){return Vx()?{before({doc:n,d:a,meta:s}){function r(u){for(let d of s().containers)for(let h of d())if(h.contains(u))return!0;return!1}a.microTask(()=>{var u;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let p=Un();p.style(n.documentElement,"scrollBehavior","auto"),a.add(()=>a.microTask(()=>p.dispose()))}let d=(u=window.scrollY)!=null?u:window.pageYOffset,h=null;a.addEventListener(n,"click",p=>{if(ma(p.target))try{let m=p.target.closest("a");if(!m)return;let{hash:g}=new URL(m.href),x=n.querySelector(g);ma(x)&&!r(x)&&(h=x)}catch{}},!0),a.group(p=>{a.addEventListener(n,"touchstart",m=>{if(p.dispose(),ma(m.target)&&bw(m.target))if(r(m.target)){let g=m.target;for(;g.parentElement&&r(g.parentElement);)g=g.parentElement;p.style(g,"overscrollBehavior","contain")}else p.style(m.target,"touchAction","none")})}),a.addEventListener(n,"touchmove",p=>{if(ma(p.target)){if(ww(p.target))return;if(r(p.target)){let m=p.target;for(;m.parentElement&&m.dataset.headlessuiPortal!==""&&!(m.scrollHeight>m.clientHeight||m.scrollWidth>m.clientWidth);)m=m.parentElement;m.dataset.headlessuiPortal===""&&p.preventDefault()}else p.preventDefault()}},{passive:!1}),a.add(()=>{var p;let m=(p=window.scrollY)!=null?p:window.pageYOffset;d!==m&&window.scrollTo(0,d),h&&h.isConnected&&(h.scrollIntoView({block:"nearest"}),h=null)})})}}:{}}function oT(){return{before({doc:n,d:a}){a.style(n.documentElement,"overflow","hidden")}}}function Ov(n){let a={};for(let s of n)Object.assign(a,s(a));return a}let Fa=sT(()=>new Map,{PUSH(n,a){var s;let r=(s=this.get(n))!=null?s:{doc:n,count:0,d:Un(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(a),r.computedMeta=Ov(r.meta),this.set(n,r),this},POP(n,a){let s=this.get(n);return s&&(s.count--,s.meta.delete(a),s.computedMeta=Ov(s.meta)),this},SCROLL_PREVENT(n){let a={doc:n.doc,d:n.d,meta(){return n.computedMeta}},s=[rT(),lT(),oT()];s.forEach(({before:r})=>r==null?void 0:r(a)),s.forEach(({after:r})=>r==null?void 0:r(a))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Fa.subscribe(()=>{let n=Fa.getSnapshot(),a=new Map;for(let[s]of n)a.set(s,s.documentElement.style.overflow);for(let s of n.values()){let r=a.get(s.doc)==="hidden",u=s.count!==0;(u&&!r||!u&&r)&&Fa.dispatch(s.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",s),s.count===0&&Fa.dispatch("TEARDOWN",s)}});function uT(n,a,s=()=>({containers:[]})){let r=iT(Fa),u=a?r.get(a):void 0,d=u?u.count>0:!1;return Nt(()=>{if(!(!a||!n))return Fa.dispatch("PUSH",a,s),()=>Fa.dispatch("POP",a,s)},[n,a]),d}function cT(n,a,s=()=>[document.body]){let r=jl(n,"scroll-lock");uT(r,a,u=>{var d;return{containers:[...(d=u.containers)!=null?d:[],s]}})}function fT(n=0){let[a,s]=w.useState(n),r=w.useCallback(m=>s(m),[]),u=w.useCallback(m=>s(g=>g|m),[]),d=w.useCallback(m=>(a&m)===m,[a]),h=w.useCallback(m=>s(g=>g&~m),[]),p=w.useCallback(m=>s(g=>g^m),[]);return{flags:a,setFlag:r,addFlag:u,hasFlag:d,removeFlag:h,toggleFlag:p}}var dT={},Rv,zv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Rv=process==null?void 0:dT)==null?void 0:Rv.NODE_ENV)==="test"&&typeof((zv=Element==null?void 0:Element.prototype)==null?void 0:zv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
61
|
-
`)),[]});var hT=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(hT||{});function mT(n){let a={};for(let s in n)n[s]===!0&&(a[`data-${s}`]="");return a}function pT(n,a,s,r){let[u,d]=w.useState(s),{hasFlag:h,addFlag:p,removeFlag:m}=fT(n&&u?3:0),g=w.useRef(!1),x=w.useRef(!1),y=wl();return Nt(()=>{var S;if(n){if(s&&d(!0),!a){s&&p(3);return}return(S=r==null?void 0:r.start)==null||S.call(r,s),gT(a,{inFlight:g,prepare(){x.current?x.current=!1:x.current=g.current,g.current=!0,!x.current&&(s?(p(3),m(4)):(p(4),m(2)))},run(){x.current?s?(m(3),p(4)):(m(4),p(3)):s?m(1):p(1)},done(){var T;x.current&&yT(a)||(g.current=!1,m(7),s||d(!1),(T=r==null?void 0:r.end)==null||T.call(r,s))}})}},[n,s,a,y]),n?[u,{closed:h(1),enter:h(2),leave:h(4),transition:h(2)||h(4)}]:[s,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function gT(n,{prepare:a,run:s,done:r,inFlight:u}){let d=Un();return xT(n,{prepare:a,inFlight:u}),d.nextFrame(()=>{s(),d.requestAnimationFrame(()=>{d.add(vT(n,r))})}),d.dispose}function vT(n,a){var s,r;let u=Un();if(!n)return u.dispose;let d=!1;u.add(()=>{d=!0});let h=(r=(s=n.getAnimations)==null?void 0:s.call(n).filter(p=>p instanceof CSSTransition))!=null?r:[];return h.length===0?(a(),u.dispose):(Promise.allSettled(h.map(p=>p.finished)).then(()=>{d||a()}),u.dispose)}function xT(n,{inFlight:a,prepare:s}){if(a!=null&&a.current){s();return}let r=n.style.transition;n.style.transition="none",s(),n.offsetHeight,n.style.transition=r}function yT(n){var a,s;return((s=(a=n.getAnimations)==null?void 0:a.call(n))!=null?s:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function Dd(n,a){let s=w.useRef([]),r=Me(n);w.useEffect(()=>{let u=[...s.current];for(let[d,h]of a.entries())if(s.current[d]!==h){let p=r(a,u);return s.current=a,p}},[r,...a])}let Ro=w.createContext(null);Ro.displayName="OpenClosedContext";var an=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(an||{});function zo(){return w.useContext(Ro)}function bT({value:n,children:a}){return ce.createElement(Ro.Provider,{value:n},a)}function ST({children:n}){return ce.createElement(Ro.Provider,{value:null},n)}function wT(n){function a(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let da=[];wT(()=>{function n(a){if(!ma(a.target)||a.target===document.body||da[0]===a.target)return;let s=a.target;s=s.closest(xo),da.unshift(s??a.target),da=da.filter(r=>r!=null&&r.isConnected),da.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function Bx(n){let a=Me(n),s=w.useRef(!1);w.useEffect(()=>(s.current=!1,()=>{s.current=!0,Oo(()=>{s.current&&a()})}),[a])}let Hx=w.createContext(!1);function TT(){return w.useContext(Hx)}function kv(n){return ce.createElement(Hx.Provider,{value:n.force},n.children)}function jT(n){let a=TT(),s=w.useContext(qx),[r,u]=w.useState(()=>{var d;if(!a&&s!==null)return(d=s.current)!=null?d:null;if(hn.isServer)return null;let h=n==null?void 0:n.getElementById("headlessui-portal-root");if(h)return h;if(n===null)return null;let p=n.createElement("div");return p.setAttribute("id","headlessui-portal-root"),n.body.appendChild(p)});return w.useEffect(()=>{r!==null&&(n!=null&&n.body.contains(r)||n==null||n.body.appendChild(r))},[r,n]),w.useEffect(()=>{a||s!==null&&u(s.current)},[s,u,a]),r}let $x=w.Fragment,ET=dt(function(n,a){let{ownerDocument:s=null,...r}=n,u=w.useRef(null),d=gn(Tw(S=>{u.current=S}),a),h=Md(u.current),p=s??h,m=jT(p),g=w.useContext(Wf),x=wl(),y=At();return Bx(()=>{var S;m&&m.childNodes.length<=0&&((S=m.parentElement)==null||S.removeChild(m))}),m?G2.createPortal(ce.createElement("div",{"data-headlessui-portal":"",ref:S=>{x.dispose(),g&&S&&x.add(g.register(S))}},y({ourProps:{ref:d},theirProps:r,slot:{},defaultTag:$x,name:"Portal"})),m):null});function NT(n,a){let s=gn(a),{enabled:r=!0,ownerDocument:u,...d}=n,h=At();return r?ce.createElement(ET,{...d,ownerDocument:u,ref:s}):h({ourProps:{ref:s},theirProps:d,slot:{},defaultTag:$x,name:"Portal"})}let AT=w.Fragment,qx=w.createContext(null);function CT(n,a){let{target:s,...r}=n,u={ref:gn(a)},d=At();return ce.createElement(qx.Provider,{value:s},d({ourProps:u,theirProps:r,defaultTag:AT,name:"Popover.Group"}))}let Wf=w.createContext(null);function MT(){let n=w.useContext(Wf),a=w.useRef([]),s=Me(d=>(a.current.push(d),n&&n.register(d),()=>r(d))),r=Me(d=>{let h=a.current.indexOf(d);h!==-1&&a.current.splice(h,1),n&&n.unregister(d)}),u=w.useMemo(()=>({register:s,unregister:r,portals:a}),[s,r,a]);return[a,w.useMemo(()=>function({children:d}){return ce.createElement(Wf.Provider,{value:u},d)},[u])]}let DT=dt(NT),Yx=dt(CT),OT=Object.assign(DT,{Group:Yx}),RT=w.Fragment;function zT(n,a){let{...s}=n,r=!1,{isFocusVisible:u,focusProps:d}=yx(),{isHovered:h,hoverProps:p}=xx({isDisabled:r}),{pressed:m,pressProps:g}=Sx({disabled:r}),x=Ad({ref:a},d,p,g),y=ti({hover:h,focus:u,active:m});return At()({ourProps:x,theirProps:s,slot:y,defaultTag:RT,name:"DataInteractive"})}let kT=dt(zT);function LT(n,a=typeof document<"u"?document.defaultView:null,s){let r=jl(n,"escape");Ux(a,"keydown",u=>{r&&(u.defaultPrevented||u.key===Nx.Escape&&s(u))})}function VT(){var n;let[a]=w.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[s,r]=w.useState((n=a==null?void 0:a.matches)!=null?n:!1);return Nt(()=>{if(!a)return;function u(d){r(d.matches)}return a.addEventListener("change",u),()=>a.removeEventListener("change",u)},[a]),s}function _T({defaultContainers:n=[],portals:a,mainTreeNode:s}={}){let r=Me(()=>{var u,d;let h=Wi(s),p=[];for(let m of n)m!==null&&(ga(m)?p.push(m):"current"in m&&ga(m.current)&&p.push(m.current));if(a!=null&&a.current)for(let m of a.current)p.push(m);for(let m of(u=h==null?void 0:h.querySelectorAll("html > *, body > *"))!=null?u:[])m!==document.body&&m!==document.head&&ga(m)&&m.id!=="headlessui-portal-root"&&(s&&(m.contains(s)||m.contains((d=s==null?void 0:s.getRootNode())==null?void 0:d.host))||p.some(g=>m.contains(g))||p.push(m));return p});return{resolveContainers:r,contains:Me(u=>r().some(d=>d.contains(u)))}}let Gx=w.createContext(null);function Lv({children:n,node:a}){let[s,r]=w.useState(null),u=Xx(a??s);return ce.createElement(Gx.Provider,{value:u},n,u===null&&ce.createElement(Qf,{features:vo.Hidden,ref:d=>{var h,p;if(d){for(let m of(p=(h=Wi(d))==null?void 0:h.querySelectorAll("html > *, body > *"))!=null?p:[])if(m!==document.body&&m!==document.head&&ga(m)&&m!=null&&m.contains(d)){r(m);break}}}}))}function Xx(n=null){var a;return(a=w.useContext(Gx))!=null?a:n}function UT(){let n=typeof document>"u";return"useSyncExternalStore"in mv?(a=>a.useSyncExternalStore)(mv)(()=>()=>{},()=>!1,()=>!n):!1}function ko(){let n=UT(),[a,s]=w.useState(hn.isHandoffComplete);return a&&hn.isHandoffComplete===!1&&s(!1),w.useEffect(()=>{a!==!0&&s(!0)},[a]),w.useEffect(()=>hn.handoff(),[]),n?!1:a}function Od(){let n=w.useRef(!1);return Nt(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var al=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(al||{});function BT(){let n=w.useRef(0);return _x(!0,"keydown",a=>{a.key==="Tab"&&(n.current=a.shiftKey?1:0)},!0),n}function Kx(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let a=new Set;for(let s of n.current)ga(s.current)&&a.add(s.current);return a}let HT="div";var Ga=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(Ga||{});function $T(n,a){let s=w.useRef(null),r=gn(s,a),{initialFocus:u,initialFocusFallback:d,containers:h,features:p=15,...m}=n;ko()||(p=0);let g=Md(s.current);XT(p,{ownerDocument:g});let x=KT(p,{ownerDocument:g,container:s,initialFocus:u,initialFocusFallback:d});FT(p,{ownerDocument:g,container:s,containers:h,previousActiveElement:x});let y=BT(),S=Me(M=>{if(!Ia(s.current))return;let V=s.current;(z=>z())(()=>{_n(y.current,{[al.Forwards]:()=>{cl(V,Ln.First,{skipElements:[M.relatedTarget,d]})},[al.Backwards]:()=>{cl(V,Ln.Last,{skipElements:[M.relatedTarget,d]})}})})}),T=jl(!!(p&2),"focus-trap#tab-lock"),j=wl(),E=w.useRef(!1),D={ref:r,onKeyDown(M){M.key=="Tab"&&(E.current=!0,j.requestAnimationFrame(()=>{E.current=!1}))},onBlur(M){if(!(p&4))return;let V=Kx(h);Ia(s.current)&&V.add(s.current);let z=M.relatedTarget;ma(z)&&z.dataset.headlessuiFocusGuard!=="true"&&(Fx(V,z)||(E.current?cl(s.current,_n(y.current,{[al.Forwards]:()=>Ln.Next,[al.Backwards]:()=>Ln.Previous})|Ln.WrapAround,{relativeTo:M.target}):ma(M.target)&&Vn(M.target)))}},R=At();return ce.createElement(ce.Fragment,null,T&&ce.createElement(Qf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:vo.Focusable}),R({ourProps:D,theirProps:m,defaultTag:HT,name:"FocusTrap"}),T&&ce.createElement(Qf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:vo.Focusable}))}let qT=dt($T),YT=Object.assign(qT,{features:Ga});function GT(n=!0){let a=w.useRef(da.slice());return Dd(([s],[r])=>{r===!0&&s===!1&&Oo(()=>{a.current.splice(0)}),r===!1&&s===!0&&(a.current=da.slice())},[n,da,a]),Me(()=>{var s;return(s=a.current.find(r=>r!=null&&r.isConnected))!=null?s:null})}function XT(n,{ownerDocument:a}){let s=!!(n&8),r=GT(s);Dd(()=>{s||lw(a==null?void 0:a.body)&&Vn(r())},[s]),Bx(()=>{s&&Vn(r())})}function KT(n,{ownerDocument:a,container:s,initialFocus:r,initialFocusFallback:u}){let d=w.useRef(null),h=jl(!!(n&1),"focus-trap#initial-focus"),p=Od();return Dd(()=>{if(n===0)return;if(!h){u!=null&&u.current&&Vn(u.current);return}let m=s.current;m&&Oo(()=>{if(!p.current)return;let g=a==null?void 0:a.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===g){d.current=g;return}}else if(m.contains(g)){d.current=g;return}if(r!=null&&r.current)Vn(r.current);else{if(n&16){if(cl(m,Ln.First|Ln.AutoFocus)!==Jf.Error)return}else if(cl(m,Ln.First)!==Jf.Error)return;if(u!=null&&u.current&&(Vn(u.current),(a==null?void 0:a.activeElement)===u.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}d.current=a==null?void 0:a.activeElement})},[u,h,n]),d}function FT(n,{ownerDocument:a,container:s,containers:r,previousActiveElement:u}){let d=Od(),h=!!(n&4);Ux(a==null?void 0:a.defaultView,"focus",p=>{if(!h||!d.current)return;let m=Kx(r);Ia(s.current)&&m.add(s.current);let g=u.current;if(!g)return;let x=p.target;Ia(x)?Fx(m,x)?(u.current=x,Vn(x)):(p.preventDefault(),p.stopPropagation(),Vn(g)):Vn(u.current)},!0)}function Fx(n,a){for(let s of n)if(s.contains(a))return!0;return!1}function Zx(n){var a;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!ol((a=n.as)!=null?a:Px)||ce.Children.count(n.children)===1}let Lo=w.createContext(null);Lo.displayName="TransitionContext";var ZT=(n=>(n.Visible="visible",n.Hidden="hidden",n))(ZT||{});function QT(){let n=w.useContext(Lo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function PT(){let n=w.useContext(Vo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Vo=w.createContext(null);Vo.displayName="NestingContext";function _o(n){return"children"in n?_o(n.children):n.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function Qx(n,a){let s=ei(n),r=w.useRef([]),u=Od(),d=wl(),h=Me((T,j=ha.Hidden)=>{let E=r.current.findIndex(({el:D})=>D===T);E!==-1&&(_n(j,{[ha.Unmount](){r.current.splice(E,1)},[ha.Hidden](){r.current[E].state="hidden"}}),d.microTask(()=>{var D;!_o(r)&&u.current&&((D=s.current)==null||D.call(s))}))}),p=Me(T=>{let j=r.current.find(({el:E})=>E===T);return j?j.state!=="visible"&&(j.state="visible"):r.current.push({el:T,state:"visible"}),()=>h(T,ha.Unmount)}),m=w.useRef([]),g=w.useRef(Promise.resolve()),x=w.useRef({enter:[],leave:[]}),y=Me((T,j,E)=>{m.current.splice(0),a&&(a.chains.current[j]=a.chains.current[j].filter(([D])=>D!==T)),a==null||a.chains.current[j].push([T,new Promise(D=>{m.current.push(D)})]),a==null||a.chains.current[j].push([T,new Promise(D=>{Promise.all(x.current[j].map(([R,M])=>M)).then(()=>D())})]),j==="enter"?g.current=g.current.then(()=>a==null?void 0:a.wait.current).then(()=>E(j)):E(j)}),S=Me((T,j,E)=>{Promise.all(x.current[j].splice(0).map(([D,R])=>R)).then(()=>{var D;(D=m.current.shift())==null||D()}).then(()=>E(j))});return w.useMemo(()=>({children:r,register:p,unregister:h,onStart:y,onStop:S,wait:g,chains:x}),[p,h,r,y,S,x,g])}let Px=w.Fragment,Jx=go.RenderStrategy;function JT(n,a){var s,r;let{transition:u=!0,beforeEnter:d,afterEnter:h,beforeLeave:p,afterLeave:m,enter:g,enterFrom:x,enterTo:y,entered:S,leave:T,leaveFrom:j,leaveTo:E,...D}=n,[R,M]=w.useState(null),V=w.useRef(null),z=Zx(n),U=gn(...z?[V,a,M]:a===null?[]:[a]),P=(s=D.unmount)==null||s?ha.Unmount:ha.Hidden,{show:F,appear:W,initial:re}=QT(),[B,Z]=w.useState(F?"visible":"hidden"),ie=PT(),{register:le,unregister:Se}=ie;Nt(()=>le(V),[le,V]),Nt(()=>{if(P===ha.Hidden&&V.current){if(F&&B!=="visible"){Z("visible");return}return _n(B,{hidden:()=>Se(V),visible:()=>le(V)})}},[B,V,le,Se,F,P]);let De=ko();Nt(()=>{if(z&&De&&B==="visible"&&V.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[V,B,De,z]);let $=re&&!W,Q=W&&F&&re,J=w.useRef(!1),oe=Qx(()=>{J.current||(Z("hidden"),Se(V))},ie),me=Me(Te=>{J.current=!0;let Ze=Te?"enter":"leave";oe.onStart(V,Ze,Le=>{Le==="enter"?d==null||d():Le==="leave"&&(p==null||p())})}),A=Me(Te=>{let Ze=Te?"enter":"leave";J.current=!1,oe.onStop(V,Ze,Le=>{Le==="enter"?h==null||h():Le==="leave"&&(m==null||m())}),Ze==="leave"&&!_o(oe)&&(Z("hidden"),Se(V))});w.useEffect(()=>{z&&u||(me(F),A(F))},[F,z,u]);let G=!(!u||!z||!De||$),[,K]=pT(G,R,F,{start:me,end:A}),I=qa({ref:U,className:((r=Zf(D.className,Q&&g,Q&&x,K.enter&&g,K.enter&&K.closed&&x,K.enter&&!K.closed&&y,K.leave&&T,K.leave&&!K.closed&&j,K.leave&&K.closed&&E,!K.transition&&F&&S))==null?void 0:r.trim())||void 0,...mT(K)}),ue=0;B==="visible"&&(ue|=an.Open),B==="hidden"&&(ue|=an.Closed),F&&B==="hidden"&&(ue|=an.Opening),!F&&B==="visible"&&(ue|=an.Closing);let pe=At();return ce.createElement(Vo.Provider,{value:oe},ce.createElement(bT,{value:ue},pe({ourProps:I,theirProps:D,defaultTag:Px,features:Jx,visible:B==="visible",name:"Transition.Child"})))}function WT(n,a){let{show:s,appear:r=!1,unmount:u=!0,...d}=n,h=w.useRef(null),p=Zx(n),m=gn(...p?[h,a]:a===null?[]:[a]);ko();let g=zo();if(s===void 0&&g!==null&&(s=(g&an.Open)===an.Open),s===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,y]=w.useState(s?"visible":"hidden"),S=Qx(()=>{s||y("hidden")}),[T,j]=w.useState(!0),E=w.useRef([s]);Nt(()=>{T!==!1&&E.current[E.current.length-1]!==s&&(E.current.push(s),j(!1))},[E,s]);let D=w.useMemo(()=>({show:s,appear:r,initial:T}),[s,r,T]);Nt(()=>{s?y("visible"):!_o(S)&&h.current!==null&&y("hidden")},[s,S]);let R={unmount:u},M=Me(()=>{var U;T&&j(!1),(U=n.beforeEnter)==null||U.call(n)}),V=Me(()=>{var U;T&&j(!1),(U=n.beforeLeave)==null||U.call(n)}),z=At();return ce.createElement(Vo.Provider,{value:S},ce.createElement(Lo.Provider,{value:D},z({ourProps:{...R,as:w.Fragment,children:ce.createElement(Wx,{ref:m,...R,...d,beforeEnter:M,beforeLeave:V})},theirProps:{},defaultTag:w.Fragment,features:Jx,visible:x==="visible",name:"Transition"})))}function IT(n,a){let s=w.useContext(Lo)!==null,r=zo()!==null;return ce.createElement(ce.Fragment,null,!s&&r?ce.createElement(If,{ref:a,...n}):ce.createElement(Wx,{ref:a,...n}))}let If=dt(WT),Wx=dt(JT),Rd=dt(IT),ej=Object.assign(If,{Child:Rd,Root:If});var tj=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(tj||{}),nj=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(nj||{});let aj={0(n,a){return n.titleId===a.id?n:{...n,titleId:a.id}}},zd=w.createContext(null);zd.displayName="DialogContext";function Uo(n){let a=w.useContext(zd);if(a===null){let s=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,Uo),s}return a}function ij(n,a){return _n(a.type,aj,n,a)}let Vv=dt(function(n,a){let s=w.useId(),{id:r=`headlessui-dialog-${s}`,open:u,onClose:d,initialFocus:h,role:p="dialog",autoFocus:m=!0,__demoMode:g=!1,unmount:x=!1,...y}=n,S=w.useRef(!1);p=(function(){return p==="dialog"||p==="alertdialog"?p:(S.current||(S.current=!0,console.warn(`Invalid role [${p}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let T=zo();u===void 0&&T!==null&&(u=(T&an.Open)===an.Open);let j=w.useRef(null),E=gn(j,a),D=Md(j.current),R=u?0:1,[M,V]=w.useReducer(ij,{titleId:null,descriptionId:null,panelRef:w.createRef()}),z=Me(()=>d(!1)),U=Me(K=>V({type:0,id:K})),P=ko()?R===0:!1,[F,W]=MT(),re={get current(){var K;return(K=M.panelRef.current)!=null?K:j.current}},B=Xx(),{resolveContainers:Z}=_T({mainTreeNode:B,portals:F,defaultContainers:[re]}),ie=T!==null?(T&an.Closing)===an.Closing:!1;Xw(g||ie?!1:P,{allowed:Me(()=>{var K,I;return[(I=(K=j.current)==null?void 0:K.closest("[data-headlessui-portal]"))!=null?I:null]}),disallowed:Me(()=>{var K;return[(K=B==null?void 0:B.closest("body > *:not(#headlessui-portal-root)"))!=null?K:null]})});let le=zx.get(null);Nt(()=>{if(P)return le.actions.push(r),()=>le.actions.pop(r)},[le,r,P]);let Se=kx(le,w.useCallback(K=>le.selectors.isTop(K,r),[le,r]));aT(Se,Z,K=>{K.preventDefault(),z()}),LT(Se,D==null?void 0:D.defaultView,K=>{K.preventDefault(),K.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),z()}),cT(g||ie?!1:P,D,Z),Kw(P,j,z);let[De,$]=jw(),Q=w.useMemo(()=>[{dialogState:R,close:z,setTitleId:U,unmount:x},M],[R,z,U,x,M]),J=ti({open:R===0}),oe={ref:E,id:r,role:p,tabIndex:-1,"aria-modal":g?void 0:R===0?!0:void 0,"aria-labelledby":M.titleId,"aria-describedby":De,unmount:x},me=!VT(),A=Ga.None;P&&!g&&(A|=Ga.RestoreFocus,A|=Ga.TabLock,m&&(A|=Ga.AutoFocus),me&&(A|=Ga.InitialFocus));let G=At();return ce.createElement(ST,null,ce.createElement(kv,{force:!0},ce.createElement(OT,null,ce.createElement(zd.Provider,{value:Q},ce.createElement(Yx,{target:j},ce.createElement(kv,{force:!1},ce.createElement($,{slot:J},ce.createElement(W,null,ce.createElement(YT,{initialFocus:h,initialFocusFallback:j,containers:Z,features:A},ce.createElement(Dw,{value:z},G({ourProps:oe,theirProps:y,slot:J,defaultTag:sj,features:lj,visible:R===0,name:"Dialog"})))))))))))}),sj="div",lj=go.RenderStrategy|go.Static;function rj(n,a){let{transition:s=!1,open:r,...u}=n,d=zo(),h=n.hasOwnProperty("open")||d!==null,p=n.hasOwnProperty("onClose");if(!h&&!p)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!h)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!p)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!d&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(r!==void 0||s)&&!u.static?ce.createElement(Lv,null,ce.createElement(ej,{show:r,transition:s,unmount:u.unmount},ce.createElement(Vv,{ref:a,...u}))):ce.createElement(Lv,null,ce.createElement(Vv,{ref:a,open:r,...u}))}let oj="div";function uj(n,a){let s=w.useId(),{id:r=`headlessui-dialog-panel-${s}`,transition:u=!1,...d}=n,[{dialogState:h,unmount:p},m]=Uo("Dialog.Panel"),g=gn(a,m.panelRef),x=ti({open:h===0}),y=Me(D=>{D.stopPropagation()}),S={ref:g,id:r,onClick:y},T=u?Rd:w.Fragment,j=u?{unmount:p}:{},E=At();return ce.createElement(T,{...j},E({ourProps:S,theirProps:d,slot:x,defaultTag:oj,name:"Dialog.Panel"}))}let cj="div";function fj(n,a){let{transition:s=!1,...r}=n,[{dialogState:u,unmount:d}]=Uo("Dialog.Backdrop"),h=ti({open:u===0}),p={ref:a,"aria-hidden":!0},m=s?Rd:w.Fragment,g=s?{unmount:d}:{},x=At();return ce.createElement(m,{...g},x({ourProps:p,theirProps:r,slot:h,defaultTag:cj,name:"Dialog.Backdrop"}))}let dj="h2";function hj(n,a){let s=w.useId(),{id:r=`headlessui-dialog-title-${s}`,...u}=n,[{dialogState:d,setTitleId:h}]=Uo("Dialog.Title"),p=gn(a);w.useEffect(()=>(h(r),()=>h(null)),[r,h]);let m=ti({open:d===0}),g={ref:p,id:r};return At()({ourProps:g,theirProps:u,slot:m,defaultTag:dj,name:"Dialog.Title"})}let mj=dt(rj),Ix=dt(uj),pj=dt(fj),gj=dt(hj),vj=Object.assign(mj,{Panel:Ix,Title:gj,Description:Cw});const yo=w.createContext({});function xj(n){const a=w.useRef(null);return a.current===null&&(a.current=n()),a.current}const yj=typeof window<"u",ey=yj?w.useLayoutEffect:w.useEffect,kd=w.createContext(null);function Ld(n,a){n.indexOf(a)===-1&&n.push(a)}function bo(n,a){const s=n.indexOf(a);s>-1&&n.splice(s,1)}const pn=(n,a,s)=>s>a?a:s<n?n:s;let Vd=()=>{};const va={},ty=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function ny(n){return typeof n=="object"&&n!==null}const ay=n=>/^0[^.\s]+$/u.test(n);function iy(n){let a;return()=>(a===void 0&&(a=n()),a)}const Jt=n=>n,bj=(n,a)=>s=>a(n(s)),El=(...n)=>n.reduce(bj),vl=(n,a,s)=>{const r=a-n;return r===0?1:(s-n)/r};class _d{constructor(){this.subscriptions=[]}add(a){return Ld(this.subscriptions,a),()=>bo(this.subscriptions,a)}notify(a,s,r){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](a,s,r);else for(let d=0;d<u;d++){const h=this.subscriptions[d];h&&h(a,s,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ut=n=>n*1e3,Pt=n=>n/1e3;function sy(n,a){return a?n*(1e3/a):0}const ly=(n,a,s)=>(((1-3*s+3*a)*n+(3*s-6*a))*n+3*a)*n,Sj=1e-7,wj=12;function Tj(n,a,s,r,u){let d,h,p=0;do h=a+(s-a)/2,d=ly(h,r,u)-n,d>0?s=h:a=h;while(Math.abs(d)>Sj&&++p<wj);return h}function Nl(n,a,s,r){if(n===a&&s===r)return Jt;const u=d=>Tj(d,0,1,n,s);return d=>d===0||d===1?d:ly(u(d),a,r)}const ry=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,oy=n=>a=>1-n(1-a),uy=Nl(.33,1.53,.69,.99),Ud=oy(uy),cy=ry(Ud),fy=n=>n>=1?1:(n*=2)<1?.5*Ud(n):.5*(2-Math.pow(2,-10*(n-1))),Bd=n=>1-Math.sin(Math.acos(n)),dy=oy(Bd),hy=ry(Bd),jj=Nl(.42,0,1,1),Ej=Nl(0,0,.58,1),my=Nl(.42,0,.58,1),Nj=n=>Array.isArray(n)&&typeof n[0]!="number",py=n=>Array.isArray(n)&&typeof n[0]=="number",Aj={linear:Jt,easeIn:jj,easeInOut:my,easeOut:Ej,circIn:Bd,circInOut:hy,circOut:dy,backIn:Ud,backInOut:cy,backOut:uy,anticipate:fy},Cj=n=>typeof n=="string",_v=n=>{if(py(n)){Vd(n.length===4);const[a,s,r,u]=n;return Nl(a,s,r,u)}else if(Cj(n))return Aj[n];return n},Wr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Mj(n,a){let s=new Set,r=new Set,u=!1,d=!1;const h=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function m(x){h.has(x)&&(g.schedule(x),n()),x(p)}const g={schedule:(x,y=!1,S=!1)=>{const j=S&&u?s:r;return y&&h.add(x),j.add(x),x},cancel:x=>{r.delete(x),h.delete(x)},process:x=>{if(p=x,u){d=!0;return}u=!0;const y=s;s=r,r=y,s.forEach(m),s.clear(),u=!1,d&&(d=!1,g.process(x))}};return g}const Dj=40;function gy(n,a){let s=!1,r=!0;const u={delta:0,timestamp:0,isProcessing:!1},d=()=>s=!0,h=Wr.reduce((V,z)=>(V[z]=Mj(d),V),{}),{setup:p,read:m,resolveKeyframes:g,preUpdate:x,update:y,preRender:S,render:T,postRender:j}=h,E=()=>{const V=va.useManualTiming,z=V?u.timestamp:performance.now();s=!1,V||(u.delta=r?1e3/60:Math.max(Math.min(z-u.timestamp,Dj),1)),u.timestamp=z,u.isProcessing=!0,p.process(u),m.process(u),g.process(u),x.process(u),y.process(u),S.process(u),T.process(u),j.process(u),u.isProcessing=!1,s&&a&&(r=!1,n(E))},D=()=>{s=!0,r=!0,u.isProcessing||n(E)};return{schedule:Wr.reduce((V,z)=>{const U=h[z];return V[z]=(P,F=!1,W=!1)=>(s||D(),U.schedule(P,F,W)),V},{}),cancel:V=>{for(let z=0;z<Wr.length;z++)h[Wr[z]].cancel(V)},state:u,steps:h}}const{schedule:ke,cancel:xa,state:ct,steps:Sf}=gy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Jt,!0);let lo;function Oj(){lo=void 0}const vt={now:()=>(lo===void 0&&vt.set(ct.isProcessing||va.useManualTiming?ct.timestamp:performance.now()),lo),set:n=>{lo=n,queueMicrotask(Oj)}},vy=n=>a=>typeof a=="string"&&a.startsWith(n),xy=vy("--"),Rj=vy("var(--"),Hd=n=>Rj(n)?zj.test(n.split("/*")[0].trim()):!1,zj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Uv(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Ii={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},xl={...Ii,transform:n=>pn(0,1,n)},Ir={...Ii,default:1},fl=n=>Math.round(n*1e5)/1e5,$d=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function kj(n){return n==null}const Lj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qd=(n,a)=>s=>!!(typeof s=="string"&&Lj.test(s)&&s.startsWith(n)||a&&!kj(s)&&Object.prototype.hasOwnProperty.call(s,a)),yy=(n,a,s)=>r=>{if(typeof r!="string")return r;const[u,d,h,p]=r.match($d);return{[n]:parseFloat(u),[a]:parseFloat(d),[s]:parseFloat(h),alpha:p!==void 0?parseFloat(p):1}},Vj=n=>pn(0,255,n),wf={...Ii,transform:n=>Math.round(Vj(n))},Za={test:qd("rgb","red"),parse:yy("red","green","blue"),transform:({red:n,green:a,blue:s,alpha:r=1})=>"rgba("+wf.transform(n)+", "+wf.transform(a)+", "+wf.transform(s)+", "+fl(xl.transform(r))+")"};function _j(n){let a="",s="",r="",u="";return n.length>5?(a=n.substring(1,3),s=n.substring(3,5),r=n.substring(5,7),u=n.substring(7,9)):(a=n.substring(1,2),s=n.substring(2,3),r=n.substring(3,4),u=n.substring(4,5),a+=a,s+=s,r+=r,u+=u),{red:parseInt(a,16),green:parseInt(s,16),blue:parseInt(r,16),alpha:u?parseInt(u,16)/255:1}}const ed={test:qd("#"),parse:_j,transform:Za.transform},Al=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),ca=Al("deg"),mn=Al("%"),te=Al("px"),Uj=Al("vh"),Bj=Al("vw"),Bv={...mn,parse:n=>mn.parse(n)/100,transform:n=>mn.transform(n*100)},qi={test:qd("hsl","hue"),parse:yy("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:s,alpha:r=1})=>"hsla("+Math.round(n)+", "+mn.transform(fl(a))+", "+mn.transform(fl(s))+", "+fl(xl.transform(r))+")"},Ie={test:n=>Za.test(n)||ed.test(n)||qi.test(n),parse:n=>Za.test(n)?Za.parse(n):qi.test(n)?qi.parse(n):ed.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Za.transform(n):qi.transform(n),getAnimatableNone:n=>{const a=Ie.parse(n);return a.alpha=0,Ie.transform(a)}},Hj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function $j(n){var a,s;return isNaN(n)&&typeof n=="string"&&(((a=n.match($d))==null?void 0:a.length)||0)+(((s=n.match(Hj))==null?void 0:s.length)||0)>0}const by="number",Sy="color",qj="var",Yj="var(",Hv="${}",Gj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zi(n){const a=n.toString(),s=[],r={color:[],number:[],var:[]},u=[];let d=0;const p=a.replace(Gj,m=>(Ie.test(m)?(r.color.push(d),u.push(Sy),s.push(Ie.parse(m))):m.startsWith(Yj)?(r.var.push(d),u.push(qj),s.push(m)):(r.number.push(d),u.push(by),s.push(parseFloat(m))),++d,Hv)).split(Hv);return{values:s,split:p,indexes:r,types:u}}function Xj(n){return Zi(n).values}function wy({split:n,types:a}){const s=n.length;return r=>{let u="";for(let d=0;d<s;d++)if(u+=n[d],r[d]!==void 0){const h=a[d];h===by?u+=fl(r[d]):h===Sy?u+=Ie.transform(r[d]):u+=r[d]}return u}}function Kj(n){return wy(Zi(n))}const Fj=n=>typeof n=="number"?0:Ie.test(n)?Ie.getAnimatableNone(n):n,Zj=(n,a)=>typeof n=="number"?a!=null&&a.trim().endsWith("/")?n:0:Fj(n);function Qj(n){const a=Zi(n);return wy(a)(a.values.map((r,u)=>Zj(r,a.split[u])))}const sn={test:$j,parse:Xj,createTransformer:Kj,getAnimatableNone:Qj};function Tf(n,a,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?n+(a-n)*6*s:s<1/2?a:s<2/3?n+(a-n)*(2/3-s)*6:n}function Pj({hue:n,saturation:a,lightness:s,alpha:r}){n/=360,a/=100,s/=100;let u=0,d=0,h=0;if(!a)u=d=h=s;else{const p=s<.5?s*(1+a):s+a-s*a,m=2*s-p;u=Tf(m,p,n+1/3),d=Tf(m,p,n),h=Tf(m,p,n-1/3)}return{red:Math.round(u*255),green:Math.round(d*255),blue:Math.round(h*255),alpha:r}}function So(n,a){return s=>s>0?a:n}const He=(n,a,s)=>n+(a-n)*s,jf=(n,a,s)=>{const r=n*n,u=s*(a*a-r)+r;return u<0?0:Math.sqrt(u)},Jj=[ed,Za,qi],Wj=n=>Jj.find(a=>a.test(n));function $v(n){const a=Wj(n);if(!a)return!1;let s=a.parse(n);return a===qi&&(s=Pj(s)),s}const qv=(n,a)=>{const s=$v(n),r=$v(a);if(!s||!r)return So(n,a);const u={...s};return d=>(u.red=jf(s.red,r.red,d),u.green=jf(s.green,r.green,d),u.blue=jf(s.blue,r.blue,d),u.alpha=He(s.alpha,r.alpha,d),Za.transform(u))},td=new Set(["none","hidden"]);function Ij(n,a){return td.has(n)?s=>s<=0?n:a:s=>s>=1?a:n}function eE(n,a){return s=>He(n,a,s)}function Yd(n){return typeof n=="number"?eE:typeof n=="string"?Hd(n)?So:Ie.test(n)?qv:aE:Array.isArray(n)?Ty:typeof n=="object"?Ie.test(n)?qv:tE:So}function Ty(n,a){const s=[...n],r=s.length,u=n.map((d,h)=>Yd(d)(d,a[h]));return d=>{for(let h=0;h<r;h++)s[h]=u[h](d);return s}}function tE(n,a){const s={...n,...a},r={};for(const u in s)n[u]!==void 0&&a[u]!==void 0&&(r[u]=Yd(n[u])(n[u],a[u]));return u=>{for(const d in r)s[d]=r[d](u);return s}}function nE(n,a){const s=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],h=n.indexes[d][r[d]],p=n.values[h]??0;s[u]=p,r[d]++}return s}const aE=(n,a)=>{const s=sn.createTransformer(a),r=Zi(n),u=Zi(a);return r.indexes.var.length===u.indexes.var.length&&r.indexes.color.length===u.indexes.color.length&&r.indexes.number.length>=u.indexes.number.length?td.has(n)&&!u.values.length||td.has(a)&&!r.values.length?Ij(n,a):El(Ty(nE(r,u),u.values),s):So(n,a)};function jy(n,a,s){return typeof n=="number"&&typeof a=="number"&&typeof s=="number"?He(n,a,s):Yd(n)(n,a)}const iE=n=>{const a=({timestamp:s})=>n(s);return{start:(s=!0)=>ke.update(a,s),stop:()=>xa(a),now:()=>ct.isProcessing?ct.timestamp:vt.now()}},Ey=(n,a,s=10)=>{let r="";const u=Math.max(Math.round(a/s),2);for(let d=0;d<u;d++)r+=Math.round(n(d/(u-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},wo=2e4;function Gd(n){let a=0;const s=50;let r=n.next(a);for(;!r.done&&a<wo;)a+=s,r=n.next(a);return a>=wo?1/0:a}function sE(n,a=100,s){const r=s({...n,keyframes:[0,a]}),u=Math.min(Gd(r),wo);return{type:"keyframes",ease:d=>r.next(u*d).value/a,duration:Pt(u)}}const Ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function nd(n,a){return n*Math.sqrt(1-a*a)}const lE=12;function rE(n,a,s){let r=s;for(let u=1;u<lE;u++)r=r-n(r)/a(r);return r}const Ef=.001;function oE({duration:n=Ge.duration,bounce:a=Ge.bounce,velocity:s=Ge.velocity,mass:r=Ge.mass}){let u,d,h=1-a;h=pn(Ge.minDamping,Ge.maxDamping,h),n=pn(Ge.minDuration,Ge.maxDuration,Pt(n)),h<1?(u=g=>{const x=g*h,y=x*n,S=x-s,T=nd(g,h),j=Math.exp(-y);return Ef-S/T*j},d=g=>{const y=g*h*n,S=y*s+s,T=Math.pow(h,2)*Math.pow(g,2)*n,j=Math.exp(-y),E=nd(Math.pow(g,2),h);return(-u(g)+Ef>0?-1:1)*((S-T)*j)/E}):(u=g=>{const x=Math.exp(-g*n),y=(g-s)*n+1;return-Ef+x*y},d=g=>{const x=Math.exp(-g*n),y=(s-g)*(n*n);return x*y});const p=5/n,m=rE(u,d,p);if(n=Ut(n),isNaN(m))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:n};{const g=Math.pow(m,2)*r;return{stiffness:g,damping:h*2*Math.sqrt(r*g),duration:n}}}const uE=["duration","bounce"],cE=["stiffness","damping","mass"];function Yv(n,a){return a.some(s=>n[s]!==void 0)}function fE(n){let a={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...n};if(!Yv(n,cE)&&Yv(n,uE))if(a.velocity=0,n.visualDuration){const s=n.visualDuration,r=2*Math.PI/(s*1.2),u=r*r,d=2*pn(.05,1,1-(n.bounce||0))*Math.sqrt(u);a={...a,mass:Ge.mass,stiffness:u,damping:d}}else{const s=oE({...n,velocity:0});a={...a,...s,mass:Ge.mass},a.isResolvedFromDuration=!0}return a}function To(n=Ge.visualDuration,a=Ge.bounce){const s=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:r,restDelta:u}=s;const d=s.keyframes[0],h=s.keyframes[s.keyframes.length-1],p={done:!1,value:d},{stiffness:m,damping:g,mass:x,duration:y,velocity:S,isResolvedFromDuration:T}=fE({...s,velocity:-Pt(s.velocity||0)}),j=S||0,E=g/(2*Math.sqrt(m*x)),D=h-d,R=Pt(Math.sqrt(m/x)),M=Math.abs(D)<5;r||(r=M?Ge.restSpeed.granular:Ge.restSpeed.default),u||(u=M?Ge.restDelta.granular:Ge.restDelta.default);let V,z,U,P,F,W;if(E<1)U=nd(R,E),P=(j+E*R*D)/U,V=B=>{const Z=Math.exp(-E*R*B);return h-Z*(P*Math.sin(U*B)+D*Math.cos(U*B))},F=E*R*P+D*U,W=E*R*D-P*U,z=B=>Math.exp(-E*R*B)*(F*Math.sin(U*B)+W*Math.cos(U*B));else if(E===1){V=Z=>h-Math.exp(-R*Z)*(D+(j+R*D)*Z);const B=j+R*D;z=Z=>Math.exp(-R*Z)*(R*B*Z-j)}else{const B=R*Math.sqrt(E*E-1);V=Se=>{const De=Math.exp(-E*R*Se),$=Math.min(B*Se,300);return h-De*((j+E*R*D)*Math.sinh($)+B*D*Math.cosh($))/B};const Z=(j+E*R*D)/B,ie=E*R*Z-D*B,le=E*R*D-Z*B;z=Se=>{const De=Math.exp(-E*R*Se),$=Math.min(B*Se,300);return De*(ie*Math.sinh($)+le*Math.cosh($))}}const re={calculatedDuration:T&&y||null,velocity:B=>Ut(z(B)),next:B=>{if(!T&&E<1){const ie=Math.exp(-E*R*B),le=Math.sin(U*B),Se=Math.cos(U*B),De=h-ie*(P*le+D*Se),$=Ut(ie*(F*le+W*Se));return p.done=Math.abs($)<=r&&Math.abs(h-De)<=u,p.value=p.done?h:De,p}const Z=V(B);if(T)p.done=B>=y;else{const ie=Ut(z(B));p.done=Math.abs(ie)<=r&&Math.abs(h-Z)<=u}return p.value=p.done?h:Z,p},toString:()=>{const B=Math.min(Gd(re),wo),Z=Ey(ie=>re.next(B*ie).value,B,30);return B+"ms "+Z},toTransition:()=>{}};return re}To.applyToOptions=n=>{const a=sE(n,100,To);return n.ease=a.ease,n.duration=Ut(a.duration),n.type="keyframes",n};const dE=5;function Ny(n,a,s){const r=Math.max(a-dE,0);return sy(s-n(r),a-r)}function ad({keyframes:n,velocity:a=0,power:s=.8,timeConstant:r=325,bounceDamping:u=10,bounceStiffness:d=500,modifyTarget:h,min:p,max:m,restDelta:g=.5,restSpeed:x}){const y=n[0],S={done:!1,value:y},T=W=>p!==void 0&&W<p||m!==void 0&&W>m,j=W=>p===void 0?m:m===void 0||Math.abs(p-W)<Math.abs(m-W)?p:m;let E=s*a;const D=y+E,R=h===void 0?D:h(D);R!==D&&(E=R-y);const M=W=>-E*Math.exp(-W/r),V=W=>R+M(W),z=W=>{const re=M(W),B=V(W);S.done=Math.abs(re)<=g,S.value=S.done?R:B};let U,P;const F=W=>{T(S.value)&&(U=W,P=To({keyframes:[S.value,j(S.value)],velocity:Ny(V,W,S.value),damping:u,stiffness:d,restDelta:g,restSpeed:x}))};return F(0),{calculatedDuration:null,next:W=>{let re=!1;return!P&&U===void 0&&(re=!0,z(W),F(W)),U!==void 0&&W>=U?P.next(W-U):(!re&&z(W),S)}}}function hE(n,a,s){const r=[],u=s||va.mix||jy,d=n.length-1;for(let h=0;h<d;h++){let p=u(n[h],n[h+1]);if(a){const m=Array.isArray(a)?a[h]||Jt:a;p=El(m,p)}r.push(p)}return r}function mE(n,a,{clamp:s=!0,ease:r,mixer:u}={}){const d=n.length;if(Vd(d===a.length),d===1)return()=>a[0];if(d===2&&a[0]===a[1])return()=>a[1];const h=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=hE(a,r,u),m=p.length,g=x=>{if(h&&x<n[0])return a[0];let y=0;if(m>1)for(;y<n.length-2&&!(x<n[y+1]);y++);const S=vl(n[y],n[y+1],x);return p[y](S)};return s?x=>g(pn(n[0],n[d-1],x)):g}function pE(n,a){const s=n[n.length-1];for(let r=1;r<=a;r++){const u=vl(0,a,r);n.push(He(s,1,u))}}function gE(n){const a=[0];return pE(a,n.length-1),a}function vE(n,a){return n.map(s=>s*a)}function xE(n,a){return n.map(()=>a||my).splice(0,n.length-1)}function dl({duration:n=300,keyframes:a,times:s,ease:r="easeInOut"}){const u=Nj(r)?r.map(_v):_v(r),d={done:!1,value:a[0]},h=vE(s&&s.length===a.length?s:gE(a),n),p=mE(h,a,{ease:Array.isArray(u)?u:xE(a,u)});return{calculatedDuration:n,next:m=>(d.value=p(m),d.done=m>=n,d)}}const yE=n=>n!==null;function Bo(n,{repeat:a,repeatType:s="loop"},r,u=1){const d=n.filter(yE),p=u<0||a&&s!=="loop"&&a%2===1?0:d.length-1;return!p||r===void 0?d[p]:r}const bE={decay:ad,inertia:ad,tween:dl,keyframes:dl,spring:To};function Ay(n){typeof n.type=="string"&&(n.type=bE[n.type])}class Xd{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,s){return this.finished.then(a,s)}}const SE=n=>n/100;class jo extends Xd{constructor(a){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,u;const{motionValue:s}=this.options;s&&s.updatedAt!==vt.now()&&this.tick(vt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(u=(r=this.options).onStop)==null||u.call(r))},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;Ay(a);const{type:s=dl,repeat:r=0,repeatDelay:u=0,repeatType:d,velocity:h=0}=a;let{keyframes:p}=a;const m=s||dl;m!==dl&&typeof p[0]!="number"&&(this.mixKeyframes=El(SE,jy(p[0],p[1])),p=[0,100]);const g=m({...a,keyframes:p});d==="mirror"&&(this.mirroredGenerator=m({...a,keyframes:[...p].reverse(),velocity:-h})),g.calculatedDuration===null&&(g.calculatedDuration=Gd(g));const{calculatedDuration:x}=g;this.calculatedDuration=x,this.resolvedDuration=x+u,this.totalDuration=this.resolvedDuration*(r+1)-u,this.generator=g}updateTime(a){const s=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(a,s=!1){const{generator:r,totalDuration:u,mixKeyframes:d,mirroredGenerator:h,resolvedDuration:p,calculatedDuration:m}=this;if(this.startTime===null)return r.next(0);const{delay:g=0,keyframes:x,repeat:y,repeatType:S,repeatDelay:T,type:j,onUpdate:E,finalKeyframe:D}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-u/this.speed,this.startTime)),s?this.currentTime=a:this.updateTime(a);const R=this.currentTime-g*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?R<0:R>u;this.currentTime=Math.max(R,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let V=this.currentTime,z=r;if(y){const W=Math.min(this.currentTime,u)/p;let re=Math.floor(W),B=W%1;!B&&W>=1&&(B=1),B===1&&re--,re=Math.min(re,y+1),!!(re%2)&&(S==="reverse"?(B=1-B,T&&(B-=T/p)):S==="mirror"&&(z=h)),V=pn(0,1,B)*p}let U;M?(this.delayState.value=x[0],U=this.delayState):U=z.next(V),d&&!M&&(U.value=d(U.value));let{done:P}=U;!M&&m!==null&&(P=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return F&&j!==ad&&(U.value=Bo(x,this.options,D,this.speed)),E&&E(U.value),F&&this.finish(),U}then(a,s){return this.finished.then(a,s)}get duration(){return Pt(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(this.currentTime)}set time(a){a=Ut(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=a,this.tick(a))}getGeneratorVelocity(){const a=this.currentTime;if(a<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(a);const s=this.generator.next(a).value;return Ny(r=>this.generator.next(r).value,a,s)}get speed(){return this.playbackSpeed}set speed(a){const s=this.playbackSpeed!==a;s&&this.driver&&this.updateTime(vt.now()),this.playbackSpeed=a,s&&this.driver&&(this.time=Pt(this.currentTime))}play(){var u,d;if(this.isStopped)return;const{driver:a=iE,startTime:s}=this.options;this.driver||(this.driver=a(h=>this.tick(h))),(d=(u=this.options).onPlay)==null||d.call(u);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var a,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(a=this.options).onComplete)==null||s.call(a)}cancel(){var a,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(a=this.options).onCancel)==null||s.call(a)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),a.observe(this)}}function wE(n){for(let a=1;a<n.length;a++)n[a]??(n[a]=n[a-1])}const Qa=n=>n*180/Math.PI,id=n=>{const a=Qa(Math.atan2(n[1],n[0]));return sd(a)},TE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:id,rotateZ:id,skewX:n=>Qa(Math.atan(n[1])),skewY:n=>Qa(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},sd=n=>(n=n%360,n<0&&(n+=360),n),Gv=id,Xv=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),Kv=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),jE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xv,scaleY:Kv,scale:n=>(Xv(n)+Kv(n))/2,rotateX:n=>sd(Qa(Math.atan2(n[6],n[5]))),rotateY:n=>sd(Qa(Math.atan2(-n[2],n[0]))),rotateZ:Gv,rotate:Gv,skewX:n=>Qa(Math.atan(n[4])),skewY:n=>Qa(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function ld(n){return n.includes("scale")?1:0}function rd(n,a){if(!n||n==="none")return ld(a);const s=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,u;if(s)r=jE,u=s;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=TE,u=p}if(!u)return ld(a);const d=r[a],h=u[1].split(",").map(NE);return typeof d=="function"?d(h):h[d]}const EE=(n,a)=>{const{transform:s="none"}=getComputedStyle(n);return rd(s,a)};function NE(n){return parseFloat(n.trim())}const es=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ts=new Set(es),Fv=n=>n===Ii||n===te,AE=new Set(["x","y","z"]),CE=es.filter(n=>!AE.has(n));function ME(n){const a=[];return CE.forEach(s=>{const r=n.getValue(s);r!==void 0&&(a.push([s,r.get()]),r.set(s.startsWith("scale")?1:0))}),a}const pa={width:({x:n},{paddingLeft:a="0",paddingRight:s="0",boxSizing:r})=>{const u=n.max-n.min;return r==="border-box"?u:u-parseFloat(a)-parseFloat(s)},height:({y:n},{paddingTop:a="0",paddingBottom:s="0",boxSizing:r})=>{const u=n.max-n.min;return r==="border-box"?u:u-parseFloat(a)-parseFloat(s)},top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:(n,{transform:a})=>rd(a,"x"),y:(n,{transform:a})=>rd(a,"y")};pa.translateX=pa.x;pa.translateY=pa.y;const Pa=new Set;let od=!1,ud=!1,cd=!1;function Cy(){if(ud){const n=Array.from(Pa).filter(r=>r.needsMeasurement),a=new Set(n.map(r=>r.element)),s=new Map;a.forEach(r=>{const u=ME(r);u.length&&(s.set(r,u),r.render())}),n.forEach(r=>r.measureInitialState()),a.forEach(r=>{r.render();const u=s.get(r);u&&u.forEach(([d,h])=>{var p;(p=r.getValue(d))==null||p.set(h)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ud=!1,od=!1,Pa.forEach(n=>n.complete(cd)),Pa.clear()}function My(){Pa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(ud=!0)})}function DE(){cd=!0,My(),Cy(),cd=!1}class Kd{constructor(a,s,r,u,d,h=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=s,this.name=r,this.motionValue=u,this.element=d,this.isAsync=h}scheduleResolve(){this.state="scheduled",this.isAsync?(Pa.add(this),od||(od=!0,ke.read(My),ke.resolveKeyframes(Cy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:s,element:r,motionValue:u}=this;if(a[0]===null){const d=u==null?void 0:u.get(),h=a[a.length-1];if(d!==void 0)a[0]=d;else if(r&&s){const p=r.readValue(s,h);p!=null&&(a[0]=p)}a[0]===void 0&&(a[0]=h),u&&d===void 0&&u.set(a[0])}wE(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Pa.delete(this)}cancel(){this.state==="scheduled"&&(Pa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const OE=n=>n.startsWith("--");function Dy(n,a,s){OE(a)?n.style.setProperty(a,s):n.style[a]=s}const RE={};function Oy(n,a){const s=iy(n);return()=>RE[a]??s()}const zE=Oy(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ry=Oy(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),il=([n,a,s,r])=>`cubic-bezier(${n}, ${a}, ${s}, ${r})`,Zv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:il([0,.65,.55,1]),circOut:il([.55,0,1,.45]),backIn:il([.31,.01,.66,-.59]),backOut:il([.33,1.53,.69,.99])};function zy(n,a){if(n)return typeof n=="function"?Ry()?Ey(n,a):"ease-out":py(n)?il(n):Array.isArray(n)?n.map(s=>zy(s,a)||Zv.easeOut):Zv[n]}function kE(n,a,s,{delay:r=0,duration:u=300,repeat:d=0,repeatType:h="loop",ease:p="easeOut",times:m}={},g=void 0){const x={[a]:s};m&&(x.offset=m);const y=zy(p,u);Array.isArray(y)&&(x.easing=y);const S={delay:r,duration:u,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:d+1,direction:h==="reverse"?"alternate":"normal"};return g&&(S.pseudoElement=g),n.animate(x,S)}function ky(n){return typeof n=="function"&&"applyToOptions"in n}function LE({type:n,...a}){return ky(n)&&Ry()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class Ly extends Xd{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:s,name:r,keyframes:u,pseudoElement:d,allowFlatten:h=!1,finalKeyframe:p,onComplete:m}=a;this.isPseudoElement=!!d,this.allowFlatten=h,this.options=a,Vd(typeof a.type!="string");const g=LE(a);this.animation=kE(s,r,u,g,d),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const x=Bo(u,this.options,p,this.speed);this.updateMotionValue&&this.updateMotionValue(x),Dy(s,r,x),this.animation.cancel()}m==null||m(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var a,s;(s=(a=this.animation).finish)==null||s.call(a)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var s,r,u;const a=(s=this.options)==null?void 0:s.element;!this.isPseudoElement&&(a!=null&&a.isConnected)&&((u=(r=this.animation).commitStyles)==null||u.call(r))}get duration(){var s,r;const a=((r=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:r.call(s).duration)||0;return Pt(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(Number(this.animation.currentTime)||0)}set time(a){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ut(a),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,rangeStart:s,rangeEnd:r,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&zE()?(this.animation.timeline=a,s&&(this.animation.rangeStart=s),r&&(this.animation.rangeEnd=r),Jt):u(this)}}const Vy={anticipate:fy,backInOut:cy,circInOut:hy};function VE(n){return n in Vy}function _E(n){typeof n.ease=="string"&&VE(n.ease)&&(n.ease=Vy[n.ease])}const Nf=10;class UE extends Ly{constructor(a){_E(a),Ay(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:s,onUpdate:r,onComplete:u,element:d,...h}=this.options;if(!s)return;if(a!==void 0){s.set(a);return}const p=new jo({...h,autoplay:!1}),m=Math.max(Nf,vt.now()-this.startTime),g=pn(0,Nf,m-Nf),x=p.sample(m).value,{name:y}=this.options;d&&y&&Dy(d,y,x),s.setWithVelocity(p.sample(Math.max(0,m-g)).value,x,g),p.stop()}}const Qv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(sn.test(n)||n==="0")&&!n.startsWith("url("));function BE(n){const a=n[0];if(n.length===1)return!0;for(let s=0;s<n.length;s++)if(n[s]!==a)return!0}function HE(n,a,s,r){const u=n[0];if(u===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],h=Qv(u,a),p=Qv(d,a);return!h||!p?!1:BE(n)||(s==="spring"||ky(s))&&r}function fd(n){n.duration=0,n.type="keyframes"}const _y=new Set(["opacity","clipPath","filter","transform"]),$E=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function qE(n){for(let a=0;a<n.length;a++)if(typeof n[a]=="string"&&$E.test(n[a]))return!0;return!1}const YE=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),GE=iy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function XE(n){var y;const{motionValue:a,name:s,repeatDelay:r,repeatType:u,damping:d,type:h,keyframes:p}=n;if(!(((y=a==null?void 0:a.owner)==null?void 0:y.current)instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:x}=a.owner.getProps();return GE()&&s&&(_y.has(s)||YE.has(s)&&qE(p))&&(s!=="transform"||!x)&&!g&&!r&&u!=="mirror"&&d!==0&&h!=="inertia"}const KE=40;class FE extends Xd{constructor({autoplay:a=!0,delay:s=0,type:r="keyframes",repeat:u=0,repeatDelay:d=0,repeatType:h="loop",keyframes:p,name:m,motionValue:g,element:x,...y}){var j;super(),this.stop=()=>{var E,D;this._animation&&(this._animation.stop(),(E=this.stopTimeline)==null||E.call(this)),(D=this.keyframeResolver)==null||D.cancel()},this.createdAt=vt.now();const S={autoplay:a,delay:s,type:r,repeat:u,repeatDelay:d,repeatType:h,name:m,motionValue:g,element:x,...y},T=(x==null?void 0:x.KeyframeResolver)||Kd;this.keyframeResolver=new T(p,(E,D,R)=>this.onKeyframesResolved(E,D,S,!R),m,g,x),(j=this.keyframeResolver)==null||j.scheduleResolve()}onKeyframesResolved(a,s,r,u){var R,M;this.keyframeResolver=void 0;const{name:d,type:h,velocity:p,delay:m,isHandoff:g,onUpdate:x}=r;this.resolvedAt=vt.now();let y=!0;HE(a,d,h,p)||(y=!1,(va.instantAnimations||!m)&&(x==null||x(Bo(a,r,s))),a[0]=a[a.length-1],fd(r),r.repeat=0);const T={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>KE?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...r,keyframes:a},j=y&&!g&&XE(T),E=(M=(R=T.motionValue)==null?void 0:R.owner)==null?void 0:M.current;let D;if(j)try{D=new UE({...T,element:E})}catch{D=new jo(T)}else D=new jo(T);D.finished.then(()=>{this.notifyFinished()}).catch(Jt),this.pendingTimeline&&(this.stopTimeline=D.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=D}get finished(){return this._animation?this.animation.finished:this._finished}then(a,s){return this.finished.finally(a).then(()=>{})}get animation(){var a;return this._animation||((a=this.keyframeResolver)==null||a.resume(),DE()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var a;this._animation&&this.animation.cancel(),(a=this.keyframeResolver)==null||a.cancel()}}function Uy(n,a,s,r=0,u=1){const d=Array.from(n).sort((g,x)=>g.sortNodePosition(x)).indexOf(a),h=n.size,p=(h-1)*r;return typeof s=="function"?s(d,h):u===1?d*r:p-d*r}const ZE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function QE(n){const a=ZE.exec(n);if(!a)return[,];const[,s,r,u]=a;return[`--${s??r}`,u]}function By(n,a,s=1){const[r,u]=QE(n);if(!r)return;const d=window.getComputedStyle(a).getPropertyValue(r);if(d){const h=d.trim();return ty(h)?parseFloat(h):h}return Hd(u)?By(u,a,s+1):u}const PE={type:"spring",stiffness:500,damping:25,restSpeed:10},JE=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),WE={type:"keyframes",duration:.8},IE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},e5=(n,{keyframes:a})=>a.length>2?WE:ts.has(n)?n.startsWith("scale")?JE(a[1]):PE:IE;function Hy(n,a){if(n!=null&&n.inherit&&a){const{inherit:s,...r}=n;return{...a,...r}}return n}function Fd(n,a){const s=(n==null?void 0:n[a])??(n==null?void 0:n.default)??n;return s!==n?Hy(s,n):s}const t5=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function n5(n){for(const a in n)if(!t5.has(a))return!0;return!1}const Zd=(n,a,s,r={},u,d)=>h=>{const p=Fd(r,n)||{},m=p.delay||r.delay||0;let{elapsed:g=0}=r;g=g-Ut(m);const x={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:S=>{a.set(S),p.onUpdate&&p.onUpdate(S)},onComplete:()=>{h(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:d?void 0:u};n5(p)||Object.assign(x,e5(n,x)),x.duration&&(x.duration=Ut(x.duration)),x.repeatDelay&&(x.repeatDelay=Ut(x.repeatDelay)),x.from!==void 0&&(x.keyframes[0]=x.from);let y=!1;if((x.type===!1||x.duration===0&&!x.repeatDelay)&&(fd(x),x.delay===0&&(y=!0)),(va.instantAnimations||va.skipAnimations||u!=null&&u.shouldSkipAnimations)&&(y=!0,fd(x),x.delay=0),x.allowFlatten=!p.type&&!p.ease,y&&!d&&a.get()!==void 0){const S=Bo(x.keyframes,p);if(S!==void 0){ke.update(()=>{x.onUpdate(S),x.onComplete()});return}}return p.isSync?new jo(x):new FE(x)};function Pv(n){const a=[{},{}];return n==null||n.values.forEach((s,r)=>{a[0][r]=s.get(),a[1][r]=s.getVelocity()}),a}function Qd(n,a,s,r){if(typeof a=="function"){const[u,d]=Pv(r);a=a(s!==void 0?s:n.custom,u,d)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[u,d]=Pv(r);a=a(s!==void 0?s:n.custom,u,d)}return a}function Ja(n,a,s){const r=n.getProps();return Qd(r,a,s!==void 0?s:r.custom,n)}const $y=new Set(["width","height","top","left","right","bottom",...es]),Jv=30,a5=n=>!isNaN(parseFloat(n));class i5{constructor(a,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var d;const u=vt.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((d=this.events.change)==null||d.notify(this.current),this.dependents))for(const h of this.dependents)h.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=s.owner}setCurrent(a){this.current=a,this.updatedAt=vt.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=a5(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,s){this.events[a]||(this.events[a]=new _d);const r=this.events[a].add(s);return a==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,s){this.passiveEffect=a,this.stopPassiveEffect=s}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,s,r){this.set(s),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-r}jump(a,s=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var a;(a=this.events.change)==null||a.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=vt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Jv)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Jv);return sy(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(a){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=a(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var a,s;(a=this.dependents)==null||a.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qi(n,a){return new i5(n,a)}const dd=n=>Array.isArray(n);function s5(n,a,s){n.hasValue(a)?n.getValue(a).set(s):n.addValue(a,Qi(s))}function l5(n){return dd(n)?n[n.length-1]||0:n}function r5(n,a){const s=Ja(n,a);let{transitionEnd:r={},transition:u={},...d}=s||{};d={...d,...r};for(const h in d){const p=l5(d[h]);s5(n,h,p)}}const ft=n=>!!(n&&n.getVelocity);function o5(n){return!!(ft(n)&&n.add)}function hd(n,a){const s=n.getValue("willChange");if(o5(s))return s.add(a);if(!s&&va.WillChange){const r=new va.WillChange("auto");n.addValue("willChange",r),r.add(a)}}function Pd(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const u5="framerAppearId",qy="data-"+Pd(u5);function Yy(n){return n.props[qy]}function c5({protectedKeys:n,needsAnimating:a},s){const r=n.hasOwnProperty(s)&&a[s]!==!0;return a[s]=!1,r}function Gy(n,a,{delay:s=0,transitionOverride:r,type:u}={}){let{transition:d,transitionEnd:h,...p}=a;const m=n.getDefaultTransition();d=d?Hy(d,m):m;const g=d==null?void 0:d.reduceMotion;r&&(d=r);const x=[],y=u&&n.animationState&&n.animationState.getState()[u];for(const S in p){const T=n.getValue(S,n.latestValues[S]??null),j=p[S];if(j===void 0||y&&c5(y,S))continue;const E={delay:s,...Fd(d||{},S)},D=T.get();if(D!==void 0&&!T.isAnimating()&&!Array.isArray(j)&&j===D&&!E.velocity){ke.update(()=>T.set(j));continue}let R=!1;if(window.MotionHandoffAnimation){const z=Yy(n);if(z){const U=window.MotionHandoffAnimation(z,S,ke);U!==null&&(E.startTime=U,R=!0)}}hd(n,S);const M=g??n.shouldReduceMotion;T.start(Zd(S,T,j,M&&$y.has(S)?{type:!1}:E,n,R));const V=T.animation;V&&x.push(V)}if(h){const S=()=>ke.update(()=>{h&&r5(n,h)});x.length?Promise.all(x).then(S):S()}return x}function md(n,a,s={}){var m;const r=Ja(n,a,s.type==="exit"?(m=n.presenceContext)==null?void 0:m.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};s.transitionOverride&&(u=s.transitionOverride);const d=r?()=>Promise.all(Gy(n,r,s)):()=>Promise.resolve(),h=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:x=0,staggerChildren:y,staggerDirection:S}=u;return f5(n,a,g,x,y,S,s)}:()=>Promise.resolve(),{when:p}=u;if(p){const[g,x]=p==="beforeChildren"?[d,h]:[h,d];return g().then(()=>x())}else return Promise.all([d(),h(s.delay)])}function f5(n,a,s=0,r=0,u=0,d=1,h){const p=[];for(const m of n.variantChildren)m.notify("AnimationStart",a),p.push(md(m,a,{...h,delay:s+(typeof r=="function"?0:r)+Uy(n.variantChildren,m,r,u,d)}).then(()=>m.notify("AnimationComplete",a)));return Promise.all(p)}function d5(n,a,s={}){n.notify("AnimationStart",a);let r;if(Array.isArray(a)){const u=a.map(d=>md(n,d,s));r=Promise.all(u)}else if(typeof a=="string")r=md(n,a,s);else{const u=typeof a=="function"?Ja(n,a,s.custom):a;r=Promise.all(Gy(n,u,s))}return r.then(()=>{n.notify("AnimationComplete",a)})}const h5={test:n=>n==="auto",parse:n=>n},Xy=n=>a=>a.test(n),Ky=[Ii,te,mn,ca,Bj,Uj,h5],Wv=n=>Ky.find(Xy(n));function m5(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||ay(n):!0}const p5=new Set(["brightness","contrast","saturate","opacity"]);function g5(n){const[a,s]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[r]=s.match($d)||[];if(!r)return n;const u=s.replace(r,"");let d=p5.has(a)?1:0;return r!==s&&(d*=100),a+"("+d+u+")"}const v5=/\b([a-z-]*)\(.*?\)/gu,pd={...sn,getAnimatableNone:n=>{const a=n.match(v5);return a?a.map(g5).join(" "):n}},gd={...sn,getAnimatableNone:n=>{const a=sn.parse(n);return sn.createTransformer(n)(a.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Iv={...Ii,transform:Math.round},x5={rotate:ca,rotateX:ca,rotateY:ca,rotateZ:ca,scale:Ir,scaleX:Ir,scaleY:Ir,scaleZ:Ir,skew:ca,skewX:ca,skewY:ca,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:xl,originX:Bv,originY:Bv,originZ:te},Jd={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,top:te,right:te,bottom:te,left:te,inset:te,insetBlock:te,insetBlockStart:te,insetBlockEnd:te,insetInline:te,insetInlineStart:te,insetInlineEnd:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,paddingBlock:te,paddingBlockStart:te,paddingBlockEnd:te,paddingInline:te,paddingInlineStart:te,paddingInlineEnd:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,marginBlock:te,marginBlockStart:te,marginBlockEnd:te,marginInline:te,marginInlineStart:te,marginInlineEnd:te,fontSize:te,backgroundPositionX:te,backgroundPositionY:te,...x5,zIndex:Iv,fillOpacity:xl,strokeOpacity:xl,numOctaves:Iv},y5={...Jd,color:Ie,backgroundColor:Ie,outlineColor:Ie,fill:Ie,stroke:Ie,borderColor:Ie,borderTopColor:Ie,borderRightColor:Ie,borderBottomColor:Ie,borderLeftColor:Ie,filter:pd,WebkitFilter:pd,mask:gd,WebkitMask:gd},Fy=n=>y5[n],b5=new Set([pd,gd]);function Zy(n,a){let s=Fy(n);return b5.has(s)||(s=sn),s.getAnimatableNone?s.getAnimatableNone(a):void 0}const S5=new Set(["auto","none","0"]);function w5(n,a,s){let r=0,u;for(;r<n.length&&!u;){const d=n[r];typeof d=="string"&&!S5.has(d)&&Zi(d).values.length&&(u=n[r]),r++}if(u&&s)for(const d of a)n[d]=Zy(s,u)}class T5 extends Kd{constructor(a,s,r,u,d){super(a,s,r,u,d,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:s,name:r}=this;if(!s||!s.current)return;super.readKeyframes();for(let x=0;x<a.length;x++){let y=a[x];if(typeof y=="string"&&(y=y.trim(),Hd(y))){const S=By(y,s.current);S!==void 0&&(a[x]=S),x===a.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!$y.has(r)||a.length!==2)return;const[u,d]=a,h=Wv(u),p=Wv(d),m=Uv(u),g=Uv(d);if(m!==g&&pa[r]){this.needsMeasurement=!0;return}if(h!==p)if(Fv(h)&&Fv(p))for(let x=0;x<a.length;x++){const y=a[x];typeof y=="string"&&(a[x]=parseFloat(y))}else pa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:s}=this,r=[];for(let u=0;u<a.length;u++)(a[u]===null||m5(a[u]))&&r.push(u);r.length&&w5(a,r,s)}measureInitialState(){const{element:a,unresolvedKeyframes:s,name:r}=this;if(!a||!a.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pa[r](a.measureViewportBox(),window.getComputedStyle(a.current)),s[0]=this.measuredOrigin;const u=s[s.length-1];u!==void 0&&a.getValue(r,u).jump(u,!1)}measureEndState(){var p;const{element:a,name:s,unresolvedKeyframes:r}=this;if(!a||!a.current)return;const u=a.getValue(s);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,h=r[d];r[d]=pa[s](a.measureViewportBox(),window.getComputedStyle(a.current)),h!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=h),(p=this.removedTransforms)!=null&&p.length&&this.removedTransforms.forEach(([m,g])=>{a.getValue(m).set(g)}),this.resolveNoneKeyframes()}}function Qy(n,a,s){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let r=document;const u=(s==null?void 0:s[n])??r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n).filter(r=>r!=null)}const Py=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function j5(n){return ny(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:Wd}=gy(queueMicrotask,!1),nn={x:!1,y:!1};function Jy(){return nn.x||nn.y}function E5(n){return n==="x"||n==="y"?nn[n]?null:(nn[n]=!0,()=>{nn[n]=!1}):nn.x||nn.y?null:(nn.x=nn.y=!0,()=>{nn.x=nn.y=!1})}function Wy(n,a){const s=Qy(n),r=new AbortController,u={passive:!0,...a,signal:r.signal};return[s,u,()=>r.abort()]}function N5(n){return!(n.pointerType==="touch"||Jy())}function A5(n,a,s={}){const[r,u,d]=Wy(n,s);return r.forEach(h=>{let p=!1,m=!1,g;const x=()=>{h.removeEventListener("pointerleave",j)},y=D=>{g&&(g(D),g=void 0),x()},S=D=>{p=!1,window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),m&&(m=!1,y(D))},T=()=>{p=!0,window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",S,u)},j=D=>{if(D.pointerType!=="touch"){if(p){m=!0;return}y(D)}},E=D=>{if(!N5(D))return;m=!1;const R=a(h,D);typeof R=="function"&&(g=R,h.addEventListener("pointerleave",j,u))};h.addEventListener("pointerenter",E,u),h.addEventListener("pointerdown",T,u)}),d}const Iy=(n,a)=>a?n===a?!0:Iy(n,a.parentElement):!1,Id=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,C5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function M5(n){return C5.has(n.tagName)||n.isContentEditable===!0}const D5=new Set(["INPUT","SELECT","TEXTAREA"]);function O5(n){return D5.has(n.tagName)||n.isContentEditable===!0}const ro=new WeakSet;function e0(n){return a=>{a.key==="Enter"&&n(a)}}function Af(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const R5=(n,a)=>{const s=n.currentTarget;if(!s)return;const r=e0(()=>{if(ro.has(s))return;Af(s,"down");const u=e0(()=>{Af(s,"up")}),d=()=>Af(s,"cancel");s.addEventListener("keyup",u,a),s.addEventListener("blur",d,a)});s.addEventListener("keydown",r,a),s.addEventListener("blur",()=>s.removeEventListener("keydown",r),a)};function t0(n){return Id(n)&&!Jy()}const n0=new WeakSet;function z5(n,a,s={}){const[r,u,d]=Wy(n,s),h=p=>{const m=p.currentTarget;if(!t0(p)||n0.has(p))return;ro.add(m),s.stopPropagation&&n0.add(p);const g=a(m,p),x=(T,j)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",S),ro.has(m)&&ro.delete(m),t0(T)&&typeof g=="function"&&g(T,{success:j})},y=T=>{x(T,m===window||m===document||s.useGlobalTarget||Iy(m,T.target))},S=T=>{x(T,!1)};window.addEventListener("pointerup",y,u),window.addEventListener("pointercancel",S,u)};return r.forEach(p=>{(s.useGlobalTarget?window:p).addEventListener("pointerdown",h,u),j5(p)&&(p.addEventListener("focus",g=>R5(g,u)),!M5(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),d}function eh(n){return ny(n)&&"ownerSVGElement"in n}const oo=new WeakMap;let fa;const eb=(n,a,s)=>(r,u)=>u&&u[0]?u[0][n+"Size"]:eh(r)&&"getBBox"in r?r.getBBox()[a]:r[s],k5=eb("inline","width","offsetWidth"),L5=eb("block","height","offsetHeight");function V5({target:n,borderBoxSize:a}){var s;(s=oo.get(n))==null||s.forEach(r=>{r(n,{get width(){return k5(n,a)},get height(){return L5(n,a)}})})}function _5(n){n.forEach(V5)}function U5(){typeof ResizeObserver>"u"||(fa=new ResizeObserver(_5))}function B5(n,a){fa||U5();const s=Qy(n);return s.forEach(r=>{let u=oo.get(r);u||(u=new Set,oo.set(r,u)),u.add(a),fa==null||fa.observe(r)}),()=>{s.forEach(r=>{const u=oo.get(r);u==null||u.delete(a),u!=null&&u.size||fa==null||fa.unobserve(r)})}}const uo=new Set;let Yi;function H5(){Yi=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};uo.forEach(a=>a(n))},window.addEventListener("resize",Yi)}function $5(n){return uo.add(n),Yi||H5(),()=>{uo.delete(n),!uo.size&&typeof Yi=="function"&&(window.removeEventListener("resize",Yi),Yi=void 0)}}function a0(n,a){return typeof n=="function"?$5(n):B5(n,a)}function q5(n){return eh(n)&&n.tagName==="svg"}const Y5=[...Ky,Ie,sn],G5=n=>Y5.find(Xy(n)),i0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gi=()=>({x:i0(),y:i0()}),s0=()=>({min:0,max:0}),nt=()=>({x:s0(),y:s0()}),X5=new WeakMap;function Ho(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function yl(n){return typeof n=="string"||Array.isArray(n)}const th=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nh=["initial",...th];function $o(n){return Ho(n.animate)||nh.some(a=>yl(n[a]))}function tb(n){return!!($o(n)||n.variants)}function K5(n,a,s){for(const r in a){const u=a[r],d=s[r];if(ft(u))n.addValue(r,u);else if(ft(d))n.addValue(r,Qi(u,{owner:n}));else if(d!==u)if(n.hasValue(r)){const h=n.getValue(r);h.liveStyle===!0?h.jump(u):h.hasAnimated||h.set(u)}else{const h=n.getStaticValue(r);n.addValue(r,Qi(h!==void 0?h:u,{owner:n}))}}for(const r in s)a[r]===void 0&&n.removeValue(r);return a}const vd={current:null},nb={current:!1},F5=typeof window<"u";function Z5(){if(nb.current=!0,!!F5)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>vd.current=n.matches;n.addEventListener("change",a),a()}else vd.current=!1}const l0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Eo={};function ab(n){Eo=n}function Q5(){return Eo}class P5{scrapeMotionValuesFromProps(a,s,r){return{}}constructor({parent:a,props:s,presenceContext:r,reducedMotionConfig:u,skipAnimations:d,blockInitialAnimation:h,visualState:p},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=vt.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,ke.render(this.render,!1,!0))};const{latestValues:g,renderState:x}=p;this.latestValues=g,this.baseTarget={...g},this.initialValues=s.initial?{...g}:{},this.renderState=x,this.parent=a,this.props=s,this.presenceContext=r,this.depth=a?a.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=d,this.options=m,this.blockInitialAnimation=!!h,this.isControllingVariants=$o(s),this.isVariantNode=tb(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:y,...S}=this.scrapeMotionValuesFromProps(s,{},this);for(const T in S){const j=S[T];g[T]!==void 0&&ft(j)&&j.set(g[T])}}mount(a){var s,r;if(this.hasBeenMounted)for(const u in this.initialValues)(s=this.values.get(u))==null||s.jump(this.initialValues[u]),this.latestValues[u]=this.initialValues[u];this.current=a,X5.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((u,d)=>this.bindToMotionValue(d,u)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(nb.current||Z5(),this.shouldReduceMotion=vd.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var a;this.projection&&this.projection.unmount(),xa(this.notifyUpdate),xa(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(a=this.parent)==null||a.removeChild(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const r=this.features[s];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,s){if(this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)(),s.accelerate&&_y.has(a)&&this.current instanceof HTMLElement){const{factory:h,keyframes:p,times:m,ease:g,duration:x}=s.accelerate,y=new Ly({element:this.current,name:a,keyframes:p,times:m,ease:g,duration:Ut(x)}),S=h(y);this.valueSubscriptions.set(a,()=>{S(),y.cancel()});return}const r=ts.has(a);r&&this.onBindTransform&&this.onBindTransform();const u=s.on("change",h=>{this.latestValues[a]=h,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,s)),this.valueSubscriptions.set(a,()=>{u(),d&&d(),s.owner&&s.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Eo){const s=Eo[a];if(!s)continue;const{isEnabled:r,Feature:u}=s;if(!this.features[a]&&u&&r(this.props)&&(this.features[a]=new u(this)),this.features[a]){const d=this.features[a];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,s){this.latestValues[a]=s}update(a,s){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let r=0;r<l0.length;r++){const u=l0[r];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const d="on"+u,h=a[d];h&&(this.propEventSubscriptions[u]=this.on(u,h))}this.prevMotionValues=K5(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(a),()=>s.variantChildren.delete(a)}addValue(a,s){const r=this.values.get(a);s!==r&&(r&&this.removeValue(a),this.bindToMotionValue(a,s),this.values.set(a,s),this.latestValues[a]=s.get())}removeValue(a){this.values.delete(a);const s=this.valueSubscriptions.get(a);s&&(s(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,s){if(this.props.values&&this.props.values[a])return this.props.values[a];let r=this.values.get(a);return r===void 0&&s!==void 0&&(r=Qi(s===null?void 0:s,{owner:this}),this.addValue(a,r)),r}readValue(a,s){let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(ty(r)||ay(r))?r=parseFloat(r):!G5(r)&&sn.test(s)&&(r=Zy(a,s)),this.setBaseTarget(a,ft(r)?r.get():r)),ft(r)?r.get():r}setBaseTarget(a,s){this.baseTarget[a]=s}getBaseTarget(a){var d;const{initial:s}=this.props;let r;if(typeof s=="string"||typeof s=="object"){const h=Qd(this.props,s,(d=this.presenceContext)==null?void 0:d.custom);h&&(r=h[a])}if(s&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!ft(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,s){return this.events[a]||(this.events[a]=new _d),this.events[a].add(s)}notify(a,...s){this.events[a]&&this.events[a].notify(...s)}scheduleRenderMicrotask(){Wd.render(this.render)}}class ib extends P5{constructor(){super(...arguments),this.KeyframeResolver=T5}sortInstanceNodePosition(a,s){return a.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(a,s){const r=a.style;return r?r[s]:void 0}removeValueFromRenderState(a,{vars:s,style:r}){delete s[a],delete r[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;ft(a)&&(this.childSubscription=a.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Sa{constructor(a){this.isMounted=!1,this.node=a}update(){}}function sb({top:n,left:a,right:s,bottom:r}){return{x:{min:a,max:s},y:{min:n,max:r}}}function J5({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function W5(n,a){if(!a)return n;const s=a({x:n.left,y:n.top}),r=a({x:n.right,y:n.bottom});return{top:s.y,left:s.x,bottom:r.y,right:r.x}}function Cf(n){return n===void 0||n===1}function xd({scale:n,scaleX:a,scaleY:s}){return!Cf(n)||!Cf(a)||!Cf(s)}function Ya(n){return xd(n)||lb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function lb(n){return r0(n.x)||r0(n.y)}function r0(n){return n&&n!=="0%"}function No(n,a,s){const r=n-s,u=a*r;return s+u}function o0(n,a,s,r,u){return u!==void 0&&(n=No(n,u,r)),No(n,s,r)+a}function yd(n,a=0,s=1,r,u){n.min=o0(n.min,a,s,r,u),n.max=o0(n.max,a,s,r,u)}function rb(n,{x:a,y:s}){yd(n.x,a.translate,a.scale,a.originPoint),yd(n.y,s.translate,s.scale,s.originPoint)}const u0=.999999999999,c0=1.0000000000001;function I5(n,a,s,r=!1){var p;const u=s.length;if(!u)return;a.x=a.y=1;let d,h;for(let m=0;m<u;m++){d=s[m],h=d.projectionDelta;const{visualElement:g}=d.options;g&&g.props.style&&g.props.style.display==="contents"||(r&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(dn(n.x,-d.scroll.offset.x),dn(n.y,-d.scroll.offset.y)),h&&(a.x*=h.x.scale,a.y*=h.y.scale,rb(n,h)),r&&Ya(d.latestValues)&&co(n,d.latestValues,(p=d.layout)==null?void 0:p.layoutBox))}a.x<c0&&a.x>u0&&(a.x=1),a.y<c0&&a.y>u0&&(a.y=1)}function dn(n,a){n.min+=a,n.max+=a}function f0(n,a,s,r,u=.5){const d=He(n.min,n.max,u);yd(n,a,s,d,r)}function d0(n,a){return typeof n=="string"?parseFloat(n)/100*(a.max-a.min):n}function co(n,a,s){const r=s??n;f0(n.x,d0(a.x,r.x),a.scaleX,a.scale,a.originX),f0(n.y,d0(a.y,r.y),a.scaleY,a.scale,a.originY)}function ob(n,a){return sb(W5(n.getBoundingClientRect(),a))}function eN(n,a,s){const r=ob(n,s),{scroll:u}=a;return u&&(dn(r.x,u.offset.x),dn(r.y,u.offset.y)),r}const tN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nN=es.length;function aN(n,a,s){let r="",u=!0;for(let d=0;d<nN;d++){const h=es[d],p=n[h];if(p===void 0)continue;let m=!0;if(typeof p=="number")m=p===(h.startsWith("scale")?1:0);else{const g=parseFloat(p);m=h.startsWith("scale")?g===1:g===0}if(!m||s){const g=Py(p,Jd[h]);if(!m){u=!1;const x=tN[h]||h;r+=`${x}(${g}) `}s&&(a[h]=g)}}return r=r.trim(),s?r=s(a,u?"":r):u&&(r="none"),r}function ah(n,a,s){const{style:r,vars:u,transformOrigin:d}=n;let h=!1,p=!1;for(const m in a){const g=a[m];if(ts.has(m)){h=!0;continue}else if(xy(m)){u[m]=g;continue}else{const x=Py(g,Jd[m]);m.startsWith("origin")?(p=!0,d[m]=x):r[m]=x}}if(a.transform||(h||s?r.transform=aN(a,n.transform,s):r.transform&&(r.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:x=0}=d;r.transformOrigin=`${m} ${g} ${x}`}}function ub(n,{style:a,vars:s},r,u){const d=n.style;let h;for(h in a)d[h]=a[h];u==null||u.applyProjectionStyles(d,r);for(h in s)d.setProperty(h,s[h])}function h0(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Js={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(te.test(n))n=parseFloat(n);else return n;const s=h0(n,a.target.x),r=h0(n,a.target.y);return`${s}% ${r}%`}},iN={correct:(n,{treeScale:a,projectionDelta:s})=>{const r=n,u=sn.parse(n);if(u.length>5)return r;const d=sn.createTransformer(n),h=typeof u[0]!="number"?1:0,p=s.x.scale*a.x,m=s.y.scale*a.y;u[0+h]/=p,u[1+h]/=m;const g=He(p,m,.5);return typeof u[2+h]=="number"&&(u[2+h]/=g),typeof u[3+h]=="number"&&(u[3+h]/=g),d(u)}},bd={borderRadius:{...Js,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Js,borderTopRightRadius:Js,borderBottomLeftRadius:Js,borderBottomRightRadius:Js,boxShadow:iN};function cb(n,{layout:a,layoutId:s}){return ts.has(n)||n.startsWith("origin")||(a||s!==void 0)&&(!!bd[n]||n==="opacity")}function ih(n,a,s){var h;const r=n.style,u=a==null?void 0:a.style,d={};if(!r)return d;for(const p in r)(ft(r[p])||u&&ft(u[p])||cb(p,n)||((h=s==null?void 0:s.getValue(p))==null?void 0:h.liveStyle)!==void 0)&&(d[p]=r[p]);return d}function sN(n){return window.getComputedStyle(n)}class lN extends ib{constructor(){super(...arguments),this.type="html",this.renderInstance=ub}readValueFromInstance(a,s){var r;if(ts.has(s))return(r=this.projection)!=null&&r.isProjecting?ld(s):EE(a,s);{const u=sN(a),d=(xy(s)?u.getPropertyValue(s):u[s])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(a,{transformPagePoint:s}){return ob(a,s)}build(a,s,r){ah(a,s,r.transformTemplate)}scrapeMotionValuesFromProps(a,s,r){return ih(a,s,r)}}const rN={offset:"stroke-dashoffset",array:"stroke-dasharray"},oN={offset:"strokeDashoffset",array:"strokeDasharray"};function uN(n,a,s=1,r=0,u=!0){n.pathLength=1;const d=u?rN:oN;n[d.offset]=`${-r}`,n[d.array]=`${a} ${s}`}const cN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fb(n,{attrX:a,attrY:s,attrScale:r,pathLength:u,pathSpacing:d=1,pathOffset:h=0,...p},m,g,x){if(ah(n,p,g),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:y,style:S}=n;y.transform&&(S.transform=y.transform,delete y.transform),(S.transform||y.transformOrigin)&&(S.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),S.transform&&(S.transformBox=(x==null?void 0:x.transformBox)??"fill-box",delete y.transformBox);for(const T of cN)y[T]!==void 0&&(S[T]=y[T],delete y[T]);a!==void 0&&(y.x=a),s!==void 0&&(y.y=s),r!==void 0&&(y.scale=r),u!==void 0&&uN(y,u,d,h,!1)}const db=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),hb=n=>typeof n=="string"&&n.toLowerCase()==="svg";function fN(n,a,s,r){ub(n,a,void 0,r);for(const u in a.attrs)n.setAttribute(db.has(u)?u:Pd(u),a.attrs[u])}function mb(n,a,s){const r=ih(n,a,s);for(const u in n)if(ft(n[u])||ft(a[u])){const d=es.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;r[d]=n[u]}return r}class dN extends ib{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt}getBaseTargetFromProps(a,s){return a[s]}readValueFromInstance(a,s){if(ts.has(s)){const r=Fy(s);return r&&r.default||0}return s=db.has(s)?s:Pd(s),a.getAttribute(s)}scrapeMotionValuesFromProps(a,s,r){return mb(a,s,r)}build(a,s,r){fb(a,s,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(a,s,r,u){fN(a,s,r,u)}mount(a){this.isSVGTag=hb(a.tagName),super.mount(a)}}const hN=nh.length;function pb(n){if(!n)return;if(!n.isControllingVariants){const s=n.parent?pb(n.parent)||{}:{};return n.props.initial!==void 0&&(s.initial=n.props.initial),s}const a={};for(let s=0;s<hN;s++){const r=nh[s],u=n.props[r];(yl(u)||u===!1)&&(a[r]=u)}return a}function gb(n,a){if(!Array.isArray(a))return!1;const s=a.length;if(s!==n.length)return!1;for(let r=0;r<s;r++)if(a[r]!==n[r])return!1;return!0}const mN=[...th].reverse(),pN=th.length;function gN(n){return a=>Promise.all(a.map(({animation:s,options:r})=>d5(n,s,r)))}function vN(n){let a=gN(n),s=m0(),r=!0,u=!1;const d=g=>(x,y)=>{var T;const S=Ja(n,y,g==="exit"?(T=n.presenceContext)==null?void 0:T.custom:void 0);if(S){const{transition:j,transitionEnd:E,...D}=S;x={...x,...D,...E}}return x};function h(g){a=g(n)}function p(g){const{props:x}=n,y=pb(n.parent)||{},S=[],T=new Set;let j={},E=1/0;for(let R=0;R<pN;R++){const M=mN[R],V=s[M],z=x[M]!==void 0?x[M]:y[M],U=yl(z),P=M===g?V.isActive:null;P===!1&&(E=R);let F=z===y[M]&&z!==x[M]&&U;if(F&&(r||u)&&n.manuallyAnimateOnMount&&(F=!1),V.protectedKeys={...j},!V.isActive&&P===null||!z&&!V.prevProp||Ho(z)||typeof z=="boolean")continue;if(M==="exit"&&V.isActive&&P!==!0){V.prevResolvedValues&&(j={...j,...V.prevResolvedValues});continue}const W=xN(V.prevProp,z);let re=W||M===g&&V.isActive&&!F&&U||R>E&&U,B=!1;const Z=Array.isArray(z)?z:[z];let ie=Z.reduce(d(M),{});P===!1&&(ie={});const{prevResolvedValues:le={}}=V,Se={...le,...ie},De=J=>{re=!0,T.has(J)&&(B=!0,T.delete(J)),V.needsAnimating[J]=!0;const oe=n.getValue(J);oe&&(oe.liveStyle=!1)};for(const J in Se){const oe=ie[J],me=le[J];if(j.hasOwnProperty(J))continue;let A=!1;dd(oe)&&dd(me)?A=!gb(oe,me):A=oe!==me,A?oe!=null?De(J):T.add(J):oe!==void 0&&T.has(J)?De(J):V.protectedKeys[J]=!0}V.prevProp=z,V.prevResolvedValues=ie,V.isActive&&(j={...j,...ie}),(r||u)&&n.blockInitialAnimation&&(re=!1);const $=F&&W;re&&(!$||B)&&S.push(...Z.map(J=>{const oe={type:M};if(typeof J=="string"&&(r||u)&&!$&&n.manuallyAnimateOnMount&&n.parent){const{parent:me}=n,A=Ja(me,J);if(me.enteringChildren&&A){const{delayChildren:G}=A.transition||{};oe.delay=Uy(me.enteringChildren,n,G)}}return{animation:J,options:oe}}))}if(T.size){const R={};if(typeof x.initial!="boolean"){const M=Ja(n,Array.isArray(x.initial)?x.initial[0]:x.initial);M&&M.transition&&(R.transition=M.transition)}T.forEach(M=>{const V=n.getBaseTarget(M),z=n.getValue(M);z&&(z.liveStyle=!0),R[M]=V??null}),S.push({animation:R})}let D=!!S.length;return r&&(x.initial===!1||x.initial===x.animate)&&!n.manuallyAnimateOnMount&&(D=!1),r=!1,u=!1,D?a(S):Promise.resolve()}function m(g,x){var S;if(s[g].isActive===x)return Promise.resolve();(S=n.variantChildren)==null||S.forEach(T=>{var j;return(j=T.animationState)==null?void 0:j.setActive(g,x)}),s[g].isActive=x;const y=p(g);for(const T in s)s[T].protectedKeys={};return y}return{animateChanges:p,setActive:m,setAnimateFunction:h,getState:()=>s,reset:()=>{s=m0(),u=!0}}}function xN(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!gb(a,n):!1}function $a(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function m0(){return{animate:$a(!0),whileInView:$a(),whileHover:$a(),whileTap:$a(),whileDrag:$a(),whileFocus:$a(),exit:$a()}}function Sd(n,a){n.min=a.min,n.max=a.max}function tn(n,a){Sd(n.x,a.x),Sd(n.y,a.y)}function p0(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}const vb=1e-4,yN=1-vb,bN=1+vb,xb=.01,SN=0-xb,wN=0+xb;function xt(n){return n.max-n.min}function TN(n,a,s){return Math.abs(n-a)<=s}function g0(n,a,s,r=.5){n.origin=r,n.originPoint=He(a.min,a.max,n.origin),n.scale=xt(s)/xt(a),n.translate=He(s.min,s.max,n.origin)-n.originPoint,(n.scale>=yN&&n.scale<=bN||isNaN(n.scale))&&(n.scale=1),(n.translate>=SN&&n.translate<=wN||isNaN(n.translate))&&(n.translate=0)}function hl(n,a,s,r){g0(n.x,a.x,s.x,r?r.originX:void 0),g0(n.y,a.y,s.y,r?r.originY:void 0)}function v0(n,a,s,r=0){const u=r?He(s.min,s.max,r):s.min;n.min=u+a.min,n.max=n.min+xt(a)}function jN(n,a,s,r){v0(n.x,a.x,s.x,r==null?void 0:r.x),v0(n.y,a.y,s.y,r==null?void 0:r.y)}function x0(n,a,s,r=0){const u=r?He(s.min,s.max,r):s.min;n.min=a.min-u,n.max=n.min+xt(a)}function Ao(n,a,s,r){x0(n.x,a.x,s.x,r==null?void 0:r.x),x0(n.y,a.y,s.y,r==null?void 0:r.y)}function y0(n,a,s,r,u){return n-=a,n=No(n,1/s,r),u!==void 0&&(n=No(n,1/u,r)),n}function EN(n,a=0,s=1,r=.5,u,d=n,h=n){if(mn.test(a)&&(a=parseFloat(a),a=He(h.min,h.max,a/100)-h.min),typeof a!="number")return;let p=He(d.min,d.max,r);n===d&&(p-=a),n.min=y0(n.min,a,s,p,u),n.max=y0(n.max,a,s,p,u)}function b0(n,a,[s,r,u],d,h){EN(n,a[s],a[r],a[u],a.scale,d,h)}const NN=["x","scaleX","originX"],AN=["y","scaleY","originY"];function S0(n,a,s,r){b0(n.x,a,NN,s?s.x:void 0,r?r.x:void 0),b0(n.y,a,AN,s?s.y:void 0,r?r.y:void 0)}function w0(n){return n.translate===0&&n.scale===1}function yb(n){return w0(n.x)&&w0(n.y)}function T0(n,a){return n.min===a.min&&n.max===a.max}function CN(n,a){return T0(n.x,a.x)&&T0(n.y,a.y)}function j0(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function bb(n,a){return j0(n.x,a.x)&&j0(n.y,a.y)}function E0(n){return xt(n.x)/xt(n.y)}function N0(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function fn(n){return[n("x"),n("y")]}function MN(n,a,s){let r="";const u=n.x.translate/a.x,d=n.y.translate/a.y,h=(s==null?void 0:s.z)||0;if((u||d||h)&&(r=`translate3d(${u}px, ${d}px, ${h}px) `),(a.x!==1||a.y!==1)&&(r+=`scale(${1/a.x}, ${1/a.y}) `),s){const{transformPerspective:g,rotate:x,rotateX:y,rotateY:S,skewX:T,skewY:j}=s;g&&(r=`perspective(${g}px) ${r}`),x&&(r+=`rotate(${x}deg) `),y&&(r+=`rotateX(${y}deg) `),S&&(r+=`rotateY(${S}deg) `),T&&(r+=`skewX(${T}deg) `),j&&(r+=`skewY(${j}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(r+=`scale(${p}, ${m})`),r||"none"}const Sb=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],DN=Sb.length,A0=n=>typeof n=="string"?parseFloat(n):n,C0=n=>typeof n=="number"||te.test(n);function ON(n,a,s,r,u,d){u?(n.opacity=He(0,s.opacity??1,RN(r)),n.opacityExit=He(a.opacity??1,0,zN(r))):d&&(n.opacity=He(a.opacity??1,s.opacity??1,r));for(let h=0;h<DN;h++){const p=Sb[h];let m=M0(a,p),g=M0(s,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||C0(m)===C0(g)?(n[p]=Math.max(He(A0(m),A0(g),r),0),(mn.test(g)||mn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||s.rotate)&&(n.rotate=He(a.rotate||0,s.rotate||0,r))}function M0(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const RN=wb(0,.5,dy),zN=wb(.5,.95,Jt);function wb(n,a,s){return r=>r<n?0:r>a?1:s(vl(n,a,r))}function kN(n,a,s){const r=ft(n)?n:Qi(n);return r.start(Zd("",r,a,s)),r.animation}function bl(n,a,s,r={passive:!0}){return n.addEventListener(a,s,r),()=>n.removeEventListener(a,s)}const LN=(n,a)=>n.depth-a.depth;class VN{constructor(){this.children=[],this.isDirty=!1}add(a){Ld(this.children,a),this.isDirty=!0}remove(a){bo(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(LN),this.isDirty=!1,this.children.forEach(a)}}function _N(n,a){const s=vt.now(),r=({timestamp:u})=>{const d=u-s;d>=a&&(xa(r),n(d-a))};return ke.setup(r,!0),()=>xa(r)}function fo(n){return ft(n)?n.get():n}class UN{constructor(){this.members=[]}add(a){Ld(this.members,a);for(let s=this.members.length-1;s>=0;s--){const r=this.members[s];if(r===a||r===this.lead||r===this.prevLead)continue;const u=r.instance;(!u||u.isConnected===!1)&&!r.snapshot&&(bo(this.members,r),r.unmount())}a.scheduleRender()}remove(a){if(bo(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(a){var s;for(let r=this.members.indexOf(a)-1;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1&&((s=u.instance)==null?void 0:s.isConnected)!==!1)return this.promote(u),!0}return!1}promote(a,s){var u;const r=this.lead;if(a!==r&&(this.prevLead=r,this.lead=a,a.show(),r)){r.updateSnapshot(),a.scheduleRender();const{layoutDependency:d}=r.options,{layoutDependency:h}=a.options;(d===void 0||d!==h)&&(a.resumeFrom=r,s&&(r.preserveOpacity=!0),r.snapshot&&(a.snapshot=r.snapshot,a.snapshot.latestValues=r.animationValues||r.latestValues),(u=a.root)!=null&&u.isUpdating&&(a.isLayoutDirty=!0)),a.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(a=>{var s,r,u,d,h;(r=(s=a.options).onExitComplete)==null||r.call(s),(h=(u=a.resumingFrom)==null?void 0:(d=u.options).onExitComplete)==null||h.call(d)})}scheduleRender(){this.members.forEach(a=>a.instance&&a.scheduleRender(!1))}removeLeadSnapshot(){var a;(a=this.lead)!=null&&a.snapshot&&(this.lead.snapshot=void 0)}}const ho={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Mf=["","X","Y","Z"],BN=1e3;let HN=0;function Df(n,a,s,r){const{latestValues:u}=a;u[n]&&(s[n]=u[n],a.setStaticValue(n,0),r&&(r[n]=0))}function Tb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const s=Yy(a);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:u,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(s,"transform",ke,!(u||d))}const{parent:r}=n;r&&!r.hasCheckedOptimisedAppear&&Tb(r)}function jb({attachResizeListener:n,defaultParent:a,measureScroll:s,checkIsScrollRoot:r,resetTransform:u}){return class{constructor(h={},p=a==null?void 0:a()){this.id=HN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(YN),this.nodes.forEach(QN),this.nodes.forEach(PN),this.nodes.forEach(GN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=h,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new VN)}addEventListener(h,p){return this.eventHandlers.has(h)||this.eventHandlers.set(h,new _d),this.eventHandlers.get(h).add(p)}notifyListeners(h,...p){const m=this.eventHandlers.get(h);m&&m.notify(...p)}hasListeners(h){return this.eventHandlers.has(h)}mount(h){if(this.instance)return;this.isSVG=eh(h)&&!q5(h),this.instance=h;const{layoutId:p,layout:m,visualElement:g}=this.options;if(g&&!g.current&&g.mount(h),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||p)&&(this.isLayoutDirty=!0),n){let x,y=0;const S=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{y=window.innerWidth}),n(h,()=>{const T=window.innerWidth;T!==y&&(y=T,this.root.updateBlockedByResize=!0,x&&x(),x=_N(S,250),ho.hasAnimatedSinceResize&&(ho.hasAnimatedSinceResize=!1,this.nodes.forEach(R0)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&g&&(p||m)&&this.addEventListener("didUpdate",({delta:x,hasLayoutChanged:y,hasRelativeLayoutChanged:S,layout:T})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||g.getDefaultTransition()||tA,{onLayoutAnimationStart:E,onLayoutAnimationComplete:D}=g.getProps(),R=!this.targetLayout||!bb(this.targetLayout,T),M=!y&&S;if(this.options.layoutRoot||this.resumeFrom||M||y&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const V={...Fd(j,"layout"),onPlay:E,onComplete:D};(g.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V),this.setAnimationOrigin(x,M)}else y||R0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=T})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const h=this.getStack();h&&h.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(JN),this.animationId++)}getTransformTemplate(){const{visualElement:h}=this.options;return h&&h.getProps().transformTemplate}willUpdate(h=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Tb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let x=0;x<this.path.length;x++){const y=this.path[x];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),h&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const m=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),m&&this.nodes.forEach(KN),this.nodes.forEach(D0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(O0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(FN),this.nodes.forEach(ZN),this.nodes.forEach($N),this.nodes.forEach(qN)):this.nodes.forEach(O0),this.clearAllSnapshots();const p=vt.now();ct.delta=pn(0,1e3/60,p-ct.timestamp),ct.timestamp=p,ct.isProcessing=!0,Sf.update.process(ct),Sf.preRender.process(ct),Sf.render.process(ct),ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(XN),this.sharedNodes.forEach(WN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const h=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=nt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,h?h.layoutBox:void 0)}updateScroll(h="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===h&&(p=!1),p&&this.instance){const m=r(this.instance);this.scroll={animationId:this.root.animationId,phase:h,isRoot:m,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!u)return;const h=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!yb(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,x=g!==this.prevTransformTemplateValue;h&&this.instance&&(p||Ya(this.latestValues)||x)&&(u(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(h=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return h&&(m=this.removeTransform(m)),nA(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var g;const{visualElement:h}=this.options;if(!h)return nt();const p=h.measureViewportBox();if(!(((g=this.scroll)==null?void 0:g.wasRoot)||this.path.some(aA))){const{scroll:x}=this.root;x&&(dn(p.x,x.offset.x),dn(p.y,x.offset.y))}return p}removeElementScroll(h){var m;const p=nt();if(tn(p,h),(m=this.scroll)!=null&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const x=this.path[g],{scroll:y,options:S}=x;x!==this.root&&y&&S.layoutScroll&&(y.wasRoot&&tn(p,h),dn(p.x,y.offset.x),dn(p.y,y.offset.y))}return p}applyTransform(h,p=!1,m){var x,y;const g=m||nt();tn(g,h);for(let S=0;S<this.path.length;S++){const T=this.path[S];!p&&T.options.layoutScroll&&T.scroll&&T!==T.root&&(dn(g.x,-T.scroll.offset.x),dn(g.y,-T.scroll.offset.y)),Ya(T.latestValues)&&co(g,T.latestValues,(x=T.layout)==null?void 0:x.layoutBox)}return Ya(this.latestValues)&&co(g,this.latestValues,(y=this.layout)==null?void 0:y.layoutBox),g}removeTransform(h){var m;const p=nt();tn(p,h);for(let g=0;g<this.path.length;g++){const x=this.path[g];if(!Ya(x.latestValues))continue;let y;x.instance&&(xd(x.latestValues)&&x.updateSnapshot(),y=nt(),tn(y,x.measurePageBox())),S0(p,x.latestValues,(m=x.snapshot)==null?void 0:m.layoutBox,y)}return Ya(this.latestValues)&&S0(p,this.latestValues),p}setTargetDelta(h){this.targetDelta=h,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(h){this.options={...this.options,...h,crossfade:h.crossfade!==void 0?h.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(h=!1){var T;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(h||m&&this.isSharedProjectionDirty||this.isProjectionDirty||(T=this.parent)!=null&&T.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:x,layoutId:y}=this.options;if(!this.layout||!(x||y))return;this.resolvedRelativeTargetAt=ct.timestamp;const S=this.getClosestProjectingParent();S&&this.linkedParentVersion!==S.layoutVersion&&!S.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&S&&S.layout?this.createRelativeTarget(S,this.layout.layoutBox,S.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=nt(),this.targetWithTransforms=nt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),jN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):tn(this.target,this.layout.layoutBox),rb(this.target,this.targetDelta)):tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?this.createRelativeTarget(S,this.target,S.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||xd(this.parent.latestValues)||lb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(h,p,m){this.relativeParent=h,this.linkedParentVersion=h.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=nt(),this.relativeTargetOrigin=nt(),Ao(this.relativeTargetOrigin,p,m,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var j;const h=this.getLead(),p=!!this.resumingFrom||this!==h;let m=!0;if((this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===ct.timestamp&&(m=!1),m)return;const{layout:g,layoutId:x}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||x))return;tn(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,S=this.treeScale.y;I5(this.layoutCorrected,this.treeScale,this.path,p),h.layout&&!h.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(h.target=h.layout.layoutBox,h.targetWithTransforms=nt());const{target:T}=h;if(!T){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(p0(this.prevProjectionDelta.x,this.projectionDelta.x),p0(this.prevProjectionDelta.y,this.projectionDelta.y)),hl(this.projectionDelta,this.layoutCorrected,T,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==S||!N0(this.projectionDelta.x,this.prevProjectionDelta.x)||!N0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",T))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(h=!0){var p;if((p=this.options.visualElement)==null||p.scheduleRender(),h){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gi(),this.projectionDelta=Gi(),this.projectionDeltaWithTransform=Gi()}setAnimationOrigin(h,p=!1){const m=this.snapshot,g=m?m.latestValues:{},x={...this.latestValues},y=Gi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const S=nt(),T=m?m.source:void 0,j=this.layout?this.layout.source:void 0,E=T!==j,D=this.getStack(),R=!D||D.members.length<=1,M=!!(E&&!R&&this.options.crossfade===!0&&!this.path.some(eA));this.animationProgress=0;let V;this.mixTargetDelta=z=>{const U=z/1e3;z0(y.x,h.x,U),z0(y.y,h.y,U),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ao(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),IN(this.relativeTarget,this.relativeTargetOrigin,S,U),V&&CN(this.relativeTarget,V)&&(this.isProjectionDirty=!1),V||(V=nt()),tn(V,this.relativeTarget)),E&&(this.animationValues=x,ON(x,g,this.latestValues,U,M,R)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=U},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(h){var p,m,g;this.notifyListeners("animationStart"),(p=this.currentAnimation)==null||p.stop(),(g=(m=this.resumingFrom)==null?void 0:m.currentAnimation)==null||g.stop(),this.pendingAnimation&&(xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{ho.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=kN(this.motionValue,[0,1e3],{...h,velocity:0,isSync:!0,onUpdate:x=>{this.mixTargetDelta(x),h.onUpdate&&h.onUpdate(x)},onStop:()=>{},onComplete:()=>{h.onComplete&&h.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const h=this.getStack();h&&h.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(BN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const h=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:x}=h;if(!(!p||!m||!g)){if(this!==h&&this.layout&&g&&Eb(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||nt();const y=xt(this.layout.layoutBox.x);m.x.min=h.target.x.min,m.x.max=m.x.min+y;const S=xt(this.layout.layoutBox.y);m.y.min=h.target.y.min,m.y.max=m.y.min+S}tn(p,m),co(p,x),hl(this.projectionDeltaWithTransform,this.layoutCorrected,p,x)}}registerSharedNode(h,p){this.sharedNodes.has(h)||this.sharedNodes.set(h,new UN),this.sharedNodes.get(h).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const h=this.getStack();return h?h.lead===this:!0}getLead(){var p;const{layoutId:h}=this.options;return h?((p=this.getStack())==null?void 0:p.lead)||this:this}getPrevLead(){var p;const{layoutId:h}=this.options;return h?(p=this.getStack())==null?void 0:p.prevLead:void 0}getStack(){const{layoutId:h}=this.options;if(h)return this.root.sharedNodes.get(h)}promote({needsReset:h,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),h&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const h=this.getStack();return h?h.relegate(this):!1}resetSkewAndRotation(){const{visualElement:h}=this.options;if(!h)return;let p=!1;const{latestValues:m}=h;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Df("z",h,g,this.animationValues);for(let x=0;x<Mf.length;x++)Df(`rotate${Mf[x]}`,h,g,this.animationValues),Df(`skew${Mf[x]}`,h,g,this.animationValues);h.render();for(const x in g)h.setStaticValue(x,g[x]),this.animationValues&&(this.animationValues[x]=g[x]);h.scheduleRender()}applyProjectionStyles(h,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){h.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,h.visibility="",h.opacity="",h.pointerEvents=fo(p==null?void 0:p.pointerEvents)||"",h.transform=m?m(this.latestValues,""):"none";return}const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=fo(p==null?void 0:p.pointerEvents)||""),this.hasProjected&&!Ya(this.latestValues)&&(h.transform=m?m({},""):"none",this.hasProjected=!1);return}h.visibility="";const x=g.animationValues||g.latestValues;this.applyTransformsToTarget();let y=MN(this.projectionDeltaWithTransform,this.treeScale,x);m&&(y=m(x,y)),h.transform=y;const{x:S,y:T}=this.projectionDelta;h.transformOrigin=`${S.origin*100}% ${T.origin*100}% 0`,g.animationValues?h.opacity=g===this?x.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:h.opacity=g===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const j in bd){if(x[j]===void 0)continue;const{correct:E,applyTo:D,isCSSVariable:R}=bd[j],M=y==="none"?x[j]:E(x[j],g);if(D){const V=D.length;for(let z=0;z<V;z++)h[D[z]]=M}else R?this.options.visualElement.renderState.vars[j]=M:h[j]=M}this.options.layoutId&&(h.pointerEvents=g===this?fo(p==null?void 0:p.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(h=>{var p;return(p=h.currentAnimation)==null?void 0:p.stop()}),this.root.nodes.forEach(D0),this.root.sharedNodes.clear()}}}function $N(n){n.updateLayout()}function qN(n){var s;const a=((s=n.resumeFrom)==null?void 0:s.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:u}=n.layout,{animationType:d}=n.options,h=a.source!==n.layout.source;if(d==="size")fn(y=>{const S=h?a.measuredBox[y]:a.layoutBox[y],T=xt(S);S.min=r[y].min,S.max=S.min+T});else if(d==="x"||d==="y"){const y=d==="x"?"y":"x";Sd(h?a.measuredBox[y]:a.layoutBox[y],r[y])}else Eb(d,a.layoutBox,r)&&fn(y=>{const S=h?a.measuredBox[y]:a.layoutBox[y],T=xt(r[y]);S.max=S.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[y].max=n.relativeTarget[y].min+T)});const p=Gi();hl(p,r,a.layoutBox);const m=Gi();h?hl(m,n.applyTransform(u,!0),a.measuredBox):hl(m,r,a.layoutBox);const g=!yb(p);let x=!1;if(!n.resumeFrom){const y=n.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:S,layout:T}=y;if(S&&T){const j=n.options.layoutAnchor||void 0,E=nt();Ao(E,a.layoutBox,S.layoutBox,j);const D=nt();Ao(D,r,T.layoutBox,j),bb(E,D)||(x=!0),y.options.layoutRoot&&(n.relativeTarget=D,n.relativeTargetOrigin=E,n.relativeParent=y)}}}n.notifyListeners("didUpdate",{layout:r,snapshot:a,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeLayoutChanged:x})}else if(n.isLead()){const{onExitComplete:r}=n.options;r&&r()}n.options.transition=void 0}function YN(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function GN(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function XN(n){n.clearSnapshot()}function D0(n){n.clearMeasurements()}function KN(n){n.isLayoutDirty=!0,n.updateLayout()}function O0(n){n.isLayoutDirty=!1}function FN(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function ZN(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function R0(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function QN(n){n.resolveTargetDelta()}function PN(n){n.calcProjection()}function JN(n){n.resetSkewAndRotation()}function WN(n){n.removeLeadSnapshot()}function z0(n,a,s){n.translate=He(a.translate,0,s),n.scale=He(a.scale,1,s),n.origin=a.origin,n.originPoint=a.originPoint}function k0(n,a,s,r){n.min=He(a.min,s.min,r),n.max=He(a.max,s.max,r)}function IN(n,a,s,r){k0(n.x,a.x,s.x,r),k0(n.y,a.y,s.y,r)}function eA(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const tA={duration:.45,ease:[.4,0,.1,1]},L0=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),V0=L0("applewebkit/")&&!L0("chrome/")?Math.round:Jt;function _0(n){n.min=V0(n.min),n.max=V0(n.max)}function nA(n){_0(n.x),_0(n.y)}function Eb(n,a,s){return n==="position"||n==="preserve-aspect"&&!TN(E0(a),E0(s),.2)}function aA(n){var a;return n!==n.root&&((a=n.scroll)==null?void 0:a.wasRoot)}const iA=jb({attachResizeListener:(n,a)=>bl(n,"resize",a),measureScroll:()=>{var n,a;return{x:document.documentElement.scrollLeft||((n=document.body)==null?void 0:n.scrollLeft)||0,y:document.documentElement.scrollTop||((a=document.body)==null?void 0:a.scrollTop)||0}},checkIsScrollRoot:()=>!0}),sA=n=>!n.isLayoutDirty&&n.willUpdate(!1);function U0(){const n=new Set,a=new WeakMap,s=()=>n.forEach(sA);return{add:r=>{n.add(r),a.set(r,r.addEventListener("willUpdate",s))},remove:r=>{n.delete(r);const u=a.get(r);u&&(u(),a.delete(r)),s()},dirty:s}}const Of={current:void 0},Nb=jb({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Of.current){const n=new iA({});n.mount(window),n.setOptions({layoutScroll:!0}),Of.current=n}return Of.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),Ab=w.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function lA(n=!0){const a=w.useContext(kd);if(a===null)return[!0,null];const{isPresent:s,onExitComplete:r,register:u}=a,d=w.useId();w.useEffect(()=>{if(n)return u(d)},[n]);const h=w.useCallback(()=>n&&r&&r(d),[d,r,n]);return!s&&r?[!1,h]:[!0]}const rA=w.createContext(null);function oA(){const n=w.useRef(!1);return ey(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function uA(){const n=oA(),[a,s]=w.useState(0),r=w.useCallback(()=>{n.current&&s(a+1)},[a]);return[w.useCallback(()=>ke.postRender(r),[r]),a]}const Cb=n=>n===!0,cA=n=>Cb(n===!0)||n==="id",Mb=({children:n,id:a,inherit:s=!0})=>{const r=w.useContext(yo),u=w.useContext(rA),[d,h]=uA(),p=w.useRef(null),m=r.id||u;p.current===null&&(cA(s)&&m&&(a=a?m+"-"+a:m),p.current={id:a,group:Cb(s)&&r.group||U0()});const g=w.useMemo(()=>({...p.current,forceRender:d}),[h]);return f.jsx(yo.Provider,{value:g,children:n})},Db=w.createContext({strict:!1}),B0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let H0=!1;function fA(){if(H0)return;const n={};for(const a in B0)n[a]={isEnabled:s=>B0[a].some(r=>!!s[r])};ab(n),H0=!0}function Ob(){return fA(),Q5()}function dA(n){const a=Ob();for(const s in n)a[s]={...a[s],...n[s]};ab(a)}const hA=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Co(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||hA.has(n)}let Rb=n=>!Co(n);function mA(n){typeof n=="function"&&(Rb=a=>a.startsWith("on")?!Co(a):n(a))}try{mA(require("@emotion/is-prop-valid").default)}catch{}function pA(n,a,s){const r={};for(const u in n)u==="values"&&typeof n.values=="object"||ft(n[u])||(Rb(u)||s===!0&&Co(u)||!a&&!Co(u)||n.draggable&&u.startsWith("onDrag"))&&(r[u]=n[u]);return r}const qo=w.createContext({});function gA(n,a){if($o(n)){const{initial:s,animate:r}=n;return{initial:s===!1||yl(s)?s:void 0,animate:yl(r)?r:void 0}}return n.inherit!==!1?a:{}}function vA(n){const{initial:a,animate:s}=gA(n,w.useContext(qo));return w.useMemo(()=>({initial:a,animate:s}),[$0(a),$0(s)])}function $0(n){return Array.isArray(n)?n.join(" "):n}const sh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zb(n,a,s){for(const r in a)!ft(a[r])&&!cb(r,s)&&(n[r]=a[r])}function xA({transformTemplate:n},a){return w.useMemo(()=>{const s=sh();return ah(s,a,n),Object.assign({},s.vars,s.style)},[a])}function yA(n,a){const s=n.style||{},r={};return zb(r,s,n),Object.assign(r,xA(n,a)),r}function bA(n,a){const s={},r=yA(n,a);return n.drag&&n.dragListener!==!1&&(s.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(s.tabIndex=0),s.style=r,s}const kb=()=>({...sh(),attrs:{}});function SA(n,a,s,r){const u=w.useMemo(()=>{const d=kb();return fb(d,a,hb(r),n.transformTemplate,n.style),{...d.attrs,style:{...d.style}}},[a]);if(n.style){const d={};zb(d,n.style,n),u.style={...d,...u.style}}return u}const wA=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function lh(n){return typeof n!="string"||n.includes("-")?!1:!!(wA.indexOf(n)>-1||/[A-Z]/u.test(n))}function TA(n,a,s,{latestValues:r},u,d=!1,h){const m=(h??lh(n)?SA:bA)(a,r,u,n),g=pA(a,typeof n=="string",d),x=n!==w.Fragment?{...g,...m,ref:s}:{},{children:y}=a,S=w.useMemo(()=>ft(y)?y.get():y,[y]);return w.createElement(n,{...x,children:S})}function jA({scrapeMotionValuesFromProps:n,createRenderState:a},s,r,u){return{latestValues:EA(s,r,u,n),renderState:a()}}function EA(n,a,s,r){const u={},d=r(n,{});for(const S in d)u[S]=fo(d[S]);let{initial:h,animate:p}=n;const m=$o(n),g=tb(n);a&&g&&!m&&n.inherit!==!1&&(h===void 0&&(h=a.initial),p===void 0&&(p=a.animate));let x=s?s.initial===!1:!1;x=x||h===!1;const y=x?p:h;if(y&&typeof y!="boolean"&&!Ho(y)){const S=Array.isArray(y)?y:[y];for(let T=0;T<S.length;T++){const j=Qd(n,S[T]);if(j){const{transitionEnd:E,transition:D,...R}=j;for(const M in R){let V=R[M];if(Array.isArray(V)){const z=x?V.length-1:0;V=V[z]}V!==null&&(u[M]=V)}for(const M in E)u[M]=E[M]}}}return u}const Lb=n=>(a,s)=>{const r=w.useContext(qo),u=w.useContext(kd),d=()=>jA(n,a,r,u);return s?d():xj(d)},NA=Lb({scrapeMotionValuesFromProps:ih,createRenderState:sh}),AA=Lb({scrapeMotionValuesFromProps:mb,createRenderState:kb}),CA=Symbol.for("motionComponentSymbol");function MA(n,a,s){const r=w.useRef(s);w.useInsertionEffect(()=>{r.current=s});const u=w.useRef(null);return w.useCallback(d=>{var p;d&&((p=n.onMount)==null||p.call(n,d));const h=r.current;if(typeof h=="function")if(d){const m=h(d);typeof m=="function"&&(u.current=m)}else u.current?(u.current(),u.current=null):h(d);else h&&(h.current=d);a&&(d?a.mount(d):a.unmount())},[a])}const Vb=w.createContext({});function $i(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function DA(n,a,s,r,u,d){var V,z;const{visualElement:h}=w.useContext(qo),p=w.useContext(Db),m=w.useContext(kd),g=w.useContext(Ab),x=g.reducedMotion,y=g.skipAnimations,S=w.useRef(null),T=w.useRef(!1);r=r||p.renderer,!S.current&&r&&(S.current=r(n,{visualState:a,parent:h,props:s,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:x,skipAnimations:y,isSVG:d}),T.current&&S.current&&(S.current.manuallyAnimateOnMount=!0));const j=S.current,E=w.useContext(Vb);j&&!j.projection&&u&&(j.type==="html"||j.type==="svg")&&OA(S.current,s,u,E);const D=w.useRef(!1);w.useInsertionEffect(()=>{j&&D.current&&j.update(s,m)});const R=s[qy],M=w.useRef(!!R&&typeof window<"u"&&!((V=window.MotionHandoffIsComplete)!=null&&V.call(window,R))&&((z=window.MotionHasOptimisedAnimation)==null?void 0:z.call(window,R)));return ey(()=>{T.current=!0,j&&(D.current=!0,window.MotionIsMounted=!0,j.updateFeatures(),j.scheduleRenderMicrotask(),M.current&&j.animationState&&j.animationState.animateChanges())}),w.useEffect(()=>{j&&(!M.current&&j.animationState&&j.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{var U;(U=window.MotionHandoffMarkAsComplete)==null||U.call(window,R)}),M.current=!1),j.enteringChildren=void 0)}),j}function OA(n,a,s,r){const{layoutId:u,layout:d,drag:h,dragConstraints:p,layoutScroll:m,layoutRoot:g,layoutAnchor:x,layoutCrossfade:y}=a;n.projection=new s(n.latestValues,a["data-framer-portal-id"]?void 0:_b(n.parent)),n.projection.setOptions({layoutId:u,layout:d,alwaysMeasureLayout:!!h||p&&$i(p),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:r,crossfade:y,layoutScroll:m,layoutRoot:g,layoutAnchor:x})}function _b(n){if(n)return n.options.allowProjection!==!1?n.projection:_b(n.parent)}function Rf(n,{forwardMotionProps:a=!1,type:s}={},r,u){r&&dA(r);const d=s?s==="svg":lh(n),h=d?AA:NA;function p(g,x){let y;const S={...w.useContext(Ab),...g,layoutId:RA(g)},{isStatic:T}=S,j=vA(g),E=h(g,T);if(!T&&typeof window<"u"){zA();const D=kA(S);y=D.MeasureLayout,j.visualElement=DA(n,E,S,u,D.ProjectionNode,d)}return f.jsxs(qo.Provider,{value:j,children:[y&&j.visualElement?f.jsx(y,{visualElement:j.visualElement,...S}):null,TA(n,g,MA(E,j.visualElement,x),E,T,a,d)]})}p.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=w.forwardRef(p);return m[CA]=n,m}function RA({layoutId:n}){const a=w.useContext(yo).id;return a&&n!==void 0?a+"-"+n:n}function zA(n,a){w.useContext(Db).strict}function kA(n){const a=Ob(),{drag:s,layout:r}=a;if(!s&&!r)return{};const u={...s,...r};return{MeasureLayout:s!=null&&s.isEnabled(n)||r!=null&&r.isEnabled(n)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function LA(n,a){if(typeof Proxy>"u")return Rf;const s=new Map,r=(d,h)=>Rf(d,h,n,a),u=(d,h)=>r(d,h);return new Proxy(u,{get:(d,h)=>h==="create"?r:(s.has(h)||s.set(h,Rf(h,void 0,n,a)),s.get(h))})}const VA=(n,a)=>a.isSVG??lh(n)?new dN(a):new lN(a,{allowProjection:n!==w.Fragment});class _A extends Sa{constructor(a){super(a),a.animationState||(a.animationState=vN(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();Ho(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:s}=this.node.prevProps||{};a!==s&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)==null||a.call(this)}}let UA=0;class BA extends Sa{constructor(){super(...arguments),this.id=UA++,this.isExitComplete=!1}update(){var d;if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:s}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===r)return;if(a&&r===!1){if(this.isExitComplete){const{initial:h,custom:p}=this.node.getProps();if(typeof h=="string"){const m=Ja(this.node,h,p);if(m){const{transition:g,transitionEnd:x,...y}=m;for(const S in y)(d=this.node.getValue(S))==null||d.jump(y[S])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const u=this.node.animationState.setActive("exit",!a);s&&!a&&u.then(()=>{this.isExitComplete=!0,s(this.id)})}mount(){const{register:a,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const HA={animation:{Feature:_A},exit:{Feature:BA}};function Cl(n){return{point:{x:n.pageX,y:n.pageY}}}const $A=n=>a=>Id(a)&&n(a,Cl(a));function ml(n,a,s,r){return bl(n,a,$A(s),r)}const Ub=({current:n})=>n?n.ownerDocument.defaultView:null,q0=(n,a)=>Math.abs(n-a);function qA(n,a){const s=q0(n.x,a.x),r=q0(n.y,a.y);return Math.sqrt(s**2+r**2)}const Y0=new Set(["auto","scroll"]);class Bb{constructor(a,s,{transformPagePoint:r,contextWindow:u=window,dragSnapToOrigin:d=!1,distanceThreshold:h=3,element:p}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=T=>{this.handleScroll(T.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=eo(this.lastRawMoveEventInfo,this.transformPagePoint));const T=zf(this.lastMoveEventInfo,this.history),j=this.startEvent!==null,E=qA(T.offset,{x:0,y:0})>=this.distanceThreshold;if(!j&&!E)return;const{point:D}=T,{timestamp:R}=ct;this.history.push({...D,timestamp:R});const{onStart:M,onMove:V}=this.handlers;j||(M&&M(this.lastMoveEvent,T),this.startEvent=this.lastMoveEvent),V&&V(this.lastMoveEvent,T)},this.handlePointerMove=(T,j)=>{this.lastMoveEvent=T,this.lastRawMoveEventInfo=j,this.lastMoveEventInfo=eo(j,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(T,j)=>{this.end();const{onEnd:E,onSessionEnd:D,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=zf(T.type==="pointercancel"?this.lastMoveEventInfo:eo(j,this.transformPagePoint),this.history);this.startEvent&&E&&E(T,M),D&&D(T,M)},!Id(a))return;this.dragSnapToOrigin=d,this.handlers=s,this.transformPagePoint=r,this.distanceThreshold=h,this.contextWindow=u||window;const m=Cl(a),g=eo(m,this.transformPagePoint),{point:x}=g,{timestamp:y}=ct;this.history=[{...x,timestamp:y}];const{onSessionStart:S}=s;S&&S(a,zf(g,this.history)),this.removeListeners=El(ml(this.contextWindow,"pointermove",this.handlePointerMove),ml(this.contextWindow,"pointerup",this.handlePointerUp),ml(this.contextWindow,"pointercancel",this.handlePointerUp)),p&&this.startScrollTracking(p)}startScrollTracking(a){let s=a.parentElement;for(;s;){const r=getComputedStyle(s);(Y0.has(r.overflowX)||Y0.has(r.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(a){const s=this.scrollPositions.get(a);if(!s)return;const r=a===window,u=r?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},d={x:u.x-s.x,y:u.y-s.y};d.x===0&&d.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=d.x,this.lastMoveEventInfo.point.y+=d.y):this.history.length>0&&(this.history[0].x-=d.x,this.history[0].y-=d.y),this.scrollPositions.set(a,u),ke.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),xa(this.updatePoint)}}function eo(n,a){return a?{point:a(n.point)}:n}function G0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function zf({point:n},a){return{point:n,delta:G0(n,Hb(a)),offset:G0(n,YA(a)),velocity:GA(a,.1)}}function YA(n){return n[0]}function Hb(n){return n[n.length-1]}function GA(n,a){if(n.length<2)return{x:0,y:0};let s=n.length-1,r=null;const u=Hb(n);for(;s>=0&&(r=n[s],!(u.timestamp-r.timestamp>Ut(a)));)s--;if(!r)return{x:0,y:0};r===n[0]&&n.length>2&&u.timestamp-r.timestamp>Ut(a)*2&&(r=n[1]);const d=Pt(u.timestamp-r.timestamp);if(d===0)return{x:0,y:0};const h={x:(u.x-r.x)/d,y:(u.y-r.y)/d};return h.x===1/0&&(h.x=0),h.y===1/0&&(h.y=0),h}function XA(n,{min:a,max:s},r){return a!==void 0&&n<a?n=r?He(a,n,r.min):Math.max(n,a):s!==void 0&&n>s&&(n=r?He(s,n,r.max):Math.min(n,s)),n}function X0(n,a,s){return{min:a!==void 0?n.min+a:void 0,max:s!==void 0?n.max+s-(n.max-n.min):void 0}}function KA(n,{top:a,left:s,bottom:r,right:u}){return{x:X0(n.x,s,u),y:X0(n.y,a,r)}}function K0(n,a){let s=a.min-n.min,r=a.max-n.max;return a.max-a.min<n.max-n.min&&([s,r]=[r,s]),{min:s,max:r}}function FA(n,a){return{x:K0(n.x,a.x),y:K0(n.y,a.y)}}function ZA(n,a){let s=.5;const r=xt(n),u=xt(a);return u>r?s=vl(a.min,a.max-r,n.min):r>u&&(s=vl(n.min,n.max-u,a.min)),pn(0,1,s)}function QA(n,a){const s={};return a.min!==void 0&&(s.min=a.min-n.min),a.max!==void 0&&(s.max=a.max-n.min),s}const wd=.35;function PA(n=wd){return n===!1?n=0:n===!0&&(n=wd),{x:F0(n,"left","right"),y:F0(n,"top","bottom")}}function F0(n,a,s){return{min:Z0(n,a),max:Z0(n,s)}}function Z0(n,a){return typeof n=="number"?n:n[a]||0}const JA=new WeakMap;class WA{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:s=!1,distanceThreshold:r}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const d=y=>{s&&this.snapToCursor(Cl(y).point),this.stopAnimation()},h=(y,S)=>{const{drag:T,dragPropagation:j,onDragStart:E}=this.getProps();if(T&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=E5(T),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=S,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fn(R=>{let M=this.getAxisMotionValue(R).get()||0;if(mn.test(M)){const{projection:V}=this.visualElement;if(V&&V.layout){const z=V.layout.layoutBox[R];z&&(M=xt(z)*(parseFloat(M)/100))}}this.originPoint[R]=M}),E&&ke.update(()=>E(y,S),!1,!0),hd(this.visualElement,"transform");const{animationState:D}=this.visualElement;D&&D.setActive("whileDrag",!0)},p=(y,S)=>{this.latestPointerEvent=y,this.latestPanInfo=S;const{dragPropagation:T,dragDirectionLock:j,onDirectionLock:E,onDrag:D}=this.getProps();if(!T&&!this.openDragLock)return;const{offset:R}=S;if(j&&this.currentDirection===null){this.currentDirection=e3(R),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",S.point,R),this.updateAxis("y",S.point,R),this.visualElement.render(),D&&ke.update(()=>D(y,S),!1,!0)},m=(y,S)=>{this.latestPointerEvent=y,this.latestPanInfo=S,this.stop(y,S),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:x}=this.getProps();this.panSession=new Bb(a,{onSessionStart:d,onStart:h,onMove:p,onSessionEnd:m,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:x,distanceThreshold:r,contextWindow:Ub(this.visualElement),element:this.visualElement.current})}stop(a,s){const r=a||this.latestPointerEvent,u=s||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!u||!r)return;const{velocity:h}=u;this.startAnimation(h);const{onDragEnd:p}=this.getProps();p&&ke.postRender(()=>p(r,u))}cancel(){this.isDragging=!1;const{projection:a,animationState:s}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,s,r){const{drag:u}=this.getProps();if(!r||!to(a,u,this.currentDirection))return;const d=this.getAxisMotionValue(a);let h=this.originPoint[a]+r[a];this.constraints&&this.constraints[a]&&(h=XA(h,this.constraints[a],this.elastic[a])),d.set(h)}resolveConstraints(){var d;const{dragConstraints:a,dragElastic:s}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(d=this.visualElement.projection)==null?void 0:d.layout,u=this.constraints;a&&$i(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&r?this.constraints=KA(r.layoutBox,a):this.constraints=!1,this.elastic=PA(s),u!==this.constraints&&!$i(a)&&r&&this.constraints&&!this.hasMutatedConstraints&&fn(h=>{this.constraints!==!1&&this.getAxisMotionValue(h)&&(this.constraints[h]=QA(r.layoutBox[h],this.constraints[h]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:s}=this.getProps();if(!a||!$i(a))return!1;const r=a.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const d=eN(r,u.root,this.visualElement.getTransformPagePoint());let h=FA(u.layout.layoutBox,d);if(s){const p=s(J5(h));this.hasMutatedConstraints=!!p,p&&(h=sb(p))}return h}startAnimation(a){const{drag:s,dragMomentum:r,dragElastic:u,dragTransition:d,dragSnapToOrigin:h,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=fn(x=>{if(!to(x,s,this.currentDirection))return;let y=m&&m[x]||{};(h===!0||h===x)&&(y={min:0,max:0});const S=u?200:1e6,T=u?40:1e7,j={type:"inertia",velocity:r?a[x]:0,bounceStiffness:S,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...d,...y};return this.startAxisValueAnimation(x,j)});return Promise.all(g).then(p)}startAxisValueAnimation(a,s){const r=this.getAxisMotionValue(a);return hd(this.visualElement,a),r.start(Zd(a,r,0,s,this.visualElement,!1))}stopAnimation(){fn(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const s=`_drag${a.toUpperCase()}`,r=this.visualElement.getProps(),u=r[s];return u||this.visualElement.getValue(a,(r.initial?r.initial[a]:void 0)||0)}snapToCursor(a){fn(s=>{const{drag:r}=this.getProps();if(!to(s,r,this.currentDirection))return;const{projection:u}=this.visualElement,d=this.getAxisMotionValue(s);if(u&&u.layout){const{min:h,max:p}=u.layout.layoutBox[s],m=d.get()||0;d.set(a[s]-He(h,p,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:s}=this.getProps(),{projection:r}=this.visualElement;if(!$i(s)||!r||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};fn(h=>{const p=this.getAxisMotionValue(h);if(p&&this.constraints!==!1){const m=p.get();u[h]=ZA({min:m,max:m},this.constraints[h])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),fn(h=>{if(!to(h,a,null))return;const p=this.getAxisMotionValue(h),{min:m,max:g}=this.constraints[h];p.set(He(m,g,u[h]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;JA.set(this.visualElement,this);const a=this.visualElement.current,s=ml(a,"pointerdown",g=>{const{drag:x,dragListener:y=!0}=this.getProps(),S=g.target,T=S!==a&&O5(S);x&&y&&!T&&this.start(g)});let r;const u=()=>{const{dragConstraints:g}=this.getProps();$i(g)&&g.current&&(this.constraints=this.resolveRefConstraints(),r||(r=IA(a,g.current,()=>this.scalePositionWithinConstraints())))},{projection:d}=this.visualElement,h=d.addEventListener("measure",u);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),ke.read(u);const p=bl(window,"resize",()=>this.scalePositionWithinConstraints()),m=d.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:x})=>{this.isDragging&&x&&(fn(y=>{const S=this.getAxisMotionValue(y);S&&(this.originPoint[y]+=g[y].translate,S.set(S.get()+g[y].translate))}),this.visualElement.render())}));return()=>{p(),s(),h(),m&&m(),r&&r()}}getProps(){const a=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:r=!1,dragPropagation:u=!1,dragConstraints:d=!1,dragElastic:h=wd,dragMomentum:p=!0}=a;return{...a,drag:s,dragDirectionLock:r,dragPropagation:u,dragConstraints:d,dragElastic:h,dragMomentum:p}}}function Q0(n){let a=!0;return()=>{if(a){a=!1;return}n()}}function IA(n,a,s){const r=a0(n,Q0(s)),u=a0(a,Q0(s));return()=>{r(),u()}}function to(n,a,s){return(a===!0||a===n)&&(s===null||s===n)}function e3(n,a=10){let s=null;return Math.abs(n.y)>a?s="y":Math.abs(n.x)>a&&(s="x"),s}class t3 extends Sa{constructor(a){super(a),this.removeGroupControls=Jt,this.removeListeners=Jt,this.controls=new WA(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jt}update(){const{dragControls:a}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};a!==s&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const kf=n=>(a,s)=>{n&&ke.update(()=>n(a,s),!1,!0)};class n3 extends Sa{constructor(){super(...arguments),this.removePointerDownListener=Jt}onPointerDown(a){this.session=new Bb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ub(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:s,onPan:r,onPanEnd:u}=this.node.getProps();return{onSessionStart:kf(a),onStart:kf(s),onMove:kf(r),onEnd:(d,h)=>{delete this.session,u&&ke.postRender(()=>u(d,h))}}}mount(){this.removePointerDownListener=ml(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Lf=!1;class a3 extends w.Component{componentDidMount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:r,layoutId:u}=this.props,{projection:d}=a;d&&(s.group&&s.group.add(d),r&&r.register&&u&&r.register(d),Lf&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ho.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:s,visualElement:r,drag:u,isPresent:d}=this.props,{projection:h}=r;return h&&(h.isPresent=d,a.layoutDependency!==s&&h.setOptions({...h.options,layoutDependency:s}),Lf=!0,u||a.layoutDependency!==s||s===void 0||a.isPresent!==d?h.willUpdate():this.safeToRemove(),a.isPresent!==d&&(d?h.promote():h.relegate()||ke.postRender(()=>{const p=h.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:a,layoutAnchor:s}=this.props,{projection:r}=a;r&&(r.options.layoutAnchor=s,r.root.didUpdate(),Wd.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:r}=this.props,{projection:u}=a;Lf=!0,u&&(u.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(u),r&&r.deregister&&r.deregister(u))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function $b(n){const[a,s]=lA(),r=w.useContext(yo);return f.jsx(a3,{...n,layoutGroup:r,switchLayoutGroup:w.useContext(Vb),isPresent:a,safeToRemove:s})}const i3={pan:{Feature:n3},drag:{Feature:t3,ProjectionNode:Nb,MeasureLayout:$b}};function P0(n,a,s){const{props:r}=n;n.animationState&&r.whileHover&&n.animationState.setActive("whileHover",s==="Start");const u="onHover"+s,d=r[u];d&&ke.postRender(()=>d(a,Cl(a)))}class s3 extends Sa{mount(){const{current:a}=this.node;a&&(this.unmount=A5(a,(s,r)=>(P0(this.node,r,"Start"),u=>P0(this.node,u,"End"))))}unmount(){}}class l3 extends Sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=El(bl(this.node.current,"focus",()=>this.onFocus()),bl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function J0(n,a,s){const{props:r}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&r.whileTap&&n.animationState.setActive("whileTap",s==="Start");const u="onTap"+(s==="End"?"":s),d=r[u];d&&ke.postRender(()=>d(a,Cl(a)))}class r3 extends Sa{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:s,propagate:r}=this.node.props;this.unmount=z5(a,(u,d)=>(J0(this.node,d,"Start"),(h,{success:p})=>J0(this.node,h,p?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Td=new WeakMap,Vf=new WeakMap,o3=n=>{const a=Td.get(n.target);a&&a(n)},u3=n=>{n.forEach(o3)};function c3({root:n,...a}){const s=n||document;Vf.has(s)||Vf.set(s,{});const r=Vf.get(s),u=JSON.stringify(a);return r[u]||(r[u]=new IntersectionObserver(u3,{root:n,...a})),r[u]}function f3(n,a,s){const r=c3(a);return Td.set(n,s),r.observe(n),()=>{Td.delete(n),r.unobserve(n)}}const d3={some:0,all:1};class h3 extends Sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var m;(m=this.stopObserver)==null||m.call(this);const{viewport:a={}}=this.node.getProps(),{root:s,margin:r,amount:u="some",once:d}=a,h={root:s?s.current:void 0,rootMargin:r,threshold:typeof u=="number"?u:d3[u]},p=g=>{const{isIntersecting:x}=g;if(this.isInView===x||(this.isInView=x,d&&!x&&this.hasEnteredView))return;x&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",x);const{onViewportEnter:y,onViewportLeave:S}=this.node.getProps(),T=x?y:S;T&&T(g)};this.stopObserver=f3(this.node.current,h,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:s}=this.node;["amount","margin","root"].some(m3(a,s))&&this.startObserver()}unmount(){var a;(a=this.stopObserver)==null||a.call(this),this.hasEnteredView=!1,this.isInView=!1}}function m3({viewport:n={}},{viewport:a={}}={}){return s=>n[s]!==a[s]}const p3={inView:{Feature:h3},tap:{Feature:r3},focus:{Feature:l3},hover:{Feature:s3}},g3={layout:{ProjectionNode:Nb,MeasureLayout:$b}},v3={...HA,...p3,...i3,...g3},qb=LA(v3,VA),Yo=w.forwardRef(function(a,s){return f.jsx(kT,{children:f.jsx("a",{...a,ref:s})})}),Ws={base:["relative isolate inline-flex items-baseline justify-center gap-x-2 rounded-lg border text-base/6 font-semibold","px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)] sm:text-sm/6","focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500","data-disabled:opacity-50","*:data-[slot=icon]:-mx-0.5 *:data-[slot=icon]:my-0.5 *:data-[slot=icon]:size-5 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:self-center *:data-[slot=icon]:text-(--btn-icon) sm:*:data-[slot=icon]:my-1 sm:*:data-[slot=icon]:size-4 forced-colors:[--btn-icon:ButtonText] forced-colors:data-hover:[--btn-icon:ButtonText]"],solid:["border-transparent bg-(--btn-border)","dark:bg-(--btn-bg)","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(var(--radius-lg)-1px)] before:bg-(--btn-bg)","before:shadow-sm","dark:before:hidden","dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(var(--radius-lg)-1px)]","after:shadow-[inset_0_1px_--theme(--color-white/15%)]","data-active:after:bg-(--btn-hover-overlay) data-hover:after:bg-(--btn-hover-overlay)","dark:after:-inset-px dark:after:rounded-lg","data-disabled:before:shadow-none data-disabled:after:shadow-none"],outline:["border-zinc-950/10 text-zinc-950 data-active:bg-zinc-950/2.5 data-hover:bg-zinc-950/2.5","dark:border-white/15 dark:text-white dark:[--btn-bg:transparent] dark:data-active:bg-white/5 dark:data-hover:bg-white/5","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],plain:["border-transparent text-zinc-950 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","dark:text-white dark:data-active:bg-white/10 dark:data-hover:bg-white/10","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],colors:{"dark/zinc":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-white dark:[--btn-bg:var(--color-zinc-600)] dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],light:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:text-white dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],"dark/white":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-zinc-950 dark:[--btn-bg:white] dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],dark:["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],white:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-500)] data-hover:[--btn-icon:var(--color-zinc-500)]"],zinc:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-zinc-600)] [--btn-border:var(--color-zinc-700)]/90","dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],indigo:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-indigo-500)] [--btn-border:var(--color-indigo-600)]/90","[--btn-icon:var(--color-indigo-300)] data-active:[--btn-icon:var(--color-indigo-200)] data-hover:[--btn-icon:var(--color-indigo-200)]"],cyan:["text-cyan-950 [--btn-bg:var(--color-cyan-300)] [--btn-border:var(--color-cyan-400)]/80 [--btn-hover-overlay:var(--color-white)]/25","[--btn-icon:var(--color-cyan-500)]"],red:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-red-600)] [--btn-border:var(--color-red-700)]/90","[--btn-icon:var(--color-red-300)] data-active:[--btn-icon:var(--color-red-200)] data-hover:[--btn-icon:var(--color-red-200)]"],orange:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-orange-500)] [--btn-border:var(--color-orange-600)]/90","[--btn-icon:var(--color-orange-300)] data-active:[--btn-icon:var(--color-orange-200)] data-hover:[--btn-icon:var(--color-orange-200)]"],amber:["text-amber-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-amber-400)] [--btn-border:var(--color-amber-500)]/80","[--btn-icon:var(--color-amber-600)]"],yellow:["text-yellow-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-yellow-300)] [--btn-border:var(--color-yellow-400)]/80","[--btn-icon:var(--color-yellow-600)] data-active:[--btn-icon:var(--color-yellow-700)] data-hover:[--btn-icon:var(--color-yellow-700)]"],lime:["text-lime-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-lime-300)] [--btn-border:var(--color-lime-400)]/80","[--btn-icon:var(--color-lime-600)] data-active:[--btn-icon:var(--color-lime-700)] data-hover:[--btn-icon:var(--color-lime-700)]"],green:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-green-600)] [--btn-border:var(--color-green-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],emerald:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-emerald-600)] [--btn-border:var(--color-emerald-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],teal:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-teal-600)] [--btn-border:var(--color-teal-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],sky:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-sky-500)] [--btn-border:var(--color-sky-600)]/80","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],blue:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-blue-600)] [--btn-border:var(--color-blue-700)]/90","[--btn-icon:var(--color-blue-400)] data-active:[--btn-icon:var(--color-blue-300)] data-hover:[--btn-icon:var(--color-blue-300)]"],violet:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-violet-500)] [--btn-border:var(--color-violet-600)]/90","[--btn-icon:var(--color-violet-300)] data-active:[--btn-icon:var(--color-violet-200)] data-hover:[--btn-icon:var(--color-violet-200)]"],purple:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-purple-500)] [--btn-border:var(--color-purple-600)]/90","[--btn-icon:var(--color-purple-300)] data-active:[--btn-icon:var(--color-purple-200)] data-hover:[--btn-icon:var(--color-purple-200)]"],fuchsia:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-fuchsia-500)] [--btn-border:var(--color-fuchsia-600)]/90","[--btn-icon:var(--color-fuchsia-300)] data-active:[--btn-icon:var(--color-fuchsia-200)] data-hover:[--btn-icon:var(--color-fuchsia-200)]"],pink:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-pink-500)] [--btn-border:var(--color-pink-600)]/90","[--btn-icon:var(--color-pink-300)] data-active:[--btn-icon:var(--color-pink-200)] data-hover:[--btn-icon:var(--color-pink-200)]"],rose:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-rose-500)] [--btn-border:var(--color-rose-600)]/90","[--btn-icon:var(--color-rose-300)] data-active:[--btn-icon:var(--color-rose-200)] data-hover:[--btn-icon:var(--color-rose-200)]"]}};w.forwardRef(function({color:a,outline:s,plain:r,className:u,children:d,...h},p){let m=Fe(u,Ws.base,s?Ws.outline:r?Ws.plain:Fe(Ws.solid,Ws.colors[a??"dark/zinc"]));return typeof h.href=="string"?f.jsx(Yo,{...h,className:m,ref:p,children:f.jsx(ya,{children:d})}):f.jsx(Tl,{...h,className:Fe(m,"cursor-default"),ref:p,children:f.jsx(ya,{children:d})})});function ya({children:n}){return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"absolute top-1/2 left-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 pointer-fine:hidden","aria-hidden":"true"}),n]})}function x3({className:n,...a}){return f.jsx("nav",{...a,className:Fe(n,"flex flex-1 items-center gap-4 py-2.5")})}function y3({className:n,...a}){let s=w.useId();return f.jsx(Mb,{id:s,children:f.jsx("div",{...a,className:Fe(n,"flex items-center gap-3")})})}function b3({className:n,...a}){return f.jsx("div",{"aria-hidden":"true",...a,className:Fe(n,"-ml-4 flex-1")})}const rh=w.forwardRef(function({current:a,className:s,children:r,...u},d){let h=Fe("relative flex min-w-0 items-center gap-3 rounded-lg p-2 text-left text-base/6 font-medium text-zinc-950 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:not-nth-2:last:data-[slot=icon]:ml-auto *:not-nth-2:last:data-[slot=icon]:size-5 sm:*:not-nth-2:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 *:data-[slot=avatar]:[--avatar-radius:var(--radius-md)] sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white");return f.jsxs("span",{className:Fe(s,"relative"),children:[a&&f.jsx(qb.span,{layoutId:"current-indicator",className:"absolute inset-x-2 -bottom-2.5 h-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof u.href=="string"?f.jsx(Yo,{...u,className:h,"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})}):f.jsx(Tl,{...u,className:Fe("cursor-default",h),"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})})]})});function S3(){return f.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:f.jsx("path",{d:"M2 6.75C2 6.33579 2.33579 6 2.75 6H17.25C17.6642 6 18 6.33579 18 6.75C18 7.16421 17.6642 7.5 17.25 7.5H2.75C2.33579 7.5 2 7.16421 2 6.75ZM2 13.25C2 12.8358 2.33579 12.5 2.75 12.5H17.25C17.6642 12.5 18 12.8358 18 13.25C18 13.6642 17.6642 14 17.25 14H2.75C2.33579 14 2 13.6642 2 13.25Z"})})}function w3(){return f.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:f.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})})}function T3({open:n,close:a,children:s}){return f.jsxs(vj,{open:n,onClose:a,className:"lg:hidden",children:[f.jsx(pj,{transition:!0,className:"fixed inset-0 bg-black/30 transition data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in"}),f.jsx(Ix,{transition:!0,className:"fixed inset-y-0 w-full max-w-80 p-2 transition duration-300 ease-in-out data-closed:-translate-x-full",children:f.jsxs("div",{className:"flex h-full flex-col rounded-lg bg-ouro-deep shadow-xl ring-1 ring-ouro-moss/40",children:[f.jsx("div",{className:"-mb-3 px-4 pt-3",children:f.jsx(Cx,{as:rh,"aria-label":"Close navigation",children:f.jsx(w3,{})})}),s]})})]})}function j3({navbar:n,sidebar:a,children:s}){let[r,u]=w.useState(!1);return f.jsxs("div",{className:"relative isolate flex min-h-svh w-full bg-ouro-void max-lg:flex-col",children:[f.jsx("div",{className:"fixed inset-y-0 left-0 w-64 max-lg:hidden border-r border-zinc-200 dark:border-ouro-moss/30",children:a}),f.jsx(T3,{open:r,close:()=>u(!1),children:a}),f.jsxs("header",{className:"flex items-center px-4 lg:hidden",children:[f.jsx("div",{className:"py-2.5",children:f.jsx(rh,{onClick:()=>u(!0),"aria-label":"Open navigation",children:f.jsx(S3,{})})}),f.jsx("div",{className:"min-w-0 flex-1",children:n})]}),f.jsx("main",{className:"flex flex-1 flex-col lg:min-w-0 lg:pl-64",children:f.jsx("div",{className:"grow bg-ouro-deep p-4 lg:p-8",children:f.jsx("div",{className:"mx-auto max-w-6xl",children:s})})})]})}function E3({className:n,...a}){return f.jsx("nav",{...a,className:Fe(n,"flex h-full min-h-0 flex-col")})}function N3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-col border-b border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function A3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-1 flex-col overflow-y-auto p-4 [&>[data-slot=section]+[data-slot=section]]:mt-8")})}function C3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-col border-t border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function W0({className:n,...a}){let s=w.useId();return f.jsx(Mb,{id:s,children:f.jsx("div",{...a,"data-slot":"section",className:Fe(n,"flex flex-col gap-0.5")})})}function I0({className:n,...a}){return f.jsx("h3",{...a,className:Fe(n,"mb-1 px-2 text-xs/6 font-medium text-zinc-500 dark:text-zinc-400")})}const M3=w.forwardRef(function({current:a,className:s,children:r,...u},d){let h=Fe("flex w-full items-center gap-3 rounded-lg px-2 py-2.5 text-left text-base/6 font-medium text-zinc-950 sm:py-2 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:last:data-[slot=icon]:ml-auto *:last:data-[slot=icon]:size-5 sm:*:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","data-current:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white","dark:data-current:*:data-[slot=icon]:fill-white");return f.jsxs("span",{className:Fe(s,"relative"),children:[a&&f.jsx(qb.span,{layoutId:"current-indicator",className:"absolute inset-y-2 -left-4 w-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof u.href=="string"?f.jsx(Cx,{as:Yo,...u,className:h,"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})}):f.jsx(Tl,{...u,className:Fe("cursor-default",h),"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})})]})});function D3({className:n,...a}){return f.jsx("span",{...a,className:Fe(n,"truncate")})}const O3={red:"bg-red-500/15 text-red-700 group-data-hover:bg-red-500/25 dark:bg-red-500/10 dark:text-red-400 dark:group-data-hover:bg-red-500/20",orange:"bg-orange-500/15 text-orange-700 group-data-hover:bg-orange-500/25 dark:bg-orange-500/10 dark:text-orange-400 dark:group-data-hover:bg-orange-500/20",amber:"bg-amber-400/20 text-amber-700 group-data-hover:bg-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400 dark:group-data-hover:bg-amber-400/15",yellow:"bg-yellow-400/20 text-yellow-700 group-data-hover:bg-yellow-400/30 dark:bg-yellow-400/10 dark:text-yellow-300 dark:group-data-hover:bg-yellow-400/15",lime:"bg-lime-400/20 text-lime-700 group-data-hover:bg-lime-400/30 dark:bg-lime-400/10 dark:text-lime-300 dark:group-data-hover:bg-lime-400/15",green:"bg-green-500/15 text-green-700 group-data-hover:bg-green-500/25 dark:bg-green-500/10 dark:text-green-400 dark:group-data-hover:bg-green-500/20",emerald:"bg-emerald-500/15 text-emerald-700 group-data-hover:bg-emerald-500/25 dark:bg-emerald-500/10 dark:text-emerald-400 dark:group-data-hover:bg-emerald-500/20",teal:"bg-teal-500/15 text-teal-700 group-data-hover:bg-teal-500/25 dark:bg-teal-500/10 dark:text-teal-300 dark:group-data-hover:bg-teal-500/20",cyan:"bg-cyan-400/20 text-cyan-700 group-data-hover:bg-cyan-400/30 dark:bg-cyan-400/10 dark:text-cyan-300 dark:group-data-hover:bg-cyan-400/15",sky:"bg-sky-500/15 text-sky-700 group-data-hover:bg-sky-500/25 dark:bg-sky-500/10 dark:text-sky-300 dark:group-data-hover:bg-sky-500/20",blue:"bg-blue-500/15 text-blue-700 group-data-hover:bg-blue-500/25 dark:text-blue-400 dark:group-data-hover:bg-blue-500/25",indigo:"bg-indigo-500/15 text-indigo-700 group-data-hover:bg-indigo-500/25 dark:text-indigo-400 dark:group-data-hover:bg-indigo-500/20",violet:"bg-violet-500/15 text-violet-700 group-data-hover:bg-violet-500/25 dark:text-violet-400 dark:group-data-hover:bg-violet-500/20",purple:"bg-purple-500/15 text-purple-700 group-data-hover:bg-purple-500/25 dark:text-purple-400 dark:group-data-hover:bg-purple-500/20",fuchsia:"bg-fuchsia-400/15 text-fuchsia-700 group-data-hover:bg-fuchsia-400/25 dark:bg-fuchsia-400/10 dark:text-fuchsia-400 dark:group-data-hover:bg-fuchsia-400/20",pink:"bg-pink-400/15 text-pink-700 group-data-hover:bg-pink-400/25 dark:bg-pink-400/10 dark:text-pink-400 dark:group-data-hover:bg-pink-400/20",rose:"bg-rose-400/15 text-rose-700 group-data-hover:bg-rose-400/25 dark:bg-rose-400/10 dark:text-rose-400 dark:group-data-hover:bg-rose-400/20",zinc:"bg-zinc-600/10 text-zinc-700 group-data-hover:bg-zinc-600/20 dark:bg-white/5 dark:text-zinc-400 dark:group-data-hover:bg-white/10"};function xe({color:n="zinc",className:a,...s}){return f.jsx("span",{...s,className:Fe(a,"inline-flex items-center gap-x-1.5 rounded-md px-1.5 py-0.5 text-sm/5 font-medium sm:text-xs/5 forced-colors:outline",O3[n])})}w.forwardRef(function({color:a="zinc",className:s,children:r,...u},d){let h=Fe(s,"group relative inline-flex rounded-md focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500");return typeof u.href=="string"?f.jsx(Yo,{...u,className:h,ref:d,children:f.jsx(ya,{children:f.jsx(xe,{color:a,children:r})})}):f.jsx(Tl,{...u,className:h,ref:d,children:f.jsx(ya,{children:f.jsx(xe,{color:a,children:r})})})});function R3(n){w.useEffect(()=>{if(!n)return;const a=n;function s(r){if(!(r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement))switch(r.key){case"1":a({tab:"overview"});break;case"2":a({tab:"mail"});break;case"3":a({tab:"sessions"});break;case"4":a({tab:"work"});break;case"5":a({tab:"connections"});break;case"6":a({tab:"inner"});break;case"7":a({tab:"notes"});break;case"8":a({tab:"runtime"});break;case"Escape":{document.activeElement instanceof HTMLElement&&document.activeElement.blur();break}}}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n])}const z3={"owed-reply":"red","blocking-obligation":"red","broken-return":"red","stale-delegation":"yellow","return-ready":"lime","overdue-habit":"yellow"},k3={"owed-reply":"owed reply","blocking-obligation":"blocking","broken-return":"broken return","stale-delegation":"stale","return-ready":"ready to return","overdue-habit":"overdue"},L3={"owed-reply":"Someone spoke last and is waiting for your response","blocking-obligation":"This obligation is open and blocking forward progress","broken-return":"Work was done but the result was never returned to the requester","stale-delegation":"This was delegated to you and hasn't been addressed","return-ready":"The result is ready — deliver it to close the loop","overdue-habit":"This routine is past its scheduled cadence"},V3=new Set(["stale-delegation"]),_3=new Set(["owed-reply","blocking-obligation","broken-return","return-ready","overdue-habit"]),U3=new Set(["spawning","running","waiting_input","stalled"]);function B3({view:n,deskPrefs:a,refreshGeneration:s}){const r=Pi(),[u,d]=w.useState(null),[h,p]=w.useState(null),[m,g]=w.useState(null),[x,y]=w.useState(null),[S,T]=w.useState(null),j=n.agent,E=n.work,D=n.inner,R=n.activity,M=j.degraded,V=j.attention,z=E.tasks,U=E.obligations,P=E.sessions,F=E.coding,W=j.senses,re=E.bridges;return w.useEffect(()=>{_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d),_e(`/agents/${encodeURIComponent(j.agentName)}/coding`).then(p),_e(`/agents/${encodeURIComponent(j.agentName)}/continuity`).then(g).catch(()=>{}),_e(`/agents/${encodeURIComponent(j.agentName)}/orientation`).then(y).catch(()=>{}),_e(`/agents/${encodeURIComponent(j.agentName)}/changes`).then(T).catch(()=>{})},[j.agentName,s]),f.jsxs("div",{className:"space-y-6",children:[u&&u.items.length>0&&(()=>{const B=u.items.filter(ie=>_3.has(ie.urgency)),Z=u.items.filter(ie=>V3.has(ie.urgency));return f.jsxs("div",{className:"space-y-3",children:[B.length>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-fang/5 p-4 ring-1 ring-ouro-fang/15",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-fang",children:["Action now (",B.length,")"]}),f.jsx("div",{className:"mt-2 space-y-1.5",children:B.map((ie,le)=>f.jsx(ex,{item:ie,nav:r,agentName:j.agentName,onDismiss:()=>{d(Se=>Se&&{items:Se.items.filter((De,$)=>u.items.indexOf(ie)!==$)})}},`action-${le}`))})]}),Z.length>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["Stale (",Z.length,")"]}),f.jsx("button",{onClick:async()=>{var ie;for(const le of Z)(ie=le.ref)!=null&&ie.focus&&await fetch(`/api/agents/${encodeURIComponent(j.agentName)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:le.ref.focus})});_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d)},className:"text-xs text-ouro-gold underline underline-offset-2 hover:text-ouro-bone transition-colors",children:"Clear all stale"})]}),f.jsx("div",{className:"mt-2 space-y-1.5",children:Z.map((ie,le)=>f.jsx(ex,{item:ie,nav:r,agentName:j.agentName,onDismiss:()=>{_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d)}},`stale-${le}`))})]})]})})(),(a==null?void 0:a.carrying)&&f.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"What I'm carrying"}),f.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-bone",children:a.carrying})]}),(()=>{const B=(a==null?void 0:a.pinnedConstellations)??[];return B.length===0?null:f.jsxs("div",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Pinned threads"}),f.jsx("div",{className:"mt-2 space-y-2",children:B.map((Z,ie)=>f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-medium text-ouro-bone",children:Z.label}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-1.5",children:[Z.friendIds.map(le=>f.jsxs("button",{onClick:()=>r({tab:"sessions"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["friend:",le.slice(0,8),"…"]},le)),Z.taskRefs.map(le=>f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["task:",le]},le)),Z.bridgeIds.map(le=>f.jsxs("button",{onClick:()=>r({tab:"connections",focus:le}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["bridge:",le.slice(0,8),"…"]},le))]})]},ie))})]})})(),f.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10 sm:p-5",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Center of gravity"}),f.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone sm:text-2xl",children:V.label}),f.jsxs("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:[j.agentName," has"," ",f.jsxs(no,{tab:"work",children:[z.liveCount," live tasks"]}),","," ",f.jsxs(no,{tab:"work",children:[U.openCount," obligations"]}),","," ",f.jsxs(no,{tab:"work",children:[F.activeCount," coding lanes"]}),", and"," ",f.jsxs(no,{tab:"sessions",children:[P.liveCount," live sessions"]}),"."]}),M.status==="degraded"&&M.issues.length>0&&f.jsxs("div",{className:"mt-3 space-y-1",children:[M.issues.slice(0,5).map((B,Z)=>f.jsxs("button",{onClick:()=>r({tab:"runtime"}),className:"flex w-full items-start gap-2 rounded-lg bg-ouro-fang/5 px-3 py-2 text-left text-sm ring-1 ring-ouro-fang/10 hover:ring-ouro-fang/25 transition-colors",children:[f.jsx("span",{className:"mt-0.5 h-2 w-2 shrink-0 rounded-full bg-ouro-fang"}),f.jsxs("span",{className:"text-ouro-mist",children:[f.jsx("span",{className:"font-semibold text-ouro-fang",children:B.code}),f.jsxs("span",{className:"text-ouro-shadow",children:[" — ",pt(B.detail,80)]})]})]},Z)),M.issues.length>5&&f.jsxs("button",{onClick:()=>r({tab:"runtime"}),className:"text-xs text-ouro-glow underline underline-offset-2",children:["+",M.issues.length-5," more issues"]})]})]}),x&&f.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Orientation"}),(()=>{const B=x.currentSession;return B?f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx(xe,{color:"lime",children:"active session"}),f.jsxs("button",{onClick:()=>r({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"text-sm text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:[B.channel,"/",B.key]}),B.lastActivityAt&&f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(B.lastActivityAt)})]}):null})(),x.primaryObligation&&f.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:"yellow",children:x.primaryObligation.status}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:pt(x.primaryObligation.content,80)})]}),x.primaryObligation.nextAction&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-mist",children:["Next: ",x.primaryObligation.nextAction]}),x.primaryObligation.waitingOn&&f.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Waiting on: ",x.primaryObligation.waitingOn]})]}),x.resumeHandle&&f.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Resume handle"}),f.jsxs("div",{className:"mt-1 space-y-0.5 text-sm",children:[x.resumeHandle.lane&&f.jsxs("p",{className:"text-ouro-bone",children:["Lane: ",x.resumeHandle.lane]}),x.resumeHandle.artifact&&f.jsxs("p",{className:"text-ouro-mist",children:["Artifact: ",x.resumeHandle.artifact]}),x.resumeHandle.nextAction&&f.jsxs("p",{className:"text-ouro-mist",children:["Next: ",x.resumeHandle.nextAction]}),x.resumeHandle.blockerOrWaitingOn&&f.jsxs("p",{className:"text-ouro-shadow",children:["Blocked: ",x.resumeHandle.blockerOrWaitingOn]}),f.jsxs(xe,{color:x.resumeHandle.confidence==="high"?"lime":x.resumeHandle.confidence==="medium"?"yellow":"zinc",children:[x.resumeHandle.confidence," confidence"]})]})]}),x.otherActiveSessions.length>0&&f.jsxs("div",{className:"mt-2",children:[f.jsxs("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:["Other sessions (",x.otherActiveSessions.length,")"]}),f.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:x.otherActiveSessions.slice(0,5).map(B=>f.jsx("button",{onClick:()=>r({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:B.friendName},`${B.friendId}/${B.channel}/${B.key}`))})]})]}),S&&S.changeCount>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["What changed (",S.changeCount,")"]}),S.snapshotAge&&f.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Since ",et(S.snapshotAge)]}),f.jsxs("div",{className:"mt-2 space-y-1",children:[S.items.slice(0,8).map((B,Z)=>f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(xe,{color:B.kind.includes("status")?"yellow":"zinc",children:B.kind.replace(/_/g," ")}),f.jsx("span",{className:"truncate text-ouro-mist",children:B.summary})]},Z)),S.items.length>8&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["+",S.items.length-8," more changes"]})]})]}),m&&f.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Presence"}),m.presence.self?f.jsxs("div",{className:"mt-2 space-y-1",children:[f.jsx("p",{className:"text-sm font-medium text-ouro-bone",children:m.presence.self.availability}),m.presence.self.lane&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Lane: ",m.presence.self.lane]}),m.presence.self.tempo&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Tempo: ",m.presence.self.tempo]})]}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No presence data"}),m.presence.peers.length>0&&f.jsxs("div",{className:"mt-2 border-t border-ouro-moss/20 pt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:"Peers"}),f.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:m.presence.peers.map(B=>f.jsx(xe,{color:B.availability==="active"?"lime":"zinc",children:B.agentName},B.agentName))})]})]}),f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Cares (",m.cares.activeCount,")"]}),m.cares.items.length>0?f.jsx("div",{className:"mt-2 space-y-1.5",children:m.cares.items.slice(0,5).map(B=>f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:B.salience==="high"?"red":B.salience==="medium"?"yellow":"zinc",children:B.salience}),f.jsx("p",{className:"truncate text-sm text-ouro-bone",children:B.label})]},B.id))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No active cares"})]}),f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Episodes (",m.episodes.recentCount,")"]}),m.episodes.items.length>0?f.jsx("div",{className:"mt-2 space-y-1.5",children:m.episodes.items.slice(0,5).map(B=>f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(xe,{color:"zinc",children:B.kind}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"truncate text-sm text-ouro-bone",children:B.summary}),f.jsx("p",{className:"text-xs text-ouro-shadow",children:et(B.timestamp)})]})]},B.id))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No recent episodes"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[f.jsx(ao,{label:"Tasks",value:z.liveCount,sub:`${z.blockedCount} blocked`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Obligations",value:U.openCount,sub:`${P.liveCount} sessions`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Coding",value:F.activeCount,sub:`${F.blockedCount} blocked`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Inner",value:D.status,sub:pt(D.summary??"",30),onClick:()=>r({tab:"inner"})})]}),h&&h.items.length>0&&(()=>{const B=h.items.filter(Z=>U3.has(Z.status));return B.length===0?null:f.jsx(Is,{title:`Active coding (${B.length})`,children:f.jsx("div",{className:"space-y-1.5",children:B.map(Z=>f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"flex w-full items-center gap-2 rounded-lg bg-ouro-void/40 px-3 py-2 text-left ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:[f.jsx(xe,{color:Z.status==="running"?"lime":Z.status==="waiting_input"?"yellow":"zinc",children:Z.status}),f.jsxs("span",{className:"truncate text-sm text-ouro-bone",children:[Z.runner," — ",pt(Z.workdir,40)]}),f.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:et(Z.lastActivityAt)})]},Z.id))})})})(),f.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[f.jsx(Is,{title:"Senses",children:W.length>0?f.jsx(H3,{items:W}):f.jsx(_f,{children:"No active senses"})}),f.jsx(Is,{title:"Bridges",children:re.length>0?f.jsx("div",{className:"flex flex-wrap gap-1.5",children:re.map(B=>f.jsx("button",{onClick:()=>r({tab:"connections",focus:B}),children:f.jsx(xe,{color:"lime",children:B})},B))}):f.jsx(_f,{children:"No active bridges"})})]}),(()=>{const B=U.items.filter(Z=>Z.status==="fulfilled");return B.length===0?null:f.jsx(Is,{title:"Recently closed",children:f.jsx("div",{className:"space-y-1",children:B.slice(0,3).map((Z,ie)=>f.jsxs("div",{className:"flex items-center gap-2 rounded-lg px-3 py-2 bg-ouro-glow/5 ring-1 ring-ouro-glow/10",children:[f.jsx(xe,{color:"lime",children:"closed"}),f.jsx("p",{className:"text-sm text-ouro-mist truncate",children:pt(Z.content,80)}),f.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:et(Z.updatedAt)})]},ie))})})})(),f.jsx(Is,{title:"Recent activity",children:R.recent.length>0?f.jsx("div",{className:"space-y-1",children:R.recent.map((B,Z)=>{const ie=B.kind==="coding"||B.kind==="obligation"?"work":B.kind==="session"?"sessions":"inner";return f.jsxs("button",{onClick:()=>r({tab:ie}),className:"flex w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left hover:bg-ouro-moss/10 transition-colors",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{children:B.kind}),f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(B.at)})]}),f.jsx("p",{className:"truncate text-sm font-medium text-ouro-bone",children:pt(B.label,100)}),f.jsx("p",{className:"truncate text-xs text-ouro-shadow",children:pt(B.detail,80)})]},Z)})}):f.jsx(_f,{children:"No recent activity yet."})})]})}function ex({item:n,nav:a,agentName:s,onDismiss:r}){var h;const u=n.urgency==="return-ready",d=(h=n.ref)==null?void 0:h.focus;return f.jsxs("div",{className:`flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left ring-1 transition-colors ${u?"bg-ouro-glow/5 ring-ouro-glow/15":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[f.jsxs("button",{onClick:()=>n.ref&&a({tab:n.ref.tab,focus:n.ref.focus}),className:"flex min-w-0 flex-1 items-start gap-2.5",children:[f.jsx(xe,{color:z3[n.urgency]??"zinc",children:k3[n.urgency]??n.urgency}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("p",{className:`text-sm font-medium ${u?"text-ouro-glow":"text-ouro-bone"}`,children:n.label}),f.jsx("p",{className:"text-xs text-ouro-shadow truncate",children:n.detail}),f.jsx("p",{className:"text-[10px] italic text-ouro-shadow/60 mt-0.5",children:L3[n.urgency]??""})]}),n.ageMs!=null&&f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:n.ageMs<36e5?`${Math.floor(n.ageMs/6e4)}m`:n.ageMs<864e5?`${Math.floor(n.ageMs/36e5)}h`:`${Math.floor(n.ageMs/864e5)}d`})]}),d&&f.jsx("button",{onClick:async p=>{p.stopPropagation(),await fetch(`/api/agents/${encodeURIComponent(s)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:d})}),r()},className:"shrink-0 text-xs text-ouro-shadow hover:text-ouro-fang transition-colors",title:"Dismiss",children:"✕"})]})}function no({tab:n,children:a}){const s=Pi();return f.jsx("button",{onClick:()=>s({tab:n}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow transition-colors",children:a})}function ao({label:n,value:a,sub:s,onClick:r}){return f.jsxs("button",{onClick:r,className:"rounded-xl bg-ouro-void/50 p-3 text-left ring-1 ring-ouro-moss/20 hover:ring-ouro-glow/20 transition-all",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),f.jsx("p",{className:"mt-1 text-xl font-semibold tabular-nums text-ouro-bone",children:a}),f.jsx("p",{className:"mt-0.5 truncate text-xs text-ouro-shadow",children:s})]})}function Is({title:n,children:a}){return f.jsxs("div",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n}),f.jsx("div",{className:"mt-2",children:a})]})}function H3({items:n}){return f.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(a=>f.jsx(xe,{color:"lime",children:a},a))})}function _f({children:n}){return f.jsx("p",{className:"text-sm text-ouro-shadow",children:n})}function pl(n){return n.length>0?n.join(", "):"(unknown)"}function $3(n,a){return a==="all"?!0:["imbox","screener","discarded","quarantine"].includes(a)?n.placement===a:a==="native"||a==="delegated"?n.compartmentKind===a:a.startsWith("source:")?n.source===a.slice(7):!1}function Yb(n){return n.subject||"(no subject)"}function q3(n,a){return{status:"error",agentName:n,mailboxAddress:null,generatedAt:new Date().toISOString(),store:null,folders:[],messages:[],screener:[],outbound:[],recovery:{discardedCount:0,quarantineCount:0},accessLog:[],error:a}}function Y3(n,a,s){return{status:"error",agentName:n,mailboxAddress:a,generatedAt:new Date().toISOString(),message:null,accessLog:[],error:s}}function Gb(n){return n.provenance.compartmentKind==="delegated"?`${n.provenance.ownerEmail??"delegated"} / ${n.provenance.source??"source"}`:"native mailbox"}function oh(n){return n==="screener"?"bg-[#fff7d6] text-[#6f5200] ring-[#e7c85c]":n==="discarded"||n==="quarantine"?"bg-[#ffe8e2] text-[#8a2f1f] ring-[#ef9a84]":n==="sent"?"bg-[#dff7ea] text-[#17613a] ring-[#82caa1]":n==="draft"?"bg-[#e7ecff] text-[#263f95] ring-[#a7b5f5]":"bg-[#e9f3ef] text-[#1e5840] ring-[#9fc7b5]"}function G3(n){return(n==null?void 0:n.messages.length)??0}function X3({agentName:n,focus:a,onFocusConsumed:s,refreshGeneration:r}){var R;const[u,d]=w.useState(null),[h,p]=w.useState("all"),[m,g]=w.useState(a??null),[x,y]=w.useState(null),[S,T]=w.useState(!1);w.useEffect(()=>{p("all"),g(a??null),y(null)},[n]),w.useEffect(()=>{d(null),_e(`/agents/${encodeURIComponent(n)}/mail`).then(d).catch(()=>d(q3(n,"mail unavailable")))},[n,r]),w.useEffect(()=>{a&&(g(a),s==null||s())},[a,s]),w.useEffect(()=>{if(!m){y(null);return}T(!0),_e(`/agents/${encodeURIComponent(n)}/mail/${encodeURIComponent(m)}`).then(y).catch(()=>y(Y3(n,(u==null?void 0:u.mailboxAddress)??null,"message unavailable"))).finally(()=>T(!1))},[n,m,r]);const j=w.useMemo(()=>{const M=(u==null?void 0:u.folders)??[];return[{id:"all",label:"All",count:G3(u)},...M]},[u]),E=w.useMemo(()=>((u==null?void 0:u.messages)??[]).filter(M=>$3(M,h)),[h,u]),D=w.useMemo(()=>h!=="draft"&&h!=="sent"?[]:((u==null?void 0:u.outbound)??[]).filter(M=>M.status===h),[h,u]);return u?u.status!=="ready"?f.jsx("div",{className:"mailbox-shell grid min-h-[58vh] place-items-center rounded-md bg-[#f2f6ef] p-8 text-[#1f2720] ring-1 ring-black/10",children:f.jsxs("div",{className:"max-w-lg text-center",children:[f.jsx("p",{className:"text-sm font-semibold text-[#667067]",children:"Mailbox"}),f.jsx("h2",{className:"mt-2 text-2xl font-semibold",children:u.status==="auth-required"?"Locked":"Unavailable"}),f.jsx("p",{className:"mt-3 text-sm leading-6 text-[#59645c]",children:u.error})]})}):f.jsxs("div",{className:"mailbox-shell overflow-hidden rounded-md bg-[#f2f6ef] text-[#172018] ring-1 ring-black/10",children:[f.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-[#cbd8c8] bg-[#e4ecdf] px-4 py-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"text-xs font-semibold text-[#687062]",children:"Agent mailbox"}),f.jsx("p",{className:"truncate text-sm text-[#2d3a30]",children:u.mailboxAddress})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:"zinc",children:"read-only"}),f.jsxs("span",{className:"text-xs tabular-nums text-[#687062]",children:[u.messages.length," messages"]}),f.jsxs("span",{className:"text-xs tabular-nums text-[#687062]",children:[u.outbound.length," outbound"]})]})]}),f.jsxs("div",{className:"grid min-h-[66vh] grid-cols-1 lg:grid-cols-[14.5rem_minmax(19rem,25rem)_minmax(0,1fr)]",children:[f.jsxs("aside",{className:"border-b border-[#cbd8c8] bg-[#e4ecdf] p-3 lg:border-b-0 lg:border-r",children:[f.jsx(K3,{folders:j,activeFolder:h,setActiveFolder:p}),f.jsx(F3,{discarded:u.recovery.discardedCount,quarantine:u.recovery.quarantineCount}),f.jsx(Z3,{candidates:u.screener,onOpen:M=>{p("screener"),g(M)}}),f.jsx(Q3,{entries:u.accessLog})]}),f.jsxs("section",{className:"border-b border-[#cbd8c8] bg-[#fbfdf8] lg:border-b-0 lg:border-r",children:[f.jsxs("div",{className:"border-b border-[#d8e2d4] px-4 py-3",children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:((R=j.find(M=>M.id===h))==null?void 0:R.label)??"All"}),f.jsx("p",{className:"text-xs text-[#687062]",children:D.length>0?`${D.length} outbound records`:`${E.length} messages`})]}),f.jsxs("div",{className:"max-h-[66vh] overflow-y-auto",children:[D.map(M=>f.jsx(J3,{record:M},M.id)),D.length===0&&E.map(M=>f.jsx(P3,{message:M,selected:m===M.id,onSelect:()=>g(M.id)},M.id)),D.length===0&&E.length===0&&f.jsx("div",{className:"px-4 py-10 text-center text-sm text-[#687062]",children:"No records here."})]})]}),f.jsxs("main",{className:"min-w-0 bg-[#fbfdf8]",children:[!m&&f.jsx(I3,{}),m&&S&&f.jsx(tx,{label:"Opening message"}),m&&!S&&(x==null?void 0:x.status)!=="ready"&&f.jsx("div",{className:"grid min-h-[54vh] place-items-center p-8 text-center",children:f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:"Message unavailable"}),f.jsx("p",{className:"mt-2 text-sm text-[#687062]",children:x==null?void 0:x.error})]})}),(x==null?void 0:x.status)==="ready"&&x.message&&f.jsx(W3,{detail:x})]})]})]}):f.jsx(tx,{label:"Opening mailbox"})}function K3({folders:n,activeFolder:a,setActiveFolder:s}){return f.jsx("div",{className:"space-y-1",children:n.map(r=>f.jsxs("button",{type:"button",onClick:()=>s(r.id),className:`flex h-9 w-full items-center justify-between rounded px-3 text-left text-sm transition-colors ${a===r.id?"bg-[#fbfdf8] text-[#172018] shadow-sm":"text-[#536157] hover:bg-[#fbfdf8]/65"}`,children:[f.jsx("span",{className:"truncate",children:r.label}),f.jsx("span",{className:"text-xs tabular-nums text-[#687062]",children:r.count})]},r.id))})}function F3({discarded:n,quarantine:a}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Recovery drawers"}),f.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2",children:[f.jsx("p",{className:"text-xs text-[#687062]",children:"Discarded"}),f.jsx("p",{className:"text-lg font-semibold tabular-nums text-[#172018]",children:n})]}),f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2",children:[f.jsx("p",{className:"text-xs text-[#687062]",children:"Quarantine"}),f.jsx("p",{className:"text-lg font-semibold tabular-nums text-[#172018]",children:a})]})]})]})}function Z3({candidates:n,onOpen:a}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Screener"}),f.jsxs("div",{className:"mt-2 space-y-2",children:[n.slice(0,5).map(s=>f.jsxs("button",{type:"button",onClick:()=>a(s.messageId),className:"block w-full rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2 text-left hover:border-[#9fb8a7]",children:[f.jsx("p",{className:"truncate text-xs font-semibold text-[#172018]",children:s.senderEmail}),f.jsx("p",{className:"mt-1 truncate text-xs text-[#687062]",children:s.trustReason})]},s.id)),n.length===0&&f.jsx("p",{className:"text-xs text-[#687062]",children:"No pending senders."})]})]})}function Q3({entries:n}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Access audit"}),f.jsxs("div",{className:"mt-2 space-y-2",children:[n.slice(0,4).map(a=>f.jsxs("div",{className:"text-xs leading-4 text-[#687062]",children:[f.jsx("p",{className:"truncate font-medium text-[#3f4b42]",children:a.tool}),f.jsx("p",{className:"truncate",children:a.reason})]},a.id)),n.length===0&&f.jsx("p",{className:"text-xs text-[#687062]",children:"No reads yet."})]})]})}function P3({message:n,selected:a,onSelect:s}){return f.jsxs("button",{type:"button",onClick:s,className:`block w-full border-b border-[#d8e2d4] px-4 py-3 text-left transition-colors ${a?"bg-[#eaf4ee]":"hover:bg-[#eef4ec]"}`,children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsx("p",{className:"min-w-0 truncate text-sm font-semibold text-[#172018]",children:pl(n.from)}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-[#687062]",children:et(n.receivedAt)})]}),f.jsx("p",{className:"mt-1 truncate text-sm text-[#26352a]",children:Yb(n)}),f.jsx("p",{className:"mt-1 line-clamp-2 text-xs leading-5 text-[#687062]",children:pt(n.snippet,150)}),f.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[f.jsx("span",{className:`rounded px-2 py-0.5 text-[11px] ring-1 ${oh(n.placement)}`,children:n.placement}),f.jsx("span",{className:"truncate text-[11px] text-[#687062]",children:Gb(n)})]})]})}function J3({record:n}){return f.jsxs("div",{className:"border-b border-[#d8e2d4] px-4 py-3",children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsx("p",{className:"min-w-0 truncate text-sm font-semibold text-[#172018]",children:n.subject||"(no subject)"}),f.jsx("span",{className:`shrink-0 rounded px-2 py-0.5 text-[11px] ring-1 ${oh(n.status)}`,children:n.status})]}),f.jsxs("p",{className:"mt-1 truncate text-xs text-[#536157]",children:["to ",pl(n.to)]}),f.jsxs("p",{className:"mt-1 text-xs text-[#687062]",children:[n.transport??"not sent"," · ",et(n.sentAt??n.updatedAt)]})]})}function W3({detail:n}){const a=n.message;return f.jsxs("article",{className:"min-h-[66vh]",children:[f.jsxs("header",{className:"border-b border-[#cbd8c8] bg-[#fbfdf8] px-6 py-5",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[f.jsx("h2",{className:"min-w-0 text-xl font-semibold leading-tight text-[#172018]",children:Yb(a)}),f.jsx("span",{className:`rounded px-2 py-0.5 text-xs ring-1 ${oh(a.placement)}`,children:a.placement})]}),f.jsxs("div",{className:"mt-4 grid gap-1 text-sm text-[#536157]",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"From:"})," ",pl(a.from)]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"To:"})," ",pl(a.to)]}),a.cc.length>0&&f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Cc:"})," ",pl(a.cc)]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Received:"})," ",new Date(a.receivedAt).toLocaleString()]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Provenance:"})," ",Gb(a)]})]})]}),f.jsx("div",{className:"border-b border-[#f0d0bd] bg-[#fff4e4] px-6 py-3 text-sm text-[#8a4a18]",children:a.untrustedContentWarning}),f.jsxs("div",{className:"px-6 py-6",children:[f.jsx("pre",{className:"whitespace-pre-wrap break-words font-body text-sm leading-7 text-[#26352a]",children:a.text||"(no text body)"}),a.bodyTruncated&&f.jsx("p",{className:"mt-4 text-xs text-[#687062]",children:"Body truncated in Outlook."}),f.jsxs("div",{className:"mt-6 grid gap-3 border-t border-[#cbd8c8] pt-4 text-xs text-[#687062] md:grid-cols-2",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Read reason:"})," ",a.access.reason]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Read at:"})," ",new Date(a.access.accessedAt).toLocaleString()]})]}),a.attachments.length>0&&f.jsxs("div",{className:"mt-6 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-xs font-semibold text-[#687062]",children:"Attachments"}),f.jsx("div",{className:"mt-2 space-y-2",children:a.attachments.map(s=>f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2 text-sm text-[#3f4b42]",children:[s.filename," · ",s.contentType," · ",s.size.toLocaleString()," bytes"]},`${s.filename}-${s.size}`))})]})]})]})}function I3(){return f.jsx("div",{className:"grid min-h-[54vh] place-items-center p-8 text-center",children:f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:"No message selected"}),f.jsx("p",{className:"mt-2 text-sm text-[#687062]",children:"Reading pane idle."})]})})}function tx({label:n}){return f.jsxs("div",{className:"flex items-center gap-2 p-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-[#2f8f4e]"}),f.jsxs("span",{className:"text-xs text-[#687062]",children:[n,"..."]})]})}function jd(n){const a=n.function.name,s=eC(n.function.arguments);return a==="settle"?{kind:"response",name:a,id:n.id,deliveredText:s.answer??null,delegatedThought:null,metadata:s.intent??null,rawArgs:null}:a==="ponder"?{kind:"delegation",name:a,id:n.id,deliveredText:s.say??null,delegatedThought:s.thought??null,metadata:null,rawArgs:null}:a==="rest"?{kind:"rest",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:null}:a==="observe"?{kind:"observe",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:s.reason??null,rawArgs:null}:a==="surface"?{kind:"surface",name:a,id:n.id,deliveredText:s.content??null,delegatedThought:null,metadata:s.delegationId??s.friendId??null,rawArgs:null}:{kind:"action",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:n.function.arguments}}function eC(n){try{const a=JSON.parse(n);if(a&&typeof a=="object")return a}catch{}return{}}function tC(n){return typeof n=="string"?n:Array.isArray(n)?n.map(a=>a.type==="text"&&typeof a.text=="string"?a.text:"").filter(a=>a.length>0).join(""):""}function Ml(n){return tC(n.content)}function Xb(n){return n.time.authoredAt??n.time.observedAt??n.time.recordedAt}const nx={"needs-reply":{color:"red",label:"needs reply"},"on-hold":{color:"yellow",label:"on hold"},monitoring:{color:"zinc",label:"monitoring"},idle:{color:"zinc",label:"idle"}};function Kb(n){return n==="bluebubbles"?"iMessage":n==="teams"?"Teams":n==="cli"?"CLI":n==="mail"?"Mail":n}function nC(n){return n==="bluebubbles"?"imessage":n==="teams"?"teams":n==="cli"?"terminal":"default"}function aC(n){return n==="imessage"?"overflow-hidden rounded-xl bg-[#f5f5f7] text-[#1d1d1f] ring-1 ring-black/10":n==="teams"?"overflow-hidden rounded-xl bg-[#f7f5ff] text-[#242424] ring-1 ring-[#d8d1ff]":n==="terminal"?"overflow-hidden rounded-lg bg-[#050807] font-mono text-[#d1fae5] ring-1 ring-[#1f3a2c]":"overflow-hidden rounded-lg bg-ouro-void/60 text-ouro-bone ring-1 ring-ouro-moss/15"}function iC(n){return n==="imessage"?"border-b border-black/10 bg-[#fbfbfd] px-4 py-3 text-center":n==="teams"?"border-b border-[#d8d1ff] bg-[#4f3bb3] px-4 py-3 text-white":n==="terminal"?"border-b border-[#1f3a2c] bg-[#101815] px-4 py-2 text-[#86efac]":"border-b border-ouro-moss/15 px-4 py-3"}function sC(n){return n==="imessage"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-bl-md bg-[#e9e9eb] px-3.5 py-2 text-[#1d1d1f]":n==="teams"?"max-w-[85%] sm:max-w-[75%] rounded-md bg-white px-3.5 py-2 text-[#242424] shadow-sm ring-1 ring-[#e5e5e5]":n==="terminal"?"max-w-full rounded-none border-l-2 border-[#60a5fa] bg-transparent px-3 py-2 text-[#dbeafe]":"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-bl-sm bg-ouro-moss/25 px-3.5 py-2 ring-1 ring-ouro-moss/15"}function io(n,a="normal"){return n==="imessage"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-md bg-[#0a84ff] px-3.5 py-2 text-white":n==="teams"?"max-w-[85%] sm:max-w-[75%] rounded-md bg-[#ede9fe] px-3.5 py-2 text-[#242424] shadow-sm ring-1 ring-[#c4b5fd]":n==="terminal"?"max-w-full rounded-none border-l-2 border-[#22c55e] bg-transparent px-3 py-2 text-[#bbf7d0]":a==="surface"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-scale/12 px-3.5 py-2 ring-1 ring-ouro-scale/15":"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12"}function sl(n,a){return n==="imessage"?a==="agent"?"font-mono text-[9px] text-white/70":"font-mono text-[9px] text-[#6b7280]":n==="teams"?"font-mono text-[9px] uppercase tracking-wider text-[#5b5fc7]":n==="terminal"?a==="agent"?"font-mono text-[11px] text-[#22c55e]":"font-mono text-[11px] text-[#60a5fa]":a==="surface"||a==="agent"?"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70":"font-mono text-[9px] uppercase tracking-wider text-ouro-gold/70"}function ll(n,a="agent"){return n==="imessage"?"text-sm leading-relaxed whitespace-pre-wrap break-words":n==="teams"?"text-sm leading-relaxed text-[#242424] whitespace-pre-wrap break-words":n==="terminal"?`font-mono text-[12px] leading-6 whitespace-pre-wrap break-words ${a==="agent"?"text-[#bbf7d0]":"text-[#dbeafe]"}`:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words"}function lC(n){return Xb(n)}function Xi(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(lC(n)))}function rC({agentName:n,focus:a,onFocusConsumed:s,deskPrefs:r,refreshGeneration:u}){Pi();const[d,h]=w.useState(null),[p,m]=w.useState(null),[g,x]=w.useState(null),[y,S]=w.useState(!1),T=w.useRef(null);w.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/sessions`).then(h)},[n,u]),w.useEffect(()=>{a&&(T.current=null,m(a),x(null),S(!0),s==null||s())},[n,a,s]),w.useEffect(()=>{if(!p)return;const z=`${p}:${u}`;if(T.current===z)return;T.current=z,S(!0);const[U,P,F]=p.split("/");_e(`/agents/${encodeURIComponent(n)}/sessions/${encodeURIComponent(U)}/${encodeURIComponent(P)}/${encodeURIComponent(F)}`).then(x).catch(()=>x(null)).finally(()=>S(!1))},[n,p,u,a]);function j(z){if(p===z){m(null),x(null),T.current=null;return}m(z),x(null),S(!0)}const E=new Set((r==null?void 0:r.starredFriends)??[]);if(!d)return f.jsx(Fb,{label:"Loading sessions"});const D=new Map;for(const z of d.items)D.has(z.friendId)||D.set(z.friendId,[]),D.get(z.friendId).push(z);const R=[...D.entries()].sort((z,U)=>{const P=E.has(z[0])?0:1,F=E.has(U[0])?0:1;return P!==F?P-F:U[1].length-z[1].length}),M=[],V=new Map;for(const[z,U]of R)V.set(M.length,{name:U[0].friendName,channels:U.length,starred:E.has(z)}),M.push(...U);return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:[d.totalCount," sessions · ",d.activeCount," active · ",d.staleCount," stale"]}),f.jsx("div",{className:"space-y-1.5",children:M.map((z,U)=>{var Se;const P=V.get(U),F=E.has(z.friendId),W=`${z.friendId}/${z.channel}/${z.key}`,re=p===W,B=nx[z.replyState]??nx.idle,Z=((Se=z.lastUsage)==null?void 0:Se.total_tokens)??z.estimatedTokens??0,le=Z>0?Math.min(100,Math.round(Z/8e4*100)):0;return f.jsxs("div",{children:[P&&P.channels>1&&f.jsxs("div",{className:"flex items-center gap-2 pt-3 pb-1",children:[P.starred&&f.jsx("span",{className:"text-ouro-gold text-sm",children:"★"}),f.jsx("span",{className:"font-medium text-ouro-bone text-sm",children:P.name}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:[P.channels," channels"]})]}),f.jsxs("button",{onClick:()=>j(W),className:`flex w-full flex-col gap-1.5 rounded-lg px-3 py-3 text-left transition-colors ring-1 ${re?"bg-ouro-moss/15 ring-ouro-glow/20":"ring-ouro-moss/15 hover:bg-ouro-moss/8"}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[F&&f.jsx("span",{className:"text-ouro-gold",title:"Starred",children:"★"}),f.jsx("span",{className:"truncate font-medium text-ouro-bone",children:z.friendName}),f.jsxs("span",{className:"shrink-0 text-xs text-ouro-shadow",children:["via ",Kb(z.channel)]}),f.jsx(xe,{color:B.color,children:B.label})]}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:et(z.lastActivityAt)})]}),z.latestUserExcerpt&&f.jsxs("p",{className:"truncate text-xs text-ouro-gold/70",children:[f.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"in:"})," ",pt(z.latestUserExcerpt,100)]}),z.latestAssistantExcerpt&&f.jsxs("p",{className:"truncate text-xs text-ouro-glow/60",children:[f.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"out:"})," ",pt(z.latestAssistantExcerpt,100)]}),f.jsxs("div",{className:"flex items-center gap-3 text-xs text-ouro-shadow",children:[f.jsxs("span",{className:"tabular-nums",children:[z.messageCount," msgs"]}),z.lastUsage&&f.jsxs("span",{className:"tabular-nums",children:[z.lastUsage.total_tokens.toLocaleString()," tok"]}),le>0&&f.jsxs("div",{className:"flex items-center gap-1.5 flex-1 max-w-32",title:"Context pressure — steady state oscillates between 80-100%",children:[f.jsx("div",{className:"h-1 flex-1 rounded-full bg-ouro-moss/20",children:f.jsx("div",{className:`h-1 rounded-full transition-all ${le>100?"bg-ouro-fang":le>80?"bg-ouro-gold":"bg-ouro-glow"}`,style:{width:`${Math.min(100,le)}%`}})}),f.jsxs("span",{className:"tabular-nums text-[10px]",children:[le,"%"]})]})]})]}),re&&f.jsx(oC,{loading:y,transcript:g})]},W)})})]})}function oC({loading:n,transcript:a}){const s=w.useRef(null);return w.useEffect(()=>{a&&s.current&&(s.current.scrollTop=s.current.scrollHeight)},[a]),f.jsxs("div",{ref:s,className:"mt-1 max-h-[70vh] overflow-y-auto rounded-lg",children:[n&&f.jsx(Fb,{label:"Loading transcript"}),a&&f.jsx(uC,{transcript:a})]})}function uC({transcript:n}){const{messages:a,lastUsage:s}=n,r=nC(n.channel),u=a.filter(g=>g.role==="system"),d=a.filter(g=>g.role!=="system"),[h,p]=w.useState(!1),m=new Map;for(const g of d)g.role==="tool"&&g.toolCallId&&m.set(g.toolCallId,g);return f.jsxs("div",{className:aC(r),children:[f.jsxs("div",{className:iC(r),children:[f.jsx("p",{className:r==="terminal"?"font-mono text-xs":"text-sm font-semibold",children:Kb(n.channel)}),f.jsxs("p",{className:r==="terminal"?"mt-0.5 font-mono text-[10px] text-[#6ee7b7]":"mt-0.5 text-xs opacity-70",children:[n.friendName," · ",n.messageCount," messages"]})]}),f.jsxs("div",{className:"space-y-0.5 p-3",children:[s&&f.jsxs("p",{className:r==="terminal"?"pb-2 font-mono text-[10px] text-[#6ee7b7]":"pb-2 font-mono text-[10px] opacity-60",children:[s.input_tokens.toLocaleString()," in · ",s.output_tokens.toLocaleString()," out · ",s.total_tokens.toLocaleString()," total"]}),u.length>0&&f.jsxs("div",{className:"pb-2 mb-2 border-b border-current/10",children:[f.jsxs("button",{onClick:()=>p(!h),className:"font-mono text-[10px] uppercase tracking-wider opacity-60 transition-opacity hover:opacity-90",children:[h?"▼":"▶"," system context (",u.length,")"]}),h&&u.map(g=>f.jsxs("div",{className:"mt-2 max-h-60 overflow-y-auto rounded bg-black/5 p-2 text-xs opacity-75 whitespace-pre-wrap break-words",children:[f.jsx("p",{className:"mb-1 font-mono text-[9px] opacity-70",children:Xi(g)}),Ml(g)]},g.id))]}),d.map(g=>g.role==="tool"?null:g.role==="user"?f.jsx(cC,{msg:g,surface:r},g.id):g.role==="assistant"?f.jsx(fC,{msg:g,toolResults:m,surface:r},g.id):null)]})]})}function cC({msg:n,surface:a}){const s=Ml(n);return f.jsx("div",{className:"flex justify-start py-1",children:f.jsxs("div",{className:sC(a),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:sl(a,"user"),children:a==="terminal"?"human $":"user"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",n.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(a,"user"),children:s})]})})}function fC({msg:n,toolResults:a,surface:s}){const r=Ml(n),u=(n.toolCalls??[]).map(jd),d=u.filter(m=>m.kind!=="action"),h=u.filter(m=>m.kind==="action"),p=[];for(const m of d)m.kind==="response"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:m.deliveredText}),m.metadata&&m.metadata!=="complete"&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["intent: ",m.metadata]})]})},m.id)):m.kind==="delegation"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),m.deliveredText&&f.jsx("p",{className:ll(s),children:m.deliveredText}),m.delegatedThought&&f.jsxs("div",{className:"mt-2 rounded bg-black/10 px-2.5 py-1.5 ring-1 ring-current/10",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider opacity-70",children:"→ inner dialog"}),f.jsx("p",{className:"mt-0.5 text-xs opacity-80",children:m.delegatedThought})]})]})},m.id)):m.kind==="surface"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s,"surface"),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"surface"),children:"surfaced"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:m.deliveredText}),m.metadata&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",m.metadata]})]})},m.id)):m.kind==="rest"?p.push(f.jsx("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:"— resting —"},m.id)):m.kind==="observe"&&p.push(f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:["— observed",m.metadata?`: ${m.metadata}`:""," —"]},m.id));return r&&d.length===0&&p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:r})]})},`${n.id}-content`)),h.length>0&&p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsx("div",{className:"max-w-[85%] sm:max-w-[75%] space-y-1",children:h.map(m=>f.jsx(dC,{call:m,result:a.get(m.id),surface:s},m.id))})},`${n.id}-tools`)),f.jsx(f.Fragment,{children:p})}function dC({call:n,result:a,surface:s}){const[r,u]=w.useState(!1),d=a?Ml(a):null;return f.jsxs("button",{onClick:()=>u(!r),className:`w-full text-left rounded px-2.5 py-1.5 text-sm transition-colors ${s==="terminal"?"bg-[#0f1a15] font-mono text-[#bbf7d0] ring-1 ring-[#1f3a2c] hover:ring-[#22c55e]/40":s==="teams"?"bg-white text-[#242424] ring-1 ring-[#d8d1ff] hover:ring-[#5b5fc7]/40":s==="imessage"?"bg-white text-[#1d1d1f] ring-1 ring-black/10 hover:ring-[#0a84ff]/30":"bg-ouro-moss/10 ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"font-mono text-xs text-ouro-glow",children:n.name}),!r&&f.jsx("span",{className:"text-[10px] text-ouro-shadow",children:"tap to inspect"})]}),r&&f.jsxs(f.Fragment,{children:[n.rawArgs&&f.jsx("pre",{className:"mt-1.5 max-h-24 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap break-words",children:n.rawArgs}),a&&f.jsxs("div",{className:"mt-1.5 border-t border-ouro-moss/15 pt-1.5",children:[f.jsx(xe,{children:"result"}),f.jsx("pre",{className:"mt-1 max-h-32 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-mist whitespace-pre-wrap break-words",children:d})]})]})]})}function Fb({label:n}){return f.jsxs("div",{className:"flex items-center gap-2 py-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),f.jsxs("span",{className:"font-mono text-xs text-ouro-shadow",children:[n,"…"]})]})}function hC({agentName:n,view:a,focus:s,onFocusConsumed:r,refreshGeneration:u}){var V,z;const d=Pi(),[h,p]=w.useState(null),[m,g]=w.useState(null),[x,y]=w.useState(null),S=a.work,T=S.obligations,j=S.tasks;w.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/coding`).then(p),_e(`/agents/${encodeURIComponent(n)}/obligations`).then(g).catch(()=>{}),_e(`/agents/${encodeURIComponent(n)}/self-fix`).then(y).catch(()=>{})},[n,u]);const E=(m==null?void 0:m.items)??T.items,D=(m==null?void 0:m.openCount)??T.openCount,R=(h==null?void 0:h.items)??[],M=new Map;for(const U of R){const P=U.obligationId;if(P){const F=M.get(P);F?F.push(U):M.set(P,[U])}}return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("section",{children:[f.jsx(so,{label:`Obligations (${D} open)`}),(m==null?void 0:m.primarySelectionReason)&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Primary: ",m.primarySelectionReason]}),E.length>0?f.jsx("div",{className:"mt-3 space-y-3",children:E.map(U=>{const P=M.get(U.id)??[],F=mC(U)?U:null,W=(F==null?void 0:F.isPrimary)??!1,re=(F==null?void 0:F.meaning)??null,B=U.origin;return f.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${W?"bg-ouro-glow/5 ring-ouro-glow/20":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-start gap-2",children:[W&&f.jsx(xe,{color:"lime",children:"primary"}),f.jsx(xe,{color:U.status==="pending"?"yellow":U.status==="fulfilled"?"lime":"zinc",children:U.status}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:pt(U.content,120)})]}),B&&f.jsxs("button",{onClick:()=>d({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"mt-2 flex w-full items-center gap-2 rounded-md bg-ouro-moss/8 px-2.5 py-1.5 text-left text-xs ring-1 ring-ouro-moss/10 hover:ring-ouro-glow/20 transition-colors",children:[f.jsx("span",{className:"text-ouro-shadow",children:"from"}),f.jsx("span",{className:"font-medium text-ouro-glow",children:B.channel}),f.jsx("span",{className:"text-ouro-shadow",children:"→"}),f.jsx("span",{className:"text-ouro-mist truncate",children:B.key}),f.jsx("span",{className:"ml-auto text-ouro-shadow",children:"open session →"})]}),U.currentSurface&&f.jsxs("div",{className:"mt-1 text-xs text-ouro-mist",children:["surface: ",f.jsx("span",{className:"text-ouro-bone",children:U.currentSurface.kind})," — ",U.currentSurface.label]}),(re==null?void 0:re.waitingOn)&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Waiting on: ",re.waitingOn]}),P.length>0&&f.jsxs("div",{className:"mt-2 space-y-1",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Linked coding"}),P.map(Z=>f.jsxs("div",{className:"flex items-center gap-2 rounded bg-ouro-moss/10 px-2 py-1 text-xs",children:[f.jsx(xe,{color:Z.status==="failed"?"red":Z.status==="running"?"lime":"zinc",children:Z.status}),f.jsxs("span",{className:"text-ouro-mist truncate",children:[Z.runner," — ",Z.workdir]})]},Z.id))]}),U.nextAction&&f.jsxs("p",{className:"mt-1.5 text-xs text-ouro-mist",children:["Next: ",U.nextAction]}),f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:et(U.updatedAt)})]},U.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No open obligations."})]}),x&&x.steps.length>0&&f.jsxs("section",{children:[f.jsx(so,{label:`Self-fix ${x.active?"(active)":"(inactive)"}`}),x.currentStep&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-glow",children:["Current: ",x.currentStep]}),f.jsx("div",{className:"mt-3 space-y-1.5",children:x.steps.map((U,P)=>f.jsxs("div",{className:`flex items-center gap-2.5 rounded-lg px-3 py-2 ring-1 ${U.status==="active"?"bg-ouro-glow/5 ring-ouro-glow/20":U.status==="done"?"bg-ouro-void/40 ring-ouro-glow/10":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[f.jsx(xe,{color:U.status==="done"?"lime":U.status==="active"?"yellow":(U.status==="skipped","zinc"),children:U.status}),f.jsx("span",{className:`text-sm ${U.status==="active"?"font-medium text-ouro-bone":"text-ouro-mist"}`,children:U.label}),U.detail&&f.jsx("span",{className:"ml-auto text-xs text-ouro-shadow",children:U.detail})]},P))})]}),f.jsxs("section",{children:[f.jsx(so,{label:`Coding lanes (${R.length})`}),R.length>0?f.jsx("div",{className:"mt-3 space-y-2",children:R.map(U=>{const P=U.status,F=P==="failed",W=U.failure,re=U.obligationId,B=U.originSession;return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:F?"red":P==="running"?"lime":P==="completed"?"zinc":"yellow",children:P}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:U.runner}),f.jsx("span",{className:"truncate text-xs text-ouro-shadow",children:U.workdir})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-2",children:[re&&f.jsxs("button",{onClick:()=>d({tab:"work",focus:re}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",re.slice(0,20),"…"]}),U.taskRef&&f.jsxs("span",{className:"text-xs text-ouro-glow",children:["task: ",U.taskRef]}),B&&f.jsx("button",{onClick:()=>{d({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`})},className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:"origin session"})]}),U.checkpoint&&f.jsx("p",{className:"mt-1.5 text-xs text-ouro-mist",children:pt(U.checkpoint,100)}),f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["pid ",U.pid??"–"," · restarts ",U.restartCount," · ",et(U.lastActivityAt)]}),F&&W&&f.jsxs("div",{className:"mt-2 rounded bg-ouro-fang/5 p-2 text-xs ring-1 ring-ouro-fang/15",children:[f.jsx("span",{className:"font-semibold text-ouro-fang",children:"FAILURE:"})," ",f.jsxs("span",{className:"text-ouro-mist",children:[W.command," exited ",String(W.code??W.signal)]}),W.stderrTail&&f.jsx("pre",{className:"mt-1 max-h-20 overflow-y-auto font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap",children:W.stderrTail})]})]},U.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No coding sessions."})]}),f.jsxs("section",{children:[f.jsx(so,{label:`Tasks (${j.liveCount} live, ${j.blockedCount} blocked)`}),((V=j.liveTaskNames)==null?void 0:V.length)>0?f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:j.liveTaskNames.map(U=>f.jsx(xe,{children:U},U))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No live tasks."}),((z=j.actionRequired)==null?void 0:z.length)>0&&f.jsxs("div",{className:"mt-3",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Action required"}),f.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:j.actionRequired.map(U=>f.jsx(xe,{color:"red",children:U},U))})]})]})]})}function so({label:n}){return f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function mC(n){return"isPrimary"in n}function pC({agentName:n,focus:a,onFocusConsumed:s,refreshGeneration:r}){const u=Pi(),[d,h]=w.useState(null),[p,m]=w.useState(null),[g,x]=w.useState(null);w.useEffect(()=>{const j=`/agents/${encodeURIComponent(n)}`;Promise.all([_e(`${j}/attention`).then(h),_e(`${j}/bridges`).then(m),_e(`${j}/friends`).then(x)])},[n,r]);const y=(d==null?void 0:d.queueItems)??[],S=(p==null?void 0:p.items)??[],T=(g==null?void 0:g.friends)??[];return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("section",{children:[f.jsx(Uf,{label:`Who is waiting (${(d==null?void 0:d.queueLength)??0})`}),y.length>0?f.jsx("div",{className:"mt-3 space-y-2",children:y.map((j,E)=>{const D=j.bridgeId,R=j.obligationId;return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:()=>u({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:j.friendName}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:["via ",j.channel]}),f.jsxs(xe,{color:"yellow",children:["waiting ",et(new Date(j.timestamp).toISOString())]})]}),f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:pt(j.delegatedContent,140)}),f.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-2 text-xs",children:[D&&f.jsxs("button",{onClick:()=>u({tab:"connections",focus:D}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["bridge: ",D.slice(0,12),"…"]}),R&&f.jsxs("button",{onClick:()=>u({tab:"work",focus:R}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",R.slice(0,16),"…"]})]})]},E)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"Nobody waiting."})]}),f.jsxs("section",{children:[f.jsx(Uf,{label:`Bridges (${(p==null?void 0:p.totalCount)??0})`}),S.length>0?f.jsx("div",{className:"mt-3 space-y-3",children:S.map(j=>{const E=j.attachedSessions,D=j.task,R=j.lifecycle==="active";return f.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${R?"bg-ouro-moss/10 ring-ouro-glow/12":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(xe,{color:R?"lime":"zinc",children:j.lifecycle}),f.jsx("p",{className:"font-medium text-ouro-bone",children:j.objective})]}),j.summary&&f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:pt(j.summary,160)}),E.length>0&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:E.map((M,V)=>f.jsxs("button",{onClick:()=>u({tab:"sessions",focus:`${M.friendId}/${M.channel}/${M.key}`}),className:"rounded-md bg-ouro-moss/10 px-2 py-0.5 font-mono text-[11px] text-ouro-glow ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/25 transition-colors",children:[M.friendId,"/",M.channel,"/",M.key]},V))}),D&&f.jsxs("p",{className:"mt-1.5 text-xs",children:[f.jsxs("button",{onClick:()=>u({tab:"work"}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["task: ",D.taskName]}),f.jsxs("span",{className:"text-ouro-shadow",children:[" (",D.mode,")"]})]}),f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:et(j.updatedAt)})]},j.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No bridges."})]}),f.jsxs("section",{children:[f.jsx(Uf,{label:`Friends (${(g==null?void 0:g.totalFriends)??0})`}),T.length>0?f.jsx("div",{className:"mt-3 space-y-1.5",children:T.map(j=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("button",{onClick:()=>u({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:j.friendName}),f.jsxs("p",{className:"text-xs text-ouro-shadow",children:[j.channels.join(", ")," · ",j.sessionCount," sessions",j.lastActivityAt&&f.jsxs(f.Fragment,{children:[" · ",et(j.lastActivityAt)]})]})]}),f.jsxs("div",{className:"shrink-0 text-right",children:[f.jsx("p",{className:"tabular-nums text-sm font-medium text-ouro-bone",children:j.totalTokens.toLocaleString()}),f.jsx("p",{className:"text-[10px] text-ouro-shadow",children:"tokens"})]})]},j.friendId))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No friends."})]})]})}function Uf({label:n}){return f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function gC(n){return Xb(n)}function el(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(gC(n)))}function vC({agentName:n,view:a,refreshGeneration:s}){const r=Pi(),[u,d]=w.useState(null),[h,p]=w.useState(null),[m,g]=w.useState(!1),x=w.useRef(null),y=a.inner;w.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/habits`).then(d)},[n,s]),w.useEffect(()=>{h&&x.current!==s&&(x.current=s,_e(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(p))},[n,s,h!==null]);function S(){if(h){g(!m);return}_e(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(z=>{x.current=s,p(z),g(!0)})}const T=(u==null?void 0:u.items)??[],j=T.filter(z=>z.isOverdue),E=T.filter(z=>z.status==="active"&&!z.isOverdue),D=T.filter(z=>z.status==="paused"),R=y.mode==="deep"?y.origin:null,M=y.mode==="deep"?y.obligationStatus:null,V=T.find(z=>z.name.toLowerCase()==="heartbeat");return f.jsxs("div",{className:"space-y-8",children:[V&&f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Heartbeat"}),f.jsx("div",{className:`mt-2 rounded-xl p-4 ring-1 ${V.isOverdue?"bg-ouro-fang/5 ring-ouro-fang/15":"bg-ouro-moss/10 ring-ouro-glow/10"}`,children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${V.isOverdue?"bg-ouro-fang animate-pulse":"bg-ouro-glow"}`}),f.jsx("span",{className:"font-medium text-ouro-bone",children:V.isOverdue?"Overdue":"Healthy"}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:["every ",V.cadence??"unknown"," · last ",V.lastRun?et(V.lastRun):"never"]})]})})]}),f.jsx("section",{children:f.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Inner work"}),f.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone",children:y.status}),y.summary&&f.jsx("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:y.summary}),f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:y.hasPending?"Pending inner work queued.":"No pending inner work."}),R&&f.jsxs("div",{className:"mt-3",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Triggered from"}),f.jsxs("button",{onClick:()=>{r({tab:"sessions",focus:`${R.friendId}/${R.channel}/${R.key}`})},className:"mt-1 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:[R.friendId.slice(0,8),"…/",R.channel,"/",R.key]}),M&&f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"ml-2 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",M]})]})]})}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Inner dialog ",h?`(${h.messages.length} total)`:""]}),h?f.jsx(xC,{messages:h.messages}):f.jsx("button",{onClick:S,className:"mt-2 w-full rounded-lg px-3 py-2.5 text-left font-mono text-xs text-ouro-glow ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:"Load inner dialog"})]}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Habits (",(u==null?void 0:u.totalCount)??0,")"]}),j.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-fang mb-1.5",children:["Overdue (",j.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:j.map(z=>f.jsx(Bf,{h:z},z.name))})]}),E.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow mb-1.5",children:["Running fine (",E.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:E.map(z=>f.jsx(Bf,{h:z},z.name))})]}),D.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow mb-1.5",children:["Paused (",D.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:D.map(z=>f.jsx(Bf,{h:z},z.name))})]}),T.length===0&&f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No habits configured."})]})]})}function xC({messages:n}){const a=n.filter(g=>g.role!=="system"&&g.role!=="tool"),[s,r]=w.useState(!1),u=w.useRef(null),d=s?a:a.slice(-30),h=a.length-d.length;w.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[d.length]);const p=[];for(const g of a){if(g.role!=="assistant")continue;const x=(g.toolCalls??[]).map(jd);for(const y of x)y.kind==="surface"&&p.push({index:g.sequence,kind:"surfaced",label:pt(y.deliveredText??"",40)}),y.kind==="rest"&&p.push({index:g.sequence,kind:"resting",label:"resting"}),y.kind==="delegation"&&p.push({index:g.sequence,kind:"delegated",label:"continued thinking"})}function m(g){var y;const x=(y=u.current)==null?void 0:y.querySelector(`[data-msg-index="${g}"]`);x&&x.scrollIntoView({behavior:"smooth",block:"center"})}return f.jsxs("div",{children:[p.length>0&&f.jsx("div",{className:"mt-2 mb-1 flex flex-wrap gap-1",children:p.map((g,x)=>f.jsxs("button",{onClick:()=>{r(!0),setTimeout(()=>m(g.index),100)},className:`rounded-md px-2 py-0.5 text-[10px] font-mono ring-1 transition-colors ${g.kind==="surfaced"?"bg-ouro-scale/10 text-ouro-glow ring-ouro-scale/20 hover:ring-ouro-glow/30":g.kind==="resting"?"bg-ouro-void/40 text-ouro-shadow ring-ouro-moss/10":"bg-ouro-gold/5 text-ouro-gold ring-ouro-gold/10"}`,children:[g.kind==="surfaced"?"★":g.kind==="resting"?"—":"→"," #",g.index]},x))}),f.jsxs("div",{ref:u,className:"max-h-[60vh] overflow-y-auto rounded-lg bg-ouro-void/60 p-3 ring-1 ring-ouro-moss/15 space-y-1",children:[h>0&&f.jsxs("button",{onClick:()=>r(!0),className:"w-full rounded-lg px-3 py-2 text-center font-mono text-xs text-ouro-shadow hover:text-ouro-mist ring-1 ring-ouro-moss/10 hover:ring-ouro-moss/20 transition-colors mb-2",children:["Load ",h," earlier messages"]}),d.map(g=>{const x=Ml(g);if(g.role==="user"){const y=x.includes("[pending from")||x.includes("[delegated"),S=x.includes("waking up")||x.includes("world-state checkpoint");return f.jsx("div",{"data-msg-index":g.sequence,className:"flex justify-start py-1",children:f.jsxs("div",{className:`max-w-[85%] rounded-2xl rounded-bl-sm px-3 py-2 ring-1 ${y?"bg-ouro-gold/8 ring-ouro-gold/15":S?"bg-ouro-moss/20 ring-ouro-moss/15":"bg-ouro-moss/25 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider",style:{color:y?"var(--color-ouro-gold)":"var(--color-ouro-shadow)"},children:y?"★ delegated":S?"heartbeat":"prompt"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",g.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(g)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:x})]})},g.id)}if(g.role==="assistant"){const y=(g.toolCalls??[]).map(jd),S=y.filter(E=>E.kind==="surface"),T=y.filter(E=>E.kind==="rest"),j=y.filter(E=>E.kind==="delegation");return f.jsxs("div",{"data-msg-index":g.sequence,children:[S.map(E=>f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-scale/15 px-3 py-2 ring-1 ring-ouro-scale/20",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow",children:"★ surfaced outward"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",g.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(g)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:E.deliveredText}),E.metadata&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",E.metadata]})]})},E.id)),j.length>0&&f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-gold/50",children:["— still thinking — #",g.sequence," · ",el(g)]}),T.length>0&&f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/40",children:["— resting — #",g.sequence," · ",el(g)]}),S.length===0&&T.length===0&&j.length===0&&x&&f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-glow/6 px-3 py-2 ring-1 ring-ouro-glow/8",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/50",children:"thinking"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",g.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(g)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-mist whitespace-pre-wrap break-words",children:x})]})})]},g.id)}return null})]})]})}function Bf({h:n}){const a=n.isOverdue,s=n.isDegraded,r=n.status;return f.jsxs("div",{className:`rounded-lg px-3 py-2.5 ring-1 ${a?"bg-ouro-fang/5 ring-ouro-fang/15":s?"bg-ouro-gold/5 ring-ouro-gold/15":r==="paused"?"bg-ouro-void/30 ring-ouro-moss/10":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:a?"red":s?"yellow":r==="active"?"lime":"zinc",children:a?"overdue":s?"degraded":r}),f.jsx("span",{className:"font-medium text-ouro-bone",children:n.title})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-3 text-xs text-ouro-shadow",children:[n.cadence&&f.jsxs("span",{children:["every ",n.cadence]}),f.jsx("span",{children:n.lastRun?`last ${et(n.lastRun)}`:"never run"}),s&&n.degradedReason&&f.jsx("span",{className:"text-ouro-gold",children:n.degradedReason}),!a&&!s&&r==="active"&&n.lastRun&&f.jsx("span",{className:"text-ouro-glow",children:"on schedule"}),a&&n.overdueMs&&f.jsxs("span",{className:"text-ouro-fang",children:[Math.floor(n.overdueMs/6e4),"m overdue"]}),!n.lastRun&&r==="active"&&f.jsx("span",{className:"text-ouro-gold",children:"never fired — may be misconfigured"})]}),n.bodyExcerpt&&f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow/70",children:n.bodyExcerpt})]})}function yC({agentName:n,refreshGeneration:a}){const[s,r]=w.useState(null),[u,d]=w.useState(null),[h,p]=w.useState("diary");if(w.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/notes`).then(r),_e(`/agents/${encodeURIComponent(n)}/note-decisions`).then(d).catch(()=>{})},[n,a]),!s)return f.jsxs("div",{className:"flex items-center gap-2 py-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),f.jsx("span",{className:"font-mono text-xs text-ouro-shadow",children:"Loading…"})]});const m=s.recentDiaryEntries,g=s.recentJournalEntries;return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{onClick:()=>p("diary"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="diary"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Diary (",s.diaryEntryCount,")"]}),f.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),f.jsxs("button",{onClick:()=>p("journal"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="journal"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Journal (",s.journalEntryCount,")"]}),f.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),f.jsxs("button",{onClick:()=>p("decisions"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="decisions"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Decisions (",(u==null?void 0:u.totalCount)??0,")"]})]}),h==="diary"&&f.jsx("div",{children:m.length>0?f.jsx("div",{className:"space-y-3",children:m.map(x=>f.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone",children:x.text}),f.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-ouro-shadow",children:[f.jsx(xe,{children:x.source}),f.jsx("span",{children:et(x.createdAt)})]})]},x.id))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No diary entries yet. The agent hasn't written anything down."})}),h==="journal"&&f.jsx("div",{children:g.length>0?f.jsx("div",{className:"space-y-3",children:g.map(x=>f.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-medium text-ouro-bone",children:x.filename}),f.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-mist",children:x.preview})]},x.filename))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No journal entries yet."})}),h==="decisions"&&f.jsx("div",{children:u&&u.items.length>0?f.jsx("div",{className:"space-y-2",children:u.items.map((x,y)=>f.jsxs("div",{className:"rounded-xl bg-ouro-void/40 px-4 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:x.decision==="saved"?"lime":"zinc",children:x.decision}),f.jsx(xe,{children:x.kind.replace(/_/g," ")}),f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(x.timestamp)})]}),x.reason&&f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:x.reason}),x.excerpt&&f.jsx("p",{className:"mt-0.5 text-xs text-ouro-shadow italic truncate",children:x.excerpt})]},y))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No note decisions logged yet."})})]})}function bC({agentName:n,view:a,refreshGeneration:s}){var j;const[r,u]=w.useState(null),[d,h]=w.useState(null),p=a.agent,m=p.degraded,g=p.freshness,x=((j=p.providers)==null?void 0:j.lanes)??[];w.useEffect(()=>{Promise.all([_e("/machine/health").then(u).catch(()=>null),_e("/machine/logs").then(h).catch(()=>null)])},[n,s]);const y=CC(r)?r:null,S=(y==null?void 0:y.degradedComponents)??[],T=(d==null?void 0:d.entries)??[];return f.jsxs("div",{className:"space-y-8",children:[m.status==="degraded"&&m.issues.length>0&&f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-fang",children:["Agent issues (",m.issues.length,")"]}),f.jsx("div",{className:"mt-3 space-y-1.5",children:m.issues.map((E,D)=>f.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2.5 ring-1 ring-ouro-fang/15",children:[f.jsx("p",{className:"font-mono text-xs font-semibold text-ouro-fang",children:E.code}),f.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist break-all",children:E.detail})]},D))})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Agent config"}),f.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[f.jsx(Hi,{label:"Provider lanes",value:SC(x)}),f.jsx(Hi,{label:"Enabled",value:p.enabled?"yes":"no"}),f.jsx(Hi,{label:"Freshness",value:`${g.status}${g.ageMs!=null?` (${Math.floor(g.ageMs/6e4)}m)`:""}`})]})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Provider lanes"}),x.length>0?f.jsx("div",{className:"mt-3 grid gap-2 lg:grid-cols-2",children:x.map(E=>{const D=EC(E);return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("p",{className:"font-mono text-xs font-semibold uppercase tracking-wider text-ouro-bone",children:E.lane}),f.jsx(xe,{color:NC(E),children:E.status}),f.jsx(xe,{color:AC(E.readiness.status),children:E.readiness.status})]}),f.jsx("p",{className:"mt-2 text-sm font-medium text-ouro-bone",children:wC(E)}),f.jsxs("div",{className:"mt-2 space-y-1 text-xs text-ouro-mist",children:[f.jsxs("p",{children:["source: ",E.source]}),f.jsxs("p",{children:["readiness: ",TC(E.readiness)]}),E.readiness.attempts!==void 0&&f.jsxs("p",{children:["attempts: ",E.readiness.attempts]}),E.readiness.checkedAt&&f.jsxs("p",{children:["checked: ",et(E.readiness.checkedAt)]}),f.jsxs("p",{children:["credentials: ",jC(E.credential)]}),E.credential.revision&&f.jsxs("p",{children:["revision: ",E.credential.revision]}),ax(E)&&f.jsxs("p",{children:["reason: ",ax(E)]}),D&&f.jsxs("p",{className:"break-all text-ouro-fang",children:["repair: ",D]}),E.warnings.map((R,M)=>f.jsxs("p",{className:"break-words text-ouro-gold",children:["warning: ",R]},M))]})]},E.lane)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No provider lane data loaded."})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Daemon health"}),y?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[f.jsx(Hi,{label:"Status",value:y.status}),f.jsx(Hi,{label:"Mode",value:y.mode}),f.jsx(Hi,{label:"Uptime",value:`${Math.floor(y.uptimeSeconds/60)}m`})]}),S.length>0&&f.jsxs("div",{className:"mt-3 space-y-1.5",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Degraded components"}),S.map((E,D)=>f.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2 ring-1 ring-ouro-fang/15",children:[f.jsx("p",{className:"text-xs font-semibold text-ouro-fang",children:E.component}),f.jsx("p",{className:"text-xs text-ouro-mist",children:E.reason})]},D))]})]}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No health file found. This is normal when not running under the daemon."})]}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Recent logs (",(d==null?void 0:d.totalLines)??0," total)"]}),T.length>0?f.jsx("div",{className:"mt-3 max-h-96 overflow-y-auto rounded-lg bg-ouro-void/40 ring-1 ring-ouro-moss/15",children:[...T].reverse().slice(0,50).map((E,D)=>{const R=E.level;return f.jsxs("div",{className:"border-b border-ouro-moss/10 px-3 py-1.5 last:border-b-0",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx(xe,{color:R==="error"?"red":R==="warn"?"yellow":"zinc",children:R}),f.jsx("span",{className:"text-ouro-shadow",children:et(E.ts)}),f.jsx("span",{className:"font-mono text-ouro-glow",children:E.event})]}),f.jsx("p",{className:"truncate text-xs text-ouro-mist",children:E.message})]},D)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No log entries."})]})]})}function Hi({label:n,value:a}){return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),f.jsx("p",{className:"mt-1 text-sm font-medium text-ouro-bone",children:a})]})}function SC(n){return n.length===0?"none":`${n.filter(s=>s.status==="configured").length}/${n.length} configured`}function wC(n){return n.status==="unconfigured"?"unconfigured":`${n.provider} / ${n.model}`}function TC(n){return n.status==="failed"?n.error?`failed: ${n.error}`:"failed":n.status==="stale"?n.reason?`stale: ${n.reason}`:"stale":n.status==="unknown"?n.reason?`unknown: ${n.reason}`:"unknown":n.status}function jC(n){return n.status==="present"?n.source??"vault":n.status==="invalid-pool"?"vault unavailable":"missing"}function EC(n){return n.status==="unconfigured"?n.repairCommand:n.credential.repairCommand}function ax(n){return n.status==="unconfigured"?n.reason:n.readiness.reason}function NC(n){return n.status==="configured"?"green":"yellow"}function AC(n){return n==="ready"?"green":n==="failed"?"red":n==="stale"?"amber":"zinc"}function CC(n){return!!(n&&"degradedComponents"in n)}const Hf=[{id:"overview",label:"Overview"},{id:"mail",label:"Mailbox"},{id:"sessions",label:"Sessions"},{id:"work",label:"Work"},{id:"connections",label:"Connections"},{id:"inner",label:"Inner"},{id:"notes",label:"Diary & Journal"},{id:"runtime",label:"Runtime"}];function MC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function DC({agentName:n,view:a,deskPrefs:s,refreshGeneration:r,initialRoute:u}){const[d,h]=w.useState((u==null?void 0:u.tab)??"overview"),[p,m]=w.useState(u==null?void 0:u.focus),g=w.useRef(!1);w.useEffect(()=>{(u==null?void 0:u.agent)===n&&!g.current?(g.current=!0,h(u.tab),m(u.focus)):(h("overview"),m(void 0))},[n]);const x=w.useCallback(E=>{h(E.tab),m(E.focus),window.history.pushState(null,"",$f({agent:n,tab:E.tab,focus:E.focus}))},[n]),y=w.useCallback(E=>{h(E),m(void 0),window.history.pushState(null,"",$f({agent:n,tab:E,focus:void 0}))},[n]),S=w.useCallback(()=>m(void 0),[]);if(R3(x),!a||!n)return f.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[f.jsx("p",{className:"font-display text-2xl italic text-ouro-bone",children:"Choose an agent"}),f.jsx("p",{className:"mt-2 text-sm text-ouro-mist",children:"Select an agent from the sidebar to inspect its state."})]});const j=a.agent.attention;return f.jsx(rx.Provider,{value:x,children:f.jsxs("div",{children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-4 border-b border-ouro-moss/30",children:[f.jsx("div",{className:"min-w-0",children:f.jsx("h1",{className:"font-display text-2xl italic font-semibold text-ouro-bone sm:text-3xl",children:n})}),f.jsx(xe,{color:MC(j.level),children:j.label})]}),f.jsx("nav",{className:"mt-4 flex gap-0.5 overflow-x-auto border-b border-ouro-moss/20 -mx-1",children:(()=>{const E=s==null?void 0:s.tabOrder;if(!E)return Hf;const D=E.map(M=>Hf.find(V=>V.id===M)).filter(M=>M!==void 0),R=Hf.filter(M=>!E.includes(M.id));return[...D,...R]})().map(E=>f.jsx("button",{type:"button",onClick:()=>y(E.id),className:`shrink-0 px-3 py-2 text-xs font-mono uppercase tracking-wider transition-colors rounded-t-md ${d===E.id?"bg-ouro-moss/20 text-ouro-glow border-b-2 border-ouro-glow":"text-ouro-shadow hover:text-ouro-mist hover:bg-ouro-moss/10"}`,children:E.label},E.id))}),f.jsxs("div",{className:"mt-6",children:[d==="overview"&&f.jsx(B3,{view:a,deskPrefs:s,refreshGeneration:r}),d==="mail"&&f.jsx(X3,{agentName:n,focus:p,onFocusConsumed:S,refreshGeneration:r}),d==="sessions"&&f.jsx(rC,{agentName:n,focus:p,onFocusConsumed:S,deskPrefs:s,refreshGeneration:r}),d==="work"&&f.jsx(hC,{agentName:n,view:a,focus:p,onFocusConsumed:S,refreshGeneration:r}),d==="connections"&&f.jsx(pC,{agentName:n,focus:p,onFocusConsumed:S,refreshGeneration:r}),d==="inner"&&f.jsx(vC,{agentName:n,view:a,refreshGeneration:r}),d==="notes"&&f.jsx(yC,{agentName:n,refreshGeneration:r}),d==="runtime"&&f.jsx(bC,{agentName:n,view:a,refreshGeneration:r})]})]})})}function ix(){return ox(window.location.hash)}function OC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function RC(){var D,R;const[n,a]=w.useState(null),[s,r]=w.useState(((D=ix())==null?void 0:D.agent)??""),[u,d]=w.useState(null),[h,p]=w.useState(0),m=w.useRef(0),g=w.useRef(ix()),x=w.useCallback(async()=>{var M;try{const V=await _e("/machine");if(a(V),!s&&V.agents.length>0){const z=((M=g.current)==null?void 0:M.agent)??V.agents[0].agentName;r(z)}}catch{}},[s]),[y,S]=w.useState(null),T=w.useCallback(async M=>{if(!M){d(null),S(null);return}try{const[V,z]=await Promise.all([_e(`/agents/${encodeURIComponent(M)}`),_e(`/agents/${encodeURIComponent(M)}/desk-prefs`)]);d(V),S(z)}catch{d(null),S(null)}},[]);w.useEffect(()=>{x()},[x]),w.useEffect(()=>{s&&T(s)},[s,T]),w.useEffect(()=>C2(()=>{const V=++m.current;x().then(async()=>{m.current===V&&(s&&(await T(s),m.current!==V)||p(z=>z+1))})}),[x,T,s]),w.useEffect(()=>{const M=()=>{const V=ox(window.location.hash);V&&r(V.agent)};return window.addEventListener("hashchange",M),()=>window.removeEventListener("hashchange",M)},[]);const j=w.useCallback(M=>{r(M),window.history.pushState(null,"",$f({agent:M,tab:"overview",focus:void 0}))},[]);if(!n)return f.jsx("div",{className:"flex h-screen items-center justify-center bg-ouro-void",children:f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:"mx-auto mb-4 h-4 w-4 animate-pulse rounded-full bg-ouro-glow shadow-[0_0_20px_theme(--color-ouro-glow)]"}),f.jsx("p",{className:"font-mono text-sm text-ouro-mist",children:"Connecting to Outlook…"})]})});const E=n.overview.totals;return f.jsx(j3,{navbar:f.jsxs(x3,{children:[f.jsx(b3,{}),f.jsx(y3,{children:f.jsx(rh,{children:f.jsx(xe,{color:n.overview.daemon.mode==="dev"?"yellow":"lime",children:n.overview.daemon.mode})})})]}),sidebar:f.jsxs(E3,{className:"bg-ouro-deep",children:[f.jsx(N3,{className:"border-ouro-moss/30",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"h-3 w-3 shrink-0 rounded-full bg-ouro-glow shadow-[0_0_16px_theme(--color-ouro-glow)]"}),f.jsx("div",{className:"min-w-0",children:f.jsx("p",{className:"truncate font-display text-lg italic font-semibold text-ouro-bone",children:"Ouro Outlook"})})]})}),f.jsxs(A3,{className:"[&>[data-slot=section]+[data-slot=section]]:mt-4",children:[f.jsxs(W0,{children:[f.jsx(I0,{className:"text-ouro-mist/60",children:"Machine"}),f.jsx("div",{className:"grid grid-cols-3 gap-1.5 px-2",children:[{v:E.liveTasks??0,l:"Tasks",alert:(E.blockedTasks??0)>0},{v:E.openObligations??0,l:"Oblig."},{v:E.activeCodingAgents??0,l:"Coding"}].map(M=>f.jsxs("div",{className:"rounded-md bg-ouro-void/60 px-2 py-1.5 text-center ring-1 ring-ouro-moss/20",children:[f.jsx("div",{className:`text-base font-semibold tabular-nums ${M.alert?"text-ouro-fang":"text-ouro-bone"}`,children:M.v}),f.jsx("div",{className:"text-[9px] uppercase tracking-widest text-ouro-shadow",children:M.l})]},M.l))})]}),f.jsxs(W0,{children:[f.jsx(I0,{className:"text-ouro-mist/60",children:"Agents"}),n.agents.map(M=>f.jsx(M3,{current:M.agentName===s,onClick:()=>j(M.agentName),children:f.jsxs("div",{className:"flex min-w-0 flex-1 items-center justify-between gap-2",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx(D3,{className:"text-ouro-bone",children:M.agentName}),f.jsxs("p",{className:"truncate text-xs text-ouro-shadow",children:[M.tasks.liveCount,"t · ",M.obligations.openCount,"o · ",M.coding.activeCount,"c"]})]}),f.jsx(xe,{color:OC(M.attention.level),children:M.attention.label})]})},M.agentName))]})]}),f.jsx(C3,{className:"border-ouro-moss/30",children:f.jsxs("div",{className:"px-2 text-xs text-ouro-shadow",children:[f.jsx("p",{className:"font-mono",children:n.overview.runtime.version}),f.jsxs("p",{className:"mt-0.5",children:[n.overview.daemon.mode," · ",n.overview.freshness.status]})]})}),s&&u&&f.jsx("div",{className:"px-4 py-2 border-t border-ouro-moss/20",children:f.jsx("p",{className:"text-xs italic text-ouro-shadow/70",children:(()=>{const M=y==null?void 0:y.statusLine;if(M)return M;const V=u.inner;if(V.status==="running"||V.hasPending)return"thinking through something privately";const U=u.work.obligations.openCount;return U>2?"a few loose ends":U>0?"carrying something":"steady"})()})})]}),children:f.jsx(DC,{agentName:s,view:u,deskPrefs:y,refreshGeneration:h,initialRoute:((R=g.current)==null?void 0:R.agent)===s?g.current:void 0})})}A2.createRoot(document.getElementById("app")).render(f.jsx(w.StrictMode,{children:f.jsx(RC,{})}));
|
|
60
|
+
*/var Ev;function qw(){if(Ev)return bf;Ev=1;var n=Mo();function a(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var s=typeof Object.is=="function"?Object.is:a,r=n.useSyncExternalStore,u=n.useRef,d=n.useEffect,h=n.useMemo,p=n.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(m,g,x,y,S){var w=u(null);if(w.current===null){var j={hasValue:!1,value:null};w.current=j}else j=w.current;w=h(function(){function D(U){if(!R){if(R=!0,M=U,U=y(U),S!==void 0&&j.hasValue){var P=j.value;if(S(P,U))return z=P}return z=U}if(P=z,s(M,U))return P;var F=y(U);return S!==void 0&&S(P,F)?(M=U,P):(M=U,z=F)}var R=!1,M,z,k=x===void 0?null:x;return[function(){return D(g())},k===null?void 0:function(){return D(k())}]},[g,x,y,S]);var E=r(m,w[0],w[1]);return d(function(){j.hasValue=!0,j.value=E},[E]),p(E),E},bf}var Nv;function Yw(){return Nv||(Nv=1,yf.exports=qw()),yf.exports}var Gw=Yw();function kx(n,a,s=Ox){return Gw.useSyncExternalStoreWithSelector(Me(r=>n.subscribe(Xw,r)),Me(()=>n.state),Me(()=>n.state),Me(a),s)}function Xw(n){return n}function jl(n,a){let s=T.useId(),r=zx.get(a),[u,d]=kx(r,T.useCallback(h=>[r.selectors.isTop(h,s),r.selectors.inStack(h,s)],[r,s]));return Nt(()=>{if(n)return r.actions.push(s),()=>r.actions.pop(s)},[r,n,s]),n?d?u:!0:!1}let Pf=new Map,ul=new Map;function Av(n){var a;let s=(a=ul.get(n))!=null?a:0;return ul.set(n,s+1),s!==0?()=>Cv(n):(Pf.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>Cv(n))}function Cv(n){var a;let s=(a=ul.get(n))!=null?a:1;if(s===1?ul.delete(n):ul.set(n,s-1),s!==1)return;let r=Pf.get(n);r&&(r["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",r["aria-hidden"]),n.inert=r.inert,Pf.delete(n))}function Kw(n,{allowed:a,disallowed:s}={}){let r=jl(n,"inert-others");Nt(()=>{var u,d;if(!r)return;let h=Un();for(let m of(u=s==null?void 0:s())!=null?u:[])m&&h.add(Av(m));let p=(d=a==null?void 0:a())!=null?d:[];for(let m of p){if(!m)continue;let g=Wi(m);if(!g)continue;let x=m.parentElement;for(;x&&x!==g.body;){for(let y of x.children)p.some(S=>y.contains(S))||h.add(Av(y));x=x.parentElement}}return h.dispose},[r,a,s])}function Fw(n,a,s){let r=ei(u=>{let d=u.getBoundingClientRect();d.x===0&&d.y===0&&d.width===0&&d.height===0&&s()});T.useEffect(()=>{if(!n)return;let u=a===null?null:Ia(a)?a:a.current;if(!u)return;let d=Un();if(typeof ResizeObserver<"u"){let h=new ResizeObserver(()=>r.current(u));h.observe(u),d.add(()=>h.disconnect())}if(typeof IntersectionObserver<"u"){let h=new IntersectionObserver(()=>r.current(u));h.observe(u),d.add(()=>h.disconnect())}return()=>d.dispose()},[a,r,n])}let xo=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),Zw=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var Ln=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(Ln||{}),Jf=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Jf||{}),Qw=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Qw||{});function Pw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(xo)).sort((a,s)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(s.tabIndex||Number.MAX_SAFE_INTEGER)))}function Jw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Zw)).sort((a,s)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(s.tabIndex||Number.MAX_SAFE_INTEGER)))}var Lx=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Lx||{});function Ww(n,a=0){var s;return n===((s=Wi(n))==null?void 0:s.body)?!1:_n(a,{0(){return n.matches(xo)},1(){let r=n;for(;r!==null;){if(r.matches(xo))return!0;r=r.parentElement}return!1}})}var Iw=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Iw||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Vn(n){n==null||n.focus({preventScroll:!0})}let eT=["textarea","input"].join(",");function tT(n){var a,s;return(s=(a=n==null?void 0:n.matches)==null?void 0:a.call(n,eT))!=null?s:!1}function nT(n,a=s=>s){return n.slice().sort((s,r)=>{let u=a(s),d=a(r);if(u===null||d===null)return 0;let h=u.compareDocumentPosition(d);return h&Node.DOCUMENT_POSITION_FOLLOWING?-1:h&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function cl(n,a,{sorted:s=!0,relativeTo:r=null,skipElements:u=[]}={}){let d=Array.isArray(n)?n.length>0?Ff(n[0]):document:Ff(n),h=Array.isArray(n)?s?nT(n):n:a&64?Jw(n):Pw(n);u.length>0&&h.length>1&&(h=h.filter(w=>!u.some(j=>j!=null&&"current"in j?(j==null?void 0:j.current)===w:j===w))),r=r??(d==null?void 0:d.activeElement);let p=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,h.indexOf(r))-1;if(a&4)return Math.max(0,h.indexOf(r))+1;if(a&8)return h.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=a&32?{preventScroll:!0}:{},x=0,y=h.length,S;do{if(x>=y||x+y<=0)return 0;let w=m+x;if(a&16)w=(w+y)%y;else{if(w<0)return 3;if(w>=y)return 1}S=h[w],S==null||S.focus(g),x+=p}while(S!==bx(S));return a&6&&tT(S)&&S.select(),2}function Vx(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function aT(){return/Android/gi.test(window.navigator.userAgent)}function Mv(){return Vx()||aT()}function Jr(n,a,s,r){let u=ei(s);T.useEffect(()=>{if(!n)return;function d(h){u.current(h)}return document.addEventListener(a,d,r),()=>document.removeEventListener(a,d,r)},[n,a,r])}function _x(n,a,s,r){let u=ei(s);T.useEffect(()=>{if(!n)return;function d(h){u.current(h)}return window.addEventListener(a,d,r),()=>window.removeEventListener(a,d,r)},[n,a,r])}const Dv=30;function iT(n,a,s){let r=ei(s),u=T.useCallback(function(p,m){if(p.defaultPrevented)return;let g=m(p);if(g===null||!g.getRootNode().contains(g)||!g.isConnected)return;let x=(function y(S){return typeof S=="function"?y(S()):Array.isArray(S)||S instanceof Set?S:[S]})(a);for(let y of x)if(y!==null&&(y.contains(g)||p.composed&&p.composedPath().includes(y)))return;return!Ww(g,Lx.Loose)&&g.tabIndex!==-1&&p.preventDefault(),r.current(p,g)},[r,a]),d=T.useRef(null);Jr(n,"pointerdown",p=>{var m,g;Mv()||(d.current=((g=(m=p.composedPath)==null?void 0:m.call(p))==null?void 0:g[0])||p.target)},!0),Jr(n,"pointerup",p=>{if(Mv()||!d.current)return;let m=d.current;return d.current=null,u(p,()=>m)},!0);let h=T.useRef({x:0,y:0});Jr(n,"touchstart",p=>{h.current.x=p.touches[0].clientX,h.current.y=p.touches[0].clientY},!0),Jr(n,"touchend",p=>{let m={x:p.changedTouches[0].clientX,y:p.changedTouches[0].clientY};if(!(Math.abs(m.x-h.current.x)>=Dv||Math.abs(m.y-h.current.y)>=Dv))return u(p,()=>ma(p.target)?p.target:null)},!0),_x(n,"blur",p=>u(p,()=>ww(window.document.activeElement)?window.document.activeElement:null),!0)}function Md(...n){return T.useMemo(()=>Wi(...n),[...n])}function Ux(n,a,s,r){let u=ei(s);T.useEffect(()=>{n=n??window;function d(h){u.current(h)}return n.addEventListener(a,d,r),()=>n.removeEventListener(a,d,r)},[n,a,r])}function sT(n){return T.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function lT(n,a){let s=n(),r=new Set;return{getSnapshot(){return s},subscribe(u){return r.add(u),()=>r.delete(u)},dispatch(u,...d){let h=a[u].call(s,...d);h&&(s=h,r.forEach(p=>p()))}}}function rT(){let n;return{before({doc:a}){var s;let r=a.documentElement,u=(s=a.defaultView)!=null?s:window;n=Math.max(0,u.innerWidth-r.clientWidth)},after({doc:a,d:s}){let r=a.documentElement,u=Math.max(0,r.clientWidth-r.offsetWidth),d=Math.max(0,n-u);s.style(r,"paddingRight",`${d}px`)}}}function oT(){return Vx()?{before({doc:n,d:a,meta:s}){function r(u){for(let d of s().containers)for(let h of d())if(h.contains(u))return!0;return!1}a.microTask(()=>{var u;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let p=Un();p.style(n.documentElement,"scrollBehavior","auto"),a.add(()=>a.microTask(()=>p.dispose()))}let d=(u=window.scrollY)!=null?u:window.pageYOffset,h=null;a.addEventListener(n,"click",p=>{if(ma(p.target))try{let m=p.target.closest("a");if(!m)return;let{hash:g}=new URL(m.href),x=n.querySelector(g);ma(x)&&!r(x)&&(h=x)}catch{}},!0),a.group(p=>{a.addEventListener(n,"touchstart",m=>{if(p.dispose(),ma(m.target)&&Sw(m.target))if(r(m.target)){let g=m.target;for(;g.parentElement&&r(g.parentElement);)g=g.parentElement;p.style(g,"overscrollBehavior","contain")}else p.style(m.target,"touchAction","none")})}),a.addEventListener(n,"touchmove",p=>{if(ma(p.target)){if(Tw(p.target))return;if(r(p.target)){let m=p.target;for(;m.parentElement&&m.dataset.headlessuiPortal!==""&&!(m.scrollHeight>m.clientHeight||m.scrollWidth>m.clientWidth);)m=m.parentElement;m.dataset.headlessuiPortal===""&&p.preventDefault()}else p.preventDefault()}},{passive:!1}),a.add(()=>{var p;let m=(p=window.scrollY)!=null?p:window.pageYOffset;d!==m&&window.scrollTo(0,d),h&&h.isConnected&&(h.scrollIntoView({block:"nearest"}),h=null)})})}}:{}}function uT(){return{before({doc:n,d:a}){a.style(n.documentElement,"overflow","hidden")}}}function Ov(n){let a={};for(let s of n)Object.assign(a,s(a));return a}let Fa=lT(()=>new Map,{PUSH(n,a){var s;let r=(s=this.get(n))!=null?s:{doc:n,count:0,d:Un(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(a),r.computedMeta=Ov(r.meta),this.set(n,r),this},POP(n,a){let s=this.get(n);return s&&(s.count--,s.meta.delete(a),s.computedMeta=Ov(s.meta)),this},SCROLL_PREVENT(n){let a={doc:n.doc,d:n.d,meta(){return n.computedMeta}},s=[oT(),rT(),uT()];s.forEach(({before:r})=>r==null?void 0:r(a)),s.forEach(({after:r})=>r==null?void 0:r(a))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Fa.subscribe(()=>{let n=Fa.getSnapshot(),a=new Map;for(let[s]of n)a.set(s,s.documentElement.style.overflow);for(let s of n.values()){let r=a.get(s.doc)==="hidden",u=s.count!==0;(u&&!r||!u&&r)&&Fa.dispatch(s.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",s),s.count===0&&Fa.dispatch("TEARDOWN",s)}});function cT(n,a,s=()=>({containers:[]})){let r=sT(Fa),u=a?r.get(a):void 0,d=u?u.count>0:!1;return Nt(()=>{if(!(!a||!n))return Fa.dispatch("PUSH",a,s),()=>Fa.dispatch("POP",a,s)},[n,a]),d}function fT(n,a,s=()=>[document.body]){let r=jl(n,"scroll-lock");cT(r,a,u=>{var d;return{containers:[...(d=u.containers)!=null?d:[],s]}})}function dT(n=0){let[a,s]=T.useState(n),r=T.useCallback(m=>s(m),[]),u=T.useCallback(m=>s(g=>g|m),[]),d=T.useCallback(m=>(a&m)===m,[a]),h=T.useCallback(m=>s(g=>g&~m),[]),p=T.useCallback(m=>s(g=>g^m),[]);return{flags:a,setFlag:r,addFlag:u,hasFlag:d,removeFlag:h,toggleFlag:p}}var hT={},Rv,zv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Rv=process==null?void 0:hT)==null?void 0:Rv.NODE_ENV)==="test"&&typeof((zv=Element==null?void 0:Element.prototype)==null?void 0:zv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
61
|
+
`)),[]});var mT=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(mT||{});function pT(n){let a={};for(let s in n)n[s]===!0&&(a[`data-${s}`]="");return a}function gT(n,a,s,r){let[u,d]=T.useState(s),{hasFlag:h,addFlag:p,removeFlag:m}=dT(n&&u?3:0),g=T.useRef(!1),x=T.useRef(!1),y=wl();return Nt(()=>{var S;if(n){if(s&&d(!0),!a){s&&p(3);return}return(S=r==null?void 0:r.start)==null||S.call(r,s),vT(a,{inFlight:g,prepare(){x.current?x.current=!1:x.current=g.current,g.current=!0,!x.current&&(s?(p(3),m(4)):(p(4),m(2)))},run(){x.current?s?(m(3),p(4)):(m(4),p(3)):s?m(1):p(1)},done(){var w;x.current&&bT(a)||(g.current=!1,m(7),s||d(!1),(w=r==null?void 0:r.end)==null||w.call(r,s))}})}},[n,s,a,y]),n?[u,{closed:h(1),enter:h(2),leave:h(4),transition:h(2)||h(4)}]:[s,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function vT(n,{prepare:a,run:s,done:r,inFlight:u}){let d=Un();return yT(n,{prepare:a,inFlight:u}),d.nextFrame(()=>{s(),d.requestAnimationFrame(()=>{d.add(xT(n,r))})}),d.dispose}function xT(n,a){var s,r;let u=Un();if(!n)return u.dispose;let d=!1;u.add(()=>{d=!0});let h=(r=(s=n.getAnimations)==null?void 0:s.call(n).filter(p=>p instanceof CSSTransition))!=null?r:[];return h.length===0?(a(),u.dispose):(Promise.allSettled(h.map(p=>p.finished)).then(()=>{d||a()}),u.dispose)}function yT(n,{inFlight:a,prepare:s}){if(a!=null&&a.current){s();return}let r=n.style.transition;n.style.transition="none",s(),n.offsetHeight,n.style.transition=r}function bT(n){var a,s;return((s=(a=n.getAnimations)==null?void 0:a.call(n))!=null?s:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function Dd(n,a){let s=T.useRef([]),r=Me(n);T.useEffect(()=>{let u=[...s.current];for(let[d,h]of a.entries())if(s.current[d]!==h){let p=r(a,u);return s.current=a,p}},[r,...a])}let Ro=T.createContext(null);Ro.displayName="OpenClosedContext";var an=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(an||{});function zo(){return T.useContext(Ro)}function ST({value:n,children:a}){return ce.createElement(Ro.Provider,{value:n},a)}function wT({children:n}){return ce.createElement(Ro.Provider,{value:null},n)}function TT(n){function a(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let da=[];TT(()=>{function n(a){if(!ma(a.target)||a.target===document.body||da[0]===a.target)return;let s=a.target;s=s.closest(xo),da.unshift(s??a.target),da=da.filter(r=>r!=null&&r.isConnected),da.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function Bx(n){let a=Me(n),s=T.useRef(!1);T.useEffect(()=>(s.current=!1,()=>{s.current=!0,Oo(()=>{s.current&&a()})}),[a])}let Hx=T.createContext(!1);function jT(){return T.useContext(Hx)}function kv(n){return ce.createElement(Hx.Provider,{value:n.force},n.children)}function ET(n){let a=jT(),s=T.useContext(qx),[r,u]=T.useState(()=>{var d;if(!a&&s!==null)return(d=s.current)!=null?d:null;if(hn.isServer)return null;let h=n==null?void 0:n.getElementById("headlessui-portal-root");if(h)return h;if(n===null)return null;let p=n.createElement("div");return p.setAttribute("id","headlessui-portal-root"),n.body.appendChild(p)});return T.useEffect(()=>{r!==null&&(n!=null&&n.body.contains(r)||n==null||n.body.appendChild(r))},[r,n]),T.useEffect(()=>{a||s!==null&&u(s.current)},[s,u,a]),r}let $x=T.Fragment,NT=dt(function(n,a){let{ownerDocument:s=null,...r}=n,u=T.useRef(null),d=gn(jw(S=>{u.current=S}),a),h=Md(u.current),p=s??h,m=ET(p),g=T.useContext(Wf),x=wl(),y=At();return Bx(()=>{var S;m&&m.childNodes.length<=0&&((S=m.parentElement)==null||S.removeChild(m))}),m?X2.createPortal(ce.createElement("div",{"data-headlessui-portal":"",ref:S=>{x.dispose(),g&&S&&x.add(g.register(S))}},y({ourProps:{ref:d},theirProps:r,slot:{},defaultTag:$x,name:"Portal"})),m):null});function AT(n,a){let s=gn(a),{enabled:r=!0,ownerDocument:u,...d}=n,h=At();return r?ce.createElement(NT,{...d,ownerDocument:u,ref:s}):h({ourProps:{ref:s},theirProps:d,slot:{},defaultTag:$x,name:"Portal"})}let CT=T.Fragment,qx=T.createContext(null);function MT(n,a){let{target:s,...r}=n,u={ref:gn(a)},d=At();return ce.createElement(qx.Provider,{value:s},d({ourProps:u,theirProps:r,defaultTag:CT,name:"Popover.Group"}))}let Wf=T.createContext(null);function DT(){let n=T.useContext(Wf),a=T.useRef([]),s=Me(d=>(a.current.push(d),n&&n.register(d),()=>r(d))),r=Me(d=>{let h=a.current.indexOf(d);h!==-1&&a.current.splice(h,1),n&&n.unregister(d)}),u=T.useMemo(()=>({register:s,unregister:r,portals:a}),[s,r,a]);return[a,T.useMemo(()=>function({children:d}){return ce.createElement(Wf.Provider,{value:u},d)},[u])]}let OT=dt(AT),Yx=dt(MT),RT=Object.assign(OT,{Group:Yx}),zT=T.Fragment;function kT(n,a){let{...s}=n,r=!1,{isFocusVisible:u,focusProps:d}=yx(),{isHovered:h,hoverProps:p}=xx({isDisabled:r}),{pressed:m,pressProps:g}=Sx({disabled:r}),x=Ad({ref:a},d,p,g),y=ti({hover:h,focus:u,active:m});return At()({ourProps:x,theirProps:s,slot:y,defaultTag:zT,name:"DataInteractive"})}let LT=dt(kT);function VT(n,a=typeof document<"u"?document.defaultView:null,s){let r=jl(n,"escape");Ux(a,"keydown",u=>{r&&(u.defaultPrevented||u.key===Nx.Escape&&s(u))})}function _T(){var n;let[a]=T.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[s,r]=T.useState((n=a==null?void 0:a.matches)!=null?n:!1);return Nt(()=>{if(!a)return;function u(d){r(d.matches)}return a.addEventListener("change",u),()=>a.removeEventListener("change",u)},[a]),s}function UT({defaultContainers:n=[],portals:a,mainTreeNode:s}={}){let r=Me(()=>{var u,d;let h=Wi(s),p=[];for(let m of n)m!==null&&(ga(m)?p.push(m):"current"in m&&ga(m.current)&&p.push(m.current));if(a!=null&&a.current)for(let m of a.current)p.push(m);for(let m of(u=h==null?void 0:h.querySelectorAll("html > *, body > *"))!=null?u:[])m!==document.body&&m!==document.head&&ga(m)&&m.id!=="headlessui-portal-root"&&(s&&(m.contains(s)||m.contains((d=s==null?void 0:s.getRootNode())==null?void 0:d.host))||p.some(g=>m.contains(g))||p.push(m));return p});return{resolveContainers:r,contains:Me(u=>r().some(d=>d.contains(u)))}}let Gx=T.createContext(null);function Lv({children:n,node:a}){let[s,r]=T.useState(null),u=Xx(a??s);return ce.createElement(Gx.Provider,{value:u},n,u===null&&ce.createElement(Qf,{features:vo.Hidden,ref:d=>{var h,p;if(d){for(let m of(p=(h=Wi(d))==null?void 0:h.querySelectorAll("html > *, body > *"))!=null?p:[])if(m!==document.body&&m!==document.head&&ga(m)&&m!=null&&m.contains(d)){r(m);break}}}}))}function Xx(n=null){var a;return(a=T.useContext(Gx))!=null?a:n}function BT(){let n=typeof document>"u";return"useSyncExternalStore"in mv?(a=>a.useSyncExternalStore)(mv)(()=>()=>{},()=>!1,()=>!n):!1}function ko(){let n=BT(),[a,s]=T.useState(hn.isHandoffComplete);return a&&hn.isHandoffComplete===!1&&s(!1),T.useEffect(()=>{a!==!0&&s(!0)},[a]),T.useEffect(()=>hn.handoff(),[]),n?!1:a}function Od(){let n=T.useRef(!1);return Nt(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var al=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(al||{});function HT(){let n=T.useRef(0);return _x(!0,"keydown",a=>{a.key==="Tab"&&(n.current=a.shiftKey?1:0)},!0),n}function Kx(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let a=new Set;for(let s of n.current)ga(s.current)&&a.add(s.current);return a}let $T="div";var Ga=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(Ga||{});function qT(n,a){let s=T.useRef(null),r=gn(s,a),{initialFocus:u,initialFocusFallback:d,containers:h,features:p=15,...m}=n;ko()||(p=0);let g=Md(s.current);KT(p,{ownerDocument:g});let x=FT(p,{ownerDocument:g,container:s,initialFocus:u,initialFocusFallback:d});ZT(p,{ownerDocument:g,container:s,containers:h,previousActiveElement:x});let y=HT(),S=Me(M=>{if(!Ia(s.current))return;let z=s.current;(k=>k())(()=>{_n(y.current,{[al.Forwards]:()=>{cl(z,Ln.First,{skipElements:[M.relatedTarget,d]})},[al.Backwards]:()=>{cl(z,Ln.Last,{skipElements:[M.relatedTarget,d]})}})})}),w=jl(!!(p&2),"focus-trap#tab-lock"),j=wl(),E=T.useRef(!1),D={ref:r,onKeyDown(M){M.key=="Tab"&&(E.current=!0,j.requestAnimationFrame(()=>{E.current=!1}))},onBlur(M){if(!(p&4))return;let z=Kx(h);Ia(s.current)&&z.add(s.current);let k=M.relatedTarget;ma(k)&&k.dataset.headlessuiFocusGuard!=="true"&&(Fx(z,k)||(E.current?cl(s.current,_n(y.current,{[al.Forwards]:()=>Ln.Next,[al.Backwards]:()=>Ln.Previous})|Ln.WrapAround,{relativeTo:M.target}):ma(M.target)&&Vn(M.target)))}},R=At();return ce.createElement(ce.Fragment,null,w&&ce.createElement(Qf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:vo.Focusable}),R({ourProps:D,theirProps:m,defaultTag:$T,name:"FocusTrap"}),w&&ce.createElement(Qf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:vo.Focusable}))}let YT=dt(qT),GT=Object.assign(YT,{features:Ga});function XT(n=!0){let a=T.useRef(da.slice());return Dd(([s],[r])=>{r===!0&&s===!1&&Oo(()=>{a.current.splice(0)}),r===!1&&s===!0&&(a.current=da.slice())},[n,da,a]),Me(()=>{var s;return(s=a.current.find(r=>r!=null&&r.isConnected))!=null?s:null})}function KT(n,{ownerDocument:a}){let s=!!(n&8),r=XT(s);Dd(()=>{s||rw(a==null?void 0:a.body)&&Vn(r())},[s]),Bx(()=>{s&&Vn(r())})}function FT(n,{ownerDocument:a,container:s,initialFocus:r,initialFocusFallback:u}){let d=T.useRef(null),h=jl(!!(n&1),"focus-trap#initial-focus"),p=Od();return Dd(()=>{if(n===0)return;if(!h){u!=null&&u.current&&Vn(u.current);return}let m=s.current;m&&Oo(()=>{if(!p.current)return;let g=a==null?void 0:a.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===g){d.current=g;return}}else if(m.contains(g)){d.current=g;return}if(r!=null&&r.current)Vn(r.current);else{if(n&16){if(cl(m,Ln.First|Ln.AutoFocus)!==Jf.Error)return}else if(cl(m,Ln.First)!==Jf.Error)return;if(u!=null&&u.current&&(Vn(u.current),(a==null?void 0:a.activeElement)===u.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}d.current=a==null?void 0:a.activeElement})},[u,h,n]),d}function ZT(n,{ownerDocument:a,container:s,containers:r,previousActiveElement:u}){let d=Od(),h=!!(n&4);Ux(a==null?void 0:a.defaultView,"focus",p=>{if(!h||!d.current)return;let m=Kx(r);Ia(s.current)&&m.add(s.current);let g=u.current;if(!g)return;let x=p.target;Ia(x)?Fx(m,x)?(u.current=x,Vn(x)):(p.preventDefault(),p.stopPropagation(),Vn(g)):Vn(u.current)},!0)}function Fx(n,a){for(let s of n)if(s.contains(a))return!0;return!1}function Zx(n){var a;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!ol((a=n.as)!=null?a:Px)||ce.Children.count(n.children)===1}let Lo=T.createContext(null);Lo.displayName="TransitionContext";var QT=(n=>(n.Visible="visible",n.Hidden="hidden",n))(QT||{});function PT(){let n=T.useContext(Lo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function JT(){let n=T.useContext(Vo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Vo=T.createContext(null);Vo.displayName="NestingContext";function _o(n){return"children"in n?_o(n.children):n.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function Qx(n,a){let s=ei(n),r=T.useRef([]),u=Od(),d=wl(),h=Me((w,j=ha.Hidden)=>{let E=r.current.findIndex(({el:D})=>D===w);E!==-1&&(_n(j,{[ha.Unmount](){r.current.splice(E,1)},[ha.Hidden](){r.current[E].state="hidden"}}),d.microTask(()=>{var D;!_o(r)&&u.current&&((D=s.current)==null||D.call(s))}))}),p=Me(w=>{let j=r.current.find(({el:E})=>E===w);return j?j.state!=="visible"&&(j.state="visible"):r.current.push({el:w,state:"visible"}),()=>h(w,ha.Unmount)}),m=T.useRef([]),g=T.useRef(Promise.resolve()),x=T.useRef({enter:[],leave:[]}),y=Me((w,j,E)=>{m.current.splice(0),a&&(a.chains.current[j]=a.chains.current[j].filter(([D])=>D!==w)),a==null||a.chains.current[j].push([w,new Promise(D=>{m.current.push(D)})]),a==null||a.chains.current[j].push([w,new Promise(D=>{Promise.all(x.current[j].map(([R,M])=>M)).then(()=>D())})]),j==="enter"?g.current=g.current.then(()=>a==null?void 0:a.wait.current).then(()=>E(j)):E(j)}),S=Me((w,j,E)=>{Promise.all(x.current[j].splice(0).map(([D,R])=>R)).then(()=>{var D;(D=m.current.shift())==null||D()}).then(()=>E(j))});return T.useMemo(()=>({children:r,register:p,unregister:h,onStart:y,onStop:S,wait:g,chains:x}),[p,h,r,y,S,x,g])}let Px=T.Fragment,Jx=go.RenderStrategy;function WT(n,a){var s,r;let{transition:u=!0,beforeEnter:d,afterEnter:h,beforeLeave:p,afterLeave:m,enter:g,enterFrom:x,enterTo:y,entered:S,leave:w,leaveFrom:j,leaveTo:E,...D}=n,[R,M]=T.useState(null),z=T.useRef(null),k=Zx(n),U=gn(...k?[z,a,M]:a===null?[]:[a]),P=(s=D.unmount)==null||s?ha.Unmount:ha.Hidden,{show:F,appear:W,initial:re}=PT(),[B,Z]=T.useState(F?"visible":"hidden"),ie=JT(),{register:le,unregister:Se}=ie;Nt(()=>le(z),[le,z]),Nt(()=>{if(P===ha.Hidden&&z.current){if(F&&B!=="visible"){Z("visible");return}return _n(B,{hidden:()=>Se(z),visible:()=>le(z)})}},[B,z,le,Se,F,P]);let De=ko();Nt(()=>{if(k&&De&&B==="visible"&&z.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[z,B,De,k]);let $=re&&!W,Q=W&&F&&re,J=T.useRef(!1),oe=Qx(()=>{J.current||(Z("hidden"),Se(z))},ie),me=Me(Te=>{J.current=!0;let Ze=Te?"enter":"leave";oe.onStart(z,Ze,Le=>{Le==="enter"?d==null||d():Le==="leave"&&(p==null||p())})}),A=Me(Te=>{let Ze=Te?"enter":"leave";J.current=!1,oe.onStop(z,Ze,Le=>{Le==="enter"?h==null||h():Le==="leave"&&(m==null||m())}),Ze==="leave"&&!_o(oe)&&(Z("hidden"),Se(z))});T.useEffect(()=>{k&&u||(me(F),A(F))},[F,k,u]);let G=!(!u||!k||!De||$),[,K]=gT(G,R,F,{start:me,end:A}),I=qa({ref:U,className:((r=Zf(D.className,Q&&g,Q&&x,K.enter&&g,K.enter&&K.closed&&x,K.enter&&!K.closed&&y,K.leave&&w,K.leave&&!K.closed&&j,K.leave&&K.closed&&E,!K.transition&&F&&S))==null?void 0:r.trim())||void 0,...pT(K)}),ue=0;B==="visible"&&(ue|=an.Open),B==="hidden"&&(ue|=an.Closed),F&&B==="hidden"&&(ue|=an.Opening),!F&&B==="visible"&&(ue|=an.Closing);let pe=At();return ce.createElement(Vo.Provider,{value:oe},ce.createElement(ST,{value:ue},pe({ourProps:I,theirProps:D,defaultTag:Px,features:Jx,visible:B==="visible",name:"Transition.Child"})))}function IT(n,a){let{show:s,appear:r=!1,unmount:u=!0,...d}=n,h=T.useRef(null),p=Zx(n),m=gn(...p?[h,a]:a===null?[]:[a]);ko();let g=zo();if(s===void 0&&g!==null&&(s=(g&an.Open)===an.Open),s===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,y]=T.useState(s?"visible":"hidden"),S=Qx(()=>{s||y("hidden")}),[w,j]=T.useState(!0),E=T.useRef([s]);Nt(()=>{w!==!1&&E.current[E.current.length-1]!==s&&(E.current.push(s),j(!1))},[E,s]);let D=T.useMemo(()=>({show:s,appear:r,initial:w}),[s,r,w]);Nt(()=>{s?y("visible"):!_o(S)&&h.current!==null&&y("hidden")},[s,S]);let R={unmount:u},M=Me(()=>{var U;w&&j(!1),(U=n.beforeEnter)==null||U.call(n)}),z=Me(()=>{var U;w&&j(!1),(U=n.beforeLeave)==null||U.call(n)}),k=At();return ce.createElement(Vo.Provider,{value:S},ce.createElement(Lo.Provider,{value:D},k({ourProps:{...R,as:T.Fragment,children:ce.createElement(Wx,{ref:m,...R,...d,beforeEnter:M,beforeLeave:z})},theirProps:{},defaultTag:T.Fragment,features:Jx,visible:x==="visible",name:"Transition"})))}function ej(n,a){let s=T.useContext(Lo)!==null,r=zo()!==null;return ce.createElement(ce.Fragment,null,!s&&r?ce.createElement(If,{ref:a,...n}):ce.createElement(Wx,{ref:a,...n}))}let If=dt(IT),Wx=dt(WT),Rd=dt(ej),tj=Object.assign(If,{Child:Rd,Root:If});var nj=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(nj||{}),aj=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(aj||{});let ij={0(n,a){return n.titleId===a.id?n:{...n,titleId:a.id}}},zd=T.createContext(null);zd.displayName="DialogContext";function Uo(n){let a=T.useContext(zd);if(a===null){let s=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,Uo),s}return a}function sj(n,a){return _n(a.type,ij,n,a)}let Vv=dt(function(n,a){let s=T.useId(),{id:r=`headlessui-dialog-${s}`,open:u,onClose:d,initialFocus:h,role:p="dialog",autoFocus:m=!0,__demoMode:g=!1,unmount:x=!1,...y}=n,S=T.useRef(!1);p=(function(){return p==="dialog"||p==="alertdialog"?p:(S.current||(S.current=!0,console.warn(`Invalid role [${p}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let w=zo();u===void 0&&w!==null&&(u=(w&an.Open)===an.Open);let j=T.useRef(null),E=gn(j,a),D=Md(j.current),R=u?0:1,[M,z]=T.useReducer(sj,{titleId:null,descriptionId:null,panelRef:T.createRef()}),k=Me(()=>d(!1)),U=Me(K=>z({type:0,id:K})),P=ko()?R===0:!1,[F,W]=DT(),re={get current(){var K;return(K=M.panelRef.current)!=null?K:j.current}},B=Xx(),{resolveContainers:Z}=UT({mainTreeNode:B,portals:F,defaultContainers:[re]}),ie=w!==null?(w&an.Closing)===an.Closing:!1;Kw(g||ie?!1:P,{allowed:Me(()=>{var K,I;return[(I=(K=j.current)==null?void 0:K.closest("[data-headlessui-portal]"))!=null?I:null]}),disallowed:Me(()=>{var K;return[(K=B==null?void 0:B.closest("body > *:not(#headlessui-portal-root)"))!=null?K:null]})});let le=zx.get(null);Nt(()=>{if(P)return le.actions.push(r),()=>le.actions.pop(r)},[le,r,P]);let Se=kx(le,T.useCallback(K=>le.selectors.isTop(K,r),[le,r]));iT(Se,Z,K=>{K.preventDefault(),k()}),VT(Se,D==null?void 0:D.defaultView,K=>{K.preventDefault(),K.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),k()}),fT(g||ie?!1:P,D,Z),Fw(P,j,k);let[De,$]=Ew(),Q=T.useMemo(()=>[{dialogState:R,close:k,setTitleId:U,unmount:x},M],[R,k,U,x,M]),J=ti({open:R===0}),oe={ref:E,id:r,role:p,tabIndex:-1,"aria-modal":g?void 0:R===0?!0:void 0,"aria-labelledby":M.titleId,"aria-describedby":De,unmount:x},me=!_T(),A=Ga.None;P&&!g&&(A|=Ga.RestoreFocus,A|=Ga.TabLock,m&&(A|=Ga.AutoFocus),me&&(A|=Ga.InitialFocus));let G=At();return ce.createElement(wT,null,ce.createElement(kv,{force:!0},ce.createElement(RT,null,ce.createElement(zd.Provider,{value:Q},ce.createElement(Yx,{target:j},ce.createElement(kv,{force:!1},ce.createElement($,{slot:J},ce.createElement(W,null,ce.createElement(GT,{initialFocus:h,initialFocusFallback:j,containers:Z,features:A},ce.createElement(Ow,{value:k},G({ourProps:oe,theirProps:y,slot:J,defaultTag:lj,features:rj,visible:R===0,name:"Dialog"})))))))))))}),lj="div",rj=go.RenderStrategy|go.Static;function oj(n,a){let{transition:s=!1,open:r,...u}=n,d=zo(),h=n.hasOwnProperty("open")||d!==null,p=n.hasOwnProperty("onClose");if(!h&&!p)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!h)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!p)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!d&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(r!==void 0||s)&&!u.static?ce.createElement(Lv,null,ce.createElement(tj,{show:r,transition:s,unmount:u.unmount},ce.createElement(Vv,{ref:a,...u}))):ce.createElement(Lv,null,ce.createElement(Vv,{ref:a,open:r,...u}))}let uj="div";function cj(n,a){let s=T.useId(),{id:r=`headlessui-dialog-panel-${s}`,transition:u=!1,...d}=n,[{dialogState:h,unmount:p},m]=Uo("Dialog.Panel"),g=gn(a,m.panelRef),x=ti({open:h===0}),y=Me(D=>{D.stopPropagation()}),S={ref:g,id:r,onClick:y},w=u?Rd:T.Fragment,j=u?{unmount:p}:{},E=At();return ce.createElement(w,{...j},E({ourProps:S,theirProps:d,slot:x,defaultTag:uj,name:"Dialog.Panel"}))}let fj="div";function dj(n,a){let{transition:s=!1,...r}=n,[{dialogState:u,unmount:d}]=Uo("Dialog.Backdrop"),h=ti({open:u===0}),p={ref:a,"aria-hidden":!0},m=s?Rd:T.Fragment,g=s?{unmount:d}:{},x=At();return ce.createElement(m,{...g},x({ourProps:p,theirProps:r,slot:h,defaultTag:fj,name:"Dialog.Backdrop"}))}let hj="h2";function mj(n,a){let s=T.useId(),{id:r=`headlessui-dialog-title-${s}`,...u}=n,[{dialogState:d,setTitleId:h}]=Uo("Dialog.Title"),p=gn(a);T.useEffect(()=>(h(r),()=>h(null)),[r,h]);let m=ti({open:d===0}),g={ref:p,id:r};return At()({ourProps:g,theirProps:u,slot:m,defaultTag:hj,name:"Dialog.Title"})}let pj=dt(oj),Ix=dt(cj),gj=dt(dj),vj=dt(mj),xj=Object.assign(pj,{Panel:Ix,Title:vj,Description:Mw});const yo=T.createContext({});function yj(n){const a=T.useRef(null);return a.current===null&&(a.current=n()),a.current}const bj=typeof window<"u",ey=bj?T.useLayoutEffect:T.useEffect,kd=T.createContext(null);function Ld(n,a){n.indexOf(a)===-1&&n.push(a)}function bo(n,a){const s=n.indexOf(a);s>-1&&n.splice(s,1)}const pn=(n,a,s)=>s>a?a:s<n?n:s;let Vd=()=>{};const va={},ty=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function ny(n){return typeof n=="object"&&n!==null}const ay=n=>/^0[^.\s]+$/u.test(n);function iy(n){let a;return()=>(a===void 0&&(a=n()),a)}const Jt=n=>n,Sj=(n,a)=>s=>a(n(s)),El=(...n)=>n.reduce(Sj),vl=(n,a,s)=>{const r=a-n;return r===0?1:(s-n)/r};class _d{constructor(){this.subscriptions=[]}add(a){return Ld(this.subscriptions,a),()=>bo(this.subscriptions,a)}notify(a,s,r){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](a,s,r);else for(let d=0;d<u;d++){const h=this.subscriptions[d];h&&h(a,s,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ut=n=>n*1e3,Pt=n=>n/1e3;function sy(n,a){return a?n*(1e3/a):0}const ly=(n,a,s)=>(((1-3*s+3*a)*n+(3*s-6*a))*n+3*a)*n,wj=1e-7,Tj=12;function jj(n,a,s,r,u){let d,h,p=0;do h=a+(s-a)/2,d=ly(h,r,u)-n,d>0?s=h:a=h;while(Math.abs(d)>wj&&++p<Tj);return h}function Nl(n,a,s,r){if(n===a&&s===r)return Jt;const u=d=>jj(d,0,1,n,s);return d=>d===0||d===1?d:ly(u(d),a,r)}const ry=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,oy=n=>a=>1-n(1-a),uy=Nl(.33,1.53,.69,.99),Ud=oy(uy),cy=ry(Ud),fy=n=>n>=1?1:(n*=2)<1?.5*Ud(n):.5*(2-Math.pow(2,-10*(n-1))),Bd=n=>1-Math.sin(Math.acos(n)),dy=oy(Bd),hy=ry(Bd),Ej=Nl(.42,0,1,1),Nj=Nl(0,0,.58,1),my=Nl(.42,0,.58,1),Aj=n=>Array.isArray(n)&&typeof n[0]!="number",py=n=>Array.isArray(n)&&typeof n[0]=="number",Cj={linear:Jt,easeIn:Ej,easeInOut:my,easeOut:Nj,circIn:Bd,circInOut:hy,circOut:dy,backIn:Ud,backInOut:cy,backOut:uy,anticipate:fy},Mj=n=>typeof n=="string",_v=n=>{if(py(n)){Vd(n.length===4);const[a,s,r,u]=n;return Nl(a,s,r,u)}else if(Mj(n))return Cj[n];return n},Wr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Dj(n,a){let s=new Set,r=new Set,u=!1,d=!1;const h=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function m(x){h.has(x)&&(g.schedule(x),n()),x(p)}const g={schedule:(x,y=!1,S=!1)=>{const j=S&&u?s:r;return y&&h.add(x),j.add(x),x},cancel:x=>{r.delete(x),h.delete(x)},process:x=>{if(p=x,u){d=!0;return}u=!0;const y=s;s=r,r=y,s.forEach(m),s.clear(),u=!1,d&&(d=!1,g.process(x))}};return g}const Oj=40;function gy(n,a){let s=!1,r=!0;const u={delta:0,timestamp:0,isProcessing:!1},d=()=>s=!0,h=Wr.reduce((z,k)=>(z[k]=Dj(d),z),{}),{setup:p,read:m,resolveKeyframes:g,preUpdate:x,update:y,preRender:S,render:w,postRender:j}=h,E=()=>{const z=va.useManualTiming,k=z?u.timestamp:performance.now();s=!1,z||(u.delta=r?1e3/60:Math.max(Math.min(k-u.timestamp,Oj),1)),u.timestamp=k,u.isProcessing=!0,p.process(u),m.process(u),g.process(u),x.process(u),y.process(u),S.process(u),w.process(u),j.process(u),u.isProcessing=!1,s&&a&&(r=!1,n(E))},D=()=>{s=!0,r=!0,u.isProcessing||n(E)};return{schedule:Wr.reduce((z,k)=>{const U=h[k];return z[k]=(P,F=!1,W=!1)=>(s||D(),U.schedule(P,F,W)),z},{}),cancel:z=>{for(let k=0;k<Wr.length;k++)h[Wr[k]].cancel(z)},state:u,steps:h}}const{schedule:ke,cancel:xa,state:ct,steps:Sf}=gy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Jt,!0);let lo;function Rj(){lo=void 0}const vt={now:()=>(lo===void 0&&vt.set(ct.isProcessing||va.useManualTiming?ct.timestamp:performance.now()),lo),set:n=>{lo=n,queueMicrotask(Rj)}},vy=n=>a=>typeof a=="string"&&a.startsWith(n),xy=vy("--"),zj=vy("var(--"),Hd=n=>zj(n)?kj.test(n.split("/*")[0].trim()):!1,kj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Uv(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Ii={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},xl={...Ii,transform:n=>pn(0,1,n)},Ir={...Ii,default:1},fl=n=>Math.round(n*1e5)/1e5,$d=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lj(n){return n==null}const Vj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qd=(n,a)=>s=>!!(typeof s=="string"&&Vj.test(s)&&s.startsWith(n)||a&&!Lj(s)&&Object.prototype.hasOwnProperty.call(s,a)),yy=(n,a,s)=>r=>{if(typeof r!="string")return r;const[u,d,h,p]=r.match($d);return{[n]:parseFloat(u),[a]:parseFloat(d),[s]:parseFloat(h),alpha:p!==void 0?parseFloat(p):1}},_j=n=>pn(0,255,n),wf={...Ii,transform:n=>Math.round(_j(n))},Za={test:qd("rgb","red"),parse:yy("red","green","blue"),transform:({red:n,green:a,blue:s,alpha:r=1})=>"rgba("+wf.transform(n)+", "+wf.transform(a)+", "+wf.transform(s)+", "+fl(xl.transform(r))+")"};function Uj(n){let a="",s="",r="",u="";return n.length>5?(a=n.substring(1,3),s=n.substring(3,5),r=n.substring(5,7),u=n.substring(7,9)):(a=n.substring(1,2),s=n.substring(2,3),r=n.substring(3,4),u=n.substring(4,5),a+=a,s+=s,r+=r,u+=u),{red:parseInt(a,16),green:parseInt(s,16),blue:parseInt(r,16),alpha:u?parseInt(u,16)/255:1}}const ed={test:qd("#"),parse:Uj,transform:Za.transform},Al=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),ca=Al("deg"),mn=Al("%"),te=Al("px"),Bj=Al("vh"),Hj=Al("vw"),Bv={...mn,parse:n=>mn.parse(n)/100,transform:n=>mn.transform(n*100)},qi={test:qd("hsl","hue"),parse:yy("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:s,alpha:r=1})=>"hsla("+Math.round(n)+", "+mn.transform(fl(a))+", "+mn.transform(fl(s))+", "+fl(xl.transform(r))+")"},Ie={test:n=>Za.test(n)||ed.test(n)||qi.test(n),parse:n=>Za.test(n)?Za.parse(n):qi.test(n)?qi.parse(n):ed.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Za.transform(n):qi.transform(n),getAnimatableNone:n=>{const a=Ie.parse(n);return a.alpha=0,Ie.transform(a)}},$j=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qj(n){var a,s;return isNaN(n)&&typeof n=="string"&&(((a=n.match($d))==null?void 0:a.length)||0)+(((s=n.match($j))==null?void 0:s.length)||0)>0}const by="number",Sy="color",Yj="var",Gj="var(",Hv="${}",Xj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zi(n){const a=n.toString(),s=[],r={color:[],number:[],var:[]},u=[];let d=0;const p=a.replace(Xj,m=>(Ie.test(m)?(r.color.push(d),u.push(Sy),s.push(Ie.parse(m))):m.startsWith(Gj)?(r.var.push(d),u.push(Yj),s.push(m)):(r.number.push(d),u.push(by),s.push(parseFloat(m))),++d,Hv)).split(Hv);return{values:s,split:p,indexes:r,types:u}}function Kj(n){return Zi(n).values}function wy({split:n,types:a}){const s=n.length;return r=>{let u="";for(let d=0;d<s;d++)if(u+=n[d],r[d]!==void 0){const h=a[d];h===by?u+=fl(r[d]):h===Sy?u+=Ie.transform(r[d]):u+=r[d]}return u}}function Fj(n){return wy(Zi(n))}const Zj=n=>typeof n=="number"?0:Ie.test(n)?Ie.getAnimatableNone(n):n,Qj=(n,a)=>typeof n=="number"?a!=null&&a.trim().endsWith("/")?n:0:Zj(n);function Pj(n){const a=Zi(n);return wy(a)(a.values.map((r,u)=>Qj(r,a.split[u])))}const sn={test:qj,parse:Kj,createTransformer:Fj,getAnimatableNone:Pj};function Tf(n,a,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?n+(a-n)*6*s:s<1/2?a:s<2/3?n+(a-n)*(2/3-s)*6:n}function Jj({hue:n,saturation:a,lightness:s,alpha:r}){n/=360,a/=100,s/=100;let u=0,d=0,h=0;if(!a)u=d=h=s;else{const p=s<.5?s*(1+a):s+a-s*a,m=2*s-p;u=Tf(m,p,n+1/3),d=Tf(m,p,n),h=Tf(m,p,n-1/3)}return{red:Math.round(u*255),green:Math.round(d*255),blue:Math.round(h*255),alpha:r}}function So(n,a){return s=>s>0?a:n}const He=(n,a,s)=>n+(a-n)*s,jf=(n,a,s)=>{const r=n*n,u=s*(a*a-r)+r;return u<0?0:Math.sqrt(u)},Wj=[ed,Za,qi],Ij=n=>Wj.find(a=>a.test(n));function $v(n){const a=Ij(n);if(!a)return!1;let s=a.parse(n);return a===qi&&(s=Jj(s)),s}const qv=(n,a)=>{const s=$v(n),r=$v(a);if(!s||!r)return So(n,a);const u={...s};return d=>(u.red=jf(s.red,r.red,d),u.green=jf(s.green,r.green,d),u.blue=jf(s.blue,r.blue,d),u.alpha=He(s.alpha,r.alpha,d),Za.transform(u))},td=new Set(["none","hidden"]);function eE(n,a){return td.has(n)?s=>s<=0?n:a:s=>s>=1?a:n}function tE(n,a){return s=>He(n,a,s)}function Yd(n){return typeof n=="number"?tE:typeof n=="string"?Hd(n)?So:Ie.test(n)?qv:iE:Array.isArray(n)?Ty:typeof n=="object"?Ie.test(n)?qv:nE:So}function Ty(n,a){const s=[...n],r=s.length,u=n.map((d,h)=>Yd(d)(d,a[h]));return d=>{for(let h=0;h<r;h++)s[h]=u[h](d);return s}}function nE(n,a){const s={...n,...a},r={};for(const u in s)n[u]!==void 0&&a[u]!==void 0&&(r[u]=Yd(n[u])(n[u],a[u]));return u=>{for(const d in r)s[d]=r[d](u);return s}}function aE(n,a){const s=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],h=n.indexes[d][r[d]],p=n.values[h]??0;s[u]=p,r[d]++}return s}const iE=(n,a)=>{const s=sn.createTransformer(a),r=Zi(n),u=Zi(a);return r.indexes.var.length===u.indexes.var.length&&r.indexes.color.length===u.indexes.color.length&&r.indexes.number.length>=u.indexes.number.length?td.has(n)&&!u.values.length||td.has(a)&&!r.values.length?eE(n,a):El(Ty(aE(r,u),u.values),s):So(n,a)};function jy(n,a,s){return typeof n=="number"&&typeof a=="number"&&typeof s=="number"?He(n,a,s):Yd(n)(n,a)}const sE=n=>{const a=({timestamp:s})=>n(s);return{start:(s=!0)=>ke.update(a,s),stop:()=>xa(a),now:()=>ct.isProcessing?ct.timestamp:vt.now()}},Ey=(n,a,s=10)=>{let r="";const u=Math.max(Math.round(a/s),2);for(let d=0;d<u;d++)r+=Math.round(n(d/(u-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},wo=2e4;function Gd(n){let a=0;const s=50;let r=n.next(a);for(;!r.done&&a<wo;)a+=s,r=n.next(a);return a>=wo?1/0:a}function lE(n,a=100,s){const r=s({...n,keyframes:[0,a]}),u=Math.min(Gd(r),wo);return{type:"keyframes",ease:d=>r.next(u*d).value/a,duration:Pt(u)}}const Ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function nd(n,a){return n*Math.sqrt(1-a*a)}const rE=12;function oE(n,a,s){let r=s;for(let u=1;u<rE;u++)r=r-n(r)/a(r);return r}const Ef=.001;function uE({duration:n=Ge.duration,bounce:a=Ge.bounce,velocity:s=Ge.velocity,mass:r=Ge.mass}){let u,d,h=1-a;h=pn(Ge.minDamping,Ge.maxDamping,h),n=pn(Ge.minDuration,Ge.maxDuration,Pt(n)),h<1?(u=g=>{const x=g*h,y=x*n,S=x-s,w=nd(g,h),j=Math.exp(-y);return Ef-S/w*j},d=g=>{const y=g*h*n,S=y*s+s,w=Math.pow(h,2)*Math.pow(g,2)*n,j=Math.exp(-y),E=nd(Math.pow(g,2),h);return(-u(g)+Ef>0?-1:1)*((S-w)*j)/E}):(u=g=>{const x=Math.exp(-g*n),y=(g-s)*n+1;return-Ef+x*y},d=g=>{const x=Math.exp(-g*n),y=(s-g)*(n*n);return x*y});const p=5/n,m=oE(u,d,p);if(n=Ut(n),isNaN(m))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:n};{const g=Math.pow(m,2)*r;return{stiffness:g,damping:h*2*Math.sqrt(r*g),duration:n}}}const cE=["duration","bounce"],fE=["stiffness","damping","mass"];function Yv(n,a){return a.some(s=>n[s]!==void 0)}function dE(n){let a={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...n};if(!Yv(n,fE)&&Yv(n,cE))if(a.velocity=0,n.visualDuration){const s=n.visualDuration,r=2*Math.PI/(s*1.2),u=r*r,d=2*pn(.05,1,1-(n.bounce||0))*Math.sqrt(u);a={...a,mass:Ge.mass,stiffness:u,damping:d}}else{const s=uE({...n,velocity:0});a={...a,...s,mass:Ge.mass},a.isResolvedFromDuration=!0}return a}function To(n=Ge.visualDuration,a=Ge.bounce){const s=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:r,restDelta:u}=s;const d=s.keyframes[0],h=s.keyframes[s.keyframes.length-1],p={done:!1,value:d},{stiffness:m,damping:g,mass:x,duration:y,velocity:S,isResolvedFromDuration:w}=dE({...s,velocity:-Pt(s.velocity||0)}),j=S||0,E=g/(2*Math.sqrt(m*x)),D=h-d,R=Pt(Math.sqrt(m/x)),M=Math.abs(D)<5;r||(r=M?Ge.restSpeed.granular:Ge.restSpeed.default),u||(u=M?Ge.restDelta.granular:Ge.restDelta.default);let z,k,U,P,F,W;if(E<1)U=nd(R,E),P=(j+E*R*D)/U,z=B=>{const Z=Math.exp(-E*R*B);return h-Z*(P*Math.sin(U*B)+D*Math.cos(U*B))},F=E*R*P+D*U,W=E*R*D-P*U,k=B=>Math.exp(-E*R*B)*(F*Math.sin(U*B)+W*Math.cos(U*B));else if(E===1){z=Z=>h-Math.exp(-R*Z)*(D+(j+R*D)*Z);const B=j+R*D;k=Z=>Math.exp(-R*Z)*(R*B*Z-j)}else{const B=R*Math.sqrt(E*E-1);z=Se=>{const De=Math.exp(-E*R*Se),$=Math.min(B*Se,300);return h-De*((j+E*R*D)*Math.sinh($)+B*D*Math.cosh($))/B};const Z=(j+E*R*D)/B,ie=E*R*Z-D*B,le=E*R*D-Z*B;k=Se=>{const De=Math.exp(-E*R*Se),$=Math.min(B*Se,300);return De*(ie*Math.sinh($)+le*Math.cosh($))}}const re={calculatedDuration:w&&y||null,velocity:B=>Ut(k(B)),next:B=>{if(!w&&E<1){const ie=Math.exp(-E*R*B),le=Math.sin(U*B),Se=Math.cos(U*B),De=h-ie*(P*le+D*Se),$=Ut(ie*(F*le+W*Se));return p.done=Math.abs($)<=r&&Math.abs(h-De)<=u,p.value=p.done?h:De,p}const Z=z(B);if(w)p.done=B>=y;else{const ie=Ut(k(B));p.done=Math.abs(ie)<=r&&Math.abs(h-Z)<=u}return p.value=p.done?h:Z,p},toString:()=>{const B=Math.min(Gd(re),wo),Z=Ey(ie=>re.next(B*ie).value,B,30);return B+"ms "+Z},toTransition:()=>{}};return re}To.applyToOptions=n=>{const a=lE(n,100,To);return n.ease=a.ease,n.duration=Ut(a.duration),n.type="keyframes",n};const hE=5;function Ny(n,a,s){const r=Math.max(a-hE,0);return sy(s-n(r),a-r)}function ad({keyframes:n,velocity:a=0,power:s=.8,timeConstant:r=325,bounceDamping:u=10,bounceStiffness:d=500,modifyTarget:h,min:p,max:m,restDelta:g=.5,restSpeed:x}){const y=n[0],S={done:!1,value:y},w=W=>p!==void 0&&W<p||m!==void 0&&W>m,j=W=>p===void 0?m:m===void 0||Math.abs(p-W)<Math.abs(m-W)?p:m;let E=s*a;const D=y+E,R=h===void 0?D:h(D);R!==D&&(E=R-y);const M=W=>-E*Math.exp(-W/r),z=W=>R+M(W),k=W=>{const re=M(W),B=z(W);S.done=Math.abs(re)<=g,S.value=S.done?R:B};let U,P;const F=W=>{w(S.value)&&(U=W,P=To({keyframes:[S.value,j(S.value)],velocity:Ny(z,W,S.value),damping:u,stiffness:d,restDelta:g,restSpeed:x}))};return F(0),{calculatedDuration:null,next:W=>{let re=!1;return!P&&U===void 0&&(re=!0,k(W),F(W)),U!==void 0&&W>=U?P.next(W-U):(!re&&k(W),S)}}}function mE(n,a,s){const r=[],u=s||va.mix||jy,d=n.length-1;for(let h=0;h<d;h++){let p=u(n[h],n[h+1]);if(a){const m=Array.isArray(a)?a[h]||Jt:a;p=El(m,p)}r.push(p)}return r}function pE(n,a,{clamp:s=!0,ease:r,mixer:u}={}){const d=n.length;if(Vd(d===a.length),d===1)return()=>a[0];if(d===2&&a[0]===a[1])return()=>a[1];const h=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=mE(a,r,u),m=p.length,g=x=>{if(h&&x<n[0])return a[0];let y=0;if(m>1)for(;y<n.length-2&&!(x<n[y+1]);y++);const S=vl(n[y],n[y+1],x);return p[y](S)};return s?x=>g(pn(n[0],n[d-1],x)):g}function gE(n,a){const s=n[n.length-1];for(let r=1;r<=a;r++){const u=vl(0,a,r);n.push(He(s,1,u))}}function vE(n){const a=[0];return gE(a,n.length-1),a}function xE(n,a){return n.map(s=>s*a)}function yE(n,a){return n.map(()=>a||my).splice(0,n.length-1)}function dl({duration:n=300,keyframes:a,times:s,ease:r="easeInOut"}){const u=Aj(r)?r.map(_v):_v(r),d={done:!1,value:a[0]},h=xE(s&&s.length===a.length?s:vE(a),n),p=pE(h,a,{ease:Array.isArray(u)?u:yE(a,u)});return{calculatedDuration:n,next:m=>(d.value=p(m),d.done=m>=n,d)}}const bE=n=>n!==null;function Bo(n,{repeat:a,repeatType:s="loop"},r,u=1){const d=n.filter(bE),p=u<0||a&&s!=="loop"&&a%2===1?0:d.length-1;return!p||r===void 0?d[p]:r}const SE={decay:ad,inertia:ad,tween:dl,keyframes:dl,spring:To};function Ay(n){typeof n.type=="string"&&(n.type=SE[n.type])}class Xd{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,s){return this.finished.then(a,s)}}const wE=n=>n/100;class jo extends Xd{constructor(a){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,u;const{motionValue:s}=this.options;s&&s.updatedAt!==vt.now()&&this.tick(vt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(u=(r=this.options).onStop)==null||u.call(r))},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;Ay(a);const{type:s=dl,repeat:r=0,repeatDelay:u=0,repeatType:d,velocity:h=0}=a;let{keyframes:p}=a;const m=s||dl;m!==dl&&typeof p[0]!="number"&&(this.mixKeyframes=El(wE,jy(p[0],p[1])),p=[0,100]);const g=m({...a,keyframes:p});d==="mirror"&&(this.mirroredGenerator=m({...a,keyframes:[...p].reverse(),velocity:-h})),g.calculatedDuration===null&&(g.calculatedDuration=Gd(g));const{calculatedDuration:x}=g;this.calculatedDuration=x,this.resolvedDuration=x+u,this.totalDuration=this.resolvedDuration*(r+1)-u,this.generator=g}updateTime(a){const s=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(a,s=!1){const{generator:r,totalDuration:u,mixKeyframes:d,mirroredGenerator:h,resolvedDuration:p,calculatedDuration:m}=this;if(this.startTime===null)return r.next(0);const{delay:g=0,keyframes:x,repeat:y,repeatType:S,repeatDelay:w,type:j,onUpdate:E,finalKeyframe:D}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-u/this.speed,this.startTime)),s?this.currentTime=a:this.updateTime(a);const R=this.currentTime-g*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?R<0:R>u;this.currentTime=Math.max(R,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let z=this.currentTime,k=r;if(y){const W=Math.min(this.currentTime,u)/p;let re=Math.floor(W),B=W%1;!B&&W>=1&&(B=1),B===1&&re--,re=Math.min(re,y+1),!!(re%2)&&(S==="reverse"?(B=1-B,w&&(B-=w/p)):S==="mirror"&&(k=h)),z=pn(0,1,B)*p}let U;M?(this.delayState.value=x[0],U=this.delayState):U=k.next(z),d&&!M&&(U.value=d(U.value));let{done:P}=U;!M&&m!==null&&(P=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return F&&j!==ad&&(U.value=Bo(x,this.options,D,this.speed)),E&&E(U.value),F&&this.finish(),U}then(a,s){return this.finished.then(a,s)}get duration(){return Pt(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(this.currentTime)}set time(a){a=Ut(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=a,this.tick(a))}getGeneratorVelocity(){const a=this.currentTime;if(a<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(a);const s=this.generator.next(a).value;return Ny(r=>this.generator.next(r).value,a,s)}get speed(){return this.playbackSpeed}set speed(a){const s=this.playbackSpeed!==a;s&&this.driver&&this.updateTime(vt.now()),this.playbackSpeed=a,s&&this.driver&&(this.time=Pt(this.currentTime))}play(){var u,d;if(this.isStopped)return;const{driver:a=sE,startTime:s}=this.options;this.driver||(this.driver=a(h=>this.tick(h))),(d=(u=this.options).onPlay)==null||d.call(u);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var a,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(a=this.options).onComplete)==null||s.call(a)}cancel(){var a,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(a=this.options).onCancel)==null||s.call(a)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),a.observe(this)}}function TE(n){for(let a=1;a<n.length;a++)n[a]??(n[a]=n[a-1])}const Qa=n=>n*180/Math.PI,id=n=>{const a=Qa(Math.atan2(n[1],n[0]));return sd(a)},jE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:id,rotateZ:id,skewX:n=>Qa(Math.atan(n[1])),skewY:n=>Qa(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},sd=n=>(n=n%360,n<0&&(n+=360),n),Gv=id,Xv=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),Kv=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),EE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xv,scaleY:Kv,scale:n=>(Xv(n)+Kv(n))/2,rotateX:n=>sd(Qa(Math.atan2(n[6],n[5]))),rotateY:n=>sd(Qa(Math.atan2(-n[2],n[0]))),rotateZ:Gv,rotate:Gv,skewX:n=>Qa(Math.atan(n[4])),skewY:n=>Qa(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function ld(n){return n.includes("scale")?1:0}function rd(n,a){if(!n||n==="none")return ld(a);const s=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,u;if(s)r=EE,u=s;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=jE,u=p}if(!u)return ld(a);const d=r[a],h=u[1].split(",").map(AE);return typeof d=="function"?d(h):h[d]}const NE=(n,a)=>{const{transform:s="none"}=getComputedStyle(n);return rd(s,a)};function AE(n){return parseFloat(n.trim())}const es=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ts=new Set(es),Fv=n=>n===Ii||n===te,CE=new Set(["x","y","z"]),ME=es.filter(n=>!CE.has(n));function DE(n){const a=[];return ME.forEach(s=>{const r=n.getValue(s);r!==void 0&&(a.push([s,r.get()]),r.set(s.startsWith("scale")?1:0))}),a}const pa={width:({x:n},{paddingLeft:a="0",paddingRight:s="0",boxSizing:r})=>{const u=n.max-n.min;return r==="border-box"?u:u-parseFloat(a)-parseFloat(s)},height:({y:n},{paddingTop:a="0",paddingBottom:s="0",boxSizing:r})=>{const u=n.max-n.min;return r==="border-box"?u:u-parseFloat(a)-parseFloat(s)},top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:(n,{transform:a})=>rd(a,"x"),y:(n,{transform:a})=>rd(a,"y")};pa.translateX=pa.x;pa.translateY=pa.y;const Pa=new Set;let od=!1,ud=!1,cd=!1;function Cy(){if(ud){const n=Array.from(Pa).filter(r=>r.needsMeasurement),a=new Set(n.map(r=>r.element)),s=new Map;a.forEach(r=>{const u=DE(r);u.length&&(s.set(r,u),r.render())}),n.forEach(r=>r.measureInitialState()),a.forEach(r=>{r.render();const u=s.get(r);u&&u.forEach(([d,h])=>{var p;(p=r.getValue(d))==null||p.set(h)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ud=!1,od=!1,Pa.forEach(n=>n.complete(cd)),Pa.clear()}function My(){Pa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(ud=!0)})}function OE(){cd=!0,My(),Cy(),cd=!1}class Kd{constructor(a,s,r,u,d,h=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=s,this.name=r,this.motionValue=u,this.element=d,this.isAsync=h}scheduleResolve(){this.state="scheduled",this.isAsync?(Pa.add(this),od||(od=!0,ke.read(My),ke.resolveKeyframes(Cy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:s,element:r,motionValue:u}=this;if(a[0]===null){const d=u==null?void 0:u.get(),h=a[a.length-1];if(d!==void 0)a[0]=d;else if(r&&s){const p=r.readValue(s,h);p!=null&&(a[0]=p)}a[0]===void 0&&(a[0]=h),u&&d===void 0&&u.set(a[0])}TE(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Pa.delete(this)}cancel(){this.state==="scheduled"&&(Pa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const RE=n=>n.startsWith("--");function Dy(n,a,s){RE(a)?n.style.setProperty(a,s):n.style[a]=s}const zE={};function Oy(n,a){const s=iy(n);return()=>zE[a]??s()}const kE=Oy(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ry=Oy(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),il=([n,a,s,r])=>`cubic-bezier(${n}, ${a}, ${s}, ${r})`,Zv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:il([0,.65,.55,1]),circOut:il([.55,0,1,.45]),backIn:il([.31,.01,.66,-.59]),backOut:il([.33,1.53,.69,.99])};function zy(n,a){if(n)return typeof n=="function"?Ry()?Ey(n,a):"ease-out":py(n)?il(n):Array.isArray(n)?n.map(s=>zy(s,a)||Zv.easeOut):Zv[n]}function LE(n,a,s,{delay:r=0,duration:u=300,repeat:d=0,repeatType:h="loop",ease:p="easeOut",times:m}={},g=void 0){const x={[a]:s};m&&(x.offset=m);const y=zy(p,u);Array.isArray(y)&&(x.easing=y);const S={delay:r,duration:u,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:d+1,direction:h==="reverse"?"alternate":"normal"};return g&&(S.pseudoElement=g),n.animate(x,S)}function ky(n){return typeof n=="function"&&"applyToOptions"in n}function VE({type:n,...a}){return ky(n)&&Ry()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class Ly extends Xd{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:s,name:r,keyframes:u,pseudoElement:d,allowFlatten:h=!1,finalKeyframe:p,onComplete:m}=a;this.isPseudoElement=!!d,this.allowFlatten=h,this.options=a,Vd(typeof a.type!="string");const g=VE(a);this.animation=LE(s,r,u,g,d),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const x=Bo(u,this.options,p,this.speed);this.updateMotionValue&&this.updateMotionValue(x),Dy(s,r,x),this.animation.cancel()}m==null||m(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var a,s;(s=(a=this.animation).finish)==null||s.call(a)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var s,r,u;const a=(s=this.options)==null?void 0:s.element;!this.isPseudoElement&&(a!=null&&a.isConnected)&&((u=(r=this.animation).commitStyles)==null||u.call(r))}get duration(){var s,r;const a=((r=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:r.call(s).duration)||0;return Pt(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Pt(a)}get time(){return Pt(Number(this.animation.currentTime)||0)}set time(a){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ut(a),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,rangeStart:s,rangeEnd:r,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&kE()?(this.animation.timeline=a,s&&(this.animation.rangeStart=s),r&&(this.animation.rangeEnd=r),Jt):u(this)}}const Vy={anticipate:fy,backInOut:cy,circInOut:hy};function _E(n){return n in Vy}function UE(n){typeof n.ease=="string"&&_E(n.ease)&&(n.ease=Vy[n.ease])}const Nf=10;class BE extends Ly{constructor(a){UE(a),Ay(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:s,onUpdate:r,onComplete:u,element:d,...h}=this.options;if(!s)return;if(a!==void 0){s.set(a);return}const p=new jo({...h,autoplay:!1}),m=Math.max(Nf,vt.now()-this.startTime),g=pn(0,Nf,m-Nf),x=p.sample(m).value,{name:y}=this.options;d&&y&&Dy(d,y,x),s.setWithVelocity(p.sample(Math.max(0,m-g)).value,x,g),p.stop()}}const Qv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(sn.test(n)||n==="0")&&!n.startsWith("url("));function HE(n){const a=n[0];if(n.length===1)return!0;for(let s=0;s<n.length;s++)if(n[s]!==a)return!0}function $E(n,a,s,r){const u=n[0];if(u===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],h=Qv(u,a),p=Qv(d,a);return!h||!p?!1:HE(n)||(s==="spring"||ky(s))&&r}function fd(n){n.duration=0,n.type="keyframes"}const _y=new Set(["opacity","clipPath","filter","transform"]),qE=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function YE(n){for(let a=0;a<n.length;a++)if(typeof n[a]=="string"&&qE.test(n[a]))return!0;return!1}const GE=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),XE=iy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function KE(n){var y;const{motionValue:a,name:s,repeatDelay:r,repeatType:u,damping:d,type:h,keyframes:p}=n;if(!(((y=a==null?void 0:a.owner)==null?void 0:y.current)instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:x}=a.owner.getProps();return XE()&&s&&(_y.has(s)||GE.has(s)&&YE(p))&&(s!=="transform"||!x)&&!g&&!r&&u!=="mirror"&&d!==0&&h!=="inertia"}const FE=40;class ZE extends Xd{constructor({autoplay:a=!0,delay:s=0,type:r="keyframes",repeat:u=0,repeatDelay:d=0,repeatType:h="loop",keyframes:p,name:m,motionValue:g,element:x,...y}){var j;super(),this.stop=()=>{var E,D;this._animation&&(this._animation.stop(),(E=this.stopTimeline)==null||E.call(this)),(D=this.keyframeResolver)==null||D.cancel()},this.createdAt=vt.now();const S={autoplay:a,delay:s,type:r,repeat:u,repeatDelay:d,repeatType:h,name:m,motionValue:g,element:x,...y},w=(x==null?void 0:x.KeyframeResolver)||Kd;this.keyframeResolver=new w(p,(E,D,R)=>this.onKeyframesResolved(E,D,S,!R),m,g,x),(j=this.keyframeResolver)==null||j.scheduleResolve()}onKeyframesResolved(a,s,r,u){var R,M;this.keyframeResolver=void 0;const{name:d,type:h,velocity:p,delay:m,isHandoff:g,onUpdate:x}=r;this.resolvedAt=vt.now();let y=!0;$E(a,d,h,p)||(y=!1,(va.instantAnimations||!m)&&(x==null||x(Bo(a,r,s))),a[0]=a[a.length-1],fd(r),r.repeat=0);const w={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>FE?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...r,keyframes:a},j=y&&!g&&KE(w),E=(M=(R=w.motionValue)==null?void 0:R.owner)==null?void 0:M.current;let D;if(j)try{D=new BE({...w,element:E})}catch{D=new jo(w)}else D=new jo(w);D.finished.then(()=>{this.notifyFinished()}).catch(Jt),this.pendingTimeline&&(this.stopTimeline=D.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=D}get finished(){return this._animation?this.animation.finished:this._finished}then(a,s){return this.finished.finally(a).then(()=>{})}get animation(){var a;return this._animation||((a=this.keyframeResolver)==null||a.resume(),OE()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var a;this._animation&&this.animation.cancel(),(a=this.keyframeResolver)==null||a.cancel()}}function Uy(n,a,s,r=0,u=1){const d=Array.from(n).sort((g,x)=>g.sortNodePosition(x)).indexOf(a),h=n.size,p=(h-1)*r;return typeof s=="function"?s(d,h):u===1?d*r:p-d*r}const QE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function PE(n){const a=QE.exec(n);if(!a)return[,];const[,s,r,u]=a;return[`--${s??r}`,u]}function By(n,a,s=1){const[r,u]=PE(n);if(!r)return;const d=window.getComputedStyle(a).getPropertyValue(r);if(d){const h=d.trim();return ty(h)?parseFloat(h):h}return Hd(u)?By(u,a,s+1):u}const JE={type:"spring",stiffness:500,damping:25,restSpeed:10},WE=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),IE={type:"keyframes",duration:.8},e5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},t5=(n,{keyframes:a})=>a.length>2?IE:ts.has(n)?n.startsWith("scale")?WE(a[1]):JE:e5;function Hy(n,a){if(n!=null&&n.inherit&&a){const{inherit:s,...r}=n;return{...a,...r}}return n}function Fd(n,a){const s=(n==null?void 0:n[a])??(n==null?void 0:n.default)??n;return s!==n?Hy(s,n):s}const n5=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function a5(n){for(const a in n)if(!n5.has(a))return!0;return!1}const Zd=(n,a,s,r={},u,d)=>h=>{const p=Fd(r,n)||{},m=p.delay||r.delay||0;let{elapsed:g=0}=r;g=g-Ut(m);const x={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:S=>{a.set(S),p.onUpdate&&p.onUpdate(S)},onComplete:()=>{h(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:d?void 0:u};a5(p)||Object.assign(x,t5(n,x)),x.duration&&(x.duration=Ut(x.duration)),x.repeatDelay&&(x.repeatDelay=Ut(x.repeatDelay)),x.from!==void 0&&(x.keyframes[0]=x.from);let y=!1;if((x.type===!1||x.duration===0&&!x.repeatDelay)&&(fd(x),x.delay===0&&(y=!0)),(va.instantAnimations||va.skipAnimations||u!=null&&u.shouldSkipAnimations)&&(y=!0,fd(x),x.delay=0),x.allowFlatten=!p.type&&!p.ease,y&&!d&&a.get()!==void 0){const S=Bo(x.keyframes,p);if(S!==void 0){ke.update(()=>{x.onUpdate(S),x.onComplete()});return}}return p.isSync?new jo(x):new ZE(x)};function Pv(n){const a=[{},{}];return n==null||n.values.forEach((s,r)=>{a[0][r]=s.get(),a[1][r]=s.getVelocity()}),a}function Qd(n,a,s,r){if(typeof a=="function"){const[u,d]=Pv(r);a=a(s!==void 0?s:n.custom,u,d)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[u,d]=Pv(r);a=a(s!==void 0?s:n.custom,u,d)}return a}function Ja(n,a,s){const r=n.getProps();return Qd(r,a,s!==void 0?s:r.custom,n)}const $y=new Set(["width","height","top","left","right","bottom",...es]),Jv=30,i5=n=>!isNaN(parseFloat(n));class s5{constructor(a,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var d;const u=vt.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((d=this.events.change)==null||d.notify(this.current),this.dependents))for(const h of this.dependents)h.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=s.owner}setCurrent(a){this.current=a,this.updatedAt=vt.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=i5(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,s){this.events[a]||(this.events[a]=new _d);const r=this.events[a].add(s);return a==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,s){this.passiveEffect=a,this.stopPassiveEffect=s}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,s,r){this.set(s),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-r}jump(a,s=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var a;(a=this.events.change)==null||a.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=vt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Jv)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Jv);return sy(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(a){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=a(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var a,s;(a=this.dependents)==null||a.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qi(n,a){return new s5(n,a)}const dd=n=>Array.isArray(n);function l5(n,a,s){n.hasValue(a)?n.getValue(a).set(s):n.addValue(a,Qi(s))}function r5(n){return dd(n)?n[n.length-1]||0:n}function o5(n,a){const s=Ja(n,a);let{transitionEnd:r={},transition:u={},...d}=s||{};d={...d,...r};for(const h in d){const p=r5(d[h]);l5(n,h,p)}}const ft=n=>!!(n&&n.getVelocity);function u5(n){return!!(ft(n)&&n.add)}function hd(n,a){const s=n.getValue("willChange");if(u5(s))return s.add(a);if(!s&&va.WillChange){const r=new va.WillChange("auto");n.addValue("willChange",r),r.add(a)}}function Pd(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const c5="framerAppearId",qy="data-"+Pd(c5);function Yy(n){return n.props[qy]}function f5({protectedKeys:n,needsAnimating:a},s){const r=n.hasOwnProperty(s)&&a[s]!==!0;return a[s]=!1,r}function Gy(n,a,{delay:s=0,transitionOverride:r,type:u}={}){let{transition:d,transitionEnd:h,...p}=a;const m=n.getDefaultTransition();d=d?Hy(d,m):m;const g=d==null?void 0:d.reduceMotion;r&&(d=r);const x=[],y=u&&n.animationState&&n.animationState.getState()[u];for(const S in p){const w=n.getValue(S,n.latestValues[S]??null),j=p[S];if(j===void 0||y&&f5(y,S))continue;const E={delay:s,...Fd(d||{},S)},D=w.get();if(D!==void 0&&!w.isAnimating()&&!Array.isArray(j)&&j===D&&!E.velocity){ke.update(()=>w.set(j));continue}let R=!1;if(window.MotionHandoffAnimation){const k=Yy(n);if(k){const U=window.MotionHandoffAnimation(k,S,ke);U!==null&&(E.startTime=U,R=!0)}}hd(n,S);const M=g??n.shouldReduceMotion;w.start(Zd(S,w,j,M&&$y.has(S)?{type:!1}:E,n,R));const z=w.animation;z&&x.push(z)}if(h){const S=()=>ke.update(()=>{h&&o5(n,h)});x.length?Promise.all(x).then(S):S()}return x}function md(n,a,s={}){var m;const r=Ja(n,a,s.type==="exit"?(m=n.presenceContext)==null?void 0:m.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};s.transitionOverride&&(u=s.transitionOverride);const d=r?()=>Promise.all(Gy(n,r,s)):()=>Promise.resolve(),h=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:x=0,staggerChildren:y,staggerDirection:S}=u;return d5(n,a,g,x,y,S,s)}:()=>Promise.resolve(),{when:p}=u;if(p){const[g,x]=p==="beforeChildren"?[d,h]:[h,d];return g().then(()=>x())}else return Promise.all([d(),h(s.delay)])}function d5(n,a,s=0,r=0,u=0,d=1,h){const p=[];for(const m of n.variantChildren)m.notify("AnimationStart",a),p.push(md(m,a,{...h,delay:s+(typeof r=="function"?0:r)+Uy(n.variantChildren,m,r,u,d)}).then(()=>m.notify("AnimationComplete",a)));return Promise.all(p)}function h5(n,a,s={}){n.notify("AnimationStart",a);let r;if(Array.isArray(a)){const u=a.map(d=>md(n,d,s));r=Promise.all(u)}else if(typeof a=="string")r=md(n,a,s);else{const u=typeof a=="function"?Ja(n,a,s.custom):a;r=Promise.all(Gy(n,u,s))}return r.then(()=>{n.notify("AnimationComplete",a)})}const m5={test:n=>n==="auto",parse:n=>n},Xy=n=>a=>a.test(n),Ky=[Ii,te,mn,ca,Hj,Bj,m5],Wv=n=>Ky.find(Xy(n));function p5(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||ay(n):!0}const g5=new Set(["brightness","contrast","saturate","opacity"]);function v5(n){const[a,s]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[r]=s.match($d)||[];if(!r)return n;const u=s.replace(r,"");let d=g5.has(a)?1:0;return r!==s&&(d*=100),a+"("+d+u+")"}const x5=/\b([a-z-]*)\(.*?\)/gu,pd={...sn,getAnimatableNone:n=>{const a=n.match(x5);return a?a.map(v5).join(" "):n}},gd={...sn,getAnimatableNone:n=>{const a=sn.parse(n);return sn.createTransformer(n)(a.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Iv={...Ii,transform:Math.round},y5={rotate:ca,rotateX:ca,rotateY:ca,rotateZ:ca,scale:Ir,scaleX:Ir,scaleY:Ir,scaleZ:Ir,skew:ca,skewX:ca,skewY:ca,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:xl,originX:Bv,originY:Bv,originZ:te},Jd={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,top:te,right:te,bottom:te,left:te,inset:te,insetBlock:te,insetBlockStart:te,insetBlockEnd:te,insetInline:te,insetInlineStart:te,insetInlineEnd:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,paddingBlock:te,paddingBlockStart:te,paddingBlockEnd:te,paddingInline:te,paddingInlineStart:te,paddingInlineEnd:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,marginBlock:te,marginBlockStart:te,marginBlockEnd:te,marginInline:te,marginInlineStart:te,marginInlineEnd:te,fontSize:te,backgroundPositionX:te,backgroundPositionY:te,...y5,zIndex:Iv,fillOpacity:xl,strokeOpacity:xl,numOctaves:Iv},b5={...Jd,color:Ie,backgroundColor:Ie,outlineColor:Ie,fill:Ie,stroke:Ie,borderColor:Ie,borderTopColor:Ie,borderRightColor:Ie,borderBottomColor:Ie,borderLeftColor:Ie,filter:pd,WebkitFilter:pd,mask:gd,WebkitMask:gd},Fy=n=>b5[n],S5=new Set([pd,gd]);function Zy(n,a){let s=Fy(n);return S5.has(s)||(s=sn),s.getAnimatableNone?s.getAnimatableNone(a):void 0}const w5=new Set(["auto","none","0"]);function T5(n,a,s){let r=0,u;for(;r<n.length&&!u;){const d=n[r];typeof d=="string"&&!w5.has(d)&&Zi(d).values.length&&(u=n[r]),r++}if(u&&s)for(const d of a)n[d]=Zy(s,u)}class j5 extends Kd{constructor(a,s,r,u,d){super(a,s,r,u,d,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:s,name:r}=this;if(!s||!s.current)return;super.readKeyframes();for(let x=0;x<a.length;x++){let y=a[x];if(typeof y=="string"&&(y=y.trim(),Hd(y))){const S=By(y,s.current);S!==void 0&&(a[x]=S),x===a.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!$y.has(r)||a.length!==2)return;const[u,d]=a,h=Wv(u),p=Wv(d),m=Uv(u),g=Uv(d);if(m!==g&&pa[r]){this.needsMeasurement=!0;return}if(h!==p)if(Fv(h)&&Fv(p))for(let x=0;x<a.length;x++){const y=a[x];typeof y=="string"&&(a[x]=parseFloat(y))}else pa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:s}=this,r=[];for(let u=0;u<a.length;u++)(a[u]===null||p5(a[u]))&&r.push(u);r.length&&T5(a,r,s)}measureInitialState(){const{element:a,unresolvedKeyframes:s,name:r}=this;if(!a||!a.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pa[r](a.measureViewportBox(),window.getComputedStyle(a.current)),s[0]=this.measuredOrigin;const u=s[s.length-1];u!==void 0&&a.getValue(r,u).jump(u,!1)}measureEndState(){var p;const{element:a,name:s,unresolvedKeyframes:r}=this;if(!a||!a.current)return;const u=a.getValue(s);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,h=r[d];r[d]=pa[s](a.measureViewportBox(),window.getComputedStyle(a.current)),h!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=h),(p=this.removedTransforms)!=null&&p.length&&this.removedTransforms.forEach(([m,g])=>{a.getValue(m).set(g)}),this.resolveNoneKeyframes()}}function Qy(n,a,s){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let r=document;const u=(s==null?void 0:s[n])??r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n).filter(r=>r!=null)}const Py=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function E5(n){return ny(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:Wd}=gy(queueMicrotask,!1),nn={x:!1,y:!1};function Jy(){return nn.x||nn.y}function N5(n){return n==="x"||n==="y"?nn[n]?null:(nn[n]=!0,()=>{nn[n]=!1}):nn.x||nn.y?null:(nn.x=nn.y=!0,()=>{nn.x=nn.y=!1})}function Wy(n,a){const s=Qy(n),r=new AbortController,u={passive:!0,...a,signal:r.signal};return[s,u,()=>r.abort()]}function A5(n){return!(n.pointerType==="touch"||Jy())}function C5(n,a,s={}){const[r,u,d]=Wy(n,s);return r.forEach(h=>{let p=!1,m=!1,g;const x=()=>{h.removeEventListener("pointerleave",j)},y=D=>{g&&(g(D),g=void 0),x()},S=D=>{p=!1,window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),m&&(m=!1,y(D))},w=()=>{p=!0,window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",S,u)},j=D=>{if(D.pointerType!=="touch"){if(p){m=!0;return}y(D)}},E=D=>{if(!A5(D))return;m=!1;const R=a(h,D);typeof R=="function"&&(g=R,h.addEventListener("pointerleave",j,u))};h.addEventListener("pointerenter",E,u),h.addEventListener("pointerdown",w,u)}),d}const Iy=(n,a)=>a?n===a?!0:Iy(n,a.parentElement):!1,Id=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,M5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function D5(n){return M5.has(n.tagName)||n.isContentEditable===!0}const O5=new Set(["INPUT","SELECT","TEXTAREA"]);function R5(n){return O5.has(n.tagName)||n.isContentEditable===!0}const ro=new WeakSet;function e0(n){return a=>{a.key==="Enter"&&n(a)}}function Af(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const z5=(n,a)=>{const s=n.currentTarget;if(!s)return;const r=e0(()=>{if(ro.has(s))return;Af(s,"down");const u=e0(()=>{Af(s,"up")}),d=()=>Af(s,"cancel");s.addEventListener("keyup",u,a),s.addEventListener("blur",d,a)});s.addEventListener("keydown",r,a),s.addEventListener("blur",()=>s.removeEventListener("keydown",r),a)};function t0(n){return Id(n)&&!Jy()}const n0=new WeakSet;function k5(n,a,s={}){const[r,u,d]=Wy(n,s),h=p=>{const m=p.currentTarget;if(!t0(p)||n0.has(p))return;ro.add(m),s.stopPropagation&&n0.add(p);const g=a(m,p),x=(w,j)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",S),ro.has(m)&&ro.delete(m),t0(w)&&typeof g=="function"&&g(w,{success:j})},y=w=>{x(w,m===window||m===document||s.useGlobalTarget||Iy(m,w.target))},S=w=>{x(w,!1)};window.addEventListener("pointerup",y,u),window.addEventListener("pointercancel",S,u)};return r.forEach(p=>{(s.useGlobalTarget?window:p).addEventListener("pointerdown",h,u),E5(p)&&(p.addEventListener("focus",g=>z5(g,u)),!D5(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),d}function eh(n){return ny(n)&&"ownerSVGElement"in n}const oo=new WeakMap;let fa;const eb=(n,a,s)=>(r,u)=>u&&u[0]?u[0][n+"Size"]:eh(r)&&"getBBox"in r?r.getBBox()[a]:r[s],L5=eb("inline","width","offsetWidth"),V5=eb("block","height","offsetHeight");function _5({target:n,borderBoxSize:a}){var s;(s=oo.get(n))==null||s.forEach(r=>{r(n,{get width(){return L5(n,a)},get height(){return V5(n,a)}})})}function U5(n){n.forEach(_5)}function B5(){typeof ResizeObserver>"u"||(fa=new ResizeObserver(U5))}function H5(n,a){fa||B5();const s=Qy(n);return s.forEach(r=>{let u=oo.get(r);u||(u=new Set,oo.set(r,u)),u.add(a),fa==null||fa.observe(r)}),()=>{s.forEach(r=>{const u=oo.get(r);u==null||u.delete(a),u!=null&&u.size||fa==null||fa.unobserve(r)})}}const uo=new Set;let Yi;function $5(){Yi=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};uo.forEach(a=>a(n))},window.addEventListener("resize",Yi)}function q5(n){return uo.add(n),Yi||$5(),()=>{uo.delete(n),!uo.size&&typeof Yi=="function"&&(window.removeEventListener("resize",Yi),Yi=void 0)}}function a0(n,a){return typeof n=="function"?q5(n):H5(n,a)}function Y5(n){return eh(n)&&n.tagName==="svg"}const G5=[...Ky,Ie,sn],X5=n=>G5.find(Xy(n)),i0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gi=()=>({x:i0(),y:i0()}),s0=()=>({min:0,max:0}),nt=()=>({x:s0(),y:s0()}),K5=new WeakMap;function Ho(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function yl(n){return typeof n=="string"||Array.isArray(n)}const th=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nh=["initial",...th];function $o(n){return Ho(n.animate)||nh.some(a=>yl(n[a]))}function tb(n){return!!($o(n)||n.variants)}function F5(n,a,s){for(const r in a){const u=a[r],d=s[r];if(ft(u))n.addValue(r,u);else if(ft(d))n.addValue(r,Qi(u,{owner:n}));else if(d!==u)if(n.hasValue(r)){const h=n.getValue(r);h.liveStyle===!0?h.jump(u):h.hasAnimated||h.set(u)}else{const h=n.getStaticValue(r);n.addValue(r,Qi(h!==void 0?h:u,{owner:n}))}}for(const r in s)a[r]===void 0&&n.removeValue(r);return a}const vd={current:null},nb={current:!1},Z5=typeof window<"u";function Q5(){if(nb.current=!0,!!Z5)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>vd.current=n.matches;n.addEventListener("change",a),a()}else vd.current=!1}const l0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Eo={};function ab(n){Eo=n}function P5(){return Eo}class J5{scrapeMotionValuesFromProps(a,s,r){return{}}constructor({parent:a,props:s,presenceContext:r,reducedMotionConfig:u,skipAnimations:d,blockInitialAnimation:h,visualState:p},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=vt.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,ke.render(this.render,!1,!0))};const{latestValues:g,renderState:x}=p;this.latestValues=g,this.baseTarget={...g},this.initialValues=s.initial?{...g}:{},this.renderState=x,this.parent=a,this.props=s,this.presenceContext=r,this.depth=a?a.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=d,this.options=m,this.blockInitialAnimation=!!h,this.isControllingVariants=$o(s),this.isVariantNode=tb(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:y,...S}=this.scrapeMotionValuesFromProps(s,{},this);for(const w in S){const j=S[w];g[w]!==void 0&&ft(j)&&j.set(g[w])}}mount(a){var s,r;if(this.hasBeenMounted)for(const u in this.initialValues)(s=this.values.get(u))==null||s.jump(this.initialValues[u]),this.latestValues[u]=this.initialValues[u];this.current=a,K5.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((u,d)=>this.bindToMotionValue(d,u)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(nb.current||Q5(),this.shouldReduceMotion=vd.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var a;this.projection&&this.projection.unmount(),xa(this.notifyUpdate),xa(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(a=this.parent)==null||a.removeChild(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const r=this.features[s];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,s){if(this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)(),s.accelerate&&_y.has(a)&&this.current instanceof HTMLElement){const{factory:h,keyframes:p,times:m,ease:g,duration:x}=s.accelerate,y=new Ly({element:this.current,name:a,keyframes:p,times:m,ease:g,duration:Ut(x)}),S=h(y);this.valueSubscriptions.set(a,()=>{S(),y.cancel()});return}const r=ts.has(a);r&&this.onBindTransform&&this.onBindTransform();const u=s.on("change",h=>{this.latestValues[a]=h,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,s)),this.valueSubscriptions.set(a,()=>{u(),d&&d(),s.owner&&s.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Eo){const s=Eo[a];if(!s)continue;const{isEnabled:r,Feature:u}=s;if(!this.features[a]&&u&&r(this.props)&&(this.features[a]=new u(this)),this.features[a]){const d=this.features[a];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,s){this.latestValues[a]=s}update(a,s){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let r=0;r<l0.length;r++){const u=l0[r];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const d="on"+u,h=a[d];h&&(this.propEventSubscriptions[u]=this.on(u,h))}this.prevMotionValues=F5(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(a),()=>s.variantChildren.delete(a)}addValue(a,s){const r=this.values.get(a);s!==r&&(r&&this.removeValue(a),this.bindToMotionValue(a,s),this.values.set(a,s),this.latestValues[a]=s.get())}removeValue(a){this.values.delete(a);const s=this.valueSubscriptions.get(a);s&&(s(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,s){if(this.props.values&&this.props.values[a])return this.props.values[a];let r=this.values.get(a);return r===void 0&&s!==void 0&&(r=Qi(s===null?void 0:s,{owner:this}),this.addValue(a,r)),r}readValue(a,s){let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(ty(r)||ay(r))?r=parseFloat(r):!X5(r)&&sn.test(s)&&(r=Zy(a,s)),this.setBaseTarget(a,ft(r)?r.get():r)),ft(r)?r.get():r}setBaseTarget(a,s){this.baseTarget[a]=s}getBaseTarget(a){var d;const{initial:s}=this.props;let r;if(typeof s=="string"||typeof s=="object"){const h=Qd(this.props,s,(d=this.presenceContext)==null?void 0:d.custom);h&&(r=h[a])}if(s&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!ft(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,s){return this.events[a]||(this.events[a]=new _d),this.events[a].add(s)}notify(a,...s){this.events[a]&&this.events[a].notify(...s)}scheduleRenderMicrotask(){Wd.render(this.render)}}class ib extends J5{constructor(){super(...arguments),this.KeyframeResolver=j5}sortInstanceNodePosition(a,s){return a.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(a,s){const r=a.style;return r?r[s]:void 0}removeValueFromRenderState(a,{vars:s,style:r}){delete s[a],delete r[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;ft(a)&&(this.childSubscription=a.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Sa{constructor(a){this.isMounted=!1,this.node=a}update(){}}function sb({top:n,left:a,right:s,bottom:r}){return{x:{min:a,max:s},y:{min:n,max:r}}}function W5({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function I5(n,a){if(!a)return n;const s=a({x:n.left,y:n.top}),r=a({x:n.right,y:n.bottom});return{top:s.y,left:s.x,bottom:r.y,right:r.x}}function Cf(n){return n===void 0||n===1}function xd({scale:n,scaleX:a,scaleY:s}){return!Cf(n)||!Cf(a)||!Cf(s)}function Ya(n){return xd(n)||lb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function lb(n){return r0(n.x)||r0(n.y)}function r0(n){return n&&n!=="0%"}function No(n,a,s){const r=n-s,u=a*r;return s+u}function o0(n,a,s,r,u){return u!==void 0&&(n=No(n,u,r)),No(n,s,r)+a}function yd(n,a=0,s=1,r,u){n.min=o0(n.min,a,s,r,u),n.max=o0(n.max,a,s,r,u)}function rb(n,{x:a,y:s}){yd(n.x,a.translate,a.scale,a.originPoint),yd(n.y,s.translate,s.scale,s.originPoint)}const u0=.999999999999,c0=1.0000000000001;function eN(n,a,s,r=!1){var p;const u=s.length;if(!u)return;a.x=a.y=1;let d,h;for(let m=0;m<u;m++){d=s[m],h=d.projectionDelta;const{visualElement:g}=d.options;g&&g.props.style&&g.props.style.display==="contents"||(r&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(dn(n.x,-d.scroll.offset.x),dn(n.y,-d.scroll.offset.y)),h&&(a.x*=h.x.scale,a.y*=h.y.scale,rb(n,h)),r&&Ya(d.latestValues)&&co(n,d.latestValues,(p=d.layout)==null?void 0:p.layoutBox))}a.x<c0&&a.x>u0&&(a.x=1),a.y<c0&&a.y>u0&&(a.y=1)}function dn(n,a){n.min+=a,n.max+=a}function f0(n,a,s,r,u=.5){const d=He(n.min,n.max,u);yd(n,a,s,d,r)}function d0(n,a){return typeof n=="string"?parseFloat(n)/100*(a.max-a.min):n}function co(n,a,s){const r=s??n;f0(n.x,d0(a.x,r.x),a.scaleX,a.scale,a.originX),f0(n.y,d0(a.y,r.y),a.scaleY,a.scale,a.originY)}function ob(n,a){return sb(I5(n.getBoundingClientRect(),a))}function tN(n,a,s){const r=ob(n,s),{scroll:u}=a;return u&&(dn(r.x,u.offset.x),dn(r.y,u.offset.y)),r}const nN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aN=es.length;function iN(n,a,s){let r="",u=!0;for(let d=0;d<aN;d++){const h=es[d],p=n[h];if(p===void 0)continue;let m=!0;if(typeof p=="number")m=p===(h.startsWith("scale")?1:0);else{const g=parseFloat(p);m=h.startsWith("scale")?g===1:g===0}if(!m||s){const g=Py(p,Jd[h]);if(!m){u=!1;const x=nN[h]||h;r+=`${x}(${g}) `}s&&(a[h]=g)}}return r=r.trim(),s?r=s(a,u?"":r):u&&(r="none"),r}function ah(n,a,s){const{style:r,vars:u,transformOrigin:d}=n;let h=!1,p=!1;for(const m in a){const g=a[m];if(ts.has(m)){h=!0;continue}else if(xy(m)){u[m]=g;continue}else{const x=Py(g,Jd[m]);m.startsWith("origin")?(p=!0,d[m]=x):r[m]=x}}if(a.transform||(h||s?r.transform=iN(a,n.transform,s):r.transform&&(r.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:x=0}=d;r.transformOrigin=`${m} ${g} ${x}`}}function ub(n,{style:a,vars:s},r,u){const d=n.style;let h;for(h in a)d[h]=a[h];u==null||u.applyProjectionStyles(d,r);for(h in s)d.setProperty(h,s[h])}function h0(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Js={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(te.test(n))n=parseFloat(n);else return n;const s=h0(n,a.target.x),r=h0(n,a.target.y);return`${s}% ${r}%`}},sN={correct:(n,{treeScale:a,projectionDelta:s})=>{const r=n,u=sn.parse(n);if(u.length>5)return r;const d=sn.createTransformer(n),h=typeof u[0]!="number"?1:0,p=s.x.scale*a.x,m=s.y.scale*a.y;u[0+h]/=p,u[1+h]/=m;const g=He(p,m,.5);return typeof u[2+h]=="number"&&(u[2+h]/=g),typeof u[3+h]=="number"&&(u[3+h]/=g),d(u)}},bd={borderRadius:{...Js,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Js,borderTopRightRadius:Js,borderBottomLeftRadius:Js,borderBottomRightRadius:Js,boxShadow:sN};function cb(n,{layout:a,layoutId:s}){return ts.has(n)||n.startsWith("origin")||(a||s!==void 0)&&(!!bd[n]||n==="opacity")}function ih(n,a,s){var h;const r=n.style,u=a==null?void 0:a.style,d={};if(!r)return d;for(const p in r)(ft(r[p])||u&&ft(u[p])||cb(p,n)||((h=s==null?void 0:s.getValue(p))==null?void 0:h.liveStyle)!==void 0)&&(d[p]=r[p]);return d}function lN(n){return window.getComputedStyle(n)}class rN extends ib{constructor(){super(...arguments),this.type="html",this.renderInstance=ub}readValueFromInstance(a,s){var r;if(ts.has(s))return(r=this.projection)!=null&&r.isProjecting?ld(s):NE(a,s);{const u=lN(a),d=(xy(s)?u.getPropertyValue(s):u[s])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(a,{transformPagePoint:s}){return ob(a,s)}build(a,s,r){ah(a,s,r.transformTemplate)}scrapeMotionValuesFromProps(a,s,r){return ih(a,s,r)}}const oN={offset:"stroke-dashoffset",array:"stroke-dasharray"},uN={offset:"strokeDashoffset",array:"strokeDasharray"};function cN(n,a,s=1,r=0,u=!0){n.pathLength=1;const d=u?oN:uN;n[d.offset]=`${-r}`,n[d.array]=`${a} ${s}`}const fN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fb(n,{attrX:a,attrY:s,attrScale:r,pathLength:u,pathSpacing:d=1,pathOffset:h=0,...p},m,g,x){if(ah(n,p,g),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:y,style:S}=n;y.transform&&(S.transform=y.transform,delete y.transform),(S.transform||y.transformOrigin)&&(S.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),S.transform&&(S.transformBox=(x==null?void 0:x.transformBox)??"fill-box",delete y.transformBox);for(const w of fN)y[w]!==void 0&&(S[w]=y[w],delete y[w]);a!==void 0&&(y.x=a),s!==void 0&&(y.y=s),r!==void 0&&(y.scale=r),u!==void 0&&cN(y,u,d,h,!1)}const db=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),hb=n=>typeof n=="string"&&n.toLowerCase()==="svg";function dN(n,a,s,r){ub(n,a,void 0,r);for(const u in a.attrs)n.setAttribute(db.has(u)?u:Pd(u),a.attrs[u])}function mb(n,a,s){const r=ih(n,a,s);for(const u in n)if(ft(n[u])||ft(a[u])){const d=es.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;r[d]=n[u]}return r}class hN extends ib{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt}getBaseTargetFromProps(a,s){return a[s]}readValueFromInstance(a,s){if(ts.has(s)){const r=Fy(s);return r&&r.default||0}return s=db.has(s)?s:Pd(s),a.getAttribute(s)}scrapeMotionValuesFromProps(a,s,r){return mb(a,s,r)}build(a,s,r){fb(a,s,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(a,s,r,u){dN(a,s,r,u)}mount(a){this.isSVGTag=hb(a.tagName),super.mount(a)}}const mN=nh.length;function pb(n){if(!n)return;if(!n.isControllingVariants){const s=n.parent?pb(n.parent)||{}:{};return n.props.initial!==void 0&&(s.initial=n.props.initial),s}const a={};for(let s=0;s<mN;s++){const r=nh[s],u=n.props[r];(yl(u)||u===!1)&&(a[r]=u)}return a}function gb(n,a){if(!Array.isArray(a))return!1;const s=a.length;if(s!==n.length)return!1;for(let r=0;r<s;r++)if(a[r]!==n[r])return!1;return!0}const pN=[...th].reverse(),gN=th.length;function vN(n){return a=>Promise.all(a.map(({animation:s,options:r})=>h5(n,s,r)))}function xN(n){let a=vN(n),s=m0(),r=!0,u=!1;const d=g=>(x,y)=>{var w;const S=Ja(n,y,g==="exit"?(w=n.presenceContext)==null?void 0:w.custom:void 0);if(S){const{transition:j,transitionEnd:E,...D}=S;x={...x,...D,...E}}return x};function h(g){a=g(n)}function p(g){const{props:x}=n,y=pb(n.parent)||{},S=[],w=new Set;let j={},E=1/0;for(let R=0;R<gN;R++){const M=pN[R],z=s[M],k=x[M]!==void 0?x[M]:y[M],U=yl(k),P=M===g?z.isActive:null;P===!1&&(E=R);let F=k===y[M]&&k!==x[M]&&U;if(F&&(r||u)&&n.manuallyAnimateOnMount&&(F=!1),z.protectedKeys={...j},!z.isActive&&P===null||!k&&!z.prevProp||Ho(k)||typeof k=="boolean")continue;if(M==="exit"&&z.isActive&&P!==!0){z.prevResolvedValues&&(j={...j,...z.prevResolvedValues});continue}const W=yN(z.prevProp,k);let re=W||M===g&&z.isActive&&!F&&U||R>E&&U,B=!1;const Z=Array.isArray(k)?k:[k];let ie=Z.reduce(d(M),{});P===!1&&(ie={});const{prevResolvedValues:le={}}=z,Se={...le,...ie},De=J=>{re=!0,w.has(J)&&(B=!0,w.delete(J)),z.needsAnimating[J]=!0;const oe=n.getValue(J);oe&&(oe.liveStyle=!1)};for(const J in Se){const oe=ie[J],me=le[J];if(j.hasOwnProperty(J))continue;let A=!1;dd(oe)&&dd(me)?A=!gb(oe,me):A=oe!==me,A?oe!=null?De(J):w.add(J):oe!==void 0&&w.has(J)?De(J):z.protectedKeys[J]=!0}z.prevProp=k,z.prevResolvedValues=ie,z.isActive&&(j={...j,...ie}),(r||u)&&n.blockInitialAnimation&&(re=!1);const $=F&&W;re&&(!$||B)&&S.push(...Z.map(J=>{const oe={type:M};if(typeof J=="string"&&(r||u)&&!$&&n.manuallyAnimateOnMount&&n.parent){const{parent:me}=n,A=Ja(me,J);if(me.enteringChildren&&A){const{delayChildren:G}=A.transition||{};oe.delay=Uy(me.enteringChildren,n,G)}}return{animation:J,options:oe}}))}if(w.size){const R={};if(typeof x.initial!="boolean"){const M=Ja(n,Array.isArray(x.initial)?x.initial[0]:x.initial);M&&M.transition&&(R.transition=M.transition)}w.forEach(M=>{const z=n.getBaseTarget(M),k=n.getValue(M);k&&(k.liveStyle=!0),R[M]=z??null}),S.push({animation:R})}let D=!!S.length;return r&&(x.initial===!1||x.initial===x.animate)&&!n.manuallyAnimateOnMount&&(D=!1),r=!1,u=!1,D?a(S):Promise.resolve()}function m(g,x){var S;if(s[g].isActive===x)return Promise.resolve();(S=n.variantChildren)==null||S.forEach(w=>{var j;return(j=w.animationState)==null?void 0:j.setActive(g,x)}),s[g].isActive=x;const y=p(g);for(const w in s)s[w].protectedKeys={};return y}return{animateChanges:p,setActive:m,setAnimateFunction:h,getState:()=>s,reset:()=>{s=m0(),u=!0}}}function yN(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!gb(a,n):!1}function $a(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function m0(){return{animate:$a(!0),whileInView:$a(),whileHover:$a(),whileTap:$a(),whileDrag:$a(),whileFocus:$a(),exit:$a()}}function Sd(n,a){n.min=a.min,n.max=a.max}function tn(n,a){Sd(n.x,a.x),Sd(n.y,a.y)}function p0(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}const vb=1e-4,bN=1-vb,SN=1+vb,xb=.01,wN=0-xb,TN=0+xb;function xt(n){return n.max-n.min}function jN(n,a,s){return Math.abs(n-a)<=s}function g0(n,a,s,r=.5){n.origin=r,n.originPoint=He(a.min,a.max,n.origin),n.scale=xt(s)/xt(a),n.translate=He(s.min,s.max,n.origin)-n.originPoint,(n.scale>=bN&&n.scale<=SN||isNaN(n.scale))&&(n.scale=1),(n.translate>=wN&&n.translate<=TN||isNaN(n.translate))&&(n.translate=0)}function hl(n,a,s,r){g0(n.x,a.x,s.x,r?r.originX:void 0),g0(n.y,a.y,s.y,r?r.originY:void 0)}function v0(n,a,s,r=0){const u=r?He(s.min,s.max,r):s.min;n.min=u+a.min,n.max=n.min+xt(a)}function EN(n,a,s,r){v0(n.x,a.x,s.x,r==null?void 0:r.x),v0(n.y,a.y,s.y,r==null?void 0:r.y)}function x0(n,a,s,r=0){const u=r?He(s.min,s.max,r):s.min;n.min=a.min-u,n.max=n.min+xt(a)}function Ao(n,a,s,r){x0(n.x,a.x,s.x,r==null?void 0:r.x),x0(n.y,a.y,s.y,r==null?void 0:r.y)}function y0(n,a,s,r,u){return n-=a,n=No(n,1/s,r),u!==void 0&&(n=No(n,1/u,r)),n}function NN(n,a=0,s=1,r=.5,u,d=n,h=n){if(mn.test(a)&&(a=parseFloat(a),a=He(h.min,h.max,a/100)-h.min),typeof a!="number")return;let p=He(d.min,d.max,r);n===d&&(p-=a),n.min=y0(n.min,a,s,p,u),n.max=y0(n.max,a,s,p,u)}function b0(n,a,[s,r,u],d,h){NN(n,a[s],a[r],a[u],a.scale,d,h)}const AN=["x","scaleX","originX"],CN=["y","scaleY","originY"];function S0(n,a,s,r){b0(n.x,a,AN,s?s.x:void 0,r?r.x:void 0),b0(n.y,a,CN,s?s.y:void 0,r?r.y:void 0)}function w0(n){return n.translate===0&&n.scale===1}function yb(n){return w0(n.x)&&w0(n.y)}function T0(n,a){return n.min===a.min&&n.max===a.max}function MN(n,a){return T0(n.x,a.x)&&T0(n.y,a.y)}function j0(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function bb(n,a){return j0(n.x,a.x)&&j0(n.y,a.y)}function E0(n){return xt(n.x)/xt(n.y)}function N0(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function fn(n){return[n("x"),n("y")]}function DN(n,a,s){let r="";const u=n.x.translate/a.x,d=n.y.translate/a.y,h=(s==null?void 0:s.z)||0;if((u||d||h)&&(r=`translate3d(${u}px, ${d}px, ${h}px) `),(a.x!==1||a.y!==1)&&(r+=`scale(${1/a.x}, ${1/a.y}) `),s){const{transformPerspective:g,rotate:x,rotateX:y,rotateY:S,skewX:w,skewY:j}=s;g&&(r=`perspective(${g}px) ${r}`),x&&(r+=`rotate(${x}deg) `),y&&(r+=`rotateX(${y}deg) `),S&&(r+=`rotateY(${S}deg) `),w&&(r+=`skewX(${w}deg) `),j&&(r+=`skewY(${j}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(r+=`scale(${p}, ${m})`),r||"none"}const Sb=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ON=Sb.length,A0=n=>typeof n=="string"?parseFloat(n):n,C0=n=>typeof n=="number"||te.test(n);function RN(n,a,s,r,u,d){u?(n.opacity=He(0,s.opacity??1,zN(r)),n.opacityExit=He(a.opacity??1,0,kN(r))):d&&(n.opacity=He(a.opacity??1,s.opacity??1,r));for(let h=0;h<ON;h++){const p=Sb[h];let m=M0(a,p),g=M0(s,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||C0(m)===C0(g)?(n[p]=Math.max(He(A0(m),A0(g),r),0),(mn.test(g)||mn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||s.rotate)&&(n.rotate=He(a.rotate||0,s.rotate||0,r))}function M0(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const zN=wb(0,.5,dy),kN=wb(.5,.95,Jt);function wb(n,a,s){return r=>r<n?0:r>a?1:s(vl(n,a,r))}function LN(n,a,s){const r=ft(n)?n:Qi(n);return r.start(Zd("",r,a,s)),r.animation}function bl(n,a,s,r={passive:!0}){return n.addEventListener(a,s,r),()=>n.removeEventListener(a,s)}const VN=(n,a)=>n.depth-a.depth;class _N{constructor(){this.children=[],this.isDirty=!1}add(a){Ld(this.children,a),this.isDirty=!0}remove(a){bo(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(VN),this.isDirty=!1,this.children.forEach(a)}}function UN(n,a){const s=vt.now(),r=({timestamp:u})=>{const d=u-s;d>=a&&(xa(r),n(d-a))};return ke.setup(r,!0),()=>xa(r)}function fo(n){return ft(n)?n.get():n}class BN{constructor(){this.members=[]}add(a){Ld(this.members,a);for(let s=this.members.length-1;s>=0;s--){const r=this.members[s];if(r===a||r===this.lead||r===this.prevLead)continue;const u=r.instance;(!u||u.isConnected===!1)&&!r.snapshot&&(bo(this.members,r),r.unmount())}a.scheduleRender()}remove(a){if(bo(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(a){var s;for(let r=this.members.indexOf(a)-1;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1&&((s=u.instance)==null?void 0:s.isConnected)!==!1)return this.promote(u),!0}return!1}promote(a,s){var u;const r=this.lead;if(a!==r&&(this.prevLead=r,this.lead=a,a.show(),r)){r.updateSnapshot(),a.scheduleRender();const{layoutDependency:d}=r.options,{layoutDependency:h}=a.options;(d===void 0||d!==h)&&(a.resumeFrom=r,s&&(r.preserveOpacity=!0),r.snapshot&&(a.snapshot=r.snapshot,a.snapshot.latestValues=r.animationValues||r.latestValues),(u=a.root)!=null&&u.isUpdating&&(a.isLayoutDirty=!0)),a.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(a=>{var s,r,u,d,h;(r=(s=a.options).onExitComplete)==null||r.call(s),(h=(u=a.resumingFrom)==null?void 0:(d=u.options).onExitComplete)==null||h.call(d)})}scheduleRender(){this.members.forEach(a=>a.instance&&a.scheduleRender(!1))}removeLeadSnapshot(){var a;(a=this.lead)!=null&&a.snapshot&&(this.lead.snapshot=void 0)}}const ho={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Mf=["","X","Y","Z"],HN=1e3;let $N=0;function Df(n,a,s,r){const{latestValues:u}=a;u[n]&&(s[n]=u[n],a.setStaticValue(n,0),r&&(r[n]=0))}function Tb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const s=Yy(a);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:u,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(s,"transform",ke,!(u||d))}const{parent:r}=n;r&&!r.hasCheckedOptimisedAppear&&Tb(r)}function jb({attachResizeListener:n,defaultParent:a,measureScroll:s,checkIsScrollRoot:r,resetTransform:u}){return class{constructor(h={},p=a==null?void 0:a()){this.id=$N++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(GN),this.nodes.forEach(PN),this.nodes.forEach(JN),this.nodes.forEach(XN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=h,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new _N)}addEventListener(h,p){return this.eventHandlers.has(h)||this.eventHandlers.set(h,new _d),this.eventHandlers.get(h).add(p)}notifyListeners(h,...p){const m=this.eventHandlers.get(h);m&&m.notify(...p)}hasListeners(h){return this.eventHandlers.has(h)}mount(h){if(this.instance)return;this.isSVG=eh(h)&&!Y5(h),this.instance=h;const{layoutId:p,layout:m,visualElement:g}=this.options;if(g&&!g.current&&g.mount(h),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||p)&&(this.isLayoutDirty=!0),n){let x,y=0;const S=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{y=window.innerWidth}),n(h,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,x&&x(),x=UN(S,250),ho.hasAnimatedSinceResize&&(ho.hasAnimatedSinceResize=!1,this.nodes.forEach(R0)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&g&&(p||m)&&this.addEventListener("didUpdate",({delta:x,hasLayoutChanged:y,hasRelativeLayoutChanged:S,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||g.getDefaultTransition()||nA,{onLayoutAnimationStart:E,onLayoutAnimationComplete:D}=g.getProps(),R=!this.targetLayout||!bb(this.targetLayout,w),M=!y&&S;if(this.options.layoutRoot||this.resumeFrom||M||y&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const z={...Fd(j,"layout"),onPlay:E,onComplete:D};(g.shouldReduceMotion||this.options.layoutRoot)&&(z.delay=0,z.type=!1),this.startAnimation(z),this.setAnimationOrigin(x,M)}else y||R0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const h=this.getStack();h&&h.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(WN),this.animationId++)}getTransformTemplate(){const{visualElement:h}=this.options;return h&&h.getProps().transformTemplate}willUpdate(h=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Tb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let x=0;x<this.path.length;x++){const y=this.path[x];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),h&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const m=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),m&&this.nodes.forEach(FN),this.nodes.forEach(D0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(O0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ZN),this.nodes.forEach(QN),this.nodes.forEach(qN),this.nodes.forEach(YN)):this.nodes.forEach(O0),this.clearAllSnapshots();const p=vt.now();ct.delta=pn(0,1e3/60,p-ct.timestamp),ct.timestamp=p,ct.isProcessing=!0,Sf.update.process(ct),Sf.preRender.process(ct),Sf.render.process(ct),ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KN),this.sharedNodes.forEach(IN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const h=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=nt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,h?h.layoutBox:void 0)}updateScroll(h="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===h&&(p=!1),p&&this.instance){const m=r(this.instance);this.scroll={animationId:this.root.animationId,phase:h,isRoot:m,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!u)return;const h=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!yb(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,x=g!==this.prevTransformTemplateValue;h&&this.instance&&(p||Ya(this.latestValues)||x)&&(u(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(h=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return h&&(m=this.removeTransform(m)),aA(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var g;const{visualElement:h}=this.options;if(!h)return nt();const p=h.measureViewportBox();if(!(((g=this.scroll)==null?void 0:g.wasRoot)||this.path.some(iA))){const{scroll:x}=this.root;x&&(dn(p.x,x.offset.x),dn(p.y,x.offset.y))}return p}removeElementScroll(h){var m;const p=nt();if(tn(p,h),(m=this.scroll)!=null&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const x=this.path[g],{scroll:y,options:S}=x;x!==this.root&&y&&S.layoutScroll&&(y.wasRoot&&tn(p,h),dn(p.x,y.offset.x),dn(p.y,y.offset.y))}return p}applyTransform(h,p=!1,m){var x,y;const g=m||nt();tn(g,h);for(let S=0;S<this.path.length;S++){const w=this.path[S];!p&&w.options.layoutScroll&&w.scroll&&w!==w.root&&(dn(g.x,-w.scroll.offset.x),dn(g.y,-w.scroll.offset.y)),Ya(w.latestValues)&&co(g,w.latestValues,(x=w.layout)==null?void 0:x.layoutBox)}return Ya(this.latestValues)&&co(g,this.latestValues,(y=this.layout)==null?void 0:y.layoutBox),g}removeTransform(h){var m;const p=nt();tn(p,h);for(let g=0;g<this.path.length;g++){const x=this.path[g];if(!Ya(x.latestValues))continue;let y;x.instance&&(xd(x.latestValues)&&x.updateSnapshot(),y=nt(),tn(y,x.measurePageBox())),S0(p,x.latestValues,(m=x.snapshot)==null?void 0:m.layoutBox,y)}return Ya(this.latestValues)&&S0(p,this.latestValues),p}setTargetDelta(h){this.targetDelta=h,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(h){this.options={...this.options,...h,crossfade:h.crossfade!==void 0?h.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(h=!1){var w;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(h||m&&this.isSharedProjectionDirty||this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:x,layoutId:y}=this.options;if(!this.layout||!(x||y))return;this.resolvedRelativeTargetAt=ct.timestamp;const S=this.getClosestProjectingParent();S&&this.linkedParentVersion!==S.layoutVersion&&!S.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&S&&S.layout?this.createRelativeTarget(S,this.layout.layoutBox,S.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=nt(),this.targetWithTransforms=nt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):tn(this.target,this.layout.layoutBox),rb(this.target,this.targetDelta)):tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?this.createRelativeTarget(S,this.target,S.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||xd(this.parent.latestValues)||lb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(h,p,m){this.relativeParent=h,this.linkedParentVersion=h.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=nt(),this.relativeTargetOrigin=nt(),Ao(this.relativeTargetOrigin,p,m,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var j;const h=this.getLead(),p=!!this.resumingFrom||this!==h;let m=!0;if((this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===ct.timestamp&&(m=!1),m)return;const{layout:g,layoutId:x}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||x))return;tn(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,S=this.treeScale.y;eN(this.layoutCorrected,this.treeScale,this.path,p),h.layout&&!h.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(h.target=h.layout.layoutBox,h.targetWithTransforms=nt());const{target:w}=h;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(p0(this.prevProjectionDelta.x,this.projectionDelta.x),p0(this.prevProjectionDelta.y,this.projectionDelta.y)),hl(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==S||!N0(this.projectionDelta.x,this.prevProjectionDelta.x)||!N0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(h=!0){var p;if((p=this.options.visualElement)==null||p.scheduleRender(),h){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gi(),this.projectionDelta=Gi(),this.projectionDeltaWithTransform=Gi()}setAnimationOrigin(h,p=!1){const m=this.snapshot,g=m?m.latestValues:{},x={...this.latestValues},y=Gi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const S=nt(),w=m?m.source:void 0,j=this.layout?this.layout.source:void 0,E=w!==j,D=this.getStack(),R=!D||D.members.length<=1,M=!!(E&&!R&&this.options.crossfade===!0&&!this.path.some(tA));this.animationProgress=0;let z;this.mixTargetDelta=k=>{const U=k/1e3;z0(y.x,h.x,U),z0(y.y,h.y,U),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ao(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),eA(this.relativeTarget,this.relativeTargetOrigin,S,U),z&&MN(this.relativeTarget,z)&&(this.isProjectionDirty=!1),z||(z=nt()),tn(z,this.relativeTarget)),E&&(this.animationValues=x,RN(x,g,this.latestValues,U,M,R)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=U},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(h){var p,m,g;this.notifyListeners("animationStart"),(p=this.currentAnimation)==null||p.stop(),(g=(m=this.resumingFrom)==null?void 0:m.currentAnimation)==null||g.stop(),this.pendingAnimation&&(xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{ho.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=LN(this.motionValue,[0,1e3],{...h,velocity:0,isSync:!0,onUpdate:x=>{this.mixTargetDelta(x),h.onUpdate&&h.onUpdate(x)},onStop:()=>{},onComplete:()=>{h.onComplete&&h.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const h=this.getStack();h&&h.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(HN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const h=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:x}=h;if(!(!p||!m||!g)){if(this!==h&&this.layout&&g&&Eb(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||nt();const y=xt(this.layout.layoutBox.x);m.x.min=h.target.x.min,m.x.max=m.x.min+y;const S=xt(this.layout.layoutBox.y);m.y.min=h.target.y.min,m.y.max=m.y.min+S}tn(p,m),co(p,x),hl(this.projectionDeltaWithTransform,this.layoutCorrected,p,x)}}registerSharedNode(h,p){this.sharedNodes.has(h)||this.sharedNodes.set(h,new BN),this.sharedNodes.get(h).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const h=this.getStack();return h?h.lead===this:!0}getLead(){var p;const{layoutId:h}=this.options;return h?((p=this.getStack())==null?void 0:p.lead)||this:this}getPrevLead(){var p;const{layoutId:h}=this.options;return h?(p=this.getStack())==null?void 0:p.prevLead:void 0}getStack(){const{layoutId:h}=this.options;if(h)return this.root.sharedNodes.get(h)}promote({needsReset:h,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),h&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const h=this.getStack();return h?h.relegate(this):!1}resetSkewAndRotation(){const{visualElement:h}=this.options;if(!h)return;let p=!1;const{latestValues:m}=h;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Df("z",h,g,this.animationValues);for(let x=0;x<Mf.length;x++)Df(`rotate${Mf[x]}`,h,g,this.animationValues),Df(`skew${Mf[x]}`,h,g,this.animationValues);h.render();for(const x in g)h.setStaticValue(x,g[x]),this.animationValues&&(this.animationValues[x]=g[x]);h.scheduleRender()}applyProjectionStyles(h,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){h.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,h.visibility="",h.opacity="",h.pointerEvents=fo(p==null?void 0:p.pointerEvents)||"",h.transform=m?m(this.latestValues,""):"none";return}const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=fo(p==null?void 0:p.pointerEvents)||""),this.hasProjected&&!Ya(this.latestValues)&&(h.transform=m?m({},""):"none",this.hasProjected=!1);return}h.visibility="";const x=g.animationValues||g.latestValues;this.applyTransformsToTarget();let y=DN(this.projectionDeltaWithTransform,this.treeScale,x);m&&(y=m(x,y)),h.transform=y;const{x:S,y:w}=this.projectionDelta;h.transformOrigin=`${S.origin*100}% ${w.origin*100}% 0`,g.animationValues?h.opacity=g===this?x.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:h.opacity=g===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const j in bd){if(x[j]===void 0)continue;const{correct:E,applyTo:D,isCSSVariable:R}=bd[j],M=y==="none"?x[j]:E(x[j],g);if(D){const z=D.length;for(let k=0;k<z;k++)h[D[k]]=M}else R?this.options.visualElement.renderState.vars[j]=M:h[j]=M}this.options.layoutId&&(h.pointerEvents=g===this?fo(p==null?void 0:p.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(h=>{var p;return(p=h.currentAnimation)==null?void 0:p.stop()}),this.root.nodes.forEach(D0),this.root.sharedNodes.clear()}}}function qN(n){n.updateLayout()}function YN(n){var s;const a=((s=n.resumeFrom)==null?void 0:s.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:u}=n.layout,{animationType:d}=n.options,h=a.source!==n.layout.source;if(d==="size")fn(y=>{const S=h?a.measuredBox[y]:a.layoutBox[y],w=xt(S);S.min=r[y].min,S.max=S.min+w});else if(d==="x"||d==="y"){const y=d==="x"?"y":"x";Sd(h?a.measuredBox[y]:a.layoutBox[y],r[y])}else Eb(d,a.layoutBox,r)&&fn(y=>{const S=h?a.measuredBox[y]:a.layoutBox[y],w=xt(r[y]);S.max=S.min+w,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[y].max=n.relativeTarget[y].min+w)});const p=Gi();hl(p,r,a.layoutBox);const m=Gi();h?hl(m,n.applyTransform(u,!0),a.measuredBox):hl(m,r,a.layoutBox);const g=!yb(p);let x=!1;if(!n.resumeFrom){const y=n.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:S,layout:w}=y;if(S&&w){const j=n.options.layoutAnchor||void 0,E=nt();Ao(E,a.layoutBox,S.layoutBox,j);const D=nt();Ao(D,r,w.layoutBox,j),bb(E,D)||(x=!0),y.options.layoutRoot&&(n.relativeTarget=D,n.relativeTargetOrigin=E,n.relativeParent=y)}}}n.notifyListeners("didUpdate",{layout:r,snapshot:a,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeLayoutChanged:x})}else if(n.isLead()){const{onExitComplete:r}=n.options;r&&r()}n.options.transition=void 0}function GN(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function XN(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function KN(n){n.clearSnapshot()}function D0(n){n.clearMeasurements()}function FN(n){n.isLayoutDirty=!0,n.updateLayout()}function O0(n){n.isLayoutDirty=!1}function ZN(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function QN(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function R0(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function PN(n){n.resolveTargetDelta()}function JN(n){n.calcProjection()}function WN(n){n.resetSkewAndRotation()}function IN(n){n.removeLeadSnapshot()}function z0(n,a,s){n.translate=He(a.translate,0,s),n.scale=He(a.scale,1,s),n.origin=a.origin,n.originPoint=a.originPoint}function k0(n,a,s,r){n.min=He(a.min,s.min,r),n.max=He(a.max,s.max,r)}function eA(n,a,s,r){k0(n.x,a.x,s.x,r),k0(n.y,a.y,s.y,r)}function tA(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const nA={duration:.45,ease:[.4,0,.1,1]},L0=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),V0=L0("applewebkit/")&&!L0("chrome/")?Math.round:Jt;function _0(n){n.min=V0(n.min),n.max=V0(n.max)}function aA(n){_0(n.x),_0(n.y)}function Eb(n,a,s){return n==="position"||n==="preserve-aspect"&&!jN(E0(a),E0(s),.2)}function iA(n){var a;return n!==n.root&&((a=n.scroll)==null?void 0:a.wasRoot)}const sA=jb({attachResizeListener:(n,a)=>bl(n,"resize",a),measureScroll:()=>{var n,a;return{x:document.documentElement.scrollLeft||((n=document.body)==null?void 0:n.scrollLeft)||0,y:document.documentElement.scrollTop||((a=document.body)==null?void 0:a.scrollTop)||0}},checkIsScrollRoot:()=>!0}),lA=n=>!n.isLayoutDirty&&n.willUpdate(!1);function U0(){const n=new Set,a=new WeakMap,s=()=>n.forEach(lA);return{add:r=>{n.add(r),a.set(r,r.addEventListener("willUpdate",s))},remove:r=>{n.delete(r);const u=a.get(r);u&&(u(),a.delete(r)),s()},dirty:s}}const Of={current:void 0},Nb=jb({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Of.current){const n=new sA({});n.mount(window),n.setOptions({layoutScroll:!0}),Of.current=n}return Of.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),Ab=T.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function rA(n=!0){const a=T.useContext(kd);if(a===null)return[!0,null];const{isPresent:s,onExitComplete:r,register:u}=a,d=T.useId();T.useEffect(()=>{if(n)return u(d)},[n]);const h=T.useCallback(()=>n&&r&&r(d),[d,r,n]);return!s&&r?[!1,h]:[!0]}const oA=T.createContext(null);function uA(){const n=T.useRef(!1);return ey(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function cA(){const n=uA(),[a,s]=T.useState(0),r=T.useCallback(()=>{n.current&&s(a+1)},[a]);return[T.useCallback(()=>ke.postRender(r),[r]),a]}const Cb=n=>n===!0,fA=n=>Cb(n===!0)||n==="id",Mb=({children:n,id:a,inherit:s=!0})=>{const r=T.useContext(yo),u=T.useContext(oA),[d,h]=cA(),p=T.useRef(null),m=r.id||u;p.current===null&&(fA(s)&&m&&(a=a?m+"-"+a:m),p.current={id:a,group:Cb(s)&&r.group||U0()});const g=T.useMemo(()=>({...p.current,forceRender:d}),[h]);return f.jsx(yo.Provider,{value:g,children:n})},Db=T.createContext({strict:!1}),B0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let H0=!1;function dA(){if(H0)return;const n={};for(const a in B0)n[a]={isEnabled:s=>B0[a].some(r=>!!s[r])};ab(n),H0=!0}function Ob(){return dA(),P5()}function hA(n){const a=Ob();for(const s in n)a[s]={...a[s],...n[s]};ab(a)}const mA=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Co(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||mA.has(n)}let Rb=n=>!Co(n);function pA(n){typeof n=="function"&&(Rb=a=>a.startsWith("on")?!Co(a):n(a))}try{pA(require("@emotion/is-prop-valid").default)}catch{}function gA(n,a,s){const r={};for(const u in n)u==="values"&&typeof n.values=="object"||ft(n[u])||(Rb(u)||s===!0&&Co(u)||!a&&!Co(u)||n.draggable&&u.startsWith("onDrag"))&&(r[u]=n[u]);return r}const qo=T.createContext({});function vA(n,a){if($o(n)){const{initial:s,animate:r}=n;return{initial:s===!1||yl(s)?s:void 0,animate:yl(r)?r:void 0}}return n.inherit!==!1?a:{}}function xA(n){const{initial:a,animate:s}=vA(n,T.useContext(qo));return T.useMemo(()=>({initial:a,animate:s}),[$0(a),$0(s)])}function $0(n){return Array.isArray(n)?n.join(" "):n}const sh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zb(n,a,s){for(const r in a)!ft(a[r])&&!cb(r,s)&&(n[r]=a[r])}function yA({transformTemplate:n},a){return T.useMemo(()=>{const s=sh();return ah(s,a,n),Object.assign({},s.vars,s.style)},[a])}function bA(n,a){const s=n.style||{},r={};return zb(r,s,n),Object.assign(r,yA(n,a)),r}function SA(n,a){const s={},r=bA(n,a);return n.drag&&n.dragListener!==!1&&(s.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(s.tabIndex=0),s.style=r,s}const kb=()=>({...sh(),attrs:{}});function wA(n,a,s,r){const u=T.useMemo(()=>{const d=kb();return fb(d,a,hb(r),n.transformTemplate,n.style),{...d.attrs,style:{...d.style}}},[a]);if(n.style){const d={};zb(d,n.style,n),u.style={...d,...u.style}}return u}const TA=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function lh(n){return typeof n!="string"||n.includes("-")?!1:!!(TA.indexOf(n)>-1||/[A-Z]/u.test(n))}function jA(n,a,s,{latestValues:r},u,d=!1,h){const m=(h??lh(n)?wA:SA)(a,r,u,n),g=gA(a,typeof n=="string",d),x=n!==T.Fragment?{...g,...m,ref:s}:{},{children:y}=a,S=T.useMemo(()=>ft(y)?y.get():y,[y]);return T.createElement(n,{...x,children:S})}function EA({scrapeMotionValuesFromProps:n,createRenderState:a},s,r,u){return{latestValues:NA(s,r,u,n),renderState:a()}}function NA(n,a,s,r){const u={},d=r(n,{});for(const S in d)u[S]=fo(d[S]);let{initial:h,animate:p}=n;const m=$o(n),g=tb(n);a&&g&&!m&&n.inherit!==!1&&(h===void 0&&(h=a.initial),p===void 0&&(p=a.animate));let x=s?s.initial===!1:!1;x=x||h===!1;const y=x?p:h;if(y&&typeof y!="boolean"&&!Ho(y)){const S=Array.isArray(y)?y:[y];for(let w=0;w<S.length;w++){const j=Qd(n,S[w]);if(j){const{transitionEnd:E,transition:D,...R}=j;for(const M in R){let z=R[M];if(Array.isArray(z)){const k=x?z.length-1:0;z=z[k]}z!==null&&(u[M]=z)}for(const M in E)u[M]=E[M]}}}return u}const Lb=n=>(a,s)=>{const r=T.useContext(qo),u=T.useContext(kd),d=()=>EA(n,a,r,u);return s?d():yj(d)},AA=Lb({scrapeMotionValuesFromProps:ih,createRenderState:sh}),CA=Lb({scrapeMotionValuesFromProps:mb,createRenderState:kb}),MA=Symbol.for("motionComponentSymbol");function DA(n,a,s){const r=T.useRef(s);T.useInsertionEffect(()=>{r.current=s});const u=T.useRef(null);return T.useCallback(d=>{var p;d&&((p=n.onMount)==null||p.call(n,d));const h=r.current;if(typeof h=="function")if(d){const m=h(d);typeof m=="function"&&(u.current=m)}else u.current?(u.current(),u.current=null):h(d);else h&&(h.current=d);a&&(d?a.mount(d):a.unmount())},[a])}const Vb=T.createContext({});function $i(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function OA(n,a,s,r,u,d){var z,k;const{visualElement:h}=T.useContext(qo),p=T.useContext(Db),m=T.useContext(kd),g=T.useContext(Ab),x=g.reducedMotion,y=g.skipAnimations,S=T.useRef(null),w=T.useRef(!1);r=r||p.renderer,!S.current&&r&&(S.current=r(n,{visualState:a,parent:h,props:s,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:x,skipAnimations:y,isSVG:d}),w.current&&S.current&&(S.current.manuallyAnimateOnMount=!0));const j=S.current,E=T.useContext(Vb);j&&!j.projection&&u&&(j.type==="html"||j.type==="svg")&&RA(S.current,s,u,E);const D=T.useRef(!1);T.useInsertionEffect(()=>{j&&D.current&&j.update(s,m)});const R=s[qy],M=T.useRef(!!R&&typeof window<"u"&&!((z=window.MotionHandoffIsComplete)!=null&&z.call(window,R))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,R)));return ey(()=>{w.current=!0,j&&(D.current=!0,window.MotionIsMounted=!0,j.updateFeatures(),j.scheduleRenderMicrotask(),M.current&&j.animationState&&j.animationState.animateChanges())}),T.useEffect(()=>{j&&(!M.current&&j.animationState&&j.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{var U;(U=window.MotionHandoffMarkAsComplete)==null||U.call(window,R)}),M.current=!1),j.enteringChildren=void 0)}),j}function RA(n,a,s,r){const{layoutId:u,layout:d,drag:h,dragConstraints:p,layoutScroll:m,layoutRoot:g,layoutAnchor:x,layoutCrossfade:y}=a;n.projection=new s(n.latestValues,a["data-framer-portal-id"]?void 0:_b(n.parent)),n.projection.setOptions({layoutId:u,layout:d,alwaysMeasureLayout:!!h||p&&$i(p),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:r,crossfade:y,layoutScroll:m,layoutRoot:g,layoutAnchor:x})}function _b(n){if(n)return n.options.allowProjection!==!1?n.projection:_b(n.parent)}function Rf(n,{forwardMotionProps:a=!1,type:s}={},r,u){r&&hA(r);const d=s?s==="svg":lh(n),h=d?CA:AA;function p(g,x){let y;const S={...T.useContext(Ab),...g,layoutId:zA(g)},{isStatic:w}=S,j=xA(g),E=h(g,w);if(!w&&typeof window<"u"){kA();const D=LA(S);y=D.MeasureLayout,j.visualElement=OA(n,E,S,u,D.ProjectionNode,d)}return f.jsxs(qo.Provider,{value:j,children:[y&&j.visualElement?f.jsx(y,{visualElement:j.visualElement,...S}):null,jA(n,g,DA(E,j.visualElement,x),E,w,a,d)]})}p.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=T.forwardRef(p);return m[MA]=n,m}function zA({layoutId:n}){const a=T.useContext(yo).id;return a&&n!==void 0?a+"-"+n:n}function kA(n,a){T.useContext(Db).strict}function LA(n){const a=Ob(),{drag:s,layout:r}=a;if(!s&&!r)return{};const u={...s,...r};return{MeasureLayout:s!=null&&s.isEnabled(n)||r!=null&&r.isEnabled(n)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function VA(n,a){if(typeof Proxy>"u")return Rf;const s=new Map,r=(d,h)=>Rf(d,h,n,a),u=(d,h)=>r(d,h);return new Proxy(u,{get:(d,h)=>h==="create"?r:(s.has(h)||s.set(h,Rf(h,void 0,n,a)),s.get(h))})}const _A=(n,a)=>a.isSVG??lh(n)?new hN(a):new rN(a,{allowProjection:n!==T.Fragment});class UA extends Sa{constructor(a){super(a),a.animationState||(a.animationState=xN(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();Ho(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:s}=this.node.prevProps||{};a!==s&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)==null||a.call(this)}}let BA=0;class HA extends Sa{constructor(){super(...arguments),this.id=BA++,this.isExitComplete=!1}update(){var d;if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:s}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===r)return;if(a&&r===!1){if(this.isExitComplete){const{initial:h,custom:p}=this.node.getProps();if(typeof h=="string"){const m=Ja(this.node,h,p);if(m){const{transition:g,transitionEnd:x,...y}=m;for(const S in y)(d=this.node.getValue(S))==null||d.jump(y[S])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const u=this.node.animationState.setActive("exit",!a);s&&!a&&u.then(()=>{this.isExitComplete=!0,s(this.id)})}mount(){const{register:a,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const $A={animation:{Feature:UA},exit:{Feature:HA}};function Cl(n){return{point:{x:n.pageX,y:n.pageY}}}const qA=n=>a=>Id(a)&&n(a,Cl(a));function ml(n,a,s,r){return bl(n,a,qA(s),r)}const Ub=({current:n})=>n?n.ownerDocument.defaultView:null,q0=(n,a)=>Math.abs(n-a);function YA(n,a){const s=q0(n.x,a.x),r=q0(n.y,a.y);return Math.sqrt(s**2+r**2)}const Y0=new Set(["auto","scroll"]);class Bb{constructor(a,s,{transformPagePoint:r,contextWindow:u=window,dragSnapToOrigin:d=!1,distanceThreshold:h=3,element:p}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=eo(this.lastRawMoveEventInfo,this.transformPagePoint));const w=zf(this.lastMoveEventInfo,this.history),j=this.startEvent!==null,E=YA(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!j&&!E)return;const{point:D}=w,{timestamp:R}=ct;this.history.push({...D,timestamp:R});const{onStart:M,onMove:z}=this.handlers;j||(M&&M(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),z&&z(this.lastMoveEvent,w)},this.handlePointerMove=(w,j)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=j,this.lastMoveEventInfo=eo(j,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(w,j)=>{this.end();const{onEnd:E,onSessionEnd:D,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=zf(w.type==="pointercancel"?this.lastMoveEventInfo:eo(j,this.transformPagePoint),this.history);this.startEvent&&E&&E(w,M),D&&D(w,M)},!Id(a))return;this.dragSnapToOrigin=d,this.handlers=s,this.transformPagePoint=r,this.distanceThreshold=h,this.contextWindow=u||window;const m=Cl(a),g=eo(m,this.transformPagePoint),{point:x}=g,{timestamp:y}=ct;this.history=[{...x,timestamp:y}];const{onSessionStart:S}=s;S&&S(a,zf(g,this.history)),this.removeListeners=El(ml(this.contextWindow,"pointermove",this.handlePointerMove),ml(this.contextWindow,"pointerup",this.handlePointerUp),ml(this.contextWindow,"pointercancel",this.handlePointerUp)),p&&this.startScrollTracking(p)}startScrollTracking(a){let s=a.parentElement;for(;s;){const r=getComputedStyle(s);(Y0.has(r.overflowX)||Y0.has(r.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(a){const s=this.scrollPositions.get(a);if(!s)return;const r=a===window,u=r?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},d={x:u.x-s.x,y:u.y-s.y};d.x===0&&d.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=d.x,this.lastMoveEventInfo.point.y+=d.y):this.history.length>0&&(this.history[0].x-=d.x,this.history[0].y-=d.y),this.scrollPositions.set(a,u),ke.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),xa(this.updatePoint)}}function eo(n,a){return a?{point:a(n.point)}:n}function G0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function zf({point:n},a){return{point:n,delta:G0(n,Hb(a)),offset:G0(n,GA(a)),velocity:XA(a,.1)}}function GA(n){return n[0]}function Hb(n){return n[n.length-1]}function XA(n,a){if(n.length<2)return{x:0,y:0};let s=n.length-1,r=null;const u=Hb(n);for(;s>=0&&(r=n[s],!(u.timestamp-r.timestamp>Ut(a)));)s--;if(!r)return{x:0,y:0};r===n[0]&&n.length>2&&u.timestamp-r.timestamp>Ut(a)*2&&(r=n[1]);const d=Pt(u.timestamp-r.timestamp);if(d===0)return{x:0,y:0};const h={x:(u.x-r.x)/d,y:(u.y-r.y)/d};return h.x===1/0&&(h.x=0),h.y===1/0&&(h.y=0),h}function KA(n,{min:a,max:s},r){return a!==void 0&&n<a?n=r?He(a,n,r.min):Math.max(n,a):s!==void 0&&n>s&&(n=r?He(s,n,r.max):Math.min(n,s)),n}function X0(n,a,s){return{min:a!==void 0?n.min+a:void 0,max:s!==void 0?n.max+s-(n.max-n.min):void 0}}function FA(n,{top:a,left:s,bottom:r,right:u}){return{x:X0(n.x,s,u),y:X0(n.y,a,r)}}function K0(n,a){let s=a.min-n.min,r=a.max-n.max;return a.max-a.min<n.max-n.min&&([s,r]=[r,s]),{min:s,max:r}}function ZA(n,a){return{x:K0(n.x,a.x),y:K0(n.y,a.y)}}function QA(n,a){let s=.5;const r=xt(n),u=xt(a);return u>r?s=vl(a.min,a.max-r,n.min):r>u&&(s=vl(n.min,n.max-u,a.min)),pn(0,1,s)}function PA(n,a){const s={};return a.min!==void 0&&(s.min=a.min-n.min),a.max!==void 0&&(s.max=a.max-n.min),s}const wd=.35;function JA(n=wd){return n===!1?n=0:n===!0&&(n=wd),{x:F0(n,"left","right"),y:F0(n,"top","bottom")}}function F0(n,a,s){return{min:Z0(n,a),max:Z0(n,s)}}function Z0(n,a){return typeof n=="number"?n:n[a]||0}const WA=new WeakMap;class IA{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:s=!1,distanceThreshold:r}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const d=y=>{s&&this.snapToCursor(Cl(y).point),this.stopAnimation()},h=(y,S)=>{const{drag:w,dragPropagation:j,onDragStart:E}=this.getProps();if(w&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=N5(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=S,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fn(R=>{let M=this.getAxisMotionValue(R).get()||0;if(mn.test(M)){const{projection:z}=this.visualElement;if(z&&z.layout){const k=z.layout.layoutBox[R];k&&(M=xt(k)*(parseFloat(M)/100))}}this.originPoint[R]=M}),E&&ke.update(()=>E(y,S),!1,!0),hd(this.visualElement,"transform");const{animationState:D}=this.visualElement;D&&D.setActive("whileDrag",!0)},p=(y,S)=>{this.latestPointerEvent=y,this.latestPanInfo=S;const{dragPropagation:w,dragDirectionLock:j,onDirectionLock:E,onDrag:D}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:R}=S;if(j&&this.currentDirection===null){this.currentDirection=t3(R),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",S.point,R),this.updateAxis("y",S.point,R),this.visualElement.render(),D&&ke.update(()=>D(y,S),!1,!0)},m=(y,S)=>{this.latestPointerEvent=y,this.latestPanInfo=S,this.stop(y,S),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:x}=this.getProps();this.panSession=new Bb(a,{onSessionStart:d,onStart:h,onMove:p,onSessionEnd:m,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:x,distanceThreshold:r,contextWindow:Ub(this.visualElement),element:this.visualElement.current})}stop(a,s){const r=a||this.latestPointerEvent,u=s||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!u||!r)return;const{velocity:h}=u;this.startAnimation(h);const{onDragEnd:p}=this.getProps();p&&ke.postRender(()=>p(r,u))}cancel(){this.isDragging=!1;const{projection:a,animationState:s}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,s,r){const{drag:u}=this.getProps();if(!r||!to(a,u,this.currentDirection))return;const d=this.getAxisMotionValue(a);let h=this.originPoint[a]+r[a];this.constraints&&this.constraints[a]&&(h=KA(h,this.constraints[a],this.elastic[a])),d.set(h)}resolveConstraints(){var d;const{dragConstraints:a,dragElastic:s}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(d=this.visualElement.projection)==null?void 0:d.layout,u=this.constraints;a&&$i(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&r?this.constraints=FA(r.layoutBox,a):this.constraints=!1,this.elastic=JA(s),u!==this.constraints&&!$i(a)&&r&&this.constraints&&!this.hasMutatedConstraints&&fn(h=>{this.constraints!==!1&&this.getAxisMotionValue(h)&&(this.constraints[h]=PA(r.layoutBox[h],this.constraints[h]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:s}=this.getProps();if(!a||!$i(a))return!1;const r=a.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const d=tN(r,u.root,this.visualElement.getTransformPagePoint());let h=ZA(u.layout.layoutBox,d);if(s){const p=s(W5(h));this.hasMutatedConstraints=!!p,p&&(h=sb(p))}return h}startAnimation(a){const{drag:s,dragMomentum:r,dragElastic:u,dragTransition:d,dragSnapToOrigin:h,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=fn(x=>{if(!to(x,s,this.currentDirection))return;let y=m&&m[x]||{};(h===!0||h===x)&&(y={min:0,max:0});const S=u?200:1e6,w=u?40:1e7,j={type:"inertia",velocity:r?a[x]:0,bounceStiffness:S,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...d,...y};return this.startAxisValueAnimation(x,j)});return Promise.all(g).then(p)}startAxisValueAnimation(a,s){const r=this.getAxisMotionValue(a);return hd(this.visualElement,a),r.start(Zd(a,r,0,s,this.visualElement,!1))}stopAnimation(){fn(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const s=`_drag${a.toUpperCase()}`,r=this.visualElement.getProps(),u=r[s];return u||this.visualElement.getValue(a,(r.initial?r.initial[a]:void 0)||0)}snapToCursor(a){fn(s=>{const{drag:r}=this.getProps();if(!to(s,r,this.currentDirection))return;const{projection:u}=this.visualElement,d=this.getAxisMotionValue(s);if(u&&u.layout){const{min:h,max:p}=u.layout.layoutBox[s],m=d.get()||0;d.set(a[s]-He(h,p,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:s}=this.getProps(),{projection:r}=this.visualElement;if(!$i(s)||!r||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};fn(h=>{const p=this.getAxisMotionValue(h);if(p&&this.constraints!==!1){const m=p.get();u[h]=QA({min:m,max:m},this.constraints[h])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),fn(h=>{if(!to(h,a,null))return;const p=this.getAxisMotionValue(h),{min:m,max:g}=this.constraints[h];p.set(He(m,g,u[h]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;WA.set(this.visualElement,this);const a=this.visualElement.current,s=ml(a,"pointerdown",g=>{const{drag:x,dragListener:y=!0}=this.getProps(),S=g.target,w=S!==a&&R5(S);x&&y&&!w&&this.start(g)});let r;const u=()=>{const{dragConstraints:g}=this.getProps();$i(g)&&g.current&&(this.constraints=this.resolveRefConstraints(),r||(r=e3(a,g.current,()=>this.scalePositionWithinConstraints())))},{projection:d}=this.visualElement,h=d.addEventListener("measure",u);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),ke.read(u);const p=bl(window,"resize",()=>this.scalePositionWithinConstraints()),m=d.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:x})=>{this.isDragging&&x&&(fn(y=>{const S=this.getAxisMotionValue(y);S&&(this.originPoint[y]+=g[y].translate,S.set(S.get()+g[y].translate))}),this.visualElement.render())}));return()=>{p(),s(),h(),m&&m(),r&&r()}}getProps(){const a=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:r=!1,dragPropagation:u=!1,dragConstraints:d=!1,dragElastic:h=wd,dragMomentum:p=!0}=a;return{...a,drag:s,dragDirectionLock:r,dragPropagation:u,dragConstraints:d,dragElastic:h,dragMomentum:p}}}function Q0(n){let a=!0;return()=>{if(a){a=!1;return}n()}}function e3(n,a,s){const r=a0(n,Q0(s)),u=a0(a,Q0(s));return()=>{r(),u()}}function to(n,a,s){return(a===!0||a===n)&&(s===null||s===n)}function t3(n,a=10){let s=null;return Math.abs(n.y)>a?s="y":Math.abs(n.x)>a&&(s="x"),s}class n3 extends Sa{constructor(a){super(a),this.removeGroupControls=Jt,this.removeListeners=Jt,this.controls=new IA(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jt}update(){const{dragControls:a}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};a!==s&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const kf=n=>(a,s)=>{n&&ke.update(()=>n(a,s),!1,!0)};class a3 extends Sa{constructor(){super(...arguments),this.removePointerDownListener=Jt}onPointerDown(a){this.session=new Bb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ub(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:s,onPan:r,onPanEnd:u}=this.node.getProps();return{onSessionStart:kf(a),onStart:kf(s),onMove:kf(r),onEnd:(d,h)=>{delete this.session,u&&ke.postRender(()=>u(d,h))}}}mount(){this.removePointerDownListener=ml(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Lf=!1;class i3 extends T.Component{componentDidMount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:r,layoutId:u}=this.props,{projection:d}=a;d&&(s.group&&s.group.add(d),r&&r.register&&u&&r.register(d),Lf&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ho.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:s,visualElement:r,drag:u,isPresent:d}=this.props,{projection:h}=r;return h&&(h.isPresent=d,a.layoutDependency!==s&&h.setOptions({...h.options,layoutDependency:s}),Lf=!0,u||a.layoutDependency!==s||s===void 0||a.isPresent!==d?h.willUpdate():this.safeToRemove(),a.isPresent!==d&&(d?h.promote():h.relegate()||ke.postRender(()=>{const p=h.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:a,layoutAnchor:s}=this.props,{projection:r}=a;r&&(r.options.layoutAnchor=s,r.root.didUpdate(),Wd.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:r}=this.props,{projection:u}=a;Lf=!0,u&&(u.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(u),r&&r.deregister&&r.deregister(u))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function $b(n){const[a,s]=rA(),r=T.useContext(yo);return f.jsx(i3,{...n,layoutGroup:r,switchLayoutGroup:T.useContext(Vb),isPresent:a,safeToRemove:s})}const s3={pan:{Feature:a3},drag:{Feature:n3,ProjectionNode:Nb,MeasureLayout:$b}};function P0(n,a,s){const{props:r}=n;n.animationState&&r.whileHover&&n.animationState.setActive("whileHover",s==="Start");const u="onHover"+s,d=r[u];d&&ke.postRender(()=>d(a,Cl(a)))}class l3 extends Sa{mount(){const{current:a}=this.node;a&&(this.unmount=C5(a,(s,r)=>(P0(this.node,r,"Start"),u=>P0(this.node,u,"End"))))}unmount(){}}class r3 extends Sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=El(bl(this.node.current,"focus",()=>this.onFocus()),bl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function J0(n,a,s){const{props:r}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&r.whileTap&&n.animationState.setActive("whileTap",s==="Start");const u="onTap"+(s==="End"?"":s),d=r[u];d&&ke.postRender(()=>d(a,Cl(a)))}class o3 extends Sa{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:s,propagate:r}=this.node.props;this.unmount=k5(a,(u,d)=>(J0(this.node,d,"Start"),(h,{success:p})=>J0(this.node,h,p?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Td=new WeakMap,Vf=new WeakMap,u3=n=>{const a=Td.get(n.target);a&&a(n)},c3=n=>{n.forEach(u3)};function f3({root:n,...a}){const s=n||document;Vf.has(s)||Vf.set(s,{});const r=Vf.get(s),u=JSON.stringify(a);return r[u]||(r[u]=new IntersectionObserver(c3,{root:n,...a})),r[u]}function d3(n,a,s){const r=f3(a);return Td.set(n,s),r.observe(n),()=>{Td.delete(n),r.unobserve(n)}}const h3={some:0,all:1};class m3 extends Sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var m;(m=this.stopObserver)==null||m.call(this);const{viewport:a={}}=this.node.getProps(),{root:s,margin:r,amount:u="some",once:d}=a,h={root:s?s.current:void 0,rootMargin:r,threshold:typeof u=="number"?u:h3[u]},p=g=>{const{isIntersecting:x}=g;if(this.isInView===x||(this.isInView=x,d&&!x&&this.hasEnteredView))return;x&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",x);const{onViewportEnter:y,onViewportLeave:S}=this.node.getProps(),w=x?y:S;w&&w(g)};this.stopObserver=d3(this.node.current,h,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:s}=this.node;["amount","margin","root"].some(p3(a,s))&&this.startObserver()}unmount(){var a;(a=this.stopObserver)==null||a.call(this),this.hasEnteredView=!1,this.isInView=!1}}function p3({viewport:n={}},{viewport:a={}}={}){return s=>n[s]!==a[s]}const g3={inView:{Feature:m3},tap:{Feature:o3},focus:{Feature:r3},hover:{Feature:l3}},v3={layout:{ProjectionNode:Nb,MeasureLayout:$b}},x3={...$A,...g3,...s3,...v3},qb=VA(x3,_A),Yo=T.forwardRef(function(a,s){return f.jsx(LT,{children:f.jsx("a",{...a,ref:s})})}),Ws={base:["relative isolate inline-flex items-baseline justify-center gap-x-2 rounded-lg border text-base/6 font-semibold","px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)] sm:text-sm/6","focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500","data-disabled:opacity-50","*:data-[slot=icon]:-mx-0.5 *:data-[slot=icon]:my-0.5 *:data-[slot=icon]:size-5 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:self-center *:data-[slot=icon]:text-(--btn-icon) sm:*:data-[slot=icon]:my-1 sm:*:data-[slot=icon]:size-4 forced-colors:[--btn-icon:ButtonText] forced-colors:data-hover:[--btn-icon:ButtonText]"],solid:["border-transparent bg-(--btn-border)","dark:bg-(--btn-bg)","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(var(--radius-lg)-1px)] before:bg-(--btn-bg)","before:shadow-sm","dark:before:hidden","dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(var(--radius-lg)-1px)]","after:shadow-[inset_0_1px_--theme(--color-white/15%)]","data-active:after:bg-(--btn-hover-overlay) data-hover:after:bg-(--btn-hover-overlay)","dark:after:-inset-px dark:after:rounded-lg","data-disabled:before:shadow-none data-disabled:after:shadow-none"],outline:["border-zinc-950/10 text-zinc-950 data-active:bg-zinc-950/2.5 data-hover:bg-zinc-950/2.5","dark:border-white/15 dark:text-white dark:[--btn-bg:transparent] dark:data-active:bg-white/5 dark:data-hover:bg-white/5","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],plain:["border-transparent text-zinc-950 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","dark:text-white dark:data-active:bg-white/10 dark:data-hover:bg-white/10","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],colors:{"dark/zinc":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-white dark:[--btn-bg:var(--color-zinc-600)] dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],light:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:text-white dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],"dark/white":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:text-zinc-950 dark:[--btn-bg:white] dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)] dark:[--btn-icon:var(--color-zinc-500)] dark:data-active:[--btn-icon:var(--color-zinc-400)] dark:data-hover:[--btn-icon:var(--color-zinc-400)]"],dark:["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","dark:[--btn-hover-overlay:var(--color-white)]/5 dark:[--btn-bg:var(--color-zinc-800)]","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],white:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","dark:[--btn-hover-overlay:var(--color-zinc-950)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-500)] data-hover:[--btn-icon:var(--color-zinc-500)]"],zinc:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-zinc-600)] [--btn-border:var(--color-zinc-700)]/90","dark:[--btn-hover-overlay:var(--color-white)]/5","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],indigo:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-indigo-500)] [--btn-border:var(--color-indigo-600)]/90","[--btn-icon:var(--color-indigo-300)] data-active:[--btn-icon:var(--color-indigo-200)] data-hover:[--btn-icon:var(--color-indigo-200)]"],cyan:["text-cyan-950 [--btn-bg:var(--color-cyan-300)] [--btn-border:var(--color-cyan-400)]/80 [--btn-hover-overlay:var(--color-white)]/25","[--btn-icon:var(--color-cyan-500)]"],red:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-red-600)] [--btn-border:var(--color-red-700)]/90","[--btn-icon:var(--color-red-300)] data-active:[--btn-icon:var(--color-red-200)] data-hover:[--btn-icon:var(--color-red-200)]"],orange:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-orange-500)] [--btn-border:var(--color-orange-600)]/90","[--btn-icon:var(--color-orange-300)] data-active:[--btn-icon:var(--color-orange-200)] data-hover:[--btn-icon:var(--color-orange-200)]"],amber:["text-amber-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-amber-400)] [--btn-border:var(--color-amber-500)]/80","[--btn-icon:var(--color-amber-600)]"],yellow:["text-yellow-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-yellow-300)] [--btn-border:var(--color-yellow-400)]/80","[--btn-icon:var(--color-yellow-600)] data-active:[--btn-icon:var(--color-yellow-700)] data-hover:[--btn-icon:var(--color-yellow-700)]"],lime:["text-lime-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-lime-300)] [--btn-border:var(--color-lime-400)]/80","[--btn-icon:var(--color-lime-600)] data-active:[--btn-icon:var(--color-lime-700)] data-hover:[--btn-icon:var(--color-lime-700)]"],green:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-green-600)] [--btn-border:var(--color-green-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],emerald:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-emerald-600)] [--btn-border:var(--color-emerald-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],teal:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-teal-600)] [--btn-border:var(--color-teal-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],sky:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-sky-500)] [--btn-border:var(--color-sky-600)]/80","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],blue:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-blue-600)] [--btn-border:var(--color-blue-700)]/90","[--btn-icon:var(--color-blue-400)] data-active:[--btn-icon:var(--color-blue-300)] data-hover:[--btn-icon:var(--color-blue-300)]"],violet:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-violet-500)] [--btn-border:var(--color-violet-600)]/90","[--btn-icon:var(--color-violet-300)] data-active:[--btn-icon:var(--color-violet-200)] data-hover:[--btn-icon:var(--color-violet-200)]"],purple:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-purple-500)] [--btn-border:var(--color-purple-600)]/90","[--btn-icon:var(--color-purple-300)] data-active:[--btn-icon:var(--color-purple-200)] data-hover:[--btn-icon:var(--color-purple-200)]"],fuchsia:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-fuchsia-500)] [--btn-border:var(--color-fuchsia-600)]/90","[--btn-icon:var(--color-fuchsia-300)] data-active:[--btn-icon:var(--color-fuchsia-200)] data-hover:[--btn-icon:var(--color-fuchsia-200)]"],pink:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-pink-500)] [--btn-border:var(--color-pink-600)]/90","[--btn-icon:var(--color-pink-300)] data-active:[--btn-icon:var(--color-pink-200)] data-hover:[--btn-icon:var(--color-pink-200)]"],rose:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-rose-500)] [--btn-border:var(--color-rose-600)]/90","[--btn-icon:var(--color-rose-300)] data-active:[--btn-icon:var(--color-rose-200)] data-hover:[--btn-icon:var(--color-rose-200)]"]}};T.forwardRef(function({color:a,outline:s,plain:r,className:u,children:d,...h},p){let m=Fe(u,Ws.base,s?Ws.outline:r?Ws.plain:Fe(Ws.solid,Ws.colors[a??"dark/zinc"]));return typeof h.href=="string"?f.jsx(Yo,{...h,className:m,ref:p,children:f.jsx(ya,{children:d})}):f.jsx(Tl,{...h,className:Fe(m,"cursor-default"),ref:p,children:f.jsx(ya,{children:d})})});function ya({children:n}){return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"absolute top-1/2 left-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 pointer-fine:hidden","aria-hidden":"true"}),n]})}function y3({className:n,...a}){return f.jsx("nav",{...a,className:Fe(n,"flex flex-1 items-center gap-4 py-2.5")})}function b3({className:n,...a}){let s=T.useId();return f.jsx(Mb,{id:s,children:f.jsx("div",{...a,className:Fe(n,"flex items-center gap-3")})})}function S3({className:n,...a}){return f.jsx("div",{"aria-hidden":"true",...a,className:Fe(n,"-ml-4 flex-1")})}const rh=T.forwardRef(function({current:a,className:s,children:r,...u},d){let h=Fe("relative flex min-w-0 items-center gap-3 rounded-lg p-2 text-left text-base/6 font-medium text-zinc-950 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:not-nth-2:last:data-[slot=icon]:ml-auto *:not-nth-2:last:data-[slot=icon]:size-5 sm:*:not-nth-2:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 *:data-[slot=avatar]:[--avatar-radius:var(--radius-md)] sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white");return f.jsxs("span",{className:Fe(s,"relative"),children:[a&&f.jsx(qb.span,{layoutId:"current-indicator",className:"absolute inset-x-2 -bottom-2.5 h-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof u.href=="string"?f.jsx(Yo,{...u,className:h,"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})}):f.jsx(Tl,{...u,className:Fe("cursor-default",h),"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})})]})});function w3(){return f.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:f.jsx("path",{d:"M2 6.75C2 6.33579 2.33579 6 2.75 6H17.25C17.6642 6 18 6.33579 18 6.75C18 7.16421 17.6642 7.5 17.25 7.5H2.75C2.33579 7.5 2 7.16421 2 6.75ZM2 13.25C2 12.8358 2.33579 12.5 2.75 12.5H17.25C17.6642 12.5 18 12.8358 18 13.25C18 13.6642 17.6642 14 17.25 14H2.75C2.33579 14 2 13.6642 2 13.25Z"})})}function T3(){return f.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:f.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})})}function j3({open:n,close:a,children:s}){return f.jsxs(xj,{open:n,onClose:a,className:"lg:hidden",children:[f.jsx(gj,{transition:!0,className:"fixed inset-0 bg-black/30 transition data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in"}),f.jsx(Ix,{transition:!0,className:"fixed inset-y-0 w-full max-w-80 p-2 transition duration-300 ease-in-out data-closed:-translate-x-full",children:f.jsxs("div",{className:"flex h-full flex-col rounded-lg bg-ouro-deep shadow-xl ring-1 ring-ouro-moss/40",children:[f.jsx("div",{className:"-mb-3 px-4 pt-3",children:f.jsx(Cx,{as:rh,"aria-label":"Close navigation",children:f.jsx(T3,{})})}),s]})})]})}function E3({navbar:n,sidebar:a,children:s}){let[r,u]=T.useState(!1);return f.jsxs("div",{className:"relative isolate flex min-h-svh w-full bg-ouro-void max-lg:flex-col",children:[f.jsx("div",{className:"fixed inset-y-0 left-0 w-64 max-lg:hidden border-r border-zinc-200 dark:border-ouro-moss/30",children:a}),f.jsx(j3,{open:r,close:()=>u(!1),children:a}),f.jsxs("header",{className:"flex items-center px-4 lg:hidden",children:[f.jsx("div",{className:"py-2.5",children:f.jsx(rh,{onClick:()=>u(!0),"aria-label":"Open navigation",children:f.jsx(w3,{})})}),f.jsx("div",{className:"min-w-0 flex-1",children:n})]}),f.jsx("main",{className:"flex flex-1 flex-col lg:min-w-0 lg:pl-64",children:f.jsx("div",{className:"grow bg-ouro-deep p-4 lg:p-8",children:f.jsx("div",{className:"mx-auto max-w-6xl",children:s})})})]})}function N3({className:n,...a}){return f.jsx("nav",{...a,className:Fe(n,"flex h-full min-h-0 flex-col")})}function A3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-col border-b border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function C3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-1 flex-col overflow-y-auto p-4 [&>[data-slot=section]+[data-slot=section]]:mt-8")})}function M3({className:n,...a}){return f.jsx("div",{...a,className:Fe(n,"flex flex-col border-t border-zinc-950/5 p-4 dark:border-white/5 [&>[data-slot=section]+[data-slot=section]]:mt-2.5")})}function W0({className:n,...a}){let s=T.useId();return f.jsx(Mb,{id:s,children:f.jsx("div",{...a,"data-slot":"section",className:Fe(n,"flex flex-col gap-0.5")})})}function I0({className:n,...a}){return f.jsx("h3",{...a,className:Fe(n,"mb-1 px-2 text-xs/6 font-medium text-zinc-500 dark:text-zinc-400")})}const D3=T.forwardRef(function({current:a,className:s,children:r,...u},d){let h=Fe("flex w-full items-center gap-3 rounded-lg px-2 py-2.5 text-left text-base/6 font-medium text-zinc-950 sm:py-2 sm:text-sm/5","*:data-[slot=icon]:size-6 *:data-[slot=icon]:shrink-0 *:data-[slot=icon]:fill-zinc-500 sm:*:data-[slot=icon]:size-5","*:last:data-[slot=icon]:ml-auto *:last:data-[slot=icon]:size-5 sm:*:last:data-[slot=icon]:size-4","*:data-[slot=avatar]:-m-0.5 *:data-[slot=avatar]:size-7 sm:*:data-[slot=avatar]:size-6","data-hover:bg-zinc-950/5 data-hover:*:data-[slot=icon]:fill-zinc-950","data-active:bg-zinc-950/5 data-active:*:data-[slot=icon]:fill-zinc-950","data-current:*:data-[slot=icon]:fill-zinc-950","dark:text-white dark:*:data-[slot=icon]:fill-zinc-400","dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white","dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white","dark:data-current:*:data-[slot=icon]:fill-white");return f.jsxs("span",{className:Fe(s,"relative"),children:[a&&f.jsx(qb.span,{layoutId:"current-indicator",className:"absolute inset-y-2 -left-4 w-0.5 rounded-full bg-zinc-950 dark:bg-white"}),typeof u.href=="string"?f.jsx(Cx,{as:Yo,...u,className:h,"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})}):f.jsx(Tl,{...u,className:Fe("cursor-default",h),"data-current":a?"true":void 0,ref:d,children:f.jsx(ya,{children:r})})]})});function O3({className:n,...a}){return f.jsx("span",{...a,className:Fe(n,"truncate")})}const R3={red:"bg-red-500/15 text-red-700 group-data-hover:bg-red-500/25 dark:bg-red-500/10 dark:text-red-400 dark:group-data-hover:bg-red-500/20",orange:"bg-orange-500/15 text-orange-700 group-data-hover:bg-orange-500/25 dark:bg-orange-500/10 dark:text-orange-400 dark:group-data-hover:bg-orange-500/20",amber:"bg-amber-400/20 text-amber-700 group-data-hover:bg-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400 dark:group-data-hover:bg-amber-400/15",yellow:"bg-yellow-400/20 text-yellow-700 group-data-hover:bg-yellow-400/30 dark:bg-yellow-400/10 dark:text-yellow-300 dark:group-data-hover:bg-yellow-400/15",lime:"bg-lime-400/20 text-lime-700 group-data-hover:bg-lime-400/30 dark:bg-lime-400/10 dark:text-lime-300 dark:group-data-hover:bg-lime-400/15",green:"bg-green-500/15 text-green-700 group-data-hover:bg-green-500/25 dark:bg-green-500/10 dark:text-green-400 dark:group-data-hover:bg-green-500/20",emerald:"bg-emerald-500/15 text-emerald-700 group-data-hover:bg-emerald-500/25 dark:bg-emerald-500/10 dark:text-emerald-400 dark:group-data-hover:bg-emerald-500/20",teal:"bg-teal-500/15 text-teal-700 group-data-hover:bg-teal-500/25 dark:bg-teal-500/10 dark:text-teal-300 dark:group-data-hover:bg-teal-500/20",cyan:"bg-cyan-400/20 text-cyan-700 group-data-hover:bg-cyan-400/30 dark:bg-cyan-400/10 dark:text-cyan-300 dark:group-data-hover:bg-cyan-400/15",sky:"bg-sky-500/15 text-sky-700 group-data-hover:bg-sky-500/25 dark:bg-sky-500/10 dark:text-sky-300 dark:group-data-hover:bg-sky-500/20",blue:"bg-blue-500/15 text-blue-700 group-data-hover:bg-blue-500/25 dark:text-blue-400 dark:group-data-hover:bg-blue-500/25",indigo:"bg-indigo-500/15 text-indigo-700 group-data-hover:bg-indigo-500/25 dark:text-indigo-400 dark:group-data-hover:bg-indigo-500/20",violet:"bg-violet-500/15 text-violet-700 group-data-hover:bg-violet-500/25 dark:text-violet-400 dark:group-data-hover:bg-violet-500/20",purple:"bg-purple-500/15 text-purple-700 group-data-hover:bg-purple-500/25 dark:text-purple-400 dark:group-data-hover:bg-purple-500/20",fuchsia:"bg-fuchsia-400/15 text-fuchsia-700 group-data-hover:bg-fuchsia-400/25 dark:bg-fuchsia-400/10 dark:text-fuchsia-400 dark:group-data-hover:bg-fuchsia-400/20",pink:"bg-pink-400/15 text-pink-700 group-data-hover:bg-pink-400/25 dark:bg-pink-400/10 dark:text-pink-400 dark:group-data-hover:bg-pink-400/20",rose:"bg-rose-400/15 text-rose-700 group-data-hover:bg-rose-400/25 dark:bg-rose-400/10 dark:text-rose-400 dark:group-data-hover:bg-rose-400/20",zinc:"bg-zinc-600/10 text-zinc-700 group-data-hover:bg-zinc-600/20 dark:bg-white/5 dark:text-zinc-400 dark:group-data-hover:bg-white/10"};function xe({color:n="zinc",className:a,...s}){return f.jsx("span",{...s,className:Fe(a,"inline-flex items-center gap-x-1.5 rounded-md px-1.5 py-0.5 text-sm/5 font-medium sm:text-xs/5 forced-colors:outline",R3[n])})}T.forwardRef(function({color:a="zinc",className:s,children:r,...u},d){let h=Fe(s,"group relative inline-flex rounded-md focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500");return typeof u.href=="string"?f.jsx(Yo,{...u,className:h,ref:d,children:f.jsx(ya,{children:f.jsx(xe,{color:a,children:r})})}):f.jsx(Tl,{...u,className:h,ref:d,children:f.jsx(ya,{children:f.jsx(xe,{color:a,children:r})})})});function z3(n){T.useEffect(()=>{if(!n)return;const a=n;function s(r){if(!(r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement))switch(r.key){case"1":a({tab:"overview"});break;case"2":a({tab:"mail"});break;case"3":a({tab:"sessions"});break;case"4":a({tab:"work"});break;case"5":a({tab:"connections"});break;case"6":a({tab:"inner"});break;case"7":a({tab:"notes"});break;case"8":a({tab:"runtime"});break;case"Escape":{document.activeElement instanceof HTMLElement&&document.activeElement.blur();break}}}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n])}const k3={"owed-reply":"red","blocking-obligation":"red","broken-return":"red","stale-delegation":"yellow","return-ready":"lime","overdue-habit":"yellow"},L3={"owed-reply":"owed reply","blocking-obligation":"blocking","broken-return":"broken return","stale-delegation":"stale","return-ready":"ready to return","overdue-habit":"overdue"},V3={"owed-reply":"Someone spoke last and is waiting for your response","blocking-obligation":"This obligation is open and blocking forward progress","broken-return":"Work was done but the result was never returned to the requester","stale-delegation":"This was delegated to you and hasn't been addressed","return-ready":"The result is ready — deliver it to close the loop","overdue-habit":"This routine is past its scheduled cadence"},_3=new Set(["stale-delegation"]),U3=new Set(["owed-reply","blocking-obligation","broken-return","return-ready","overdue-habit"]),B3=new Set(["spawning","running","waiting_input","stalled"]);function H3({view:n,deskPrefs:a,refreshGeneration:s}){const r=Pi(),[u,d]=T.useState(null),[h,p]=T.useState(null),[m,g]=T.useState(null),[x,y]=T.useState(null),[S,w]=T.useState(null),j=n.agent,E=n.work,D=n.inner,R=n.activity,M=j.degraded,z=j.attention,k=E.tasks,U=E.obligations,P=E.sessions,F=E.coding,W=j.senses,re=E.bridges;return T.useEffect(()=>{_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d),_e(`/agents/${encodeURIComponent(j.agentName)}/coding`).then(p),_e(`/agents/${encodeURIComponent(j.agentName)}/continuity`).then(g).catch(()=>{}),_e(`/agents/${encodeURIComponent(j.agentName)}/orientation`).then(y).catch(()=>{}),_e(`/agents/${encodeURIComponent(j.agentName)}/changes`).then(w).catch(()=>{})},[j.agentName,s]),f.jsxs("div",{className:"space-y-6",children:[u&&u.items.length>0&&(()=>{const B=u.items.filter(ie=>U3.has(ie.urgency)),Z=u.items.filter(ie=>_3.has(ie.urgency));return f.jsxs("div",{className:"space-y-3",children:[B.length>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-fang/5 p-4 ring-1 ring-ouro-fang/15",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-fang",children:["Action now (",B.length,")"]}),f.jsx("div",{className:"mt-2 space-y-1.5",children:B.map((ie,le)=>f.jsx(ex,{item:ie,nav:r,agentName:j.agentName,onDismiss:()=>{d(Se=>Se&&{items:Se.items.filter((De,$)=>u.items.indexOf(ie)!==$)})}},`action-${le}`))})]}),Z.length>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["Stale (",Z.length,")"]}),f.jsx("button",{onClick:async()=>{var ie;for(const le of Z)(ie=le.ref)!=null&&ie.focus&&await fetch(`/api/agents/${encodeURIComponent(j.agentName)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:le.ref.focus})});_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d)},className:"text-xs text-ouro-gold underline underline-offset-2 hover:text-ouro-bone transition-colors",children:"Clear all stale"})]}),f.jsx("div",{className:"mt-2 space-y-1.5",children:Z.map((ie,le)=>f.jsx(ex,{item:ie,nav:r,agentName:j.agentName,onDismiss:()=>{_e(`/agents/${encodeURIComponent(j.agentName)}/needs-me`).then(d)}},`stale-${le}`))})]})]})})(),(a==null?void 0:a.carrying)&&f.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"What I'm carrying"}),f.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-bone",children:a.carrying})]}),(()=>{const B=(a==null?void 0:a.pinnedConstellations)??[];return B.length===0?null:f.jsxs("div",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Pinned threads"}),f.jsx("div",{className:"mt-2 space-y-2",children:B.map((Z,ie)=>f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-medium text-ouro-bone",children:Z.label}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-1.5",children:[Z.friendIds.map(le=>f.jsxs("button",{onClick:()=>r({tab:"sessions"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["friend:",le.slice(0,8),"…"]},le)),Z.taskRefs.map(le=>f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["task:",le]},le)),Z.bridgeIds.map(le=>f.jsxs("button",{onClick:()=>r({tab:"connections",focus:le}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:["bridge:",le.slice(0,8),"…"]},le))]})]},ie))})]})})(),f.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10 sm:p-5",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Center of gravity"}),f.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone sm:text-2xl",children:z.label}),f.jsxs("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:[j.agentName," has"," ",f.jsxs(no,{tab:"work",children:[k.liveCount," live tasks"]}),","," ",f.jsxs(no,{tab:"work",children:[U.openCount," obligations"]}),","," ",f.jsxs(no,{tab:"work",children:[F.activeCount," coding lanes"]}),", and"," ",f.jsxs(no,{tab:"sessions",children:[P.liveCount," live sessions"]}),"."]}),M.status==="degraded"&&M.issues.length>0&&f.jsxs("div",{className:"mt-3 space-y-1",children:[M.issues.slice(0,5).map((B,Z)=>f.jsxs("button",{onClick:()=>r({tab:"runtime"}),className:"flex w-full items-start gap-2 rounded-lg bg-ouro-fang/5 px-3 py-2 text-left text-sm ring-1 ring-ouro-fang/10 hover:ring-ouro-fang/25 transition-colors",children:[f.jsx("span",{className:"mt-0.5 h-2 w-2 shrink-0 rounded-full bg-ouro-fang"}),f.jsxs("span",{className:"text-ouro-mist",children:[f.jsx("span",{className:"font-semibold text-ouro-fang",children:B.code}),f.jsxs("span",{className:"text-ouro-shadow",children:[" — ",pt(B.detail,80)]})]})]},Z)),M.issues.length>5&&f.jsxs("button",{onClick:()=>r({tab:"runtime"}),className:"text-xs text-ouro-glow underline underline-offset-2",children:["+",M.issues.length-5," more issues"]})]})]}),x&&f.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Orientation"}),(()=>{const B=x.currentSession;return B?f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx(xe,{color:"lime",children:"active session"}),f.jsxs("button",{onClick:()=>r({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"text-sm text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:[B.channel,"/",B.key]}),B.lastActivityAt&&f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(B.lastActivityAt)})]}):null})(),x.primaryObligation&&f.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:"yellow",children:x.primaryObligation.status}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:pt(x.primaryObligation.content,80)})]}),x.primaryObligation.nextAction&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-mist",children:["Next: ",x.primaryObligation.nextAction]}),x.primaryObligation.waitingOn&&f.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Waiting on: ",x.primaryObligation.waitingOn]})]}),x.resumeHandle&&f.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Resume handle"}),f.jsxs("div",{className:"mt-1 space-y-0.5 text-sm",children:[x.resumeHandle.lane&&f.jsxs("p",{className:"text-ouro-bone",children:["Lane: ",x.resumeHandle.lane]}),x.resumeHandle.artifact&&f.jsxs("p",{className:"text-ouro-mist",children:["Artifact: ",x.resumeHandle.artifact]}),x.resumeHandle.nextAction&&f.jsxs("p",{className:"text-ouro-mist",children:["Next: ",x.resumeHandle.nextAction]}),x.resumeHandle.blockerOrWaitingOn&&f.jsxs("p",{className:"text-ouro-shadow",children:["Blocked: ",x.resumeHandle.blockerOrWaitingOn]}),f.jsxs(xe,{color:x.resumeHandle.confidence==="high"?"lime":x.resumeHandle.confidence==="medium"?"yellow":"zinc",children:[x.resumeHandle.confidence," confidence"]})]})]}),x.otherActiveSessions.length>0&&f.jsxs("div",{className:"mt-2",children:[f.jsxs("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:["Other sessions (",x.otherActiveSessions.length,")"]}),f.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:x.otherActiveSessions.slice(0,5).map(B=>f.jsx("button",{onClick:()=>r({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2",children:B.friendName},`${B.friendId}/${B.channel}/${B.key}`))})]})]}),S&&S.changeCount>0&&f.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["What changed (",S.changeCount,")"]}),S.snapshotAge&&f.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Since ",et(S.snapshotAge)]}),f.jsxs("div",{className:"mt-2 space-y-1",children:[S.items.slice(0,8).map((B,Z)=>f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(xe,{color:B.kind.includes("status")?"yellow":"zinc",children:B.kind.replace(/_/g," ")}),f.jsx("span",{className:"truncate text-ouro-mist",children:B.summary})]},Z)),S.items.length>8&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["+",S.items.length-8," more changes"]})]})]}),m&&f.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Presence"}),m.presence.self?f.jsxs("div",{className:"mt-2 space-y-1",children:[f.jsx("p",{className:"text-sm font-medium text-ouro-bone",children:m.presence.self.availability}),m.presence.self.lane&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Lane: ",m.presence.self.lane]}),m.presence.self.tempo&&f.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Tempo: ",m.presence.self.tempo]})]}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No presence data"}),m.presence.peers.length>0&&f.jsxs("div",{className:"mt-2 border-t border-ouro-moss/20 pt-2",children:[f.jsx("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:"Peers"}),f.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:m.presence.peers.map(B=>f.jsx(xe,{color:B.availability==="active"?"lime":"zinc",children:B.agentName},B.agentName))})]})]}),f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Cares (",m.cares.activeCount,")"]}),m.cares.items.length>0?f.jsx("div",{className:"mt-2 space-y-1.5",children:m.cares.items.slice(0,5).map(B=>f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:B.salience==="high"?"red":B.salience==="medium"?"yellow":"zinc",children:B.salience}),f.jsx("p",{className:"truncate text-sm text-ouro-bone",children:B.label})]},B.id))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No active cares"})]}),f.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Episodes (",m.episodes.recentCount,")"]}),m.episodes.items.length>0?f.jsx("div",{className:"mt-2 space-y-1.5",children:m.episodes.items.slice(0,5).map(B=>f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(xe,{color:"zinc",children:B.kind}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"truncate text-sm text-ouro-bone",children:B.summary}),f.jsx("p",{className:"text-xs text-ouro-shadow",children:et(B.timestamp)})]})]},B.id))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No recent episodes"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[f.jsx(ao,{label:"Tasks",value:k.liveCount,sub:`${k.blockedCount} blocked`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Obligations",value:U.openCount,sub:`${P.liveCount} sessions`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Coding",value:F.activeCount,sub:`${F.blockedCount} blocked`,onClick:()=>r({tab:"work"})}),f.jsx(ao,{label:"Inner",value:D.status,sub:pt(D.summary??"",30),onClick:()=>r({tab:"inner"})})]}),h&&h.items.length>0&&(()=>{const B=h.items.filter(Z=>B3.has(Z.status));return B.length===0?null:f.jsx(Is,{title:`Active coding (${B.length})`,children:f.jsx("div",{className:"space-y-1.5",children:B.map(Z=>f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"flex w-full items-center gap-2 rounded-lg bg-ouro-void/40 px-3 py-2 text-left ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:[f.jsx(xe,{color:Z.status==="running"?"lime":Z.status==="waiting_input"?"yellow":"zinc",children:Z.status}),f.jsxs("span",{className:"truncate text-sm text-ouro-bone",children:[Z.runner," — ",pt(Z.workdir,40)]}),f.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:et(Z.lastActivityAt)})]},Z.id))})})})(),f.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[f.jsx(Is,{title:"Senses",children:W.length>0?f.jsx($3,{items:W}):f.jsx(_f,{children:"No active senses"})}),f.jsx(Is,{title:"Bridges",children:re.length>0?f.jsx("div",{className:"flex flex-wrap gap-1.5",children:re.map(B=>f.jsx("button",{onClick:()=>r({tab:"connections",focus:B}),children:f.jsx(xe,{color:"lime",children:B})},B))}):f.jsx(_f,{children:"No active bridges"})})]}),(()=>{const B=U.items.filter(Z=>Z.status==="fulfilled");return B.length===0?null:f.jsx(Is,{title:"Recently closed",children:f.jsx("div",{className:"space-y-1",children:B.slice(0,3).map((Z,ie)=>f.jsxs("div",{className:"flex items-center gap-2 rounded-lg px-3 py-2 bg-ouro-glow/5 ring-1 ring-ouro-glow/10",children:[f.jsx(xe,{color:"lime",children:"closed"}),f.jsx("p",{className:"text-sm text-ouro-mist truncate",children:pt(Z.content,80)}),f.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:et(Z.updatedAt)})]},ie))})})})(),f.jsx(Is,{title:"Recent activity",children:R.recent.length>0?f.jsx("div",{className:"space-y-1",children:R.recent.map((B,Z)=>{const ie=B.kind==="coding"||B.kind==="obligation"?"work":B.kind==="session"?"sessions":"inner";return f.jsxs("button",{onClick:()=>r({tab:ie}),className:"flex w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left hover:bg-ouro-moss/10 transition-colors",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{children:B.kind}),f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(B.at)})]}),f.jsx("p",{className:"truncate text-sm font-medium text-ouro-bone",children:pt(B.label,100)}),f.jsx("p",{className:"truncate text-xs text-ouro-shadow",children:pt(B.detail,80)})]},Z)})}):f.jsx(_f,{children:"No recent activity yet."})})]})}function ex({item:n,nav:a,agentName:s,onDismiss:r}){var h;const u=n.urgency==="return-ready",d=(h=n.ref)==null?void 0:h.focus;return f.jsxs("div",{className:`flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left ring-1 transition-colors ${u?"bg-ouro-glow/5 ring-ouro-glow/15":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[f.jsxs("button",{onClick:()=>n.ref&&a({tab:n.ref.tab,focus:n.ref.focus}),className:"flex min-w-0 flex-1 items-start gap-2.5",children:[f.jsx(xe,{color:k3[n.urgency]??"zinc",children:L3[n.urgency]??n.urgency}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("p",{className:`text-sm font-medium ${u?"text-ouro-glow":"text-ouro-bone"}`,children:n.label}),f.jsx("p",{className:"text-xs text-ouro-shadow truncate",children:n.detail}),f.jsx("p",{className:"text-[10px] italic text-ouro-shadow/60 mt-0.5",children:V3[n.urgency]??""})]}),n.ageMs!=null&&f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:n.ageMs<36e5?`${Math.floor(n.ageMs/6e4)}m`:n.ageMs<864e5?`${Math.floor(n.ageMs/36e5)}h`:`${Math.floor(n.ageMs/864e5)}d`})]}),d&&f.jsx("button",{onClick:async p=>{p.stopPropagation(),await fetch(`/api/agents/${encodeURIComponent(s)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:d})}),r()},className:"shrink-0 text-xs text-ouro-shadow hover:text-ouro-fang transition-colors",title:"Dismiss",children:"✕"})]})}function no({tab:n,children:a}){const s=Pi();return f.jsx("button",{onClick:()=>s({tab:n}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow transition-colors",children:a})}function ao({label:n,value:a,sub:s,onClick:r}){return f.jsxs("button",{onClick:r,className:"rounded-xl bg-ouro-void/50 p-3 text-left ring-1 ring-ouro-moss/20 hover:ring-ouro-glow/20 transition-all",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),f.jsx("p",{className:"mt-1 text-xl font-semibold tabular-nums text-ouro-bone",children:a}),f.jsx("p",{className:"mt-0.5 truncate text-xs text-ouro-shadow",children:s})]})}function Is({title:n,children:a}){return f.jsxs("div",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n}),f.jsx("div",{className:"mt-2",children:a})]})}function $3({items:n}){return f.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(a=>f.jsx(xe,{color:"lime",children:a},a))})}function _f({children:n}){return f.jsx("p",{className:"text-sm text-ouro-shadow",children:n})}function pl(n){return n.length>0?n.join(", "):"(unknown)"}function q3(n,a){return a==="all"?!0:["imbox","screener","discarded","quarantine"].includes(a)?n.placement===a:a==="native"||a==="delegated"?n.compartmentKind===a:a.startsWith("source:")?n.source===a.slice(7):!1}function Yb(n){return n.subject||"(no subject)"}function Y3(n,a){return{status:"error",agentName:n,mailboxAddress:null,generatedAt:new Date().toISOString(),store:null,folders:[],messages:[],screener:[],outbound:[],recovery:{discardedCount:0,quarantineCount:0},accessLog:[],error:a}}function G3(n,a,s){return{status:"error",agentName:n,mailboxAddress:a,generatedAt:new Date().toISOString(),message:null,accessLog:[],error:s}}function Gb(n){return n.provenance.compartmentKind==="delegated"?`${n.provenance.ownerEmail??"delegated"} / ${n.provenance.source??"source"}`:"native mailbox"}function oh(n){return n==="screener"?"bg-[#fff7d6] text-[#6f5200] ring-[#e7c85c]":n==="discarded"||n==="quarantine"?"bg-[#ffe8e2] text-[#8a2f1f] ring-[#ef9a84]":n==="sent"?"bg-[#dff7ea] text-[#17613a] ring-[#82caa1]":n==="draft"?"bg-[#e7ecff] text-[#263f95] ring-[#a7b5f5]":"bg-[#e9f3ef] text-[#1e5840] ring-[#9fc7b5]"}function X3(n){return(n==null?void 0:n.messages.length)??0}function K3({agentName:n,focus:a,onFocusConsumed:s,refreshGeneration:r}){var R;const[u,d]=T.useState(null),[h,p]=T.useState("all"),[m,g]=T.useState(a??null),[x,y]=T.useState(null),[S,w]=T.useState(!1);T.useEffect(()=>{p("all"),g(a??null),y(null)},[n]),T.useEffect(()=>{d(null),_e(`/agents/${encodeURIComponent(n)}/mail`).then(d).catch(()=>d(Y3(n,"mail unavailable")))},[n,r]),T.useEffect(()=>{a&&(g(a),s==null||s())},[a,s]),T.useEffect(()=>{if(!m){y(null);return}w(!0),_e(`/agents/${encodeURIComponent(n)}/mail/${encodeURIComponent(m)}`).then(y).catch(()=>y(G3(n,(u==null?void 0:u.mailboxAddress)??null,"message unavailable"))).finally(()=>w(!1))},[n,m,r]);const j=T.useMemo(()=>{const M=(u==null?void 0:u.folders)??[];return[{id:"all",label:"All",count:X3(u)},...M]},[u]),E=T.useMemo(()=>((u==null?void 0:u.messages)??[]).filter(M=>q3(M,h)),[h,u]),D=T.useMemo(()=>h!=="draft"&&h!=="sent"?[]:((u==null?void 0:u.outbound)??[]).filter(M=>M.status===h),[h,u]);return u?u.status!=="ready"?f.jsx("div",{className:"mailbox-shell grid min-h-[58vh] place-items-center rounded-md bg-[#f2f6ef] p-8 text-[#1f2720] ring-1 ring-black/10",children:f.jsxs("div",{className:"max-w-lg text-center",children:[f.jsx("p",{className:"text-sm font-semibold text-[#667067]",children:"Mailbox"}),f.jsx("h2",{className:"mt-2 text-2xl font-semibold",children:u.status==="auth-required"?"Locked":"Unavailable"}),f.jsx("p",{className:"mt-3 text-sm leading-6 text-[#59645c]",children:u.error})]})}):f.jsxs("div",{className:"mailbox-shell overflow-hidden rounded-md bg-[#f2f6ef] text-[#172018] ring-1 ring-black/10",children:[f.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-[#cbd8c8] bg-[#e4ecdf] px-4 py-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"text-xs font-semibold text-[#687062]",children:"Agent mailbox"}),f.jsx("p",{className:"truncate text-sm text-[#2d3a30]",children:u.mailboxAddress})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:"zinc",children:"read-only"}),f.jsxs("span",{className:"text-xs tabular-nums text-[#687062]",children:[u.messages.length," messages"]}),f.jsxs("span",{className:"text-xs tabular-nums text-[#687062]",children:[u.outbound.length," outbound"]})]})]}),f.jsxs("div",{className:"grid min-h-[66vh] grid-cols-1 lg:grid-cols-[14.5rem_minmax(19rem,25rem)_minmax(0,1fr)]",children:[f.jsxs("aside",{className:"border-b border-[#cbd8c8] bg-[#e4ecdf] p-3 lg:border-b-0 lg:border-r",children:[f.jsx(F3,{folders:j,activeFolder:h,setActiveFolder:p}),f.jsx(Z3,{discarded:u.recovery.discardedCount,quarantine:u.recovery.quarantineCount}),f.jsx(Q3,{candidates:u.screener,onOpen:M=>{p("screener"),g(M)}}),f.jsx(P3,{entries:u.accessLog})]}),f.jsxs("section",{className:"border-b border-[#cbd8c8] bg-[#fbfdf8] lg:border-b-0 lg:border-r",children:[f.jsxs("div",{className:"border-b border-[#d8e2d4] px-4 py-3",children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:((R=j.find(M=>M.id===h))==null?void 0:R.label)??"All"}),f.jsx("p",{className:"text-xs text-[#687062]",children:D.length>0?`${D.length} outbound records`:`${E.length} messages`})]}),f.jsxs("div",{className:"max-h-[66vh] overflow-y-auto",children:[D.map(M=>f.jsx(W3,{record:M},M.id)),D.length===0&&E.map(M=>f.jsx(J3,{message:M,selected:m===M.id,onSelect:()=>g(M.id)},M.id)),D.length===0&&E.length===0&&f.jsx("div",{className:"px-4 py-10 text-center text-sm text-[#687062]",children:"No records here."})]})]}),f.jsxs("main",{className:"min-w-0 bg-[#fbfdf8]",children:[!m&&f.jsx(eC,{}),m&&S&&f.jsx(tx,{label:"Opening message"}),m&&!S&&(x==null?void 0:x.status)!=="ready"&&f.jsx("div",{className:"grid min-h-[54vh] place-items-center p-8 text-center",children:f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:"Message unavailable"}),f.jsx("p",{className:"mt-2 text-sm text-[#687062]",children:x==null?void 0:x.error})]})}),(x==null?void 0:x.status)==="ready"&&x.message&&f.jsx(I3,{detail:x})]})]})]}):f.jsx(tx,{label:"Opening mailbox"})}function F3({folders:n,activeFolder:a,setActiveFolder:s}){return f.jsx("div",{className:"space-y-1",children:n.map(r=>f.jsxs("button",{type:"button",onClick:()=>s(r.id),className:`flex h-9 w-full items-center justify-between rounded px-3 text-left text-sm transition-colors ${a===r.id?"bg-[#fbfdf8] text-[#172018] shadow-sm":"text-[#536157] hover:bg-[#fbfdf8]/65"}`,children:[f.jsx("span",{className:"truncate",children:r.label}),f.jsx("span",{className:"text-xs tabular-nums text-[#687062]",children:r.count})]},r.id))})}function Z3({discarded:n,quarantine:a}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Recovery drawers"}),f.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2",children:[f.jsx("p",{className:"text-xs text-[#687062]",children:"Discarded"}),f.jsx("p",{className:"text-lg font-semibold tabular-nums text-[#172018]",children:n})]}),f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2",children:[f.jsx("p",{className:"text-xs text-[#687062]",children:"Quarantine"}),f.jsx("p",{className:"text-lg font-semibold tabular-nums text-[#172018]",children:a})]})]})]})}function Q3({candidates:n,onOpen:a}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Screener"}),f.jsxs("div",{className:"mt-2 space-y-2",children:[n.slice(0,5).map(s=>f.jsxs("button",{type:"button",onClick:()=>a(s.messageId),className:"block w-full rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2 text-left hover:border-[#9fb8a7]",children:[f.jsx("p",{className:"truncate text-xs font-semibold text-[#172018]",children:s.senderEmail}),f.jsx("p",{className:"mt-1 truncate text-xs text-[#687062]",children:s.trustReason})]},s.id)),n.length===0&&f.jsx("p",{className:"text-xs text-[#687062]",children:"No pending senders."})]})]})}function P3({entries:n}){return f.jsxs("div",{className:"mt-5 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-[11px] font-semibold text-[#687062]",children:"Access audit"}),f.jsxs("div",{className:"mt-2 space-y-2",children:[n.slice(0,4).map(a=>f.jsxs("div",{className:"text-xs leading-4 text-[#687062]",children:[f.jsx("p",{className:"truncate font-medium text-[#3f4b42]",children:a.tool}),f.jsx("p",{className:"truncate",children:a.reason})]},a.id)),n.length===0&&f.jsx("p",{className:"text-xs text-[#687062]",children:"No reads yet."})]})]})}function J3({message:n,selected:a,onSelect:s}){return f.jsxs("button",{type:"button",onClick:s,className:`block w-full border-b border-[#d8e2d4] px-4 py-3 text-left transition-colors ${a?"bg-[#eaf4ee]":"hover:bg-[#eef4ec]"}`,children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsx("p",{className:"min-w-0 truncate text-sm font-semibold text-[#172018]",children:pl(n.from)}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-[#687062]",children:et(n.receivedAt)})]}),f.jsx("p",{className:"mt-1 truncate text-sm text-[#26352a]",children:Yb(n)}),f.jsx("p",{className:"mt-1 line-clamp-2 text-xs leading-5 text-[#687062]",children:pt(n.snippet,150)}),f.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[f.jsx("span",{className:`rounded px-2 py-0.5 text-[11px] ring-1 ${oh(n.placement)}`,children:n.placement}),f.jsx("span",{className:"truncate text-[11px] text-[#687062]",children:Gb(n)})]})]})}function W3({record:n}){return f.jsxs("div",{className:"border-b border-[#d8e2d4] px-4 py-3",children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsx("p",{className:"min-w-0 truncate text-sm font-semibold text-[#172018]",children:n.subject||"(no subject)"}),f.jsx("span",{className:`shrink-0 rounded px-2 py-0.5 text-[11px] ring-1 ${oh(n.status)}`,children:n.status})]}),f.jsxs("p",{className:"mt-1 truncate text-xs text-[#536157]",children:["to ",pl(n.to)]}),f.jsxs("p",{className:"mt-1 text-xs text-[#687062]",children:[n.transport??"not sent"," · ",et(n.sentAt??n.updatedAt)]})]})}function I3({detail:n}){const a=n.message;return f.jsxs("article",{className:"min-h-[66vh]",children:[f.jsxs("header",{className:"border-b border-[#cbd8c8] bg-[#fbfdf8] px-6 py-5",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[f.jsx("h2",{className:"min-w-0 text-xl font-semibold leading-tight text-[#172018]",children:Yb(a)}),f.jsx("span",{className:`rounded px-2 py-0.5 text-xs ring-1 ${oh(a.placement)}`,children:a.placement})]}),f.jsxs("div",{className:"mt-4 grid gap-1 text-sm text-[#536157]",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"From:"})," ",pl(a.from)]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"To:"})," ",pl(a.to)]}),a.cc.length>0&&f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Cc:"})," ",pl(a.cc)]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Received:"})," ",new Date(a.receivedAt).toLocaleString()]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Provenance:"})," ",Gb(a)]})]})]}),f.jsx("div",{className:"border-b border-[#f0d0bd] bg-[#fff4e4] px-6 py-3 text-sm text-[#8a4a18]",children:a.untrustedContentWarning}),f.jsxs("div",{className:"px-6 py-6",children:[f.jsx("pre",{className:"whitespace-pre-wrap break-words font-body text-sm leading-7 text-[#26352a]",children:a.text||"(no text body)"}),a.bodyTruncated&&f.jsx("p",{className:"mt-4 text-xs text-[#687062]",children:"Body truncated in Outlook."}),f.jsxs("div",{className:"mt-6 grid gap-3 border-t border-[#cbd8c8] pt-4 text-xs text-[#687062] md:grid-cols-2",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Read reason:"})," ",a.access.reason]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#172018]",children:"Read at:"})," ",new Date(a.access.accessedAt).toLocaleString()]})]}),a.attachments.length>0&&f.jsxs("div",{className:"mt-6 border-t border-[#cbd8c8] pt-4",children:[f.jsx("p",{className:"text-xs font-semibold text-[#687062]",children:"Attachments"}),f.jsx("div",{className:"mt-2 space-y-2",children:a.attachments.map(s=>f.jsxs("div",{className:"rounded border border-[#cbd8c8] bg-[#fbfdf8] px-3 py-2 text-sm text-[#3f4b42]",children:[s.filename," · ",s.contentType," · ",s.size.toLocaleString()," bytes"]},`${s.filename}-${s.size}`))})]})]})]})}function eC(){return f.jsx("div",{className:"grid min-h-[54vh] place-items-center p-8 text-center",children:f.jsxs("div",{children:[f.jsx("p",{className:"text-sm font-semibold text-[#172018]",children:"No message selected"}),f.jsx("p",{className:"mt-2 text-sm text-[#687062]",children:"Reading pane idle."})]})})}function tx({label:n}){return f.jsxs("div",{className:"flex items-center gap-2 p-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-[#2f8f4e]"}),f.jsxs("span",{className:"text-xs text-[#687062]",children:[n,"..."]})]})}function jd(n){const a=n.function.name,s=tC(n.function.arguments);return a==="settle"?{kind:"response",name:a,id:n.id,deliveredText:s.answer??null,delegatedThought:null,metadata:s.intent??null,rawArgs:null}:a==="ponder"?{kind:"delegation",name:a,id:n.id,deliveredText:s.say??null,delegatedThought:s.thought??null,metadata:null,rawArgs:null}:a==="rest"?{kind:"rest",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:null}:a==="observe"?{kind:"observe",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:s.reason??null,rawArgs:null}:a==="surface"?{kind:"surface",name:a,id:n.id,deliveredText:s.content??null,delegatedThought:null,metadata:s.delegationId??s.friendId??null,rawArgs:null}:{kind:"action",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:n.function.arguments}}function tC(n){try{const a=JSON.parse(n);if(a&&typeof a=="object")return a}catch{}return{}}const nC=48;function aC(n){return n.scrollHeight-n.scrollTop-n.clientHeight<=nC}function Xb(n){const a=T.useRef(null),s=T.useRef(!0),r=T.useCallback(()=>{const d=a.current;d&&(s.current=aC(d))},[]),u=T.useCallback(()=>{s.current=!1},[]);return T.useEffect(()=>{const d=a.current;!d||!s.current||(d.scrollTop=d.scrollHeight)},[n]),{ref:a,onScroll:r,preserveScroll:u}}function iC(n){return typeof n=="string"?n:Array.isArray(n)?n.map(a=>a.type==="text"&&typeof a.text=="string"?a.text:"").filter(a=>a.length>0).join(""):""}function Ml(n){return iC(n.content)}function Kb(n){return n.time.authoredAt??n.time.observedAt??n.time.recordedAt}const nx={"needs-reply":{color:"red",label:"needs reply"},"on-hold":{color:"yellow",label:"on hold"},monitoring:{color:"zinc",label:"monitoring"},idle:{color:"zinc",label:"idle"}};function Fb(n){return n==="bluebubbles"?"iMessage":n==="teams"?"Teams":n==="cli"?"CLI":n==="mail"?"Mail":n}function sC(n){return n==="bluebubbles"?"imessage":n==="teams"?"teams":n==="cli"?"terminal":"default"}function lC(n){return n==="imessage"?"overflow-hidden rounded-xl bg-[#f5f5f7] text-[#1d1d1f] ring-1 ring-black/10":n==="teams"?"overflow-hidden rounded-xl bg-[#f7f5ff] text-[#242424] ring-1 ring-[#d8d1ff]":n==="terminal"?"overflow-hidden rounded-lg bg-[#050807] font-mono text-[#d1fae5] ring-1 ring-[#1f3a2c]":"overflow-hidden rounded-lg bg-ouro-void/60 text-ouro-bone ring-1 ring-ouro-moss/15"}function rC(n){return n==="imessage"?"border-b border-black/10 bg-[#fbfbfd] px-4 py-3 text-center":n==="teams"?"border-b border-[#d8d1ff] bg-[#4f3bb3] px-4 py-3 text-white":n==="terminal"?"border-b border-[#1f3a2c] bg-[#101815] px-4 py-2 text-[#86efac]":"border-b border-ouro-moss/15 px-4 py-3"}function oC(n){return n==="imessage"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-bl-md bg-[#e9e9eb] px-3.5 py-2 text-[#1d1d1f]":n==="teams"?"max-w-[85%] sm:max-w-[75%] rounded-md bg-white px-3.5 py-2 text-[#242424] shadow-sm ring-1 ring-[#e5e5e5]":n==="terminal"?"max-w-full rounded-none border-l-2 border-[#60a5fa] bg-transparent px-3 py-2 text-[#dbeafe]":"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-bl-sm bg-ouro-moss/25 px-3.5 py-2 ring-1 ring-ouro-moss/15"}function io(n,a="normal"){return n==="imessage"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-md bg-[#0a84ff] px-3.5 py-2 text-white":n==="teams"?"max-w-[85%] sm:max-w-[75%] rounded-md bg-[#ede9fe] px-3.5 py-2 text-[#242424] shadow-sm ring-1 ring-[#c4b5fd]":n==="terminal"?"max-w-full rounded-none border-l-2 border-[#22c55e] bg-transparent px-3 py-2 text-[#bbf7d0]":a==="surface"?"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-scale/12 px-3.5 py-2 ring-1 ring-ouro-scale/15":"max-w-[85%] sm:max-w-[75%] rounded-2xl rounded-br-sm bg-ouro-glow/8 px-3.5 py-2 ring-1 ring-ouro-glow/12"}function sl(n,a){return n==="imessage"?a==="agent"?"font-mono text-[9px] text-white/70":"font-mono text-[9px] text-[#6b7280]":n==="teams"?"font-mono text-[9px] uppercase tracking-wider text-[#5b5fc7]":n==="terminal"?a==="agent"?"font-mono text-[11px] text-[#22c55e]":"font-mono text-[11px] text-[#60a5fa]":a==="surface"||a==="agent"?"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70":"font-mono text-[9px] uppercase tracking-wider text-ouro-gold/70"}function ll(n,a="agent"){return n==="imessage"?"text-sm leading-relaxed whitespace-pre-wrap break-words":n==="teams"?"text-sm leading-relaxed text-[#242424] whitespace-pre-wrap break-words":n==="terminal"?`font-mono text-[12px] leading-6 whitespace-pre-wrap break-words ${a==="agent"?"text-[#bbf7d0]":"text-[#dbeafe]"}`:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words"}function uC(n){return Kb(n)}function Xi(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(uC(n)))}function cC({agentName:n,focus:a,onFocusConsumed:s,deskPrefs:r,refreshGeneration:u}){Pi();const[d,h]=T.useState(null),[p,m]=T.useState(null),[g,x]=T.useState(null),[y,S]=T.useState(!1),w=T.useRef(null);T.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/sessions`).then(h)},[n,u]),T.useEffect(()=>{a&&(w.current=null,m(a),x(null),S(!0),s==null||s())},[n,a,s]),T.useEffect(()=>{if(!p)return;const k=`${p}:${u}`;if(w.current===k)return;w.current=k,S(!0);const[U,P,F]=p.split("/");_e(`/agents/${encodeURIComponent(n)}/sessions/${encodeURIComponent(U)}/${encodeURIComponent(P)}/${encodeURIComponent(F)}`).then(x).catch(()=>x(null)).finally(()=>S(!1))},[n,p,u,a]);function j(k){if(p===k){m(null),x(null),w.current=null;return}m(k),x(null),S(!0)}const E=new Set((r==null?void 0:r.starredFriends)??[]);if(!d)return f.jsx(Zb,{label:"Loading sessions"});const D=new Map;for(const k of d.items)D.has(k.friendId)||D.set(k.friendId,[]),D.get(k.friendId).push(k);const R=[...D.entries()].sort((k,U)=>{const P=E.has(k[0])?0:1,F=E.has(U[0])?0:1;return P!==F?P-F:U[1].length-k[1].length}),M=[],z=new Map;for(const[k,U]of R)z.set(M.length,{name:U[0].friendName,channels:U.length,starred:E.has(k)}),M.push(...U);return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:[d.totalCount," sessions · ",d.activeCount," active · ",d.staleCount," stale"]}),f.jsx("div",{className:"space-y-1.5",children:M.map((k,U)=>{var Se;const P=z.get(U),F=E.has(k.friendId),W=`${k.friendId}/${k.channel}/${k.key}`,re=p===W,B=nx[k.replyState]??nx.idle,Z=((Se=k.lastUsage)==null?void 0:Se.total_tokens)??k.estimatedTokens??0,le=Z>0?Math.min(100,Math.round(Z/8e4*100)):0;return f.jsxs("div",{children:[P&&P.channels>1&&f.jsxs("div",{className:"flex items-center gap-2 pt-3 pb-1",children:[P.starred&&f.jsx("span",{className:"text-ouro-gold text-sm",children:"★"}),f.jsx("span",{className:"font-medium text-ouro-bone text-sm",children:P.name}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:[P.channels," channels"]})]}),f.jsxs("button",{onClick:()=>j(W),className:`flex w-full flex-col gap-1.5 rounded-lg px-3 py-3 text-left transition-colors ring-1 ${re?"bg-ouro-moss/15 ring-ouro-glow/20":"ring-ouro-moss/15 hover:bg-ouro-moss/8"}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[F&&f.jsx("span",{className:"text-ouro-gold",title:"Starred",children:"★"}),f.jsx("span",{className:"truncate font-medium text-ouro-bone",children:k.friendName}),f.jsxs("span",{className:"shrink-0 text-xs text-ouro-shadow",children:["via ",Fb(k.channel)]}),f.jsx(xe,{color:B.color,children:B.label})]}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:et(k.lastActivityAt)})]}),k.latestUserExcerpt&&f.jsxs("p",{className:"truncate text-xs text-ouro-gold/70",children:[f.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"in:"})," ",pt(k.latestUserExcerpt,100)]}),k.latestAssistantExcerpt&&f.jsxs("p",{className:"truncate text-xs text-ouro-glow/60",children:[f.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"out:"})," ",pt(k.latestAssistantExcerpt,100)]}),f.jsxs("div",{className:"flex items-center gap-3 text-xs text-ouro-shadow",children:[f.jsxs("span",{className:"tabular-nums",children:[k.messageCount," msgs"]}),k.lastUsage&&f.jsxs("span",{className:"tabular-nums",children:[k.lastUsage.total_tokens.toLocaleString()," tok"]}),le>0&&f.jsxs("div",{className:"flex items-center gap-1.5 flex-1 max-w-32",title:"Context pressure — steady state oscillates between 80-100%",children:[f.jsx("div",{className:"h-1 flex-1 rounded-full bg-ouro-moss/20",children:f.jsx("div",{className:`h-1 rounded-full transition-all ${le>100?"bg-ouro-fang":le>80?"bg-ouro-gold":"bg-ouro-glow"}`,style:{width:`${Math.min(100,le)}%`}})}),f.jsxs("span",{className:"tabular-nums text-[10px]",children:[le,"%"]})]})]})]}),re&&f.jsx(fC,{loading:y,transcript:g})]},W)})})]})}function fC({loading:n,transcript:a}){var d;const s=((d=a==null?void 0:a.messages[a.messages.length-1])==null?void 0:d.id)??null,{ref:r,onScroll:u}=Xb(s);return f.jsxs("div",{ref:r,"data-testid":"session-transcript-scroll",onScroll:u,className:"mt-1 max-h-[70vh] overflow-y-auto rounded-lg",children:[n&&!a&&f.jsx(Zb,{label:"Loading transcript"}),a&&f.jsx(dC,{transcript:a})]})}function dC({transcript:n}){const{messages:a,lastUsage:s}=n,r=sC(n.channel),u=a.filter(g=>g.role==="system"),d=a.filter(g=>g.role!=="system"),[h,p]=T.useState(!1),m=new Map;for(const g of d)g.role==="tool"&&g.toolCallId&&m.set(g.toolCallId,g);return f.jsxs("div",{className:lC(r),children:[f.jsxs("div",{className:rC(r),children:[f.jsx("p",{className:r==="terminal"?"font-mono text-xs":"text-sm font-semibold",children:Fb(n.channel)}),f.jsxs("p",{className:r==="terminal"?"mt-0.5 font-mono text-[10px] text-[#6ee7b7]":"mt-0.5 text-xs opacity-70",children:[n.friendName," · ",n.messageCount," messages"]})]}),f.jsxs("div",{className:"space-y-0.5 p-3",children:[s&&f.jsxs("p",{className:r==="terminal"?"pb-2 font-mono text-[10px] text-[#6ee7b7]":"pb-2 font-mono text-[10px] opacity-60",children:[s.input_tokens.toLocaleString()," in · ",s.output_tokens.toLocaleString()," out · ",s.total_tokens.toLocaleString()," total"]}),u.length>0&&f.jsxs("div",{className:"pb-2 mb-2 border-b border-current/10",children:[f.jsxs("button",{onClick:()=>p(!h),className:"font-mono text-[10px] uppercase tracking-wider opacity-60 transition-opacity hover:opacity-90",children:[h?"▼":"▶"," system context (",u.length,")"]}),h&&u.map(g=>f.jsxs("div",{className:"mt-2 max-h-60 overflow-y-auto rounded bg-black/5 p-2 text-xs opacity-75 whitespace-pre-wrap break-words",children:[f.jsx("p",{className:"mb-1 font-mono text-[9px] opacity-70",children:Xi(g)}),Ml(g)]},g.id))]}),d.map(g=>g.role==="tool"?null:g.role==="user"?f.jsx(hC,{msg:g,surface:r},g.id):g.role==="assistant"?f.jsx(mC,{msg:g,toolResults:m,surface:r},g.id):null)]})]})}function hC({msg:n,surface:a}){const s=Ml(n);return f.jsx("div",{className:"flex justify-start py-1",children:f.jsxs("div",{className:oC(a),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:sl(a,"user"),children:a==="terminal"?"human $":"user"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",n.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(a,"user"),children:s})]})})}function mC({msg:n,toolResults:a,surface:s}){const r=Ml(n),u=(n.toolCalls??[]).map(jd),d=u.filter(m=>m.kind!=="action"),h=u.filter(m=>m.kind==="action"),p=[];for(const m of d)m.kind==="response"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:m.deliveredText}),m.metadata&&m.metadata!=="complete"&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["intent: ",m.metadata]})]})},m.id)):m.kind==="delegation"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),m.deliveredText&&f.jsx("p",{className:ll(s),children:m.deliveredText}),m.delegatedThought&&f.jsxs("div",{className:"mt-2 rounded bg-black/10 px-2.5 py-1.5 ring-1 ring-current/10",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider opacity-70",children:"→ inner dialog"}),f.jsx("p",{className:"mt-0.5 text-xs opacity-80",children:m.delegatedThought})]})]})},m.id)):m.kind==="surface"?p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s,"surface"),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"surface"),children:"surfaced"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:m.deliveredText}),m.metadata&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",m.metadata]})]})},m.id)):m.kind==="rest"?p.push(f.jsx("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:"— resting —"},m.id)):m.kind==="observe"&&p.push(f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:["— observed",m.metadata?`: ${m.metadata}`:""," —"]},m.id));return r&&d.length===0&&p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:io(s),children:[f.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[f.jsx("p",{className:sl(s,"agent"),children:s==="terminal"?"agent >":"agent"}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),f.jsx("p",{className:ll(s),children:r})]})},`${n.id}-content`)),h.length>0&&p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsx("div",{className:"max-w-[85%] sm:max-w-[75%] space-y-1",children:h.map(m=>f.jsx(pC,{call:m,result:a.get(m.id),surface:s},m.id))})},`${n.id}-tools`)),f.jsx(f.Fragment,{children:p})}function pC({call:n,result:a,surface:s}){const[r,u]=T.useState(!1),d=a?Ml(a):null;return f.jsxs("button",{onClick:()=>u(!r),className:`w-full text-left rounded px-2.5 py-1.5 text-sm transition-colors ${s==="terminal"?"bg-[#0f1a15] font-mono text-[#bbf7d0] ring-1 ring-[#1f3a2c] hover:ring-[#22c55e]/40":s==="teams"?"bg-white text-[#242424] ring-1 ring-[#d8d1ff] hover:ring-[#5b5fc7]/40":s==="imessage"?"bg-white text-[#1d1d1f] ring-1 ring-black/10 hover:ring-[#0a84ff]/30":"bg-ouro-moss/10 ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"font-mono text-xs text-ouro-glow",children:n.name}),!r&&f.jsx("span",{className:"text-[10px] text-ouro-shadow",children:"tap to inspect"})]}),r&&f.jsxs(f.Fragment,{children:[n.rawArgs&&f.jsx("pre",{className:"mt-1.5 max-h-24 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap break-words",children:n.rawArgs}),a&&f.jsxs("div",{className:"mt-1.5 border-t border-ouro-moss/15 pt-1.5",children:[f.jsx(xe,{children:"result"}),f.jsx("pre",{className:"mt-1 max-h-32 overflow-y-auto rounded bg-ouro-void/40 p-1.5 font-mono text-[11px] text-ouro-mist whitespace-pre-wrap break-words",children:d})]})]})]})}function Zb({label:n}){return f.jsxs("div",{className:"flex items-center gap-2 py-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),f.jsxs("span",{className:"font-mono text-xs text-ouro-shadow",children:[n,"…"]})]})}function gC({agentName:n,view:a,focus:s,onFocusConsumed:r,refreshGeneration:u}){var z,k;const d=Pi(),[h,p]=T.useState(null),[m,g]=T.useState(null),[x,y]=T.useState(null),S=a.work,w=S.obligations,j=S.tasks;T.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/coding`).then(p),_e(`/agents/${encodeURIComponent(n)}/obligations`).then(g).catch(()=>{}),_e(`/agents/${encodeURIComponent(n)}/self-fix`).then(y).catch(()=>{})},[n,u]);const E=(m==null?void 0:m.items)??w.items,D=(m==null?void 0:m.openCount)??w.openCount,R=(h==null?void 0:h.items)??[],M=new Map;for(const U of R){const P=U.obligationId;if(P){const F=M.get(P);F?F.push(U):M.set(P,[U])}}return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("section",{children:[f.jsx(so,{label:`Obligations (${D} open)`}),(m==null?void 0:m.primarySelectionReason)&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Primary: ",m.primarySelectionReason]}),E.length>0?f.jsx("div",{className:"mt-3 space-y-3",children:E.map(U=>{const P=M.get(U.id)??[],F=vC(U)?U:null,W=(F==null?void 0:F.isPrimary)??!1,re=(F==null?void 0:F.meaning)??null,B=U.origin;return f.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${W?"bg-ouro-glow/5 ring-ouro-glow/20":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-start gap-2",children:[W&&f.jsx(xe,{color:"lime",children:"primary"}),f.jsx(xe,{color:U.status==="pending"?"yellow":U.status==="fulfilled"?"lime":"zinc",children:U.status}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:pt(U.content,120)})]}),B&&f.jsxs("button",{onClick:()=>d({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`}),className:"mt-2 flex w-full items-center gap-2 rounded-md bg-ouro-moss/8 px-2.5 py-1.5 text-left text-xs ring-1 ring-ouro-moss/10 hover:ring-ouro-glow/20 transition-colors",children:[f.jsx("span",{className:"text-ouro-shadow",children:"from"}),f.jsx("span",{className:"font-medium text-ouro-glow",children:B.channel}),f.jsx("span",{className:"text-ouro-shadow",children:"→"}),f.jsx("span",{className:"text-ouro-mist truncate",children:B.key}),f.jsx("span",{className:"ml-auto text-ouro-shadow",children:"open session →"})]}),U.currentSurface&&f.jsxs("div",{className:"mt-1 text-xs text-ouro-mist",children:["surface: ",f.jsx("span",{className:"text-ouro-bone",children:U.currentSurface.kind})," — ",U.currentSurface.label]}),(re==null?void 0:re.waitingOn)&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Waiting on: ",re.waitingOn]}),P.length>0&&f.jsxs("div",{className:"mt-2 space-y-1",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Linked coding"}),P.map(Z=>f.jsxs("div",{className:"flex items-center gap-2 rounded bg-ouro-moss/10 px-2 py-1 text-xs",children:[f.jsx(xe,{color:Z.status==="failed"?"red":Z.status==="running"?"lime":"zinc",children:Z.status}),f.jsxs("span",{className:"text-ouro-mist truncate",children:[Z.runner," — ",Z.workdir]})]},Z.id))]}),U.nextAction&&f.jsxs("p",{className:"mt-1.5 text-xs text-ouro-mist",children:["Next: ",U.nextAction]}),f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:et(U.updatedAt)})]},U.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No open obligations."})]}),x&&x.steps.length>0&&f.jsxs("section",{children:[f.jsx(so,{label:`Self-fix ${x.active?"(active)":"(inactive)"}`}),x.currentStep&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-glow",children:["Current: ",x.currentStep]}),f.jsx("div",{className:"mt-3 space-y-1.5",children:x.steps.map((U,P)=>f.jsxs("div",{className:`flex items-center gap-2.5 rounded-lg px-3 py-2 ring-1 ${U.status==="active"?"bg-ouro-glow/5 ring-ouro-glow/20":U.status==="done"?"bg-ouro-void/40 ring-ouro-glow/10":"bg-ouro-void/40 ring-ouro-moss/10"}`,children:[f.jsx(xe,{color:U.status==="done"?"lime":U.status==="active"?"yellow":(U.status==="skipped","zinc"),children:U.status}),f.jsx("span",{className:`text-sm ${U.status==="active"?"font-medium text-ouro-bone":"text-ouro-mist"}`,children:U.label}),U.detail&&f.jsx("span",{className:"ml-auto text-xs text-ouro-shadow",children:U.detail})]},P))})]}),f.jsxs("section",{children:[f.jsx(so,{label:`Coding lanes (${R.length})`}),R.length>0?f.jsx("div",{className:"mt-3 space-y-2",children:R.map(U=>{const P=U.status,F=P==="failed",W=U.failure,re=U.obligationId,B=U.originSession;return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:F?"red":P==="running"?"lime":P==="completed"?"zinc":"yellow",children:P}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:U.runner}),f.jsx("span",{className:"truncate text-xs text-ouro-shadow",children:U.workdir})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-2",children:[re&&f.jsxs("button",{onClick:()=>d({tab:"work",focus:re}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",re.slice(0,20),"…"]}),U.taskRef&&f.jsxs("span",{className:"text-xs text-ouro-glow",children:["task: ",U.taskRef]}),B&&f.jsx("button",{onClick:()=>{d({tab:"sessions",focus:`${B.friendId}/${B.channel}/${B.key}`})},className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:"origin session"})]}),U.checkpoint&&f.jsx("p",{className:"mt-1.5 text-xs text-ouro-mist",children:pt(U.checkpoint,100)}),f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["pid ",U.pid??"–"," · restarts ",U.restartCount," · ",et(U.lastActivityAt)]}),F&&W&&f.jsxs("div",{className:"mt-2 rounded bg-ouro-fang/5 p-2 text-xs ring-1 ring-ouro-fang/15",children:[f.jsx("span",{className:"font-semibold text-ouro-fang",children:"FAILURE:"})," ",f.jsxs("span",{className:"text-ouro-mist",children:[W.command," exited ",String(W.code??W.signal)]}),W.stderrTail&&f.jsx("pre",{className:"mt-1 max-h-20 overflow-y-auto font-mono text-[11px] text-ouro-shadow whitespace-pre-wrap",children:W.stderrTail})]})]},U.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No coding sessions."})]}),f.jsxs("section",{children:[f.jsx(so,{label:`Tasks (${j.liveCount} live, ${j.blockedCount} blocked)`}),((z=j.liveTaskNames)==null?void 0:z.length)>0?f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:j.liveTaskNames.map(U=>f.jsx(xe,{children:U},U))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No live tasks."}),((k=j.actionRequired)==null?void 0:k.length)>0&&f.jsxs("div",{className:"mt-3",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Action required"}),f.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:j.actionRequired.map(U=>f.jsx(xe,{color:"red",children:U},U))})]})]})]})}function so({label:n}){return f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function vC(n){return"isPrimary"in n}function xC({agentName:n,focus:a,onFocusConsumed:s,refreshGeneration:r}){const u=Pi(),[d,h]=T.useState(null),[p,m]=T.useState(null),[g,x]=T.useState(null);T.useEffect(()=>{const j=`/agents/${encodeURIComponent(n)}`;Promise.all([_e(`${j}/attention`).then(h),_e(`${j}/bridges`).then(m),_e(`${j}/friends`).then(x)])},[n,r]);const y=(d==null?void 0:d.queueItems)??[],S=(p==null?void 0:p.items)??[],w=(g==null?void 0:g.friends)??[];return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("section",{children:[f.jsx(Uf,{label:`Who is waiting (${(d==null?void 0:d.queueLength)??0})`}),y.length>0?f.jsx("div",{className:"mt-3 space-y-2",children:y.map((j,E)=>{const D=j.bridgeId,R=j.obligationId;return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:()=>u({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:j.friendName}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:["via ",j.channel]}),f.jsxs(xe,{color:"yellow",children:["waiting ",et(new Date(j.timestamp).toISOString())]})]}),f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:pt(j.delegatedContent,140)}),f.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-2 text-xs",children:[D&&f.jsxs("button",{onClick:()=>u({tab:"connections",focus:D}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["bridge: ",D.slice(0,12),"…"]}),R&&f.jsxs("button",{onClick:()=>u({tab:"work",focus:R}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",R.slice(0,16),"…"]})]})]},E)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"Nobody waiting."})]}),f.jsxs("section",{children:[f.jsx(Uf,{label:`Bridges (${(p==null?void 0:p.totalCount)??0})`}),S.length>0?f.jsx("div",{className:"mt-3 space-y-3",children:S.map(j=>{const E=j.attachedSessions,D=j.task,R=j.lifecycle==="active";return f.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${R?"bg-ouro-moss/10 ring-ouro-glow/12":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(xe,{color:R?"lime":"zinc",children:j.lifecycle}),f.jsx("p",{className:"font-medium text-ouro-bone",children:j.objective})]}),j.summary&&f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:pt(j.summary,160)}),E.length>0&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:E.map((M,z)=>f.jsxs("button",{onClick:()=>u({tab:"sessions",focus:`${M.friendId}/${M.channel}/${M.key}`}),className:"rounded-md bg-ouro-moss/10 px-2 py-0.5 font-mono text-[11px] text-ouro-glow ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/25 transition-colors",children:[M.friendId,"/",M.channel,"/",M.key]},z))}),D&&f.jsxs("p",{className:"mt-1.5 text-xs",children:[f.jsxs("button",{onClick:()=>u({tab:"work"}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["task: ",D.taskName]}),f.jsxs("span",{className:"text-ouro-shadow",children:[" (",D.mode,")"]})]}),f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:et(j.updatedAt)})]},j.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No bridges."})]}),f.jsxs("section",{children:[f.jsx(Uf,{label:`Friends (${(g==null?void 0:g.totalFriends)??0})`}),w.length>0?f.jsx("div",{className:"mt-3 space-y-1.5",children:w.map(j=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("button",{onClick:()=>u({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:j.friendName}),f.jsxs("p",{className:"text-xs text-ouro-shadow",children:[j.channels.join(", ")," · ",j.sessionCount," sessions",j.lastActivityAt&&f.jsxs(f.Fragment,{children:[" · ",et(j.lastActivityAt)]})]})]}),f.jsxs("div",{className:"shrink-0 text-right",children:[f.jsx("p",{className:"tabular-nums text-sm font-medium text-ouro-bone",children:j.totalTokens.toLocaleString()}),f.jsx("p",{className:"text-[10px] text-ouro-shadow",children:"tokens"})]})]},j.friendId))}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No friends."})]})]})}function Uf({label:n}){return f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function yC(n){return Kb(n)}function el(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(yC(n)))}function bC({agentName:n,view:a,refreshGeneration:s}){const r=Pi(),[u,d]=T.useState(null),[h,p]=T.useState(null),[m,g]=T.useState(!1),x=T.useRef(null),y=a.inner;T.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/habits`).then(d)},[n,s]),T.useEffect(()=>{h&&x.current!==s&&(x.current=s,_e(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(p))},[n,s,h!==null]);function S(){if(h){g(!m);return}_e(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(k=>{x.current=s,p(k),g(!0)})}const w=(u==null?void 0:u.items)??[],j=w.filter(k=>k.isOverdue),E=w.filter(k=>k.status==="active"&&!k.isOverdue),D=w.filter(k=>k.status==="paused"),R=y.mode==="deep"?y.origin:null,M=y.mode==="deep"?y.obligationStatus:null,z=w.find(k=>k.name.toLowerCase()==="heartbeat");return f.jsxs("div",{className:"space-y-8",children:[z&&f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Heartbeat"}),f.jsx("div",{className:`mt-2 rounded-xl p-4 ring-1 ${z.isOverdue?"bg-ouro-fang/5 ring-ouro-fang/15":"bg-ouro-moss/10 ring-ouro-glow/10"}`,children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${z.isOverdue?"bg-ouro-fang animate-pulse":"bg-ouro-glow"}`}),f.jsx("span",{className:"font-medium text-ouro-bone",children:z.isOverdue?"Overdue":"Healthy"}),f.jsxs("span",{className:"text-xs text-ouro-shadow",children:["every ",z.cadence??"unknown"," · last ",z.lastRun?et(z.lastRun):"never"]})]})})]}),f.jsx("section",{children:f.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Inner work"}),f.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone",children:y.status}),y.summary&&f.jsx("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:y.summary}),f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:y.hasPending?"Pending inner work queued.":"No pending inner work."}),R&&f.jsxs("div",{className:"mt-3",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Triggered from"}),f.jsxs("button",{onClick:()=>{r({tab:"sessions",focus:`${R.friendId}/${R.channel}/${R.key}`})},className:"mt-1 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:[R.friendId.slice(0,8),"…/",R.channel,"/",R.key]}),M&&f.jsxs("button",{onClick:()=>r({tab:"work"}),className:"ml-2 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",M]})]})]})}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Inner dialog ",h?`(${h.messages.length} total)`:""]}),h?f.jsx(SC,{messages:h.messages}):f.jsx("button",{onClick:S,className:"mt-2 w-full rounded-lg px-3 py-2.5 text-left font-mono text-xs text-ouro-glow ring-1 ring-ouro-moss/15 hover:ring-ouro-glow/20 transition-colors",children:"Load inner dialog"})]}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Habits (",(u==null?void 0:u.totalCount)??0,")"]}),j.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-fang mb-1.5",children:["Overdue (",j.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:j.map(k=>f.jsx(Bf,{h:k},k.name))})]}),E.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow mb-1.5",children:["Running fine (",E.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:E.map(k=>f.jsx(Bf,{h:k},k.name))})]}),D.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow mb-1.5",children:["Paused (",D.length,")"]}),f.jsx("div",{className:"space-y-1.5",children:D.map(k=>f.jsx(Bf,{h:k},k.name))})]}),w.length===0&&f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No habits configured."})]})]})}function SC({messages:n}){var S;const a=n.filter(w=>w.role!=="system"&&w.role!=="tool"),[s,r]=T.useState(!1),u=s?a:a.slice(-30),d=a.length-u.length,h=((S=u[u.length-1])==null?void 0:S.id)??null,{ref:p,onScroll:m,preserveScroll:g}=Xb(h),x=[];for(const w of a){if(w.role!=="assistant")continue;const j=(w.toolCalls??[]).map(jd);for(const E of j)E.kind==="surface"&&x.push({index:w.sequence,kind:"surfaced",label:pt(E.deliveredText??"",40)}),E.kind==="rest"&&x.push({index:w.sequence,kind:"resting",label:"resting"}),E.kind==="delegation"&&x.push({index:w.sequence,kind:"delegated",label:"continued thinking"})}function y(w){var E;const j=(E=p.current)==null?void 0:E.querySelector(`[data-msg-index="${w}"]`);j&&j.scrollIntoView({behavior:"smooth",block:"center"})}return f.jsxs("div",{children:[x.length>0&&f.jsx("div",{className:"mt-2 mb-1 flex flex-wrap gap-1",children:x.map((w,j)=>f.jsxs("button",{onClick:()=>{g(),r(!0),setTimeout(()=>y(w.index),100)},className:`rounded-md px-2 py-0.5 text-[10px] font-mono ring-1 transition-colors ${w.kind==="surfaced"?"bg-ouro-scale/10 text-ouro-glow ring-ouro-scale/20 hover:ring-ouro-glow/30":w.kind==="resting"?"bg-ouro-void/40 text-ouro-shadow ring-ouro-moss/10":"bg-ouro-gold/5 text-ouro-gold ring-ouro-gold/10"}`,children:[w.kind==="surfaced"?"★":w.kind==="resting"?"—":"→"," #",w.index]},j))}),f.jsxs("div",{ref:p,"data-testid":"inner-transcript-scroll",onScroll:m,className:"max-h-[60vh] overflow-y-auto rounded-lg bg-ouro-void/60 p-3 ring-1 ring-ouro-moss/15 space-y-1",children:[d>0&&f.jsxs("button",{onClick:()=>{g(),r(!0)},className:"w-full rounded-lg px-3 py-2 text-center font-mono text-xs text-ouro-shadow hover:text-ouro-mist ring-1 ring-ouro-moss/10 hover:ring-ouro-moss/20 transition-colors mb-2",children:["Load ",d," earlier messages"]}),u.map(w=>{const j=Ml(w);if(w.role==="user"){const E=j.includes("[pending from")||j.includes("[delegated"),D=j.includes("waking up")||j.includes("world-state checkpoint");return f.jsx("div",{"data-msg-index":w.sequence,className:"flex justify-start py-1",children:f.jsxs("div",{className:`max-w-[85%] rounded-2xl rounded-bl-sm px-3 py-2 ring-1 ${E?"bg-ouro-gold/8 ring-ouro-gold/15":D?"bg-ouro-moss/20 ring-ouro-moss/15":"bg-ouro-moss/25 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider",style:{color:E?"var(--color-ouro-gold)":"var(--color-ouro-shadow)"},children:E?"★ delegated":D?"heartbeat":"prompt"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",w.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(w)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:j})]})},w.id)}if(w.role==="assistant"){const E=(w.toolCalls??[]).map(jd),D=E.filter(z=>z.kind==="surface"),R=E.filter(z=>z.kind==="rest"),M=E.filter(z=>z.kind==="delegation");return f.jsxs("div",{"data-msg-index":w.sequence,children:[D.map(z=>f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-scale/15 px-3 py-2 ring-1 ring-ouro-scale/20",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow",children:"★ surfaced outward"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",w.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(w)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:z.deliveredText}),z.metadata&&f.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",z.metadata]})]})},z.id)),M.length>0&&f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-gold/50",children:["— still thinking — #",w.sequence," · ",el(w)]}),R.length>0&&f.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/40",children:["— resting — #",w.sequence," · ",el(w)]}),D.length===0&&R.length===0&&M.length===0&&j&&f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:"max-w-[85%] rounded-2xl rounded-br-sm bg-ouro-glow/6 px-3 py-2 ring-1 ring-ouro-glow/8",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[f.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/50",children:"thinking"}),f.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",w.sequence]}),f.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(w)})]}),f.jsx("p",{className:"text-sm leading-relaxed text-ouro-mist whitespace-pre-wrap break-words",children:j})]})})]},w.id)}return null})]})]})}function Bf({h:n}){const a=n.isOverdue,s=n.isDegraded,r=n.status;return f.jsxs("div",{className:`rounded-lg px-3 py-2.5 ring-1 ${a?"bg-ouro-fang/5 ring-ouro-fang/15":s?"bg-ouro-gold/5 ring-ouro-gold/15":r==="paused"?"bg-ouro-void/30 ring-ouro-moss/10":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:a?"red":s?"yellow":r==="active"?"lime":"zinc",children:a?"overdue":s?"degraded":r}),f.jsx("span",{className:"font-medium text-ouro-bone",children:n.title})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap gap-3 text-xs text-ouro-shadow",children:[n.cadence&&f.jsxs("span",{children:["every ",n.cadence]}),f.jsx("span",{children:n.lastRun?`last ${et(n.lastRun)}`:"never run"}),s&&n.degradedReason&&f.jsx("span",{className:"text-ouro-gold",children:n.degradedReason}),!a&&!s&&r==="active"&&n.lastRun&&f.jsx("span",{className:"text-ouro-glow",children:"on schedule"}),a&&n.overdueMs&&f.jsxs("span",{className:"text-ouro-fang",children:[Math.floor(n.overdueMs/6e4),"m overdue"]}),!n.lastRun&&r==="active"&&f.jsx("span",{className:"text-ouro-gold",children:"never fired — may be misconfigured"})]}),n.bodyExcerpt&&f.jsx("p",{className:"mt-1 text-xs text-ouro-shadow/70",children:n.bodyExcerpt})]})}function wC({agentName:n,refreshGeneration:a}){const[s,r]=T.useState(null),[u,d]=T.useState(null),[h,p]=T.useState("diary");if(T.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/notes`).then(r),_e(`/agents/${encodeURIComponent(n)}/note-decisions`).then(d).catch(()=>{})},[n,a]),!s)return f.jsxs("div",{className:"flex items-center gap-2 py-6",children:[f.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),f.jsx("span",{className:"font-mono text-xs text-ouro-shadow",children:"Loading…"})]});const m=s.recentDiaryEntries,g=s.recentJournalEntries;return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{onClick:()=>p("diary"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="diary"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Diary (",s.diaryEntryCount,")"]}),f.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),f.jsxs("button",{onClick:()=>p("journal"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="journal"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Journal (",s.journalEntryCount,")"]}),f.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),f.jsxs("button",{onClick:()=>p("decisions"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${h==="decisions"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Decisions (",(u==null?void 0:u.totalCount)??0,")"]})]}),h==="diary"&&f.jsx("div",{children:m.length>0?f.jsx("div",{className:"space-y-3",children:m.map(x=>f.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone",children:x.text}),f.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-ouro-shadow",children:[f.jsx(xe,{children:x.source}),f.jsx("span",{children:et(x.createdAt)})]})]},x.id))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No diary entries yet. The agent hasn't written anything down."})}),h==="journal"&&f.jsx("div",{children:g.length>0?f.jsx("div",{className:"space-y-3",children:g.map(x=>f.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-medium text-ouro-bone",children:x.filename}),f.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-mist",children:x.preview})]},x.filename))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No journal entries yet."})}),h==="decisions"&&f.jsx("div",{children:u&&u.items.length>0?f.jsx("div",{className:"space-y-2",children:u.items.map((x,y)=>f.jsxs("div",{className:"rounded-xl bg-ouro-void/40 px-4 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(xe,{color:x.decision==="saved"?"lime":"zinc",children:x.decision}),f.jsx(xe,{children:x.kind.replace(/_/g," ")}),f.jsx("span",{className:"text-xs text-ouro-shadow",children:et(x.timestamp)})]}),x.reason&&f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:x.reason}),x.excerpt&&f.jsx("p",{className:"mt-0.5 text-xs text-ouro-shadow italic truncate",children:x.excerpt})]},y))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No note decisions logged yet."})})]})}function TC({agentName:n,view:a,refreshGeneration:s}){var j;const[r,u]=T.useState(null),[d,h]=T.useState(null),p=a.agent,m=p.degraded,g=p.freshness,x=((j=p.providers)==null?void 0:j.lanes)??[];T.useEffect(()=>{Promise.all([_e("/machine/health").then(u).catch(()=>null),_e("/machine/logs").then(h).catch(()=>null)])},[n,s]);const y=OC(r)?r:null,S=(y==null?void 0:y.degradedComponents)??[],w=(d==null?void 0:d.entries)??[];return f.jsxs("div",{className:"space-y-8",children:[m.status==="degraded"&&m.issues.length>0&&f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-fang",children:["Agent issues (",m.issues.length,")"]}),f.jsx("div",{className:"mt-3 space-y-1.5",children:m.issues.map((E,D)=>f.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2.5 ring-1 ring-ouro-fang/15",children:[f.jsx("p",{className:"font-mono text-xs font-semibold text-ouro-fang",children:E.code}),f.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist break-all",children:E.detail})]},D))})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Agent config"}),f.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[f.jsx(Hi,{label:"Provider lanes",value:jC(x)}),f.jsx(Hi,{label:"Enabled",value:p.enabled?"yes":"no"}),f.jsx(Hi,{label:"Freshness",value:`${g.status}${g.ageMs!=null?` (${Math.floor(g.ageMs/6e4)}m)`:""}`})]})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Provider lanes"}),x.length>0?f.jsx("div",{className:"mt-3 grid gap-2 lg:grid-cols-2",children:x.map(E=>{const D=CC(E);return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("p",{className:"font-mono text-xs font-semibold uppercase tracking-wider text-ouro-bone",children:E.lane}),f.jsx(xe,{color:MC(E),children:E.status}),f.jsx(xe,{color:DC(E.readiness.status),children:E.readiness.status})]}),f.jsx("p",{className:"mt-2 text-sm font-medium text-ouro-bone",children:EC(E)}),f.jsxs("div",{className:"mt-2 space-y-1 text-xs text-ouro-mist",children:[f.jsxs("p",{children:["source: ",E.source]}),f.jsxs("p",{children:["readiness: ",NC(E.readiness)]}),E.readiness.attempts!==void 0&&f.jsxs("p",{children:["attempts: ",E.readiness.attempts]}),E.readiness.checkedAt&&f.jsxs("p",{children:["checked: ",et(E.readiness.checkedAt)]}),f.jsxs("p",{children:["credentials: ",AC(E.credential)]}),E.credential.revision&&f.jsxs("p",{children:["revision: ",E.credential.revision]}),ax(E)&&f.jsxs("p",{children:["reason: ",ax(E)]}),D&&f.jsxs("p",{className:"break-all text-ouro-fang",children:["repair: ",D]}),E.warnings.map((R,M)=>f.jsxs("p",{className:"break-words text-ouro-gold",children:["warning: ",R]},M))]})]},E.lane)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No provider lane data loaded."})]}),f.jsxs("section",{children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Daemon health"}),y?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[f.jsx(Hi,{label:"Status",value:y.status}),f.jsx(Hi,{label:"Mode",value:y.mode}),f.jsx(Hi,{label:"Uptime",value:`${Math.floor(y.uptimeSeconds/60)}m`})]}),S.length>0&&f.jsxs("div",{className:"mt-3 space-y-1.5",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Degraded components"}),S.map((E,D)=>f.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2 ring-1 ring-ouro-fang/15",children:[f.jsx("p",{className:"text-xs font-semibold text-ouro-fang",children:E.component}),f.jsx("p",{className:"text-xs text-ouro-mist",children:E.reason})]},D))]})]}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No health file found. This is normal when not running under the daemon."})]}),f.jsxs("section",{children:[f.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Recent logs (",(d==null?void 0:d.totalLines)??0," total)"]}),w.length>0?f.jsx("div",{className:"mt-3 max-h-96 overflow-y-auto rounded-lg bg-ouro-void/40 ring-1 ring-ouro-moss/15",children:[...w].reverse().slice(0,50).map((E,D)=>{const R=E.level;return f.jsxs("div",{className:"border-b border-ouro-moss/10 px-3 py-1.5 last:border-b-0",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx(xe,{color:R==="error"?"red":R==="warn"?"yellow":"zinc",children:R}),f.jsx("span",{className:"text-ouro-shadow",children:et(E.ts)}),f.jsx("span",{className:"font-mono text-ouro-glow",children:E.event})]}),f.jsx("p",{className:"truncate text-xs text-ouro-mist",children:E.message})]},D)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No log entries."})]})]})}function Hi({label:n,value:a}){return f.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),f.jsx("p",{className:"mt-1 text-sm font-medium text-ouro-bone",children:a})]})}function jC(n){return n.length===0?"none":`${n.filter(s=>s.status==="configured").length}/${n.length} configured`}function EC(n){return n.status==="unconfigured"?"unconfigured":`${n.provider} / ${n.model}`}function NC(n){return n.status==="failed"?n.error?`failed: ${n.error}`:"failed":n.status==="stale"?n.reason?`stale: ${n.reason}`:"stale":n.status==="unknown"?n.reason?`unknown: ${n.reason}`:"unknown":n.status}function AC(n){return n.status==="present"?n.source??"vault":n.status==="invalid-pool"?"vault unavailable":"missing"}function CC(n){return n.status==="unconfigured"?n.repairCommand:n.credential.repairCommand}function ax(n){return n.status==="unconfigured"?n.reason:n.readiness.reason}function MC(n){return n.status==="configured"?"green":"yellow"}function DC(n){return n==="ready"?"green":n==="failed"?"red":n==="stale"?"amber":"zinc"}function OC(n){return!!(n&&"degradedComponents"in n)}const Hf=[{id:"overview",label:"Overview"},{id:"mail",label:"Mailbox"},{id:"sessions",label:"Sessions"},{id:"work",label:"Work"},{id:"connections",label:"Connections"},{id:"inner",label:"Inner"},{id:"notes",label:"Diary & Journal"},{id:"runtime",label:"Runtime"}];function RC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function zC({agentName:n,view:a,deskPrefs:s,refreshGeneration:r,initialRoute:u}){const[d,h]=T.useState((u==null?void 0:u.tab)??"overview"),[p,m]=T.useState(u==null?void 0:u.focus),g=T.useRef(!1);T.useEffect(()=>{(u==null?void 0:u.agent)===n&&!g.current?(g.current=!0,h(u.tab),m(u.focus)):(h("overview"),m(void 0))},[n]);const x=T.useCallback(E=>{h(E.tab),m(E.focus),window.history.pushState(null,"",$f({agent:n,tab:E.tab,focus:E.focus}))},[n]),y=T.useCallback(E=>{h(E),m(void 0),window.history.pushState(null,"",$f({agent:n,tab:E,focus:void 0}))},[n]),S=T.useCallback(()=>m(void 0),[]);if(z3(x),!a||!n)return f.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[f.jsx("p",{className:"font-display text-2xl italic text-ouro-bone",children:"Choose an agent"}),f.jsx("p",{className:"mt-2 text-sm text-ouro-mist",children:"Select an agent from the sidebar to inspect its state."})]});const j=a.agent.attention;return f.jsx(rx.Provider,{value:x,children:f.jsxs("div",{children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-4 border-b border-ouro-moss/30",children:[f.jsx("div",{className:"min-w-0",children:f.jsx("h1",{className:"font-display text-2xl italic font-semibold text-ouro-bone sm:text-3xl",children:n})}),f.jsx(xe,{color:RC(j.level),children:j.label})]}),f.jsx("nav",{className:"mt-4 flex gap-0.5 overflow-x-auto border-b border-ouro-moss/20 -mx-1",children:(()=>{const E=s==null?void 0:s.tabOrder;if(!E)return Hf;const D=E.map(M=>Hf.find(z=>z.id===M)).filter(M=>M!==void 0),R=Hf.filter(M=>!E.includes(M.id));return[...D,...R]})().map(E=>f.jsx("button",{type:"button",onClick:()=>y(E.id),className:`shrink-0 px-3 py-2 text-xs font-mono uppercase tracking-wider transition-colors rounded-t-md ${d===E.id?"bg-ouro-moss/20 text-ouro-glow border-b-2 border-ouro-glow":"text-ouro-shadow hover:text-ouro-mist hover:bg-ouro-moss/10"}`,children:E.label},E.id))}),f.jsxs("div",{className:"mt-6",children:[d==="overview"&&f.jsx(H3,{view:a,deskPrefs:s,refreshGeneration:r}),d==="mail"&&f.jsx(K3,{agentName:n,focus:p,onFocusConsumed:S,refreshGeneration:r}),d==="sessions"&&f.jsx(cC,{agentName:n,focus:p,onFocusConsumed:S,deskPrefs:s,refreshGeneration:r}),d==="work"&&f.jsx(gC,{agentName:n,view:a,focus:p,onFocusConsumed:S,refreshGeneration:r}),d==="connections"&&f.jsx(xC,{agentName:n,focus:p,onFocusConsumed:S,refreshGeneration:r}),d==="inner"&&f.jsx(bC,{agentName:n,view:a,refreshGeneration:r}),d==="notes"&&f.jsx(wC,{agentName:n,refreshGeneration:r}),d==="runtime"&&f.jsx(TC,{agentName:n,view:a,refreshGeneration:r})]})]})})}function ix(){return ox(window.location.hash)}function kC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function LC(){var D,R;const[n,a]=T.useState(null),[s,r]=T.useState(((D=ix())==null?void 0:D.agent)??""),[u,d]=T.useState(null),[h,p]=T.useState(0),m=T.useRef(0),g=T.useRef(ix()),x=T.useCallback(async()=>{var M;try{const z=await _e("/machine");if(a(z),!s&&z.agents.length>0){const k=((M=g.current)==null?void 0:M.agent)??z.agents[0].agentName;r(k)}}catch{}},[s]),[y,S]=T.useState(null),w=T.useCallback(async M=>{if(!M){d(null),S(null);return}try{const[z,k]=await Promise.all([_e(`/agents/${encodeURIComponent(M)}`),_e(`/agents/${encodeURIComponent(M)}/desk-prefs`)]);d(z),S(k)}catch{d(null),S(null)}},[]);T.useEffect(()=>{x()},[x]),T.useEffect(()=>{s&&w(s)},[s,w]),T.useEffect(()=>M2(()=>{const z=++m.current;x().then(async()=>{m.current===z&&(s&&(await w(s),m.current!==z)||p(k=>k+1))})}),[x,w,s]),T.useEffect(()=>{const M=()=>{const z=ox(window.location.hash);z&&r(z.agent)};return window.addEventListener("hashchange",M),()=>window.removeEventListener("hashchange",M)},[]);const j=T.useCallback(M=>{r(M),window.history.pushState(null,"",$f({agent:M,tab:"overview",focus:void 0}))},[]);if(!n)return f.jsx("div",{className:"flex h-screen items-center justify-center bg-ouro-void",children:f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:"mx-auto mb-4 h-4 w-4 animate-pulse rounded-full bg-ouro-glow shadow-[0_0_20px_theme(--color-ouro-glow)]"}),f.jsx("p",{className:"font-mono text-sm text-ouro-mist",children:"Connecting to Outlook…"})]})});const E=n.overview.totals;return f.jsx(E3,{navbar:f.jsxs(y3,{children:[f.jsx(S3,{}),f.jsx(b3,{children:f.jsx(rh,{children:f.jsx(xe,{color:n.overview.daemon.mode==="dev"?"yellow":"lime",children:n.overview.daemon.mode})})})]}),sidebar:f.jsxs(N3,{className:"bg-ouro-deep",children:[f.jsx(A3,{className:"border-ouro-moss/30",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"h-3 w-3 shrink-0 rounded-full bg-ouro-glow shadow-[0_0_16px_theme(--color-ouro-glow)]"}),f.jsx("div",{className:"min-w-0",children:f.jsx("p",{className:"truncate font-display text-lg italic font-semibold text-ouro-bone",children:"Ouro Outlook"})})]})}),f.jsxs(C3,{className:"[&>[data-slot=section]+[data-slot=section]]:mt-4",children:[f.jsxs(W0,{children:[f.jsx(I0,{className:"text-ouro-mist/60",children:"Machine"}),f.jsx("div",{className:"grid grid-cols-3 gap-1.5 px-2",children:[{v:E.liveTasks??0,l:"Tasks",alert:(E.blockedTasks??0)>0},{v:E.openObligations??0,l:"Oblig."},{v:E.activeCodingAgents??0,l:"Coding"}].map(M=>f.jsxs("div",{className:"rounded-md bg-ouro-void/60 px-2 py-1.5 text-center ring-1 ring-ouro-moss/20",children:[f.jsx("div",{className:`text-base font-semibold tabular-nums ${M.alert?"text-ouro-fang":"text-ouro-bone"}`,children:M.v}),f.jsx("div",{className:"text-[9px] uppercase tracking-widest text-ouro-shadow",children:M.l})]},M.l))})]}),f.jsxs(W0,{children:[f.jsx(I0,{className:"text-ouro-mist/60",children:"Agents"}),n.agents.map(M=>f.jsx(D3,{current:M.agentName===s,onClick:()=>j(M.agentName),children:f.jsxs("div",{className:"flex min-w-0 flex-1 items-center justify-between gap-2",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx(O3,{className:"text-ouro-bone",children:M.agentName}),f.jsxs("p",{className:"truncate text-xs text-ouro-shadow",children:[M.tasks.liveCount,"t · ",M.obligations.openCount,"o · ",M.coding.activeCount,"c"]})]}),f.jsx(xe,{color:kC(M.attention.level),children:M.attention.label})]})},M.agentName))]})]}),f.jsx(M3,{className:"border-ouro-moss/30",children:f.jsxs("div",{className:"px-2 text-xs text-ouro-shadow",children:[f.jsx("p",{className:"font-mono",children:n.overview.runtime.version}),f.jsxs("p",{className:"mt-0.5",children:[n.overview.daemon.mode," · ",n.overview.freshness.status]})]})}),s&&u&&f.jsx("div",{className:"px-4 py-2 border-t border-ouro-moss/20",children:f.jsx("p",{className:"text-xs italic text-ouro-shadow/70",children:(()=>{const M=y==null?void 0:y.statusLine;if(M)return M;const z=u.inner;if(z.status==="running"||z.hasPending)return"thinking through something privately";const U=u.work.obligations.openCount;return U>2?"a few loose ends":U>0?"carrying something":"steady"})()})})]}),children:f.jsx(zC,{agentName:s,view:u,deskPrefs:y,refreshGeneration:h,initialRoute:((R=g.current)==null?void 0:R.agent)===s?g.current:void 0})})}C2.createRoot(document.getElementById("app")).render(f.jsx(T.StrictMode,{children:f.jsx(LC,{})}));
|