hippo-memory 1.52.7 → 1.52.9
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/README.md +159 -99
- package/dist/api.d.ts +52 -18
- package/dist/api.js +155 -86
- package/dist/audit.d.ts +2 -1
- package/dist/audit.js +63 -0
- package/dist/autolearn.js +3 -2
- package/dist/capture.d.ts +40 -0
- package/dist/capture.js +141 -119
- package/dist/churn-git.js +2 -2
- package/dist/cli.d.ts +1 -4
- package/dist/cli.js +695 -702
- package/dist/codex-patch.d.ts +12 -0
- package/dist/codex-patch.js +71 -0
- package/dist/config.d.ts +0 -1
- package/dist/config.js +0 -4
- package/dist/connectors/slack/types.d.ts +0 -1
- package/dist/consolidate.js +85 -32
- package/dist/context-render.d.ts +36 -0
- package/dist/context-render.js +154 -0
- package/dist/dag.js +3 -2
- package/dist/dashboard.js +4 -0
- package/dist/db.js +6 -6
- package/dist/dedupe.d.ts +6 -6
- package/dist/dedupe.js +10 -9
- package/dist/doctor.d.ts +1 -1
- package/dist/doctor.js +35 -2
- package/dist/dormant.d.ts +4 -0
- package/dist/dormant.js +17 -2
- package/dist/embedding-provider.d.ts +2 -1
- package/dist/embedding-provider.js +2 -1
- package/dist/embeddings.js +23 -3
- package/dist/extensions/openclaw-plugin/index.js +1 -0
- package/dist/extract.js +5 -1
- package/dist/forward-claim-detector.d.ts +1 -1
- package/dist/forward-claim-detector.js +1 -1
- package/dist/graph-recall.d.ts +3 -1
- package/dist/graph-recall.js +13 -10
- package/dist/handoff.d.ts +2 -0
- package/dist/hooks.d.ts +19 -5
- package/dist/hooks.js +131 -30
- package/dist/importers.js +5 -12
- package/dist/judgment.d.ts +30 -0
- package/dist/judgment.js +122 -0
- package/dist/mcp/server.js +174 -213
- package/dist/merged-row.d.ts +6 -0
- package/dist/merged-row.js +35 -0
- package/dist/multihop.d.ts +2 -1
- package/dist/multihop.js +7 -4
- package/dist/physics-state.d.ts +0 -4
- package/dist/physics-state.js +0 -6
- package/dist/predictions.d.ts +2 -17
- package/dist/predictions.js +2 -15
- package/dist/reject-flow.d.ts +7 -5
- package/dist/reject-flow.js +41 -12
- package/dist/salience.js +12 -5
- package/dist/same-text.d.ts +17 -0
- package/dist/same-text.js +38 -0
- package/dist/scheduler.d.ts +4 -0
- package/dist/scheduler.js +8 -0
- package/dist/search.d.ts +7 -0
- package/dist/search.js +16 -32
- package/dist/secret-detect.d.ts +2 -0
- package/dist/secret-detect.js +9 -3
- package/dist/server-detect.js +9 -33
- package/dist/server.js +6 -62
- package/dist/session-digest.d.ts +79 -0
- package/dist/session-digest.js +528 -0
- package/dist/shared.d.ts +11 -3
- package/dist/shared.js +41 -31
- package/dist/store.d.ts +4 -5
- package/dist/store.js +26 -13
- package/dist/token-ledger.d.ts +46 -8
- package/dist/token-ledger.js +140 -21
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist-ui/assets/index-BhT8RvO6.js +61 -0
- package/dist-ui/index.html +1 -1
- package/extensions/openclaw-plugin/README.md +4 -4
- package/extensions/openclaw-plugin/index.ts +1 -0
- package/extensions/openclaw-plugin/openclaw.plugin.json +2 -2
- package/extensions/openclaw-plugin/package.json +1 -1
- package/openclaw.plugin.json +2 -2
- package/package.json +2 -2
- package/dist-ui/assets/index-BgmA7Hwe.js +0 -61
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import{r as Oh,a as r0}from"./react-CEUiQZj-.js";import{C as d0,V as Wt,M as Va,T as Qa,Q as Pd,S as th,a as It,R as h0,P as m0,b as y0,c as hs,O as p0,B as Za,F as eh,d as lh,U as g0,W as v0,H as b0,N as S0,e as x0,f as Ko,g as _0,h as z0,i as T0,j as E0,k as M0,l as j0,A as A0,m as D0,n as C0,G as O0,L as Bo,o as qn,p as ah,q as R0,r as nh,s as U0,t as B0,D as N0,u as ih,v as H0}from"./three-BDgTxR1l.js";import{s as w0,l as L0,m as Y0,c as q0,a as G0,x as X0,y as Z0}from"./d3-BiWEKnn4.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const h of m)if(h.type==="childList")for(const x of h.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&o(x)}).observe(document,{childList:!0,subtree:!0});function r(m){const h={};return m.integrity&&(h.integrity=m.integrity),m.referrerPolicy&&(h.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?h.credentials="include":m.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(m){if(m.ep)return;m.ep=!0;const h=r(m);fetch(m.href,h)}})();var No={exports:{}},Gn={};/**
|
|
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 sh;function Q0(){if(sh)return Gn;sh=1;var c=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(o,m,h){var x=null;if(h!==void 0&&(x=""+h),m.key!==void 0&&(x=""+m.key),"key"in m){h={};for(var z in m)z!=="key"&&(h[z]=m[z])}else h=m;return m=h.ref,{$$typeof:c,type:o,key:x,ref:m!==void 0?m:null,props:h}}return Gn.Fragment=s,Gn.jsx=r,Gn.jsxs=r,Gn}var uh;function V0(){return uh||(uh=1,No.exports=Q0()),No.exports}var d=V0(),Ho={exports:{}},Xn={},wo={exports:{}},Lo={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* scheduler.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 oh;function K0(){return oh||(oh=1,(function(c){function s(M,L){var tt=M.length;M.push(L);t:for(;0<tt;){var bt=tt-1>>>1,mt=M[bt];if(0<m(mt,L))M[bt]=L,M[tt]=mt,tt=bt;else break t}}function r(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var L=M[0],tt=M.pop();if(tt!==L){M[0]=tt;t:for(var bt=0,mt=M.length,W=mt>>>1;bt<W;){var k=2*(bt+1)-1,dt=M[k],Ot=k+1,Pt=M[Ot];if(0>m(dt,tt))Ot<mt&&0>m(Pt,dt)?(M[bt]=Pt,M[Ot]=tt,bt=Ot):(M[bt]=dt,M[k]=tt,bt=k);else if(Ot<mt&&0>m(Pt,tt))M[bt]=Pt,M[Ot]=tt,bt=Ot;else break t}}return L}function m(M,L){var tt=M.sortIndex-L.sortIndex;return tt!==0?tt:M.id-L.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;c.unstable_now=function(){return h.now()}}else{var x=Date,z=x.now();c.unstable_now=function(){return x.now()-z}}var R=[],C=[],B=1,E=null,O=3,b=!1,U=!1,H=!1,w=!1,F=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function K(M){for(var L=r(C);L!==null;){if(L.callback===null)o(C);else if(L.startTime<=M)o(C),L.sortIndex=L.expirationTime,s(R,L);else break;L=r(C)}}function I(M){if(H=!1,K(M),!U)if(r(R)!==null)U=!0,Q||(Q=!0,rt());else{var L=r(C);L!==null&&vt(I,L.startTime-M)}}var Q=!1,Z=-1,$=5,G=-1;function ft(){return w?!0:!(c.unstable_now()-G<$)}function at(){if(w=!1,Q){var M=c.unstable_now();G=M;var L=!0;try{t:{U=!1,H&&(H=!1,Y(Z),Z=-1),b=!0;var tt=O;try{e:{for(K(M),E=r(R);E!==null&&!(E.expirationTime>M&&ft());){var bt=E.callback;if(typeof bt=="function"){E.callback=null,O=E.priorityLevel;var mt=bt(E.expirationTime<=M);if(M=c.unstable_now(),typeof mt=="function"){E.callback=mt,K(M),L=!0;break e}E===r(R)&&o(R),K(M)}else o(R);E=r(R)}if(E!==null)L=!0;else{var W=r(C);W!==null&&vt(I,W.startTime-M),L=!1}}break t}finally{E=null,O=tt,b=!1}L=void 0}}finally{L?rt():Q=!1}}}var rt;if(typeof q=="function")rt=function(){q(at)};else if(typeof MessageChannel<"u"){var nt=new MessageChannel,ht=nt.port2;nt.port1.onmessage=at,rt=function(){ht.postMessage(null)}}else rt=function(){F(at,0)};function vt(M,L){Z=F(function(){M(c.unstable_now())},L)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(M){M.callback=null},c.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<M?Math.floor(1e3/M):5},c.unstable_getCurrentPriorityLevel=function(){return O},c.unstable_next=function(M){switch(O){case 1:case 2:case 3:var L=3;break;default:L=O}var tt=O;O=L;try{return M()}finally{O=tt}},c.unstable_requestPaint=function(){w=!0},c.unstable_runWithPriority=function(M,L){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var tt=O;O=M;try{return L()}finally{O=tt}},c.unstable_scheduleCallback=function(M,L,tt){var bt=c.unstable_now();switch(typeof tt=="object"&&tt!==null?(tt=tt.delay,tt=typeof tt=="number"&&0<tt?bt+tt:bt):tt=bt,M){case 1:var mt=-1;break;case 2:mt=250;break;case 5:mt=1073741823;break;case 4:mt=1e4;break;default:mt=5e3}return mt=tt+mt,M={id:B++,callback:L,priorityLevel:M,startTime:tt,expirationTime:mt,sortIndex:-1},tt>bt?(M.sortIndex=tt,s(C,M),r(R)===null&&M===r(C)&&(H?(Y(Z),Z=-1):H=!0,vt(I,tt-bt))):(M.sortIndex=mt,s(R,M),U||b||(U=!0,Q||(Q=!0,rt()))),M},c.unstable_shouldYield=ft,c.unstable_wrapCallback=function(M){var L=O;return function(){var tt=O;O=L;try{return M.apply(this,arguments)}finally{O=tt}}}})(Lo)),Lo}var ch;function k0(){return ch||(ch=1,wo.exports=K0()),wo.exports}/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react-dom-client.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 fh;function J0(){if(fh)return Xn;fh=1;var c=k0(),s=Oh(),r=r0();function o(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function x(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function z(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function R(t){if(h(t)!==t)throw Error(o(188))}function C(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(o(188));return e!==t?null:t}for(var l=t,a=e;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return R(n),t;if(i===a)return R(n),e;i=i.sibling}throw Error(o(188))}if(l.return!==a.return)l=n,a=i;else{for(var u=!1,f=n.child;f;){if(f===l){u=!0,l=n,a=i;break}if(f===a){u=!0,a=n,l=i;break}f=f.sibling}if(!u){for(f=i.child;f;){if(f===l){u=!0,l=i,a=n;break}if(f===a){u=!0,a=i,l=n;break}f=f.sibling}if(!u)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?t:e}function B(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=B(t),e!==null)return e;t=t.sibling}return null}var E=Object.assign,O=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),q=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),ft=Symbol.for("react.memo_cache_sentinel"),at=Symbol.iterator;function rt(t){return t===null||typeof t!="object"?null:(t=at&&t[at]||t["@@iterator"],typeof t=="function"?t:null)}var nt=Symbol.for("react.client.reference");function ht(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===nt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case H:return"Fragment";case F:return"Profiler";case w:return"StrictMode";case I:return"Suspense";case Q:return"SuspenseList";case G:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case U:return"Portal";case q:return t.displayName||"Context";case Y:return(t._context.displayName||"Context")+".Consumer";case K:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return e=t.displayName||null,e!==null?e:ht(t.type)||"Memo";case $:e=t._payload,t=t._init;try{return ht(t(e))}catch{}}return null}var vt=Array.isArray,M=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tt={pending:!1,data:null,method:null,action:null},bt=[],mt=-1;function W(t){return{current:t}}function k(t){0>mt||(t.current=bt[mt],bt[mt]=null,mt--)}function dt(t,e){mt++,bt[mt]=t.current,t.current=e}var Ot=W(null),Pt=W(null),te=W(null),Wl=W(null);function $l(t,e){switch(dt(te,e),dt(Pt,t),dt(Ot,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?_d(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=_d(e),t=zd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}k(Ot),dt(Ot,t)}function Ye(){k(Ot),k(Pt),k(te)}function Ka(t){t.memoizedState!==null&&dt(Wl,t);var e=Ot.current,l=zd(e,t.type);e!==l&&(dt(Pt,t),dt(Ot,l))}function _t(t){Pt.current===t&&(k(Ot),k(Pt)),Wl.current===t&&(k(Wl),Hn._currentValue=tt)}var Rt,be;function Ce(t){if(Rt===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);Rt=e&&e[1]||"",be=-1<l.stack.indexOf(`
|
|
26
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
27
|
+
`+Rt+t+be}var ps=!1;function gs(t,e){if(!t||ps)return"";ps=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(e){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(T){var _=T}Reflect.construct(t,[],D)}else{try{D.call()}catch(T){_=T}t.call(D.prototype)}}else{try{throw Error()}catch(T){_=T}(D=t())&&typeof D.catch=="function"&&D.catch(function(){})}}catch(T){if(T&&_&&typeof T.stack=="string")return[T.stack,_.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),u=i[0],f=i[1];if(u&&f){var y=u.split(`
|
|
28
|
+
`),S=f.split(`
|
|
29
|
+
`);for(n=a=0;a<y.length&&!y[a].includes("DetermineComponentFrameRoot");)a++;for(;n<S.length&&!S[n].includes("DetermineComponentFrameRoot");)n++;if(a===y.length||n===S.length)for(a=y.length-1,n=S.length-1;1<=a&&0<=n&&y[a]!==S[n];)n--;for(;1<=a&&0<=n;a--,n--)if(y[a]!==S[n]){if(a!==1||n!==1)do if(a--,n--,0>n||y[a]!==S[n]){var j=`
|
|
30
|
+
`+y[a].replace(" at new "," at ");return t.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",t.displayName)),j}while(1<=a&&0<=n);break}}}finally{ps=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Ce(l):""}function Xh(t,e){switch(t.tag){case 26:case 27:case 5:return Ce(t.type);case 16:return Ce("Lazy");case 13:return t.child!==e&&e!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return gs(t.type,!1);case 11:return gs(t.type.render,!1);case 1:return gs(t.type,!0);case 31:return Ce("Activity");default:return""}}function Io(t){try{var e="",l=null;do e+=Xh(t,l),l=t,t=t.return;while(t);return e}catch(a){return`
|
|
31
|
+
Error generating stack: `+a.message+`
|
|
32
|
+
`+a.stack}}var vs=Object.prototype.hasOwnProperty,bs=c.unstable_scheduleCallback,Ss=c.unstable_cancelCallback,Zh=c.unstable_shouldYield,Qh=c.unstable_requestPaint,ce=c.unstable_now,Vh=c.unstable_getCurrentPriorityLevel,Po=c.unstable_ImmediatePriority,tc=c.unstable_UserBlockingPriority,Qn=c.unstable_NormalPriority,Kh=c.unstable_LowPriority,ec=c.unstable_IdlePriority,kh=c.log,Jh=c.unstable_setDisableYieldValue,ka=null,fe=null;function nl(t){if(typeof kh=="function"&&Jh(t),fe&&typeof fe.setStrictMode=="function")try{fe.setStrictMode(ka,t)}catch{}}var re=Math.clz32?Math.clz32:$h,Fh=Math.log,Wh=Math.LN2;function $h(t){return t>>>=0,t===0?32:31-(Fh(t)/Wh|0)|0}var Vn=256,Kn=262144,kn=4194304;function Dl(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Jn(t,e,l){var a=t.pendingLanes;if(a===0)return 0;var n=0,i=t.suspendedLanes,u=t.pingedLanes;t=t.warmLanes;var f=a&134217727;return f!==0?(a=f&~i,a!==0?n=Dl(a):(u&=f,u!==0?n=Dl(u):l||(l=f&~t,l!==0&&(n=Dl(l))))):(f=a&~i,f!==0?n=Dl(f):u!==0?n=Dl(u):l||(l=a&~t,l!==0&&(n=Dl(l)))),n===0?0:e!==0&&e!==n&&(e&i)===0&&(i=n&-n,l=e&-e,i>=l||i===32&&(l&4194048)!==0)?e:n}function Ja(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Ih(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 lc(){var t=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),t}function xs(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Fa(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ph(t,e,l,a,n,i){var u=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var f=t.entanglements,y=t.expirationTimes,S=t.hiddenUpdates;for(l=u&~l;0<l;){var j=31-re(l),D=1<<j;f[j]=0,y[j]=-1;var _=S[j];if(_!==null)for(S[j]=null,j=0;j<_.length;j++){var T=_[j];T!==null&&(T.lane&=-536870913)}l&=~D}a!==0&&ac(t,a,0),i!==0&&n===0&&t.tag!==0&&(t.suspendedLanes|=i&~(u&~e))}function ac(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var a=31-re(e);t.entangledLanes|=e,t.entanglements[a]=t.entanglements[a]|1073741824|l&261930}function nc(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var a=31-re(l),n=1<<a;n&e|t[a]&e&&(t[a]|=e),l&=~n}}function ic(t,e){var l=e&-e;return l=(l&42)!==0?1:_s(l),(l&(t.suspendedLanes|e))!==0?0:l}function _s(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function zs(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function sc(){var t=L.p;return t!==0?t:(t=window.event,t===void 0?32:Kd(t.type))}function uc(t,e){var l=L.p;try{return L.p=t,e()}finally{L.p=l}}var il=Math.random().toString(36).slice(2),Vt="__reactFiber$"+il,ee="__reactProps$"+il,Il="__reactContainer$"+il,Ts="__reactEvents$"+il,tm="__reactListeners$"+il,em="__reactHandles$"+il,oc="__reactResources$"+il,Wa="__reactMarker$"+il;function Es(t){delete t[Vt],delete t[ee],delete t[Ts],delete t[tm],delete t[em]}function Pl(t){var e=t[Vt];if(e)return e;for(var l=t.parentNode;l;){if(e=l[Il]||l[Vt]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=Cd(t);t!==null;){if(l=t[Vt])return l;t=Cd(t)}return e}t=l,l=t.parentNode}return null}function ta(t){if(t=t[Vt]||t[Il]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function $a(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(o(33))}function ea(t){var e=t[oc];return e||(e=t[oc]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Zt(t){t[Wa]=!0}var cc=new Set,fc={};function Cl(t,e){la(t,e),la(t+"Capture",e)}function la(t,e){for(fc[t]=e,t=0;t<e.length;t++)cc.add(e[t])}var lm=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]*$"),rc={},dc={};function am(t){return vs.call(dc,t)?!0:vs.call(rc,t)?!1:lm.test(t)?dc[t]=!0:(rc[t]=!0,!1)}function Fn(t,e,l){if(am(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var a=e.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function Wn(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function qe(t,e,l,a){if(a===null)t.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+a)}}function Se(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function hc(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function nm(t,e,l){var a=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(t,e,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ms(t){if(!t._valueTracker){var e=hc(t)?"checked":"value";t._valueTracker=nm(t,e,""+t[e])}}function mc(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),a="";return t&&(a=hc(t)?t.checked?"true":"false":t.value),t=a,t!==l?(e.setValue(t),!0):!1}function $n(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var im=/[\n"\\]/g;function xe(t){return t.replace(im,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function js(t,e,l,a,n,i,u,f){t.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?t.type=u:t.removeAttribute("type"),e!=null?u==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Se(e)):t.value!==""+Se(e)&&(t.value=""+Se(e)):u!=="submit"&&u!=="reset"||t.removeAttribute("value"),e!=null?As(t,u,Se(e)):l!=null?As(t,u,Se(l)):a!=null&&t.removeAttribute("value"),n==null&&i!=null&&(t.defaultChecked=!!i),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+Se(f):t.removeAttribute("name")}function yc(t,e,l,a,n,i,u,f){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){Ms(t);return}l=l!=null?""+Se(l):"",e=e!=null?""+Se(e):l,f||e===t.value||(t.value=e),t.defaultValue=e}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=f?t.checked:!!a,t.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.name=u),Ms(t)}function As(t,e,l){e==="number"&&$n(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function aa(t,e,l,a){if(t=t.options,e){e={};for(var n=0;n<l.length;n++)e["$"+l[n]]=!0;for(l=0;l<t.length;l++)n=e.hasOwnProperty("$"+t[l].value),t[l].selected!==n&&(t[l].selected=n),n&&a&&(t[l].defaultSelected=!0)}else{for(l=""+Se(l),e=null,n=0;n<t.length;n++){if(t[n].value===l){t[n].selected=!0,a&&(t[n].defaultSelected=!0);return}e!==null||t[n].disabled||(e=t[n])}e!==null&&(e.selected=!0)}}function pc(t,e,l){if(e!=null&&(e=""+Se(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+Se(l):""}function gc(t,e,l,a){if(e==null){if(a!=null){if(l!=null)throw Error(o(92));if(vt(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=""),e=l}l=Se(e),t.defaultValue=l,a=t.textContent,a===l&&a!==""&&a!==null&&(t.value=a),Ms(t)}function na(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var sm=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 vc(t,e,l){var a=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":a?t.setProperty(e,l):typeof l!="number"||l===0||sm.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function bc(t,e,l){if(e!=null&&typeof e!="object")throw Error(o(62));if(t=t.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||e!=null&&e.hasOwnProperty(a)||(a.indexOf("--")===0?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="");for(var n in e)a=e[n],e.hasOwnProperty(n)&&l[n]!==a&&vc(t,n,a)}else for(var i in e)e.hasOwnProperty(i)&&vc(t,i,e[i])}function Ds(t){if(t.indexOf("-")===-1)return!1;switch(t){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 um=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"]]),om=/^[\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 In(t){return om.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ge(){}var Cs=null;function Os(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ia=null,sa=null;function Sc(t){var e=ta(t);if(e&&(t=e.stateNode)){var l=t[ee]||null;t:switch(t=e.stateNode,e.type){case"input":if(js(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+xe(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var a=l[e];if(a!==t&&a.form===t.form){var n=a[ee]||null;if(!n)throw Error(o(90));js(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(e=0;e<l.length;e++)a=l[e],a.form===t.form&&mc(a)}break t;case"textarea":pc(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&aa(t,!!l.multiple,e,!1)}}}var Rs=!1;function xc(t,e,l){if(Rs)return t(e,l);Rs=!0;try{var a=t(e);return a}finally{if(Rs=!1,(ia!==null||sa!==null)&&(Yi(),ia&&(e=ia,t=sa,sa=ia=null,Sc(e),t)))for(e=0;e<t.length;e++)Sc(t[e])}}function Ia(t,e){var l=t.stateNode;if(l===null)return null;var a=l[ee]||null;if(a===null)return null;l=a[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(t=t.type,a=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!a;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(o(231,e,typeof l));return l}var Xe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Us=!1;if(Xe)try{var Pa={};Object.defineProperty(Pa,"passive",{get:function(){Us=!0}}),window.addEventListener("test",Pa,Pa),window.removeEventListener("test",Pa,Pa)}catch{Us=!1}var sl=null,Bs=null,Pn=null;function _c(){if(Pn)return Pn;var t,e=Bs,l=e.length,a,n="value"in sl?sl.value:sl.textContent,i=n.length;for(t=0;t<l&&e[t]===n[t];t++);var u=l-t;for(a=1;a<=u&&e[l-a]===n[i-a];a++);return Pn=n.slice(t,1<a?1-a:void 0)}function ti(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function ei(){return!0}function zc(){return!1}function le(t){function e(l,a,n,i,u){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var f in t)t.hasOwnProperty(f)&&(l=t[f],this[f]=l?l(i):i[f]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ei:zc,this.isPropagationStopped=zc,this}return E(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ei)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ei)},persist:function(){},isPersistent:ei}),e}var Ol={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},li=le(Ol),tn=E({},Ol,{view:0,detail:0}),cm=le(tn),Ns,Hs,en,ai=E({},tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ls,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==en&&(en&&t.type==="mousemove"?(Ns=t.screenX-en.screenX,Hs=t.screenY-en.screenY):Hs=Ns=0,en=t),Ns)},movementY:function(t){return"movementY"in t?t.movementY:Hs}}),Tc=le(ai),fm=E({},ai,{dataTransfer:0}),rm=le(fm),dm=E({},tn,{relatedTarget:0}),ws=le(dm),hm=E({},Ol,{animationName:0,elapsedTime:0,pseudoElement:0}),mm=le(hm),ym=E({},Ol,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),pm=le(ym),gm=E({},Ol,{data:0}),Ec=le(gm),vm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bm={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xm(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Sm[t])?!!e[t]:!1}function Ls(){return xm}var _m=E({},tn,{key:function(t){if(t.key){var e=vm[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ti(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?bm[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ls,charCode:function(t){return t.type==="keypress"?ti(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ti(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),zm=le(_m),Tm=E({},ai,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mc=le(Tm),Em=E({},tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ls}),Mm=le(Em),jm=E({},Ol,{propertyName:0,elapsedTime:0,pseudoElement:0}),Am=le(jm),Dm=E({},ai,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Cm=le(Dm),Om=E({},Ol,{newState:0,oldState:0}),Rm=le(Om),Um=[9,13,27,32],Ys=Xe&&"CompositionEvent"in window,ln=null;Xe&&"documentMode"in document&&(ln=document.documentMode);var Bm=Xe&&"TextEvent"in window&&!ln,jc=Xe&&(!Ys||ln&&8<ln&&11>=ln),Ac=" ",Dc=!1;function Cc(t,e){switch(t){case"keyup":return Um.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oc(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ua=!1;function Nm(t,e){switch(t){case"compositionend":return Oc(e);case"keypress":return e.which!==32?null:(Dc=!0,Ac);case"textInput":return t=e.data,t===Ac&&Dc?null:t;default:return null}}function Hm(t,e){if(ua)return t==="compositionend"||!Ys&&Cc(t,e)?(t=_c(),Pn=Bs=sl=null,ua=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return jc&&e.locale!=="ko"?null:e.data;default:return null}}var wm={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 Rc(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!wm[t.type]:e==="textarea"}function Uc(t,e,l,a){ia?sa?sa.push(a):sa=[a]:ia=a,e=Ki(e,"onChange"),0<e.length&&(l=new li("onChange","change",null,l,a),t.push({event:l,listeners:e}))}var an=null,nn=null;function Lm(t){pd(t,0)}function ni(t){var e=$a(t);if(mc(e))return t}function Bc(t,e){if(t==="change")return e}var Nc=!1;if(Xe){var qs;if(Xe){var Gs="oninput"in document;if(!Gs){var Hc=document.createElement("div");Hc.setAttribute("oninput","return;"),Gs=typeof Hc.oninput=="function"}qs=Gs}else qs=!1;Nc=qs&&(!document.documentMode||9<document.documentMode)}function wc(){an&&(an.detachEvent("onpropertychange",Lc),nn=an=null)}function Lc(t){if(t.propertyName==="value"&&ni(nn)){var e=[];Uc(e,nn,t,Os(t)),xc(Lm,e)}}function Ym(t,e,l){t==="focusin"?(wc(),an=e,nn=l,an.attachEvent("onpropertychange",Lc)):t==="focusout"&&wc()}function qm(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ni(nn)}function Gm(t,e){if(t==="click")return ni(e)}function Xm(t,e){if(t==="input"||t==="change")return ni(e)}function Zm(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var de=typeof Object.is=="function"?Object.is:Zm;function sn(t,e){if(de(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),a=Object.keys(e);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!vs.call(e,n)||!de(t[n],e[n]))return!1}return!0}function Yc(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function qc(t,e){var l=Yc(t);t=0;for(var a;l;){if(l.nodeType===3){if(a=t+l.textContent.length,t<=e&&a>=e)return{node:l,offset:e-t};t=a}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Yc(l)}}function Gc(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Gc(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Xc(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=$n(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=$n(t.document)}return e}function Xs(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Qm=Xe&&"documentMode"in document&&11>=document.documentMode,oa=null,Zs=null,un=null,Qs=!1;function Zc(t,e,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Qs||oa==null||oa!==$n(a)||(a=oa,"selectionStart"in a&&Xs(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),un&&sn(un,a)||(un=a,a=Ki(Zs,"onSelect"),0<a.length&&(e=new li("onSelect","select",null,e,l),t.push({event:e,listeners:a}),e.target=oa)))}function Rl(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var ca={animationend:Rl("Animation","AnimationEnd"),animationiteration:Rl("Animation","AnimationIteration"),animationstart:Rl("Animation","AnimationStart"),transitionrun:Rl("Transition","TransitionRun"),transitionstart:Rl("Transition","TransitionStart"),transitioncancel:Rl("Transition","TransitionCancel"),transitionend:Rl("Transition","TransitionEnd")},Vs={},Qc={};Xe&&(Qc=document.createElement("div").style,"AnimationEvent"in window||(delete ca.animationend.animation,delete ca.animationiteration.animation,delete ca.animationstart.animation),"TransitionEvent"in window||delete ca.transitionend.transition);function Ul(t){if(Vs[t])return Vs[t];if(!ca[t])return t;var e=ca[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in Qc)return Vs[t]=e[l];return t}var Vc=Ul("animationend"),Kc=Ul("animationiteration"),kc=Ul("animationstart"),Vm=Ul("transitionrun"),Km=Ul("transitionstart"),km=Ul("transitioncancel"),Jc=Ul("transitionend"),Fc=new Map,Ks="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(" ");Ks.push("scrollEnd");function Oe(t,e){Fc.set(t,e),Cl(e,[t])}var ii=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},_e=[],fa=0,ks=0;function si(){for(var t=fa,e=ks=fa=0;e<t;){var l=_e[e];_e[e++]=null;var a=_e[e];_e[e++]=null;var n=_e[e];_e[e++]=null;var i=_e[e];if(_e[e++]=null,a!==null&&n!==null){var u=a.pending;u===null?n.next=n:(n.next=u.next,u.next=n),a.pending=n}i!==0&&Wc(l,n,i)}}function ui(t,e,l,a){_e[fa++]=t,_e[fa++]=e,_e[fa++]=l,_e[fa++]=a,ks|=a,t.lanes|=a,t=t.alternate,t!==null&&(t.lanes|=a)}function Js(t,e,l,a){return ui(t,e,l,a),oi(t)}function Bl(t,e){return ui(t,null,null,e),oi(t)}function Wc(t,e,l){t.lanes|=l;var a=t.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=t.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(n=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,n&&e!==null&&(n=31-re(l),t=i.hiddenUpdates,a=t[n],a===null?t[n]=[e]:a.push(e),e.lane=l|536870912),i):null}function oi(t){if(50<Dn)throw Dn=0,ao=null,Error(o(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var ra={};function Jm(t,e,l,a){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function he(t,e,l,a){return new Jm(t,e,l,a)}function Fs(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ze(t,e){var l=t.alternate;return l===null?(l=he(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function $c(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function ci(t,e,l,a,n,i){var u=0;if(a=t,typeof t=="function")Fs(t)&&(u=1);else if(typeof t=="string")u=Py(t,l,Ot.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case G:return t=he(31,l,e,n),t.elementType=G,t.lanes=i,t;case H:return Nl(l.children,n,i,e);case w:u=8,n|=24;break;case F:return t=he(12,l,e,n|2),t.elementType=F,t.lanes=i,t;case I:return t=he(13,l,e,n),t.elementType=I,t.lanes=i,t;case Q:return t=he(19,l,e,n),t.elementType=Q,t.lanes=i,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case q:u=10;break t;case Y:u=9;break t;case K:u=11;break t;case Z:u=14;break t;case $:u=16,a=null;break t}u=29,l=Error(o(130,t===null?"null":typeof t,"")),a=null}return e=he(u,l,e,n),e.elementType=t,e.type=a,e.lanes=i,e}function Nl(t,e,l,a){return t=he(7,t,a,e),t.lanes=l,t}function Ws(t,e,l){return t=he(6,t,null,e),t.lanes=l,t}function Ic(t){var e=he(18,null,null,0);return e.stateNode=t,e}function $s(t,e,l){return e=he(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Pc=new WeakMap;function ze(t,e){if(typeof t=="object"&&t!==null){var l=Pc.get(t);return l!==void 0?l:(e={value:t,source:e,stack:Io(e)},Pc.set(t,e),e)}return{value:t,source:e,stack:Io(e)}}var da=[],ha=0,fi=null,on=0,Te=[],Ee=0,ul=null,Ne=1,He="";function Qe(t,e){da[ha++]=on,da[ha++]=fi,fi=t,on=e}function tf(t,e,l){Te[Ee++]=Ne,Te[Ee++]=He,Te[Ee++]=ul,ul=t;var a=Ne;t=He;var n=32-re(a)-1;a&=~(1<<n),l+=1;var i=32-re(e)+n;if(30<i){var u=n-n%5;i=(a&(1<<u)-1).toString(32),a>>=u,n-=u,Ne=1<<32-re(e)+n|l<<n|a,He=i+t}else Ne=1<<i|l<<n|a,He=t}function Is(t){t.return!==null&&(Qe(t,1),tf(t,1,0))}function Ps(t){for(;t===fi;)fi=da[--ha],da[ha]=null,on=da[--ha],da[ha]=null;for(;t===ul;)ul=Te[--Ee],Te[Ee]=null,He=Te[--Ee],Te[Ee]=null,Ne=Te[--Ee],Te[Ee]=null}function ef(t,e){Te[Ee++]=Ne,Te[Ee++]=He,Te[Ee++]=ul,Ne=e.id,He=e.overflow,ul=t}var Kt=null,At=null,ct=!1,ol=null,Me=!1,tu=Error(o(519));function cl(t){var e=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cn(ze(e,t)),tu}function lf(t){var e=t.stateNode,l=t.type,a=t.memoizedProps;switch(e[Vt]=t,e[ee]=a,l){case"dialog":st("cancel",e),st("close",e);break;case"iframe":case"object":case"embed":st("load",e);break;case"video":case"audio":for(l=0;l<On.length;l++)st(On[l],e);break;case"source":st("error",e);break;case"img":case"image":case"link":st("error",e),st("load",e);break;case"details":st("toggle",e);break;case"input":st("invalid",e),yc(e,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":st("invalid",e);break;case"textarea":st("invalid",e),gc(e,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||a.suppressHydrationWarning===!0||Sd(e.textContent,l)?(a.popover!=null&&(st("beforetoggle",e),st("toggle",e)),a.onScroll!=null&&st("scroll",e),a.onScrollEnd!=null&&st("scrollend",e),a.onClick!=null&&(e.onclick=Ge),e=!0):e=!1,e||cl(t,!0)}function af(t){for(Kt=t.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:Me=!1;return;case 27:case 3:Me=!0;return;default:Kt=Kt.return}}function ma(t){if(t!==Kt)return!1;if(!ct)return af(t),ct=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||bo(t.type,t.memoizedProps)),l=!l),l&&At&&cl(t),af(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));At=Dd(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));At=Dd(t)}else e===27?(e=At,zl(t.type)?(t=To,To=null,At=t):At=e):At=Kt?Ae(t.stateNode.nextSibling):null;return!0}function Hl(){At=Kt=null,ct=!1}function eu(){var t=ol;return t!==null&&(se===null?se=t:se.push.apply(se,t),ol=null),t}function cn(t){ol===null?ol=[t]:ol.push(t)}var lu=W(null),wl=null,Ve=null;function fl(t,e,l){dt(lu,e._currentValue),e._currentValue=l}function Ke(t){t._currentValue=lu.current,k(lu)}function au(t,e,l){for(;t!==null;){var a=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,a!==null&&(a.childLanes|=e)):a!==null&&(a.childLanes&e)!==e&&(a.childLanes|=e),t===l)break;t=t.return}}function nu(t,e,l,a){var n=t.child;for(n!==null&&(n.return=t);n!==null;){var i=n.dependencies;if(i!==null){var u=n.child;i=i.firstContext;t:for(;i!==null;){var f=i;i=n;for(var y=0;y<e.length;y++)if(f.context===e[y]){i.lanes|=l,f=i.alternate,f!==null&&(f.lanes|=l),au(i.return,l,t),a||(u=null);break t}i=f.next}}else if(n.tag===18){if(u=n.return,u===null)throw Error(o(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),au(u,l,t),u=null}else u=n.child;if(u!==null)u.return=n;else for(u=n;u!==null;){if(u===t){u=null;break}if(n=u.sibling,n!==null){n.return=u.return,u=n;break}u=u.return}n=u}}function ya(t,e,l,a){t=null;for(var n=e,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var u=n.alternate;if(u===null)throw Error(o(387));if(u=u.memoizedProps,u!==null){var f=n.type;de(n.pendingProps.value,u.value)||(t!==null?t.push(f):t=[f])}}else if(n===Wl.current){if(u=n.alternate,u===null)throw Error(o(387));u.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(t!==null?t.push(Hn):t=[Hn])}n=n.return}t!==null&&nu(e,t,l,a),e.flags|=262144}function ri(t){for(t=t.firstContext;t!==null;){if(!de(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ll(t){wl=t,Ve=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function kt(t){return nf(wl,t)}function di(t,e){return wl===null&&Ll(t),nf(t,e)}function nf(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},Ve===null){if(t===null)throw Error(o(308));Ve=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Ve=Ve.next=e;return l}var Fm=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,a){t.push(a)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},Wm=c.unstable_scheduleCallback,$m=c.unstable_NormalPriority,wt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function iu(){return{controller:new Fm,data:new Map,refCount:0}}function fn(t){t.refCount--,t.refCount===0&&Wm($m,function(){t.controller.abort()})}var rn=null,su=0,pa=0,ga=null;function Im(t,e){if(rn===null){var l=rn=[];su=0,pa=co(),ga={status:"pending",value:void 0,then:function(a){l.push(a)}}}return su++,e.then(sf,sf),e}function sf(){if(--su===0&&rn!==null){ga!==null&&(ga.status="fulfilled");var t=rn;rn=null,pa=0,ga=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Pm(t,e){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return t.then(function(){a.status="fulfilled",a.value=e;for(var n=0;n<l.length;n++)(0,l[n])(e)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var uf=M.S;M.S=function(t,e){Qr=ce(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Im(t,e),uf!==null&&uf(t,e)};var Yl=W(null);function uu(){var t=Yl.current;return t!==null?t:jt.pooledCache}function hi(t,e){e===null?dt(Yl,Yl.current):dt(Yl,e.pool)}function of(){var t=uu();return t===null?null:{parent:wt._currentValue,pool:t}}var va=Error(o(460)),ou=Error(o(474)),mi=Error(o(542)),yi={then:function(){}};function cf(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ff(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(Ge,Ge),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,df(t),t;default:if(typeof e.status=="string")e.then(Ge,Ge);else{if(t=jt,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=e,t.status="pending",t.then(function(a){if(e.status==="pending"){var n=e;n.status="fulfilled",n.value=a}},function(a){if(e.status==="pending"){var n=e;n.status="rejected",n.reason=a}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,df(t),t}throw Gl=e,va}}function ql(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Gl=l,va):l}}var Gl=null;function rf(){if(Gl===null)throw Error(o(459));var t=Gl;return Gl=null,t}function df(t){if(t===va||t===mi)throw Error(o(483))}var ba=null,dn=0;function pi(t){var e=dn;return dn+=1,ba===null&&(ba=[]),ff(ba,t,e)}function hn(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function gi(t,e){throw e.$$typeof===O?Error(o(525)):(t=Object.prototype.toString.call(e),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function hf(t){function e(g,p){if(t){var v=g.deletions;v===null?(g.deletions=[p],g.flags|=16):v.push(p)}}function l(g,p){if(!t)return null;for(;p!==null;)e(g,p),p=p.sibling;return null}function a(g){for(var p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function n(g,p){return g=Ze(g,p),g.index=0,g.sibling=null,g}function i(g,p,v){return g.index=v,t?(v=g.alternate,v!==null?(v=v.index,v<p?(g.flags|=67108866,p):v):(g.flags|=67108866,p)):(g.flags|=1048576,p)}function u(g){return t&&g.alternate===null&&(g.flags|=67108866),g}function f(g,p,v,A){return p===null||p.tag!==6?(p=Ws(v,g.mode,A),p.return=g,p):(p=n(p,v),p.return=g,p)}function y(g,p,v,A){var J=v.type;return J===H?j(g,p,v.props.children,A,v.key):p!==null&&(p.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===$&&ql(J)===p.type)?(p=n(p,v.props),hn(p,v),p.return=g,p):(p=ci(v.type,v.key,v.props,null,g.mode,A),hn(p,v),p.return=g,p)}function S(g,p,v,A){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=$s(v,g.mode,A),p.return=g,p):(p=n(p,v.children||[]),p.return=g,p)}function j(g,p,v,A,J){return p===null||p.tag!==7?(p=Nl(v,g.mode,A,J),p.return=g,p):(p=n(p,v),p.return=g,p)}function D(g,p,v){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=Ws(""+p,g.mode,v),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case b:return v=ci(p.type,p.key,p.props,null,g.mode,v),hn(v,p),v.return=g,v;case U:return p=$s(p,g.mode,v),p.return=g,p;case $:return p=ql(p),D(g,p,v)}if(vt(p)||rt(p))return p=Nl(p,g.mode,v,null),p.return=g,p;if(typeof p.then=="function")return D(g,pi(p),v);if(p.$$typeof===q)return D(g,di(g,p),v);gi(g,p)}return null}function _(g,p,v,A){var J=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return J!==null?null:f(g,p,""+v,A);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case b:return v.key===J?y(g,p,v,A):null;case U:return v.key===J?S(g,p,v,A):null;case $:return v=ql(v),_(g,p,v,A)}if(vt(v)||rt(v))return J!==null?null:j(g,p,v,A,null);if(typeof v.then=="function")return _(g,p,pi(v),A);if(v.$$typeof===q)return _(g,p,di(g,v),A);gi(g,v)}return null}function T(g,p,v,A,J){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return g=g.get(v)||null,f(p,g,""+A,J);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case b:return g=g.get(A.key===null?v:A.key)||null,y(p,g,A,J);case U:return g=g.get(A.key===null?v:A.key)||null,S(p,g,A,J);case $:return A=ql(A),T(g,p,v,A,J)}if(vt(A)||rt(A))return g=g.get(v)||null,j(p,g,A,J,null);if(typeof A.then=="function")return T(g,p,v,pi(A),J);if(A.$$typeof===q)return T(g,p,v,di(p,A),J);gi(p,A)}return null}function X(g,p,v,A){for(var J=null,yt=null,V=p,lt=p=0,ot=null;V!==null&<<v.length;lt++){V.index>lt?(ot=V,V=null):ot=V.sibling;var pt=_(g,V,v[lt],A);if(pt===null){V===null&&(V=ot);break}t&&V&&pt.alternate===null&&e(g,V),p=i(pt,p,lt),yt===null?J=pt:yt.sibling=pt,yt=pt,V=ot}if(lt===v.length)return l(g,V),ct&&Qe(g,lt),J;if(V===null){for(;lt<v.length;lt++)V=D(g,v[lt],A),V!==null&&(p=i(V,p,lt),yt===null?J=V:yt.sibling=V,yt=V);return ct&&Qe(g,lt),J}for(V=a(V);lt<v.length;lt++)ot=T(V,g,lt,v[lt],A),ot!==null&&(t&&ot.alternate!==null&&V.delete(ot.key===null?lt:ot.key),p=i(ot,p,lt),yt===null?J=ot:yt.sibling=ot,yt=ot);return t&&V.forEach(function(Al){return e(g,Al)}),ct&&Qe(g,lt),J}function P(g,p,v,A){if(v==null)throw Error(o(151));for(var J=null,yt=null,V=p,lt=p=0,ot=null,pt=v.next();V!==null&&!pt.done;lt++,pt=v.next()){V.index>lt?(ot=V,V=null):ot=V.sibling;var Al=_(g,V,pt.value,A);if(Al===null){V===null&&(V=ot);break}t&&V&&Al.alternate===null&&e(g,V),p=i(Al,p,lt),yt===null?J=Al:yt.sibling=Al,yt=Al,V=ot}if(pt.done)return l(g,V),ct&&Qe(g,lt),J;if(V===null){for(;!pt.done;lt++,pt=v.next())pt=D(g,pt.value,A),pt!==null&&(p=i(pt,p,lt),yt===null?J=pt:yt.sibling=pt,yt=pt);return ct&&Qe(g,lt),J}for(V=a(V);!pt.done;lt++,pt=v.next())pt=T(V,g,lt,pt.value,A),pt!==null&&(t&&pt.alternate!==null&&V.delete(pt.key===null?lt:pt.key),p=i(pt,p,lt),yt===null?J=pt:yt.sibling=pt,yt=pt);return t&&V.forEach(function(f0){return e(g,f0)}),ct&&Qe(g,lt),J}function Et(g,p,v,A){if(typeof v=="object"&&v!==null&&v.type===H&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case b:t:{for(var J=v.key;p!==null;){if(p.key===J){if(J=v.type,J===H){if(p.tag===7){l(g,p.sibling),A=n(p,v.props.children),A.return=g,g=A;break t}}else if(p.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===$&&ql(J)===p.type){l(g,p.sibling),A=n(p,v.props),hn(A,v),A.return=g,g=A;break t}l(g,p);break}else e(g,p);p=p.sibling}v.type===H?(A=Nl(v.props.children,g.mode,A,v.key),A.return=g,g=A):(A=ci(v.type,v.key,v.props,null,g.mode,A),hn(A,v),A.return=g,g=A)}return u(g);case U:t:{for(J=v.key;p!==null;){if(p.key===J)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){l(g,p.sibling),A=n(p,v.children||[]),A.return=g,g=A;break t}else{l(g,p);break}else e(g,p);p=p.sibling}A=$s(v,g.mode,A),A.return=g,g=A}return u(g);case $:return v=ql(v),Et(g,p,v,A)}if(vt(v))return X(g,p,v,A);if(rt(v)){if(J=rt(v),typeof J!="function")throw Error(o(150));return v=J.call(v),P(g,p,v,A)}if(typeof v.then=="function")return Et(g,p,pi(v),A);if(v.$$typeof===q)return Et(g,p,di(g,v),A);gi(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,p!==null&&p.tag===6?(l(g,p.sibling),A=n(p,v),A.return=g,g=A):(l(g,p),A=Ws(v,g.mode,A),A.return=g,g=A),u(g)):l(g,p)}return function(g,p,v,A){try{dn=0;var J=Et(g,p,v,A);return ba=null,J}catch(V){if(V===va||V===mi)throw V;var yt=he(29,V,null,g.mode);return yt.lanes=A,yt.return=g,yt}finally{}}}var Xl=hf(!0),mf=hf(!1),rl=!1;function cu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fu(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function dl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function hl(t,e,l){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(gt&2)!==0){var n=a.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),a.pending=e,e=oi(t),Wc(t,null,l),e}return ui(t,a,e,l),oi(t)}function mn(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,nc(t,l)}}function ru(t,e){var l=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?n=i=e:i=i.next=e}else n=i=e;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var du=!1;function yn(){if(du){var t=ga;if(t!==null)throw t}}function pn(t,e,l,a){du=!1;var n=t.updateQueue;rl=!1;var i=n.firstBaseUpdate,u=n.lastBaseUpdate,f=n.shared.pending;if(f!==null){n.shared.pending=null;var y=f,S=y.next;y.next=null,u===null?i=S:u.next=S,u=y;var j=t.alternate;j!==null&&(j=j.updateQueue,f=j.lastBaseUpdate,f!==u&&(f===null?j.firstBaseUpdate=S:f.next=S,j.lastBaseUpdate=y))}if(i!==null){var D=n.baseState;u=0,j=S=y=null,f=i;do{var _=f.lane&-536870913,T=_!==f.lane;if(T?(ut&_)===_:(a&_)===_){_!==0&&_===pa&&(du=!0),j!==null&&(j=j.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var X=t,P=f;_=e;var Et=l;switch(P.tag){case 1:if(X=P.payload,typeof X=="function"){D=X.call(Et,D,_);break t}D=X;break t;case 3:X.flags=X.flags&-65537|128;case 0:if(X=P.payload,_=typeof X=="function"?X.call(Et,D,_):X,_==null)break t;D=E({},D,_);break t;case 2:rl=!0}}_=f.callback,_!==null&&(t.flags|=64,T&&(t.flags|=8192),T=n.callbacks,T===null?n.callbacks=[_]:T.push(_))}else T={lane:_,tag:f.tag,payload:f.payload,callback:f.callback,next:null},j===null?(S=j=T,y=D):j=j.next=T,u|=_;if(f=f.next,f===null){if(f=n.shared.pending,f===null)break;T=f,f=T.next,T.next=null,n.lastBaseUpdate=T,n.shared.pending=null}}while(!0);j===null&&(y=D),n.baseState=y,n.firstBaseUpdate=S,n.lastBaseUpdate=j,i===null&&(n.shared.lanes=0),vl|=u,t.lanes=u,t.memoizedState=D}}function yf(t,e){if(typeof t!="function")throw Error(o(191,t));t.call(e)}function pf(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)yf(l[t],e)}var Sa=W(null),vi=W(0);function gf(t,e){t=el,dt(vi,t),dt(Sa,e),el=t|e.baseLanes}function hu(){dt(vi,el),dt(Sa,Sa.current)}function mu(){el=vi.current,k(Sa),k(vi)}var me=W(null),je=null;function ml(t){var e=t.alternate;dt(Nt,Nt.current&1),dt(me,t),je===null&&(e===null||Sa.current!==null||e.memoizedState!==null)&&(je=t)}function yu(t){dt(Nt,Nt.current),dt(me,t),je===null&&(je=t)}function vf(t){t.tag===22?(dt(Nt,Nt.current),dt(me,t),je===null&&(je=t)):yl()}function yl(){dt(Nt,Nt.current),dt(me,me.current)}function ye(t){k(me),je===t&&(je=null),k(Nt)}var Nt=W(0);function bi(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||_o(l)||zo(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ke=0,et=null,zt=null,Lt=null,Si=!1,xa=!1,Zl=!1,xi=0,gn=0,_a=null,ty=0;function Ut(){throw Error(o(321))}function pu(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!de(t[l],e[l]))return!1;return!0}function gu(t,e,l,a,n,i){return ke=i,et=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,M.H=t===null||t.memoizedState===null?er:Ru,Zl=!1,i=l(a,n),Zl=!1,xa&&(i=Sf(e,l,a,n)),bf(t),i}function bf(t){M.H=Sn;var e=zt!==null&&zt.next!==null;if(ke=0,Lt=zt=et=null,Si=!1,gn=0,_a=null,e)throw Error(o(300));t===null||Yt||(t=t.dependencies,t!==null&&ri(t)&&(Yt=!0))}function Sf(t,e,l,a){et=t;var n=0;do{if(xa&&(_a=null),gn=0,xa=!1,25<=n)throw Error(o(301));if(n+=1,Lt=zt=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}M.H=lr,i=e(l,a)}while(xa);return i}function ey(){var t=M.H,e=t.useState()[0];return e=typeof e.then=="function"?vn(e):e,t=t.useState()[0],(zt!==null?zt.memoizedState:null)!==t&&(et.flags|=1024),e}function vu(){var t=xi!==0;return xi=0,t}function bu(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function Su(t){if(Si){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Si=!1}ke=0,Lt=zt=et=null,xa=!1,gn=xi=0,_a=null}function $t(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?et.memoizedState=Lt=t:Lt=Lt.next=t,Lt}function Ht(){if(zt===null){var t=et.alternate;t=t!==null?t.memoizedState:null}else t=zt.next;var e=Lt===null?et.memoizedState:Lt.next;if(e!==null)Lt=e,zt=t;else{if(t===null)throw et.alternate===null?Error(o(467)):Error(o(310));zt=t,t={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Lt===null?et.memoizedState=Lt=t:Lt=Lt.next=t}return Lt}function _i(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vn(t){var e=gn;return gn+=1,_a===null&&(_a=[]),t=ff(_a,t,e),e=et,(Lt===null?e.memoizedState:Lt.next)===null&&(e=e.alternate,M.H=e===null||e.memoizedState===null?er:Ru),t}function zi(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return vn(t);if(t.$$typeof===q)return kt(t)}throw Error(o(438,String(t)))}function xu(t){var e=null,l=et.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var a=et.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(e={data:a.data.map(function(n){return n.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=_i(),et.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),a=0;a<t;a++)l[a]=ft;return e.index++,l}function Je(t,e){return typeof e=="function"?e(t):e}function Ti(t){var e=Ht();return _u(e,zt,t)}function _u(t,e,l){var a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var n=t.baseQueue,i=a.pending;if(i!==null){if(n!==null){var u=n.next;n.next=i.next,i.next=u}e.baseQueue=n=i,a.pending=null}if(i=t.baseState,n===null)t.memoizedState=i;else{e=n.next;var f=u=null,y=null,S=e,j=!1;do{var D=S.lane&-536870913;if(D!==S.lane?(ut&D)===D:(ke&D)===D){var _=S.revertLane;if(_===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null}),D===pa&&(j=!0);else if((ke&_)===_){S=S.next,_===pa&&(j=!0);continue}else D={lane:0,revertLane:S.revertLane,gesture:null,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null},y===null?(f=y=D,u=i):y=y.next=D,et.lanes|=_,vl|=_;D=S.action,Zl&&l(i,D),i=S.hasEagerState?S.eagerState:l(i,D)}else _={lane:D,revertLane:S.revertLane,gesture:S.gesture,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null},y===null?(f=y=_,u=i):y=y.next=_,et.lanes|=D,vl|=D;S=S.next}while(S!==null&&S!==e);if(y===null?u=i:y.next=f,!de(i,t.memoizedState)&&(Yt=!0,j&&(l=ga,l!==null)))throw l;t.memoizedState=i,t.baseState=u,t.baseQueue=y,a.lastRenderedState=i}return n===null&&(a.lanes=0),[t.memoizedState,a.dispatch]}function zu(t){var e=Ht(),l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=t;var a=l.dispatch,n=l.pending,i=e.memoizedState;if(n!==null){l.pending=null;var u=n=n.next;do i=t(i,u.action),u=u.next;while(u!==n);de(i,e.memoizedState)||(Yt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),l.lastRenderedState=i}return[i,a]}function xf(t,e,l){var a=et,n=Ht(),i=ct;if(i){if(l===void 0)throw Error(o(407));l=l()}else l=e();var u=!de((zt||n).memoizedState,l);if(u&&(n.memoizedState=l,Yt=!0),n=n.queue,Mu(Tf.bind(null,a,n,t),[t]),n.getSnapshot!==e||u||Lt!==null&&Lt.memoizedState.tag&1){if(a.flags|=2048,za(9,{destroy:void 0},zf.bind(null,a,n,l,e),null),jt===null)throw Error(o(349));i||(ke&127)!==0||_f(a,e,l)}return l}function _f(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=et.updateQueue,e===null?(e=_i(),et.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function zf(t,e,l,a){e.value=l,e.getSnapshot=a,Ef(e)&&Mf(t)}function Tf(t,e,l){return l(function(){Ef(e)&&Mf(t)})}function Ef(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!de(t,l)}catch{return!0}}function Mf(t){var e=Bl(t,2);e!==null&&ue(e,t,2)}function Tu(t){var e=$t();if(typeof t=="function"){var l=t;if(t=l(),Zl){nl(!0);try{l()}finally{nl(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Je,lastRenderedState:t},e}function jf(t,e,l,a){return t.baseState=l,_u(t,zt,typeof a=="function"?a:Je)}function ly(t,e,l,a,n){if(ji(t))throw Error(o(485));if(t=e.action,t!==null){var i={payload:n,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};M.T!==null?l(!0):i.isTransition=!1,a(i),l=e.pending,l===null?(i.next=e.pending=i,Af(e,i)):(i.next=l.next,e.pending=l.next=i)}}function Af(t,e){var l=e.action,a=e.payload,n=t.state;if(e.isTransition){var i=M.T,u={};M.T=u;try{var f=l(n,a),y=M.S;y!==null&&y(u,f),Df(t,e,f)}catch(S){Eu(t,e,S)}finally{i!==null&&u.types!==null&&(i.types=u.types),M.T=i}}else try{i=l(n,a),Df(t,e,i)}catch(S){Eu(t,e,S)}}function Df(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Cf(t,e,a)},function(a){return Eu(t,e,a)}):Cf(t,e,l)}function Cf(t,e,l){e.status="fulfilled",e.value=l,Of(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,Af(t,l)))}function Eu(t,e,l){var a=t.pending;if(t.pending=null,a!==null){a=a.next;do e.status="rejected",e.reason=l,Of(e),e=e.next;while(e!==a)}t.action=null}function Of(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Rf(t,e){return e}function Uf(t,e){if(ct){var l=jt.formState;if(l!==null){t:{var a=et;if(ct){if(At){e:{for(var n=At,i=Me;n.nodeType!==8;){if(!i){n=null;break e}if(n=Ae(n.nextSibling),n===null){n=null;break e}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){At=Ae(n.nextSibling),a=n.data==="F!";break t}}cl(a)}a=!1}a&&(e=l[0])}}return l=$t(),l.memoizedState=l.baseState=e,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rf,lastRenderedState:e},l.queue=a,l=If.bind(null,et,a),a.dispatch=l,a=Tu(!1),i=Ou.bind(null,et,!1,a.queue),a=$t(),n={state:e,dispatch:null,action:t,pending:null},a.queue=n,l=ly.bind(null,et,n,i,l),n.dispatch=l,a.memoizedState=t,[e,l,!1]}function Bf(t){var e=Ht();return Nf(e,zt,t)}function Nf(t,e,l){if(e=_u(t,e,Rf)[0],t=Ti(Je)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var a=vn(e)}catch(u){throw u===va?mi:u}else a=e;e=Ht();var n=e.queue,i=n.dispatch;return l!==e.memoizedState&&(et.flags|=2048,za(9,{destroy:void 0},ay.bind(null,n,l),null)),[a,i,t]}function ay(t,e){t.action=e}function Hf(t){var e=Ht(),l=zt;if(l!==null)return Nf(e,l,t);Ht(),e=e.memoizedState,l=Ht();var a=l.queue.dispatch;return l.memoizedState=t,[e,a,!1]}function za(t,e,l,a){return t={tag:t,create:l,deps:a,inst:e,next:null},e=et.updateQueue,e===null&&(e=_i(),et.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(a=l.next,l.next=t,t.next=a,e.lastEffect=t),t}function wf(){return Ht().memoizedState}function Ei(t,e,l,a){var n=$t();et.flags|=t,n.memoizedState=za(1|e,{destroy:void 0},l,a===void 0?null:a)}function Mi(t,e,l,a){var n=Ht();a=a===void 0?null:a;var i=n.memoizedState.inst;zt!==null&&a!==null&&pu(a,zt.memoizedState.deps)?n.memoizedState=za(e,i,l,a):(et.flags|=t,n.memoizedState=za(1|e,i,l,a))}function Lf(t,e){Ei(8390656,8,t,e)}function Mu(t,e){Mi(2048,8,t,e)}function ny(t){et.flags|=4;var e=et.updateQueue;if(e===null)e=_i(),et.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Yf(t){var e=Ht().memoizedState;return ny({ref:e,nextImpl:t}),function(){if((gt&2)!==0)throw Error(o(440));return e.impl.apply(void 0,arguments)}}function qf(t,e){return Mi(4,2,t,e)}function Gf(t,e){return Mi(4,4,t,e)}function Xf(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Zf(t,e,l){l=l!=null?l.concat([t]):null,Mi(4,4,Xf.bind(null,e,t),l)}function ju(){}function Qf(t,e){var l=Ht();e=e===void 0?null:e;var a=l.memoizedState;return e!==null&&pu(e,a[1])?a[0]:(l.memoizedState=[t,e],t)}function Vf(t,e){var l=Ht();e=e===void 0?null:e;var a=l.memoizedState;if(e!==null&&pu(e,a[1]))return a[0];if(a=t(),Zl){nl(!0);try{t()}finally{nl(!1)}}return l.memoizedState=[a,e],a}function Au(t,e,l){return l===void 0||(ke&1073741824)!==0&&(ut&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=Kr(),et.lanes|=t,vl|=t,l)}function Kf(t,e,l,a){return de(l,e)?l:Sa.current!==null?(t=Au(t,l,a),de(t,e)||(Yt=!0),t):(ke&42)===0||(ke&1073741824)!==0&&(ut&261930)===0?(Yt=!0,t.memoizedState=l):(t=Kr(),et.lanes|=t,vl|=t,e)}function kf(t,e,l,a,n){var i=L.p;L.p=i!==0&&8>i?i:8;var u=M.T,f={};M.T=f,Ou(t,!1,e,l);try{var y=n(),S=M.S;if(S!==null&&S(f,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var j=Pm(y,a);bn(t,e,j,ve(t))}else bn(t,e,a,ve(t))}catch(D){bn(t,e,{then:function(){},status:"rejected",reason:D},ve())}finally{L.p=i,u!==null&&f.types!==null&&(u.types=f.types),M.T=u}}function iy(){}function Du(t,e,l,a){if(t.tag!==5)throw Error(o(476));var n=Jf(t).queue;kf(t,n,e,tt,l===null?iy:function(){return Ff(t),l(a)})}function Jf(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:tt,baseState:tt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Je,lastRenderedState:tt},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Je,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Ff(t){var e=Jf(t);e.next===null&&(e=t.alternate.memoizedState),bn(t,e.next.queue,{},ve())}function Cu(){return kt(Hn)}function Wf(){return Ht().memoizedState}function $f(){return Ht().memoizedState}function sy(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=ve();t=dl(l);var a=hl(e,t,l);a!==null&&(ue(a,e,l),mn(a,e,l)),e={cache:iu()},t.payload=e;return}e=e.return}}function uy(t,e,l){var a=ve();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ji(t)?Pf(e,l):(l=Js(t,e,l,a),l!==null&&(ue(l,t,a),tr(l,e,a)))}function If(t,e,l){var a=ve();bn(t,e,l,a)}function bn(t,e,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ji(t))Pf(e,n);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var u=e.lastRenderedState,f=i(u,l);if(n.hasEagerState=!0,n.eagerState=f,de(f,u))return ui(t,e,n,0),jt===null&&si(),!1}catch{}finally{}if(l=Js(t,e,n,a),l!==null)return ue(l,t,a),tr(l,e,a),!0}return!1}function Ou(t,e,l,a){if(a={lane:2,revertLane:co(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ji(t)){if(e)throw Error(o(479))}else e=Js(t,l,a,2),e!==null&&ue(e,t,2)}function ji(t){var e=t.alternate;return t===et||e!==null&&e===et}function Pf(t,e){xa=Si=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function tr(t,e,l){if((l&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,nc(t,l)}}var Sn={readContext:kt,use:zi,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useLayoutEffect:Ut,useInsertionEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useSyncExternalStore:Ut,useId:Ut,useHostTransitionStatus:Ut,useFormState:Ut,useActionState:Ut,useOptimistic:Ut,useMemoCache:Ut,useCacheRefresh:Ut};Sn.useEffectEvent=Ut;var er={readContext:kt,use:zi,useCallback:function(t,e){return $t().memoizedState=[t,e===void 0?null:e],t},useContext:kt,useEffect:Lf,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,Ei(4194308,4,Xf.bind(null,e,t),l)},useLayoutEffect:function(t,e){return Ei(4194308,4,t,e)},useInsertionEffect:function(t,e){Ei(4,2,t,e)},useMemo:function(t,e){var l=$t();e=e===void 0?null:e;var a=t();if(Zl){nl(!0);try{t()}finally{nl(!1)}}return l.memoizedState=[a,e],a},useReducer:function(t,e,l){var a=$t();if(l!==void 0){var n=l(e);if(Zl){nl(!0);try{l(e)}finally{nl(!1)}}}else n=e;return a.memoizedState=a.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=uy.bind(null,et,t),[a.memoizedState,t]},useRef:function(t){var e=$t();return t={current:t},e.memoizedState=t},useState:function(t){t=Tu(t);var e=t.queue,l=If.bind(null,et,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:ju,useDeferredValue:function(t,e){var l=$t();return Au(l,t,e)},useTransition:function(){var t=Tu(!1);return t=kf.bind(null,et,t.queue,!0,!1),$t().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var a=et,n=$t();if(ct){if(l===void 0)throw Error(o(407));l=l()}else{if(l=e(),jt===null)throw Error(o(349));(ut&127)!==0||_f(a,e,l)}n.memoizedState=l;var i={value:l,getSnapshot:e};return n.queue=i,Lf(Tf.bind(null,a,i,t),[t]),a.flags|=2048,za(9,{destroy:void 0},zf.bind(null,a,i,l,e),null),l},useId:function(){var t=$t(),e=jt.identifierPrefix;if(ct){var l=He,a=Ne;l=(a&~(1<<32-re(a)-1)).toString(32)+l,e="_"+e+"R_"+l,l=xi++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=ty++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Cu,useFormState:Uf,useActionState:Uf,useOptimistic:function(t){var e=$t();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=Ou.bind(null,et,!0,l),l.dispatch=e,[t,e]},useMemoCache:xu,useCacheRefresh:function(){return $t().memoizedState=sy.bind(null,et)},useEffectEvent:function(t){var e=$t(),l={impl:t};return e.memoizedState=l,function(){if((gt&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},Ru={readContext:kt,use:zi,useCallback:Qf,useContext:kt,useEffect:Mu,useImperativeHandle:Zf,useInsertionEffect:qf,useLayoutEffect:Gf,useMemo:Vf,useReducer:Ti,useRef:wf,useState:function(){return Ti(Je)},useDebugValue:ju,useDeferredValue:function(t,e){var l=Ht();return Kf(l,zt.memoizedState,t,e)},useTransition:function(){var t=Ti(Je)[0],e=Ht().memoizedState;return[typeof t=="boolean"?t:vn(t),e]},useSyncExternalStore:xf,useId:Wf,useHostTransitionStatus:Cu,useFormState:Bf,useActionState:Bf,useOptimistic:function(t,e){var l=Ht();return jf(l,zt,t,e)},useMemoCache:xu,useCacheRefresh:$f};Ru.useEffectEvent=Yf;var lr={readContext:kt,use:zi,useCallback:Qf,useContext:kt,useEffect:Mu,useImperativeHandle:Zf,useInsertionEffect:qf,useLayoutEffect:Gf,useMemo:Vf,useReducer:zu,useRef:wf,useState:function(){return zu(Je)},useDebugValue:ju,useDeferredValue:function(t,e){var l=Ht();return zt===null?Au(l,t,e):Kf(l,zt.memoizedState,t,e)},useTransition:function(){var t=zu(Je)[0],e=Ht().memoizedState;return[typeof t=="boolean"?t:vn(t),e]},useSyncExternalStore:xf,useId:Wf,useHostTransitionStatus:Cu,useFormState:Hf,useActionState:Hf,useOptimistic:function(t,e){var l=Ht();return zt!==null?jf(l,zt,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:xu,useCacheRefresh:$f};lr.useEffectEvent=Yf;function Uu(t,e,l,a){e=t.memoizedState,l=l(a,e),l=l==null?e:E({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Bu={enqueueSetState:function(t,e,l){t=t._reactInternals;var a=ve(),n=dl(a);n.payload=e,l!=null&&(n.callback=l),e=hl(t,n,a),e!==null&&(ue(e,t,a),mn(e,t,a))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var a=ve(),n=dl(a);n.tag=1,n.payload=e,l!=null&&(n.callback=l),e=hl(t,n,a),e!==null&&(ue(e,t,a),mn(e,t,a))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=ve(),a=dl(l);a.tag=2,e!=null&&(a.callback=e),e=hl(t,a,l),e!==null&&(ue(e,t,l),mn(e,t,l))}};function ar(t,e,l,a,n,i,u){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(a,i,u):e.prototype&&e.prototype.isPureReactComponent?!sn(l,a)||!sn(n,i):!0}function nr(t,e,l,a){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,a),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,a),e.state!==t&&Bu.enqueueReplaceState(e,e.state,null)}function Ql(t,e){var l=e;if("ref"in e){l={};for(var a in e)a!=="ref"&&(l[a]=e[a])}if(t=t.defaultProps){l===e&&(l=E({},l));for(var n in t)l[n]===void 0&&(l[n]=t[n])}return l}function ir(t){ii(t)}function sr(t){console.error(t)}function ur(t){ii(t)}function Ai(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(a){setTimeout(function(){throw a})}}function or(t,e,l){try{var a=t.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Nu(t,e,l){return l=dl(l),l.tag=3,l.payload={element:null},l.callback=function(){Ai(t,e)},l}function cr(t){return t=dl(t),t.tag=3,t}function fr(t,e,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;t.payload=function(){return n(i)},t.callback=function(){or(e,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(t.callback=function(){or(e,l,a),typeof n!="function"&&(bl===null?bl=new Set([this]):bl.add(this));var f=a.stack;this.componentDidCatch(a.value,{componentStack:f!==null?f:""})})}function oy(t,e,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(e=l.alternate,e!==null&&ya(e,l,n,!0),l=me.current,l!==null){switch(l.tag){case 31:case 13:return je===null?qi():l.alternate===null&&Bt===0&&(Bt=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===yi?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([a]):e.add(a),so(t,a,n)),!1;case 22:return l.flags|=65536,a===yi?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([a]):l.add(a)),so(t,a,n)),!1}throw Error(o(435,l.tag))}return so(t,a,n),qi(),!1}if(ct)return e=me.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=n,a!==tu&&(t=Error(o(422),{cause:a}),cn(ze(t,l)))):(a!==tu&&(e=Error(o(423),{cause:a}),cn(ze(e,l))),t=t.current.alternate,t.flags|=65536,n&=-n,t.lanes|=n,a=ze(a,l),n=Nu(t.stateNode,a,n),ru(t,n),Bt!==4&&(Bt=2)),!1;var i=Error(o(520),{cause:a});if(i=ze(i,l),An===null?An=[i]:An.push(i),Bt!==4&&(Bt=2),e===null)return!0;a=ze(a,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=n&-n,l.lanes|=t,t=Nu(l.stateNode,a,t),ru(l,t),!1;case 1:if(e=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(bl===null||!bl.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=cr(n),fr(n,t,l,a),ru(l,n),!1}l=l.return}while(l!==null);return!1}var Hu=Error(o(461)),Yt=!1;function Jt(t,e,l,a){e.child=t===null?mf(e,null,l,a):Xl(e,t.child,l,a)}function rr(t,e,l,a,n){l=l.render;var i=e.ref;if("ref"in a){var u={};for(var f in a)f!=="ref"&&(u[f]=a[f])}else u=a;return Ll(e),a=gu(t,e,l,u,i,n),f=vu(),t!==null&&!Yt?(bu(t,e,n),Fe(t,e,n)):(ct&&f&&Is(e),e.flags|=1,Jt(t,e,a,n),e.child)}function dr(t,e,l,a,n){if(t===null){var i=l.type;return typeof i=="function"&&!Fs(i)&&i.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=i,hr(t,e,i,a,n)):(t=ci(l.type,null,a,e,e.mode,n),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!Qu(t,n)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:sn,l(u,a)&&t.ref===e.ref)return Fe(t,e,n)}return e.flags|=1,t=Ze(i,a),t.ref=e.ref,t.return=e,e.child=t}function hr(t,e,l,a,n){if(t!==null){var i=t.memoizedProps;if(sn(i,a)&&t.ref===e.ref)if(Yt=!1,e.pendingProps=a=i,Qu(t,n))(t.flags&131072)!==0&&(Yt=!0);else return e.lanes=t.lanes,Fe(t,e,n)}return wu(t,e,l,a,n)}function mr(t,e,l,a){var n=a.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,t!==null){for(a=e.child=t.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,e.child=null;return yr(t,e,i,l,a)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&hi(e,i!==null?i.cachePool:null),i!==null?gf(e,i):hu(),vf(e);else return a=e.lanes=536870912,yr(t,e,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(hi(e,i.cachePool),gf(e,i),yl(),e.memoizedState=null):(t!==null&&hi(e,null),hu(),yl());return Jt(t,e,n,l),e.child}function xn(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function yr(t,e,l,a,n){var i=uu();return i=i===null?null:{parent:wt._currentValue,pool:i},e.memoizedState={baseLanes:l,cachePool:i},t!==null&&hi(e,null),hu(),vf(e),t!==null&&ya(t,e,a,!0),e.childLanes=n,null}function Di(t,e){return e=Oi({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function pr(t,e,l){return Xl(e,t.child,null,l),t=Di(e,e.pendingProps),t.flags|=2,ye(e),e.memoizedState=null,t}function cy(t,e,l){var a=e.pendingProps,n=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(ct){if(a.mode==="hidden")return t=Di(e,a),e.lanes=536870912,xn(null,t);if(yu(e),(t=At)?(t=Ad(t,Me),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ul!==null?{id:Ne,overflow:He}:null,retryLane:536870912,hydrationErrors:null},l=Ic(t),l.return=e,e.child=l,Kt=e,At=null)):t=null,t===null)throw cl(e);return e.lanes=536870912,null}return Di(e,a)}var i=t.memoizedState;if(i!==null){var u=i.dehydrated;if(yu(e),n)if(e.flags&256)e.flags&=-257,e=pr(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(o(558));else if(Yt||ya(t,e,l,!1),n=(l&t.childLanes)!==0,Yt||n){if(a=jt,a!==null&&(u=ic(a,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,Bl(t,u),ue(a,t,u),Hu;qi(),e=pr(t,e,l)}else t=i.treeContext,At=Ae(u.nextSibling),Kt=e,ct=!0,ol=null,Me=!1,t!==null&&ef(e,t),e=Di(e,a),e.flags|=4096;return e}return t=Ze(t.child,{mode:a.mode,children:a.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Ci(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function wu(t,e,l,a,n){return Ll(e),l=gu(t,e,l,a,void 0,n),a=vu(),t!==null&&!Yt?(bu(t,e,n),Fe(t,e,n)):(ct&&a&&Is(e),e.flags|=1,Jt(t,e,l,n),e.child)}function gr(t,e,l,a,n,i){return Ll(e),e.updateQueue=null,l=Sf(e,a,l,n),bf(t),a=vu(),t!==null&&!Yt?(bu(t,e,i),Fe(t,e,i)):(ct&&a&&Is(e),e.flags|=1,Jt(t,e,l,i),e.child)}function vr(t,e,l,a,n){if(Ll(e),e.stateNode===null){var i=ra,u=l.contextType;typeof u=="object"&&u!==null&&(i=kt(u)),i=new l(a,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Bu,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=a,i.state=e.memoizedState,i.refs={},cu(e),u=l.contextType,i.context=typeof u=="object"&&u!==null?kt(u):ra,i.state=e.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(Uu(e,l,u,a),i.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&Bu.enqueueReplaceState(i,i.state,null),pn(e,a,i,n),yn(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),a=!0}else if(t===null){i=e.stateNode;var f=e.memoizedProps,y=Ql(l,f);i.props=y;var S=i.context,j=l.contextType;u=ra,typeof j=="object"&&j!==null&&(u=kt(j));var D=l.getDerivedStateFromProps;j=typeof D=="function"||typeof i.getSnapshotBeforeUpdate=="function",f=e.pendingProps!==f,j||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f||S!==u)&&nr(e,i,a,u),rl=!1;var _=e.memoizedState;i.state=_,pn(e,a,i,n),yn(),S=e.memoizedState,f||_!==S||rl?(typeof D=="function"&&(Uu(e,l,D,a),S=e.memoizedState),(y=rl||ar(e,l,y,a,_,S,u))?(j||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=a,e.memoizedState=S),i.props=a,i.state=S,i.context=u,a=y):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),a=!1)}else{i=e.stateNode,fu(t,e),u=e.memoizedProps,j=Ql(l,u),i.props=j,D=e.pendingProps,_=i.context,S=l.contextType,y=ra,typeof S=="object"&&S!==null&&(y=kt(S)),f=l.getDerivedStateFromProps,(S=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==D||_!==y)&&nr(e,i,a,y),rl=!1,_=e.memoizedState,i.state=_,pn(e,a,i,n),yn();var T=e.memoizedState;u!==D||_!==T||rl||t!==null&&t.dependencies!==null&&ri(t.dependencies)?(typeof f=="function"&&(Uu(e,l,f,a),T=e.memoizedState),(j=rl||ar(e,l,j,a,_,T,y)||t!==null&&t.dependencies!==null&&ri(t.dependencies))?(S||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,T,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,T,y)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),e.memoizedProps=a,e.memoizedState=T),i.props=a,i.state=T,i.context=y,a=j):(typeof i.componentDidUpdate!="function"||u===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),a=!1)}return i=a,Ci(t,e),a=(e.flags&128)!==0,i||a?(i=e.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&a?(e.child=Xl(e,t.child,null,n),e.child=Xl(e,null,l,n)):Jt(t,e,l,n),e.memoizedState=i.state,t=e.child):t=Fe(t,e,n),t}function br(t,e,l,a){return Hl(),e.flags|=256,Jt(t,e,l,a),e.child}var Lu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yu(t){return{baseLanes:t,cachePool:of()}}function qu(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=ge),t}function Sr(t,e,l){var a=e.pendingProps,n=!1,i=(e.flags&128)!==0,u;if((u=i)||(u=t!==null&&t.memoizedState===null?!1:(Nt.current&2)!==0),u&&(n=!0,e.flags&=-129),u=(e.flags&32)!==0,e.flags&=-33,t===null){if(ct){if(n?ml(e):yl(),(t=At)?(t=Ad(t,Me),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ul!==null?{id:Ne,overflow:He}:null,retryLane:536870912,hydrationErrors:null},l=Ic(t),l.return=e,e.child=l,Kt=e,At=null)):t=null,t===null)throw cl(e);return zo(t)?e.lanes=32:e.lanes=536870912,null}var f=a.children;return a=a.fallback,n?(yl(),n=e.mode,f=Oi({mode:"hidden",children:f},n),a=Nl(a,n,l,null),f.return=e,a.return=e,f.sibling=a,e.child=f,a=e.child,a.memoizedState=Yu(l),a.childLanes=qu(t,u,l),e.memoizedState=Lu,xn(null,a)):(ml(e),Gu(e,f))}var y=t.memoizedState;if(y!==null&&(f=y.dehydrated,f!==null)){if(i)e.flags&256?(ml(e),e.flags&=-257,e=Xu(t,e,l)):e.memoizedState!==null?(yl(),e.child=t.child,e.flags|=128,e=null):(yl(),f=a.fallback,n=e.mode,a=Oi({mode:"visible",children:a.children},n),f=Nl(f,n,l,null),f.flags|=2,a.return=e,f.return=e,a.sibling=f,e.child=a,Xl(e,t.child,null,l),a=e.child,a.memoizedState=Yu(l),a.childLanes=qu(t,u,l),e.memoizedState=Lu,e=xn(null,a));else if(ml(e),zo(f)){if(u=f.nextSibling&&f.nextSibling.dataset,u)var S=u.dgst;u=S,a=Error(o(419)),a.stack="",a.digest=u,cn({value:a,source:null,stack:null}),e=Xu(t,e,l)}else if(Yt||ya(t,e,l,!1),u=(l&t.childLanes)!==0,Yt||u){if(u=jt,u!==null&&(a=ic(u,l),a!==0&&a!==y.retryLane))throw y.retryLane=a,Bl(t,a),ue(u,t,a),Hu;_o(f)||qi(),e=Xu(t,e,l)}else _o(f)?(e.flags|=192,e.child=t.child,e=null):(t=y.treeContext,At=Ae(f.nextSibling),Kt=e,ct=!0,ol=null,Me=!1,t!==null&&ef(e,t),e=Gu(e,a.children),e.flags|=4096);return e}return n?(yl(),f=a.fallback,n=e.mode,y=t.child,S=y.sibling,a=Ze(y,{mode:"hidden",children:a.children}),a.subtreeFlags=y.subtreeFlags&65011712,S!==null?f=Ze(S,f):(f=Nl(f,n,l,null),f.flags|=2),f.return=e,a.return=e,a.sibling=f,e.child=a,xn(null,a),a=e.child,f=t.child.memoizedState,f===null?f=Yu(l):(n=f.cachePool,n!==null?(y=wt._currentValue,n=n.parent!==y?{parent:y,pool:y}:n):n=of(),f={baseLanes:f.baseLanes|l,cachePool:n}),a.memoizedState=f,a.childLanes=qu(t,u,l),e.memoizedState=Lu,xn(t.child,a)):(ml(e),l=t.child,t=l.sibling,l=Ze(l,{mode:"visible",children:a.children}),l.return=e,l.sibling=null,t!==null&&(u=e.deletions,u===null?(e.deletions=[t],e.flags|=16):u.push(t)),e.child=l,e.memoizedState=null,l)}function Gu(t,e){return e=Oi({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Oi(t,e){return t=he(22,t,null,e),t.lanes=0,t}function Xu(t,e,l){return Xl(e,t.child,null,l),t=Gu(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function xr(t,e,l){t.lanes|=e;var a=t.alternate;a!==null&&(a.lanes|=e),au(t.return,e,l)}function Zu(t,e,l,a,n,i){var u=t.memoizedState;u===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(u.isBackwards=e,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=n,u.treeForkCount=i)}function _r(t,e,l){var a=e.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var u=Nt.current,f=(u&2)!==0;if(f?(u=u&1|2,e.flags|=128):u&=1,dt(Nt,u),Jt(t,e,a,l),a=ct?on:0,!f&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&xr(t,l,e);else if(t.tag===19)xr(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(n){case"forwards":for(l=e.child,n=null;l!==null;)t=l.alternate,t!==null&&bi(t)===null&&(n=l),l=l.sibling;l=n,l===null?(n=e.child,e.child=null):(n=l.sibling,l.sibling=null),Zu(e,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=e.child,e.child=null;n!==null;){if(t=n.alternate,t!==null&&bi(t)===null){e.child=n;break}t=n.sibling,n.sibling=l,l=n,n=t}Zu(e,!0,l,null,i,a);break;case"together":Zu(e,!1,null,null,void 0,a);break;default:e.memoizedState=null}return e.child}function Fe(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),vl|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(ya(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(o(153));if(e.child!==null){for(t=e.child,l=Ze(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=Ze(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function Qu(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&ri(t)))}function fy(t,e,l){switch(e.tag){case 3:$l(e,e.stateNode.containerInfo),fl(e,wt,t.memoizedState.cache),Hl();break;case 27:case 5:Ka(e);break;case 4:$l(e,e.stateNode.containerInfo);break;case 10:fl(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,yu(e),null;break;case 13:var a=e.memoizedState;if(a!==null)return a.dehydrated!==null?(ml(e),e.flags|=128,null):(l&e.child.childLanes)!==0?Sr(t,e,l):(ml(e),t=Fe(t,e,l),t!==null?t.sibling:null);ml(e);break;case 19:var n=(t.flags&128)!==0;if(a=(l&e.childLanes)!==0,a||(ya(t,e,l,!1),a=(l&e.childLanes)!==0),n){if(a)return _r(t,e,l);e.flags|=128}if(n=e.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),dt(Nt,Nt.current),a)break;return null;case 22:return e.lanes=0,mr(t,e,l,e.pendingProps);case 24:fl(e,wt,t.memoizedState.cache)}return Fe(t,e,l)}function zr(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Yt=!0;else{if(!Qu(t,l)&&(e.flags&128)===0)return Yt=!1,fy(t,e,l);Yt=(t.flags&131072)!==0}else Yt=!1,ct&&(e.flags&1048576)!==0&&tf(e,on,e.index);switch(e.lanes=0,e.tag){case 16:t:{var a=e.pendingProps;if(t=ql(e.elementType),e.type=t,typeof t=="function")Fs(t)?(a=Ql(t,a),e.tag=1,e=vr(null,e,t,a,l)):(e.tag=0,e=wu(null,e,t,a,l));else{if(t!=null){var n=t.$$typeof;if(n===K){e.tag=11,e=rr(null,e,t,a,l);break t}else if(n===Z){e.tag=14,e=dr(null,e,t,a,l);break t}}throw e=ht(t)||t,Error(o(306,e,""))}}return e;case 0:return wu(t,e,e.type,e.pendingProps,l);case 1:return a=e.type,n=Ql(a,e.pendingProps),vr(t,e,a,n,l);case 3:t:{if($l(e,e.stateNode.containerInfo),t===null)throw Error(o(387));a=e.pendingProps;var i=e.memoizedState;n=i.element,fu(t,e),pn(e,a,null,l);var u=e.memoizedState;if(a=u.cache,fl(e,wt,a),a!==i.cache&&nu(e,[wt],l,!0),yn(),a=u.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:u.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=br(t,e,a,l);break t}else if(a!==n){n=ze(Error(o(424)),e),cn(n),e=br(t,e,a,l);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(At=Ae(t.firstChild),Kt=e,ct=!0,ol=null,Me=!0,l=mf(e,null,a,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Hl(),a===n){e=Fe(t,e,l);break t}Jt(t,e,a,l)}e=e.child}return e;case 26:return Ci(t,e),t===null?(l=Bd(e.type,null,e.pendingProps,null))?e.memoizedState=l:ct||(l=e.type,t=e.pendingProps,a=ki(te.current).createElement(l),a[Vt]=e,a[ee]=t,Ft(a,l,t),Zt(a),e.stateNode=a):e.memoizedState=Bd(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Ka(e),t===null&&ct&&(a=e.stateNode=Od(e.type,e.pendingProps,te.current),Kt=e,Me=!0,n=At,zl(e.type)?(To=n,At=Ae(a.firstChild)):At=n),Jt(t,e,e.pendingProps.children,l),Ci(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&ct&&((n=a=At)&&(a=qy(a,e.type,e.pendingProps,Me),a!==null?(e.stateNode=a,Kt=e,At=Ae(a.firstChild),Me=!1,n=!0):n=!1),n||cl(e)),Ka(e),n=e.type,i=e.pendingProps,u=t!==null?t.memoizedProps:null,a=i.children,bo(n,i)?a=null:u!==null&&bo(n,u)&&(e.flags|=32),e.memoizedState!==null&&(n=gu(t,e,ey,null,null,l),Hn._currentValue=n),Ci(t,e),Jt(t,e,a,l),e.child;case 6:return t===null&&ct&&((t=l=At)&&(l=Gy(l,e.pendingProps,Me),l!==null?(e.stateNode=l,Kt=e,At=null,t=!0):t=!1),t||cl(e)),null;case 13:return Sr(t,e,l);case 4:return $l(e,e.stateNode.containerInfo),a=e.pendingProps,t===null?e.child=Xl(e,null,a,l):Jt(t,e,a,l),e.child;case 11:return rr(t,e,e.type,e.pendingProps,l);case 7:return Jt(t,e,e.pendingProps,l),e.child;case 8:return Jt(t,e,e.pendingProps.children,l),e.child;case 12:return Jt(t,e,e.pendingProps.children,l),e.child;case 10:return a=e.pendingProps,fl(e,e.type,a.value),Jt(t,e,a.children,l),e.child;case 9:return n=e.type._context,a=e.pendingProps.children,Ll(e),n=kt(n),a=a(n),e.flags|=1,Jt(t,e,a,l),e.child;case 14:return dr(t,e,e.type,e.pendingProps,l);case 15:return hr(t,e,e.type,e.pendingProps,l);case 19:return _r(t,e,l);case 31:return cy(t,e,l);case 22:return mr(t,e,l,e.pendingProps);case 24:return Ll(e),a=kt(wt),t===null?(n=uu(),n===null&&(n=jt,i=iu(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),e.memoizedState={parent:a,cache:n},cu(e),fl(e,wt,n)):((t.lanes&l)!==0&&(fu(t,e),pn(e,null,null,l),yn()),n=t.memoizedState,i=e.memoizedState,n.parent!==a?(n={parent:a,cache:a},e.memoizedState=n,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=n),fl(e,wt,a)):(a=i.cache,fl(e,wt,a),a!==n.cache&&nu(e,[wt],l,!0))),Jt(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(o(156,e.tag))}function We(t){t.flags|=4}function Vu(t,e,l,a,n){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(n&335544128)===n)if(t.stateNode.complete)t.flags|=8192;else if(Wr())t.flags|=8192;else throw Gl=yi,ou}else t.flags&=-16777217}function Tr(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Yd(e))if(Wr())t.flags|=8192;else throw Gl=yi,ou}function Ri(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?lc():536870912,t.lanes|=e,ja|=e)}function _n(t,e){if(!ct)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:a.sibling=null}}function Dt(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,a=0;if(e)for(var n=t.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=t,n=n.sibling;else for(n=t.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=t,n=n.sibling;return t.subtreeFlags|=a,t.childLanes=l,e}function ry(t,e,l){var a=e.pendingProps;switch(Ps(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dt(e),null;case 1:return Dt(e),null;case 3:return l=e.stateNode,a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Ke(wt),Ye(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ma(e)?We(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,eu())),Dt(e),null;case 26:var n=e.type,i=e.memoizedState;return t===null?(We(e),i!==null?(Dt(e),Tr(e,i)):(Dt(e),Vu(e,n,null,a,l))):i?i!==t.memoizedState?(We(e),Dt(e),Tr(e,i)):(Dt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==a&&We(e),Dt(e),Vu(e,n,t,a,l)),null;case 27:if(_t(e),l=te.current,n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==a&&We(e);else{if(!a){if(e.stateNode===null)throw Error(o(166));return Dt(e),null}t=Ot.current,ma(e)?lf(e):(t=Od(n,a,l),e.stateNode=t,We(e))}return Dt(e),null;case 5:if(_t(e),n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==a&&We(e);else{if(!a){if(e.stateNode===null)throw Error(o(166));return Dt(e),null}if(i=Ot.current,ma(e))lf(e);else{var u=ki(te.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?u.createElement(n,{is:a.is}):u.createElement(n)}}i[Vt]=e,i[ee]=a;t:for(u=e.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break t;for(;u.sibling===null;){if(u.return===null||u.return===e)break t;u=u.return}u.sibling.return=u.return,u=u.sibling}e.stateNode=i;t:switch(Ft(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&We(e)}}return Dt(e),Vu(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&We(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(o(166));if(t=te.current,ma(e)){if(t=e.stateNode,l=e.memoizedProps,a=null,n=Kt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}t[Vt]=e,t=!!(t.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Sd(t.nodeValue,l)),t||cl(e,!0)}else t=ki(t).createTextNode(a),t[Vt]=e,e.stateNode=t}return Dt(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(a=ma(e),l!==null){if(t===null){if(!a)throw Error(o(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[Vt]=e}else Hl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Dt(e),t=!1}else l=eu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(ye(e),e):(ye(e),null);if((e.flags&128)!==0)throw Error(o(558))}return Dt(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=ma(e),a!==null&&a.dehydrated!==null){if(t===null){if(!n)throw Error(o(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[Vt]=e}else Hl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Dt(e),n=!1}else n=eu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return e.flags&256?(ye(e),e):(ye(e),null)}return ye(e),(e.flags&128)!==0?(e.lanes=l,e):(l=a!==null,t=t!==null&&t.memoizedState!==null,l&&(a=e.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Ri(e,e.updateQueue),Dt(e),null);case 4:return Ye(),t===null&&mo(e.stateNode.containerInfo),Dt(e),null;case 10:return Ke(e.type),Dt(e),null;case 19:if(k(Nt),a=e.memoizedState,a===null)return Dt(e),null;if(n=(e.flags&128)!==0,i=a.rendering,i===null)if(n)_n(a,!1);else{if(Bt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=bi(t),i!==null){for(e.flags|=128,_n(a,!1),t=i.updateQueue,e.updateQueue=t,Ri(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)$c(l,t),l=l.sibling;return dt(Nt,Nt.current&1|2),ct&&Qe(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&ce()>wi&&(e.flags|=128,n=!0,_n(a,!1),e.lanes=4194304)}else{if(!n)if(t=bi(i),t!==null){if(e.flags|=128,n=!0,t=t.updateQueue,e.updateQueue=t,Ri(e,t),_n(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ct)return Dt(e),null}else 2*ce()-a.renderingStartTime>wi&&l!==536870912&&(e.flags|=128,n=!0,_n(a,!1),e.lanes=4194304);a.isBackwards?(i.sibling=e.child,e.child=i):(t=a.last,t!==null?t.sibling=i:e.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ce(),t.sibling=null,l=Nt.current,dt(Nt,n?l&1|2:l&1),ct&&Qe(e,a.treeForkCount),t):(Dt(e),null);case 22:case 23:return ye(e),mu(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(l&536870912)!==0&&(e.flags&128)===0&&(Dt(e),e.subtreeFlags&6&&(e.flags|=8192)):Dt(e),l=e.updateQueue,l!==null&&Ri(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==l&&(e.flags|=2048),t!==null&&k(Yl),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Ke(wt),Dt(e),null;case 25:return null;case 30:return null}throw Error(o(156,e.tag))}function dy(t,e){switch(Ps(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ke(wt),Ye(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return _t(e),null;case 31:if(e.memoizedState!==null){if(ye(e),e.alternate===null)throw Error(o(340));Hl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(ye(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(o(340));Hl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return k(Nt),null;case 4:return Ye(),null;case 10:return Ke(e.type),null;case 22:case 23:return ye(e),mu(),t!==null&&k(Yl),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ke(wt),null;case 25:return null;default:return null}}function Er(t,e){switch(Ps(e),e.tag){case 3:Ke(wt),Ye();break;case 26:case 27:case 5:_t(e);break;case 4:Ye();break;case 31:e.memoizedState!==null&&ye(e);break;case 13:ye(e);break;case 19:k(Nt);break;case 10:Ke(e.type);break;case 22:case 23:ye(e),mu(),t!==null&&k(Yl);break;case 24:Ke(wt)}}function zn(t,e){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&t)===t){a=void 0;var i=l.create,u=l.inst;a=i(),u.destroy=a}l=l.next}while(l!==n)}}catch(f){xt(e,e.return,f)}}function pl(t,e,l){try{var a=e.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&t)===t){var u=a.inst,f=u.destroy;if(f!==void 0){u.destroy=void 0,n=e;var y=l,S=f;try{S()}catch(j){xt(n,y,j)}}}a=a.next}while(a!==i)}}catch(j){xt(e,e.return,j)}}function Mr(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{pf(e,l)}catch(a){xt(t,t.return,a)}}}function jr(t,e,l){l.props=Ql(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(a){xt(t,e,a)}}function Tn(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof l=="function"?t.refCleanup=l(a):l.current=a}}catch(n){xt(t,e,n)}}function we(t,e){var l=t.ref,a=t.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){xt(t,e,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){xt(t,e,n)}else l.current=null}function Ar(t){var e=t.type,l=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break t;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){xt(t,t.return,n)}}function Ku(t,e,l){try{var a=t.stateNode;By(a,t.type,l,e),a[ee]=e}catch(n){xt(t,t.return,n)}}function Dr(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&zl(t.type)||t.tag===4}function ku(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Dr(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&zl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ju(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=Ge));else if(a!==4&&(a===27&&zl(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Ju(t,e,l),t=t.sibling;t!==null;)Ju(t,e,l),t=t.sibling}function Ui(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(a!==4&&(a===27&&zl(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Ui(t,e,l),t=t.sibling;t!==null;)Ui(t,e,l),t=t.sibling}function Cr(t){var e=t.stateNode,l=t.memoizedProps;try{for(var a=t.type,n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ft(e,a,l),e[Vt]=t,e[ee]=l}catch(i){xt(t,t.return,i)}}var $e=!1,qt=!1,Fu=!1,Or=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function hy(t,e){if(t=t.containerInfo,go=ts,t=Xc(t),Xs(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break t}var u=0,f=-1,y=-1,S=0,j=0,D=t,_=null;e:for(;;){for(var T;D!==l||n!==0&&D.nodeType!==3||(f=u+n),D!==i||a!==0&&D.nodeType!==3||(y=u+a),D.nodeType===3&&(u+=D.nodeValue.length),(T=D.firstChild)!==null;)_=D,D=T;for(;;){if(D===t)break e;if(_===l&&++S===n&&(f=u),_===i&&++j===a&&(y=u),(T=D.nextSibling)!==null)break;D=_,_=D.parentNode}D=T}l=f===-1||y===-1?null:{start:f,end:y}}else l=null}l=l||{start:0,end:0}}else l=null;for(vo={focusedElem:t,selectionRange:l},ts=!1,Qt=e;Qt!==null;)if(e=Qt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Qt=t;else for(;Qt!==null;){switch(e=Qt,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)n=t[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&i!==null){t=void 0,l=e,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var X=Ql(l.type,n);t=a.getSnapshotBeforeUpdate(X,i),a.__reactInternalSnapshotBeforeUpdate=t}catch(P){xt(l,l.return,P)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)xo(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":xo(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=e.sibling,t!==null){t.return=e.return,Qt=t;break}Qt=e.return}}function Rr(t,e,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Pe(t,l),a&4&&zn(5,l);break;case 1:if(Pe(t,l),a&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(u){xt(l,l.return,u)}else{var n=Ql(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(n,e,t.__reactInternalSnapshotBeforeUpdate)}catch(u){xt(l,l.return,u)}}a&64&&Mr(l),a&512&&Tn(l,l.return);break;case 3:if(Pe(t,l),a&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{pf(t,e)}catch(u){xt(l,l.return,u)}}break;case 27:e===null&&a&4&&Cr(l);case 26:case 5:Pe(t,l),e===null&&a&4&&Ar(l),a&512&&Tn(l,l.return);break;case 12:Pe(t,l);break;case 31:Pe(t,l),a&4&&Nr(t,l);break;case 13:Pe(t,l),a&4&&Hr(t,l),a&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=_y.bind(null,l),Xy(t,l))));break;case 22:if(a=l.memoizedState!==null||$e,!a){e=e!==null&&e.memoizedState!==null||qt,n=$e;var i=qt;$e=a,(qt=e)&&!i?tl(t,l,(l.subtreeFlags&8772)!==0):Pe(t,l),$e=n,qt=i}break;case 30:break;default:Pe(t,l)}}function Ur(t){var e=t.alternate;e!==null&&(t.alternate=null,Ur(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Es(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Ct=null,ae=!1;function Ie(t,e,l){for(l=l.child;l!==null;)Br(t,e,l),l=l.sibling}function Br(t,e,l){if(fe&&typeof fe.onCommitFiberUnmount=="function")try{fe.onCommitFiberUnmount(ka,l)}catch{}switch(l.tag){case 26:qt||we(l,e),Ie(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:qt||we(l,e);var a=Ct,n=ae;zl(l.type)&&(Ct=l.stateNode,ae=!1),Ie(t,e,l),Un(l.stateNode),Ct=a,ae=n;break;case 5:qt||we(l,e);case 6:if(a=Ct,n=ae,Ct=null,Ie(t,e,l),Ct=a,ae=n,Ct!==null)if(ae)try{(Ct.nodeType===9?Ct.body:Ct.nodeName==="HTML"?Ct.ownerDocument.body:Ct).removeChild(l.stateNode)}catch(i){xt(l,e,i)}else try{Ct.removeChild(l.stateNode)}catch(i){xt(l,e,i)}break;case 18:Ct!==null&&(ae?(t=Ct,Md(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Na(t)):Md(Ct,l.stateNode));break;case 4:a=Ct,n=ae,Ct=l.stateNode.containerInfo,ae=!0,Ie(t,e,l),Ct=a,ae=n;break;case 0:case 11:case 14:case 15:pl(2,l,e),qt||pl(4,l,e),Ie(t,e,l);break;case 1:qt||(we(l,e),a=l.stateNode,typeof a.componentWillUnmount=="function"&&jr(l,e,a)),Ie(t,e,l);break;case 21:Ie(t,e,l);break;case 22:qt=(a=qt)||l.memoizedState!==null,Ie(t,e,l),qt=a;break;default:Ie(t,e,l)}}function Nr(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Na(t)}catch(l){xt(e,e.return,l)}}}function Hr(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Na(t)}catch(l){xt(e,e.return,l)}}function my(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Or),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Or),e;default:throw Error(o(435,t.tag))}}function Bi(t,e){var l=my(t);e.forEach(function(a){if(!l.has(a)){l.add(a);var n=zy.bind(null,t,a);a.then(n,n)}})}function ne(t,e){var l=e.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=t,u=e,f=u;t:for(;f!==null;){switch(f.tag){case 27:if(zl(f.type)){Ct=f.stateNode,ae=!1;break t}break;case 5:Ct=f.stateNode,ae=!1;break t;case 3:case 4:Ct=f.stateNode.containerInfo,ae=!0;break t}f=f.return}if(Ct===null)throw Error(o(160));Br(i,u,n),Ct=null,ae=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)wr(e,t),e=e.sibling}var Re=null;function wr(t,e){var l=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ne(e,t),ie(t),a&4&&(pl(3,t,t.return),zn(3,t),pl(5,t,t.return));break;case 1:ne(e,t),ie(t),a&512&&(qt||l===null||we(l,l.return)),a&64&&$e&&(t=t.updateQueue,t!==null&&(a=t.callbacks,a!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Re;if(ne(e,t),ie(t),a&512&&(qt||l===null||we(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=t.memoizedState,l===null)if(a===null)if(t.stateNode===null){t:{a=t.type,l=t.memoizedProps,n=n.ownerDocument||n;e:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[Wa]||i[Vt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),Ft(i,a,l),i[Vt]=t,Zt(i),a=i;break t;case"link":var u=wd("link","href",n).get(a+(l.href||""));if(u){for(var f=0;f<u.length;f++)if(i=u[f],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(f,1);break e}}i=n.createElement(a),Ft(i,a,l),n.head.appendChild(i);break;case"meta":if(u=wd("meta","content",n).get(a+(l.content||""))){for(f=0;f<u.length;f++)if(i=u[f],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(f,1);break e}}i=n.createElement(a),Ft(i,a,l),n.head.appendChild(i);break;default:throw Error(o(468,a))}i[Vt]=t,Zt(i),a=i}t.stateNode=a}else Ld(n,t.type,t.stateNode);else t.stateNode=Hd(n,a,t.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Ld(n,t.type,t.stateNode):Hd(n,a,t.memoizedProps)):a===null&&t.stateNode!==null&&Ku(t,t.memoizedProps,l.memoizedProps)}break;case 27:ne(e,t),ie(t),a&512&&(qt||l===null||we(l,l.return)),l!==null&&a&4&&Ku(t,t.memoizedProps,l.memoizedProps);break;case 5:if(ne(e,t),ie(t),a&512&&(qt||l===null||we(l,l.return)),t.flags&32){n=t.stateNode;try{na(n,"")}catch(X){xt(t,t.return,X)}}a&4&&t.stateNode!=null&&(n=t.memoizedProps,Ku(t,n,l!==null?l.memoizedProps:n)),a&1024&&(Fu=!0);break;case 6:if(ne(e,t),ie(t),a&4){if(t.stateNode===null)throw Error(o(162));a=t.memoizedProps,l=t.stateNode;try{l.nodeValue=a}catch(X){xt(t,t.return,X)}}break;case 3:if(Wi=null,n=Re,Re=Ji(e.containerInfo),ne(e,t),Re=n,ie(t),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Na(e.containerInfo)}catch(X){xt(t,t.return,X)}Fu&&(Fu=!1,Lr(t));break;case 4:a=Re,Re=Ji(t.stateNode.containerInfo),ne(e,t),ie(t),Re=a;break;case 12:ne(e,t),ie(t);break;case 31:ne(e,t),ie(t),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Bi(t,a)));break;case 13:ne(e,t),ie(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Hi=ce()),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Bi(t,a)));break;case 22:n=t.memoizedState!==null;var y=l!==null&&l.memoizedState!==null,S=$e,j=qt;if($e=S||n,qt=j||y,ne(e,t),qt=j,$e=S,ie(t),a&8192)t:for(e=t.stateNode,e._visibility=n?e._visibility&-2:e._visibility|1,n&&(l===null||y||$e||qt||Vl(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){y=l=e;try{if(i=y.stateNode,n)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{f=y.stateNode;var D=y.memoizedProps.style,_=D!=null&&D.hasOwnProperty("display")?D.display:null;f.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(X){xt(y,y.return,X)}}}else if(e.tag===6){if(l===null){y=e;try{y.stateNode.nodeValue=n?"":y.memoizedProps}catch(X){xt(y,y.return,X)}}}else if(e.tag===18){if(l===null){y=e;try{var T=y.stateNode;n?jd(T,!0):jd(y.stateNode,!1)}catch(X){xt(y,y.return,X)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}a&4&&(a=t.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Bi(t,l))));break;case 19:ne(e,t),ie(t),a&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,Bi(t,a)));break;case 30:break;case 21:break;default:ne(e,t),ie(t)}}function ie(t){var e=t.flags;if(e&2){try{for(var l,a=t.return;a!==null;){if(Dr(a)){l=a;break}a=a.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var n=l.stateNode,i=ku(t);Ui(t,i,n);break;case 5:var u=l.stateNode;l.flags&32&&(na(u,""),l.flags&=-33);var f=ku(t);Ui(t,f,u);break;case 3:case 4:var y=l.stateNode.containerInfo,S=ku(t);Ju(t,S,y);break;default:throw Error(o(161))}}catch(j){xt(t,t.return,j)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Lr(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Lr(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Pe(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Rr(t,e.alternate,e),e=e.sibling}function Vl(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:pl(4,e,e.return),Vl(e);break;case 1:we(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&jr(e,e.return,l),Vl(e);break;case 27:Un(e.stateNode);case 26:case 5:we(e,e.return),Vl(e);break;case 22:e.memoizedState===null&&Vl(e);break;case 30:Vl(e);break;default:Vl(e)}t=t.sibling}}function tl(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var a=e.alternate,n=t,i=e,u=i.flags;switch(i.tag){case 0:case 11:case 15:tl(n,i,l),zn(4,i);break;case 1:if(tl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(S){xt(a,a.return,S)}if(a=i,n=a.updateQueue,n!==null){var f=a.stateNode;try{var y=n.shared.hiddenCallbacks;if(y!==null)for(n.shared.hiddenCallbacks=null,n=0;n<y.length;n++)yf(y[n],f)}catch(S){xt(a,a.return,S)}}l&&u&64&&Mr(i),Tn(i,i.return);break;case 27:Cr(i);case 26:case 5:tl(n,i,l),l&&a===null&&u&4&&Ar(i),Tn(i,i.return);break;case 12:tl(n,i,l);break;case 31:tl(n,i,l),l&&u&4&&Nr(n,i);break;case 13:tl(n,i,l),l&&u&4&&Hr(n,i);break;case 22:i.memoizedState===null&&tl(n,i,l),Tn(i,i.return);break;case 30:break;default:tl(n,i,l)}e=e.sibling}}function Wu(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&fn(l))}function $u(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&fn(t))}function Ue(t,e,l,a){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yr(t,e,l,a),e=e.sibling}function Yr(t,e,l,a){var n=e.flags;switch(e.tag){case 0:case 11:case 15:Ue(t,e,l,a),n&2048&&zn(9,e);break;case 1:Ue(t,e,l,a);break;case 3:Ue(t,e,l,a),n&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&fn(t)));break;case 12:if(n&2048){Ue(t,e,l,a),t=e.stateNode;try{var i=e.memoizedProps,u=i.id,f=i.onPostCommit;typeof f=="function"&&f(u,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(y){xt(e,e.return,y)}}else Ue(t,e,l,a);break;case 31:Ue(t,e,l,a);break;case 13:Ue(t,e,l,a);break;case 23:break;case 22:i=e.stateNode,u=e.alternate,e.memoizedState!==null?i._visibility&2?Ue(t,e,l,a):En(t,e):i._visibility&2?Ue(t,e,l,a):(i._visibility|=2,Ta(t,e,l,a,(e.subtreeFlags&10256)!==0||!1)),n&2048&&Wu(u,e);break;case 24:Ue(t,e,l,a),n&2048&&$u(e.alternate,e);break;default:Ue(t,e,l,a)}}function Ta(t,e,l,a,n){for(n=n&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,u=e,f=l,y=a,S=u.flags;switch(u.tag){case 0:case 11:case 15:Ta(i,u,f,y,n),zn(8,u);break;case 23:break;case 22:var j=u.stateNode;u.memoizedState!==null?j._visibility&2?Ta(i,u,f,y,n):En(i,u):(j._visibility|=2,Ta(i,u,f,y,n)),n&&S&2048&&Wu(u.alternate,u);break;case 24:Ta(i,u,f,y,n),n&&S&2048&&$u(u.alternate,u);break;default:Ta(i,u,f,y,n)}e=e.sibling}}function En(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,a=e,n=a.flags;switch(a.tag){case 22:En(l,a),n&2048&&Wu(a.alternate,a);break;case 24:En(l,a),n&2048&&$u(a.alternate,a);break;default:En(l,a)}e=e.sibling}}var Mn=8192;function Ea(t,e,l){if(t.subtreeFlags&Mn)for(t=t.child;t!==null;)qr(t,e,l),t=t.sibling}function qr(t,e,l){switch(t.tag){case 26:Ea(t,e,l),t.flags&Mn&&t.memoizedState!==null&&t0(l,Re,t.memoizedState,t.memoizedProps);break;case 5:Ea(t,e,l);break;case 3:case 4:var a=Re;Re=Ji(t.stateNode.containerInfo),Ea(t,e,l),Re=a;break;case 22:t.memoizedState===null&&(a=t.alternate,a!==null&&a.memoizedState!==null?(a=Mn,Mn=16777216,Ea(t,e,l),Mn=a):Ea(t,e,l));break;default:Ea(t,e,l)}}function Gr(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function jn(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var a=e[l];Qt=a,Zr(a,t)}Gr(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Xr(t),t=t.sibling}function Xr(t){switch(t.tag){case 0:case 11:case 15:jn(t),t.flags&2048&&pl(9,t,t.return);break;case 3:jn(t);break;case 12:jn(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Ni(t)):jn(t);break;default:jn(t)}}function Ni(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var a=e[l];Qt=a,Zr(a,t)}Gr(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:pl(8,e,e.return),Ni(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,Ni(e));break;default:Ni(e)}t=t.sibling}}function Zr(t,e){for(;Qt!==null;){var l=Qt;switch(l.tag){case 0:case 11:case 15:pl(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:fn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Qt=a;else t:for(l=t;Qt!==null;){a=Qt;var n=a.sibling,i=a.return;if(Ur(a),a===l){Qt=null;break t}if(n!==null){n.return=i,Qt=n;break t}Qt=i}}}var yy={getCacheForType:function(t){var e=kt(wt),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return kt(wt).controller.signal}},py=typeof WeakMap=="function"?WeakMap:Map,gt=0,jt=null,it=null,ut=0,St=0,pe=null,gl=!1,Ma=!1,Iu=!1,el=0,Bt=0,vl=0,Kl=0,Pu=0,ge=0,ja=0,An=null,se=null,to=!1,Hi=0,Qr=0,wi=1/0,Li=null,bl=null,Gt=0,Sl=null,Aa=null,ll=0,eo=0,lo=null,Vr=null,Dn=0,ao=null;function ve(){return(gt&2)!==0&&ut!==0?ut&-ut:M.T!==null?co():sc()}function Kr(){if(ge===0)if((ut&536870912)===0||ct){var t=Kn;Kn<<=1,(Kn&3932160)===0&&(Kn=262144),ge=t}else ge=536870912;return t=me.current,t!==null&&(t.flags|=32),ge}function ue(t,e,l){(t===jt&&(St===2||St===9)||t.cancelPendingCommit!==null)&&(Da(t,0),xl(t,ut,ge,!1)),Fa(t,l),((gt&2)===0||t!==jt)&&(t===jt&&((gt&2)===0&&(Kl|=l),Bt===4&&xl(t,ut,ge,!1)),Le(t))}function kr(t,e,l){if((gt&6)!==0)throw Error(o(327));var a=!l&&(e&127)===0&&(e&t.expiredLanes)===0||Ja(t,e),n=a?by(t,e):io(t,e,!0),i=a;do{if(n===0){Ma&&!a&&xl(t,e,0,!1);break}else{if(l=t.current.alternate,i&&!gy(l)){n=io(t,e,!1),i=!1;continue}if(n===2){if(i=e,t.errorRecoveryDisabledLanes&i)var u=0;else u=t.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){e=u;t:{var f=t;n=An;var y=f.current.memoizedState.isDehydrated;if(y&&(Da(f,u).flags|=256),u=io(f,u,!1),u!==2){if(Iu&&!y){f.errorRecoveryDisabledLanes|=i,Kl|=i,n=4;break t}i=se,se=n,i!==null&&(se===null?se=i:se.push.apply(se,i))}n=u}if(i=!1,n!==2)continue}}if(n===1){Da(t,0),xl(t,e,0,!0);break}t:{switch(a=t,i=n,i){case 0:case 1:throw Error(o(345));case 4:if((e&4194048)!==e)break;case 6:xl(a,e,ge,!gl);break t;case 2:se=null;break;case 3:case 5:break;default:throw Error(o(329))}if((e&62914560)===e&&(n=Hi+300-ce(),10<n)){if(xl(a,e,ge,!gl),Jn(a,0,!0)!==0)break t;ll=e,a.timeoutHandle=Td(Jr.bind(null,a,l,se,Li,to,e,ge,Kl,ja,gl,i,"Throttled",-0,0),n);break t}Jr(a,l,se,Li,to,e,ge,Kl,ja,gl,i,null,-0,0)}}break}while(!0);Le(t)}function Jr(t,e,l,a,n,i,u,f,y,S,j,D,_,T){if(t.timeoutHandle=-1,D=e.subtreeFlags,D&8192||(D&16785408)===16785408){D={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ge},qr(e,i,D);var X=(i&62914560)===i?Hi-ce():(i&4194048)===i?Qr-ce():0;if(X=e0(D,X),X!==null){ll=i,t.cancelPendingCommit=X(ld.bind(null,t,e,i,l,a,n,u,f,y,j,D,null,_,T)),xl(t,i,u,!S);return}}ld(t,e,i,l,a,n,u,f,y)}function gy(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!de(i(),n))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function xl(t,e,l,a){e&=~Pu,e&=~Kl,t.suspendedLanes|=e,t.pingedLanes&=~e,a&&(t.warmLanes|=e),a=t.expirationTimes;for(var n=e;0<n;){var i=31-re(n),u=1<<i;a[i]=-1,n&=~u}l!==0&&ac(t,l,e)}function Yi(){return(gt&6)===0?(Cn(0),!1):!0}function no(){if(it!==null){if(St===0)var t=it.return;else t=it,Ve=wl=null,Su(t),ba=null,dn=0,t=it;for(;t!==null;)Er(t.alternate,t),t=t.return;it=null}}function Da(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,wy(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),ll=0,no(),jt=t,it=l=Ze(t.current,null),ut=e,St=0,pe=null,gl=!1,Ma=Ja(t,e),Iu=!1,ja=ge=Pu=Kl=vl=Bt=0,se=An=null,to=!1,(e&8)!==0&&(e|=e&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=e;0<a;){var n=31-re(a),i=1<<n;e|=t[n],a&=~i}return el=e,si(),l}function Fr(t,e){et=null,M.H=Sn,e===va||e===mi?(e=rf(),St=3):e===ou?(e=rf(),St=4):St=e===Hu?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,pe=e,it===null&&(Bt=1,Ai(t,ze(e,t.current)))}function Wr(){var t=me.current;return t===null?!0:(ut&4194048)===ut?je===null:(ut&62914560)===ut||(ut&536870912)!==0?t===je:!1}function $r(){var t=M.H;return M.H=Sn,t===null?Sn:t}function Ir(){var t=M.A;return M.A=yy,t}function qi(){Bt=4,gl||(ut&4194048)!==ut&&me.current!==null||(Ma=!0),(vl&134217727)===0&&(Kl&134217727)===0||jt===null||xl(jt,ut,ge,!1)}function io(t,e,l){var a=gt;gt|=2;var n=$r(),i=Ir();(jt!==t||ut!==e)&&(Li=null,Da(t,e)),e=!1;var u=Bt;t:do try{if(St!==0&&it!==null){var f=it,y=pe;switch(St){case 8:no(),u=6;break t;case 3:case 2:case 9:case 6:me.current===null&&(e=!0);var S=St;if(St=0,pe=null,Ca(t,f,y,S),l&&Ma){u=0;break t}break;default:S=St,St=0,pe=null,Ca(t,f,y,S)}}vy(),u=Bt;break}catch(j){Fr(t,j)}while(!0);return e&&t.shellSuspendCounter++,Ve=wl=null,gt=a,M.H=n,M.A=i,it===null&&(jt=null,ut=0,si()),u}function vy(){for(;it!==null;)Pr(it)}function by(t,e){var l=gt;gt|=2;var a=$r(),n=Ir();jt!==t||ut!==e?(Li=null,wi=ce()+500,Da(t,e)):Ma=Ja(t,e);t:do try{if(St!==0&&it!==null){e=it;var i=pe;e:switch(St){case 1:St=0,pe=null,Ca(t,e,i,1);break;case 2:case 9:if(cf(i)){St=0,pe=null,td(e);break}e=function(){St!==2&&St!==9||jt!==t||(St=7),Le(t)},i.then(e,e);break t;case 3:St=7;break t;case 4:St=5;break t;case 7:cf(i)?(St=0,pe=null,td(e)):(St=0,pe=null,Ca(t,e,i,7));break;case 5:var u=null;switch(it.tag){case 26:u=it.memoizedState;case 5:case 27:var f=it;if(u?Yd(u):f.stateNode.complete){St=0,pe=null;var y=f.sibling;if(y!==null)it=y;else{var S=f.return;S!==null?(it=S,Gi(S)):it=null}break e}}St=0,pe=null,Ca(t,e,i,5);break;case 6:St=0,pe=null,Ca(t,e,i,6);break;case 8:no(),Bt=6;break t;default:throw Error(o(462))}}Sy();break}catch(j){Fr(t,j)}while(!0);return Ve=wl=null,M.H=a,M.A=n,gt=l,it!==null?0:(jt=null,ut=0,si(),Bt)}function Sy(){for(;it!==null&&!Zh();)Pr(it)}function Pr(t){var e=zr(t.alternate,t,el);t.memoizedProps=t.pendingProps,e===null?Gi(t):it=e}function td(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=gr(l,e,e.pendingProps,e.type,void 0,ut);break;case 11:e=gr(l,e,e.pendingProps,e.type.render,e.ref,ut);break;case 5:Su(e);default:Er(l,e),e=it=$c(e,el),e=zr(l,e,el)}t.memoizedProps=t.pendingProps,e===null?Gi(t):it=e}function Ca(t,e,l,a){Ve=wl=null,Su(e),ba=null,dn=0;var n=e.return;try{if(oy(t,n,e,l,ut)){Bt=1,Ai(t,ze(l,t.current)),it=null;return}}catch(i){if(n!==null)throw it=n,i;Bt=1,Ai(t,ze(l,t.current)),it=null;return}e.flags&32768?(ct||a===1?t=!0:Ma||(ut&536870912)!==0?t=!1:(gl=t=!0,(a===2||a===9||a===3||a===6)&&(a=me.current,a!==null&&a.tag===13&&(a.flags|=16384))),ed(e,t)):Gi(e)}function Gi(t){var e=t;do{if((e.flags&32768)!==0){ed(e,gl);return}t=e.return;var l=ry(e.alternate,e,el);if(l!==null){it=l;return}if(e=e.sibling,e!==null){it=e;return}it=e=t}while(e!==null);Bt===0&&(Bt=5)}function ed(t,e){do{var l=dy(t.alternate,t);if(l!==null){l.flags&=32767,it=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){it=t;return}it=t=l}while(t!==null);Bt=6,it=null}function ld(t,e,l,a,n,i,u,f,y){t.cancelPendingCommit=null;do Xi();while(Gt!==0);if((gt&6)!==0)throw Error(o(327));if(e!==null){if(e===t.current)throw Error(o(177));if(i=e.lanes|e.childLanes,i|=ks,Ph(t,l,i,u,f,y),t===jt&&(it=jt=null,ut=0),Aa=e,Sl=t,ll=l,eo=i,lo=n,Vr=a,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Ty(Qn,function(){return ud(),null})):(t.callbackNode=null,t.callbackPriority=0),a=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||a){a=M.T,M.T=null,n=L.p,L.p=2,u=gt,gt|=4;try{hy(t,e,l)}finally{gt=u,L.p=n,M.T=a}}Gt=1,ad(),nd(),id()}}function ad(){if(Gt===1){Gt=0;var t=Sl,e=Aa,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=M.T,M.T=null;var a=L.p;L.p=2;var n=gt;gt|=4;try{wr(e,t);var i=vo,u=Xc(t.containerInfo),f=i.focusedElem,y=i.selectionRange;if(u!==f&&f&&f.ownerDocument&&Gc(f.ownerDocument.documentElement,f)){if(y!==null&&Xs(f)){var S=y.start,j=y.end;if(j===void 0&&(j=S),"selectionStart"in f)f.selectionStart=S,f.selectionEnd=Math.min(j,f.value.length);else{var D=f.ownerDocument||document,_=D&&D.defaultView||window;if(_.getSelection){var T=_.getSelection(),X=f.textContent.length,P=Math.min(y.start,X),Et=y.end===void 0?P:Math.min(y.end,X);!T.extend&&P>Et&&(u=Et,Et=P,P=u);var g=qc(f,P),p=qc(f,Et);if(g&&p&&(T.rangeCount!==1||T.anchorNode!==g.node||T.anchorOffset!==g.offset||T.focusNode!==p.node||T.focusOffset!==p.offset)){var v=D.createRange();v.setStart(g.node,g.offset),T.removeAllRanges(),P>Et?(T.addRange(v),T.extend(p.node,p.offset)):(v.setEnd(p.node,p.offset),T.addRange(v))}}}}for(D=[],T=f;T=T.parentNode;)T.nodeType===1&&D.push({element:T,left:T.scrollLeft,top:T.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<D.length;f++){var A=D[f];A.element.scrollLeft=A.left,A.element.scrollTop=A.top}}ts=!!go,vo=go=null}finally{gt=n,L.p=a,M.T=l}}t.current=e,Gt=2}}function nd(){if(Gt===2){Gt=0;var t=Sl,e=Aa,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var a=L.p;L.p=2;var n=gt;gt|=4;try{Rr(t,e.alternate,e)}finally{gt=n,L.p=a,M.T=l}}Gt=3}}function id(){if(Gt===4||Gt===3){Gt=0,Qh();var t=Sl,e=Aa,l=ll,a=Vr;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Gt=5:(Gt=0,Aa=Sl=null,sd(t,t.pendingLanes));var n=t.pendingLanes;if(n===0&&(bl=null),zs(l),e=e.stateNode,fe&&typeof fe.onCommitFiberRoot=="function")try{fe.onCommitFiberRoot(ka,e,void 0,(e.current.flags&128)===128)}catch{}if(a!==null){e=M.T,n=L.p,L.p=2,M.T=null;try{for(var i=t.onRecoverableError,u=0;u<a.length;u++){var f=a[u];i(f.value,{componentStack:f.stack})}}finally{M.T=e,L.p=n}}(ll&3)!==0&&Xi(),Le(t),n=t.pendingLanes,(l&261930)!==0&&(n&42)!==0?t===ao?Dn++:(Dn=0,ao=t):Dn=0,Cn(0)}}function sd(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,fn(e)))}function Xi(){return ad(),nd(),id(),ud()}function ud(){if(Gt!==5)return!1;var t=Sl,e=eo;eo=0;var l=zs(ll),a=M.T,n=L.p;try{L.p=32>l?32:l,M.T=null,l=lo,lo=null;var i=Sl,u=ll;if(Gt=0,Aa=Sl=null,ll=0,(gt&6)!==0)throw Error(o(331));var f=gt;if(gt|=4,Xr(i.current),Yr(i,i.current,u,l),gt=f,Cn(0,!1),fe&&typeof fe.onPostCommitFiberRoot=="function")try{fe.onPostCommitFiberRoot(ka,i)}catch{}return!0}finally{L.p=n,M.T=a,sd(t,e)}}function od(t,e,l){e=ze(l,e),e=Nu(t.stateNode,e,2),t=hl(t,e,2),t!==null&&(Fa(t,2),Le(t))}function xt(t,e,l){if(t.tag===3)od(t,t,l);else for(;e!==null;){if(e.tag===3){od(e,t,l);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(bl===null||!bl.has(a))){t=ze(l,t),l=cr(2),a=hl(e,l,2),a!==null&&(fr(l,a,e,t),Fa(a,2),Le(a));break}}e=e.return}}function so(t,e,l){var a=t.pingCache;if(a===null){a=t.pingCache=new py;var n=new Set;a.set(e,n)}else n=a.get(e),n===void 0&&(n=new Set,a.set(e,n));n.has(l)||(Iu=!0,n.add(l),t=xy.bind(null,t,e,l),e.then(t,t))}function xy(t,e,l){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,jt===t&&(ut&l)===l&&(Bt===4||Bt===3&&(ut&62914560)===ut&&300>ce()-Hi?(gt&2)===0&&Da(t,0):Pu|=l,ja===ut&&(ja=0)),Le(t)}function cd(t,e){e===0&&(e=lc()),t=Bl(t,e),t!==null&&(Fa(t,e),Le(t))}function _y(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),cd(t,l)}function zy(t,e){var l=0;switch(t.tag){case 31:case 13:var a=t.stateNode,n=t.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(e),cd(t,l)}function Ty(t,e){return bs(t,e)}var Zi=null,Oa=null,uo=!1,Qi=!1,oo=!1,_l=0;function Le(t){t!==Oa&&t.next===null&&(Oa===null?Zi=Oa=t:Oa=Oa.next=t),Qi=!0,uo||(uo=!0,My())}function Cn(t,e){if(!oo&&Qi){oo=!0;do for(var l=!1,a=Zi;a!==null;){if(t!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var u=a.suspendedLanes,f=a.pingedLanes;i=(1<<31-re(42|t)+1)-1,i&=n&~(u&~f),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,hd(a,i))}else i=ut,i=Jn(a,a===jt?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Ja(a,i)||(l=!0,hd(a,i));a=a.next}while(l);oo=!1}}function Ey(){fd()}function fd(){Qi=uo=!1;var t=0;_l!==0&&Hy()&&(t=_l);for(var e=ce(),l=null,a=Zi;a!==null;){var n=a.next,i=rd(a,e);i===0?(a.next=null,l===null?Zi=n:l.next=n,n===null&&(Oa=l)):(l=a,(t!==0||(i&3)!==0)&&(Qi=!0)),a=n}Gt!==0&&Gt!==5||Cn(t),_l!==0&&(_l=0)}function rd(t,e){for(var l=t.suspendedLanes,a=t.pingedLanes,n=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var u=31-re(i),f=1<<u,y=n[u];y===-1?((f&l)===0||(f&a)!==0)&&(n[u]=Ih(f,e)):y<=e&&(t.expiredLanes|=f),i&=~f}if(e=jt,l=ut,l=Jn(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),a=t.callbackNode,l===0||t===e&&(St===2||St===9)||t.cancelPendingCommit!==null)return a!==null&&a!==null&&Ss(a),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Ja(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(a!==null&&Ss(a),zs(l)){case 2:case 8:l=tc;break;case 32:l=Qn;break;case 268435456:l=ec;break;default:l=Qn}return a=dd.bind(null,t),l=bs(l,a),t.callbackPriority=e,t.callbackNode=l,e}return a!==null&&a!==null&&Ss(a),t.callbackPriority=2,t.callbackNode=null,2}function dd(t,e){if(Gt!==0&&Gt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Xi()&&t.callbackNode!==l)return null;var a=ut;return a=Jn(t,t===jt?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),a===0?null:(kr(t,a,e),rd(t,ce()),t.callbackNode!=null&&t.callbackNode===l?dd.bind(null,t):null)}function hd(t,e){if(Xi())return null;kr(t,e,!0)}function My(){Ly(function(){(gt&6)!==0?bs(Po,Ey):fd()})}function co(){if(_l===0){var t=pa;t===0&&(t=Vn,Vn<<=1,(Vn&261888)===0&&(Vn=256)),_l=t}return _l}function md(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:In(""+t)}function yd(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function jy(t,e,l,a,n){if(e==="submit"&&l&&l.stateNode===n){var i=md((n[ee]||null).action),u=a.submitter;u&&(e=(e=u[ee]||null)?md(e.formAction):u.getAttribute("formAction"),e!==null&&(i=e,u=null));var f=new li("action","action",null,a,n);t.push({event:f,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(_l!==0){var y=u?yd(n,u):new FormData(n);Du(l,{pending:!0,data:y,method:n.method,action:i},null,y)}}else typeof i=="function"&&(f.preventDefault(),y=u?yd(n,u):new FormData(n),Du(l,{pending:!0,data:y,method:n.method,action:i},i,y))},currentTarget:n}]})}}for(var fo=0;fo<Ks.length;fo++){var ro=Ks[fo],Ay=ro.toLowerCase(),Dy=ro[0].toUpperCase()+ro.slice(1);Oe(Ay,"on"+Dy)}Oe(Vc,"onAnimationEnd"),Oe(Kc,"onAnimationIteration"),Oe(kc,"onAnimationStart"),Oe("dblclick","onDoubleClick"),Oe("focusin","onFocus"),Oe("focusout","onBlur"),Oe(Vm,"onTransitionRun"),Oe(Km,"onTransitionStart"),Oe(km,"onTransitionCancel"),Oe(Jc,"onTransitionEnd"),la("onMouseEnter",["mouseout","mouseover"]),la("onMouseLeave",["mouseout","mouseover"]),la("onPointerEnter",["pointerout","pointerover"]),la("onPointerLeave",["pointerout","pointerover"]),Cl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Cl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Cl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Cl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Cl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Cl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var On="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(" "),Cy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(On));function pd(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var a=t[l],n=a.event;a=a.listeners;t:{var i=void 0;if(e)for(var u=a.length-1;0<=u;u--){var f=a[u],y=f.instance,S=f.currentTarget;if(f=f.listener,y!==i&&n.isPropagationStopped())break t;i=f,n.currentTarget=S;try{i(n)}catch(j){ii(j)}n.currentTarget=null,i=y}else for(u=0;u<a.length;u++){if(f=a[u],y=f.instance,S=f.currentTarget,f=f.listener,y!==i&&n.isPropagationStopped())break t;i=f,n.currentTarget=S;try{i(n)}catch(j){ii(j)}n.currentTarget=null,i=y}}}}function st(t,e){var l=e[Ts];l===void 0&&(l=e[Ts]=new Set);var a=t+"__bubble";l.has(a)||(gd(e,t,2,!1),l.add(a))}function ho(t,e,l){var a=0;e&&(a|=4),gd(l,t,a,e)}var Vi="_reactListening"+Math.random().toString(36).slice(2);function mo(t){if(!t[Vi]){t[Vi]=!0,cc.forEach(function(l){l!=="selectionchange"&&(Cy.has(l)||ho(l,!1,t),ho(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Vi]||(e[Vi]=!0,ho("selectionchange",!1,e))}}function gd(t,e,l,a){switch(Kd(e)){case 2:var n=n0;break;case 8:n=i0;break;default:n=Do}l=n.bind(null,e,l,t),n=void 0,!Us||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(n=!0),a?n!==void 0?t.addEventListener(e,l,{capture:!0,passive:n}):t.addEventListener(e,l,!0):n!==void 0?t.addEventListener(e,l,{passive:n}):t.addEventListener(e,l,!1)}function yo(t,e,l,a,n){var i=a;if((e&1)===0&&(e&2)===0&&a!==null)t:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var f=a.stateNode.containerInfo;if(f===n)break;if(u===4)for(u=a.return;u!==null;){var y=u.tag;if((y===3||y===4)&&u.stateNode.containerInfo===n)return;u=u.return}for(;f!==null;){if(u=Pl(f),u===null)return;if(y=u.tag,y===5||y===6||y===26||y===27){a=i=u;continue t}f=f.parentNode}}a=a.return}xc(function(){var S=i,j=Os(l),D=[];t:{var _=Fc.get(t);if(_!==void 0){var T=li,X=t;switch(t){case"keypress":if(ti(l)===0)break t;case"keydown":case"keyup":T=zm;break;case"focusin":X="focus",T=ws;break;case"focusout":X="blur",T=ws;break;case"beforeblur":case"afterblur":T=ws;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":T=Tc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":T=rm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":T=Mm;break;case Vc:case Kc:case kc:T=mm;break;case Jc:T=Am;break;case"scroll":case"scrollend":T=cm;break;case"wheel":T=Cm;break;case"copy":case"cut":case"paste":T=pm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":T=Mc;break;case"toggle":case"beforetoggle":T=Rm}var P=(e&4)!==0,Et=!P&&(t==="scroll"||t==="scrollend"),g=P?_!==null?_+"Capture":null:_;P=[];for(var p=S,v;p!==null;){var A=p;if(v=A.stateNode,A=A.tag,A!==5&&A!==26&&A!==27||v===null||g===null||(A=Ia(p,g),A!=null&&P.push(Rn(p,A,v))),Et)break;p=p.return}0<P.length&&(_=new T(_,X,null,l,j),D.push({event:_,listeners:P}))}}if((e&7)===0){t:{if(_=t==="mouseover"||t==="pointerover",T=t==="mouseout"||t==="pointerout",_&&l!==Cs&&(X=l.relatedTarget||l.fromElement)&&(Pl(X)||X[Il]))break t;if((T||_)&&(_=j.window===j?j:(_=j.ownerDocument)?_.defaultView||_.parentWindow:window,T?(X=l.relatedTarget||l.toElement,T=S,X=X?Pl(X):null,X!==null&&(Et=h(X),P=X.tag,X!==Et||P!==5&&P!==27&&P!==6)&&(X=null)):(T=null,X=S),T!==X)){if(P=Tc,A="onMouseLeave",g="onMouseEnter",p="mouse",(t==="pointerout"||t==="pointerover")&&(P=Mc,A="onPointerLeave",g="onPointerEnter",p="pointer"),Et=T==null?_:$a(T),v=X==null?_:$a(X),_=new P(A,p+"leave",T,l,j),_.target=Et,_.relatedTarget=v,A=null,Pl(j)===S&&(P=new P(g,p+"enter",X,l,j),P.target=v,P.relatedTarget=Et,A=P),Et=A,T&&X)e:{for(P=Oy,g=T,p=X,v=0,A=g;A;A=P(A))v++;A=0;for(var J=p;J;J=P(J))A++;for(;0<v-A;)g=P(g),v--;for(;0<A-v;)p=P(p),A--;for(;v--;){if(g===p||p!==null&&g===p.alternate){P=g;break e}g=P(g),p=P(p)}P=null}else P=null;T!==null&&vd(D,_,T,P,!1),X!==null&&Et!==null&&vd(D,Et,X,P,!0)}}t:{if(_=S?$a(S):window,T=_.nodeName&&_.nodeName.toLowerCase(),T==="select"||T==="input"&&_.type==="file")var yt=Bc;else if(Rc(_))if(Nc)yt=Xm;else{yt=qm;var V=Ym}else T=_.nodeName,!T||T.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?S&&Ds(S.elementType)&&(yt=Bc):yt=Gm;if(yt&&(yt=yt(t,S))){Uc(D,yt,l,j);break t}V&&V(t,_,S),t==="focusout"&&S&&_.type==="number"&&S.memoizedProps.value!=null&&As(_,"number",_.value)}switch(V=S?$a(S):window,t){case"focusin":(Rc(V)||V.contentEditable==="true")&&(oa=V,Zs=S,un=null);break;case"focusout":un=Zs=oa=null;break;case"mousedown":Qs=!0;break;case"contextmenu":case"mouseup":case"dragend":Qs=!1,Zc(D,l,j);break;case"selectionchange":if(Qm)break;case"keydown":case"keyup":Zc(D,l,j)}var lt;if(Ys)t:{switch(t){case"compositionstart":var ot="onCompositionStart";break t;case"compositionend":ot="onCompositionEnd";break t;case"compositionupdate":ot="onCompositionUpdate";break t}ot=void 0}else ua?Cc(t,l)&&(ot="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(ot="onCompositionStart");ot&&(jc&&l.locale!=="ko"&&(ua||ot!=="onCompositionStart"?ot==="onCompositionEnd"&&ua&&(lt=_c()):(sl=j,Bs="value"in sl?sl.value:sl.textContent,ua=!0)),V=Ki(S,ot),0<V.length&&(ot=new Ec(ot,t,null,l,j),D.push({event:ot,listeners:V}),lt?ot.data=lt:(lt=Oc(l),lt!==null&&(ot.data=lt)))),(lt=Bm?Nm(t,l):Hm(t,l))&&(ot=Ki(S,"onBeforeInput"),0<ot.length&&(V=new Ec("onBeforeInput","beforeinput",null,l,j),D.push({event:V,listeners:ot}),V.data=lt)),jy(D,t,S,l,j)}pd(D,e)})}function Rn(t,e,l){return{instance:t,listener:e,currentTarget:l}}function Ki(t,e){for(var l=e+"Capture",a=[];t!==null;){var n=t,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=Ia(t,l),n!=null&&a.unshift(Rn(t,n,i)),n=Ia(t,e),n!=null&&a.push(Rn(t,n,i))),t.tag===3)return a;t=t.return}return[]}function Oy(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function vd(t,e,l,a,n){for(var i=e._reactName,u=[];l!==null&&l!==a;){var f=l,y=f.alternate,S=f.stateNode;if(f=f.tag,y!==null&&y===a)break;f!==5&&f!==26&&f!==27||S===null||(y=S,n?(S=Ia(l,i),S!=null&&u.unshift(Rn(l,S,y))):n||(S=Ia(l,i),S!=null&&u.push(Rn(l,S,y)))),l=l.return}u.length!==0&&t.push({event:e,listeners:u})}var Ry=/\r\n?/g,Uy=/\u0000|\uFFFD/g;function bd(t){return(typeof t=="string"?t:""+t).replace(Ry,`
|
|
33
|
+
`).replace(Uy,"")}function Sd(t,e){return e=bd(e),bd(t)===e}function Tt(t,e,l,a,n,i){switch(l){case"children":typeof a=="string"?e==="body"||e==="textarea"&&a===""||na(t,a):(typeof a=="number"||typeof a=="bigint")&&e!=="body"&&na(t,""+a);break;case"className":Wn(t,"class",a);break;case"tabIndex":Wn(t,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Wn(t,l,a);break;case"style":bc(t,a,i);break;case"data":if(e!=="object"){Wn(t,"data",a);break}case"src":case"href":if(a===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(l);break}a=In(""+a),t.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(e!=="input"&&Tt(t,e,"name",n.name,n,null),Tt(t,e,"formEncType",n.formEncType,n,null),Tt(t,e,"formMethod",n.formMethod,n,null),Tt(t,e,"formTarget",n.formTarget,n,null)):(Tt(t,e,"encType",n.encType,n,null),Tt(t,e,"method",n.method,n,null),Tt(t,e,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){t.removeAttribute(l);break}a=In(""+a),t.setAttribute(l,a);break;case"onClick":a!=null&&(t.onclick=Ge);break;case"onScroll":a!=null&&st("scroll",t);break;case"onScrollEnd":a!=null&&st("scrollend",t);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));t.innerHTML=l}}break;case"multiple":t.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":t.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){t.removeAttribute("xlink:href");break}l=In(""+a),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,""+a):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":a===!0?t.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?t.setAttribute(l,a):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?t.setAttribute(l,a):t.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?t.removeAttribute(l):t.setAttribute(l,a);break;case"popover":st("beforetoggle",t),st("toggle",t),Fn(t,"popover",a);break;case"xlinkActuate":qe(t,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":qe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":qe(t,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":qe(t,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":qe(t,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":qe(t,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":qe(t,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":qe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":qe(t,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Fn(t,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=um.get(l)||l,Fn(t,l,a))}}function po(t,e,l,a,n,i){switch(l){case"style":bc(t,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));t.innerHTML=l}}break;case"children":typeof a=="string"?na(t,a):(typeof a=="number"||typeof a=="bigint")&&na(t,""+a);break;case"onScroll":a!=null&&st("scroll",t);break;case"onScrollEnd":a!=null&&st("scrollend",t);break;case"onClick":a!=null&&(t.onclick=Ge);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fc.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),e=l.slice(2,n?l.length-7:void 0),i=t[ee]||null,i=i!=null?i[l]:null,typeof i=="function"&&t.removeEventListener(e,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,a,n);break t}l in t?t[l]=a:a===!0?t.setAttribute(l,""):Fn(t,l,a)}}}function Ft(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":st("error",t),st("load",t);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:Tt(t,e,i,u,l,null)}}n&&Tt(t,e,"srcSet",l.srcSet,l,null),a&&Tt(t,e,"src",l.src,l,null);return;case"input":st("invalid",t);var f=i=u=n=null,y=null,S=null;for(a in l)if(l.hasOwnProperty(a)){var j=l[a];if(j!=null)switch(a){case"name":n=j;break;case"type":u=j;break;case"checked":y=j;break;case"defaultChecked":S=j;break;case"value":i=j;break;case"defaultValue":f=j;break;case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(137,e));break;default:Tt(t,e,a,j,l,null)}}yc(t,i,f,y,S,u,n,!1);return;case"select":st("invalid",t),a=u=i=null;for(n in l)if(l.hasOwnProperty(n)&&(f=l[n],f!=null))switch(n){case"value":i=f;break;case"defaultValue":u=f;break;case"multiple":a=f;default:Tt(t,e,n,f,l,null)}e=i,l=u,t.multiple=!!a,e!=null?aa(t,!!a,e,!1):l!=null&&aa(t,!!a,l,!0);return;case"textarea":st("invalid",t),i=n=a=null;for(u in l)if(l.hasOwnProperty(u)&&(f=l[u],f!=null))switch(u){case"value":a=f;break;case"defaultValue":n=f;break;case"children":i=f;break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:Tt(t,e,u,f,l,null)}gc(t,a,n,i);return;case"option":for(y in l)if(l.hasOwnProperty(y)&&(a=l[y],a!=null))switch(y){case"selected":t.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Tt(t,e,y,a,l,null)}return;case"dialog":st("beforetoggle",t),st("toggle",t),st("cancel",t),st("close",t);break;case"iframe":case"object":st("load",t);break;case"video":case"audio":for(a=0;a<On.length;a++)st(On[a],t);break;case"image":st("error",t),st("load",t);break;case"details":st("toggle",t);break;case"embed":case"source":case"link":st("error",t),st("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(S in l)if(l.hasOwnProperty(S)&&(a=l[S],a!=null))switch(S){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:Tt(t,e,S,a,l,null)}return;default:if(Ds(e)){for(j in l)l.hasOwnProperty(j)&&(a=l[j],a!==void 0&&po(t,e,j,a,l,void 0));return}}for(f in l)l.hasOwnProperty(f)&&(a=l[f],a!=null&&Tt(t,e,f,a,l,null))}function By(t,e,l,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,u=null,f=null,y=null,S=null,j=null;for(T in l){var D=l[T];if(l.hasOwnProperty(T)&&D!=null)switch(T){case"checked":break;case"value":break;case"defaultValue":y=D;default:a.hasOwnProperty(T)||Tt(t,e,T,null,a,D)}}for(var _ in a){var T=a[_];if(D=l[_],a.hasOwnProperty(_)&&(T!=null||D!=null))switch(_){case"type":i=T;break;case"name":n=T;break;case"checked":S=T;break;case"defaultChecked":j=T;break;case"value":u=T;break;case"defaultValue":f=T;break;case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(137,e));break;default:T!==D&&Tt(t,e,_,T,a,D)}}js(t,u,f,y,S,j,i,n);return;case"select":T=u=f=_=null;for(i in l)if(y=l[i],l.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":T=y;default:a.hasOwnProperty(i)||Tt(t,e,i,null,a,y)}for(n in a)if(i=a[n],y=l[n],a.hasOwnProperty(n)&&(i!=null||y!=null))switch(n){case"value":_=i;break;case"defaultValue":f=i;break;case"multiple":u=i;default:i!==y&&Tt(t,e,n,i,a,y)}e=f,l=u,a=T,_!=null?aa(t,!!l,_,!1):!!a!=!!l&&(e!=null?aa(t,!!l,e,!0):aa(t,!!l,l?[]:"",!1));return;case"textarea":T=_=null;for(f in l)if(n=l[f],l.hasOwnProperty(f)&&n!=null&&!a.hasOwnProperty(f))switch(f){case"value":break;case"children":break;default:Tt(t,e,f,null,a,n)}for(u in a)if(n=a[u],i=l[u],a.hasOwnProperty(u)&&(n!=null||i!=null))switch(u){case"value":_=n;break;case"defaultValue":T=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(o(91));break;default:n!==i&&Tt(t,e,u,n,a,i)}pc(t,_,T);return;case"option":for(var X in l)if(_=l[X],l.hasOwnProperty(X)&&_!=null&&!a.hasOwnProperty(X))switch(X){case"selected":t.selected=!1;break;default:Tt(t,e,X,null,a,_)}for(y in a)if(_=a[y],T=l[y],a.hasOwnProperty(y)&&_!==T&&(_!=null||T!=null))switch(y){case"selected":t.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Tt(t,e,y,_,a,T)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var P in l)_=l[P],l.hasOwnProperty(P)&&_!=null&&!a.hasOwnProperty(P)&&Tt(t,e,P,null,a,_);for(S in a)if(_=a[S],T=l[S],a.hasOwnProperty(S)&&_!==T&&(_!=null||T!=null))switch(S){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(137,e));break;default:Tt(t,e,S,_,a,T)}return;default:if(Ds(e)){for(var Et in l)_=l[Et],l.hasOwnProperty(Et)&&_!==void 0&&!a.hasOwnProperty(Et)&&po(t,e,Et,void 0,a,_);for(j in a)_=a[j],T=l[j],!a.hasOwnProperty(j)||_===T||_===void 0&&T===void 0||po(t,e,j,_,a,T);return}}for(var g in l)_=l[g],l.hasOwnProperty(g)&&_!=null&&!a.hasOwnProperty(g)&&Tt(t,e,g,null,a,_);for(D in a)_=a[D],T=l[D],!a.hasOwnProperty(D)||_===T||_==null&&T==null||Tt(t,e,D,_,a,T)}function xd(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ny(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,u=n.initiatorType,f=n.duration;if(i&&f&&xd(u)){for(u=0,f=n.responseEnd,a+=1;a<l.length;a++){var y=l[a],S=y.startTime;if(S>f)break;var j=y.transferSize,D=y.initiatorType;j&&xd(D)&&(y=y.responseEnd,u+=j*(y<f?1:(f-S)/(y-S)))}if(--a,e+=8*(i+u)/(n.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var go=null,vo=null;function ki(t){return t.nodeType===9?t:t.ownerDocument}function _d(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zd(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function bo(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var So=null;function Hy(){var t=window.event;return t&&t.type==="popstate"?t===So?!1:(So=t,!0):(So=null,!1)}var Td=typeof setTimeout=="function"?setTimeout:void 0,wy=typeof clearTimeout=="function"?clearTimeout:void 0,Ed=typeof Promise=="function"?Promise:void 0,Ly=typeof queueMicrotask=="function"?queueMicrotask:typeof Ed<"u"?function(t){return Ed.resolve(null).then(t).catch(Yy)}:Td;function Yy(t){setTimeout(function(){throw t})}function zl(t){return t==="head"}function Md(t,e){var l=e,a=0;do{var n=l.nextSibling;if(t.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){t.removeChild(n),Na(e);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Un(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Un(l);for(var i=l.firstChild;i;){var u=i.nextSibling,f=i.nodeName;i[Wa]||f==="SCRIPT"||f==="STYLE"||f==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&Un(t.ownerDocument.body);l=n}while(l);Na(e)}function jd(t,e){var l=t;t=0;do{var a=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=a}while(l)}function xo(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":xo(l),Es(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function qy(t,e,l,a){for(;t.nodeType===1;){var n=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!a&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(a){if(!t[Wa])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==n.rel||t.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||t.getAttribute("title")!==(n.title==null?null:n.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(n.src==null?null:n.src)||t.getAttribute("type")!==(n.type==null?null:n.type)||t.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=Ae(t.nextSibling),t===null)break}return null}function Gy(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Ae(t.nextSibling),t===null))return null;return t}function Ad(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Ae(t.nextSibling),t===null))return null;return t}function _o(t){return t.data==="$?"||t.data==="$~"}function zo(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Xy(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var a=function(){e(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),t._reactRetry=a}}function Ae(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var To=null;function Dd(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Ae(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function Cd(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function Od(t,e,l){switch(e=ki(l),t){case"html":if(t=e.documentElement,!t)throw Error(o(452));return t;case"head":if(t=e.head,!t)throw Error(o(453));return t;case"body":if(t=e.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function Un(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Es(t)}var De=new Map,Rd=new Set;function Ji(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var al=L.d;L.d={f:Zy,r:Qy,D:Vy,C:Ky,L:ky,m:Jy,X:Wy,S:Fy,M:$y};function Zy(){var t=al.f(),e=Yi();return t||e}function Qy(t){var e=ta(t);e!==null&&e.tag===5&&e.type==="form"?Ff(e):al.r(t)}var Ra=typeof document>"u"?null:document;function Ud(t,e,l){var a=Ra;if(a&&typeof e=="string"&&e){var n=xe(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Rd.has(n)||(Rd.add(n),t={rel:t,crossOrigin:l,href:e},a.querySelector(n)===null&&(e=a.createElement("link"),Ft(e,"link",t),Zt(e),a.head.appendChild(e)))}}function Vy(t){al.D(t),Ud("dns-prefetch",t,null)}function Ky(t,e){al.C(t,e),Ud("preconnect",t,e)}function ky(t,e,l){al.L(t,e,l);var a=Ra;if(a&&t&&e){var n='link[rel="preload"][as="'+xe(e)+'"]';e==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+xe(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+xe(l.imageSizes)+'"]')):n+='[href="'+xe(t)+'"]';var i=n;switch(e){case"style":i=Ua(t);break;case"script":i=Ba(t)}De.has(i)||(t=E({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),De.set(i,t),a.querySelector(n)!==null||e==="style"&&a.querySelector(Bn(i))||e==="script"&&a.querySelector(Nn(i))||(e=a.createElement("link"),Ft(e,"link",t),Zt(e),a.head.appendChild(e)))}}function Jy(t,e){al.m(t,e);var l=Ra;if(l&&t){var a=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+xe(a)+'"][href="'+xe(t)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ba(t)}if(!De.has(i)&&(t=E({rel:"modulepreload",href:t},e),De.set(i,t),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Nn(i)))return}a=l.createElement("link"),Ft(a,"link",t),Zt(a),l.head.appendChild(a)}}}function Fy(t,e,l){al.S(t,e,l);var a=Ra;if(a&&t){var n=ea(a).hoistableStyles,i=Ua(t);e=e||"default";var u=n.get(i);if(!u){var f={loading:0,preload:null};if(u=a.querySelector(Bn(i)))f.loading=5;else{t=E({rel:"stylesheet",href:t,"data-precedence":e},l),(l=De.get(i))&&Eo(t,l);var y=u=a.createElement("link");Zt(y),Ft(y,"link",t),y._p=new Promise(function(S,j){y.onload=S,y.onerror=j}),y.addEventListener("load",function(){f.loading|=1}),y.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Fi(u,e,a)}u={type:"stylesheet",instance:u,count:1,state:f},n.set(i,u)}}}function Wy(t,e){al.X(t,e);var l=Ra;if(l&&t){var a=ea(l).hoistableScripts,n=Ba(t),i=a.get(n);i||(i=l.querySelector(Nn(n)),i||(t=E({src:t,async:!0},e),(e=De.get(n))&&Mo(t,e),i=l.createElement("script"),Zt(i),Ft(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function $y(t,e){al.M(t,e);var l=Ra;if(l&&t){var a=ea(l).hoistableScripts,n=Ba(t),i=a.get(n);i||(i=l.querySelector(Nn(n)),i||(t=E({src:t,async:!0,type:"module"},e),(e=De.get(n))&&Mo(t,e),i=l.createElement("script"),Zt(i),Ft(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Bd(t,e,l,a){var n=(n=te.current)?Ji(n):null;if(!n)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=Ua(l.href),l=ea(n).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Ua(l.href);var i=ea(n).hoistableStyles,u=i.get(t);if(u||(n=n.ownerDocument||n,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,u),(i=n.querySelector(Bn(t)))&&!i._p&&(u.instance=i,u.state.loading=5),De.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},De.set(t,l),i||Iy(n,t,l,u.state))),e&&a===null)throw Error(o(528,""));return u}if(e&&a!==null)throw Error(o(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Ba(l),l=ea(n).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function Ua(t){return'href="'+xe(t)+'"'}function Bn(t){return'link[rel="stylesheet"]['+t+"]"}function Nd(t){return E({},t,{"data-precedence":t.precedence,precedence:null})}function Iy(t,e,l,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),Ft(e,"link",l),Zt(e),t.head.appendChild(e))}function Ba(t){return'[src="'+xe(t)+'"]'}function Nn(t){return"script[async]"+t}function Hd(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+xe(l.href)+'"]');if(a)return e.instance=a,Zt(a),a;var n=E({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),Zt(a),Ft(a,"style",n),Fi(a,l.precedence,t),e.instance=a;case"stylesheet":n=Ua(l.href);var i=t.querySelector(Bn(n));if(i)return e.state.loading|=4,e.instance=i,Zt(i),i;a=Nd(l),(n=De.get(n))&&Eo(a,n),i=(t.ownerDocument||t).createElement("link"),Zt(i);var u=i;return u._p=new Promise(function(f,y){u.onload=f,u.onerror=y}),Ft(i,"link",a),e.state.loading|=4,Fi(i,l.precedence,t),e.instance=i;case"script":return i=Ba(l.src),(n=t.querySelector(Nn(i)))?(e.instance=n,Zt(n),n):(a=l,(n=De.get(i))&&(a=E({},l),Mo(a,n)),t=t.ownerDocument||t,n=t.createElement("script"),Zt(n),Ft(n,"link",a),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,Fi(a,l.precedence,t));return e.instance}function Fi(t,e,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,u=0;u<a.length;u++){var f=a[u];if(f.dataset.precedence===e)i=f;else if(i!==n)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function Eo(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Mo(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Wi=null;function wd(t,e,l){if(Wi===null){var a=new Map,n=Wi=new Map;n.set(l,a)}else n=Wi,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(t))return a;for(a.set(t,null),l=l.getElementsByTagName(t),n=0;n<l.length;n++){var i=l[n];if(!(i[Wa]||i[Vt]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(e)||"";u=t+u;var f=a.get(u);f?f.push(i):a.set(u,[i])}}return a}function Ld(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function Py(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Yd(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function t0(t,e,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Ua(a.href),i=e.querySelector(Bn(n));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=$i.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=i,Zt(i);return}i=e.ownerDocument||e,a=Nd(a),(n=De.get(n))&&Eo(a,n),i=i.createElement("link"),Zt(i);var u=i;u._p=new Promise(function(f,y){u.onload=f,u.onerror=y}),Ft(i,"link",a),l.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=$i.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var jo=0;function e0(t,e){return t.stylesheets&&t.count===0&&Pi(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var a=setTimeout(function(){if(t.stylesheets&&Pi(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&jo===0&&(jo=62500*Ny());var n=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Pi(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>jo?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function $i(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pi(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ii=null;function Pi(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ii=new Map,e.forEach(l0,t),Ii=null,$i.call(t))}function l0(t,e){if(!(e.state.loading&4)){var l=Ii.get(t);if(l)var a=l.get(null);else{l=new Map,Ii.set(t,l);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var u=n[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),a=u)}a&&l.set(null,a)}n=e.instance,u=n.getAttribute("data-precedence"),i=l.get(u)||a,i===a&&l.set(null,n),l.set(u,n),this.count++,a=$i.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(n,t.firstChild)),e.state.loading|=4}}var Hn={$$typeof:q,Provider:null,Consumer:null,_currentValue:tt,_currentValue2:tt,_threadCount:0};function a0(t,e,l,a,n,i,u,f,y){this.tag=1,this.containerInfo=t,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=xs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xs(0),this.hiddenUpdates=xs(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function qd(t,e,l,a,n,i,u,f,y,S,j,D){return t=new a0(t,e,l,u,y,S,j,D,f),e=1,i===!0&&(e|=24),i=he(3,null,null,e),t.current=i,i.stateNode=t,e=iu(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:e},cu(i),t}function Gd(t){return t?(t=ra,t):ra}function Xd(t,e,l,a,n,i){n=Gd(n),a.context===null?a.context=n:a.pendingContext=n,a=dl(e),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=hl(t,a,e),l!==null&&(ue(l,t,e),mn(l,t,e))}function Zd(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function Ao(t,e){Zd(t,e),(t=t.alternate)&&Zd(t,e)}function Qd(t){if(t.tag===13||t.tag===31){var e=Bl(t,67108864);e!==null&&ue(e,t,67108864),Ao(t,67108864)}}function Vd(t){if(t.tag===13||t.tag===31){var e=ve();e=_s(e);var l=Bl(t,e);l!==null&&ue(l,t,e),Ao(t,e)}}var ts=!0;function n0(t,e,l,a){var n=M.T;M.T=null;var i=L.p;try{L.p=2,Do(t,e,l,a)}finally{L.p=i,M.T=n}}function i0(t,e,l,a){var n=M.T;M.T=null;var i=L.p;try{L.p=8,Do(t,e,l,a)}finally{L.p=i,M.T=n}}function Do(t,e,l,a){if(ts){var n=Co(a);if(n===null)yo(t,e,a,es,l),kd(t,a);else if(u0(n,t,e,l,a))a.stopPropagation();else if(kd(t,a),e&4&&-1<s0.indexOf(t)){for(;n!==null;){var i=ta(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=Dl(i.pendingLanes);if(u!==0){var f=i;for(f.pendingLanes|=2,f.entangledLanes|=2;u;){var y=1<<31-re(u);f.entanglements[1]|=y,u&=~y}Le(i),(gt&6)===0&&(wi=ce()+500,Cn(0))}}break;case 31:case 13:f=Bl(i,2),f!==null&&ue(f,i,2),Yi(),Ao(i,2)}if(i=Co(a),i===null&&yo(t,e,a,es,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else yo(t,e,a,null,l)}}function Co(t){return t=Os(t),Oo(t)}var es=null;function Oo(t){if(es=null,t=Pl(t),t!==null){var e=h(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=x(e),t!==null)return t;t=null}else if(l===31){if(t=z(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return es=t,null}function Kd(t){switch(t){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(Vh()){case Po:return 2;case tc:return 8;case Qn:case Kh:return 32;case ec:return 268435456;default:return 32}default:return 32}}var Ro=!1,Tl=null,El=null,Ml=null,wn=new Map,Ln=new Map,jl=[],s0="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 kd(t,e){switch(t){case"focusin":case"focusout":Tl=null;break;case"dragenter":case"dragleave":El=null;break;case"mouseover":case"mouseout":Ml=null;break;case"pointerover":case"pointerout":wn.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ln.delete(e.pointerId)}}function Yn(t,e,l,a,n,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},e!==null&&(e=ta(e),e!==null&&Qd(e)),t):(t.eventSystemFlags|=a,e=t.targetContainers,n!==null&&e.indexOf(n)===-1&&e.push(n),t)}function u0(t,e,l,a,n){switch(e){case"focusin":return Tl=Yn(Tl,t,e,l,a,n),!0;case"dragenter":return El=Yn(El,t,e,l,a,n),!0;case"mouseover":return Ml=Yn(Ml,t,e,l,a,n),!0;case"pointerover":var i=n.pointerId;return wn.set(i,Yn(wn.get(i)||null,t,e,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,Ln.set(i,Yn(Ln.get(i)||null,t,e,l,a,n)),!0}return!1}function Jd(t){var e=Pl(t.target);if(e!==null){var l=h(e);if(l!==null){if(e=l.tag,e===13){if(e=x(l),e!==null){t.blockedOn=e,uc(t.priority,function(){Vd(l)});return}}else if(e===31){if(e=z(l),e!==null){t.blockedOn=e,uc(t.priority,function(){Vd(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ls(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=Co(t.nativeEvent);if(l===null){l=t.nativeEvent;var a=new l.constructor(l.type,l);Cs=a,l.target.dispatchEvent(a),Cs=null}else return e=ta(l),e!==null&&Qd(e),t.blockedOn=l,!1;e.shift()}return!0}function Fd(t,e,l){ls(t)&&l.delete(e)}function o0(){Ro=!1,Tl!==null&&ls(Tl)&&(Tl=null),El!==null&&ls(El)&&(El=null),Ml!==null&&ls(Ml)&&(Ml=null),wn.forEach(Fd),Ln.forEach(Fd)}function as(t,e){t.blockedOn===e&&(t.blockedOn=null,Ro||(Ro=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,o0)))}var ns=null;function Wd(t){ns!==t&&(ns=t,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){ns===t&&(ns=null);for(var e=0;e<t.length;e+=3){var l=t[e],a=t[e+1],n=t[e+2];if(typeof a!="function"){if(Oo(a||l)===null)continue;break}var i=ta(l);i!==null&&(t.splice(e,3),e-=3,Du(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function Na(t){function e(y){return as(y,t)}Tl!==null&&as(Tl,t),El!==null&&as(El,t),Ml!==null&&as(Ml,t),wn.forEach(e),Ln.forEach(e);for(var l=0;l<jl.length;l++){var a=jl[l];a.blockedOn===t&&(a.blockedOn=null)}for(;0<jl.length&&(l=jl[0],l.blockedOn===null);)Jd(l),l.blockedOn===null&&jl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],u=n[ee]||null;if(typeof i=="function")u||Wd(l);else if(u){var f=null;if(i&&i.hasAttribute("formAction")){if(n=i,u=i[ee]||null)f=u.formAction;else if(Oo(n)!==null)continue}else f=u.action;typeof f=="function"?l[a+1]=f:(l.splice(a,3),a-=3),Wd(l)}}}function $d(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return n=u})},focusReset:"manual",scroll:"manual"})}function e(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),n!==null&&(n(),n=null)}}}function Uo(t){this._internalRoot=t}is.prototype.render=Uo.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(o(409));var l=e.current,a=ve();Xd(l,a,t,e,null,null)},is.prototype.unmount=Uo.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Xd(t.current,2,null,t,null,null),Yi(),e[Il]=null}};function is(t){this._internalRoot=t}is.prototype.unstable_scheduleHydration=function(t){if(t){var e=sc();t={blockedOn:null,target:t,priority:e};for(var l=0;l<jl.length&&e!==0&&e<jl[l].priority;l++);jl.splice(l,0,t),l===0&&Jd(t)}};var Id=s.version;if(Id!=="19.2.7")throw Error(o(527,Id,"19.2.7"));L.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=C(e),t=t!==null?B(t):null,t=t===null?null:t.stateNode,t};var c0={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ss=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ss.isDisabled&&ss.supportsFiber)try{ka=ss.inject(c0),fe=ss}catch{}}return Xn.createRoot=function(t,e){if(!m(t))throw Error(o(299));var l=!1,a="",n=ir,i=sr,u=ur;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(a=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(u=e.onRecoverableError)),e=qd(t,1,!1,null,null,l,a,null,n,i,u,$d),t[Il]=e.current,mo(t),new Uo(e)},Xn.hydrateRoot=function(t,e,l){if(!m(t))throw Error(o(299));var a=!1,n="",i=ir,u=sr,f=ur,y=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(f=l.onRecoverableError),l.formState!==void 0&&(y=l.formState)),e=qd(t,1,!0,e,l??null,a,n,y,i,u,f,$d),e.context=Gd(null),l=e.current,a=ve(),a=_s(a),n=dl(a),n.callback=null,hl(l,n,a),l=a,e.current.lanes=l,Fa(e,l),Le(e),t[Il]=e.current,mo(t),new is(e)},Xn.version="19.2.7",Xn}var rh;function F0(){if(rh)return Ho.exports;rh=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(s){console.error(s)}}return c(),Ho.exports=J0(),Ho.exports}var W0=F0(),N=Oh();const $0="";async function Fl(c){const s=await fetch(`${$0}${c}`);if(!s.ok)throw new Error(`${s.status} ${s.statusText}: ${c}`);return s.json()}function ko(c){return c instanceof Error?c.message:String(c)}function I0(){return Fl("/api/memories")}function P0(){return Fl("/api/stats")}function tp(){return Fl("/api/conflicts")}function ep(){return Fl("/api/config")}function lp(){return Fl("/api/embeddings")}function ap(){return Fl("/api/cards")}function np(c){return Fl(`/api/cards/${encodeURIComponent(c)}`)}const dh={type:"change"},Jo={type:"start"},Rh={type:"end"},us=new h0,hh=new m0,ip=Math.cos(70*y0.DEG2RAD),Xt=new Wt,oe=2*Math.PI,Mt={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Yo=1e-6;class sp extends d0{constructor(s,r=null){super(s,r),this.state=Mt.NONE,this.target=new Wt,this.cursor=new Wt,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Va.ROTATE,MIDDLE:Va.DOLLY,RIGHT:Va.PAN},this.touches={ONE:Qa.ROTATE,TWO:Qa.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._cursorStyle="auto",this._domElementKeyEvents=null,this._lastPosition=new Wt,this._lastQuaternion=new Pd,this._lastTargetPosition=new Wt,this._quat=new Pd().setFromUnitVectors(s.up,new Wt(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new th,this._sphericalDelta=new th,this._scale=1,this._panOffset=new Wt,this._rotateStart=new It,this._rotateEnd=new It,this._rotateDelta=new It,this._panStart=new It,this._panEnd=new It,this._panDelta=new It,this._dollyStart=new It,this._dollyEnd=new It,this._dollyDelta=new It,this._dollyDirection=new Wt,this._mouse=new It,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=op.bind(this),this._onPointerDown=up.bind(this),this._onPointerUp=cp.bind(this),this._onContextMenu=pp.bind(this),this._onMouseWheel=dp.bind(this),this._onKeyDown=hp.bind(this),this._onTouchStart=mp.bind(this),this._onTouchMove=yp.bind(this),this._onMouseDown=fp.bind(this),this._onMouseMove=rp.bind(this),this._interceptControlDown=gp.bind(this),this._interceptControlUp=vp.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}set cursorStyle(s){this._cursorStyle=s,s==="grab"?this.domElement.style.cursor="grab":this.domElement.style.cursor="auto"}get cursorStyle(){return this._cursorStyle}connect(s){super.connect(s),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction=""}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(s){s.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=s}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(dh),this.update(),this.state=Mt.NONE}pan(s,r){this._pan(s,r),this.update()}dollyIn(s){this._dollyIn(s),this.update()}dollyOut(s){this._dollyOut(s),this.update()}rotateLeft(s){this._rotateLeft(s),this.update()}rotateUp(s){this._rotateUp(s),this.update()}update(s=null){const r=this.object.position;Xt.copy(r).sub(this.target),Xt.applyQuaternion(this._quat),this._spherical.setFromVector3(Xt),this.autoRotate&&this.state===Mt.NONE&&this._rotateLeft(this._getAutoRotationAngle(s)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let o=this.minAzimuthAngle,m=this.maxAzimuthAngle;isFinite(o)&&isFinite(m)&&(o<-Math.PI?o+=oe:o>Math.PI&&(o-=oe),m<-Math.PI?m+=oe:m>Math.PI&&(m-=oe),o<=m?this._spherical.theta=Math.max(o,Math.min(m,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(o+m)/2?Math.max(o,this._spherical.theta):Math.min(m,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let h=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const x=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),h=x!=this._spherical.radius}if(Xt.setFromSpherical(this._spherical),Xt.applyQuaternion(this._quatInverse),r.copy(this.target).add(Xt),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let x=null;if(this.object.isPerspectiveCamera){const z=Xt.length();x=this._clampDistance(z*this._scale);const R=z-x;this.object.position.addScaledVector(this._dollyDirection,R),this.object.updateMatrixWorld(),h=!!R}else if(this.object.isOrthographicCamera){const z=new Wt(this._mouse.x,this._mouse.y,0);z.unproject(this.object);const R=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),h=R!==this.object.zoom;const C=new Wt(this._mouse.x,this._mouse.y,0);C.unproject(this.object),this.object.position.sub(C).add(z),this.object.updateMatrixWorld(),x=Xt.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;x!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(x).add(this.object.position):(us.origin.copy(this.object.position),us.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(us.direction))<ip?this.object.lookAt(this.target):(hh.setFromNormalAndCoplanarPoint(this.object.up,this.target),us.intersectPlane(hh,this.target))))}else if(this.object.isOrthographicCamera){const x=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),x!==this.object.zoom&&(this.object.updateProjectionMatrix(),h=!0)}return this._scale=1,this._performCursorZoom=!1,h||this._lastPosition.distanceToSquared(this.object.position)>Yo||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Yo||this._lastTargetPosition.distanceToSquared(this.target)>Yo?(this.dispatchEvent(dh),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(s){return s!==null?oe/60*this.autoRotateSpeed*s:oe/60/60*this.autoRotateSpeed}_getZoomScale(s){const r=Math.abs(s*.01);return Math.pow(.95,this.zoomSpeed*r)}_rotateLeft(s){this._sphericalDelta.theta-=s}_rotateUp(s){this._sphericalDelta.phi-=s}_panLeft(s,r){Xt.setFromMatrixColumn(r,0),Xt.multiplyScalar(-s),this._panOffset.add(Xt)}_panUp(s,r){this.screenSpacePanning===!0?Xt.setFromMatrixColumn(r,1):(Xt.setFromMatrixColumn(r,0),Xt.crossVectors(this.object.up,Xt)),Xt.multiplyScalar(s),this._panOffset.add(Xt)}_pan(s,r){const o=this.domElement;if(this.object.isPerspectiveCamera){const m=this.object.position;Xt.copy(m).sub(this.target);let h=Xt.length();h*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*s*h/o.clientHeight,this.object.matrix),this._panUp(2*r*h/o.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(s*(this.object.right-this.object.left)/this.object.zoom/o.clientWidth,this.object.matrix),this._panUp(r*(this.object.top-this.object.bottom)/this.object.zoom/o.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(s){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=s:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(s){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=s:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(s,r){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const o=this.domElement.getBoundingClientRect(),m=s-o.left,h=r-o.top,x=o.width,z=o.height;this._mouse.x=m/x*2-1,this._mouse.y=-(h/z)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(s){return Math.max(this.minDistance,Math.min(this.maxDistance,s))}_handleMouseDownRotate(s){this._rotateStart.set(s.clientX,s.clientY)}_handleMouseDownDolly(s){this._updateZoomParameters(s.clientX,s.clientX),this._dollyStart.set(s.clientX,s.clientY)}_handleMouseDownPan(s){this._panStart.set(s.clientX,s.clientY)}_handleMouseMoveRotate(s){this._rotateEnd.set(s.clientX,s.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const r=this.domElement;this._rotateLeft(oe*this._rotateDelta.x/r.clientHeight),this._rotateUp(oe*this._rotateDelta.y/r.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(s){this._dollyEnd.set(s.clientX,s.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(s){this._panEnd.set(s.clientX,s.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(s){this._updateZoomParameters(s.clientX,s.clientY),s.deltaY<0?this._dollyIn(this._getZoomScale(s.deltaY)):s.deltaY>0&&this._dollyOut(this._getZoomScale(s.deltaY)),this.update()}_handleKeyDown(s){let r=!1;switch(s.code){case this.keys.UP:s.ctrlKey||s.metaKey||s.shiftKey?this.enableRotate&&this._rotateUp(oe*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),r=!0;break;case this.keys.BOTTOM:s.ctrlKey||s.metaKey||s.shiftKey?this.enableRotate&&this._rotateUp(-oe*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),r=!0;break;case this.keys.LEFT:s.ctrlKey||s.metaKey||s.shiftKey?this.enableRotate&&this._rotateLeft(oe*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),r=!0;break;case this.keys.RIGHT:s.ctrlKey||s.metaKey||s.shiftKey?this.enableRotate&&this._rotateLeft(-oe*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),r=!0;break}r&&(s.preventDefault(),this.update())}_handleTouchStartRotate(s){if(this._pointers.length===1)this._rotateStart.set(s.pageX,s.pageY);else{const r=this._getSecondPointerPosition(s),o=.5*(s.pageX+r.x),m=.5*(s.pageY+r.y);this._rotateStart.set(o,m)}}_handleTouchStartPan(s){if(this._pointers.length===1)this._panStart.set(s.pageX,s.pageY);else{const r=this._getSecondPointerPosition(s),o=.5*(s.pageX+r.x),m=.5*(s.pageY+r.y);this._panStart.set(o,m)}}_handleTouchStartDolly(s){const r=this._getSecondPointerPosition(s),o=s.pageX-r.x,m=s.pageY-r.y,h=Math.sqrt(o*o+m*m);this._dollyStart.set(0,h)}_handleTouchStartDollyPan(s){this.enableZoom&&this._handleTouchStartDolly(s),this.enablePan&&this._handleTouchStartPan(s)}_handleTouchStartDollyRotate(s){this.enableZoom&&this._handleTouchStartDolly(s),this.enableRotate&&this._handleTouchStartRotate(s)}_handleTouchMoveRotate(s){if(this._pointers.length==1)this._rotateEnd.set(s.pageX,s.pageY);else{const o=this._getSecondPointerPosition(s),m=.5*(s.pageX+o.x),h=.5*(s.pageY+o.y);this._rotateEnd.set(m,h)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const r=this.domElement;this._rotateLeft(oe*this._rotateDelta.x/r.clientHeight),this._rotateUp(oe*this._rotateDelta.y/r.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(s){if(this._pointers.length===1)this._panEnd.set(s.pageX,s.pageY);else{const r=this._getSecondPointerPosition(s),o=.5*(s.pageX+r.x),m=.5*(s.pageY+r.y);this._panEnd.set(o,m)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(s){const r=this._getSecondPointerPosition(s),o=s.pageX-r.x,m=s.pageY-r.y,h=Math.sqrt(o*o+m*m);this._dollyEnd.set(0,h),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const x=(s.pageX+r.x)*.5,z=(s.pageY+r.y)*.5;this._updateZoomParameters(x,z)}_handleTouchMoveDollyPan(s){this.enableZoom&&this._handleTouchMoveDolly(s),this.enablePan&&this._handleTouchMovePan(s)}_handleTouchMoveDollyRotate(s){this.enableZoom&&this._handleTouchMoveDolly(s),this.enableRotate&&this._handleTouchMoveRotate(s)}_addPointer(s){this._pointers.push(s.pointerId)}_removePointer(s){delete this._pointerPositions[s.pointerId];for(let r=0;r<this._pointers.length;r++)if(this._pointers[r]==s.pointerId){this._pointers.splice(r,1);return}}_isTrackingPointer(s){for(let r=0;r<this._pointers.length;r++)if(this._pointers[r]==s.pointerId)return!0;return!1}_trackPointer(s){let r=this._pointerPositions[s.pointerId];r===void 0&&(r=new It,this._pointerPositions[s.pointerId]=r),r.set(s.pageX,s.pageY)}_getSecondPointerPosition(s){const r=s.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[r]}_customWheelEvent(s){const r=s.deltaMode,o={clientX:s.clientX,clientY:s.clientY,deltaY:s.deltaY};switch(r){case 1:o.deltaY*=16;break;case 2:o.deltaY*=100;break}return s.ctrlKey&&!this._controlActive&&(o.deltaY*=10),o}}function up(c){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(c.pointerId),this.domElement.ownerDocument.addEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(c)&&(this._addPointer(c),c.pointerType==="touch"?this._onTouchStart(c):this._onMouseDown(c),this._cursorStyle==="grab"&&(this.domElement.style.cursor="grabbing")))}function op(c){this.enabled!==!1&&(c.pointerType==="touch"?this._onTouchMove(c):this._onMouseMove(c))}function cp(c){switch(this._removePointer(c),this._pointers.length){case 0:this.domElement.releasePointerCapture(c.pointerId),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(Rh),this.state=Mt.NONE,this._cursorStyle==="grab"&&(this.domElement.style.cursor="grab");break;case 1:const s=this._pointers[0],r=this._pointerPositions[s];this._onTouchStart({pointerId:s,pageX:r.x,pageY:r.y});break}}function fp(c){let s;switch(c.button){case 0:s=this.mouseButtons.LEFT;break;case 1:s=this.mouseButtons.MIDDLE;break;case 2:s=this.mouseButtons.RIGHT;break;default:s=-1}switch(s){case Va.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(c),this.state=Mt.DOLLY;break;case Va.ROTATE:if(c.ctrlKey||c.metaKey||c.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(c),this.state=Mt.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(c),this.state=Mt.ROTATE}break;case Va.PAN:if(c.ctrlKey||c.metaKey||c.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(c),this.state=Mt.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(c),this.state=Mt.PAN}break;default:this.state=Mt.NONE}this.state!==Mt.NONE&&this.dispatchEvent(Jo)}function rp(c){switch(this.state){case Mt.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(c);break;case Mt.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(c);break;case Mt.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(c);break}}function dp(c){this.enabled===!1||this.enableZoom===!1||this.state!==Mt.NONE||(c.preventDefault(),this.dispatchEvent(Jo),this._handleMouseWheel(this._customWheelEvent(c)),this.dispatchEvent(Rh))}function hp(c){this.enabled!==!1&&this._handleKeyDown(c)}function mp(c){switch(this._trackPointer(c),this._pointers.length){case 1:switch(this.touches.ONE){case Qa.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(c),this.state=Mt.TOUCH_ROTATE;break;case Qa.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(c),this.state=Mt.TOUCH_PAN;break;default:this.state=Mt.NONE}break;case 2:switch(this.touches.TWO){case Qa.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(c),this.state=Mt.TOUCH_DOLLY_PAN;break;case Qa.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(c),this.state=Mt.TOUCH_DOLLY_ROTATE;break;default:this.state=Mt.NONE}break;default:this.state=Mt.NONE}this.state!==Mt.NONE&&this.dispatchEvent(Jo)}function yp(c){switch(this._trackPointer(c),this.state){case Mt.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(c),this.update();break;case Mt.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(c),this.update();break;case Mt.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(c),this.update();break;case Mt.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(c),this.update();break;default:this.state=Mt.NONE}}function pp(c){this.enabled!==!1&&c.preventDefault()}function gp(c){c.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function vp(c){c.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}const bp={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
|
|
34
|
+
|
|
35
|
+
varying vec2 vUv;
|
|
36
|
+
|
|
37
|
+
void main() {
|
|
38
|
+
|
|
39
|
+
vUv = uv;
|
|
40
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
41
|
+
|
|
42
|
+
}`,fragmentShader:`
|
|
43
|
+
|
|
44
|
+
uniform float opacity;
|
|
45
|
+
|
|
46
|
+
uniform sampler2D tDiffuse;
|
|
47
|
+
|
|
48
|
+
varying vec2 vUv;
|
|
49
|
+
|
|
50
|
+
void main() {
|
|
51
|
+
|
|
52
|
+
vec4 texel = texture2D( tDiffuse, vUv );
|
|
53
|
+
gl_FragColor = opacity * texel;
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
}`};class ys{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Sp=new p0(-1,1,1,-1,0,1);class xp extends Za{constructor(){super(),this.setAttribute("position",new eh([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new eh([0,2,0,0,2,0],2))}}const _p=new xp;class zp{constructor(s){this._mesh=new hs(_p,s)}dispose(){this._mesh.geometry.dispose()}render(s){s.render(this._mesh,Sp)}get material(){return this._mesh.material}set material(s){this._mesh.material=s}}class Tp extends ys{constructor(s,r="tDiffuse"){super(),this.textureID=r,this.uniforms=null,this.material=null,s instanceof lh?(this.uniforms=s.uniforms,this.material=s):s&&(this.uniforms=g0.clone(s.uniforms),this.material=new lh({name:s.name!==void 0?s.name:"unspecified",defines:Object.assign({},s.defines),uniforms:this.uniforms,vertexShader:s.vertexShader,fragmentShader:s.fragmentShader})),this._fsQuad=new zp(this.material)}render(s,r,o){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=o.texture),this._fsQuad.material=this.material,this.renderToScreen?(s.setRenderTarget(null),this._fsQuad.render(s)):(s.setRenderTarget(r),this.clear&&s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil),this._fsQuad.render(s))}dispose(){this.material.dispose(),this._fsQuad.dispose()}}class mh extends ys{constructor(s,r){super(),this.scene=s,this.camera=r,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(s,r,o){const m=s.getContext(),h=s.state;h.buffers.color.setMask(!1),h.buffers.depth.setMask(!1),h.buffers.color.setLocked(!0),h.buffers.depth.setLocked(!0);let x,z;this.inverse?(x=0,z=1):(x=1,z=0),h.buffers.stencil.setTest(!0),h.buffers.stencil.setOp(m.REPLACE,m.REPLACE,m.REPLACE),h.buffers.stencil.setFunc(m.ALWAYS,x,4294967295),h.buffers.stencil.setClear(z),h.buffers.stencil.setLocked(!0),s.setRenderTarget(o),this.clear&&s.clear(),s.render(this.scene,this.camera),s.setRenderTarget(r),this.clear&&s.clear(),s.render(this.scene,this.camera),h.buffers.color.setLocked(!1),h.buffers.depth.setLocked(!1),h.buffers.color.setMask(!0),h.buffers.depth.setMask(!0),h.buffers.stencil.setLocked(!1),h.buffers.stencil.setFunc(m.EQUAL,1,4294967295),h.buffers.stencil.setOp(m.KEEP,m.KEEP,m.KEEP),h.buffers.stencil.setLocked(!0)}}class Ep extends ys{constructor(){super(),this.needsSwap=!1}render(s){s.state.buffers.stencil.setLocked(!1),s.state.buffers.stencil.setTest(!1)}}class Mp{constructor(s,r){if(this.renderer=s,this._pixelRatio=s.getPixelRatio(),r===void 0){const o=s.getSize(new It);this._width=o.width,this._height=o.height,r=new v0(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:b0}),r.texture.name="EffectComposer.rt1"}else this._width=r.width,this._height=r.height;this.renderTarget1=r,this.renderTarget2=r.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new Tp(bp),this.copyPass.material.blending=S0,this.timer=new x0}swapBuffers(){const s=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=s}addPass(s){this.passes.push(s),s.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(s,r){this.passes.splice(r,0,s),s.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(s){const r=this.passes.indexOf(s);r!==-1&&this.passes.splice(r,1)}isLastEnabledPass(s){for(let r=s+1;r<this.passes.length;r++)if(this.passes[r].enabled)return!1;return!0}render(s){this.timer.update(),s===void 0&&(s=this.timer.getDelta());const r=this.renderer.getRenderTarget();let o=!1;for(let m=0,h=this.passes.length;m<h;m++){const x=this.passes[m];if(x.enabled!==!1){if(x.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(m),x.render(this.renderer,this.writeBuffer,this.readBuffer,s,o),x.needsSwap){if(o){const z=this.renderer.getContext(),R=this.renderer.state.buffers.stencil;R.setFunc(z.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,s),R.setFunc(z.EQUAL,1,4294967295)}this.swapBuffers()}mh!==void 0&&(x instanceof mh?o=!0:x instanceof Ep&&(o=!1))}}this.renderer.setRenderTarget(r)}reset(s){if(s===void 0){const r=this.renderer.getSize(new It);this._pixelRatio=this.renderer.getPixelRatio(),this._width=r.width,this._height=r.height,s=this.renderTarget1.clone(),s.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=s,this.renderTarget2=s.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(s,r){this._width=s,this._height=r;const o=this._width*this._pixelRatio,m=this._height*this._pixelRatio;this.renderTarget1.setSize(o,m),this.renderTarget2.setSize(o,m);for(let h=0;h<this.passes.length;h++)this.passes[h].setSize(o,m)}setPixelRatio(s){this._pixelRatio=s,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class jp extends ys{constructor(s,r,o=null,m=null,h=null){super(),this.scene=s,this.camera=r,this.overrideMaterial=o,this.clearColor=m,this.clearAlpha=h,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this.isRenderPass=!0,this._oldClearColor=new Ko}render(s,r,o){const m=s.autoClear;s.autoClear=!1;let h,x;this.overrideMaterial!==null&&(x=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(s.getClearColor(this._oldClearColor),s.setClearColor(this.clearColor,s.getClearAlpha())),this.clearAlpha!==null&&(h=s.getClearAlpha(),s.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&s.clearDepth(),s.setRenderTarget(this.renderToScreen?null:o),this.clear===!0&&s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil),s.render(this.scene,this.camera),this.clearColor!==null&&s.setClearColor(this._oldClearColor),this.clearAlpha!==null&&s.setClearAlpha(h),this.overrideMaterial!==null&&(this.scene.overrideMaterial=x),s.autoClear=m}}const yh="#f4efe6",Ap="#7c6caf",Dp="#4a8ca3",Cp="#5a8f6b",Op=16052198,Rp=12868668,ph=10504242,Up=8023907,Bp=12892584,Np=16776438,Be={buffer:Ap,episodic:Dp,semantic:Cp},gh={query:"",layers:new Set,strengthRange:[0,1],confidences:new Set,ageMaxDays:null,frozen:!1,fadingOnly:!1,agedOutOnly:!1,colorMode:"layer",localView:null},Hp=.1;function Fo(c){return c.strength<Hp&&!c.pinned}function wp(c){return!!(c.query.trim().length>0||c.layers.size>0||c.confidences.size>0||c.strengthRange[0]>0||c.strengthRange[1]<1||c.ageMaxDays!==null||c.fadingOnly||c.agedOutOnly||c.localView!==null)}function Uh(c,s){const r=s.trim().toLowerCase();return!r||c.content.toLowerCase().includes(r)?!0:c.tags.some(o=>o.toLowerCase().includes(r))}function Lp(c,s,r){const o=new Set,m=s.layers.size>0,h=s.confidences.size>0,[x,z]=s.strengthRange,R=x>0||z<1,C=s.ageMaxDays!==null;for(const B of c)Uh(B,s.query)&&(m&&!s.layers.has(B.layer)||h&&!s.confidences.has(B.confidence)||R&&(B.strength<x||B.strength>z)||C&&s.ageMaxDays!==null&&B.age_days>s.ageMaxDays||s.fadingOnly&&!Fo(B)||s.agedOutOnly&&!B.aged_out||s.localView!==null&&r!==void 0&&!r.has(B.id)||o.add(B.id));return o}const Yp=["#1e5a7d","#2d5e2b","#6b2876","#155a5a","#8a4d2e","#6f4f1f","#2d4d6b","#4d762a","#7f4848","#4a4a72"],qp=["#1e5a7d","#155a5a","#2d4d6b","#4a4a72","#6b2876","#2d5e2b","#4d762a","#7f4848"],qo="#6a6a6a",Bh="path:";function Gp(c){let s=2166136261;for(let r=0;r<c.length;r++)s^=c.charCodeAt(r),s=s+((s<<1)+(s<<4)+(s<<7)+(s<<8)+(s<<24))>>>0;return s>>>0}function vh(c,s){const{includePrefix:r,excludePrefix:o,topN:m,palette:h}=s,x=Math.min(m,h.length),z=new Map;for(const E of c)for(const O of E.tags)r!==void 0&&!O.startsWith(r)||o!==void 0&&O.startsWith(o)||z.set(O,(z.get(O)??0)+1);const R=[...z.entries()].sort((E,O)=>O[1]-E[1]||E[0].localeCompare(O[0])).slice(0,x).map(([E])=>E),C=new Map,B=new Set;for(const E of R){const O=Gp(E)%h.length;let b=O;for(;B.has(b)&&(b=(b+1)%h.length,b!==O););B.add(b),C.set(E,h[b])}return C}function Nh(c,s){const r=c.filter(o=>o.startsWith(Bh)&&!(s?.has(o)??!1));return r.length===0?null:(r.sort((o,m)=>o.length-m.length||o.localeCompare(m)),r[0]??null)}function Wo(c,s){if(s==="path")return Nh(c.tags);const r=c.tags.filter(o=>!o.startsWith(Bh));return r.length===0?null:(r.sort((o,m)=>o.length-m.length||o.localeCompare(m)),r[0]??null)}function Xp(c,s,r,o){if(s==="layer")return Be[c.layer]??qo;const m=Wo(c,s);return m===null?qo:(s==="path"?o:r).get(m)??qo}const os={softCap:50,hardCap:300,perTagTopK:15,minShared:2};function bh(c,s){return c<s?`${c}|${s}`:`${s}|${c}`}function Hh(c,s={}){const r=s.softCap??os.softCap,o=s.hardCap??os.hardCap,m=s.perTagTopK??os.perTagTopK,h=s.minShared??os.minShared,x=s.excludePrefix,z=new Map;for(const E of c)for(const O of E.tags){if(x!==void 0&&O.startsWith(x))continue;let b=z.get(O);b===void 0&&(b=[],z.set(O,b)),b.push(E.id)}const R=[...z.entries()].sort((E,O)=>E[1].length-O[1].length),C=new Map;for(const[,E]of R)if(!(E.length<2)&&!(E.length>=o))if(E.length<r)for(let O=0;O<E.length;O++)for(let b=O+1;b<E.length;b++){const U=bh(E[O],E[b]);C.set(U,(C.get(U)??0)+1)}else{const O=[];for(let U=0;U<E.length;U++)for(let H=U+1;H<E.length;H++){const w=bh(E[U],E[H]);O.push({key:w,current:C.get(w)??0})}O.sort((U,H)=>H.current-U.current||U.key.localeCompare(H.key));const b=O.slice(0,m);for(const{key:U}of b)C.set(U,(C.get(U)??0)+1)}const B=[];for(const[E,O]of C){if(O<h)continue;const b=E.indexOf("|"),U=E.slice(0,b),H=E.slice(b+1);B.push({a:U,b:H,count:O})}return B.sort((E,O)=>O.count-E.count||E.a.localeCompare(O.a)||E.b.localeCompare(O.b)),B}const ms=30,kl={alphaMin:.01,maxTicks:300,linkStrength:.4,chargeStrength:-30,centerStrength:.05,collideRadius:.6,bound:ms};function Ha(c,s,r){return c<s?s:c>r?r:c}function Zp(c,s,r,o={}){const m=o.alphaMin??kl.alphaMin,h=o.maxTicks??kl.maxTicks,x=o.linkStrength??kl.linkStrength,z=o.chargeStrength??kl.chargeStrength,R=o.centerStrength??kl.centerStrength,C=o.collideRadius??kl.collideRadius,B=o.bound??kl.bound,E=o.alphaDecay??1-Math.pow(m,1/h),O=[],b=new Map;for(const G of c){const ft=r?.get(G.id),at=ft?{id:G.id,x:Ha(ft.x,-B,B),y:Ha(ft.z,-B,B)}:{id:G.id,x:0,y:0};O.push(at),b.set(G.id,at)}const U=[],H=new Set;for(const[G,ft]of s)if(b.has(G))for(const at of ft){if(!b.has(at))continue;const rt=G<at?G:at,nt=G<at?at:G,ht=`${rt}|${nt}`;H.has(ht)||(H.add(ht),U.push({source:rt,target:nt}))}const w=w0(O).force("link",L0(U).id(G=>G.id).strength(x).distance(2.5)).force("charge",Y0().strength(z)).force("center",q0(0,0).strength(R)).force("collide",G0(C)).alphaMin(m).alphaDecay(E).stop(),F=o.projectAnchors;F&&F.size>0&&w.force("project-x",X0(G=>F.get(G.id)?.x??0).strength(G=>F.get(G.id)?.strength??0)).force("project-y",Z0(G=>F.get(G.id)?.y??0).strength(G=>F.get(G.id)?.strength??0)),o.randomSource&&w.randomSource(o.randomSource);let Y=0,q=!1,K=!1;const I=new Set,Q=()=>Y>=h||w.alpha()<=m,Z=(G,ft)=>{K=G;for(const at of I)at(G,ft)};return{tick(){if(Q()){q===!1&&(q=!0,K&&Z(!1,"tick"));return}K||Z(!0,"tick"),w.tick(),Y++;for(const G of O)G.x=Ha(G.x,-B,B),G.y=Ha(G.y,-B,B);Q()&&q===!1&&(q=!0,Z(!1,"tick"))},runToCompletion(G){const ft=Y,at=G??1/0;for(!Q()&&!K&&Z(!0,"reduced-motion");!Q()&&Y-ft<at;){w.tick(),Y++;for(const rt of O)rt.x=Ha(rt.x,-B,B),rt.y=Ha(rt.y,-B,B)}Q()&&q===!1&&(q=!0,K&&Z(!1,"reduced-motion"))},done(){return Q()},position(G){const ft=b.get(G);if(ft)return{x:ft.x,z:ft.y}},ticksRun(){return Y},settledPositions(){const G=new Map;for(const ft of O)G.set(ft.id,{x:ft.x,z:ft.y});return G},onSettleStateChange(G){return I.add(G),K&&G(!0,"tick"),()=>{I.delete(G)}},isSettling(){return K}}}const Qp=Math.PI*(3-Math.sqrt(5)),Vp=.08;function Kp(c,s,r,o=new Set,m=Vp){const h=r*.6,x=2*Math.PI,z=new Map;for(const[E,O]of s.indexByTag){if(o.has(E))continue;const b=O*Qp%x;z.set(E,{x:Math.cos(b)*h,y:Math.sin(b)*h,strength:m})}const R=new Map,C=new Set;for(const E of c){const O=Nh(E.tags,o);if(O===null)continue;const b=z.get(O);b&&(R.set(E.id,b),C.add(O))}const B=[...s.indexByTag.entries()].filter(([E])=>C.has(E)).sort((E,O)=>E[1]-O[1]).map(([E])=>E);return{byTag:z,byMemoryId:R,orderedTags:B}}const wh="hippo:projectAnchorOrder:v1",cs={indexByTag:new Map,nextIndex:0};function Lh(){return"window"in globalThis}function kp(c){return typeof c=="string"}function Yh(c){return typeof c!="number"?!1:Number.isFinite(c)}function Jp(c){return Array.isArray(c)&&c.length===2&&kp(c[0])&&Yh(c[1])}function Fp(c){if(!c)return null;const s=c,{tags:r,nextIndex:o}=s;return!Array.isArray(r)||!Yh(o)||!r.every(Jp)?null:{tags:r,nextIndex:o}}function Wp(){if(!Lh())return cs;try{const c=window.localStorage.getItem(wh);if(!c)return cs;const s=JSON.parse(c),r=Fp(s);return r===null?cs:{indexByTag:new Map(r.tags),nextIndex:r.nextIndex}}catch{return cs}}function $p(c){if(Lh())try{const s=JSON.stringify({tags:[...c.indexByTag.entries()],nextIndex:c.nextIndex});window.localStorage.setItem(wh,s)}catch{}}function Ip(c,s){const r=[...c].sort(),o=new Map(s.indexByTag);let m=s.nextIndex,h=!1;for(const x of r)o.has(x)||(o.set(x,m),m++,h=!0);return h?{indexByTag:o,nextIndex:m}:s}const Pp=2e3,Sh=20,tg={buffer:6,episodic:0,semantic:-6};function fs(c){return new Ko(c)}class eg{constructor(s){this.container=s,this.initRenderer(),this.initScene(),this.initCamera(),this.initControls(),this.initPostProcessing(),this.initGrid(),this.animate()}renderer;scene;camera;controls;composer;nodes=[];tendrils=[];conflictLines=[];raycaster=new _0;mouse=new It;hoveredNode=null;selectedNode=null;highlightedIds=new Set;searchDimmed=!1;clock=new z0;gridHelper;onHoverCb=null;onClickCb=null;disposed=!1;rafId=0;paused=!1;onRenderCbs=[];currentColorMode="layer";tagPalette=new Map;pathPalette=new Map;sharedTagEdges=[];sharedTagBailed=!1;forceLayout=null;lastSettledPositions=null;settleSubscribers=new Set;currentForceUnsubscribe=null;projectAnchorLayout=null;initRenderer(){this.renderer=new T0({antialias:!0,alpha:!1}),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setSize(this.container.clientWidth,this.container.clientHeight),this.renderer.toneMapping=E0,this.renderer.toneMappingExposure=1,this.renderer.setClearColor(Op,1),this.container.appendChild(this.renderer.domElement),this.renderer.domElement.style.display="block"}initScene(){this.scene=new M0,this.scene.background=new Ko(yh),this.scene.fog=new j0(yh,.008);const s=new A0(Np,.65);this.scene.add(s);const r=new D0(Rp,.4,100);r.position.set(0,15,10),this.scene.add(r)}initCamera(){const s=this.container.clientWidth,r=this.container.clientHeight;this.camera=new C0(60,s/r,.1,200),this.camera.position.set(0,8,28),this.camera.lookAt(0,0,0)}initControls(){this.controls=new sp(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.05,this.controls.minDistance=5,this.controls.maxDistance=80,this.controls.maxPolarAngle=Math.PI*.85,this.controls.autoRotate=!0,this.controls.autoRotateSpeed=.3}initPostProcessing(){this.container.clientWidth,this.container.clientHeight,this.composer=new Mp(this.renderer),this.composer.addPass(new jp(this.scene,this.camera))}initGrid(){this.gridHelper=new O0;const s=new Bo({color:Bp,transparent:!0,opacity:.06}),r=40,m=r/20;for(let h=-r/2;h<=r/2;h+=m){const x=new Za().setFromPoints([new Wt(h,-10,-r/2),new Wt(h,-10,r/2)]);this.gridHelper.add(new qn(x,s));const z=new Za().setFromPoints([new Wt(-r/2,-10,h),new Wt(r/2,-10,h)]);this.gridHelper.add(new qn(z,s))}this.scene.add(this.gridHelper)}setCallbacks(s,r){this.onHoverCb=s,this.onClickCb=r}populate(s,r,o,m,h){for(const b of this.nodes)this.scene.remove(b.mesh),this.scene.remove(b.halo),b.mesh.geometry.dispose(),b.halo.geometry.dispose(),b.fadingRing&&(this.scene.remove(b.fadingRing),b.fadingRing.geometry.dispose(),b.fadingRing.material.dispose());for(const b of this.tendrils)this.scene.remove(b),b.geometry.dispose();for(const b of this.conflictLines)this.scene.remove(b),b.geometry.dispose();for(const b of this.sharedTagEdges)this.scene.remove(b),b.geometry.dispose(),b.material.dispose();this.nodes=[],this.tendrils=[],this.conflictLines=[],this.sharedTagEdges=[];const x=s.reduce((b,U)=>Math.max(b,U.retrieval_count),1);for(const b of s){const U=r[b.id]??[Math.random()*2-1,Math.random()*2-1,Math.random()*2-1],H=tg[b.layer]??0,w=U[0]*Sh+(Math.random()-.5)*3,F=H+(Math.random()-.5)*2,Y=U[2]*Sh+(Math.random()-.5)*3,q=fs(Be[b.layer]),I=.15+Math.log2(b.retrieval_count+1)/Math.log2(x+1)*.35,Q=new ah(I,24,24),Z=new R0({color:q,emissiveIntensity:0,roughness:.55,metalness:.05,transparent:!0,opacity:.78+b.strength*.22}),$=new hs(Q,Z);$.position.set(w,F,Y),$.userData={memoryId:b.id},this.scene.add($);const G=new ah(I*2.2,16,16),ft=new nh({color:q,transparent:!0,opacity:.015+b.strength*.025,side:U0,depthWrite:!1}),at=new hs(G,ft);at.position.copy($.position),this.scene.add(at);let rt;if(Fo(b)){const nt=new B0(I*1.4,I*1.7,32),ht=new nh({color:ph,side:N0,transparent:!0,opacity:.6,depthWrite:!1});rt=new hs(nt,ht),rt.position.copy($.position),rt.lookAt(this.camera.position),this.scene.add(rt)}this.nodes.push({id:b.id,memory:b,mesh:$,halo:at,basePosition:$.position.clone(),phase:Math.random()*Math.PI*2,driftSpeed:.2+Math.random()*.3,fadingRing:rt})}this.buildTendrils(),this.buildConflictLines(o),this.buildSharedTagEdges(s),this.currentForceUnsubscribe&&(this.currentForceUnsubscribe(),this.currentForceUnsubscribe=null);const z=new Set(s.map(b=>b.id));if(this.lastSettledPositions)for(const b of[...this.lastSettledPositions.keys()])z.has(b)||this.lastSettledPositions.delete(b);const R=new Map;for(const b of this.nodes){const U=this.lastSettledPositions?.get(b.id);R.set(b.id,U??{x:b.basePosition.x,z:b.basePosition.z})}const C=Wp(),B=new Set;for(const b of s)for(const U of b.tags)U.startsWith("path:")&&B.add(U);const E=Ip([...B],C);E!==C&&$p(E);const O=Kp(s,E,ms,h);this.projectAnchorLayout=O,this.forceLayout=Zp(s,m,R,{projectAnchors:O.byMemoryId}),this.currentForceUnsubscribe=this.forceLayout.onSettleStateChange((b,U)=>{for(const H of this.settleSubscribers)H(b,U)}),this.setColorMode(this.currentColorMode,s)}buildSharedTagEdges(s){if(this.nodes.length>500){this.sharedTagBailed=!0;return}this.sharedTagBailed=!1;const o=Hh(s,{excludePrefix:"path:",softCap:50,hardCap:300,perTagTopK:15,minShared:2}),m=new Map;for(const h of this.nodes)m.set(h.id,h);for(const h of o){if(this.sharedTagEdges.length>=Pp)break;const x=m.get(h.a),z=m.get(h.b);if(!x||!z)continue;const R=new Za().setFromPoints([x.basePosition,z.basePosition]),C=new Bo({color:Up,transparent:!0,opacity:.18+h.count*.04,depthWrite:!1}),B=new qn(R,C);B.userData={aId:h.a,bId:h.b},this.scene.add(B),this.sharedTagEdges.push(B)}}getProjectAnchorLayout(){return this.projectAnchorLayout}getEdgeCounts(){let s=0,r=0;for(const o of this.conflictLines){const m=o.userData.status;m==="open"?s++:m==="resolved"&&r++}return{openConflicts:s,resolvedConflicts:r,sharedTag:this.sharedTagEdges.length,sharedTagBailed:this.sharedTagBailed}}setColorMode(s,r){s==="tag"&&(this.tagPalette=vh(r,{excludePrefix:"path:",topN:10,palette:Yp})),s==="path"&&(this.pathPalette=vh(r,{includePrefix:"path:",topN:8,palette:qp})),this.currentColorMode=s;for(const o of this.nodes){const m=Xp(o.memory,s,this.tagPalette,this.pathPalette),h=fs(m);o.mesh.material.color.copy(h),o.halo.material.color.copy(h)}}buildTendrils(){const s=this.nodes.length;if(s>500)return;const r=6,o=r*r;for(let m=0;m<s;m++){const h=this.nodes[m];for(let x=m+1;x<s;x++){const z=this.nodes[x],R=h.basePosition.x-z.basePosition.x,C=h.basePosition.y-z.basePosition.y,B=h.basePosition.z-z.basePosition.z,E=R*R+C*C+B*B;if(E>o)continue;const b=1-Math.sqrt(E)/r,U=new Wt().lerpVectors(h.basePosition,z.basePosition,.5);U.y+=(Math.random()-.5)*1.5;const w=new ih(h.basePosition,U,z.basePosition).getPoints(12),F=new Za().setFromPoints(w),Y=fs(h.mesh.userData.color??Be[h.memory.layer]),q=fs(z.mesh.userData.color??Be[z.memory.layer]),K=Y.clone().lerp(q,.5),I=new Bo({color:K,transparent:!0,opacity:b*b*.15,depthWrite:!1}),Q=new qn(F,I);this.scene.add(Q),this.tendrils.push(Q)}}}buildConflictLines(s){const r=new Map;for(const o of this.nodes)r.set(o.id,o);for(const o of s){const m=r.get(o.memory_a_id),h=r.get(o.memory_b_id);if(!m||!h)continue;const x=new Wt().lerpVectors(m.basePosition,h.basePosition,.5);x.y+=1;const R=new ih(m.basePosition,x,h.basePosition).getPoints(16),C=new Za().setFromPoints(R),B=o.status==="resolved",E=new H0({color:ph,transparent:!0,opacity:.3+o.score*.4,dashSize:B?.05:.3,gapSize:B?.15:.2,depthWrite:!1}),O=new qn(C,E);O.computeLineDistances(),O.userData={status:o.status,aId:o.memory_a_id,bId:o.memory_b_id},this.scene.add(O),this.conflictLines.push(O)}}setHighlighted(s){this.highlightedIds=s,this.searchDimmed=s.size>0,this.applyDimming()}clearHighlight(){this.highlightedIds.clear(),this.searchDimmed=!1,this.applyDimming()}applyDimming(){for(const s of this.nodes){const r=s.mesh.material,o=s.halo.material;this.searchDimmed&&!this.highlightedIds.has(s.id)?(r.opacity=.05,r.emissiveIntensity=.1,o.opacity=.01):(r.opacity=.3+s.memory.strength*.7,r.emissiveIntensity=.6+s.memory.strength*.8,o.opacity=.06+s.memory.strength*.08)}}handleMouseMove(s){const r=this.renderer.domElement.getBoundingClientRect();this.mouse.x=(s.clientX-r.left)/r.width*2-1,this.mouse.y=-((s.clientY-r.top)/r.height)*2+1,this.raycaster.setFromCamera(this.mouse,this.camera);const o=this.nodes.map(x=>x.mesh),m=this.raycaster.intersectObjects(o),h=this.hoveredNode;if(m.length>0){const z=m[0].object.userData.memoryId;this.hoveredNode=this.nodes.find(R=>R.id===z)??null,this.renderer.domElement.style.cursor="pointer",this.hoveredNode&&this.onHoverCb&&this.onHoverCb(this.hoveredNode.memory,s.clientX,s.clientY)}else this.hoveredNode=null,this.renderer.domElement.style.cursor="grab",h&&this.onHoverCb&&this.onHoverCb(null,0,0);if(h&&h!==this.hoveredNode){const x=h.mesh.material;x.emissiveIntensity=.6+h.memory.strength*.8,h.mesh.scale.setScalar(1),h.halo.material.opacity=.06+h.memory.strength*.08}if(this.hoveredNode){const x=this.hoveredNode.mesh.material;x.emissiveIntensity=2,this.hoveredNode.mesh.scale.setScalar(1.4),this.hoveredNode.halo.material.opacity=.2}}handleClick(){this.hoveredNode?(this.selectedNode&&this.selectedNode!==this.hoveredNode&&this.selectedNode.mesh.scale.setScalar(1),this.selectedNode=this.hoveredNode,this.onClickCb&&this.onClickCb(this.hoveredNode.memory)):(this.selectedNode&&this.selectedNode.mesh.scale.setScalar(1),this.selectedNode=null,this.onClickCb&&this.onClickCb(null))}deselect(){this.selectedNode&&this.selectedNode.mesh.scale.setScalar(1),this.selectedNode=null,this.onClickCb&&this.onClickCb(null)}resize(s,r){s===0||r===0||(this.camera.aspect=s/r,this.camera.updateProjectionMatrix(),this.renderer.setSize(s,r),this.composer.setSize(s,r))}animate=()=>{if(this.disposed||this.paused)return;this.rafId=requestAnimationFrame(this.animate);const s=this.clock.getElapsedTime();this.controls.update();const r=this.forceLayout!==null&&!this.forceLayout.done();if(r){this.forceLayout.tick();for(const o of this.nodes){const m=this.forceLayout.position(o.id);m&&(o.basePosition.x=m.x,o.basePosition.z=m.z)}this.forceLayout.done()&&(this.lastSettledPositions=this.forceLayout.settledPositions())}for(const o of this.nodes){if(r)o.mesh.position.copy(o.basePosition);else{const m=Math.sin(s*o.driftSpeed+o.phase),h=Math.cos(s*o.driftSpeed*.7+o.phase*1.3);o.mesh.position.x=o.basePosition.x+m*.15,o.mesh.position.y=o.basePosition.y+h*.1,o.mesh.position.z=o.basePosition.z+Math.sin(s*o.driftSpeed*.5+o.phase*.7)*.12}if(o.halo.position.copy(o.mesh.position),o===this.selectedNode){const m=1.3+.1*Math.sin(s*3+o.phase);o.mesh.scale.setScalar(m)}o.fadingRing&&(o.fadingRing.position.copy(o.mesh.position),o.fadingRing.lookAt(this.camera.position))}if(this.onRenderCbs.length>0)for(const o of this.onRenderCbs)o(this.camera,this.scene);this.composer.render()};onSettleStateChange(s){return this.settleSubscribers.add(s),this.forceLayout?.isSettling()&&s(!0,"tick"),()=>{this.settleSubscribers.delete(s)}}setReducedMotion(s){if(this.paused=s,s){if(this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=0),this.forceLayout&&!this.forceLayout.done()){this.forceLayout.runToCompletion(80);for(const r of this.nodes){const o=this.forceLayout.position(r.id);o&&(r.basePosition.x=o.x,r.basePosition.z=o.z)}this.forceLayout.done()&&(this.lastSettledPositions=this.forceLayout.settledPositions())}this.snapParticlesToFinal()}else this.rafId||this.animate()}getNodePosition(s){for(const r of this.nodes)if(r.id===s)return r.basePosition;return null}getRenderer(){return this.renderer}setFiltered(s,r){for(const o of this.nodes){const m=!r||s.has(o.id);o.mesh.visible=m,o.halo.visible=m}for(const o of[...this.conflictLines,...this.sharedTagEdges,...this.tendrils]){if(!r){o.visible=!0;continue}const m=o.userData;!m.aId||!m.bId||(o.visible=s.has(m.aId)&&s.has(m.bId))}}onRender(s){return this.onRenderCbs.push(s),()=>{const r=this.onRenderCbs.indexOf(s);r>=0&&this.onRenderCbs.splice(r,1)}}getCamera(){return this.camera}snapParticlesToFinal(){for(const s of this.nodes)s.mesh.position.copy(s.basePosition),s.halo.position.copy(s.basePosition);this.composer.render()}dispose(){this.disposed=!0,cancelAnimationFrame(this.rafId),this.controls.dispose();for(const s of this.nodes)s.mesh.geometry.dispose(),s.mesh.material.dispose(),s.halo.geometry.dispose(),s.halo.material.dispose(),s.fadingRing&&(s.fadingRing.geometry.dispose(),s.fadingRing.material.dispose());for(const s of[...this.tendrils,...this.conflictLines,...this.sharedTagEdges])s.geometry.dispose(),s.material.dispose();this.renderer.dispose(),this.renderer.domElement.parentElement&&this.renderer.domElement.parentElement.removeChild(this.renderer.domElement)}}function lg(c){const s=Object.keys(c);if(s.length===0)return{};if(s.length===1)return Object.fromEntries([[s[0],[0,0,0]]]);const r=c[s[0]].length,o=s.length,m=new Float64Array(r);for(const Y of s){const q=c[Y];for(let K=0;K<r;K++)m[K]+=q[K]}for(let Y=0;Y<r;Y++)m[Y]/=o;const h=new Array(o);for(let Y=0;Y<o;Y++){const q=new Float64Array(r),K=c[s[Y]];for(let I=0;I<r;I++)q[I]=K[I]-m[I];h[Y]=q}const x=Y=>{const q=new Float64Array(r);for(let K=0;K<r;K++)q[K]=Math.random()-.5;for(let K=0;K<100;K++){const I=new Float64Array(r);for(let Z=0;Z<o;Z++){let $=0;for(let G=0;G<r;G++)$+=Y[Z][G]*q[G];for(let G=0;G<r;G++)I[G]+=Y[Z][G]*$}let Q=0;for(let Z=0;Z<r;Z++)Q+=I[Z]*I[Z];if(Q=Math.sqrt(Q),Q<1e-12)return new Float64Array(r);for(let Z=0;Z<r;Z++)q[Z]=I[Z]/Q}return q},z=(Y,q)=>Y.map(K=>{let I=0;for(let Z=0;Z<r;Z++)I+=K[Z]*q[Z];const Q=new Float64Array(r);for(let Z=0;Z<r;Z++)Q[Z]=K[Z]-I*q[Z];return Q}),R=(Y,q)=>{const K=new Float64Array(Y);for(const Q of q){let Z=0;for(let $=0;$<r;$++)Z+=K[$]*Q[$];for(let $=0;$<r;$++)K[$]-=Z*Q[$]}let I=0;for(let Q=0;Q<r;Q++)I+=K[Q]*K[Q];if(I=Math.sqrt(I),I>1e-12)for(let Q=0;Q<r;Q++)K[Q]/=I;return K},C=x(h),B=z(h,C),E=R(x(B),[C]),O=z(B,E),b=R(x(O),[C,E]),U=[C,E,b],H=new Array(o);for(let Y=0;Y<o;Y++){const q=h[Y],K=[0,0,0];for(let I=0;I<3;I++){let Q=0;for(let Z=0;Z<r;Z++)Q+=q[Z]*U[I][Z];K[I]=Q}H[Y]=K}let w=0;for(let Y=0;Y<o;Y++)for(let q=0;q<3;q++){const K=Math.abs(H[Y][q]);K>w&&(w=K)}return Object.fromEntries(s.map((Y,q)=>w<1e-12?[Y,[0,0,0]]:[Y,[H[q][0]/w,H[q][1]/w,H[q][2]/w]]))}const ag={openConflicts:0,resolvedConflicts:0,sharedTag:0,sharedTagBailed:!1};function ng({memories:c,embeddings:s,conflicts:r,homePathTags:o,width:m,height:h,onHover:x,onClick:z,searchQuery:R,frozen:C,visibleIds:B,filterActive:E,colorMode:O,adjacency:b,onSceneReady:U}){const H=N.useRef(null),w=N.useRef(null),F=N.useRef(x),Y=N.useRef(z);F.current=x,Y.current=z;const[q,K]=N.useState(ag),[I,Q]=N.useState(null),[Z,$]=N.useState(void 0),G=N.useRef("initial");N.useEffect(()=>{const nt=H.current;if(!nt)return;const ht=new eg(nt);return ht.setCallbacks((vt,M,L)=>F.current(vt,M,L),vt=>Y.current(vt)),w.current=ht,U?.(ht),()=>{U?.(null),ht.dispose(),w.current=null}},[]),N.useEffect(()=>{const nt=w.current;if(!nt||c.length===0)return;const ht=lg(s);nt.populate(c,ht,r,b,o),K(nt.getEdgeCounts()),Q(nt.getProjectAnchorLayout())},[c,s,r,b,o]),N.useEffect(()=>{const nt=w.current;if(nt)return nt.onSettleStateChange((ht,vt)=>{if(vt==="reduced-motion"){$(void 0);return}ht?$(G.current):($(void 0),G.current="refresh")})},[]),N.useEffect(()=>{const nt=H.current;if(!nt)return;const ht=()=>{const M=Math.floor(nt.clientWidth),L=Math.floor(nt.clientHeight);M>0&&L>0&&w.current?.resize(M,L)};ht();const vt=new ResizeObserver(ht);return vt.observe(nt),()=>vt.disconnect()},[]),N.useEffect(()=>{if(!R.trim()){w.current?.clearHighlight();return}const nt=R.toLowerCase(),ht=new Set;for(const vt of c)(vt.content.toLowerCase().includes(nt)||vt.tags.some(M=>M.toLowerCase().includes(nt)))&&ht.add(vt.id);w.current?.setHighlighted(ht)},[R,c]),N.useEffect(()=>{w.current?.setReducedMotion(C)},[C]),N.useEffect(()=>{w.current?.setFiltered(B,E)},[B,E]),N.useEffect(()=>{w.current?.setColorMode(O,c)},[O]);const ft=N.useCallback(nt=>{w.current?.handleMouseMove(nt.nativeEvent)},[]),at=N.useCallback(()=>{w.current?.handleClick()},[]),rt=N.useCallback(nt=>{nt.key==="Escape"&&w.current?.deselect()},[]);return{containerRef:H,handleMouseMove:ft,handleClick:at,handleKeyDown:rt,edgeCounts:q,forceSettling:Z,projectAnchorLayout:I}}function ig({memory:c,x:s,y:r,colorMode:o="layer",colorTag:m=null}){const h=c.content.length>100?c.content.slice(0,100)+"…":c.content,x=Be[c.layer],z=m!==null&&(o==="tag"||o==="path");return d.jsxs("div",{style:{position:"fixed",left:s+16,top:r-12,background:"var(--glass-bg-strong)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid var(--glass-border)",borderRadius:12,padding:"12px 14px",maxWidth:280,pointerEvents:"none",zIndex:100,boxShadow:"0 4px 24px var(--ink-shadow), 0 0 0 1px var(--glass-border)"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[d.jsx("div",{style:{width:5,height:5,borderRadius:"50%",background:x,boxShadow:`0 0 6px ${x}60`}}),d.jsx("span",{style:{color:"var(--dim)",fontSize:9,fontFamily:"var(--font-mono)",textTransform:"uppercase",letterSpacing:"0.5px"},children:c.layer}),d.jsx("span",{style:{color:"var(--text-faint)",fontSize:9},children:"·"}),d.jsxs("span",{style:{color:"var(--dim)",fontSize:9,fontFamily:"var(--font-mono)"},children:[c.strength.toFixed(2)," str"]})]}),z&&d.jsxs("div",{style:{marginBottom:6,color:"var(--dim)",fontSize:9,fontFamily:"var(--font-mono)",letterSpacing:"0.4px"},children:["color: ",m]}),d.jsx("div",{style:{color:"var(--text)",fontSize:12,lineHeight:1.5,fontFamily:"var(--font-body)"},children:h}),d.jsxs("div",{style:{marginTop:8,display:"flex",gap:8,color:"var(--text-faint)",fontSize:9,fontFamily:"var(--font-mono)"},children:[d.jsxs("span",{children:[c.retrieval_count," retrievals"]}),d.jsxs("span",{children:[c.half_life_days,"d half-life"]}),d.jsxs("span",{children:[c.age_days,"d old"]})]})]})}function sg(c,s){const[r,o]=N.useState(c);return N.useEffect(()=>{const m=setTimeout(()=>o(c),s);return()=>clearTimeout(m)},[c,s]),r}function ug({memoryCount:c,matchCount:s,stats:r,filterState:o,frozenOrigin:m,setQuery:h,setFrozen:x,setFadingOnly:z,viewSwitch:R}){const[C,B]=N.useState(o.query),E=sg(C,150),[O,b]=N.useState(!1),U=N.useRef(null);return N.useEffect(()=>{E!==o.query&&h(E)},[E]),N.useEffect(()=>{o.query!==E&&B(o.query)},[o.query]),N.useEffect(()=>{function H(w){const F=w.target,Y=F instanceof HTMLInputElement||F instanceof HTMLTextAreaElement;w.key==="/"&&!Y?(w.preventDefault(),U.current?.focus()):w.key==="Escape"&&document.activeElement===U.current&&(B(""),h(""),U.current?.blur())}return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[h]),d.jsxs("div",{className:"dashboard-bar",style:{position:"absolute",top:0,left:0,right:0,height:48,zIndex:20,background:"var(--glass-bg)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",borderBottom:"1px solid var(--glass-border)",display:"flex",alignItems:"center",pointerEvents:"auto"},children:[d.jsxs("div",{style:{flex:"0 0 auto",display:"flex",alignItems:"baseline",gap:12},children:[d.jsx("span",{style:{color:"var(--text)",fontSize:16,fontWeight:700,fontFamily:"var(--font-serif)",letterSpacing:"0.3px"},children:"hippo"}),d.jsx("span",{className:"bar-decorative",style:{color:"var(--accent)",fontSize:11,fontFamily:"var(--font-serif)",fontStyle:"italic"},children:"brain observatory"}),R,d.jsxs("span",{className:"bar-decorative",style:{color:"var(--dim)",fontSize:10,fontFamily:"var(--font-mono)"},children:[c," memories"]}),(r?.at_risk??0)>0&&d.jsxs("button",{type:"button",onClick:()=>z(!o.fadingOnly),"aria-pressed":o.fadingOnly,"aria-label":`${r?.at_risk} fading, ${o.fadingOnly?"click to show all memories":"click to filter to fading memories only"}`,title:o.fadingOnly?"Showing only fading memories: click to clear":"Show only fading memories",style:{fontSize:10,fontFamily:"var(--font-mono)",padding:"2px 8px",borderRadius:3,cursor:"pointer",transition:"color 150ms ease, border-color 150ms ease, background 150ms ease",background:o.fadingOnly?"rgba(196, 92, 60, 0.10)":"transparent",border:o.fadingOnly?"1px solid var(--accent)":"1px solid transparent",color:o.fadingOnly?"var(--accent)":"var(--yellow)"},children:[r?.at_risk," fading"]})]}),d.jsx("div",{style:{flex:1}}),d.jsxs("div",{role:"search",style:{position:"relative",flex:"0 1 240px",minWidth:0},children:[d.jsx("input",{ref:U,type:"text",value:C,onChange:H=>B(H.target.value),onFocus:()=>b(!0),onBlur:()=>b(!1),"aria-label":"Search memories",placeholder:"search memories and tags (/)",style:{width:"100%",padding:"5px 10px",paddingRight:s!==null?48:10,background:O?"var(--ink-faint)":"var(--glass-bg)",border:O?"1px solid var(--accent-focus)":"1px solid var(--glass-border)",borderRadius:4,color:"var(--text)",fontSize:12,fontFamily:"var(--font-serif)",outline:"none",boxSizing:"border-box",transition:"border-color 200ms ease, background 200ms ease",letterSpacing:"0.2px"}}),C.length>0&&d.jsx("button",{type:"button",onClick:()=>{B(""),h(""),U.current?.focus()},"aria-label":"Clear search",title:"Clear search (Esc)",style:{position:"absolute",right:s!==null?44:4,top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"var(--dim)",cursor:"pointer",fontSize:14,lineHeight:1,padding:"2px 6px",fontFamily:"var(--font-mono)"},children:"×"}),s!==null&&d.jsxs("span",{style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"var(--text-faint)",fontSize:9,fontFamily:"var(--font-mono)",pointerEvents:"none"},children:[s,"/",c]})]}),d.jsx("button",{type:"button",onClick:()=>x(!o.frozen),"aria-pressed":o.frozen,"aria-label":o.frozen?"Resume animation":"Freeze animation",title:o.frozen&&m==="os"?"Frozen because your system requests reduced motion. Click to override.":o.frozen?"Click to resume animation (or press F)":"Click to freeze animation (or press F)",style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.8px",textTransform:"uppercase",background:o.frozen?"rgba(196,92,60,0.10)":"transparent",border:`1px solid ${o.frozen?"var(--accent)":"var(--glass-border)"}`,color:o.frozen?"var(--accent)":"var(--dim)",padding:"5px 12px",borderRadius:4,cursor:"pointer",transition:"color 150ms ease, border-color 150ms ease, background 150ms ease"},children:o.frozen?"frozen":"freeze"}),o.frozen&&m==="os"&&d.jsx("span",{className:"sr-only",children:"Animation paused: prefers-reduced-motion enabled in OS settings. Activate the freeze button to override."})]})}function og({stats:c,totalVisible:s,fadingOnly:r}){if(!c)return null;const o=[["buffer","Buffer"],["episodic","Episodic"],["semantic","Semantic"]],m=Math.max(...Object.values(c.by_layer),1);return d.jsxs("div",{style:{marginBottom:20},children:[d.jsx("h3",{style:cg,children:"Memory layers"}),d.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:12},children:[d.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:24,color:"var(--text)"},children:s}),d.jsxs("span",{style:{fontSize:10,fontVariant:"small-caps",letterSpacing:"0.6px",color:"var(--dim)"},children:["visible of ",c.total]})]}),d.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:10},children:o.map(([h,x])=>{const z=c.by_layer[h]??0,R=Be[h],C=z/m*100;return d.jsxs("div",{style:{display:"grid",gridTemplateColumns:"78px 1fr 32px",alignItems:"center",gap:10,fontSize:11},children:[d.jsx("span",{style:{fontVariant:"small-caps",letterSpacing:"0.5px",color:"var(--text)"},children:x}),d.jsx("div",{style:{height:6,background:"var(--ink-faint)",borderRadius:2,overflow:"hidden"},children:d.jsx("div",{style:{height:"100%",width:`${C}%`,background:R,borderRadius:2,transition:"width 200ms ease"}})}),d.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--dim)",textAlign:"right"},children:z})]},h)})}),d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontFamily:"var(--font-mono)",fontSize:10,color:"var(--dim)",padding:r?"4px 8px":"0",border:r?"1px solid var(--accent)":"1px solid transparent",borderRadius:3,background:r?"rgba(196, 92, 60, 0.06)":"transparent",transition:"background 150ms ease, border-color 150ms ease, padding 150ms ease"},children:[d.jsxs("span",{children:[c.pinned," pinned"]}),c.at_risk>0&&d.jsxs("span",{style:{color:"var(--accent)",fontWeight:600},children:[c.at_risk," at risk"]}),c.aged_out>0&&d.jsxs("span",{children:[c.aged_out," aged out"]}),d.jsxs("span",{children:["avg ",c.avg_strength.toFixed(2)]})]})]})}const cg={fontSize:11,fontVariant:"small-caps",letterSpacing:"1px",fontWeight:400,color:"var(--dim)",marginBottom:10,paddingBottom:6,borderBottom:"1px solid var(--glass-border)"},xh=[{key:"buffer",label:"buffer"},{key:"episodic",label:"episodic"},{key:"semantic",label:"semantic"}],_h=[{key:"verified",label:"verified"},{key:"observed",label:"observed"},{key:"inferred",label:"inferred"},{key:"stale",label:"stale"}];function zh(c,s){const r=new Set(c);return r.has(s)?r.delete(s):r.add(s),r}function fg({filterState:c,stats:s,setLayers:r,setStrengthRange:o,setConfidences:m,setAgeMaxDays:h,setFadingOnly:x,setAgedOutOnly:z}){const[R,C]=c.strengthRange,B=s?.at_risk??0,E=s?.aged_out??0,O=s?.total??0;return d.jsxs("div",{style:{marginBottom:20},children:[d.jsxs("div",{style:wa,children:[d.jsxs("div",{style:La,children:[d.jsx("span",{children:"Layer"}),d.jsx("span",{style:Ya,children:c.layers.size===0?"all":`${c.layers.size}/3`})]}),d.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px 14px"},children:xh.map(({key:b,label:U})=>{const H=c.layers.size===0||c.layers.has(b);return d.jsxs("label",{style:rs,children:[d.jsx("input",{type:"checkbox",checked:H,onChange:()=>{if(c.layers.size===0){const w=xh.filter(F=>F.key!==b).map(F=>F.key);r(new Set(w))}else{const w=zh(c.layers,b);r(w.size===0?new Set:w)}},"aria-label":`Filter ${U}`,style:{accentColor:"var(--accent)",cursor:"pointer"}}),d.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:Be[b],display:"inline-block"}}),d.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:U})]},b)})})]}),d.jsxs("div",{style:wa,children:[d.jsxs("div",{style:La,children:[d.jsx("span",{children:"Strength"}),d.jsxs("span",{style:Ya,children:[R.toFixed(2)," – ",C.toFixed(2)]})]}),d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[d.jsx("input",{type:"range",min:0,max:1,step:.01,value:R,"aria-label":"Strength minimum",onChange:b=>{const U=parseFloat(b.target.value);o(U>C?[C,U]:[U,C])},style:Go}),d.jsx("input",{type:"range",min:0,max:1,step:.01,value:C,"aria-label":"Strength maximum",onChange:b=>{const U=parseFloat(b.target.value);o(U<R?[U,R]:[R,U])},style:Go})]})]}),d.jsxs("div",{style:wa,children:[d.jsxs("div",{style:La,children:[d.jsx("span",{children:"Fading only"}),d.jsx("span",{style:Ya,children:B===0?"(none)":`${B} of ${O}`})]}),d.jsxs("label",{style:{...rs,opacity:B===0?.5:1,cursor:B===0?"not-allowed":"pointer"},children:[d.jsx("input",{type:"checkbox",checked:c.fadingOnly,disabled:B===0,onChange:b=>x(b.target.checked),"aria-label":"Show only fading memories",style:{accentColor:"var(--accent)",cursor:"inherit"}}),d.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:"fading"}),d.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:9,color:"var(--text-faint)",marginLeft:6},children:"< 0.1 strength, unpinned"})]})]}),d.jsxs("div",{style:wa,children:[d.jsxs("div",{style:La,children:[d.jsx("span",{children:"Aged out only"}),d.jsx("span",{style:Ya,children:E===0?"(none)":`${E} of ${O}`})]}),d.jsxs("label",{style:{...rs,opacity:E===0?.5:1,cursor:E===0?"not-allowed":"pointer"},children:[d.jsx("input",{type:"checkbox",checked:c.agedOutOnly,disabled:E===0,onChange:b=>z(b.target.checked),"aria-label":"Show only memories aged out of trust",style:{accentColor:"var(--accent)",cursor:"inherit"}}),d.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:"aged out"}),d.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:9,color:"var(--text-faint)",marginLeft:6},children:"not retrieved in 30d, unpinned"})]})]}),d.jsxs("div",{style:wa,children:[d.jsxs("div",{style:La,children:[d.jsx("span",{children:"Confidence"}),d.jsx("span",{style:Ya,children:c.confidences.size===0?"all":`${c.confidences.size}/4`})]}),d.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px 14px"},children:_h.map(({key:b,label:U})=>{const H=c.confidences.size===0||c.confidences.has(b);return d.jsxs("label",{style:rs,children:[d.jsx("input",{type:"checkbox",checked:H,onChange:()=>{if(c.confidences.size===0){const w=_h.filter(F=>F.key!==b).map(F=>F.key);m(new Set(w))}else{const w=zh(c.confidences,b);m(w.size===0?new Set:w)}},"aria-label":`Filter ${U}`,style:{accentColor:"var(--accent)",cursor:"pointer"}}),d.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:U})]},b)})})]}),d.jsxs("div",{style:wa,children:[d.jsxs("div",{style:La,children:[d.jsx("span",{children:"Max age"}),d.jsx("span",{style:Ya,children:c.ageMaxDays===null?"any":`≤ ${c.ageMaxDays}d`})]}),d.jsx("input",{type:"range",min:0,max:365,step:1,value:c.ageMaxDays??365,"aria-label":"Max age in days",onChange:b=>{const U=parseInt(b.target.value,10);h(U>=365?null:U)},style:Go})]})]})}const wa={marginBottom:14},La={display:"flex",justifyContent:"space-between",alignItems:"baseline",fontSize:11,fontVariant:"small-caps",letterSpacing:"0.5px",color:"var(--dim)",marginBottom:5},Ya={fontFamily:"var(--font-mono)",fontSize:11,color:"var(--text)",letterSpacing:0},rs={display:"inline-flex",alignItems:"center",gap:5,fontSize:12,cursor:"pointer",userSelect:"none"},Go={width:"100%",accentColor:"var(--accent)"};function rg(c,s){const r=new Map;for(const o of c)if(!(s.size>0&&!s.has(o.id)))for(const m of o.tags)r.set(m,(r.get(m)??0)+1);return Array.from(r.entries()).sort((o,m)=>m[1]!==o[1]?m[1]-o[1]:o[0].localeCompare(m[0]))}function dg({memories:c,visibleIds:s,onTagClick:r,topN:o=30}){const m=rg(c,s),h=m.slice(0,o);if(h.length===0)return d.jsxs("div",{style:{marginBottom:20},children:[d.jsx("h3",{style:Th,children:"Tags"}),d.jsx("div",{style:{fontSize:11,color:"var(--text-faint)",fontStyle:"italic",fontFamily:"var(--font-serif)"},children:"no tags in the current view"})]});const x=h[0][1];return d.jsxs("div",{style:{marginBottom:20},children:[d.jsxs("h3",{style:Th,children:["Tags ",d.jsxs("span",{style:{fontVariant:"normal",fontFamily:"var(--font-mono)",letterSpacing:0,color:"var(--text-faint)",fontSize:10},children:["(",m.length,")"]})]}),d.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:h.map(([z,R])=>{const C=Math.log2(R+1)/Math.log2(x+1),B=9+C*5,E=.55+C*.45,O=z.startsWith("path:");return d.jsxs("button",{type:"button",onClick:()=>r(z),"aria-label":`Filter to tag ${z} (${R} memories)`,title:`${R} memories with tag "${z}"`,style:{background:"var(--ink-faint)",color:"var(--text)",border:"1px solid var(--glass-border)",padding:"2px 8px",borderRadius:3,fontSize:B,fontFamily:"var(--font-mono)",letterSpacing:"0.2px",cursor:"pointer",transition:"background 150ms ease, border-color 150ms ease, opacity 150ms ease",opacity:O?E*.6:E,fontStyle:O?"italic":"normal"},children:[z,d.jsx("span",{style:{marginLeft:4,color:"var(--text-faint)",fontSize:Math.max(B-3,8)},children:R})]},z)})})]})}const Th={fontSize:11,fontVariant:"small-caps",letterSpacing:"1px",fontWeight:400,color:"var(--dim)",marginBottom:10,paddingBottom:6,borderBottom:"1px solid var(--glass-border)"},hg=[{key:"layer",label:"layer",aria:"Color nodes by memory layer (buffer, episodic, semantic)"},{key:"tag",label:"tag",aria:"Color nodes by their top topic tag"},{key:"path",label:"path",aria:"Color nodes by project path"}];function mg({filterState:c,setColorMode:s}){return d.jsxs("div",{role:"group","aria-label":"View settings",style:{marginBottom:20},children:[d.jsx("h3",{style:yg,children:"View"}),d.jsxs("div",{style:pg,children:[d.jsx("span",{children:"Color by"}),d.jsx("span",{style:gg,children:c.colorMode})]}),d.jsx("div",{role:"radiogroup","aria-label":"Color mode",style:vg,children:hg.map(({key:r,label:o,aria:m})=>{const h=c.colorMode===r;return d.jsx("button",{type:"button",role:"radio","aria-checked":h,"aria-label":m,onClick:()=>s(r),style:{...bg,background:h?"rgba(196, 92, 60, 0.10)":"transparent",color:h?"var(--accent)":"var(--dim)",borderColor:h?"var(--accent)":"var(--glass-border)",fontWeight:h?500:400},children:o},r)})})]})}const yg={fontSize:11,fontVariant:"small-caps",letterSpacing:"1px",fontWeight:400,color:"var(--dim)",marginBottom:10,paddingBottom:6,borderBottom:"1px solid var(--glass-border)"},pg={display:"flex",justifyContent:"space-between",alignItems:"baseline",fontSize:11,fontVariant:"small-caps",letterSpacing:"0.5px",color:"var(--dim)",marginBottom:5},gg={fontFamily:"var(--font-mono)",fontSize:11,color:"var(--text)",letterSpacing:"0.5px"},vg={display:"flex",gap:4},bg={flex:1,fontFamily:"var(--font-mono)",fontSize:11,padding:"5px 8px",borderRadius:3,cursor:"pointer",transition:"color 150ms ease, border-color 150ms ease, background 150ms ease",border:"1px solid"},Eh=10,Qo=20,ds=Qo/2,Vo=5,Sg=Vo+2;function xg({projects:c,onSelectProject:s}){if(c.length===0)return null;const r=c.slice(0,Eh),o=Math.max(0,c.length-Eh);return d.jsxs("div",{style:{marginBottom:20},children:[d.jsx("h3",{style:_g,children:"Projects"}),d.jsx("div",{style:zg,children:"(ordered by first-seen)"}),d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[r.map(({tag:m,count:h,anchor:x})=>{const z=ds+x.x/ms*Vo,R=ds+x.y/ms*Vo,C=m.replace("path:","");return d.jsxs("button",{type:"button",onClick:()=>s(m),"aria-label":`Filter to project ${C}, ${h} ${h===1?"memory":"memories"}`,className:"project-row",style:Tg,children:[d.jsxs("svg",{width:Qo,height:Qo,"aria-hidden":!0,style:{flexShrink:0},children:[d.jsx("circle",{cx:ds,cy:ds,r:Sg,fill:"none",stroke:"var(--border)",strokeWidth:1}),d.jsx("circle",{cx:z,cy:R,r:2,fill:"var(--accent)"})]}),d.jsx("span",{style:Eg,children:C}),d.jsx("span",{style:Mg,children:h})]},m)}),o>0&&d.jsxs("div",{style:jg,children:["+",o," more"]})]})]})}const _g={fontSize:11,fontVariant:"small-caps",letterSpacing:"1px",fontWeight:400,color:"var(--dim)",marginBottom:4,paddingBottom:6,borderBottom:"1px solid var(--glass-border)"},zg={fontSize:9,color:"var(--dim)",marginBottom:8,fontStyle:"italic"},Tg={display:"flex",alignItems:"center",gap:8,padding:"4px 6px",background:"transparent",border:"1px solid transparent",borderRadius:3,cursor:"pointer",transition:"background 150ms ease",width:"100%",textAlign:"left"},Eg={flex:1,fontFamily:"var(--font-mono)",fontSize:11,color:"var(--text)"},Mg={fontFamily:"var(--font-mono)",fontSize:10,color:"var(--dim)"},jg={fontSize:9,color:"var(--dim)",textAlign:"center",marginTop:4,fontStyle:"italic",opacity:.7};function Ag({memories:c,stats:s,visibleIds:r,filterActive:o,selectedMemory:m,filterState:h,setQuery:x,setLayers:z,setStrengthRange:R,setConfidences:C,setAgeMaxDays:B,setFadingOnly:E,setAgedOutOnly:O,setColorMode:b,resetFilters:U,projects:H}){const w=o?r.size:c.length;return d.jsxs("aside",{"aria-label":"Filters and stats",style:{position:"absolute",top:48,right:0,width:340,height:"calc(100% - 48px)",background:"var(--glass-bg)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",borderLeft:"1px solid var(--glass-border)",padding:"20px",overflowY:"auto",zIndex:10,boxSizing:"border-box"},children:[d.jsx(og,{stats:s,totalVisible:w,fadingOnly:h.fadingOnly}),d.jsxs("div",{style:{marginBottom:20},children:[d.jsx("h3",{style:Mh,children:"Selected memory"}),m?d.jsxs("div",{style:{fontSize:11,color:"var(--text)",fontFamily:"var(--font-serif)"},children:[d.jsx("div",{style:{marginBottom:4,color:"var(--dim)",fontFamily:"var(--font-mono)",fontSize:9},children:m.id}),d.jsx("div",{style:{lineHeight:1.5},children:m.content.length>140?m.content.slice(0,137)+"…":m.content}),d.jsxs("div",{style:{marginTop:6,color:"var(--dim)",fontFamily:"var(--font-mono)",fontSize:9},children:["click again or press ",d.jsx("em",{children:"esc"})," to deselect"]})]}):d.jsx("div",{style:{fontSize:11,color:"var(--text-faint)",fontStyle:"italic",fontFamily:"var(--font-serif)"},children:"click a memory to see details"})]}),d.jsx(mg,{filterState:h,setColorMode:b}),d.jsx(xg,{projects:H,onSelectProject:x}),d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:10,paddingBottom:6,borderBottom:"1px solid var(--glass-border)"},children:[d.jsx("h3",{style:{...Mh,margin:0,padding:0,border:0},children:"Filters"}),o&&d.jsx("button",{type:"button",onClick:U,"aria-label":"Reset all filters",style:{background:"transparent",border:"none",color:"var(--accent)",cursor:"pointer",fontSize:10,fontFamily:"var(--font-mono)",textTransform:"uppercase",letterSpacing:"0.8px",padding:"2px 4px"},children:"reset"})]}),d.jsx(fg,{filterState:h,stats:s,setLayers:z,setStrengthRange:R,setConfidences:C,setAgeMaxDays:B,setFadingOnly:E,setAgedOutOnly:O}),o&&r.size===0&&d.jsx("div",{style:{fontSize:11,color:"var(--accent)",fontStyle:"italic",fontFamily:"var(--font-serif)",padding:"8px 10px",background:"var(--ink-faint)",borderRadius:3,marginBottom:16},children:"no memories match these filters"}),d.jsx(dg,{memories:c,visibleIds:o?r:new Set,onTagClick:F=>x(F)})]})}const Mh={fontSize:11,fontVariant:"small-caps",letterSpacing:"1px",fontWeight:400,color:"var(--dim)",marginBottom:10,paddingBottom:6,borderBottom:"1px solid var(--glass-border)"};function Dg(c,s,r,o){const m=["size = retrievals","opacity = strength"],h=[];if(s&&(s.openConflicts>0&&h.push("conflicts (open)"),s.resolvedConflicts>0&&h.push("conflicts (resolved)"),s.sharedTag>0&&h.push("shared tags")),h.length>0&&m.push(`lines = ${h.join(" / ")}`),c!=="layer"&&m.push(`color = ${c}`),r){const z=r.cappedFrom!==void 0?`view = local (${r.size}, capped from ${r.cappedFrom})`:`view = local (${r.size})`;m.push(z)}o&&m.push(`layout: settling (${o})`);let x=m.join(" · ");return s?.sharedTagBailed&&s.sharedTag===0&&(x+=" · filter to <500 for tag edges"),x}function Zn({children:c}){return d.jsx("span",{style:{display:"inline-block",fontFamily:"var(--font-mono)",fontSize:9,padding:"1px 5px",background:"var(--ink-faint)",border:"1px solid var(--glass-border)",borderRadius:3,color:"var(--text)",lineHeight:1.3,marginRight:3},children:c})}const Cg=[{key:"buffer",label:"buffer"},{key:"episodic",label:"episodic"},{key:"semantic",label:"semantic"}];function Og({drawerOpen:c,onToggleDrawer:s,visibleCount:r,colorMode:o="layer",edgeCounts:m,localView:h,forceSettling:x}){const z=Dg(o,m,h,x);return d.jsxs("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:36,background:"var(--glass-bg)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",borderTop:"1px solid var(--glass-border)",display:"flex",alignItems:"center",padding:"0 24px",gap:24,fontSize:10,fontFamily:"var(--font-mono)",color:"var(--dim)",zIndex:25,pointerEvents:"auto"},children:[d.jsx("div",{style:{display:"flex",alignItems:"center",gap:14},children:Cg.map(({key:R,label:C})=>d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[d.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:Be[R],display:"inline-block"}}),d.jsx("span",{children:C})]},R))}),d.jsx("div",{style:{flex:1}}),d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14},children:[d.jsxs("span",{children:[d.jsx(Zn,{children:"/"})," search"]}),d.jsxs("span",{children:[d.jsx(Zn,{children:"esc"})," clear"]}),d.jsxs("span",{children:[d.jsx(Zn,{children:"f"})," freeze"]}),d.jsxs("span",{children:[d.jsx(Zn,{children:"click"})," open"]}),d.jsxs("span",{role:"button",tabIndex:0,onClick:s,onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),s())},"aria-controls":"memory-drawer","aria-expanded":c,"aria-label":c?"L map, close memory list view":`L list (${r}), open memory list view`,style:{cursor:"pointer",color:c?"var(--accent)":"var(--dim)",transition:"color 150ms ease",userSelect:"none",padding:"6px 4px",display:"inline-flex",alignItems:"center",gap:3},children:[d.jsx(Zn,{children:"L"})," ",c?"map":`list (${r})`]})]}),d.jsx("div",{style:{flex:1}}),d.jsx("div",{style:{fontStyle:"italic",fontFamily:"var(--font-serif)",fontSize:11,color:"var(--dim)",letterSpacing:"0.2px",maxWidth:"50%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:z})]})}function Rg(c,s,r,o){const h=(r?c.filter(x=>s.has(x.id)):c).filter(x=>!(x.content.split(/\n/)[0]?.trim()??"").startsWith("[")).map(x=>({m:x,score:x.strength*Math.log2(x.retrieval_count+2)}));return h.sort((x,z)=>z.score-x.score),h.slice(0,o).map(x=>x.m)}function Ug(c){let s=c.content.split(/\n/)[0]?.trim()??"";return s=s.replace(/^\[[^\]]*\]\s*/,""),s.length===0?"":s.length<=28?s:s.slice(0,27).trimEnd()+"…"}function Bg({memories:c,visibleIds:s,filterActive:r,scene:o,topN:m=10}){const h=N.useMemo(()=>Rg(c,s,r,m),[c,s,r,m]),x=N.useRef(new Map);return N.useEffect(()=>{const z=new Set(h.map(R=>R.id));for(const R of x.current.keys())z.has(R)||x.current.delete(R)},[h]),N.useEffect(()=>{if(!o)return;const z=new Wt,R=o.getRenderer(),C=new It,B=[],E=b=>{const U=R.getSize(C),H=U.x,w=U.y;B.length=0;for(const F of h){const Y=o.getNodePosition(F.id),q=x.current.get(F.id);if(!Y||!q)continue;if(z.set(Y.x,Y.y,Y.z),z.project(b),Math.abs(z.x)>1||Math.abs(z.y)>1||z.z<-1||z.z>1){q.style.opacity="0";continue}const K=(z.x*.5+.5)*H,I=(-z.y*.5+.5)*w,Q=K+12,Z=I-8,$=q.offsetWidth||160,G=q.offsetHeight||18;let ft=!1;for(const at of B)if(Q<at.x+at.w&&Q+$>at.x&&Z<at.y+at.h&&Z+G>at.y){ft=!0;break}if(ft){q.style.opacity="0";continue}B.push({x:Q,y:Z,w:$,h:G}),q.style.transform=`translate(${Math.round(Q)}px, ${Math.round(Z)}px)`,q.style.opacity="1"}};return o.onRender(E)},[o,h]),d.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:72,left:24,right:364,bottom:60,pointerEvents:"none",zIndex:5,overflow:"hidden"},children:h.map(z=>d.jsxs("div",{ref:R=>{x.current.set(z.id,R)},style:{position:"absolute",top:0,left:0,transform:"translate(-9999px, -9999px)",opacity:0,transition:"opacity 200ms ease",fontFamily:"var(--font-serif)",fontWeight:600,fontSize:11,color:"var(--text)",background:"var(--glass-bg-strong)",padding:"2px 8px",borderRadius:3,border:"1px solid var(--glass-border)",boxShadow:"0 1px 3px var(--ink-shadow)",letterSpacing:"0.2px",whiteSpace:"nowrap",pointerEvents:"none"},children:[d.jsx("span",{style:{display:"inline-block",width:5,height:5,borderRadius:"50%",background:Be[z.layer],marginRight:5,verticalAlign:"middle"}}),Ug(z)]},z.id))})}function Ng(c){return c==="tag"||c==="path"}const jh=280;function Hg(c,s){const r=c.split(/\n/)[0]?.trim()??"";return r.length<=s?r:r.slice(0,s-1).trimEnd()+"…"}function wg({memories:c,visibleIds:s,filterActive:r,colorMode:o="layer",open:m,onClose:h,onMemorySelect:x,selectedMemoryId:z,resetFilters:R}){const C=o==="tag"||o==="path",B=N.useMemo(()=>r?c.filter(b=>s.has(b.id)):c,[c,s,r]),E=N.useRef(null);N.useEffect(()=>{if(!m)return;const b=E.current;if(!b)return;(z?b.querySelector(`tr[data-memory-id="${z}"]`):b.querySelector("tr[data-memory-id]"))?.focus()},[m,z]);function O(b){const U=E.current;if(!U)return;const H=Array.from(U.querySelectorAll("tr[data-memory-id]")),w=H.findIndex(F=>F===document.activeElement);if(b.key==="ArrowDown"&&w<H.length-1)b.preventDefault(),H[w+1]?.focus();else if(b.key==="ArrowUp"&&w>0)b.preventDefault(),H[w-1]?.focus();else if(b.key==="Escape")b.preventDefault(),h();else if((b.key==="Enter"||b.key===" ")&&w>=0){b.preventDefault();const Y=H[w]?.dataset.memoryId,q=Y?c.find(K=>K.id===Y):void 0;q&&x(q)}}return d.jsxs("div",{id:"memory-drawer",role:"region","aria-label":`Memory list view, ${B.length} ${B.length===1?"memory":"memories"}${r?" (filtered)":""}`,"data-drawer":"memory-list",style:{position:"absolute",bottom:36,left:0,right:0,height:jh,background:"var(--glass-bg-strong)",backdropFilter:"blur(24px)",WebkitBackdropFilter:"blur(24px)",borderTop:"1px solid var(--glass-border)",boxShadow:"0 -4px 24px var(--ink-shadow)",transform:m?"translateY(0)":`translateY(${jh}px)`,transition:"transform 250ms cubic-bezier(0.16, 1, 0.3, 1)",overflow:"hidden",zIndex:22,display:"flex",flexDirection:"column"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 20px",borderBottom:"1px solid var(--glass-border)"},children:[d.jsxs("h2",{style:{margin:0,fontSize:11,fontVariant:"small-caps",letterSpacing:"1px",color:"var(--dim)",fontWeight:400},children:["Memory list",d.jsxs("span",{style:{marginLeft:8,fontFamily:"var(--font-mono)",fontSize:10,color:"var(--text-faint)",letterSpacing:0,fontVariant:"normal"},children:[B.length,r?" of "+c.length+" (filtered)":""]})]}),d.jsx("button",{type:"button",onClick:h,"aria-label":"Close memory list",style:{background:"var(--ink-faint)",border:"none",borderRadius:3,color:"var(--dim)",cursor:"pointer",padding:"4px 10px",fontSize:10,fontFamily:"var(--font-mono)",textTransform:"uppercase",letterSpacing:"0.6px"},children:"close (esc)"})]}),B.length===0?d.jsxs("div",{style:{padding:"32px 20px",textAlign:"center",color:"var(--text-faint)",fontFamily:"var(--font-serif)",fontStyle:"italic",fontSize:13},children:["no memories match these filters",d.jsx("div",{style:{marginTop:12},children:d.jsx("button",{type:"button",onClick:R,style:{background:"transparent",border:"1px solid var(--accent)",color:"var(--accent)",padding:"4px 12px",borderRadius:3,fontFamily:"var(--font-mono)",fontSize:10,textTransform:"uppercase",letterSpacing:"0.6px",cursor:"pointer",fontStyle:"normal"},children:"reset filters"})})]}):d.jsx("div",{style:{overflow:"auto",flex:1},children:d.jsxs("table",{onKeyDown:O,style:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed"},children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{style:qa,scope:"col",children:"id"}),d.jsx("th",{style:qa,scope:"col",children:"content"}),d.jsx("th",{style:{...qa,width:60},scope:"col",children:"layer"}),C&&d.jsx("th",{style:{...qa,width:80},scope:"col",children:"tag"}),d.jsx("th",{style:{...qa,width:70},scope:"col",children:"strength"}),d.jsx("th",{style:{...qa,width:60},scope:"col",children:"age"})]})}),d.jsx("tbody",{ref:E,children:B.map(b=>{const U=b.id===z;return d.jsxs("tr",{"data-memory-id":b.id,tabIndex:0,role:"row","aria-selected":U,onClick:()=>x(b),onFocus:H=>{H.currentTarget.scrollIntoView({block:"nearest"})},style:{cursor:"pointer",borderLeft:U?"2px solid var(--accent)":"2px solid transparent",background:U?"rgba(196, 92, 60, 0.06)":"transparent",outline:"none"},onMouseEnter:H=>{U||(H.currentTarget.style.background="rgba(196, 185, 168, 0.12)")},onMouseLeave:H=>{U||(H.currentTarget.style.background="transparent")},children:[d.jsx("td",{style:{...Ga,fontFamily:"var(--font-mono)",color:"var(--dim)",fontSize:10},children:b.id.slice(0,10)}),d.jsx("td",{style:{...Ga,color:"var(--text)",fontSize:12,fontFamily:"var(--font-serif)"},children:Hg(b.content,55)}),d.jsxs("td",{style:{...Ga,textAlign:"center"},children:[d.jsx("span",{title:b.layer,style:{display:"inline-block",width:7,height:7,borderRadius:"50%",background:Be[b.layer],verticalAlign:"middle"}}),Fo(b)&&d.jsx("span",{title:"fading (strength < 0.1, unpinned)",style:{display:"inline-block",width:5,height:5,borderRadius:"50%",background:"var(--accent)",verticalAlign:"middle",marginLeft:4}})]}),C&&Ng(o)&&(()=>{const H=Wo(b,o)??"";return d.jsx("td",{style:{...Ga,fontFamily:"var(--font-mono)",fontSize:10,color:"var(--dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:H,children:H})})(),d.jsx("td",{style:{...Ga,fontFamily:"var(--font-mono)",fontSize:11,color:"var(--text)"},children:b.strength.toFixed(2)}),d.jsxs("td",{style:{...Ga,fontFamily:"var(--font-mono)",fontSize:11,color:"var(--dim)"},children:[b.age_days,"d"]})]},b.id)})})]})})]})}const qa={textAlign:"left",padding:"7px 20px",fontFamily:"var(--font-serif)",fontSize:10,fontVariant:"small-caps",letterSpacing:"0.6px",color:"var(--dim)",fontWeight:400,background:"var(--map-bg)",position:"sticky",top:0},Ga={padding:"7px 20px",height:28,verticalAlign:"middle",borderBottom:"1px solid var(--glass-border)"};function Lg({onActivate:c}){return d.jsx("a",{href:"#memory-drawer",onClick:s=>{s.preventDefault(),c()},onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),c())},style:{position:"absolute",left:-9999,top:8,zIndex:1e3,background:"var(--bg)",border:"1px solid var(--accent)",color:"var(--accent)",padding:"8px 16px",borderRadius:3,fontFamily:"var(--font-serif)",fontSize:13,textDecoration:"none"},onFocus:s=>{s.currentTarget.style.left="8px"},onBlur:s=>{s.currentTarget.style.left="-9999px"},children:"Skip to memory list"})}const Yg=5,qg=60;function Gg(c,s){const r=new Map,o=(h,x)=>{if(h===x)return;let z=r.get(h);z===void 0&&(z=new Set,r.set(h,z)),z.add(x)};for(const h of s)o(h.memory_a_id,h.memory_b_id),o(h.memory_b_id,h.memory_a_id);const m=Hh(c,{excludePrefix:"path:",softCap:50,hardCap:300,perTagTopK:15,minShared:2});for(const h of m)o(h.a,h.b),o(h.b,h.a);return r}function Xg(c,s,r){const o=Math.min(Math.max(0,r),Yg),m=Ah(c,s,o);return m.size>qg&&o>1?{memoryIds:Ah(c,s,1),depthUsed:1,cappedFrom:{requestedDepth:o,wouldHaveBeen:m.size}}:{memoryIds:m,depthUsed:o}}function Ah(c,s,r){const o=new Set([s]);if(r<=0)return o;let m=[s];for(let h=0;h<r;h++){const x=[];for(const z of m){const R=c.get(z);if(R)for(const C of R)o.has(C)||(o.add(C),x.push(C))}if(x.length===0)break;m=x}return o}function Zg({value:c}){return d.jsx("div",{style:{width:"100%",height:3,background:"var(--glass-border)",borderRadius:2,overflow:"hidden"},children:d.jsx("div",{style:{width:`${c*100}%`,height:"100%",borderRadius:2,background:`linear-gradient(90deg, var(--accent), ${c>.5?"var(--green)":"var(--yellow)"})`}})})}function Qg({memory:c,localView:s,setLocalView:r}){const o=s?.centerId===c.id,m=s!==null;let h,x,z;return o?(h="focused",x={...Vg,cursor:"default"},z="This memory is the focused center"):m?(h="recenter here",x=Kg,z="Recenter the focused view on this memory"):(h="focus",x=$o,z="Focus the graph on this memory's neighborhood (depth 2)"),d.jsx("button",{type:"button","aria-label":z,title:z,onClick:()=>{o||r({centerId:c.id,depth:2})},style:x,children:h})}const $o={background:"var(--ink-faint)",border:"1px solid var(--glass-border)",color:"var(--dim)",borderRadius:4,padding:"4px 12px",fontFamily:"var(--font-mono)",fontSize:11,cursor:"pointer"},Vg={...$o,background:"rgba(196, 92, 60, 0.18)",border:"1px solid var(--accent)",color:"var(--accent)"},Kg={...$o,background:"transparent",border:"1px solid transparent",color:"var(--accent)"};function kg({memory:c,onClose:s,open:r,localView:o,setLocalView:m}){if(!c&&!r)return null;const h=c?Be[c.layer]:"var(--accent)";return d.jsx("div",{role:"dialog","aria-label":"Memory details",style:{position:"absolute",top:0,right:0,width:"min(360px, 48vw)",height:"100%",background:"var(--glass-bg-strong)",backdropFilter:"blur(24px)",WebkitBackdropFilter:"blur(24px)",borderLeft:"1px solid var(--glass-border)",overflowY:"auto",zIndex:50,transform:r?"translateX(0)":"translateX(100%)",transition:"transform 250ms cubic-bezier(0.16, 1, 0.3, 1)"},children:c&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{style:{padding:"20px 24px 16px",borderBottom:"1px solid var(--glass-border)",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[d.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:h,boxShadow:`0 0 8px ${h}40`}}),d.jsx("span",{style:{color:"var(--dim)",fontSize:10,fontFamily:"var(--font-mono)",letterSpacing:"0.5px",textTransform:"uppercase"},children:c.layer}),d.jsx(Qg,{memory:c,localView:o,setLocalView:m})]}),d.jsx("button",{onClick:s,style:{background:"var(--ink-faint)",border:"none",borderRadius:4,color:"var(--dim)",cursor:"pointer",padding:"4px 10px",fontSize:11,fontFamily:"var(--font-mono)"},children:"esc"})]}),d.jsxs("div",{style:{padding:"20px 24px"},children:[d.jsx("div",{style:{color:"var(--text)",fontSize:13,lineHeight:1.7,whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"var(--font-body)",marginBottom:20},children:c.content}),d.jsxs("div",{style:{marginBottom:16},children:[d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:6},children:[d.jsx("span",{style:{color:"var(--dim)",fontSize:10,fontFamily:"var(--font-mono)"},children:"STRENGTH"}),d.jsx("span",{style:{color:"var(--text)",fontSize:11,fontFamily:"var(--font-mono)"},children:c.strength.toFixed(3)})]}),d.jsx(Zg,{value:c.strength})]}),d.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px 20px",fontSize:11,marginBottom:20},children:[["Half-life",`${c.half_life_days}d`],["Retrievals",String(c.retrieval_count)],["Age",`${c.age_days}d`],["Schema fit",c.schema_fit.toFixed(2)],["Valence",c.emotional_valence],["Confidence",c.aged_out?`${c.confidence} (aged out)`:c.confidence],["+7d",c.projected_strength_7d.toFixed(3)],["+30d",c.projected_strength_30d.toFixed(3)]].map(([x,z])=>d.jsxs("div",{children:[d.jsx("div",{style:{color:"var(--dim)",fontSize:9,fontFamily:"var(--font-mono)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:2},children:x}),d.jsx("div",{style:{color:"var(--text)",fontFamily:"var(--font-mono)"},children:z})]},x))}),c.tags.length>0&&d.jsx("div",{style:{display:"flex",gap:5,flexWrap:"wrap",marginBottom:16},children:c.tags.map(x=>d.jsx("span",{style:{background:"var(--ink-faint)",color:"var(--dim)",padding:"3px 10px",borderRadius:12,fontSize:10,fontFamily:"var(--font-mono)"},children:x},x))}),d.jsxs("div",{style:{fontSize:10,color:"var(--text-faint)",fontFamily:"var(--font-mono)",borderTop:"1px solid var(--glass-border)",paddingTop:12},children:[d.jsx("div",{children:c.id}),d.jsxs("div",{style:{marginTop:4},children:[new Date(c.created).toLocaleDateString()," → ",new Date(c.last_retrieved).toLocaleDateString()]})]})]})]})})}function Jg({memories:c,embeddings:s,homePathTags:r,stats:o,conflicts:m,filterState:h,frozenOrigin:x,setQuery:z,setFrozen:R,setLayers:C,setStrengthRange:B,setConfidences:E,setAgeMaxDays:O,setFadingOnly:b,setAgedOutOnly:U,setColorMode:H,setLocalView:w,resetFilters:F,viewSwitch:Y}){const q=N.useRef(null),[K,I]=N.useState({width:0,height:0}),[Q,Z]=N.useState(null),[$,G]=N.useState(null),[ft,at]=N.useState(!1),rt=N.useMemo(()=>Gg(c,m),[c,m]),nt=N.useMemo(()=>{if(h.localView)return Xg(rt,h.localView.centerId,h.localView.depth)},[rt,h.localView]);N.useEffect(()=>{h.localView&&!c.some(_t=>_t.id===h.localView.centerId)&&w(null)},[c,h.localView]);const ht=N.useMemo(()=>Lp(c,h,nt?.memoryIds),[c,h,nt]),vt=N.useMemo(()=>wp(h),[h]),[M,L]=N.useState(null);N.useEffect(()=>{function _t(Rt){Rt.target instanceof HTMLInputElement||Rt.target instanceof HTMLTextAreaElement||Rt.target instanceof HTMLElement&&Rt.target.closest('[data-drawer="memory-list"]')||(Rt.key==="l"||Rt.key==="L")&&(Rt.preventDefault(),at(be=>!be))}return window.addEventListener("keydown",_t),()=>window.removeEventListener("keydown",_t)},[]),N.useEffect(()=>{const _t=q.current;if(!_t)return;const Rt=new ResizeObserver(be=>{const Ce=be[0];Ce&&I({width:Math.floor(Ce.contentRect.width),height:Math.floor(Ce.contentRect.height)})});return Rt.observe(_t),()=>Rt.disconnect()},[]);const tt=N.useCallback((_t,Rt,be)=>{$||Z(_t?{memory:_t,x:Rt,y:be}:null)},[$]),bt=N.useCallback(_t=>{G(_t),Z(null),_t===null&&w(null)},[w]),{containerRef:mt,handleMouseMove:W,handleClick:k,handleKeyDown:dt,edgeCounts:Ot,forceSettling:Pt,projectAnchorLayout:te}=ng({memories:c,embeddings:s,conflicts:m,homePathTags:r,width:K.width,height:K.height,onHover:tt,onClick:bt,searchQuery:h.query,frozen:h.frozen,visibleIds:ht,filterActive:vt,colorMode:h.colorMode,adjacency:rt,onSceneReady:L}),Wl=N.useMemo(()=>{if(!te)return[];const _t=new Map;for(const Rt of c)for(const be of Rt.tags)te.byTag.has(be)&&_t.set(be,(_t.get(be)??0)+1);return te.orderedTags.map(Rt=>({tag:Rt,count:_t.get(Rt)??0,anchor:te.byTag.get(Rt)}))},[c,te]),$l=N.useMemo(()=>!Q||h.colorMode==="layer"?null:Wo(Q.memory,h.colorMode),[Q,h.colorMode]),Ye=h.query.trim().length>0?c.filter(_t=>Uh(_t,h.query)).length:null,Ka=$!==null;return d.jsxs("div",{ref:q,style:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},onKeyDown:dt,tabIndex:0,children:[d.jsx(Lg,{onActivate:()=>at(!0)}),d.jsxs("div",{role:"region","aria-label":"Memory graph (visual representation)",style:{position:"absolute",top:72,left:24,right:364,bottom:60,border:"1px solid var(--border)",borderRadius:2,background:"var(--map-bg)",overflow:"hidden",zIndex:0},children:[d.jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0},children:d.jsx("div",{ref:mt,onMouseMove:W,onClick:k,style:{position:"absolute",inset:0}})}),d.jsxs("button",{type:"button",className:"sr-only",onClick:()=>at(!0),children:["For a tabular alternative, view the memory list (",c.length," memories)"]})]}),d.jsx(ug,{memoryCount:c.length,matchCount:Ye,stats:o,filterState:h,frozenOrigin:x,setQuery:z,setFrozen:R,setFadingOnly:b,viewSwitch:Y}),d.jsx(Bg,{memories:c,visibleIds:ht,filterActive:vt,scene:M}),d.jsx(Ag,{memories:c,stats:o,visibleIds:ht,filterActive:vt,selectedMemory:$,filterState:h,setQuery:z,setLayers:C,setStrengthRange:B,setConfidences:E,setAgeMaxDays:O,setFadingOnly:b,setAgedOutOnly:U,setColorMode:H,resetFilters:F,projects:Wl}),Ye===0&&h.query.trim().length>0&&d.jsx("div",{style:{position:"absolute",top:56,right:24,zIndex:21,background:"var(--ink-faint)",padding:"4px 12px",borderRadius:12,fontFamily:"var(--font-mono)",fontSize:10,color:"var(--dim)"},children:"no matches"}),Q&&!$&&d.jsx(ig,{memory:Q.memory,x:Q.x,y:Q.y,colorMode:h.colorMode,colorTag:$l}),d.jsx(kg,{memory:$,onClose:()=>{G(null),w(null)},open:Ka,localView:h.localView,setLocalView:w}),d.jsx(wg,{memories:c,visibleIds:ht,filterActive:vt,colorMode:h.colorMode,open:ft,onClose:()=>at(!1),onMemorySelect:_t=>{G(_t),Z(null)},selectedMemoryId:$?.id??null,resetFilters:F}),d.jsx(Og,{drawerOpen:ft,onToggleDrawer:()=>at(_t=>!_t),visibleCount:vt?ht.size:c.length,colorMode:h.colorMode,edgeCounts:Ot,localView:nt?{size:nt.memoryIds.size,cappedFrom:nt.cappedFrom?.wouldHaveBeen}:void 0,forceSettling:Pt})]})}const Fg=[{key:"map",label:"map",aria:"Memory map"},{key:"board",label:"board",aria:"Card board"}];function Wg({view:c,onChange:s,autoFocus:r}){function o(m){m.key!=="ArrowLeft"&&m.key!=="ArrowRight"&&m.key!=="ArrowUp"&&m.key!=="ArrowDown"||(m.preventDefault(),s(c==="map"?"board":"map"))}return d.jsx("div",{role:"radiogroup","aria-label":"Dashboard view",onKeyDown:o,style:$g,children:Fg.map(({key:m,label:h,aria:x})=>{const z=c===m;return d.jsx("button",{type:"button",role:"radio","aria-checked":z,"aria-label":x,tabIndex:z?0:-1,autoFocus:r&&z,onClick:()=>{z||s(m)},style:{...Ig,background:z?"rgba(196, 92, 60, 0.10)":"transparent",color:z?"var(--accent)":"var(--dim)",borderColor:z?"var(--accent)":"var(--glass-border)",fontWeight:z?500:400},children:h},m)})})}const $g={display:"flex",gap:4},Ig={fontSize:10,fontFamily:"var(--font-mono)",padding:"2px 8px",borderRadius:3,cursor:"pointer",transition:"color 150ms ease, border-color 150ms ease, background 150ms ease",border:"1px solid"};function qh(c,s){return c.leaseUntil===null||Date.parse(c.leaseUntil)<s}function Pg(c,s){return qh(c,s)?d.jsxs(d.Fragment,{children:[d.jsx("span",{style:dv})," expired"]}):c.leaseUntil!==null?`until ${new Date(c.leaseUntil).toLocaleString()}`:null}function Jl({label:c,value:s}){return d.jsxs("div",{children:[d.jsx("div",{style:Gh,children:c}),d.jsx("div",{style:ov,children:s})]})}function Xa({label:c,children:s}){return d.jsxs("div",{style:{marginBottom:16},children:[d.jsx("div",{style:Gh,children:c}),d.jsx("div",{style:cv,children:s})]})}function tv({cardId:c,refreshKey:s,onClose:r}){const[o,m]=N.useState(null),[h,x]=N.useState(null),z=N.useRef(null);N.useEffect(()=>{let C=!1;return x(null),np(c).then(B=>{C||m(B)}).catch(B=>{C||x(ko(B))}),()=>{C=!0}},[c,s]),N.useEffect(()=>{z.current?.focus()},[]),N.useEffect(()=>{function C(B){B.key==="Escape"&&r()}return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[r]);const R=Date.now();return d.jsxs("div",{role:"dialog","aria-label":"Card details",style:ev,children:[d.jsxs("div",{style:lv,children:[d.jsx("span",{style:av,children:o?.card.status??""}),d.jsx("button",{ref:z,type:"button","aria-label":"esc, close card details",onClick:r,style:nv,children:"esc"})]}),d.jsx("div",{style:iv,children:o?d.jsxs(d.Fragment,{children:[h!==null&&d.jsx("div",{role:"alert",style:Dh,children:h}),d.jsx("div",{style:sv,children:o.card.title}),d.jsxs("div",{style:uv,children:[d.jsx(Jl,{label:"Status",value:o.card.status}),o.card.assigneeRuntime!==null&&d.jsx(Jl,{label:"Assignee",value:o.card.assigneeRuntime}),o.card.status==="running"&&d.jsx(Jl,{label:"Lease",value:Pg(o.card,R)}),o.card.heartbeatAt!==null&&d.jsx(Jl,{label:"Heartbeat",value:new Date(o.card.heartbeatAt).toLocaleString()}),o.card.repo!==null&&d.jsx(Jl,{label:"Repo",value:o.card.repo}),o.card.budget!==null&&d.jsx(Jl,{label:"Budget",value:String(o.card.budget)}),d.jsx(Jl,{label:"Updated",value:new Date(o.card.updatedAt).toLocaleString()})]}),o.card.contract!==null&&d.jsx(Xa,{label:"Contract",children:d.jsx("div",{style:{whiteSpace:"pre-wrap"},children:o.card.contract})}),o.deps.parents.length>0&&d.jsx(Xa,{label:"Parents",children:o.deps.parents.join(", ")}),o.deps.children.length>0&&d.jsx(Xa,{label:"Children",children:o.deps.children.join(", ")}),o.runs.length>0&&d.jsx(Xa,{label:"Runs",children:o.runs.map(C=>d.jsxs("div",{children:["run ",C.id,": ",C.runtime," started ",new Date(C.started).toLocaleString(),C.ended!==null?d.jsxs(d.Fragment,{children:[" ended ",new Date(C.ended).toLocaleString()," (",C.outcome,")"]}):" (open)"]},C.id))}),o.comments.length>0&&d.jsx(Xa,{label:"Comments",children:o.comments.map(C=>d.jsxs("div",{children:["[",new Date(C.createdAt).toLocaleString(),"] ",C.author,": ",C.body]},C.id))}),o.handoff!==null&&d.jsxs(Xa,{label:"Latest handoff",children:[d.jsxs("div",{children:["Session: ",o.handoff.sessionId,", updated ",new Date(o.handoff.updatedAt).toLocaleString()]}),d.jsx("div",{children:o.handoff.summary})]}),d.jsx("div",{style:fv,children:o.card.id})]}):h?d.jsx("div",{role:"alert",style:Dh,children:h}):d.jsx("div",{role:"status",style:rv,children:"loading card"})})]})}const ev={position:"absolute",top:48,right:0,width:"min(360px, 48vw)",height:"calc(100% - 48px)",background:"var(--glass-bg-strong)",backdropFilter:"blur(24px)",WebkitBackdropFilter:"blur(24px)",borderLeft:"1px solid var(--glass-border)",overflowY:"auto",zIndex:50},lv={padding:"20px 24px 16px",borderBottom:"1px solid var(--glass-border)",display:"flex",justifyContent:"space-between",alignItems:"flex-start"},av={color:"var(--dim)",fontSize:10,fontFamily:"var(--font-mono)",letterSpacing:"0.5px",textTransform:"uppercase"},nv={background:"var(--ink-faint)",border:"none",borderRadius:4,color:"var(--dim)",cursor:"pointer",padding:"4px 10px",fontSize:11,fontFamily:"var(--font-mono)"},iv={padding:"20px 24px"},sv={color:"var(--text)",fontSize:13,lineHeight:1.7,whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"var(--font-body)",marginBottom:20},uv={display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px 20px",fontSize:11,marginBottom:20},Gh={color:"var(--dim)",fontSize:9,fontFamily:"var(--font-mono)",textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:2},ov={color:"var(--text)",fontFamily:"var(--font-mono)",wordBreak:"break-word"},cv={color:"var(--text)",fontFamily:"var(--font-mono)",fontSize:11,wordBreak:"break-word"},fv={fontSize:10,color:"var(--text-faint)",fontFamily:"var(--font-mono)",borderTop:"1px solid var(--glass-border)",paddingTop:12,wordBreak:"break-word"},Dh={color:"var(--red)",fontFamily:"var(--font-mono)",fontSize:11},rv={color:"var(--dim)",fontFamily:"var(--font-mono)",fontSize:11,letterSpacing:"2px"},dv={display:"inline-block",width:8,height:8,borderRadius:"50%",background:"var(--accent)",boxShadow:"0 0 8px var(--accent-focus)",verticalAlign:"middle"},hv=["backlog","ready","running","blocked","review","done","shelved"];function mv(c){return new Date(c).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function yv(c,s){if(c.status==="running"){if(qh(c,s))return d.jsxs(d.Fragment,{children:[c.assigneeRuntime," ",d.jsx("span",{style:Rv}),d.jsx("span",{style:{color:"var(--text)"},children:" lease expired"})]});if(c.leaseUntil!==null)return d.jsxs(d.Fragment,{children:[c.assigneeRuntime," lease until ",mv(c.leaseUntil)]})}return c.assigneeRuntime||null}function pv({viewSwitch:c}){const[s,r]=N.useState(null),[o,m]=N.useState(null),[h,x]=N.useState(!0),[z,R]=N.useState(0),[C,B]=N.useState(null),E=N.useRef(null);N.useEffect(()=>{let w=!1;return ap().then(F=>{w||(r(F.cards),m(null),x(!1))}).catch(F=>{w||(m(ko(F)),x(!1))}),()=>{w=!0}},[z]);function O(){x(!0),R(w=>w+1)}function b(){B(null),C!==null&&E.current?.querySelector(`[data-card-id="${C}"]`)?.focus()}const U=Date.now(),H=s?.length??0;return d.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[d.jsxs("div",{className:"dashboard-bar",style:gv,children:[d.jsxs("div",{style:{flex:"0 0 auto",display:"flex",alignItems:"baseline",gap:12},children:[d.jsx("span",{style:{color:"var(--text)",fontSize:16,fontWeight:700,fontFamily:"var(--font-serif)",letterSpacing:"0.3px"},children:"hippo"}),d.jsx("span",{className:"bar-decorative",style:{color:"var(--accent)",fontSize:11,fontFamily:"var(--font-serif)",fontStyle:"italic"},children:"brain observatory"})]}),c,d.jsx("span",{"aria-live":"polite",className:"bar-live",style:{color:"var(--dim)",fontSize:10,fontFamily:"var(--font-mono)"},children:s!==null?`${H} ${H===1?"card":"cards"}`:""}),d.jsx("div",{style:{flex:1}}),s!==null&&o!==null&&d.jsx("span",{role:"alert",style:{color:"var(--red)",fontSize:10,fontFamily:"var(--font-mono)"},children:o}),d.jsx("button",{type:"button",onClick:O,style:bv,children:h?"refreshing":"refresh"})]}),d.jsxs("div",{ref:E,style:vv,children:[s===null&&o===null&&d.jsx("div",{style:Xo,children:d.jsx("div",{role:"status",style:Sv,children:"loading cards"})}),s===null&&o!==null&&d.jsxs("div",{style:Xo,children:[d.jsx("div",{role:"alert",style:xv,children:o}),d.jsx("div",{style:Ch,children:"is hippo dashboard running?"})]}),s!==null&&s.length===0&&d.jsxs("div",{style:Xo,children:[d.jsx("div",{style:_v,children:"no cards yet"}),d.jsxs("div",{style:Ch,children:["run ",d.jsx("span",{style:{color:"var(--accent)"},children:"hippo card create"})," to begin"]})]}),s!==null&&s.length>0&&hv.map(w=>{const F=s.filter(Y=>Y.status===w);return d.jsxs("section",{"aria-labelledby":`board-col-${w}`,style:zv,children:[d.jsxs("h3",{id:`board-col-${w}`,style:Tv,children:[w," ",d.jsx("span",{style:Ev,children:F.length})]}),d.jsx("ul",{style:Mv,children:F.length===0?d.jsx("li",{style:jv,children:"none"}):F.map(Y=>{const q=yv(Y,U);return d.jsx("li",{children:d.jsxs("button",{type:"button","data-card-id":Y.id,onClick:()=>B(Y.id),style:{...Av,background:Y.id===C?"rgba(196, 92, 60, 0.10)":"transparent",borderColor:Y.id===C?"var(--accent)":"var(--glass-border)"},children:[d.jsx("div",{style:Dv,children:Y.title}),d.jsx("div",{style:Cv,children:Y.id}),q&&d.jsx("div",{style:Ov,children:q})]})},Y.id)})})]},w)})]}),C&&d.jsx(tv,{cardId:C,refreshKey:z,onClose:b},C)]})}const gv={position:"absolute",top:0,left:0,right:0,height:48,zIndex:20,background:"var(--glass-bg)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",borderBottom:"1px solid var(--glass-border)",display:"flex",alignItems:"center",pointerEvents:"auto"},vv={position:"absolute",top:72,left:24,right:24,bottom:24,border:"1px solid var(--border)",borderRadius:2,background:"var(--map-bg)",display:"flex",gap:12,padding:16,overflowX:"auto"},bv={fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.8px",textTransform:"uppercase",background:"transparent",border:"1px solid var(--glass-border)",color:"var(--dim)",padding:"5px 12px",borderRadius:4,cursor:"pointer",transition:"color 150ms ease, border-color 150ms ease, background 150ms ease"},Xo={flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center"},Sv={color:"var(--dim)",fontFamily:"var(--font-mono)",fontSize:11,letterSpacing:"2px"},xv={color:"var(--red)",fontFamily:"var(--font-mono)",fontSize:11,marginBottom:8},_v={color:"var(--dim)",fontSize:12,fontFamily:"var(--font-mono)",marginBottom:8},Ch={color:"var(--text-faint)",fontSize:10,fontFamily:"var(--font-mono)"},zv={flex:"1 0 160px",minWidth:0,display:"flex",flexDirection:"column"},Tv={fontSize:11,fontVariant:"small-caps",letterSpacing:"1px",fontWeight:400,color:"var(--text)",marginBottom:4,paddingBottom:6,borderBottom:"1px solid var(--glass-border)"},Ev={fontFamily:"var(--font-mono)",fontSize:10,color:"var(--dim)"},Mv={listStyle:"none",margin:0,padding:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:6},jv={fontSize:11,color:"var(--text-faint)",fontStyle:"italic",fontFamily:"var(--font-serif)"},Av={display:"block",padding:"8px 10px",background:"transparent",border:"1px solid var(--glass-border)",borderRadius:3,cursor:"pointer",transition:"background 150ms ease",width:"100%",textAlign:"left"},Dv={fontSize:11,lineHeight:1.5,color:"var(--text)",fontFamily:"var(--font-serif)",marginBottom:4},Cv={marginBottom:4,color:"var(--dim)",fontFamily:"var(--font-mono)",fontSize:9,wordBreak:"break-word"},Ov={fontFamily:"var(--font-mono)",fontSize:9,color:"var(--dim)"},Rv={display:"inline-block",width:8,height:8,borderRadius:"50%",background:"var(--accent)",boxShadow:"0 0 8px var(--accent-focus)",verticalAlign:"middle"},Uv=`
|
|
57
|
+
@keyframes hippo-float {
|
|
58
|
+
0%, 100% { transform: translateY(0px); opacity: 0.4; }
|
|
59
|
+
50% { transform: translateY(-6px); opacity: 1; }
|
|
60
|
+
}
|
|
61
|
+
`;function Bv(){const[c,s]=N.useState([]),[r,o]=N.useState(null),[m,h]=N.useState([]),[x,z]=N.useState({}),[R,C]=N.useState(new Set),[B,E]=N.useState("loading"),[O,b]=N.useState(""),[U,H]=N.useState(gh),[w,F]=N.useState(null),[Y,q]=N.useState("map"),[K,I]=N.useState(!1),Q=N.useCallback(W=>{q(W),I(!0)},[]),Z=N.useCallback(W=>{H(k=>({...k,query:W}))},[]),$=N.useCallback(W=>{H(k=>({...k,frozen:W})),F("user")},[]);N.useEffect(()=>{if(!("window"in globalThis)||!(window.matchMedia instanceof Function))return;window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(H(k=>({...k,frozen:!0})),F("os"))},[]);const G=N.useCallback(W=>{H(k=>({...k,layers:W}))},[]),ft=N.useCallback(W=>{H(k=>({...k,strengthRange:W}))},[]),at=N.useCallback(W=>{H(k=>({...k,confidences:W}))},[]),rt=N.useCallback(W=>{H(k=>({...k,ageMaxDays:W}))},[]),nt=N.useCallback(()=>{H(W=>({...gh,frozen:W.frozen,colorMode:W.colorMode}))},[]),ht=N.useCallback(W=>{H(k=>({...k,agedOutOnly:W}))},[]),vt=N.useCallback(W=>{H(k=>({...k,fadingOnly:W}))},[]),M=N.useCallback(W=>{H(k=>({...k,colorMode:W}))},[]),L=N.useCallback(W=>{W!==null&&!c.some(k=>k.id===W.centerId)||H(k=>({...k,localView:W}))},[c]),[tt,bt]=N.useState("");N.useEffect(()=>{U.fadingOnly&&r&&r.at_risk===0&&(H(W=>({...W,fadingOnly:!1})),bt("No more fading memories — fading filter cleared."))},[U.fadingOnly,r?.at_risk]),N.useEffect(()=>{function W(k){Y==="map"&&(k.target instanceof HTMLInputElement||k.target instanceof HTMLTextAreaElement||k.target instanceof HTMLElement&&k.target.closest('[data-drawer="memory-list"]')||(k.key==="f"||k.key==="F")&&$(!U.frozen))}return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[U.frozen,$,Y]),N.useEffect(()=>{Promise.all([I0(),P0(),tp(),lp(),ep()]).then(([W,k,dt,Ot,Pt])=>{s(W),o(k),h(dt),z(Ot),C(new Set(Pt.homePathTags)),E("ready")}).catch(W=>{b(ko(W)),E("error")})},[]);const mt=d.jsx(Wg,{view:Y,onChange:Q,autoFocus:K});return Y==="board"?d.jsx("main",{style:{width:"100%",height:"100%"},children:d.jsx(pv,{viewSwitch:mt})}):B==="loading"?d.jsxs("div",{style:Zo,children:[d.jsx("style",{children:Uv}),d.jsxs("div",{style:{textAlign:"center"},children:[d.jsx("div",{style:{fontSize:32,animation:"hippo-float 2.5s ease-in-out infinite",marginBottom:16,filter:"saturate(0.7)"},children:"🧠"}),d.jsx("div",{role:"status","aria-live":"polite",style:{color:"var(--dim)",fontFamily:"var(--font-mono)",fontSize:11,letterSpacing:"2px"},children:"loading memories"}),d.jsx("div",{style:{marginTop:16},children:mt})]})]}):B==="error"?d.jsx("div",{style:Zo,children:d.jsxs("div",{style:{textAlign:"center",maxWidth:320},children:[d.jsx("div",{style:{color:"var(--red)",fontFamily:"var(--font-mono)",fontSize:11,marginBottom:8},children:O}),d.jsx("div",{style:{color:"var(--text-faint)",fontSize:10,fontFamily:"var(--font-mono)"},children:"is hippo dashboard running?"}),d.jsx("div",{style:{marginTop:16},children:mt})]})}):c.length===0?d.jsx("div",{style:Zo,children:d.jsxs("div",{style:{textAlign:"center"},children:[d.jsx("div",{style:{fontSize:32,marginBottom:16,opacity:.5},children:"🧠"}),d.jsx("div",{style:{color:"var(--dim)",fontSize:12,fontFamily:"var(--font-mono)",marginBottom:8},children:"no memories yet"}),d.jsxs("div",{style:{color:"var(--text-faint)",fontSize:10,fontFamily:"var(--font-mono)"},children:["run"," ",d.jsx("span",{style:{color:"var(--accent)"},children:"hippo remember"})," ","to begin"]}),d.jsx("div",{style:{marginTop:16},children:mt})]})}):d.jsxs("main",{style:{width:"100%",height:"100%"},children:[d.jsx(Jg,{memories:c,embeddings:x,homePathTags:R,stats:r,conflicts:m,filterState:U,frozenOrigin:w,setQuery:Z,setFrozen:$,setLayers:G,setStrengthRange:ft,setConfidences:at,setAgeMaxDays:rt,setFadingOnly:vt,setAgedOutOnly:ht,setColorMode:M,setLocalView:L,resetFilters:nt,viewSwitch:mt}),d.jsx("div",{role:"status","aria-live":"polite",className:"sr-only",children:tt})]})}const Zo={width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"};W0.createRoot(document.getElementById("root")).render(d.jsx(Bv,{}));
|