@ouro.bot/cli 0.1.0-alpha.450 → 0.1.0-alpha.452

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.
@@ -0,0 +1,61 @@
1
+ function p2(n,a){for(var s=0;s<a.length;s++){const o=a[s];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(o,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>o[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"]'))o(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"&&o(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 o(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();function g2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var uf={exports:{}},Qs={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var uv;function v2(){if(uv)return Qs;uv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(o,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:o,key:h,ref:u!==void 0?u:null,props:d}}return Qs.Fragment=a,Qs.jsx=s,Qs.jsxs=s,Qs}var cv;function y2(){return cv||(cv=1,uf.exports=v2()),uf.exports}var f=y2(),cf={exports:{}},fe={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var fv;function x2(){if(fv)return fe;fv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=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"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function T(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 M(A,G,K){this.props=A,this.context=G,this.refs=D,this.updater=K||j}M.prototype.isReactComponent={},M.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")},M.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function R(){}R.prototype=M.prototype;function V(A,G,K){this.props=A,this.context=G,this.refs=D,this.updater=K||j}var z=V.prototype=new R;z.constructor=V,E(z,M.prototype),z.isPureReactComponent=!0;var U=Array.isArray;function P(){}var F={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function oe(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 oe(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 y: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=T(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 re=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=x,fe.Children=me,fe.Component=M,fe.Fragment=s,fe.Profiler=u,fe.PureComponent=V,fe.StrictMode=o,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 oe(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 oe(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:y,_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,re)}catch(pe){re(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 dv;function Mr(){return dv||(dv=1,cf.exports=x2()),cf.exports}var w=Mr();const ce=g2(w),hv=p2({__proto__:null,default:ce},[w]);var ff={exports:{}},Ps={},df={exports:{}},hf={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var mv;function b2(){return mv||(mv=1,(function(n){function a($,Q){var J=$.length;$.push(Q);e:for(;0<J;){var re=J-1>>>1,me=$[re];if(0<u(me,Q))$[re]=Q,$[J]=me,J=re;else break e}}function s($){return $.length===0?null:$[0]}function o($){if($.length===0)return null;var Q=$[0],J=$.pop();if(J!==Q){$[0]=J;e:for(var re=0,me=$.length,A=me>>>1;re<A;){var G=2*(re+1)-1,K=$[G],I=G+1,ue=$[I];if(0>u(K,J))I<me&&0>u(ue,K)?($[re]=ue,$[I]=J,re=I):($[re]=K,$[G]=J,re=G);else if(I<me&&0>u(ue,J))$[re]=ue,$[I]=J,re=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=[],y=1,x=null,S=3,T=!1,j=!1,E=!1,D=!1,M=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function z($){for(var Q=s(g);Q!==null;){if(Q.callback===null)o(g);else if(Q.startTime<=$)o(g),Q.sortIndex=Q.expirationTime,a(m,Q);else break;Q=s(g)}}function U($){if(E=!1,z($),!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,oe=-1;function B(){return D?!0:!(n.unstable_now()-oe<W)}function Z(){if(D=!1,P){var $=n.unstable_now();oe=$;var Q=!0;try{e:{j=!1,E&&(E=!1,R(F),F=-1),T=!0;var J=S;try{t:{for(z($),x=s(m);x!==null&&!(x.expirationTime>$&&B());){var re=x.callback;if(typeof re=="function"){x.callback=null,S=x.priorityLevel;var me=re(x.expirationTime<=$);if($=n.unstable_now(),typeof me=="function"){x.callback=me,z($),Q=!0;break t}x===s(m)&&o(m),z($)}else o(m);x=s(m)}if(x!==null)Q=!0;else{var A=s(g);A!==null&&De(U,A.startTime-$),Q=!1}}break e}finally{x=null,S=J,T=!1}Q=void 0}}finally{Q?ie():P=!1}}}var ie;if(typeof V=="function")ie=function(){V(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(){M(Z,0)};function De($,Q){F=M(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 re=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?re+J:re):J=re,$){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:y++,callback:Q,priorityLevel:$,startTime:J,expirationTime:me,sortIndex:-1},J>re?($.sortIndex=J,a(g,$),s(m)===null&&$===s(g)&&(E?(R(F),F=-1):E=!0,De(U,J-re))):($.sortIndex=me,a(m,$),j||T||(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 pv;function S2(){return pv||(pv=1,df.exports=b2()),df.exports}var mf={exports:{}},ht={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var gv;function w2(){if(gv)return ht;gv=1;var n=Mr();function a(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}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 o={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,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:m,containerInfo:g,implementation:y}}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=o,ht.createPortal=function(m,g){var y=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,y)},ht.flushSync=function(m){var g=h.T,y=o.p;try{if(h.T=null,o.p=2,m)return m()}finally{h.T=g,o.p=y,o.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,o.d.C(m,g))},ht.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},ht.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var y=g.as,x=p(y,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,T=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:T}):y==="script"&&o.d.X(m,{crossOrigin:x,integrity:S,fetchPriority:T,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 y=p(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},ht.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,x=p(y,g.crossOrigin);o.d.L(m,y,{crossOrigin:x,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 y=p(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},ht.requestFormReset=function(m){o.d.r(m)},ht.unstable_batchedUpdates=function(m,g){return m(g)},ht.useFormState=function(m,g,y){return h.H.useFormState(m,g,y)},ht.useFormStatus=function(){return h.H.useHostTransitionStatus()},ht.version="19.2.4",ht}var vv;function sy(){if(vv)return mf.exports;vv=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=w2(),mf.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var yv;function T2(){if(yv)return Ps;yv=1;var n=S2(),a=Mr(),s=sy();function o(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(o(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,l=t;;){var r=i.return;if(r===null)break;var c=r.alternate;if(c===null){if(l=r.return,l!==null){i=l;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===i)return m(r),e;if(c===l)return m(r),t;c=c.sibling}throw Error(o(188))}if(i.return!==l.return)i=r,l=c;else{for(var v=!1,b=r.child;b;){if(b===i){v=!0,i=r,l=c;break}if(b===l){v=!0,l=r,i=c;break}b=b.sibling}if(!v){for(b=c.child;b;){if(b===i){v=!0,i=c,l=r;break}if(b===l){v=!0,l=c,i=r;break}b=b.sibling}if(!v)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),V=Symbol.for("react.context"),z=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"),oe=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 M:return"Profiler";case D:return"StrictMode";case U:return"Suspense";case P:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case V:return e.displayName||"Context";case R:return(e._context.displayName||"Context")+".Consumer";case z: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},re=[],me=-1;function A(e){return{current:e}}function G(e){0>me||(e.current=re[me],re[me]=null,me--)}function K(e,t){me++,re[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)?Rg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rg(t),e=zg(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=zg(t,e.type);t!==i&&(K(ue,e),K(I,i))}function Ml(e){ue.current===e&&(G(I),G(ue)),Te.current===e&&(G(Te),Xs._currentValue=J)}var Gr,rh;function wa(e){if(Gr===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Gr=t&&t[1]||"",rh=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Gr+e+rh}var Xr=!1;function Kr(e,t){if(!e||Xr)return"";Xr=!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 r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.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
+ `),L=b.split(`
45
+ `);for(r=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;r<L.length&&!L[r].includes("DetermineComponentFrameRoot");)r++;if(l===N.length||r===L.length)for(l=N.length-1,r=L.length-1;1<=l&&0<=r&&N[l]!==L[r];)r--;for(;1<=l&&0<=r;l--,r--)if(N[l]!==L[r]){if(l!==1||r!==1)do if(l--,r--,0>r||N[l]!==L[r]){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<=r);break}}}finally{Xr=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?wa(i):""}function Kb(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 Kr(e.type,!1);case 11:return Kr(e.type.render,!1);case 1:return Kr(e.type,!0);case 31:return wa("Activity");default:return""}}function uh(e){try{var t="",i=null;do t+=Kb(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var Fr=Object.prototype.hasOwnProperty,Zr=n.unstable_scheduleCallback,Qr=n.unstable_cancelCallback,Fb=n.unstable_shouldYield,Zb=n.unstable_requestPaint,Ct=n.unstable_now,Qb=n.unstable_getCurrentPriorityLevel,ch=n.unstable_ImmediatePriority,fh=n.unstable_UserBlockingPriority,Dl=n.unstable_NormalPriority,Pb=n.unstable_LowPriority,dh=n.unstable_IdlePriority,Jb=n.log,Wb=n.unstable_setDisableYieldValue,as=null,Mt=null;function Bn(e){if(typeof Jb=="function"&&Wb(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(as,e)}catch{}}var Dt=Math.clz32?Math.clz32:t1,Ib=Math.log,e1=Math.LN2;function t1(e){return e>>>=0,e===0?32:31-(Ib(e)/e1|0)|0}var Ol=256,Rl=262144,zl=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 kl(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var r=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~c,l!==0?r=Ta(l):(v&=b,v!==0?r=Ta(v):i||(i=b&~e,i!==0&&(r=Ta(i))))):(b=l&~c,b!==0?r=Ta(b):v!==0?r=Ta(v):i||(i=l&~e,i!==0&&(r=Ta(i)))),r===0?0:t!==0&&t!==r&&(t&c)===0&&(c=r&-r,i=t&-t,c>=i||c===32&&(i&4194048)!==0)?t:r}function is(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function n1(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 hh(){var e=zl;return zl<<=1,(zl&62914560)===0&&(zl=4194304),e}function Pr(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 a1(e,t,i,l,r,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&&mh(e,l,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(v&~t))}function mh(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 ph(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Dt(i),r=1<<l;r&t|e[l]&t&&(e[l]|=t),i&=~r}}function gh(e,t){var i=t&-t;return i=(i&42)!==0?1:Jr(i),(i&(e.suspendedLanes|t))!==0?0:i}function Jr(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 Wr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vh(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:nv(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,xt="__reactProps$"+Hn,ni="__reactContainer$"+Hn,Ir="__reactEvents$"+Hn,i1="__reactListeners$"+Hn,s1="__reactHandles$"+Hn,xh="__reactResources$"+Hn,ls="__reactMarker$"+Hn;function eu(e){delete e[st],delete e[xt],delete e[Ir],delete e[i1],delete e[s1]}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=Hg(e);e!==null;){if(i=e[st])return i;e=Hg(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 os(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function si(e){var t=e[xh];return t||(t=e[xh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[ls]=!0}var bh=new Set,Sh={};function ja(e,t){li(e,t),li(e+"Capture",t)}function li(e,t){for(Sh[e]=t,e=0;e<t.length;e++)bh.add(t[e])}var l1=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]*$"),wh={},Th={};function o1(e){return Fr.call(Th,e)?!0:Fr.call(wh,e)?!1:l1.test(e)?Th[e]=!0:(wh[e]=!0,!1)}function Ll(e,t,i){if(o1(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 Vl(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 jh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function r1(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 r=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.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=jh(e)?"checked":"value";e._valueTracker=r1(e,t,""+e[t])}}function Eh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=jh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function _l(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 u1=/[\n"\\]/g;function Ht(e){return e.replace(u1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nu(e,t,i,l,r,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"),r==null&&c!=null&&(e.defaultChecked=!!c),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Bt(b):e.removeAttribute("name")}function Nh(e,t,i,l,r,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??r,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"&&_l(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function oi(e,t,i,l){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Bt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Ah(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 Ch(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(o(92));if(De(l)){if(1<l.length)throw Error(o(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 ri(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var c1=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 Mh(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||c1.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Dh(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(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 r in t)l=t[r],t.hasOwnProperty(r)&&i[r]!==l&&Mh(e,r,l)}else for(var c in t)t.hasOwnProperty(c)&&Mh(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 f1=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"]]),d1=/^[\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 Ul(e){return d1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yn(){}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 Oh(e){var t=ii(e);if(t&&(e=t.stateNode)){var i=e[xt]||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 r=l[xt]||null;if(!r)throw Error(o(90));nu(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&Eh(l)}break e;case"textarea":Ah(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&oi(e,!!i.multiple,t,!1)}}}var ou=!1;function Rh(e,t,i){if(ou)return e(t,i);ou=!0;try{var l=e(t);return l}finally{if(ou=!1,(ui!==null||ci!==null)&&(No(),ui&&(t=ui,e=ci,ci=ui=null,Oh(t),e)))for(t=0;t<e.length;t++)Oh(e[t])}}function rs(e,t){var i=e.stateNode;if(i===null)return null;var l=i[xt]||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(o(231,t,typeof i));return i}var xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ru=!1;if(xn)try{var us={};Object.defineProperty(us,"passive",{get:function(){ru=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{ru=!1}var $n=null,uu=null,Bl=null;function zh(){if(Bl)return Bl;var e,t=uu,i=t.length,l,r="value"in $n?$n.value:$n.textContent,c=r.length;for(e=0;e<i&&t[e]===r[e];e++);var v=i-e;for(l=1;l<=v&&t[i-l]===r[c-l];l++);return Bl=r.slice(e,1<l?1-l:void 0)}function Hl(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 $l(){return!0}function kh(){return!1}function bt(e){function t(i,l,r,c,v){this._reactName=i,this._targetInst=r,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)?$l:kh,this.isPropagationStopped=kh,this}return x(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=$l)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=$l)},persist:function(){},isPersistent:$l}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ql=bt(Ea),cs=x({},Ea,{view:0,detail:0}),h1=bt(cs),cu,fu,fs,Yl=x({},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}}),Lh=bt(Yl),m1=x({},Yl,{dataTransfer:0}),p1=bt(m1),g1=x({},cs,{relatedTarget:0}),du=bt(g1),v1=x({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),y1=bt(v1),x1=x({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),b1=bt(x1),S1=x({},Ea,{data:0}),Vh=bt(S1),w1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T1={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"},j1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=j1[e])?!!t[e]:!1}function hu(){return E1}var N1=x({},cs,{key:function(e){if(e.key){var t=w1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?T1[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"?Hl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),A1=bt(N1),C1=x({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_h=bt(C1),M1=x({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),D1=bt(M1),O1=x({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),R1=bt(O1),z1=x({},Yl,{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}),k1=bt(z1),L1=x({},Ea,{newState:0,oldState:0}),V1=bt(L1),_1=[9,13,27,32],mu=xn&&"CompositionEvent"in window,ds=null;xn&&"documentMode"in document&&(ds=document.documentMode);var U1=xn&&"TextEvent"in window&&!ds,Uh=xn&&(!mu||ds&&8<ds&&11>=ds),Bh=" ",Hh=!1;function $h(e,t){switch(e){case"keyup":return _1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function B1(e,t){switch(e){case"compositionend":return qh(t);case"keypress":return t.which!==32?null:(Hh=!0,Bh);case"textInput":return e=t.data,e===Bh&&Hh?null:e;default:return null}}function H1(e,t){if(fi)return e==="compositionend"||!mu&&$h(e,t)?(e=zh(),Bl=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 Uh&&t.locale!=="ko"?null:t.data;default:return null}}var $1={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 Yh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$1[e.type]:t==="textarea"}function Gh(e,t,i,l){ui?ci?ci.push(l):ci=[l]:ui=l,t=zo(t,"onChange"),0<t.length&&(i=new ql("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var hs=null,ms=null;function q1(e){Ng(e,0)}function Gl(e){var t=os(e);if(Eh(t))return e}function Xh(e,t){if(e==="change")return t}var Kh=!1;if(xn){var pu;if(xn){var gu="oninput"in document;if(!gu){var Fh=document.createElement("div");Fh.setAttribute("oninput","return;"),gu=typeof Fh.oninput=="function"}pu=gu}else pu=!1;Kh=pu&&(!document.documentMode||9<document.documentMode)}function Zh(){hs&&(hs.detachEvent("onpropertychange",Qh),ms=hs=null)}function Qh(e){if(e.propertyName==="value"&&Gl(ms)){var t=[];Gh(t,ms,e,lu(e)),Rh(q1,t)}}function Y1(e,t,i){e==="focusin"?(Zh(),hs=t,ms=i,hs.attachEvent("onpropertychange",Qh)):e==="focusout"&&Zh()}function G1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gl(ms)}function X1(e,t){if(e==="click")return Gl(t)}function K1(e,t){if(e==="input"||e==="change")return Gl(t)}function F1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:F1;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 r=i[l];if(!Fr.call(t,r)||!Ot(e[r],t[r]))return!1}return!0}function Ph(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jh(e,t){var i=Ph(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=Ph(i)}}function Wh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ih(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_l(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=_l(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 Z1=xn&&"documentMode"in document&&11>=document.documentMode,di=null,yu=null,gs=null,xu=!1;function em(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;xu||di==null||di!==_l(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=zo(yu,"onSelect"),0<l.length&&(t=new ql("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={},tm={};xn&&(tm=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 tm)return bu[e]=t[i];return e}var nm=Aa("animationend"),am=Aa("animationiteration"),im=Aa("animationstart"),Q1=Aa("transitionrun"),P1=Aa("transitionstart"),J1=Aa("transitioncancel"),sm=Aa("transitionend"),lm=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){lm.set(e,t),ja(t,[e])}var Xl=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 Kl(){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 r=$t[t];$t[t++]=null;var c=$t[t];if($t[t++]=null,l!==null&&r!==null){var v=l.pending;v===null?r.next=r:(r.next=v.next,v.next=r),l.pending=r}c!==0&&om(i,r,c)}}function Fl(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 Fl(e,t,i,l),Zl(e)}function Ca(e,t){return Fl(e,null,null,t),Zl(e)}function om(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var r=!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||(r=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,r&&t!==null&&(r=31-Dt(i),e=c.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=i|536870912),c):null}function Zl(e){if(50<Us)throw Us=0,Rc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function W1(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 W1(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 rm(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 Ql(e,t,i,l,r,c){var v=0;if(l=e,typeof e=="function")ju(e)&&(v=1);else if(typeof e=="string")v=a2(e,i,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case oe:return e=Rt(31,i,t,r),e.elementType=oe,e.lanes=c,e;case E:return Ma(i.children,r,c,t);case D:v=8,r|=24;break;case M:return e=Rt(12,i,t,r|2),e.elementType=M,e.lanes=c,e;case U:return e=Rt(13,i,t,r),e.elementType=U,e.lanes=c,e;case P:return e=Rt(19,i,t,r),e.elementType=P,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:v=10;break e;case R: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(o(130,e===null?"null":typeof e,"")),l=null}return t=Rt(v,i,t,r),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 um(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 cm=new WeakMap;function qt(e,t){if(typeof e=="object"&&e!==null){var i=cm.get(e);return i!==void 0?i:(t={value:e,source:t,stack:uh(t)},cm.set(e,t),t)}return{value:e,source:t,stack:uh(t)}}var gi=[],vi=0,Pl=null,vs=0,Yt=[],Gt=0,qn=null,ln=1,on="";function Sn(e,t){gi[vi++]=vs,gi[vi++]=Pl,Pl=e,vs=t}function fm(e,t,i){Yt[Gt++]=ln,Yt[Gt++]=on,Yt[Gt++]=qn,qn=e;var l=ln;e=on;var r=32-Dt(l)-1;l&=~(1<<r),i+=1;var c=32-Dt(t)+r;if(30<c){var v=r-r%5;c=(l&(1<<v)-1).toString(32),l>>=v,r-=v,ln=1<<32-Dt(t)+r|i<<r|l,on=c+e}else ln=1<<c|i<<r|l,on=e}function Au(e){e.return!==null&&(Sn(e,1),fm(e,1,0))}function Cu(e){for(;e===Pl;)Pl=gi[--vi],gi[vi]=null,vs=gi[--vi],gi[vi]=null;for(;e===qn;)qn=Yt[--Gt],Yt[Gt]=null,on=Yt[--Gt],Yt[Gt]=null,ln=Yt[--Gt],Yt[Gt]=null}function dm(e,t){Yt[Gt++]=ln,Yt[Gt++]=on,Yt[Gt++]=qn,ln=t.id,on=t.overflow,qn=e}var lt=null,Ue=null,we=!1,Yn=null,Xt=!1,Mu=Error(o(519));function Gn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ys(qt(t,e)),Mu}function hm(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[st]=e,t[xt]=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),Nh(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),Ch(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||Dg(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=yn),t=!0):t=!1,t||Gn(e,!0)}function mm(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 yi(e){if(e!==lt)return!1;if(!we)return mm(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),mm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ue=Bg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ue=Bg(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 ys(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 r=e.child;for(r!==null&&(r.return=e);r!==null;){var c=r.dependencies;if(c!==null){var v=r.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=r;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(r.tag===18){if(v=r.return,v===null)throw Error(o(341));v.lanes|=i,c=v.alternate,c!==null&&(c.lanes|=i),Ru(v,i,e),v=null}else v=r.child;if(v!==null)v.return=r;else for(v=r;v!==null;){if(v===e){v=null;break}if(r=v.sibling,r!==null){r.return=v.return,v=r;break}v=v.return}r=v}}function xi(e,t,i,l){e=null;for(var r=t,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var v=r.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var b=r.type;Ot(r.pendingProps.value,v.value)||(e!==null?e.push(b):e=[b])}}else if(r===Te.current){if(v=r.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Xs):e=[Xs])}r=r.return}e!==null&&zu(t,e,i,l),t.flags|=262144}function Jl(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 ot(e){return pm(Oa,e)}function Wl(e,t){return Oa===null&&Ra(e),pm(e,t)}function pm(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},wn===null){if(e===null)throw Error(o(308));wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wn=wn.next=t;return i}var I1=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()})}},eS=n.unstable_scheduleCallback,tS=n.unstable_NormalPriority,Qe={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ku(){return{controller:new I1,data:new Map,refCount:0}}function xs(e){e.refCount--,e.refCount===0&&eS(tS,function(){e.controller.abort()})}var bs=null,Lu=0,bi=0,Si=null;function nS(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(gm,gm),t}function gm(){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 aS(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),l}var vm=$.S;$.S=function(e,t){eg=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&nS(e,t),vm!==null&&vm(e,t)};var za=A(null);function Vu(){var e=za.current;return e!==null?e:Ve.pooledCache}function Il(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(o(460)),_u=Error(o(474)),eo=Error(o(542)),to={then:function(){}};function xm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bm(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(yn,yn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wm(e),e;default:if(typeof t.status=="string")t.then(yn,yn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wm(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 Sm(){if(La===null)throw Error(o(459));var e=La;return La=null,e}function wm(e){if(e===wi||e===eo)throw Error(o(483))}var Ti=null,Ss=0;function no(e){var t=Ss;return Ss+=1,Ti===null&&(Ti=[]),bm(Ti,e,t)}function ws(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ao(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Tm(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 r(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=r(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=r(C,k.props),ws(C,k),C.return=O,C):(C=Ql(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=r(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=r(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=Ql(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,no(C),k);if(C.$$typeof===V)return X(O,Wl(O,C),k);ao(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,no(k),Y);if(k.$$typeof===V)return _(O,C,Wl(O,k),Y);ao(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,no(Y),ae);if(Y.$$typeof===V)return H(O,C,k,Wl(C,Y),ae);ao(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(o(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(m2){return t(O,m2)}),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=r(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=r(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=Ql(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=r(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(o(150));return k=ae.call(k),se(O,C,k,Y)}if(typeof k.then=="function")return ze(O,C,no(k),Y);if(k.$$typeof===V)return ze(O,C,Wl(O,k),Y);ao(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=r(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===eo)throw ne;var je=Rt(29,ne,null,O.mode);return je.lanes=Y,je.return=O,je}finally{}}}var Va=Tm(!0),jm=Tm(!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 r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=Zl(e),om(e,null,i),t}return Fl(e,l,t,i),Zl(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,ph(e,i)}}function Hu(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var r=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?r=c=v:c=c.next=v,i=i.next}while(i!==null);c===null?r=c=t:c=c.next=t}else r=c=t;i={baseState:l.baseState,firstBaseUpdate:r,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 r=e.updateQueue;Kn=!1;var c=r.firstBaseUpdate,v=r.lastBaseUpdate,b=r.shared.pending;if(b!==null){r.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=r.baseState;v=0,q=L=N=null,b=c;do{var _=b.lane&-536870913,H=_!==b.lane;if(H?(xe&_)===_:(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=x({},X,_);break e;case 2:Kn=!0}}_=b.callback,_!==null&&(e.flags|=64,H&&(e.flags|=8192),H=r.callbacks,H===null?r.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=r.shared.pending,b===null)break;H=b,b=H.next,H.next=null,r.lastBaseUpdate=H,r.shared.pending=null}}while(!0);q===null&&(N=X),r.baseState=N,r.firstBaseUpdate=L,r.lastBaseUpdate=q,c===null&&(r.shared.lanes=0),In|=v,e.lanes=v,e.memoizedState=X}}function Em(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Nm(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Em(i[e],t)}var ji=A(null),io=A(0);function Am(e,t){e=Rn,K(io,e),K(ji,t),Rn=e|t.baseLanes}function qu(){K(io,Rn),K(ji,ji.current)}function Yu(){Rn=io.current,G(ji),G(io)}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 Cm(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 so(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,lo=!1,Ei=!1,_a=!1,oo=0,Ns=0,Ni=null,iS=0;function qe(){throw Error(o(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,r,c){return jn=c,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?fp:oc,_a=!1,c=i(l,r),_a=!1,Ei&&(c=Dm(t,i,l,r)),Mm(e),c}function Mm(e){$.H=Ms;var t=Oe!==null&&Oe.next!==null;if(jn=0,Pe=Oe=de=null,lo=!1,Ns=0,Ni=null,t)throw Error(o(300));e===null||Je||(e=e.dependencies,e!==null&&Jl(e)&&(Je=!0))}function Dm(e,t,i,l){de=e;var r=0;do{if(Ei&&(Ni=null),Ns=0,Ei=!1,25<=r)throw Error(o(301));if(r+=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=dp,c=t(i,l)}while(Ei);return c}function sS(){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=oo!==0;return oo=0,e}function Zu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Qu(e){if(lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lo=!1}jn=0,Pe=Oe=de=null,Ei=!1,Ns=oo=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(o(467)):Error(o(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 ro(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function As(e){var t=Ns;return Ns+=1,Ni===null&&(Ni=[]),e=bm(Ni,e,t),t=de,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?fp:oc),e}function uo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return As(e);if(e.$$typeof===V)return ot(e)}throw Error(o(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(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ro(),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 co(e){var t=Ke();return Ju(t,Oe,e)}function Ju(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var r=e.baseQueue,c=l.pending;if(c!==null){if(r!==null){var v=r.next;r.next=c.next,c.next=v}t.baseQueue=r=c,l.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var b=v=null,N=null,L=t,q=!1;do{var X=L.lane&-536870913;if(X!==L.lane?(xe&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 r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Wu(e){var t=Ke(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,r=i.pending,c=t.memoizedState;if(r!==null){i.pending=null;var v=r=r.next;do c=e(c,v.action),v=v.next;while(v!==r);Ot(c,t.memoizedState)||(Je=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),i.lastRenderedState=c}return[c,l]}function Om(e,t,i){var l=de,r=Ke(),c=we;if(c){if(i===void 0)throw Error(o(407));i=i()}else i=t();var v=!Ot((Oe||r).memoizedState,i);if(v&&(r.memoizedState=i,Je=!0),r=r.queue,tc(km.bind(null,l,r,e),[e]),r.getSnapshot!==t||v||Pe!==null&&Pe.memoizedState.tag&1){if(l.flags|=2048,Ai(9,{destroy:void 0},zm.bind(null,l,r,i,t),null),Ve===null)throw Error(o(349));c||(jn&127)!==0||Rm(l,t,i)}return i}function Rm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=de.updateQueue,t===null?(t=ro(),de.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function zm(e,t,i,l){t.value=i,t.getSnapshot=l,Lm(t)&&Vm(e)}function km(e,t,i){return i(function(){Lm(t)&&Vm(e)})}function Lm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function Vm(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 _m(e,t,i,l){return e.baseState=i,Ju(e,Oe,typeof l=="function"?l:En)}function lS(e,t,i,l,r){if(mo(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:r,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,Um(t,c)):(c.next=i.next,t.pending=i.next=c)}}function Um(e,t){var i=t.action,l=t.payload,r=e.state;if(t.isTransition){var c=$.T,v={};$.T=v;try{var b=i(r,l),N=$.S;N!==null&&N(v,b),Bm(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(r,l),Bm(e,t,c)}catch(L){ec(e,t,L)}}function Bm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Hm(e,t,l)},function(l){return ec(e,t,l)}):Hm(e,t,i)}function Hm(e,t,i){t.status="fulfilled",t.value=i,$m(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Um(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,$m(t),t=t.next;while(t!==l)}e.action=null}function $m(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qm(e,t){return t}function Ym(e,t){if(we){var i=Ve.formState;if(i!==null){e:{var l=de;if(we){if(Ue){t:{for(var r=Ue,c=Xt;r.nodeType!==8;){if(!c){r=null;break t}if(r=Ft(r.nextSibling),r===null){r=null;break t}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){Ue=Ft(r.nextSibling),l=r.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:qm,lastRenderedState:t},i.queue=l,i=rp.bind(null,de,l),l.dispatch=i,l=Iu(!1),c=lc.bind(null,de,!1,l.queue),l=mt(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,i=lS.bind(null,de,r,c,i),r.dispatch=i,l.memoizedState=e,[t,i,!1]}function Gm(e){var t=Ke();return Xm(t,Oe,e)}function Xm(e,t,i){if(t=Ju(e,t,qm)[0],e=co(En)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=As(t)}catch(v){throw v===wi?eo:v}else l=t;t=Ke();var r=t.queue,c=r.dispatch;return i!==t.memoizedState&&(de.flags|=2048,Ai(9,{destroy:void 0},oS.bind(null,r,i),null)),[l,c,e]}function oS(e,t){e.action=t}function Km(e){var t=Ke(),i=Oe;if(i!==null)return Xm(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=ro(),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 Fm(){return Ke().memoizedState}function fo(e,t,i,l){var r=mt();de.flags|=e,r.memoizedState=Ai(1|t,{destroy:void 0},i,l===void 0?null:l)}function ho(e,t,i,l){var r=Ke();l=l===void 0?null:l;var c=r.memoizedState.inst;Oe!==null&&l!==null&&Xu(l,Oe.memoizedState.deps)?r.memoizedState=Ai(t,c,i,l):(de.flags|=e,r.memoizedState=Ai(1|t,c,i,l))}function Zm(e,t){fo(8390656,8,e,t)}function tc(e,t){ho(2048,8,e,t)}function rS(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=ro(),de.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Qm(e){var t=Ke().memoizedState;return rS({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Pm(e,t){return ho(4,2,e,t)}function Jm(e,t){return ho(4,4,e,t)}function Wm(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 Im(e,t,i){i=i!=null?i.concat([e]):null,ho(4,4,Wm.bind(null,t,e),i)}function nc(){}function ep(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 tp(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&&(xe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=ng(),de.lanes|=e,In|=e,i)}function np(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&&(xe&261930)===0?(Je=!0,e.memoizedState=i):(e=ng(),de.lanes|=e,In|=e,t)}function ap(e,t,i,l,r){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=r(),L=$.S;if(L!==null&&L(b,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var q=aS(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 uS(){}function ic(e,t,i,l){if(e.tag!==5)throw Error(o(476));var r=ip(e).queue;ap(e,r,t,J,i===null?uS:function(){return sp(e),i(l)})}function ip(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 sp(e){var t=ip(e);t.next===null&&(t=e.alternate.memoizedState),Cs(e,t.next.queue,{},_t())}function sc(){return ot(Xs)}function lp(){return Ke().memoizedState}function op(){return Ke().memoizedState}function cS(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 fS(e,t,i){var l=_t();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},mo(e)?up(t,i):(i=Tu(e,t,i,l),i!==null&&(Et(i,e,l),cp(i,t,l)))}function rp(e,t,i){var l=_t();Cs(e,t,i,l)}function Cs(e,t,i,l){var r={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(mo(e))up(t,r);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(r.hasEagerState=!0,r.eagerState=b,Ot(b,v))return Fl(e,t,r,0),Ve===null&&Kl(),!1}catch{}finally{}if(i=Tu(e,t,r,l),i!==null)return Et(i,e,l),cp(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},mo(e)){if(t)throw Error(o(479))}else t=Tu(e,i,l,2),t!==null&&Et(t,e,2)}function mo(e){var t=e.alternate;return e===de||t!==null&&t===de}function up(e,t){Ei=lo=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function cp(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,ph(e,i)}}var Ms={readContext:ot,use:uo,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 fp={readContext:ot,use:uo,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:Zm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,fo(4194308,4,Wm.bind(null,t,e),i)},useLayoutEffect:function(e,t){return fo(4194308,4,e,t)},useInsertionEffect:function(e,t){fo(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 r=i(t);if(_a){Bn(!0);try{i(t)}finally{Bn(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=fS.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=rp.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=ap.bind(null,de,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=de,r=mt();if(we){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),Ve===null)throw Error(o(349));(xe&127)!==0||Rm(l,t,i)}r.memoizedState=i;var c={value:i,getSnapshot:t};return r.queue=c,Zm(km.bind(null,l,c,e),[e]),l.flags|=2048,Ai(9,{destroy:void 0},zm.bind(null,l,c,i,t),null),i},useId:function(){var e=mt(),t=Ve.identifierPrefix;if(we){var i=on,l=ln;i=(l&~(1<<32-Dt(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=oo++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=iS++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:sc,useFormState:Ym,useActionState:Ym,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=cS.bind(null,de)},useEffectEvent:function(e){var t=mt(),i={impl:e};return t.memoizedState=i,function(){if((Ne&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},oc={readContext:ot,use:uo,useCallback:ep,useContext:ot,useEffect:tc,useImperativeHandle:Im,useInsertionEffect:Pm,useLayoutEffect:Jm,useMemo:tp,useReducer:co,useRef:Fm,useState:function(){return co(En)},useDebugValue:nc,useDeferredValue:function(e,t){var i=Ke();return np(i,Oe.memoizedState,e,t)},useTransition:function(){var e=co(En)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:Om,useId:lp,useHostTransitionStatus:sc,useFormState:Gm,useActionState:Gm,useOptimistic:function(e,t){var i=Ke();return _m(i,Oe,e,t)},useMemoCache:Pu,useCacheRefresh:op};oc.useEffectEvent=Qm;var dp={readContext:ot,use:uo,useCallback:ep,useContext:ot,useEffect:tc,useImperativeHandle:Im,useInsertionEffect:Pm,useLayoutEffect:Jm,useMemo:tp,useReducer:Wu,useRef:Fm,useState:function(){return Wu(En)},useDebugValue:nc,useDeferredValue:function(e,t){var i=Ke();return Oe===null?ac(i,e,t):np(i,Oe.memoizedState,e,t)},useTransition:function(){var e=Wu(En)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:Om,useId:lp,useHostTransitionStatus:sc,useFormState:Km,useActionState:Km,useOptimistic:function(e,t){var i=Ke();return Oe!==null?_m(i,Oe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:op};dp.useEffectEvent=Qm;function rc(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:x({},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(),r=Fn(l);r.payload=t,i!=null&&(r.callback=i),t=Zn(e,r,l),t!==null&&(Et(t,e,l),Ts(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=_t(),r=Fn(l);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Zn(e,r,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 hp(e,t,i,l,r,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,v):t.prototype&&t.prototype.isPureReactComponent?!ps(i,l)||!ps(r,c):!0}function mp(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=x({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function pp(e){Xl(e)}function gp(e){console.error(e)}function vp(e){Xl(e)}function po(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(r){setTimeout(function(){throw r})}}function cc(e,t,i){return i=Fn(i),i.tag=3,i.payload={element:null},i.callback=function(){po(e,t)},i}function xp(e){return e=Fn(e),e.tag=3,e}function bp(e,t,i,l){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var c=l.value;e.payload=function(){return r(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 r!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function dS(e,t,i,l,r){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&xi(t,i,r,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?Ao():i.alternate===null&&Ye===0&&(Ye=3),i.flags&=-257,i.flags|=65536,i.lanes=r,l===to?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Lc(e,l,r)),!1;case 22:return i.flags|=65536,l===to?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,r)),!1}throw Error(o(435,i.tag))}return Lc(e,l,r),Ao(),!1}if(we)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==Mu&&(e=Error(o(422),{cause:l}),ys(qt(e,i)))):(l!==Mu&&(t=Error(o(423),{cause:l}),ys(qt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=qt(l,i),r=cc(e.stateNode,l,r),Hu(e,r),Ye!==4&&(Ye=2)),!1;var c=Error(o(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=r&-r,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,r&=-r,i.lanes|=r,r=xp(r),bp(r,e,i,l),Hu(i,r),!1}i=i.return}while(i!==null);return!1}var fc=Error(o(461)),Je=!1;function rt(e,t,i,l){t.child=e===null?jm(t,null,i,l):Va(t,e.child,i,l)}function Sp(e,t,i,l,r){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,r),b=Fu(),e!==null&&!Je?(Zu(e,t,r),Nn(e,t,r)):(we&&b&&Au(t),t.flags|=1,rt(e,t,l,r),t.child)}function wp(e,t,i,l,r){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,Tp(e,t,c,l,r)):(e=Ql(i.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!xc(e,r)){var v=c.memoizedProps;if(i=i.compare,i=i!==null?i:ps,i(v,l)&&e.ref===t.ref)return Nn(e,t,r)}return t.flags|=1,e=bn(c,l),e.ref=t.ref,e.return=t,t.child=e}function Tp(e,t,i,l,r){if(e!==null){var c=e.memoizedProps;if(ps(c,l)&&e.ref===t.ref)if(Je=!1,t.pendingProps=l=c,xc(e,r))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,Nn(e,t,r)}return dc(e,t,i,l,r)}function jp(e,t,i,l){var r=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,r=0;l!==null;)r=r|l.lanes|l.childLanes,l=l.sibling;l=r&~c}else l=0,t.child=null;return Ep(e,t,c,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Il(t,c!==null?c.cachePool:null),c!==null?Am(t,c):qu(),Cm(t);else return l=t.lanes=536870912,Ep(e,t,c!==null?c.baseLanes|i:i,i,l)}else c!==null?(Il(t,c.cachePool),Am(t,c),Pn(),t.memoizedState=null):(e!==null&&Il(t,null),qu(),Pn());return rt(e,t,r,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 Ep(e,t,i,l,r){var c=Vu();return c=c===null?null:{parent:Qe._currentValue,pool:c},t.memoizedState={baseLanes:i,cachePool:c},e!==null&&Il(t,null),qu(),Cm(t),e!==null&&xi(e,t,l,!0),t.childLanes=r,null}function go(e,t){return t=yo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Np(e,t,i){return Va(t,e.child,null,i),e=go(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function hS(e,t,i){var l=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(l.mode==="hidden")return e=go(t,l),t.lanes=536870912,Ds(null,e);if(Gu(t),(e=Ue)?(e=Ug(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:ln,overflow:on}:null,retryLane:536870912,hydrationErrors:null},i=um(e),i.return=t,t.child=i,lt=t,Ue=null)):e=null,e===null)throw Gn(t);return t.lanes=536870912,null}return go(t,l)}var c=e.memoizedState;if(c!==null){var v=c.dehydrated;if(Gu(t),r)if(t.flags&256)t.flags&=-257,t=Np(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Je||xi(e,t,i,!1),r=(i&e.childLanes)!==0,Je||r){if(l=Ve,l!==null&&(v=gh(l,i),v!==0&&v!==c.retryLane))throw c.retryLane=v,Ca(e,v),Et(l,e,v),fc;Ao(),t=Np(e,t,i)}else e=c.treeContext,Ue=Ft(v.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&dm(t,e),t=go(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 vo(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(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function dc(e,t,i,l,r){return Ra(t),i=Ku(e,t,i,l,void 0,r),l=Fu(),e!==null&&!Je?(Zu(e,t,r),Nn(e,t,r)):(we&&l&&Au(t),t.flags|=1,rt(e,t,i,r),t.child)}function Ap(e,t,i,l,r,c){return Ra(t),t.updateQueue=null,i=Dm(t,l,i,r),Mm(e),l=Fu(),e!==null&&!Je?(Zu(e,t,c),Nn(e,t,c)):(we&&l&&Au(t),t.flags|=1,rt(e,t,i,c),t.child)}function Cp(e,t,i,l,r){if(Ra(t),t.stateNode===null){var c=pi,v=i.contextType;typeof v=="object"&&v!==null&&(c=ot(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?ot(v):pi,c.state=t.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(rc(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,r),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=ot(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)&&mp(t,c,l,v),Kn=!1;var _=t.memoizedState;c.state=_,Es(t,l,c,r),js(),L=t.memoizedState,b||_!==L||Kn?(typeof X=="function"&&(rc(t,i,X,l),L=t.memoizedState),(N=Kn||hp(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=ot(L)),b=i.getDerivedStateFromProps,(L=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==X||_!==N)&&mp(t,c,l,N),Kn=!1,_=t.memoizedState,c.state=_,Es(t,l,c,r),js();var H=t.memoizedState;v!==X||_!==H||Kn||e!==null&&e.dependencies!==null&&Jl(e.dependencies)?(typeof b=="function"&&(rc(t,i,b,l),H=t.memoizedState),(q=Kn||hp(t,i,q,l,_,H,N)||e!==null&&e.dependencies!==null&&Jl(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,vo(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,r),t.child=Va(t,null,i,r)):rt(e,t,i,r),t.memoizedState=c.state,e=t.child):e=Nn(e,t,r),e}function Mp(e,t,i,l){return Da(),t.flags|=256,rt(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 Dp(e,t,i){var l=t.pendingProps,r=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),v&&(r=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(we){if(r?Qn(t):Pn(),(e=Ue)?(e=Ug(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qn!==null?{id:ln,overflow:on}:null,retryLane:536870912,hydrationErrors:null},i=um(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,r?(Pn(),r=t.mode,b=yo({mode:"hidden",children:b},r),l=Ma(l,r,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,r=t.mode,l=yo({mode:"visible",children:l.children},r),b=Ma(b,r,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(o(419)),l.stack="",l.digest=v,ys({value:l,source:null,stack:null}),t=vc(e,t,i)}else if(Je||xi(e,t,i,!1),v=(i&e.childLanes)!==0,Je||v){if(v=Ve,v!==null&&(l=gh(v,i),l!==0&&l!==N.retryLane))throw N.retryLane=l,Ca(e,l),Et(v,e,l),fc;Pc(b)||Ao(),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&&dm(t,e),t=gc(t,l.children),t.flags|=4096);return t}return r?(Pn(),b=l.fallback,r=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,r,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):(r=b.cachePool,r!==null?(N=Qe._currentValue,r=r.parent!==N?{parent:N,pool:N}:r):r=ym(),b={baseLanes:b.baseLanes|i,cachePool:r}),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=yo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function yo(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 Op(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ru(e.return,t,i)}function yc(e,t,i,l,r,c){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:r,treeForkCount:c}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=r,v.treeForkCount=c)}function Rp(e,t,i){var l=t.pendingProps,r=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),rt(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&&Op(e,i,t);else if(e.tag===19)Op(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(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&so(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),yc(t,!1,r,i,c,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&so(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}yc(t,!0,i,null,c,l);break;case"together":yc(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(xi(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(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 xc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Jl(e)))}function mS(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?Dp(e,t,i):(Qn(t),e=Nn(e,t,i),e!==null?e.sibling:null);Qn(t);break;case 19:var r=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(xi(e,t,i,!1),l=(i&t.childLanes)!==0),r){if(l)return Rp(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),K(Xe,Xe.current),l)break;return null;case 22:return t.lanes=0,jp(e,t,i,t.pendingProps);case 24:Xn(t,Qe,e.memoizedState.cache)}return Nn(e,t,i)}function zp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!xc(e,i)&&(t.flags&128)===0)return Je=!1,mS(e,t,i);Je=(e.flags&131072)!==0}else Je=!1,we&&(t.flags&1048576)!==0&&fm(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=Cp(null,t,e,l,i)):(t.tag=0,t=dc(null,t,e,l,i));else{if(e!=null){var r=e.$$typeof;if(r===z){t.tag=11,t=Sp(null,t,e,l,i);break e}else if(r===F){t.tag=14,t=wp(null,t,e,l,i);break e}}throw t=Se(e)||e,Error(o(306,t,""))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,r=Ua(l,t.pendingProps),Cp(e,t,l,r,i);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var c=t.memoizedState;r=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=Mp(e,t,l,i);break e}else if(l!==r){r=qt(Error(o(424)),t),ys(r),t=Mp(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=jm(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Da(),l===r){t=Nn(e,t,i);break e}rt(e,t,l,i)}t=t.child}return t;case 26:return vo(e,t),e===null?(i=Gg(t.type,null,t.pendingProps,null))?t.memoizedState=i:we||(i=t.type,e=t.pendingProps,l=ko(pe.current).createElement(i),l[st]=t,l[xt]=e,ut(l,i,e),at(l),t.stateNode=l):t.memoizedState=Gg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ns(t),e===null&&we&&(l=t.stateNode=$g(t.type,t.pendingProps,pe.current),lt=t,Xt=!0,r=Ue,ia(t.type)?(Wc=r,Ue=Ft(l.firstChild)):Ue=r),rt(e,t,t.pendingProps.children,i),vo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((r=l=Ue)&&(l=GS(l,t.type,t.pendingProps,Xt),l!==null?(t.stateNode=l,lt=t,Ue=Ft(l.firstChild),Xt=!1,r=!0):r=!1),r||Gn(t)),ns(t),r=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,l=c.children,Fc(r,c)?l=null:v!==null&&Fc(r,v)&&(t.flags|=32),t.memoizedState!==null&&(r=Ku(e,t,sS,null,null,i),Xs._currentValue=r),vo(e,t),rt(e,t,l,i),t.child;case 6:return e===null&&we&&((e=i=Ue)&&(i=XS(i,t.pendingProps,Xt),i!==null?(t.stateNode=i,lt=t,Ue=null,e=!0):e=!1),e||Gn(t)),null;case 13:return Dp(e,t,i);case 4:return Ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Va(t,null,l,i):rt(e,t,l,i),t.child;case 11:return Sp(e,t,t.type,t.pendingProps,i);case 7:return rt(e,t,t.pendingProps,i),t.child;case 8:return rt(e,t,t.pendingProps.children,i),t.child;case 12:return rt(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,Xn(t,t.type,l.value),rt(e,t,l.children,i),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,Ra(t),r=ot(r),l=l(r),t.flags|=1,rt(e,t,l,i),t.child;case 14:return wp(e,t,t.type,t.pendingProps,i);case 15:return Tp(e,t,t.type,t.pendingProps,i);case 19:return Rp(e,t,i);case 31:return hS(e,t,i);case 22:return jp(e,t,i,t.pendingProps);case 24:return Ra(t),l=ot(Qe),e===null?(r=Vu(),r===null&&(r=Ve,c=ku(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=i),r=c),t.memoizedState={parent:l,cache:r},Uu(t),Xn(t,Qe,r)):((e.lanes&i)!==0&&(Bu(e,t),Es(t,null,null,i),js()),r=e.memoizedState,c=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Xn(t,Qe,l)):(l=c.cache,Xn(t,Qe,l),l!==r.cache&&zu(t,[Qe],i,!0))),rt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function An(e){e.flags|=4}function bc(e,t,i,l,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(lg())e.flags|=8192;else throw La=to,_u}else e.flags&=-16777217}function kp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qg(t))if(lg())e.flags|=8192;else throw La=to,_u}function xo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hh():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 r=e.child;r!==null;)i|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function pS(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)&&(yi(t)?An(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Du())),Be(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(An(t),c!==null?(Be(t),kp(t,c)):(Be(t),bc(t,r,null,l,i))):c?c!==e.memoizedState?(An(t),Be(t),kp(t,c)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&An(t),Be(t),bc(t,r,e,l,i)),null;case 27:if(Ml(t),i=pe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return Be(t),null}e=I.current,yi(t)?hm(t):(e=$g(r,l,i),t.stateNode=e,An(t))}return Be(t),null;case 5:if(Ml(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&An(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return Be(t),null}if(c=I.current,yi(t))hm(t);else{var v=ko(pe.current);switch(c){case 1:c=v.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=v.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=v.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=v.createElementNS("http://www.w3.org/1998/Math/MathML",r);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(r,{is:l.is}):v.createElement(r)}}c[st]=t,c[xt]=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,r,l),r){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(o(166));if(e=pe.current,yi(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,r=lt,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[st]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Dg(e.nodeValue,i)),e||Gn(t,!0)}else e=ko(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=yi(t),i!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(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(o(558))}return Be(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=yi(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[st]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),r=!1}else r=Du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)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,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==r&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),xo(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(r=(t.flags&128)!==0,c=l.rendering,c===null)if(r)Os(l,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=so(e),c!==null){for(t.flags|=128,Os(l,!1),e=c.updateQueue,t.updateQueue=e,xo(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)rm(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()>jo&&(t.flags|=128,r=!0,Os(l,!1),t.lanes=4194304)}else{if(!r)if(e=so(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,xo(t,e),Os(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!we)return Be(t),null}else 2*Ct()-l.renderingStartTime>jo&&i!==536870912&&(t.flags|=128,r=!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,r?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&&xo(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(o(156,t.tag))}function gS(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 Ml(t),null;case 31:if(t.memoizedState!==null){if(kt(t),t.alternate===null)throw Error(o(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(o(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 Lp(e,t){switch(Cu(t),t.tag){case 3:Tn(Qe),Le();break;case 26:case 27:case 5:Ml(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 r=l.next;i=r;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!==r)}}catch(b){Ce(t,t.return,b)}}function Jn(e,t,i){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var c=r.next;l=c;do{if((l.tag&e)===e){var v=l.inst,b=v.destroy;if(b!==void 0){v.destroy=void 0,r=t;var N=i,L=b;try{L()}catch(q){Ce(r,N,q)}}}l=l.next}while(l!==c)}}catch(q){Ce(t,t.return,q)}}function Vp(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Nm(t,i)}catch(l){Ce(e,e.return,l)}}}function _p(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(r){Ce(e,t,r)}}function rn(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(r){Ce(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){Ce(e,t,r)}else i.current=null}function Up(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(r){Ce(e,e.return,r)}}function Sc(e,t,i){try{var l=e.stateNode;US(l,e.type,i,t),l[xt]=t}catch(r){Ce(e,e.return,r)}}function Bp(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||Bp(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=yn));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 bo(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(bo(e,t,i),e=e.sibling;e!==null;)bo(e,t,i),e=e.sibling}function Hp(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ut(t,l,i),t[st]=e,t[xt]=i}catch(c){Ce(e,e.return,c)}}var Cn=!1,We=!1,jc=!1,$p=typeof WeakSet=="function"?WeakSet:Set,it=null;function vS(e,t){if(e=e.containerInfo,Xc=$o,e=Ih(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 r=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||r!==0&&X.nodeType!==3||(b=v+r),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===r&&(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},$o=!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++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,i=t,r=c.memoizedProps,c=c.memoizedState,l=i.stateNode;try{var ee=Ua(i.type,r);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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}}function qp(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 r=Ua(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ce(i,i.return,v)}}l&64&&Vp(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{Nm(e,t)}catch(v){Ce(i,i.return,v)}}break;case 27:t===null&&l&4&&Hp(i);case 26:case 5:Dn(e,i),t===null&&l&4&&Up(i),l&512&&zs(i,i.return);break;case 12:Dn(e,i);break;case 31:Dn(e,i),l&4&&Xp(e,i);break;case 13:Dn(e,i),l&4&&Kp(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=NS.bind(null,i),KS(e,i))));break;case 22:if(l=i.memoizedState!==null||Cn,!l){t=t!==null&&t.memoizedState!==null||We,r=Cn;var c=We;Cn=l,(We=t)&&!c?On(e,i,(i.subtreeFlags&8772)!==0):Dn(e,i),Cn=r,We=c}break;case 30:break;default:Dn(e,i)}}function Yp(e){var t=e.alternate;t!==null&&(e.alternate=null,Yp(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;)Gp(e,t,i),i=i.sibling}function Gp(e,t,i){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(as,i)}catch{}switch(i.tag){case 26:We||rn(i,t),Mn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:We||rn(i,t);var l=$e,r=St;ia(i.type)&&($e=i.stateNode,St=!1),Mn(e,t,i),qs(i.stateNode),$e=l,St=r;break;case 5:We||rn(i,t);case 6:if(l=$e,r=St,$e=null,Mn(e,t,i),$e=l,St=r,$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,Vg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Bi(e)):Vg($e,i.stateNode));break;case 4:l=$e,r=St,$e=i.stateNode.containerInfo,St=!0,Mn(e,t,i),$e=l,St=r;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||(rn(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&_p(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 Xp(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 Kp(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 yS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $p),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $p),t;default:throw Error(o(435,e.tag))}}function So(e,t){var i=yS(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var r=AS.bind(null,e,l);l.then(r,r)}})}function wt(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var r=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(o(160));Gp(c,v,r),$e=null,St=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Fp(t,e),t=t.sibling}var It=null;function Fp(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||rn(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 r=It;if(wt(t,e),Tt(e),l&512&&(We||i===null||rn(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,r=r.ownerDocument||r;t:switch(l){case"title":c=r.getElementsByTagName("title")[0],(!c||c[ls]||c[st]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(l),r.head.insertBefore(c,r.querySelector("head > title"))),ut(c,l,i),c[st]=e,at(c),l=c;break e;case"link":var v=Fg("link","href",r).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=r.createElement(l),ut(c,l,i),r.head.appendChild(c);break;case"meta":if(v=Fg("meta","content",r).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=r.createElement(l),ut(c,l,i),r.head.appendChild(c);break;default:throw Error(o(468,l))}c[st]=e,at(c),l=c}e.stateNode=l}else Zg(r,e.type,e.stateNode);else e.stateNode=Kg(r,l,e.memoizedProps);else c!==l?(c===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):c.count--,l===null?Zg(r,e.type,e.stateNode):Kg(r,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||rn(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||rn(i,i.return)),e.flags&32){r=e.stateNode;try{ri(r,"")}catch(ee){Ce(e,e.return,ee)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,Sc(e,r,i!==null?i.memoizedProps:r)),l&1024&&(jc=!0);break;case 6:if(wt(t,e),Tt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(ee){Ce(e,e.return,ee)}}break;case 3:if(_o=null,r=It,It=Lo(t.containerInfo),wt(t,e),It=r,Tt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Bi(t.containerInfo)}catch(ee){Ce(e,e.return,ee)}jc&&(jc=!1,Zp(e));break;case 4:l=It,It=Lo(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,So(e,l)));break;case 13:wt(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(To=Ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,So(e,l)));break;case 22:r=e.memoizedState!==null;var N=i!==null&&i.memoizedState!==null,L=Cn,q=We;if(Cn=L||r,We=q||N,wt(t,e),We=q,Cn=L,Tt(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(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,r)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=r?"":N.memoizedProps}catch(ee){Ce(N,N.return,ee)}}}else if(t.tag===18){if(i===null){N=t;try{var H=N.stateNode;r?_g(H,!0):_g(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,So(e,i))));break;case 19:wt(t,e),Tt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,So(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(Bp(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var r=i.stateNode,c=wc(e);bo(e,c,r);break;case 5:var v=i.stateNode;i.flags&32&&(ri(v,""),i.flags&=-33);var b=wc(e);bo(e,b,v);break;case 3:case 4:var N=i.stateNode.containerInfo,L=wc(e);Tc(e,L,N);break;default:throw Error(o(161))}}catch(q){Ce(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Zp(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;)qp(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:rn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&_p(t,t.return,i),Ba(t);break;case 27:qs(t.stateNode);case 26:case 5:rn(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,r=e,c=t,v=c.flags;switch(c.tag){case 0:case 11:case 15:On(r,c,i),Rs(4,c);break;case 1:if(On(r,c,i),l=c,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(L){Ce(l,l.return,L)}if(l=c,r=l.updateQueue,r!==null){var b=l.stateNode;try{var N=r.shared.hiddenCallbacks;if(N!==null)for(r.shared.hiddenCallbacks=null,r=0;r<N.length;r++)Em(N[r],b)}catch(L){Ce(l,l.return,L)}}i&&v&64&&Vp(c),zs(c,c.return);break;case 27:Hp(c);case 26:case 5:On(r,c,i),i&&l===null&&v&4&&Up(c),zs(c,c.return);break;case 12:On(r,c,i);break;case 31:On(r,c,i),i&&v&4&&Xp(r,c);break;case 13:On(r,c,i),i&&v&4&&Kp(r,c);break;case 22:c.memoizedState===null&&On(r,c,i),zs(c,c.return);break;case 30:break;default:On(r,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&&xs(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&&xs(e))}function en(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qp(e,t,i,l),t=t.sibling}function Qp(e,t,i,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:en(e,t,i,l),r&2048&&Rs(9,t);break;case 1:en(e,t,i,l);break;case 3:en(e,t,i,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xs(e)));break;case 12:if(r&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)),r&2048&&Ec(v,t);break;case 24:en(e,t,i,l),r&2048&&Nc(t.alternate,t);break;default:en(e,t,i,l)}}function Ci(e,t,i,l,r){for(r=r&&((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,r),Rs(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?Ci(c,v,b,N,r):ks(c,v):(q._visibility|=2,Ci(c,v,b,N,r)),r&&L&2048&&Ec(v.alternate,v);break;case 24:Ci(c,v,b,N,r),r&&L&2048&&Nc(v.alternate,v);break;default:Ci(c,v,b,N,r)}t=t.sibling}}function ks(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,r=l.flags;switch(l.tag){case 22:ks(i,l),r&2048&&Ec(l.alternate,l);break;case 24:ks(i,l),r&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;)Pp(e,t,i),e=e.sibling}function Pp(e,t,i){switch(e.tag){case 26:Mi(e,t,i),e.flags&Ls&&e.memoizedState!==null&&i2(i,It,e.memoizedState,e.memoizedProps);break;case 5:Mi(e,t,i);break;case 3:case 4:var l=It;It=Lo(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 Jp(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,Ip(l,e)}Jp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wp(e),e=e.sibling}function Wp(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,wo(e)):Vs(e);break;default:Vs(e)}}function wo(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,Ip(l,e)}Jp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jn(8,t,t.return),wo(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,wo(t));break;default:wo(t)}e=e.sibling}}function Ip(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:xs(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,it=l;else e:for(i=e;it!==null;){l=it;var r=l.sibling,c=l.return;if(Yp(l),l===i){it=null;break e}if(r!==null){r.return=c,it=r;break e}it=c}}}var xS={getCacheForType:function(e){var t=ot(Qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return ot(Qe).controller.signal}},bS=typeof WeakMap=="function"?WeakMap:Map,Ne=0,Ve=null,ge=null,xe=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,To=0,eg=0,jo=1/0,Eo=null,ea=null,et=0,ta=null,Ri=null,zn=0,Dc=0,Oc=null,tg=null,Us=0,Rc=null;function _t(){return(Ne&2)!==0&&xe!==0?xe&-xe:$.T!==null?Uc():vh()}function ng(){if(Vt===0)if((xe&536870912)===0||we){var e=Rl;Rl<<=1,(Rl&3932160)===0&&(Rl=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,xe,Vt,!1)),ss(e,i),((Ne&2)===0||e!==Ve)&&(e===Ve&&((Ne&2)===0&&(Ha|=i),Ye===4&&na(e,xe,Vt,!1)),un(e))}function ag(e,t,i){if((Ne&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||is(e,t),r=l?TS(e,t):kc(e,t,!0),c=l;do{if(r===0){Di&&!l&&na(e,t,0,!1);break}else{if(i=e.current.alternate,c&&!SS(i)){r=kc(e,t,!1),c=!1;continue}if(r===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;r=_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,r=4;break e}c=jt,jt=r,c!==null&&(jt===null?jt=c:jt.push.apply(jt,c))}r=v}if(c=!1,r!==2)continue}}if(r===1){zi(e,0),na(e,t,0,!0);break}e:{switch(l=e,c=r,c){case 0:case 1:throw Error(o(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(o(329))}if((t&62914560)===t&&(r=To+300-Ct(),10<r)){if(na(l,t,Vt,!Wn),kl(l,0,!0)!==0)break e;zn=t,l.timeoutHandle=kg(ig.bind(null,l,i,jt,Eo,Mc,t,Vt,Ha,Oi,Wn,c,"Throttled",-0,0),r);break e}ig(l,i,jt,Eo,Mc,t,Vt,Ha,Oi,Wn,c,null,-0,0)}}break}while(!0);un(e)}function ig(e,t,i,l,r,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:yn},Pp(t,c,X);var ee=(c&62914560)===c?To-Ct():(c&4194048)===c?eg-Ct():0;if(ee=s2(X,ee),ee!==null){zn=c,e.cancelPendingCommit=ee(dg.bind(null,e,t,c,i,l,r,v,b,N,q,X,null,_,H)),na(e,c,v,!L);return}}dg(e,t,c,i,l,r,v,b,N)}function SS(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 r=i[l],c=r.getSnapshot;r=r.value;try{if(!Ot(c(),r))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 r=t;0<r;){var c=31-Dt(r),v=1<<c;l[c]=-1,r&=~v}i!==0&&mh(e,i,t)}function No(){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;)Lp(e.alternate,e),e=e.return;ge=null}}function zi(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,$S(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),zn=0,zc(),Ve=e,ge=i=bn(e.current,null),xe=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 r=31-Dt(l),c=1<<r;t|=e[r],l&=~c}return Rn=t,Kl(),i}function sg(e,t){de=null,$.H=Ms,t===wi||t===eo?(t=Sm(),Ae=3):t===_u?(t=Sm(),Ae=4):Ae=t===fc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Lt=t,ge===null&&(Ye=1,po(e,qt(t,e.current)))}function lg(){var e=zt.current;return e===null?!0:(xe&4194048)===xe?Kt===null:(xe&62914560)===xe||(xe&536870912)!==0?e===Kt:!1}function og(){var e=$.H;return $.H=Ms,e===null?Ms:e}function rg(){var e=$.A;return $.A=xS,e}function Ao(){Ye=4,Wn||(xe&4194048)!==xe&&zt.current!==null||(Di=!0),(In&134217727)===0&&(Ha&134217727)===0||Ve===null||na(Ve,xe,Vt,!1)}function kc(e,t,i){var l=Ne;Ne|=2;var r=og(),c=rg();(Ve!==e||xe!==t)&&(Eo=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)}}wS(),v=Ye;break}catch(q){sg(e,q)}while(!0);return t&&e.shellSuspendCounter++,wn=Oa=null,Ne=l,$.H=r,$.A=c,ge===null&&(Ve=null,xe=0,Kl()),v}function wS(){for(;ge!==null;)ug(ge)}function TS(e,t){var i=Ne;Ne|=2;var l=og(),r=rg();Ve!==e||xe!==t?(Eo=null,jo=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(xm(c)){Ae=0,Lt=null,cg(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:xm(c)?(Ae=0,Lt=null,cg(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?Qg(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,Co(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(o(462))}}jS();break}catch(q){sg(e,q)}while(!0);return wn=Oa=null,$.H=l,$.A=r,Ne=i,ge!==null?0:(Ve=null,xe=0,Kl(),Ye)}function jS(){for(;ge!==null&&!Fb();)ug(ge)}function ug(e){var t=zp(e.alternate,e,Rn);e.memoizedProps=e.pendingProps,t===null?Co(e):ge=t}function cg(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Ap(i,t,t.pendingProps,t.type,void 0,xe);break;case 11:t=Ap(i,t,t.pendingProps,t.type.render,t.ref,xe);break;case 5:Qu(t);default:Lp(i,t),t=ge=rm(t,Rn),t=zp(i,t,Rn)}e.memoizedProps=e.pendingProps,t===null?Co(e):ge=t}function ki(e,t,i,l){wn=Oa=null,Qu(t),Ti=null,Ss=0;var r=t.return;try{if(dS(e,r,t,i,xe)){Ye=1,po(e,qt(i,e.current)),ge=null;return}}catch(c){if(r!==null)throw ge=r,c;Ye=1,po(e,qt(i,e.current)),ge=null;return}t.flags&32768?(we||l===1?e=!0:Di||(xe&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))),fg(t,e)):Co(t)}function Co(e){var t=e;do{if((t.flags&32768)!==0){fg(t,Wn);return}e=t.return;var i=pS(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 fg(e,t){do{var i=gS(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 dg(e,t,i,l,r,c,v,b,N){e.cancelPendingCommit=null;do Mo();while(et!==0);if((Ne&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=wu,a1(e,i,c,v,b,N),e===Ve&&(ge=Ve=null,xe=0),Ri=t,ta=e,zn=i,Dc=c,Oc=r,tg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,CS(Dl,function(){return vg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,r=Q.p,Q.p=2,v=Ne,Ne|=4;try{vS(e,t,i)}finally{Ne=v,Q.p=r,$.T=l}}et=1,hg(),mg(),pg()}}function hg(){if(et===1){et=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 r=Ne;Ne|=4;try{Fp(t,e);var c=Kc,v=Ih(e.containerInfo),b=c.focusedElem,N=c.selectionRange;if(v!==b&&b&&b.ownerDocument&&Wh(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=Jh(b,se),C=Jh(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}}$o=!!Xc,Kc=Xc=null}finally{Ne=r,Q.p=l,$.T=i}}e.current=t,et=2}}function mg(){if(et===2){et=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 r=Ne;Ne|=4;try{qp(e,t.alternate,t)}finally{Ne=r,Q.p=l,$.T=i}}et=3}}function pg(){if(et===4||et===3){et=0,Zb();var e=ta,t=Ri,i=zn,l=tg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,Ri=ta=null,gg(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ea=null),Wr(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,r=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=r}}(zn&3)!==0&&Mo(),un(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Rc?Us++:(Us=0,Rc=e):Us=0,Bs(0)}}function gg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xs(t)))}function Mo(){return hg(),mg(),pg(),vg()}function vg(){if(et!==5)return!1;var e=ta,t=Dc;Dc=0;var i=Wr(zn),l=$.T,r=Q.p;try{Q.p=32>i?32:i,$.T=null,i=Oc,Oc=null;var c=ta,v=zn;if(et=0,Ri=ta=null,zn=0,(Ne&6)!==0)throw Error(o(331));var b=Ne;if(Ne|=4,Wp(c.current),Qp(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=r,$.T=l,gg(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=xp(2),l=Zn(t,i,2),l!==null&&(bp(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 bS;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(i)||(Ac=!0,r.add(i),e=ES.bind(null,e,t,i),t.then(e,e))}function ES(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ve===e&&(xe&i)===i&&(Ye===4||Ye===3&&(xe&62914560)===xe&&300>Ct()-To?(Ne&2)===0&&zi(e,0):Cc|=i,Oi===xe&&(Oi=0)),un(e)}function xg(e,t){t===0&&(t=hh()),e=Ca(e,t),e!==null&&(ss(e,t),un(e))}function NS(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),xg(e,i)}function AS(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),xg(e,i)}function CS(e,t){return Zr(e,t)}var Do=null,Li=null,Vc=!1,Oo=!1,_c=!1,aa=0;function un(e){e!==Li&&e.next===null&&(Li===null?Do=Li=e:Li=Li.next=e),Oo=!0,Vc||(Vc=!0,DS())}function Bs(e,t){if(!_c&&Oo){_c=!0;do for(var i=!1,l=Do;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var c=0;else{var v=l.suspendedLanes,b=l.pingedLanes;c=(1<<31-Dt(42|e)+1)-1,c&=r&~(v&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(i=!0,Tg(l,c))}else c=xe,c=kl(l,l===Ve?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||is(l,c)||(i=!0,Tg(l,c));l=l.next}while(i);_c=!1}}function MS(){bg()}function bg(){Oo=Vc=!1;var e=0;aa!==0&&HS()&&(e=aa);for(var t=Ct(),i=null,l=Do;l!==null;){var r=l.next,c=Sg(l,t);c===0?(l.next=null,i===null?Do=r:i.next=r,r===null&&(Li=i)):(i=l,(e!==0||(c&3)!==0)&&(Oo=!0)),l=r}et!==0&&et!==5||Bs(e),aa!==0&&(aa=0)}function Sg(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var v=31-Dt(c),b=1<<v,N=r[v];N===-1?((b&i)===0||(b&l)!==0)&&(r[v]=n1(b,t)):N<=t&&(e.expiredLanes|=b),c&=~b}if(t=Ve,i=xe,i=kl(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&&Qr(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&&Qr(l),Wr(i)){case 2:case 8:i=fh;break;case 32:i=Dl;break;case 268435456:i=dh;break;default:i=Dl}return l=wg.bind(null,e),i=Zr(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Qr(l),e.callbackPriority=2,e.callbackNode=null,2}function wg(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Mo()&&e.callbackNode!==i)return null;var l=xe;return l=kl(e,e===Ve?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(ag(e,l,t),Sg(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?wg.bind(null,e):null)}function Tg(e,t){if(Mo())return null;ag(e,t,!0)}function DS(){qS(function(){(Ne&6)!==0?Zr(ch,MS):bg()})}function Uc(){if(aa===0){var e=bi;e===0&&(e=Ol,Ol<<=1,(Ol&261888)===0&&(Ol=256)),aa=e}return aa}function jg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ul(""+e)}function Eg(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 OS(e,t,i,l,r){if(t==="submit"&&i&&i.stateNode===r){var c=jg((r[xt]||null).action),v=l.submitter;v&&(t=(t=v[xt]||null)?jg(t.formAction):v.getAttribute("formAction"),t!==null&&(c=t,v=null));var b=new ql("action","action",null,l,r);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(aa!==0){var N=v?Eg(r,v):new FormData(r);ic(i,{pending:!0,data:N,method:r.method,action:c},null,N)}}else typeof c=="function"&&(b.preventDefault(),N=v?Eg(r,v):new FormData(r),ic(i,{pending:!0,data:N,method:r.method,action:c},c,N))},currentTarget:r}]})}}for(var Bc=0;Bc<Su.length;Bc++){var Hc=Su[Bc],RS=Hc.toLowerCase(),zS=Hc[0].toUpperCase()+Hc.slice(1);Wt(RS,"on"+zS)}Wt(nm,"onAnimationEnd"),Wt(am,"onAnimationIteration"),Wt(im,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(Q1,"onTransitionRun"),Wt(P1,"onTransitionStart"),Wt(J1,"onTransitionCancel"),Wt(sm,"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(" "),kS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hs));function Ng(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],r=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&&r.isPropagationStopped())break e;c=b,r.currentTarget=L;try{c(r)}catch(q){Xl(q)}r.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&&r.isPropagationStopped())break e;c=b,r.currentTarget=L;try{c(r)}catch(q){Xl(q)}r.currentTarget=null,c=N}}}}function ve(e,t){var i=t[Ir];i===void 0&&(i=t[Ir]=new Set);var l=e+"__bubble";i.has(l)||(Ag(t,e,2,!1),i.add(l))}function $c(e,t,i){var l=0;t&&(l|=4),Ag(i,e,l,t)}var Ro="_reactListening"+Math.random().toString(36).slice(2);function qc(e){if(!e[Ro]){e[Ro]=!0,bh.forEach(function(i){i!=="selectionchange"&&(kS.has(i)||$c(i,!1,e),$c(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ro]||(t[Ro]=!0,$c("selectionchange",!1,t))}}function Ag(e,t,i,l){switch(nv(t)){case 2:var r=r2;break;case 8:r=u2;break;default:r=af}i=r.bind(null,t,i,e),r=void 0,!ru||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Yc(e,t,i,l,r){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===r)break;if(v===4)for(v=l.return;v!==null;){var N=v.tag;if((N===3||N===4)&&v.stateNode.containerInfo===r)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}Rh(function(){var L=c,q=lu(i),X=[];e:{var _=lm.get(e);if(_!==void 0){var H=ql,ee=e;switch(e){case"keypress":if(Hl(i)===0)break e;case"keydown":case"keyup":H=A1;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=Lh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=p1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=D1;break;case nm:case am:case im:H=y1;break;case sm:H=R1;break;case"scroll":case"scrollend":H=h1;break;case"wheel":H=k1;break;case"copy":case"cut":case"paste":H=b1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=_h;break;case"toggle":case"beforetoggle":H=V1}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=rs(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=Lh,Y="onMouseLeave",O="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(se=_h,Y="onPointerLeave",O="onPointerEnter",C="pointer"),ze=H==null?_:os(H),k=ee==null?_:os(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=LS,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&&Cg(X,_,H,se,!1),ee!==null&&ze!==null&&Cg(X,ze,ee,se,!0)}}e:{if(_=L?os(L):window,H=_.nodeName&&_.nodeName.toLowerCase(),H==="select"||H==="input"&&_.type==="file")var je=Xh;else if(Yh(_))if(Kh)je=K1;else{je=G1;var ne=Y1}else H=_.nodeName,!H||H.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?L&&iu(L.elementType)&&(je=Xh):je=X1;if(je&&(je=je(e,L))){Gh(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?os(L):window,e){case"focusin":(Yh(ne)||ne.contentEditable==="true")&&(di=ne,yu=L,gs=null);break;case"focusout":gs=yu=di=null;break;case"mousedown":xu=!0;break;case"contextmenu":case"mouseup":case"dragend":xu=!1,em(X,i,q);break;case"selectionchange":if(Z1)break;case"keydown":case"keyup":em(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?$h(e,i)&&(be="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(be="onCompositionStart");be&&(Uh&&i.locale!=="ko"&&(fi||be!=="onCompositionStart"?be==="onCompositionEnd"&&fi&&(he=zh()):($n=q,uu="value"in $n?$n.value:$n.textContent,fi=!0)),ne=zo(L,be),0<ne.length&&(be=new Vh(be,e,null,i,q),X.push({event:be,listeners:ne}),he?be.data=he:(he=qh(i),he!==null&&(be.data=he)))),(he=U1?B1(e,i):H1(e,i))&&(be=zo(L,"onBeforeInput"),0<be.length&&(ne=new Vh("onBeforeInput","beforeinput",null,i,q),X.push({event:ne,listeners:be}),ne.data=he)),OS(X,e,L,i,q)}Ng(X,t)})}function $s(e,t,i){return{instance:e,listener:t,currentTarget:i}}function zo(e,t){for(var i=t+"Capture",l=[];e!==null;){var r=e,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=rs(e,i),r!=null&&l.unshift($s(e,r,c)),r=rs(e,t),r!=null&&l.push($s(e,r,c))),e.tag===3)return l;e=e.return}return[]}function LS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Cg(e,t,i,l,r){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,r?(L=rs(i,c),L!=null&&v.unshift($s(i,L,N))):r||(L=rs(i,c),L!=null&&v.push($s(i,L,N)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var VS=/\r\n?/g,_S=/\u0000|\uFFFD/g;function Mg(e){return(typeof e=="string"?e:""+e).replace(VS,`
49
+ `).replace(_S,"")}function Dg(e,t){return t=Mg(t),Mg(e)===t}function Re(e,t,i,l,r,c){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ri(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ri(e,""+l);break;case"className":Vl(e,"class",l);break;case"tabIndex":Vl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Vl(e,i,l);break;case"style":Dh(e,l,c);break;case"data":if(t!=="object"){Vl(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=Ul(""+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",r.name,r,null),Re(e,t,"formEncType",r.formEncType,r,null),Re(e,t,"formMethod",r.formMethod,r,null),Re(e,t,"formTarget",r.formTarget,r,null)):(Re(e,t,"encType",r.encType,r,null),Re(e,t,"method",r.method,r,null),Re(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Ul(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=yn);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(o(61));if(i=l.__html,i!=null){if(r.children!=null)throw Error(o(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=Ul(""+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),Ll(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":Ll(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=f1.get(i)||i,Ll(e,i,l))}}function Gc(e,t,i,l,r,c){switch(i){case"style":Dh(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?ri(e,l):(typeof l=="number"||typeof l=="bigint")&&ri(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=yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),c=e[xt]||null,c=c!=null?c[i]:null,typeof c=="function"&&e.removeEventListener(t,c,r),typeof l=="function")){typeof c!="function"&&c!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,r);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):Ll(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,r=!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":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Re(e,t,c,v,i,null)}}r&&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=r=null,N=null,L=null;for(l in i)if(i.hasOwnProperty(l)){var q=i[l];if(q!=null)switch(l){case"name":r=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(o(137,t));break;default:Re(e,t,l,q,i,null)}}Nh(e,c,b,N,L,v,r,!1);return;case"select":ve("invalid",e),l=v=c=null;for(r in i)if(i.hasOwnProperty(r)&&(b=i[r],b!=null))switch(r){case"value":c=b;break;case"defaultValue":v=b;break;case"multiple":l=b;default:Re(e,t,r,b,i,null)}t=c,i=v,e.multiple=!!l,t!=null?oi(e,!!l,t,!1):i!=null&&oi(e,!!l,i,!0);return;case"textarea":ve("invalid",e),c=r=l=null;for(v in i)if(i.hasOwnProperty(v)&&(b=i[v],b!=null))switch(v){case"value":l=b;break;case"defaultValue":r=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:Re(e,t,v,b,i,null)}Ch(e,l,r,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(o(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 US(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 r=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":r=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(o(137,t));break;default:H!==X&&Re(e,t,_,H,l,X)}}nu(e,v,b,N,L,q,c,r);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(r in l)if(c=l[r],N=i[r],l.hasOwnProperty(r)&&(c!=null||N!=null))switch(r){case"value":_=c;break;case"defaultValue":b=c;break;case"multiple":v=c;default:c!==N&&Re(e,t,r,c,l,N)}t=b,i=v,l=H,_!=null?oi(e,!!i,_,!1):!!l!=!!i&&(t!=null?oi(e,!!i,t,!0):oi(e,!!i,i?[]:"",!1));return;case"textarea":H=_=null;for(b in i)if(r=i[b],i.hasOwnProperty(b)&&r!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Re(e,t,b,null,l,r)}for(v in l)if(r=l[v],c=i[v],l.hasOwnProperty(v)&&(r!=null||c!=null))switch(v){case"value":_=r;break;case"defaultValue":H=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&Re(e,t,v,r,l,c)}Ah(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(o(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 Og(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var r=i[l],c=r.transferSize,v=r.initiatorType,b=r.duration;if(c&&b&&Og(v)){for(v=0,b=r.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&&Og(X)&&(N=N.responseEnd,v+=q*(N<b?1:(b-L)/(N-L)))}if(--l,t+=8*(c+v)/(r.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 ko(e){return e.nodeType===9?e:e.ownerDocument}function Rg(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 zg(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 HS(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var kg=typeof setTimeout=="function"?setTimeout:void 0,$S=typeof clearTimeout=="function"?clearTimeout:void 0,Lg=typeof Promise=="function"?Promise:void 0,qS=typeof queueMicrotask=="function"?queueMicrotask:typeof Lg<"u"?function(e){return Lg.resolve(null).then(e).catch(YS)}:kg;function YS(e){setTimeout(function(){throw e})}function ia(e){return e==="head"}function Vg(e,t){var i=t,l=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(r),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=r}while(i);Bi(t)}function _g(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 GS(e,t,i,l){for(;e.nodeType===1;){var r=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!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ft(e.nextSibling),e===null)break}return null}function XS(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 Ug(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 KS(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 Bg(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 Hg(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 $g(e,t,i){switch(t=ko(i),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function qs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eu(e)}var Zt=new Map,qg=new Set;function Lo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kn=Q.d;Q.d={f:FS,r:ZS,D:QS,C:PS,L:JS,m:WS,X:e2,S:IS,M:t2};function FS(){var e=kn.f(),t=No();return e||t}function ZS(e){var t=ii(e);t!==null&&t.tag===5&&t.type==="form"?sp(t):kn.r(e)}var Vi=typeof document>"u"?null:document;function Yg(e,t,i){var l=Vi;if(l&&typeof t=="string"&&t){var r=Ht(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),qg.has(r)||(qg.add(r),e={rel:e,crossOrigin:i,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),ut(t,"link",e),at(t),l.head.appendChild(t)))}}function QS(e){kn.D(e),Yg("dns-prefetch",e,null)}function PS(e,t){kn.C(e,t),Yg("preconnect",e,t)}function JS(e,t,i){kn.L(e,t,i);var l=Vi;if(l&&e&&t){var r='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ht(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ht(i.imageSizes)+'"]')):r+='[href="'+Ht(e)+'"]';var c=r;switch(t){case"style":c=_i(e);break;case"script":c=Ui(e)}Zt.has(c)||(e=x({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(c,e),l.querySelector(r)!==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 WS(e,t){kn.m(e,t);var i=Vi;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ht(l)+'"][href="'+Ht(e)+'"]',c=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ui(e)}if(!Zt.has(c)&&(e=x({rel:"modulepreload",href:e},t),Zt.set(c,e),i.querySelector(r)===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 IS(e,t,i){kn.S(e,t,i);var l=Vi;if(l&&e){var r=si(l).hoistableStyles,c=_i(e);t=t||"default";var v=r.get(c);if(!v){var b={loading:0,preload:null};if(v=l.querySelector(Ys(c)))b.loading=5;else{e=x({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,Vo(v,t,l)}v={type:"stylesheet",instance:v,count:1,state:b},r.set(c,v)}}}function e2(e,t){kn.X(e,t);var i=Vi;if(i&&e){var l=si(i).hoistableScripts,r=Ui(e),c=l.get(r);c||(c=i.querySelector(Gs(r)),c||(e=x({src:e,async:!0},t),(t=Zt.get(r))&&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(r,c))}}function t2(e,t){kn.M(e,t);var i=Vi;if(i&&e){var l=si(i).hoistableScripts,r=Ui(e),c=l.get(r);c||(c=i.querySelector(Gs(r)),c||(e=x({src:e,async:!0,type:"module"},t),(t=Zt.get(r))&&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(r,c))}}function Gg(e,t,i,l){var r=(r=pe.current)?Lo(r):null;if(!r)throw Error(o(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(r).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(r).hoistableStyles,v=c.get(e);if(v||(r=r.ownerDocument||r,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,v),(c=r.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||n2(r,e,i,v.state))),t&&l===null)throw Error(o(528,""));return v}if(t&&l!==null)throw Error(o(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(r).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(o(444,e))}}function _i(e){return'href="'+Ht(e)+'"'}function Ys(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function n2(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 Kg(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 r=x({},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",r),Vo(l,i.precedence,e),t.instance=l;case"stylesheet":r=_i(i.href);var c=e.querySelector(Ys(r));if(c)return t.state.loading|=4,t.instance=c,at(c),c;l=Xg(i),(r=Zt.get(r))&&Ic(l,r),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,Vo(c,i.precedence,e),t.instance=c;case"script":return c=Ui(i.src),(r=e.querySelector(Gs(c)))?(t.instance=r,at(r),r):(l=i,(r=Zt.get(c))&&(l=x({},i),ef(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),at(r),ut(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Vo(l,i.precedence,e));return t.instance}function Vo(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,c=r,v=0;v<l.length;v++){var b=l[v];if(b.dataset.precedence===t)c=b;else if(c!==r)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 _o=null;function Fg(e,t,i){if(_o===null){var l=new Map,r=_o=new Map;r.set(i,l)}else r=_o,l=r.get(i),l||(l=new Map,r.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var c=i[r];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 Zg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function a2(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 Qg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function i2(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 r=_i(l.href),c=t.querySelector(Ys(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Uo.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=c,at(c);return}c=t.ownerDocument||t,l=Xg(l),(r=Zt.get(r))&&Ic(l,r),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=Uo.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var tf=0;function s2(e,t){return e.stylesheets&&e.count===0&&Ho(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Ho(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&tf===0&&(tf=62500*BS());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ho(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(r)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ho(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Bo=null;function Ho(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bo=new Map,t.forEach(l2,e),Bo=null,Uo.call(e))}function l2(e,t){if(!(t.state.loading&4)){var i=Bo.get(e);if(i)var l=i.get(null);else{i=new Map,Bo.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var v=r[c];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}r=t.instance,v=r.getAttribute("data-precedence"),c=i.get(v)||l,c===l&&i.set(null,r),i.set(v,r),this.count++,l=Uo.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),c?c.parentNode.insertBefore(r,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Xs={$$typeof:V,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function o2(e,t,i,l,r,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=Pr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pr(0),this.hiddenUpdates=Pr(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Pg(e,t,i,l,r,c,v,b,N,L,q,X){return e=new o2(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 Jg(e){return e?(e=pi,e):pi}function Wg(e,t,i,l,r,c){r=Jg(r),l.context===null?l.context=r:l.pendingContext=r,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 Ig(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){Ig(e,t),(e=e.alternate)&&Ig(e,t)}function ev(e){if(e.tag===13||e.tag===31){var t=Ca(e,67108864);t!==null&&Et(t,e,67108864),nf(e,67108864)}}function tv(e){if(e.tag===13||e.tag===31){var t=_t();t=Jr(t);var i=Ca(e,t);i!==null&&Et(i,e,t),nf(e,t)}}var $o=!0;function r2(e,t,i,l){var r=$.T;$.T=null;var c=Q.p;try{Q.p=2,af(e,t,i,l)}finally{Q.p=c,$.T=r}}function u2(e,t,i,l){var r=$.T;$.T=null;var c=Q.p;try{Q.p=8,af(e,t,i,l)}finally{Q.p=c,$.T=r}}function af(e,t,i,l){if($o){var r=sf(l);if(r===null)Yc(e,t,l,qo,i),av(e,l);else if(f2(r,e,t,i,l))l.stopPropagation();else if(av(e,l),t&4&&-1<c2.indexOf(e)){for(;r!==null;){var c=ii(r);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&&(jo=Ct()+500,Bs(0))}}break;case 31:case 13:b=Ca(c,2),b!==null&&Et(b,c,2),No(),nf(c,2)}if(c=sf(l),c===null&&Yc(e,t,l,qo,i),c===r)break;r=c}r!==null&&l.stopPropagation()}else Yc(e,t,l,null,i)}}function sf(e){return e=lu(e),lf(e)}var qo=null;function lf(e){if(qo=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 qo=e,null}function nv(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(Qb()){case ch:return 2;case fh:return 8;case Dl:case Pb:return 32;case dh:return 268435456;default:return 32}default:return 32}}var of=!1,sa=null,la=null,oa=null,Ks=new Map,Fs=new Map,ra=[],c2="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 av(e,t){switch(e){case"focusin":case"focusout":sa=null;break;case"dragenter":case"dragleave":la=null;break;case"mouseover":case"mouseout":oa=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,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:c,targetContainers:[r]},t!==null&&(t=ii(t),t!==null&&ev(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function f2(e,t,i,l,r){switch(t){case"focusin":return sa=Zs(sa,e,t,i,l,r),!0;case"dragenter":return la=Zs(la,e,t,i,l,r),!0;case"mouseover":return oa=Zs(oa,e,t,i,l,r),!0;case"pointerover":var c=r.pointerId;return Ks.set(c,Zs(Ks.get(c)||null,e,t,i,l,r)),!0;case"gotpointercapture":return c=r.pointerId,Fs.set(c,Zs(Fs.get(c)||null,e,t,i,l,r)),!0}return!1}function iv(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(){tv(i)});return}}else if(t===31){if(t=p(i),t!==null){e.blockedOn=t,yh(e.priority,function(){tv(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 Yo(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&&ev(t),e.blockedOn=i,!1;t.shift()}return!0}function sv(e,t,i){Yo(e)&&i.delete(t)}function d2(){of=!1,sa!==null&&Yo(sa)&&(sa=null),la!==null&&Yo(la)&&(la=null),oa!==null&&Yo(oa)&&(oa=null),Ks.forEach(sv),Fs.forEach(sv)}function Go(e,t){e.blockedOn===t&&(e.blockedOn=null,of||(of=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,d2)))}var Xo=null;function lv(e){Xo!==e&&(Xo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Xo===e&&(Xo=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],r=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:r,method:i.method,action:l},l,r))}}))}function Bi(e){function t(N){return Go(N,e)}sa!==null&&Go(sa,e),la!==null&&Go(la,e),oa!==null&&Go(oa,e),Ks.forEach(t),Fs.forEach(t);for(var i=0;i<ra.length;i++){var l=ra[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ra.length&&(i=ra[0],i.blockedOn===null);)iv(i),i.blockedOn===null&&ra.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var r=i[l],c=i[l+1],v=r[xt]||null;if(typeof c=="function")v||lv(i);else if(v){var b=null;if(c&&c.hasAttribute("formAction")){if(r=c,v=c[xt]||null)b=v.formAction;else if(lf(r)!==null)continue}else b=v.action;typeof b=="function"?i[l+1]=b:(i.splice(l,3),l-=3),lv(i)}}}function ov(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(v){return r=v})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=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,r=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),r!==null&&(r(),r=null)}}}function rf(e){this._internalRoot=e}Ko.prototype.render=rf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=_t();Wg(i,l,e,t,null,null)},Ko.prototype.unmount=rf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wg(e.current,2,null,e,null,null),No(),t[ni]=null}};function Ko(e){this._internalRoot=e}Ko.prototype.unstable_scheduleHydration=function(e){if(e){var t=vh();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ra.length&&t!==0&&t<ra[i].priority;i++);ra.splice(i,0,e),i===0&&iv(e)}};var rv=a.version;if(rv!=="19.2.4")throw Error(o(527,rv,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var h2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fo.isDisabled&&Fo.supportsFiber)try{as=Fo.inject(h2),Mt=Fo}catch{}}return Ps.createRoot=function(e,t){if(!u(e))throw Error(o(299));var i=!1,l="",r=pp,c=gp,v=vp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=Pg(e,1,!1,null,null,i,l,null,r,c,v,ov),e[ni]=t.current,qc(e),new rf(t)},Ps.hydrateRoot=function(e,t,i){if(!u(e))throw Error(o(299));var l=!1,r="",c=pp,v=gp,b=vp,N=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(r=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=Pg(e,1,!0,t,i??null,l,r,N,c,v,b,ov),t.context=Jg(null),i=t.current,l=_t(),l=Jr(l),r=Fn(l),r.callback=null,Zn(i,r,l),i=l,t.current.lanes=i,ss(t,i),un(t),e[ni]=t.current,qc(e),new Ko(t)},Ps.version="19.2.4",Ps}var xv;function j2(){if(xv)return ff.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(),ff.exports=T2(),ff.exports}var E2=j2();const ly="/api";async function _e(n){const a=await fetch(`${ly}${n}`,{headers:{accept:"application/json"}});if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function N2(n){const a=new EventSource(`${ly}/events`);return a.addEventListener("state-changed",s=>{try{const o=JSON.parse(s.data);n("state-changed",o)}catch{n("state-changed",{})}}),a.onerror=()=>{},()=>a.close()}function nt(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 oy=w.createContext(()=>{});function Pi(){return w.useContext(oy)}const A2=new Set(["overview","mail","sessions","work","connections","inner","notes","runtime"]);function ry(n){const a=n.replace(/^#\/?/,"");if(!a.startsWith("agent/"))return null;const s=a.split("/"),o=s[1]?decodeURIComponent(s[1]):"";if(!o)return null;const u=s[2]??"overview",d=A2.has(u)?u:"overview",h=s.slice(3),p=h.length>0?h.map(decodeURIComponent).join("/"):void 0;return{agent:o,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 C2=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 M2(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function D2(n){return M2(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let O2=!1;function Ed(){return O2}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:D2(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 uy(n){var a,s,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(a=0;a<u;a++)n[a]&&(s=uy(n[a]))&&(o&&(o+=" "),o+=s)}else for(s in n)n[s]&&(o&&(o+=" "),o+=s);return o}function Fe(){for(var n,a,s=0,o="",u=arguments.length;s<u;s++)(n=arguments[s])&&(a=uy(n))&&(o&&(o+=" "),o+=a);return o}function R2(n){if(z2())n.focus({preventScroll:!0});else{let a=k2(n);n.focus(),L2(a)}}let Zo=null;function z2(){if(Zo==null){Zo=!1;try{document.createElement("div").focus({get preventScroll(){return Zo=!0,!0}})}catch{}}return Zo}function k2(n){let a=n.parentNode,s=[],o=document.scrollingElement||document.documentElement;for(;a instanceof HTMLElement&&a!==o;)(a.offsetHeight<a.scrollHeight||a.offsetWidth<a.scrollWidth)&&s.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),a=a.parentNode;return o instanceof HTMLElement&&s.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),s}function L2(n){for(let{element:a,scrollTop:s,scrollLeft:o}of n)a.scrollTop=s,a.scrollLeft=o}function Dr(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(o=>n.test(o.brand))||n.test(window.navigator.userAgent)}function cy(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 mr=Ji(function(){return cy(/^Mac/i)}),V2=Ji(function(){return cy(/^iPad/i)||mr()&&navigator.maxTouchPoints>1}),_2=Ji(function(){return Dr(/AppleWebKit/i)&&!U2()}),U2=Ji(function(){return Dr(/Chrome/i)}),B2=Ji(function(){return Dr(/Android/i)}),H2=Ji(function(){return Dr(/Firefox/i)});function pl(n,a,s=!0){var o,u;let{metaKey:d,ctrlKey:h,altKey:p,shiftKey:m}=a;H2()&&(!((u=window.event)===null||u===void 0||(o=u.type)===null||o===void 0)&&o.startsWith("key"))&&n.target==="_blank"&&(mr()?d=!0:h=!0);let g=_2()&&mr()&&!V2()?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});pl.isOpening=s,R2(n),n.dispatchEvent(g),pl.isOpening=!1}pl.isOpening=!1;function fy(){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)},[]),o=w.useCallback(()=>{n.current.forEach((u,d)=>{s(u.eventTarget,u.type,d,u.options)})},[s]);return w.useEffect(()=>o,[o]),{addGlobalListener:a,removeGlobalListener:s,removeAllGlobalListeners:o}}function $2(n){return n.pointerType===""&&n.isTrusted?!0:B2()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}var q2=sy();function dy(n){let a=n;return a.nativeEvent=n,a.isDefaultPrevented=()=>a.defaultPrevented,a.isPropagationStopped=()=>a.cancelBubble,a.persist=()=>{},a}function Y2(n,a){Object.defineProperty(n,"target",{value:a}),Object.defineProperty(n,"currentTarget",{value:a})}function hy(n){let a=w.useRef({isFocused:!1,observer:null});return C2(()=>{const s=a.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]),w.useCallback(s=>{let o=gt(s);if(o instanceof HTMLButtonElement||o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement){a.current.isFocused=!0;let u=o,d=h=>{if(a.current.isFocused=!1,u.disabled){let p=dy(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 G2=!1,bl=null;const qf=new Set;let ol=new Map,Wa=!1,Yf=!1;const X2={Tab:!0,Escape:!0};function Nd(n,a){for(let s of qf)s(n,a)}function K2(n){return!(n.metaKey||!mr()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function pr(n){Wa=!0,!pl.isOpening&&K2(n)&&(bl="keyboard",Nd("keyboard",n))}function Ki(n){bl="pointer","pointerType"in n&&n.pointerType,(n.type==="mousedown"||n.type==="pointerdown")&&(Wa=!0,Nd("pointer",n))}function my(n){!pl.isOpening&&$2(n)&&(Wa=!0,bl="virtual")}function py(n){gt(n)===window||gt(n)===document||G2||!n.isTrusted||(!Wa&&!Yf&&(bl="virtual",Nd("virtual",n)),Wa=!1,Yf=!1)}function gy(){Wa=!1,Yf=!0}function Gf(n){if(typeof window>"u"||typeof document>"u"||ol.get(Xa(n)))return;const a=Xa(n),s=ba(n);let o=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){Wa=!0,o.apply(this,arguments)},s.addEventListener("keydown",pr,!0),s.addEventListener("keyup",pr,!0),s.addEventListener("click",my,!0),a.addEventListener("focus",py,!0),a.addEventListener("blur",gy,!1),typeof PointerEvent<"u"&&(s.addEventListener("pointerdown",Ki,!0),s.addEventListener("pointermove",Ki,!0),s.addEventListener("pointerup",Ki,!0)),a.addEventListener("beforeunload",()=>{vy(n)},{once:!0}),ol.set(a,{focus:o})}const vy=(n,a)=>{const s=Xa(n),o=ba(n);a&&o.removeEventListener("DOMContentLoaded",a),ol.has(s)&&(s.HTMLElement.prototype.focus=ol.get(s).focus,o.removeEventListener("keydown",pr,!0),o.removeEventListener("keyup",pr,!0),o.removeEventListener("click",my,!0),s.removeEventListener("focus",py,!0),s.removeEventListener("blur",gy,!1),typeof PointerEvent<"u"&&(o.removeEventListener("pointerdown",Ki,!0),o.removeEventListener("pointermove",Ki,!0),o.removeEventListener("pointerup",Ki,!0)),ol.delete(s))};function F2(n){const a=ba(n);let s;return a.readyState!=="loading"?Gf(n):(s=()=>{Gf(n)},a.addEventListener("DOMContentLoaded",s)),()=>vy(n,s)}typeof document<"u"&&F2();function Xf(){return bl!=="pointer"}const Z2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Q2(n,a,s){let o=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(o);return n=n||g instanceof d&&!Z2.has(g.type)||g instanceof h||g instanceof p&&g.isContentEditable,!(n&&a==="keyboard"&&s instanceof m&&!X2[s.key])}function P2(n,a,s){Gf(),w.useEffect(()=>{if((s==null?void 0:s.enabled)===!1)return;let o=(u,d)=>{Q2(!!(s!=null&&s.isTextInput),u,d)&&n(Xf())};return qf.add(o),()=>{qf.delete(o)}},a)}function J2(n){let{isDisabled:a,onFocus:s,onBlur:o,onFocusChange:u}=n;const d=w.useCallback(m=>{if(gt(m)===m.currentTarget)return o&&o(m),u&&u(!1),!0},[o,u]),h=hy(d),p=w.useCallback(m=>{let g=gt(m);const y=ba(g),x=y?Fi(y):Fi();g===m.currentTarget&&g===x&&(s&&s(m),u&&u(!0),h(m))},[u,s,h]);return{focusProps:{onFocus:!a&&(s||u||o)?p:void 0,onBlur:!a&&(o||u)?d:void 0}}}function W2(n){let{isDisabled:a,onBlurWithin:s,onFocusWithin:o,onFocusWithinChange:u}=n,d=w.useRef({isFocusWithin:!1}),{addGlobalListener:h,removeAllGlobalListeners:p}=fy(),m=w.useCallback(x=>{Ka(x.currentTarget,gt(x))&&d.current.isFocusWithin&&!Ka(x.currentTarget,x.relatedTarget)&&(d.current.isFocusWithin=!1,p(),s&&s(x),u&&u(!1))},[s,u,d,p]),g=hy(m),y=w.useCallback(x=>{if(!Ka(x.currentTarget,gt(x)))return;let S=gt(x);const T=ba(S),j=Fi(T);if(!d.current.isFocusWithin&&j===S){o&&o(x),u&&u(!0),d.current.isFocusWithin=!0,g(x);let E=x.currentTarget;h(T,"focus",D=>{let M=gt(D);if(d.current.isFocusWithin&&!Ka(E,M)){let R=new T.defaultView.FocusEvent("blur",{relatedTarget:M});Y2(R,E);let V=dy(R);m(V)}},{capture:!0})}},[o,u,g,h,m]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:m}}}let Kf=!1,Qo=0;function I2(){Kf=!0,setTimeout(()=>{Kf=!1},50)}function bv(n){n.pointerType==="touch"&&I2()}function ew(){if(!(typeof document>"u"))return Qo===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",bv),Qo++,()=>{Qo--,!(Qo>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",bv)}}function yy(n){let{onHoverStart:a,onHoverChange:s,onHoverEnd:o,isDisabled:u}=n,[d,h]=w.useState(!1),p=w.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;w.useEffect(ew,[]);let{addGlobalListener:m,removeAllGlobalListeners:g}=fy(),{hoverProps:y,triggerHoverEnd:x}=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 M=E.currentTarget;p.target=M,m(ba(gt(E)),"pointerover",R=>{p.isHovered&&p.target&&!Ka(p.target,gt(R))&&T(R,R.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:M,pointerType:D}),s&&s(!0),h(!0)},T=(E,D)=>{let M=p.target;p.pointerType="",p.target=null,!(D==="touch"||!p.isHovered||!M)&&(p.isHovered=!1,g(),o&&o({type:"hoverend",target:M,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,o,u,p,m,g]);return w.useEffect(()=>{u&&x({currentTarget:p.target},p.pointerType)},[u]),{hoverProps:y,isHovered:d}}function xy(n={}){let{autoFocus:a=!1,isTextInput:s,within:o}=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),[]),y=w.useCallback(T=>{u.current.isFocused=T,u.current.isFocusVisible=Xf(),h(T),g()},[g]);P2(T=>{u.current.isFocusVisible=T,g()},[s,d],{enabled:d,isTextInput:s});let{focusProps:x}=J2({isDisabled:o,onFocusChange:y}),{focusWithinProps:S}=W2({isDisabled:!o,onFocusWithinChange:y});return{isFocused:d,isFocusVisible:p,focusProps:o?S:x}}var tw=Object.defineProperty,nw=(n,a,s)=>a in n?tw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,pf=(n,a,s)=>(nw(n,typeof a!="symbol"?a+"":a,s),s);let aw=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 aw;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 by(n){var a,s;return(s=(a=Ff(n))==null?void 0:a.activeElement)!=null?s:null}function iw(n){return by(n)===n}function Or(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(a=>setTimeout(()=>{throw a}))}function Un(){let n=[],a={addEventListener(s,o,u,d){return s.addEventListener(o,u,d),a.add(()=>s.removeEventListener(o,u,d))},requestAnimationFrame(...s){let o=requestAnimationFrame(...s);return a.add(()=>cancelAnimationFrame(o))},nextFrame(...s){return a.requestAnimationFrame(()=>a.requestAnimationFrame(...s))},setTimeout(...s){let o=setTimeout(...s);return a.add(()=>clearTimeout(o))},microTask(...s){let o={current:!0};return Or(()=>{o.current&&s[0]()}),a.add(()=>{o.current=!1})},style(s,o,u){let d=s.style.getPropertyValue(o);return Object.assign(s.style,{[o]:u}),this.add(()=>{Object.assign(s.style,{[o]:d})})},group(s){let o=Un();return s(o),this.add(()=>o.dispose())},add(s){return n.includes(s)||n.push(s),()=>{let o=n.indexOf(s);if(o>=0)for(let u of n.splice(o,1))u()}},dispose(){for(let s of n.splice(0))s()}};return a}function Sl(){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 sw(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 lw(n,a){return!(!n||!a||n.right<a.left||n.left>a.right||n.bottom<a.top||n.top>a.bottom)}function Sy({disabled:n=!1}={}){let a=w.useRef(null),[s,o]=w.useState(!1),u=Sl(),d=Me(()=>{a.current=null,o(!1),u.dispose()}),h=Me(p=>{if(u.dispose(),a.current===null){a.current=p.currentTarget,o(!0);{let m=Wi(p.currentTarget);u.addEventListener(m,"pointerup",d,!1),u.addEventListener(m,"pointermove",g=>{if(a.current){let y=sw(g);o(lw(y,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 ow=w.createContext(void 0);function wy(){return w.useContext(ow)}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 o=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(o,_n),o}var gr=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(gr||{}),ha=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(ha||{});function At(){let n=uw();return w.useCallback(a=>rw({mergeRefs:n,...a}),[n])}function rw({ourProps:n,theirProps:a,slot:s,defaultTag:o,features:u,visible:d=!0,name:h,mergeRefs:p}){p=p??cw;let m=Ty(a,n);if(d)return Po(m,s,o,h,p);let g=u??0;if(g&2){let{static:y=!1,...x}=m;if(y)return Po(x,s,o,h,p)}if(g&1){let{unmount:y=!0,...x}=m;return _n(y?0:1,{0(){return null},1(){return Po({...x,hidden:!0,style:{display:"none"}},s,o,h,p)}})}return Po(m,s,o,h,p)}function Po(n,a={},s,o,u){let{as:d=s,children:h,refName:p="ref",...m}=gf(n,["unmount","static"]),g=n.ref!==void 0?{[p]:n.ref}:{},y=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 x={};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){x["data-headlessui-state"]=T.join(" ");for(let j of T)x[`data-${j}`]=""}}if(rl(d)&&(Object.keys(qa(m)).length>0||Object.keys(qa(x)).length>0))if(!w.isValidElement(y)||Array.isArray(y)&&y.length>1||dw(y)){if(Object.keys(qa(m)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(qa(m)).concat(Object.keys(qa(x))).map(S=>` - ${S}`).join(`
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
+ `)].join(`
52
+ `))}else{let S=y.props,T=S==null?void 0:S.className,j=typeof T=="function"?(...M)=>Zf(T(...M),m.className):Zf(T,m.className),E=j?{className:j}:{},D=Ty(y.props,qa(gf(m,["ref"])));for(let M in x)M in D&&delete x[M];return w.cloneElement(y,Object.assign({},D,x,g,{ref:u(fw(y),g.ref)},E))}return w.createElement(d,Object.assign({},gf(m,["ref"]),!rl(d)&&g,!rl(d)&&x),y)}function uw(){let n=w.useRef([]),a=w.useCallback(s=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(s):o.current=s)},[]);return(...s)=>{if(!s.every(o=>o==null))return n.current=s,a}}function cw(...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 Ty(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},s={};for(let o of n)for(let u in o)u.startsWith("on")&&typeof o[u]=="function"?(s[u]!=null||(s[u]=[]),s[u].push(o[u])):a[u]=o[u];if(a.disabled||a["aria-disabled"])for(let o in s)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(o)&&(s[o]=[u=>{var d;return(d=u==null?void 0:u.preventDefault)==null?void 0:d.call(u)}]);for(let o in s)Object.assign(a,{[o](u,...d){let h=s[o];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 o of n)for(let u in o)u.startsWith("on")&&typeof o[u]=="function"?(s[u]!=null||(s[u]=[]),s[u].push(o[u])):a[u]=o[u];for(let o in s)Object.assign(a,{[o](...u){let d=s[o];for(let h of d)h==null||h(...u)}});return a}function dt(n){var a;return Object.assign(w.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 o of a)o in s&&delete s[o];return s}function fw(n){return ce.version.split(".")[0]>="19"?n.props.ref:n.ref}function rl(n){return n===w.Fragment||n===Symbol.for("react.fragment")}function dw(n){return rl(n.type)}let hw="button";function mw(n,a){var s;let o=wy(),{disabled:u=o||!1,autoFocus:d=!1,...h}=n,{isFocusVisible:p,focusProps:m}=xy({autoFocus:d}),{isHovered:g,hoverProps:y}=yy({isDisabled:u}),{pressed:x,pressProps:S}=Sy({disabled:u}),T=Ad({ref:a,type:(s=h.type)!=null?s:"button",disabled:u||void 0,autoFocus:d},m,y,S),j=ti({disabled:u,hover:g,focus:p,active:x,autofocus:d});return At()({ourProps:T,theirProps:h,slot:j,defaultTag:hw,name:"Button"})}let wl=dt(mw),pw="span";var vr=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(vr||{});function gw(n,a){var s;let{features:o=1,...u}=n,d={ref:a,"aria-hidden":(o&2)===2?!0:(s=u["aria-hidden"])!=null?s:void 0,hidden:(o&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",...(o&4)===4&&(o&2)!==2&&{display:"none"}}};return At()({ourProps:d,theirProps:u,slot:{},defaultTag:pw,name:"Hidden"})}let Qf=dt(gw);function vw(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function ga(n){return vw(n)&&"tagName"in n}function Ia(n){return ga(n)&&"accessKey"in n}function ma(n){return ga(n)&&"tabIndex"in n}function yw(n){return ga(n)&&"style"in n}function xw(n){return Ia(n)&&n.nodeName==="IFRAME"}function bw(n){return Ia(n)&&n.nodeName==="INPUT"}let jy=Symbol();function Sw(n,a=!0){return Object.assign(n,{[jy]:a})}function gn(...n){let a=w.useRef(n);w.useEffect(()=>{a.current=n},[n]);let s=Me(o=>{for(let u of a.current)u!=null&&(typeof u=="function"?u(o):u.current=o)});return n.every(o=>o==null||(o==null?void 0:o[jy]))?void 0:s}let Cd=w.createContext(null);Cd.displayName="DescriptionContext";function Ey(){let n=w.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,Ey),a}return n}function ww(){let[n,a]=w.useState([]);return[n.length>0?n.join(" "):void 0,w.useMemo(()=>function(s){let o=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=w.useMemo(()=>({register:o,slot:s.slot,name:s.name,props:s.props,value:s.value}),[o,s.slot,s.name,s.props,s.value]);return ce.createElement(Cd.Provider,{value:u},s.children)},[a])]}let Tw="p";function jw(n,a){let s=w.useId(),o=wy(),{id:u=`headlessui-description-${s}`,...d}=n,h=Ey(),p=gn(a);Nt(()=>h.register(u),[u,h.register]);let m=ti({...h.slot,disabled:o||!1}),g={ref:p,...h.props,id:u};return At()({ourProps:g,theirProps:d,slot:m,defaultTag:Tw,name:h.name||"Description"})}let Ew=dt(jw),Nw=Object.assign(Ew,{});var Ny=(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))(Ny||{});let Ay=w.createContext(()=>{});function Aw(){return w.useContext(Ay)}function Cw({value:n,children:a}){return ce.createElement(Ay.Provider,{value:n},a)}function Mw(n,a){let s=Aw();return ce.createElement(wl,{ref:a,...Ad({onClick:s},n)})}let Cy=dt(Mw),My=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 Dw=Object.defineProperty,Ow=(n,a,s)=>a in n?Dw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,Rw=(n,a,s)=>(Ow(n,a+"",s),s),Dy=(n,a,s)=>{if(!a.has(n))throw TypeError("Cannot "+s)},Qt=(n,a,s)=>(Dy(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)},Sv=(n,a,s,o)=>(Dy(n,a,"write to private field"),a.set(n,s),s),cn,tl,nl;let zw=class{constructor(a){vf(this,cn,{}),vf(this,tl,new My(()=>new Set)),vf(this,nl,new Set),Rw(this,"disposables",Un()),Sv(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 o={selector:a,callback:s,current:a(Qt(this,cn))};return Qt(this,nl).add(o),this.disposables.add(()=>{Qt(this,nl).delete(o)})}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)){Sv(this,cn,s);for(let o of Qt(this,nl)){let u=o.selector(Qt(this,cn));Oy(o.current,u)||(o.current=u,o.callback(u))}for(let o of Qt(this,tl).get(a.type))o(Qt(this,cn),a)}}};cn=new WeakMap,tl=new WeakMap,nl=new WeakMap;function Oy(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:yf(n[Symbol.iterator](),a[Symbol.iterator]()):n instanceof Map&&a instanceof Map||n instanceof Set&&a instanceof Set?n.size!==a.size?!1:yf(n.entries(),a.entries()):wv(n)&&wv(a)?yf(Object.entries(n)[Symbol.iterator](),Object.entries(a)[Symbol.iterator]()):!1}function yf(n,a){do{let s=n.next(),o=a.next();if(s.done&&o.done)return!0;if(s.done||o.done||!Object.is(s.value,o.value))return!1}while(!0)}function wv(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let a=Object.getPrototypeOf(n);return a===null||Object.getPrototypeOf(a)===null}var kw=Object.defineProperty,Lw=(n,a,s)=>a in n?kw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,Tv=(n,a,s)=>(Lw(n,typeof a!="symbol"?a+"":a,s),s),Vw=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(Vw||{});let _w={0(n,a){let s=a.id,o=n.stack,u=n.stack.indexOf(s);if(u!==-1){let d=n.stack.slice();return d.splice(u,1),d.push(s),o=d,{...n,stack:o}}return{...n,stack:[...n.stack,s]}},1(n,a){let s=a.id,o=n.stack.indexOf(s);if(o===-1)return n;let u=n.stack.slice();return u.splice(o,1),{...n,stack:u}}},Uw=class Ry extends zw{constructor(){super(...arguments),Tv(this,"actions",{push:a=>this.send({type:0,id:a}),pop:a=>this.send({type:1,id:a})}),Tv(this,"selectors",{isTop:(a,s)=>a.stack[a.stack.length-1]===s,inStack:(a,s)=>a.stack.includes(s)})}static new(){return new Ry({stack:[]})}reduce(a,s){return _n(s.type,_w,a,s)}};const zy=new My(()=>Uw.new());var xf={exports:{}},bf={};/**
53
+ * @license React
54
+ * use-sync-external-store-with-selector.production.js
55
+ *
56
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
57
+ *
58
+ * This source code is licensed under the MIT license found in the
59
+ * LICENSE file in the root directory of this source tree.
60
+ */var jv;function Bw(){if(jv)return bf;jv=1;var n=Mr();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,o=n.useSyncExternalStore,u=n.useRef,d=n.useEffect,h=n.useMemo,p=n.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(m,g,y,x,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(!M){if(M=!0,R=U,U=x(U),S!==void 0&&j.hasValue){var P=j.value;if(S(P,U))return V=P}return V=U}if(P=V,s(R,U))return P;var F=x(U);return S!==void 0&&S(P,F)?(R=U,P):(R=U,V=F)}var M=!1,R,V,z=y===void 0?null:y;return[function(){return D(g())},z===null?void 0:function(){return D(z())}]},[g,y,x,S]);var E=o(m,T[0],T[1]);return d(function(){j.hasValue=!0,j.value=E},[E]),p(E),E},bf}var Ev;function Hw(){return Ev||(Ev=1,xf.exports=Bw()),xf.exports}var $w=Hw();function ky(n,a,s=Oy){return $w.useSyncExternalStoreWithSelector(Me(o=>n.subscribe(qw,o)),Me(()=>n.state),Me(()=>n.state),Me(a),s)}function qw(n){return n}function Tl(n,a){let s=w.useId(),o=zy.get(a),[u,d]=ky(o,w.useCallback(h=>[o.selectors.isTop(h,s),o.selectors.inStack(h,s)],[o,s]));return Nt(()=>{if(n)return o.actions.push(s),()=>o.actions.pop(s)},[o,n,s]),n?d?u:!0:!1}let Pf=new Map,ul=new Map;function Nv(n){var a;let s=(a=ul.get(n))!=null?a:0;return ul.set(n,s+1),s!==0?()=>Av(n):(Pf.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>Av(n))}function Av(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 o=Pf.get(n);o&&(o["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",o["aria-hidden"]),n.inert=o.inert,Pf.delete(n))}function Yw(n,{allowed:a,disallowed:s}={}){let o=Tl(n,"inert-others");Nt(()=>{var u,d;if(!o)return;let h=Un();for(let m of(u=s==null?void 0:s())!=null?u:[])m&&h.add(Nv(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 y=m.parentElement;for(;y&&y!==g.body;){for(let x of y.children)p.some(S=>x.contains(S))||h.add(Nv(x));y=y.parentElement}}return h.dispose},[o,a,s])}function Gw(n,a,s){let o=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(()=>o.current(u));h.observe(u),d.add(()=>h.disconnect())}if(typeof IntersectionObserver<"u"){let h=new IntersectionObserver(()=>o.current(u));h.observe(u),d.add(()=>h.disconnect())}return()=>d.dispose()},[a,o,n])}let yr=["[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(","),Xw=["[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||{}),Kw=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Kw||{});function Fw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(yr)).sort((a,s)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(s.tabIndex||Number.MAX_SAFE_INTEGER)))}function Zw(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Xw)).sort((a,s)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(s.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ly=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Ly||{});function Qw(n,a=0){var s;return n===((s=Wi(n))==null?void 0:s.body)?!1:_n(a,{0(){return n.matches(yr)},1(){let o=n;for(;o!==null;){if(o.matches(yr))return!0;o=o.parentElement}return!1}})}var Pw=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Pw||{});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 Jw=["textarea","input"].join(",");function Ww(n){var a,s;return(s=(a=n==null?void 0:n.matches)==null?void 0:a.call(n,Jw))!=null?s:!1}function Iw(n,a=s=>s){return n.slice().sort((s,o)=>{let u=a(s),d=a(o);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:o=null,skipElements:u=[]}={}){let d=Array.isArray(n)?n.length>0?Ff(n[0]):document:Ff(n),h=Array.isArray(n)?s?Iw(n):n:a&64?Zw(n):Fw(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))),o=o??(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(o))-1;if(a&4)return Math.max(0,h.indexOf(o))+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}:{},y=0,x=h.length,S;do{if(y>=x||y+x<=0)return 0;let T=m+y;if(a&16)T=(T+x)%x;else{if(T<0)return 3;if(T>=x)return 1}S=h[T],S==null||S.focus(g),y+=p}while(S!==by(S));return a&6&&Ww(S)&&S.select(),2}function Vy(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function eT(){return/Android/gi.test(window.navigator.userAgent)}function Cv(){return Vy()||eT()}function Jo(n,a,s,o){let u=ei(s);w.useEffect(()=>{if(!n)return;function d(h){u.current(h)}return document.addEventListener(a,d,o),()=>document.removeEventListener(a,d,o)},[n,a,o])}function _y(n,a,s,o){let u=ei(s);w.useEffect(()=>{if(!n)return;function d(h){u.current(h)}return window.addEventListener(a,d,o),()=>window.removeEventListener(a,d,o)},[n,a,o])}const Mv=30;function tT(n,a,s){let o=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 y=(function x(S){return typeof S=="function"?x(S()):Array.isArray(S)||S instanceof Set?S:[S]})(a);for(let x of y)if(x!==null&&(x.contains(g)||p.composed&&p.composedPath().includes(x)))return;return!Qw(g,Ly.Loose)&&g.tabIndex!==-1&&p.preventDefault(),o.current(p,g)},[o,a]),d=w.useRef(null);Jo(n,"pointerdown",p=>{var m,g;Cv()||(d.current=((g=(m=p.composedPath)==null?void 0:m.call(p))==null?void 0:g[0])||p.target)},!0),Jo(n,"pointerup",p=>{if(Cv()||!d.current)return;let m=d.current;return d.current=null,u(p,()=>m)},!0);let h=w.useRef({x:0,y:0});Jo(n,"touchstart",p=>{h.current.x=p.touches[0].clientX,h.current.y=p.touches[0].clientY},!0),Jo(n,"touchend",p=>{let m={x:p.changedTouches[0].clientX,y:p.changedTouches[0].clientY};if(!(Math.abs(m.x-h.current.x)>=Mv||Math.abs(m.y-h.current.y)>=Mv))return u(p,()=>ma(p.target)?p.target:null)},!0),_y(n,"blur",p=>u(p,()=>xw(window.document.activeElement)?window.document.activeElement:null),!0)}function Md(...n){return w.useMemo(()=>Wi(...n),[...n])}function Uy(n,a,s,o){let u=ei(s);w.useEffect(()=>{n=n??window;function d(h){u.current(h)}return n.addEventListener(a,d,o),()=>n.removeEventListener(a,d,o)},[n,a,o])}function nT(n){return w.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function aT(n,a){let s=n(),o=new Set;return{getSnapshot(){return s},subscribe(u){return o.add(u),()=>o.delete(u)},dispatch(u,...d){let h=a[u].call(s,...d);h&&(s=h,o.forEach(p=>p()))}}}function iT(){let n;return{before({doc:a}){var s;let o=a.documentElement,u=(s=a.defaultView)!=null?s:window;n=Math.max(0,u.innerWidth-o.clientWidth)},after({doc:a,d:s}){let o=a.documentElement,u=Math.max(0,o.clientWidth-o.offsetWidth),d=Math.max(0,n-u);s.style(o,"paddingRight",`${d}px`)}}}function sT(){return Vy()?{before({doc:n,d:a,meta:s}){function o(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),y=n.querySelector(g);ma(y)&&!o(y)&&(h=y)}catch{}},!0),a.group(p=>{a.addEventListener(n,"touchstart",m=>{if(p.dispose(),ma(m.target)&&yw(m.target))if(o(m.target)){let g=m.target;for(;g.parentElement&&o(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(bw(p.target))return;if(o(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 lT(){return{before({doc:n,d:a}){a.style(n.documentElement,"overflow","hidden")}}}function Dv(n){let a={};for(let s of n)Object.assign(a,s(a));return a}let Fa=aT(()=>new Map,{PUSH(n,a){var s;let o=(s=this.get(n))!=null?s:{doc:n,count:0,d:Un(),meta:new Set,computedMeta:{}};return o.count++,o.meta.add(a),o.computedMeta=Dv(o.meta),this.set(n,o),this},POP(n,a){let s=this.get(n);return s&&(s.count--,s.meta.delete(a),s.computedMeta=Dv(s.meta)),this},SCROLL_PREVENT(n){let a={doc:n.doc,d:n.d,meta(){return n.computedMeta}},s=[sT(),iT(),lT()];s.forEach(({before:o})=>o==null?void 0:o(a)),s.forEach(({after:o})=>o==null?void 0:o(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 o=a.get(s.doc)==="hidden",u=s.count!==0;(u&&!o||!u&&o)&&Fa.dispatch(s.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",s),s.count===0&&Fa.dispatch("TEARDOWN",s)}});function oT(n,a,s=()=>({containers:[]})){let o=nT(Fa),u=a?o.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 rT(n,a,s=()=>[document.body]){let o=Tl(n,"scroll-lock");oT(o,a,u=>{var d;return{containers:[...(d=u.containers)!=null?d:[],s]}})}function uT(n=0){let[a,s]=w.useState(n),o=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:o,addFlag:u,hasFlag:d,removeFlag:h,toggleFlag:p}}var cT={},Ov,Rv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ov=process==null?void 0:cT)==null?void 0:Ov.NODE_ENV)==="test"&&typeof((Rv=Element==null?void 0:Element.prototype)==null?void 0:Rv.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 fT=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(fT||{});function dT(n){let a={};for(let s in n)n[s]===!0&&(a[`data-${s}`]="");return a}function hT(n,a,s,o){let[u,d]=w.useState(s),{hasFlag:h,addFlag:p,removeFlag:m}=uT(n&&u?3:0),g=w.useRef(!1),y=w.useRef(!1),x=Sl();return Nt(()=>{var S;if(n){if(s&&d(!0),!a){s&&p(3);return}return(S=o==null?void 0:o.start)==null||S.call(o,s),mT(a,{inFlight:g,prepare(){y.current?y.current=!1:y.current=g.current,g.current=!0,!y.current&&(s?(p(3),m(4)):(p(4),m(2)))},run(){y.current?s?(m(3),p(4)):(m(4),p(3)):s?m(1):p(1)},done(){var T;y.current&&vT(a)||(g.current=!1,m(7),s||d(!1),(T=o==null?void 0:o.end)==null||T.call(o,s))}})}},[n,s,a,x]),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 mT(n,{prepare:a,run:s,done:o,inFlight:u}){let d=Un();return gT(n,{prepare:a,inFlight:u}),d.nextFrame(()=>{s(),d.requestAnimationFrame(()=>{d.add(pT(n,o))})}),d.dispose}function pT(n,a){var s,o;let u=Un();if(!n)return u.dispose;let d=!1;u.add(()=>{d=!0});let h=(o=(s=n.getAnimations)==null?void 0:s.call(n).filter(p=>p instanceof CSSTransition))!=null?o:[];return h.length===0?(a(),u.dispose):(Promise.allSettled(h.map(p=>p.finished)).then(()=>{d||a()}),u.dispose)}function gT(n,{inFlight:a,prepare:s}){if(a!=null&&a.current){s();return}let o=n.style.transition;n.style.transition="none",s(),n.offsetHeight,n.style.transition=o}function vT(n){var a,s;return((s=(a=n.getAnimations)==null?void 0:a.call(n))!=null?s:[]).some(o=>o instanceof CSSTransition&&o.playState!=="finished")}function Dd(n,a){let s=w.useRef([]),o=Me(n);w.useEffect(()=>{let u=[...s.current];for(let[d,h]of a.entries())if(s.current[d]!==h){let p=o(a,u);return s.current=a,p}},[o,...a])}let Rr=w.createContext(null);Rr.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 zr(){return w.useContext(Rr)}function yT({value:n,children:a}){return ce.createElement(Rr.Provider,{value:n},a)}function xT({children:n}){return ce.createElement(Rr.Provider,{value:null},n)}function bT(n){function a(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let da=[];bT(()=>{function n(a){if(!ma(a.target)||a.target===document.body||da[0]===a.target)return;let s=a.target;s=s.closest(yr),da.unshift(s??a.target),da=da.filter(o=>o!=null&&o.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 By(n){let a=Me(n),s=w.useRef(!1);w.useEffect(()=>(s.current=!1,()=>{s.current=!0,Or(()=>{s.current&&a()})}),[a])}let Hy=w.createContext(!1);function ST(){return w.useContext(Hy)}function zv(n){return ce.createElement(Hy.Provider,{value:n.force},n.children)}function wT(n){let a=ST(),s=w.useContext(qy),[o,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(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),w.useEffect(()=>{a||s!==null&&u(s.current)},[s,u,a]),o}let $y=w.Fragment,TT=dt(function(n,a){let{ownerDocument:s=null,...o}=n,u=w.useRef(null),d=gn(Sw(S=>{u.current=S}),a),h=Md(u.current),p=s??h,m=wT(p),g=w.useContext(Wf),y=Sl(),x=At();return By(()=>{var S;m&&m.childNodes.length<=0&&((S=m.parentElement)==null||S.removeChild(m))}),m?q2.createPortal(ce.createElement("div",{"data-headlessui-portal":"",ref:S=>{y.dispose(),g&&S&&y.add(g.register(S))}},x({ourProps:{ref:d},theirProps:o,slot:{},defaultTag:$y,name:"Portal"})),m):null});function jT(n,a){let s=gn(a),{enabled:o=!0,ownerDocument:u,...d}=n,h=At();return o?ce.createElement(TT,{...d,ownerDocument:u,ref:s}):h({ourProps:{ref:s},theirProps:d,slot:{},defaultTag:$y,name:"Portal"})}let ET=w.Fragment,qy=w.createContext(null);function NT(n,a){let{target:s,...o}=n,u={ref:gn(a)},d=At();return ce.createElement(qy.Provider,{value:s},d({ourProps:u,theirProps:o,defaultTag:ET,name:"Popover.Group"}))}let Wf=w.createContext(null);function AT(){let n=w.useContext(Wf),a=w.useRef([]),s=Me(d=>(a.current.push(d),n&&n.register(d),()=>o(d))),o=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:o,portals:a}),[s,o,a]);return[a,w.useMemo(()=>function({children:d}){return ce.createElement(Wf.Provider,{value:u},d)},[u])]}let CT=dt(jT),Yy=dt(NT),MT=Object.assign(CT,{Group:Yy}),DT=w.Fragment;function OT(n,a){let{...s}=n,o=!1,{isFocusVisible:u,focusProps:d}=xy(),{isHovered:h,hoverProps:p}=yy({isDisabled:o}),{pressed:m,pressProps:g}=Sy({disabled:o}),y=Ad({ref:a},d,p,g),x=ti({hover:h,focus:u,active:m});return At()({ourProps:y,theirProps:s,slot:x,defaultTag:DT,name:"DataInteractive"})}let RT=dt(OT);function zT(n,a=typeof document<"u"?document.defaultView:null,s){let o=Tl(n,"escape");Uy(a,"keydown",u=>{o&&(u.defaultPrevented||u.key===Ny.Escape&&s(u))})}function kT(){var n;let[a]=w.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[s,o]=w.useState((n=a==null?void 0:a.matches)!=null?n:!1);return Nt(()=>{if(!a)return;function u(d){o(d.matches)}return a.addEventListener("change",u),()=>a.removeEventListener("change",u)},[a]),s}function LT({defaultContainers:n=[],portals:a,mainTreeNode:s}={}){let o=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:o,contains:Me(u=>o().some(d=>d.contains(u)))}}let Gy=w.createContext(null);function kv({children:n,node:a}){let[s,o]=w.useState(null),u=Xy(a??s);return ce.createElement(Gy.Provider,{value:u},n,u===null&&ce.createElement(Qf,{features:vr.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)){o(m);break}}}}))}function Xy(n=null){var a;return(a=w.useContext(Gy))!=null?a:n}function VT(){let n=typeof document>"u";return"useSyncExternalStore"in hv?(a=>a.useSyncExternalStore)(hv)(()=>()=>{},()=>!1,()=>!n):!1}function kr(){let n=VT(),[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 _T(){let n=w.useRef(0);return _y(!0,"keydown",a=>{a.key==="Tab"&&(n.current=a.shiftKey?1:0)},!0),n}function Ky(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 UT="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 BT(n,a){let s=w.useRef(null),o=gn(s,a),{initialFocus:u,initialFocusFallback:d,containers:h,features:p=15,...m}=n;kr()||(p=0);let g=Md(s.current);YT(p,{ownerDocument:g});let y=GT(p,{ownerDocument:g,container:s,initialFocus:u,initialFocusFallback:d});XT(p,{ownerDocument:g,container:s,containers:h,previousActiveElement:y});let x=_T(),S=Me(R=>{if(!Ia(s.current))return;let V=s.current;(z=>z())(()=>{_n(x.current,{[al.Forwards]:()=>{cl(V,Ln.First,{skipElements:[R.relatedTarget,d]})},[al.Backwards]:()=>{cl(V,Ln.Last,{skipElements:[R.relatedTarget,d]})}})})}),T=Tl(!!(p&2),"focus-trap#tab-lock"),j=Sl(),E=w.useRef(!1),D={ref:o,onKeyDown(R){R.key=="Tab"&&(E.current=!0,j.requestAnimationFrame(()=>{E.current=!1}))},onBlur(R){if(!(p&4))return;let V=Ky(h);Ia(s.current)&&V.add(s.current);let z=R.relatedTarget;ma(z)&&z.dataset.headlessuiFocusGuard!=="true"&&(Fy(V,z)||(E.current?cl(s.current,_n(x.current,{[al.Forwards]:()=>Ln.Next,[al.Backwards]:()=>Ln.Previous})|Ln.WrapAround,{relativeTo:R.target}):ma(R.target)&&Vn(R.target)))}},M=At();return ce.createElement(ce.Fragment,null,T&&ce.createElement(Qf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:vr.Focusable}),M({ourProps:D,theirProps:m,defaultTag:UT,name:"FocusTrap"}),T&&ce.createElement(Qf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:vr.Focusable}))}let HT=dt(BT),$T=Object.assign(HT,{features:Ga});function qT(n=!0){let a=w.useRef(da.slice());return Dd(([s],[o])=>{o===!0&&s===!1&&Or(()=>{a.current.splice(0)}),o===!1&&s===!0&&(a.current=da.slice())},[n,da,a]),Me(()=>{var s;return(s=a.current.find(o=>o!=null&&o.isConnected))!=null?s:null})}function YT(n,{ownerDocument:a}){let s=!!(n&8),o=qT(s);Dd(()=>{s||iw(a==null?void 0:a.body)&&Vn(o())},[s]),By(()=>{s&&Vn(o())})}function GT(n,{ownerDocument:a,container:s,initialFocus:o,initialFocusFallback:u}){let d=w.useRef(null),h=Tl(!!(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&&Or(()=>{if(!p.current)return;let g=a==null?void 0:a.activeElement;if(o!=null&&o.current){if((o==null?void 0:o.current)===g){d.current=g;return}}else if(m.contains(g)){d.current=g;return}if(o!=null&&o.current)Vn(o.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 XT(n,{ownerDocument:a,container:s,containers:o,previousActiveElement:u}){let d=Od(),h=!!(n&4);Uy(a==null?void 0:a.defaultView,"focus",p=>{if(!h||!d.current)return;let m=Ky(o);Ia(s.current)&&m.add(s.current);let g=u.current;if(!g)return;let y=p.target;Ia(y)?Fy(m,y)?(u.current=y,Vn(y)):(p.preventDefault(),p.stopPropagation(),Vn(g)):Vn(u.current)},!0)}function Fy(n,a){for(let s of n)if(s.contains(a))return!0;return!1}function Zy(n){var a;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!rl((a=n.as)!=null?a:Py)||ce.Children.count(n.children)===1}let Lr=w.createContext(null);Lr.displayName="TransitionContext";var KT=(n=>(n.Visible="visible",n.Hidden="hidden",n))(KT||{});function FT(){let n=w.useContext(Lr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function ZT(){let n=w.useContext(Vr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Vr=w.createContext(null);Vr.displayName="NestingContext";function _r(n){return"children"in n?_r(n.children):n.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function Qy(n,a){let s=ei(n),o=w.useRef([]),u=Od(),d=Sl(),h=Me((T,j=ha.Hidden)=>{let E=o.current.findIndex(({el:D})=>D===T);E!==-1&&(_n(j,{[ha.Unmount](){o.current.splice(E,1)},[ha.Hidden](){o.current[E].state="hidden"}}),d.microTask(()=>{var D;!_r(o)&&u.current&&((D=s.current)==null||D.call(s))}))}),p=Me(T=>{let j=o.current.find(({el:E})=>E===T);return j?j.state!=="visible"&&(j.state="visible"):o.current.push({el:T,state:"visible"}),()=>h(T,ha.Unmount)}),m=w.useRef([]),g=w.useRef(Promise.resolve()),y=w.useRef({enter:[],leave:[]}),x=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(y.current[j].map(([M,R])=>R)).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(y.current[j].splice(0).map(([D,M])=>M)).then(()=>{var D;(D=m.current.shift())==null||D()}).then(()=>E(j))});return w.useMemo(()=>({children:o,register:p,unregister:h,onStart:x,onStop:S,wait:g,chains:y}),[p,h,o,x,S,y,g])}let Py=w.Fragment,Jy=gr.RenderStrategy;function QT(n,a){var s,o;let{transition:u=!0,beforeEnter:d,afterEnter:h,beforeLeave:p,afterLeave:m,enter:g,enterFrom:y,enterTo:x,entered:S,leave:T,leaveFrom:j,leaveTo:E,...D}=n,[M,R]=w.useState(null),V=w.useRef(null),z=Zy(n),U=gn(...z?[V,a,R]:a===null?[]:[a]),P=(s=D.unmount)==null||s?ha.Unmount:ha.Hidden,{show:F,appear:W,initial:oe}=FT(),[B,Z]=w.useState(F?"visible":"hidden"),ie=ZT(),{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=kr();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 $=oe&&!W,Q=W&&F&&oe,J=w.useRef(!1),re=Qy(()=>{J.current||(Z("hidden"),Se(V))},ie),me=Me(Te=>{J.current=!0;let Ze=Te?"enter":"leave";re.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,re.onStop(V,Ze,Le=>{Le==="enter"?h==null||h():Le==="leave"&&(m==null||m())}),Ze==="leave"&&!_r(re)&&(Z("hidden"),Se(V))});w.useEffect(()=>{z&&u||(me(F),A(F))},[F,z,u]);let G=!(!u||!z||!De||$),[,K]=hT(G,M,F,{start:me,end:A}),I=qa({ref:U,className:((o=Zf(D.className,Q&&g,Q&&y,K.enter&&g,K.enter&&K.closed&&y,K.enter&&!K.closed&&x,K.leave&&T,K.leave&&!K.closed&&j,K.leave&&K.closed&&E,!K.transition&&F&&S))==null?void 0:o.trim())||void 0,...dT(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(Vr.Provider,{value:re},ce.createElement(yT,{value:ue},pe({ourProps:I,theirProps:D,defaultTag:Py,features:Jy,visible:B==="visible",name:"Transition.Child"})))}function PT(n,a){let{show:s,appear:o=!1,unmount:u=!0,...d}=n,h=w.useRef(null),p=Zy(n),m=gn(...p?[h,a]:a===null?[]:[a]);kr();let g=zr();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[y,x]=w.useState(s?"visible":"hidden"),S=Qy(()=>{s||x("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:o,initial:T}),[s,o,T]);Nt(()=>{s?x("visible"):!_r(S)&&h.current!==null&&x("hidden")},[s,S]);let M={unmount:u},R=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(Vr.Provider,{value:S},ce.createElement(Lr.Provider,{value:D},z({ourProps:{...M,as:w.Fragment,children:ce.createElement(Wy,{ref:m,...M,...d,beforeEnter:R,beforeLeave:V})},theirProps:{},defaultTag:w.Fragment,features:Jy,visible:y==="visible",name:"Transition"})))}function JT(n,a){let s=w.useContext(Lr)!==null,o=zr()!==null;return ce.createElement(ce.Fragment,null,!s&&o?ce.createElement(If,{ref:a,...n}):ce.createElement(Wy,{ref:a,...n}))}let If=dt(PT),Wy=dt(QT),Rd=dt(JT),WT=Object.assign(If,{Child:Rd,Root:If});var IT=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(IT||{}),ej=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(ej||{});let tj={0(n,a){return n.titleId===a.id?n:{...n,titleId:a.id}}},zd=w.createContext(null);zd.displayName="DialogContext";function Ur(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,Ur),s}return a}function nj(n,a){return _n(a.type,tj,n,a)}let Lv=dt(function(n,a){let s=w.useId(),{id:o=`headlessui-dialog-${s}`,open:u,onClose:d,initialFocus:h,role:p="dialog",autoFocus:m=!0,__demoMode:g=!1,unmount:y=!1,...x}=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=zr();u===void 0&&T!==null&&(u=(T&an.Open)===an.Open);let j=w.useRef(null),E=gn(j,a),D=Md(j.current),M=u?0:1,[R,V]=w.useReducer(nj,{titleId:null,descriptionId:null,panelRef:w.createRef()}),z=Me(()=>d(!1)),U=Me(K=>V({type:0,id:K})),P=kr()?M===0:!1,[F,W]=AT(),oe={get current(){var K;return(K=R.panelRef.current)!=null?K:j.current}},B=Xy(),{resolveContainers:Z}=LT({mainTreeNode:B,portals:F,defaultContainers:[oe]}),ie=T!==null?(T&an.Closing)===an.Closing:!1;Yw(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=zy.get(null);Nt(()=>{if(P)return le.actions.push(o),()=>le.actions.pop(o)},[le,o,P]);let Se=ky(le,w.useCallback(K=>le.selectors.isTop(K,o),[le,o]));tT(Se,Z,K=>{K.preventDefault(),z()}),zT(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()}),rT(g||ie?!1:P,D,Z),Gw(P,j,z);let[De,$]=ww(),Q=w.useMemo(()=>[{dialogState:M,close:z,setTitleId:U,unmount:y},R],[M,z,U,y,R]),J=ti({open:M===0}),re={ref:E,id:o,role:p,tabIndex:-1,"aria-modal":g?void 0:M===0?!0:void 0,"aria-labelledby":R.titleId,"aria-describedby":De,unmount:y},me=!kT(),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(xT,null,ce.createElement(zv,{force:!0},ce.createElement(MT,null,ce.createElement(zd.Provider,{value:Q},ce.createElement(Yy,{target:j},ce.createElement(zv,{force:!1},ce.createElement($,{slot:J},ce.createElement(W,null,ce.createElement($T,{initialFocus:h,initialFocusFallback:j,containers:Z,features:A},ce.createElement(Cw,{value:z},G({ourProps:re,theirProps:x,slot:J,defaultTag:aj,features:ij,visible:M===0,name:"Dialog"})))))))))))}),aj="div",ij=gr.RenderStrategy|gr.Static;function sj(n,a){let{transition:s=!1,open:o,...u}=n,d=zr(),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(o!==void 0||s)&&!u.static?ce.createElement(kv,null,ce.createElement(WT,{show:o,transition:s,unmount:u.unmount},ce.createElement(Lv,{ref:a,...u}))):ce.createElement(kv,null,ce.createElement(Lv,{ref:a,open:o,...u}))}let lj="div";function oj(n,a){let s=w.useId(),{id:o=`headlessui-dialog-panel-${s}`,transition:u=!1,...d}=n,[{dialogState:h,unmount:p},m]=Ur("Dialog.Panel"),g=gn(a,m.panelRef),y=ti({open:h===0}),x=Me(D=>{D.stopPropagation()}),S={ref:g,id:o,onClick:x},T=u?Rd:w.Fragment,j=u?{unmount:p}:{},E=At();return ce.createElement(T,{...j},E({ourProps:S,theirProps:d,slot:y,defaultTag:lj,name:"Dialog.Panel"}))}let rj="div";function uj(n,a){let{transition:s=!1,...o}=n,[{dialogState:u,unmount:d}]=Ur("Dialog.Backdrop"),h=ti({open:u===0}),p={ref:a,"aria-hidden":!0},m=s?Rd:w.Fragment,g=s?{unmount:d}:{},y=At();return ce.createElement(m,{...g},y({ourProps:p,theirProps:o,slot:h,defaultTag:rj,name:"Dialog.Backdrop"}))}let cj="h2";function fj(n,a){let s=w.useId(),{id:o=`headlessui-dialog-title-${s}`,...u}=n,[{dialogState:d,setTitleId:h}]=Ur("Dialog.Title"),p=gn(a);w.useEffect(()=>(h(o),()=>h(null)),[o,h]);let m=ti({open:d===0}),g={ref:p,id:o};return At()({ourProps:g,theirProps:u,slot:m,defaultTag:cj,name:"Dialog.Title"})}let dj=dt(sj),Iy=dt(oj),hj=dt(uj),mj=dt(fj),pj=Object.assign(dj,{Panel:Iy,Title:mj,Description:Nw});const xr=w.createContext({});function gj(n){const a=w.useRef(null);return a.current===null&&(a.current=n()),a.current}const vj=typeof window<"u",ex=vj?w.useLayoutEffect:w.useEffect,kd=w.createContext(null);function Ld(n,a){n.indexOf(a)===-1&&n.push(a)}function br(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={},tx=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function nx(n){return typeof n=="object"&&n!==null}const ax=n=>/^0[^.\s]+$/u.test(n);function ix(n){let a;return()=>(a===void 0&&(a=n()),a)}const Jt=n=>n,yj=(n,a)=>s=>a(n(s)),jl=(...n)=>n.reduce(yj),gl=(n,a,s)=>{const o=a-n;return o===0?1:(s-n)/o};class _d{constructor(){this.subscriptions=[]}add(a){return Ld(this.subscriptions,a),()=>br(this.subscriptions,a)}notify(a,s,o){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](a,s,o);else for(let d=0;d<u;d++){const h=this.subscriptions[d];h&&h(a,s,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ut=n=>n*1e3,Pt=n=>n/1e3;function sx(n,a){return a?n*(1e3/a):0}const lx=(n,a,s)=>(((1-3*s+3*a)*n+(3*s-6*a))*n+3*a)*n,xj=1e-7,bj=12;function Sj(n,a,s,o,u){let d,h,p=0;do h=a+(s-a)/2,d=lx(h,o,u)-n,d>0?s=h:a=h;while(Math.abs(d)>xj&&++p<bj);return h}function El(n,a,s,o){if(n===a&&s===o)return Jt;const u=d=>Sj(d,0,1,n,s);return d=>d===0||d===1?d:lx(u(d),a,o)}const ox=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,rx=n=>a=>1-n(1-a),ux=El(.33,1.53,.69,.99),Ud=rx(ux),cx=ox(Ud),fx=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)),dx=rx(Bd),hx=ox(Bd),wj=El(.42,0,1,1),Tj=El(0,0,.58,1),mx=El(.42,0,.58,1),jj=n=>Array.isArray(n)&&typeof n[0]!="number",px=n=>Array.isArray(n)&&typeof n[0]=="number",Ej={linear:Jt,easeIn:wj,easeInOut:mx,easeOut:Tj,circIn:Bd,circInOut:hx,circOut:dx,backIn:Ud,backInOut:cx,backOut:ux,anticipate:fx},Nj=n=>typeof n=="string",Vv=n=>{if(px(n)){Vd(n.length===4);const[a,s,o,u]=n;return El(a,s,o,u)}else if(Nj(n))return Ej[n];return n},Wo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Aj(n,a){let s=new Set,o=new Set,u=!1,d=!1;const h=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function m(y){h.has(y)&&(g.schedule(y),n()),y(p)}const g={schedule:(y,x=!1,S=!1)=>{const j=S&&u?s:o;return x&&h.add(y),j.add(y),y},cancel:y=>{o.delete(y),h.delete(y)},process:y=>{if(p=y,u){d=!0;return}u=!0;const x=s;s=o,o=x,s.forEach(m),s.clear(),u=!1,d&&(d=!1,g.process(y))}};return g}const Cj=40;function gx(n,a){let s=!1,o=!0;const u={delta:0,timestamp:0,isProcessing:!1},d=()=>s=!0,h=Wo.reduce((V,z)=>(V[z]=Aj(d),V),{}),{setup:p,read:m,resolveKeyframes:g,preUpdate:y,update:x,preRender:S,render:T,postRender:j}=h,E=()=>{const V=va.useManualTiming,z=V?u.timestamp:performance.now();s=!1,V||(u.delta=o?1e3/60:Math.max(Math.min(z-u.timestamp,Cj),1)),u.timestamp=z,u.isProcessing=!0,p.process(u),m.process(u),g.process(u),y.process(u),x.process(u),S.process(u),T.process(u),j.process(u),u.isProcessing=!1,s&&a&&(o=!1,n(E))},D=()=>{s=!0,o=!0,u.isProcessing||n(E)};return{schedule:Wo.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<Wo.length;z++)h[Wo[z]].cancel(V)},state:u,steps:h}}const{schedule:ke,cancel:ya,state:ct,steps:Sf}=gx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Jt,!0);let or;function Mj(){or=void 0}const vt={now:()=>(or===void 0&&vt.set(ct.isProcessing||va.useManualTiming?ct.timestamp:performance.now()),or),set:n=>{or=n,queueMicrotask(Mj)}},vx=n=>a=>typeof a=="string"&&a.startsWith(n),yx=vx("--"),Dj=vx("var(--"),Hd=n=>Dj(n)?Oj.test(n.split("/*")[0].trim()):!1,Oj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function _v(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Ii={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},vl={...Ii,transform:n=>pn(0,1,n)},Io={...Ii,default:1},fl=n=>Math.round(n*1e5)/1e5,$d=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Rj(n){return n==null}const zj=/^(?:#[\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"&&zj.test(s)&&s.startsWith(n)||a&&!Rj(s)&&Object.prototype.hasOwnProperty.call(s,a)),xx=(n,a,s)=>o=>{if(typeof o!="string")return o;const[u,d,h,p]=o.match($d);return{[n]:parseFloat(u),[a]:parseFloat(d),[s]:parseFloat(h),alpha:p!==void 0?parseFloat(p):1}},kj=n=>pn(0,255,n),wf={...Ii,transform:n=>Math.round(kj(n))},Za={test:qd("rgb","red"),parse:xx("red","green","blue"),transform:({red:n,green:a,blue:s,alpha:o=1})=>"rgba("+wf.transform(n)+", "+wf.transform(a)+", "+wf.transform(s)+", "+fl(vl.transform(o))+")"};function Lj(n){let a="",s="",o="",u="";return n.length>5?(a=n.substring(1,3),s=n.substring(3,5),o=n.substring(5,7),u=n.substring(7,9)):(a=n.substring(1,2),s=n.substring(2,3),o=n.substring(3,4),u=n.substring(4,5),a+=a,s+=s,o+=o,u+=u),{red:parseInt(a,16),green:parseInt(s,16),blue:parseInt(o,16),alpha:u?parseInt(u,16)/255:1}}const ed={test:qd("#"),parse:Lj,transform:Za.transform},Nl=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),ca=Nl("deg"),mn=Nl("%"),te=Nl("px"),Vj=Nl("vh"),_j=Nl("vw"),Uv={...mn,parse:n=>mn.parse(n)/100,transform:n=>mn.transform(n*100)},qi={test:qd("hsl","hue"),parse:xx("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:s,alpha:o=1})=>"hsla("+Math.round(n)+", "+mn.transform(fl(a))+", "+mn.transform(fl(s))+", "+fl(vl.transform(o))+")"},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)}},Uj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Bj(n){var a,s;return isNaN(n)&&typeof n=="string"&&(((a=n.match($d))==null?void 0:a.length)||0)+(((s=n.match(Uj))==null?void 0:s.length)||0)>0}const bx="number",Sx="color",Hj="var",$j="var(",Bv="${}",qj=/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=[],o={color:[],number:[],var:[]},u=[];let d=0;const p=a.replace(qj,m=>(Ie.test(m)?(o.color.push(d),u.push(Sx),s.push(Ie.parse(m))):m.startsWith($j)?(o.var.push(d),u.push(Hj),s.push(m)):(o.number.push(d),u.push(bx),s.push(parseFloat(m))),++d,Bv)).split(Bv);return{values:s,split:p,indexes:o,types:u}}function Yj(n){return Zi(n).values}function wx({split:n,types:a}){const s=n.length;return o=>{let u="";for(let d=0;d<s;d++)if(u+=n[d],o[d]!==void 0){const h=a[d];h===bx?u+=fl(o[d]):h===Sx?u+=Ie.transform(o[d]):u+=o[d]}return u}}function Gj(n){return wx(Zi(n))}const Xj=n=>typeof n=="number"?0:Ie.test(n)?Ie.getAnimatableNone(n):n,Kj=(n,a)=>typeof n=="number"?a!=null&&a.trim().endsWith("/")?n:0:Xj(n);function Fj(n){const a=Zi(n);return wx(a)(a.values.map((o,u)=>Kj(o,a.split[u])))}const sn={test:Bj,parse:Yj,createTransformer:Gj,getAnimatableNone:Fj};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 Zj({hue:n,saturation:a,lightness:s,alpha:o}){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:o}}function Sr(n,a){return s=>s>0?a:n}const He=(n,a,s)=>n+(a-n)*s,jf=(n,a,s)=>{const o=n*n,u=s*(a*a-o)+o;return u<0?0:Math.sqrt(u)},Qj=[ed,Za,qi],Pj=n=>Qj.find(a=>a.test(n));function Hv(n){const a=Pj(n);if(!a)return!1;let s=a.parse(n);return a===qi&&(s=Zj(s)),s}const $v=(n,a)=>{const s=Hv(n),o=Hv(a);if(!s||!o)return Sr(n,a);const u={...s};return d=>(u.red=jf(s.red,o.red,d),u.green=jf(s.green,o.green,d),u.blue=jf(s.blue,o.blue,d),u.alpha=He(s.alpha,o.alpha,d),Za.transform(u))},td=new Set(["none","hidden"]);function Jj(n,a){return td.has(n)?s=>s<=0?n:a:s=>s>=1?a:n}function Wj(n,a){return s=>He(n,a,s)}function Yd(n){return typeof n=="number"?Wj:typeof n=="string"?Hd(n)?Sr:Ie.test(n)?$v:tE:Array.isArray(n)?Tx:typeof n=="object"?Ie.test(n)?$v:Ij:Sr}function Tx(n,a){const s=[...n],o=s.length,u=n.map((d,h)=>Yd(d)(d,a[h]));return d=>{for(let h=0;h<o;h++)s[h]=u[h](d);return s}}function Ij(n,a){const s={...n,...a},o={};for(const u in s)n[u]!==void 0&&a[u]!==void 0&&(o[u]=Yd(n[u])(n[u],a[u]));return u=>{for(const d in o)s[d]=o[d](u);return s}}function eE(n,a){const s=[],o={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],h=n.indexes[d][o[d]],p=n.values[h]??0;s[u]=p,o[d]++}return s}const tE=(n,a)=>{const s=sn.createTransformer(a),o=Zi(n),u=Zi(a);return o.indexes.var.length===u.indexes.var.length&&o.indexes.color.length===u.indexes.color.length&&o.indexes.number.length>=u.indexes.number.length?td.has(n)&&!u.values.length||td.has(a)&&!o.values.length?Jj(n,a):jl(Tx(eE(o,u),u.values),s):Sr(n,a)};function jx(n,a,s){return typeof n=="number"&&typeof a=="number"&&typeof s=="number"?He(n,a,s):Yd(n)(n,a)}const nE=n=>{const a=({timestamp:s})=>n(s);return{start:(s=!0)=>ke.update(a,s),stop:()=>ya(a),now:()=>ct.isProcessing?ct.timestamp:vt.now()}},Ex=(n,a,s=10)=>{let o="";const u=Math.max(Math.round(a/s),2);for(let d=0;d<u;d++)o+=Math.round(n(d/(u-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},wr=2e4;function Gd(n){let a=0;const s=50;let o=n.next(a);for(;!o.done&&a<wr;)a+=s,o=n.next(a);return a>=wr?1/0:a}function aE(n,a=100,s){const o=s({...n,keyframes:[0,a]}),u=Math.min(Gd(o),wr);return{type:"keyframes",ease:d=>o.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 iE=12;function sE(n,a,s){let o=s;for(let u=1;u<iE;u++)o=o-n(o)/a(o);return o}const Ef=.001;function lE({duration:n=Ge.duration,bounce:a=Ge.bounce,velocity:s=Ge.velocity,mass:o=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 y=g*h,x=y*n,S=y-s,T=nd(g,h),j=Math.exp(-x);return Ef-S/T*j},d=g=>{const x=g*h*n,S=x*s+s,T=Math.pow(h,2)*Math.pow(g,2)*n,j=Math.exp(-x),E=nd(Math.pow(g,2),h);return(-u(g)+Ef>0?-1:1)*((S-T)*j)/E}):(u=g=>{const y=Math.exp(-g*n),x=(g-s)*n+1;return-Ef+y*x},d=g=>{const y=Math.exp(-g*n),x=(s-g)*(n*n);return y*x});const p=5/n,m=sE(u,d,p);if(n=Ut(n),isNaN(m))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:h*2*Math.sqrt(o*g),duration:n}}}const oE=["duration","bounce"],rE=["stiffness","damping","mass"];function qv(n,a){return a.some(s=>n[s]!==void 0)}function uE(n){let a={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...n};if(!qv(n,rE)&&qv(n,oE))if(a.velocity=0,n.visualDuration){const s=n.visualDuration,o=2*Math.PI/(s*1.2),u=o*o,d=2*pn(.05,1,1-(n.bounce||0))*Math.sqrt(u);a={...a,mass:Ge.mass,stiffness:u,damping:d}}else{const s=lE({...n,velocity:0});a={...a,...s,mass:Ge.mass},a.isResolvedFromDuration=!0}return a}function Tr(n=Ge.visualDuration,a=Ge.bounce){const s=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,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:y,duration:x,velocity:S,isResolvedFromDuration:T}=uE({...s,velocity:-Pt(s.velocity||0)}),j=S||0,E=g/(2*Math.sqrt(m*y)),D=h-d,M=Pt(Math.sqrt(m/y)),R=Math.abs(D)<5;o||(o=R?Ge.restSpeed.granular:Ge.restSpeed.default),u||(u=R?Ge.restDelta.granular:Ge.restDelta.default);let V,z,U,P,F,W;if(E<1)U=nd(M,E),P=(j+E*M*D)/U,V=B=>{const Z=Math.exp(-E*M*B);return h-Z*(P*Math.sin(U*B)+D*Math.cos(U*B))},F=E*M*P+D*U,W=E*M*D-P*U,z=B=>Math.exp(-E*M*B)*(F*Math.sin(U*B)+W*Math.cos(U*B));else if(E===1){V=Z=>h-Math.exp(-M*Z)*(D+(j+M*D)*Z);const B=j+M*D;z=Z=>Math.exp(-M*Z)*(M*B*Z-j)}else{const B=M*Math.sqrt(E*E-1);V=Se=>{const De=Math.exp(-E*M*Se),$=Math.min(B*Se,300);return h-De*((j+E*M*D)*Math.sinh($)+B*D*Math.cosh($))/B};const Z=(j+E*M*D)/B,ie=E*M*Z-D*B,le=E*M*D-Z*B;z=Se=>{const De=Math.exp(-E*M*Se),$=Math.min(B*Se,300);return De*(ie*Math.sinh($)+le*Math.cosh($))}}const oe={calculatedDuration:T&&x||null,velocity:B=>Ut(z(B)),next:B=>{if(!T&&E<1){const ie=Math.exp(-E*M*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($)<=o&&Math.abs(h-De)<=u,p.value=p.done?h:De,p}const Z=V(B);if(T)p.done=B>=x;else{const ie=Ut(z(B));p.done=Math.abs(ie)<=o&&Math.abs(h-Z)<=u}return p.value=p.done?h:Z,p},toString:()=>{const B=Math.min(Gd(oe),wr),Z=Ex(ie=>oe.next(B*ie).value,B,30);return B+"ms "+Z},toTransition:()=>{}};return oe}Tr.applyToOptions=n=>{const a=aE(n,100,Tr);return n.ease=a.ease,n.duration=Ut(a.duration),n.type="keyframes",n};const cE=5;function Nx(n,a,s){const o=Math.max(a-cE,0);return sx(s-n(o),a-o)}function ad({keyframes:n,velocity:a=0,power:s=.8,timeConstant:o=325,bounceDamping:u=10,bounceStiffness:d=500,modifyTarget:h,min:p,max:m,restDelta:g=.5,restSpeed:y}){const x=n[0],S={done:!1,value:x},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=x+E,M=h===void 0?D:h(D);M!==D&&(E=M-x);const R=W=>-E*Math.exp(-W/o),V=W=>M+R(W),z=W=>{const oe=R(W),B=V(W);S.done=Math.abs(oe)<=g,S.value=S.done?M:B};let U,P;const F=W=>{T(S.value)&&(U=W,P=Tr({keyframes:[S.value,j(S.value)],velocity:Nx(V,W,S.value),damping:u,stiffness:d,restDelta:g,restSpeed:y}))};return F(0),{calculatedDuration:null,next:W=>{let oe=!1;return!P&&U===void 0&&(oe=!0,z(W),F(W)),U!==void 0&&W>=U?P.next(W-U):(!oe&&z(W),S)}}}function fE(n,a,s){const o=[],u=s||va.mix||jx,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=jl(m,p)}o.push(p)}return o}function dE(n,a,{clamp:s=!0,ease:o,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=fE(a,o,u),m=p.length,g=y=>{if(h&&y<n[0])return a[0];let x=0;if(m>1)for(;x<n.length-2&&!(y<n[x+1]);x++);const S=gl(n[x],n[x+1],y);return p[x](S)};return s?y=>g(pn(n[0],n[d-1],y)):g}function hE(n,a){const s=n[n.length-1];for(let o=1;o<=a;o++){const u=gl(0,a,o);n.push(He(s,1,u))}}function mE(n){const a=[0];return hE(a,n.length-1),a}function pE(n,a){return n.map(s=>s*a)}function gE(n,a){return n.map(()=>a||mx).splice(0,n.length-1)}function dl({duration:n=300,keyframes:a,times:s,ease:o="easeInOut"}){const u=jj(o)?o.map(Vv):Vv(o),d={done:!1,value:a[0]},h=pE(s&&s.length===a.length?s:mE(a),n),p=dE(h,a,{ease:Array.isArray(u)?u:gE(a,u)});return{calculatedDuration:n,next:m=>(d.value=p(m),d.done=m>=n,d)}}const vE=n=>n!==null;function Br(n,{repeat:a,repeatType:s="loop"},o,u=1){const d=n.filter(vE),p=u<0||a&&s!=="loop"&&a%2===1?0:d.length-1;return!p||o===void 0?d[p]:o}const yE={decay:ad,inertia:ad,tween:dl,keyframes:dl,spring:Tr};function Ax(n){typeof n.type=="string"&&(n.type=yE[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 xE=n=>n/100;class jr 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 o,u;const{motionValue:s}=this.options;s&&s.updatedAt!==vt.now()&&this.tick(vt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(u=(o=this.options).onStop)==null||u.call(o))},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;Ax(a);const{type:s=dl,repeat:o=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=jl(xE,jx(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:y}=g;this.calculatedDuration=y,this.resolvedDuration=y+u,this.totalDuration=this.resolvedDuration*(o+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:o,totalDuration:u,mixKeyframes:d,mirroredGenerator:h,resolvedDuration:p,calculatedDuration:m}=this;if(this.startTime===null)return o.next(0);const{delay:g=0,keyframes:y,repeat:x,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 M=this.currentTime-g*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?M<0:M>u;this.currentTime=Math.max(M,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let V=this.currentTime,z=o;if(x){const W=Math.min(this.currentTime,u)/p;let oe=Math.floor(W),B=W%1;!B&&W>=1&&(B=1),B===1&&oe--,oe=Math.min(oe,x+1),!!(oe%2)&&(S==="reverse"?(B=1-B,T&&(B-=T/p)):S==="mirror"&&(z=h)),V=pn(0,1,B)*p}let U;R?(this.delayState.value=y[0],U=this.delayState):U=z.next(V),d&&!R&&(U.value=d(U.value));let{done:P}=U;!R&&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=Br(y,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 Nx(o=>this.generator.next(o).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=nE,startTime:s}=this.options;this.driver||(this.driver=a(h=>this.tick(h))),(d=(u=this.options).onPlay)==null||d.call(u);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=s??o),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 bE(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)},SE={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),Yv=id,Gv=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),Xv=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),wE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gv,scaleY:Xv,scale:n=>(Gv(n)+Xv(n))/2,rotateX:n=>sd(Qa(Math.atan2(n[6],n[5]))),rotateY:n=>sd(Qa(Math.atan2(-n[2],n[0]))),rotateZ:Yv,rotate:Yv,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 od(n,a){if(!n||n==="none")return ld(a);const s=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,u;if(s)o=wE,u=s;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=SE,u=p}if(!u)return ld(a);const d=o[a],h=u[1].split(",").map(jE);return typeof d=="function"?d(h):h[d]}const TE=(n,a)=>{const{transform:s="none"}=getComputedStyle(n);return od(s,a)};function jE(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),Kv=n=>n===Ii||n===te,EE=new Set(["x","y","z"]),NE=es.filter(n=>!EE.has(n));function AE(n){const a=[];return NE.forEach(s=>{const o=n.getValue(s);o!==void 0&&(a.push([s,o.get()]),o.set(s.startsWith("scale")?1:0))}),a}const pa={width:({x:n},{paddingLeft:a="0",paddingRight:s="0",boxSizing:o})=>{const u=n.max-n.min;return o==="border-box"?u:u-parseFloat(a)-parseFloat(s)},height:({y:n},{paddingTop:a="0",paddingBottom:s="0",boxSizing:o})=>{const u=n.max-n.min;return o==="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})=>od(a,"x"),y:(n,{transform:a})=>od(a,"y")};pa.translateX=pa.x;pa.translateY=pa.y;const Pa=new Set;let rd=!1,ud=!1,cd=!1;function Cx(){if(ud){const n=Array.from(Pa).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),s=new Map;a.forEach(o=>{const u=AE(o);u.length&&(s.set(o,u),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const u=s.get(o);u&&u.forEach(([d,h])=>{var p;(p=o.getValue(d))==null||p.set(h)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}ud=!1,rd=!1,Pa.forEach(n=>n.complete(cd)),Pa.clear()}function Mx(){Pa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(ud=!0)})}function CE(){cd=!0,Mx(),Cx(),cd=!1}class Kd{constructor(a,s,o,u,d,h=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=s,this.name=o,this.motionValue=u,this.element=d,this.isAsync=h}scheduleResolve(){this.state="scheduled",this.isAsync?(Pa.add(this),rd||(rd=!0,ke.read(Mx),ke.resolveKeyframes(Cx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:s,element:o,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(o&&s){const p=o.readValue(s,h);p!=null&&(a[0]=p)}a[0]===void 0&&(a[0]=h),u&&d===void 0&&u.set(a[0])}bE(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 ME=n=>n.startsWith("--");function Dx(n,a,s){ME(a)?n.style.setProperty(a,s):n.style[a]=s}const DE={};function Ox(n,a){const s=ix(n);return()=>DE[a]??s()}const OE=Ox(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Rx=Ox(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),il=([n,a,s,o])=>`cubic-bezier(${n}, ${a}, ${s}, ${o})`,Fv={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 zx(n,a){if(n)return typeof n=="function"?Rx()?Ex(n,a):"ease-out":px(n)?il(n):Array.isArray(n)?n.map(s=>zx(s,a)||Fv.easeOut):Fv[n]}function RE(n,a,s,{delay:o=0,duration:u=300,repeat:d=0,repeatType:h="loop",ease:p="easeOut",times:m}={},g=void 0){const y={[a]:s};m&&(y.offset=m);const x=zx(p,u);Array.isArray(x)&&(y.easing=x);const S={delay:o,duration:u,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:d+1,direction:h==="reverse"?"alternate":"normal"};return g&&(S.pseudoElement=g),n.animate(y,S)}function kx(n){return typeof n=="function"&&"applyToOptions"in n}function zE({type:n,...a}){return kx(n)&&Rx()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class Lx extends Xd{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:s,name:o,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=zE(a);this.animation=RE(s,o,u,g,d),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const y=Br(u,this.options,p,this.speed);this.updateMotionValue&&this.updateMotionValue(y),Dx(s,o,y),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,o,u;const a=(s=this.options)==null?void 0:s.element;!this.isPseudoElement&&(a!=null&&a.isConnected)&&((u=(o=this.animation).commitStyles)==null||u.call(o))}get duration(){var s,o;const a=((o=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:o.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:o,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&OE()?(this.animation.timeline=a,s&&(this.animation.rangeStart=s),o&&(this.animation.rangeEnd=o),Jt):u(this)}}const Vx={anticipate:fx,backInOut:cx,circInOut:hx};function kE(n){return n in Vx}function LE(n){typeof n.ease=="string"&&kE(n.ease)&&(n.ease=Vx[n.ease])}const Nf=10;class VE extends Lx{constructor(a){LE(a),Ax(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:s,onUpdate:o,onComplete:u,element:d,...h}=this.options;if(!s)return;if(a!==void 0){s.set(a);return}const p=new jr({...h,autoplay:!1}),m=Math.max(Nf,vt.now()-this.startTime),g=pn(0,Nf,m-Nf),y=p.sample(m).value,{name:x}=this.options;d&&x&&Dx(d,x,y),s.setWithVelocity(p.sample(Math.max(0,m-g)).value,y,g),p.stop()}}const Zv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(sn.test(n)||n==="0")&&!n.startsWith("url("));function _E(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 UE(n,a,s,o){const u=n[0];if(u===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],h=Zv(u,a),p=Zv(d,a);return!h||!p?!1:_E(n)||(s==="spring"||kx(s))&&o}function fd(n){n.duration=0,n.type="keyframes"}const _x=new Set(["opacity","clipPath","filter","transform"]),BE=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function HE(n){for(let a=0;a<n.length;a++)if(typeof n[a]=="string"&&BE.test(n[a]))return!0;return!1}const $E=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),qE=ix(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function YE(n){var x;const{motionValue:a,name:s,repeatDelay:o,repeatType:u,damping:d,type:h,keyframes:p}=n;if(!(((x=a==null?void 0:a.owner)==null?void 0:x.current)instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:y}=a.owner.getProps();return qE()&&s&&(_x.has(s)||$E.has(s)&&HE(p))&&(s!=="transform"||!y)&&!g&&!o&&u!=="mirror"&&d!==0&&h!=="inertia"}const GE=40;class XE extends Xd{constructor({autoplay:a=!0,delay:s=0,type:o="keyframes",repeat:u=0,repeatDelay:d=0,repeatType:h="loop",keyframes:p,name:m,motionValue:g,element:y,...x}){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:o,repeat:u,repeatDelay:d,repeatType:h,name:m,motionValue:g,element:y,...x},T=(y==null?void 0:y.KeyframeResolver)||Kd;this.keyframeResolver=new T(p,(E,D,M)=>this.onKeyframesResolved(E,D,S,!M),m,g,y),(j=this.keyframeResolver)==null||j.scheduleResolve()}onKeyframesResolved(a,s,o,u){var M,R;this.keyframeResolver=void 0;const{name:d,type:h,velocity:p,delay:m,isHandoff:g,onUpdate:y}=o;this.resolvedAt=vt.now();let x=!0;UE(a,d,h,p)||(x=!1,(va.instantAnimations||!m)&&(y==null||y(Br(a,o,s))),a[0]=a[a.length-1],fd(o),o.repeat=0);const T={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>GE?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...o,keyframes:a},j=x&&!g&&YE(T),E=(R=(M=T.motionValue)==null?void 0:M.owner)==null?void 0:R.current;let D;if(j)try{D=new VE({...T,element:E})}catch{D=new jr(T)}else D=new jr(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(),CE()),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 Ux(n,a,s,o=0,u=1){const d=Array.from(n).sort((g,y)=>g.sortNodePosition(y)).indexOf(a),h=n.size,p=(h-1)*o;return typeof s=="function"?s(d,h):u===1?d*o:p-d*o}const KE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function FE(n){const a=KE.exec(n);if(!a)return[,];const[,s,o,u]=a;return[`--${s??o}`,u]}function Bx(n,a,s=1){const[o,u]=FE(n);if(!o)return;const d=window.getComputedStyle(a).getPropertyValue(o);if(d){const h=d.trim();return tx(h)?parseFloat(h):h}return Hd(u)?Bx(u,a,s+1):u}const ZE={type:"spring",stiffness:500,damping:25,restSpeed:10},QE=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),PE={type:"keyframes",duration:.8},JE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WE=(n,{keyframes:a})=>a.length>2?PE:ts.has(n)?n.startsWith("scale")?QE(a[1]):ZE:JE;function Hx(n,a){if(n!=null&&n.inherit&&a){const{inherit:s,...o}=n;return{...a,...o}}return n}function Fd(n,a){const s=(n==null?void 0:n[a])??(n==null?void 0:n.default)??n;return s!==n?Hx(s,n):s}const IE=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function e5(n){for(const a in n)if(!IE.has(a))return!0;return!1}const Zd=(n,a,s,o={},u,d)=>h=>{const p=Fd(o,n)||{},m=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Ut(m);const y={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};e5(p)||Object.assign(y,WE(n,y)),y.duration&&(y.duration=Ut(y.duration)),y.repeatDelay&&(y.repeatDelay=Ut(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let x=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(fd(y),y.delay===0&&(x=!0)),(va.instantAnimations||va.skipAnimations||u!=null&&u.shouldSkipAnimations)&&(x=!0,fd(y),y.delay=0),y.allowFlatten=!p.type&&!p.ease,x&&!d&&a.get()!==void 0){const S=Br(y.keyframes,p);if(S!==void 0){ke.update(()=>{y.onUpdate(S),y.onComplete()});return}}return p.isSync?new jr(y):new XE(y)};function Qv(n){const a=[{},{}];return n==null||n.values.forEach((s,o)=>{a[0][o]=s.get(),a[1][o]=s.getVelocity()}),a}function Qd(n,a,s,o){if(typeof a=="function"){const[u,d]=Qv(o);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]=Qv(o);a=a(s!==void 0?s:n.custom,u,d)}return a}function Ja(n,a,s){const o=n.getProps();return Qd(o,a,s!==void 0?s:o.custom,n)}const $x=new Set(["width","height","top","left","right","bottom",...es]),Pv=30,t5=n=>!isNaN(parseFloat(n));class n5{constructor(a,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var d;const u=vt.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),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=t5(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 o=this.events[a].add(s);return a==="change"?()=>{o(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:o}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,o){this.set(s),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}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>Pv)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Pv);return sx(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 n5(n,a)}const dd=n=>Array.isArray(n);function a5(n,a,s){n.hasValue(a)?n.getValue(a).set(s):n.addValue(a,Qi(s))}function i5(n){return dd(n)?n[n.length-1]||0:n}function s5(n,a){const s=Ja(n,a);let{transitionEnd:o={},transition:u={},...d}=s||{};d={...d,...o};for(const h in d){const p=i5(d[h]);a5(n,h,p)}}const ft=n=>!!(n&&n.getVelocity);function l5(n){return!!(ft(n)&&n.add)}function hd(n,a){const s=n.getValue("willChange");if(l5(s))return s.add(a);if(!s&&va.WillChange){const o=new va.WillChange("auto");n.addValue("willChange",o),o.add(a)}}function Pd(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const o5="framerAppearId",qx="data-"+Pd(o5);function Yx(n){return n.props[qx]}function r5({protectedKeys:n,needsAnimating:a},s){const o=n.hasOwnProperty(s)&&a[s]!==!0;return a[s]=!1,o}function Gx(n,a,{delay:s=0,transitionOverride:o,type:u}={}){let{transition:d,transitionEnd:h,...p}=a;const m=n.getDefaultTransition();d=d?Hx(d,m):m;const g=d==null?void 0:d.reduceMotion;o&&(d=o);const y=[],x=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||x&&r5(x,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 M=!1;if(window.MotionHandoffAnimation){const z=Yx(n);if(z){const U=window.MotionHandoffAnimation(z,S,ke);U!==null&&(E.startTime=U,M=!0)}}hd(n,S);const R=g??n.shouldReduceMotion;T.start(Zd(S,T,j,R&&$x.has(S)?{type:!1}:E,n,M));const V=T.animation;V&&y.push(V)}if(h){const S=()=>ke.update(()=>{h&&s5(n,h)});y.length?Promise.all(y).then(S):S()}return y}function md(n,a,s={}){var m;const o=Ja(n,a,s.type==="exit"?(m=n.presenceContext)==null?void 0:m.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=o||{};s.transitionOverride&&(u=s.transitionOverride);const d=o?()=>Promise.all(Gx(n,o,s)):()=>Promise.resolve(),h=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:y=0,staggerChildren:x,staggerDirection:S}=u;return u5(n,a,g,y,x,S,s)}:()=>Promise.resolve(),{when:p}=u;if(p){const[g,y]=p==="beforeChildren"?[d,h]:[h,d];return g().then(()=>y())}else return Promise.all([d(),h(s.delay)])}function u5(n,a,s=0,o=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 o=="function"?0:o)+Ux(n.variantChildren,m,o,u,d)}).then(()=>m.notify("AnimationComplete",a)));return Promise.all(p)}function c5(n,a,s={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const u=a.map(d=>md(n,d,s));o=Promise.all(u)}else if(typeof a=="string")o=md(n,a,s);else{const u=typeof a=="function"?Ja(n,a,s.custom):a;o=Promise.all(Gx(n,u,s))}return o.then(()=>{n.notify("AnimationComplete",a)})}const f5={test:n=>n==="auto",parse:n=>n},Xx=n=>a=>a.test(n),Kx=[Ii,te,mn,ca,_j,Vj,f5],Jv=n=>Kx.find(Xx(n));function d5(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||ax(n):!0}const h5=new Set(["brightness","contrast","saturate","opacity"]);function m5(n){const[a,s]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=s.match($d)||[];if(!o)return n;const u=s.replace(o,"");let d=h5.has(a)?1:0;return o!==s&&(d*=100),a+"("+d+u+")"}const p5=/\b([a-z-]*)\(.*?\)/gu,pd={...sn,getAnimatableNone:n=>{const a=n.match(p5);return a?a.map(m5).join(" "):n}},gd={...sn,getAnimatableNone:n=>{const a=sn.parse(n);return sn.createTransformer(n)(a.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},Wv={...Ii,transform:Math.round},g5={rotate:ca,rotateX:ca,rotateY:ca,rotateZ:ca,scale:Io,scaleX:Io,scaleY:Io,scaleZ:Io,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:vl,originX:Uv,originY:Uv,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,...g5,zIndex:Wv,fillOpacity:vl,strokeOpacity:vl,numOctaves:Wv},v5={...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},Fx=n=>v5[n],y5=new Set([pd,gd]);function Zx(n,a){let s=Fx(n);return y5.has(s)||(s=sn),s.getAnimatableNone?s.getAnimatableNone(a):void 0}const x5=new Set(["auto","none","0"]);function b5(n,a,s){let o=0,u;for(;o<n.length&&!u;){const d=n[o];typeof d=="string"&&!x5.has(d)&&Zi(d).values.length&&(u=n[o]),o++}if(u&&s)for(const d of a)n[d]=Zx(s,u)}class S5 extends Kd{constructor(a,s,o,u,d){super(a,s,o,u,d,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:s,name:o}=this;if(!s||!s.current)return;super.readKeyframes();for(let y=0;y<a.length;y++){let x=a[y];if(typeof x=="string"&&(x=x.trim(),Hd(x))){const S=Bx(x,s.current);S!==void 0&&(a[y]=S),y===a.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!$x.has(o)||a.length!==2)return;const[u,d]=a,h=Jv(u),p=Jv(d),m=_v(u),g=_v(d);if(m!==g&&pa[o]){this.needsMeasurement=!0;return}if(h!==p)if(Kv(h)&&Kv(p))for(let y=0;y<a.length;y++){const x=a[y];typeof x=="string"&&(a[y]=parseFloat(x))}else pa[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:s}=this,o=[];for(let u=0;u<a.length;u++)(a[u]===null||d5(a[u]))&&o.push(u);o.length&&b5(a,o,s)}measureInitialState(){const{element:a,unresolvedKeyframes:s,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pa[o](a.measureViewportBox(),window.getComputedStyle(a.current)),s[0]=this.measuredOrigin;const u=s[s.length-1];u!==void 0&&a.getValue(o,u).jump(u,!1)}measureEndState(){var p;const{element:a,name:s,unresolvedKeyframes:o}=this;if(!a||!a.current)return;const u=a.getValue(s);u&&u.jump(this.measuredOrigin,!1);const d=o.length-1,h=o[d];o[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 Qx(n,a,s){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let o=document;const u=(s==null?void 0:s[n])??o.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n).filter(o=>o!=null)}const Px=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function w5(n){return nx(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:Wd}=gx(queueMicrotask,!1),nn={x:!1,y:!1};function Jx(){return nn.x||nn.y}function T5(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 Wx(n,a){const s=Qx(n),o=new AbortController,u={passive:!0,...a,signal:o.signal};return[s,u,()=>o.abort()]}function j5(n){return!(n.pointerType==="touch"||Jx())}function E5(n,a,s={}){const[o,u,d]=Wx(n,s);return o.forEach(h=>{let p=!1,m=!1,g;const y=()=>{h.removeEventListener("pointerleave",j)},x=D=>{g&&(g(D),g=void 0),y()},S=D=>{p=!1,window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),m&&(m=!1,x(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}x(D)}},E=D=>{if(!j5(D))return;m=!1;const M=a(h,D);typeof M=="function"&&(g=M,h.addEventListener("pointerleave",j,u))};h.addEventListener("pointerenter",E,u),h.addEventListener("pointerdown",T,u)}),d}const Ix=(n,a)=>a?n===a?!0:Ix(n,a.parentElement):!1,Id=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,N5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function A5(n){return N5.has(n.tagName)||n.isContentEditable===!0}const C5=new Set(["INPUT","SELECT","TEXTAREA"]);function M5(n){return C5.has(n.tagName)||n.isContentEditable===!0}const rr=new WeakSet;function Iv(n){return a=>{a.key==="Enter"&&n(a)}}function Af(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const D5=(n,a)=>{const s=n.currentTarget;if(!s)return;const o=Iv(()=>{if(rr.has(s))return;Af(s,"down");const u=Iv(()=>{Af(s,"up")}),d=()=>Af(s,"cancel");s.addEventListener("keyup",u,a),s.addEventListener("blur",d,a)});s.addEventListener("keydown",o,a),s.addEventListener("blur",()=>s.removeEventListener("keydown",o),a)};function e0(n){return Id(n)&&!Jx()}const t0=new WeakSet;function O5(n,a,s={}){const[o,u,d]=Wx(n,s),h=p=>{const m=p.currentTarget;if(!e0(p)||t0.has(p))return;rr.add(m),s.stopPropagation&&t0.add(p);const g=a(m,p),y=(T,j)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",S),rr.has(m)&&rr.delete(m),e0(T)&&typeof g=="function"&&g(T,{success:j})},x=T=>{y(T,m===window||m===document||s.useGlobalTarget||Ix(m,T.target))},S=T=>{y(T,!1)};window.addEventListener("pointerup",x,u),window.addEventListener("pointercancel",S,u)};return o.forEach(p=>{(s.useGlobalTarget?window:p).addEventListener("pointerdown",h,u),w5(p)&&(p.addEventListener("focus",g=>D5(g,u)),!A5(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),d}function eh(n){return nx(n)&&"ownerSVGElement"in n}const ur=new WeakMap;let fa;const eb=(n,a,s)=>(o,u)=>u&&u[0]?u[0][n+"Size"]:eh(o)&&"getBBox"in o?o.getBBox()[a]:o[s],R5=eb("inline","width","offsetWidth"),z5=eb("block","height","offsetHeight");function k5({target:n,borderBoxSize:a}){var s;(s=ur.get(n))==null||s.forEach(o=>{o(n,{get width(){return R5(n,a)},get height(){return z5(n,a)}})})}function L5(n){n.forEach(k5)}function V5(){typeof ResizeObserver>"u"||(fa=new ResizeObserver(L5))}function _5(n,a){fa||V5();const s=Qx(n);return s.forEach(o=>{let u=ur.get(o);u||(u=new Set,ur.set(o,u)),u.add(a),fa==null||fa.observe(o)}),()=>{s.forEach(o=>{const u=ur.get(o);u==null||u.delete(a),u!=null&&u.size||fa==null||fa.unobserve(o)})}}const cr=new Set;let Yi;function U5(){Yi=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};cr.forEach(a=>a(n))},window.addEventListener("resize",Yi)}function B5(n){return cr.add(n),Yi||U5(),()=>{cr.delete(n),!cr.size&&typeof Yi=="function"&&(window.removeEventListener("resize",Yi),Yi=void 0)}}function n0(n,a){return typeof n=="function"?B5(n):_5(n,a)}function H5(n){return eh(n)&&n.tagName==="svg"}const $5=[...Kx,Ie,sn],q5=n=>$5.find(Xx(n)),a0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gi=()=>({x:a0(),y:a0()}),i0=()=>({min:0,max:0}),tt=()=>({x:i0(),y:i0()}),Y5=new WeakMap;function Hr(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 $r(n){return Hr(n.animate)||nh.some(a=>yl(n[a]))}function tb(n){return!!($r(n)||n.variants)}function G5(n,a,s){for(const o in a){const u=a[o],d=s[o];if(ft(u))n.addValue(o,u);else if(ft(d))n.addValue(o,Qi(u,{owner:n}));else if(d!==u)if(n.hasValue(o)){const h=n.getValue(o);h.liveStyle===!0?h.jump(u):h.hasAnimated||h.set(u)}else{const h=n.getStaticValue(o);n.addValue(o,Qi(h!==void 0?h:u,{owner:n}))}}for(const o in s)a[o]===void 0&&n.removeValue(o);return a}const vd={current:null},nb={current:!1},X5=typeof window<"u";function K5(){if(nb.current=!0,!!X5)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 s0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Er={};function ab(n){Er=n}function F5(){return Er}class Z5{scrapeMotionValuesFromProps(a,s,o){return{}}constructor({parent:a,props:s,presenceContext:o,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:y}=p;this.latestValues=g,this.baseTarget={...g},this.initialValues=s.initial?{...g}:{},this.renderState=y,this.parent=a,this.props=s,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=d,this.options=m,this.blockInitialAnimation=!!h,this.isControllingVariants=$r(s),this.isVariantNode=tb(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:x,...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,o;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,Y5.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||K5(),this.shouldReduceMotion=vd.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(o=this.parent)==null||o.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var a;this.projection&&this.projection.unmount(),ya(this.notifyUpdate),ya(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 o=this.features[s];o&&(o.unmount(),o.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&&_x.has(a)&&this.current instanceof HTMLElement){const{factory:h,keyframes:p,times:m,ease:g,duration:y}=s.accelerate,x=new Lx({element:this.current,name:a,keyframes:p,times:m,ease:g,duration:Ut(y)}),S=h(x);this.valueSubscriptions.set(a,()=>{S(),x.cancel()});return}const o=ts.has(a);o&&this.onBindTransform&&this.onBindTransform();const u=s.on("change",h=>{this.latestValues[a]=h,this.props.onUpdate&&ke.preRender(this.notifyUpdate),o&&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 Er){const s=Er[a];if(!s)continue;const{isEnabled:o,Feature:u}=s;if(!this.features[a]&&u&&o(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):tt()}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 o=0;o<s0.length;o++){const u=s0[o];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=G5(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 o=this.values.get(a);s!==o&&(o&&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 o=this.values.get(a);return o===void 0&&s!==void 0&&(o=Qi(s===null?void 0:s,{owner:this}),this.addValue(a,o)),o}readValue(a,s){let o=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return o!=null&&(typeof o=="string"&&(tx(o)||ax(o))?o=parseFloat(o):!q5(o)&&sn.test(s)&&(o=Zx(a,s)),this.setBaseTarget(a,ft(o)?o.get():o)),ft(o)?o.get():o}setBaseTarget(a,s){this.baseTarget[a]=s}getBaseTarget(a){var d;const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const h=Qd(this.props,s,(d=this.presenceContext)==null?void 0:d.custom);h&&(o=h[a])}if(s&&o!==void 0)return o;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!ft(u)?u:this.initialValues[a]!==void 0&&o===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 Z5{constructor(){super(...arguments),this.KeyframeResolver=S5}sortInstanceNodePosition(a,s){return a.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(a,s){const o=a.style;return o?o[s]:void 0}removeValueFromRenderState(a,{vars:s,style:o}){delete s[a],delete o[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:o}){return{x:{min:a,max:s},y:{min:n,max:o}}}function Q5({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function P5(n,a){if(!a)return n;const s=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:s.y,left:s.x,bottom:o.y,right:o.x}}function Cf(n){return n===void 0||n===1}function yd({scale:n,scaleX:a,scaleY:s}){return!Cf(n)||!Cf(a)||!Cf(s)}function Ya(n){return yd(n)||lb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function lb(n){return l0(n.x)||l0(n.y)}function l0(n){return n&&n!=="0%"}function Nr(n,a,s){const o=n-s,u=a*o;return s+u}function o0(n,a,s,o,u){return u!==void 0&&(n=Nr(n,u,o)),Nr(n,s,o)+a}function xd(n,a=0,s=1,o,u){n.min=o0(n.min,a,s,o,u),n.max=o0(n.max,a,s,o,u)}function ob(n,{x:a,y:s}){xd(n.x,a.translate,a.scale,a.originPoint),xd(n.y,s.translate,s.scale,s.originPoint)}const r0=.999999999999,u0=1.0000000000001;function J5(n,a,s,o=!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"||(o&&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,ob(n,h)),o&&Ya(d.latestValues)&&fr(n,d.latestValues,(p=d.layout)==null?void 0:p.layoutBox))}a.x<u0&&a.x>r0&&(a.x=1),a.y<u0&&a.y>r0&&(a.y=1)}function dn(n,a){n.min+=a,n.max+=a}function c0(n,a,s,o,u=.5){const d=He(n.min,n.max,u);xd(n,a,s,d,o)}function f0(n,a){return typeof n=="string"?parseFloat(n)/100*(a.max-a.min):n}function fr(n,a,s){const o=s??n;c0(n.x,f0(a.x,o.x),a.scaleX,a.scale,a.originX),c0(n.y,f0(a.y,o.y),a.scaleY,a.scale,a.originY)}function rb(n,a){return sb(P5(n.getBoundingClientRect(),a))}function W5(n,a,s){const o=rb(n,s),{scroll:u}=a;return u&&(dn(o.x,u.offset.x),dn(o.y,u.offset.y)),o}const I5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eN=es.length;function tN(n,a,s){let o="",u=!0;for(let d=0;d<eN;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=Px(p,Jd[h]);if(!m){u=!1;const y=I5[h]||h;o+=`${y}(${g}) `}s&&(a[h]=g)}}return o=o.trim(),s?o=s(a,u?"":o):u&&(o="none"),o}function ah(n,a,s){const{style:o,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(yx(m)){u[m]=g;continue}else{const y=Px(g,Jd[m]);m.startsWith("origin")?(p=!0,d[m]=y):o[m]=y}}if(a.transform||(h||s?o.transform=tN(a,n.transform,s):o.transform&&(o.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:y=0}=d;o.transformOrigin=`${m} ${g} ${y}`}}function ub(n,{style:a,vars:s},o,u){const d=n.style;let h;for(h in a)d[h]=a[h];u==null||u.applyProjectionStyles(d,o);for(h in s)d.setProperty(h,s[h])}function d0(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=d0(n,a.target.x),o=d0(n,a.target.y);return`${s}% ${o}%`}},nN={correct:(n,{treeScale:a,projectionDelta:s})=>{const o=n,u=sn.parse(n);if(u.length>5)return o;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:nN};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 o=n.style,u=a==null?void 0:a.style,d={};if(!o)return d;for(const p in o)(ft(o[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]=o[p]);return d}function aN(n){return window.getComputedStyle(n)}class iN extends ib{constructor(){super(...arguments),this.type="html",this.renderInstance=ub}readValueFromInstance(a,s){var o;if(ts.has(s))return(o=this.projection)!=null&&o.isProjecting?ld(s):TE(a,s);{const u=aN(a),d=(yx(s)?u.getPropertyValue(s):u[s])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(a,{transformPagePoint:s}){return rb(a,s)}build(a,s,o){ah(a,s,o.transformTemplate)}scrapeMotionValuesFromProps(a,s,o){return ih(a,s,o)}}const sN={offset:"stroke-dashoffset",array:"stroke-dasharray"},lN={offset:"strokeDashoffset",array:"strokeDasharray"};function oN(n,a,s=1,o=0,u=!0){n.pathLength=1;const d=u?sN:lN;n[d.offset]=`${-o}`,n[d.array]=`${a} ${s}`}const rN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fb(n,{attrX:a,attrY:s,attrScale:o,pathLength:u,pathSpacing:d=1,pathOffset:h=0,...p},m,g,y){if(ah(n,p,g),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:S}=n;x.transform&&(S.transform=x.transform,delete x.transform),(S.transform||x.transformOrigin)&&(S.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),S.transform&&(S.transformBox=(y==null?void 0:y.transformBox)??"fill-box",delete x.transformBox);for(const T of rN)x[T]!==void 0&&(S[T]=x[T],delete x[T]);a!==void 0&&(x.x=a),s!==void 0&&(x.y=s),o!==void 0&&(x.scale=o),u!==void 0&&oN(x,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 uN(n,a,s,o){ub(n,a,void 0,o);for(const u in a.attrs)n.setAttribute(db.has(u)?u:Pd(u),a.attrs[u])}function mb(n,a,s){const o=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;o[d]=n[u]}return o}class cN extends ib{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=tt}getBaseTargetFromProps(a,s){return a[s]}readValueFromInstance(a,s){if(ts.has(s)){const o=Fx(s);return o&&o.default||0}return s=db.has(s)?s:Pd(s),a.getAttribute(s)}scrapeMotionValuesFromProps(a,s,o){return mb(a,s,o)}build(a,s,o){fb(a,s,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(a,s,o,u){uN(a,s,o,u)}mount(a){this.isSVGTag=hb(a.tagName),super.mount(a)}}const fN=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<fN;s++){const o=nh[s],u=n.props[o];(yl(u)||u===!1)&&(a[o]=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 o=0;o<s;o++)if(a[o]!==n[o])return!1;return!0}const dN=[...th].reverse(),hN=th.length;function mN(n){return a=>Promise.all(a.map(({animation:s,options:o})=>c5(n,s,o)))}function pN(n){let a=mN(n),s=h0(),o=!0,u=!1;const d=g=>(y,x)=>{var T;const S=Ja(n,x,g==="exit"?(T=n.presenceContext)==null?void 0:T.custom:void 0);if(S){const{transition:j,transitionEnd:E,...D}=S;y={...y,...D,...E}}return y};function h(g){a=g(n)}function p(g){const{props:y}=n,x=pb(n.parent)||{},S=[],T=new Set;let j={},E=1/0;for(let M=0;M<hN;M++){const R=dN[M],V=s[R],z=y[R]!==void 0?y[R]:x[R],U=yl(z),P=R===g?V.isActive:null;P===!1&&(E=M);let F=z===x[R]&&z!==y[R]&&U;if(F&&(o||u)&&n.manuallyAnimateOnMount&&(F=!1),V.protectedKeys={...j},!V.isActive&&P===null||!z&&!V.prevProp||Hr(z)||typeof z=="boolean")continue;if(R==="exit"&&V.isActive&&P!==!0){V.prevResolvedValues&&(j={...j,...V.prevResolvedValues});continue}const W=gN(V.prevProp,z);let oe=W||R===g&&V.isActive&&!F&&U||M>E&&U,B=!1;const Z=Array.isArray(z)?z:[z];let ie=Z.reduce(d(R),{});P===!1&&(ie={});const{prevResolvedValues:le={}}=V,Se={...le,...ie},De=J=>{oe=!0,T.has(J)&&(B=!0,T.delete(J)),V.needsAnimating[J]=!0;const re=n.getValue(J);re&&(re.liveStyle=!1)};for(const J in Se){const re=ie[J],me=le[J];if(j.hasOwnProperty(J))continue;let A=!1;dd(re)&&dd(me)?A=!gb(re,me):A=re!==me,A?re!=null?De(J):T.add(J):re!==void 0&&T.has(J)?De(J):V.protectedKeys[J]=!0}V.prevProp=z,V.prevResolvedValues=ie,V.isActive&&(j={...j,...ie}),(o||u)&&n.blockInitialAnimation&&(oe=!1);const $=F&&W;oe&&(!$||B)&&S.push(...Z.map(J=>{const re={type:R};if(typeof J=="string"&&(o||u)&&!$&&n.manuallyAnimateOnMount&&n.parent){const{parent:me}=n,A=Ja(me,J);if(me.enteringChildren&&A){const{delayChildren:G}=A.transition||{};re.delay=Ux(me.enteringChildren,n,G)}}return{animation:J,options:re}}))}if(T.size){const M={};if(typeof y.initial!="boolean"){const R=Ja(n,Array.isArray(y.initial)?y.initial[0]:y.initial);R&&R.transition&&(M.transition=R.transition)}T.forEach(R=>{const V=n.getBaseTarget(R),z=n.getValue(R);z&&(z.liveStyle=!0),M[R]=V??null}),S.push({animation:M})}let D=!!S.length;return o&&(y.initial===!1||y.initial===y.animate)&&!n.manuallyAnimateOnMount&&(D=!1),o=!1,u=!1,D?a(S):Promise.resolve()}function m(g,y){var S;if(s[g].isActive===y)return Promise.resolve();(S=n.variantChildren)==null||S.forEach(T=>{var j;return(j=T.animationState)==null?void 0:j.setActive(g,y)}),s[g].isActive=y;const x=p(g);for(const T in s)s[T].protectedKeys={};return x}return{animateChanges:p,setActive:m,setAnimateFunction:h,getState:()=>s,reset:()=>{s=h0(),u=!0}}}function gN(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 h0(){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 m0(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}const vb=1e-4,vN=1-vb,yN=1+vb,yb=.01,xN=0-yb,bN=0+yb;function yt(n){return n.max-n.min}function SN(n,a,s){return Math.abs(n-a)<=s}function p0(n,a,s,o=.5){n.origin=o,n.originPoint=He(a.min,a.max,n.origin),n.scale=yt(s)/yt(a),n.translate=He(s.min,s.max,n.origin)-n.originPoint,(n.scale>=vN&&n.scale<=yN||isNaN(n.scale))&&(n.scale=1),(n.translate>=xN&&n.translate<=bN||isNaN(n.translate))&&(n.translate=0)}function hl(n,a,s,o){p0(n.x,a.x,s.x,o?o.originX:void 0),p0(n.y,a.y,s.y,o?o.originY:void 0)}function g0(n,a,s,o=0){const u=o?He(s.min,s.max,o):s.min;n.min=u+a.min,n.max=n.min+yt(a)}function wN(n,a,s,o){g0(n.x,a.x,s.x,o==null?void 0:o.x),g0(n.y,a.y,s.y,o==null?void 0:o.y)}function v0(n,a,s,o=0){const u=o?He(s.min,s.max,o):s.min;n.min=a.min-u,n.max=n.min+yt(a)}function Ar(n,a,s,o){v0(n.x,a.x,s.x,o==null?void 0:o.x),v0(n.y,a.y,s.y,o==null?void 0:o.y)}function y0(n,a,s,o,u){return n-=a,n=Nr(n,1/s,o),u!==void 0&&(n=Nr(n,1/u,o)),n}function TN(n,a=0,s=1,o=.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,o);n===d&&(p-=a),n.min=y0(n.min,a,s,p,u),n.max=y0(n.max,a,s,p,u)}function x0(n,a,[s,o,u],d,h){TN(n,a[s],a[o],a[u],a.scale,d,h)}const jN=["x","scaleX","originX"],EN=["y","scaleY","originY"];function b0(n,a,s,o){x0(n.x,a,jN,s?s.x:void 0,o?o.x:void 0),x0(n.y,a,EN,s?s.y:void 0,o?o.y:void 0)}function S0(n){return n.translate===0&&n.scale===1}function xb(n){return S0(n.x)&&S0(n.y)}function w0(n,a){return n.min===a.min&&n.max===a.max}function NN(n,a){return w0(n.x,a.x)&&w0(n.y,a.y)}function T0(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function bb(n,a){return T0(n.x,a.x)&&T0(n.y,a.y)}function j0(n){return yt(n.x)/yt(n.y)}function E0(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function fn(n){return[n("x"),n("y")]}function AN(n,a,s){let o="";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)&&(o=`translate3d(${u}px, ${d}px, ${h}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),s){const{transformPerspective:g,rotate:y,rotateX:x,rotateY:S,skewX:T,skewY:j}=s;g&&(o=`perspective(${g}px) ${o}`),y&&(o+=`rotate(${y}deg) `),x&&(o+=`rotateX(${x}deg) `),S&&(o+=`rotateY(${S}deg) `),T&&(o+=`skewX(${T}deg) `),j&&(o+=`skewY(${j}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(o+=`scale(${p}, ${m})`),o||"none"}const Sb=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],CN=Sb.length,N0=n=>typeof n=="string"?parseFloat(n):n,A0=n=>typeof n=="number"||te.test(n);function MN(n,a,s,o,u,d){u?(n.opacity=He(0,s.opacity??1,DN(o)),n.opacityExit=He(a.opacity??1,0,ON(o))):d&&(n.opacity=He(a.opacity??1,s.opacity??1,o));for(let h=0;h<CN;h++){const p=Sb[h];let m=C0(a,p),g=C0(s,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||A0(m)===A0(g)?(n[p]=Math.max(He(N0(m),N0(g),o),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,o))}function C0(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const DN=wb(0,.5,dx),ON=wb(.5,.95,Jt);function wb(n,a,s){return o=>o<n?0:o>a?1:s(gl(n,a,o))}function RN(n,a,s){const o=ft(n)?n:Qi(n);return o.start(Zd("",o,a,s)),o.animation}function xl(n,a,s,o={passive:!0}){return n.addEventListener(a,s,o),()=>n.removeEventListener(a,s)}const zN=(n,a)=>n.depth-a.depth;class kN{constructor(){this.children=[],this.isDirty=!1}add(a){Ld(this.children,a),this.isDirty=!0}remove(a){br(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(zN),this.isDirty=!1,this.children.forEach(a)}}function LN(n,a){const s=vt.now(),o=({timestamp:u})=>{const d=u-s;d>=a&&(ya(o),n(d-a))};return ke.setup(o,!0),()=>ya(o)}function dr(n){return ft(n)?n.get():n}class VN{constructor(){this.members=[]}add(a){Ld(this.members,a);for(let s=this.members.length-1;s>=0;s--){const o=this.members[s];if(o===a||o===this.lead||o===this.prevLead)continue;const u=o.instance;(!u||u.isConnected===!1)&&!o.snapshot&&(br(this.members,o),o.unmount())}a.scheduleRender()}remove(a){if(br(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 o=this.members.indexOf(a)-1;o>=0;o--){const u=this.members[o];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 o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.updateSnapshot(),a.scheduleRender();const{layoutDependency:d}=o.options,{layoutDependency:h}=a.options;(d===void 0||d!==h)&&(a.resumeFrom=o,s&&(o.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),(u=a.root)!=null&&u.isUpdating&&(a.isLayoutDirty=!0)),a.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{var s,o,u,d,h;(o=(s=a.options).onExitComplete)==null||o.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 hr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Mf=["","X","Y","Z"],_N=1e3;let UN=0;function Df(n,a,s,o){const{latestValues:u}=a;u[n]&&(s[n]=u[n],a.setStaticValue(n,0),o&&(o[n]=0))}function Tb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const s=Yx(a);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:u,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(s,"transform",ke,!(u||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&Tb(o)}function jb({attachResizeListener:n,defaultParent:a,measureScroll:s,checkIsScrollRoot:o,resetTransform:u}){return class{constructor(h={},p=a==null?void 0:a()){this.id=UN++,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($N),this.nodes.forEach(FN),this.nodes.forEach(ZN),this.nodes.forEach(qN)},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 kN)}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)&&!H5(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 y,x=0;const S=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{x=window.innerWidth}),n(h,()=>{const T=window.innerWidth;T!==x&&(x=T,this.root.updateBlockedByResize=!0,y&&y(),y=LN(S,250),hr.hasAnimatedSinceResize&&(hr.hasAnimatedSinceResize=!1,this.nodes.forEach(O0)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&g&&(p||m)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:x,hasRelativeLayoutChanged:S,layout:T})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||g.getDefaultTransition()||IN,{onLayoutAnimationStart:E,onLayoutAnimationComplete:D}=g.getProps(),M=!this.targetLayout||!bb(this.targetLayout,T),R=!x&&S;if(this.options.layoutRoot||this.resumeFrom||R||x&&(M||!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(y,R)}else x||O0(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(),ya(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(QN),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 y=0;y<this.path.length;y++){const x=this.path[y];x.shouldResetTransform=!0,(typeof x.latestValues.x=="string"||typeof x.latestValues.y=="string")&&(x.isLayoutDirty=!0),x.updateScroll("snapshot"),x.options.layoutRoot&&x.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(GN),this.nodes.forEach(M0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(D0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(XN),this.nodes.forEach(KN),this.nodes.forEach(BN),this.nodes.forEach(HN)):this.nodes.forEach(D0),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(YN),this.sharedNodes.forEach(PN)}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&&!yt(this.snapshot.measuredBox.x)&&!yt(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=tt()),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=o(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&&!xb(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;h&&this.instance&&(p||Ya(this.latestValues)||y)&&(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)),eA(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var g;const{visualElement:h}=this.options;if(!h)return tt();const p=h.measureViewportBox();if(!(((g=this.scroll)==null?void 0:g.wasRoot)||this.path.some(tA))){const{scroll:y}=this.root;y&&(dn(p.x,y.offset.x),dn(p.y,y.offset.y))}return p}removeElementScroll(h){var m;const p=tt();if(tn(p,h),(m=this.scroll)!=null&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const y=this.path[g],{scroll:x,options:S}=y;y!==this.root&&x&&S.layoutScroll&&(x.wasRoot&&tn(p,h),dn(p.x,x.offset.x),dn(p.y,x.offset.y))}return p}applyTransform(h,p=!1,m){var y,x;const g=m||tt();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)&&fr(g,T.latestValues,(y=T.layout)==null?void 0:y.layoutBox)}return Ya(this.latestValues)&&fr(g,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),g}removeTransform(h){var m;const p=tt();tn(p,h);for(let g=0;g<this.path.length;g++){const y=this.path[g];if(!Ya(y.latestValues))continue;let x;y.instance&&(yd(y.latestValues)&&y.updateSnapshot(),x=tt(),tn(x,y.measurePageBox())),b0(p,y.latestValues,(m=y.snapshot)==null?void 0:m.layoutBox,x)}return Ya(this.latestValues)&&b0(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:y,layoutId:x}=this.options;if(!this.layout||!(y||x))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=tt(),this.targetWithTransforms=tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wN(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),ob(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||yd(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=tt(),this.relativeTargetOrigin=tt(),Ar(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:y}=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||y))return;tn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,S=this.treeScale.y;J5(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=tt());const{target:T}=h;if(!T){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(m0(this.prevProjectionDelta.x,this.projectionDelta.x),m0(this.prevProjectionDelta.y,this.projectionDelta.y)),hl(this.projectionDelta,this.layoutCorrected,T,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==S||!E0(this.projectionDelta.x,this.prevProjectionDelta.x)||!E0(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:{},y={...this.latestValues},x=Gi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const S=tt(),T=m?m.source:void 0,j=this.layout?this.layout.source:void 0,E=T!==j,D=this.getStack(),M=!D||D.members.length<=1,R=!!(E&&!M&&this.options.crossfade===!0&&!this.path.some(WN));this.animationProgress=0;let V;this.mixTargetDelta=z=>{const U=z/1e3;R0(x.x,h.x,U),R0(x.y,h.y,U),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ar(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),JN(this.relativeTarget,this.relativeTargetOrigin,S,U),V&&NN(this.relativeTarget,V)&&(this.isProjectionDirty=!1),V||(V=tt()),tn(V,this.relativeTarget)),E&&(this.animationValues=y,MN(y,g,this.latestValues,U,R,M)),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&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{hr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=RN(this.motionValue,[0,1e3],{...h,velocity:0,isSync:!0,onUpdate:y=>{this.mixTargetDelta(y),h.onUpdate&&h.onUpdate(y)},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(_N),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const h=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:y}=h;if(!(!p||!m||!g)){if(this!==h&&this.layout&&g&&Eb(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||tt();const x=yt(this.layout.layoutBox.x);m.x.min=h.target.x.min,m.x.max=m.x.min+x;const S=yt(this.layout.layoutBox.y);m.y.min=h.target.y.min,m.y.max=m.y.min+S}tn(p,m),fr(p,y),hl(this.projectionDeltaWithTransform,this.layoutCorrected,p,y)}}registerSharedNode(h,p){this.sharedNodes.has(h)||this.sharedNodes.set(h,new VN),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 y=0;y<Mf.length;y++)Df(`rotate${Mf[y]}`,h,g,this.animationValues),Df(`skew${Mf[y]}`,h,g,this.animationValues);h.render();for(const y in g)h.setStaticValue(y,g[y]),this.animationValues&&(this.animationValues[y]=g[y]);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=dr(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=dr(p==null?void 0:p.pointerEvents)||""),this.hasProjected&&!Ya(this.latestValues)&&(h.transform=m?m({},""):"none",this.hasProjected=!1);return}h.visibility="";const y=g.animationValues||g.latestValues;this.applyTransformsToTarget();let x=AN(this.projectionDeltaWithTransform,this.treeScale,y);m&&(x=m(y,x)),h.transform=x;const{x:S,y:T}=this.projectionDelta;h.transformOrigin=`${S.origin*100}% ${T.origin*100}% 0`,g.animationValues?h.opacity=g===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:h.opacity=g===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const j in bd){if(y[j]===void 0)continue;const{correct:E,applyTo:D,isCSSVariable:M}=bd[j],R=x==="none"?y[j]:E(y[j],g);if(D){const V=D.length;for(let z=0;z<V;z++)h[D[z]]=R}else M?this.options.visualElement.renderState.vars[j]=R:h[j]=R}this.options.layoutId&&(h.pointerEvents=g===this?dr(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(M0),this.root.sharedNodes.clear()}}}function BN(n){n.updateLayout()}function HN(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:o,measuredBox:u}=n.layout,{animationType:d}=n.options,h=a.source!==n.layout.source;if(d==="size")fn(x=>{const S=h?a.measuredBox[x]:a.layoutBox[x],T=yt(S);S.min=o[x].min,S.max=S.min+T});else if(d==="x"||d==="y"){const x=d==="x"?"y":"x";Sd(h?a.measuredBox[x]:a.layoutBox[x],o[x])}else Eb(d,a.layoutBox,o)&&fn(x=>{const S=h?a.measuredBox[x]:a.layoutBox[x],T=yt(o[x]);S.max=S.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[x].max=n.relativeTarget[x].min+T)});const p=Gi();hl(p,o,a.layoutBox);const m=Gi();h?hl(m,n.applyTransform(u,!0),a.measuredBox):hl(m,o,a.layoutBox);const g=!xb(p);let y=!1;if(!n.resumeFrom){const x=n.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:S,layout:T}=x;if(S&&T){const j=n.options.layoutAnchor||void 0,E=tt();Ar(E,a.layoutBox,S.layoutBox,j);const D=tt();Ar(D,o,T.layoutBox,j),bb(E,D)||(y=!0),x.options.layoutRoot&&(n.relativeTarget=D,n.relativeTargetOrigin=E,n.relativeParent=x)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:a,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeLayoutChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function $N(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 qN(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function YN(n){n.clearSnapshot()}function M0(n){n.clearMeasurements()}function GN(n){n.isLayoutDirty=!0,n.updateLayout()}function D0(n){n.isLayoutDirty=!1}function XN(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function KN(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function O0(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function FN(n){n.resolveTargetDelta()}function ZN(n){n.calcProjection()}function QN(n){n.resetSkewAndRotation()}function PN(n){n.removeLeadSnapshot()}function R0(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 z0(n,a,s,o){n.min=He(a.min,s.min,o),n.max=He(a.max,s.max,o)}function JN(n,a,s,o){z0(n.x,a.x,s.x,o),z0(n.y,a.y,s.y,o)}function WN(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const IN={duration:.45,ease:[.4,0,.1,1]},k0=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),L0=k0("applewebkit/")&&!k0("chrome/")?Math.round:Jt;function V0(n){n.min=L0(n.min),n.max=L0(n.max)}function eA(n){V0(n.x),V0(n.y)}function Eb(n,a,s){return n==="position"||n==="preserve-aspect"&&!SN(j0(a),j0(s),.2)}function tA(n){var a;return n!==n.root&&((a=n.scroll)==null?void 0:a.wasRoot)}const nA=jb({attachResizeListener:(n,a)=>xl(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}),aA=n=>!n.isLayoutDirty&&n.willUpdate(!1);function _0(){const n=new Set,a=new WeakMap,s=()=>n.forEach(aA);return{add:o=>{n.add(o),a.set(o,o.addEventListener("willUpdate",s))},remove:o=>{n.delete(o);const u=a.get(o);u&&(u(),a.delete(o)),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 nA({});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 iA(n=!0){const a=w.useContext(kd);if(a===null)return[!0,null];const{isPresent:s,onExitComplete:o,register:u}=a,d=w.useId();w.useEffect(()=>{if(n)return u(d)},[n]);const h=w.useCallback(()=>n&&o&&o(d),[d,o,n]);return!s&&o?[!1,h]:[!0]}const sA=w.createContext(null);function lA(){const n=w.useRef(!1);return ex(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function oA(){const n=lA(),[a,s]=w.useState(0),o=w.useCallback(()=>{n.current&&s(a+1)},[a]);return[w.useCallback(()=>ke.postRender(o),[o]),a]}const Cb=n=>n===!0,rA=n=>Cb(n===!0)||n==="id",Mb=({children:n,id:a,inherit:s=!0})=>{const o=w.useContext(xr),u=w.useContext(sA),[d,h]=oA(),p=w.useRef(null),m=o.id||u;p.current===null&&(rA(s)&&m&&(a=a?m+"-"+a:m),p.current={id:a,group:Cb(s)&&o.group||_0()});const g=w.useMemo(()=>({...p.current,forceRender:d}),[h]);return f.jsx(xr.Provider,{value:g,children:n})},Db=w.createContext({strict:!1}),U0={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 B0=!1;function uA(){if(B0)return;const n={};for(const a in U0)n[a]={isEnabled:s=>U0[a].some(o=>!!s[o])};ab(n),B0=!0}function Ob(){return uA(),F5()}function cA(n){const a=Ob();for(const s in n)a[s]={...a[s],...n[s]};ab(a)}const fA=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 Cr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||fA.has(n)}let Rb=n=>!Cr(n);function dA(n){typeof n=="function"&&(Rb=a=>a.startsWith("on")?!Cr(a):n(a))}try{dA(require("@emotion/is-prop-valid").default)}catch{}function hA(n,a,s){const o={};for(const u in n)u==="values"&&typeof n.values=="object"||ft(n[u])||(Rb(u)||s===!0&&Cr(u)||!a&&!Cr(u)||n.draggable&&u.startsWith("onDrag"))&&(o[u]=n[u]);return o}const qr=w.createContext({});function mA(n,a){if($r(n)){const{initial:s,animate:o}=n;return{initial:s===!1||yl(s)?s:void 0,animate:yl(o)?o:void 0}}return n.inherit!==!1?a:{}}function pA(n){const{initial:a,animate:s}=mA(n,w.useContext(qr));return w.useMemo(()=>({initial:a,animate:s}),[H0(a),H0(s)])}function H0(n){return Array.isArray(n)?n.join(" "):n}const sh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zb(n,a,s){for(const o in a)!ft(a[o])&&!cb(o,s)&&(n[o]=a[o])}function gA({transformTemplate:n},a){return w.useMemo(()=>{const s=sh();return ah(s,a,n),Object.assign({},s.vars,s.style)},[a])}function vA(n,a){const s=n.style||{},o={};return zb(o,s,n),Object.assign(o,gA(n,a)),o}function yA(n,a){const s={},o=vA(n,a);return n.drag&&n.dragListener!==!1&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,s}const kb=()=>({...sh(),attrs:{}});function xA(n,a,s,o){const u=w.useMemo(()=>{const d=kb();return fb(d,a,hb(o),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 bA=["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:!!(bA.indexOf(n)>-1||/[A-Z]/u.test(n))}function SA(n,a,s,{latestValues:o},u,d=!1,h){const m=(h??lh(n)?xA:yA)(a,o,u,n),g=hA(a,typeof n=="string",d),y=n!==w.Fragment?{...g,...m,ref:s}:{},{children:x}=a,S=w.useMemo(()=>ft(x)?x.get():x,[x]);return w.createElement(n,{...y,children:S})}function wA({scrapeMotionValuesFromProps:n,createRenderState:a},s,o,u){return{latestValues:TA(s,o,u,n),renderState:a()}}function TA(n,a,s,o){const u={},d=o(n,{});for(const S in d)u[S]=dr(d[S]);let{initial:h,animate:p}=n;const m=$r(n),g=tb(n);a&&g&&!m&&n.inherit!==!1&&(h===void 0&&(h=a.initial),p===void 0&&(p=a.animate));let y=s?s.initial===!1:!1;y=y||h===!1;const x=y?p:h;if(x&&typeof x!="boolean"&&!Hr(x)){const S=Array.isArray(x)?x:[x];for(let T=0;T<S.length;T++){const j=Qd(n,S[T]);if(j){const{transitionEnd:E,transition:D,...M}=j;for(const R in M){let V=M[R];if(Array.isArray(V)){const z=y?V.length-1:0;V=V[z]}V!==null&&(u[R]=V)}for(const R in E)u[R]=E[R]}}}return u}const Lb=n=>(a,s)=>{const o=w.useContext(qr),u=w.useContext(kd),d=()=>wA(n,a,o,u);return s?d():gj(d)},jA=Lb({scrapeMotionValuesFromProps:ih,createRenderState:sh}),EA=Lb({scrapeMotionValuesFromProps:mb,createRenderState:kb}),NA=Symbol.for("motionComponentSymbol");function AA(n,a,s){const o=w.useRef(s);w.useInsertionEffect(()=>{o.current=s});const u=w.useRef(null);return w.useCallback(d=>{var p;d&&((p=n.onMount)==null||p.call(n,d));const h=o.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 CA(n,a,s,o,u,d){var V,z;const{visualElement:h}=w.useContext(qr),p=w.useContext(Db),m=w.useContext(kd),g=w.useContext(Ab),y=g.reducedMotion,x=g.skipAnimations,S=w.useRef(null),T=w.useRef(!1);o=o||p.renderer,!S.current&&o&&(S.current=o(n,{visualState:a,parent:h,props:s,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:y,skipAnimations:x,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")&&MA(S.current,s,u,E);const D=w.useRef(!1);w.useInsertionEffect(()=>{j&&D.current&&j.update(s,m)});const M=s[qx],R=w.useRef(!!M&&typeof window<"u"&&!((V=window.MotionHandoffIsComplete)!=null&&V.call(window,M))&&((z=window.MotionHasOptimisedAnimation)==null?void 0:z.call(window,M)));return ex(()=>{T.current=!0,j&&(D.current=!0,window.MotionIsMounted=!0,j.updateFeatures(),j.scheduleRenderMicrotask(),R.current&&j.animationState&&j.animationState.animateChanges())}),w.useEffect(()=>{j&&(!R.current&&j.animationState&&j.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{var U;(U=window.MotionHandoffMarkAsComplete)==null||U.call(window,M)}),R.current=!1),j.enteringChildren=void 0)}),j}function MA(n,a,s,o){const{layoutId:u,layout:d,drag:h,dragConstraints:p,layoutScroll:m,layoutRoot:g,layoutAnchor:y,layoutCrossfade:x}=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:o,crossfade:x,layoutScroll:m,layoutRoot:g,layoutAnchor:y})}function _b(n){if(n)return n.options.allowProjection!==!1?n.projection:_b(n.parent)}function Rf(n,{forwardMotionProps:a=!1,type:s}={},o,u){o&&cA(o);const d=s?s==="svg":lh(n),h=d?EA:jA;function p(g,y){let x;const S={...w.useContext(Ab),...g,layoutId:DA(g)},{isStatic:T}=S,j=pA(g),E=h(g,T);if(!T&&typeof window<"u"){OA();const D=RA(S);x=D.MeasureLayout,j.visualElement=CA(n,E,S,u,D.ProjectionNode,d)}return f.jsxs(qr.Provider,{value:j,children:[x&&j.visualElement?f.jsx(x,{visualElement:j.visualElement,...S}):null,SA(n,g,AA(E,j.visualElement,y),E,T,a,d)]})}p.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=w.forwardRef(p);return m[NA]=n,m}function DA({layoutId:n}){const a=w.useContext(xr).id;return a&&n!==void 0?a+"-"+n:n}function OA(n,a){w.useContext(Db).strict}function RA(n){const a=Ob(),{drag:s,layout:o}=a;if(!s&&!o)return{};const u={...s,...o};return{MeasureLayout:s!=null&&s.isEnabled(n)||o!=null&&o.isEnabled(n)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function zA(n,a){if(typeof Proxy>"u")return Rf;const s=new Map,o=(d,h)=>Rf(d,h,n,a),u=(d,h)=>o(d,h);return new Proxy(u,{get:(d,h)=>h==="create"?o:(s.has(h)||s.set(h,Rf(h,void 0,n,a)),s.get(h))})}const kA=(n,a)=>a.isSVG??lh(n)?new cN(a):new iN(a,{allowProjection:n!==w.Fragment});class LA extends Sa{constructor(a){super(a),a.animationState||(a.animationState=pN(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();Hr(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 VA=0;class _A extends Sa{constructor(){super(...arguments),this.id=VA++,this.isExitComplete=!1}update(){var d;if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:s}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;if(a&&o===!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:y,...x}=m;for(const S in x)(d=this.node.getValue(S))==null||d.jump(x[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 UA={animation:{Feature:LA},exit:{Feature:_A}};function Al(n){return{point:{x:n.pageX,y:n.pageY}}}const BA=n=>a=>Id(a)&&n(a,Al(a));function ml(n,a,s,o){return xl(n,a,BA(s),o)}const Ub=({current:n})=>n?n.ownerDocument.defaultView:null,$0=(n,a)=>Math.abs(n-a);function HA(n,a){const s=$0(n.x,a.x),o=$0(n.y,a.y);return Math.sqrt(s**2+o**2)}const q0=new Set(["auto","scroll"]);class Bb{constructor(a,s,{transformPagePoint:o,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=er(this.lastRawMoveEventInfo,this.transformPagePoint));const T=zf(this.lastMoveEventInfo,this.history),j=this.startEvent!==null,E=HA(T.offset,{x:0,y:0})>=this.distanceThreshold;if(!j&&!E)return;const{point:D}=T,{timestamp:M}=ct;this.history.push({...D,timestamp:M});const{onStart:R,onMove:V}=this.handlers;j||(R&&R(this.lastMoveEvent,T),this.startEvent=this.lastMoveEvent),V&&V(this.lastMoveEvent,T)},this.handlePointerMove=(T,j)=>{this.lastMoveEvent=T,this.lastRawMoveEventInfo=j,this.lastMoveEventInfo=er(j,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(T,j)=>{this.end();const{onEnd:E,onSessionEnd:D,resumeAnimation:M}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=zf(T.type==="pointercancel"?this.lastMoveEventInfo:er(j,this.transformPagePoint),this.history);this.startEvent&&E&&E(T,R),D&&D(T,R)},!Id(a))return;this.dragSnapToOrigin=d,this.handlers=s,this.transformPagePoint=o,this.distanceThreshold=h,this.contextWindow=u||window;const m=Al(a),g=er(m,this.transformPagePoint),{point:y}=g,{timestamp:x}=ct;this.history=[{...y,timestamp:x}];const{onSessionStart:S}=s;S&&S(a,zf(g,this.history)),this.removeListeners=jl(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 o=getComputedStyle(s);(q0.has(o.overflowX)||q0.has(o.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 o=a===window,u=o?{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||(o?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(),ya(this.updatePoint)}}function er(n,a){return a?{point:a(n.point)}:n}function Y0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function zf({point:n},a){return{point:n,delta:Y0(n,Hb(a)),offset:Y0(n,$A(a)),velocity:qA(a,.1)}}function $A(n){return n[0]}function Hb(n){return n[n.length-1]}function qA(n,a){if(n.length<2)return{x:0,y:0};let s=n.length-1,o=null;const u=Hb(n);for(;s>=0&&(o=n[s],!(u.timestamp-o.timestamp>Ut(a)));)s--;if(!o)return{x:0,y:0};o===n[0]&&n.length>2&&u.timestamp-o.timestamp>Ut(a)*2&&(o=n[1]);const d=Pt(u.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const h={x:(u.x-o.x)/d,y:(u.y-o.y)/d};return h.x===1/0&&(h.x=0),h.y===1/0&&(h.y=0),h}function YA(n,{min:a,max:s},o){return a!==void 0&&n<a?n=o?He(a,n,o.min):Math.max(n,a):s!==void 0&&n>s&&(n=o?He(s,n,o.max):Math.min(n,s)),n}function G0(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 GA(n,{top:a,left:s,bottom:o,right:u}){return{x:G0(n.x,s,u),y:G0(n.y,a,o)}}function X0(n,a){let s=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([s,o]=[o,s]),{min:s,max:o}}function XA(n,a){return{x:X0(n.x,a.x),y:X0(n.y,a.y)}}function KA(n,a){let s=.5;const o=yt(n),u=yt(a);return u>o?s=gl(a.min,a.max-o,n.min):o>u&&(s=gl(n.min,n.max-u,a.min)),pn(0,1,s)}function FA(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 ZA(n=wd){return n===!1?n=0:n===!0&&(n=wd),{x:K0(n,"left","right"),y:K0(n,"top","bottom")}}function K0(n,a,s){return{min:F0(n,a),max:F0(n,s)}}function F0(n,a){return typeof n=="number"?n:n[a]||0}const QA=new WeakMap;class PA{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=tt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:s=!1,distanceThreshold:o}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const d=x=>{s&&this.snapToCursor(Al(x).point),this.stopAnimation()},h=(x,S)=>{const{drag:T,dragPropagation:j,onDragStart:E}=this.getProps();if(T&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=T5(T),!this.openDragLock))return;this.latestPointerEvent=x,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(M=>{let R=this.getAxisMotionValue(M).get()||0;if(mn.test(R)){const{projection:V}=this.visualElement;if(V&&V.layout){const z=V.layout.layoutBox[M];z&&(R=yt(z)*(parseFloat(R)/100))}}this.originPoint[M]=R}),E&&ke.update(()=>E(x,S),!1,!0),hd(this.visualElement,"transform");const{animationState:D}=this.visualElement;D&&D.setActive("whileDrag",!0)},p=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S;const{dragPropagation:T,dragDirectionLock:j,onDirectionLock:E,onDrag:D}=this.getProps();if(!T&&!this.openDragLock)return;const{offset:M}=S;if(j&&this.currentDirection===null){this.currentDirection=WA(M),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",S.point,M),this.updateAxis("y",S.point,M),this.visualElement.render(),D&&ke.update(()=>D(x,S),!1,!0)},m=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S,this.stop(x,S),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:y}=this.getProps();this.panSession=new Bb(a,{onSessionStart:d,onStart:h,onMove:p,onSessionEnd:m,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:o,contextWindow:Ub(this.visualElement),element:this.visualElement.current})}stop(a,s){const o=a||this.latestPointerEvent,u=s||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!u||!o)return;const{velocity:h}=u;this.startAnimation(h);const{onDragEnd:p}=this.getProps();p&&ke.postRender(()=>p(o,u))}cancel(){this.isDragging=!1;const{projection:a,animationState:s}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&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,o){const{drag:u}=this.getProps();if(!o||!tr(a,u,this.currentDirection))return;const d=this.getAxisMotionValue(a);let h=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(h=YA(h,this.constraints[a],this.elastic[a])),d.set(h)}resolveConstraints(){var d;const{dragConstraints:a,dragElastic:s}=this.getProps(),o=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&&o?this.constraints=GA(o.layoutBox,a):this.constraints=!1,this.elastic=ZA(s),u!==this.constraints&&!$i(a)&&o&&this.constraints&&!this.hasMutatedConstraints&&fn(h=>{this.constraints!==!1&&this.getAxisMotionValue(h)&&(this.constraints[h]=FA(o.layoutBox[h],this.constraints[h]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:s}=this.getProps();if(!a||!$i(a))return!1;const o=a.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const d=W5(o,u.root,this.visualElement.getTransformPagePoint());let h=XA(u.layout.layoutBox,d);if(s){const p=s(Q5(h));this.hasMutatedConstraints=!!p,p&&(h=sb(p))}return h}startAnimation(a){const{drag:s,dragMomentum:o,dragElastic:u,dragTransition:d,dragSnapToOrigin:h,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=fn(y=>{if(!tr(y,s,this.currentDirection))return;let x=m&&m[y]||{};(h===!0||h===y)&&(x={min:0,max:0});const S=u?200:1e6,T=u?40:1e7,j={type:"inertia",velocity:o?a[y]:0,bounceStiffness:S,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...d,...x};return this.startAxisValueAnimation(y,j)});return Promise.all(g).then(p)}startAxisValueAnimation(a,s){const o=this.getAxisMotionValue(a);return hd(this.visualElement,a),o.start(Zd(a,o,0,s,this.visualElement,!1))}stopAnimation(){fn(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const s=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),u=o[s];return u||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){fn(s=>{const{drag:o}=this.getProps();if(!tr(s,o,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:o}=this.visualElement;if(!$i(s)||!o||!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]=KA({min:m,max:m},this.constraints[h])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),fn(h=>{if(!tr(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;QA.set(this.visualElement,this);const a=this.visualElement.current,s=ml(a,"pointerdown",g=>{const{drag:y,dragListener:x=!0}=this.getProps(),S=g.target,T=S!==a&&M5(S);y&&x&&!T&&this.start(g)});let o;const u=()=>{const{dragConstraints:g}=this.getProps();$i(g)&&g.current&&(this.constraints=this.resolveRefConstraints(),o||(o=JA(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=xl(window,"resize",()=>this.scalePositionWithinConstraints()),m=d.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:y})=>{this.isDragging&&y&&(fn(x=>{const S=this.getAxisMotionValue(x);S&&(this.originPoint[x]+=g[x].translate,S.set(S.get()+g[x].translate))}),this.visualElement.render())}));return()=>{p(),s(),h(),m&&m(),o&&o()}}getProps(){const a=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:o=!1,dragPropagation:u=!1,dragConstraints:d=!1,dragElastic:h=wd,dragMomentum:p=!0}=a;return{...a,drag:s,dragDirectionLock:o,dragPropagation:u,dragConstraints:d,dragElastic:h,dragMomentum:p}}}function Z0(n){let a=!0;return()=>{if(a){a=!1;return}n()}}function JA(n,a,s){const o=n0(n,Z0(s)),u=n0(a,Z0(s));return()=>{o(),u()}}function tr(n,a,s){return(a===!0||a===n)&&(s===null||s===n)}function WA(n,a=10){let s=null;return Math.abs(n.y)>a?s="y":Math.abs(n.x)>a&&(s="x"),s}class IA extends Sa{constructor(a){super(a),this.removeGroupControls=Jt,this.removeListeners=Jt,this.controls=new PA(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 e3 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:o,onPanEnd:u}=this.node.getProps();return{onSessionStart:kf(a),onStart:kf(s),onMove:kf(o),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 t3 extends w.Component{componentDidMount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:o,layoutId:u}=this.props,{projection:d}=a;d&&(s.group&&s.group.add(d),o&&o.register&&u&&o.register(d),Lf&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),hr.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:s,visualElement:o,drag:u,isPresent:d}=this.props,{projection:h}=o;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:o}=a;o&&(o.options.layoutAnchor=s,o.root.didUpdate(),Wd.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:o}=this.props,{projection:u}=a;Lf=!0,u&&(u.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(u),o&&o.deregister&&o.deregister(u))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function $b(n){const[a,s]=iA(),o=w.useContext(xr);return f.jsx(t3,{...n,layoutGroup:o,switchLayoutGroup:w.useContext(Vb),isPresent:a,safeToRemove:s})}const n3={pan:{Feature:e3},drag:{Feature:IA,ProjectionNode:Nb,MeasureLayout:$b}};function Q0(n,a,s){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",s==="Start");const u="onHover"+s,d=o[u];d&&ke.postRender(()=>d(a,Al(a)))}class a3 extends Sa{mount(){const{current:a}=this.node;a&&(this.unmount=E5(a,(s,o)=>(Q0(this.node,o,"Start"),u=>Q0(this.node,u,"End"))))}unmount(){}}class i3 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=jl(xl(this.node.current,"focus",()=>this.onFocus()),xl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function P0(n,a,s){const{props:o}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",s==="Start");const u="onTap"+(s==="End"?"":s),d=o[u];d&&ke.postRender(()=>d(a,Al(a)))}class s3 extends Sa{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:s,propagate:o}=this.node.props;this.unmount=O5(a,(u,d)=>(P0(this.node,d,"Start"),(h,{success:p})=>P0(this.node,h,p?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const Td=new WeakMap,Vf=new WeakMap,l3=n=>{const a=Td.get(n.target);a&&a(n)},o3=n=>{n.forEach(l3)};function r3({root:n,...a}){const s=n||document;Vf.has(s)||Vf.set(s,{});const o=Vf.get(s),u=JSON.stringify(a);return o[u]||(o[u]=new IntersectionObserver(o3,{root:n,...a})),o[u]}function u3(n,a,s){const o=r3(a);return Td.set(n,s),o.observe(n),()=>{Td.delete(n),o.unobserve(n)}}const c3={some:0,all:1};class f3 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:o,amount:u="some",once:d}=a,h={root:s?s.current:void 0,rootMargin:o,threshold:typeof u=="number"?u:c3[u]},p=g=>{const{isIntersecting:y}=g;if(this.isInView===y||(this.isInView=y,d&&!y&&this.hasEnteredView))return;y&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",y);const{onViewportEnter:x,onViewportLeave:S}=this.node.getProps(),T=y?x:S;T&&T(g)};this.stopObserver=u3(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(d3(a,s))&&this.startObserver()}unmount(){var a;(a=this.stopObserver)==null||a.call(this),this.hasEnteredView=!1,this.isInView=!1}}function d3({viewport:n={}},{viewport:a={}}={}){return s=>n[s]!==a[s]}const h3={inView:{Feature:f3},tap:{Feature:s3},focus:{Feature:i3},hover:{Feature:a3}},m3={layout:{ProjectionNode:Nb,MeasureLayout:$b}},p3={...UA,...h3,...n3,...m3},qb=zA(p3,kA),Yr=w.forwardRef(function(a,s){return f.jsx(RT,{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:o,className:u,children:d,...h},p){let m=Fe(u,Ws.base,s?Ws.outline:o?Ws.plain:Fe(Ws.solid,Ws.colors[a??"dark/zinc"]));return typeof h.href=="string"?f.jsx(Yr,{...h,className:m,ref:p,children:f.jsx(xa,{children:d})}):f.jsx(wl,{...h,className:Fe(m,"cursor-default"),ref:p,children:f.jsx(xa,{children:d})})});function xa({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 g3({className:n,...a}){return f.jsx("nav",{...a,className:Fe(n,"flex flex-1 items-center gap-4 py-2.5")})}function v3({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 y3({className:n,...a}){return f.jsx("div",{"aria-hidden":"true",...a,className:Fe(n,"-ml-4 flex-1")})}const oh=w.forwardRef(function({current:a,className:s,children:o,...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(Yr,{...u,className:h,"data-current":a?"true":void 0,ref:d,children:f.jsx(xa,{children:o})}):f.jsx(wl,{...u,className:Fe("cursor-default",h),"data-current":a?"true":void 0,ref:d,children:f.jsx(xa,{children:o})})]})});function x3(){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 b3(){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 S3({open:n,close:a,children:s}){return f.jsxs(pj,{open:n,onClose:a,className:"lg:hidden",children:[f.jsx(hj,{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(Iy,{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(Cy,{as:oh,"aria-label":"Close navigation",children:f.jsx(b3,{})})}),s]})})]})}function w3({navbar:n,sidebar:a,children:s}){let[o,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(S3,{open:o,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(oh,{onClick:()=>u(!0),"aria-label":"Open navigation",children:f.jsx(x3,{})})}),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 T3({className:n,...a}){return f.jsx("nav",{...a,className:Fe(n,"flex h-full min-h-0 flex-col")})}function j3({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 E3({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 N3({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 J0({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 W0({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 A3=w.forwardRef(function({current:a,className:s,children:o,...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(Cy,{as:Yr,...u,className:h,"data-current":a?"true":void 0,ref:d,children:f.jsx(xa,{children:o})}):f.jsx(wl,{...u,className:Fe("cursor-default",h),"data-current":a?"true":void 0,ref:d,children:f.jsx(xa,{children:o})})]})});function C3({className:n,...a}){return f.jsx("span",{...a,className:Fe(n,"truncate")})}const M3={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 ye({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",M3[n])})}w.forwardRef(function({color:a="zinc",className:s,children:o,...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(Yr,{...u,className:h,ref:d,children:f.jsx(xa,{children:f.jsx(ye,{color:a,children:o})})}):f.jsx(wl,{...u,className:h,ref:d,children:f.jsx(xa,{children:f.jsx(ye,{color:a,children:o})})})});function D3(n){w.useEffect(()=>{if(!n)return;const a=n;function s(o){if(!(o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement))switch(o.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 O3={"owed-reply":"red","blocking-obligation":"red","broken-return":"red","stale-delegation":"yellow","return-ready":"lime","overdue-habit":"yellow"},R3={"owed-reply":"owed reply","blocking-obligation":"blocking","broken-return":"broken return","stale-delegation":"stale","return-ready":"ready to return","overdue-habit":"overdue"},z3={"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"},k3=new Set(["stale-delegation"]),L3=new Set(["owed-reply","blocking-obligation","broken-return","return-ready","overdue-habit"]),V3=new Set(["spawning","running","waiting_input","stalled"]);function _3({view:n,deskPrefs:a,refreshGeneration:s}){const o=Pi(),[u,d]=w.useState(null),[h,p]=w.useState(null),[m,g]=w.useState(null),[y,x]=w.useState(null),[S,T]=w.useState(null),j=n.agent,E=n.work,D=n.inner,M=n.activity,R=j.degraded,V=j.attention,z=E.tasks,U=E.obligations,P=E.sessions,F=E.coding,W=j.senses,oe=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(x).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=>L3.has(ie.urgency)),Z=u.items.filter(ie=>k3.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(I0,{item:ie,nav:o,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(I0,{item:ie,nav:o,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:()=>o({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:()=>o({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:()=>o({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(nr,{tab:"work",children:[z.liveCount," live tasks"]}),","," ",f.jsxs(nr,{tab:"work",children:[U.openCount," obligations"]}),","," ",f.jsxs(nr,{tab:"work",children:[F.activeCount," coding lanes"]}),", and"," ",f.jsxs(nr,{tab:"sessions",children:[P.liveCount," live sessions"]}),"."]}),R.status==="degraded"&&R.issues.length>0&&f.jsxs("div",{className:"mt-3 space-y-1",children:[R.issues.slice(0,5).map((B,Z)=>f.jsxs("button",{onClick:()=>o({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)),R.issues.length>5&&f.jsxs("button",{onClick:()=>o({tab:"runtime"}),className:"text-xs text-ouro-glow underline underline-offset-2",children:["+",R.issues.length-5," more issues"]})]})]}),y&&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=y.currentSession;return B?f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx(ye,{color:"lime",children:"active session"}),f.jsxs("button",{onClick:()=>o({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:nt(B.lastActivityAt)})]}):null})(),y.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(ye,{color:"yellow",children:y.primaryObligation.status}),f.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:pt(y.primaryObligation.content,80)})]}),y.primaryObligation.nextAction&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-mist",children:["Next: ",y.primaryObligation.nextAction]}),y.primaryObligation.waitingOn&&f.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Waiting on: ",y.primaryObligation.waitingOn]})]}),y.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:[y.resumeHandle.lane&&f.jsxs("p",{className:"text-ouro-bone",children:["Lane: ",y.resumeHandle.lane]}),y.resumeHandle.artifact&&f.jsxs("p",{className:"text-ouro-mist",children:["Artifact: ",y.resumeHandle.artifact]}),y.resumeHandle.nextAction&&f.jsxs("p",{className:"text-ouro-mist",children:["Next: ",y.resumeHandle.nextAction]}),y.resumeHandle.blockerOrWaitingOn&&f.jsxs("p",{className:"text-ouro-shadow",children:["Blocked: ",y.resumeHandle.blockerOrWaitingOn]}),f.jsxs(ye,{color:y.resumeHandle.confidence==="high"?"lime":y.resumeHandle.confidence==="medium"?"yellow":"zinc",children:[y.resumeHandle.confidence," confidence"]})]})]}),y.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 (",y.otherActiveSessions.length,")"]}),f.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:y.otherActiveSessions.slice(0,5).map(B=>f.jsx("button",{onClick:()=>o({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 ",nt(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(ye,{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(ye,{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(ye,{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(ye,{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:nt(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(ar,{label:"Tasks",value:z.liveCount,sub:`${z.blockedCount} blocked`,onClick:()=>o({tab:"work"})}),f.jsx(ar,{label:"Obligations",value:U.openCount,sub:`${P.liveCount} sessions`,onClick:()=>o({tab:"work"})}),f.jsx(ar,{label:"Coding",value:F.activeCount,sub:`${F.blockedCount} blocked`,onClick:()=>o({tab:"work"})}),f.jsx(ar,{label:"Inner",value:D.status,sub:pt(D.summary??"",30),onClick:()=>o({tab:"inner"})})]}),h&&h.items.length>0&&(()=>{const B=h.items.filter(Z=>V3.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:()=>o({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(ye,{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:nt(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(U3,{items:W}):f.jsx(_f,{children:"No active senses"})}),f.jsx(Is,{title:"Bridges",children:oe.length>0?f.jsx("div",{className:"flex flex-wrap gap-1.5",children:oe.map(B=>f.jsx("button",{onClick:()=>o({tab:"connections",focus:B}),children:f.jsx(ye,{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(ye,{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:nt(Z.updatedAt)})]},ie))})})})(),f.jsx(Is,{title:"Recent activity",children:M.recent.length>0?f.jsx("div",{className:"space-y-1",children:M.recent.map((B,Z)=>{const ie=B.kind==="coding"||B.kind==="obligation"?"work":B.kind==="session"?"sessions":"inner";return f.jsxs("button",{onClick:()=>o({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(ye,{children:B.kind}),f.jsx("span",{className:"text-xs text-ouro-shadow",children:nt(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 I0({item:n,nav:a,agentName:s,onDismiss:o}){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(ye,{color:O3[n.urgency]??"zinc",children:R3[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:z3[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})}),o()},className:"shrink-0 text-xs text-ouro-shadow hover:text-ouro-fang transition-colors",title:"Dismiss",children:"✕"})]})}function nr({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 ar({label:n,value:a,sub:s,onClick:o}){return f.jsxs("button",{onClick:o,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 U3({items:n}){return f.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(a=>f.jsx(ye,{color:"lime",children:a},a))})}function _f({children:n}){return f.jsx("p",{className:"text-sm text-ouro-shadow",children:n})}function ir(n){return n.length>0?n.join(", "):"(unknown)"}function B3(n,a){return a==="all"?!0:a==="imbox"||a==="screener"?n.placement===a:a==="native"||a==="delegated"?n.compartmentKind===a:a.startsWith("source:")?n.source===a.slice(7):!0}function ey(n){return n.subject||"(no subject)"}function H3({agentName:n,focus:a,onFocusConsumed:s,refreshGeneration:o}){var D;const[u,d]=w.useState(null),[h,p]=w.useState("all"),[m,g]=w.useState(a??null),[y,x]=w.useState(null),[S,T]=w.useState(!1);w.useEffect(()=>{p("all"),g(a??null),x(null)},[n]),w.useEffect(()=>{d(null),_e(`/agents/${encodeURIComponent(n)}/mail`).then(d).catch(()=>d({status:"error",agentName:n,mailboxAddress:null,generatedAt:new Date().toISOString(),store:null,folders:[],messages:[],accessLog:[],error:"mail unavailable"}))},[n,o]),w.useEffect(()=>{a&&(g(a),s==null||s())},[a,s]),w.useEffect(()=>{if(!m){x(null);return}T(!0),_e(`/agents/${encodeURIComponent(n)}/mail/${encodeURIComponent(m)}`).then(x).catch(()=>x({status:"error",agentName:n,mailboxAddress:(u==null?void 0:u.mailboxAddress)??null,generatedAt:new Date().toISOString(),message:null,accessLog:[],error:"message unavailable"})).finally(()=>T(!1))},[n,m,o]);const j=w.useMemo(()=>{const M=(u==null?void 0:u.folders)??[];return[{id:"all",label:"All",count:(u==null?void 0:u.messages.length)??0},...M]},[u]),E=w.useMemo(()=>((u==null?void 0:u.messages)??[]).filter(M=>B3(M,h)),[h,u]);return u?u.status!=="ready"?f.jsx("div",{className:"mailbox-shell grid min-h-[58vh] place-items-center rounded-md bg-[#f7f8fb] p-8 text-[#1f2937] ring-1 ring-black/10",children:f.jsxs("div",{className:"max-w-lg text-center",children:[f.jsx("p",{className:"text-sm font-semibold uppercase tracking-[0.12em] text-[#64748b]",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-[#475569]",children:u.error})]})}):f.jsxs("div",{className:"mailbox-shell overflow-hidden rounded-md bg-[#f7f8fb] text-[#172033] ring-1 ring-black/10",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-[#d7dce6] bg-[#eef2f7] px-4 py-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-[#64748b]",children:"Mailbox"}),f.jsx("p",{className:"truncate text-sm text-[#334155]",children:u.mailboxAddress})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ye,{color:"zinc",children:"read-only"}),f.jsxs("span",{className:"text-xs tabular-nums text-[#64748b]",children:[u.messages.length," visible"]})]})]}),f.jsxs("div",{className:"grid min-h-[64vh] grid-cols-1 lg:grid-cols-[13rem_minmax(18rem,24rem)_minmax(0,1fr)]",children:[f.jsxs("aside",{className:"border-b border-[#d7dce6] bg-[#eef2f7] p-3 lg:border-b-0 lg:border-r",children:[f.jsx("div",{className:"space-y-1",children:j.map(M=>f.jsxs("button",{type:"button",onClick:()=>p(M.id),className:`flex w-full items-center justify-between rounded px-3 py-2 text-left text-sm transition-colors ${h===M.id?"bg-white text-[#0f172a] shadow-sm":"text-[#475569] hover:bg-white/60"}`,children:[f.jsx("span",{children:M.label}),f.jsx("span",{className:"text-xs tabular-nums text-[#64748b]",children:M.count})]},M.id))}),f.jsxs("div",{className:"mt-6 border-t border-[#d7dce6] pt-4",children:[f.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.14em] text-[#64748b]",children:"Access"}),f.jsxs("div",{className:"mt-2 space-y-2",children:[u.accessLog.slice(0,4).map(M=>f.jsxs("div",{className:"text-xs leading-4 text-[#64748b]",children:[f.jsx("p",{className:"truncate font-medium text-[#475569]",children:M.tool}),f.jsx("p",{className:"truncate",children:M.reason})]},M.id)),u.accessLog.length===0&&f.jsx("p",{className:"text-xs text-[#64748b]",children:"No reads yet."})]})]})]}),f.jsxs("section",{className:"border-b border-[#d7dce6] bg-white lg:border-b-0 lg:border-r",children:[f.jsxs("div",{className:"border-b border-[#e2e8f0] px-4 py-3",children:[f.jsx("p",{className:"text-sm font-semibold text-[#0f172a]",children:((D=j.find(M=>M.id===h))==null?void 0:D.label)??"All"}),f.jsxs("p",{className:"text-xs text-[#64748b]",children:[E.length," messages"]})]}),f.jsxs("div",{className:"max-h-[64vh] overflow-y-auto",children:[E.map(M=>f.jsxs("button",{type:"button",onClick:()=>g(M.id),className:`block w-full border-b border-[#edf2f7] px-4 py-3 text-left transition-colors ${m===M.id?"bg-[#eaf3ff]":"hover:bg-[#f8fafc]"}`,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-[#0f172a]",children:ir(M.from)}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-[#64748b]",children:nt(M.receivedAt)})]}),f.jsx("p",{className:"mt-1 truncate text-sm text-[#1e293b]",children:ey(M)}),f.jsx("p",{className:"mt-1 line-clamp-2 text-xs leading-5 text-[#64748b]",children:pt(M.snippet,150)}),f.jsxs("div",{className:"mt-2 flex items-center gap-2 text-[10px] uppercase tracking-[0.12em] text-[#64748b]",children:[f.jsx("span",{children:M.placement}),f.jsx("span",{children:M.source??M.compartmentKind}),M.attachmentCount>0&&f.jsxs("span",{children:[M.attachmentCount," attachments"]})]})]},M.id)),E.length===0&&f.jsx("div",{className:"px-4 py-10 text-center text-sm text-[#64748b]",children:"No messages."})]})]}),f.jsxs("main",{className:"min-w-0 bg-[#fbfcfe]",children:[!m&&f.jsx($3,{}),m&&S&&f.jsx(ty,{label:"Opening message"}),m&&!S&&(y==null?void 0:y.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-[#0f172a]",children:"Message unavailable"}),f.jsx("p",{className:"mt-2 text-sm text-[#64748b]",children:y==null?void 0:y.error})]})}),(y==null?void 0:y.status)==="ready"&&y.message&&f.jsxs("article",{className:"min-h-[64vh]",children:[f.jsxs("header",{className:"border-b border-[#d7dce6] bg-white px-6 py-5",children:[f.jsx("h2",{className:"text-xl font-semibold leading-tight text-[#0f172a]",children:ey(y.message)}),f.jsxs("div",{className:"mt-4 grid gap-1 text-sm text-[#475569]",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#0f172a]",children:"From:"})," ",ir(y.message.from)]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#0f172a]",children:"To:"})," ",ir(y.message.to)]}),y.message.cc.length>0&&f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#0f172a]",children:"Cc:"})," ",ir(y.message.cc)]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-[#0f172a]",children:"Received:"})," ",new Date(y.message.receivedAt).toLocaleString()]})]})]}),f.jsx("div",{className:"border-b border-[#fee2e2] bg-[#fff7ed] px-6 py-3 text-sm text-[#9a3412]",children:y.message.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-[#1e293b]",children:y.message.text||"(no text body)"}),y.message.bodyTruncated&&f.jsx("p",{className:"mt-4 text-xs text-[#64748b]",children:"Body truncated in Outlook."}),y.message.attachments.length>0&&f.jsxs("div",{className:"mt-6 border-t border-[#d7dce6] pt-4",children:[f.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-[#64748b]",children:"Attachments"}),f.jsx("div",{className:"mt-2 space-y-2",children:y.message.attachments.map(M=>f.jsxs("div",{className:"rounded border border-[#d7dce6] bg-white px-3 py-2 text-sm text-[#334155]",children:[M.filename," · ",M.contentType," · ",M.size.toLocaleString()," bytes"]},`${M.filename}-${M.size}`))})]})]})]})]})]})]}):f.jsx(ty,{label:"Opening mailbox"})}function $3(){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-[#0f172a]",children:"No message selected"}),f.jsx("p",{className:"mt-2 text-sm text-[#64748b]",children:"Reading pane idle."})]})})}function ty({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-[#2563eb]"}),f.jsxs("span",{className:"text-xs text-[#64748b]",children:[n,"..."]})]})}function jd(n){const a=n.function.name,s=q3(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 q3(n){try{const a=JSON.parse(n);if(a&&typeof a=="object")return a}catch{}return{}}function Y3(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 Cl(n){return Y3(n.content)}function Yb(n){return n.time.authoredAt??n.time.observedAt??n.time.recordedAt}const ny={"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 Gb(n){return n==="bluebubbles"?"iMessage":n==="teams"?"Teams":n==="cli"?"CLI":n==="mail"?"Mail":n}function G3(n){return n==="bluebubbles"?"imessage":n==="teams"?"teams":n==="cli"?"terminal":"default"}function X3(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 K3(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 F3(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 sr(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 Z3(n){return Yb(n)}function Xi(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(Z3(n)))}function Q3({agentName:n,focus:a,onFocusConsumed:s,deskPrefs:o,refreshGeneration:u}){Pi();const[d,h]=w.useState(null),[p,m]=w.useState(null),[g,y]=w.useState(null),[x,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),y(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(y).catch(()=>y(null)).finally(()=>S(!1))},[n,p,u,a]);function j(z){if(p===z){m(null),y(null),T.current=null;return}m(z),y(null),S(!0)}const E=new Set((o==null?void 0:o.starredFriends)??[]);if(!d)return f.jsx(Xb,{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 M=[...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}),R=[],V=new Map;for(const[z,U]of M)V.set(R.length,{name:U[0].friendName,channels:U.length,starred:E.has(z)}),R.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:R.map((z,U)=>{var Se;const P=V.get(U),F=E.has(z.friendId),W=`${z.friendId}/${z.channel}/${z.key}`,oe=p===W,B=ny[z.replyState]??ny.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 ${oe?"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 ",Gb(z.channel)]}),f.jsx(ye,{color:B.color,children:B.label})]}),f.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:nt(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,"%"]})]})]})]}),oe&&f.jsx(P3,{loading:x,transcript:g})]},W)})})]})}function P3({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(Xb,{label:"Loading transcript"}),a&&f.jsx(J3,{transcript:a})]})}function J3({transcript:n}){const{messages:a,lastUsage:s}=n,o=G3(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:X3(o),children:[f.jsxs("div",{className:K3(o),children:[f.jsx("p",{className:o==="terminal"?"font-mono text-xs":"text-sm font-semibold",children:Gb(n.channel)}),f.jsxs("p",{className:o==="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:o==="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)}),Cl(g)]},g.id))]}),d.map(g=>g.role==="tool"?null:g.role==="user"?f.jsx(W3,{msg:g,surface:o},g.id):g.role==="assistant"?f.jsx(I3,{msg:g,toolResults:m,surface:o},g.id):null)]})]})}function W3({msg:n,surface:a}){const s=Cl(n);return f.jsx("div",{className:"flex justify-start py-1",children:f.jsxs("div",{className:F3(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 I3({msg:n,toolResults:a,surface:s}){const o=Cl(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:sr(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:sr(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:sr(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 o&&d.length===0&&p.push(f.jsx("div",{className:"flex justify-end py-1",children:f.jsxs("div",{className:sr(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:o})]})},`${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(eC,{call:m,result:a.get(m.id),surface:s},m.id))})},`${n.id}-tools`)),f.jsx(f.Fragment,{children:p})}function eC({call:n,result:a,surface:s}){const[o,u]=w.useState(!1),d=a?Cl(a):null;return f.jsxs("button",{onClick:()=>u(!o),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}),!o&&f.jsx("span",{className:"text-[10px] text-ouro-shadow",children:"tap to inspect"})]}),o&&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(ye,{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 Xb({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 tC({agentName:n,view:a,focus:s,onFocusConsumed:o,refreshGeneration:u}){var V,z;const d=Pi(),[h,p]=w.useState(null),[m,g]=w.useState(null),[y,x]=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(x).catch(()=>{})},[n,u]);const E=(m==null?void 0:m.items)??T.items,D=(m==null?void 0:m.openCount)??T.openCount,M=(h==null?void 0:h.items)??[],R=new Map;for(const U of M){const P=U.obligationId;if(P){const F=R.get(P);F?F.push(U):R.set(P,[U])}}return f.jsxs("div",{className:"space-y-8",children:[f.jsxs("section",{children:[f.jsx(lr,{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=R.get(U.id)??[],F=nC(U)?U:null,W=(F==null?void 0:F.isPrimary)??!1,oe=(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(ye,{color:"lime",children:"primary"}),f.jsx(ye,{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]}),(oe==null?void 0:oe.waitingOn)&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Waiting on: ",oe.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(ye,{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:nt(U.updatedAt)})]},U.id)})}):f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No open obligations."})]}),y&&y.steps.length>0&&f.jsxs("section",{children:[f.jsx(lr,{label:`Self-fix ${y.active?"(active)":"(inactive)"}`}),y.currentStep&&f.jsxs("p",{className:"mt-1 text-xs text-ouro-glow",children:["Current: ",y.currentStep]}),f.jsx("div",{className:"mt-3 space-y-1.5",children:y.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(ye,{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(lr,{label:`Coding lanes (${M.length})`}),M.length>0?f.jsx("div",{className:"mt-3 space-y-2",children:M.map(U=>{const P=U.status,F=P==="failed",W=U.failure,oe=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(ye,{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:[oe&&f.jsxs("button",{onClick:()=>d({tab:"work",focus:oe}),className:"text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",oe.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," · ",nt(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(lr,{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(ye,{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(ye,{color:"red",children:U},U))})]})]})]})}function lr({label:n}){return f.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function nC(n){return"isPrimary"in n}function aC({agentName:n,focus:a,onFocusConsumed:s,refreshGeneration:o}){const u=Pi(),[d,h]=w.useState(null),[p,m]=w.useState(null),[g,y]=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(y)])},[n,o]);const x=(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})`}),x.length>0?f.jsx("div",{className:"mt-3 space-y-2",children:x.map((j,E)=>{const D=j.bridgeId,M=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(ye,{color:"yellow",children:["waiting ",nt(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),"…"]}),M&&f.jsxs("button",{onClick:()=>u({tab:"work",focus:M}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",M.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,M=j.lifecycle==="active";return f.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${M?"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(ye,{color:M?"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((R,V)=>f.jsxs("button",{onClick:()=>u({tab:"sessions",focus:`${R.friendId}/${R.channel}/${R.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:[R.friendId,"/",R.channel,"/",R.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:nt(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:[" · ",nt(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 iC(n){return Yb(n)}function el(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(iC(n)))}function sC({agentName:n,view:a,refreshGeneration:s}){const o=Pi(),[u,d]=w.useState(null),[h,p]=w.useState(null),[m,g]=w.useState(!1),y=w.useRef(null),x=a.inner;w.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/habits`).then(d)},[n,s]),w.useEffect(()=>{h&&y.current!==s&&(y.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=>{y.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"),M=x.mode==="deep"?x.origin:null,R=x.mode==="deep"?x.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?nt(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:x.status}),x.summary&&f.jsx("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:x.summary}),f.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:x.hasPending?"Pending inner work queued.":"No pending inner work."}),M&&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:()=>{o({tab:"sessions",focus:`${M.friendId}/${M.channel}/${M.key}`})},className:"mt-1 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:[M.friendId.slice(0,8),"…/",M.channel,"/",M.key]}),R&&f.jsxs("button",{onClick:()=>o({tab:"work"}),className:"ml-2 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",R]})]})]})}),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(lC,{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 lC({messages:n}){const a=n.filter(g=>g.role!=="system"&&g.role!=="tool"),[s,o]=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 y=(g.toolCalls??[]).map(jd);for(const x of y)x.kind==="surface"&&p.push({index:g.sequence,kind:"surfaced",label:pt(x.deliveredText??"",40)}),x.kind==="rest"&&p.push({index:g.sequence,kind:"resting",label:"resting"}),x.kind==="delegation"&&p.push({index:g.sequence,kind:"delegated",label:"continued thinking"})}function m(g){var x;const y=(x=u.current)==null?void 0:x.querySelector(`[data-msg-index="${g}"]`);y&&y.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,y)=>f.jsxs("button",{onClick:()=>{o(!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]},y))}),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:()=>o(!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 y=Cl(g);if(g.role==="user"){const x=y.includes("[pending from")||y.includes("[delegated"),S=y.includes("waking up")||y.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 ${x?"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:x?"var(--color-ouro-gold)":"var(--color-ouro-shadow)"},children:x?"★ 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:y})]})},g.id)}if(g.role==="assistant"){const x=(g.toolCalls??[]).map(jd),S=x.filter(E=>E.kind==="surface"),T=x.filter(E=>E.kind==="rest"),j=x.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&&y&&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:y})]})})]},g.id)}return null})]})]})}function Bf({h:n}){const a=n.isOverdue,s=n.isDegraded,o=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":o==="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(ye,{color:a?"red":s?"yellow":o==="active"?"lime":"zinc",children:a?"overdue":s?"degraded":o}),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 ${nt(n.lastRun)}`:"never run"}),s&&n.degradedReason&&f.jsx("span",{className:"text-ouro-gold",children:n.degradedReason}),!a&&!s&&o==="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&&o==="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 oC({agentName:n,refreshGeneration:a}){const[s,o]=w.useState(null),[u,d]=w.useState(null),[h,p]=w.useState("diary");if(w.useEffect(()=>{_e(`/agents/${encodeURIComponent(n)}/notes`).then(o),_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(y=>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:y.text}),f.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-ouro-shadow",children:[f.jsx(ye,{children:y.source}),f.jsx("span",{children:nt(y.createdAt)})]})]},y.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(y=>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:y.filename}),f.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-mist",children:y.preview})]},y.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((y,x)=>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(ye,{color:y.decision==="saved"?"lime":"zinc",children:y.decision}),f.jsx(ye,{children:y.kind.replace(/_/g," ")}),f.jsx("span",{className:"text-xs text-ouro-shadow",children:nt(y.timestamp)})]}),y.reason&&f.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:y.reason}),y.excerpt&&f.jsx("p",{className:"mt-0.5 text-xs text-ouro-shadow italic truncate",children:y.excerpt})]},x))}):f.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No note decisions logged yet."})})]})}function rC({agentName:n,view:a,refreshGeneration:s}){var j;const[o,u]=w.useState(null),[d,h]=w.useState(null),p=a.agent,m=p.degraded,g=p.freshness,y=((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 x=gC(o)?o:null,S=(x==null?void 0:x.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:uC(y)}),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"}),y.length>0?f.jsx("div",{className:"mt-3 grid gap-2 lg:grid-cols-2",children:y.map(E=>{const D=hC(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(ye,{color:mC(E),children:E.status}),f.jsx(ye,{color:pC(E.readiness.status),children:E.readiness.status})]}),f.jsx("p",{className:"mt-2 text-sm font-medium text-ouro-bone",children:cC(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: ",fC(E.readiness)]}),E.readiness.attempts!==void 0&&f.jsxs("p",{children:["attempts: ",E.readiness.attempts]}),E.readiness.checkedAt&&f.jsxs("p",{children:["checked: ",nt(E.readiness.checkedAt)]}),f.jsxs("p",{children:["credentials: ",dC(E.credential)]}),E.credential.revision&&f.jsxs("p",{children:["revision: ",E.credential.revision]}),ay(E)&&f.jsxs("p",{children:["reason: ",ay(E)]}),D&&f.jsxs("p",{className:"break-all text-ouro-fang",children:["repair: ",D]}),E.warnings.map((M,R)=>f.jsxs("p",{className:"break-words text-ouro-gold",children:["warning: ",M]},R))]})]},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"}),x?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:x.status}),f.jsx(Hi,{label:"Mode",value:x.mode}),f.jsx(Hi,{label:"Uptime",value:`${Math.floor(x.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 M=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(ye,{color:M==="error"?"red":M==="warn"?"yellow":"zinc",children:M}),f.jsx("span",{className:"text-ouro-shadow",children:nt(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 uC(n){return n.length===0?"none":`${n.filter(s=>s.status==="configured").length}/${n.length} configured`}function cC(n){return n.status==="unconfigured"?"unconfigured":`${n.provider} / ${n.model}`}function fC(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 dC(n){return n.status==="present"?n.source??"vault":n.status==="invalid-pool"?"vault unavailable":"missing"}function hC(n){return n.status==="unconfigured"?n.repairCommand:n.credential.repairCommand}function ay(n){return n.status==="unconfigured"?n.reason:n.readiness.reason}function mC(n){return n.status==="configured"?"green":"yellow"}function pC(n){return n==="ready"?"green":n==="failed"?"red":n==="stale"?"amber":"zinc"}function gC(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 vC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function yC({agentName:n,view:a,deskPrefs:s,refreshGeneration:o,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 y=w.useCallback(E=>{h(E.tab),m(E.focus),window.history.pushState(null,"",$f({agent:n,tab:E.tab,focus:E.focus}))},[n]),x=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(D3(y),!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(oy.Provider,{value:y,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(ye,{color:vC(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(R=>Hf.find(V=>V.id===R)).filter(R=>R!==void 0),M=Hf.filter(R=>!E.includes(R.id));return[...D,...M]})().map(E=>f.jsx("button",{type:"button",onClick:()=>x(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(_3,{view:a,deskPrefs:s,refreshGeneration:o}),d==="mail"&&f.jsx(H3,{agentName:n,focus:p,onFocusConsumed:S,refreshGeneration:o}),d==="sessions"&&f.jsx(Q3,{agentName:n,focus:p,onFocusConsumed:S,deskPrefs:s,refreshGeneration:o}),d==="work"&&f.jsx(tC,{agentName:n,view:a,focus:p,onFocusConsumed:S,refreshGeneration:o}),d==="connections"&&f.jsx(aC,{agentName:n,focus:p,onFocusConsumed:S,refreshGeneration:o}),d==="inner"&&f.jsx(sC,{agentName:n,view:a,refreshGeneration:o}),d==="notes"&&f.jsx(oC,{agentName:n,refreshGeneration:o}),d==="runtime"&&f.jsx(rC,{agentName:n,view:a,refreshGeneration:o})]})]})})}function iy(){return ry(window.location.hash)}function xC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function bC(){var D,M;const[n,a]=w.useState(null),[s,o]=w.useState(((D=iy())==null?void 0:D.agent)??""),[u,d]=w.useState(null),[h,p]=w.useState(0),m=w.useRef(0),g=w.useRef(iy()),y=w.useCallback(async()=>{var R;try{const V=await _e("/machine");if(a(V),!s&&V.agents.length>0){const z=((R=g.current)==null?void 0:R.agent)??V.agents[0].agentName;o(z)}}catch{}},[s]),[x,S]=w.useState(null),T=w.useCallback(async R=>{if(!R){d(null),S(null);return}try{const[V,z]=await Promise.all([_e(`/agents/${encodeURIComponent(R)}`),_e(`/agents/${encodeURIComponent(R)}/desk-prefs`)]);d(V),S(z)}catch{d(null),S(null)}},[]);w.useEffect(()=>{y()},[y]),w.useEffect(()=>{s&&T(s)},[s,T]),w.useEffect(()=>N2(()=>{const V=++m.current;y().then(async()=>{m.current===V&&(s&&(await T(s),m.current!==V)||p(z=>z+1))})}),[y,T,s]),w.useEffect(()=>{const R=()=>{const V=ry(window.location.hash);V&&o(V.agent)};return window.addEventListener("hashchange",R),()=>window.removeEventListener("hashchange",R)},[]);const j=w.useCallback(R=>{o(R),window.history.pushState(null,"",$f({agent:R,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(w3,{navbar:f.jsxs(g3,{children:[f.jsx(y3,{}),f.jsx(v3,{children:f.jsx(oh,{children:f.jsx(ye,{color:n.overview.daemon.mode==="dev"?"yellow":"lime",children:n.overview.daemon.mode})})})]}),sidebar:f.jsxs(T3,{className:"bg-ouro-deep",children:[f.jsx(j3,{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(E3,{className:"[&>[data-slot=section]+[data-slot=section]]:mt-4",children:[f.jsxs(J0,{children:[f.jsx(W0,{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(R=>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 ${R.alert?"text-ouro-fang":"text-ouro-bone"}`,children:R.v}),f.jsx("div",{className:"text-[9px] uppercase tracking-widest text-ouro-shadow",children:R.l})]},R.l))})]}),f.jsxs(J0,{children:[f.jsx(W0,{className:"text-ouro-mist/60",children:"Agents"}),n.agents.map(R=>f.jsx(A3,{current:R.agentName===s,onClick:()=>j(R.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(C3,{className:"text-ouro-bone",children:R.agentName}),f.jsxs("p",{className:"truncate text-xs text-ouro-shadow",children:[R.tasks.liveCount,"t · ",R.obligations.openCount,"o · ",R.coding.activeCount,"c"]})]}),f.jsx(ye,{color:xC(R.attention.level),children:R.attention.label})]})},R.agentName))]})]}),f.jsx(N3,{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 R=x==null?void 0:x.statusLine;if(R)return R;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(yC,{agentName:s,view:u,deskPrefs:x,refreshGeneration:h,initialRoute:((M=g.current)==null?void 0:M.agent)===s?g.current:void 0})})}E2.createRoot(document.getElementById("app")).render(f.jsx(w.StrictMode,{children:f.jsx(bC,{})}));