@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.
- package/changelog.json +16 -0
- package/dist/heart/daemon/cli-exec.js +222 -1
- package/dist/heart/daemon/cli-help.js +19 -2
- package/dist/heart/daemon/cli-parse.js +44 -3
- package/dist/heart/daemon/doctor.js +18 -10
- package/dist/heart/daemon/sense-manager.js +29 -2
- package/dist/heart/identity.js +4 -1
- package/dist/heart/outlook/outlook-http-hooks.js +2 -0
- package/dist/heart/outlook/outlook-http-routes.js +14 -2
- package/dist/heart/outlook/outlook-read.js +4 -1
- package/dist/heart/outlook/readers/mail.js +203 -0
- package/dist/heart/sense-truth.js +8 -4
- package/dist/heart/turn-context.js +14 -4
- package/dist/mailroom/blob-store.js +154 -0
- package/dist/mailroom/core.js +387 -0
- package/dist/mailroom/entry.js +160 -0
- package/dist/mailroom/file-store.js +230 -0
- package/dist/mailroom/mbox-import.js +105 -0
- package/dist/mailroom/reader.js +150 -0
- package/dist/mailroom/smtp-ingress.js +176 -0
- package/dist/mind/friends/channel.js +9 -0
- package/dist/mind/friends/types.js +1 -1
- package/dist/mind/prompt.js +16 -4
- package/dist/outlook-ui/assets/index-BXw3xmUo.js +61 -0
- package/dist/outlook-ui/assets/index-D4Wg-o8Z.css +1 -0
- package/dist/outlook-ui/index.html +2 -2
- package/dist/repertoire/tools-mail.js +209 -0
- package/dist/senses/commands.js +1 -1
- package/package.json +6 -1
- package/dist/outlook-ui/assets/index-BAcU08c-.css +0 -1
- package/dist/outlook-ui/assets/index-D7l3l4vY.js +0 -61
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
function rw(n,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const f=Object.getOwnPropertyDescriptor(o,u);f&&Object.defineProperty(n,u,f.get?f:{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 f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(u){if(u.ep)return;u.ep=!0;const f=l(u);fetch(u.href,f)}})();function uw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var sf={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 sv;function cw(){if(sv)return Qs;sv=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(o,u,f){var d=null;if(f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),"key"in u){f={};for(var m in u)m!=="key"&&(f[m]=u[m])}else f=u;return u=f.ref,{$$typeof:n,type:o,key:d,ref:u!==void 0?u:null,props:f}}return Qs.Fragment=a,Qs.jsx=l,Qs.jsxs=l,Qs}var lv;function fw(){return lv||(lv=1,sf.exports=cw()),sf.exports}var h=fw(),lf={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 ov;function dw(){if(ov)return fe;ov=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function T(N){return N===null||typeof N!="object"?null:(N=S&&N[S]||N["@@iterator"],typeof N=="function"?N:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,D={};function z(N,G,K){this.props=N,this.context=G,this.refs=D,this.updater=K||E}z.prototype.isReactComponent={},z.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,G,"setState")},z.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function O(){}O.prototype=z.prototype;function V(N,G,K){this.props=N,this.context=G,this.refs=D,this.updater=K||E}var R=V.prototype=new O;R.constructor=V,j(R,z.prototype),R.isPureReactComponent=!0;var U=Array.isArray;function P(){}var F={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function oe(N,G,K){var I=K.ref;return{$$typeof:n,type:N,key:G,ref:I!==void 0?I:null,props:K}}function B(N,G){return oe(N.type,G,N.props)}function Z(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ie(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(K){return G[K]})}var le=/\/+/g;function Se(N,G){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):G.toString(36)}function De(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(P,P):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function $(N,G,K,I,ue){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var Te=!1;if(N===null)Te=!0;else switch(pe){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(N.$$typeof){case n:case a:Te=!0;break;case y:return Te=N._init,$(Te(N._payload),G,K,I,ue)}}if(Te)return ue=ue(N),Te=I===""?"."+Se(N,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||N&&N.key===ue.key?"":(""+ue.key).replace(le,"$&/")+"/")+Te)),G.push(ue)),1;Te=0;var Ze=I===""?".":I+":";if(U(N))for(var Le=0;Le<N.length;Le++)I=N[Le],pe=Ze+Se(I,Le),Te+=$(I,G,K,pe,ue);else if(Le=T(N),typeof Le=="function")for(N=Le.call(N),Le=0;!(I=N.next()).done;)I=I.value,pe=Ze+Se(I,Le++),Te+=$(I,G,K,pe,ue);else if(pe==="object"){if(typeof N.then=="function")return $(De(N),G,K,I,ue);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(N,G,K){if(N==null)return N;var I=[],ue=0;return $(N,I,"","",function(pe){return G.call(K,pe,ue++)}),I}function J(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(K){(N._status===0||N._status===-1)&&(N._status=1,N._result=K)},function(K){(N._status===0||N._status===-1)&&(N._status=2,N._result=K)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var re=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},me={map:Q,forEach:function(N,G,K){Q(N,function(){G.apply(this,arguments)},K)},count:function(N){var G=0;return Q(N,function(){G++}),G},toArray:function(N){return Q(N,function(G){return G})||[]},only:function(N){if(!Z(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return fe.Activity=x,fe.Children=me,fe.Component=z,fe.Fragment=l,fe.Profiler=u,fe.PureComponent=V,fe.StrictMode=o,fe.Suspense=p,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,fe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return F.H.useMemoCache(N)}},fe.cache=function(N){return function(){return N.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(N,G,K){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var I=j({},N.props),ue=N.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(N.type,ue,I)},fe.createContext=function(N){return N={$$typeof:d,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:f,_context:N},N},fe.createElement=function(N,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(N&&N.defaultProps)for(I in Te=N.defaultProps,Te)ue[I]===void 0&&(ue[I]=Te[I]);return oe(N,pe,ue)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(N){return{$$typeof:m,render:N}},fe.isValidElement=Z,fe.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:J}},fe.memo=function(N,G){return{$$typeof:g,type:N,compare:G===void 0?null:G}},fe.startTransition=function(N){var G=F.T,K={};F.T=K;try{var I=N(),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(N){return F.H.use(N)},fe.useActionState=function(N,G,K){return F.H.useActionState(N,G,K)},fe.useCallback=function(N,G){return F.H.useCallback(N,G)},fe.useContext=function(N){return F.H.useContext(N)},fe.useDebugValue=function(){},fe.useDeferredValue=function(N,G){return F.H.useDeferredValue(N,G)},fe.useEffect=function(N,G){return F.H.useEffect(N,G)},fe.useEffectEvent=function(N){return F.H.useEffectEvent(N)},fe.useId=function(){return F.H.useId()},fe.useImperativeHandle=function(N,G,K){return F.H.useImperativeHandle(N,G,K)},fe.useInsertionEffect=function(N,G){return F.H.useInsertionEffect(N,G)},fe.useLayoutEffect=function(N,G){return F.H.useLayoutEffect(N,G)},fe.useMemo=function(N,G){return F.H.useMemo(N,G)},fe.useOptimistic=function(N,G){return F.H.useOptimistic(N,G)},fe.useReducer=function(N,G,K){return F.H.useReducer(N,G,K)},fe.useRef=function(N){return F.H.useRef(N)},fe.useState=function(N){return F.H.useState(N)},fe.useSyncExternalStore=function(N,G,K){return F.H.useSyncExternalStore(N,G,K)},fe.useTransition=function(){return F.H.useTransition()},fe.version="19.2.4",fe}var rv;function jr(){return rv||(rv=1,lf.exports=dw()),lf.exports}var w=jr();const ce=uw(w),uv=rw({__proto__:null,default:ce},[w]);var of={exports:{}},Ps={},rf={exports:{}},uf={};/**
|
|
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 cv;function hw(){return cv||(cv=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 l($){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,N=me>>>1;re<N;){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 f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],g=[],y=1,x=null,S=3,T=!1,E=!1,j=!1,D=!1,z=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function R($){for(var Q=l(g);Q!==null;){if(Q.callback===null)o(g);else if(Q.startTime<=$)o(g),Q.sortIndex=Q.expirationTime,a(p,Q);else break;Q=l(g)}}function U($){if(j=!1,R($),!E)if(l(p)!==null)E=!0,P||(P=!0,ie());else{var Q=l(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:{E=!1,j&&(j=!1,O(F),F=-1),T=!0;var J=S;try{t:{for(R($),x=l(p);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,R($),Q=!0;break t}x===l(p)&&o(p),R($)}else o(p);x=l(p)}if(x!==null)Q=!0;else{var N=l(g);N!==null&&De(U,N.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(){z(Z,0)};function De($,Q){F=z(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,$),l(p)===null&&$===l(g)&&(j?(O(F),F=-1):j=!0,De(U,J-re))):($.sortIndex=me,a(p,$),E||T||(E=!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}}}})(uf)),uf}var fv;function mw(){return fv||(fv=1,rf.exports=hw()),rf.exports}var cf={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 dv;function pw(){if(dv)return ht;dv=1;var n=jr();function a(p){var g="https://react.dev/errors/"+p;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 #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(p,g,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:p,containerInfo:g,implementation:y}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,g){if(p==="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(p,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 f(p,g,null,y)},ht.flushSync=function(p){var g=d.T,y=o.p;try{if(d.T=null,o.p=2,p)return p()}finally{d.T=g,o.p=y,o.d.f()}},ht.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(p,g))},ht.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},ht.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var y=g.as,x=m(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(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:T}):y==="script"&&o.d.X(p,{crossOrigin:x,integrity:S,fetchPriority:T,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ht.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=m(g.as,g.crossOrigin);o.d.M(p,{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(p)},ht.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,x=m(y,g.crossOrigin);o.d.L(p,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(p,g){if(typeof p=="string")if(g){var y=m(g.as,g.crossOrigin);o.d.m(p,{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(p)},ht.requestFormReset=function(p){o.d.r(p)},ht.unstable_batchedUpdates=function(p,g){return p(g)},ht.useFormState=function(p,g,y){return d.H.useFormState(p,g,y)},ht.useFormStatus=function(){return d.H.useHostTransitionStatus()},ht.version="19.2.4",ht}var hv;function I0(){if(hv)return cf.exports;hv=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(),cf.exports=pw(),cf.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 mv;function gw(){if(mv)return Ps;mv=1;var n=mw(),a=jr(),l=I0();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 f(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 d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var c=r.alternate;if(c===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===i)return p(r),e;if(c===s)return p(r),t;c=c.sibling}throw Error(o(188))}if(i.return!==s.return)i=r,s=c;else{for(var v=!1,b=r.child;b;){if(b===i){v=!0,i=r,s=c;break}if(b===s){v=!0,s=r,i=c;break}b=b.sibling}if(!v){for(b=c.child;b;){if(b===i){v=!0,i=c,s=r;break}if(b===s){v=!0,s=c,i=r;break}b=b.sibling}if(!v)throw Error(o(189))}}if(i.alternate!==s)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"),E=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),V=Symbol.for("react.context"),R=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 j:return"Fragment";case z: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 E:return"Portal";case V:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case R: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=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},re=[],me=-1;function N(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=N(null),ue=N(null),pe=N(null),Te=N(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)?Cg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cg(t),e=Mg(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=Mg(t,e.type);t!==i&&(K(ue,e),K(I,i))}function Nl(e){ue.current===e&&(G(I),G(ue)),Te.current===e&&(G(Te),Xs._currentValue=J)}var Hr,ih;function wa(e){if(Hr===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Hr=t&&t[1]||"",ih=-1<i.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Hr+e+ih}var $r=!1;function qr(e,t){if(!e||$r)return"";$r=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={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]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),v=c[0],b=c[1];if(v&&b){var A=v.split(`
|
|
44
|
-
`),L=b.split(`
|
|
45
|
-
`);for(r=s=0;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;for(;r<L.length&&!L[r].includes("DetermineComponentFrameRoot");)r++;if(s===A.length||r===L.length)for(s=A.length-1,r=L.length-1;1<=s&&0<=r&&A[s]!==L[r];)r--;for(;1<=s&&0<=r;s--,r--)if(A[s]!==L[r]){if(s!==1||r!==1)do if(s--,r--,0>r||A[s]!==L[r]){var q=`
|
|
46
|
-
`+A[s].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=s&&0<=r);break}}}finally{$r=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?wa(i):""}function Bb(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 qr(e.type,!1);case 11:return qr(e.type.render,!1);case 1:return qr(e.type,!0);case 31:return wa("Activity");default:return""}}function sh(e){try{var t="",i=null;do t+=Bb(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
-
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var Yr=Object.prototype.hasOwnProperty,Gr=n.unstable_scheduleCallback,Xr=n.unstable_cancelCallback,Hb=n.unstable_shouldYield,$b=n.unstable_requestPaint,Ct=n.unstable_now,qb=n.unstable_getCurrentPriorityLevel,lh=n.unstable_ImmediatePriority,oh=n.unstable_UserBlockingPriority,Cl=n.unstable_NormalPriority,Yb=n.unstable_LowPriority,rh=n.unstable_IdlePriority,Gb=n.log,Xb=n.unstable_setDisableYieldValue,as=null,Mt=null;function Bn(e){if(typeof Gb=="function"&&Xb(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(as,e)}catch{}}var Dt=Math.clz32?Math.clz32:Zb,Kb=Math.log,Fb=Math.LN2;function Zb(e){return e>>>=0,e===0?32:31-(Kb(e)/Fb|0)|0}var Ml=256,Dl=262144,Ol=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 zl(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~c,s!==0?r=Ta(s):(v&=b,v!==0?r=Ta(v):i||(i=b&~e,i!==0&&(r=Ta(i))))):(b=s&~c,b!==0?r=Ta(b):v!==0?r=Ta(v):i||(i=s&~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 Qb(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 uh(){var e=Ol;return Ol<<=1,(Ol&62914560)===0&&(Ol=4194304),e}function Kr(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 Pb(e,t,i,s,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,A=e.expirationTimes,L=e.hiddenUpdates;for(i=v&~i;0<i;){var q=31-Dt(i),X=1<<q;b[q]=0,A[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}s!==0&&ch(e,s,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(v&~t))}function ch(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Dt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function fh(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Dt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function dh(e,t){var i=t&-t;return i=(i&42)!==0?1:Fr(i),(i&(e.suspendedLanes|t))!==0?0:i}function Fr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Zr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function hh(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Wg(e.type))}function mh(e,t){var i=Q.p;try{return Q.p=e,t()}finally{Q.p=i}}var Hn=Math.random().toString(36).slice(2),st="__reactFiber$"+Hn,yt="__reactProps$"+Hn,ni="__reactContainer$"+Hn,Qr="__reactEvents$"+Hn,Jb="__reactListeners$"+Hn,Wb="__reactHandles$"+Hn,ph="__reactResources$"+Hn,ls="__reactMarker$"+Hn;function Pr(e){delete e[st],delete e[yt],delete e[Qr],delete e[Jb],delete e[Wb]}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=Vg(e);e!==null;){if(i=e[st])return i;e=Vg(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[ph];return t||(t=e[ph]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[ls]=!0}var gh=new Set,vh={};function Ea(e,t){li(e,t),li(e+"Capture",t)}function li(e,t){for(vh[e]=t,e=0;e<t.length;e++)gh.add(t[e])}var Ib=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]*$"),yh={},xh={};function e1(e){return Yr.call(xh,e)?!0:Yr.call(yh,e)?!1:Ib.test(e)?xh[e]=!0:(yh[e]=!0,!1)}function Rl(e,t,i){if(e1(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function kl(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,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}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 bh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function t1(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,c=s.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:s.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jr(e){if(!e._valueTracker){var t=bh(e)?"checked":"value";e._valueTracker=t1(e,t,""+e[t])}}function Sh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=bh(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Ll(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 n1=/[\n"\\]/g;function Ht(e){return e.replace(n1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wr(e,t,i,s,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?Ir(e,v,Bt(t)):i!=null?Ir(e,v,Bt(i)):s!=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 wh(e,t,i,s,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)){Jr(e);return}i=i!=null?""+Bt(i):"",t=t!=null?""+Bt(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Jr(e)}function Ir(e,t,i){t==="number"&&Ll(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function oi(e,t,i,s){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&&s&&(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,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Th(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 Eh(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(o(92));if(De(s)){if(1<s.length)throw Error(o(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Bt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Jr(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 a1=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 jh(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||a1.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Ah(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&jh(e,r,s)}else for(var c in t)t.hasOwnProperty(c)&&jh(e,c,t[c])}function eu(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 i1=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"]]),s1=/^[\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 Vl(e){return s1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yn(){}var tu=null;function nu(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 Nh(e){var t=ii(e);if(t&&(e=t.stateNode)){var i=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Wr(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 s=i[t];if(s!==e&&s.form===e.form){var r=s[yt]||null;if(!r)throw Error(o(90));Wr(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Sh(s)}break e;case"textarea":Th(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&oi(e,!!i.multiple,t,!1)}}}var au=!1;function Ch(e,t,i){if(au)return e(t,i);au=!0;try{var s=e(t);return s}finally{if(au=!1,(ui!==null||ci!==null)&&(Eo(),ui&&(t=ui,e=ci,ci=ui=null,Nh(t),e)))for(t=0;t<e.length;t++)Nh(e[t])}}function rs(e,t){var i=e.stateNode;if(i===null)return null;var s=i[yt]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(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"),iu=!1;if(xn)try{var us={};Object.defineProperty(us,"passive",{get:function(){iu=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{iu=!1}var $n=null,su=null,_l=null;function Mh(){if(_l)return _l;var e,t=su,i=t.length,s,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(s=1;s<=v&&t[i-s]===r[c-s];s++);return _l=r.slice(e,1<s?1-s:void 0)}function Ul(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 Bl(){return!0}function Dh(){return!1}function xt(e){function t(i,s,r,c,v){this._reactName=i,this._targetInst=r,this.type=s,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)?Bl:Dh,this.isPropagationStopped=Dh,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=Bl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Bl)},persist:function(){},isPersistent:Bl}),t}var ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hl=xt(ja),cs=x({},ja,{view:0,detail:0}),l1=xt(cs),lu,ou,fs,$l=x({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,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"?(lu=e.screenX-fs.screenX,ou=e.screenY-fs.screenY):ou=lu=0,fs=e),lu)},movementY:function(e){return"movementY"in e?e.movementY:ou}}),Oh=xt($l),o1=x({},$l,{dataTransfer:0}),r1=xt(o1),u1=x({},cs,{relatedTarget:0}),ru=xt(u1),c1=x({},ja,{animationName:0,elapsedTime:0,pseudoElement:0}),f1=xt(c1),d1=x({},ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),h1=xt(d1),m1=x({},ja,{data:0}),zh=xt(m1),p1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g1={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"},v1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function y1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=v1[e])?!!t[e]:!1}function uu(){return y1}var x1=x({},cs,{key:function(e){if(e.key){var t=p1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ul(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(e){return e.type==="keypress"?Ul(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ul(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b1=xt(x1),S1=x({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rh=xt(S1),w1=x({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),T1=xt(w1),E1=x({},ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),j1=xt(E1),A1=x({},$l,{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}),N1=xt(A1),C1=x({},ja,{newState:0,oldState:0}),M1=xt(C1),D1=[9,13,27,32],cu=xn&&"CompositionEvent"in window,ds=null;xn&&"documentMode"in document&&(ds=document.documentMode);var O1=xn&&"TextEvent"in window&&!ds,kh=xn&&(!cu||ds&&8<ds&&11>=ds),Lh=" ",Vh=!1;function _h(e,t){switch(e){case"keyup":return D1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fi=!1;function z1(e,t){switch(e){case"compositionend":return Uh(t);case"keypress":return t.which!==32?null:(Vh=!0,Lh);case"textInput":return e=t.data,e===Lh&&Vh?null:e;default:return null}}function R1(e,t){if(fi)return e==="compositionend"||!cu&&_h(e,t)?(e=Mh(),_l=su=$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 kh&&t.locale!=="ko"?null:t.data;default:return null}}var k1={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 Bh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!k1[e.type]:t==="textarea"}function Hh(e,t,i,s){ui?ci?ci.push(s):ci=[s]:ui=s,t=Oo(t,"onChange"),0<t.length&&(i=new Hl("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var hs=null,ms=null;function L1(e){wg(e,0)}function ql(e){var t=os(e);if(Sh(t))return e}function $h(e,t){if(e==="change")return t}var qh=!1;if(xn){var fu;if(xn){var du="oninput"in document;if(!du){var Yh=document.createElement("div");Yh.setAttribute("oninput","return;"),du=typeof Yh.oninput=="function"}fu=du}else fu=!1;qh=fu&&(!document.documentMode||9<document.documentMode)}function Gh(){hs&&(hs.detachEvent("onpropertychange",Xh),ms=hs=null)}function Xh(e){if(e.propertyName==="value"&&ql(ms)){var t=[];Hh(t,ms,e,nu(e)),Ch(L1,t)}}function V1(e,t,i){e==="focusin"?(Gh(),hs=t,ms=i,hs.attachEvent("onpropertychange",Xh)):e==="focusout"&&Gh()}function _1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ql(ms)}function U1(e,t){if(e==="click")return ql(t)}function B1(e,t){if(e==="input"||e==="change")return ql(t)}function H1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:H1;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),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!Yr.call(t,r)||!Ot(e[r],t[r]))return!1}return!0}function Kh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fh(e,t){var i=Kh(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Kh(i)}}function Zh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ll(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=Ll(e.document)}return t}function hu(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 $1=xn&&"documentMode"in document&&11>=document.documentMode,di=null,mu=null,gs=null,pu=!1;function Ph(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;pu||di==null||di!==Ll(s)||(s=di,"selectionStart"in s&&hu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),gs&&ps(gs,s)||(gs=s,s=Oo(mu,"onSelect"),0<s.length&&(t=new Hl("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=di)))}function Aa(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var hi={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionrun:Aa("Transition","TransitionRun"),transitionstart:Aa("Transition","TransitionStart"),transitioncancel:Aa("Transition","TransitionCancel"),transitionend:Aa("Transition","TransitionEnd")},gu={},Jh={};xn&&(Jh=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 Na(e){if(gu[e])return gu[e];if(!hi[e])return e;var t=hi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Jh)return gu[e]=t[i];return e}var Wh=Na("animationend"),Ih=Na("animationiteration"),em=Na("animationstart"),q1=Na("transitionrun"),Y1=Na("transitionstart"),G1=Na("transitioncancel"),tm=Na("transitionend"),nm=new Map,vu="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(" ");vu.push("scrollEnd");function Wt(e,t){nm.set(e,t),Ea(t,[e])}var Yl=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,yu=0;function Gl(){for(var e=mi,t=yu=mi=0;t<e;){var i=$t[t];$t[t++]=null;var s=$t[t];$t[t++]=null;var r=$t[t];$t[t++]=null;var c=$t[t];if($t[t++]=null,s!==null&&r!==null){var v=s.pending;v===null?r.next=r:(r.next=v.next,v.next=r),s.pending=r}c!==0&&am(i,r,c)}}function Xl(e,t,i,s){$t[mi++]=e,$t[mi++]=t,$t[mi++]=i,$t[mi++]=s,yu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function xu(e,t,i,s){return Xl(e,t,i,s),Kl(e)}function Ca(e,t){return Xl(e,null,null,t),Kl(e)}function am(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,c=e.return;c!==null;)c.childLanes|=i,s=c.alternate,s!==null&&(s.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,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),c):null}function Kl(e){if(50<Us)throw Us=0,Cc=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 X1(e,t,i,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,i,s){return new X1(e,t,i,s)}function bu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bn(e,t){var i=e.alternate;return i===null?(i=zt(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 im(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 Fl(e,t,i,s,r,c){var v=0;if(s=e,typeof e=="function")bu(e)&&(v=1);else if(typeof e=="string")v=PS(e,i,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case oe:return e=zt(31,i,t,r),e.elementType=oe,e.lanes=c,e;case j:return Ma(i.children,r,c,t);case D:v=8,r|=24;break;case z:return e=zt(12,i,t,r|2),e.elementType=z,e.lanes=c,e;case U:return e=zt(13,i,t,r),e.elementType=U,e.lanes=c,e;case P:return e=zt(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 O:v=9;break e;case R:v=11;break e;case F:v=14;break e;case W:v=16,s=null;break e}v=29,i=Error(o(130,e===null?"null":typeof e,"")),s=null}return t=zt(v,i,t,r),t.elementType=e,t.type=s,t.lanes=c,t}function Ma(e,t,i,s){return e=zt(7,e,s,t),e.lanes=i,e}function Su(e,t,i){return e=zt(6,e,null,t),e.lanes=i,e}function sm(e){var t=zt(18,null,null,0);return t.stateNode=e,t}function wu(e,t,i){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var lm=new WeakMap;function qt(e,t){if(typeof e=="object"&&e!==null){var i=lm.get(e);return i!==void 0?i:(t={value:e,source:t,stack:sh(t)},lm.set(e,t),t)}return{value:e,source:t,stack:sh(t)}}var gi=[],vi=0,Zl=null,vs=0,Yt=[],Gt=0,qn=null,ln=1,on="";function Sn(e,t){gi[vi++]=vs,gi[vi++]=Zl,Zl=e,vs=t}function om(e,t,i){Yt[Gt++]=ln,Yt[Gt++]=on,Yt[Gt++]=qn,qn=e;var s=ln;e=on;var r=32-Dt(s)-1;s&=~(1<<r),i+=1;var c=32-Dt(t)+r;if(30<c){var v=r-r%5;c=(s&(1<<v)-1).toString(32),s>>=v,r-=v,ln=1<<32-Dt(t)+r|i<<r|s,on=c+e}else ln=1<<c|i<<r|s,on=e}function Tu(e){e.return!==null&&(Sn(e,1),om(e,1,0))}function Eu(e){for(;e===Zl;)Zl=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 rm(e,t){Yt[Gt++]=ln,Yt[Gt++]=on,Yt[Gt++]=qn,ln=t.id,on=t.overflow,qn=e}var lt=null,_e=null,we=!1,Yn=null,Xt=!1,ju=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)),ju}function um(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[st]=e,t[yt]=s,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),wh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),Eh(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||Ag(t.textContent,i)?(s.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),s.onScroll!=null&&ve("scroll",t),s.onScrollEnd!=null&&ve("scrollend",t),s.onClick!=null&&(t.onclick=yn),t=!0):t=!1,t||Gn(e,!0)}function cm(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 cm(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")||Yc(e.type,e.memoizedProps)),i=!i),i&&_e&&Gn(e),cm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));_e=Lg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));_e=Lg(e)}else t===27?(t=_e,ia(e.type)?(e=Zc,Zc=null,_e=e):_e=t):_e=lt?Ft(e.stateNode.nextSibling):null;return!0}function Da(){_e=lt=null,we=!1}function Au(){var e=Yn;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Yn=null),e}function ys(e){Yn===null?Yn=[e]:Yn.push(e)}var Nu=N(null),Oa=null,wn=null;function Xn(e,t,i){K(Nu,t._currentValue),t._currentValue=i}function Tn(e){e._currentValue=Nu.current,G(Nu)}function Cu(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Mu(e,t,i,s){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 A=0;A<t.length;A++)if(b.context===t[A]){c.lanes|=i,b=c.alternate,b!==null&&(b.lanes|=i),Cu(c.return,i,e),s||(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),Cu(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,s){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&&Mu(t,e,i,s),t.flags|=262144}function Ql(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){Oa=e,wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ot(e){return fm(Oa,e)}function Pl(e,t){return Oa===null&&za(e),fm(e,t)}function fm(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 K1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},F1=n.unstable_scheduleCallback,Z1=n.unstable_NormalPriority,Qe={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Du(){return{controller:new K1,data:new Map,refCount:0}}function xs(e){e.refCount--,e.refCount===0&&F1(Z1,function(){e.controller.abort()})}var bs=null,Ou=0,bi=0,Si=null;function Q1(e,t){if(bs===null){var i=bs=[];Ou=0,bi=kc(),Si={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Ou++,t.then(dm,dm),t}function dm(){if(--Ou===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 P1(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var hm=$.S;$.S=function(e,t){Pp=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Q1(e,t),hm!==null&&hm(e,t)};var Ra=N(null);function zu(){var e=Ra.current;return e!==null?e:Ve.pooledCache}function Jl(e,t){t===null?K(Ra,Ra.current):K(Ra,t.pool)}function mm(){var e=zu();return e===null?null:{parent:Qe._currentValue,pool:e}}var wi=Error(o(460)),Ru=Error(o(474)),Wl=Error(o(542)),Il={then:function(){}};function pm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gm(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,ym(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(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ym(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 vm(){if(La===null)throw Error(o(459));var e=La;return La=null,e}function ym(e){if(e===wi||e===Wl)throw Error(o(483))}var Ti=null,Ss=0;function eo(e){var t=Ss;return Ss+=1,Ti===null&&(Ti=[]),gm(Ti,e,t)}function ws(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function to(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 xm(e){function t(M,C){if(e){var k=M.deletions;k===null?(M.deletions=[C],M.flags|=16):k.push(C)}}function i(M,C){if(!e)return null;for(;C!==null;)t(M,C),C=C.sibling;return null}function s(M){for(var C=new Map;M!==null;)M.key!==null?C.set(M.key,M):C.set(M.index,M),M=M.sibling;return C}function r(M,C){return M=bn(M,C),M.index=0,M.sibling=null,M}function c(M,C,k){return M.index=k,e?(k=M.alternate,k!==null?(k=k.index,k<C?(M.flags|=67108866,C):k):(M.flags|=67108866,C)):(M.flags|=1048576,C)}function v(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function b(M,C,k,Y){return C===null||C.tag!==6?(C=Su(k,M.mode,Y),C.return=M,C):(C=r(C,k),C.return=M,C)}function A(M,C,k,Y){var ae=k.type;return ae===j?q(M,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=M,C):(C=Fl(k.type,k.key,k.props,null,M.mode,Y),ws(C,k),C.return=M,C)}function L(M,C,k,Y){return C===null||C.tag!==4||C.stateNode.containerInfo!==k.containerInfo||C.stateNode.implementation!==k.implementation?(C=wu(k,M.mode,Y),C.return=M,C):(C=r(C,k.children||[]),C.return=M,C)}function q(M,C,k,Y,ae){return C===null||C.tag!==7?(C=Ma(k,M.mode,Y,ae),C.return=M,C):(C=r(C,k),C.return=M,C)}function X(M,C,k){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Su(""+C,M.mode,k),C.return=M,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case T:return k=Fl(C.type,C.key,C.props,null,M.mode,k),ws(k,C),k.return=M,k;case E:return C=wu(C,M.mode,k),C.return=M,C;case W:return C=ka(C),X(M,C,k)}if(De(C)||ie(C))return C=Ma(C,M.mode,k,null),C.return=M,C;if(typeof C.then=="function")return X(M,eo(C),k);if(C.$$typeof===V)return X(M,Pl(M,C),k);to(M,C)}return null}function _(M,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(M,C,""+k,Y);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case T:return k.key===ae?A(M,C,k,Y):null;case E:return k.key===ae?L(M,C,k,Y):null;case W:return k=ka(k),_(M,C,k,Y)}if(De(k)||ie(k))return ae!==null?null:q(M,C,k,Y,null);if(typeof k.then=="function")return _(M,C,eo(k),Y);if(k.$$typeof===V)return _(M,C,Pl(M,k),Y);to(M,k)}return null}function H(M,C,k,Y,ae){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return M=M.get(k)||null,b(C,M,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case T:return M=M.get(Y.key===null?k:Y.key)||null,A(C,M,Y,ae);case E:return M=M.get(Y.key===null?k:Y.key)||null,L(C,M,Y,ae);case W:return Y=ka(Y),H(M,C,k,Y,ae)}if(De(Y)||ie(Y))return M=M.get(k)||null,q(C,M,Y,ae,null);if(typeof Y.then=="function")return H(M,C,k,eo(Y),ae);if(Y.$$typeof===V)return H(M,C,k,Pl(C,Y),ae);to(C,Y)}return null}function ee(M,C,k,Y){for(var ae=null,Ee=null,ne=C,he=C=0,xe=null;ne!==null&&he<k.length;he++){ne.index>he?(xe=ne,ne=null):xe=ne.sibling;var je=_(M,ne,k[he],Y);if(je===null){ne===null&&(ne=xe);break}e&&ne&&je.alternate===null&&t(M,ne),C=c(je,C,he),Ee===null?ae=je:Ee.sibling=je,Ee=je,ne=xe}if(he===k.length)return i(M,ne),we&&Sn(M,he),ae;if(ne===null){for(;he<k.length;he++)ne=X(M,k[he],Y),ne!==null&&(C=c(ne,C,he),Ee===null?ae=ne:Ee.sibling=ne,Ee=ne);return we&&Sn(M,he),ae}for(ne=s(ne);he<k.length;he++)xe=H(ne,M,he,k[he],Y),xe!==null&&(e&&xe.alternate!==null&&ne.delete(xe.key===null?he:xe.key),C=c(xe,C,he),Ee===null?ae=xe:Ee.sibling=xe,Ee=xe);return e&&ne.forEach(function(ua){return t(M,ua)}),we&&Sn(M,he),ae}function se(M,C,k,Y){if(k==null)throw Error(o(151));for(var ae=null,Ee=null,ne=C,he=C=0,xe=null,je=k.next();ne!==null&&!je.done;he++,je=k.next()){ne.index>he?(xe=ne,ne=null):xe=ne.sibling;var ua=_(M,ne,je.value,Y);if(ua===null){ne===null&&(ne=xe);break}e&&ne&&ua.alternate===null&&t(M,ne),C=c(ua,C,he),Ee===null?ae=ua:Ee.sibling=ua,Ee=ua,ne=xe}if(je.done)return i(M,ne),we&&Sn(M,he),ae;if(ne===null){for(;!je.done;he++,je=k.next())je=X(M,je.value,Y),je!==null&&(C=c(je,C,he),Ee===null?ae=je:Ee.sibling=je,Ee=je);return we&&Sn(M,he),ae}for(ne=s(ne);!je.done;he++,je=k.next())je=H(ne,M,he,je.value,Y),je!==null&&(e&&je.alternate!==null&&ne.delete(je.key===null?he:je.key),C=c(je,C,he),Ee===null?ae=je:Ee.sibling=je,Ee=je);return e&&ne.forEach(function(ow){return t(M,ow)}),we&&Sn(M,he),ae}function Re(M,C,k,Y){if(typeof k=="object"&&k!==null&&k.type===j&&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===j){if(C.tag===7){i(M,C.sibling),Y=r(C,k.props.children),Y.return=M,M=Y;break e}}else if(C.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===W&&ka(ae)===C.type){i(M,C.sibling),Y=r(C,k.props),ws(Y,k),Y.return=M,M=Y;break e}i(M,C);break}else t(M,C);C=C.sibling}k.type===j?(Y=Ma(k.props.children,M.mode,Y,k.key),Y.return=M,M=Y):(Y=Fl(k.type,k.key,k.props,null,M.mode,Y),ws(Y,k),Y.return=M,M=Y)}return v(M);case E: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(M,C.sibling),Y=r(C,k.children||[]),Y.return=M,M=Y;break e}else{i(M,C);break}else t(M,C);C=C.sibling}Y=wu(k,M.mode,Y),Y.return=M,M=Y}return v(M);case W:return k=ka(k),Re(M,C,k,Y)}if(De(k))return ee(M,C,k,Y);if(ie(k)){if(ae=ie(k),typeof ae!="function")throw Error(o(150));return k=ae.call(k),se(M,C,k,Y)}if(typeof k.then=="function")return Re(M,C,eo(k),Y);if(k.$$typeof===V)return Re(M,C,Pl(M,k),Y);to(M,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,C!==null&&C.tag===6?(i(M,C.sibling),Y=r(C,k),Y.return=M,M=Y):(i(M,C),Y=Su(k,M.mode,Y),Y.return=M,M=Y),v(M)):i(M,C)}return function(M,C,k,Y){try{Ss=0;var ae=Re(M,C,k,Y);return Ti=null,ae}catch(ne){if(ne===wi||ne===Wl)throw ne;var Ee=zt(29,ne,null,M.mode);return Ee.lanes=Y,Ee.return=M,Ee}finally{}}}var Va=xm(!0),bm=xm(!1),Kn=!1;function ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lu(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 s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ae&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Kl(e),am(e,null,i),t}return Xl(e,s,t,i),Kl(e)}function Ts(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,fh(e,i)}}function Vu(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){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:s.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var _u=!1;function Es(){if(_u){var e=Si;if(e!==null)throw e}}function js(e,t,i,s){_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 A=b,L=A.next;A.next=null,v===null?c=L:v.next=L,v=A;var q=e.alternate;q!==null&&(q=q.updateQueue,b=q.lastBaseUpdate,b!==v&&(b===null?q.firstBaseUpdate=L:b.next=L,q.lastBaseUpdate=A))}if(c!==null){var X=r.baseState;v=0,q=L=A=null,b=c;do{var _=b.lane&-536870913,H=_!==b.lane;if(H?(ye&_)===_:(s&_)===_){_!==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 Re=i;switch(se.tag){case 1:if(ee=se.payload,typeof ee=="function"){X=ee.call(Re,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(Re,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,A=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&&(A=X),r.baseState=A,r.firstBaseUpdate=L,r.lastBaseUpdate=q,c===null&&(r.shared.lanes=0),In|=v,e.lanes=v,e.memoizedState=X}}function Sm(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function wm(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Sm(i[e],t)}var Ei=N(null),no=N(0);function Tm(e,t){e=zn,K(no,e),K(Ei,t),zn=e|t.baseLanes}function Uu(){K(no,zn),K(Ei,Ei.current)}function Bu(){zn=no.current,G(Ei),G(no)}var Rt=N(null),Kt=null;function Qn(e){var t=e.alternate;K(Xe,Xe.current&1),K(Rt,e),Kt===null&&(t===null||Ei.current!==null||t.memoizedState!==null)&&(Kt=e)}function Hu(e){K(Xe,Xe.current),K(Rt,e),Kt===null&&(Kt=e)}function Em(e){e.tag===22?(K(Xe,Xe.current),K(Rt,e),Kt===null&&(Kt=e)):Pn()}function Pn(){K(Xe,Xe.current),K(Rt,Rt.current)}function kt(e){G(Rt),Kt===e&&(Kt=null),G(Xe)}var Xe=N(0);function ao(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Kc(i)||Fc(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 En=0,de=null,Oe=null,Pe=null,io=!1,ji=!1,_a=!1,so=0,As=0,Ai=null,J1=0;function qe(){throw Error(o(321))}function $u(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 qu(e,t,i,s,r,c){return En=c,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?op:ac,_a=!1,c=i(s,r),_a=!1,ji&&(c=Am(t,i,s,r)),jm(e),c}function jm(e){$.H=Ms;var t=Oe!==null&&Oe.next!==null;if(En=0,Pe=Oe=de=null,io=!1,As=0,Ai=null,t)throw Error(o(300));e===null||Je||(e=e.dependencies,e!==null&&Ql(e)&&(Je=!0))}function Am(e,t,i,s){de=e;var r=0;do{if(ji&&(Ai=null),As=0,ji=!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=rp,c=t(i,s)}while(ji);return c}function W1(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?Ns(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(de.flags|=1024),t}function Yu(){var e=so!==0;return so=0,e}function Gu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Xu(e){if(io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}io=!1}En=0,Pe=Oe=de=null,ji=!1,As=so=0,Ai=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 lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ns(e){var t=As;return As+=1,Ai===null&&(Ai=[]),e=gm(Ai,e,t),t=de,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?op:ac),e}function oo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ns(e);if(e.$$typeof===V)return ot(e)}throw Error(o(438,String(e)))}function Ku(e){var t=null,i=de.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=de.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=lo(),de.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=B;return t.index++,i}function jn(e,t){return typeof t=="function"?t(e):t}function ro(e){var t=Ke();return Fu(t,Oe,e)}function Fu(e,t,i){var s=e.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=i;var r=e.baseQueue,c=s.pending;if(c!==null){if(r!==null){var v=r.next;r.next=c.next,c.next=v}t.baseQueue=r=c,s.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var b=v=null,A=null,L=t,q=!1;do{var X=L.lane&-536870913;if(X!==L.lane?(ye&X)===X:(En&X)===X){var _=L.revertLane;if(_===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),X===bi&&(q=!0);else if((En&_)===_){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},A===null?(b=A=X,v=c):A=A.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},A===null?(b=A=_,v=c):A=A.next=_,de.lanes|=X,In|=X;L=L.next}while(L!==null&&L!==t);if(A===null?v=c:A.next=b,!Ot(c,e.memoizedState)&&(Je=!0,q&&(i=Si,i!==null)))throw i;e.memoizedState=c,e.baseState=v,e.baseQueue=A,s.lastRenderedState=c}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Zu(e){var t=Ke(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var s=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,s]}function Nm(e,t,i){var s=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,Ju(Dm.bind(null,s,r,e),[e]),r.getSnapshot!==t||v||Pe!==null&&Pe.memoizedState.tag&1){if(s.flags|=2048,Ni(9,{destroy:void 0},Mm.bind(null,s,r,i,t),null),Ve===null)throw Error(o(349));c||(En&127)!==0||Cm(s,t,i)}return i}function Cm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=de.updateQueue,t===null?(t=lo(),de.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Mm(e,t,i,s){t.value=i,t.getSnapshot=s,Om(t)&&zm(e)}function Dm(e,t,i){return i(function(){Om(t)&&zm(e)})}function Om(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function zm(e){var t=Ca(e,2);t!==null&&Et(t,e,2)}function Qu(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:jn,lastRenderedState:e},t}function Rm(e,t,i,s){return e.baseState=i,Fu(e,Oe,typeof s=="function"?s:jn)}function I1(e,t,i,s,r){if(fo(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,s(c),i=t.pending,i===null?(c.next=t.pending=c,km(t,c)):(c.next=i.next,t.pending=i.next=c)}}function km(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var c=$.T,v={};$.T=v;try{var b=i(r,s),A=$.S;A!==null&&A(v,b),Lm(e,t,b)}catch(L){Pu(e,t,L)}finally{c!==null&&v.types!==null&&(c.types=v.types),$.T=c}}else try{c=i(r,s),Lm(e,t,c)}catch(L){Pu(e,t,L)}}function Lm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Vm(e,t,s)},function(s){return Pu(e,t,s)}):Vm(e,t,i)}function Vm(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,km(e,i)))}function Pu(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,_m(t),t=t.next;while(t!==s)}e.action=null}function _m(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Um(e,t){return t}function Bm(e,t){if(we){var i=Ve.formState;if(i!==null){e:{var s=de;if(we){if(_e){t:{for(var r=_e,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){_e=Ft(r.nextSibling),s=r.data==="F!";break e}}Gn(s)}s=!1}s&&(t=i[0])}}return i=mt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Um,lastRenderedState:t},i.queue=s,i=ip.bind(null,de,s),s.dispatch=i,s=Qu(!1),c=nc.bind(null,de,!1,s.queue),s=mt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=I1.bind(null,de,r,c,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function Hm(e){var t=Ke();return $m(t,Oe,e)}function $m(e,t,i){if(t=Fu(e,t,Um)[0],e=ro(jn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ns(t)}catch(v){throw v===wi?Wl:v}else s=t;t=Ke();var r=t.queue,c=r.dispatch;return i!==t.memoizedState&&(de.flags|=2048,Ni(9,{destroy:void 0},eS.bind(null,r,i),null)),[s,c,e]}function eS(e,t){e.action=t}function qm(e){var t=Ke(),i=Oe;if(i!==null)return $m(t,i,e);Ke(),t=t.memoizedState,i=Ke();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ni(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=de.updateQueue,t===null&&(t=lo(),de.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Ym(){return Ke().memoizedState}function uo(e,t,i,s){var r=mt();de.flags|=e,r.memoizedState=Ni(1|t,{destroy:void 0},i,s===void 0?null:s)}function co(e,t,i,s){var r=Ke();s=s===void 0?null:s;var c=r.memoizedState.inst;Oe!==null&&s!==null&&$u(s,Oe.memoizedState.deps)?r.memoizedState=Ni(t,c,i,s):(de.flags|=e,r.memoizedState=Ni(1|t,c,i,s))}function Gm(e,t){uo(8390656,8,e,t)}function Ju(e,t){co(2048,8,e,t)}function tS(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=lo(),de.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Xm(e){var t=Ke().memoizedState;return tS({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Km(e,t){return co(4,2,e,t)}function Fm(e,t){return co(4,4,e,t)}function Zm(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 Qm(e,t,i){i=i!=null?i.concat([e]):null,co(4,4,Zm.bind(null,t,e),i)}function Wu(){}function Pm(e,t){var i=Ke();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&$u(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Jm(e,t){var i=Ke();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&$u(t,s[1]))return s[0];if(s=e(),_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[s,t],s}function Iu(e,t,i){return i===void 0||(En&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Wp(),de.lanes|=e,In|=e,i)}function Wm(e,t,i,s){return Ot(i,t)?i:Ei.current!==null?(e=Iu(e,i,s),Ot(e,t)||(Je=!0),e):(En&42)===0||(En&1073741824)!==0&&(ye&261930)===0?(Je=!0,e.memoizedState=i):(e=Wp(),de.lanes|=e,In|=e,t)}function Im(e,t,i,s,r){var c=Q.p;Q.p=c!==0&&8>c?c:8;var v=$.T,b={};$.T=b,nc(e,!1,t,i);try{var A=r(),L=$.S;if(L!==null&&L(b,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var q=P1(A,s);Cs(e,t,q,_t(e))}else Cs(e,t,s,_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 nS(){}function ec(e,t,i,s){if(e.tag!==5)throw Error(o(476));var r=ep(e).queue;Im(e,r,t,J,i===null?nS:function(){return tp(e),i(s)})}function ep(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:jn,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function tp(e){var t=ep(e);t.next===null&&(t=e.alternate.memoizedState),Cs(e,t.next.queue,{},_t())}function tc(){return ot(Xs)}function np(){return Ke().memoizedState}function ap(){return Ke().memoizedState}function aS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_t();e=Fn(i);var s=Zn(t,e,i);s!==null&&(Et(s,t,i),Ts(s,t,i)),t={cache:Du()},e.payload=t;return}t=t.return}}function iS(e,t,i){var s=_t();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},fo(e)?sp(t,i):(i=xu(e,t,i,s),i!==null&&(Et(i,e,s),lp(i,t,s)))}function ip(e,t,i){var s=_t();Cs(e,t,i,s)}function Cs(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(fo(e))sp(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 Xl(e,t,r,0),Ve===null&&Gl(),!1}catch{}finally{}if(i=xu(e,t,r,s),i!==null)return Et(i,e,s),lp(i,t,s),!0}return!1}function nc(e,t,i,s){if(s={lane:2,revertLane:kc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},fo(e)){if(t)throw Error(o(479))}else t=xu(e,i,s,2),t!==null&&Et(t,e,2)}function fo(e){var t=e.alternate;return e===de||t!==null&&t===de}function sp(e,t){ji=io=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function lp(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,fh(e,i)}}var Ms={readContext:ot,use:oo,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 op={readContext:ot,use:oo,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:Gm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,uo(4194308,4,Zm.bind(null,t,e),i)},useLayoutEffect:function(e,t){return uo(4194308,4,e,t)},useInsertionEffect:function(e,t){uo(4,2,e,t)},useMemo:function(e,t){var i=mt();t=t===void 0?null:t;var s=e();if(_a){Bn(!0);try{e()}finally{Bn(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=mt();if(i!==void 0){var r=i(t);if(_a){Bn(!0);try{i(t)}finally{Bn(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=iS.bind(null,de,e),[s.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Qu(e);var t=e.queue,i=ip.bind(null,de,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Wu,useDeferredValue:function(e,t){var i=mt();return Iu(i,e,t)},useTransition:function(){var e=Qu(!1);return e=Im.bind(null,de,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=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));(ye&127)!==0||Cm(s,t,i)}r.memoizedState=i;var c={value:i,getSnapshot:t};return r.queue=c,Gm(Dm.bind(null,s,c,e),[e]),s.flags|=2048,Ni(9,{destroy:void 0},Mm.bind(null,s,c,i,t),null),i},useId:function(){var e=mt(),t=Ve.identifierPrefix;if(we){var i=on,s=ln;i=(s&~(1<<32-Dt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=so++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=J1++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Bm,useActionState:Bm,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=nc.bind(null,de,!0,i),i.dispatch=t,[e,t]},useMemoCache:Ku,useCacheRefresh:function(){return mt().memoizedState=aS.bind(null,de)},useEffectEvent:function(e){var t=mt(),i={impl:e};return t.memoizedState=i,function(){if((Ae&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},ac={readContext:ot,use:oo,useCallback:Pm,useContext:ot,useEffect:Ju,useImperativeHandle:Qm,useInsertionEffect:Km,useLayoutEffect:Fm,useMemo:Jm,useReducer:ro,useRef:Ym,useState:function(){return ro(jn)},useDebugValue:Wu,useDeferredValue:function(e,t){var i=Ke();return Wm(i,Oe.memoizedState,e,t)},useTransition:function(){var e=ro(jn)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:Ns(e),t]},useSyncExternalStore:Nm,useId:np,useHostTransitionStatus:tc,useFormState:Hm,useActionState:Hm,useOptimistic:function(e,t){var i=Ke();return Rm(i,Oe,e,t)},useMemoCache:Ku,useCacheRefresh:ap};ac.useEffectEvent=Xm;var rp={readContext:ot,use:oo,useCallback:Pm,useContext:ot,useEffect:Ju,useImperativeHandle:Qm,useInsertionEffect:Km,useLayoutEffect:Fm,useMemo:Jm,useReducer:Zu,useRef:Ym,useState:function(){return Zu(jn)},useDebugValue:Wu,useDeferredValue:function(e,t){var i=Ke();return Oe===null?Iu(i,e,t):Wm(i,Oe.memoizedState,e,t)},useTransition:function(){var e=Zu(jn)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:Ns(e),t]},useSyncExternalStore:Nm,useId:np,useHostTransitionStatus:tc,useFormState:qm,useActionState:qm,useOptimistic:function(e,t){var i=Ke();return Oe!==null?Rm(i,Oe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Ku,useCacheRefresh:ap};rp.useEffectEvent=Xm;function ic(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:x({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var sc={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=_t(),r=Fn(s);r.payload=t,i!=null&&(r.callback=i),t=Zn(e,r,s),t!==null&&(Et(t,e,s),Ts(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=_t(),r=Fn(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Zn(e,r,s),t!==null&&(Et(t,e,s),Ts(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),s=Fn(i);s.tag=2,t!=null&&(s.callback=t),t=Zn(e,s,i),t!==null&&(Et(t,e,i),Ts(t,e,i))}};function up(e,t,i,s,r,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,v):t.prototype&&t.prototype.isPureReactComponent?!ps(i,s)||!ps(r,c):!0}function cp(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&sc.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}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 fp(e){Yl(e)}function dp(e){console.error(e)}function hp(e){Yl(e)}function ho(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function mp(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function lc(e,t,i){return i=Fn(i),i.tag=3,i.payload={element:null},i.callback=function(){ho(e,t)},i}function pp(e){return e=Fn(e),e.tag=3,e}function gp(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var c=s.value;e.payload=function(){return r(c)},e.callback=function(){mp(t,i,s)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){mp(t,i,s),typeof r!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function sS(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&xi(t,i,r,!0),i=Rt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?jo():i.alternate===null&&Ye===0&&(Ye=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Il?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Oc(e,s,r)),!1;case 22:return i.flags|=65536,s===Il?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Oc(e,s,r)),!1}throw Error(o(435,i.tag))}return Oc(e,s,r),jo(),!1}if(we)return t=Rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==ju&&(e=Error(o(422),{cause:s}),ys(qt(e,i)))):(s!==ju&&(t=Error(o(423),{cause:s}),ys(qt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=qt(s,i),r=lc(e.stateNode,s,r),Vu(e,r),Ye!==4&&(Ye=2)),!1;var c=Error(o(520),{cause:s});if(c=qt(c,i),_s===null?_s=[c]:_s.push(c),Ye!==4&&(Ye=2),t===null)return!0;s=qt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=lc(i.stateNode,s,e),Vu(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=pp(r),gp(r,e,i,s),Vu(i,r),!1}i=i.return}while(i!==null);return!1}var oc=Error(o(461)),Je=!1;function rt(e,t,i,s){t.child=e===null?bm(t,null,i,s):Va(t,e.child,i,s)}function vp(e,t,i,s,r){i=i.render;var c=t.ref;if("ref"in s){var v={};for(var b in s)b!=="ref"&&(v[b]=s[b])}else v=s;return za(t),s=qu(e,t,i,v,c,r),b=Yu(),e!==null&&!Je?(Gu(e,t,r),An(e,t,r)):(we&&b&&Tu(t),t.flags|=1,rt(e,t,s,r),t.child)}function yp(e,t,i,s,r){if(e===null){var c=i.type;return typeof c=="function"&&!bu(c)&&c.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=c,xp(e,t,c,s,r)):(e=Fl(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!pc(e,r)){var v=c.memoizedProps;if(i=i.compare,i=i!==null?i:ps,i(v,s)&&e.ref===t.ref)return An(e,t,r)}return t.flags|=1,e=bn(c,s),e.ref=t.ref,e.return=t,t.child=e}function xp(e,t,i,s,r){if(e!==null){var c=e.memoizedProps;if(ps(c,s)&&e.ref===t.ref)if(Je=!1,t.pendingProps=s=c,pc(e,r))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,An(e,t,r)}return rc(e,t,i,s,r)}function bp(e,t,i,s){var r=s.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~c}else s=0,t.child=null;return Sp(e,t,c,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Jl(t,c!==null?c.cachePool:null),c!==null?Tm(t,c):Uu(),Em(t);else return s=t.lanes=536870912,Sp(e,t,c!==null?c.baseLanes|i:i,i,s)}else c!==null?(Jl(t,c.cachePool),Tm(t,c),Pn(),t.memoizedState=null):(e!==null&&Jl(t,null),Uu(),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 Sp(e,t,i,s,r){var c=zu();return c=c===null?null:{parent:Qe._currentValue,pool:c},t.memoizedState={baseLanes:i,cachePool:c},e!==null&&Jl(t,null),Uu(),Em(t),e!==null&&xi(e,t,s,!0),t.childLanes=r,null}function mo(e,t){return t=go({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function wp(e,t,i){return Va(t,e.child,null,i),e=mo(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function lS(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(s.mode==="hidden")return e=mo(t,s),t.lanes=536870912,Ds(null,e);if(Hu(t),(e=_e)?(e=kg(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=sm(e),i.return=t,t.child=i,lt=t,_e=null)):e=null,e===null)throw Gn(t);return t.lanes=536870912,null}return mo(t,s)}var c=e.memoizedState;if(c!==null){var v=c.dehydrated;if(Hu(t),r)if(t.flags&256)t.flags&=-257,t=wp(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(s=Ve,s!==null&&(v=dh(s,i),v!==0&&v!==c.retryLane))throw c.retryLane=v,Ca(e,v),Et(s,e,v),oc;jo(),t=wp(e,t,i)}else e=c.treeContext,_e=Ft(v.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&rm(t,e),t=mo(t,s),t.flags|=4096;return t}return e=bn(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function po(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 rc(e,t,i,s,r){return za(t),i=qu(e,t,i,s,void 0,r),s=Yu(),e!==null&&!Je?(Gu(e,t,r),An(e,t,r)):(we&&s&&Tu(t),t.flags|=1,rt(e,t,i,r),t.child)}function Tp(e,t,i,s,r,c){return za(t),t.updateQueue=null,i=Am(t,s,i,r),jm(e),s=Yu(),e!==null&&!Je?(Gu(e,t,c),An(e,t,c)):(we&&s&&Tu(t),t.flags|=1,rt(e,t,i,c),t.child)}function Ep(e,t,i,s,r){if(za(t),t.stateNode===null){var c=pi,v=i.contextType;typeof v=="object"&&v!==null&&(c=ot(v)),c=new i(s,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=sc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=s,c.state=t.memoizedState,c.refs={},ku(t),v=i.contextType,c.context=typeof v=="object"&&v!==null?ot(v):pi,c.state=t.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(ic(t,i,v,s),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&&sc.enqueueReplaceState(c,c.state,null),js(t,s,c,r),Es(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,A=Ua(i,b);c.props=A;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)&&cp(t,c,s,v),Kn=!1;var _=t.memoizedState;c.state=_,js(t,s,c,r),Es(),L=t.memoizedState,b||_!==L||Kn?(typeof X=="function"&&(ic(t,i,X,s),L=t.memoizedState),(A=Kn||up(t,i,A,s,_,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=s,t.memoizedState=L),c.props=s,c.state=L,c.context=v,s=A):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,Lu(e,t),v=t.memoizedProps,q=Ua(i,v),c.props=q,X=t.pendingProps,_=c.context,L=i.contextType,A=pi,typeof L=="object"&&L!==null&&(A=ot(L)),b=i.getDerivedStateFromProps,(L=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==X||_!==A)&&cp(t,c,s,A),Kn=!1,_=t.memoizedState,c.state=_,js(t,s,c,r),Es();var H=t.memoizedState;v!==X||_!==H||Kn||e!==null&&e.dependencies!==null&&Ql(e.dependencies)?(typeof b=="function"&&(ic(t,i,b,s),H=t.memoizedState),(q=Kn||up(t,i,q,s,_,H,A)||e!==null&&e.dependencies!==null&&Ql(e.dependencies))?(L||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,H,A),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,H,A)),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=s,t.memoizedState=H),c.props=s,c.state=H,c.context=A,s=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),s=!1)}return c=s,po(e,t),s=(t.flags&128)!==0,c||s?(c=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&s?(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=An(e,t,r),e}function jp(e,t,i,s){return Da(),t.flags|=256,rt(e,t,i,s),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cc(e){return{baseLanes:e,cachePool:mm()}}function fc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Vt),e}function Ap(e,t,i){var s=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=_e)?(e=kg(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=sm(e),i.return=t,t.child=i,lt=t,_e=null)):e=null,e===null)throw Gn(t);return Fc(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,r?(Pn(),r=t.mode,b=go({mode:"hidden",children:b},r),s=Ma(s,r,i,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=cc(i),s.childLanes=fc(e,v,i),t.memoizedState=uc,Ds(null,s)):(Qn(t),dc(t,b))}var A=e.memoizedState;if(A!==null&&(b=A.dehydrated,b!==null)){if(c)t.flags&256?(Qn(t),t.flags&=-257,t=hc(e,t,i)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),b=s.fallback,r=t.mode,s=go({mode:"visible",children:s.children},r),b=Ma(b,r,i,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Va(t,e.child,null,i),s=t.child,s.memoizedState=cc(i),s.childLanes=fc(e,v,i),t.memoizedState=uc,t=Ds(null,s));else if(Qn(t),Fc(b)){if(v=b.nextSibling&&b.nextSibling.dataset,v)var L=v.dgst;v=L,s=Error(o(419)),s.stack="",s.digest=v,ys({value:s,source:null,stack:null}),t=hc(e,t,i)}else if(Je||xi(e,t,i,!1),v=(i&e.childLanes)!==0,Je||v){if(v=Ve,v!==null&&(s=dh(v,i),s!==0&&s!==A.retryLane))throw A.retryLane=s,Ca(e,s),Et(v,e,s),oc;Kc(b)||jo(),t=hc(e,t,i)}else Kc(b)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,_e=Ft(b.nextSibling),lt=t,we=!0,Yn=null,Xt=!1,e!==null&&rm(t,e),t=dc(t,s.children),t.flags|=4096);return t}return r?(Pn(),b=s.fallback,r=t.mode,A=e.child,L=A.sibling,s=bn(A,{mode:"hidden",children:s.children}),s.subtreeFlags=A.subtreeFlags&65011712,L!==null?b=bn(L,b):(b=Ma(b,r,i,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,Ds(null,s),s=t.child,b=e.child.memoizedState,b===null?b=cc(i):(r=b.cachePool,r!==null?(A=Qe._currentValue,r=r.parent!==A?{parent:A,pool:A}:r):r=mm(),b={baseLanes:b.baseLanes|i,cachePool:r}),s.memoizedState=b,s.childLanes=fc(e,v,i),t.memoizedState=uc,Ds(e.child,s)):(Qn(t),i=e.child,e=i.sibling,i=bn(i,{mode:"visible",children:s.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 dc(e,t){return t=go({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function go(e,t){return e=zt(22,e,null,t),e.lanes=0,e}function hc(e,t,i){return Va(t,e.child,null,i),e=dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Np(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Cu(e.return,t,i)}function mc(e,t,i,s,r,c){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:c}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=i,v.tailMode=r,v.treeForkCount=c)}function Cp(e,t,i){var s=t.pendingProps,r=s.revealOrder,c=s.tail;s=s.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,s,i),s=we?vs:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Np(e,i,t);else if(e.tag===19)Np(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&&ao(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),mc(t,!1,r,i,c,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&ao(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}mc(t,!0,i,null,c,s);break;case"together":mc(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function An(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 pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ql(e)))}function oS(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,Hu(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Qn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Ap(e,t,i):(Qn(t),e=An(e,t,i),e!==null?e.sibling:null);Qn(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(xi(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return Cp(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),s)break;return null;case 22:return t.lanes=0,bp(e,t,i,t.pendingProps);case 24:Xn(t,Qe,e.memoizedState.cache)}return An(e,t,i)}function Mp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!pc(e,i)&&(t.flags&128)===0)return Je=!1,oS(e,t,i);Je=(e.flags&131072)!==0}else Je=!1,we&&(t.flags&1048576)!==0&&om(t,vs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")bu(e)?(s=Ua(e,s),t.tag=1,t=Ep(null,t,e,s,i)):(t.tag=0,t=rc(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===R){t.tag=11,t=vp(null,t,e,s,i);break e}else if(r===F){t.tag=14,t=yp(null,t,e,s,i);break e}}throw t=Se(e)||e,Error(o(306,t,""))}}return t;case 0:return rc(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Ua(s,t.pendingProps),Ep(e,t,s,r,i);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));s=t.pendingProps;var c=t.memoizedState;r=c.element,Lu(e,t),js(t,s,null,i);var v=t.memoizedState;if(s=v.cache,Xn(t,Qe,s),s!==c.cache&&Mu(t,[Qe],i,!0),Es(),s=v.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=jp(e,t,s,i);break e}else if(s!==r){r=qt(Error(o(424)),t),ys(r),t=jp(e,t,s,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(_e=Ft(e.firstChild),lt=t,we=!0,Yn=null,Xt=!0,i=bm(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Da(),s===r){t=An(e,t,i);break e}rt(e,t,s,i)}t=t.child}return t;case 26:return po(e,t),e===null?(i=Hg(t.type,null,t.pendingProps,null))?t.memoizedState=i:we||(i=t.type,e=t.pendingProps,s=zo(pe.current).createElement(i),s[st]=t,s[yt]=e,ut(s,i,e),nt(s),t.stateNode=s):t.memoizedState=Hg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ns(t),e===null&&we&&(s=t.stateNode=_g(t.type,t.pendingProps,pe.current),lt=t,Xt=!0,r=_e,ia(t.type)?(Zc=r,_e=Ft(s.firstChild)):_e=r),rt(e,t,t.pendingProps.children,i),po(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((r=s=_e)&&(s=_S(s,t.type,t.pendingProps,Xt),s!==null?(t.stateNode=s,lt=t,_e=Ft(s.firstChild),Xt=!1,r=!0):r=!1),r||Gn(t)),ns(t),r=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,s=c.children,Yc(r,c)?s=null:v!==null&&Yc(r,v)&&(t.flags|=32),t.memoizedState!==null&&(r=qu(e,t,W1,null,null,i),Xs._currentValue=r),po(e,t),rt(e,t,s,i),t.child;case 6:return e===null&&we&&((e=i=_e)&&(i=US(i,t.pendingProps,Xt),i!==null?(t.stateNode=i,lt=t,_e=null,e=!0):e=!1),e||Gn(t)),null;case 13:return Ap(e,t,i);case 4:return Ze(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Va(t,null,s,i):rt(e,t,s,i),t.child;case 11:return vp(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 s=t.pendingProps,Xn(t,t.type,s.value),rt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,za(t),r=ot(r),s=s(r),t.flags|=1,rt(e,t,s,i),t.child;case 14:return yp(e,t,t.type,t.pendingProps,i);case 15:return xp(e,t,t.type,t.pendingProps,i);case 19:return Cp(e,t,i);case 31:return lS(e,t,i);case 22:return bp(e,t,i,t.pendingProps);case 24:return za(t),s=ot(Qe),e===null?(r=zu(),r===null&&(r=Ve,c=Du(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=i),r=c),t.memoizedState={parent:s,cache:r},ku(t),Xn(t,Qe,r)):((e.lanes&i)!==0&&(Lu(e,t),js(t,null,null,i),Es()),r=e.memoizedState,c=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Xn(t,Qe,s)):(s=c.cache,Xn(t,Qe,s),s!==r.cache&&Mu(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 Nn(e){e.flags|=4}function gc(e,t,i,s,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(ng())e.flags|=8192;else throw La=Il,Ru}else e.flags&=-16777217}function Dp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Xg(t))if(ng())e.flags|=8192;else throw La=Il,Ru}function vo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?uh():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 s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function rS(e,t,i){var s=t.pendingProps;switch(Eu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Tn(Qe),Le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(yi(t)?Nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Au())),Ue(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(Nn(t),c!==null?(Ue(t),Dp(t,c)):(Ue(t),gc(t,r,null,s,i))):c?c!==e.memoizedState?(Nn(t),Ue(t),Dp(t,c)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Nn(t),Ue(t),gc(t,r,e,s,i)),null;case 27:if(Nl(t),i=pe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}e=I.current,yi(t)?um(t):(e=_g(r,s,i),t.stateNode=e,Nn(t))}return Ue(t),null;case 5:if(Nl(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}if(c=I.current,yi(t))um(t);else{var v=zo(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 s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?v.createElement(r,{is:s.is}):v.createElement(r)}}c[st]=t,c[yt]=s;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,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Nn(t)}}return Ue(t),gc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Nn(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(o(166));if(e=pe.current,yi(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=lt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[st]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Ag(e.nodeValue,i)),e||Gn(t,!0)}else e=zo(e).createTextNode(s),e[st]=t,t.stateNode=e}return Ue(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=yi(t),i!==null){if(e===null){if(!s)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;Ue(t),e=!1}else i=Au(),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 Ue(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=yi(t),s!==null&&s.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;Ue(t),r=!1}else r=Au(),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=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),vo(t,t.updateQueue),Ue(t),null);case 4:return Le(),e===null&&Uc(t.stateNode.containerInfo),Ue(t),null;case 10:return Tn(t.type),Ue(t),null;case 19:if(G(Xe),s=t.memoizedState,s===null)return Ue(t),null;if(r=(t.flags&128)!==0,c=s.rendering,c===null)if(r)Os(s,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=ao(e),c!==null){for(t.flags|=128,Os(s,!1),e=c.updateQueue,t.updateQueue=e,vo(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)im(i,e),i=i.sibling;return K(Xe,Xe.current&1|2),we&&Sn(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ct()>wo&&(t.flags|=128,r=!0,Os(s,!1),t.lanes=4194304)}else{if(!r)if(e=ao(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,vo(t,e),Os(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!we)return Ue(t),null}else 2*Ct()-s.renderingStartTime>wo&&i!==536870912&&(t.flags|=128,r=!0,Os(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(e=s.last,e!==null?e.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ct(),e.sibling=null,i=Xe.current,K(Xe,r?i&1|2:i&1),we&&Sn(t,s.treeForkCount),e):(Ue(t),null);case 22:case 23:return kt(t),Bu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),i=t.updateQueue,i!==null&&vo(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&G(Ra),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Tn(Qe),Ue(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function uS(e,t){switch(Eu(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 Nl(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),Bu(),e!==null&&G(Ra),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 Op(e,t){switch(Eu(t),t.tag){case 3:Tn(Qe),Le();break;case 26:case 27:case 5:Nl(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),Bu(),e!==null&&G(Ra);break;case 24:Tn(Qe)}}function zs(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var c=i.create,v=i.inst;s=c(),v.destroy=s}i=i.next}while(i!==r)}}catch(b){Ce(t,t.return,b)}}function Jn(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var c=r.next;s=c;do{if((s.tag&e)===e){var v=s.inst,b=v.destroy;if(b!==void 0){v.destroy=void 0,r=t;var A=i,L=b;try{L()}catch(q){Ce(r,A,q)}}}s=s.next}while(s!==c)}}catch(q){Ce(t,t.return,q)}}function zp(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{wm(t,i)}catch(s){Ce(e,e.return,s)}}}function Rp(e,t,i){i.props=Ua(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ce(e,t,s)}}function Rs(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){Ce(e,t,r)}}function rn(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}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 kp(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){Ce(e,e.return,r)}}function vc(e,t,i){try{var s=e.stateNode;OS(s,e.type,i,t),s[yt]=t}catch(r){Ce(e,e.return,r)}}function Lp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ia(e.type)||e.tag===4}function yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lp(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 xc(e,t,i){var s=e.tag;if(s===5||s===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(s!==4&&(s===27&&ia(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(xc(e,t,i),e=e.sibling;e!==null;)xc(e,t,i),e=e.sibling}function yo(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&ia(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(yo(e,t,i),e=e.sibling;e!==null;)yo(e,t,i),e=e.sibling}function Vp(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ut(t,s,i),t[st]=e,t[yt]=i}catch(c){Ce(e,e.return,c)}}var Cn=!1,We=!1,bc=!1,_p=typeof WeakSet=="function"?WeakSet:Set,at=null;function cS(e,t){if(e=e.containerInfo,$c=Bo,e=Qh(e),hu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{i.nodeType,c.nodeType}catch{i=null;break e}var v=0,b=-1,A=-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||s!==0&&X.nodeType!==3||(A=v+s),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===s&&(A=v),(H=X.nextSibling)!==null)break;X=_,_=X.parentNode}X=H}i=b===-1||A===-1?null:{start:b,end:A}}else i=null}i=i||{start:0,end:0}}else i=null;for(qc={focusedElem:e,selectionRange:i},Bo=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){switch(t=at,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,s=i.stateNode;try{var ee=Ua(i.type,r);e=s.getSnapshotBeforeUpdate(ee,c),s.__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)Xc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xc(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,at=e;break}at=t.return}}function Up(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Dn(e,i),s&4&&zs(5,i);break;case 1:if(Dn(e,i),s&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)}}s&64&&zp(i),s&512&&Rs(i,i.return);break;case 3:if(Dn(e,i),s&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{wm(e,t)}catch(v){Ce(i,i.return,v)}}break;case 27:t===null&&s&4&&Vp(i);case 26:case 5:Dn(e,i),t===null&&s&4&&kp(i),s&512&&Rs(i,i.return);break;case 12:Dn(e,i);break;case 31:Dn(e,i),s&4&&$p(e,i);break;case 13:Dn(e,i),s&4&&qp(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=xS.bind(null,i),BS(e,i))));break;case 22:if(s=i.memoizedState!==null||Cn,!s){t=t!==null&&t.memoizedState!==null||We,r=Cn;var c=We;Cn=s,(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 Bp(e){var t=e.alternate;t!==null&&(e.alternate=null,Bp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var $e=null,bt=!1;function Mn(e,t,i){for(i=i.child;i!==null;)Hp(e,t,i),i=i.sibling}function Hp(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 s=$e,r=bt;ia(i.type)&&($e=i.stateNode,bt=!1),Mn(e,t,i),qs(i.stateNode),$e=s,bt=r;break;case 5:We||rn(i,t);case 6:if(s=$e,r=bt,$e=null,Mn(e,t,i),$e=s,bt=r,$e!==null)if(bt)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&&(bt?(e=$e,zg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Bi(e)):zg($e,i.stateNode));break;case 4:s=$e,r=bt,$e=i.stateNode.containerInfo,bt=!0,Mn(e,t,i),$e=s,bt=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),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Rp(i,t,s)),Mn(e,t,i);break;case 21:Mn(e,t,i);break;case 22:We=(s=We)||i.memoizedState!==null,Mn(e,t,i),We=s;break;default:Mn(e,t,i)}}function $p(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 qp(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 fS(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 xo(e,t){var i=fS(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=bS.bind(null,e,s);s.then(r,r)}})}function St(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],c=e,v=t,b=v;e:for(;b!==null;){switch(b.tag){case 27:if(ia(b.type)){$e=b.stateNode,bt=!1;break e}break;case 5:$e=b.stateNode,bt=!1;break e;case 3:case 4:$e=b.stateNode.containerInfo,bt=!0;break e}b=b.return}if($e===null)throw Error(o(160));Hp(c,v,r),$e=null,bt=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Yp(t,e),t=t.sibling}var It=null;function Yp(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),wt(e),s&4&&(Jn(3,e,e.return),zs(3,e),Jn(5,e,e.return));break;case 1:St(t,e),wt(e),s&512&&(We||i===null||rn(i,i.return)),s&64&&Cn&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=It;if(St(t,e),wt(e),s&512&&(We||i===null||rn(i,i.return)),s&4){var c=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){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(s),r.head.insertBefore(c,r.querySelector("head > title"))),ut(c,s,i),c[st]=e,nt(c),s=c;break e;case"link":var v=Yg("link","href",r).get(s+(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(s),ut(c,s,i),r.head.appendChild(c);break;case"meta":if(v=Yg("meta","content",r).get(s+(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(s),ut(c,s,i),r.head.appendChild(c);break;default:throw Error(o(468,s))}c[st]=e,nt(c),s=c}e.stateNode=s}else Gg(r,e.type,e.stateNode);else e.stateNode=qg(r,s,e.memoizedProps);else c!==s?(c===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):c.count--,s===null?Gg(r,e.type,e.stateNode):qg(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&vc(e,e.memoizedProps,i.memoizedProps)}break;case 27:St(t,e),wt(e),s&512&&(We||i===null||rn(i,i.return)),i!==null&&s&4&&vc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(St(t,e),wt(e),s&512&&(We||i===null||rn(i,i.return)),e.flags&32){r=e.stateNode;try{ri(r,"")}catch(ee){Ce(e,e.return,ee)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,vc(e,r,i!==null?i.memoizedProps:r)),s&1024&&(bc=!0);break;case 6:if(St(t,e),wt(e),s&4){if(e.stateNode===null)throw Error(o(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ee){Ce(e,e.return,ee)}}break;case 3:if(Lo=null,r=It,It=Ro(t.containerInfo),St(t,e),It=r,wt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Bi(t.containerInfo)}catch(ee){Ce(e,e.return,ee)}bc&&(bc=!1,Gp(e));break;case 4:s=It,It=Ro(e.stateNode.containerInfo),St(t,e),wt(e),It=s;break;case 12:St(t,e),wt(e);break;case 31:St(t,e),wt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,xo(e,s)));break;case 13:St(t,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(So=Ct()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,xo(e,s)));break;case 22:r=e.memoizedState!==null;var A=i!==null&&i.memoizedState!==null,L=Cn,q=We;if(Cn=L||r,We=q||A,St(t,e),We=q,Cn=L,wt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||A||Cn||We||Ba(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){A=i=t;try{if(c=A.stateNode,r)v=c.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{b=A.stateNode;var X=A.memoizedProps.style,_=X!=null&&X.hasOwnProperty("display")?X.display:null;b.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ee){Ce(A,A.return,ee)}}}else if(t.tag===6){if(i===null){A=t;try{A.stateNode.nodeValue=r?"":A.memoizedProps}catch(ee){Ce(A,A.return,ee)}}}else if(t.tag===18){if(i===null){A=t;try{var H=A.stateNode;r?Rg(H,!0):Rg(A.stateNode,!1)}catch(ee){Ce(A,A.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}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,xo(e,i))));break;case 19:St(t,e),wt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,xo(e,s)));break;case 30:break;case 21:break;default:St(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Lp(s)){i=s;break}s=s.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var r=i.stateNode,c=yc(e);yo(e,c,r);break;case 5:var v=i.stateNode;i.flags&32&&(ri(v,""),i.flags&=-33);var b=yc(e);yo(e,b,v);break;case 3:case 4:var A=i.stateNode.containerInfo,L=yc(e);xc(e,L,A);break;default:throw Error(o(161))}}catch(q){Ce(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Gp(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;)Up(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"&&Rp(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 s=t.alternate,r=e,c=t,v=c.flags;switch(c.tag){case 0:case 11:case 15:On(r,c,i),zs(4,c);break;case 1:if(On(r,c,i),s=c,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(L){Ce(s,s.return,L)}if(s=c,r=s.updateQueue,r!==null){var b=s.stateNode;try{var A=r.shared.hiddenCallbacks;if(A!==null)for(r.shared.hiddenCallbacks=null,r=0;r<A.length;r++)Sm(A[r],b)}catch(L){Ce(s,s.return,L)}}i&&v&64&&zp(c),Rs(c,c.return);break;case 27:Vp(c);case 26:case 5:On(r,c,i),i&&s===null&&v&4&&kp(c),Rs(c,c.return);break;case 12:On(r,c,i);break;case 31:On(r,c,i),i&&v&4&&$p(r,c);break;case 13:On(r,c,i),i&&v&4&&qp(r,c);break;case 22:c.memoizedState===null&&On(r,c,i),Rs(c,c.return);break;case 30:break;default:On(r,c,i)}t=t.sibling}}function Sc(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 wc(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,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Xp(e,t,i,s),t=t.sibling}function Xp(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:en(e,t,i,s),r&2048&&zs(9,t);break;case 1:en(e,t,i,s);break;case 3:en(e,t,i,s),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,s),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(A){Ce(t,t.return,A)}}else en(e,t,i,s);break;case 31:en(e,t,i,s);break;case 13:en(e,t,i,s);break;case 23:break;case 22:c=t.stateNode,v=t.alternate,t.memoizedState!==null?c._visibility&2?en(e,t,i,s):ks(e,t):c._visibility&2?en(e,t,i,s):(c._visibility|=2,Ci(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Sc(v,t);break;case 24:en(e,t,i,s),r&2048&&wc(t.alternate,t);break;default:en(e,t,i,s)}}function Ci(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,v=t,b=i,A=s,L=v.flags;switch(v.tag){case 0:case 11:case 15:Ci(c,v,b,A,r),zs(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?Ci(c,v,b,A,r):ks(c,v):(q._visibility|=2,Ci(c,v,b,A,r)),r&&L&2048&&Sc(v.alternate,v);break;case 24:Ci(c,v,b,A,r),r&&L&2048&&wc(v.alternate,v);break;default:Ci(c,v,b,A,r)}t=t.sibling}}function ks(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:ks(i,s),r&2048&&Sc(s.alternate,s);break;case 24:ks(i,s),r&2048&&wc(s.alternate,s);break;default:ks(i,s)}t=t.sibling}}var Ls=8192;function Mi(e,t,i){if(e.subtreeFlags&Ls)for(e=e.child;e!==null;)Kp(e,t,i),e=e.sibling}function Kp(e,t,i){switch(e.tag){case 26:Mi(e,t,i),e.flags&Ls&&e.memoizedState!==null&&JS(i,It,e.memoizedState,e.memoizedProps);break;case 5:Mi(e,t,i);break;case 3:case 4:var s=It;It=Ro(e.stateNode.containerInfo),Mi(e,t,i),It=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Ls,Ls=16777216,Mi(e,t,i),Ls=s):Mi(e,t,i));break;default:Mi(e,t,i)}}function Fp(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 s=t[i];at=s,Qp(s,e)}Fp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zp(e),e=e.sibling}function Zp(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,bo(e)):Vs(e);break;default:Vs(e)}}function bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];at=s,Qp(s,e)}Fp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jn(8,t,t.return),bo(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,bo(t));break;default:bo(t)}e=e.sibling}}function Qp(e,t){for(;at!==null;){var i=at;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 s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:xs(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,at=s;else e:for(i=e;at!==null;){s=at;var r=s.sibling,c=s.return;if(Bp(s),s===i){at=null;break e}if(r!==null){r.return=c,at=r;break e}at=c}}}var dS={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}},hS=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ve=null,ge=null,ye=0,Ne=0,Lt=null,Wn=!1,Di=!1,Tc=!1,zn=0,Ye=0,In=0,Ha=0,Ec=0,Vt=0,Oi=0,_s=null,Tt=null,jc=!1,So=0,Pp=0,wo=1/0,To=null,ea=null,et=0,ta=null,zi=null,Rn=0,Ac=0,Nc=null,Jp=null,Us=0,Cc=null;function _t(){return(Ae&2)!==0&&ye!==0?ye&-ye:$.T!==null?kc():hh()}function Wp(){if(Vt===0)if((ye&536870912)===0||we){var e=Dl;Dl<<=1,(Dl&3932160)===0&&(Dl=262144),Vt=e}else Vt=536870912;return e=Rt.current,e!==null&&(e.flags|=32),Vt}function Et(e,t,i){(e===Ve&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)&&(Ri(e,0),na(e,ye,Vt,!1)),ss(e,i),((Ae&2)===0||e!==Ve)&&(e===Ve&&((Ae&2)===0&&(Ha|=i),Ye===4&&na(e,ye,Vt,!1)),un(e))}function Ip(e,t,i){if((Ae&6)!==0)throw Error(o(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||is(e,t),r=s?gS(e,t):Dc(e,t,!0),c=s;do{if(r===0){Di&&!s&&na(e,t,0,!1);break}else{if(i=e.current.alternate,c&&!mS(i)){r=Dc(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 A=b.current.memoizedState.isDehydrated;if(A&&(Ri(b,v).flags|=256),v=Dc(b,v,!1),v!==2){if(Tc&&!A){b.errorRecoveryDisabledLanes|=c,Ha|=c,r=4;break e}c=Tt,Tt=r,c!==null&&(Tt===null?Tt=c:Tt.push.apply(Tt,c))}r=v}if(c=!1,r!==2)continue}}if(r===1){Ri(e,0),na(e,t,0,!0);break}e:{switch(s=e,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:na(s,t,Vt,!Wn);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=So+300-Ct(),10<r)){if(na(s,t,Vt,!Wn),zl(s,0,!0)!==0)break e;Rn=t,s.timeoutHandle=Dg(eg.bind(null,s,i,Tt,To,jc,t,Vt,Ha,Oi,Wn,c,"Throttled",-0,0),r);break e}eg(s,i,Tt,To,jc,t,Vt,Ha,Oi,Wn,c,null,-0,0)}}break}while(!0);un(e)}function eg(e,t,i,s,r,c,v,b,A,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},Kp(t,c,X);var ee=(c&62914560)===c?So-Ct():(c&4194048)===c?Pp-Ct():0;if(ee=WS(X,ee),ee!==null){Rn=c,e.cancelPendingCommit=ee(rg.bind(null,e,t,c,i,s,r,v,b,A,q,X,null,_,H)),na(e,c,v,!L);return}}rg(e,t,c,i,s,r,v,b,A)}function mS(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 s=0;s<i.length;s++){var r=i[s],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,s){t&=~Ec,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var c=31-Dt(r),v=1<<c;s[c]=-1,r&=~v}i!==0&&ch(e,i,t)}function Eo(){return(Ae&6)===0?(Bs(0),!1):!0}function Mc(){if(ge!==null){if(Ne===0)var e=ge.return;else e=ge,wn=Oa=null,Xu(e),Ti=null,Ss=0,e=ge;for(;e!==null;)Op(e.alternate,e),e=e.return;ge=null}}function Ri(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,kS(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Rn=0,Mc(),Ve=e,ge=i=bn(e.current,null),ye=t,Ne=0,Lt=null,Wn=!1,Di=is(e,t),Tc=!1,Oi=Vt=Ec=Ha=In=Ye=0,Tt=_s=null,jc=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Dt(s),c=1<<r;t|=e[r],s&=~c}return zn=t,Gl(),i}function tg(e,t){de=null,$.H=Ms,t===wi||t===Wl?(t=vm(),Ne=3):t===Ru?(t=vm(),Ne=4):Ne=t===oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Lt=t,ge===null&&(Ye=1,ho(e,qt(t,e.current)))}function ng(){var e=Rt.current;return e===null?!0:(ye&4194048)===ye?Kt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Kt:!1}function ag(){var e=$.H;return $.H=Ms,e===null?Ms:e}function ig(){var e=$.A;return $.A=dS,e}function jo(){Ye=4,Wn||(ye&4194048)!==ye&&Rt.current!==null||(Di=!0),(In&134217727)===0&&(Ha&134217727)===0||Ve===null||na(Ve,ye,Vt,!1)}function Dc(e,t,i){var s=Ae;Ae|=2;var r=ag(),c=ig();(Ve!==e||ye!==t)&&(To=null,Ri(e,t)),t=!1;var v=Ye;e:do try{if(Ne!==0&&ge!==null){var b=ge,A=Lt;switch(Ne){case 8:Mc(),v=6;break e;case 3:case 2:case 9:case 6:Rt.current===null&&(t=!0);var L=Ne;if(Ne=0,Lt=null,ki(e,b,A,L),i&&Di){v=0;break e}break;default:L=Ne,Ne=0,Lt=null,ki(e,b,A,L)}}pS(),v=Ye;break}catch(q){tg(e,q)}while(!0);return t&&e.shellSuspendCounter++,wn=Oa=null,Ae=s,$.H=r,$.A=c,ge===null&&(Ve=null,ye=0,Gl()),v}function pS(){for(;ge!==null;)sg(ge)}function gS(e,t){var i=Ae;Ae|=2;var s=ag(),r=ig();Ve!==e||ye!==t?(To=null,wo=Ct()+500,Ri(e,t)):Di=is(e,t);e:do try{if(Ne!==0&&ge!==null){t=ge;var c=Lt;t:switch(Ne){case 1:Ne=0,Lt=null,ki(e,t,c,1);break;case 2:case 9:if(pm(c)){Ne=0,Lt=null,lg(t);break}t=function(){Ne!==2&&Ne!==9||Ve!==e||(Ne=7),un(e)},c.then(t,t);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:pm(c)?(Ne=0,Lt=null,lg(t)):(Ne=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?Xg(v):b.stateNode.complete){Ne=0,Lt=null;var A=b.sibling;if(A!==null)ge=A;else{var L=b.return;L!==null?(ge=L,Ao(L)):ge=null}break t}}Ne=0,Lt=null,ki(e,t,c,5);break;case 6:Ne=0,Lt=null,ki(e,t,c,6);break;case 8:Mc(),Ye=6;break e;default:throw Error(o(462))}}vS();break}catch(q){tg(e,q)}while(!0);return wn=Oa=null,$.H=s,$.A=r,Ae=i,ge!==null?0:(Ve=null,ye=0,Gl(),Ye)}function vS(){for(;ge!==null&&!Hb();)sg(ge)}function sg(e){var t=Mp(e.alternate,e,zn);e.memoizedProps=e.pendingProps,t===null?Ao(e):ge=t}function lg(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Tp(i,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=Tp(i,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Xu(t);default:Op(i,t),t=ge=im(t,zn),t=Mp(i,t,zn)}e.memoizedProps=e.pendingProps,t===null?Ao(e):ge=t}function ki(e,t,i,s){wn=Oa=null,Xu(t),Ti=null,Ss=0;var r=t.return;try{if(sS(e,r,t,i,ye)){Ye=1,ho(e,qt(i,e.current)),ge=null;return}}catch(c){if(r!==null)throw ge=r,c;Ye=1,ho(e,qt(i,e.current)),ge=null;return}t.flags&32768?(we||s===1?e=!0:Di||(ye&536870912)!==0?e=!1:(Wn=e=!0,(s===2||s===9||s===3||s===6)&&(s=Rt.current,s!==null&&s.tag===13&&(s.flags|=16384))),og(t,e)):Ao(t)}function Ao(e){var t=e;do{if((t.flags&32768)!==0){og(t,Wn);return}e=t.return;var i=rS(t.alternate,t,zn);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 og(e,t){do{var i=uS(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 rg(e,t,i,s,r,c,v,b,A){e.cancelPendingCommit=null;do No();while(et!==0);if((Ae&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=yu,Pb(e,i,c,v,b,A),e===Ve&&(ge=Ve=null,ye=0),zi=t,ta=e,Rn=i,Ac=c,Nc=r,Jp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,SS(Cl,function(){return hg(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=$.T,$.T=null,r=Q.p,Q.p=2,v=Ae,Ae|=4;try{cS(e,t,i)}finally{Ae=v,Q.p=r,$.T=s}}et=1,ug(),cg(),fg()}}function ug(){if(et===1){et=0;var e=ta,t=zi,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=$.T,$.T=null;var s=Q.p;Q.p=2;var r=Ae;Ae|=4;try{Yp(t,e);var c=qc,v=Qh(e.containerInfo),b=c.focusedElem,A=c.selectionRange;if(v!==b&&b&&b.ownerDocument&&Zh(b.ownerDocument.documentElement,b)){if(A!==null&&hu(b)){var L=A.start,q=A.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(A.start,ee),Re=A.end===void 0?se:Math.min(A.end,ee);!H.extend&&se>Re&&(v=Re,Re=se,se=v);var M=Fh(b,se),C=Fh(b,Re);if(M&&C&&(H.rangeCount!==1||H.anchorNode!==M.node||H.anchorOffset!==M.offset||H.focusNode!==C.node||H.focusOffset!==C.offset)){var k=X.createRange();k.setStart(M.node,M.offset),H.removeAllRanges(),se>Re?(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}}Bo=!!$c,qc=$c=null}finally{Ae=r,Q.p=s,$.T=i}}e.current=t,et=2}}function cg(){if(et===2){et=0;var e=ta,t=zi,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=$.T,$.T=null;var s=Q.p;Q.p=2;var r=Ae;Ae|=4;try{Up(e,t.alternate,t)}finally{Ae=r,Q.p=s,$.T=i}}et=3}}function fg(){if(et===4||et===3){et=0,$b();var e=ta,t=zi,i=Rn,s=Jp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,zi=ta=null,dg(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ea=null),Zr(i),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(as,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=$.T,r=Q.p,Q.p=2,$.T=null;try{for(var c=e.onRecoverableError,v=0;v<s.length;v++){var b=s[v];c(b.value,{componentStack:b.stack})}}finally{$.T=t,Q.p=r}}(Rn&3)!==0&&No(),un(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Cc?Us++:(Us=0,Cc=e):Us=0,Bs(0)}}function dg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xs(t)))}function No(){return ug(),cg(),fg(),hg()}function hg(){if(et!==5)return!1;var e=ta,t=Ac;Ac=0;var i=Zr(Rn),s=$.T,r=Q.p;try{Q.p=32>i?32:i,$.T=null,i=Nc,Nc=null;var c=ta,v=Rn;if(et=0,zi=ta=null,Rn=0,(Ae&6)!==0)throw Error(o(331));var b=Ae;if(Ae|=4,Zp(c.current),Xp(c,c.current,v,i),Ae=b,Bs(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(as,c)}catch{}return!0}finally{Q.p=r,$.T=s,dg(e,t)}}function mg(e,t,i){t=qt(i,t),t=lc(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)mg(e,e,i);else for(;t!==null;){if(t.tag===3){mg(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ea===null||!ea.has(s))){e=qt(i,e),i=pp(2),s=Zn(t,i,2),s!==null&&(gp(i,s,t,e),ss(s,2),un(s));break}}t=t.return}}function Oc(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new hS;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(Tc=!0,r.add(i),e=yS.bind(null,e,t,i),t.then(e,e))}function yS(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ve===e&&(ye&i)===i&&(Ye===4||Ye===3&&(ye&62914560)===ye&&300>Ct()-So?(Ae&2)===0&&Ri(e,0):Ec|=i,Oi===ye&&(Oi=0)),un(e)}function pg(e,t){t===0&&(t=uh()),e=Ca(e,t),e!==null&&(ss(e,t),un(e))}function xS(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),pg(e,i)}function bS(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(t),pg(e,i)}function SS(e,t){return Gr(e,t)}var Co=null,Li=null,zc=!1,Mo=!1,Rc=!1,aa=0;function un(e){e!==Li&&e.next===null&&(Li===null?Co=Li=e:Li=Li.next=e),Mo=!0,zc||(zc=!0,TS())}function Bs(e,t){if(!Rc&&Mo){Rc=!0;do for(var i=!1,s=Co;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var c=0;else{var v=s.suspendedLanes,b=s.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,xg(s,c))}else c=ye,c=zl(s,s===Ve?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||is(s,c)||(i=!0,xg(s,c));s=s.next}while(i);Rc=!1}}function wS(){gg()}function gg(){Mo=zc=!1;var e=0;aa!==0&&RS()&&(e=aa);for(var t=Ct(),i=null,s=Co;s!==null;){var r=s.next,c=vg(s,t);c===0?(s.next=null,i===null?Co=r:i.next=r,r===null&&(Li=i)):(i=s,(e!==0||(c&3)!==0)&&(Mo=!0)),s=r}et!==0&&et!==5||Bs(e),aa!==0&&(aa=0)}function vg(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var v=31-Dt(c),b=1<<v,A=r[v];A===-1?((b&i)===0||(b&s)!==0)&&(r[v]=Qb(b,t)):A<=t&&(e.expiredLanes|=b),c&=~b}if(t=Ve,i=ye,i=zl(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Xr(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||is(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Xr(s),Zr(i)){case 2:case 8:i=oh;break;case 32:i=Cl;break;case 268435456:i=rh;break;default:i=Cl}return s=yg.bind(null,e),i=Gr(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Xr(s),e.callbackPriority=2,e.callbackNode=null,2}function yg(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(No()&&e.callbackNode!==i)return null;var s=ye;return s=zl(e,e===Ve?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Ip(e,s,t),vg(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?yg.bind(null,e):null)}function xg(e,t){if(No())return null;Ip(e,t,!0)}function TS(){LS(function(){(Ae&6)!==0?Gr(lh,wS):gg()})}function kc(){if(aa===0){var e=bi;e===0&&(e=Ml,Ml<<=1,(Ml&261888)===0&&(Ml=256)),aa=e}return aa}function bg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vl(""+e)}function Sg(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 ES(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var c=bg((r[yt]||null).action),v=s.submitter;v&&(t=(t=v[yt]||null)?bg(t.formAction):v.getAttribute("formAction"),t!==null&&(c=t,v=null));var b=new Hl("action","action",null,s,r);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(aa!==0){var A=v?Sg(r,v):new FormData(r);ec(i,{pending:!0,data:A,method:r.method,action:c},null,A)}}else typeof c=="function"&&(b.preventDefault(),A=v?Sg(r,v):new FormData(r),ec(i,{pending:!0,data:A,method:r.method,action:c},c,A))},currentTarget:r}]})}}for(var Lc=0;Lc<vu.length;Lc++){var Vc=vu[Lc],jS=Vc.toLowerCase(),AS=Vc[0].toUpperCase()+Vc.slice(1);Wt(jS,"on"+AS)}Wt(Wh,"onAnimationEnd"),Wt(Ih,"onAnimationIteration"),Wt(em,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(q1,"onTransitionRun"),Wt(Y1,"onTransitionStart"),Wt(G1,"onTransitionCancel"),Wt(tm,"onTransitionEnd"),li("onMouseEnter",["mouseout","mouseover"]),li("onMouseLeave",["mouseout","mouseover"]),li("onPointerEnter",["pointerout","pointerover"]),li("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("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(" "),NS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hs));function wg(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var v=s.length-1;0<=v;v--){var b=s[v],A=b.instance,L=b.currentTarget;if(b=b.listener,A!==c&&r.isPropagationStopped())break e;c=b,r.currentTarget=L;try{c(r)}catch(q){Yl(q)}r.currentTarget=null,c=A}else for(v=0;v<s.length;v++){if(b=s[v],A=b.instance,L=b.currentTarget,b=b.listener,A!==c&&r.isPropagationStopped())break e;c=b,r.currentTarget=L;try{c(r)}catch(q){Yl(q)}r.currentTarget=null,c=A}}}}function ve(e,t){var i=t[Qr];i===void 0&&(i=t[Qr]=new Set);var s=e+"__bubble";i.has(s)||(Tg(t,e,2,!1),i.add(s))}function _c(e,t,i){var s=0;t&&(s|=4),Tg(i,e,s,t)}var Do="_reactListening"+Math.random().toString(36).slice(2);function Uc(e){if(!e[Do]){e[Do]=!0,gh.forEach(function(i){i!=="selectionchange"&&(NS.has(i)||_c(i,!1,e),_c(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Do]||(t[Do]=!0,_c("selectionchange",!1,t))}}function Tg(e,t,i,s){switch(Wg(t)){case 2:var r=tw;break;case 8:r=nw;break;default:r=Ic}i=r.bind(null,t,i,e),r=void 0,!iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?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 Bc(e,t,i,s,r){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var b=s.stateNode.containerInfo;if(b===r)break;if(v===4)for(v=s.return;v!==null;){var A=v.tag;if((A===3||A===4)&&v.stateNode.containerInfo===r)return;v=v.return}for(;b!==null;){if(v=ai(b),v===null)return;if(A=v.tag,A===5||A===6||A===26||A===27){s=c=v;continue e}b=b.parentNode}}s=s.return}Ch(function(){var L=c,q=nu(i),X=[];e:{var _=nm.get(e);if(_!==void 0){var H=Hl,ee=e;switch(e){case"keypress":if(Ul(i)===0)break e;case"keydown":case"keyup":H=b1;break;case"focusin":ee="focus",H=ru;break;case"focusout":ee="blur",H=ru;break;case"beforeblur":case"afterblur":H=ru;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=Oh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=r1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=T1;break;case Wh:case Ih:case em:H=f1;break;case tm:H=j1;break;case"scroll":case"scrollend":H=l1;break;case"wheel":H=N1;break;case"copy":case"cut":case"paste":H=h1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Rh;break;case"toggle":case"beforetoggle":H=M1}var se=(t&4)!==0,Re=!se&&(e==="scroll"||e==="scrollend"),M=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||M===null||(Y=rs(C,M),Y!=null&&se.push($s(C,Y,k))),Re)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!==tu&&(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&&(Re=f(ee),se=ee.tag,ee!==Re||se!==5&&se!==27&&se!==6)&&(ee=null)):(H=null,ee=L),H!==ee)){if(se=Oh,Y="onMouseLeave",M="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(se=Rh,Y="onPointerLeave",M="onPointerEnter",C="pointer"),Re=H==null?_:os(H),k=ee==null?_:os(ee),_=new se(Y,C+"leave",H,i,q),_.target=Re,_.relatedTarget=k,Y=null,ai(q)===L&&(se=new se(M,C+"enter",ee,i,q),se.target=k,se.relatedTarget=Re,Y=se),Re=Y,H&&ee)t:{for(se=CS,M=H,C=ee,k=0,Y=M;Y;Y=se(Y))k++;Y=0;for(var ae=C;ae;ae=se(ae))Y++;for(;0<k-Y;)M=se(M),k--;for(;0<Y-k;)C=se(C),Y--;for(;k--;){if(M===C||C!==null&&M===C.alternate){se=M;break t}M=se(M),C=se(C)}se=null}else se=null;H!==null&&Eg(X,_,H,se,!1),ee!==null&&Re!==null&&Eg(X,Re,ee,se,!0)}}e:{if(_=L?os(L):window,H=_.nodeName&&_.nodeName.toLowerCase(),H==="select"||H==="input"&&_.type==="file")var Ee=$h;else if(Bh(_))if(qh)Ee=B1;else{Ee=_1;var ne=V1}else H=_.nodeName,!H||H.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?L&&eu(L.elementType)&&(Ee=$h):Ee=U1;if(Ee&&(Ee=Ee(e,L))){Hh(X,Ee,i,q);break e}ne&&ne(e,_,L),e==="focusout"&&L&&_.type==="number"&&L.memoizedProps.value!=null&&Ir(_,"number",_.value)}switch(ne=L?os(L):window,e){case"focusin":(Bh(ne)||ne.contentEditable==="true")&&(di=ne,mu=L,gs=null);break;case"focusout":gs=mu=di=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,Ph(X,i,q);break;case"selectionchange":if($1)break;case"keydown":case"keyup":Ph(X,i,q)}var he;if(cu)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else fi?_h(e,i)&&(xe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(xe="onCompositionStart");xe&&(kh&&i.locale!=="ko"&&(fi||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&fi&&(he=Mh()):($n=q,su="value"in $n?$n.value:$n.textContent,fi=!0)),ne=Oo(L,xe),0<ne.length&&(xe=new zh(xe,e,null,i,q),X.push({event:xe,listeners:ne}),he?xe.data=he:(he=Uh(i),he!==null&&(xe.data=he)))),(he=O1?z1(e,i):R1(e,i))&&(xe=Oo(L,"onBeforeInput"),0<xe.length&&(ne=new zh("onBeforeInput","beforeinput",null,i,q),X.push({event:ne,listeners:xe}),ne.data=he)),ES(X,e,L,i,q)}wg(X,t)})}function $s(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Oo(e,t){for(var i=t+"Capture",s=[];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&&s.unshift($s(e,r,c)),r=rs(e,t),r!=null&&s.push($s(e,r,c))),e.tag===3)return s;e=e.return}return[]}function CS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Eg(e,t,i,s,r){for(var c=t._reactName,v=[];i!==null&&i!==s;){var b=i,A=b.alternate,L=b.stateNode;if(b=b.tag,A!==null&&A===s)break;b!==5&&b!==26&&b!==27||L===null||(A=L,r?(L=rs(i,c),L!=null&&v.unshift($s(i,L,A))):r||(L=rs(i,c),L!=null&&v.push($s(i,L,A)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var MS=/\r\n?/g,DS=/\u0000|\uFFFD/g;function jg(e){return(typeof e=="string"?e:""+e).replace(MS,`
|
|
49
|
-
`).replace(DS,"")}function Ag(e,t){return t=jg(t),jg(e)===t}function ze(e,t,i,s,r,c){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ri(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ri(e,""+s);break;case"className":kl(e,"class",s);break;case"tabIndex":kl(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":kl(e,i,s);break;case"style":Ah(e,s,c);break;case"data":if(t!=="object"){kl(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Vl(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="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"&&ze(e,t,"name",r.name,r,null),ze(e,t,"formEncType",r.formEncType,r,null),ze(e,t,"formMethod",r.formMethod,r,null),ze(e,t,"formTarget",r.formTarget,r,null)):(ze(e,t,"encType",r.encType,r,null),ze(e,t,"method",r.method,r,null),ze(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Vl(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=yn);break;case"onScroll":s!=null&&ve("scroll",e);break;case"onScrollEnd":s!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=Vl(""+s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":ve("beforetoggle",e),ve("toggle",e),Rl(e,"popover",s);break;case"xlinkActuate":vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":vn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":vn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":vn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":vn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Rl(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=i1.get(i)||i,Rl(e,i,s))}}function Hc(e,t,i,s,r,c){switch(i){case"style":Ah(e,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof s=="string"?ri(e,s):(typeof s=="number"||typeof s=="bigint")&&ri(e,""+s);break;case"onScroll":s!=null&&ve("scroll",e);break;case"onScrollEnd":s!=null&&ve("scrollend",e);break;case"onClick":s!=null&&(e.onclick=yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vh.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[yt]||null,c=c!=null?c[i]:null,typeof c=="function"&&e.removeEventListener(t,c,r),typeof s=="function")){typeof c!="function"&&c!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Rl(e,i,s)}}}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 s=!1,r=!1,c;for(c in i)if(i.hasOwnProperty(c)){var v=i[c];if(v!=null)switch(c){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,c,v,i,null)}}r&&ze(e,t,"srcSet",i.srcSet,i,null),s&&ze(e,t,"src",i.src,i,null);return;case"input":ve("invalid",e);var b=c=v=r=null,A=null,L=null;for(s in i)if(i.hasOwnProperty(s)){var q=i[s];if(q!=null)switch(s){case"name":r=q;break;case"type":v=q;break;case"checked":A=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:ze(e,t,s,q,i,null)}}wh(e,c,b,A,L,v,r,!1);return;case"select":ve("invalid",e),s=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":s=b;default:ze(e,t,r,b,i,null)}t=c,i=v,e.multiple=!!s,t!=null?oi(e,!!s,t,!1):i!=null&&oi(e,!!s,i,!0);return;case"textarea":ve("invalid",e),c=r=s=null;for(v in i)if(i.hasOwnProperty(v)&&(b=i[v],b!=null))switch(v){case"value":s=b;break;case"defaultValue":r=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:ze(e,t,v,b,i,null)}Eh(e,s,r,c);return;case"option":for(A in i)if(i.hasOwnProperty(A)&&(s=i[A],s!=null))switch(A){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ze(e,t,A,s,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(s=0;s<Hs.length;s++)ve(Hs[s],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)&&(s=i[L],s!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,L,s,i,null)}return;default:if(eu(t)){for(q in i)i.hasOwnProperty(q)&&(s=i[q],s!==void 0&&Hc(e,t,q,s,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(s=i[b],s!=null&&ze(e,t,b,s,i,null))}function OS(e,t,i,s){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,A=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":A=X;default:s.hasOwnProperty(H)||ze(e,t,H,null,s,X)}}for(var _ in s){var H=s[_];if(X=i[_],s.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&&ze(e,t,_,H,s,X)}}Wr(e,v,b,A,L,q,c,r);return;case"select":H=v=b=_=null;for(c in i)if(A=i[c],i.hasOwnProperty(c)&&A!=null)switch(c){case"value":break;case"multiple":H=A;default:s.hasOwnProperty(c)||ze(e,t,c,null,s,A)}for(r in s)if(c=s[r],A=i[r],s.hasOwnProperty(r)&&(c!=null||A!=null))switch(r){case"value":_=c;break;case"defaultValue":b=c;break;case"multiple":v=c;default:c!==A&&ze(e,t,r,c,s,A)}t=b,i=v,s=H,_!=null?oi(e,!!i,_,!1):!!s!=!!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&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:ze(e,t,b,null,s,r)}for(v in s)if(r=s[v],c=i[v],s.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&&ze(e,t,v,r,s,c)}Th(e,_,H);return;case"option":for(var ee in i)if(_=i[ee],i.hasOwnProperty(ee)&&_!=null&&!s.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:ze(e,t,ee,null,s,_)}for(A in s)if(_=s[A],H=i[A],s.hasOwnProperty(A)&&_!==H&&(_!=null||H!=null))switch(A){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:ze(e,t,A,_,s,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&&!s.hasOwnProperty(se)&&ze(e,t,se,null,s,_);for(L in s)if(_=s[L],H=i[L],s.hasOwnProperty(L)&&_!==H&&(_!=null||H!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(137,t));break;default:ze(e,t,L,_,s,H)}return;default:if(eu(t)){for(var Re in i)_=i[Re],i.hasOwnProperty(Re)&&_!==void 0&&!s.hasOwnProperty(Re)&&Hc(e,t,Re,void 0,s,_);for(q in s)_=s[q],H=i[q],!s.hasOwnProperty(q)||_===H||_===void 0&&H===void 0||Hc(e,t,q,_,s,H);return}}for(var M in i)_=i[M],i.hasOwnProperty(M)&&_!=null&&!s.hasOwnProperty(M)&&ze(e,t,M,null,s,_);for(X in s)_=s[X],H=i[X],!s.hasOwnProperty(X)||_===H||_==null&&H==null||ze(e,t,X,_,s,H)}function Ng(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],c=r.transferSize,v=r.initiatorType,b=r.duration;if(c&&b&&Ng(v)){for(v=0,b=r.responseEnd,s+=1;s<i.length;s++){var A=i[s],L=A.startTime;if(L>b)break;var q=A.transferSize,X=A.initiatorType;q&&Ng(X)&&(A=A.responseEnd,v+=q*(A<b?1:(b-L)/(A-L)))}if(--s,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 $c=null,qc=null;function zo(e){return e.nodeType===9?e:e.ownerDocument}function Cg(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 Mg(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 Yc(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 Gc=null;function RS(){var e=window.event;return e&&e.type==="popstate"?e===Gc?!1:(Gc=e,!0):(Gc=null,!1)}var Dg=typeof setTimeout=="function"?setTimeout:void 0,kS=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,LS=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(VS)}:Dg;function VS(e){setTimeout(function(){throw e})}function ia(e){return e==="head"}function zg(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Bi(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;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 Rg(e,t){var i=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Xc(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":Xc(i),Pr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function _S(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){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 US(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 kg(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 Kc(e){return e.data==="$?"||e.data==="$~"}function Fc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function BS(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}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 Zc=null;function Lg(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 Vg(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=zo(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]);Pr(e)}var Zt=new Map,Ug=new Set;function Ro(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kn=Q.d;Q.d={f:HS,r:$S,D:qS,C:YS,L:GS,m:XS,X:FS,S:KS,M:ZS};function HS(){var e=kn.f(),t=Eo();return e||t}function $S(e){var t=ii(e);t!==null&&t.tag===5&&t.type==="form"?tp(t):kn.r(e)}var Vi=typeof document>"u"?null:document;function Bg(e,t,i){var s=Vi;if(s&&typeof t=="string"&&t){var r=Ht(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),Ug.has(r)||(Ug.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),ut(t,"link",e),nt(t),s.head.appendChild(t)))}}function qS(e){kn.D(e),Bg("dns-prefetch",e,null)}function YS(e,t){kn.C(e,t),Bg("preconnect",e,t)}function GS(e,t,i){kn.L(e,t,i);var s=Vi;if(s&&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),s.querySelector(r)!==null||t==="style"&&s.querySelector(Ys(c))||t==="script"&&s.querySelector(Gs(c))||(t=s.createElement("link"),ut(t,"link",e),nt(t),s.head.appendChild(t)))}}function XS(e,t){kn.m(e,t);var i=Vi;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ht(s)+'"][href="'+Ht(e)+'"]',c=r;switch(s){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(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Gs(c)))return}s=i.createElement("link"),ut(s,"link",e),nt(s),i.head.appendChild(s)}}}function KS(e,t,i){kn.S(e,t,i);var s=Vi;if(s&&e){var r=si(s).hoistableStyles,c=_i(e);t=t||"default";var v=r.get(c);if(!v){var b={loading:0,preload:null};if(v=s.querySelector(Ys(c)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(c))&&Qc(e,i);var A=v=s.createElement("link");nt(A),ut(A,"link",e),A._p=new Promise(function(L,q){A.onload=L,A.onerror=q}),A.addEventListener("load",function(){b.loading|=1}),A.addEventListener("error",function(){b.loading|=2}),b.loading|=4,ko(v,t,s)}v={type:"stylesheet",instance:v,count:1,state:b},r.set(c,v)}}}function FS(e,t){kn.X(e,t);var i=Vi;if(i&&e){var s=si(i).hoistableScripts,r=Ui(e),c=s.get(r);c||(c=i.querySelector(Gs(r)),c||(e=x({src:e,async:!0},t),(t=Zt.get(r))&&Pc(e,t),c=i.createElement("script"),nt(c),ut(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function ZS(e,t){kn.M(e,t);var i=Vi;if(i&&e){var s=si(i).hoistableScripts,r=Ui(e),c=s.get(r);c||(c=i.querySelector(Gs(r)),c||(e=x({src:e,async:!0,type:"module"},t),(t=Zt.get(r))&&Pc(e,t),c=i.createElement("script"),nt(c),ut(c,"link",e),i.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function Hg(e,t,i,s){var r=(r=pe.current)?Ro(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,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{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||QS(r,e,i,v.state))),t&&s===null)throw Error(o(528,""));return v}if(t&&s!==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,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{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 $g(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function QS(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ut(t,"link",i),nt(t),e.head.appendChild(t))}function Ui(e){return'[src="'+Ht(e)+'"]'}function Gs(e){return"script[async]"+e}function qg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ht(i.href)+'"]');if(s)return t.instance=s,nt(s),s;var r=x({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),nt(s),ut(s,"style",r),ko(s,i.precedence,e),t.instance=s;case"stylesheet":r=_i(i.href);var c=e.querySelector(Ys(r));if(c)return t.state.loading|=4,t.instance=c,nt(c),c;s=$g(i),(r=Zt.get(r))&&Qc(s,r),c=(e.ownerDocument||e).createElement("link"),nt(c);var v=c;return v._p=new Promise(function(b,A){v.onload=b,v.onerror=A}),ut(c,"link",s),t.state.loading|=4,ko(c,i.precedence,e),t.instance=c;case"script":return c=Ui(i.src),(r=e.querySelector(Gs(c)))?(t.instance=r,nt(r),r):(s=i,(r=Zt.get(c))&&(s=x({},i),Pc(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),nt(r),ut(r,"link",s),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&&(s=t.instance,t.state.loading|=4,ko(s,i.precedence,e));return t.instance}function ko(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,c=r,v=0;v<s.length;v++){var b=s[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 Qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Pc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Lo=null;function Yg(e,t,i){if(Lo===null){var s=new Map,r=Lo=new Map;r.set(i,s)}else r=Lo,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.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=s.get(v);b?b.push(c):s.set(v,[c])}}return s}function Gg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function PS(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 Xg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function JS(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=_i(s.href),c=t.querySelector(Ys(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Vo.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=c,nt(c);return}c=t.ownerDocument||t,s=$g(s),(r=Zt.get(r))&&Qc(s,r),c=c.createElement("link"),nt(c);var v=c;v._p=new Promise(function(b,A){v.onload=b,v.onerror=A}),ut(c,"link",s),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=Vo.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Jc=0;function WS(e,t){return e.stylesheets&&e.count===0&&Uo(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Uo(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Jc===0&&(Jc=62500*zS());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Uo(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Jc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Vo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _o=null;function Uo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_o=new Map,t.forEach(IS,e),_o=null,Vo.call(e))}function IS(e,t){if(!(t.state.loading&4)){var i=_o.get(e);if(i)var s=i.get(null);else{i=new Map,_o.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),s=v)}s&&i.set(null,s)}r=t.instance,v=r.getAttribute("data-precedence"),c=i.get(v)||s,c===s&&i.set(null,r),i.set(v,r),this.count++,s=Vo.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),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 ew(e,t,i,s,r,c,v,b,A){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=Kr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kr(0),this.hiddenUpdates=Kr(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Kg(e,t,i,s,r,c,v,b,A,L,q,X){return e=new ew(e,t,i,v,A,L,q,X,b),t=1,c===!0&&(t|=24),c=zt(3,null,null,t),e.current=c,c.stateNode=e,t=Du(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:s,isDehydrated:i,cache:t},ku(c),e}function Fg(e){return e?(e=pi,e):pi}function Zg(e,t,i,s,r,c){r=Fg(r),s.context===null?s.context=r:s.pendingContext=r,s=Fn(t),s.payload={element:i},c=c===void 0?null:c,c!==null&&(s.callback=c),i=Zn(e,s,t),i!==null&&(Et(i,e,t),Ts(i,e,t))}function Qg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Wc(e,t){Qg(e,t),(e=e.alternate)&&Qg(e,t)}function Pg(e){if(e.tag===13||e.tag===31){var t=Ca(e,67108864);t!==null&&Et(t,e,67108864),Wc(e,67108864)}}function Jg(e){if(e.tag===13||e.tag===31){var t=_t();t=Fr(t);var i=Ca(e,t);i!==null&&Et(i,e,t),Wc(e,t)}}var Bo=!0;function tw(e,t,i,s){var r=$.T;$.T=null;var c=Q.p;try{Q.p=2,Ic(e,t,i,s)}finally{Q.p=c,$.T=r}}function nw(e,t,i,s){var r=$.T;$.T=null;var c=Q.p;try{Q.p=8,Ic(e,t,i,s)}finally{Q.p=c,$.T=r}}function Ic(e,t,i,s){if(Bo){var r=ef(s);if(r===null)Bc(e,t,s,Ho,i),Ig(e,s);else if(iw(r,e,t,i,s))s.stopPropagation();else if(Ig(e,s),t&4&&-1<aw.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 A=1<<31-Dt(v);b.entanglements[1]|=A,v&=~A}un(c),(Ae&6)===0&&(wo=Ct()+500,Bs(0))}}break;case 31:case 13:b=Ca(c,2),b!==null&&Et(b,c,2),Eo(),Wc(c,2)}if(c=ef(s),c===null&&Bc(e,t,s,Ho,i),c===r)break;r=c}r!==null&&s.stopPropagation()}else Bc(e,t,s,null,i)}}function ef(e){return e=nu(e),tf(e)}var Ho=null;function tf(e){if(Ho=null,e=ai(e),e!==null){var t=f(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=d(t),e!==null)return e;e=null}else if(i===31){if(e=m(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 Ho=e,null}function Wg(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 lh:return 2;case oh:return 8;case Cl:case Yb:return 32;case rh:return 268435456;default:return 32}default:return 32}}var nf=!1,sa=null,la=null,oa=null,Ks=new Map,Fs=new Map,ra=[],aw="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 Ig(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,s,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:c,targetContainers:[r]},t!==null&&(t=ii(t),t!==null&&Pg(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function iw(e,t,i,s,r){switch(t){case"focusin":return sa=Zs(sa,e,t,i,s,r),!0;case"dragenter":return la=Zs(la,e,t,i,s,r),!0;case"mouseover":return oa=Zs(oa,e,t,i,s,r),!0;case"pointerover":var c=r.pointerId;return Ks.set(c,Zs(Ks.get(c)||null,e,t,i,s,r)),!0;case"gotpointercapture":return c=r.pointerId,Fs.set(c,Zs(Fs.get(c)||null,e,t,i,s,r)),!0}return!1}function ev(e){var t=ai(e.target);if(t!==null){var i=f(t);if(i!==null){if(t=i.tag,t===13){if(t=d(i),t!==null){e.blockedOn=t,mh(e.priority,function(){Jg(i)});return}}else if(t===31){if(t=m(i),t!==null){e.blockedOn=t,mh(e.priority,function(){Jg(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 $o(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=ef(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);tu=s,i.target.dispatchEvent(s),tu=null}else return t=ii(i),t!==null&&Pg(t),e.blockedOn=i,!1;t.shift()}return!0}function tv(e,t,i){$o(e)&&i.delete(t)}function sw(){nf=!1,sa!==null&&$o(sa)&&(sa=null),la!==null&&$o(la)&&(la=null),oa!==null&&$o(oa)&&(oa=null),Ks.forEach(tv),Fs.forEach(tv)}function qo(e,t){e.blockedOn===t&&(e.blockedOn=null,nf||(nf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,sw)))}var Yo=null;function nv(e){Yo!==e&&(Yo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Yo===e&&(Yo=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(tf(s||i)===null)continue;break}var c=ii(i);c!==null&&(e.splice(t,3),t-=3,ec(c,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Bi(e){function t(A){return qo(A,e)}sa!==null&&qo(sa,e),la!==null&&qo(la,e),oa!==null&&qo(oa,e),Ks.forEach(t),Fs.forEach(t);for(var i=0;i<ra.length;i++){var s=ra[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ra.length&&(i=ra[0],i.blockedOn===null);)ev(i),i.blockedOn===null&&ra.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],c=i[s+1],v=r[yt]||null;if(typeof c=="function")v||nv(i);else if(v){var b=null;if(c&&c.hasAttribute("formAction")){if(r=c,v=c[yt]||null)b=v.formAction;else if(tf(r)!==null)continue}else b=v.action;typeof b=="function"?i[s+1]=b:(i.splice(s,3),s-=3),nv(i)}}}function av(){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),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function af(e){this._internalRoot=e}Go.prototype.render=af.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,s=_t();Zg(i,s,e,t,null,null)},Go.prototype.unmount=af.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zg(e.current,2,null,e,null,null),Eo(),t[ni]=null}};function Go(e){this._internalRoot=e}Go.prototype.unstable_scheduleHydration=function(e){if(e){var t=hh();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&&ev(e)}};var iv=a.version;if(iv!=="19.2.4")throw Error(o(527,iv,"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 lw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xo.isDisabled&&Xo.supportsFiber)try{as=Xo.inject(lw),Mt=Xo}catch{}}return Ps.createRoot=function(e,t){if(!u(e))throw Error(o(299));var i=!1,s="",r=fp,c=dp,v=hp;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=Kg(e,1,!1,null,null,i,s,null,r,c,v,av),e[ni]=t.current,Uc(e),new af(t)},Ps.hydrateRoot=function(e,t,i){if(!u(e))throw Error(o(299));var s=!1,r="",c=fp,v=dp,b=hp,A=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!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&&(A=i.formState)),t=Kg(e,1,!0,t,i??null,s,r,A,c,v,b,av),t.context=Fg(null),i=t.current,s=_t(),s=Fr(s),r=Fn(s),r.callback=null,Zn(i,r,s),i=s,t.current.lanes=i,ss(t,i),un(t),e[ni]=t.current,Uc(e),new Go(t)},Ps.version="19.2.4",Ps}var pv;function vw(){if(pv)return of.exports;pv=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(),of.exports=gw(),of.exports}var yw=vw();const ey="/api";async function Be(n){const a=await fetch(`${ey}${n}`,{headers:{accept:"application/json"}});if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function xw(n){const a=new EventSource(`${ey}/events`);return a.addEventListener("state-changed",l=>{try{const o=JSON.parse(l.data);n("state-changed",o)}catch{n("state-changed",{})}}),a.onerror=()=>{},()=>a.close()}function it(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 jt(n,a){if(!n)return"";if(n.length<=a)return n;const l=n.lastIndexOf(" ",a);return(l>a*.6?n.slice(0,l):n.slice(0,a))+"…"}const ty=w.createContext(()=>{});function Pi(){return w.useContext(ty)}const bw=new Set(["overview","sessions","work","connections","inner","notes","runtime"]);function ny(n){const a=n.replace(/^#\/?/,"");if(!a.startsWith("agent/"))return null;const l=a.split("/"),o=l[1]?decodeURIComponent(l[1]):"";if(!o)return null;const u=l[2]??"overview",f=bw.has(u)?u:"overview",d=l.slice(3),m=d.length>0?d.map(decodeURIComponent).join("/"):void 0;return{agent:o,tab:f,focus:m}}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 Sw=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 ww(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function Tw(n){return ww(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let Ew=!1;function Sd(){return Ew}function Ka(n,a){if(!Sd())return a&&n?n.contains(a):!1;if(!n||!a)return!1;let l=a;for(;l!==null;){if(l===n)return!0;l.tagName==="SLOT"&&l.assignedSlot?l=l.assignedSlot.parentNode:Tw(l)?l=l.host:l=l.parentNode}return!1}const Fi=(n=document)=>{var a;if(!Sd())return n.activeElement;let l=n.activeElement;for(;l&&"shadowRoot"in l&&(!((a=l.shadowRoot)===null||a===void 0)&&a.activeElement);)l=l.shadowRoot.activeElement;return l};function pt(n){if(Sd()&&n.target instanceof Element&&n.target.shadowRoot){var a,l;if("composedPath"in n)return(a=n.composedPath()[0])!==null&&a!==void 0?a:null;if("composedPath"in n.nativeEvent)return(l=n.nativeEvent.composedPath()[0])!==null&&l!==void 0?l:null}return n.target}function ay(n){var a,l,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]&&(l=ay(n[a]))&&(o&&(o+=" "),o+=l)}else for(l in n)n[l]&&(o&&(o+=" "),o+=l);return o}function Fe(){for(var n,a,l=0,o="",u=arguments.length;l<u;l++)(n=arguments[l])&&(a=ay(n))&&(o&&(o+=" "),o+=a);return o}function jw(n){if(Aw())n.focus({preventScroll:!0});else{let a=Nw(n);n.focus(),Cw(a)}}let Ko=null;function Aw(){if(Ko==null){Ko=!1;try{document.createElement("div").focus({get preventScroll(){return Ko=!0,!0}})}catch{}}return Ko}function Nw(n){let a=n.parentNode,l=[],o=document.scrollingElement||document.documentElement;for(;a instanceof HTMLElement&&a!==o;)(a.offsetHeight<a.scrollHeight||a.offsetWidth<a.scrollWidth)&&l.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),a=a.parentNode;return o instanceof HTMLElement&&l.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),l}function Cw(n){for(let{element:a,scrollTop:l,scrollLeft:o}of n)a.scrollTop=l,a.scrollLeft=o}function Ar(n){var a;if(typeof window>"u"||window.navigator==null)return!1;let l=(a=window.navigator.userAgentData)===null||a===void 0?void 0:a.brands;return Array.isArray(l)&&l.some(o=>n.test(o.brand))||n.test(window.navigator.userAgent)}function iy(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 cr=Ji(function(){return iy(/^Mac/i)}),Mw=Ji(function(){return iy(/^iPad/i)||cr()&&navigator.maxTouchPoints>1}),Dw=Ji(function(){return Ar(/AppleWebKit/i)&&!Ow()}),Ow=Ji(function(){return Ar(/Chrome/i)}),zw=Ji(function(){return Ar(/Android/i)}),Rw=Ji(function(){return Ar(/Firefox/i)});function hl(n,a,l=!0){var o,u;let{metaKey:f,ctrlKey:d,altKey:m,shiftKey:p}=a;Rw()&&(!((u=window.event)===null||u===void 0||(o=u.type)===null||o===void 0)&&o.startsWith("key"))&&n.target==="_blank"&&(cr()?f=!0:d=!0);let g=Dw()&&cr()&&!Mw()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:f,ctrlKey:d,altKey:m,shiftKey:p}):new MouseEvent("click",{metaKey:f,ctrlKey:d,altKey:m,shiftKey:p,detail:1,bubbles:!0,cancelable:!0});hl.isOpening=l,jw(n),n.dispatchEvent(g),hl.isOpening=!1}hl.isOpening=!1;function sy(){let n=w.useRef(new Map),a=w.useCallback((u,f,d,m)=>{let p=m!=null&&m.once?(...g)=>{n.current.delete(d),d(...g)}:d;n.current.set(d,{type:f,eventTarget:u,fn:p,options:m}),u.addEventListener(f,p,m)},[]),l=w.useCallback((u,f,d,m)=>{var p;let g=((p=n.current.get(d))===null||p===void 0?void 0:p.fn)||d;u.removeEventListener(f,g,m),n.current.delete(d)},[]),o=w.useCallback(()=>{n.current.forEach((u,f)=>{l(u.eventTarget,u.type,f,u.options)})},[l]);return w.useEffect(()=>o,[o]),{addGlobalListener:a,removeGlobalListener:l,removeAllGlobalListeners:o}}function kw(n){return n.pointerType===""&&n.isTrusted?!0:zw()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}var Lw=I0();function ly(n){let a=n;return a.nativeEvent=n,a.isDefaultPrevented=()=>a.defaultPrevented,a.isPropagationStopped=()=>a.cancelBubble,a.persist=()=>{},a}function Vw(n,a){Object.defineProperty(n,"target",{value:a}),Object.defineProperty(n,"currentTarget",{value:a})}function oy(n){let a=w.useRef({isFocused:!1,observer:null});return Sw(()=>{const l=a.current;return()=>{l.observer&&(l.observer.disconnect(),l.observer=null)}},[]),w.useCallback(l=>{let o=pt(l);if(o instanceof HTMLButtonElement||o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement){a.current.isFocused=!0;let u=o,f=d=>{if(a.current.isFocused=!1,u.disabled){let m=ly(d);n==null||n(m)}a.current.observer&&(a.current.observer.disconnect(),a.current.observer=null)};u.addEventListener("focusout",f,{once:!0}),a.current.observer=new MutationObserver(()=>{if(a.current.isFocused&&u.disabled){var d;(d=a.current.observer)===null||d===void 0||d.disconnect();let m=u===Fi()?null:Fi();u.dispatchEvent(new FocusEvent("blur",{relatedTarget:m})),u.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:m}))}}),a.current.observer.observe(u,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let _w=!1,yl=null;const Uf=new Set;let sl=new Map,Wa=!1,Bf=!1;const Uw={Tab:!0,Escape:!0};function wd(n,a){for(let l of Uf)l(n,a)}function Bw(n){return!(n.metaKey||!cr()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function fr(n){Wa=!0,!hl.isOpening&&Bw(n)&&(yl="keyboard",wd("keyboard",n))}function Ki(n){yl="pointer","pointerType"in n&&n.pointerType,(n.type==="mousedown"||n.type==="pointerdown")&&(Wa=!0,wd("pointer",n))}function ry(n){!hl.isOpening&&kw(n)&&(Wa=!0,yl="virtual")}function uy(n){pt(n)===window||pt(n)===document||_w||!n.isTrusted||(!Wa&&!Bf&&(yl="virtual",wd("virtual",n)),Wa=!1,Bf=!1)}function cy(){Wa=!1,Bf=!0}function Hf(n){if(typeof window>"u"||typeof document>"u"||sl.get(Xa(n)))return;const a=Xa(n),l=ba(n);let o=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){Wa=!0,o.apply(this,arguments)},l.addEventListener("keydown",fr,!0),l.addEventListener("keyup",fr,!0),l.addEventListener("click",ry,!0),a.addEventListener("focus",uy,!0),a.addEventListener("blur",cy,!1),typeof PointerEvent<"u"&&(l.addEventListener("pointerdown",Ki,!0),l.addEventListener("pointermove",Ki,!0),l.addEventListener("pointerup",Ki,!0)),a.addEventListener("beforeunload",()=>{fy(n)},{once:!0}),sl.set(a,{focus:o})}const fy=(n,a)=>{const l=Xa(n),o=ba(n);a&&o.removeEventListener("DOMContentLoaded",a),sl.has(l)&&(l.HTMLElement.prototype.focus=sl.get(l).focus,o.removeEventListener("keydown",fr,!0),o.removeEventListener("keyup",fr,!0),o.removeEventListener("click",ry,!0),l.removeEventListener("focus",uy,!0),l.removeEventListener("blur",cy,!1),typeof PointerEvent<"u"&&(o.removeEventListener("pointerdown",Ki,!0),o.removeEventListener("pointermove",Ki,!0),o.removeEventListener("pointerup",Ki,!0)),sl.delete(l))};function Hw(n){const a=ba(n);let l;return a.readyState!=="loading"?Hf(n):(l=()=>{Hf(n)},a.addEventListener("DOMContentLoaded",l)),()=>fy(n,l)}typeof document<"u"&&Hw();function $f(){return yl!=="pointer"}const $w=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function qw(n,a,l){let o=ba(l?pt(l):void 0),u=l?pt(l):void 0;const f=typeof window<"u"?Xa(u).HTMLInputElement:HTMLInputElement,d=typeof window<"u"?Xa(u).HTMLTextAreaElement:HTMLTextAreaElement,m=typeof window<"u"?Xa(u).HTMLElement:HTMLElement,p=typeof window<"u"?Xa(u).KeyboardEvent:KeyboardEvent;let g=Fi(o);return n=n||g instanceof f&&!$w.has(g.type)||g instanceof d||g instanceof m&&g.isContentEditable,!(n&&a==="keyboard"&&l instanceof p&&!Uw[l.key])}function Yw(n,a,l){Hf(),w.useEffect(()=>{if((l==null?void 0:l.enabled)===!1)return;let o=(u,f)=>{qw(!!(l!=null&&l.isTextInput),u,f)&&n($f())};return Uf.add(o),()=>{Uf.delete(o)}},a)}function Gw(n){let{isDisabled:a,onFocus:l,onBlur:o,onFocusChange:u}=n;const f=w.useCallback(p=>{if(pt(p)===p.currentTarget)return o&&o(p),u&&u(!1),!0},[o,u]),d=oy(f),m=w.useCallback(p=>{let g=pt(p);const y=ba(g),x=y?Fi(y):Fi();g===p.currentTarget&&g===x&&(l&&l(p),u&&u(!0),d(p))},[u,l,d]);return{focusProps:{onFocus:!a&&(l||u||o)?m:void 0,onBlur:!a&&(o||u)?f:void 0}}}function Xw(n){let{isDisabled:a,onBlurWithin:l,onFocusWithin:o,onFocusWithinChange:u}=n,f=w.useRef({isFocusWithin:!1}),{addGlobalListener:d,removeAllGlobalListeners:m}=sy(),p=w.useCallback(x=>{Ka(x.currentTarget,pt(x))&&f.current.isFocusWithin&&!Ka(x.currentTarget,x.relatedTarget)&&(f.current.isFocusWithin=!1,m(),l&&l(x),u&&u(!1))},[l,u,f,m]),g=oy(p),y=w.useCallback(x=>{if(!Ka(x.currentTarget,pt(x)))return;let S=pt(x);const T=ba(S),E=Fi(T);if(!f.current.isFocusWithin&&E===S){o&&o(x),u&&u(!0),f.current.isFocusWithin=!0,g(x);let j=x.currentTarget;d(T,"focus",D=>{let z=pt(D);if(f.current.isFocusWithin&&!Ka(j,z)){let O=new T.defaultView.FocusEvent("blur",{relatedTarget:z});Vw(O,j);let V=ly(O);p(V)}},{capture:!0})}},[o,u,g,d,p]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:p}}}let qf=!1,Fo=0;function Kw(){qf=!0,setTimeout(()=>{qf=!1},50)}function gv(n){n.pointerType==="touch"&&Kw()}function Fw(){if(!(typeof document>"u"))return Fo===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",gv),Fo++,()=>{Fo--,!(Fo>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",gv)}}function dy(n){let{onHoverStart:a,onHoverChange:l,onHoverEnd:o,isDisabled:u}=n,[f,d]=w.useState(!1),m=w.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;w.useEffect(Fw,[]);let{addGlobalListener:p,removeAllGlobalListeners:g}=sy(),{hoverProps:y,triggerHoverEnd:x}=w.useMemo(()=>{let S=(j,D)=>{if(m.pointerType=D,u||D==="touch"||m.isHovered||!Ka(j.currentTarget,pt(j)))return;m.isHovered=!0;let z=j.currentTarget;m.target=z,p(ba(pt(j)),"pointerover",O=>{m.isHovered&&m.target&&!Ka(m.target,pt(O))&&T(O,O.pointerType)},{capture:!0}),a&&a({type:"hoverstart",target:z,pointerType:D}),l&&l(!0),d(!0)},T=(j,D)=>{let z=m.target;m.pointerType="",m.target=null,!(D==="touch"||!m.isHovered||!z)&&(m.isHovered=!1,g(),o&&o({type:"hoverend",target:z,pointerType:D}),l&&l(!1),d(!1))},E={};return typeof PointerEvent<"u"&&(E.onPointerEnter=j=>{qf&&j.pointerType==="mouse"||S(j,j.pointerType)},E.onPointerLeave=j=>{!u&&Ka(j.currentTarget,pt(j))&&T(j,j.pointerType)}),{hoverProps:E,triggerHoverEnd:T}},[a,l,o,u,m,p,g]);return w.useEffect(()=>{u&&x({currentTarget:m.target},m.pointerType)},[u]),{hoverProps:y,isHovered:f}}function hy(n={}){let{autoFocus:a=!1,isTextInput:l,within:o}=n,u=w.useRef({isFocused:!1,isFocusVisible:a||$f()}),[f,d]=w.useState(!1),[m,p]=w.useState(()=>u.current.isFocused&&u.current.isFocusVisible),g=w.useCallback(()=>p(u.current.isFocused&&u.current.isFocusVisible),[]),y=w.useCallback(T=>{u.current.isFocused=T,u.current.isFocusVisible=$f(),d(T),g()},[g]);Yw(T=>{u.current.isFocusVisible=T,g()},[l,f],{enabled:f,isTextInput:l});let{focusProps:x}=Gw({isDisabled:o,onFocusChange:y}),{focusWithinProps:S}=Xw({isDisabled:!o,onFocusWithinChange:y});return{isFocused:f,isFocusVisible:m,focusProps:o?S:x}}var Zw=Object.defineProperty,Qw=(n,a,l)=>a in n?Zw(n,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[a]=l,ff=(n,a,l)=>(Qw(n,typeof a!="symbol"?a+"":a,l),l);let Pw=class{constructor(){ff(this,"current",this.detect()),ff(this,"handoffState","pending"),ff(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 Pw;function Wi(n){var a;return hn.isServer?null:n==null?document:(a=n==null?void 0:n.ownerDocument)!=null?a:document}function Yf(n){var a,l;return hn.isServer?null:n==null?document:(l=(a=n==null?void 0:n.getRootNode)==null?void 0:a.call(n))!=null?l:document}function my(n){var a,l;return(l=(a=Yf(n))==null?void 0:a.activeElement)!=null?l:null}function Jw(n){return my(n)===n}function Nr(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(a=>setTimeout(()=>{throw a}))}function Un(){let n=[],a={addEventListener(l,o,u,f){return l.addEventListener(o,u,f),a.add(()=>l.removeEventListener(o,u,f))},requestAnimationFrame(...l){let o=requestAnimationFrame(...l);return a.add(()=>cancelAnimationFrame(o))},nextFrame(...l){return a.requestAnimationFrame(()=>a.requestAnimationFrame(...l))},setTimeout(...l){let o=setTimeout(...l);return a.add(()=>clearTimeout(o))},microTask(...l){let o={current:!0};return Nr(()=>{o.current&&l[0]()}),a.add(()=>{o.current=!1})},style(l,o,u){let f=l.style.getPropertyValue(o);return Object.assign(l.style,{[o]:u}),this.add(()=>{Object.assign(l.style,{[o]:f})})},group(l){let o=Un();return l(o),this.add(()=>o.dispose())},add(l){return n.includes(l)||n.push(l),()=>{let o=n.indexOf(l);if(o>=0)for(let u of n.splice(o,1))u()}},dispose(){for(let l of n.splice(0))l()}};return a}function xl(){let[n]=w.useState(Un);return w.useEffect(()=>()=>n.dispose(),[n]),n}let At=(n,a)=>{hn.isServer?w.useEffect(n,a):w.useLayoutEffect(n,a)};function ei(n){let a=w.useRef(n);return At(()=>{a.current=n},[n]),a}let Me=function(n){let a=ei(n);return ce.useCallback((...l)=>a.current(...l),[a])};function Ww(n){let a=n.width/2,l=n.height/2;return{top:n.clientY-l,right:n.clientX+a,bottom:n.clientY+l,left:n.clientX-a}}function Iw(n,a){return!(!n||!a||n.right<a.left||n.left>a.right||n.bottom<a.top||n.top>a.bottom)}function py({disabled:n=!1}={}){let a=w.useRef(null),[l,o]=w.useState(!1),u=xl(),f=Me(()=>{a.current=null,o(!1),u.dispose()}),d=Me(m=>{if(u.dispose(),a.current===null){a.current=m.currentTarget,o(!0);{let p=Wi(m.currentTarget);u.addEventListener(p,"pointerup",f,!1),u.addEventListener(p,"pointermove",g=>{if(a.current){let y=Ww(g);o(Iw(y,a.current.getBoundingClientRect()))}},!1),u.addEventListener(p,"pointercancel",f,!1)}}});return{pressed:l,pressProps:n?{}:{onPointerDown:d,onPointerUp:f,onClick:f}}}function ti(n){return w.useMemo(()=>n,Object.values(n))}let eT=w.createContext(void 0);function gy(){return w.useContext(eT)}function Gf(...n){return Array.from(new Set(n.flatMap(a=>typeof a=="string"?a.split(" "):[]))).filter(Boolean).join(" ")}function _n(n,a,...l){if(n in a){let u=a[n];return typeof u=="function"?u(...l):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 dr=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(dr||{}),ha=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(ha||{});function Nt(){let n=nT();return w.useCallback(a=>tT({mergeRefs:n,...a}),[n])}function tT({ourProps:n,theirProps:a,slot:l,defaultTag:o,features:u,visible:f=!0,name:d,mergeRefs:m}){m=m??aT;let p=vy(a,n);if(f)return Zo(p,l,o,d,m);let g=u??0;if(g&2){let{static:y=!1,...x}=p;if(y)return Zo(x,l,o,d,m)}if(g&1){let{unmount:y=!0,...x}=p;return _n(y?0:1,{0(){return null},1(){return Zo({...x,hidden:!0,style:{display:"none"}},l,o,d,m)}})}return Zo(p,l,o,d,m)}function Zo(n,a={},l,o,u){let{as:f=l,children:d,refName:m="ref",...p}=df(n,["unmount","static"]),g=n.ref!==void 0?{[m]:n.ref}:{},y=typeof d=="function"?d(a):d;"className"in p&&p.className&&typeof p.className=="function"&&(p.className=p.className(a)),p["aria-labelledby"]&&p["aria-labelledby"]===p.id&&(p["aria-labelledby"]=void 0);let x={};if(a){let S=!1,T=[];for(let[E,j]of Object.entries(a))typeof j=="boolean"&&(S=!0),j===!0&&T.push(E.replace(/([A-Z])/g,D=>`-${D.toLowerCase()}`));if(S){x["data-headlessui-state"]=T.join(" ");for(let E of T)x[`data-${E}`]=""}}if(ll(f)&&(Object.keys(qa(p)).length>0||Object.keys(qa(x)).length>0))if(!w.isValidElement(y)||Array.isArray(y)&&y.length>1||sT(y)){if(Object.keys(qa(p)).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(p)).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,E=typeof T=="function"?(...z)=>Gf(T(...z),p.className):Gf(T,p.className),j=E?{className:E}:{},D=vy(y.props,qa(df(p,["ref"])));for(let z in x)z in D&&delete x[z];return w.cloneElement(y,Object.assign({},D,x,g,{ref:u(iT(y),g.ref)},j))}return w.createElement(f,Object.assign({},df(p,["ref"]),!ll(f)&&g,!ll(f)&&x),y)}function nT(){let n=w.useRef([]),a=w.useCallback(l=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(l):o.current=l)},[]);return(...l)=>{if(!l.every(o=>o==null))return n.current=l,a}}function aT(...n){return n.every(a=>a==null)?void 0:a=>{for(let l of n)l!=null&&(typeof l=="function"?l(a):l.current=a)}}function vy(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},l={};for(let o of n)for(let u in o)u.startsWith("on")&&typeof o[u]=="function"?(l[u]!=null||(l[u]=[]),l[u].push(o[u])):a[u]=o[u];if(a.disabled||a["aria-disabled"])for(let o in l)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(o)&&(l[o]=[u=>{var f;return(f=u==null?void 0:u.preventDefault)==null?void 0:f.call(u)}]);for(let o in l)Object.assign(a,{[o](u,...f){let d=l[o];for(let m of d){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;m(u,...f)}}});return a}function Td(...n){if(n.length===0)return{};if(n.length===1)return n[0];let a={},l={};for(let o of n)for(let u in o)u.startsWith("on")&&typeof o[u]=="function"?(l[u]!=null||(l[u]=[]),l[u].push(o[u])):a[u]=o[u];for(let o in l)Object.assign(a,{[o](...u){let f=l[o];for(let d of f)d==null||d(...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 l in a)a[l]===void 0&&delete a[l];return a}function df(n,a=[]){let l=Object.assign({},n);for(let o of a)o in l&&delete l[o];return l}function iT(n){return ce.version.split(".")[0]>="19"?n.props.ref:n.ref}function ll(n){return n===w.Fragment||n===Symbol.for("react.fragment")}function sT(n){return ll(n.type)}let lT="button";function oT(n,a){var l;let o=gy(),{disabled:u=o||!1,autoFocus:f=!1,...d}=n,{isFocusVisible:m,focusProps:p}=hy({autoFocus:f}),{isHovered:g,hoverProps:y}=dy({isDisabled:u}),{pressed:x,pressProps:S}=py({disabled:u}),T=Td({ref:a,type:(l=d.type)!=null?l:"button",disabled:u||void 0,autoFocus:f},p,y,S),E=ti({disabled:u,hover:g,focus:m,active:x,autofocus:f});return Nt()({ourProps:T,theirProps:d,slot:E,defaultTag:lT,name:"Button"})}let bl=dt(oT),rT="span";var hr=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(hr||{});function uT(n,a){var l;let{features:o=1,...u}=n,f={ref:a,"aria-hidden":(o&2)===2?!0:(l=u["aria-hidden"])!=null?l: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 Nt()({ourProps:f,theirProps:u,slot:{},defaultTag:rT,name:"Hidden"})}let Xf=dt(uT);function cT(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function ga(n){return cT(n)&&"tagName"in n}function Ia(n){return ga(n)&&"accessKey"in n}function ma(n){return ga(n)&&"tabIndex"in n}function fT(n){return ga(n)&&"style"in n}function dT(n){return Ia(n)&&n.nodeName==="IFRAME"}function hT(n){return Ia(n)&&n.nodeName==="INPUT"}let yy=Symbol();function mT(n,a=!0){return Object.assign(n,{[yy]:a})}function gn(...n){let a=w.useRef(n);w.useEffect(()=>{a.current=n},[n]);let l=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[yy]))?void 0:l}let Ed=w.createContext(null);Ed.displayName="DescriptionContext";function xy(){let n=w.useContext(Ed);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,xy),a}return n}function pT(){let[n,a]=w.useState([]);return[n.length>0?n.join(" "):void 0,w.useMemo(()=>function(l){let o=Me(f=>(a(d=>[...d,f]),()=>a(d=>{let m=d.slice(),p=m.indexOf(f);return p!==-1&&m.splice(p,1),m}))),u=w.useMemo(()=>({register:o,slot:l.slot,name:l.name,props:l.props,value:l.value}),[o,l.slot,l.name,l.props,l.value]);return ce.createElement(Ed.Provider,{value:u},l.children)},[a])]}let gT="p";function vT(n,a){let l=w.useId(),o=gy(),{id:u=`headlessui-description-${l}`,...f}=n,d=xy(),m=gn(a);At(()=>d.register(u),[u,d.register]);let p=ti({...d.slot,disabled:o||!1}),g={ref:m,...d.props,id:u};return Nt()({ourProps:g,theirProps:f,slot:p,defaultTag:gT,name:d.name||"Description"})}let yT=dt(vT),xT=Object.assign(yT,{});var by=(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))(by||{});let Sy=w.createContext(()=>{});function bT(){return w.useContext(Sy)}function ST({value:n,children:a}){return ce.createElement(Sy.Provider,{value:n},a)}function wT(n,a){let l=bT();return ce.createElement(bl,{ref:a,...Td({onClick:l},n)})}let wy=dt(wT),Ty=class extends Map{constructor(a){super(),this.factory=a}get(a){let l=super.get(a);return l===void 0&&(l=this.factory(a),this.set(a,l)),l}};var TT=Object.defineProperty,ET=(n,a,l)=>a in n?TT(n,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[a]=l,jT=(n,a,l)=>(ET(n,a+"",l),l),Ey=(n,a,l)=>{if(!a.has(n))throw TypeError("Cannot "+l)},Qt=(n,a,l)=>(Ey(n,a,"read from private field"),l?l.call(n):a.get(n)),hf=(n,a,l)=>{if(a.has(n))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(n):a.set(n,l)},vv=(n,a,l,o)=>(Ey(n,a,"write to private field"),a.set(n,l),l),cn,tl,nl;let AT=class{constructor(a){hf(this,cn,{}),hf(this,tl,new Ty(()=>new Set)),hf(this,nl,new Set),jT(this,"disposables",Un()),vv(this,cn,a),hn.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Qt(this,cn)}subscribe(a,l){if(hn.isServer)return()=>{};let o={selector:a,callback:l,current:a(Qt(this,cn))};return Qt(this,nl).add(o),this.disposables.add(()=>{Qt(this,nl).delete(o)})}on(a,l){return hn.isServer?()=>{}:(Qt(this,tl).get(a).add(l),this.disposables.add(()=>{Qt(this,tl).get(a).delete(l)}))}send(a){let l=this.reduce(Qt(this,cn),a);if(l!==Qt(this,cn)){vv(this,cn,l);for(let o of Qt(this,nl)){let u=o.selector(Qt(this,cn));jy(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 jy(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:mf(n[Symbol.iterator](),a[Symbol.iterator]()):n instanceof Map&&a instanceof Map||n instanceof Set&&a instanceof Set?n.size!==a.size?!1:mf(n.entries(),a.entries()):yv(n)&&yv(a)?mf(Object.entries(n)[Symbol.iterator](),Object.entries(a)[Symbol.iterator]()):!1}function mf(n,a){do{let l=n.next(),o=a.next();if(l.done&&o.done)return!0;if(l.done||o.done||!Object.is(l.value,o.value))return!1}while(!0)}function yv(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let a=Object.getPrototypeOf(n);return a===null||Object.getPrototypeOf(a)===null}var NT=Object.defineProperty,CT=(n,a,l)=>a in n?NT(n,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[a]=l,xv=(n,a,l)=>(CT(n,typeof a!="symbol"?a+"":a,l),l),MT=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(MT||{});let DT={0(n,a){let l=a.id,o=n.stack,u=n.stack.indexOf(l);if(u!==-1){let f=n.stack.slice();return f.splice(u,1),f.push(l),o=f,{...n,stack:o}}return{...n,stack:[...n.stack,l]}},1(n,a){let l=a.id,o=n.stack.indexOf(l);if(o===-1)return n;let u=n.stack.slice();return u.splice(o,1),{...n,stack:u}}},OT=class Ay extends AT{constructor(){super(...arguments),xv(this,"actions",{push:a=>this.send({type:0,id:a}),pop:a=>this.send({type:1,id:a})}),xv(this,"selectors",{isTop:(a,l)=>a.stack[a.stack.length-1]===l,inStack:(a,l)=>a.stack.includes(l)})}static new(){return new Ay({stack:[]})}reduce(a,l){return _n(l.type,DT,a,l)}};const Ny=new Ty(()=>OT.new());var pf={exports:{}},gf={};/**
|
|
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 bv;function zT(){if(bv)return gf;bv=1;var n=jr();function a(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var l=typeof Object.is=="function"?Object.is:a,o=n.useSyncExternalStore,u=n.useRef,f=n.useEffect,d=n.useMemo,m=n.useDebugValue;return gf.useSyncExternalStoreWithSelector=function(p,g,y,x,S){var T=u(null);if(T.current===null){var E={hasValue:!1,value:null};T.current=E}else E=T.current;T=d(function(){function D(U){if(!z){if(z=!0,O=U,U=x(U),S!==void 0&&E.hasValue){var P=E.value;if(S(P,U))return V=P}return V=U}if(P=V,l(O,U))return P;var F=x(U);return S!==void 0&&S(P,F)?(O=U,P):(O=U,V=F)}var z=!1,O,V,R=y===void 0?null:y;return[function(){return D(g())},R===null?void 0:function(){return D(R())}]},[g,y,x,S]);var j=o(p,T[0],T[1]);return f(function(){E.hasValue=!0,E.value=j},[j]),m(j),j},gf}var Sv;function RT(){return Sv||(Sv=1,pf.exports=zT()),pf.exports}var kT=RT();function Cy(n,a,l=jy){return kT.useSyncExternalStoreWithSelector(Me(o=>n.subscribe(LT,o)),Me(()=>n.state),Me(()=>n.state),Me(a),l)}function LT(n){return n}function Sl(n,a){let l=w.useId(),o=Ny.get(a),[u,f]=Cy(o,w.useCallback(d=>[o.selectors.isTop(d,l),o.selectors.inStack(d,l)],[o,l]));return At(()=>{if(n)return o.actions.push(l),()=>o.actions.pop(l)},[o,n,l]),n?f?u:!0:!1}let Kf=new Map,ol=new Map;function wv(n){var a;let l=(a=ol.get(n))!=null?a:0;return ol.set(n,l+1),l!==0?()=>Tv(n):(Kf.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>Tv(n))}function Tv(n){var a;let l=(a=ol.get(n))!=null?a:1;if(l===1?ol.delete(n):ol.set(n,l-1),l!==1)return;let o=Kf.get(n);o&&(o["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",o["aria-hidden"]),n.inert=o.inert,Kf.delete(n))}function VT(n,{allowed:a,disallowed:l}={}){let o=Sl(n,"inert-others");At(()=>{var u,f;if(!o)return;let d=Un();for(let p of(u=l==null?void 0:l())!=null?u:[])p&&d.add(wv(p));let m=(f=a==null?void 0:a())!=null?f:[];for(let p of m){if(!p)continue;let g=Wi(p);if(!g)continue;let y=p.parentElement;for(;y&&y!==g.body;){for(let x of y.children)m.some(S=>x.contains(S))||d.add(wv(x));y=y.parentElement}}return d.dispose},[o,a,l])}function _T(n,a,l){let o=ei(u=>{let f=u.getBoundingClientRect();f.x===0&&f.y===0&&f.width===0&&f.height===0&&l()});w.useEffect(()=>{if(!n)return;let u=a===null?null:Ia(a)?a:a.current;if(!u)return;let f=Un();if(typeof ResizeObserver<"u"){let d=new ResizeObserver(()=>o.current(u));d.observe(u),f.add(()=>d.disconnect())}if(typeof IntersectionObserver<"u"){let d=new IntersectionObserver(()=>o.current(u));d.observe(u),f.add(()=>d.disconnect())}return()=>f.dispose()},[a,o,n])}let mr=["[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(","),UT=["[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||{}),Ff=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Ff||{}),BT=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(BT||{});function HT(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(mr)).sort((a,l)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(l.tabIndex||Number.MAX_SAFE_INTEGER)))}function $T(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(UT)).sort((a,l)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(l.tabIndex||Number.MAX_SAFE_INTEGER)))}var My=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(My||{});function qT(n,a=0){var l;return n===((l=Wi(n))==null?void 0:l.body)?!1:_n(a,{0(){return n.matches(mr)},1(){let o=n;for(;o!==null;){if(o.matches(mr))return!0;o=o.parentElement}return!1}})}var YT=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(YT||{});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 GT=["textarea","input"].join(",");function XT(n){var a,l;return(l=(a=n==null?void 0:n.matches)==null?void 0:a.call(n,GT))!=null?l:!1}function KT(n,a=l=>l){return n.slice().sort((l,o)=>{let u=a(l),f=a(o);if(u===null||f===null)return 0;let d=u.compareDocumentPosition(f);return d&Node.DOCUMENT_POSITION_FOLLOWING?-1:d&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function rl(n,a,{sorted:l=!0,relativeTo:o=null,skipElements:u=[]}={}){let f=Array.isArray(n)?n.length>0?Yf(n[0]):document:Yf(n),d=Array.isArray(n)?l?KT(n):n:a&64?$T(n):HT(n);u.length>0&&d.length>1&&(d=d.filter(T=>!u.some(E=>E!=null&&"current"in E?(E==null?void 0:E.current)===T:E===T))),o=o??(f==null?void 0:f.activeElement);let m=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,d.indexOf(o))-1;if(a&4)return Math.max(0,d.indexOf(o))+1;if(a&8)return d.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=a&32?{preventScroll:!0}:{},y=0,x=d.length,S;do{if(y>=x||y+x<=0)return 0;let T=p+y;if(a&16)T=(T+x)%x;else{if(T<0)return 3;if(T>=x)return 1}S=d[T],S==null||S.focus(g),y+=m}while(S!==my(S));return a&6&&XT(S)&&S.select(),2}function Dy(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function FT(){return/Android/gi.test(window.navigator.userAgent)}function Ev(){return Dy()||FT()}function Qo(n,a,l,o){let u=ei(l);w.useEffect(()=>{if(!n)return;function f(d){u.current(d)}return document.addEventListener(a,f,o),()=>document.removeEventListener(a,f,o)},[n,a,o])}function Oy(n,a,l,o){let u=ei(l);w.useEffect(()=>{if(!n)return;function f(d){u.current(d)}return window.addEventListener(a,f,o),()=>window.removeEventListener(a,f,o)},[n,a,o])}const jv=30;function ZT(n,a,l){let o=ei(l),u=w.useCallback(function(m,p){if(m.defaultPrevented)return;let g=p(m);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)||m.composed&&m.composedPath().includes(x)))return;return!qT(g,My.Loose)&&g.tabIndex!==-1&&m.preventDefault(),o.current(m,g)},[o,a]),f=w.useRef(null);Qo(n,"pointerdown",m=>{var p,g;Ev()||(f.current=((g=(p=m.composedPath)==null?void 0:p.call(m))==null?void 0:g[0])||m.target)},!0),Qo(n,"pointerup",m=>{if(Ev()||!f.current)return;let p=f.current;return f.current=null,u(m,()=>p)},!0);let d=w.useRef({x:0,y:0});Qo(n,"touchstart",m=>{d.current.x=m.touches[0].clientX,d.current.y=m.touches[0].clientY},!0),Qo(n,"touchend",m=>{let p={x:m.changedTouches[0].clientX,y:m.changedTouches[0].clientY};if(!(Math.abs(p.x-d.current.x)>=jv||Math.abs(p.y-d.current.y)>=jv))return u(m,()=>ma(m.target)?m.target:null)},!0),Oy(n,"blur",m=>u(m,()=>dT(window.document.activeElement)?window.document.activeElement:null),!0)}function jd(...n){return w.useMemo(()=>Wi(...n),[...n])}function zy(n,a,l,o){let u=ei(l);w.useEffect(()=>{n=n??window;function f(d){u.current(d)}return n.addEventListener(a,f,o),()=>n.removeEventListener(a,f,o)},[n,a,o])}function QT(n){return w.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function PT(n,a){let l=n(),o=new Set;return{getSnapshot(){return l},subscribe(u){return o.add(u),()=>o.delete(u)},dispatch(u,...f){let d=a[u].call(l,...f);d&&(l=d,o.forEach(m=>m()))}}}function JT(){let n;return{before({doc:a}){var l;let o=a.documentElement,u=(l=a.defaultView)!=null?l:window;n=Math.max(0,u.innerWidth-o.clientWidth)},after({doc:a,d:l}){let o=a.documentElement,u=Math.max(0,o.clientWidth-o.offsetWidth),f=Math.max(0,n-u);l.style(o,"paddingRight",`${f}px`)}}}function WT(){return Dy()?{before({doc:n,d:a,meta:l}){function o(u){for(let f of l().containers)for(let d of f())if(d.contains(u))return!0;return!1}a.microTask(()=>{var u;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let m=Un();m.style(n.documentElement,"scrollBehavior","auto"),a.add(()=>a.microTask(()=>m.dispose()))}let f=(u=window.scrollY)!=null?u:window.pageYOffset,d=null;a.addEventListener(n,"click",m=>{if(ma(m.target))try{let p=m.target.closest("a");if(!p)return;let{hash:g}=new URL(p.href),y=n.querySelector(g);ma(y)&&!o(y)&&(d=y)}catch{}},!0),a.group(m=>{a.addEventListener(n,"touchstart",p=>{if(m.dispose(),ma(p.target)&&fT(p.target))if(o(p.target)){let g=p.target;for(;g.parentElement&&o(g.parentElement);)g=g.parentElement;m.style(g,"overscrollBehavior","contain")}else m.style(p.target,"touchAction","none")})}),a.addEventListener(n,"touchmove",m=>{if(ma(m.target)){if(hT(m.target))return;if(o(m.target)){let p=m.target;for(;p.parentElement&&p.dataset.headlessuiPortal!==""&&!(p.scrollHeight>p.clientHeight||p.scrollWidth>p.clientWidth);)p=p.parentElement;p.dataset.headlessuiPortal===""&&m.preventDefault()}else m.preventDefault()}},{passive:!1}),a.add(()=>{var m;let p=(m=window.scrollY)!=null?m:window.pageYOffset;f!==p&&window.scrollTo(0,f),d&&d.isConnected&&(d.scrollIntoView({block:"nearest"}),d=null)})})}}:{}}function IT(){return{before({doc:n,d:a}){a.style(n.documentElement,"overflow","hidden")}}}function Av(n){let a={};for(let l of n)Object.assign(a,l(a));return a}let Fa=PT(()=>new Map,{PUSH(n,a){var l;let o=(l=this.get(n))!=null?l:{doc:n,count:0,d:Un(),meta:new Set,computedMeta:{}};return o.count++,o.meta.add(a),o.computedMeta=Av(o.meta),this.set(n,o),this},POP(n,a){let l=this.get(n);return l&&(l.count--,l.meta.delete(a),l.computedMeta=Av(l.meta)),this},SCROLL_PREVENT(n){let a={doc:n.doc,d:n.d,meta(){return n.computedMeta}},l=[WT(),JT(),IT()];l.forEach(({before:o})=>o==null?void 0:o(a)),l.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[l]of n)a.set(l,l.documentElement.style.overflow);for(let l of n.values()){let o=a.get(l.doc)==="hidden",u=l.count!==0;(u&&!o||!u&&o)&&Fa.dispatch(l.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",l),l.count===0&&Fa.dispatch("TEARDOWN",l)}});function e2(n,a,l=()=>({containers:[]})){let o=QT(Fa),u=a?o.get(a):void 0,f=u?u.count>0:!1;return At(()=>{if(!(!a||!n))return Fa.dispatch("PUSH",a,l),()=>Fa.dispatch("POP",a,l)},[n,a]),f}function t2(n,a,l=()=>[document.body]){let o=Sl(n,"scroll-lock");e2(o,a,u=>{var f;return{containers:[...(f=u.containers)!=null?f:[],l]}})}function n2(n=0){let[a,l]=w.useState(n),o=w.useCallback(p=>l(p),[]),u=w.useCallback(p=>l(g=>g|p),[]),f=w.useCallback(p=>(a&p)===p,[a]),d=w.useCallback(p=>l(g=>g&~p),[]),m=w.useCallback(p=>l(g=>g^p),[]);return{flags:a,setFlag:o,addFlag:u,hasFlag:f,removeFlag:d,toggleFlag:m}}var a2={},Nv,Cv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Nv=process==null?void 0:a2)==null?void 0:Nv.NODE_ENV)==="test"&&typeof((Cv=Element==null?void 0:Element.prototype)==null?void 0:Cv.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 i2=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(i2||{});function s2(n){let a={};for(let l in n)n[l]===!0&&(a[`data-${l}`]="");return a}function l2(n,a,l,o){let[u,f]=w.useState(l),{hasFlag:d,addFlag:m,removeFlag:p}=n2(n&&u?3:0),g=w.useRef(!1),y=w.useRef(!1),x=xl();return At(()=>{var S;if(n){if(l&&f(!0),!a){l&&m(3);return}return(S=o==null?void 0:o.start)==null||S.call(o,l),o2(a,{inFlight:g,prepare(){y.current?y.current=!1:y.current=g.current,g.current=!0,!y.current&&(l?(m(3),p(4)):(m(4),p(2)))},run(){y.current?l?(p(3),m(4)):(p(4),m(3)):l?p(1):m(1)},done(){var T;y.current&&c2(a)||(g.current=!1,p(7),l||f(!1),(T=o==null?void 0:o.end)==null||T.call(o,l))}})}},[n,l,a,x]),n?[u,{closed:d(1),enter:d(2),leave:d(4),transition:d(2)||d(4)}]:[l,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function o2(n,{prepare:a,run:l,done:o,inFlight:u}){let f=Un();return u2(n,{prepare:a,inFlight:u}),f.nextFrame(()=>{l(),f.requestAnimationFrame(()=>{f.add(r2(n,o))})}),f.dispose}function r2(n,a){var l,o;let u=Un();if(!n)return u.dispose;let f=!1;u.add(()=>{f=!0});let d=(o=(l=n.getAnimations)==null?void 0:l.call(n).filter(m=>m instanceof CSSTransition))!=null?o:[];return d.length===0?(a(),u.dispose):(Promise.allSettled(d.map(m=>m.finished)).then(()=>{f||a()}),u.dispose)}function u2(n,{inFlight:a,prepare:l}){if(a!=null&&a.current){l();return}let o=n.style.transition;n.style.transition="none",l(),n.offsetHeight,n.style.transition=o}function c2(n){var a,l;return((l=(a=n.getAnimations)==null?void 0:a.call(n))!=null?l:[]).some(o=>o instanceof CSSTransition&&o.playState!=="finished")}function Ad(n,a){let l=w.useRef([]),o=Me(n);w.useEffect(()=>{let u=[...l.current];for(let[f,d]of a.entries())if(l.current[f]!==d){let m=o(a,u);return l.current=a,m}},[o,...a])}let Cr=w.createContext(null);Cr.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 Mr(){return w.useContext(Cr)}function f2({value:n,children:a}){return ce.createElement(Cr.Provider,{value:n},a)}function d2({children:n}){return ce.createElement(Cr.Provider,{value:null},n)}function h2(n){function a(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let da=[];h2(()=>{function n(a){if(!ma(a.target)||a.target===document.body||da[0]===a.target)return;let l=a.target;l=l.closest(mr),da.unshift(l??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 Ry(n){let a=Me(n),l=w.useRef(!1);w.useEffect(()=>(l.current=!1,()=>{l.current=!0,Nr(()=>{l.current&&a()})}),[a])}let ky=w.createContext(!1);function m2(){return w.useContext(ky)}function Mv(n){return ce.createElement(ky.Provider,{value:n.force},n.children)}function p2(n){let a=m2(),l=w.useContext(Vy),[o,u]=w.useState(()=>{var f;if(!a&&l!==null)return(f=l.current)!=null?f:null;if(hn.isServer)return null;let d=n==null?void 0:n.getElementById("headlessui-portal-root");if(d)return d;if(n===null)return null;let m=n.createElement("div");return m.setAttribute("id","headlessui-portal-root"),n.body.appendChild(m)});return w.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),w.useEffect(()=>{a||l!==null&&u(l.current)},[l,u,a]),o}let Ly=w.Fragment,g2=dt(function(n,a){let{ownerDocument:l=null,...o}=n,u=w.useRef(null),f=gn(mT(S=>{u.current=S}),a),d=jd(u.current),m=l??d,p=p2(m),g=w.useContext(Zf),y=xl(),x=Nt();return Ry(()=>{var S;p&&p.childNodes.length<=0&&((S=p.parentElement)==null||S.removeChild(p))}),p?Lw.createPortal(ce.createElement("div",{"data-headlessui-portal":"",ref:S=>{y.dispose(),g&&S&&y.add(g.register(S))}},x({ourProps:{ref:f},theirProps:o,slot:{},defaultTag:Ly,name:"Portal"})),p):null});function v2(n,a){let l=gn(a),{enabled:o=!0,ownerDocument:u,...f}=n,d=Nt();return o?ce.createElement(g2,{...f,ownerDocument:u,ref:l}):d({ourProps:{ref:l},theirProps:f,slot:{},defaultTag:Ly,name:"Portal"})}let y2=w.Fragment,Vy=w.createContext(null);function x2(n,a){let{target:l,...o}=n,u={ref:gn(a)},f=Nt();return ce.createElement(Vy.Provider,{value:l},f({ourProps:u,theirProps:o,defaultTag:y2,name:"Popover.Group"}))}let Zf=w.createContext(null);function b2(){let n=w.useContext(Zf),a=w.useRef([]),l=Me(f=>(a.current.push(f),n&&n.register(f),()=>o(f))),o=Me(f=>{let d=a.current.indexOf(f);d!==-1&&a.current.splice(d,1),n&&n.unregister(f)}),u=w.useMemo(()=>({register:l,unregister:o,portals:a}),[l,o,a]);return[a,w.useMemo(()=>function({children:f}){return ce.createElement(Zf.Provider,{value:u},f)},[u])]}let S2=dt(v2),_y=dt(x2),w2=Object.assign(S2,{Group:_y}),T2=w.Fragment;function E2(n,a){let{...l}=n,o=!1,{isFocusVisible:u,focusProps:f}=hy(),{isHovered:d,hoverProps:m}=dy({isDisabled:o}),{pressed:p,pressProps:g}=py({disabled:o}),y=Td({ref:a},f,m,g),x=ti({hover:d,focus:u,active:p});return Nt()({ourProps:y,theirProps:l,slot:x,defaultTag:T2,name:"DataInteractive"})}let j2=dt(E2);function A2(n,a=typeof document<"u"?document.defaultView:null,l){let o=Sl(n,"escape");zy(a,"keydown",u=>{o&&(u.defaultPrevented||u.key===by.Escape&&l(u))})}function N2(){var n;let[a]=w.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[l,o]=w.useState((n=a==null?void 0:a.matches)!=null?n:!1);return At(()=>{if(!a)return;function u(f){o(f.matches)}return a.addEventListener("change",u),()=>a.removeEventListener("change",u)},[a]),l}function C2({defaultContainers:n=[],portals:a,mainTreeNode:l}={}){let o=Me(()=>{var u,f;let d=Wi(l),m=[];for(let p of n)p!==null&&(ga(p)?m.push(p):"current"in p&&ga(p.current)&&m.push(p.current));if(a!=null&&a.current)for(let p of a.current)m.push(p);for(let p of(u=d==null?void 0:d.querySelectorAll("html > *, body > *"))!=null?u:[])p!==document.body&&p!==document.head&&ga(p)&&p.id!=="headlessui-portal-root"&&(l&&(p.contains(l)||p.contains((f=l==null?void 0:l.getRootNode())==null?void 0:f.host))||m.some(g=>p.contains(g))||m.push(p));return m});return{resolveContainers:o,contains:Me(u=>o().some(f=>f.contains(u)))}}let Uy=w.createContext(null);function Dv({children:n,node:a}){let[l,o]=w.useState(null),u=By(a??l);return ce.createElement(Uy.Provider,{value:u},n,u===null&&ce.createElement(Xf,{features:hr.Hidden,ref:f=>{var d,m;if(f){for(let p of(m=(d=Wi(f))==null?void 0:d.querySelectorAll("html > *, body > *"))!=null?m:[])if(p!==document.body&&p!==document.head&&ga(p)&&p!=null&&p.contains(f)){o(p);break}}}}))}function By(n=null){var a;return(a=w.useContext(Uy))!=null?a:n}function M2(){let n=typeof document>"u";return"useSyncExternalStore"in uv?(a=>a.useSyncExternalStore)(uv)(()=>()=>{},()=>!1,()=>!n):!1}function Dr(){let n=M2(),[a,l]=w.useState(hn.isHandoffComplete);return a&&hn.isHandoffComplete===!1&&l(!1),w.useEffect(()=>{a!==!0&&l(!0)},[a]),w.useEffect(()=>hn.handoff(),[]),n?!1:a}function Nd(){let n=w.useRef(!1);return At(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var al=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(al||{});function D2(){let n=w.useRef(0);return Oy(!0,"keydown",a=>{a.key==="Tab"&&(n.current=a.shiftKey?1:0)},!0),n}function Hy(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let a=new Set;for(let l of n.current)ga(l.current)&&a.add(l.current);return a}let O2="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 z2(n,a){let l=w.useRef(null),o=gn(l,a),{initialFocus:u,initialFocusFallback:f,containers:d,features:m=15,...p}=n;Dr()||(m=0);let g=jd(l.current);V2(m,{ownerDocument:g});let y=_2(m,{ownerDocument:g,container:l,initialFocus:u,initialFocusFallback:f});U2(m,{ownerDocument:g,container:l,containers:d,previousActiveElement:y});let x=D2(),S=Me(O=>{if(!Ia(l.current))return;let V=l.current;(R=>R())(()=>{_n(x.current,{[al.Forwards]:()=>{rl(V,Ln.First,{skipElements:[O.relatedTarget,f]})},[al.Backwards]:()=>{rl(V,Ln.Last,{skipElements:[O.relatedTarget,f]})}})})}),T=Sl(!!(m&2),"focus-trap#tab-lock"),E=xl(),j=w.useRef(!1),D={ref:o,onKeyDown(O){O.key=="Tab"&&(j.current=!0,E.requestAnimationFrame(()=>{j.current=!1}))},onBlur(O){if(!(m&4))return;let V=Hy(d);Ia(l.current)&&V.add(l.current);let R=O.relatedTarget;ma(R)&&R.dataset.headlessuiFocusGuard!=="true"&&($y(V,R)||(j.current?rl(l.current,_n(x.current,{[al.Forwards]:()=>Ln.Next,[al.Backwards]:()=>Ln.Previous})|Ln.WrapAround,{relativeTo:O.target}):ma(O.target)&&Vn(O.target)))}},z=Nt();return ce.createElement(ce.Fragment,null,T&&ce.createElement(Xf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:hr.Focusable}),z({ourProps:D,theirProps:p,defaultTag:O2,name:"FocusTrap"}),T&&ce.createElement(Xf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:S,features:hr.Focusable}))}let R2=dt(z2),k2=Object.assign(R2,{features:Ga});function L2(n=!0){let a=w.useRef(da.slice());return Ad(([l],[o])=>{o===!0&&l===!1&&Nr(()=>{a.current.splice(0)}),o===!1&&l===!0&&(a.current=da.slice())},[n,da,a]),Me(()=>{var l;return(l=a.current.find(o=>o!=null&&o.isConnected))!=null?l:null})}function V2(n,{ownerDocument:a}){let l=!!(n&8),o=L2(l);Ad(()=>{l||Jw(a==null?void 0:a.body)&&Vn(o())},[l]),Ry(()=>{l&&Vn(o())})}function _2(n,{ownerDocument:a,container:l,initialFocus:o,initialFocusFallback:u}){let f=w.useRef(null),d=Sl(!!(n&1),"focus-trap#initial-focus"),m=Nd();return Ad(()=>{if(n===0)return;if(!d){u!=null&&u.current&&Vn(u.current);return}let p=l.current;p&&Nr(()=>{if(!m.current)return;let g=a==null?void 0:a.activeElement;if(o!=null&&o.current){if((o==null?void 0:o.current)===g){f.current=g;return}}else if(p.contains(g)){f.current=g;return}if(o!=null&&o.current)Vn(o.current);else{if(n&16){if(rl(p,Ln.First|Ln.AutoFocus)!==Ff.Error)return}else if(rl(p,Ln.First)!==Ff.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 />")}f.current=a==null?void 0:a.activeElement})},[u,d,n]),f}function U2(n,{ownerDocument:a,container:l,containers:o,previousActiveElement:u}){let f=Nd(),d=!!(n&4);zy(a==null?void 0:a.defaultView,"focus",m=>{if(!d||!f.current)return;let p=Hy(o);Ia(l.current)&&p.add(l.current);let g=u.current;if(!g)return;let y=m.target;Ia(y)?$y(p,y)?(u.current=y,Vn(y)):(m.preventDefault(),m.stopPropagation(),Vn(g)):Vn(u.current)},!0)}function $y(n,a){for(let l of n)if(l.contains(a))return!0;return!1}function qy(n){var a;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||!ll((a=n.as)!=null?a:Gy)||ce.Children.count(n.children)===1}let Or=w.createContext(null);Or.displayName="TransitionContext";var B2=(n=>(n.Visible="visible",n.Hidden="hidden",n))(B2||{});function H2(){let n=w.useContext(Or);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function $2(){let n=w.useContext(zr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let zr=w.createContext(null);zr.displayName="NestingContext";function Rr(n){return"children"in n?Rr(n.children):n.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function Yy(n,a){let l=ei(n),o=w.useRef([]),u=Nd(),f=xl(),d=Me((T,E=ha.Hidden)=>{let j=o.current.findIndex(({el:D})=>D===T);j!==-1&&(_n(E,{[ha.Unmount](){o.current.splice(j,1)},[ha.Hidden](){o.current[j].state="hidden"}}),f.microTask(()=>{var D;!Rr(o)&&u.current&&((D=l.current)==null||D.call(l))}))}),m=Me(T=>{let E=o.current.find(({el:j})=>j===T);return E?E.state!=="visible"&&(E.state="visible"):o.current.push({el:T,state:"visible"}),()=>d(T,ha.Unmount)}),p=w.useRef([]),g=w.useRef(Promise.resolve()),y=w.useRef({enter:[],leave:[]}),x=Me((T,E,j)=>{p.current.splice(0),a&&(a.chains.current[E]=a.chains.current[E].filter(([D])=>D!==T)),a==null||a.chains.current[E].push([T,new Promise(D=>{p.current.push(D)})]),a==null||a.chains.current[E].push([T,new Promise(D=>{Promise.all(y.current[E].map(([z,O])=>O)).then(()=>D())})]),E==="enter"?g.current=g.current.then(()=>a==null?void 0:a.wait.current).then(()=>j(E)):j(E)}),S=Me((T,E,j)=>{Promise.all(y.current[E].splice(0).map(([D,z])=>z)).then(()=>{var D;(D=p.current.shift())==null||D()}).then(()=>j(E))});return w.useMemo(()=>({children:o,register:m,unregister:d,onStart:x,onStop:S,wait:g,chains:y}),[m,d,o,x,S,y,g])}let Gy=w.Fragment,Xy=dr.RenderStrategy;function q2(n,a){var l,o;let{transition:u=!0,beforeEnter:f,afterEnter:d,beforeLeave:m,afterLeave:p,enter:g,enterFrom:y,enterTo:x,entered:S,leave:T,leaveFrom:E,leaveTo:j,...D}=n,[z,O]=w.useState(null),V=w.useRef(null),R=qy(n),U=gn(...R?[V,a,O]:a===null?[]:[a]),P=(l=D.unmount)==null||l?ha.Unmount:ha.Hidden,{show:F,appear:W,initial:oe}=H2(),[B,Z]=w.useState(F?"visible":"hidden"),ie=$2(),{register:le,unregister:Se}=ie;At(()=>le(V),[le,V]),At(()=>{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=Dr();At(()=>{if(R&&De&&B==="visible"&&V.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[V,B,De,R]);let $=oe&&!W,Q=W&&F&&oe,J=w.useRef(!1),re=Yy(()=>{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"?f==null||f():Le==="leave"&&(m==null||m())})}),N=Me(Te=>{let Ze=Te?"enter":"leave";J.current=!1,re.onStop(V,Ze,Le=>{Le==="enter"?d==null||d():Le==="leave"&&(p==null||p())}),Ze==="leave"&&!Rr(re)&&(Z("hidden"),Se(V))});w.useEffect(()=>{R&&u||(me(F),N(F))},[F,R,u]);let G=!(!u||!R||!De||$),[,K]=l2(G,z,F,{start:me,end:N}),I=qa({ref:U,className:((o=Gf(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&&E,K.leave&&K.closed&&j,!K.transition&&F&&S))==null?void 0:o.trim())||void 0,...s2(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=Nt();return ce.createElement(zr.Provider,{value:re},ce.createElement(f2,{value:ue},pe({ourProps:I,theirProps:D,defaultTag:Gy,features:Xy,visible:B==="visible",name:"Transition.Child"})))}function Y2(n,a){let{show:l,appear:o=!1,unmount:u=!0,...f}=n,d=w.useRef(null),m=qy(n),p=gn(...m?[d,a]:a===null?[]:[a]);Dr();let g=Mr();if(l===void 0&&g!==null&&(l=(g&an.Open)===an.Open),l===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[y,x]=w.useState(l?"visible":"hidden"),S=Yy(()=>{l||x("hidden")}),[T,E]=w.useState(!0),j=w.useRef([l]);At(()=>{T!==!1&&j.current[j.current.length-1]!==l&&(j.current.push(l),E(!1))},[j,l]);let D=w.useMemo(()=>({show:l,appear:o,initial:T}),[l,o,T]);At(()=>{l?x("visible"):!Rr(S)&&d.current!==null&&x("hidden")},[l,S]);let z={unmount:u},O=Me(()=>{var U;T&&E(!1),(U=n.beforeEnter)==null||U.call(n)}),V=Me(()=>{var U;T&&E(!1),(U=n.beforeLeave)==null||U.call(n)}),R=Nt();return ce.createElement(zr.Provider,{value:S},ce.createElement(Or.Provider,{value:D},R({ourProps:{...z,as:w.Fragment,children:ce.createElement(Ky,{ref:p,...z,...f,beforeEnter:O,beforeLeave:V})},theirProps:{},defaultTag:w.Fragment,features:Xy,visible:y==="visible",name:"Transition"})))}function G2(n,a){let l=w.useContext(Or)!==null,o=Mr()!==null;return ce.createElement(ce.Fragment,null,!l&&o?ce.createElement(Qf,{ref:a,...n}):ce.createElement(Ky,{ref:a,...n}))}let Qf=dt(Y2),Ky=dt(q2),Cd=dt(G2),X2=Object.assign(Qf,{Child:Cd,Root:Qf});var K2=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(K2||{}),F2=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(F2||{});let Z2={0(n,a){return n.titleId===a.id?n:{...n,titleId:a.id}}},Md=w.createContext(null);Md.displayName="DialogContext";function kr(n){let a=w.useContext(Md);if(a===null){let l=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,kr),l}return a}function Q2(n,a){return _n(a.type,Z2,n,a)}let Ov=dt(function(n,a){let l=w.useId(),{id:o=`headlessui-dialog-${l}`,open:u,onClose:f,initialFocus:d,role:m="dialog",autoFocus:p=!0,__demoMode:g=!1,unmount:y=!1,...x}=n,S=w.useRef(!1);m=(function(){return m==="dialog"||m==="alertdialog"?m:(S.current||(S.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let T=Mr();u===void 0&&T!==null&&(u=(T&an.Open)===an.Open);let E=w.useRef(null),j=gn(E,a),D=jd(E.current),z=u?0:1,[O,V]=w.useReducer(Q2,{titleId:null,descriptionId:null,panelRef:w.createRef()}),R=Me(()=>f(!1)),U=Me(K=>V({type:0,id:K})),P=Dr()?z===0:!1,[F,W]=b2(),oe={get current(){var K;return(K=O.panelRef.current)!=null?K:E.current}},B=By(),{resolveContainers:Z}=C2({mainTreeNode:B,portals:F,defaultContainers:[oe]}),ie=T!==null?(T&an.Closing)===an.Closing:!1;VT(g||ie?!1:P,{allowed:Me(()=>{var K,I;return[(I=(K=E.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=Ny.get(null);At(()=>{if(P)return le.actions.push(o),()=>le.actions.pop(o)},[le,o,P]);let Se=Cy(le,w.useCallback(K=>le.selectors.isTop(K,o),[le,o]));ZT(Se,Z,K=>{K.preventDefault(),R()}),A2(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(),R()}),t2(g||ie?!1:P,D,Z),_T(P,E,R);let[De,$]=pT(),Q=w.useMemo(()=>[{dialogState:z,close:R,setTitleId:U,unmount:y},O],[z,R,U,y,O]),J=ti({open:z===0}),re={ref:j,id:o,role:m,tabIndex:-1,"aria-modal":g?void 0:z===0?!0:void 0,"aria-labelledby":O.titleId,"aria-describedby":De,unmount:y},me=!N2(),N=Ga.None;P&&!g&&(N|=Ga.RestoreFocus,N|=Ga.TabLock,p&&(N|=Ga.AutoFocus),me&&(N|=Ga.InitialFocus));let G=Nt();return ce.createElement(d2,null,ce.createElement(Mv,{force:!0},ce.createElement(w2,null,ce.createElement(Md.Provider,{value:Q},ce.createElement(_y,{target:E},ce.createElement(Mv,{force:!1},ce.createElement($,{slot:J},ce.createElement(W,null,ce.createElement(k2,{initialFocus:d,initialFocusFallback:E,containers:Z,features:N},ce.createElement(ST,{value:R},G({ourProps:re,theirProps:x,slot:J,defaultTag:P2,features:J2,visible:z===0,name:"Dialog"})))))))))))}),P2="div",J2=dr.RenderStrategy|dr.Static;function W2(n,a){let{transition:l=!1,open:o,...u}=n,f=Mr(),d=n.hasOwnProperty("open")||f!==null,m=n.hasOwnProperty("onClose");if(!d&&!m)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!d)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!m)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!f&&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||l)&&!u.static?ce.createElement(Dv,null,ce.createElement(X2,{show:o,transition:l,unmount:u.unmount},ce.createElement(Ov,{ref:a,...u}))):ce.createElement(Dv,null,ce.createElement(Ov,{ref:a,open:o,...u}))}let I2="div";function eE(n,a){let l=w.useId(),{id:o=`headlessui-dialog-panel-${l}`,transition:u=!1,...f}=n,[{dialogState:d,unmount:m},p]=kr("Dialog.Panel"),g=gn(a,p.panelRef),y=ti({open:d===0}),x=Me(D=>{D.stopPropagation()}),S={ref:g,id:o,onClick:x},T=u?Cd:w.Fragment,E=u?{unmount:m}:{},j=Nt();return ce.createElement(T,{...E},j({ourProps:S,theirProps:f,slot:y,defaultTag:I2,name:"Dialog.Panel"}))}let tE="div";function nE(n,a){let{transition:l=!1,...o}=n,[{dialogState:u,unmount:f}]=kr("Dialog.Backdrop"),d=ti({open:u===0}),m={ref:a,"aria-hidden":!0},p=l?Cd:w.Fragment,g=l?{unmount:f}:{},y=Nt();return ce.createElement(p,{...g},y({ourProps:m,theirProps:o,slot:d,defaultTag:tE,name:"Dialog.Backdrop"}))}let aE="h2";function iE(n,a){let l=w.useId(),{id:o=`headlessui-dialog-title-${l}`,...u}=n,[{dialogState:f,setTitleId:d}]=kr("Dialog.Title"),m=gn(a);w.useEffect(()=>(d(o),()=>d(null)),[o,d]);let p=ti({open:f===0}),g={ref:m,id:o};return Nt()({ourProps:g,theirProps:u,slot:p,defaultTag:aE,name:"Dialog.Title"})}let sE=dt(W2),Fy=dt(eE),lE=dt(nE),oE=dt(iE),rE=Object.assign(sE,{Panel:Fy,Title:oE,Description:xT});const pr=w.createContext({});function uE(n){const a=w.useRef(null);return a.current===null&&(a.current=n()),a.current}const cE=typeof window<"u",Zy=cE?w.useLayoutEffect:w.useEffect,Dd=w.createContext(null);function Od(n,a){n.indexOf(a)===-1&&n.push(a)}function gr(n,a){const l=n.indexOf(a);l>-1&&n.splice(l,1)}const pn=(n,a,l)=>l>a?a:l<n?n:l;let zd=()=>{};const va={},Qy=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function Py(n){return typeof n=="object"&&n!==null}const Jy=n=>/^0[^.\s]+$/u.test(n);function Wy(n){let a;return()=>(a===void 0&&(a=n()),a)}const Jt=n=>n,fE=(n,a)=>l=>a(n(l)),wl=(...n)=>n.reduce(fE),ml=(n,a,l)=>{const o=a-n;return o===0?1:(l-n)/o};class Rd{constructor(){this.subscriptions=[]}add(a){return Od(this.subscriptions,a),()=>gr(this.subscriptions,a)}notify(a,l,o){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](a,l,o);else for(let f=0;f<u;f++){const d=this.subscriptions[f];d&&d(a,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ut=n=>n*1e3,Pt=n=>n/1e3;function Iy(n,a){return a?n*(1e3/a):0}const ex=(n,a,l)=>(((1-3*l+3*a)*n+(3*l-6*a))*n+3*a)*n,dE=1e-7,hE=12;function mE(n,a,l,o,u){let f,d,m=0;do d=a+(l-a)/2,f=ex(d,o,u)-n,f>0?l=d:a=d;while(Math.abs(f)>dE&&++m<hE);return d}function Tl(n,a,l,o){if(n===a&&l===o)return Jt;const u=f=>mE(f,0,1,n,l);return f=>f===0||f===1?f:ex(u(f),a,o)}const tx=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,nx=n=>a=>1-n(1-a),ax=Tl(.33,1.53,.69,.99),kd=nx(ax),ix=tx(kd),sx=n=>n>=1?1:(n*=2)<1?.5*kd(n):.5*(2-Math.pow(2,-10*(n-1))),Ld=n=>1-Math.sin(Math.acos(n)),lx=nx(Ld),ox=tx(Ld),pE=Tl(.42,0,1,1),gE=Tl(0,0,.58,1),rx=Tl(.42,0,.58,1),vE=n=>Array.isArray(n)&&typeof n[0]!="number",ux=n=>Array.isArray(n)&&typeof n[0]=="number",yE={linear:Jt,easeIn:pE,easeInOut:rx,easeOut:gE,circIn:Ld,circInOut:ox,circOut:lx,backIn:kd,backInOut:ix,backOut:ax,anticipate:sx},xE=n=>typeof n=="string",zv=n=>{if(ux(n)){zd(n.length===4);const[a,l,o,u]=n;return Tl(a,l,o,u)}else if(xE(n))return yE[n];return n},Po=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function bE(n,a){let l=new Set,o=new Set,u=!1,f=!1;const d=new WeakSet;let m={delta:0,timestamp:0,isProcessing:!1};function p(y){d.has(y)&&(g.schedule(y),n()),y(m)}const g={schedule:(y,x=!1,S=!1)=>{const E=S&&u?l:o;return x&&d.add(y),E.add(y),y},cancel:y=>{o.delete(y),d.delete(y)},process:y=>{if(m=y,u){f=!0;return}u=!0;const x=l;l=o,o=x,l.forEach(p),l.clear(),u=!1,f&&(f=!1,g.process(y))}};return g}const SE=40;function cx(n,a){let l=!1,o=!0;const u={delta:0,timestamp:0,isProcessing:!1},f=()=>l=!0,d=Po.reduce((V,R)=>(V[R]=bE(f),V),{}),{setup:m,read:p,resolveKeyframes:g,preUpdate:y,update:x,preRender:S,render:T,postRender:E}=d,j=()=>{const V=va.useManualTiming,R=V?u.timestamp:performance.now();l=!1,V||(u.delta=o?1e3/60:Math.max(Math.min(R-u.timestamp,SE),1)),u.timestamp=R,u.isProcessing=!0,m.process(u),p.process(u),g.process(u),y.process(u),x.process(u),S.process(u),T.process(u),E.process(u),u.isProcessing=!1,l&&a&&(o=!1,n(j))},D=()=>{l=!0,o=!0,u.isProcessing||n(j)};return{schedule:Po.reduce((V,R)=>{const U=d[R];return V[R]=(P,F=!1,W=!1)=>(l||D(),U.schedule(P,F,W)),V},{}),cancel:V=>{for(let R=0;R<Po.length;R++)d[Po[R]].cancel(V)},state:u,steps:d}}const{schedule:ke,cancel:ya,state:ct,steps:vf}=cx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Jt,!0);let ar;function wE(){ar=void 0}const gt={now:()=>(ar===void 0&>.set(ct.isProcessing||va.useManualTiming?ct.timestamp:performance.now()),ar),set:n=>{ar=n,queueMicrotask(wE)}},fx=n=>a=>typeof a=="string"&&a.startsWith(n),dx=fx("--"),TE=fx("var(--"),Vd=n=>TE(n)?EE.test(n.split("/*")[0].trim()):!1,EE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Rv(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Ii={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},pl={...Ii,transform:n=>pn(0,1,n)},Jo={...Ii,default:1},ul=n=>Math.round(n*1e5)/1e5,_d=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jE(n){return n==null}const AE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ud=(n,a)=>l=>!!(typeof l=="string"&&AE.test(l)&&l.startsWith(n)||a&&!jE(l)&&Object.prototype.hasOwnProperty.call(l,a)),hx=(n,a,l)=>o=>{if(typeof o!="string")return o;const[u,f,d,m]=o.match(_d);return{[n]:parseFloat(u),[a]:parseFloat(f),[l]:parseFloat(d),alpha:m!==void 0?parseFloat(m):1}},NE=n=>pn(0,255,n),yf={...Ii,transform:n=>Math.round(NE(n))},Za={test:Ud("rgb","red"),parse:hx("red","green","blue"),transform:({red:n,green:a,blue:l,alpha:o=1})=>"rgba("+yf.transform(n)+", "+yf.transform(a)+", "+yf.transform(l)+", "+ul(pl.transform(o))+")"};function CE(n){let a="",l="",o="",u="";return n.length>5?(a=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),u=n.substring(7,9)):(a=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),u=n.substring(4,5),a+=a,l+=l,o+=o,u+=u),{red:parseInt(a,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:u?parseInt(u,16)/255:1}}const Pf={test:Ud("#"),parse:CE,transform:Za.transform},El=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),ca=El("deg"),mn=El("%"),te=El("px"),ME=El("vh"),DE=El("vw"),kv={...mn,parse:n=>mn.parse(n)/100,transform:n=>mn.transform(n*100)},qi={test:Ud("hsl","hue"),parse:hx("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+mn.transform(ul(a))+", "+mn.transform(ul(l))+", "+ul(pl.transform(o))+")"},Ie={test:n=>Za.test(n)||Pf.test(n)||qi.test(n),parse:n=>Za.test(n)?Za.parse(n):qi.test(n)?qi.parse(n):Pf.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)}},OE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zE(n){var a,l;return isNaN(n)&&typeof n=="string"&&(((a=n.match(_d))==null?void 0:a.length)||0)+(((l=n.match(OE))==null?void 0:l.length)||0)>0}const mx="number",px="color",RE="var",kE="var(",Lv="${}",LE=/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(),l=[],o={color:[],number:[],var:[]},u=[];let f=0;const m=a.replace(LE,p=>(Ie.test(p)?(o.color.push(f),u.push(px),l.push(Ie.parse(p))):p.startsWith(kE)?(o.var.push(f),u.push(RE),l.push(p)):(o.number.push(f),u.push(mx),l.push(parseFloat(p))),++f,Lv)).split(Lv);return{values:l,split:m,indexes:o,types:u}}function VE(n){return Zi(n).values}function gx({split:n,types:a}){const l=n.length;return o=>{let u="";for(let f=0;f<l;f++)if(u+=n[f],o[f]!==void 0){const d=a[f];d===mx?u+=ul(o[f]):d===px?u+=Ie.transform(o[f]):u+=o[f]}return u}}function _E(n){return gx(Zi(n))}const UE=n=>typeof n=="number"?0:Ie.test(n)?Ie.getAnimatableNone(n):n,BE=(n,a)=>typeof n=="number"?a!=null&&a.trim().endsWith("/")?n:0:UE(n);function HE(n){const a=Zi(n);return gx(a)(a.values.map((o,u)=>BE(o,a.split[u])))}const sn={test:zE,parse:VE,createTransformer:_E,getAnimatableNone:HE};function xf(n,a,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(a-n)*6*l:l<1/2?a:l<2/3?n+(a-n)*(2/3-l)*6:n}function $E({hue:n,saturation:a,lightness:l,alpha:o}){n/=360,a/=100,l/=100;let u=0,f=0,d=0;if(!a)u=f=d=l;else{const m=l<.5?l*(1+a):l+a-l*a,p=2*l-m;u=xf(p,m,n+1/3),f=xf(p,m,n),d=xf(p,m,n-1/3)}return{red:Math.round(u*255),green:Math.round(f*255),blue:Math.round(d*255),alpha:o}}function vr(n,a){return l=>l>0?a:n}const He=(n,a,l)=>n+(a-n)*l,bf=(n,a,l)=>{const o=n*n,u=l*(a*a-o)+o;return u<0?0:Math.sqrt(u)},qE=[Pf,Za,qi],YE=n=>qE.find(a=>a.test(n));function Vv(n){const a=YE(n);if(!a)return!1;let l=a.parse(n);return a===qi&&(l=$E(l)),l}const _v=(n,a)=>{const l=Vv(n),o=Vv(a);if(!l||!o)return vr(n,a);const u={...l};return f=>(u.red=bf(l.red,o.red,f),u.green=bf(l.green,o.green,f),u.blue=bf(l.blue,o.blue,f),u.alpha=He(l.alpha,o.alpha,f),Za.transform(u))},Jf=new Set(["none","hidden"]);function GE(n,a){return Jf.has(n)?l=>l<=0?n:a:l=>l>=1?a:n}function XE(n,a){return l=>He(n,a,l)}function Bd(n){return typeof n=="number"?XE:typeof n=="string"?Vd(n)?vr:Ie.test(n)?_v:ZE:Array.isArray(n)?vx:typeof n=="object"?Ie.test(n)?_v:KE:vr}function vx(n,a){const l=[...n],o=l.length,u=n.map((f,d)=>Bd(f)(f,a[d]));return f=>{for(let d=0;d<o;d++)l[d]=u[d](f);return l}}function KE(n,a){const l={...n,...a},o={};for(const u in l)n[u]!==void 0&&a[u]!==void 0&&(o[u]=Bd(n[u])(n[u],a[u]));return u=>{for(const f in o)l[f]=o[f](u);return l}}function FE(n,a){const l=[],o={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const f=a.types[u],d=n.indexes[f][o[f]],m=n.values[d]??0;l[u]=m,o[f]++}return l}const ZE=(n,a)=>{const l=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?Jf.has(n)&&!u.values.length||Jf.has(a)&&!o.values.length?GE(n,a):wl(vx(FE(o,u),u.values),l):vr(n,a)};function yx(n,a,l){return typeof n=="number"&&typeof a=="number"&&typeof l=="number"?He(n,a,l):Bd(n)(n,a)}const QE=n=>{const a=({timestamp:l})=>n(l);return{start:(l=!0)=>ke.update(a,l),stop:()=>ya(a),now:()=>ct.isProcessing?ct.timestamp:gt.now()}},xx=(n,a,l=10)=>{let o="";const u=Math.max(Math.round(a/l),2);for(let f=0;f<u;f++)o+=Math.round(n(f/(u-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},yr=2e4;function Hd(n){let a=0;const l=50;let o=n.next(a);for(;!o.done&&a<yr;)a+=l,o=n.next(a);return a>=yr?1/0:a}function PE(n,a=100,l){const o=l({...n,keyframes:[0,a]}),u=Math.min(Hd(o),yr);return{type:"keyframes",ease:f=>o.next(u*f).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 Wf(n,a){return n*Math.sqrt(1-a*a)}const JE=12;function WE(n,a,l){let o=l;for(let u=1;u<JE;u++)o=o-n(o)/a(o);return o}const Sf=.001;function IE({duration:n=Ge.duration,bounce:a=Ge.bounce,velocity:l=Ge.velocity,mass:o=Ge.mass}){let u,f,d=1-a;d=pn(Ge.minDamping,Ge.maxDamping,d),n=pn(Ge.minDuration,Ge.maxDuration,Pt(n)),d<1?(u=g=>{const y=g*d,x=y*n,S=y-l,T=Wf(g,d),E=Math.exp(-x);return Sf-S/T*E},f=g=>{const x=g*d*n,S=x*l+l,T=Math.pow(d,2)*Math.pow(g,2)*n,E=Math.exp(-x),j=Wf(Math.pow(g,2),d);return(-u(g)+Sf>0?-1:1)*((S-T)*E)/j}):(u=g=>{const y=Math.exp(-g*n),x=(g-l)*n+1;return-Sf+y*x},f=g=>{const y=Math.exp(-g*n),x=(l-g)*(n*n);return y*x});const m=5/n,p=WE(u,f,m);if(n=Ut(n),isNaN(p))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:n};{const g=Math.pow(p,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const ej=["duration","bounce"],tj=["stiffness","damping","mass"];function Uv(n,a){return a.some(l=>n[l]!==void 0)}function nj(n){let a={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...n};if(!Uv(n,tj)&&Uv(n,ej))if(a.velocity=0,n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),u=o*o,f=2*pn(.05,1,1-(n.bounce||0))*Math.sqrt(u);a={...a,mass:Ge.mass,stiffness:u,damping:f}}else{const l=IE({...n,velocity:0});a={...a,...l,mass:Ge.mass},a.isResolvedFromDuration=!0}return a}function xr(n=Ge.visualDuration,a=Ge.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:u}=l;const f=l.keyframes[0],d=l.keyframes[l.keyframes.length-1],m={done:!1,value:f},{stiffness:p,damping:g,mass:y,duration:x,velocity:S,isResolvedFromDuration:T}=nj({...l,velocity:-Pt(l.velocity||0)}),E=S||0,j=g/(2*Math.sqrt(p*y)),D=d-f,z=Pt(Math.sqrt(p/y)),O=Math.abs(D)<5;o||(o=O?Ge.restSpeed.granular:Ge.restSpeed.default),u||(u=O?Ge.restDelta.granular:Ge.restDelta.default);let V,R,U,P,F,W;if(j<1)U=Wf(z,j),P=(E+j*z*D)/U,V=B=>{const Z=Math.exp(-j*z*B);return d-Z*(P*Math.sin(U*B)+D*Math.cos(U*B))},F=j*z*P+D*U,W=j*z*D-P*U,R=B=>Math.exp(-j*z*B)*(F*Math.sin(U*B)+W*Math.cos(U*B));else if(j===1){V=Z=>d-Math.exp(-z*Z)*(D+(E+z*D)*Z);const B=E+z*D;R=Z=>Math.exp(-z*Z)*(z*B*Z-E)}else{const B=z*Math.sqrt(j*j-1);V=Se=>{const De=Math.exp(-j*z*Se),$=Math.min(B*Se,300);return d-De*((E+j*z*D)*Math.sinh($)+B*D*Math.cosh($))/B};const Z=(E+j*z*D)/B,ie=j*z*Z-D*B,le=j*z*D-Z*B;R=Se=>{const De=Math.exp(-j*z*Se),$=Math.min(B*Se,300);return De*(ie*Math.sinh($)+le*Math.cosh($))}}const oe={calculatedDuration:T&&x||null,velocity:B=>Ut(R(B)),next:B=>{if(!T&&j<1){const ie=Math.exp(-j*z*B),le=Math.sin(U*B),Se=Math.cos(U*B),De=d-ie*(P*le+D*Se),$=Ut(ie*(F*le+W*Se));return m.done=Math.abs($)<=o&&Math.abs(d-De)<=u,m.value=m.done?d:De,m}const Z=V(B);if(T)m.done=B>=x;else{const ie=Ut(R(B));m.done=Math.abs(ie)<=o&&Math.abs(d-Z)<=u}return m.value=m.done?d:Z,m},toString:()=>{const B=Math.min(Hd(oe),yr),Z=xx(ie=>oe.next(B*ie).value,B,30);return B+"ms "+Z},toTransition:()=>{}};return oe}xr.applyToOptions=n=>{const a=PE(n,100,xr);return n.ease=a.ease,n.duration=Ut(a.duration),n.type="keyframes",n};const aj=5;function bx(n,a,l){const o=Math.max(a-aj,0);return Iy(l-n(o),a-o)}function If({keyframes:n,velocity:a=0,power:l=.8,timeConstant:o=325,bounceDamping:u=10,bounceStiffness:f=500,modifyTarget:d,min:m,max:p,restDelta:g=.5,restSpeed:y}){const x=n[0],S={done:!1,value:x},T=W=>m!==void 0&&W<m||p!==void 0&&W>p,E=W=>m===void 0?p:p===void 0||Math.abs(m-W)<Math.abs(p-W)?m:p;let j=l*a;const D=x+j,z=d===void 0?D:d(D);z!==D&&(j=z-x);const O=W=>-j*Math.exp(-W/o),V=W=>z+O(W),R=W=>{const oe=O(W),B=V(W);S.done=Math.abs(oe)<=g,S.value=S.done?z:B};let U,P;const F=W=>{T(S.value)&&(U=W,P=xr({keyframes:[S.value,E(S.value)],velocity:bx(V,W,S.value),damping:u,stiffness:f,restDelta:g,restSpeed:y}))};return F(0),{calculatedDuration:null,next:W=>{let oe=!1;return!P&&U===void 0&&(oe=!0,R(W),F(W)),U!==void 0&&W>=U?P.next(W-U):(!oe&&R(W),S)}}}function ij(n,a,l){const o=[],u=l||va.mix||yx,f=n.length-1;for(let d=0;d<f;d++){let m=u(n[d],n[d+1]);if(a){const p=Array.isArray(a)?a[d]||Jt:a;m=wl(p,m)}o.push(m)}return o}function sj(n,a,{clamp:l=!0,ease:o,mixer:u}={}){const f=n.length;if(zd(f===a.length),f===1)return()=>a[0];if(f===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[f-1]&&(n=[...n].reverse(),a=[...a].reverse());const m=ij(a,o,u),p=m.length,g=y=>{if(d&&y<n[0])return a[0];let x=0;if(p>1)for(;x<n.length-2&&!(y<n[x+1]);x++);const S=ml(n[x],n[x+1],y);return m[x](S)};return l?y=>g(pn(n[0],n[f-1],y)):g}function lj(n,a){const l=n[n.length-1];for(let o=1;o<=a;o++){const u=ml(0,a,o);n.push(He(l,1,u))}}function oj(n){const a=[0];return lj(a,n.length-1),a}function rj(n,a){return n.map(l=>l*a)}function uj(n,a){return n.map(()=>a||rx).splice(0,n.length-1)}function cl({duration:n=300,keyframes:a,times:l,ease:o="easeInOut"}){const u=vE(o)?o.map(zv):zv(o),f={done:!1,value:a[0]},d=rj(l&&l.length===a.length?l:oj(a),n),m=sj(d,a,{ease:Array.isArray(u)?u:uj(a,u)});return{calculatedDuration:n,next:p=>(f.value=m(p),f.done=p>=n,f)}}const cj=n=>n!==null;function Lr(n,{repeat:a,repeatType:l="loop"},o,u=1){const f=n.filter(cj),m=u<0||a&&l!=="loop"&&a%2===1?0:f.length-1;return!m||o===void 0?f[m]:o}const fj={decay:If,inertia:If,tween:cl,keyframes:cl,spring:xr};function Sx(n){typeof n.type=="string"&&(n.type=fj[n.type])}class $d{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,l){return this.finished.then(a,l)}}const dj=n=>n/100;class br extends $d{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:l}=this.options;l&&l.updatedAt!==gt.now()&&this.tick(gt.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;Sx(a);const{type:l=cl,repeat:o=0,repeatDelay:u=0,repeatType:f,velocity:d=0}=a;let{keyframes:m}=a;const p=l||cl;p!==cl&&typeof m[0]!="number"&&(this.mixKeyframes=wl(dj,yx(m[0],m[1])),m=[0,100]);const g=p({...a,keyframes:m});f==="mirror"&&(this.mirroredGenerator=p({...a,keyframes:[...m].reverse(),velocity:-d})),g.calculatedDuration===null&&(g.calculatedDuration=Hd(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 l=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=l}tick(a,l=!1){const{generator:o,totalDuration:u,mixKeyframes:f,mirroredGenerator:d,resolvedDuration:m,calculatedDuration:p}=this;if(this.startTime===null)return o.next(0);const{delay:g=0,keyframes:y,repeat:x,repeatType:S,repeatDelay:T,type:E,onUpdate:j,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)),l?this.currentTime=a:this.updateTime(a);const z=this.currentTime-g*(this.playbackSpeed>=0?1:-1),O=this.playbackSpeed>=0?z<0:z>u;this.currentTime=Math.max(z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let V=this.currentTime,R=o;if(x){const W=Math.min(this.currentTime,u)/m;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/m)):S==="mirror"&&(R=d)),V=pn(0,1,B)*m}let U;O?(this.delayState.value=y[0],U=this.delayState):U=R.next(V),f&&!O&&(U.value=f(U.value));let{done:P}=U;!O&&p!==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&&E!==If&&(U.value=Lr(y,this.options,D,this.speed)),j&&j(U.value),F&&this.finish(),U}then(a,l){return this.finished.then(a,l)}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 l=this.generator.next(a).value;return bx(o=>this.generator.next(o).value,a,l)}get speed(){return this.playbackSpeed}set speed(a){const l=this.playbackSpeed!==a;l&&this.driver&&this.updateTime(gt.now()),this.playbackSpeed=a,l&&this.driver&&(this.time=Pt(this.currentTime))}play(){var u,f;if(this.isStopped)return;const{driver:a=QE,startTime:l}=this.options;this.driver||(this.driver=a(d=>this.tick(d))),(f=(u=this.options).onPlay)==null||f.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=l??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(gt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var a,l;this.notifyFinished(),this.teardown(),this.state="finished",(l=(a=this.options).onComplete)==null||l.call(a)}cancel(){var a,l;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(l=(a=this.options).onCancel)==null||l.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 l;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(l=this.driver)==null||l.stop(),a.observe(this)}}function hj(n){for(let a=1;a<n.length;a++)n[a]??(n[a]=n[a-1])}const Qa=n=>n*180/Math.PI,ed=n=>{const a=Qa(Math.atan2(n[1],n[0]));return td(a)},mj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:ed,rotateZ:ed,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},td=n=>(n=n%360,n<0&&(n+=360),n),Bv=ed,Hv=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),$v=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),pj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Hv,scaleY:$v,scale:n=>(Hv(n)+$v(n))/2,rotateX:n=>td(Qa(Math.atan2(n[6],n[5]))),rotateY:n=>td(Qa(Math.atan2(-n[2],n[0]))),rotateZ:Bv,rotate:Bv,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 nd(n){return n.includes("scale")?1:0}function ad(n,a){if(!n||n==="none")return nd(a);const l=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,u;if(l)o=pj,u=l;else{const m=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=mj,u=m}if(!u)return nd(a);const f=o[a],d=u[1].split(",").map(vj);return typeof f=="function"?f(d):d[f]}const gj=(n,a)=>{const{transform:l="none"}=getComputedStyle(n);return ad(l,a)};function vj(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),qv=n=>n===Ii||n===te,yj=new Set(["x","y","z"]),xj=es.filter(n=>!yj.has(n));function bj(n){const a=[];return xj.forEach(l=>{const o=n.getValue(l);o!==void 0&&(a.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),a}const pa={width:({x:n},{paddingLeft:a="0",paddingRight:l="0",boxSizing:o})=>{const u=n.max-n.min;return o==="border-box"?u:u-parseFloat(a)-parseFloat(l)},height:({y:n},{paddingTop:a="0",paddingBottom:l="0",boxSizing:o})=>{const u=n.max-n.min;return o==="border-box"?u:u-parseFloat(a)-parseFloat(l)},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})=>ad(a,"x"),y:(n,{transform:a})=>ad(a,"y")};pa.translateX=pa.x;pa.translateY=pa.y;const Pa=new Set;let id=!1,sd=!1,ld=!1;function wx(){if(sd){const n=Array.from(Pa).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),l=new Map;a.forEach(o=>{const u=bj(o);u.length&&(l.set(o,u),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const u=l.get(o);u&&u.forEach(([f,d])=>{var m;(m=o.getValue(f))==null||m.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}sd=!1,id=!1,Pa.forEach(n=>n.complete(ld)),Pa.clear()}function Tx(){Pa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(sd=!0)})}function Sj(){ld=!0,Tx(),wx(),ld=!1}class qd{constructor(a,l,o,u,f,d=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=l,this.name=o,this.motionValue=u,this.element=f,this.isAsync=d}scheduleResolve(){this.state="scheduled",this.isAsync?(Pa.add(this),id||(id=!0,ke.read(Tx),ke.resolveKeyframes(wx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:l,element:o,motionValue:u}=this;if(a[0]===null){const f=u==null?void 0:u.get(),d=a[a.length-1];if(f!==void 0)a[0]=f;else if(o&&l){const m=o.readValue(l,d);m!=null&&(a[0]=m)}a[0]===void 0&&(a[0]=d),u&&f===void 0&&u.set(a[0])}hj(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 wj=n=>n.startsWith("--");function Ex(n,a,l){wj(a)?n.style.setProperty(a,l):n.style[a]=l}const Tj={};function jx(n,a){const l=Wy(n);return()=>Tj[a]??l()}const Ej=jx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ax=jx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),il=([n,a,l,o])=>`cubic-bezier(${n}, ${a}, ${l}, ${o})`,Yv={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 Nx(n,a){if(n)return typeof n=="function"?Ax()?xx(n,a):"ease-out":ux(n)?il(n):Array.isArray(n)?n.map(l=>Nx(l,a)||Yv.easeOut):Yv[n]}function jj(n,a,l,{delay:o=0,duration:u=300,repeat:f=0,repeatType:d="loop",ease:m="easeOut",times:p}={},g=void 0){const y={[a]:l};p&&(y.offset=p);const x=Nx(m,u);Array.isArray(x)&&(y.easing=x);const S={delay:o,duration:u,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:f+1,direction:d==="reverse"?"alternate":"normal"};return g&&(S.pseudoElement=g),n.animate(y,S)}function Cx(n){return typeof n=="function"&&"applyToOptions"in n}function Aj({type:n,...a}){return Cx(n)&&Ax()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class Mx extends $d{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:l,name:o,keyframes:u,pseudoElement:f,allowFlatten:d=!1,finalKeyframe:m,onComplete:p}=a;this.isPseudoElement=!!f,this.allowFlatten=d,this.options=a,zd(typeof a.type!="string");const g=Aj(a);this.animation=jj(l,o,u,g,f),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!f){const y=Lr(u,this.options,m,this.speed);this.updateMotionValue&&this.updateMotionValue(y),Ex(l,o,y),this.animation.cancel()}p==null||p(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var a,l;(l=(a=this.animation).finish)==null||l.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 l,o,u;const a=(l=this.options)==null?void 0:l.element;!this.isPseudoElement&&(a!=null&&a.isConnected)&&((u=(o=this.animation).commitStyles)==null||u.call(o))}get duration(){var l,o;const a=((o=(l=this.animation.effect)==null?void 0:l.getComputedTiming)==null?void 0:o.call(l).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 l=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ut(a),l&&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:l,rangeEnd:o,observe:u}){var f;return this.allowFlatten&&((f=this.animation.effect)==null||f.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&Ej()?(this.animation.timeline=a,l&&(this.animation.rangeStart=l),o&&(this.animation.rangeEnd=o),Jt):u(this)}}const Dx={anticipate:sx,backInOut:ix,circInOut:ox};function Nj(n){return n in Dx}function Cj(n){typeof n.ease=="string"&&Nj(n.ease)&&(n.ease=Dx[n.ease])}const wf=10;class Mj extends Mx{constructor(a){Cj(a),Sx(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:l,onUpdate:o,onComplete:u,element:f,...d}=this.options;if(!l)return;if(a!==void 0){l.set(a);return}const m=new br({...d,autoplay:!1}),p=Math.max(wf,gt.now()-this.startTime),g=pn(0,wf,p-wf),y=m.sample(p).value,{name:x}=this.options;f&&x&&Ex(f,x,y),l.setWithVelocity(m.sample(Math.max(0,p-g)).value,y,g),m.stop()}}const Gv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(sn.test(n)||n==="0")&&!n.startsWith("url("));function Dj(n){const a=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==a)return!0}function Oj(n,a,l,o){const u=n[0];if(u===null)return!1;if(a==="display"||a==="visibility")return!0;const f=n[n.length-1],d=Gv(u,a),m=Gv(f,a);return!d||!m?!1:Dj(n)||(l==="spring"||Cx(l))&&o}function od(n){n.duration=0,n.type="keyframes"}const Ox=new Set(["opacity","clipPath","filter","transform"]),zj=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Rj(n){for(let a=0;a<n.length;a++)if(typeof n[a]=="string"&&zj.test(n[a]))return!0;return!1}const kj=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Lj=Wy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Vj(n){var x;const{motionValue:a,name:l,repeatDelay:o,repeatType:u,damping:f,type:d,keyframes:m}=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 Lj()&&l&&(Ox.has(l)||kj.has(l)&&Rj(m))&&(l!=="transform"||!y)&&!g&&!o&&u!=="mirror"&&f!==0&&d!=="inertia"}const _j=40;class Uj extends $d{constructor({autoplay:a=!0,delay:l=0,type:o="keyframes",repeat:u=0,repeatDelay:f=0,repeatType:d="loop",keyframes:m,name:p,motionValue:g,element:y,...x}){var E;super(),this.stop=()=>{var j,D;this._animation&&(this._animation.stop(),(j=this.stopTimeline)==null||j.call(this)),(D=this.keyframeResolver)==null||D.cancel()},this.createdAt=gt.now();const S={autoplay:a,delay:l,type:o,repeat:u,repeatDelay:f,repeatType:d,name:p,motionValue:g,element:y,...x},T=(y==null?void 0:y.KeyframeResolver)||qd;this.keyframeResolver=new T(m,(j,D,z)=>this.onKeyframesResolved(j,D,S,!z),p,g,y),(E=this.keyframeResolver)==null||E.scheduleResolve()}onKeyframesResolved(a,l,o,u){var z,O;this.keyframeResolver=void 0;const{name:f,type:d,velocity:m,delay:p,isHandoff:g,onUpdate:y}=o;this.resolvedAt=gt.now();let x=!0;Oj(a,f,d,m)||(x=!1,(va.instantAnimations||!p)&&(y==null||y(Lr(a,o,l))),a[0]=a[a.length-1],od(o),o.repeat=0);const T={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>_j?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:l,...o,keyframes:a},E=x&&!g&&Vj(T),j=(O=(z=T.motionValue)==null?void 0:z.owner)==null?void 0:O.current;let D;if(E)try{D=new Mj({...T,element:j})}catch{D=new br(T)}else D=new br(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,l){return this.finished.finally(a).then(()=>{})}get animation(){var a;return this._animation||((a=this.keyframeResolver)==null||a.resume(),Sj()),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 zx(n,a,l,o=0,u=1){const f=Array.from(n).sort((g,y)=>g.sortNodePosition(y)).indexOf(a),d=n.size,m=(d-1)*o;return typeof l=="function"?l(f,d):u===1?f*o:m-f*o}const Bj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hj(n){const a=Bj.exec(n);if(!a)return[,];const[,l,o,u]=a;return[`--${l??o}`,u]}function Rx(n,a,l=1){const[o,u]=Hj(n);if(!o)return;const f=window.getComputedStyle(a).getPropertyValue(o);if(f){const d=f.trim();return Qy(d)?parseFloat(d):d}return Vd(u)?Rx(u,a,l+1):u}const $j={type:"spring",stiffness:500,damping:25,restSpeed:10},qj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Yj={type:"keyframes",duration:.8},Gj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xj=(n,{keyframes:a})=>a.length>2?Yj:ts.has(n)?n.startsWith("scale")?qj(a[1]):$j:Gj;function kx(n,a){if(n!=null&&n.inherit&&a){const{inherit:l,...o}=n;return{...a,...o}}return n}function Yd(n,a){const l=(n==null?void 0:n[a])??(n==null?void 0:n.default)??n;return l!==n?kx(l,n):l}const Kj=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Fj(n){for(const a in n)if(!Kj.has(a))return!0;return!1}const Gd=(n,a,l,o={},u,f)=>d=>{const m=Yd(o,n)||{},p=m.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Ut(p);const y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:a.getVelocity(),...m,delay:-g,onUpdate:S=>{a.set(S),m.onUpdate&&m.onUpdate(S)},onComplete:()=>{d(),m.onComplete&&m.onComplete()},name:n,motionValue:a,element:f?void 0:u};Fj(m)||Object.assign(y,Xj(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)&&(od(y),y.delay===0&&(x=!0)),(va.instantAnimations||va.skipAnimations||u!=null&&u.shouldSkipAnimations)&&(x=!0,od(y),y.delay=0),y.allowFlatten=!m.type&&!m.ease,x&&!f&&a.get()!==void 0){const S=Lr(y.keyframes,m);if(S!==void 0){ke.update(()=>{y.onUpdate(S),y.onComplete()});return}}return m.isSync?new br(y):new Uj(y)};function Xv(n){const a=[{},{}];return n==null||n.values.forEach((l,o)=>{a[0][o]=l.get(),a[1][o]=l.getVelocity()}),a}function Xd(n,a,l,o){if(typeof a=="function"){const[u,f]=Xv(o);a=a(l!==void 0?l:n.custom,u,f)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[u,f]=Xv(o);a=a(l!==void 0?l:n.custom,u,f)}return a}function Ja(n,a,l){const o=n.getProps();return Xd(o,a,l!==void 0?l:o.custom,n)}const Lx=new Set(["width","height","top","left","right","bottom",...es]),Kv=30,Zj=n=>!isNaN(parseFloat(n));class Qj{constructor(a,l={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var f;const u=gt.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((f=this.events.change)==null||f.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=l.owner}setCurrent(a){this.current=a,this.updatedAt=gt.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=Zj(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,l){this.events[a]||(this.events[a]=new Rd);const o=this.events[a].add(l);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,l){this.passiveEffect=a,this.stopPassiveEffect=l}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,l=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&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=gt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Kv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,Kv);return Iy(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(a){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=a(l),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,l;(a=this.dependents)==null||a.clear(),(l=this.events.destroy)==null||l.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qi(n,a){return new Qj(n,a)}const rd=n=>Array.isArray(n);function Pj(n,a,l){n.hasValue(a)?n.getValue(a).set(l):n.addValue(a,Qi(l))}function Jj(n){return rd(n)?n[n.length-1]||0:n}function Wj(n,a){const l=Ja(n,a);let{transitionEnd:o={},transition:u={},...f}=l||{};f={...f,...o};for(const d in f){const m=Jj(f[d]);Pj(n,d,m)}}const ft=n=>!!(n&&n.getVelocity);function Ij(n){return!!(ft(n)&&n.add)}function ud(n,a){const l=n.getValue("willChange");if(Ij(l))return l.add(a);if(!l&&va.WillChange){const o=new va.WillChange("auto");n.addValue("willChange",o),o.add(a)}}function Kd(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const e5="framerAppearId",Vx="data-"+Kd(e5);function _x(n){return n.props[Vx]}function t5({protectedKeys:n,needsAnimating:a},l){const o=n.hasOwnProperty(l)&&a[l]!==!0;return a[l]=!1,o}function Ux(n,a,{delay:l=0,transitionOverride:o,type:u}={}){let{transition:f,transitionEnd:d,...m}=a;const p=n.getDefaultTransition();f=f?kx(f,p):p;const g=f==null?void 0:f.reduceMotion;o&&(f=o);const y=[],x=u&&n.animationState&&n.animationState.getState()[u];for(const S in m){const T=n.getValue(S,n.latestValues[S]??null),E=m[S];if(E===void 0||x&&t5(x,S))continue;const j={delay:l,...Yd(f||{},S)},D=T.get();if(D!==void 0&&!T.isAnimating()&&!Array.isArray(E)&&E===D&&!j.velocity){ke.update(()=>T.set(E));continue}let z=!1;if(window.MotionHandoffAnimation){const R=_x(n);if(R){const U=window.MotionHandoffAnimation(R,S,ke);U!==null&&(j.startTime=U,z=!0)}}ud(n,S);const O=g??n.shouldReduceMotion;T.start(Gd(S,T,E,O&&Lx.has(S)?{type:!1}:j,n,z));const V=T.animation;V&&y.push(V)}if(d){const S=()=>ke.update(()=>{d&&Wj(n,d)});y.length?Promise.all(y).then(S):S()}return y}function cd(n,a,l={}){var p;const o=Ja(n,a,l.type==="exit"?(p=n.presenceContext)==null?void 0:p.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=o||{};l.transitionOverride&&(u=l.transitionOverride);const f=o?()=>Promise.all(Ux(n,o,l)):()=>Promise.resolve(),d=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:y=0,staggerChildren:x,staggerDirection:S}=u;return n5(n,a,g,y,x,S,l)}:()=>Promise.resolve(),{when:m}=u;if(m){const[g,y]=m==="beforeChildren"?[f,d]:[d,f];return g().then(()=>y())}else return Promise.all([f(),d(l.delay)])}function n5(n,a,l=0,o=0,u=0,f=1,d){const m=[];for(const p of n.variantChildren)p.notify("AnimationStart",a),m.push(cd(p,a,{...d,delay:l+(typeof o=="function"?0:o)+zx(n.variantChildren,p,o,u,f)}).then(()=>p.notify("AnimationComplete",a)));return Promise.all(m)}function a5(n,a,l={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const u=a.map(f=>cd(n,f,l));o=Promise.all(u)}else if(typeof a=="string")o=cd(n,a,l);else{const u=typeof a=="function"?Ja(n,a,l.custom):a;o=Promise.all(Ux(n,u,l))}return o.then(()=>{n.notify("AnimationComplete",a)})}const i5={test:n=>n==="auto",parse:n=>n},Bx=n=>a=>a.test(n),Hx=[Ii,te,mn,ca,DE,ME,i5],Fv=n=>Hx.find(Bx(n));function s5(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Jy(n):!0}const l5=new Set(["brightness","contrast","saturate","opacity"]);function o5(n){const[a,l]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=l.match(_d)||[];if(!o)return n;const u=l.replace(o,"");let f=l5.has(a)?1:0;return o!==l&&(f*=100),a+"("+f+u+")"}const r5=/\b([a-z-]*)\(.*?\)/gu,fd={...sn,getAnimatableNone:n=>{const a=n.match(r5);return a?a.map(o5).join(" "):n}},dd={...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))}},Zv={...Ii,transform:Math.round},u5={rotate:ca,rotateX:ca,rotateY:ca,rotateZ:ca,scale:Jo,scaleX:Jo,scaleY:Jo,scaleZ:Jo,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:pl,originX:kv,originY:kv,originZ:te},Fd={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,...u5,zIndex:Zv,fillOpacity:pl,strokeOpacity:pl,numOctaves:Zv},c5={...Fd,color:Ie,backgroundColor:Ie,outlineColor:Ie,fill:Ie,stroke:Ie,borderColor:Ie,borderTopColor:Ie,borderRightColor:Ie,borderBottomColor:Ie,borderLeftColor:Ie,filter:fd,WebkitFilter:fd,mask:dd,WebkitMask:dd},$x=n=>c5[n],f5=new Set([fd,dd]);function qx(n,a){let l=$x(n);return f5.has(l)||(l=sn),l.getAnimatableNone?l.getAnimatableNone(a):void 0}const d5=new Set(["auto","none","0"]);function h5(n,a,l){let o=0,u;for(;o<n.length&&!u;){const f=n[o];typeof f=="string"&&!d5.has(f)&&Zi(f).values.length&&(u=n[o]),o++}if(u&&l)for(const f of a)n[f]=qx(l,u)}class m5 extends qd{constructor(a,l,o,u,f){super(a,l,o,u,f,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let y=0;y<a.length;y++){let x=a[y];if(typeof x=="string"&&(x=x.trim(),Vd(x))){const S=Rx(x,l.current);S!==void 0&&(a[y]=S),y===a.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!Lx.has(o)||a.length!==2)return;const[u,f]=a,d=Fv(u),m=Fv(f),p=Rv(u),g=Rv(f);if(p!==g&&pa[o]){this.needsMeasurement=!0;return}if(d!==m)if(qv(d)&&qv(m))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:l}=this,o=[];for(let u=0;u<a.length;u++)(a[u]===null||s5(a[u]))&&o.push(u);o.length&&h5(a,o,l)}measureInitialState(){const{element:a,unresolvedKeyframes:l,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pa[o](a.measureViewportBox(),window.getComputedStyle(a.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&a.getValue(o,u).jump(u,!1)}measureEndState(){var m;const{element:a,name:l,unresolvedKeyframes:o}=this;if(!a||!a.current)return;const u=a.getValue(l);u&&u.jump(this.measuredOrigin,!1);const f=o.length-1,d=o[f];o[f]=pa[l](a.measureViewportBox(),window.getComputedStyle(a.current)),d!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=d),(m=this.removedTransforms)!=null&&m.length&&this.removedTransforms.forEach(([p,g])=>{a.getValue(p).set(g)}),this.resolveNoneKeyframes()}}function Yx(n,a,l){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let o=document;const u=(l==null?void 0:l[n])??o.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n).filter(o=>o!=null)}const Gx=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function p5(n){return Py(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:Zd}=cx(queueMicrotask,!1),nn={x:!1,y:!1};function Xx(){return nn.x||nn.y}function g5(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 Kx(n,a){const l=Yx(n),o=new AbortController,u={passive:!0,...a,signal:o.signal};return[l,u,()=>o.abort()]}function v5(n){return!(n.pointerType==="touch"||Xx())}function y5(n,a,l={}){const[o,u,f]=Kx(n,l);return o.forEach(d=>{let m=!1,p=!1,g;const y=()=>{d.removeEventListener("pointerleave",E)},x=D=>{g&&(g(D),g=void 0),y()},S=D=>{m=!1,window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),p&&(p=!1,x(D))},T=()=>{m=!0,window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",S,u)},E=D=>{if(D.pointerType!=="touch"){if(m){p=!0;return}x(D)}},j=D=>{if(!v5(D))return;p=!1;const z=a(d,D);typeof z=="function"&&(g=z,d.addEventListener("pointerleave",E,u))};d.addEventListener("pointerenter",j,u),d.addEventListener("pointerdown",T,u)}),f}const Fx=(n,a)=>a?n===a?!0:Fx(n,a.parentElement):!1,Qd=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,x5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function b5(n){return x5.has(n.tagName)||n.isContentEditable===!0}const S5=new Set(["INPUT","SELECT","TEXTAREA"]);function w5(n){return S5.has(n.tagName)||n.isContentEditable===!0}const ir=new WeakSet;function Qv(n){return a=>{a.key==="Enter"&&n(a)}}function Tf(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const T5=(n,a)=>{const l=n.currentTarget;if(!l)return;const o=Qv(()=>{if(ir.has(l))return;Tf(l,"down");const u=Qv(()=>{Tf(l,"up")}),f=()=>Tf(l,"cancel");l.addEventListener("keyup",u,a),l.addEventListener("blur",f,a)});l.addEventListener("keydown",o,a),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),a)};function Pv(n){return Qd(n)&&!Xx()}const Jv=new WeakSet;function E5(n,a,l={}){const[o,u,f]=Kx(n,l),d=m=>{const p=m.currentTarget;if(!Pv(m)||Jv.has(m))return;ir.add(p),l.stopPropagation&&Jv.add(m);const g=a(p,m),y=(T,E)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",S),ir.has(p)&&ir.delete(p),Pv(T)&&typeof g=="function"&&g(T,{success:E})},x=T=>{y(T,p===window||p===document||l.useGlobalTarget||Fx(p,T.target))},S=T=>{y(T,!1)};window.addEventListener("pointerup",x,u),window.addEventListener("pointercancel",S,u)};return o.forEach(m=>{(l.useGlobalTarget?window:m).addEventListener("pointerdown",d,u),p5(m)&&(m.addEventListener("focus",g=>T5(g,u)),!b5(m)&&!m.hasAttribute("tabindex")&&(m.tabIndex=0))}),f}function Pd(n){return Py(n)&&"ownerSVGElement"in n}const sr=new WeakMap;let fa;const Zx=(n,a,l)=>(o,u)=>u&&u[0]?u[0][n+"Size"]:Pd(o)&&"getBBox"in o?o.getBBox()[a]:o[l],j5=Zx("inline","width","offsetWidth"),A5=Zx("block","height","offsetHeight");function N5({target:n,borderBoxSize:a}){var l;(l=sr.get(n))==null||l.forEach(o=>{o(n,{get width(){return j5(n,a)},get height(){return A5(n,a)}})})}function C5(n){n.forEach(N5)}function M5(){typeof ResizeObserver>"u"||(fa=new ResizeObserver(C5))}function D5(n,a){fa||M5();const l=Yx(n);return l.forEach(o=>{let u=sr.get(o);u||(u=new Set,sr.set(o,u)),u.add(a),fa==null||fa.observe(o)}),()=>{l.forEach(o=>{const u=sr.get(o);u==null||u.delete(a),u!=null&&u.size||fa==null||fa.unobserve(o)})}}const lr=new Set;let Yi;function O5(){Yi=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};lr.forEach(a=>a(n))},window.addEventListener("resize",Yi)}function z5(n){return lr.add(n),Yi||O5(),()=>{lr.delete(n),!lr.size&&typeof Yi=="function"&&(window.removeEventListener("resize",Yi),Yi=void 0)}}function Wv(n,a){return typeof n=="function"?z5(n):D5(n,a)}function R5(n){return Pd(n)&&n.tagName==="svg"}const k5=[...Hx,Ie,sn],L5=n=>k5.find(Bx(n)),Iv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gi=()=>({x:Iv(),y:Iv()}),e0=()=>({min:0,max:0}),tt=()=>({x:e0(),y:e0()}),V5=new WeakMap;function Vr(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function gl(n){return typeof n=="string"||Array.isArray(n)}const Jd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wd=["initial",...Jd];function _r(n){return Vr(n.animate)||Wd.some(a=>gl(n[a]))}function Qx(n){return!!(_r(n)||n.variants)}function _5(n,a,l){for(const o in a){const u=a[o],f=l[o];if(ft(u))n.addValue(o,u);else if(ft(f))n.addValue(o,Qi(u,{owner:n}));else if(f!==u)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(u):d.hasAnimated||d.set(u)}else{const d=n.getStaticValue(o);n.addValue(o,Qi(d!==void 0?d:u,{owner:n}))}}for(const o in l)a[o]===void 0&&n.removeValue(o);return a}const hd={current:null},Px={current:!1},U5=typeof window<"u";function B5(){if(Px.current=!0,!!U5)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>hd.current=n.matches;n.addEventListener("change",a),a()}else hd.current=!1}const t0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Sr={};function Jx(n){Sr=n}function H5(){return Sr}class $5{scrapeMotionValuesFromProps(a,l,o){return{}}constructor({parent:a,props:l,presenceContext:o,reducedMotionConfig:u,skipAnimations:f,blockInitialAnimation:d,visualState:m},p={}){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=qd,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=gt.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,ke.render(this.render,!1,!0))};const{latestValues:g,renderState:y}=m;this.latestValues=g,this.baseTarget={...g},this.initialValues=l.initial?{...g}:{},this.renderState=y,this.parent=a,this.props=l,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=f,this.options=p,this.blockInitialAnimation=!!d,this.isControllingVariants=_r(l),this.isVariantNode=Qx(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:x,...S}=this.scrapeMotionValuesFromProps(l,{},this);for(const T in S){const E=S[T];g[T]!==void 0&&ft(E)&&E.set(g[T])}}mount(a){var l,o;if(this.hasBeenMounted)for(const u in this.initialValues)(l=this.values.get(u))==null||l.jump(this.initialValues[u]),this.latestValues[u]=this.initialValues[u];this.current=a,V5.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,f)=>this.bindToMotionValue(f,u)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Px.current||B5(),this.shouldReduceMotion=hd.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(l=>l()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(a=this.parent)==null||a.removeChild(this);for(const l in this.events)this.events[l].clear();for(const l in this.features){const o=this.features[l];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,l){if(this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)(),l.accelerate&&Ox.has(a)&&this.current instanceof HTMLElement){const{factory:d,keyframes:m,times:p,ease:g,duration:y}=l.accelerate,x=new Mx({element:this.current,name:a,keyframes:m,times:p,ease:g,duration:Ut(y)}),S=d(x);this.valueSubscriptions.set(a,()=>{S(),x.cancel()});return}const o=ts.has(a);o&&this.onBindTransform&&this.onBindTransform();const u=l.on("change",d=>{this.latestValues[a]=d,this.props.onUpdate&&ke.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let f;typeof window<"u"&&window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,a,l)),this.valueSubscriptions.set(a,()=>{u(),f&&f(),l.owner&&l.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 Sr){const l=Sr[a];if(!l)continue;const{isEnabled:o,Feature:u}=l;if(!this.features[a]&&u&&o(this.props)&&(this.features[a]=new u(this)),this.features[a]){const f=this.features[a];f.isMounted?f.update():(f.mount(),f.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,l){this.latestValues[a]=l}update(a,l){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<t0.length;o++){const u=t0[o];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const f="on"+u,d=a[f];d&&(this.propEventSubscriptions[u]=this.on(u,d))}this.prevMotionValues=_5(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 l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(a),()=>l.variantChildren.delete(a)}addValue(a,l){const o=this.values.get(a);l!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,l),this.values.set(a,l),this.latestValues[a]=l.get())}removeValue(a){this.values.delete(a);const l=this.valueSubscriptions.get(a);l&&(l(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,l){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&l!==void 0&&(o=Qi(l===null?void 0:l,{owner:this}),this.addValue(a,o)),o}readValue(a,l){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"&&(Qy(o)||Jy(o))?o=parseFloat(o):!L5(o)&&sn.test(l)&&(o=qx(a,l)),this.setBaseTarget(a,ft(o)?o.get():o)),ft(o)?o.get():o}setBaseTarget(a,l){this.baseTarget[a]=l}getBaseTarget(a){var f;const{initial:l}=this.props;let o;if(typeof l=="string"||typeof l=="object"){const d=Xd(this.props,l,(f=this.presenceContext)==null?void 0:f.custom);d&&(o=d[a])}if(l&&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,l){return this.events[a]||(this.events[a]=new Rd),this.events[a].add(l)}notify(a,...l){this.events[a]&&this.events[a].notify(...l)}scheduleRenderMicrotask(){Zd.render(this.render)}}class Wx extends $5{constructor(){super(...arguments),this.KeyframeResolver=m5}sortInstanceNodePosition(a,l){return a.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(a,l){const o=a.style;return o?o[l]:void 0}removeValueFromRenderState(a,{vars:l,style:o}){delete l[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;ft(a)&&(this.childSubscription=a.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}class Sa{constructor(a){this.isMounted=!1,this.node=a}update(){}}function Ix({top:n,left:a,right:l,bottom:o}){return{x:{min:a,max:l},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 Y5(n,a){if(!a)return n;const l=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Ef(n){return n===void 0||n===1}function md({scale:n,scaleX:a,scaleY:l}){return!Ef(n)||!Ef(a)||!Ef(l)}function Ya(n){return md(n)||eb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function eb(n){return n0(n.x)||n0(n.y)}function n0(n){return n&&n!=="0%"}function wr(n,a,l){const o=n-l,u=a*o;return l+u}function a0(n,a,l,o,u){return u!==void 0&&(n=wr(n,u,o)),wr(n,l,o)+a}function pd(n,a=0,l=1,o,u){n.min=a0(n.min,a,l,o,u),n.max=a0(n.max,a,l,o,u)}function tb(n,{x:a,y:l}){pd(n.x,a.translate,a.scale,a.originPoint),pd(n.y,l.translate,l.scale,l.originPoint)}const i0=.999999999999,s0=1.0000000000001;function G5(n,a,l,o=!1){var m;const u=l.length;if(!u)return;a.x=a.y=1;let f,d;for(let p=0;p<u;p++){f=l[p],d=f.projectionDelta;const{visualElement:g}=f.options;g&&g.props.style&&g.props.style.display==="contents"||(o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(dn(n.x,-f.scroll.offset.x),dn(n.y,-f.scroll.offset.y)),d&&(a.x*=d.x.scale,a.y*=d.y.scale,tb(n,d)),o&&Ya(f.latestValues)&&or(n,f.latestValues,(m=f.layout)==null?void 0:m.layoutBox))}a.x<s0&&a.x>i0&&(a.x=1),a.y<s0&&a.y>i0&&(a.y=1)}function dn(n,a){n.min+=a,n.max+=a}function l0(n,a,l,o,u=.5){const f=He(n.min,n.max,u);pd(n,a,l,f,o)}function o0(n,a){return typeof n=="string"?parseFloat(n)/100*(a.max-a.min):n}function or(n,a,l){const o=l??n;l0(n.x,o0(a.x,o.x),a.scaleX,a.scale,a.originX),l0(n.y,o0(a.y,o.y),a.scaleY,a.scale,a.originY)}function nb(n,a){return Ix(Y5(n.getBoundingClientRect(),a))}function X5(n,a,l){const o=nb(n,l),{scroll:u}=a;return u&&(dn(o.x,u.offset.x),dn(o.y,u.offset.y)),o}const K5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},F5=es.length;function Z5(n,a,l){let o="",u=!0;for(let f=0;f<F5;f++){const d=es[f],m=n[d];if(m===void 0)continue;let p=!0;if(typeof m=="number")p=m===(d.startsWith("scale")?1:0);else{const g=parseFloat(m);p=d.startsWith("scale")?g===1:g===0}if(!p||l){const g=Gx(m,Fd[d]);if(!p){u=!1;const y=K5[d]||d;o+=`${y}(${g}) `}l&&(a[d]=g)}}return o=o.trim(),l?o=l(a,u?"":o):u&&(o="none"),o}function Id(n,a,l){const{style:o,vars:u,transformOrigin:f}=n;let d=!1,m=!1;for(const p in a){const g=a[p];if(ts.has(p)){d=!0;continue}else if(dx(p)){u[p]=g;continue}else{const y=Gx(g,Fd[p]);p.startsWith("origin")?(m=!0,f[p]=y):o[p]=y}}if(a.transform||(d||l?o.transform=Z5(a,n.transform,l):o.transform&&(o.transform="none")),m){const{originX:p="50%",originY:g="50%",originZ:y=0}=f;o.transformOrigin=`${p} ${g} ${y}`}}function ab(n,{style:a,vars:l},o,u){const f=n.style;let d;for(d in a)f[d]=a[d];u==null||u.applyProjectionStyles(f,o);for(d in l)f.setProperty(d,l[d])}function r0(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 l=r0(n,a.target.x),o=r0(n,a.target.y);return`${l}% ${o}%`}},Q5={correct:(n,{treeScale:a,projectionDelta:l})=>{const o=n,u=sn.parse(n);if(u.length>5)return o;const f=sn.createTransformer(n),d=typeof u[0]!="number"?1:0,m=l.x.scale*a.x,p=l.y.scale*a.y;u[0+d]/=m,u[1+d]/=p;const g=He(m,p,.5);return typeof u[2+d]=="number"&&(u[2+d]/=g),typeof u[3+d]=="number"&&(u[3+d]/=g),f(u)}},gd={borderRadius:{...Js,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Js,borderTopRightRadius:Js,borderBottomLeftRadius:Js,borderBottomRightRadius:Js,boxShadow:Q5};function ib(n,{layout:a,layoutId:l}){return ts.has(n)||n.startsWith("origin")||(a||l!==void 0)&&(!!gd[n]||n==="opacity")}function eh(n,a,l){var d;const o=n.style,u=a==null?void 0:a.style,f={};if(!o)return f;for(const m in o)(ft(o[m])||u&&ft(u[m])||ib(m,n)||((d=l==null?void 0:l.getValue(m))==null?void 0:d.liveStyle)!==void 0)&&(f[m]=o[m]);return f}function P5(n){return window.getComputedStyle(n)}class J5 extends Wx{constructor(){super(...arguments),this.type="html",this.renderInstance=ab}readValueFromInstance(a,l){var o;if(ts.has(l))return(o=this.projection)!=null&&o.isProjecting?nd(l):gj(a,l);{const u=P5(a),f=(dx(l)?u.getPropertyValue(l):u[l])||0;return typeof f=="string"?f.trim():f}}measureInstanceViewportBox(a,{transformPagePoint:l}){return nb(a,l)}build(a,l,o){Id(a,l,o.transformTemplate)}scrapeMotionValuesFromProps(a,l,o){return eh(a,l,o)}}const W5={offset:"stroke-dashoffset",array:"stroke-dasharray"},I5={offset:"strokeDashoffset",array:"strokeDasharray"};function eA(n,a,l=1,o=0,u=!0){n.pathLength=1;const f=u?W5:I5;n[f.offset]=`${-o}`,n[f.array]=`${a} ${l}`}const tA=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function sb(n,{attrX:a,attrY:l,attrScale:o,pathLength:u,pathSpacing:f=1,pathOffset:d=0,...m},p,g,y){if(Id(n,m,g),p){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 tA)x[T]!==void 0&&(S[T]=x[T],delete x[T]);a!==void 0&&(x.x=a),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),u!==void 0&&eA(x,u,f,d,!1)}const lb=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"]),ob=n=>typeof n=="string"&&n.toLowerCase()==="svg";function nA(n,a,l,o){ab(n,a,void 0,o);for(const u in a.attrs)n.setAttribute(lb.has(u)?u:Kd(u),a.attrs[u])}function rb(n,a,l){const o=eh(n,a,l);for(const u in n)if(ft(n[u])||ft(a[u])){const f=es.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;o[f]=n[u]}return o}class aA extends Wx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=tt}getBaseTargetFromProps(a,l){return a[l]}readValueFromInstance(a,l){if(ts.has(l)){const o=$x(l);return o&&o.default||0}return l=lb.has(l)?l:Kd(l),a.getAttribute(l)}scrapeMotionValuesFromProps(a,l,o){return rb(a,l,o)}build(a,l,o){sb(a,l,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(a,l,o,u){nA(a,l,o,u)}mount(a){this.isSVGTag=ob(a.tagName),super.mount(a)}}const iA=Wd.length;function ub(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?ub(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const a={};for(let l=0;l<iA;l++){const o=Wd[l],u=n.props[o];(gl(u)||u===!1)&&(a[o]=u)}return a}function cb(n,a){if(!Array.isArray(a))return!1;const l=a.length;if(l!==n.length)return!1;for(let o=0;o<l;o++)if(a[o]!==n[o])return!1;return!0}const sA=[...Jd].reverse(),lA=Jd.length;function oA(n){return a=>Promise.all(a.map(({animation:l,options:o})=>a5(n,l,o)))}function rA(n){let a=oA(n),l=u0(),o=!0,u=!1;const f=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:E,transitionEnd:j,...D}=S;y={...y,...D,...j}}return y};function d(g){a=g(n)}function m(g){const{props:y}=n,x=ub(n.parent)||{},S=[],T=new Set;let E={},j=1/0;for(let z=0;z<lA;z++){const O=sA[z],V=l[O],R=y[O]!==void 0?y[O]:x[O],U=gl(R),P=O===g?V.isActive:null;P===!1&&(j=z);let F=R===x[O]&&R!==y[O]&&U;if(F&&(o||u)&&n.manuallyAnimateOnMount&&(F=!1),V.protectedKeys={...E},!V.isActive&&P===null||!R&&!V.prevProp||Vr(R)||typeof R=="boolean")continue;if(O==="exit"&&V.isActive&&P!==!0){V.prevResolvedValues&&(E={...E,...V.prevResolvedValues});continue}const W=uA(V.prevProp,R);let oe=W||O===g&&V.isActive&&!F&&U||z>j&&U,B=!1;const Z=Array.isArray(R)?R:[R];let ie=Z.reduce(f(O),{});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(E.hasOwnProperty(J))continue;let N=!1;rd(re)&&rd(me)?N=!cb(re,me):N=re!==me,N?re!=null?De(J):T.add(J):re!==void 0&&T.has(J)?De(J):V.protectedKeys[J]=!0}V.prevProp=R,V.prevResolvedValues=ie,V.isActive&&(E={...E,...ie}),(o||u)&&n.blockInitialAnimation&&(oe=!1);const $=F&&W;oe&&(!$||B)&&S.push(...Z.map(J=>{const re={type:O};if(typeof J=="string"&&(o||u)&&!$&&n.manuallyAnimateOnMount&&n.parent){const{parent:me}=n,N=Ja(me,J);if(me.enteringChildren&&N){const{delayChildren:G}=N.transition||{};re.delay=zx(me.enteringChildren,n,G)}}return{animation:J,options:re}}))}if(T.size){const z={};if(typeof y.initial!="boolean"){const O=Ja(n,Array.isArray(y.initial)?y.initial[0]:y.initial);O&&O.transition&&(z.transition=O.transition)}T.forEach(O=>{const V=n.getBaseTarget(O),R=n.getValue(O);R&&(R.liveStyle=!0),z[O]=V??null}),S.push({animation:z})}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 p(g,y){var S;if(l[g].isActive===y)return Promise.resolve();(S=n.variantChildren)==null||S.forEach(T=>{var E;return(E=T.animationState)==null?void 0:E.setActive(g,y)}),l[g].isActive=y;const x=m(g);for(const T in l)l[T].protectedKeys={};return x}return{animateChanges:m,setActive:p,setAnimateFunction:d,getState:()=>l,reset:()=>{l=u0(),u=!0}}}function uA(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!cb(a,n):!1}function $a(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function u0(){return{animate:$a(!0),whileInView:$a(),whileHover:$a(),whileTap:$a(),whileDrag:$a(),whileFocus:$a(),exit:$a()}}function vd(n,a){n.min=a.min,n.max=a.max}function tn(n,a){vd(n.x,a.x),vd(n.y,a.y)}function c0(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}const fb=1e-4,cA=1-fb,fA=1+fb,db=.01,dA=0-db,hA=0+db;function vt(n){return n.max-n.min}function mA(n,a,l){return Math.abs(n-a)<=l}function f0(n,a,l,o=.5){n.origin=o,n.originPoint=He(a.min,a.max,n.origin),n.scale=vt(l)/vt(a),n.translate=He(l.min,l.max,n.origin)-n.originPoint,(n.scale>=cA&&n.scale<=fA||isNaN(n.scale))&&(n.scale=1),(n.translate>=dA&&n.translate<=hA||isNaN(n.translate))&&(n.translate=0)}function fl(n,a,l,o){f0(n.x,a.x,l.x,o?o.originX:void 0),f0(n.y,a.y,l.y,o?o.originY:void 0)}function d0(n,a,l,o=0){const u=o?He(l.min,l.max,o):l.min;n.min=u+a.min,n.max=n.min+vt(a)}function pA(n,a,l,o){d0(n.x,a.x,l.x,o==null?void 0:o.x),d0(n.y,a.y,l.y,o==null?void 0:o.y)}function h0(n,a,l,o=0){const u=o?He(l.min,l.max,o):l.min;n.min=a.min-u,n.max=n.min+vt(a)}function Tr(n,a,l,o){h0(n.x,a.x,l.x,o==null?void 0:o.x),h0(n.y,a.y,l.y,o==null?void 0:o.y)}function m0(n,a,l,o,u){return n-=a,n=wr(n,1/l,o),u!==void 0&&(n=wr(n,1/u,o)),n}function gA(n,a=0,l=1,o=.5,u,f=n,d=n){if(mn.test(a)&&(a=parseFloat(a),a=He(d.min,d.max,a/100)-d.min),typeof a!="number")return;let m=He(f.min,f.max,o);n===f&&(m-=a),n.min=m0(n.min,a,l,m,u),n.max=m0(n.max,a,l,m,u)}function p0(n,a,[l,o,u],f,d){gA(n,a[l],a[o],a[u],a.scale,f,d)}const vA=["x","scaleX","originX"],yA=["y","scaleY","originY"];function g0(n,a,l,o){p0(n.x,a,vA,l?l.x:void 0,o?o.x:void 0),p0(n.y,a,yA,l?l.y:void 0,o?o.y:void 0)}function v0(n){return n.translate===0&&n.scale===1}function hb(n){return v0(n.x)&&v0(n.y)}function y0(n,a){return n.min===a.min&&n.max===a.max}function xA(n,a){return y0(n.x,a.x)&&y0(n.y,a.y)}function x0(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function mb(n,a){return x0(n.x,a.x)&&x0(n.y,a.y)}function b0(n){return vt(n.x)/vt(n.y)}function S0(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function fn(n){return[n("x"),n("y")]}function bA(n,a,l){let o="";const u=n.x.translate/a.x,f=n.y.translate/a.y,d=(l==null?void 0:l.z)||0;if((u||f||d)&&(o=`translate3d(${u}px, ${f}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),l){const{transformPerspective:g,rotate:y,rotateX:x,rotateY:S,skewX:T,skewY:E}=l;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) `),E&&(o+=`skewY(${E}deg) `)}const m=n.x.scale*a.x,p=n.y.scale*a.y;return(m!==1||p!==1)&&(o+=`scale(${m}, ${p})`),o||"none"}const pb=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],SA=pb.length,w0=n=>typeof n=="string"?parseFloat(n):n,T0=n=>typeof n=="number"||te.test(n);function wA(n,a,l,o,u,f){u?(n.opacity=He(0,l.opacity??1,TA(o)),n.opacityExit=He(a.opacity??1,0,EA(o))):f&&(n.opacity=He(a.opacity??1,l.opacity??1,o));for(let d=0;d<SA;d++){const m=pb[d];let p=E0(a,m),g=E0(l,m);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||T0(p)===T0(g)?(n[m]=Math.max(He(w0(p),w0(g),o),0),(mn.test(g)||mn.test(p))&&(n[m]+="%")):n[m]=g}(a.rotate||l.rotate)&&(n.rotate=He(a.rotate||0,l.rotate||0,o))}function E0(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const TA=gb(0,.5,lx),EA=gb(.5,.95,Jt);function gb(n,a,l){return o=>o<n?0:o>a?1:l(ml(n,a,o))}function jA(n,a,l){const o=ft(n)?n:Qi(n);return o.start(Gd("",o,a,l)),o.animation}function vl(n,a,l,o={passive:!0}){return n.addEventListener(a,l,o),()=>n.removeEventListener(a,l)}const AA=(n,a)=>n.depth-a.depth;class NA{constructor(){this.children=[],this.isDirty=!1}add(a){Od(this.children,a),this.isDirty=!0}remove(a){gr(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(AA),this.isDirty=!1,this.children.forEach(a)}}function CA(n,a){const l=gt.now(),o=({timestamp:u})=>{const f=u-l;f>=a&&(ya(o),n(f-a))};return ke.setup(o,!0),()=>ya(o)}function rr(n){return ft(n)?n.get():n}class MA{constructor(){this.members=[]}add(a){Od(this.members,a);for(let l=this.members.length-1;l>=0;l--){const o=this.members[l];if(o===a||o===this.lead||o===this.prevLead)continue;const u=o.instance;(!u||u.isConnected===!1)&&!o.snapshot&&(gr(this.members,o),o.unmount())}a.scheduleRender()}remove(a){if(gr(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(a){var l;for(let o=this.members.indexOf(a)-1;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1&&((l=u.instance)==null?void 0:l.isConnected)!==!1)return this.promote(u),!0}return!1}promote(a,l){var u;const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.updateSnapshot(),a.scheduleRender();const{layoutDependency:f}=o.options,{layoutDependency:d}=a.options;(f===void 0||f!==d)&&(a.resumeFrom=o,l&&(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 l,o,u,f,d;(o=(l=a.options).onExitComplete)==null||o.call(l),(d=(u=a.resumingFrom)==null?void 0:(f=u.options).onExitComplete)==null||d.call(f)})}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 ur={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jf=["","X","Y","Z"],DA=1e3;let OA=0;function Af(n,a,l,o){const{latestValues:u}=a;u[n]&&(l[n]=u[n],a.setStaticValue(n,0),o&&(o[n]=0))}function vb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const l=_x(a);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:f}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",ke,!(u||f))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&vb(o)}function yb({attachResizeListener:n,defaultParent:a,measureScroll:l,checkIsScrollRoot:o,resetTransform:u}){return class{constructor(d={},m=a==null?void 0:a()){this.id=OA++,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(kA),this.nodes.forEach(HA),this.nodes.forEach($A),this.nodes.forEach(LA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new NA)}addEventListener(d,m){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new Rd),this.eventHandlers.get(d).add(m)}notifyListeners(d,...m){const p=this.eventHandlers.get(d);p&&p.notify(...m)}hasListeners(d){return this.eventHandlers.has(d)}mount(d){if(this.instance)return;this.isSVG=Pd(d)&&!R5(d),this.instance=d;const{layoutId:m,layout:p,visualElement:g}=this.options;if(g&&!g.current&&g.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(p||m)&&(this.isLayoutDirty=!0),n){let y,x=0;const S=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{x=window.innerWidth}),n(d,()=>{const T=window.innerWidth;T!==x&&(x=T,this.root.updateBlockedByResize=!0,y&&y(),y=CA(S,250),ur.hasAnimatedSinceResize&&(ur.hasAnimatedSinceResize=!1,this.nodes.forEach(N0)))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&g&&(m||p)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:x,hasRelativeLayoutChanged:S,layout:T})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||g.getDefaultTransition()||KA,{onLayoutAnimationStart:j,onLayoutAnimationComplete:D}=g.getProps(),z=!this.targetLayout||!mb(this.targetLayout,T),O=!x&&S;if(this.options.layoutRoot||this.resumeFrom||O||x&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const V={...Yd(E,"layout"),onPlay:j,onComplete:D};(g.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V),this.setAnimationOrigin(y,O)}else x||N0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=T})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.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(qA),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vb(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:m,layout:p}=this.options;if(m===void 0&&!p)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const p=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),p&&this.nodes.forEach(_A),this.nodes.forEach(j0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(A0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(UA),this.nodes.forEach(BA),this.nodes.forEach(zA),this.nodes.forEach(RA)):this.nodes.forEach(A0),this.clearAllSnapshots();const m=gt.now();ct.delta=pn(0,1e3/60,m-ct.timestamp),ct.timestamp=m,ct.isProcessing=!0,vf.update.process(ct),vf.preRender.process(ct),vf.render.process(ct),ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VA),this.sharedNodes.forEach(YA)}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&&!vt(this.snapshot.measuredBox.x)&&!vt(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 p=0;p<this.path.length;p++)this.path[p].updateScroll();const d=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:m}=this.options;m&&m.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(m=!1),m&&this.instance){const p=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:p,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!u)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!hb(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;d&&this.instance&&(m||Ya(this.latestValues)||y)&&(u(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return d&&(p=this.removeTransform(p)),FA(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var g;const{visualElement:d}=this.options;if(!d)return tt();const m=d.measureViewportBox();if(!(((g=this.scroll)==null?void 0:g.wasRoot)||this.path.some(ZA))){const{scroll:y}=this.root;y&&(dn(m.x,y.offset.x),dn(m.y,y.offset.y))}return m}removeElementScroll(d){var p;const m=tt();if(tn(m,d),(p=this.scroll)!=null&&p.wasRoot)return m;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(m,d),dn(m.x,x.offset.x),dn(m.y,x.offset.y))}return m}applyTransform(d,m=!1,p){var y,x;const g=p||tt();tn(g,d);for(let S=0;S<this.path.length;S++){const T=this.path[S];!m&&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)&&or(g,T.latestValues,(y=T.layout)==null?void 0:y.layoutBox)}return Ya(this.latestValues)&&or(g,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),g}removeTransform(d){var p;const m=tt();tn(m,d);for(let g=0;g<this.path.length;g++){const y=this.path[g];if(!Ya(y.latestValues))continue;let x;y.instance&&(md(y.latestValues)&&y.updateSnapshot(),x=tt(),tn(x,y.measurePageBox())),g0(m,y.latestValues,(p=y.snapshot)==null?void 0:p.layoutBox,x)}return Ya(this.latestValues)&&g0(m,this.latestValues),m}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.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(d=!1){var T;const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const p=!!this.resumingFrom||this!==m;if(!(d||p&&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(),pA(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),tb(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||md(this.parent.latestValues)||eb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(d,m,p){this.relativeParent=d,this.linkedParentVersion=d.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=tt(),this.relativeTargetOrigin=tt(),Tr(this.relativeTargetOrigin,m,p,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var E;const d=this.getLead(),m=!!this.resumingFrom||this!==d;let p=!0;if((this.isProjectionDirty||(E=this.parent)!=null&&E.isProjectionDirty)&&(p=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(p=!1),this.resolvedRelativeTargetAt===ct.timestamp&&(p=!1),p)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;G5(this.layoutCorrected,this.treeScale,this.path,m),d.layout&&!d.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(d.target=d.layout.layoutBox,d.targetWithTransforms=tt());const{target:T}=d;if(!T){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(c0(this.prevProjectionDelta.x,this.projectionDelta.x),c0(this.prevProjectionDelta.y,this.projectionDelta.y)),fl(this.projectionDelta,this.layoutCorrected,T,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==S||!S0(this.projectionDelta.x,this.prevProjectionDelta.x)||!S0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",T))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var m;if((m=this.options.visualElement)==null||m.scheduleRender(),d){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gi(),this.projectionDelta=Gi(),this.projectionDeltaWithTransform=Gi()}setAnimationOrigin(d,m=!1){const p=this.snapshot,g=p?p.latestValues:{},y={...this.latestValues},x=Gi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const S=tt(),T=p?p.source:void 0,E=this.layout?this.layout.source:void 0,j=T!==E,D=this.getStack(),z=!D||D.members.length<=1,O=!!(j&&!z&&this.options.crossfade===!0&&!this.path.some(XA));this.animationProgress=0;let V;this.mixTargetDelta=R=>{const U=R/1e3;C0(x.x,d.x,U),C0(x.y,d.y,U),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tr(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),GA(this.relativeTarget,this.relativeTargetOrigin,S,U),V&&xA(this.relativeTarget,V)&&(this.isProjectionDirty=!1),V||(V=tt()),tn(V,this.relativeTarget)),j&&(this.animationValues=y,wA(y,g,this.latestValues,U,O,z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=U},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){var m,p,g;this.notifyListeners("animationStart"),(m=this.currentAnimation)==null||m.stop(),(g=(p=this.resumingFrom)==null?void 0:p.currentAnimation)==null||g.stop(),this.pendingAnimation&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{ur.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=jA(this.motionValue,[0,1e3],{...d,velocity:0,isSync:!0,onUpdate:y=>{this.mixTargetDelta(y),d.onUpdate&&d.onUpdate(y)},onStop:()=>{},onComplete:()=>{d.onComplete&&d.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 d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(DA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:m,target:p,layout:g,latestValues:y}=d;if(!(!m||!p||!g)){if(this!==d&&this.layout&&g&&xb(this.options.animationType,this.layout.layoutBox,g.layoutBox)){p=this.target||tt();const x=vt(this.layout.layoutBox.x);p.x.min=d.target.x.min,p.x.max=p.x.min+x;const S=vt(this.layout.layoutBox.y);p.y.min=d.target.y.min,p.y.max=p.y.min+S}tn(m,p),or(m,y),fl(this.projectionDeltaWithTransform,this.layoutCorrected,m,y)}}registerSharedNode(d,m){this.sharedNodes.has(d)||this.sharedNodes.set(d,new MA),this.sharedNodes.get(d).add(m);const g=m.options.initialPromotionConfig;m.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(m):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var m;const{layoutId:d}=this.options;return d?((m=this.getStack())==null?void 0:m.lead)||this:this}getPrevLead(){var m;const{layoutId:d}=this.options;return d?(m=this.getStack())==null?void 0:m.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:m,preserveFollowOpacity:p}={}){const g=this.getStack();g&&g.promote(this,p),d&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let m=!1;const{latestValues:p}=d;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const g={};p.z&&Af("z",d,g,this.animationValues);for(let y=0;y<jf.length;y++)Af(`rotate${jf[y]}`,d,g,this.animationValues),Af(`skew${jf[y]}`,d,g,this.animationValues);d.render();for(const y in g)d.setStaticValue(y,g[y]),this.animationValues&&(this.animationValues[y]=g[y]);d.scheduleRender()}applyProjectionStyles(d,m){if(!this.instance||this.isSVG)return;if(!this.isVisible){d.visibility="hidden";return}const p=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,d.visibility="",d.opacity="",d.pointerEvents=rr(m==null?void 0:m.pointerEvents)||"",d.transform=p?p(this.latestValues,""):"none";return}const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=rr(m==null?void 0:m.pointerEvents)||""),this.hasProjected&&!Ya(this.latestValues)&&(d.transform=p?p({},""):"none",this.hasProjected=!1);return}d.visibility="";const y=g.animationValues||g.latestValues;this.applyTransformsToTarget();let x=bA(this.projectionDeltaWithTransform,this.treeScale,y);p&&(x=p(y,x)),d.transform=x;const{x:S,y:T}=this.projectionDelta;d.transformOrigin=`${S.origin*100}% ${T.origin*100}% 0`,g.animationValues?d.opacity=g===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:d.opacity=g===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const E in gd){if(y[E]===void 0)continue;const{correct:j,applyTo:D,isCSSVariable:z}=gd[E],O=x==="none"?y[E]:j(y[E],g);if(D){const V=D.length;for(let R=0;R<V;R++)d[D[R]]=O}else z?this.options.visualElement.renderState.vars[E]=O:d[E]=O}this.options.layoutId&&(d.pointerEvents=g===this?rr(m==null?void 0:m.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var m;return(m=d.currentAnimation)==null?void 0:m.stop()}),this.root.nodes.forEach(j0),this.root.sharedNodes.clear()}}}function zA(n){n.updateLayout()}function RA(n){var l;const a=((l=n.resumeFrom)==null?void 0:l.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:u}=n.layout,{animationType:f}=n.options,d=a.source!==n.layout.source;if(f==="size")fn(x=>{const S=d?a.measuredBox[x]:a.layoutBox[x],T=vt(S);S.min=o[x].min,S.max=S.min+T});else if(f==="x"||f==="y"){const x=f==="x"?"y":"x";vd(d?a.measuredBox[x]:a.layoutBox[x],o[x])}else xb(f,a.layoutBox,o)&&fn(x=>{const S=d?a.measuredBox[x]:a.layoutBox[x],T=vt(o[x]);S.max=S.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[x].max=n.relativeTarget[x].min+T)});const m=Gi();fl(m,o,a.layoutBox);const p=Gi();d?fl(p,n.applyTransform(u,!0),a.measuredBox):fl(p,o,a.layoutBox);const g=!hb(m);let y=!1;if(!n.resumeFrom){const x=n.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:S,layout:T}=x;if(S&&T){const E=n.options.layoutAnchor||void 0,j=tt();Tr(j,a.layoutBox,S.layoutBox,E);const D=tt();Tr(D,o,T.layoutBox,E),mb(j,D)||(y=!0),x.options.layoutRoot&&(n.relativeTarget=D,n.relativeTargetOrigin=j,n.relativeParent=x)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:a,delta:p,layoutDelta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function kA(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 LA(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function VA(n){n.clearSnapshot()}function j0(n){n.clearMeasurements()}function _A(n){n.isLayoutDirty=!0,n.updateLayout()}function A0(n){n.isLayoutDirty=!1}function UA(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function BA(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function N0(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function HA(n){n.resolveTargetDelta()}function $A(n){n.calcProjection()}function qA(n){n.resetSkewAndRotation()}function YA(n){n.removeLeadSnapshot()}function C0(n,a,l){n.translate=He(a.translate,0,l),n.scale=He(a.scale,1,l),n.origin=a.origin,n.originPoint=a.originPoint}function M0(n,a,l,o){n.min=He(a.min,l.min,o),n.max=He(a.max,l.max,o)}function GA(n,a,l,o){M0(n.x,a.x,l.x,o),M0(n.y,a.y,l.y,o)}function XA(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const KA={duration:.45,ease:[.4,0,.1,1]},D0=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),O0=D0("applewebkit/")&&!D0("chrome/")?Math.round:Jt;function z0(n){n.min=O0(n.min),n.max=O0(n.max)}function FA(n){z0(n.x),z0(n.y)}function xb(n,a,l){return n==="position"||n==="preserve-aspect"&&!mA(b0(a),b0(l),.2)}function ZA(n){var a;return n!==n.root&&((a=n.scroll)==null?void 0:a.wasRoot)}const QA=yb({attachResizeListener:(n,a)=>vl(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}),PA=n=>!n.isLayoutDirty&&n.willUpdate(!1);function R0(){const n=new Set,a=new WeakMap,l=()=>n.forEach(PA);return{add:o=>{n.add(o),a.set(o,o.addEventListener("willUpdate",l))},remove:o=>{n.delete(o);const u=a.get(o);u&&(u(),a.delete(o)),l()},dirty:l}}const Nf={current:void 0},bb=yb({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Nf.current){const n=new QA({});n.mount(window),n.setOptions({layoutScroll:!0}),Nf.current=n}return Nf.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),Sb=w.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function JA(n=!0){const a=w.useContext(Dd);if(a===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:u}=a,f=w.useId();w.useEffect(()=>{if(n)return u(f)},[n]);const d=w.useCallback(()=>n&&o&&o(f),[f,o,n]);return!l&&o?[!1,d]:[!0]}const WA=w.createContext(null);function IA(){const n=w.useRef(!1);return Zy(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function eN(){const n=IA(),[a,l]=w.useState(0),o=w.useCallback(()=>{n.current&&l(a+1)},[a]);return[w.useCallback(()=>ke.postRender(o),[o]),a]}const wb=n=>n===!0,tN=n=>wb(n===!0)||n==="id",Tb=({children:n,id:a,inherit:l=!0})=>{const o=w.useContext(pr),u=w.useContext(WA),[f,d]=eN(),m=w.useRef(null),p=o.id||u;m.current===null&&(tN(l)&&p&&(a=a?p+"-"+a:p),m.current={id:a,group:wb(l)&&o.group||R0()});const g=w.useMemo(()=>({...m.current,forceRender:f}),[d]);return h.jsx(pr.Provider,{value:g,children:n})},Eb=w.createContext({strict:!1}),k0={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 L0=!1;function nN(){if(L0)return;const n={};for(const a in k0)n[a]={isEnabled:l=>k0[a].some(o=>!!l[o])};Jx(n),L0=!0}function jb(){return nN(),H5()}function aN(n){const a=jb();for(const l in n)a[l]={...a[l],...n[l]};Jx(a)}const iN=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 Er(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||iN.has(n)}let Ab=n=>!Er(n);function sN(n){typeof n=="function"&&(Ab=a=>a.startsWith("on")?!Er(a):n(a))}try{sN(require("@emotion/is-prop-valid").default)}catch{}function lN(n,a,l){const o={};for(const u in n)u==="values"&&typeof n.values=="object"||ft(n[u])||(Ab(u)||l===!0&&Er(u)||!a&&!Er(u)||n.draggable&&u.startsWith("onDrag"))&&(o[u]=n[u]);return o}const Ur=w.createContext({});function oN(n,a){if(_r(n)){const{initial:l,animate:o}=n;return{initial:l===!1||gl(l)?l:void 0,animate:gl(o)?o:void 0}}return n.inherit!==!1?a:{}}function rN(n){const{initial:a,animate:l}=oN(n,w.useContext(Ur));return w.useMemo(()=>({initial:a,animate:l}),[V0(a),V0(l)])}function V0(n){return Array.isArray(n)?n.join(" "):n}const th=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Nb(n,a,l){for(const o in a)!ft(a[o])&&!ib(o,l)&&(n[o]=a[o])}function uN({transformTemplate:n},a){return w.useMemo(()=>{const l=th();return Id(l,a,n),Object.assign({},l.vars,l.style)},[a])}function cN(n,a){const l=n.style||{},o={};return Nb(o,l,n),Object.assign(o,uN(n,a)),o}function fN(n,a){const l={},o=cN(n,a);return n.drag&&n.dragListener!==!1&&(l.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)&&(l.tabIndex=0),l.style=o,l}const Cb=()=>({...th(),attrs:{}});function dN(n,a,l,o){const u=w.useMemo(()=>{const f=Cb();return sb(f,a,ob(o),n.transformTemplate,n.style),{...f.attrs,style:{...f.style}}},[a]);if(n.style){const f={};Nb(f,n.style,n),u.style={...f,...u.style}}return u}const hN=["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 nh(n){return typeof n!="string"||n.includes("-")?!1:!!(hN.indexOf(n)>-1||/[A-Z]/u.test(n))}function mN(n,a,l,{latestValues:o},u,f=!1,d){const p=(d??nh(n)?dN:fN)(a,o,u,n),g=lN(a,typeof n=="string",f),y=n!==w.Fragment?{...g,...p,ref:l}:{},{children:x}=a,S=w.useMemo(()=>ft(x)?x.get():x,[x]);return w.createElement(n,{...y,children:S})}function pN({scrapeMotionValuesFromProps:n,createRenderState:a},l,o,u){return{latestValues:gN(l,o,u,n),renderState:a()}}function gN(n,a,l,o){const u={},f=o(n,{});for(const S in f)u[S]=rr(f[S]);let{initial:d,animate:m}=n;const p=_r(n),g=Qx(n);a&&g&&!p&&n.inherit!==!1&&(d===void 0&&(d=a.initial),m===void 0&&(m=a.animate));let y=l?l.initial===!1:!1;y=y||d===!1;const x=y?m:d;if(x&&typeof x!="boolean"&&!Vr(x)){const S=Array.isArray(x)?x:[x];for(let T=0;T<S.length;T++){const E=Xd(n,S[T]);if(E){const{transitionEnd:j,transition:D,...z}=E;for(const O in z){let V=z[O];if(Array.isArray(V)){const R=y?V.length-1:0;V=V[R]}V!==null&&(u[O]=V)}for(const O in j)u[O]=j[O]}}}return u}const Mb=n=>(a,l)=>{const o=w.useContext(Ur),u=w.useContext(Dd),f=()=>pN(n,a,o,u);return l?f():uE(f)},vN=Mb({scrapeMotionValuesFromProps:eh,createRenderState:th}),yN=Mb({scrapeMotionValuesFromProps:rb,createRenderState:Cb}),xN=Symbol.for("motionComponentSymbol");function bN(n,a,l){const o=w.useRef(l);w.useInsertionEffect(()=>{o.current=l});const u=w.useRef(null);return w.useCallback(f=>{var m;f&&((m=n.onMount)==null||m.call(n,f));const d=o.current;if(typeof d=="function")if(f){const p=d(f);typeof p=="function"&&(u.current=p)}else u.current?(u.current(),u.current=null):d(f);else d&&(d.current=f);a&&(f?a.mount(f):a.unmount())},[a])}const Db=w.createContext({});function $i(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function SN(n,a,l,o,u,f){var V,R;const{visualElement:d}=w.useContext(Ur),m=w.useContext(Eb),p=w.useContext(Dd),g=w.useContext(Sb),y=g.reducedMotion,x=g.skipAnimations,S=w.useRef(null),T=w.useRef(!1);o=o||m.renderer,!S.current&&o&&(S.current=o(n,{visualState:a,parent:d,props:l,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:y,skipAnimations:x,isSVG:f}),T.current&&S.current&&(S.current.manuallyAnimateOnMount=!0));const E=S.current,j=w.useContext(Db);E&&!E.projection&&u&&(E.type==="html"||E.type==="svg")&&wN(S.current,l,u,j);const D=w.useRef(!1);w.useInsertionEffect(()=>{E&&D.current&&E.update(l,p)});const z=l[Vx],O=w.useRef(!!z&&typeof window<"u"&&!((V=window.MotionHandoffIsComplete)!=null&&V.call(window,z))&&((R=window.MotionHasOptimisedAnimation)==null?void 0:R.call(window,z)));return Zy(()=>{T.current=!0,E&&(D.current=!0,window.MotionIsMounted=!0,E.updateFeatures(),E.scheduleRenderMicrotask(),O.current&&E.animationState&&E.animationState.animateChanges())}),w.useEffect(()=>{E&&(!O.current&&E.animationState&&E.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{var U;(U=window.MotionHandoffMarkAsComplete)==null||U.call(window,z)}),O.current=!1),E.enteringChildren=void 0)}),E}function wN(n,a,l,o){const{layoutId:u,layout:f,drag:d,dragConstraints:m,layoutScroll:p,layoutRoot:g,layoutAnchor:y,layoutCrossfade:x}=a;n.projection=new l(n.latestValues,a["data-framer-portal-id"]?void 0:Ob(n.parent)),n.projection.setOptions({layoutId:u,layout:f,alwaysMeasureLayout:!!d||m&&$i(m),visualElement:n,animationType:typeof f=="string"?f:"both",initialPromotionConfig:o,crossfade:x,layoutScroll:p,layoutRoot:g,layoutAnchor:y})}function Ob(n){if(n)return n.options.allowProjection!==!1?n.projection:Ob(n.parent)}function Cf(n,{forwardMotionProps:a=!1,type:l}={},o,u){o&&aN(o);const f=l?l==="svg":nh(n),d=f?yN:vN;function m(g,y){let x;const S={...w.useContext(Sb),...g,layoutId:TN(g)},{isStatic:T}=S,E=rN(g),j=d(g,T);if(!T&&typeof window<"u"){EN();const D=jN(S);x=D.MeasureLayout,E.visualElement=SN(n,j,S,u,D.ProjectionNode,f)}return h.jsxs(Ur.Provider,{value:E,children:[x&&E.visualElement?h.jsx(x,{visualElement:E.visualElement,...S}):null,mN(n,g,bN(j,E.visualElement,y),j,T,a,f)]})}m.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const p=w.forwardRef(m);return p[xN]=n,p}function TN({layoutId:n}){const a=w.useContext(pr).id;return a&&n!==void 0?a+"-"+n:n}function EN(n,a){w.useContext(Eb).strict}function jN(n){const a=jb(),{drag:l,layout:o}=a;if(!l&&!o)return{};const u={...l,...o};return{MeasureLayout:l!=null&&l.isEnabled(n)||o!=null&&o.isEnabled(n)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function AN(n,a){if(typeof Proxy>"u")return Cf;const l=new Map,o=(f,d)=>Cf(f,d,n,a),u=(f,d)=>o(f,d);return new Proxy(u,{get:(f,d)=>d==="create"?o:(l.has(d)||l.set(d,Cf(d,void 0,n,a)),l.get(d))})}const NN=(n,a)=>a.isSVG??nh(n)?new aA(a):new J5(a,{allowProjection:n!==w.Fragment});class CN extends Sa{constructor(a){super(a),a.animationState||(a.animationState=rA(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();Vr(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:l}=this.node.prevProps||{};a!==l&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)==null||a.call(this)}}let MN=0;class DN extends Sa{constructor(){super(...arguments),this.id=MN++,this.isExitComplete=!1}update(){var f;if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;if(a&&o===!1){if(this.isExitComplete){const{initial:d,custom:m}=this.node.getProps();if(typeof d=="string"){const p=Ja(this.node,d,m);if(p){const{transition:g,transitionEnd:y,...x}=p;for(const S in x)(f=this.node.getValue(S))==null||f.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);l&&!a&&u.then(()=>{this.isExitComplete=!0,l(this.id)})}mount(){const{register:a,onExitComplete:l}=this.node.presenceContext||{};l&&l(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const ON={animation:{Feature:CN},exit:{Feature:DN}};function jl(n){return{point:{x:n.pageX,y:n.pageY}}}const zN=n=>a=>Qd(a)&&n(a,jl(a));function dl(n,a,l,o){return vl(n,a,zN(l),o)}const zb=({current:n})=>n?n.ownerDocument.defaultView:null,_0=(n,a)=>Math.abs(n-a);function RN(n,a){const l=_0(n.x,a.x),o=_0(n.y,a.y);return Math.sqrt(l**2+o**2)}const U0=new Set(["auto","scroll"]);class Rb{constructor(a,l,{transformPagePoint:o,contextWindow:u=window,dragSnapToOrigin:f=!1,distanceThreshold:d=3,element:m}={}){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=Wo(this.lastRawMoveEventInfo,this.transformPagePoint));const T=Mf(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,j=RN(T.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!j)return;const{point:D}=T,{timestamp:z}=ct;this.history.push({...D,timestamp:z});const{onStart:O,onMove:V}=this.handlers;E||(O&&O(this.lastMoveEvent,T),this.startEvent=this.lastMoveEvent),V&&V(this.lastMoveEvent,T)},this.handlePointerMove=(T,E)=>{this.lastMoveEvent=T,this.lastRawMoveEventInfo=E,this.lastMoveEventInfo=Wo(E,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(T,E)=>{this.end();const{onEnd:j,onSessionEnd:D,resumeAnimation:z}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&z&&z(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=Mf(T.type==="pointercancel"?this.lastMoveEventInfo:Wo(E,this.transformPagePoint),this.history);this.startEvent&&j&&j(T,O),D&&D(T,O)},!Qd(a))return;this.dragSnapToOrigin=f,this.handlers=l,this.transformPagePoint=o,this.distanceThreshold=d,this.contextWindow=u||window;const p=jl(a),g=Wo(p,this.transformPagePoint),{point:y}=g,{timestamp:x}=ct;this.history=[{...y,timestamp:x}];const{onSessionStart:S}=l;S&&S(a,Mf(g,this.history)),this.removeListeners=wl(dl(this.contextWindow,"pointermove",this.handlePointerMove),dl(this.contextWindow,"pointerup",this.handlePointerUp),dl(this.contextWindow,"pointercancel",this.handlePointerUp)),m&&this.startScrollTracking(m)}startScrollTracking(a){let l=a.parentElement;for(;l;){const o=getComputedStyle(l);(U0.has(o.overflowX)||U0.has(o.overflowY))&&this.scrollPositions.set(l,{x:l.scrollLeft,y:l.scrollTop}),l=l.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 l=this.scrollPositions.get(a);if(!l)return;const o=a===window,u=o?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},f={x:u.x-l.x,y:u.y-l.y};f.x===0&&f.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=f.x,this.lastMoveEventInfo.point.y+=f.y):this.history.length>0&&(this.history[0].x-=f.x,this.history[0].y-=f.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 Wo(n,a){return a?{point:a(n.point)}:n}function B0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Mf({point:n},a){return{point:n,delta:B0(n,kb(a)),offset:B0(n,kN(a)),velocity:LN(a,.1)}}function kN(n){return n[0]}function kb(n){return n[n.length-1]}function LN(n,a){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const u=kb(n);for(;l>=0&&(o=n[l],!(u.timestamp-o.timestamp>Ut(a)));)l--;if(!o)return{x:0,y:0};o===n[0]&&n.length>2&&u.timestamp-o.timestamp>Ut(a)*2&&(o=n[1]);const f=Pt(u.timestamp-o.timestamp);if(f===0)return{x:0,y:0};const d={x:(u.x-o.x)/f,y:(u.y-o.y)/f};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}function VN(n,{min:a,max:l},o){return a!==void 0&&n<a?n=o?He(a,n,o.min):Math.max(n,a):l!==void 0&&n>l&&(n=o?He(l,n,o.max):Math.min(n,l)),n}function H0(n,a,l){return{min:a!==void 0?n.min+a:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function _N(n,{top:a,left:l,bottom:o,right:u}){return{x:H0(n.x,l,u),y:H0(n.y,a,o)}}function $0(n,a){let l=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([l,o]=[o,l]),{min:l,max:o}}function UN(n,a){return{x:$0(n.x,a.x),y:$0(n.y,a.y)}}function BN(n,a){let l=.5;const o=vt(n),u=vt(a);return u>o?l=ml(a.min,a.max-o,n.min):o>u&&(l=ml(n.min,n.max-u,a.min)),pn(0,1,l)}function HN(n,a){const l={};return a.min!==void 0&&(l.min=a.min-n.min),a.max!==void 0&&(l.max=a.max-n.min),l}const yd=.35;function $N(n=yd){return n===!1?n=0:n===!0&&(n=yd),{x:q0(n,"left","right"),y:q0(n,"top","bottom")}}function q0(n,a,l){return{min:Y0(n,a),max:Y0(n,l)}}function Y0(n,a){return typeof n=="number"?n:n[a]||0}const qN=new WeakMap;class YN{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:l=!1,distanceThreshold:o}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const f=x=>{l&&this.snapToCursor(jl(x).point),this.stopAnimation()},d=(x,S)=>{const{drag:T,dragPropagation:E,onDragStart:j}=this.getProps();if(T&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=g5(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(z=>{let O=this.getAxisMotionValue(z).get()||0;if(mn.test(O)){const{projection:V}=this.visualElement;if(V&&V.layout){const R=V.layout.layoutBox[z];R&&(O=vt(R)*(parseFloat(O)/100))}}this.originPoint[z]=O}),j&&ke.update(()=>j(x,S),!1,!0),ud(this.visualElement,"transform");const{animationState:D}=this.visualElement;D&&D.setActive("whileDrag",!0)},m=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S;const{dragPropagation:T,dragDirectionLock:E,onDirectionLock:j,onDrag:D}=this.getProps();if(!T&&!this.openDragLock)return;const{offset:z}=S;if(E&&this.currentDirection===null){this.currentDirection=XN(z),this.currentDirection!==null&&j&&j(this.currentDirection);return}this.updateAxis("x",S.point,z),this.updateAxis("y",S.point,z),this.visualElement.render(),D&&ke.update(()=>D(x,S),!1,!0)},p=(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 Rb(a,{onSessionStart:f,onStart:d,onMove:m,onSessionEnd:p,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:o,contextWindow:zb(this.visualElement),element:this.visualElement.current})}stop(a,l){const o=a||this.latestPointerEvent,u=l||this.latestPanInfo,f=this.isDragging;if(this.cancel(),!f||!u||!o)return;const{velocity:d}=u;this.startAnimation(d);const{onDragEnd:m}=this.getProps();m&&ke.postRender(()=>m(o,u))}cancel(){this.isDragging=!1;const{projection:a,animationState:l}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,l,o){const{drag:u}=this.getProps();if(!o||!Io(a,u,this.currentDirection))return;const f=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=VN(d,this.constraints[a],this.elastic[a])),f.set(d)}resolveConstraints(){var f;const{dragConstraints:a,dragElastic:l}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(f=this.visualElement.projection)==null?void 0:f.layout,u=this.constraints;a&&$i(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&o?this.constraints=_N(o.layoutBox,a):this.constraints=!1,this.elastic=$N(l),u!==this.constraints&&!$i(a)&&o&&this.constraints&&!this.hasMutatedConstraints&&fn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=HN(o.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:l}=this.getProps();if(!a||!$i(a))return!1;const o=a.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const f=X5(o,u.root,this.visualElement.getTransformPagePoint());let d=UN(u.layout.layoutBox,f);if(l){const m=l(q5(d));this.hasMutatedConstraints=!!m,m&&(d=Ix(m))}return d}startAnimation(a){const{drag:l,dragMomentum:o,dragElastic:u,dragTransition:f,dragSnapToOrigin:d,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},g=fn(y=>{if(!Io(y,l,this.currentDirection))return;let x=p&&p[y]||{};(d===!0||d===y)&&(x={min:0,max:0});const S=u?200:1e6,T=u?40:1e7,E={type:"inertia",velocity:o?a[y]:0,bounceStiffness:S,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...f,...x};return this.startAxisValueAnimation(y,E)});return Promise.all(g).then(m)}startAxisValueAnimation(a,l){const o=this.getAxisMotionValue(a);return ud(this.visualElement,a),o.start(Gd(a,o,0,l,this.visualElement,!1))}stopAnimation(){fn(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const l=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),u=o[l];return u||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){fn(l=>{const{drag:o}=this.getProps();if(!Io(l,o,this.currentDirection))return;const{projection:u}=this.visualElement,f=this.getAxisMotionValue(l);if(u&&u.layout){const{min:d,max:m}=u.layout.layoutBox[l],p=f.get()||0;f.set(a[l]-He(d,m,.5)+p)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!$i(l)||!o||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};fn(d=>{const m=this.getAxisMotionValue(d);if(m&&this.constraints!==!1){const p=m.get();u[d]=BN({min:p,max:p},this.constraints[d])}});const{transformTemplate:f}=this.visualElement.getProps();this.visualElement.current.style.transform=f?f({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),fn(d=>{if(!Io(d,a,null))return;const m=this.getAxisMotionValue(d),{min:p,max:g}=this.constraints[d];m.set(He(p,g,u[d]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;qN.set(this.visualElement,this);const a=this.visualElement.current,l=dl(a,"pointerdown",g=>{const{drag:y,dragListener:x=!0}=this.getProps(),S=g.target,T=S!==a&&w5(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=GN(a,g.current,()=>this.scalePositionWithinConstraints())))},{projection:f}=this.visualElement,d=f.addEventListener("measure",u);f&&!f.layout&&(f.root&&f.root.updateScroll(),f.updateLayout()),ke.read(u);const m=vl(window,"resize",()=>this.scalePositionWithinConstraints()),p=f.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()=>{m(),l(),d(),p&&p(),o&&o()}}getProps(){const a=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:u=!1,dragConstraints:f=!1,dragElastic:d=yd,dragMomentum:m=!0}=a;return{...a,drag:l,dragDirectionLock:o,dragPropagation:u,dragConstraints:f,dragElastic:d,dragMomentum:m}}}function G0(n){let a=!0;return()=>{if(a){a=!1;return}n()}}function GN(n,a,l){const o=Wv(n,G0(l)),u=Wv(a,G0(l));return()=>{o(),u()}}function Io(n,a,l){return(a===!0||a===n)&&(l===null||l===n)}function XN(n,a=10){let l=null;return Math.abs(n.y)>a?l="y":Math.abs(n.x)>a&&(l="x"),l}class KN extends Sa{constructor(a){super(a),this.removeGroupControls=Jt,this.removeListeners=Jt,this.controls=new YN(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:l}=this.node.prevProps||{};a!==l&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Df=n=>(a,l)=>{n&&ke.update(()=>n(a,l),!1,!0)};class FN extends Sa{constructor(){super(...arguments),this.removePointerDownListener=Jt}onPointerDown(a){this.session=new Rb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zb(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:l,onPan:o,onPanEnd:u}=this.node.getProps();return{onSessionStart:Df(a),onStart:Df(l),onMove:Df(o),onEnd:(f,d)=>{delete this.session,u&&ke.postRender(()=>u(f,d))}}}mount(){this.removePointerDownListener=dl(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 Of=!1;class ZN extends w.Component{componentDidMount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o,layoutId:u}=this.props,{projection:f}=a;f&&(l.group&&l.group.add(f),o&&o.register&&u&&o.register(f),Of&&f.root.didUpdate(),f.addEventListener("animationComplete",()=>{this.safeToRemove()}),f.setOptions({...f.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ur.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:l,visualElement:o,drag:u,isPresent:f}=this.props,{projection:d}=o;return d&&(d.isPresent=f,a.layoutDependency!==l&&d.setOptions({...d.options,layoutDependency:l}),Of=!0,u||a.layoutDependency!==l||l===void 0||a.isPresent!==f?d.willUpdate():this.safeToRemove(),a.isPresent!==f&&(f?d.promote():d.relegate()||ke.postRender(()=>{const m=d.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:a,layoutAnchor:l}=this.props,{projection:o}=a;o&&(o.options.layoutAnchor=l,o.root.didUpdate(),Zd.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:u}=a;Of=!0,u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),o&&o.deregister&&o.deregister(u))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function Lb(n){const[a,l]=JA(),o=w.useContext(pr);return h.jsx(ZN,{...n,layoutGroup:o,switchLayoutGroup:w.useContext(Db),isPresent:a,safeToRemove:l})}const QN={pan:{Feature:FN},drag:{Feature:KN,ProjectionNode:bb,MeasureLayout:Lb}};function X0(n,a,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,f=o[u];f&&ke.postRender(()=>f(a,jl(a)))}class PN extends Sa{mount(){const{current:a}=this.node;a&&(this.unmount=y5(a,(l,o)=>(X0(this.node,o,"Start"),u=>X0(this.node,u,"End"))))}unmount(){}}class JN 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=wl(vl(this.node.current,"focus",()=>this.onFocus()),vl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function K0(n,a,l){const{props:o}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),f=o[u];f&&ke.postRender(()=>f(a,jl(a)))}class WN extends Sa{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:l,propagate:o}=this.node.props;this.unmount=E5(a,(u,f)=>(K0(this.node,f,"Start"),(d,{success:m})=>K0(this.node,d,m?"End":"Cancel")),{useGlobalTarget:l,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const xd=new WeakMap,zf=new WeakMap,IN=n=>{const a=xd.get(n.target);a&&a(n)},e3=n=>{n.forEach(IN)};function t3({root:n,...a}){const l=n||document;zf.has(l)||zf.set(l,{});const o=zf.get(l),u=JSON.stringify(a);return o[u]||(o[u]=new IntersectionObserver(e3,{root:n,...a})),o[u]}function n3(n,a,l){const o=t3(a);return xd.set(n,l),o.observe(n),()=>{xd.delete(n),o.unobserve(n)}}const a3={some:0,all:1};class i3 extends Sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var p;(p=this.stopObserver)==null||p.call(this);const{viewport:a={}}=this.node.getProps(),{root:l,margin:o,amount:u="some",once:f}=a,d={root:l?l.current:void 0,rootMargin:o,threshold:typeof u=="number"?u:a3[u]},m=g=>{const{isIntersecting:y}=g;if(this.isInView===y||(this.isInView=y,f&&!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=n3(this.node.current,d,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:l}=this.node;["amount","margin","root"].some(s3(a,l))&&this.startObserver()}unmount(){var a;(a=this.stopObserver)==null||a.call(this),this.hasEnteredView=!1,this.isInView=!1}}function s3({viewport:n={}},{viewport:a={}}={}){return l=>n[l]!==a[l]}const l3={inView:{Feature:i3},tap:{Feature:WN},focus:{Feature:JN},hover:{Feature:PN}},o3={layout:{ProjectionNode:bb,MeasureLayout:Lb}},r3={...ON,...l3,...QN,...o3},Vb=AN(r3,NN),Br=w.forwardRef(function(a,l){return h.jsx(j2,{children:h.jsx("a",{...a,ref:l})})}),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:l,plain:o,className:u,children:f,...d},m){let p=Fe(u,Ws.base,l?Ws.outline:o?Ws.plain:Fe(Ws.solid,Ws.colors[a??"dark/zinc"]));return typeof d.href=="string"?h.jsx(Br,{...d,className:p,ref:m,children:h.jsx(xa,{children:f})}):h.jsx(bl,{...d,className:Fe(p,"cursor-default"),ref:m,children:h.jsx(xa,{children:f})})});function xa({children:n}){return h.jsxs(h.Fragment,{children:[h.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 u3({className:n,...a}){return h.jsx("nav",{...a,className:Fe(n,"flex flex-1 items-center gap-4 py-2.5")})}function c3({className:n,...a}){let l=w.useId();return h.jsx(Tb,{id:l,children:h.jsx("div",{...a,className:Fe(n,"flex items-center gap-3")})})}function f3({className:n,...a}){return h.jsx("div",{"aria-hidden":"true",...a,className:Fe(n,"-ml-4 flex-1")})}const ah=w.forwardRef(function({current:a,className:l,children:o,...u},f){let d=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 h.jsxs("span",{className:Fe(l,"relative"),children:[a&&h.jsx(Vb.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"?h.jsx(Br,{...u,className:d,"data-current":a?"true":void 0,ref:f,children:h.jsx(xa,{children:o})}):h.jsx(bl,{...u,className:Fe("cursor-default",d),"data-current":a?"true":void 0,ref:f,children:h.jsx(xa,{children:o})})]})});function d3(){return h.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:h.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 h3(){return h.jsx("svg",{"data-slot":"icon",viewBox:"0 0 20 20","aria-hidden":"true",children:h.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 m3({open:n,close:a,children:l}){return h.jsxs(rE,{open:n,onClose:a,className:"lg:hidden",children:[h.jsx(lE,{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"}),h.jsx(Fy,{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:h.jsxs("div",{className:"flex h-full flex-col rounded-lg bg-ouro-deep shadow-xl ring-1 ring-ouro-moss/40",children:[h.jsx("div",{className:"-mb-3 px-4 pt-3",children:h.jsx(wy,{as:ah,"aria-label":"Close navigation",children:h.jsx(h3,{})})}),l]})})]})}function p3({navbar:n,sidebar:a,children:l}){let[o,u]=w.useState(!1);return h.jsxs("div",{className:"relative isolate flex min-h-svh w-full bg-ouro-void max-lg:flex-col",children:[h.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}),h.jsx(m3,{open:o,close:()=>u(!1),children:a}),h.jsxs("header",{className:"flex items-center px-4 lg:hidden",children:[h.jsx("div",{className:"py-2.5",children:h.jsx(ah,{onClick:()=>u(!0),"aria-label":"Open navigation",children:h.jsx(d3,{})})}),h.jsx("div",{className:"min-w-0 flex-1",children:n})]}),h.jsx("main",{className:"flex flex-1 flex-col lg:min-w-0 lg:pl-64",children:h.jsx("div",{className:"grow bg-ouro-deep p-4 lg:p-8",children:h.jsx("div",{className:"mx-auto max-w-6xl",children:l})})})]})}function g3({className:n,...a}){return h.jsx("nav",{...a,className:Fe(n,"flex h-full min-h-0 flex-col")})}function v3({className:n,...a}){return h.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 y3({className:n,...a}){return h.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 x3({className:n,...a}){return h.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 F0({className:n,...a}){let l=w.useId();return h.jsx(Tb,{id:l,children:h.jsx("div",{...a,"data-slot":"section",className:Fe(n,"flex flex-col gap-0.5")})})}function Z0({className:n,...a}){return h.jsx("h3",{...a,className:Fe(n,"mb-1 px-2 text-xs/6 font-medium text-zinc-500 dark:text-zinc-400")})}const b3=w.forwardRef(function({current:a,className:l,children:o,...u},f){let d=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 h.jsxs("span",{className:Fe(l,"relative"),children:[a&&h.jsx(Vb.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"?h.jsx(wy,{as:Br,...u,className:d,"data-current":a?"true":void 0,ref:f,children:h.jsx(xa,{children:o})}):h.jsx(bl,{...u,className:Fe("cursor-default",d),"data-current":a?"true":void 0,ref:f,children:h.jsx(xa,{children:o})})]})});function S3({className:n,...a}){return h.jsx("span",{...a,className:Fe(n,"truncate")})}const w3={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 be({color:n="zinc",className:a,...l}){return h.jsx("span",{...l,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",w3[n])})}w.forwardRef(function({color:a="zinc",className:l,children:o,...u},f){let d=Fe(l,"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"?h.jsx(Br,{...u,className:d,ref:f,children:h.jsx(xa,{children:h.jsx(be,{color:a,children:o})})}):h.jsx(bl,{...u,className:d,ref:f,children:h.jsx(xa,{children:h.jsx(be,{color:a,children:o})})})});function T3(n){w.useEffect(()=>{if(!n)return;const a=n;function l(o){if(!(o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement))switch(o.key){case"1":a({tab:"overview"});break;case"2":a({tab:"sessions"});break;case"3":a({tab:"work"});break;case"4":a({tab:"connections"});break;case"5":a({tab:"inner"});break;case"6":a({tab:"notes"});break;case"7":a({tab:"runtime"});break;case"Escape":{document.activeElement instanceof HTMLElement&&document.activeElement.blur();break}}}return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[n])}const E3={"owed-reply":"red","blocking-obligation":"red","broken-return":"red","stale-delegation":"yellow","return-ready":"lime","overdue-habit":"yellow"},j3={"owed-reply":"owed reply","blocking-obligation":"blocking","broken-return":"broken return","stale-delegation":"stale","return-ready":"ready to return","overdue-habit":"overdue"},A3={"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"},N3=new Set(["stale-delegation"]),C3=new Set(["owed-reply","blocking-obligation","broken-return","return-ready","overdue-habit"]),M3=new Set(["spawning","running","waiting_input","stalled"]);function D3({view:n,deskPrefs:a,refreshGeneration:l}){const o=Pi(),[u,f]=w.useState(null),[d,m]=w.useState(null),[p,g]=w.useState(null),[y,x]=w.useState(null),[S,T]=w.useState(null),E=n.agent,j=n.work,D=n.inner,z=n.activity,O=E.degraded,V=E.attention,R=j.tasks,U=j.obligations,P=j.sessions,F=j.coding,W=E.senses,oe=j.bridges;return w.useEffect(()=>{Be(`/agents/${encodeURIComponent(E.agentName)}/needs-me`).then(f),Be(`/agents/${encodeURIComponent(E.agentName)}/coding`).then(m),Be(`/agents/${encodeURIComponent(E.agentName)}/continuity`).then(g).catch(()=>{}),Be(`/agents/${encodeURIComponent(E.agentName)}/orientation`).then(x).catch(()=>{}),Be(`/agents/${encodeURIComponent(E.agentName)}/changes`).then(T).catch(()=>{})},[E.agentName,l]),h.jsxs("div",{className:"space-y-6",children:[u&&u.items.length>0&&(()=>{const B=u.items.filter(ie=>C3.has(ie.urgency)),Z=u.items.filter(ie=>N3.has(ie.urgency));return h.jsxs("div",{className:"space-y-3",children:[B.length>0&&h.jsxs("div",{className:"rounded-xl bg-ouro-fang/5 p-4 ring-1 ring-ouro-fang/15",children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-fang",children:["Action now (",B.length,")"]}),h.jsx("div",{className:"mt-2 space-y-1.5",children:B.map((ie,le)=>h.jsx(Q0,{item:ie,nav:o,agentName:E.agentName,onDismiss:()=>{f(Se=>Se&&{items:Se.items.filter((De,$)=>u.items.indexOf(ie)!==$)})}},`action-${le}`))})]}),Z.length>0&&h.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["Stale (",Z.length,")"]}),h.jsx("button",{onClick:async()=>{var ie;for(const le of Z)(ie=le.ref)!=null&&ie.focus&&await fetch(`/api/agents/${encodeURIComponent(E.agentName)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:le.ref.focus})});Be(`/agents/${encodeURIComponent(E.agentName)}/needs-me`).then(f)},className:"text-xs text-ouro-gold underline underline-offset-2 hover:text-ouro-bone transition-colors",children:"Clear all stale"})]}),h.jsx("div",{className:"mt-2 space-y-1.5",children:Z.map((ie,le)=>h.jsx(Q0,{item:ie,nav:o,agentName:E.agentName,onDismiss:()=>{Be(`/agents/${encodeURIComponent(E.agentName)}/needs-me`).then(f)}},`stale-${le}`))})]})]})})(),(a==null?void 0:a.carrying)&&h.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"What I'm carrying"}),h.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:h.jsxs("div",{children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Pinned threads"}),h.jsx("div",{className:"mt-2 space-y-2",children:B.map((Z,ie)=>h.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[h.jsx("p",{className:"font-medium text-ouro-bone",children:Z.label}),h.jsxs("div",{className:"mt-1 flex flex-wrap gap-1.5",children:[Z.friendIds.map(le=>h.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=>h.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=>h.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))})]})})(),h.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10 sm:p-5",children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Center of gravity"}),h.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone sm:text-2xl",children:V.label}),h.jsxs("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:[E.agentName," has"," ",h.jsxs(er,{tab:"work",children:[R.liveCount," live tasks"]}),","," ",h.jsxs(er,{tab:"work",children:[U.openCount," obligations"]}),","," ",h.jsxs(er,{tab:"work",children:[F.activeCount," coding lanes"]}),", and"," ",h.jsxs(er,{tab:"sessions",children:[P.liveCount," live sessions"]}),"."]}),O.status==="degraded"&&O.issues.length>0&&h.jsxs("div",{className:"mt-3 space-y-1",children:[O.issues.slice(0,5).map((B,Z)=>h.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:[h.jsx("span",{className:"mt-0.5 h-2 w-2 shrink-0 rounded-full bg-ouro-fang"}),h.jsxs("span",{className:"text-ouro-mist",children:[h.jsx("span",{className:"font-semibold text-ouro-fang",children:B.code}),h.jsxs("span",{className:"text-ouro-shadow",children:[" — ",jt(B.detail,80)]})]})]},Z)),O.issues.length>5&&h.jsxs("button",{onClick:()=>o({tab:"runtime"}),className:"text-xs text-ouro-glow underline underline-offset-2",children:["+",O.issues.length-5," more issues"]})]})]}),y&&h.jsxs("div",{className:"rounded-xl bg-ouro-moss/10 p-4 ring-1 ring-ouro-glow/8",children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Orientation"}),(()=>{const B=y.currentSession;return B?h.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[h.jsx(be,{color:"lime",children:"active session"}),h.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&&h.jsx("span",{className:"text-xs text-ouro-shadow",children:it(B.lastActivityAt)})]}):null})(),y.primaryObligation&&h.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(be,{color:"yellow",children:y.primaryObligation.status}),h.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:jt(y.primaryObligation.content,80)})]}),y.primaryObligation.nextAction&&h.jsxs("p",{className:"mt-1 text-xs text-ouro-mist",children:["Next: ",y.primaryObligation.nextAction]}),y.primaryObligation.waitingOn&&h.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Waiting on: ",y.primaryObligation.waitingOn]})]}),y.resumeHandle&&h.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-void/40 px-3 py-2 ring-1 ring-ouro-moss/15",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Resume handle"}),h.jsxs("div",{className:"mt-1 space-y-0.5 text-sm",children:[y.resumeHandle.lane&&h.jsxs("p",{className:"text-ouro-bone",children:["Lane: ",y.resumeHandle.lane]}),y.resumeHandle.artifact&&h.jsxs("p",{className:"text-ouro-mist",children:["Artifact: ",y.resumeHandle.artifact]}),y.resumeHandle.nextAction&&h.jsxs("p",{className:"text-ouro-mist",children:["Next: ",y.resumeHandle.nextAction]}),y.resumeHandle.blockerOrWaitingOn&&h.jsxs("p",{className:"text-ouro-shadow",children:["Blocked: ",y.resumeHandle.blockerOrWaitingOn]}),h.jsxs(be,{color:y.resumeHandle.confidence==="high"?"lime":y.resumeHandle.confidence==="medium"?"yellow":"zinc",children:[y.resumeHandle.confidence," confidence"]})]})]}),y.otherActiveSessions.length>0&&h.jsxs("div",{className:"mt-2",children:[h.jsxs("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:["Other sessions (",y.otherActiveSessions.length,")"]}),h.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:y.otherActiveSessions.slice(0,5).map(B=>h.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&&h.jsxs("div",{className:"rounded-xl bg-ouro-gold/5 p-4 ring-1 ring-ouro-gold/15",children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-gold",children:["What changed (",S.changeCount,")"]}),S.snapshotAge&&h.jsxs("p",{className:"mt-0.5 text-xs text-ouro-shadow",children:["Since ",it(S.snapshotAge)]}),h.jsxs("div",{className:"mt-2 space-y-1",children:[S.items.slice(0,8).map((B,Z)=>h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(be,{color:B.kind.includes("status")?"yellow":"zinc",children:B.kind.replace(/_/g," ")}),h.jsx("span",{className:"truncate text-ouro-mist",children:B.summary})]},Z)),S.items.length>8&&h.jsxs("p",{className:"text-xs text-ouro-shadow",children:["+",S.items.length-8," more changes"]})]})]}),p&&h.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[h.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Presence"}),p.presence.self?h.jsxs("div",{className:"mt-2 space-y-1",children:[h.jsx("p",{className:"text-sm font-medium text-ouro-bone",children:p.presence.self.availability}),p.presence.self.lane&&h.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Lane: ",p.presence.self.lane]}),p.presence.self.tempo&&h.jsxs("p",{className:"text-xs text-ouro-shadow",children:["Tempo: ",p.presence.self.tempo]})]}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No presence data"}),p.presence.peers.length>0&&h.jsxs("div",{className:"mt-2 border-t border-ouro-moss/20 pt-2",children:[h.jsx("p",{className:"text-[10px] uppercase tracking-wider text-ouro-shadow",children:"Peers"}),h.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:p.presence.peers.map(B=>h.jsx(be,{color:B.availability==="active"?"lime":"zinc",children:B.agentName},B.agentName))})]})]}),h.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Cares (",p.cares.activeCount,")"]}),p.cares.items.length>0?h.jsx("div",{className:"mt-2 space-y-1.5",children:p.cares.items.slice(0,5).map(B=>h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(be,{color:B.salience==="high"?"red":B.salience==="medium"?"yellow":"zinc",children:B.salience}),h.jsx("p",{className:"truncate text-sm text-ouro-bone",children:B.label})]},B.id))}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No active cares"})]}),h.jsxs("div",{className:"rounded-xl bg-ouro-void/50 p-4 ring-1 ring-ouro-moss/20",children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:["Episodes (",p.episodes.recentCount,")"]}),p.episodes.items.length>0?h.jsx("div",{className:"mt-2 space-y-1.5",children:p.episodes.items.slice(0,5).map(B=>h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx(be,{color:"zinc",children:B.kind}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("p",{className:"truncate text-sm text-ouro-bone",children:B.summary}),h.jsx("p",{className:"text-xs text-ouro-shadow",children:it(B.timestamp)})]})]},B.id))}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No recent episodes"})]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[h.jsx(tr,{label:"Tasks",value:R.liveCount,sub:`${R.blockedCount} blocked`,onClick:()=>o({tab:"work"})}),h.jsx(tr,{label:"Obligations",value:U.openCount,sub:`${P.liveCount} sessions`,onClick:()=>o({tab:"work"})}),h.jsx(tr,{label:"Coding",value:F.activeCount,sub:`${F.blockedCount} blocked`,onClick:()=>o({tab:"work"})}),h.jsx(tr,{label:"Inner",value:D.status,sub:jt(D.summary??"",30),onClick:()=>o({tab:"inner"})})]}),d&&d.items.length>0&&(()=>{const B=d.items.filter(Z=>M3.has(Z.status));return B.length===0?null:h.jsx(Is,{title:`Active coding (${B.length})`,children:h.jsx("div",{className:"space-y-1.5",children:B.map(Z=>h.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:[h.jsx(be,{color:Z.status==="running"?"lime":Z.status==="waiting_input"?"yellow":"zinc",children:Z.status}),h.jsxs("span",{className:"truncate text-sm text-ouro-bone",children:[Z.runner," — ",jt(Z.workdir,40)]}),h.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:it(Z.lastActivityAt)})]},Z.id))})})})(),h.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[h.jsx(Is,{title:"Senses",children:W.length>0?h.jsx(O3,{items:W}):h.jsx(Rf,{children:"No active senses"})}),h.jsx(Is,{title:"Bridges",children:oe.length>0?h.jsx("div",{className:"flex flex-wrap gap-1.5",children:oe.map(B=>h.jsx("button",{onClick:()=>o({tab:"connections",focus:B}),children:h.jsx(be,{color:"lime",children:B})},B))}):h.jsx(Rf,{children:"No active bridges"})})]}),(()=>{const B=U.items.filter(Z=>Z.status==="fulfilled");return B.length===0?null:h.jsx(Is,{title:"Recently closed",children:h.jsx("div",{className:"space-y-1",children:B.slice(0,3).map((Z,ie)=>h.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:[h.jsx(be,{color:"lime",children:"closed"}),h.jsx("p",{className:"text-sm text-ouro-mist truncate",children:jt(Z.content,80)}),h.jsx("span",{className:"shrink-0 text-xs text-ouro-shadow",children:it(Z.updatedAt)})]},ie))})})})(),h.jsx(Is,{title:"Recent activity",children:z.recent.length>0?h.jsx("div",{className:"space-y-1",children:z.recent.map((B,Z)=>{const ie=B.kind==="coding"||B.kind==="obligation"?"work":B.kind==="session"?"sessions":"inner";return h.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:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(be,{children:B.kind}),h.jsx("span",{className:"text-xs text-ouro-shadow",children:it(B.at)})]}),h.jsx("p",{className:"truncate text-sm font-medium text-ouro-bone",children:jt(B.label,100)}),h.jsx("p",{className:"truncate text-xs text-ouro-shadow",children:jt(B.detail,80)})]},Z)})}):h.jsx(Rf,{children:"No recent activity yet."})})]})}function Q0({item:n,nav:a,agentName:l,onDismiss:o}){var d;const u=n.urgency==="return-ready",f=(d=n.ref)==null?void 0:d.focus;return h.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:[h.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:[h.jsx(be,{color:E3[n.urgency]??"zinc",children:j3[n.urgency]??n.urgency}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:`text-sm font-medium ${u?"text-ouro-glow":"text-ouro-bone"}`,children:n.label}),h.jsx("p",{className:"text-xs text-ouro-shadow truncate",children:n.detail}),h.jsx("p",{className:"text-[10px] italic text-ouro-shadow/60 mt-0.5",children:A3[n.urgency]??""})]}),n.ageMs!=null&&h.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`})]}),f&&h.jsx("button",{onClick:async m=>{m.stopPropagation(),await fetch(`/api/agents/${encodeURIComponent(l)}/dismiss-obligation`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({obligationId:f})}),o()},className:"shrink-0 text-xs text-ouro-shadow hover:text-ouro-fang transition-colors",title:"Dismiss",children:"✕"})]})}function er({tab:n,children:a}){const l=Pi();return h.jsx("button",{onClick:()=>l({tab:n}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow transition-colors",children:a})}function tr({label:n,value:a,sub:l,onClick:o}){return h.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:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),h.jsx("p",{className:"mt-1 text-xl font-semibold tabular-nums text-ouro-bone",children:a}),h.jsx("p",{className:"mt-0.5 truncate text-xs text-ouro-shadow",children:l})]})}function Is({title:n,children:a}){return h.jsxs("div",{children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n}),h.jsx("div",{className:"mt-2",children:a})]})}function O3({items:n}){return h.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(a=>h.jsx(be,{color:"lime",children:a},a))})}function Rf({children:n}){return h.jsx("p",{className:"text-sm text-ouro-shadow",children:n})}function bd(n){const a=n.function.name,l=z3(n.function.arguments);return a==="settle"?{kind:"response",name:a,id:n.id,deliveredText:l.answer??null,delegatedThought:null,metadata:l.intent??null,rawArgs:null}:a==="ponder"?{kind:"delegation",name:a,id:n.id,deliveredText:l.say??null,delegatedThought:l.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:l.reason??null,rawArgs:null}:a==="surface"?{kind:"surface",name:a,id:n.id,deliveredText:l.content??null,delegatedThought:null,metadata:l.delegationId??l.friendId??null,rawArgs:null}:{kind:"action",name:a,id:n.id,deliveredText:null,delegatedThought:null,metadata:null,rawArgs:n.function.arguments}}function z3(n){try{const a=JSON.parse(n);if(a&&typeof a=="object")return a}catch{}return{}}function R3(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 Al(n){return R3(n.content)}function _b(n){return n.time.authoredAt??n.time.observedAt??n.time.recordedAt}const P0={"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 k3(n){return _b(n)}function Xi(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(k3(n)))}function L3({agentName:n,focus:a,onFocusConsumed:l,deskPrefs:o,refreshGeneration:u}){Pi();const[f,d]=w.useState(null),[m,p]=w.useState(null),[g,y]=w.useState(null),[x,S]=w.useState(!1),T=w.useRef(null);w.useEffect(()=>{Be(`/agents/${encodeURIComponent(n)}/sessions`).then(d)},[n,u]),w.useEffect(()=>{a&&(T.current=null,p(a),y(null),S(!0),l==null||l())},[n,a,l]),w.useEffect(()=>{if(!m)return;const R=`${m}:${u}`;if(T.current===R)return;T.current=R,S(!0);const[U,P,F]=m.split("/");Be(`/agents/${encodeURIComponent(n)}/sessions/${encodeURIComponent(U)}/${encodeURIComponent(P)}/${encodeURIComponent(F)}`).then(y).catch(()=>y(null)).finally(()=>S(!1))},[n,m,u,a]);function E(R){if(m===R){p(null),y(null),T.current=null;return}p(R),y(null),S(!0)}const j=new Set((o==null?void 0:o.starredFriends)??[]);if(!f)return h.jsx(Ub,{label:"Loading sessions"});const D=new Map;for(const R of f.items)D.has(R.friendId)||D.set(R.friendId,[]),D.get(R.friendId).push(R);const z=[...D.entries()].sort((R,U)=>{const P=j.has(R[0])?0:1,F=j.has(U[0])?0:1;return P!==F?P-F:U[1].length-R[1].length}),O=[],V=new Map;for(const[R,U]of z)V.set(O.length,{name:U[0].friendName,channels:U.length,starred:j.has(R)}),O.push(...U);return h.jsxs("div",{className:"space-y-3",children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:[f.totalCount," sessions · ",f.activeCount," active · ",f.staleCount," stale"]}),h.jsx("div",{className:"space-y-1.5",children:O.map((R,U)=>{var Se;const P=V.get(U),F=j.has(R.friendId),W=`${R.friendId}/${R.channel}/${R.key}`,oe=m===W,B=P0[R.replyState]??P0.idle,Z=((Se=R.lastUsage)==null?void 0:Se.total_tokens)??R.estimatedTokens??0,le=Z>0?Math.min(100,Math.round(Z/8e4*100)):0;return h.jsxs("div",{children:[P&&P.channels>1&&h.jsxs("div",{className:"flex items-center gap-2 pt-3 pb-1",children:[P.starred&&h.jsx("span",{className:"text-ouro-gold text-sm",children:"★"}),h.jsx("span",{className:"font-medium text-ouro-bone text-sm",children:P.name}),h.jsxs("span",{className:"text-xs text-ouro-shadow",children:[P.channels," channels"]})]}),h.jsxs("button",{onClick:()=>E(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:[h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[F&&h.jsx("span",{className:"text-ouro-gold",title:"Starred",children:"★"}),h.jsx("span",{className:"truncate font-medium text-ouro-bone",children:R.friendName}),h.jsxs("span",{className:"shrink-0 text-xs text-ouro-shadow",children:["via ",R.channel]}),h.jsx(be,{color:B.color,children:B.label})]}),h.jsx("span",{className:"shrink-0 text-xs tabular-nums text-ouro-shadow",children:it(R.lastActivityAt)})]}),R.latestUserExcerpt&&h.jsxs("p",{className:"truncate text-xs text-ouro-gold/70",children:[h.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"in:"})," ",jt(R.latestUserExcerpt,100)]}),R.latestAssistantExcerpt&&h.jsxs("p",{className:"truncate text-xs text-ouro-glow/60",children:[h.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider",children:"out:"})," ",jt(R.latestAssistantExcerpt,100)]}),h.jsxs("div",{className:"flex items-center gap-3 text-xs text-ouro-shadow",children:[h.jsxs("span",{className:"tabular-nums",children:[R.messageCount," msgs"]}),R.lastUsage&&h.jsxs("span",{className:"tabular-nums",children:[R.lastUsage.total_tokens.toLocaleString()," tok"]}),le>0&&h.jsxs("div",{className:"flex items-center gap-1.5 flex-1 max-w-32",title:"Context pressure — steady state oscillates between 80-100%",children:[h.jsx("div",{className:"h-1 flex-1 rounded-full bg-ouro-moss/20",children:h.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)}%`}})}),h.jsxs("span",{className:"tabular-nums text-[10px]",children:[le,"%"]})]})]})]}),oe&&h.jsx(V3,{loading:x,transcript:g})]},W)})})]})}function V3({loading:n,transcript:a}){const l=w.useRef(null);return w.useEffect(()=>{a&&l.current&&(l.current.scrollTop=l.current.scrollHeight)},[a]),h.jsxs("div",{ref:l,className:"mt-1 max-h-[70vh] overflow-y-auto rounded-lg bg-ouro-void/60 p-3 ring-1 ring-ouro-moss/15",children:[n&&h.jsx(Ub,{label:"Loading transcript"}),a&&h.jsx(_3,{messages:a.messages,usage:a.lastUsage})]})}function _3({messages:n,usage:a}){const l=n.filter(m=>m.role==="system"),o=n.filter(m=>m.role!=="system"),[u,f]=w.useState(!1),d=new Map;for(const m of o)m.role==="tool"&&m.toolCallId&&d.set(m.toolCallId,m);return h.jsxs("div",{className:"space-y-0.5",children:[a&&h.jsxs("p",{className:"pb-2 font-mono text-[10px] text-ouro-shadow",children:[a.input_tokens.toLocaleString()," in · ",a.output_tokens.toLocaleString()," out · ",a.total_tokens.toLocaleString()," total"]}),l.length>0&&h.jsxs("div",{className:"pb-2 mb-2 border-b border-ouro-moss/15",children:[h.jsxs("button",{onClick:()=>f(!u),className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow hover:text-ouro-mist transition-colors",children:[u?"▼":"▶"," system context (",l.length,")"]}),u&&l.map(m=>h.jsxs("div",{className:"mt-2 max-h-60 overflow-y-auto rounded bg-ouro-void/40 p-2 text-xs text-ouro-shadow whitespace-pre-wrap break-words",children:[h.jsx("p",{className:"mb-1 font-mono text-[9px] text-ouro-shadow/70",children:Xi(m)}),Al(m)]},m.id))]}),o.map(m=>m.role==="tool"?null:m.role==="user"?h.jsx(U3,{msg:m},m.id):m.role==="assistant"?h.jsx(B3,{msg:m,toolResults:d},m.id):null)]})}function U3({msg:n}){const a=Al(n);return h.jsx("div",{className:"flex justify-start py-1",children:h.jsxs("div",{className:"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",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-gold/70",children:"user"}),h.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",n.sequence]}),h.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),h.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:a})]})})}function B3({msg:n,toolResults:a}){const l=Al(n),o=(n.toolCalls??[]).map(bd),u=o.filter(m=>m.kind!=="action"),f=o.filter(m=>m.kind==="action"),d=[];for(const m of u)m.kind==="response"?d.push(h.jsx("div",{className:"flex justify-end py-1",children:h.jsxs("div",{className:"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",children:[h.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70",children:"agent"}),h.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),h.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:m.deliveredText}),m.metadata&&m.metadata!=="complete"&&h.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["intent: ",m.metadata]})]})},m.id)):m.kind==="delegation"?d.push(h.jsx("div",{className:"flex justify-end py-1",children:h.jsxs("div",{className:"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",children:[h.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70",children:"agent"}),h.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),m.deliveredText&&h.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:m.deliveredText}),m.delegatedThought&&h.jsxs("div",{className:"mt-2 rounded-lg bg-ouro-moss/20 px-2.5 py-1.5 ring-1 ring-ouro-glow/8",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/60",children:"→ inner dialog"}),h.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist",children:m.delegatedThought})]})]})},m.id)):m.kind==="surface"?d.push(h.jsx("div",{className:"flex justify-end py-1",children:h.jsxs("div",{className:"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",children:[h.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70",children:"surfaced"}),h.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),h.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:m.deliveredText}),m.metadata&&h.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",m.metadata]})]})},m.id)):m.kind==="rest"?d.push(h.jsx("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:"— resting —"},m.id)):m.kind==="observe"&&d.push(h.jsxs("div",{className:"py-1 text-center font-mono text-[10px] text-ouro-shadow/50",children:["— observed",m.metadata?`: ${m.metadata}`:""," —"]},m.id));return l&&u.length===0&&d.push(h.jsx("div",{className:"flex justify-end py-1",children:h.jsxs("div",{className:"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",children:[h.jsxs("div",{className:"mb-0.5 flex items-center gap-2",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/70",children:"agent"}),h.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:Xi(n)})]}),h.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:l})]})},`${n.id}-content`)),f.length>0&&d.push(h.jsx("div",{className:"flex justify-end py-1",children:h.jsx("div",{className:"max-w-[85%] sm:max-w-[75%] space-y-1",children:f.map(m=>h.jsx(H3,{call:m,result:a.get(m.id)},m.id))})},`${n.id}-tools`)),h.jsx(h.Fragment,{children:d})}function H3({call:n,result:a}){const[l,o]=w.useState(!1),u=a?Al(a):null;return h.jsxs("button",{onClick:()=>o(!l),className:"w-full text-left rounded-lg bg-ouro-moss/10 px-2.5 py-1.5 text-sm ring-1 ring-ouro-moss/12 hover:ring-ouro-glow/15 transition-colors",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"font-mono text-xs text-ouro-glow",children:n.name}),!l&&h.jsx("span",{className:"text-[10px] text-ouro-shadow",children:"tap to inspect"})]}),l&&h.jsxs(h.Fragment,{children:[n.rawArgs&&h.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&&h.jsxs("div",{className:"mt-1.5 border-t border-ouro-moss/15 pt-1.5",children:[h.jsx(be,{children:"result"}),h.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:u})]})]})]})}function Ub({label:n}){return h.jsxs("div",{className:"flex items-center gap-2 py-6",children:[h.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),h.jsxs("span",{className:"font-mono text-xs text-ouro-shadow",children:[n,"…"]})]})}function $3({agentName:n,view:a,focus:l,onFocusConsumed:o,refreshGeneration:u}){var V,R;const f=Pi(),[d,m]=w.useState(null),[p,g]=w.useState(null),[y,x]=w.useState(null),S=a.work,T=S.obligations,E=S.tasks;w.useEffect(()=>{Be(`/agents/${encodeURIComponent(n)}/coding`).then(m),Be(`/agents/${encodeURIComponent(n)}/obligations`).then(g).catch(()=>{}),Be(`/agents/${encodeURIComponent(n)}/self-fix`).then(x).catch(()=>{})},[n,u]);const j=(p==null?void 0:p.items)??T.items,D=(p==null?void 0:p.openCount)??T.openCount,z=(d==null?void 0:d.items)??[],O=new Map;for(const U of z){const P=U.obligationId;if(P){const F=O.get(P);F?F.push(U):O.set(P,[U])}}return h.jsxs("div",{className:"space-y-8",children:[h.jsxs("section",{children:[h.jsx(nr,{label:`Obligations (${D} open)`}),(p==null?void 0:p.primarySelectionReason)&&h.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Primary: ",p.primarySelectionReason]}),j.length>0?h.jsx("div",{className:"mt-3 space-y-3",children:j.map(U=>{const P=O.get(U.id)??[],F=q3(U)?U:null,W=(F==null?void 0:F.isPrimary)??!1,oe=(F==null?void 0:F.meaning)??null,B=U.origin;return h.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:[h.jsxs("div",{className:"flex items-start gap-2",children:[W&&h.jsx(be,{color:"lime",children:"primary"}),h.jsx(be,{color:U.status==="pending"?"yellow":U.status==="fulfilled"?"lime":"zinc",children:U.status}),h.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:jt(U.content,120)})]}),B&&h.jsxs("button",{onClick:()=>f({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:[h.jsx("span",{className:"text-ouro-shadow",children:"from"}),h.jsx("span",{className:"font-medium text-ouro-glow",children:B.channel}),h.jsx("span",{className:"text-ouro-shadow",children:"→"}),h.jsx("span",{className:"text-ouro-mist truncate",children:B.key}),h.jsx("span",{className:"ml-auto text-ouro-shadow",children:"open session →"})]}),U.currentSurface&&h.jsxs("div",{className:"mt-1 text-xs text-ouro-mist",children:["surface: ",h.jsx("span",{className:"text-ouro-bone",children:U.currentSurface.kind})," — ",U.currentSurface.label]}),(oe==null?void 0:oe.waitingOn)&&h.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["Waiting on: ",oe.waitingOn]}),P.length>0&&h.jsxs("div",{className:"mt-2 space-y-1",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Linked coding"}),P.map(Z=>h.jsxs("div",{className:"flex items-center gap-2 rounded bg-ouro-moss/10 px-2 py-1 text-xs",children:[h.jsx(be,{color:Z.status==="failed"?"red":Z.status==="running"?"lime":"zinc",children:Z.status}),h.jsxs("span",{className:"text-ouro-mist truncate",children:[Z.runner," — ",Z.workdir]})]},Z.id))]}),U.nextAction&&h.jsxs("p",{className:"mt-1.5 text-xs text-ouro-mist",children:["Next: ",U.nextAction]}),h.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:it(U.updatedAt)})]},U.id)})}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No open obligations."})]}),y&&y.steps.length>0&&h.jsxs("section",{children:[h.jsx(nr,{label:`Self-fix ${y.active?"(active)":"(inactive)"}`}),y.currentStep&&h.jsxs("p",{className:"mt-1 text-xs text-ouro-glow",children:["Current: ",y.currentStep]}),h.jsx("div",{className:"mt-3 space-y-1.5",children:y.steps.map((U,P)=>h.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:[h.jsx(be,{color:U.status==="done"?"lime":U.status==="active"?"yellow":(U.status==="skipped","zinc"),children:U.status}),h.jsx("span",{className:`text-sm ${U.status==="active"?"font-medium text-ouro-bone":"text-ouro-mist"}`,children:U.label}),U.detail&&h.jsx("span",{className:"ml-auto text-xs text-ouro-shadow",children:U.detail})]},P))})]}),h.jsxs("section",{children:[h.jsx(nr,{label:`Coding lanes (${z.length})`}),z.length>0?h.jsx("div",{className:"mt-3 space-y-2",children:z.map(U=>{const P=U.status,F=P==="failed",W=U.failure,oe=U.obligationId,B=U.originSession;return h.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(be,{color:F?"red":P==="running"?"lime":P==="completed"?"zinc":"yellow",children:P}),h.jsx("span",{className:"text-sm font-medium text-ouro-bone",children:U.runner}),h.jsx("span",{className:"truncate text-xs text-ouro-shadow",children:U.workdir})]}),h.jsxs("div",{className:"mt-1 flex flex-wrap gap-2",children:[oe&&h.jsxs("button",{onClick:()=>f({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&&h.jsxs("span",{className:"text-xs text-ouro-glow",children:["task: ",U.taskRef]}),B&&h.jsx("button",{onClick:()=>{f({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&&h.jsx("p",{className:"mt-1.5 text-xs text-ouro-mist",children:jt(U.checkpoint,100)}),h.jsxs("p",{className:"mt-1 text-xs text-ouro-shadow",children:["pid ",U.pid??"–"," · restarts ",U.restartCount," · ",it(U.lastActivityAt)]}),F&&W&&h.jsxs("div",{className:"mt-2 rounded bg-ouro-fang/5 p-2 text-xs ring-1 ring-ouro-fang/15",children:[h.jsx("span",{className:"font-semibold text-ouro-fang",children:"FAILURE:"})," ",h.jsxs("span",{className:"text-ouro-mist",children:[W.command," exited ",String(W.code??W.signal)]}),W.stderrTail&&h.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)})}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No coding sessions."})]}),h.jsxs("section",{children:[h.jsx(nr,{label:`Tasks (${E.liveCount} live, ${E.blockedCount} blocked)`}),((V=E.liveTaskNames)==null?void 0:V.length)>0?h.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:E.liveTaskNames.map(U=>h.jsx(be,{children:U},U))}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No live tasks."}),((R=E.actionRequired)==null?void 0:R.length)>0&&h.jsxs("div",{className:"mt-3",children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Action required"}),h.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:E.actionRequired.map(U=>h.jsx(be,{color:"red",children:U},U))})]})]})]})}function nr({label:n}){return h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function q3(n){return"isPrimary"in n}function Y3({agentName:n,focus:a,onFocusConsumed:l,refreshGeneration:o}){const u=Pi(),[f,d]=w.useState(null),[m,p]=w.useState(null),[g,y]=w.useState(null);w.useEffect(()=>{const E=`/agents/${encodeURIComponent(n)}`;Promise.all([Be(`${E}/attention`).then(d),Be(`${E}/bridges`).then(p),Be(`${E}/friends`).then(y)])},[n,o]);const x=(f==null?void 0:f.queueItems)??[],S=(m==null?void 0:m.items)??[],T=(g==null?void 0:g.friends)??[];return h.jsxs("div",{className:"space-y-8",children:[h.jsxs("section",{children:[h.jsx(kf,{label:`Who is waiting (${(f==null?void 0:f.queueLength)??0})`}),x.length>0?h.jsx("div",{className:"mt-3 space-y-2",children:x.map((E,j)=>{const D=E.bridgeId,z=E.obligationId;return h.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{onClick:()=>u({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:E.friendName}),h.jsxs("span",{className:"text-xs text-ouro-shadow",children:["via ",E.channel]}),h.jsxs(be,{color:"yellow",children:["waiting ",it(new Date(E.timestamp).toISOString())]})]}),h.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:jt(E.delegatedContent,140)}),h.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-2 text-xs",children:[D&&h.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),"…"]}),z&&h.jsxs("button",{onClick:()=>u({tab:"work",focus:z}),className:"text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:["obligation: ",z.slice(0,16),"…"]})]})]},j)})}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"Nobody waiting."})]}),h.jsxs("section",{children:[h.jsx(kf,{label:`Bridges (${(m==null?void 0:m.totalCount)??0})`}),S.length>0?h.jsx("div",{className:"mt-3 space-y-3",children:S.map(E=>{const j=E.attachedSessions,D=E.task,z=E.lifecycle==="active";return h.jsxs("div",{className:`rounded-lg px-3 py-3 ring-1 ${z?"bg-ouro-moss/10 ring-ouro-glow/12":"bg-ouro-void/40 ring-ouro-moss/15"}`,children:[h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx(be,{color:z?"lime":"zinc",children:E.lifecycle}),h.jsx("p",{className:"font-medium text-ouro-bone",children:E.objective})]}),E.summary&&h.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:jt(E.summary,160)}),j.length>0&&h.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:j.map((O,V)=>h.jsxs("button",{onClick:()=>u({tab:"sessions",focus:`${O.friendId}/${O.channel}/${O.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:[O.friendId,"/",O.channel,"/",O.key]},V))}),D&&h.jsxs("p",{className:"mt-1.5 text-xs",children:[h.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]}),h.jsxs("span",{className:"text-ouro-shadow",children:[" (",D.mode,")"]})]}),h.jsx("p",{className:"mt-1 text-xs text-ouro-shadow",children:it(E.updatedAt)})]},E.id)})}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No bridges."})]}),h.jsxs("section",{children:[h.jsx(kf,{label:`Friends (${(g==null?void 0:g.totalFriends)??0})`}),T.length>0?h.jsx("div",{className:"mt-3 space-y-1.5",children:T.map(E=>h.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:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("button",{onClick:()=>u({tab:"sessions"}),className:"font-medium text-ouro-bone hover:text-ouro-glow transition-colors",children:E.friendName}),h.jsxs("p",{className:"text-xs text-ouro-shadow",children:[E.channels.join(", ")," · ",E.sessionCount," sessions",E.lastActivityAt&&h.jsxs(h.Fragment,{children:[" · ",it(E.lastActivityAt)]})]})]}),h.jsxs("div",{className:"shrink-0 text-right",children:[h.jsx("p",{className:"tabular-nums text-sm font-medium text-ouro-bone",children:E.totalTokens.toLocaleString()}),h.jsx("p",{className:"text-[10px] text-ouro-shadow",children:"tokens"})]})]},E.friendId))}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No friends."})]})]})}function kf({label:n}){return h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:n})}function G3(n){return _b(n)}function el(n){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(G3(n)))}function X3({agentName:n,view:a,refreshGeneration:l}){const o=Pi(),[u,f]=w.useState(null),[d,m]=w.useState(null),[p,g]=w.useState(!1),y=w.useRef(null),x=a.inner;w.useEffect(()=>{Be(`/agents/${encodeURIComponent(n)}/habits`).then(f)},[n,l]),w.useEffect(()=>{d&&y.current!==l&&(y.current=l,Be(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(m))},[n,l,d!==null]);function S(){if(d){g(!p);return}Be(`/agents/${encodeURIComponent(n)}/inner-transcript`).then(R=>{y.current=l,m(R),g(!0)})}const T=(u==null?void 0:u.items)??[],E=T.filter(R=>R.isOverdue),j=T.filter(R=>R.status==="active"&&!R.isOverdue),D=T.filter(R=>R.status==="paused"),z=x.mode==="deep"?x.origin:null,O=x.mode==="deep"?x.obligationStatus:null,V=T.find(R=>R.name.toLowerCase()==="heartbeat");return h.jsxs("div",{className:"space-y-8",children:[V&&h.jsxs("section",{children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Heartbeat"}),h.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:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${V.isOverdue?"bg-ouro-fang animate-pulse":"bg-ouro-glow"}`}),h.jsx("span",{className:"font-medium text-ouro-bone",children:V.isOverdue?"Overdue":"Healthy"}),h.jsxs("span",{className:"text-xs text-ouro-shadow",children:["every ",V.cadence??"unknown"," · last ",V.lastRun?it(V.lastRun):"never"]})]})})]}),h.jsx("section",{children:h.jsxs("div",{className:"rounded-xl bg-ouro-moss/15 p-4 ring-1 ring-ouro-glow/10",children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-ouro-glow",children:"Inner work"}),h.jsx("p",{className:"mt-1 font-display text-xl italic font-semibold text-ouro-bone",children:x.status}),x.summary&&h.jsx("p",{className:"mt-2 text-sm leading-relaxed text-ouro-mist",children:x.summary}),h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:x.hasPending?"Pending inner work queued.":"No pending inner work."}),z&&h.jsxs("div",{className:"mt-3",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow",children:"Triggered from"}),h.jsxs("button",{onClick:()=>{o({tab:"sessions",focus:`${z.friendId}/${z.channel}/${z.key}`})},className:"mt-1 text-xs text-ouro-glow underline decoration-ouro-glow/30 underline-offset-2 hover:decoration-ouro-glow",children:[z.friendId.slice(0,8),"…/",z.channel,"/",z.key]}),O&&h.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: ",O]})]})]})}),h.jsxs("section",{children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Inner dialog ",d?`(${d.messages.length} total)`:""]}),d?h.jsx(K3,{messages:d.messages}):h.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"})]}),h.jsxs("section",{children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Habits (",(u==null?void 0:u.totalCount)??0,")"]}),E.length>0&&h.jsxs("div",{className:"mt-3",children:[h.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-fang mb-1.5",children:["Overdue (",E.length,")"]}),h.jsx("div",{className:"space-y-1.5",children:E.map(R=>h.jsx(Lf,{h:R},R.name))})]}),j.length>0&&h.jsxs("div",{className:"mt-3",children:[h.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow mb-1.5",children:["Running fine (",j.length,")"]}),h.jsx("div",{className:"space-y-1.5",children:j.map(R=>h.jsx(Lf,{h:R},R.name))})]}),D.length>0&&h.jsxs("div",{className:"mt-3",children:[h.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-shadow mb-1.5",children:["Paused (",D.length,")"]}),h.jsx("div",{className:"space-y-1.5",children:D.map(R=>h.jsx(Lf,{h:R},R.name))})]}),T.length===0&&h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No habits configured."})]})]})}function K3({messages:n}){const a=n.filter(g=>g.role!=="system"&&g.role!=="tool"),[l,o]=w.useState(!1),u=w.useRef(null),f=l?a:a.slice(-30),d=a.length-f.length;w.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[f.length]);const m=[];for(const g of a){if(g.role!=="assistant")continue;const y=(g.toolCalls??[]).map(bd);for(const x of y)x.kind==="surface"&&m.push({index:g.sequence,kind:"surfaced",label:jt(x.deliveredText??"",40)}),x.kind==="rest"&&m.push({index:g.sequence,kind:"resting",label:"resting"}),x.kind==="delegation"&&m.push({index:g.sequence,kind:"delegated",label:"continued thinking"})}function p(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 h.jsxs("div",{children:[m.length>0&&h.jsx("div",{className:"mt-2 mb-1 flex flex-wrap gap-1",children:m.map((g,y)=>h.jsxs("button",{onClick:()=>{o(!0),setTimeout(()=>p(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))}),h.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:[d>0&&h.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 ",d," earlier messages"]}),f.map(g=>{const y=Al(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 h.jsx("div",{"data-msg-index":g.sequence,className:"flex justify-start py-1",children:h.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:[h.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[h.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"}),h.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",g.sequence]}),h.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(g)})]}),h.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(bd),S=x.filter(j=>j.kind==="surface"),T=x.filter(j=>j.kind==="rest"),E=x.filter(j=>j.kind==="delegation");return h.jsxs("div",{"data-msg-index":g.sequence,children:[S.map(j=>h.jsx("div",{className:"flex justify-end py-1",children:h.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:[h.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow",children:"★ surfaced outward"}),h.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",g.sequence]}),h.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(g)})]}),h.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone whitespace-pre-wrap break-words",children:j.deliveredText}),j.metadata&&h.jsxs("p",{className:"mt-1 font-mono text-[9px] text-ouro-shadow",children:["→ ",j.metadata]})]})},j.id)),E.length>0&&h.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&&h.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&&E.length===0&&y&&h.jsx("div",{className:"flex justify-end py-1",children:h.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:[h.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[h.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider text-ouro-glow/50",children:"thinking"}),h.jsxs("span",{className:"font-mono text-[9px] text-ouro-shadow/40",children:["#",g.sequence]}),h.jsx("span",{className:"font-mono text-[9px] text-ouro-shadow/60",children:el(g)})]}),h.jsx("p",{className:"text-sm leading-relaxed text-ouro-mist whitespace-pre-wrap break-words",children:y})]})})]},g.id)}return null})]})]})}function Lf({h:n}){const a=n.isOverdue,l=n.isDegraded,o=n.status;return h.jsxs("div",{className:`rounded-lg px-3 py-2.5 ring-1 ${a?"bg-ouro-fang/5 ring-ouro-fang/15":l?"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:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(be,{color:a?"red":l?"yellow":o==="active"?"lime":"zinc",children:a?"overdue":l?"degraded":o}),h.jsx("span",{className:"font-medium text-ouro-bone",children:n.title})]}),h.jsxs("div",{className:"mt-1 flex flex-wrap gap-3 text-xs text-ouro-shadow",children:[n.cadence&&h.jsxs("span",{children:["every ",n.cadence]}),h.jsx("span",{children:n.lastRun?`last ${it(n.lastRun)}`:"never run"}),l&&n.degradedReason&&h.jsx("span",{className:"text-ouro-gold",children:n.degradedReason}),!a&&!l&&o==="active"&&n.lastRun&&h.jsx("span",{className:"text-ouro-glow",children:"on schedule"}),a&&n.overdueMs&&h.jsxs("span",{className:"text-ouro-fang",children:[Math.floor(n.overdueMs/6e4),"m overdue"]}),!n.lastRun&&o==="active"&&h.jsx("span",{className:"text-ouro-gold",children:"never fired — may be misconfigured"})]}),n.bodyExcerpt&&h.jsx("p",{className:"mt-1 text-xs text-ouro-shadow/70",children:n.bodyExcerpt})]})}function F3({agentName:n,refreshGeneration:a}){const[l,o]=w.useState(null),[u,f]=w.useState(null),[d,m]=w.useState("diary");if(w.useEffect(()=>{Be(`/agents/${encodeURIComponent(n)}/notes`).then(o),Be(`/agents/${encodeURIComponent(n)}/note-decisions`).then(f).catch(()=>{})},[n,a]),!l)return h.jsxs("div",{className:"flex items-center gap-2 py-6",children:[h.jsx("div",{className:"h-2 w-2 animate-pulse rounded-full bg-ouro-glow"}),h.jsx("span",{className:"font-mono text-xs text-ouro-shadow",children:"Loading…"})]});const p=l.recentDiaryEntries,g=l.recentJournalEntries;return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("button",{onClick:()=>m("diary"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="diary"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Diary (",l.diaryEntryCount,")"]}),h.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),h.jsxs("button",{onClick:()=>m("journal"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="journal"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Journal (",l.journalEntryCount,")"]}),h.jsx("span",{className:"text-ouro-shadow/30",children:"|"}),h.jsxs("button",{onClick:()=>m("decisions"),className:`font-mono text-xs uppercase tracking-wider transition-colors ${d==="decisions"?"text-ouro-glow":"text-ouro-shadow hover:text-ouro-mist"}`,children:["Decisions (",(u==null?void 0:u.totalCount)??0,")"]})]}),d==="diary"&&h.jsx("div",{children:p.length>0?h.jsx("div",{className:"space-y-3",children:p.map(y=>h.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[h.jsx("p",{className:"text-sm leading-relaxed text-ouro-bone",children:y.text}),h.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-ouro-shadow",children:[h.jsx(be,{children:y.source}),h.jsx("span",{children:it(y.createdAt)})]})]},y.id))}):h.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No diary entries yet. The agent hasn't written anything down."})}),d==="journal"&&h.jsx("div",{children:g.length>0?h.jsx("div",{className:"space-y-3",children:g.map(y=>h.jsxs("article",{className:"rounded-xl bg-ouro-void/40 px-4 py-3.5 ring-1 ring-ouro-moss/15",children:[h.jsx("p",{className:"font-medium text-ouro-bone",children:y.filename}),h.jsx("p",{className:"mt-1 text-sm leading-relaxed text-ouro-mist",children:y.preview})]},y.filename))}):h.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No journal entries yet."})}),d==="decisions"&&h.jsx("div",{children:u&&u.items.length>0?h.jsx("div",{className:"space-y-2",children:u.items.map((y,x)=>h.jsxs("div",{className:"rounded-xl bg-ouro-void/40 px-4 py-3 ring-1 ring-ouro-moss/15",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(be,{color:y.decision==="saved"?"lime":"zinc",children:y.decision}),h.jsx(be,{children:y.kind.replace(/_/g," ")}),h.jsx("span",{className:"text-xs text-ouro-shadow",children:it(y.timestamp)})]}),y.reason&&h.jsx("p",{className:"mt-1 text-sm text-ouro-mist",children:y.reason}),y.excerpt&&h.jsx("p",{className:"mt-0.5 text-xs text-ouro-shadow italic truncate",children:y.excerpt})]},x))}):h.jsx("p",{className:"text-sm text-ouro-shadow italic",children:"No note decisions logged yet."})})]})}function Z3({agentName:n,view:a,refreshGeneration:l}){var E;const[o,u]=w.useState(null),[f,d]=w.useState(null),m=a.agent,p=m.degraded,g=m.freshness,y=((E=m.providers)==null?void 0:E.lanes)??[];w.useEffect(()=>{Promise.all([Be("/machine/health").then(u).catch(()=>null),Be("/machine/logs").then(d).catch(()=>null)])},[n,l]);const x=nC(o)?o:null,S=(x==null?void 0:x.degradedComponents)??[],T=(f==null?void 0:f.entries)??[];return h.jsxs("div",{className:"space-y-8",children:[p.status==="degraded"&&p.issues.length>0&&h.jsxs("section",{children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-fang",children:["Agent issues (",p.issues.length,")"]}),h.jsx("div",{className:"mt-3 space-y-1.5",children:p.issues.map((j,D)=>h.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2.5 ring-1 ring-ouro-fang/15",children:[h.jsx("p",{className:"font-mono text-xs font-semibold text-ouro-fang",children:j.code}),h.jsx("p",{className:"mt-0.5 text-xs text-ouro-mist break-all",children:j.detail})]},D))})]}),h.jsxs("section",{children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Agent config"}),h.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[h.jsx(Hi,{label:"Provider lanes",value:Q3(y)}),h.jsx(Hi,{label:"Enabled",value:m.enabled?"yes":"no"}),h.jsx(Hi,{label:"Freshness",value:`${g.status}${g.ageMs!=null?` (${Math.floor(g.ageMs/6e4)}m)`:""}`})]})]}),h.jsxs("section",{children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Provider lanes"}),y.length>0?h.jsx("div",{className:"mt-3 grid gap-2 lg:grid-cols-2",children:y.map(j=>{const D=I3(j);return h.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-3 ring-1 ring-ouro-moss/15",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx("p",{className:"font-mono text-xs font-semibold uppercase tracking-wider text-ouro-bone",children:j.lane}),h.jsx(be,{color:eC(j),children:j.status}),h.jsx(be,{color:tC(j.readiness.status),children:j.readiness.status})]}),h.jsx("p",{className:"mt-2 text-sm font-medium text-ouro-bone",children:P3(j)}),h.jsxs("div",{className:"mt-2 space-y-1 text-xs text-ouro-mist",children:[h.jsxs("p",{children:["source: ",j.source]}),h.jsxs("p",{children:["readiness: ",J3(j.readiness)]}),j.readiness.attempts!==void 0&&h.jsxs("p",{children:["attempts: ",j.readiness.attempts]}),j.readiness.checkedAt&&h.jsxs("p",{children:["checked: ",it(j.readiness.checkedAt)]}),h.jsxs("p",{children:["credentials: ",W3(j.credential)]}),j.credential.revision&&h.jsxs("p",{children:["revision: ",j.credential.revision]}),J0(j)&&h.jsxs("p",{children:["reason: ",J0(j)]}),D&&h.jsxs("p",{className:"break-all text-ouro-fang",children:["repair: ",D]}),j.warnings.map((z,O)=>h.jsxs("p",{className:"break-words text-ouro-gold",children:["warning: ",z]},O))]})]},j.lane)})}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No provider lane data loaded."})]}),h.jsxs("section",{children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:"Daemon health"}),x?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[h.jsx(Hi,{label:"Status",value:x.status}),h.jsx(Hi,{label:"Mode",value:x.mode}),h.jsx(Hi,{label:"Uptime",value:`${Math.floor(x.uptimeSeconds/60)}m`})]}),S.length>0&&h.jsxs("div",{className:"mt-3 space-y-1.5",children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-fang",children:"Degraded components"}),S.map((j,D)=>h.jsxs("div",{className:"rounded-lg bg-ouro-fang/5 px-3 py-2 ring-1 ring-ouro-fang/15",children:[h.jsx("p",{className:"text-xs font-semibold text-ouro-fang",children:j.component}),h.jsx("p",{className:"text-xs text-ouro-mist",children:j.reason})]},D))]})]}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No health file found. This is normal when not running under the daemon."})]}),h.jsxs("section",{children:[h.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-ouro-glow",children:["Recent logs (",(f==null?void 0:f.totalLines)??0," total)"]}),T.length>0?h.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((j,D)=>{const z=j.level;return h.jsxs("div",{className:"border-b border-ouro-moss/10 px-3 py-1.5 last:border-b-0",children:[h.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[h.jsx(be,{color:z==="error"?"red":z==="warn"?"yellow":"zinc",children:z}),h.jsx("span",{className:"text-ouro-shadow",children:it(j.ts)}),h.jsx("span",{className:"font-mono text-ouro-glow",children:j.event})]}),h.jsx("p",{className:"truncate text-xs text-ouro-mist",children:j.message})]},D)})}):h.jsx("p",{className:"mt-2 text-sm text-ouro-shadow",children:"No log entries."})]})]})}function Hi({label:n,value:a}){return h.jsxs("div",{className:"rounded-lg bg-ouro-void/40 px-3 py-2.5 ring-1 ring-ouro-moss/15",children:[h.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wider text-ouro-shadow",children:n}),h.jsx("p",{className:"mt-1 text-sm font-medium text-ouro-bone",children:a})]})}function Q3(n){return n.length===0?"none":`${n.filter(l=>l.status==="configured").length}/${n.length} configured`}function P3(n){return n.status==="unconfigured"?"unconfigured":`${n.provider} / ${n.model}`}function J3(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 W3(n){return n.status==="present"?n.source??"vault":n.status==="invalid-pool"?"vault unavailable":"missing"}function I3(n){return n.status==="unconfigured"?n.repairCommand:n.credential.repairCommand}function J0(n){return n.status==="unconfigured"?n.reason:n.readiness.reason}function eC(n){return n.status==="configured"?"green":"yellow"}function tC(n){return n==="ready"?"green":n==="failed"?"red":n==="stale"?"amber":"zinc"}function nC(n){return!!(n&&"degradedComponents"in n)}const Vf=[{id:"overview",label:"Overview"},{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 aC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function iC({agentName:n,view:a,deskPrefs:l,refreshGeneration:o,initialRoute:u}){const[f,d]=w.useState((u==null?void 0:u.tab)??"overview"),[m,p]=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,d(u.tab),p(u.focus)):(d("overview"),p(void 0))},[n]);const y=w.useCallback(j=>{d(j.tab),p(j.focus),window.history.pushState(null,"",_f({agent:n,tab:j.tab,focus:j.focus}))},[n]),x=w.useCallback(j=>{d(j),p(void 0),window.history.pushState(null,"",_f({agent:n,tab:j,focus:void 0}))},[n]),S=w.useCallback(()=>p(void 0),[]);if(T3(y),!a||!n)return h.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[h.jsx("p",{className:"font-display text-2xl italic text-ouro-bone",children:"Choose an agent"}),h.jsx("p",{className:"mt-2 text-sm text-ouro-mist",children:"Select an agent from the sidebar to inspect its state."})]});const E=a.agent.attention;return h.jsx(ty.Provider,{value:y,children:h.jsxs("div",{children:[h.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-4 border-b border-ouro-moss/30",children:[h.jsx("div",{className:"min-w-0",children:h.jsx("h1",{className:"font-display text-2xl italic font-semibold text-ouro-bone sm:text-3xl",children:n})}),h.jsx(be,{color:aC(E.level),children:E.label})]}),h.jsx("nav",{className:"mt-4 flex gap-0.5 overflow-x-auto border-b border-ouro-moss/20 -mx-1",children:(()=>{const j=l==null?void 0:l.tabOrder;if(!j)return Vf;const D=j.map(O=>Vf.find(V=>V.id===O)).filter(O=>O!==void 0),z=Vf.filter(O=>!j.includes(O.id));return[...D,...z]})().map(j=>h.jsx("button",{type:"button",onClick:()=>x(j.id),className:`shrink-0 px-3 py-2 text-xs font-mono uppercase tracking-wider transition-colors rounded-t-md ${f===j.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:j.label},j.id))}),h.jsxs("div",{className:"mt-6",children:[f==="overview"&&h.jsx(D3,{view:a,deskPrefs:l,refreshGeneration:o}),f==="sessions"&&h.jsx(L3,{agentName:n,focus:m,onFocusConsumed:S,deskPrefs:l,refreshGeneration:o}),f==="work"&&h.jsx($3,{agentName:n,view:a,focus:m,onFocusConsumed:S,refreshGeneration:o}),f==="connections"&&h.jsx(Y3,{agentName:n,focus:m,onFocusConsumed:S,refreshGeneration:o}),f==="inner"&&h.jsx(X3,{agentName:n,view:a,refreshGeneration:o}),f==="notes"&&h.jsx(F3,{agentName:n,refreshGeneration:o}),f==="runtime"&&h.jsx(Z3,{agentName:n,view:a,refreshGeneration:o})]})]})})}function W0(){return ny(window.location.hash)}function sC(n){return n==="degraded"||n==="blocked"?"red":n==="stale"?"yellow":n==="active"?"lime":"zinc"}function lC(){var D,z;const[n,a]=w.useState(null),[l,o]=w.useState(((D=W0())==null?void 0:D.agent)??""),[u,f]=w.useState(null),[d,m]=w.useState(0),p=w.useRef(0),g=w.useRef(W0()),y=w.useCallback(async()=>{var O;try{const V=await Be("/machine");if(a(V),!l&&V.agents.length>0){const R=((O=g.current)==null?void 0:O.agent)??V.agents[0].agentName;o(R)}}catch{}},[l]),[x,S]=w.useState(null),T=w.useCallback(async O=>{if(!O){f(null),S(null);return}try{const[V,R]=await Promise.all([Be(`/agents/${encodeURIComponent(O)}`),Be(`/agents/${encodeURIComponent(O)}/desk-prefs`)]);f(V),S(R)}catch{f(null),S(null)}},[]);w.useEffect(()=>{y()},[y]),w.useEffect(()=>{l&&T(l)},[l,T]),w.useEffect(()=>xw(()=>{const V=++p.current;y().then(async()=>{p.current===V&&(l&&(await T(l),p.current!==V)||m(R=>R+1))})}),[y,T,l]),w.useEffect(()=>{const O=()=>{const V=ny(window.location.hash);V&&o(V.agent)};return window.addEventListener("hashchange",O),()=>window.removeEventListener("hashchange",O)},[]);const E=w.useCallback(O=>{o(O),window.history.pushState(null,"",_f({agent:O,tab:"overview",focus:void 0}))},[]);if(!n)return h.jsx("div",{className:"flex h-screen items-center justify-center bg-ouro-void",children:h.jsxs("div",{className:"text-center",children:[h.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)]"}),h.jsx("p",{className:"font-mono text-sm text-ouro-mist",children:"Connecting to Outlook…"})]})});const j=n.overview.totals;return h.jsx(p3,{navbar:h.jsxs(u3,{children:[h.jsx(f3,{}),h.jsx(c3,{children:h.jsx(ah,{children:h.jsx(be,{color:n.overview.daemon.mode==="dev"?"yellow":"lime",children:n.overview.daemon.mode})})})]}),sidebar:h.jsxs(g3,{className:"bg-ouro-deep",children:[h.jsx(v3,{className:"border-ouro-moss/30",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"h-3 w-3 shrink-0 rounded-full bg-ouro-glow shadow-[0_0_16px_theme(--color-ouro-glow)]"}),h.jsx("div",{className:"min-w-0",children:h.jsx("p",{className:"truncate font-display text-lg italic font-semibold text-ouro-bone",children:"Ouro Outlook"})})]})}),h.jsxs(y3,{className:"[&>[data-slot=section]+[data-slot=section]]:mt-4",children:[h.jsxs(F0,{children:[h.jsx(Z0,{className:"text-ouro-mist/60",children:"Machine"}),h.jsx("div",{className:"grid grid-cols-3 gap-1.5 px-2",children:[{v:j.liveTasks??0,l:"Tasks",alert:(j.blockedTasks??0)>0},{v:j.openObligations??0,l:"Oblig."},{v:j.activeCodingAgents??0,l:"Coding"}].map(O=>h.jsxs("div",{className:"rounded-md bg-ouro-void/60 px-2 py-1.5 text-center ring-1 ring-ouro-moss/20",children:[h.jsx("div",{className:`text-base font-semibold tabular-nums ${O.alert?"text-ouro-fang":"text-ouro-bone"}`,children:O.v}),h.jsx("div",{className:"text-[9px] uppercase tracking-widest text-ouro-shadow",children:O.l})]},O.l))})]}),h.jsxs(F0,{children:[h.jsx(Z0,{className:"text-ouro-mist/60",children:"Agents"}),n.agents.map(O=>h.jsx(b3,{current:O.agentName===l,onClick:()=>E(O.agentName),children:h.jsxs("div",{className:"flex min-w-0 flex-1 items-center justify-between gap-2",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx(S3,{className:"text-ouro-bone",children:O.agentName}),h.jsxs("p",{className:"truncate text-xs text-ouro-shadow",children:[O.tasks.liveCount,"t · ",O.obligations.openCount,"o · ",O.coding.activeCount,"c"]})]}),h.jsx(be,{color:sC(O.attention.level),children:O.attention.label})]})},O.agentName))]})]}),h.jsx(x3,{className:"border-ouro-moss/30",children:h.jsxs("div",{className:"px-2 text-xs text-ouro-shadow",children:[h.jsx("p",{className:"font-mono",children:n.overview.runtime.version}),h.jsxs("p",{className:"mt-0.5",children:[n.overview.daemon.mode," · ",n.overview.freshness.status]})]})}),l&&u&&h.jsx("div",{className:"px-4 py-2 border-t border-ouro-moss/20",children:h.jsx("p",{className:"text-xs italic text-ouro-shadow/70",children:(()=>{const O=x==null?void 0:x.statusLine;if(O)return O;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:h.jsx(iC,{agentName:l,view:u,deskPrefs:x,refreshGeneration:d,initialRoute:((z=g.current)==null?void 0:z.agent)===l?g.current:void 0})})}yw.createRoot(document.getElementById("app")).render(h.jsx(w.StrictMode,{children:h.jsx(lC,{})}));
|