openclaw-memory-mapper 1.1.0 → 1.2.1
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/dist/assets/index-Bdfku6ev.js +396 -0
- package/dist/assets/index-RgwCWHj7.css +1 -0
- package/dist/index.html +2 -2
- package/dist/server/index.js +32 -0
- package/package.json +4 -4
- package/server/index.ts +32 -0
- package/dist/assets/index-C-wXdWV8.js +0 -351
- package/dist/assets/index-Lq-0Ml6V.css +0 -1
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
function AS(t,a){for(var l=0;l<a.length;l++){const r=a[l];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const c=Object.getOwnPropertyDescriptor(r,s);c&&Object.defineProperty(t,s,c.get?c:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function bh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vd={exports:{}},Hr={};/**
|
|
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 Gg;function CS(){if(Gg)return Hr;Gg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(r,s,c){var u=null;if(c!==void 0&&(u=""+c),s.key!==void 0&&(u=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:t,type:r,key:u,ref:s!==void 0?s:null,props:c}}return Hr.Fragment=a,Hr.jsx=l,Hr.jsxs=l,Hr}var Zg;function TS(){return Zg||(Zg=1,vd.exports=CS()),vd.exports}var d=TS(),bd={exports:{}},_e={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Qg;function MS(){if(Qg)return _e;Qg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),v=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=v&&R[v]||R["@@iterator"],typeof R=="function"?R:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,E={};function _(R,V,W){this.props=R,this.context=V,this.refs=E,this.updater=W||S}_.prototype.isReactComponent={},_.prototype.setState=function(R,V){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,V,"setState")},_.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function k(){}k.prototype=_.prototype;function j(R,V,W){this.props=R,this.context=V,this.refs=E,this.updater=W||S}var C=j.prototype=new k;C.constructor=j,N(C,_.prototype),C.isPureReactComponent=!0;var D=Array.isArray;function z(){}var O={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function Z(R,V,W){var ae=W.ref;return{$$typeof:t,type:R,key:V,ref:ae!==void 0?ae:null,props:W}}function ne(R,V){return Z(R.type,V,R.props)}function Q(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function K(R){var V={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(W){return V[W]})}var te=/\/+/g;function L(R,V){return typeof R=="object"&&R!==null&&R.key!=null?K(""+R.key):V.toString(36)}function G(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(z,z):(R.status="pending",R.then(function(V){R.status==="pending"&&(R.status="fulfilled",R.value=V)},function(V){R.status==="pending"&&(R.status="rejected",R.reason=V)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function M(R,V,W,ae,oe){var se=typeof R;(se==="undefined"||se==="boolean")&&(R=null);var fe=!1;if(R===null)fe=!0;else switch(se){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(R.$$typeof){case t:case a:fe=!0;break;case y:return fe=R._init,M(fe(R._payload),V,W,ae,oe)}}if(fe)return oe=oe(R),fe=ae===""?"."+L(R,0):ae,D(oe)?(W="",fe!=null&&(W=fe.replace(te,"$&/")+"/"),M(oe,V,W,"",function(Ee){return Ee})):oe!=null&&(Q(oe)&&(oe=ne(oe,W+(oe.key==null||R&&R.key===oe.key?"":(""+oe.key).replace(te,"$&/")+"/")+fe)),V.push(oe)),1;fe=0;var ce=ae===""?".":ae+":";if(D(R))for(var ue=0;ue<R.length;ue++)ae=R[ue],se=ce+L(ae,ue),fe+=M(ae,V,W,se,oe);else if(ue=w(R),typeof ue=="function")for(R=ue.call(R),ue=0;!(ae=R.next()).done;)ae=ae.value,se=ce+L(ae,ue++),fe+=M(ae,V,W,se,oe);else if(se==="object"){if(typeof R.then=="function")return M(G(R),V,W,ae,oe);throw V=String(R),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return fe}function U(R,V,W){if(R==null)return R;var ae=[],oe=0;return M(R,ae,"","",function(se){return V.call(W,se,oe++)}),ae}function B(R){if(R._status===-1){var V=R._result;V=V(),V.then(function(W){(R._status===0||R._status===-1)&&(R._status=1,R._result=W)},function(W){(R._status===0||R._status===-1)&&(R._status=2,R._result=W)}),R._status===-1&&(R._status=0,R._result=V)}if(R._status===1)return R._result.default;throw R._result}var Y=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},q={map:U,forEach:function(R,V,W){U(R,function(){V.apply(this,arguments)},W)},count:function(R){var V=0;return U(R,function(){V++}),V},toArray:function(R){return U(R,function(V){return V})||[]},only:function(R){if(!Q(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return _e.Activity=x,_e.Children=q,_e.Component=_,_e.Fragment=l,_e.Profiler=s,_e.PureComponent=j,_e.StrictMode=r,_e.Suspense=g,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,_e.__COMPILER_RUNTIME={__proto__:null,c:function(R){return O.H.useMemoCache(R)}},_e.cache=function(R){return function(){return R.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(R,V,W){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ae=N({},R.props),oe=R.key;if(V!=null)for(se in V.key!==void 0&&(oe=""+V.key),V)!H.call(V,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&V.ref===void 0||(ae[se]=V[se]);var se=arguments.length-2;if(se===1)ae.children=W;else if(1<se){for(var fe=Array(se),ce=0;ce<se;ce++)fe[ce]=arguments[ce+2];ae.children=fe}return Z(R.type,oe,ae)},_e.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:c,_context:R},R},_e.createElement=function(R,V,W){var ae,oe={},se=null;if(V!=null)for(ae in V.key!==void 0&&(se=""+V.key),V)H.call(V,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(oe[ae]=V[ae]);var fe=arguments.length-2;if(fe===1)oe.children=W;else if(1<fe){for(var ce=Array(fe),ue=0;ue<fe;ue++)ce[ue]=arguments[ue+2];oe.children=ce}if(R&&R.defaultProps)for(ae in fe=R.defaultProps,fe)oe[ae]===void 0&&(oe[ae]=fe[ae]);return Z(R,se,oe)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(R){return{$$typeof:h,render:R}},_e.isValidElement=Q,_e.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:B}},_e.memo=function(R,V){return{$$typeof:p,type:R,compare:V===void 0?null:V}},_e.startTransition=function(R){var V=O.T,W={};O.T=W;try{var ae=R(),oe=O.S;oe!==null&&oe(W,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(z,Y)}catch(se){Y(se)}finally{V!==null&&W.types!==null&&(V.types=W.types),O.T=V}},_e.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},_e.use=function(R){return O.H.use(R)},_e.useActionState=function(R,V,W){return O.H.useActionState(R,V,W)},_e.useCallback=function(R,V){return O.H.useCallback(R,V)},_e.useContext=function(R){return O.H.useContext(R)},_e.useDebugValue=function(){},_e.useDeferredValue=function(R,V){return O.H.useDeferredValue(R,V)},_e.useEffect=function(R,V){return O.H.useEffect(R,V)},_e.useEffectEvent=function(R){return O.H.useEffectEvent(R)},_e.useId=function(){return O.H.useId()},_e.useImperativeHandle=function(R,V,W){return O.H.useImperativeHandle(R,V,W)},_e.useInsertionEffect=function(R,V){return O.H.useInsertionEffect(R,V)},_e.useLayoutEffect=function(R,V){return O.H.useLayoutEffect(R,V)},_e.useMemo=function(R,V){return O.H.useMemo(R,V)},_e.useOptimistic=function(R,V){return O.H.useOptimistic(R,V)},_e.useReducer=function(R,V,W){return O.H.useReducer(R,V,W)},_e.useRef=function(R){return O.H.useRef(R)},_e.useState=function(R){return O.H.useState(R)},_e.useSyncExternalStore=function(R,V,W){return O.H.useSyncExternalStore(R,V,W)},_e.useTransition=function(){return O.H.useTransition()},_e.version="19.2.4",_e}var Kg;function io(){return Kg||(Kg=1,bd.exports=MS()),bd.exports}var A=io();const Gt=bh(A),qy=AS({__proto__:null,default:Gt},[A]);var wd={exports:{}},Br={},Sd={exports:{}},Nd={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Fg;function zS(){return Fg||(Fg=1,(function(t){function a(M,U){var B=M.length;M.push(U);e:for(;0<B;){var Y=B-1>>>1,q=M[Y];if(0<s(q,U))M[Y]=U,M[B]=q,B=Y;else break e}}function l(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var U=M[0],B=M.pop();if(B!==U){M[0]=B;e:for(var Y=0,q=M.length,R=q>>>1;Y<R;){var V=2*(Y+1)-1,W=M[V],ae=V+1,oe=M[ae];if(0>s(W,B))ae<q&&0>s(oe,W)?(M[Y]=oe,M[ae]=B,Y=ae):(M[Y]=W,M[V]=B,Y=V);else if(ae<q&&0>s(oe,B))M[Y]=oe,M[ae]=B,Y=ae;else break e}}return U}function s(M,U){var B=M.sortIndex-U.sortIndex;return B!==0?B:M.id-U.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();t.unstable_now=function(){return u.now()-h}}var g=[],p=[],y=1,x=null,v=3,w=!1,S=!1,N=!1,E=!1,_=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function C(M){for(var U=l(p);U!==null;){if(U.callback===null)r(p);else if(U.startTime<=M)r(p),U.sortIndex=U.expirationTime,a(g,U);else break;U=l(p)}}function D(M){if(N=!1,C(M),!S)if(l(g)!==null)S=!0,z||(z=!0,K());else{var U=l(p);U!==null&&G(D,U.startTime-M)}}var z=!1,O=-1,H=5,Z=-1;function ne(){return E?!0:!(t.unstable_now()-Z<H)}function Q(){if(E=!1,z){var M=t.unstable_now();Z=M;var U=!0;try{e:{S=!1,N&&(N=!1,k(O),O=-1),w=!0;var B=v;try{t:{for(C(M),x=l(g);x!==null&&!(x.expirationTime>M&&ne());){var Y=x.callback;if(typeof Y=="function"){x.callback=null,v=x.priorityLevel;var q=Y(x.expirationTime<=M);if(M=t.unstable_now(),typeof q=="function"){x.callback=q,C(M),U=!0;break t}x===l(g)&&r(g),C(M)}else r(g);x=l(g)}if(x!==null)U=!0;else{var R=l(p);R!==null&&G(D,R.startTime-M),U=!1}}break e}finally{x=null,v=B,w=!1}U=void 0}}finally{U?K():z=!1}}}var K;if(typeof j=="function")K=function(){j(Q)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,L=te.port2;te.port1.onmessage=Q,K=function(){L.postMessage(null)}}else K=function(){_(Q,0)};function G(M,U){O=_(function(){M(t.unstable_now())},U)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.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"):H=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(M){switch(v){case 1:case 2:case 3:var U=3;break;default:U=v}var B=v;v=U;try{return M()}finally{v=B}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(M,U){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var B=v;v=M;try{return U()}finally{v=B}},t.unstable_scheduleCallback=function(M,U,B){var Y=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Y+B:Y):B=Y,M){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=B+q,M={id:y++,callback:U,priorityLevel:M,startTime:B,expirationTime:q,sortIndex:-1},B>Y?(M.sortIndex=B,a(p,M),l(g)===null&&M===l(p)&&(N?(k(O),O=-1):N=!0,G(D,B-Y))):(M.sortIndex=q,a(g,M),S||w||(S=!0,z||(z=!0,K()))),M},t.unstable_shouldYield=ne,t.unstable_wrapCallback=function(M){var U=v;return function(){var B=v;v=U;try{return M.apply(this,arguments)}finally{v=B}}}})(Nd)),Nd}var Pg;function OS(){return Pg||(Pg=1,Sd.exports=zS()),Sd.exports}var Ed={exports:{}},St={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Ig;function RS(){if(Ig)return St;Ig=1;var t=io();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(g,p,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:g,containerInfo:p,implementation:y}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,St.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return c(g,p,null,y)},St.flushSync=function(g){var p=u.T,y=r.p;try{if(u.T=null,r.p=2,g)return g()}finally{u.T=p,r.p=y,r.d.f()}},St.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},St.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},St.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,x=h(y,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,w=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:v,fetchPriority:w}):y==="script"&&r.d.X(g,{crossOrigin:x,integrity:v,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},St.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=h(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},St.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,x=h(y,p.crossOrigin);r.d.L(g,y,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},St.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=h(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},St.requestFormReset=function(g){r.d.r(g)},St.unstable_batchedUpdates=function(g,p){return g(p)},St.useFormState=function(g,p,y){return u.H.useFormState(g,p,y)},St.useFormStatus=function(){return u.H.useHostTransitionStatus()},St.version="19.2.4",St}var Jg;function Xy(){if(Jg)return Ed.exports;Jg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Ed.exports=RS(),Ed.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Wg;function kS(){if(Wg)return Br;Wg=1;var t=OS(),a=io(),l=Xy();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function u(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(r(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var i=e,o=n;;){var f=i.return;if(f===null)break;var m=f.alternate;if(m===null){if(o=f.return,o!==null){i=o;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===i)return g(f),e;if(m===o)return g(f),n;m=m.sibling}throw Error(r(188))}if(i.return!==o.return)i=f,o=m;else{for(var b=!1,T=f.child;T;){if(T===i){b=!0,i=f,o=m;break}if(T===o){b=!0,o=f,i=m;break}T=T.sibling}if(!b){for(T=m.child;T;){if(T===i){b=!0,i=m,o=f;break}if(T===o){b=!0,o=m,i=f;break}T=T.sibling}if(!b)throw Error(r(189))}}if(i.alternate!==o)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var x=Object.assign,v=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),j=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function L(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case _:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case z:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case j:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case C:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case O:return n=e.displayName||null,n!==null?n:L(e.type)||"Memo";case H:n=e._payload,e=e._init;try{return L(e(n))}catch{}}return null}var G=Array.isArray,M=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},Y=[],q=-1;function R(e){return{current:e}}function V(e){0>q||(e.current=Y[q],Y[q]=null,q--)}function W(e,n){q++,Y[q]=e.current,e.current=n}var ae=R(null),oe=R(null),se=R(null),fe=R(null);function ce(e,n){switch(W(se,n),W(oe,e),W(ae,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?mg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=mg(n),e=pg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(ae),W(ae,e)}function ue(){V(ae),V(oe),V(se)}function Ee(e){e.memoizedState!==null&&W(fe,e);var n=ae.current,i=pg(n,e.type);n!==i&&(W(oe,e),W(ae,i))}function ye(e){oe.current===e&&(V(ae),V(oe)),fe.current===e&&(V(fe),Rr._currentValue=B)}var xe,me;function je(e){if(xe===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);xe=n&&n[1]||"",me=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+xe+e+me}var Ue=!1;function Me(e,n){if(!e||Ue)return"";Ue=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(ee){var J=ee}Reflect.construct(e,[],re)}else{try{re.call()}catch(ee){J=ee}e.call(re.prototype)}}else{try{throw Error()}catch(ee){J=ee}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(ee){if(ee&&J&&typeof ee.stack=="string")return[ee.stack,J.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=o.DetermineComponentFrameRoot(),b=m[0],T=m[1];if(b&&T){var $=b.split(`
|
|
44
|
+
`),I=T.split(`
|
|
45
|
+
`);for(f=o=0;o<$.length&&!$[o].includes("DetermineComponentFrameRoot");)o++;for(;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;if(o===$.length||f===I.length)for(o=$.length-1,f=I.length-1;1<=o&&0<=f&&$[o]!==I[f];)f--;for(;1<=o&&0<=f;o--,f--)if($[o]!==I[f]){if(o!==1||f!==1)do if(o--,f--,0>f||$[o]!==I[f]){var ie=`
|
|
46
|
+
`+$[o].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=o&&0<=f);break}}}finally{Ue=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?je(i):""}function nt(e,n){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je("Lazy");case 13:return e.child!==n&&n!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return je("Activity");default:return""}}function Lt(e){try{var n="",i=null;do n+=nt(e,i),i=e,e=e.return;while(e);return n}catch(o){return`
|
|
47
|
+
Error generating stack: `+o.message+`
|
|
48
|
+
`+o.stack}}var ht=Object.prototype.hasOwnProperty,rn=t.unstable_scheduleCallback,Dn=t.unstable_cancelCallback,ei=t.unstable_shouldYield,ti=t.unstable_requestPaint,pt=t.unstable_now,Hi=t.unstable_getCurrentPriorityLevel,Ln=t.unstable_ImmediatePriority,da=t.unstable_UserBlockingPriority,ni=t.unstable_NormalPriority,tu=t.unstable_LowPriority,Bi=t.unstable_IdlePriority,nu=t.log,au=t.unstable_setDisableYieldValue,ai=null,Nt=null;function bn(e){if(typeof nu=="function"&&au(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(ai,e)}catch{}}var Et=Math.clz32?Math.clz32:ru,iu=Math.log,lu=Math.LN2;function ru(e){return e>>>=0,e===0?32:31-(iu(e)/lu|0)|0}var Ui=256,Vi=262144,$i=4194304;function Hn(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Yi(e,n,i){var o=e.pendingLanes;if(o===0)return 0;var f=0,m=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var T=o&134217727;return T!==0?(o=T&~m,o!==0?f=Hn(o):(b&=T,b!==0?f=Hn(b):i||(i=T&~e,i!==0&&(f=Hn(i))))):(T=o&~m,T!==0?f=Hn(T):b!==0?f=Hn(b):i||(i=o&~e,i!==0&&(f=Hn(i)))),f===0?0:n!==0&&n!==f&&(n&m)===0&&(m=f&-f,i=n&-n,m>=i||m===32&&(i&4194048)!==0)?n:f}function ii(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function ou(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 xo(){var e=$i;return $i<<=1,($i&62914560)===0&&($i=4194304),e}function Xl(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function li(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function su(e,n,i,o,f,m){var b=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var T=e.entanglements,$=e.expirationTimes,I=e.hiddenUpdates;for(i=b&~i;0<i;){var ie=31-Et(i),re=1<<ie;T[ie]=0,$[ie]=-1;var J=I[ie];if(J!==null)for(I[ie]=null,ie=0;ie<J.length;ie++){var ee=J[ie];ee!==null&&(ee.lane&=-536870913)}i&=~re}o!==0&&yo(e,o,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(b&~n))}function yo(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Et(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|i&261930}function vo(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var o=31-Et(i),f=1<<o;f&n|e[o]&n&&(e[o]|=n),i&=~f}}function bo(e,n){var i=n&-n;return i=(i&42)!==0?1:Gl(i),(i&(e.suspendedLanes|n))!==0?0:i}function Gl(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Zl(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function wo(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Bg(e.type))}function So(e,n){var i=U.p;try{return U.p=e,n()}finally{U.p=i}}var wn=Math.random().toString(36).slice(2),ct="__reactFiber$"+wn,wt="__reactProps$"+wn,Bn="__reactContainer$"+wn,qi="__reactEvents$"+wn,No="__reactListeners$"+wn,cu="__reactHandles$"+wn,Eo="__reactResources$"+wn,ri="__reactMarker$"+wn;function Ql(e){delete e[ct],delete e[wt],delete e[qi],delete e[No],delete e[cu]}function ha(e){var n=e[ct];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Bn]||i[ct]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=Sg(e);e!==null;){if(i=e[ct])return i;e=Sg(e)}return n}e=i,i=e.parentNode}return null}function ma(e){if(e=e[ct]||e[Bn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function pa(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ga(e){var n=e[Eo];return n||(n=e[Eo]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function at(e){e[ri]=!0}var jo=new Set,_o={};function Un(e,n){xa(e,n),xa(e+"Capture",n)}function xa(e,n){for(_o[e]=n,e=0;e<n.length;e++)jo.add(n[e])}var uu=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]*$"),Kl={},Ao={};function fu(e){return ht.call(Ao,e)?!0:ht.call(Kl,e)?!1:uu.test(e)?Ao[e]=!0:(Kl[e]=!0,!1)}function Xi(e,n,i){if(fu(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function Gi(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function on(e,n,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+o)}}function _t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Co(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function du(e,n,i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,m=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(b){i=""+b,m.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(b){i=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ya(e){if(!e._valueTracker){var n=Co(e)?"checked":"value";e._valueTracker=du(e,n,""+e[n])}}function To(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),o="";return e&&(o=Co(e)?e.checked?"true":"false":e.value),e=o,e!==i?(n.setValue(e),!0):!1}function oi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var hu=/[\n"\\]/g;function At(e){return e.replace(hu,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function si(e,n,i,o,f,m,b,T){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+_t(n)):e.value!==""+_t(n)&&(e.value=""+_t(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?Fl(e,b,_t(n)):i!=null?Fl(e,b,_t(i)):o!=null&&e.removeAttribute("value"),f==null&&m!=null&&(e.defaultChecked=!!m),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+_t(T):e.removeAttribute("name")}function Mo(e,n,i,o,f,m,b,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),n!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||n!=null)){ya(e);return}i=i!=null?""+_t(i):"",n=n!=null?""+_t(n):i,T||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=T?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),ya(e)}function Fl(e,n,i){n==="number"&&oi(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Vn(e,n,i,o){if(e=e.options,n){n={};for(var f=0;f<i.length;f++)n["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=n.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&o&&(e[i].defaultSelected=!0)}else{for(i=""+_t(i),n=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function cm(e,n,i){if(n!=null&&(n=""+_t(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+_t(i):""}function um(e,n,i,o){if(n==null){if(o!=null){if(i!=null)throw Error(r(92));if(G(o)){if(1<o.length)throw Error(r(93));o=o[0]}i=o}i==null&&(i=""),n=i}i=_t(n),e.defaultValue=i,o=e.textContent,o===i&&o!==""&&o!==null&&(e.value=o),ya(e)}function Zi(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var S2=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 fm(e,n,i){var o=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,i):typeof i!="number"||i===0||S2.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function dm(e,n,i){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&i[f]!==o&&fm(e,f,o)}else for(var m in n)n.hasOwnProperty(m)&&fm(e,m,n[m])}function mu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var N2=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"]]),E2=/^[\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 zo(e){return E2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $n(){}var pu=null;function gu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qi=null,Ki=null;function hm(e){var n=ma(e);if(n&&(e=n.stateNode)){var i=e[wt]||null;e:switch(e=n.stateNode,n.type){case"input":if(si(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+At(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var o=i[n];if(o!==e&&o.form===e.form){var f=o[wt]||null;if(!f)throw Error(r(90));si(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<i.length;n++)o=i[n],o.form===e.form&&To(o)}break e;case"textarea":cm(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Vn(e,!!i.multiple,n,!1)}}}var xu=!1;function mm(e,n,i){if(xu)return e(n,i);xu=!0;try{var o=e(n);return o}finally{if(xu=!1,(Qi!==null||Ki!==null)&&(ys(),Qi&&(n=Qi,e=Ki,Ki=Qi=null,hm(n),e)))for(n=0;n<e.length;n++)hm(e[n])}}function Pl(e,n){var i=e.stateNode;if(i===null)return null;var o=i[wt]||null;if(o===null)return null;i=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,n,typeof i));return i}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yu=!1;if(Yn)try{var Il={};Object.defineProperty(Il,"passive",{get:function(){yu=!0}}),window.addEventListener("test",Il,Il),window.removeEventListener("test",Il,Il)}catch{yu=!1}var va=null,vu=null,Oo=null;function pm(){if(Oo)return Oo;var e,n=vu,i=n.length,o,f="value"in va?va.value:va.textContent,m=f.length;for(e=0;e<i&&n[e]===f[e];e++);var b=i-e;for(o=1;o<=b&&n[i-o]===f[m-o];o++);return Oo=f.slice(e,1<o?1-o:void 0)}function Ro(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ko(){return!0}function gm(){return!1}function Ct(e){function n(i,o,f,m,b){this._reactName=i,this._targetInst=f,this.type=o,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(i=e[T],this[T]=i?i(m):m[T]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ko:gm,this.isPropagationStopped=gm,this}return x(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ko)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ko)},persist:function(){},isPersistent:ko}),n}var ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=Ct(ci),Jl=x({},ci,{view:0,detail:0}),j2=Ct(Jl),bu,wu,Wl,Lo=x({},Jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wl&&(Wl&&e.type==="mousemove"?(bu=e.screenX-Wl.screenX,wu=e.screenY-Wl.screenY):wu=bu=0,Wl=e),bu)},movementY:function(e){return"movementY"in e?e.movementY:wu}}),xm=Ct(Lo),_2=x({},Lo,{dataTransfer:0}),A2=Ct(_2),C2=x({},Jl,{relatedTarget:0}),Su=Ct(C2),T2=x({},ci,{animationName:0,elapsedTime:0,pseudoElement:0}),M2=Ct(T2),z2=x({},ci,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),O2=Ct(z2),R2=x({},ci,{data:0}),ym=Ct(R2),k2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D2={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"},L2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function H2(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=L2[e])?!!n[e]:!1}function Nu(){return H2}var B2=x({},Jl,{key:function(e){if(e.key){var n=k2[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?D2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nu,charCode:function(e){return e.type==="keypress"?Ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),U2=Ct(B2),V2=x({},Lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vm=Ct(V2),$2=x({},Jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nu}),Y2=Ct($2),q2=x({},ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),X2=Ct(q2),G2=x({},Lo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Z2=Ct(G2),Q2=x({},ci,{newState:0,oldState:0}),K2=Ct(Q2),F2=[9,13,27,32],Eu=Yn&&"CompositionEvent"in window,er=null;Yn&&"documentMode"in document&&(er=document.documentMode);var P2=Yn&&"TextEvent"in window&&!er,bm=Yn&&(!Eu||er&&8<er&&11>=er),wm=" ",Sm=!1;function Nm(e,n){switch(e){case"keyup":return F2.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Em(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fi=!1;function I2(e,n){switch(e){case"compositionend":return Em(n);case"keypress":return n.which!==32?null:(Sm=!0,wm);case"textInput":return e=n.data,e===wm&&Sm?null:e;default:return null}}function J2(e,n){if(Fi)return e==="compositionend"||!Eu&&Nm(e,n)?(e=pm(),Oo=vu=va=null,Fi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return bm&&n.locale!=="ko"?null:n.data;default:return null}}var W2={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 jm(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!W2[e.type]:n==="textarea"}function _m(e,n,i,o){Qi?Ki?Ki.push(o):Ki=[o]:Qi=o,n=js(n,"onChange"),0<n.length&&(i=new Do("onChange","change",null,i,o),e.push({event:i,listeners:n}))}var tr=null,nr=null;function ew(e){sg(e,0)}function Ho(e){var n=pa(e);if(To(n))return e}function Am(e,n){if(e==="change")return n}var Cm=!1;if(Yn){var ju;if(Yn){var _u="oninput"in document;if(!_u){var Tm=document.createElement("div");Tm.setAttribute("oninput","return;"),_u=typeof Tm.oninput=="function"}ju=_u}else ju=!1;Cm=ju&&(!document.documentMode||9<document.documentMode)}function Mm(){tr&&(tr.detachEvent("onpropertychange",zm),nr=tr=null)}function zm(e){if(e.propertyName==="value"&&Ho(nr)){var n=[];_m(n,nr,e,gu(e)),mm(ew,n)}}function tw(e,n,i){e==="focusin"?(Mm(),tr=n,nr=i,tr.attachEvent("onpropertychange",zm)):e==="focusout"&&Mm()}function nw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ho(nr)}function aw(e,n){if(e==="click")return Ho(n)}function iw(e,n){if(e==="input"||e==="change")return Ho(n)}function lw(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Ht=typeof Object.is=="function"?Object.is:lw;function ar(e,n){if(Ht(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var f=i[o];if(!ht.call(n,f)||!Ht(e[f],n[f]))return!1}return!0}function Om(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rm(e,n){var i=Om(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=n&&o>=n)return{node:i,offset:n-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Om(i)}}function km(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?km(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Dm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=oi(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=oi(e.document)}return n}function Au(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var rw=Yn&&"documentMode"in document&&11>=document.documentMode,Pi=null,Cu=null,ir=null,Tu=!1;function Lm(e,n,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Tu||Pi==null||Pi!==oi(o)||(o=Pi,"selectionStart"in o&&Au(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ir&&ar(ir,o)||(ir=o,o=js(Cu,"onSelect"),0<o.length&&(n=new Do("onSelect","select",null,n,i),e.push({event:n,listeners:o}),n.target=Pi)))}function ui(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var Ii={animationend:ui("Animation","AnimationEnd"),animationiteration:ui("Animation","AnimationIteration"),animationstart:ui("Animation","AnimationStart"),transitionrun:ui("Transition","TransitionRun"),transitionstart:ui("Transition","TransitionStart"),transitioncancel:ui("Transition","TransitionCancel"),transitionend:ui("Transition","TransitionEnd")},Mu={},Hm={};Yn&&(Hm=document.createElement("div").style,"AnimationEvent"in window||(delete Ii.animationend.animation,delete Ii.animationiteration.animation,delete Ii.animationstart.animation),"TransitionEvent"in window||delete Ii.transitionend.transition);function fi(e){if(Mu[e])return Mu[e];if(!Ii[e])return e;var n=Ii[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in Hm)return Mu[e]=n[i];return e}var Bm=fi("animationend"),Um=fi("animationiteration"),Vm=fi("animationstart"),ow=fi("transitionrun"),sw=fi("transitionstart"),cw=fi("transitioncancel"),$m=fi("transitionend"),Ym=new Map,zu="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(" ");zu.push("scrollEnd");function sn(e,n){Ym.set(e,n),Un(n,[e])}var Bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Pt=[],Ji=0,Ou=0;function Uo(){for(var e=Ji,n=Ou=Ji=0;n<e;){var i=Pt[n];Pt[n++]=null;var o=Pt[n];Pt[n++]=null;var f=Pt[n];Pt[n++]=null;var m=Pt[n];if(Pt[n++]=null,o!==null&&f!==null){var b=o.pending;b===null?f.next=f:(f.next=b.next,b.next=f),o.pending=f}m!==0&&qm(i,f,m)}}function Vo(e,n,i,o){Pt[Ji++]=e,Pt[Ji++]=n,Pt[Ji++]=i,Pt[Ji++]=o,Ou|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Ru(e,n,i,o){return Vo(e,n,i,o),$o(e)}function di(e,n){return Vo(e,null,null,n),$o(e)}function qm(e,n,i){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i);for(var f=!1,m=e.return;m!==null;)m.childLanes|=i,o=m.alternate,o!==null&&(o.childLanes|=i),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(f=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,f&&n!==null&&(f=31-Et(i),e=m.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=i|536870912),m):null}function $o(e){if(50<_r)throw _r=0,qf=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Wi={};function uw(e,n,i,o){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,n,i,o){return new uw(e,n,i,o)}function ku(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qn(e,n){var i=e.alternate;return i===null?(i=Bt(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Xm(e,n){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Yo(e,n,i,o,f,m){var b=0;if(o=e,typeof e=="function")ku(e)&&(b=1);else if(typeof e=="string")b=pS(e,i,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Z:return e=Bt(31,i,n,f),e.elementType=Z,e.lanes=m,e;case N:return hi(i.children,f,m,n);case E:b=8,f|=24;break;case _:return e=Bt(12,i,n,f|2),e.elementType=_,e.lanes=m,e;case D:return e=Bt(13,i,n,f),e.elementType=D,e.lanes=m,e;case z:return e=Bt(19,i,n,f),e.elementType=z,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:b=10;break e;case k:b=9;break e;case C:b=11;break e;case O:b=14;break e;case H:b=16,o=null;break e}b=29,i=Error(r(130,e===null?"null":typeof e,"")),o=null}return n=Bt(b,i,n,f),n.elementType=e,n.type=o,n.lanes=m,n}function hi(e,n,i,o){return e=Bt(7,e,o,n),e.lanes=i,e}function Du(e,n,i){return e=Bt(6,e,null,n),e.lanes=i,e}function Gm(e){var n=Bt(18,null,null,0);return n.stateNode=e,n}function Lu(e,n,i){return n=Bt(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Zm=new WeakMap;function It(e,n){if(typeof e=="object"&&e!==null){var i=Zm.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Lt(n)},Zm.set(e,n),n)}return{value:e,source:n,stack:Lt(n)}}var el=[],tl=0,qo=null,lr=0,Jt=[],Wt=0,ba=null,Sn=1,Nn="";function Xn(e,n){el[tl++]=lr,el[tl++]=qo,qo=e,lr=n}function Qm(e,n,i){Jt[Wt++]=Sn,Jt[Wt++]=Nn,Jt[Wt++]=ba,ba=e;var o=Sn;e=Nn;var f=32-Et(o)-1;o&=~(1<<f),i+=1;var m=32-Et(n)+f;if(30<m){var b=f-f%5;m=(o&(1<<b)-1).toString(32),o>>=b,f-=b,Sn=1<<32-Et(n)+f|i<<f|o,Nn=m+e}else Sn=1<<m|i<<f|o,Nn=e}function Hu(e){e.return!==null&&(Xn(e,1),Qm(e,1,0))}function Bu(e){for(;e===qo;)qo=el[--tl],el[tl]=null,lr=el[--tl],el[tl]=null;for(;e===ba;)ba=Jt[--Wt],Jt[Wt]=null,Nn=Jt[--Wt],Jt[Wt]=null,Sn=Jt[--Wt],Jt[Wt]=null}function Km(e,n){Jt[Wt++]=Sn,Jt[Wt++]=Nn,Jt[Wt++]=ba,Sn=n.id,Nn=n.overflow,ba=e}var gt=null,Qe=null,De=!1,wa=null,en=!1,Uu=Error(r(519));function Sa(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rr(It(n,e)),Uu}function Fm(e){var n=e.stateNode,i=e.type,o=e.memoizedProps;switch(n[ct]=e,n[wt]=o,i){case"dialog":Oe("cancel",n),Oe("close",n);break;case"iframe":case"object":case"embed":Oe("load",n);break;case"video":case"audio":for(i=0;i<Cr.length;i++)Oe(Cr[i],n);break;case"source":Oe("error",n);break;case"img":case"image":case"link":Oe("error",n),Oe("load",n);break;case"details":Oe("toggle",n);break;case"input":Oe("invalid",n),Mo(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Oe("invalid",n);break;case"textarea":Oe("invalid",n),um(n,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||o.suppressHydrationWarning===!0||dg(n.textContent,i)?(o.popover!=null&&(Oe("beforetoggle",n),Oe("toggle",n)),o.onScroll!=null&&Oe("scroll",n),o.onScrollEnd!=null&&Oe("scrollend",n),o.onClick!=null&&(n.onclick=$n),n=!0):n=!1,n||Sa(e,!0)}function Pm(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:en=!1;return;case 27:case 3:en=!0;return;default:gt=gt.return}}function nl(e){if(e!==gt)return!1;if(!De)return Pm(e),De=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||id(e.type,e.memoizedProps)),i=!i),i&&Qe&&Sa(e),Pm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=wg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=wg(e)}else n===27?(n=Qe,La(e.type)?(e=cd,cd=null,Qe=e):Qe=n):Qe=gt?nn(e.stateNode.nextSibling):null;return!0}function mi(){Qe=gt=null,De=!1}function Vu(){var e=wa;return e!==null&&(Ot===null?Ot=e:Ot.push.apply(Ot,e),wa=null),e}function rr(e){wa===null?wa=[e]:wa.push(e)}var $u=R(null),pi=null,Gn=null;function Na(e,n,i){W($u,n._currentValue),n._currentValue=i}function Zn(e){e._currentValue=$u.current,V($u)}function Yu(e,n,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===i)break;e=e.return}}function qu(e,n,i,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var m=f.dependencies;if(m!==null){var b=f.child;m=m.firstContext;e:for(;m!==null;){var T=m;m=f;for(var $=0;$<n.length;$++)if(T.context===n[$]){m.lanes|=i,T=m.alternate,T!==null&&(T.lanes|=i),Yu(m.return,i,e),o||(b=null);break e}m=T.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(r(341));b.lanes|=i,m=b.alternate,m!==null&&(m.lanes|=i),Yu(b,i,e),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===e){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function al(e,n,i,o){e=null;for(var f=n,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var T=f.type;Ht(f.pendingProps.value,b.value)||(e!==null?e.push(T):e=[T])}}else if(f===fe.current){if(b=f.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Rr):e=[Rr])}f=f.return}e!==null&&qu(n,e,i,o),n.flags|=262144}function Xo(e){for(e=e.firstContext;e!==null;){if(!Ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gi(e){pi=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Im(pi,e)}function Go(e,n){return pi===null&&gi(e),Im(e,n)}function Im(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},Gn===null){if(e===null)throw Error(r(308));Gn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Gn=Gn.next=n;return i}var fw=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},dw=t.unstable_scheduleCallback,hw=t.unstable_NormalPriority,it={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xu(){return{controller:new fw,data:new Map,refCount:0}}function or(e){e.refCount--,e.refCount===0&&dw(hw,function(){e.controller.abort()})}var sr=null,Gu=0,il=0,ll=null;function mw(e,n){if(sr===null){var i=sr=[];Gu=0,il=Ff(),ll={status:"pending",value:void 0,then:function(o){i.push(o)}}}return Gu++,n.then(Jm,Jm),n}function Jm(){if(--Gu===0&&sr!==null){ll!==null&&(ll.status="fulfilled");var e=sr;sr=null,il=0,ll=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function pw(e,n){var i=[],o={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<i.length;f++)(0,i[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),o}var Wm=M.S;M.S=function(e,n){Lp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&mw(e,n),Wm!==null&&Wm(e,n)};var xi=R(null);function Zu(){var e=xi.current;return e!==null?e:Ze.pooledCache}function Zo(e,n){n===null?W(xi,xi.current):W(xi,n.pool)}function e0(){var e=Zu();return e===null?null:{parent:it._currentValue,pool:e}}var rl=Error(r(460)),Qu=Error(r(474)),Qo=Error(r(542)),Ko={then:function(){}};function t0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function n0(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then($n,$n),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,i0(e),e;default:if(typeof n.status=="string")n.then($n,$n);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,i0(e),e}throw vi=n,rl}}function yi(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(vi=i,rl):i}}var vi=null;function a0(){if(vi===null)throw Error(r(459));var e=vi;return vi=null,e}function i0(e){if(e===rl||e===Qo)throw Error(r(483))}var ol=null,cr=0;function Fo(e){var n=cr;return cr+=1,ol===null&&(ol=[]),n0(ol,e,n)}function ur(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Po(e,n){throw n.$$typeof===v?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function l0(e){function n(F,X){if(e){var P=F.deletions;P===null?(F.deletions=[X],F.flags|=16):P.push(X)}}function i(F,X){if(!e)return null;for(;X!==null;)n(F,X),X=X.sibling;return null}function o(F){for(var X=new Map;F!==null;)F.key!==null?X.set(F.key,F):X.set(F.index,F),F=F.sibling;return X}function f(F,X){return F=qn(F,X),F.index=0,F.sibling=null,F}function m(F,X,P){return F.index=P,e?(P=F.alternate,P!==null?(P=P.index,P<X?(F.flags|=67108866,X):P):(F.flags|=67108866,X)):(F.flags|=1048576,X)}function b(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function T(F,X,P,le){return X===null||X.tag!==6?(X=Du(P,F.mode,le),X.return=F,X):(X=f(X,P),X.return=F,X)}function $(F,X,P,le){var we=P.type;return we===N?ie(F,X,P.props.children,le,P.key):X!==null&&(X.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===H&&yi(we)===X.type)?(X=f(X,P.props),ur(X,P),X.return=F,X):(X=Yo(P.type,P.key,P.props,null,F.mode,le),ur(X,P),X.return=F,X)}function I(F,X,P,le){return X===null||X.tag!==4||X.stateNode.containerInfo!==P.containerInfo||X.stateNode.implementation!==P.implementation?(X=Lu(P,F.mode,le),X.return=F,X):(X=f(X,P.children||[]),X.return=F,X)}function ie(F,X,P,le,we){return X===null||X.tag!==7?(X=hi(P,F.mode,le,we),X.return=F,X):(X=f(X,P),X.return=F,X)}function re(F,X,P){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=Du(""+X,F.mode,P),X.return=F,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case w:return P=Yo(X.type,X.key,X.props,null,F.mode,P),ur(P,X),P.return=F,P;case S:return X=Lu(X,F.mode,P),X.return=F,X;case H:return X=yi(X),re(F,X,P)}if(G(X)||K(X))return X=hi(X,F.mode,P,null),X.return=F,X;if(typeof X.then=="function")return re(F,Fo(X),P);if(X.$$typeof===j)return re(F,Go(F,X),P);Po(F,X)}return null}function J(F,X,P,le){var we=X!==null?X.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return we!==null?null:T(F,X,""+P,le);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case w:return P.key===we?$(F,X,P,le):null;case S:return P.key===we?I(F,X,P,le):null;case H:return P=yi(P),J(F,X,P,le)}if(G(P)||K(P))return we!==null?null:ie(F,X,P,le,null);if(typeof P.then=="function")return J(F,X,Fo(P),le);if(P.$$typeof===j)return J(F,X,Go(F,P),le);Po(F,P)}return null}function ee(F,X,P,le,we){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return F=F.get(P)||null,T(X,F,""+le,we);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case w:return F=F.get(le.key===null?P:le.key)||null,$(X,F,le,we);case S:return F=F.get(le.key===null?P:le.key)||null,I(X,F,le,we);case H:return le=yi(le),ee(F,X,P,le,we)}if(G(le)||K(le))return F=F.get(P)||null,ie(X,F,le,we,null);if(typeof le.then=="function")return ee(F,X,P,Fo(le),we);if(le.$$typeof===j)return ee(F,X,P,Go(X,le),we);Po(X,le)}return null}function de(F,X,P,le){for(var we=null,He=null,ge=X,Ce=X=0,ke=null;ge!==null&&Ce<P.length;Ce++){ge.index>Ce?(ke=ge,ge=null):ke=ge.sibling;var Be=J(F,ge,P[Ce],le);if(Be===null){ge===null&&(ge=ke);break}e&&ge&&Be.alternate===null&&n(F,ge),X=m(Be,X,Ce),He===null?we=Be:He.sibling=Be,He=Be,ge=ke}if(Ce===P.length)return i(F,ge),De&&Xn(F,Ce),we;if(ge===null){for(;Ce<P.length;Ce++)ge=re(F,P[Ce],le),ge!==null&&(X=m(ge,X,Ce),He===null?we=ge:He.sibling=ge,He=ge);return De&&Xn(F,Ce),we}for(ge=o(ge);Ce<P.length;Ce++)ke=ee(ge,F,Ce,P[Ce],le),ke!==null&&(e&&ke.alternate!==null&&ge.delete(ke.key===null?Ce:ke.key),X=m(ke,X,Ce),He===null?we=ke:He.sibling=ke,He=ke);return e&&ge.forEach(function($a){return n(F,$a)}),De&&Xn(F,Ce),we}function Ne(F,X,P,le){if(P==null)throw Error(r(151));for(var we=null,He=null,ge=X,Ce=X=0,ke=null,Be=P.next();ge!==null&&!Be.done;Ce++,Be=P.next()){ge.index>Ce?(ke=ge,ge=null):ke=ge.sibling;var $a=J(F,ge,Be.value,le);if($a===null){ge===null&&(ge=ke);break}e&&ge&&$a.alternate===null&&n(F,ge),X=m($a,X,Ce),He===null?we=$a:He.sibling=$a,He=$a,ge=ke}if(Be.done)return i(F,ge),De&&Xn(F,Ce),we;if(ge===null){for(;!Be.done;Ce++,Be=P.next())Be=re(F,Be.value,le),Be!==null&&(X=m(Be,X,Ce),He===null?we=Be:He.sibling=Be,He=Be);return De&&Xn(F,Ce),we}for(ge=o(ge);!Be.done;Ce++,Be=P.next())Be=ee(ge,F,Ce,Be.value,le),Be!==null&&(e&&Be.alternate!==null&&ge.delete(Be.key===null?Ce:Be.key),X=m(Be,X,Ce),He===null?we=Be:He.sibling=Be,He=Be);return e&&ge.forEach(function(_S){return n(F,_S)}),De&&Xn(F,Ce),we}function Ge(F,X,P,le){if(typeof P=="object"&&P!==null&&P.type===N&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case w:e:{for(var we=P.key;X!==null;){if(X.key===we){if(we=P.type,we===N){if(X.tag===7){i(F,X.sibling),le=f(X,P.props.children),le.return=F,F=le;break e}}else if(X.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===H&&yi(we)===X.type){i(F,X.sibling),le=f(X,P.props),ur(le,P),le.return=F,F=le;break e}i(F,X);break}else n(F,X);X=X.sibling}P.type===N?(le=hi(P.props.children,F.mode,le,P.key),le.return=F,F=le):(le=Yo(P.type,P.key,P.props,null,F.mode,le),ur(le,P),le.return=F,F=le)}return b(F);case S:e:{for(we=P.key;X!==null;){if(X.key===we)if(X.tag===4&&X.stateNode.containerInfo===P.containerInfo&&X.stateNode.implementation===P.implementation){i(F,X.sibling),le=f(X,P.children||[]),le.return=F,F=le;break e}else{i(F,X);break}else n(F,X);X=X.sibling}le=Lu(P,F.mode,le),le.return=F,F=le}return b(F);case H:return P=yi(P),Ge(F,X,P,le)}if(G(P))return de(F,X,P,le);if(K(P)){if(we=K(P),typeof we!="function")throw Error(r(150));return P=we.call(P),Ne(F,X,P,le)}if(typeof P.then=="function")return Ge(F,X,Fo(P),le);if(P.$$typeof===j)return Ge(F,X,Go(F,P),le);Po(F,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,X!==null&&X.tag===6?(i(F,X.sibling),le=f(X,P),le.return=F,F=le):(i(F,X),le=Du(P,F.mode,le),le.return=F,F=le),b(F)):i(F,X)}return function(F,X,P,le){try{cr=0;var we=Ge(F,X,P,le);return ol=null,we}catch(ge){if(ge===rl||ge===Qo)throw ge;var He=Bt(29,ge,null,F.mode);return He.lanes=le,He.return=F,He}finally{}}}var bi=l0(!0),r0=l0(!1),Ea=!1;function Ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _a(e,n,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ve&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=$o(e),qm(e,null,i),n}return Vo(e,o,n,i),$o(e)}function fr(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,i|=o,n.lanes=i,vo(e,i)}}function Pu(e,n){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var f=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var b={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?f=m=b:m=m.next=b,i=i.next}while(i!==null);m===null?f=m=n:m=m.next=n}else f=m=n;i={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:o.shared,callbacks:o.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Iu=!1;function dr(){if(Iu){var e=ll;if(e!==null)throw e}}function hr(e,n,i,o){Iu=!1;var f=e.updateQueue;Ea=!1;var m=f.firstBaseUpdate,b=f.lastBaseUpdate,T=f.shared.pending;if(T!==null){f.shared.pending=null;var $=T,I=$.next;$.next=null,b===null?m=I:b.next=I,b=$;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,T=ie.lastBaseUpdate,T!==b&&(T===null?ie.firstBaseUpdate=I:T.next=I,ie.lastBaseUpdate=$))}if(m!==null){var re=f.baseState;b=0,ie=I=$=null,T=m;do{var J=T.lane&-536870913,ee=J!==T.lane;if(ee?(Re&J)===J:(o&J)===J){J!==0&&J===il&&(Iu=!0),ie!==null&&(ie=ie.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var de=e,Ne=T;J=n;var Ge=i;switch(Ne.tag){case 1:if(de=Ne.payload,typeof de=="function"){re=de.call(Ge,re,J);break e}re=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Ne.payload,J=typeof de=="function"?de.call(Ge,re,J):de,J==null)break e;re=x({},re,J);break e;case 2:Ea=!0}}J=T.callback,J!==null&&(e.flags|=64,ee&&(e.flags|=8192),ee=f.callbacks,ee===null?f.callbacks=[J]:ee.push(J))}else ee={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ie===null?(I=ie=ee,$=re):ie=ie.next=ee,b|=J;if(T=T.next,T===null){if(T=f.shared.pending,T===null)break;ee=T,T=ee.next,ee.next=null,f.lastBaseUpdate=ee,f.shared.pending=null}}while(!0);ie===null&&($=re),f.baseState=$,f.firstBaseUpdate=I,f.lastBaseUpdate=ie,m===null&&(f.shared.lanes=0),za|=b,e.lanes=b,e.memoizedState=re}}function o0(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function s0(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)o0(i[e],n)}var sl=R(null),Io=R(0);function c0(e,n){e=ta,W(Io,e),W(sl,n),ta=e|n.baseLanes}function Ju(){W(Io,ta),W(sl,sl.current)}function Wu(){ta=Io.current,V(sl),V(Io)}var Ut=R(null),tn=null;function Aa(e){var n=e.alternate;W(et,et.current&1),W(Ut,e),tn===null&&(n===null||sl.current!==null||n.memoizedState!==null)&&(tn=e)}function ef(e){W(et,et.current),W(Ut,e),tn===null&&(tn=e)}function u0(e){e.tag===22?(W(et,et.current),W(Ut,e),tn===null&&(tn=e)):Ca()}function Ca(){W(et,et.current),W(Ut,Ut.current)}function Vt(e){V(Ut),tn===e&&(tn=null),V(et)}var et=R(0);function Jo(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||od(i)||sd(i)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Qn=0,Ae=null,qe=null,lt=null,Wo=!1,cl=!1,wi=!1,es=0,mr=0,ul=null,gw=0;function Je(){throw Error(r(321))}function tf(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!Ht(e[i],n[i]))return!1;return!0}function nf(e,n,i,o,f,m){return Qn=m,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,M.H=e===null||e.memoizedState===null?Q0:yf,wi=!1,m=i(o,f),wi=!1,cl&&(m=d0(n,i,o,f)),f0(e),m}function f0(e){M.H=xr;var n=qe!==null&&qe.next!==null;if(Qn=0,lt=qe=Ae=null,Wo=!1,mr=0,ul=null,n)throw Error(r(300));e===null||rt||(e=e.dependencies,e!==null&&Xo(e)&&(rt=!0))}function d0(e,n,i,o){Ae=e;var f=0;do{if(cl&&(ul=null),mr=0,cl=!1,25<=f)throw Error(r(301));if(f+=1,lt=qe=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}M.H=K0,m=n(i,o)}while(cl);return m}function xw(){var e=M.H,n=e.useState()[0];return n=typeof n.then=="function"?pr(n):n,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(Ae.flags|=1024),n}function af(){var e=es!==0;return es=0,e}function lf(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function rf(e){if(Wo){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Wo=!1}Qn=0,lt=qe=Ae=null,cl=!1,mr=es=0,ul=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ae.memoizedState=lt=e:lt=lt.next=e,lt}function tt(){if(qe===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var n=lt===null?Ae.memoizedState:lt.next;if(n!==null)lt=n,qe=e;else{if(e===null)throw Ae.alternate===null?Error(r(467)):Error(r(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},lt===null?Ae.memoizedState=lt=e:lt=lt.next=e}return lt}function ts(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pr(e){var n=mr;return mr+=1,ul===null&&(ul=[]),e=n0(ul,e,n),n=Ae,(lt===null?n.memoizedState:lt.next)===null&&(n=n.alternate,M.H=n===null||n.memoizedState===null?Q0:yf),e}function ns(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pr(e);if(e.$$typeof===j)return xt(e)}throw Error(r(438,String(e)))}function of(e){var n=null,i=Ae.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var o=Ae.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=ts(),Ae.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),o=0;o<e;o++)i[o]=ne;return n.index++,i}function Kn(e,n){return typeof n=="function"?n(e):n}function as(e){var n=tt();return sf(n,qe,e)}function sf(e,n,i){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=i;var f=e.baseQueue,m=o.pending;if(m!==null){if(f!==null){var b=f.next;f.next=m.next,m.next=b}n.baseQueue=f=m,o.pending=null}if(m=e.baseState,f===null)e.memoizedState=m;else{n=f.next;var T=b=null,$=null,I=n,ie=!1;do{var re=I.lane&-536870913;if(re!==I.lane?(Re&re)===re:(Qn&re)===re){var J=I.revertLane;if(J===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),re===il&&(ie=!0);else if((Qn&J)===J){I=I.next,J===il&&(ie=!0);continue}else re={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},$===null?(T=$=re,b=m):$=$.next=re,Ae.lanes|=J,za|=J;re=I.action,wi&&i(m,re),m=I.hasEagerState?I.eagerState:i(m,re)}else J={lane:re,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},$===null?(T=$=J,b=m):$=$.next=J,Ae.lanes|=re,za|=re;I=I.next}while(I!==null&&I!==n);if($===null?b=m:$.next=T,!Ht(m,e.memoizedState)&&(rt=!0,ie&&(i=ll,i!==null)))throw i;e.memoizedState=m,e.baseState=b,e.baseQueue=$,o.lastRenderedState=m}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function cf(e){var n=tt(),i=n.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var o=i.dispatch,f=i.pending,m=n.memoizedState;if(f!==null){i.pending=null;var b=f=f.next;do m=e(m,b.action),b=b.next;while(b!==f);Ht(m,n.memoizedState)||(rt=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),i.lastRenderedState=m}return[m,o]}function h0(e,n,i){var o=Ae,f=tt(),m=De;if(m){if(i===void 0)throw Error(r(407));i=i()}else i=n();var b=!Ht((qe||f).memoizedState,i);if(b&&(f.memoizedState=i,rt=!0),f=f.queue,df(g0.bind(null,o,f,e),[e]),f.getSnapshot!==n||b||lt!==null&<.memoizedState.tag&1){if(o.flags|=2048,fl(9,{destroy:void 0},p0.bind(null,o,f,i,n),null),Ze===null)throw Error(r(349));m||(Qn&127)!==0||m0(o,n,i)}return i}function m0(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Ae.updateQueue,n===null?(n=ts(),Ae.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function p0(e,n,i,o){n.value=i,n.getSnapshot=o,x0(n)&&y0(e)}function g0(e,n,i){return i(function(){x0(n)&&y0(e)})}function x0(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!Ht(e,i)}catch{return!0}}function y0(e){var n=di(e,2);n!==null&&Rt(n,e,2)}function uf(e){var n=jt();if(typeof e=="function"){var i=e;if(e=i(),wi){bn(!0);try{i()}finally{bn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},n}function v0(e,n,i,o){return e.baseState=i,sf(e,qe,typeof o=="function"?o:Kn)}function yw(e,n,i,o,f){if(rs(e))throw Error(r(485));if(e=n.action,e!==null){var m={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};M.T!==null?i(!0):m.isTransition=!1,o(m),i=n.pending,i===null?(m.next=n.pending=m,b0(n,m)):(m.next=i.next,n.pending=i.next=m)}}function b0(e,n){var i=n.action,o=n.payload,f=e.state;if(n.isTransition){var m=M.T,b={};M.T=b;try{var T=i(f,o),$=M.S;$!==null&&$(b,T),w0(e,n,T)}catch(I){ff(e,n,I)}finally{m!==null&&b.types!==null&&(m.types=b.types),M.T=m}}else try{m=i(f,o),w0(e,n,m)}catch(I){ff(e,n,I)}}function w0(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){S0(e,n,o)},function(o){return ff(e,n,o)}):S0(e,n,i)}function S0(e,n,i){n.status="fulfilled",n.value=i,N0(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,b0(e,i)))}function ff(e,n,i){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=i,N0(n),n=n.next;while(n!==o)}e.action=null}function N0(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function E0(e,n){return n}function j0(e,n){if(De){var i=Ze.formState;if(i!==null){e:{var o=Ae;if(De){if(Qe){t:{for(var f=Qe,m=en;f.nodeType!==8;){if(!m){f=null;break t}if(f=nn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){Qe=nn(f.nextSibling),o=f.data==="F!";break e}}Sa(o)}o=!1}o&&(n=i[0])}}return i=jt(),i.memoizedState=i.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:E0,lastRenderedState:n},i.queue=o,i=X0.bind(null,Ae,o),o.dispatch=i,o=uf(!1),m=xf.bind(null,Ae,!1,o.queue),o=jt(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,i=yw.bind(null,Ae,f,m,i),f.dispatch=i,o.memoizedState=e,[n,i,!1]}function _0(e){var n=tt();return A0(n,qe,e)}function A0(e,n,i){if(n=sf(e,n,E0)[0],e=as(Kn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=pr(n)}catch(b){throw b===rl?Qo:b}else o=n;n=tt();var f=n.queue,m=f.dispatch;return i!==n.memoizedState&&(Ae.flags|=2048,fl(9,{destroy:void 0},vw.bind(null,f,i),null)),[o,m,e]}function vw(e,n){e.action=n}function C0(e){var n=tt(),i=qe;if(i!==null)return A0(n,i,e);tt(),n=n.memoizedState,i=tt();var o=i.queue.dispatch;return i.memoizedState=e,[n,o,!1]}function fl(e,n,i,o){return e={tag:e,create:i,deps:o,inst:n,next:null},n=Ae.updateQueue,n===null&&(n=ts(),Ae.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,n.lastEffect=e),e}function T0(){return tt().memoizedState}function is(e,n,i,o){var f=jt();Ae.flags|=e,f.memoizedState=fl(1|n,{destroy:void 0},i,o===void 0?null:o)}function ls(e,n,i,o){var f=tt();o=o===void 0?null:o;var m=f.memoizedState.inst;qe!==null&&o!==null&&tf(o,qe.memoizedState.deps)?f.memoizedState=fl(n,m,i,o):(Ae.flags|=e,f.memoizedState=fl(1|n,m,i,o))}function M0(e,n){is(8390656,8,e,n)}function df(e,n){ls(2048,8,e,n)}function bw(e){Ae.flags|=4;var n=Ae.updateQueue;if(n===null)n=ts(),Ae.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function z0(e){var n=tt().memoizedState;return bw({ref:n,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function O0(e,n){return ls(4,2,e,n)}function R0(e,n){return ls(4,4,e,n)}function k0(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function D0(e,n,i){i=i!=null?i.concat([e]):null,ls(4,4,k0.bind(null,n,e),i)}function hf(){}function L0(e,n){var i=tt();n=n===void 0?null:n;var o=i.memoizedState;return n!==null&&tf(n,o[1])?o[0]:(i.memoizedState=[e,n],e)}function H0(e,n){var i=tt();n=n===void 0?null:n;var o=i.memoizedState;if(n!==null&&tf(n,o[1]))return o[0];if(o=e(),wi){bn(!0);try{e()}finally{bn(!1)}}return i.memoizedState=[o,n],o}function mf(e,n,i){return i===void 0||(Qn&1073741824)!==0&&(Re&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=Bp(),Ae.lanes|=e,za|=e,i)}function B0(e,n,i,o){return Ht(i,n)?i:sl.current!==null?(e=mf(e,i,o),Ht(e,n)||(rt=!0),e):(Qn&42)===0||(Qn&1073741824)!==0&&(Re&261930)===0?(rt=!0,e.memoizedState=i):(e=Bp(),Ae.lanes|=e,za|=e,n)}function U0(e,n,i,o,f){var m=U.p;U.p=m!==0&&8>m?m:8;var b=M.T,T={};M.T=T,xf(e,!1,n,i);try{var $=f(),I=M.S;if(I!==null&&I(T,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var ie=pw($,o);gr(e,n,ie,qt(e))}else gr(e,n,o,qt(e))}catch(re){gr(e,n,{then:function(){},status:"rejected",reason:re},qt())}finally{U.p=m,b!==null&&T.types!==null&&(b.types=T.types),M.T=b}}function ww(){}function pf(e,n,i,o){if(e.tag!==5)throw Error(r(476));var f=V0(e).queue;U0(e,f,n,B,i===null?ww:function(){return $0(e),i(o)})}function V0(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:B},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function $0(e){var n=V0(e);n.next===null&&(n=e.alternate.memoizedState),gr(e,n.next.queue,{},qt())}function gf(){return xt(Rr)}function Y0(){return tt().memoizedState}function q0(){return tt().memoizedState}function Sw(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=qt();e=ja(i);var o=_a(n,e,i);o!==null&&(Rt(o,n,i),fr(o,n,i)),n={cache:Xu()},e.payload=n;return}n=n.return}}function Nw(e,n,i){var o=qt();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},rs(e)?G0(n,i):(i=Ru(e,n,i,o),i!==null&&(Rt(i,e,o),Z0(i,n,o)))}function X0(e,n,i){var o=qt();gr(e,n,i,o)}function gr(e,n,i,o){var f={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(rs(e))G0(n,f);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var b=n.lastRenderedState,T=m(b,i);if(f.hasEagerState=!0,f.eagerState=T,Ht(T,b))return Vo(e,n,f,0),Ze===null&&Uo(),!1}catch{}finally{}if(i=Ru(e,n,f,o),i!==null)return Rt(i,e,o),Z0(i,n,o),!0}return!1}function xf(e,n,i,o){if(o={lane:2,revertLane:Ff(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},rs(e)){if(n)throw Error(r(479))}else n=Ru(e,i,o,2),n!==null&&Rt(n,e,2)}function rs(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function G0(e,n){cl=Wo=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function Z0(e,n,i){if((i&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,i|=o,n.lanes=i,vo(e,i)}}var xr={readContext:xt,use:ns,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};xr.useEffectEvent=Je;var Q0={readContext:xt,use:ns,useCallback:function(e,n){return jt().memoizedState=[e,n===void 0?null:n],e},useContext:xt,useEffect:M0,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,is(4194308,4,k0.bind(null,n,e),i)},useLayoutEffect:function(e,n){return is(4194308,4,e,n)},useInsertionEffect:function(e,n){is(4,2,e,n)},useMemo:function(e,n){var i=jt();n=n===void 0?null:n;var o=e();if(wi){bn(!0);try{e()}finally{bn(!1)}}return i.memoizedState=[o,n],o},useReducer:function(e,n,i){var o=jt();if(i!==void 0){var f=i(n);if(wi){bn(!0);try{i(n)}finally{bn(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=Nw.bind(null,Ae,e),[o.memoizedState,e]},useRef:function(e){var n=jt();return e={current:e},n.memoizedState=e},useState:function(e){e=uf(e);var n=e.queue,i=X0.bind(null,Ae,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:hf,useDeferredValue:function(e,n){var i=jt();return mf(i,e,n)},useTransition:function(){var e=uf(!1);return e=U0.bind(null,Ae,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var o=Ae,f=jt();if(De){if(i===void 0)throw Error(r(407));i=i()}else{if(i=n(),Ze===null)throw Error(r(349));(Re&127)!==0||m0(o,n,i)}f.memoizedState=i;var m={value:i,getSnapshot:n};return f.queue=m,M0(g0.bind(null,o,m,e),[e]),o.flags|=2048,fl(9,{destroy:void 0},p0.bind(null,o,m,i,n),null),i},useId:function(){var e=jt(),n=Ze.identifierPrefix;if(De){var i=Nn,o=Sn;i=(o&~(1<<32-Et(o)-1)).toString(32)+i,n="_"+n+"R_"+i,i=es++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=gw++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:gf,useFormState:j0,useActionState:j0,useOptimistic:function(e){var n=jt();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=xf.bind(null,Ae,!0,i),i.dispatch=n,[e,n]},useMemoCache:of,useCacheRefresh:function(){return jt().memoizedState=Sw.bind(null,Ae)},useEffectEvent:function(e){var n=jt(),i={impl:e};return n.memoizedState=i,function(){if((Ve&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},yf={readContext:xt,use:ns,useCallback:L0,useContext:xt,useEffect:df,useImperativeHandle:D0,useInsertionEffect:O0,useLayoutEffect:R0,useMemo:H0,useReducer:as,useRef:T0,useState:function(){return as(Kn)},useDebugValue:hf,useDeferredValue:function(e,n){var i=tt();return B0(i,qe.memoizedState,e,n)},useTransition:function(){var e=as(Kn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:pr(e),n]},useSyncExternalStore:h0,useId:Y0,useHostTransitionStatus:gf,useFormState:_0,useActionState:_0,useOptimistic:function(e,n){var i=tt();return v0(i,qe,e,n)},useMemoCache:of,useCacheRefresh:q0};yf.useEffectEvent=z0;var K0={readContext:xt,use:ns,useCallback:L0,useContext:xt,useEffect:df,useImperativeHandle:D0,useInsertionEffect:O0,useLayoutEffect:R0,useMemo:H0,useReducer:cf,useRef:T0,useState:function(){return cf(Kn)},useDebugValue:hf,useDeferredValue:function(e,n){var i=tt();return qe===null?mf(i,e,n):B0(i,qe.memoizedState,e,n)},useTransition:function(){var e=cf(Kn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:pr(e),n]},useSyncExternalStore:h0,useId:Y0,useHostTransitionStatus:gf,useFormState:C0,useActionState:C0,useOptimistic:function(e,n){var i=tt();return qe!==null?v0(i,qe,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:of,useCacheRefresh:q0};K0.useEffectEvent=z0;function vf(e,n,i,o){n=e.memoizedState,i=i(o,n),i=i==null?n:x({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var bf={enqueueSetState:function(e,n,i){e=e._reactInternals;var o=qt(),f=ja(o);f.payload=n,i!=null&&(f.callback=i),n=_a(e,f,o),n!==null&&(Rt(n,e,o),fr(n,e,o))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var o=qt(),f=ja(o);f.tag=1,f.payload=n,i!=null&&(f.callback=i),n=_a(e,f,o),n!==null&&(Rt(n,e,o),fr(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=qt(),o=ja(i);o.tag=2,n!=null&&(o.callback=n),n=_a(e,o,i),n!==null&&(Rt(n,e,i),fr(n,e,i))}};function F0(e,n,i,o,f,m,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,m,b):n.prototype&&n.prototype.isPureReactComponent?!ar(i,o)||!ar(f,m):!0}function P0(e,n,i,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,o),n.state!==e&&bf.enqueueReplaceState(n,n.state,null)}function Si(e,n){var i=n;if("ref"in n){i={};for(var o in n)o!=="ref"&&(i[o]=n[o])}if(e=e.defaultProps){i===n&&(i=x({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function I0(e){Bo(e)}function J0(e){console.error(e)}function W0(e){Bo(e)}function os(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function ep(e,n,i){try{var o=e.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function wf(e,n,i){return i=ja(i),i.tag=3,i.payload={element:null},i.callback=function(){os(e,n)},i}function tp(e){return e=ja(e),e.tag=3,e}function np(e,n,i,o){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var m=o.value;e.payload=function(){return f(m)},e.callback=function(){ep(n,i,o)}}var b=i.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){ep(n,i,o),typeof f!="function"&&(Oa===null?Oa=new Set([this]):Oa.add(this));var T=o.stack;this.componentDidCatch(o.value,{componentStack:T!==null?T:""})})}function Ew(e,n,i,o,f){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=i.alternate,n!==null&&al(n,i,f,!0),i=Ut.current,i!==null){switch(i.tag){case 31:case 13:return tn===null?vs():i.alternate===null&&We===0&&(We=3),i.flags&=-257,i.flags|=65536,i.lanes=f,o===Ko?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([o]):n.add(o),Zf(e,o,f)),!1;case 22:return i.flags|=65536,o===Ko?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([o]):i.add(o)),Zf(e,o,f)),!1}throw Error(r(435,i.tag))}return Zf(e,o,f),vs(),!1}if(De)return n=Ut.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==Uu&&(e=Error(r(422),{cause:o}),rr(It(e,i)))):(o!==Uu&&(n=Error(r(423),{cause:o}),rr(It(n,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=It(o,i),f=wf(e.stateNode,o,f),Pu(e,f),We!==4&&(We=2)),!1;var m=Error(r(520),{cause:o});if(m=It(m,i),jr===null?jr=[m]:jr.push(m),We!==4&&(We=2),n===null)return!0;o=It(o,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=wf(i.stateNode,o,e),Pu(i,e),!1;case 1:if(n=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Oa===null||!Oa.has(m))))return i.flags|=65536,f&=-f,i.lanes|=f,f=tp(f),np(f,e,i,o),Pu(i,f),!1}i=i.return}while(i!==null);return!1}var Sf=Error(r(461)),rt=!1;function yt(e,n,i,o){n.child=e===null?r0(n,null,i,o):bi(n,e.child,i,o)}function ap(e,n,i,o,f){i=i.render;var m=n.ref;if("ref"in o){var b={};for(var T in o)T!=="ref"&&(b[T]=o[T])}else b=o;return gi(n),o=nf(e,n,i,b,m,f),T=af(),e!==null&&!rt?(lf(e,n,f),Fn(e,n,f)):(De&&T&&Hu(n),n.flags|=1,yt(e,n,o,f),n.child)}function ip(e,n,i,o,f){if(e===null){var m=i.type;return typeof m=="function"&&!ku(m)&&m.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=m,lp(e,n,m,o,f)):(e=Yo(i.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(m=e.child,!Mf(e,f)){var b=m.memoizedProps;if(i=i.compare,i=i!==null?i:ar,i(b,o)&&e.ref===n.ref)return Fn(e,n,f)}return n.flags|=1,e=qn(m,o),e.ref=n.ref,e.return=n,n.child=e}function lp(e,n,i,o,f){if(e!==null){var m=e.memoizedProps;if(ar(m,o)&&e.ref===n.ref)if(rt=!1,n.pendingProps=o=m,Mf(e,f))(e.flags&131072)!==0&&(rt=!0);else return n.lanes=e.lanes,Fn(e,n,f)}return Nf(e,n,i,o,f)}function rp(e,n,i,o){var f=o.children,m=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(m=m!==null?m.baseLanes|i:i,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~m}else o=0,n.child=null;return op(e,n,m,i,o)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zo(n,m!==null?m.cachePool:null),m!==null?c0(n,m):Ju(),u0(n);else return o=n.lanes=536870912,op(e,n,m!==null?m.baseLanes|i:i,i,o)}else m!==null?(Zo(n,m.cachePool),c0(n,m),Ca(),n.memoizedState=null):(e!==null&&Zo(n,null),Ju(),Ca());return yt(e,n,f,i),n.child}function yr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function op(e,n,i,o,f){var m=Zu();return m=m===null?null:{parent:it._currentValue,pool:m},n.memoizedState={baseLanes:i,cachePool:m},e!==null&&Zo(n,null),Ju(),u0(n),e!==null&&al(e,n,o,!0),n.childLanes=f,null}function ss(e,n){return n=us({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function sp(e,n,i){return bi(n,e.child,null,i),e=ss(n,n.pendingProps),e.flags|=2,Vt(n),n.memoizedState=null,e}function jw(e,n,i){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(De){if(o.mode==="hidden")return e=ss(n,o),n.lanes=536870912,yr(null,e);if(ef(n),(e=Qe)?(e=bg(e,en),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Sn,overflow:Nn}:null,retryLane:536870912,hydrationErrors:null},i=Gm(e),i.return=n,n.child=i,gt=n,Qe=null)):e=null,e===null)throw Sa(n);return n.lanes=536870912,null}return ss(n,o)}var m=e.memoizedState;if(m!==null){var b=m.dehydrated;if(ef(n),f)if(n.flags&256)n.flags&=-257,n=sp(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(rt||al(e,n,i,!1),f=(i&e.childLanes)!==0,rt||f){if(o=Ze,o!==null&&(b=bo(o,i),b!==0&&b!==m.retryLane))throw m.retryLane=b,di(e,b),Rt(o,e,b),Sf;vs(),n=sp(e,n,i)}else e=m.treeContext,Qe=nn(b.nextSibling),gt=n,De=!0,wa=null,en=!1,e!==null&&Km(n,e),n=ss(n,o),n.flags|=4096;return n}return e=qn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function cs(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function Nf(e,n,i,o,f){return gi(n),i=nf(e,n,i,o,void 0,f),o=af(),e!==null&&!rt?(lf(e,n,f),Fn(e,n,f)):(De&&o&&Hu(n),n.flags|=1,yt(e,n,i,f),n.child)}function cp(e,n,i,o,f,m){return gi(n),n.updateQueue=null,i=d0(n,o,i,f),f0(e),o=af(),e!==null&&!rt?(lf(e,n,m),Fn(e,n,m)):(De&&o&&Hu(n),n.flags|=1,yt(e,n,i,m),n.child)}function up(e,n,i,o,f){if(gi(n),n.stateNode===null){var m=Wi,b=i.contextType;typeof b=="object"&&b!==null&&(m=xt(b)),m=new i(o,m),n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=bf,n.stateNode=m,m._reactInternals=n,m=n.stateNode,m.props=o,m.state=n.memoizedState,m.refs={},Ku(n),b=i.contextType,m.context=typeof b=="object"&&b!==null?xt(b):Wi,m.state=n.memoizedState,b=i.getDerivedStateFromProps,typeof b=="function"&&(vf(n,i,b,o),m.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&bf.enqueueReplaceState(m,m.state,null),hr(n,o,m,f),dr(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){m=n.stateNode;var T=n.memoizedProps,$=Si(i,T);m.props=$;var I=m.context,ie=i.contextType;b=Wi,typeof ie=="object"&&ie!==null&&(b=xt(ie));var re=i.getDerivedStateFromProps;ie=typeof re=="function"||typeof m.getSnapshotBeforeUpdate=="function",T=n.pendingProps!==T,ie||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(T||I!==b)&&P0(n,m,o,b),Ea=!1;var J=n.memoizedState;m.state=J,hr(n,o,m,f),dr(),I=n.memoizedState,T||J!==I||Ea?(typeof re=="function"&&(vf(n,i,re,o),I=n.memoizedState),($=Ea||F0(n,i,$,o,J,I,b))?(ie||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4194308)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=I),m.props=o,m.state=I,m.context=b,o=$):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{m=n.stateNode,Fu(e,n),b=n.memoizedProps,ie=Si(i,b),m.props=ie,re=n.pendingProps,J=m.context,I=i.contextType,$=Wi,typeof I=="object"&&I!==null&&($=xt(I)),T=i.getDerivedStateFromProps,(I=typeof T=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==re||J!==$)&&P0(n,m,o,$),Ea=!1,J=n.memoizedState,m.state=J,hr(n,o,m,f),dr();var ee=n.memoizedState;b!==re||J!==ee||Ea||e!==null&&e.dependencies!==null&&Xo(e.dependencies)?(typeof T=="function"&&(vf(n,i,T,o),ee=n.memoizedState),(ie=Ea||F0(n,i,ie,o,J,ee,$)||e!==null&&e.dependencies!==null&&Xo(e.dependencies))?(I||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,ee,$),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,ee,$)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=ee),m.props=o,m.state=ee,m.context=$,o=ie):(typeof m.componentDidUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),o=!1)}return m=o,cs(e,n),o=(n.flags&128)!==0,m||o?(m=n.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:m.render(),n.flags|=1,e!==null&&o?(n.child=bi(n,e.child,null,f),n.child=bi(n,null,i,f)):yt(e,n,i,f),n.memoizedState=m.state,e=n.child):e=Fn(e,n,f),e}function fp(e,n,i,o){return mi(),n.flags|=256,yt(e,n,i,o),n.child}var Ef={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jf(e){return{baseLanes:e,cachePool:e0()}}function _f(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=Yt),e}function dp(e,n,i){var o=n.pendingProps,f=!1,m=(n.flags&128)!==0,b;if((b=m)||(b=e!==null&&e.memoizedState===null?!1:(et.current&2)!==0),b&&(f=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(De){if(f?Aa(n):Ca(),(e=Qe)?(e=bg(e,en),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Sn,overflow:Nn}:null,retryLane:536870912,hydrationErrors:null},i=Gm(e),i.return=n,n.child=i,gt=n,Qe=null)):e=null,e===null)throw Sa(n);return sd(e)?n.lanes=32:n.lanes=536870912,null}var T=o.children;return o=o.fallback,f?(Ca(),f=n.mode,T=us({mode:"hidden",children:T},f),o=hi(o,f,i,null),T.return=n,o.return=n,T.sibling=o,n.child=T,o=n.child,o.memoizedState=jf(i),o.childLanes=_f(e,b,i),n.memoizedState=Ef,yr(null,o)):(Aa(n),Af(n,T))}var $=e.memoizedState;if($!==null&&(T=$.dehydrated,T!==null)){if(m)n.flags&256?(Aa(n),n.flags&=-257,n=Cf(e,n,i)):n.memoizedState!==null?(Ca(),n.child=e.child,n.flags|=128,n=null):(Ca(),T=o.fallback,f=n.mode,o=us({mode:"visible",children:o.children},f),T=hi(T,f,i,null),T.flags|=2,o.return=n,T.return=n,o.sibling=T,n.child=o,bi(n,e.child,null,i),o=n.child,o.memoizedState=jf(i),o.childLanes=_f(e,b,i),n.memoizedState=Ef,n=yr(null,o));else if(Aa(n),sd(T)){if(b=T.nextSibling&&T.nextSibling.dataset,b)var I=b.dgst;b=I,o=Error(r(419)),o.stack="",o.digest=b,rr({value:o,source:null,stack:null}),n=Cf(e,n,i)}else if(rt||al(e,n,i,!1),b=(i&e.childLanes)!==0,rt||b){if(b=Ze,b!==null&&(o=bo(b,i),o!==0&&o!==$.retryLane))throw $.retryLane=o,di(e,o),Rt(b,e,o),Sf;od(T)||vs(),n=Cf(e,n,i)}else od(T)?(n.flags|=192,n.child=e.child,n=null):(e=$.treeContext,Qe=nn(T.nextSibling),gt=n,De=!0,wa=null,en=!1,e!==null&&Km(n,e),n=Af(n,o.children),n.flags|=4096);return n}return f?(Ca(),T=o.fallback,f=n.mode,$=e.child,I=$.sibling,o=qn($,{mode:"hidden",children:o.children}),o.subtreeFlags=$.subtreeFlags&65011712,I!==null?T=qn(I,T):(T=hi(T,f,i,null),T.flags|=2),T.return=n,o.return=n,o.sibling=T,n.child=o,yr(null,o),o=n.child,T=e.child.memoizedState,T===null?T=jf(i):(f=T.cachePool,f!==null?($=it._currentValue,f=f.parent!==$?{parent:$,pool:$}:f):f=e0(),T={baseLanes:T.baseLanes|i,cachePool:f}),o.memoizedState=T,o.childLanes=_f(e,b,i),n.memoizedState=Ef,yr(e.child,o)):(Aa(n),i=e.child,e=i.sibling,i=qn(i,{mode:"visible",children:o.children}),i.return=n,i.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=i,n.memoizedState=null,i)}function Af(e,n){return n=us({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function us(e,n){return e=Bt(22,e,null,n),e.lanes=0,e}function Cf(e,n,i){return bi(n,e.child,null,i),e=Af(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function hp(e,n,i){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Yu(e.return,n,i)}function Tf(e,n,i,o,f,m){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:f,treeForkCount:m}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=i,b.tailMode=f,b.treeForkCount=m)}function mp(e,n,i){var o=n.pendingProps,f=o.revealOrder,m=o.tail;o=o.children;var b=et.current,T=(b&2)!==0;if(T?(b=b&1|2,n.flags|=128):b&=1,W(et,b),yt(e,n,o,i),o=De?lr:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hp(e,i,n);else if(e.tag===19)hp(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(i=n.child,f=null;i!==null;)e=i.alternate,e!==null&&Jo(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=n.child,n.child=null):(f=i.sibling,i.sibling=null),Tf(n,!1,f,i,m,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Jo(e)===null){n.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}Tf(n,!0,i,null,m,o);break;case"together":Tf(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Fn(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),za|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(al(e,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,i=qn(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=qn(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Mf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Xo(e)))}function _w(e,n,i){switch(n.tag){case 3:ce(n,n.stateNode.containerInfo),Na(n,it,e.memoizedState.cache),mi();break;case 27:case 5:Ee(n);break;case 4:ce(n,n.stateNode.containerInfo);break;case 10:Na(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,ef(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Aa(n),n.flags|=128,null):(i&n.child.childLanes)!==0?dp(e,n,i):(Aa(n),e=Fn(e,n,i),e!==null?e.sibling:null);Aa(n);break;case 19:var f=(e.flags&128)!==0;if(o=(i&n.childLanes)!==0,o||(al(e,n,i,!1),o=(i&n.childLanes)!==0),f){if(o)return mp(e,n,i);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),W(et,et.current),o)break;return null;case 22:return n.lanes=0,rp(e,n,i,n.pendingProps);case 24:Na(n,it,e.memoizedState.cache)}return Fn(e,n,i)}function pp(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)rt=!0;else{if(!Mf(e,i)&&(n.flags&128)===0)return rt=!1,_w(e,n,i);rt=(e.flags&131072)!==0}else rt=!1,De&&(n.flags&1048576)!==0&&Qm(n,lr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=yi(n.elementType),n.type=e,typeof e=="function")ku(e)?(o=Si(e,o),n.tag=1,n=up(null,n,e,o,i)):(n.tag=0,n=Nf(null,n,e,o,i));else{if(e!=null){var f=e.$$typeof;if(f===C){n.tag=11,n=ap(null,n,e,o,i);break e}else if(f===O){n.tag=14,n=ip(null,n,e,o,i);break e}}throw n=L(e)||e,Error(r(306,n,""))}}return n;case 0:return Nf(e,n,n.type,n.pendingProps,i);case 1:return o=n.type,f=Si(o,n.pendingProps),up(e,n,o,f,i);case 3:e:{if(ce(n,n.stateNode.containerInfo),e===null)throw Error(r(387));o=n.pendingProps;var m=n.memoizedState;f=m.element,Fu(e,n),hr(n,o,null,i);var b=n.memoizedState;if(o=b.cache,Na(n,it,o),o!==m.cache&&qu(n,[it],i,!0),dr(),o=b.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=fp(e,n,o,i);break e}else if(o!==f){f=It(Error(r(424)),n),rr(f),n=fp(e,n,o,i);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Qe=nn(e.firstChild),gt=n,De=!0,wa=null,en=!0,i=r0(n,null,o,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(mi(),o===f){n=Fn(e,n,i);break e}yt(e,n,o,i)}n=n.child}return n;case 26:return cs(e,n),e===null?(i=_g(n.type,null,n.pendingProps,null))?n.memoizedState=i:De||(i=n.type,e=n.pendingProps,o=_s(se.current).createElement(i),o[ct]=n,o[wt]=e,vt(o,i,e),at(o),n.stateNode=o):n.memoizedState=_g(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ee(n),e===null&&De&&(o=n.stateNode=Ng(n.type,n.pendingProps,se.current),gt=n,en=!0,f=Qe,La(n.type)?(cd=f,Qe=nn(o.firstChild)):Qe=f),yt(e,n,n.pendingProps.children,i),cs(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&De&&((f=o=Qe)&&(o=nS(o,n.type,n.pendingProps,en),o!==null?(n.stateNode=o,gt=n,Qe=nn(o.firstChild),en=!1,f=!0):f=!1),f||Sa(n)),Ee(n),f=n.type,m=n.pendingProps,b=e!==null?e.memoizedProps:null,o=m.children,id(f,m)?o=null:b!==null&&id(f,b)&&(n.flags|=32),n.memoizedState!==null&&(f=nf(e,n,xw,null,null,i),Rr._currentValue=f),cs(e,n),yt(e,n,o,i),n.child;case 6:return e===null&&De&&((e=i=Qe)&&(i=aS(i,n.pendingProps,en),i!==null?(n.stateNode=i,gt=n,Qe=null,e=!0):e=!1),e||Sa(n)),null;case 13:return dp(e,n,i);case 4:return ce(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=bi(n,null,o,i):yt(e,n,o,i),n.child;case 11:return ap(e,n,n.type,n.pendingProps,i);case 7:return yt(e,n,n.pendingProps,i),n.child;case 8:return yt(e,n,n.pendingProps.children,i),n.child;case 12:return yt(e,n,n.pendingProps.children,i),n.child;case 10:return o=n.pendingProps,Na(n,n.type,o.value),yt(e,n,o.children,i),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,gi(n),f=xt(f),o=o(f),n.flags|=1,yt(e,n,o,i),n.child;case 14:return ip(e,n,n.type,n.pendingProps,i);case 15:return lp(e,n,n.type,n.pendingProps,i);case 19:return mp(e,n,i);case 31:return jw(e,n,i);case 22:return rp(e,n,i,n.pendingProps);case 24:return gi(n),o=xt(it),e===null?(f=Zu(),f===null&&(f=Ze,m=Xu(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=i),f=m),n.memoizedState={parent:o,cache:f},Ku(n),Na(n,it,f)):((e.lanes&i)!==0&&(Fu(e,n),hr(n,null,null,i),dr()),f=e.memoizedState,m=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Na(n,it,o)):(o=m.cache,Na(n,it,o),o!==f.cache&&qu(n,[it],i,!0))),yt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Pn(e){e.flags|=4}function zf(e,n,i,o,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Yp())e.flags|=8192;else throw vi=Ko,Qu}else e.flags&=-16777217}function gp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!zg(n))if(Yp())e.flags|=8192;else throw vi=Ko,Qu}function fs(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?xo():536870912,e.lanes|=n,pl|=n)}function vr(e,n){if(!De)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ke(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(n)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=i,n}function Aw(e,n,i){var o=n.pendingProps;switch(Bu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(n),null;case 1:return Ke(n),null;case 3:return i=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Zn(it),ue(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(nl(n)?Pn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Vu())),Ke(n),null;case 26:var f=n.type,m=n.memoizedState;return e===null?(Pn(n),m!==null?(Ke(n),gp(n,m)):(Ke(n),zf(n,f,null,o,i))):m?m!==e.memoizedState?(Pn(n),Ke(n),gp(n,m)):(Ke(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&Pn(n),Ke(n),zf(n,f,e,o,i)),null;case 27:if(ye(n),i=se.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Pn(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ke(n),null}e=ae.current,nl(n)?Fm(n):(e=Ng(f,o,i),n.stateNode=e,Pn(n))}return Ke(n),null;case 5:if(ye(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Pn(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ke(n),null}if(m=ae.current,nl(n))Fm(n);else{var b=_s(se.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?b.createElement(f,{is:o.is}):b.createElement(f)}}m[ct]=n,m[wt]=o;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=m;e:switch(vt(m,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Pn(n)}}return Ke(n),zf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&Pn(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(e=se.current,nl(n)){if(e=n.stateNode,i=n.memoizedProps,o=null,f=gt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[ct]=n,e=!!(e.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||dg(e.nodeValue,i)),e||Sa(n,!0)}else e=_s(e).createTextNode(o),e[ct]=n,n.stateNode=e}return Ke(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(o=nl(n),i!==null){if(e===null){if(!o)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ct]=n}else mi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),e=!1}else i=Vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(Vt(n),n):(Vt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Ke(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=nl(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[ct]=n}else mi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),f=!1}else f=Vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(Vt(n),n):(Vt(n),null)}return Vt(n),(n.flags&128)!==0?(n.lanes=i,n):(i=o!==null,e=e!==null&&e.memoizedState!==null,i&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==f&&(o.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),fs(n,n.updateQueue),Ke(n),null);case 4:return ue(),e===null&&Wf(n.stateNode.containerInfo),Ke(n),null;case 10:return Zn(n.type),Ke(n),null;case 19:if(V(et),o=n.memoizedState,o===null)return Ke(n),null;if(f=(n.flags&128)!==0,m=o.rendering,m===null)if(f)vr(o,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(m=Jo(e),m!==null){for(n.flags|=128,vr(o,!1),e=m.updateQueue,n.updateQueue=e,fs(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)Xm(i,e),i=i.sibling;return W(et,et.current&1|2),De&&Xn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&pt()>gs&&(n.flags|=128,f=!0,vr(o,!1),n.lanes=4194304)}else{if(!f)if(e=Jo(m),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,fs(n,e),vr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!De)return Ke(n),null}else 2*pt()-o.renderingStartTime>gs&&i!==536870912&&(n.flags|=128,f=!0,vr(o,!1),n.lanes=4194304);o.isBackwards?(m.sibling=n.child,n.child=m):(e=o.last,e!==null?e.sibling=m:n.child=m,o.last=m)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=pt(),e.sibling=null,i=et.current,W(et,f?i&1|2:i&1),De&&Xn(n,o.treeForkCount),e):(Ke(n),null);case 22:case 23:return Vt(n),Wu(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(i&536870912)!==0&&(n.flags&128)===0&&(Ke(n),n.subtreeFlags&6&&(n.flags|=8192)):Ke(n),i=n.updateQueue,i!==null&&fs(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==i&&(n.flags|=2048),e!==null&&V(xi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),Zn(it),Ke(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Cw(e,n){switch(Bu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Zn(it),ue(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return ye(n),null;case 31:if(n.memoizedState!==null){if(Vt(n),n.alternate===null)throw Error(r(340));mi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Vt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));mi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return V(et),null;case 4:return ue(),null;case 10:return Zn(n.type),null;case 22:case 23:return Vt(n),Wu(),e!==null&&V(xi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Zn(it),null;case 25:return null;default:return null}}function xp(e,n){switch(Bu(n),n.tag){case 3:Zn(it),ue();break;case 26:case 27:case 5:ye(n);break;case 4:ue();break;case 31:n.memoizedState!==null&&Vt(n);break;case 13:Vt(n);break;case 19:V(et);break;case 10:Zn(n.type);break;case 22:case 23:Vt(n),Wu(),e!==null&&V(xi);break;case 24:Zn(it)}}function br(e,n){try{var i=n.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var f=o.next;i=f;do{if((i.tag&e)===e){o=void 0;var m=i.create,b=i.inst;o=m(),b.destroy=o}i=i.next}while(i!==f)}}catch(T){Ye(n,n.return,T)}}function Ta(e,n,i){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var m=f.next;o=m;do{if((o.tag&e)===e){var b=o.inst,T=b.destroy;if(T!==void 0){b.destroy=void 0,f=n;var $=i,I=T;try{I()}catch(ie){Ye(f,$,ie)}}}o=o.next}while(o!==m)}}catch(ie){Ye(n,n.return,ie)}}function yp(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{s0(n,i)}catch(o){Ye(e,e.return,o)}}}function vp(e,n,i){i.props=Si(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(o){Ye(e,n,o)}}function wr(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof i=="function"?e.refCleanup=i(o):i.current=o}}catch(f){Ye(e,n,f)}}function En(e,n){var i=e.ref,o=e.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(f){Ye(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Ye(e,n,f)}else i.current=null}function bp(e){var n=e.type,i=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(f){Ye(e,e.return,f)}}function Of(e,n,i){try{var o=e.stateNode;Pw(o,e.type,i,n),o[wt]=n}catch(f){Ye(e,e.return,f)}}function wp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&La(e.type)||e.tag===4}function Rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&La(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kf(e,n,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=$n));else if(o!==4&&(o===27&&La(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(kf(e,n,i),e=e.sibling;e!==null;)kf(e,n,i),e=e.sibling}function ds(e,n,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(o!==4&&(o===27&&La(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ds(e,n,i),e=e.sibling;e!==null;)ds(e,n,i),e=e.sibling}function Sp(e){var n=e.stateNode,i=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);vt(n,o,i),n[ct]=e,n[wt]=i}catch(m){Ye(e,e.return,m)}}var In=!1,ot=!1,Df=!1,Np=typeof WeakSet=="function"?WeakSet:Set,mt=null;function Tw(e,n){if(e=e.containerInfo,nd=Rs,e=Dm(e),Au(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var f=o.anchorOffset,m=o.focusNode;o=o.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var b=0,T=-1,$=-1,I=0,ie=0,re=e,J=null;t:for(;;){for(var ee;re!==i||f!==0&&re.nodeType!==3||(T=b+f),re!==m||o!==0&&re.nodeType!==3||($=b+o),re.nodeType===3&&(b+=re.nodeValue.length),(ee=re.firstChild)!==null;)J=re,re=ee;for(;;){if(re===e)break t;if(J===i&&++I===f&&(T=b),J===m&&++ie===o&&($=b),(ee=re.nextSibling)!==null)break;re=J,J=re.parentNode}re=ee}i=T===-1||$===-1?null:{start:T,end:$}}else i=null}i=i||{start:0,end:0}}else i=null;for(ad={focusedElem:e,selectionRange:i},Rs=!1,mt=n;mt!==null;)if(n=mt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,mt=e;else for(;mt!==null;){switch(n=mt,m=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,i=n,f=m.memoizedProps,m=m.memoizedState,o=i.stateNode;try{var de=Si(i.type,f);e=o.getSnapshotBeforeUpdate(de,m),o.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){Ye(i,i.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)rd(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":rd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,mt=e;break}mt=n.return}}function Ep(e,n,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:Wn(e,i),o&4&&br(5,i);break;case 1:if(Wn(e,i),o&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(b){Ye(i,i.return,b)}else{var f=Si(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ye(i,i.return,b)}}o&64&&yp(i),o&512&&wr(i,i.return);break;case 3:if(Wn(e,i),o&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{s0(e,n)}catch(b){Ye(i,i.return,b)}}break;case 27:n===null&&o&4&&Sp(i);case 26:case 5:Wn(e,i),n===null&&o&4&&bp(i),o&512&&wr(i,i.return);break;case 12:Wn(e,i);break;case 31:Wn(e,i),o&4&&Ap(e,i);break;case 13:Wn(e,i),o&4&&Cp(e,i),o&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Bw.bind(null,i),iS(e,i))));break;case 22:if(o=i.memoizedState!==null||In,!o){n=n!==null&&n.memoizedState!==null||ot,f=In;var m=ot;In=o,(ot=n)&&!m?ea(e,i,(i.subtreeFlags&8772)!==0):Wn(e,i),In=f,ot=m}break;case 30:break;default:Wn(e,i)}}function jp(e){var n=e.alternate;n!==null&&(e.alternate=null,jp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ql(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fe=null,Tt=!1;function Jn(e,n,i){for(i=i.child;i!==null;)_p(e,n,i),i=i.sibling}function _p(e,n,i){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(ai,i)}catch{}switch(i.tag){case 26:ot||En(i,n),Jn(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ot||En(i,n);var o=Fe,f=Tt;La(i.type)&&(Fe=i.stateNode,Tt=!1),Jn(e,n,i),Mr(i.stateNode),Fe=o,Tt=f;break;case 5:ot||En(i,n);case 6:if(o=Fe,f=Tt,Fe=null,Jn(e,n,i),Fe=o,Tt=f,Fe!==null)if(Tt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(i.stateNode)}catch(m){Ye(i,n,m)}else try{Fe.removeChild(i.stateNode)}catch(m){Ye(i,n,m)}break;case 18:Fe!==null&&(Tt?(e=Fe,yg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Nl(e)):yg(Fe,i.stateNode));break;case 4:o=Fe,f=Tt,Fe=i.stateNode.containerInfo,Tt=!0,Jn(e,n,i),Fe=o,Tt=f;break;case 0:case 11:case 14:case 15:Ta(2,i,n),ot||Ta(4,i,n),Jn(e,n,i);break;case 1:ot||(En(i,n),o=i.stateNode,typeof o.componentWillUnmount=="function"&&vp(i,n,o)),Jn(e,n,i);break;case 21:Jn(e,n,i);break;case 22:ot=(o=ot)||i.memoizedState!==null,Jn(e,n,i),ot=o;break;default:Jn(e,n,i)}}function Ap(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Nl(e)}catch(i){Ye(n,n.return,i)}}}function Cp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nl(e)}catch(i){Ye(n,n.return,i)}}function Mw(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Np),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Np),n;default:throw Error(r(435,e.tag))}}function hs(e,n){var i=Mw(e);n.forEach(function(o){if(!i.has(o)){i.add(o);var f=Uw.bind(null,e,o);o.then(f,f)}})}function Mt(e,n){var i=n.deletions;if(i!==null)for(var o=0;o<i.length;o++){var f=i[o],m=e,b=n,T=b;e:for(;T!==null;){switch(T.tag){case 27:if(La(T.type)){Fe=T.stateNode,Tt=!1;break e}break;case 5:Fe=T.stateNode,Tt=!1;break e;case 3:case 4:Fe=T.stateNode.containerInfo,Tt=!0;break e}T=T.return}if(Fe===null)throw Error(r(160));_p(m,b,f),Fe=null,Tt=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Tp(n,e),n=n.sibling}var cn=null;function Tp(e,n){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(n,e),zt(e),o&4&&(Ta(3,e,e.return),br(3,e),Ta(5,e,e.return));break;case 1:Mt(n,e),zt(e),o&512&&(ot||i===null||En(i,i.return)),o&64&&In&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var f=cn;if(Mt(n,e),zt(e),o&512&&(ot||i===null||En(i,i.return)),o&4){var m=i!==null?i.memoizedState:null;if(o=e.memoizedState,i===null)if(o===null)if(e.stateNode===null){e:{o=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":m=f.getElementsByTagName("title")[0],(!m||m[ri]||m[ct]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(o),f.head.insertBefore(m,f.querySelector("head > title"))),vt(m,o,i),m[ct]=e,at(m),o=m;break e;case"link":var b=Tg("link","href",f).get(o+(i.href||""));if(b){for(var T=0;T<b.length;T++)if(m=b[T],m.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&m.getAttribute("rel")===(i.rel==null?null:i.rel)&&m.getAttribute("title")===(i.title==null?null:i.title)&&m.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){b.splice(T,1);break t}}m=f.createElement(o),vt(m,o,i),f.head.appendChild(m);break;case"meta":if(b=Tg("meta","content",f).get(o+(i.content||""))){for(T=0;T<b.length;T++)if(m=b[T],m.getAttribute("content")===(i.content==null?null:""+i.content)&&m.getAttribute("name")===(i.name==null?null:i.name)&&m.getAttribute("property")===(i.property==null?null:i.property)&&m.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&m.getAttribute("charset")===(i.charSet==null?null:i.charSet)){b.splice(T,1);break t}}m=f.createElement(o),vt(m,o,i),f.head.appendChild(m);break;default:throw Error(r(468,o))}m[ct]=e,at(m),o=m}e.stateNode=o}else Mg(f,e.type,e.stateNode);else e.stateNode=Cg(f,o,e.memoizedProps);else m!==o?(m===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):m.count--,o===null?Mg(f,e.type,e.stateNode):Cg(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Of(e,e.memoizedProps,i.memoizedProps)}break;case 27:Mt(n,e),zt(e),o&512&&(ot||i===null||En(i,i.return)),i!==null&&o&4&&Of(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Mt(n,e),zt(e),o&512&&(ot||i===null||En(i,i.return)),e.flags&32){f=e.stateNode;try{Zi(f,"")}catch(de){Ye(e,e.return,de)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,Of(e,f,i!==null?i.memoizedProps:f)),o&1024&&(Df=!0);break;case 6:if(Mt(n,e),zt(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,i=e.stateNode;try{i.nodeValue=o}catch(de){Ye(e,e.return,de)}}break;case 3:if(Ts=null,f=cn,cn=As(n.containerInfo),Mt(n,e),cn=f,zt(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Nl(n.containerInfo)}catch(de){Ye(e,e.return,de)}Df&&(Df=!1,Mp(e));break;case 4:o=cn,cn=As(e.stateNode.containerInfo),Mt(n,e),zt(e),cn=o;break;case 12:Mt(n,e),zt(e);break;case 31:Mt(n,e),zt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,hs(e,o)));break;case 13:Mt(n,e),zt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ps=pt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,hs(e,o)));break;case 22:f=e.memoizedState!==null;var $=i!==null&&i.memoizedState!==null,I=In,ie=ot;if(In=I||f,ot=ie||$,Mt(n,e),ot=ie,In=I,zt(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(i===null||$||In||ot||Ni(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){$=i=n;try{if(m=$.stateNode,f)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{T=$.stateNode;var re=$.memoizedProps.style,J=re!=null&&re.hasOwnProperty("display")?re.display:null;T.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(de){Ye($,$.return,de)}}}else if(n.tag===6){if(i===null){$=n;try{$.stateNode.nodeValue=f?"":$.memoizedProps}catch(de){Ye($,$.return,de)}}}else if(n.tag===18){if(i===null){$=n;try{var ee=$.stateNode;f?vg(ee,!0):vg($.stateNode,!1)}catch(de){Ye($,$.return,de)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,hs(e,i))));break;case 19:Mt(n,e),zt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,hs(e,o)));break;case 30:break;case 21:break;default:Mt(n,e),zt(e)}}function zt(e){var n=e.flags;if(n&2){try{for(var i,o=e.return;o!==null;){if(wp(o)){i=o;break}o=o.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var f=i.stateNode,m=Rf(e);ds(e,m,f);break;case 5:var b=i.stateNode;i.flags&32&&(Zi(b,""),i.flags&=-33);var T=Rf(e);ds(e,T,b);break;case 3:case 4:var $=i.stateNode.containerInfo,I=Rf(e);kf(e,I,$);break;default:throw Error(r(161))}}catch(ie){Ye(e,e.return,ie)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Mp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Mp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Wn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Ep(e,n.alternate,n),n=n.sibling}function Ni(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ta(4,n,n.return),Ni(n);break;case 1:En(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&vp(n,n.return,i),Ni(n);break;case 27:Mr(n.stateNode);case 26:case 5:En(n,n.return),Ni(n);break;case 22:n.memoizedState===null&&Ni(n);break;case 30:Ni(n);break;default:Ni(n)}e=e.sibling}}function ea(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,m=n,b=m.flags;switch(m.tag){case 0:case 11:case 15:ea(f,m,i),br(4,m);break;case 1:if(ea(f,m,i),o=m,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(I){Ye(o,o.return,I)}if(o=m,f=o.updateQueue,f!==null){var T=o.stateNode;try{var $=f.shared.hiddenCallbacks;if($!==null)for(f.shared.hiddenCallbacks=null,f=0;f<$.length;f++)o0($[f],T)}catch(I){Ye(o,o.return,I)}}i&&b&64&&yp(m),wr(m,m.return);break;case 27:Sp(m);case 26:case 5:ea(f,m,i),i&&o===null&&b&4&&bp(m),wr(m,m.return);break;case 12:ea(f,m,i);break;case 31:ea(f,m,i),i&&b&4&&Ap(f,m);break;case 13:ea(f,m,i),i&&b&4&&Cp(f,m);break;case 22:m.memoizedState===null&&ea(f,m,i),wr(m,m.return);break;case 30:break;default:ea(f,m,i)}n=n.sibling}}function Lf(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&or(i))}function Hf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&or(e))}function un(e,n,i,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)zp(e,n,i,o),n=n.sibling}function zp(e,n,i,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:un(e,n,i,o),f&2048&&br(9,n);break;case 1:un(e,n,i,o);break;case 3:un(e,n,i,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&or(e)));break;case 12:if(f&2048){un(e,n,i,o),e=n.stateNode;try{var m=n.memoizedProps,b=m.id,T=m.onPostCommit;typeof T=="function"&&T(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch($){Ye(n,n.return,$)}}else un(e,n,i,o);break;case 31:un(e,n,i,o);break;case 13:un(e,n,i,o);break;case 23:break;case 22:m=n.stateNode,b=n.alternate,n.memoizedState!==null?m._visibility&2?un(e,n,i,o):Sr(e,n):m._visibility&2?un(e,n,i,o):(m._visibility|=2,dl(e,n,i,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&Lf(b,n);break;case 24:un(e,n,i,o),f&2048&&Hf(n.alternate,n);break;default:un(e,n,i,o)}}function dl(e,n,i,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var m=e,b=n,T=i,$=o,I=b.flags;switch(b.tag){case 0:case 11:case 15:dl(m,b,T,$,f),br(8,b);break;case 23:break;case 22:var ie=b.stateNode;b.memoizedState!==null?ie._visibility&2?dl(m,b,T,$,f):Sr(m,b):(ie._visibility|=2,dl(m,b,T,$,f)),f&&I&2048&&Lf(b.alternate,b);break;case 24:dl(m,b,T,$,f),f&&I&2048&&Hf(b.alternate,b);break;default:dl(m,b,T,$,f)}n=n.sibling}}function Sr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,o=n,f=o.flags;switch(o.tag){case 22:Sr(i,o),f&2048&&Lf(o.alternate,o);break;case 24:Sr(i,o),f&2048&&Hf(o.alternate,o);break;default:Sr(i,o)}n=n.sibling}}var Nr=8192;function hl(e,n,i){if(e.subtreeFlags&Nr)for(e=e.child;e!==null;)Op(e,n,i),e=e.sibling}function Op(e,n,i){switch(e.tag){case 26:hl(e,n,i),e.flags&Nr&&e.memoizedState!==null&&gS(i,cn,e.memoizedState,e.memoizedProps);break;case 5:hl(e,n,i);break;case 3:case 4:var o=cn;cn=As(e.stateNode.containerInfo),hl(e,n,i),cn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Nr,Nr=16777216,hl(e,n,i),Nr=o):hl(e,n,i));break;default:hl(e,n,i)}}function Rp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Er(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];mt=o,Dp(o,e)}Rp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kp(e),e=e.sibling}function kp(e){switch(e.tag){case 0:case 11:case 15:Er(e),e.flags&2048&&Ta(9,e,e.return);break;case 3:Er(e);break;case 12:Er(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,ms(e)):Er(e);break;default:Er(e)}}function ms(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];mt=o,Dp(o,e)}Rp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ta(8,n,n.return),ms(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,ms(n));break;default:ms(n)}e=e.sibling}}function Dp(e,n){for(;mt!==null;){var i=mt;switch(i.tag){case 0:case 11:case 15:Ta(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:or(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,mt=o;else e:for(i=e;mt!==null;){o=mt;var f=o.sibling,m=o.return;if(jp(o),o===i){mt=null;break e}if(f!==null){f.return=m,mt=f;break e}mt=m}}}var zw={getCacheForType:function(e){var n=xt(it),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return xt(it).controller.signal}},Ow=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Ze=null,ze=null,Re=0,$e=0,$t=null,Ma=!1,ml=!1,Bf=!1,ta=0,We=0,za=0,Ei=0,Uf=0,Yt=0,pl=0,jr=null,Ot=null,Vf=!1,ps=0,Lp=0,gs=1/0,xs=null,Oa=null,ut=0,Ra=null,gl=null,na=0,$f=0,Yf=null,Hp=null,_r=0,qf=null;function qt(){return(Ve&2)!==0&&Re!==0?Re&-Re:M.T!==null?Ff():wo()}function Bp(){if(Yt===0)if((Re&536870912)===0||De){var e=Vi;Vi<<=1,(Vi&3932160)===0&&(Vi=262144),Yt=e}else Yt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Yt}function Rt(e,n,i){(e===Ze&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(xl(e,0),ka(e,Re,Yt,!1)),li(e,i),((Ve&2)===0||e!==Ze)&&(e===Ze&&((Ve&2)===0&&(Ei|=i),We===4&&ka(e,Re,Yt,!1)),jn(e))}function Up(e,n,i){if((Ve&6)!==0)throw Error(r(327));var o=!i&&(n&127)===0&&(n&e.expiredLanes)===0||ii(e,n),f=o?Dw(e,n):Gf(e,n,!0),m=o;do{if(f===0){ml&&!o&&ka(e,n,0,!1);break}else{if(i=e.current.alternate,m&&!Rw(i)){f=Gf(e,n,!1),m=!1;continue}if(f===2){if(m=n,e.errorRecoveryDisabledLanes&m)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var T=e;f=jr;var $=T.current.memoizedState.isDehydrated;if($&&(xl(T,b).flags|=256),b=Gf(T,b,!1),b!==2){if(Bf&&!$){T.errorRecoveryDisabledLanes|=m,Ei|=m,f=4;break e}m=Ot,Ot=f,m!==null&&(Ot===null?Ot=m:Ot.push.apply(Ot,m))}f=b}if(m=!1,f!==2)continue}}if(f===1){xl(e,0),ka(e,n,0,!0);break}e:{switch(o=e,m=f,m){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:ka(o,n,Yt,!Ma);break e;case 2:Ot=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=ps+300-pt(),10<f)){if(ka(o,n,Yt,!Ma),Yi(o,0,!0)!==0)break e;na=n,o.timeoutHandle=gg(Vp.bind(null,o,i,Ot,xs,Vf,n,Yt,Ei,pl,Ma,m,"Throttled",-0,0),f);break e}Vp(o,i,Ot,xs,Vf,n,Yt,Ei,pl,Ma,m,null,-0,0)}}break}while(!0);jn(e)}function Vp(e,n,i,o,f,m,b,T,$,I,ie,re,J,ee){if(e.timeoutHandle=-1,re=n.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},Op(n,m,re);var de=(m&62914560)===m?ps-pt():(m&4194048)===m?Lp-pt():0;if(de=xS(re,de),de!==null){na=m,e.cancelPendingCommit=de(Kp.bind(null,e,n,m,i,o,f,b,T,$,ie,re,null,J,ee)),ka(e,m,b,!I);return}}Kp(e,n,m,i,o,f,b,T,$)}function Rw(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var f=i[o],m=f.getSnapshot;f=f.value;try{if(!Ht(m(),f))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ka(e,n,i,o){n&=~Uf,n&=~Ei,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var m=31-Et(f),b=1<<m;o[m]=-1,f&=~b}i!==0&&yo(e,i,n)}function ys(){return(Ve&6)===0?(Ar(0),!1):!0}function Xf(){if(ze!==null){if($e===0)var e=ze.return;else e=ze,Gn=pi=null,rf(e),ol=null,cr=0,e=ze;for(;e!==null;)xp(e.alternate,e),e=e.return;ze=null}}function xl(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Ww(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),na=0,Xf(),Ze=e,ze=i=qn(e.current,null),Re=n,$e=0,$t=null,Ma=!1,ml=ii(e,n),Bf=!1,pl=Yt=Uf=Ei=za=We=0,Ot=jr=null,Vf=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-Et(o),m=1<<f;n|=e[f],o&=~m}return ta=n,Uo(),i}function $p(e,n){Ae=null,M.H=xr,n===rl||n===Qo?(n=a0(),$e=3):n===Qu?(n=a0(),$e=4):$e=n===Sf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,$t=n,ze===null&&(We=1,os(e,It(n,e.current)))}function Yp(){var e=Ut.current;return e===null?!0:(Re&4194048)===Re?tn===null:(Re&62914560)===Re||(Re&536870912)!==0?e===tn:!1}function qp(){var e=M.H;return M.H=xr,e===null?xr:e}function Xp(){var e=M.A;return M.A=zw,e}function vs(){We=4,Ma||(Re&4194048)!==Re&&Ut.current!==null||(ml=!0),(za&134217727)===0&&(Ei&134217727)===0||Ze===null||ka(Ze,Re,Yt,!1)}function Gf(e,n,i){var o=Ve;Ve|=2;var f=qp(),m=Xp();(Ze!==e||Re!==n)&&(xs=null,xl(e,n)),n=!1;var b=We;e:do try{if($e!==0&&ze!==null){var T=ze,$=$t;switch($e){case 8:Xf(),b=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(n=!0);var I=$e;if($e=0,$t=null,yl(e,T,$,I),i&&ml){b=0;break e}break;default:I=$e,$e=0,$t=null,yl(e,T,$,I)}}kw(),b=We;break}catch(ie){$p(e,ie)}while(!0);return n&&e.shellSuspendCounter++,Gn=pi=null,Ve=o,M.H=f,M.A=m,ze===null&&(Ze=null,Re=0,Uo()),b}function kw(){for(;ze!==null;)Gp(ze)}function Dw(e,n){var i=Ve;Ve|=2;var o=qp(),f=Xp();Ze!==e||Re!==n?(xs=null,gs=pt()+500,xl(e,n)):ml=ii(e,n);e:do try{if($e!==0&&ze!==null){n=ze;var m=$t;t:switch($e){case 1:$e=0,$t=null,yl(e,n,m,1);break;case 2:case 9:if(t0(m)){$e=0,$t=null,Zp(n);break}n=function(){$e!==2&&$e!==9||Ze!==e||($e=7),jn(e)},m.then(n,n);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:t0(m)?($e=0,$t=null,Zp(n)):($e=0,$t=null,yl(e,n,m,7));break;case 5:var b=null;switch(ze.tag){case 26:b=ze.memoizedState;case 5:case 27:var T=ze;if(b?zg(b):T.stateNode.complete){$e=0,$t=null;var $=T.sibling;if($!==null)ze=$;else{var I=T.return;I!==null?(ze=I,bs(I)):ze=null}break t}}$e=0,$t=null,yl(e,n,m,5);break;case 6:$e=0,$t=null,yl(e,n,m,6);break;case 8:Xf(),We=6;break e;default:throw Error(r(462))}}Lw();break}catch(ie){$p(e,ie)}while(!0);return Gn=pi=null,M.H=o,M.A=f,Ve=i,ze!==null?0:(Ze=null,Re=0,Uo(),We)}function Lw(){for(;ze!==null&&!ei();)Gp(ze)}function Gp(e){var n=pp(e.alternate,e,ta);e.memoizedProps=e.pendingProps,n===null?bs(e):ze=n}function Zp(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=cp(i,n,n.pendingProps,n.type,void 0,Re);break;case 11:n=cp(i,n,n.pendingProps,n.type.render,n.ref,Re);break;case 5:rf(n);default:xp(i,n),n=ze=Xm(n,ta),n=pp(i,n,ta)}e.memoizedProps=e.pendingProps,n===null?bs(e):ze=n}function yl(e,n,i,o){Gn=pi=null,rf(n),ol=null,cr=0;var f=n.return;try{if(Ew(e,f,n,i,Re)){We=1,os(e,It(i,e.current)),ze=null;return}}catch(m){if(f!==null)throw ze=f,m;We=1,os(e,It(i,e.current)),ze=null;return}n.flags&32768?(De||o===1?e=!0:ml||(Re&536870912)!==0?e=!1:(Ma=e=!0,(o===2||o===9||o===3||o===6)&&(o=Ut.current,o!==null&&o.tag===13&&(o.flags|=16384))),Qp(n,e)):bs(n)}function bs(e){var n=e;do{if((n.flags&32768)!==0){Qp(n,Ma);return}e=n.return;var i=Aw(n.alternate,n,ta);if(i!==null){ze=i;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=e}while(n!==null);We===0&&(We=5)}function Qp(e,n){do{var i=Cw(e.alternate,e);if(i!==null){i.flags&=32767,ze=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){ze=e;return}ze=e=i}while(e!==null);We=6,ze=null}function Kp(e,n,i,o,f,m,b,T,$){e.cancelPendingCommit=null;do ws();while(ut!==0);if((Ve&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(m=n.lanes|n.childLanes,m|=Ou,su(e,i,m,b,T,$),e===Ze&&(ze=Ze=null,Re=0),gl=n,Ra=e,na=i,$f=m,Yf=f,Hp=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vw(ni,function(){return Wp(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=M.T,M.T=null,f=U.p,U.p=2,b=Ve,Ve|=4;try{Tw(e,n,i)}finally{Ve=b,U.p=f,M.T=o}}ut=1,Fp(),Pp(),Ip()}}function Fp(){if(ut===1){ut=0;var e=Ra,n=gl,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=M.T,M.T=null;var o=U.p;U.p=2;var f=Ve;Ve|=4;try{Tp(n,e);var m=ad,b=Dm(e.containerInfo),T=m.focusedElem,$=m.selectionRange;if(b!==T&&T&&T.ownerDocument&&km(T.ownerDocument.documentElement,T)){if($!==null&&Au(T)){var I=$.start,ie=$.end;if(ie===void 0&&(ie=I),"selectionStart"in T)T.selectionStart=I,T.selectionEnd=Math.min(ie,T.value.length);else{var re=T.ownerDocument||document,J=re&&re.defaultView||window;if(J.getSelection){var ee=J.getSelection(),de=T.textContent.length,Ne=Math.min($.start,de),Ge=$.end===void 0?Ne:Math.min($.end,de);!ee.extend&&Ne>Ge&&(b=Ge,Ge=Ne,Ne=b);var F=Rm(T,Ne),X=Rm(T,Ge);if(F&&X&&(ee.rangeCount!==1||ee.anchorNode!==F.node||ee.anchorOffset!==F.offset||ee.focusNode!==X.node||ee.focusOffset!==X.offset)){var P=re.createRange();P.setStart(F.node,F.offset),ee.removeAllRanges(),Ne>Ge?(ee.addRange(P),ee.extend(X.node,X.offset)):(P.setEnd(X.node,X.offset),ee.addRange(P))}}}}for(re=[],ee=T;ee=ee.parentNode;)ee.nodeType===1&&re.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<re.length;T++){var le=re[T];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Rs=!!nd,ad=nd=null}finally{Ve=f,U.p=o,M.T=i}}e.current=n,ut=2}}function Pp(){if(ut===2){ut=0;var e=Ra,n=gl,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=M.T,M.T=null;var o=U.p;U.p=2;var f=Ve;Ve|=4;try{Ep(e,n.alternate,n)}finally{Ve=f,U.p=o,M.T=i}}ut=3}}function Ip(){if(ut===4||ut===3){ut=0,ti();var e=Ra,n=gl,i=na,o=Hp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?ut=5:(ut=0,gl=Ra=null,Jp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Oa=null),Zl(i),n=n.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(ai,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=M.T,f=U.p,U.p=2,M.T=null;try{for(var m=e.onRecoverableError,b=0;b<o.length;b++){var T=o[b];m(T.value,{componentStack:T.stack})}}finally{M.T=n,U.p=f}}(na&3)!==0&&ws(),jn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===qf?_r++:(_r=0,qf=e):_r=0,Ar(0)}}function Jp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,or(n)))}function ws(){return Fp(),Pp(),Ip(),Wp()}function Wp(){if(ut!==5)return!1;var e=Ra,n=$f;$f=0;var i=Zl(na),o=M.T,f=U.p;try{U.p=32>i?32:i,M.T=null,i=Yf,Yf=null;var m=Ra,b=na;if(ut=0,gl=Ra=null,na=0,(Ve&6)!==0)throw Error(r(331));var T=Ve;if(Ve|=4,kp(m.current),zp(m,m.current,b,i),Ve=T,Ar(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(ai,m)}catch{}return!0}finally{U.p=f,M.T=o,Jp(e,n)}}function eg(e,n,i){n=It(i,n),n=wf(e.stateNode,n,2),e=_a(e,n,2),e!==null&&(li(e,2),jn(e))}function Ye(e,n,i){if(e.tag===3)eg(e,e,i);else for(;n!==null;){if(n.tag===3){eg(n,e,i);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Oa===null||!Oa.has(o))){e=It(i,e),i=tp(2),o=_a(n,i,2),o!==null&&(np(i,o,n,e),li(o,2),jn(o));break}}n=n.return}}function Zf(e,n,i){var o=e.pingCache;if(o===null){o=e.pingCache=new Ow;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(i)||(Bf=!0,f.add(i),e=Hw.bind(null,e,n,i),n.then(e,e))}function Hw(e,n,i){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ze===e&&(Re&i)===i&&(We===4||We===3&&(Re&62914560)===Re&&300>pt()-ps?(Ve&2)===0&&xl(e,0):Uf|=i,pl===Re&&(pl=0)),jn(e)}function tg(e,n){n===0&&(n=xo()),e=di(e,n),e!==null&&(li(e,n),jn(e))}function Bw(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),tg(e,i)}function Uw(e,n){var i=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(n),tg(e,i)}function Vw(e,n){return rn(e,n)}var Ss=null,vl=null,Qf=!1,Ns=!1,Kf=!1,Da=0;function jn(e){e!==vl&&e.next===null&&(vl===null?Ss=vl=e:vl=vl.next=e),Ns=!0,Qf||(Qf=!0,Yw())}function Ar(e,n){if(!Kf&&Ns){Kf=!0;do for(var i=!1,o=Ss;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var m=0;else{var b=o.suspendedLanes,T=o.pingedLanes;m=(1<<31-Et(42|e)+1)-1,m&=f&~(b&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,lg(o,m))}else m=Re,m=Yi(o,o===Ze?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||ii(o,m)||(i=!0,lg(o,m));o=o.next}while(i);Kf=!1}}function $w(){ng()}function ng(){Ns=Qf=!1;var e=0;Da!==0&&Jw()&&(e=Da);for(var n=pt(),i=null,o=Ss;o!==null;){var f=o.next,m=ag(o,n);m===0?(o.next=null,i===null?Ss=f:i.next=f,f===null&&(vl=i)):(i=o,(e!==0||(m&3)!==0)&&(Ns=!0)),o=f}ut!==0&&ut!==5||Ar(e),Da!==0&&(Da=0)}function ag(e,n){for(var i=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var b=31-Et(m),T=1<<b,$=f[b];$===-1?((T&i)===0||(T&o)!==0)&&(f[b]=ou(T,n)):$<=n&&(e.expiredLanes|=T),m&=~T}if(n=Ze,i=Re,i=Yi(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,i===0||e===n&&($e===2||$e===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Dn(o),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||ii(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(o!==null&&Dn(o),Zl(i)){case 2:case 8:i=da;break;case 32:i=ni;break;case 268435456:i=Bi;break;default:i=ni}return o=ig.bind(null,e),i=rn(i,o),e.callbackPriority=n,e.callbackNode=i,n}return o!==null&&o!==null&&Dn(o),e.callbackPriority=2,e.callbackNode=null,2}function ig(e,n){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ws()&&e.callbackNode!==i)return null;var o=Re;return o=Yi(e,e===Ze?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Up(e,o,n),ag(e,pt()),e.callbackNode!=null&&e.callbackNode===i?ig.bind(null,e):null)}function lg(e,n){if(ws())return null;Up(e,n,!0)}function Yw(){eS(function(){(Ve&6)!==0?rn(Ln,$w):ng()})}function Ff(){if(Da===0){var e=il;e===0&&(e=Ui,Ui<<=1,(Ui&261888)===0&&(Ui=256)),Da=e}return Da}function rg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zo(""+e)}function og(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function qw(e,n,i,o,f){if(n==="submit"&&i&&i.stateNode===f){var m=rg((f[wt]||null).action),b=o.submitter;b&&(n=(n=b[wt]||null)?rg(n.formAction):b.getAttribute("formAction"),n!==null&&(m=n,b=null));var T=new Do("action","action",null,o,f);e.push({event:T,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Da!==0){var $=b?og(f,b):new FormData(f);pf(i,{pending:!0,data:$,method:f.method,action:m},null,$)}}else typeof m=="function"&&(T.preventDefault(),$=b?og(f,b):new FormData(f),pf(i,{pending:!0,data:$,method:f.method,action:m},m,$))},currentTarget:f}]})}}for(var Pf=0;Pf<zu.length;Pf++){var If=zu[Pf],Xw=If.toLowerCase(),Gw=If[0].toUpperCase()+If.slice(1);sn(Xw,"on"+Gw)}sn(Bm,"onAnimationEnd"),sn(Um,"onAnimationIteration"),sn(Vm,"onAnimationStart"),sn("dblclick","onDoubleClick"),sn("focusin","onFocus"),sn("focusout","onBlur"),sn(ow,"onTransitionRun"),sn(sw,"onTransitionStart"),sn(cw,"onTransitionCancel"),sn($m,"onTransitionEnd"),xa("onMouseEnter",["mouseout","mouseover"]),xa("onMouseLeave",["mouseout","mouseover"]),xa("onPointerEnter",["pointerout","pointerover"]),xa("onPointerLeave",["pointerout","pointerover"]),Un("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Un("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Un("onBeforeInput",["compositionend","keypress","textInput","paste"]),Un("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Un("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Un("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="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(" "),Zw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cr));function sg(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],f=o.event;o=o.listeners;e:{var m=void 0;if(n)for(var b=o.length-1;0<=b;b--){var T=o[b],$=T.instance,I=T.currentTarget;if(T=T.listener,$!==m&&f.isPropagationStopped())break e;m=T,f.currentTarget=I;try{m(f)}catch(ie){Bo(ie)}f.currentTarget=null,m=$}else for(b=0;b<o.length;b++){if(T=o[b],$=T.instance,I=T.currentTarget,T=T.listener,$!==m&&f.isPropagationStopped())break e;m=T,f.currentTarget=I;try{m(f)}catch(ie){Bo(ie)}f.currentTarget=null,m=$}}}}function Oe(e,n){var i=n[qi];i===void 0&&(i=n[qi]=new Set);var o=e+"__bubble";i.has(o)||(cg(n,e,2,!1),i.add(o))}function Jf(e,n,i){var o=0;n&&(o|=4),cg(i,e,o,n)}var Es="_reactListening"+Math.random().toString(36).slice(2);function Wf(e){if(!e[Es]){e[Es]=!0,jo.forEach(function(i){i!=="selectionchange"&&(Zw.has(i)||Jf(i,!1,e),Jf(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Es]||(n[Es]=!0,Jf("selectionchange",!1,n))}}function cg(e,n,i,o){switch(Bg(n)){case 2:var f=bS;break;case 8:f=wS;break;default:f=md}i=f.bind(null,n,i,e),f=void 0,!yu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,i,{capture:!0,passive:f}):e.addEventListener(n,i,!0):f!==void 0?e.addEventListener(n,i,{passive:f}):e.addEventListener(n,i,!1)}function ed(e,n,i,o,f){var m=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var T=o.stateNode.containerInfo;if(T===f)break;if(b===4)for(b=o.return;b!==null;){var $=b.tag;if(($===3||$===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;T!==null;){if(b=ha(T),b===null)return;if($=b.tag,$===5||$===6||$===26||$===27){o=m=b;continue e}T=T.parentNode}}o=o.return}mm(function(){var I=m,ie=gu(i),re=[];e:{var J=Ym.get(e);if(J!==void 0){var ee=Do,de=e;switch(e){case"keypress":if(Ro(i)===0)break e;case"keydown":case"keyup":ee=U2;break;case"focusin":de="focus",ee=Su;break;case"focusout":de="blur",ee=Su;break;case"beforeblur":case"afterblur":ee=Su;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=xm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=A2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=Y2;break;case Bm:case Um:case Vm:ee=M2;break;case $m:ee=X2;break;case"scroll":case"scrollend":ee=j2;break;case"wheel":ee=Z2;break;case"copy":case"cut":case"paste":ee=O2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=vm;break;case"toggle":case"beforetoggle":ee=K2}var Ne=(n&4)!==0,Ge=!Ne&&(e==="scroll"||e==="scrollend"),F=Ne?J!==null?J+"Capture":null:J;Ne=[];for(var X=I,P;X!==null;){var le=X;if(P=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||P===null||F===null||(le=Pl(X,F),le!=null&&Ne.push(Tr(X,le,P))),Ge)break;X=X.return}0<Ne.length&&(J=new ee(J,de,null,i,ie),re.push({event:J,listeners:Ne}))}}if((n&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",J&&i!==pu&&(de=i.relatedTarget||i.fromElement)&&(ha(de)||de[Bn]))break e;if((ee||J)&&(J=ie.window===ie?ie:(J=ie.ownerDocument)?J.defaultView||J.parentWindow:window,ee?(de=i.relatedTarget||i.toElement,ee=I,de=de?ha(de):null,de!==null&&(Ge=c(de),Ne=de.tag,de!==Ge||Ne!==5&&Ne!==27&&Ne!==6)&&(de=null)):(ee=null,de=I),ee!==de)){if(Ne=xm,le="onMouseLeave",F="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=vm,le="onPointerLeave",F="onPointerEnter",X="pointer"),Ge=ee==null?J:pa(ee),P=de==null?J:pa(de),J=new Ne(le,X+"leave",ee,i,ie),J.target=Ge,J.relatedTarget=P,le=null,ha(ie)===I&&(Ne=new Ne(F,X+"enter",de,i,ie),Ne.target=P,Ne.relatedTarget=Ge,le=Ne),Ge=le,ee&&de)t:{for(Ne=Qw,F=ee,X=de,P=0,le=F;le;le=Ne(le))P++;le=0;for(var we=X;we;we=Ne(we))le++;for(;0<P-le;)F=Ne(F),P--;for(;0<le-P;)X=Ne(X),le--;for(;P--;){if(F===X||X!==null&&F===X.alternate){Ne=F;break t}F=Ne(F),X=Ne(X)}Ne=null}else Ne=null;ee!==null&&ug(re,J,ee,Ne,!1),de!==null&&Ge!==null&&ug(re,Ge,de,Ne,!0)}}e:{if(J=I?pa(I):window,ee=J.nodeName&&J.nodeName.toLowerCase(),ee==="select"||ee==="input"&&J.type==="file")var He=Am;else if(jm(J))if(Cm)He=iw;else{He=nw;var ge=tw}else ee=J.nodeName,!ee||ee.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?I&&mu(I.elementType)&&(He=Am):He=aw;if(He&&(He=He(e,I))){_m(re,He,i,ie);break e}ge&&ge(e,J,I),e==="focusout"&&I&&J.type==="number"&&I.memoizedProps.value!=null&&Fl(J,"number",J.value)}switch(ge=I?pa(I):window,e){case"focusin":(jm(ge)||ge.contentEditable==="true")&&(Pi=ge,Cu=I,ir=null);break;case"focusout":ir=Cu=Pi=null;break;case"mousedown":Tu=!0;break;case"contextmenu":case"mouseup":case"dragend":Tu=!1,Lm(re,i,ie);break;case"selectionchange":if(rw)break;case"keydown":case"keyup":Lm(re,i,ie)}var Ce;if(Eu)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Fi?Nm(e,i)&&(ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ke="onCompositionStart");ke&&(bm&&i.locale!=="ko"&&(Fi||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Fi&&(Ce=pm()):(va=ie,vu="value"in va?va.value:va.textContent,Fi=!0)),ge=js(I,ke),0<ge.length&&(ke=new ym(ke,e,null,i,ie),re.push({event:ke,listeners:ge}),Ce?ke.data=Ce:(Ce=Em(i),Ce!==null&&(ke.data=Ce)))),(Ce=P2?I2(e,i):J2(e,i))&&(ke=js(I,"onBeforeInput"),0<ke.length&&(ge=new ym("onBeforeInput","beforeinput",null,i,ie),re.push({event:ge,listeners:ke}),ge.data=Ce)),qw(re,e,I,i,ie)}sg(re,n)})}function Tr(e,n,i){return{instance:e,listener:n,currentTarget:i}}function js(e,n){for(var i=n+"Capture",o=[];e!==null;){var f=e,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Pl(e,i),f!=null&&o.unshift(Tr(e,f,m)),f=Pl(e,n),f!=null&&o.push(Tr(e,f,m))),e.tag===3)return o;e=e.return}return[]}function Qw(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ug(e,n,i,o,f){for(var m=n._reactName,b=[];i!==null&&i!==o;){var T=i,$=T.alternate,I=T.stateNode;if(T=T.tag,$!==null&&$===o)break;T!==5&&T!==26&&T!==27||I===null||($=I,f?(I=Pl(i,m),I!=null&&b.unshift(Tr(i,I,$))):f||(I=Pl(i,m),I!=null&&b.push(Tr(i,I,$)))),i=i.return}b.length!==0&&e.push({event:n,listeners:b})}var Kw=/\r\n?/g,Fw=/\u0000|\uFFFD/g;function fg(e){return(typeof e=="string"?e:""+e).replace(Kw,`
|
|
49
|
+
`).replace(Fw,"")}function dg(e,n){return n=fg(n),fg(e)===n}function Xe(e,n,i,o,f,m){switch(i){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Zi(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Zi(e,""+o);break;case"className":Gi(e,"class",o);break;case"tabIndex":Gi(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Gi(e,i,o);break;case"style":dm(e,o,m);break;case"data":if(n!=="object"){Gi(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=zo(""+o),e.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(i==="formAction"?(n!=="input"&&Xe(e,n,"name",f.name,f,null),Xe(e,n,"formEncType",f.formEncType,f,null),Xe(e,n,"formMethod",f.formMethod,f,null),Xe(e,n,"formTarget",f.formTarget,f,null)):(Xe(e,n,"encType",f.encType,f,null),Xe(e,n,"method",f.method,f,null),Xe(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=zo(""+o),e.setAttribute(i,o);break;case"onClick":o!=null&&(e.onclick=$n);break;case"onScroll":o!=null&&Oe("scroll",e);break;case"onScrollEnd":o!=null&&Oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}i=zo(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""+o):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":o===!0?e.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,o):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(i,o):e.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(i):e.setAttribute(i,o);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),Xi(e,"popover",o);break;case"xlinkActuate":on(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":on(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":on(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":on(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":on(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":on(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":on(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":on(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":on(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Xi(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=N2.get(i)||i,Xi(e,i,o))}}function td(e,n,i,o,f,m){switch(i){case"style":dm(e,o,m);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof o=="string"?Zi(e,o):(typeof o=="number"||typeof o=="bigint")&&Zi(e,""+o);break;case"onScroll":o!=null&&Oe("scroll",e);break;case"onScrollEnd":o!=null&&Oe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_o.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),n=i.slice(2,f?i.length-7:void 0),m=e[wt]||null,m=m!=null?m[i]:null,typeof m=="function"&&e.removeEventListener(n,m,f),typeof o=="function")){typeof m!="function"&&m!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,o,f);break e}i in e?e[i]=o:o===!0?e.setAttribute(i,""):Xi(e,i,o)}}}function vt(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var o=!1,f=!1,m;for(m in i)if(i.hasOwnProperty(m)){var b=i[m];if(b!=null)switch(m){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Xe(e,n,m,b,i,null)}}f&&Xe(e,n,"srcSet",i.srcSet,i,null),o&&Xe(e,n,"src",i.src,i,null);return;case"input":Oe("invalid",e);var T=m=b=f=null,$=null,I=null;for(o in i)if(i.hasOwnProperty(o)){var ie=i[o];if(ie!=null)switch(o){case"name":f=ie;break;case"type":b=ie;break;case"checked":$=ie;break;case"defaultChecked":I=ie;break;case"value":m=ie;break;case"defaultValue":T=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,n));break;default:Xe(e,n,o,ie,i,null)}}Mo(e,m,T,$,I,b,f,!1);return;case"select":Oe("invalid",e),o=b=m=null;for(f in i)if(i.hasOwnProperty(f)&&(T=i[f],T!=null))switch(f){case"value":m=T;break;case"defaultValue":b=T;break;case"multiple":o=T;default:Xe(e,n,f,T,i,null)}n=m,i=b,e.multiple=!!o,n!=null?Vn(e,!!o,n,!1):i!=null&&Vn(e,!!o,i,!0);return;case"textarea":Oe("invalid",e),m=f=o=null;for(b in i)if(i.hasOwnProperty(b)&&(T=i[b],T!=null))switch(b){case"value":o=T;break;case"defaultValue":f=T;break;case"children":m=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:Xe(e,n,b,T,i,null)}um(e,o,f,m);return;case"option":for($ in i)if(i.hasOwnProperty($)&&(o=i[$],o!=null))switch($){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Xe(e,n,$,o,i,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(o=0;o<Cr.length;o++)Oe(Cr[o],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in i)if(i.hasOwnProperty(I)&&(o=i[I],o!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Xe(e,n,I,o,i,null)}return;default:if(mu(n)){for(ie in i)i.hasOwnProperty(ie)&&(o=i[ie],o!==void 0&&td(e,n,ie,o,i,void 0));return}}for(T in i)i.hasOwnProperty(T)&&(o=i[T],o!=null&&Xe(e,n,T,o,i,null))}function Pw(e,n,i,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,b=null,T=null,$=null,I=null,ie=null;for(ee in i){var re=i[ee];if(i.hasOwnProperty(ee)&&re!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":$=re;default:o.hasOwnProperty(ee)||Xe(e,n,ee,null,o,re)}}for(var J in o){var ee=o[J];if(re=i[J],o.hasOwnProperty(J)&&(ee!=null||re!=null))switch(J){case"type":m=ee;break;case"name":f=ee;break;case"checked":I=ee;break;case"defaultChecked":ie=ee;break;case"value":b=ee;break;case"defaultValue":T=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,n));break;default:ee!==re&&Xe(e,n,J,ee,o,re)}}si(e,b,T,$,I,ie,m,f);return;case"select":ee=b=T=J=null;for(m in i)if($=i[m],i.hasOwnProperty(m)&&$!=null)switch(m){case"value":break;case"multiple":ee=$;default:o.hasOwnProperty(m)||Xe(e,n,m,null,o,$)}for(f in o)if(m=o[f],$=i[f],o.hasOwnProperty(f)&&(m!=null||$!=null))switch(f){case"value":J=m;break;case"defaultValue":T=m;break;case"multiple":b=m;default:m!==$&&Xe(e,n,f,m,o,$)}n=T,i=b,o=ee,J!=null?Vn(e,!!i,J,!1):!!o!=!!i&&(n!=null?Vn(e,!!i,n,!0):Vn(e,!!i,i?[]:"",!1));return;case"textarea":ee=J=null;for(T in i)if(f=i[T],i.hasOwnProperty(T)&&f!=null&&!o.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Xe(e,n,T,null,o,f)}for(b in o)if(f=o[b],m=i[b],o.hasOwnProperty(b)&&(f!=null||m!=null))switch(b){case"value":J=f;break;case"defaultValue":ee=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==m&&Xe(e,n,b,f,o,m)}cm(e,J,ee);return;case"option":for(var de in i)if(J=i[de],i.hasOwnProperty(de)&&J!=null&&!o.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Xe(e,n,de,null,o,J)}for($ in o)if(J=o[$],ee=i[$],o.hasOwnProperty($)&&J!==ee&&(J!=null||ee!=null))switch($){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:Xe(e,n,$,J,o,ee)}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 Ne in i)J=i[Ne],i.hasOwnProperty(Ne)&&J!=null&&!o.hasOwnProperty(Ne)&&Xe(e,n,Ne,null,o,J);for(I in o)if(J=o[I],ee=i[I],o.hasOwnProperty(I)&&J!==ee&&(J!=null||ee!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:Xe(e,n,I,J,o,ee)}return;default:if(mu(n)){for(var Ge in i)J=i[Ge],i.hasOwnProperty(Ge)&&J!==void 0&&!o.hasOwnProperty(Ge)&&td(e,n,Ge,void 0,o,J);for(ie in o)J=o[ie],ee=i[ie],!o.hasOwnProperty(ie)||J===ee||J===void 0&&ee===void 0||td(e,n,ie,J,o,ee);return}}for(var F in i)J=i[F],i.hasOwnProperty(F)&&J!=null&&!o.hasOwnProperty(F)&&Xe(e,n,F,null,o,J);for(re in o)J=o[re],ee=i[re],!o.hasOwnProperty(re)||J===ee||J==null&&ee==null||Xe(e,n,re,J,o,ee)}function hg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Iw(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var f=i[o],m=f.transferSize,b=f.initiatorType,T=f.duration;if(m&&T&&hg(b)){for(b=0,T=f.responseEnd,o+=1;o<i.length;o++){var $=i[o],I=$.startTime;if(I>T)break;var ie=$.transferSize,re=$.initiatorType;ie&&hg(re)&&($=$.responseEnd,b+=ie*($<T?1:(T-I)/($-I)))}if(--o,n+=8*(m+b)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var nd=null,ad=null;function _s(e){return e.nodeType===9?e:e.ownerDocument}function mg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function pg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function id(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var ld=null;function Jw(){var e=window.event;return e&&e.type==="popstate"?e===ld?!1:(ld=e,!0):(ld=null,!1)}var gg=typeof setTimeout=="function"?setTimeout:void 0,Ww=typeof clearTimeout=="function"?clearTimeout:void 0,xg=typeof Promise=="function"?Promise:void 0,eS=typeof queueMicrotask=="function"?queueMicrotask:typeof xg<"u"?function(e){return xg.resolve(null).then(e).catch(tS)}:gg;function tS(e){setTimeout(function(){throw e})}function La(e){return e==="head"}function yg(e,n){var i=n,o=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(o===0){e.removeChild(f),Nl(n);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")Mr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Mr(i);for(var m=i.firstChild;m;){var b=m.nextSibling,T=m.nodeName;m[ri]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=b}}else i==="body"&&Mr(e.ownerDocument.body);i=f}while(i);Nl(n)}function vg(e,n){var i=e;e=0;do{var o=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=o}while(i)}function rd(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":rd(i),Ql(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function nS(e,n,i,o){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ri])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=nn(e.nextSibling),e===null)break}return null}function aS(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=nn(e.nextSibling),e===null))return null;return e}function bg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=nn(e.nextSibling),e===null))return null;return e}function od(e){return e.data==="$?"||e.data==="$~"}function sd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function iS(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var o=function(){n(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function nn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var cd=null;function wg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return nn(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function Sg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function Ng(e,n,i){switch(n=_s(i),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Mr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ql(e)}var an=new Map,Eg=new Set;function As(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var aa=U.d;U.d={f:lS,r:rS,D:oS,C:sS,L:cS,m:uS,X:dS,S:fS,M:hS};function lS(){var e=aa.f(),n=ys();return e||n}function rS(e){var n=ma(e);n!==null&&n.tag===5&&n.type==="form"?$0(n):aa.r(e)}var bl=typeof document>"u"?null:document;function jg(e,n,i){var o=bl;if(o&&typeof n=="string"&&n){var f=At(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),Eg.has(f)||(Eg.add(f),e={rel:e,crossOrigin:i,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),vt(n,"link",e),at(n),o.head.appendChild(n)))}}function oS(e){aa.D(e),jg("dns-prefetch",e,null)}function sS(e,n){aa.C(e,n),jg("preconnect",e,n)}function cS(e,n,i){aa.L(e,n,i);var o=bl;if(o&&e&&n){var f='link[rel="preload"][as="'+At(n)+'"]';n==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+At(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+At(i.imageSizes)+'"]')):f+='[href="'+At(e)+'"]';var m=f;switch(n){case"style":m=wl(e);break;case"script":m=Sl(e)}an.has(m)||(e=x({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),an.set(m,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(zr(m))||n==="script"&&o.querySelector(Or(m))||(n=o.createElement("link"),vt(n,"link",e),at(n),o.head.appendChild(n)))}}function uS(e,n){aa.m(e,n);var i=bl;if(i&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+At(o)+'"][href="'+At(e)+'"]',m=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Sl(e)}if(!an.has(m)&&(e=x({rel:"modulepreload",href:e},n),an.set(m,e),i.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Or(m)))return}o=i.createElement("link"),vt(o,"link",e),at(o),i.head.appendChild(o)}}}function fS(e,n,i){aa.S(e,n,i);var o=bl;if(o&&e){var f=ga(o).hoistableStyles,m=wl(e);n=n||"default";var b=f.get(m);if(!b){var T={loading:0,preload:null};if(b=o.querySelector(zr(m)))T.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":n},i),(i=an.get(m))&&ud(e,i);var $=b=o.createElement("link");at($),vt($,"link",e),$._p=new Promise(function(I,ie){$.onload=I,$.onerror=ie}),$.addEventListener("load",function(){T.loading|=1}),$.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Cs(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:T},f.set(m,b)}}}function dS(e,n){aa.X(e,n);var i=bl;if(i&&e){var o=ga(i).hoistableScripts,f=Sl(e),m=o.get(f);m||(m=i.querySelector(Or(f)),m||(e=x({src:e,async:!0},n),(n=an.get(f))&&fd(e,n),m=i.createElement("script"),at(m),vt(m,"link",e),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function hS(e,n){aa.M(e,n);var i=bl;if(i&&e){var o=ga(i).hoistableScripts,f=Sl(e),m=o.get(f);m||(m=i.querySelector(Or(f)),m||(e=x({src:e,async:!0,type:"module"},n),(n=an.get(f))&&fd(e,n),m=i.createElement("script"),at(m),vt(m,"link",e),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function _g(e,n,i,o){var f=(f=se.current)?As(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=wl(i.href),i=ga(f).hoistableStyles,o=i.get(n),o||(o={type:"style",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=wl(i.href);var m=ga(f).hoistableStyles,b=m.get(e);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,b),(m=f.querySelector(zr(e)))&&!m._p&&(b.instance=m,b.state.loading=5),an.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},an.set(e,i),m||mS(f,e,i,b.state))),n&&o===null)throw Error(r(528,""));return b}if(n&&o!==null)throw Error(r(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Sl(i),i=ga(f).hoistableScripts,o=i.get(n),o||(o={type:"script",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wl(e){return'href="'+At(e)+'"'}function zr(e){return'link[rel="stylesheet"]['+e+"]"}function Ag(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function mS(e,n,i,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),vt(n,"link",i),at(n),e.head.appendChild(n))}function Sl(e){return'[src="'+At(e)+'"]'}function Or(e){return"script[async]"+e}function Cg(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+At(i.href)+'"]');if(o)return n.instance=o,at(o),o;var f=x({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),at(o),vt(o,"style",f),Cs(o,i.precedence,e),n.instance=o;case"stylesheet":f=wl(i.href);var m=e.querySelector(zr(f));if(m)return n.state.loading|=4,n.instance=m,at(m),m;o=Ag(i),(f=an.get(f))&&ud(o,f),m=(e.ownerDocument||e).createElement("link"),at(m);var b=m;return b._p=new Promise(function(T,$){b.onload=T,b.onerror=$}),vt(m,"link",o),n.state.loading|=4,Cs(m,i.precedence,e),n.instance=m;case"script":return m=Sl(i.src),(f=e.querySelector(Or(m)))?(n.instance=f,at(f),f):(o=i,(f=an.get(m))&&(o=x({},i),fd(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),at(f),vt(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Cs(o,i.precedence,e));return n.instance}function Cs(e,n,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,m=f,b=0;b<o.length;b++){var T=o[b];if(T.dataset.precedence===n)m=T;else if(m!==f)break}m?m.parentNode.insertBefore(e,m.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function ud(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function fd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Ts=null;function Tg(e,n,i){if(Ts===null){var o=new Map,f=Ts=new Map;f.set(i,o)}else f=Ts,o=f.get(i),o||(o=new Map,f.set(i,o));if(o.has(e))return o;for(o.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var m=i[f];if(!(m[ri]||m[ct]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(n)||"";b=e+b;var T=o.get(b);T?T.push(m):o.set(b,[m])}}return o}function Mg(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function pS(e,n,i){if(i===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function zg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gS(e,n,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=wl(o.href),m=n.querySelector(zr(f));if(m){n=m._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Ms.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=m,at(m);return}m=n.ownerDocument||n,o=Ag(o),(f=an.get(f))&&ud(o,f),m=m.createElement("link"),at(m);var b=m;b._p=new Promise(function(T,$){b.onload=T,b.onerror=$}),vt(m,"link",o),i.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ms.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var dd=0;function xS(e,n){return e.stylesheets&&e.count===0&&Os(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var o=setTimeout(function(){if(e.stylesheets&&Os(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+n);0<e.imgBytes&&dd===0&&(dd=62500*Iw());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Os(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>dd?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Ms(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Os(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zs=null;function Os(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zs=new Map,n.forEach(yS,e),zs=null,Ms.call(e))}function yS(e,n){if(!(n.state.loading&4)){var i=zs.get(e);if(i)var o=i.get(null);else{i=new Map,zs.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var b=f[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(i.set(b.dataset.precedence,b),o=b)}o&&i.set(null,o)}f=n.instance,b=f.getAttribute("data-precedence"),m=i.get(b)||o,m===o&&i.set(null,f),i.set(b,f),this.count++,o=Ms.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),m?m.parentNode.insertBefore(f,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Rr={$$typeof:j,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function vS(e,n,i,o,f,m,b,T,$){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xl(0),this.hiddenUpdates=Xl(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function Og(e,n,i,o,f,m,b,T,$,I,ie,re){return e=new vS(e,n,i,b,$,I,ie,re,T),n=1,m===!0&&(n|=24),m=Bt(3,null,null,n),e.current=m,m.stateNode=e,n=Xu(),n.refCount++,e.pooledCache=n,n.refCount++,m.memoizedState={element:o,isDehydrated:i,cache:n},Ku(m),e}function Rg(e){return e?(e=Wi,e):Wi}function kg(e,n,i,o,f,m){f=Rg(f),o.context===null?o.context=f:o.pendingContext=f,o=ja(n),o.payload={element:i},m=m===void 0?null:m,m!==null&&(o.callback=m),i=_a(e,o,n),i!==null&&(Rt(i,e,n),fr(i,e,n))}function Dg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function hd(e,n){Dg(e,n),(e=e.alternate)&&Dg(e,n)}function Lg(e){if(e.tag===13||e.tag===31){var n=di(e,67108864);n!==null&&Rt(n,e,67108864),hd(e,67108864)}}function Hg(e){if(e.tag===13||e.tag===31){var n=qt();n=Gl(n);var i=di(e,n);i!==null&&Rt(i,e,n),hd(e,n)}}var Rs=!0;function bS(e,n,i,o){var f=M.T;M.T=null;var m=U.p;try{U.p=2,md(e,n,i,o)}finally{U.p=m,M.T=f}}function wS(e,n,i,o){var f=M.T;M.T=null;var m=U.p;try{U.p=8,md(e,n,i,o)}finally{U.p=m,M.T=f}}function md(e,n,i,o){if(Rs){var f=pd(o);if(f===null)ed(e,n,o,ks,i),Ug(e,o);else if(NS(f,e,n,i,o))o.stopPropagation();else if(Ug(e,o),n&4&&-1<SS.indexOf(e)){for(;f!==null;){var m=ma(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=Hn(m.pendingLanes);if(b!==0){var T=m;for(T.pendingLanes|=2,T.entangledLanes|=2;b;){var $=1<<31-Et(b);T.entanglements[1]|=$,b&=~$}jn(m),(Ve&6)===0&&(gs=pt()+500,Ar(0))}}break;case 31:case 13:T=di(m,2),T!==null&&Rt(T,m,2),ys(),hd(m,2)}if(m=pd(o),m===null&&ed(e,n,o,ks,i),m===f)break;f=m}f!==null&&o.stopPropagation()}else ed(e,n,o,null,i)}}function pd(e){return e=gu(e),gd(e)}var ks=null;function gd(e){if(ks=null,e=ha(e),e!==null){var n=c(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=u(n),e!==null)return e;e=null}else if(i===31){if(e=h(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return ks=e,null}function Bg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Hi()){case Ln:return 2;case da:return 8;case ni:case tu:return 32;case Bi:return 268435456;default:return 32}default:return 32}}var xd=!1,Ha=null,Ba=null,Ua=null,kr=new Map,Dr=new Map,Va=[],SS="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 Ug(e,n){switch(e){case"focusin":case"focusout":Ha=null;break;case"dragenter":case"dragleave":Ba=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":kr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dr.delete(n.pointerId)}}function Lr(e,n,i,o,f,m){return e===null||e.nativeEvent!==m?(e={blockedOn:n,domEventName:i,eventSystemFlags:o,nativeEvent:m,targetContainers:[f]},n!==null&&(n=ma(n),n!==null&&Lg(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function NS(e,n,i,o,f){switch(n){case"focusin":return Ha=Lr(Ha,e,n,i,o,f),!0;case"dragenter":return Ba=Lr(Ba,e,n,i,o,f),!0;case"mouseover":return Ua=Lr(Ua,e,n,i,o,f),!0;case"pointerover":var m=f.pointerId;return kr.set(m,Lr(kr.get(m)||null,e,n,i,o,f)),!0;case"gotpointercapture":return m=f.pointerId,Dr.set(m,Lr(Dr.get(m)||null,e,n,i,o,f)),!0}return!1}function Vg(e){var n=ha(e.target);if(n!==null){var i=c(n);if(i!==null){if(n=i.tag,n===13){if(n=u(i),n!==null){e.blockedOn=n,So(e.priority,function(){Hg(i)});return}}else if(n===31){if(n=h(i),n!==null){e.blockedOn=n,So(e.priority,function(){Hg(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ds(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=pd(e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);pu=o,i.target.dispatchEvent(o),pu=null}else return n=ma(i),n!==null&&Lg(n),e.blockedOn=i,!1;n.shift()}return!0}function $g(e,n,i){Ds(e)&&i.delete(n)}function ES(){xd=!1,Ha!==null&&Ds(Ha)&&(Ha=null),Ba!==null&&Ds(Ba)&&(Ba=null),Ua!==null&&Ds(Ua)&&(Ua=null),kr.forEach($g),Dr.forEach($g)}function Ls(e,n){e.blockedOn===n&&(e.blockedOn=null,xd||(xd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ES)))}var Hs=null;function Yg(e){Hs!==e&&(Hs=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hs===e&&(Hs=null);for(var n=0;n<e.length;n+=3){var i=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(gd(o||i)===null)continue;break}var m=ma(i);m!==null&&(e.splice(n,3),n-=3,pf(m,{pending:!0,data:f,method:i.method,action:o},o,f))}}))}function Nl(e){function n($){return Ls($,e)}Ha!==null&&Ls(Ha,e),Ba!==null&&Ls(Ba,e),Ua!==null&&Ls(Ua,e),kr.forEach(n),Dr.forEach(n);for(var i=0;i<Va.length;i++){var o=Va[i];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Va.length&&(i=Va[0],i.blockedOn===null);)Vg(i),i.blockedOn===null&&Va.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var f=i[o],m=i[o+1],b=f[wt]||null;if(typeof m=="function")b||Yg(i);else if(b){var T=null;if(m&&m.hasAttribute("formAction")){if(f=m,b=m[wt]||null)T=b.formAction;else if(gd(f)!==null)continue}else T=b.action;typeof T=="function"?i[o+1]=T:(i.splice(o,3),o-=3),Yg(i)}}}function qg(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function yd(e){this._internalRoot=e}Bs.prototype.render=yd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var i=n.current,o=qt();kg(i,o,e,n,null,null)},Bs.prototype.unmount=yd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;kg(e.current,2,null,e,null,null),ys(),n[Bn]=null}};function Bs(e){this._internalRoot=e}Bs.prototype.unstable_scheduleHydration=function(e){if(e){var n=wo();e={blockedOn:null,target:e,priority:n};for(var i=0;i<Va.length&&n!==0&&n<Va[i].priority;i++);Va.splice(i,0,e),i===0&&Vg(e)}};var Xg=a.version;if(Xg!=="19.2.4")throw Error(r(527,Xg,"19.2.4"));U.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var jS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Us=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Us.isDisabled&&Us.supportsFiber)try{ai=Us.inject(jS),Nt=Us}catch{}}return Br.createRoot=function(e,n){if(!s(e))throw Error(r(299));var i=!1,o="",f=I0,m=J0,b=W0;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=Og(e,1,!1,null,null,i,o,null,f,m,b,qg),e[Bn]=n.current,Wf(e),new yd(n)},Br.hydrateRoot=function(e,n,i){if(!s(e))throw Error(r(299));var o=!1,f="",m=I0,b=J0,T=W0,$=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError),i.formState!==void 0&&($=i.formState)),n=Og(e,1,!0,n,i??null,o,f,$,m,b,T,qg),n.context=Rg(null),i=n.current,o=qt(),o=Gl(o),f=ja(o),f.callback=null,_a(i,f,o),i=o,n.current.lanes=i,li(n,i),jn(n),e[Bn]=n.current,Wf(e),new Bs(n)},Br.version="19.2.4",Br}var ex;function DS(){if(ex)return wd.exports;ex=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),wd.exports=kS(),wd.exports}var LS=DS();function Gy(){const[t,a]=A.useState({status:"connecting",sources:[],lastChecked:null,error:null,isRefreshing:!1}),l=A.useCallback(async()=>{a(r=>({...r,isRefreshing:!0}));try{const r=await fetch("/api/files");if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=await r.json(),c=Object.entries(s).map(([u,h])=>({id:u,path:(h==null?void 0:h.path)||`~/${u}`,connected:h!==null}));a({status:"connected",sources:c,lastChecked:new Date,error:null,isRefreshing:!1})}catch(r){a(s=>({...s,status:"error",error:r instanceof Error?r.message:"Connection failed",lastChecked:new Date,isRefreshing:!1}))}},[]);return A.useEffect(()=>{l()},[l]),{...t,refresh:l}}const tx=t=>{let a;const l=new Set,r=(p,y)=>{const x=typeof p=="function"?p(a):p;if(!Object.is(x,a)){const v=a;a=y??(typeof x!="object"||x===null)?x:Object.assign({},a,x),l.forEach(w=>w(a,v))}},s=()=>a,h={setState:r,getState:s,getInitialState:()=>g,subscribe:p=>(l.add(p),()=>l.delete(p))},g=a=t(r,s,h);return h},HS=(t=>t?tx(t):tx),BS=t=>t;function US(t,a=BS){const l=Gt.useSyncExternalStore(t.subscribe,Gt.useCallback(()=>a(t.getState()),[t,a]),Gt.useCallback(()=>a(t.getInitialState()),[t,a]));return Gt.useDebugValue(l),l}const nx=t=>{const a=HS(t),l=r=>US(a,r);return Object.assign(l,a),l},Cc=(t=>t?nx(t):nx),Zy=Cc((t,a)=>({toasts:[],addToast:l=>{const r=Math.random().toString(36).substring(2,9),s=l.duration??4e3;t(c=>({toasts:[...c.toasts,{...l,id:r}]})),setTimeout(()=>{a().removeToast(r)},s)},removeToast:l=>{t(r=>({toasts:r.toasts.filter(s=>s.id!==l)}))},clearToasts:()=>{t({toasts:[]})}}));function VS(){const{addToast:t,removeToast:a,clearToasts:l}=Zy();return{toast:h=>{t(h)},success:(h,g)=>{t({title:h,description:g,variant:"success"})},error:(h,g)=>{t({title:h,description:g,variant:"error"})},info:(h,g)=>{t({title:h,description:g,variant:"info"})},removeToast:a,clearToasts:l}}function Qy(t){var a,l,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(a=0;a<s;a++)t[a]&&(l=Qy(t[a]))&&(r&&(r+=" "),r+=l)}else for(l in t)t[l]&&(r&&(r+=" "),r+=l);return r}function Ky(){for(var t,a,l=0,r="",s=arguments.length;l<s;l++)(t=arguments[l])&&(a=Qy(t))&&(r&&(r+=" "),r+=a);return r}const $S=(t,a)=>{const l=new Array(t.length+a.length);for(let r=0;r<t.length;r++)l[r]=t[r];for(let r=0;r<a.length;r++)l[t.length+r]=a[r];return l},YS=(t,a)=>({classGroupId:t,validator:a}),Fy=(t=new Map,a=null,l)=>({nextPart:t,validators:a,classGroupId:l}),oc="-",ax=[],qS="arbitrary..",XS=t=>{const a=ZS(t),{conflictingClassGroups:l,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return GS(u);const h=u.split(oc),g=h[0]===""&&h.length>1?1:0;return Py(h,g,a)},getConflictingClassGroupIds:(u,h)=>{if(h){const g=r[u],p=l[u];return g?p?$S(p,g):g:p||ax}return l[u]||ax}}},Py=(t,a,l)=>{if(t.length-a===0)return l.classGroupId;const s=t[a],c=l.nextPart.get(s);if(c){const p=Py(t,a+1,c);if(p)return p}const u=l.validators;if(u===null)return;const h=a===0?t.join(oc):t.slice(a).join(oc),g=u.length;for(let p=0;p<g;p++){const y=u[p];if(y.validator(h))return y.classGroupId}},GS=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=t.slice(1,-1),l=a.indexOf(":"),r=a.slice(0,l);return r?qS+r:void 0})(),ZS=t=>{const{theme:a,classGroups:l}=t;return QS(l,a)},QS=(t,a)=>{const l=Fy();for(const r in t){const s=t[r];wh(s,l,r,a)}return l},wh=(t,a,l,r)=>{const s=t.length;for(let c=0;c<s;c++){const u=t[c];KS(u,a,l,r)}},KS=(t,a,l,r)=>{if(typeof t=="string"){FS(t,a,l);return}if(typeof t=="function"){PS(t,a,l,r);return}IS(t,a,l,r)},FS=(t,a,l)=>{const r=t===""?a:Iy(a,t);r.classGroupId=l},PS=(t,a,l,r)=>{if(JS(t)){wh(t(r),a,l,r);return}a.validators===null&&(a.validators=[]),a.validators.push(YS(l,t))},IS=(t,a,l,r)=>{const s=Object.entries(t),c=s.length;for(let u=0;u<c;u++){const[h,g]=s[u];wh(g,Iy(a,h),l,r)}},Iy=(t,a)=>{let l=t;const r=a.split(oc),s=r.length;for(let c=0;c<s;c++){const u=r[c];let h=l.nextPart.get(u);h||(h=Fy(),l.nextPart.set(u,h)),l=h}return l},JS=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,WS=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,l=Object.create(null),r=Object.create(null);const s=(c,u)=>{l[c]=u,a++,a>t&&(a=0,r=l,l=Object.create(null))};return{get(c){let u=l[c];if(u!==void 0)return u;if((u=r[c])!==void 0)return s(c,u),u},set(c,u){c in l?l[c]=u:s(c,u)}}},Zd="!",ix=":",eN=[],lx=(t,a,l,r,s)=>({modifiers:t,hasImportantModifier:a,baseClassName:l,maybePostfixModifierPosition:r,isExternal:s}),tN=t=>{const{prefix:a,experimentalParseClassName:l}=t;let r=s=>{const c=[];let u=0,h=0,g=0,p;const y=s.length;for(let N=0;N<y;N++){const E=s[N];if(u===0&&h===0){if(E===ix){c.push(s.slice(g,N)),g=N+1;continue}if(E==="/"){p=N;continue}}E==="["?u++:E==="]"?u--:E==="("?h++:E===")"&&h--}const x=c.length===0?s:s.slice(g);let v=x,w=!1;x.endsWith(Zd)?(v=x.slice(0,-1),w=!0):x.startsWith(Zd)&&(v=x.slice(1),w=!0);const S=p&&p>g?p-g:void 0;return lx(c,w,v,S)};if(a){const s=a+ix,c=r;r=u=>u.startsWith(s)?c(u.slice(s.length)):lx(eN,!1,u,void 0,!0)}if(l){const s=r;r=c=>l({className:c,parseClassName:s})}return r},nN=t=>{const a=new Map;return t.orderSensitiveModifiers.forEach((l,r)=>{a.set(l,1e6+r)}),l=>{const r=[];let s=[];for(let c=0;c<l.length;c++){const u=l[c],h=u[0]==="[",g=a.has(u);h||g?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(u)):s.push(u)}return s.length>0&&(s.sort(),r.push(...s)),r}},aN=t=>({cache:WS(t.cacheSize),parseClassName:tN(t),sortModifiers:nN(t),...XS(t)}),iN=/\s+/,lN=(t,a)=>{const{parseClassName:l,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:c}=a,u=[],h=t.trim().split(iN);let g="";for(let p=h.length-1;p>=0;p-=1){const y=h[p],{isExternal:x,modifiers:v,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:N}=l(y);if(x){g=y+(g.length>0?" "+g:g);continue}let E=!!N,_=r(E?S.substring(0,N):S);if(!_){if(!E){g=y+(g.length>0?" "+g:g);continue}if(_=r(S),!_){g=y+(g.length>0?" "+g:g);continue}E=!1}const k=v.length===0?"":v.length===1?v[0]:c(v).join(":"),j=w?k+Zd:k,C=j+_;if(u.indexOf(C)>-1)continue;u.push(C);const D=s(_,E);for(let z=0;z<D.length;++z){const O=D[z];u.push(j+O)}g=y+(g.length>0?" "+g:g)}return g},rN=(...t)=>{let a=0,l,r,s="";for(;a<t.length;)(l=t[a++])&&(r=Jy(l))&&(s&&(s+=" "),s+=r);return s},Jy=t=>{if(typeof t=="string")return t;let a,l="";for(let r=0;r<t.length;r++)t[r]&&(a=Jy(t[r]))&&(l&&(l+=" "),l+=a);return l},oN=(t,...a)=>{let l,r,s,c;const u=g=>{const p=a.reduce((y,x)=>x(y),t());return l=aN(p),r=l.cache.get,s=l.cache.set,c=h,h(g)},h=g=>{const p=r(g);if(p)return p;const y=lN(g,l);return s(g,y),y};return c=u,(...g)=>c(rN(...g))},sN=[],ft=t=>{const a=l=>l[t]||sN;return a.isThemeGetter=!0,a},Wy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ev=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cN=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ya=t=>cN.test(t),Te=t=>!!t&&!Number.isNaN(Number(t)),qa=t=>!!t&&Number.isInteger(Number(t)),jd=t=>t.endsWith("%")&&Te(t.slice(0,-1)),ia=t=>uN.test(t),tv=()=>!0,pN=t=>fN.test(t)&&!dN.test(t),Sh=()=>!1,gN=t=>hN.test(t),xN=t=>mN.test(t),yN=t=>!he(t)&&!pe(t),vN=t=>Wa(t,iv,Sh),he=t=>Wy.test(t),ji=t=>Wa(t,lv,pN),rx=t=>Wa(t,AN,Te),bN=t=>Wa(t,ov,tv),wN=t=>Wa(t,rv,Sh),ox=t=>Wa(t,nv,Sh),SN=t=>Wa(t,av,xN),Vs=t=>Wa(t,sv,gN),pe=t=>ev.test(t),Ur=t=>Li(t,lv),NN=t=>Li(t,rv),sx=t=>Li(t,nv),EN=t=>Li(t,iv),jN=t=>Li(t,av),$s=t=>Li(t,sv,!0),_N=t=>Li(t,ov,!0),Wa=(t,a,l)=>{const r=Wy.exec(t);return r?r[1]?a(r[1]):l(r[2]):!1},Li=(t,a,l=!1)=>{const r=ev.exec(t);return r?r[1]?a(r[1]):l:!1},nv=t=>t==="position"||t==="percentage",av=t=>t==="image"||t==="url",iv=t=>t==="length"||t==="size"||t==="bg-size",lv=t=>t==="length",AN=t=>t==="number",rv=t=>t==="family-name",ov=t=>t==="number"||t==="weight",sv=t=>t==="shadow",CN=()=>{const t=ft("color"),a=ft("font"),l=ft("text"),r=ft("font-weight"),s=ft("tracking"),c=ft("leading"),u=ft("breakpoint"),h=ft("container"),g=ft("spacing"),p=ft("radius"),y=ft("shadow"),x=ft("inset-shadow"),v=ft("text-shadow"),w=ft("drop-shadow"),S=ft("blur"),N=ft("perspective"),E=ft("aspect"),_=ft("ease"),k=ft("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...C(),pe,he],z=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],H=()=>[pe,he,g],Z=()=>[Ya,"full","auto",...H()],ne=()=>[qa,"none","subgrid",pe,he],Q=()=>["auto",{span:["full",qa,pe,he]},qa,pe,he],K=()=>[qa,"auto",pe,he],te=()=>["auto","min","max","fr",pe,he],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...H()],U=()=>[Ya,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...H()],B=()=>[Ya,"screen","full","dvw","lvw","svw","min","max","fit",...H()],Y=()=>[Ya,"screen","full","lh","dvh","lvh","svh","min","max","fit",...H()],q=()=>[t,pe,he],R=()=>[...C(),sx,ox,{position:[pe,he]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",EN,vN,{size:[pe,he]}],ae=()=>[jd,Ur,ji],oe=()=>["","none","full",p,pe,he],se=()=>["",Te,Ur,ji],fe=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Te,jd,sx,ox],Ee=()=>["","none",S,pe,he],ye=()=>["none",Te,pe,he],xe=()=>["none",Te,pe,he],me=()=>[Te,pe,he],je=()=>[Ya,"full",...H()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ia],breakpoint:[ia],color:[tv],container:[ia],"drop-shadow":[ia],ease:["in","out","in-out"],font:[yN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ia],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ia],shadow:[ia],spacing:["px",Te],text:[ia],"text-shadow":[ia],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ya,he,pe,E]}],container:["container"],columns:[{columns:[Te,he,pe,h]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[qa,"auto",pe,he]}],basis:[{basis:[Ya,"full","auto",h,...H()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,Ya,"auto","initial","none",he]}],grow:[{grow:["",Te,pe,he]}],shrink:[{shrink:["",Te,pe,he]}],order:[{order:[qa,"first","last","none",pe,he]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:H()}],"gap-x":[{"gap-x":H()}],"gap-y":[{"gap-y":H()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:H()}],px:[{px:H()}],py:[{py:H()}],ps:[{ps:H()}],pe:[{pe:H()}],pbs:[{pbs:H()}],pbe:[{pbe:H()}],pt:[{pt:H()}],pr:[{pr:H()}],pb:[{pb:H()}],pl:[{pl:H()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":H()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":H()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[h,"screen",...U()]}],"min-w":[{"min-w":[h,"screen","none",...U()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[u]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",l,Ur,ji]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,_N,bN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jd,he]}],"font-family":[{font:[NN,wN,a]}],"font-features":[{"font-features":[he]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,pe,he]}],"line-clamp":[{"line-clamp":[Te,"none",pe,rx]}],leading:[{leading:[c,...H()]}],"list-image":[{"list-image":["none",pe,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",pe,ji]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Te,"auto",pe,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qa,pe,he],radial:["",pe,he],conic:[qa,pe,he]},jN,SN]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-bs":[{"border-bs":q()}],"border-color-be":[{"border-be":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,pe,he]}],"outline-w":[{outline:["",Te,Ur,ji]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",y,$s,Vs]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",x,$s,Vs]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Te,ji]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",v,$s,Vs]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Te,pe,he]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[pe,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,he]}],filter:[{filter:["","none",pe,he]}],blur:[{blur:Ee()}],brightness:[{brightness:[Te,pe,he]}],contrast:[{contrast:[Te,pe,he]}],"drop-shadow":[{"drop-shadow":["","none",w,$s,Vs]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Te,pe,he]}],"hue-rotate":[{"hue-rotate":[Te,pe,he]}],invert:[{invert:["",Te,pe,he]}],saturate:[{saturate:[Te,pe,he]}],sepia:[{sepia:["",Te,pe,he]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,he]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Te,pe,he]}],"backdrop-contrast":[{"backdrop-contrast":[Te,pe,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,pe,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,pe,he]}],"backdrop-invert":[{"backdrop-invert":["",Te,pe,he]}],"backdrop-opacity":[{"backdrop-opacity":[Te,pe,he]}],"backdrop-saturate":[{"backdrop-saturate":[Te,pe,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,pe,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":H()}],"border-spacing-x":[{"border-spacing-x":H()}],"border-spacing-y":[{"border-spacing-y":H()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",pe,he]}],ease:[{ease:["linear","initial",_,pe,he]}],delay:[{delay:[Te,pe,he]}],animate:[{animate:["none",k,pe,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,pe,he]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[pe,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mbs":[{"scroll-mbs":H()}],"scroll-mbe":[{"scroll-mbe":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pbs":[{"scroll-pbs":H()}],"scroll-pbe":[{"scroll-pbe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,he]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Te,Ur,ji,rx]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},TN=oN(CN);function Se(...t){return TN(Ky(t))}/**
|
|
50
|
+
* @license lucide-react v0.563.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const cv=(...t)=>t.filter((a,l,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===l).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.563.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/const MN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
60
|
+
* @license lucide-react v0.563.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const zN=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,r)=>r?r.toUpperCase():l.toLowerCase());/**
|
|
65
|
+
* @license lucide-react v0.563.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const cx=t=>{const a=zN(t);return a.charAt(0).toUpperCase()+a.slice(1)};/**
|
|
70
|
+
* @license lucide-react v0.563.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/var ON={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
75
|
+
* @license lucide-react v0.563.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const RN=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/**
|
|
80
|
+
* @license lucide-react v0.563.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const kN=A.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:r,className:s="",children:c,iconNode:u,...h},g)=>A.createElement("svg",{ref:g,...ON,width:a,height:a,stroke:t,strokeWidth:r?Number(l)*24/Number(a):l,className:cv("lucide",s),...!c&&!RN(h)&&{"aria-hidden":"true"},...h},[...u.map(([p,y])=>A.createElement(p,y)),...Array.isArray(c)?c:[c]]));/**
|
|
85
|
+
* @license lucide-react v0.563.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const be=(t,a)=>{const l=A.forwardRef(({className:r,...s},c)=>A.createElement(kN,{ref:c,iconNode:a,className:cv(`lucide-${MN(cx(t))}`,`lucide-${t}`,r),...s}));return l.displayName=cx(t),l};/**
|
|
90
|
+
* @license lucide-react v0.563.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const DN=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],sc=be("activity",DN);/**
|
|
95
|
+
* @license lucide-react v0.563.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const LN=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],uv=be("archive",LN);/**
|
|
100
|
+
* @license lucide-react v0.563.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const HN=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]],fv=be("binary",HN);/**
|
|
105
|
+
* @license lucide-react v0.563.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const BN=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],cc=be("book-open",BN);/**
|
|
110
|
+
* @license lucide-react v0.563.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const UN=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],$l=be("brain",UN);/**
|
|
115
|
+
* @license lucide-react v0.563.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const VN=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],dv=be("calendar",VN);/**
|
|
120
|
+
* @license lucide-react v0.563.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const $N=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],An=be("check",$N);/**
|
|
125
|
+
* @license lucide-react v0.563.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const YN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hv=be("chevron-down",YN);/**
|
|
130
|
+
* @license lucide-react v0.563.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const qN=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],XN=be("chevron-left",qN);/**
|
|
135
|
+
* @license lucide-react v0.563.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const GN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ZN=be("chevron-right",GN);/**
|
|
140
|
+
* @license lucide-react v0.563.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const QN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],mv=be("circle-alert",QN);/**
|
|
145
|
+
* @license lucide-react v0.563.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const KN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],FN=be("circle-check",KN);/**
|
|
150
|
+
* @license lucide-react v0.563.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const PN=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pv=be("clock",PN);/**
|
|
155
|
+
* @license lucide-react v0.563.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const IN=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],lo=be("cpu",IN);/**
|
|
160
|
+
* @license lucide-react v0.563.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const JN=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],WN=be("download",JN);/**
|
|
165
|
+
* @license lucide-react v0.563.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const eE=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],tE=be("eye-off",eE);/**
|
|
170
|
+
* @license lucide-react v0.563.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const nE=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Nh=be("eye",nE);/**
|
|
175
|
+
* @license lucide-react v0.563.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const aE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],iE=be("file-braces",aE);/**
|
|
180
|
+
* @license lucide-react v0.563.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const lE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],gv=be("file-code",lE);/**
|
|
185
|
+
* @license lucide-react v0.563.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const rE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ro=be("file-text",rE);/**
|
|
190
|
+
* @license lucide-react v0.563.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const oE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M11 18h2",key:"12mj7e"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5",key:"qbrxap"}]],sE=be("file-type",oE);/**
|
|
195
|
+
* @license lucide-react v0.563.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const cE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],uE=be("file",cE);/**
|
|
200
|
+
* @license lucide-react v0.563.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const fE=[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]],dE=be("folder-archive",fE);/**
|
|
205
|
+
* @license lucide-react v0.563.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const hE=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]],mE=be("folder-check",hE);/**
|
|
210
|
+
* @license lucide-react v0.563.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const pE=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Ka=be("folder-open",pE);/**
|
|
215
|
+
* @license lucide-react v0.563.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const gE=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Eh=be("folder",gE);/**
|
|
220
|
+
* @license lucide-react v0.563.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const xE=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]],yE=be("folder-x",xE);/**
|
|
225
|
+
* @license lucide-react v0.563.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const vE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],xv=be("globe",vE);/**
|
|
230
|
+
* @license lucide-react v0.563.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const bE=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Tc=be("hard-drive",bE);/**
|
|
235
|
+
* @license lucide-react v0.563.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const wE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],yv=be("image",wE);/**
|
|
240
|
+
* @license lucide-react v0.563.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const SE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],uc=be("info",SE);/**
|
|
245
|
+
* @license lucide-react v0.563.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const NE=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],EE=be("layers",NE);/**
|
|
250
|
+
* @license lucide-react v0.563.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const jE=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],vv=be("layout-dashboard",jE);/**
|
|
255
|
+
* @license lucide-react v0.563.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const _E=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],AE=be("loader-circle",_E);/**
|
|
260
|
+
* @license lucide-react v0.563.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const CE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],bv=be("lock",CE);/**
|
|
265
|
+
* @license lucide-react v0.563.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const TE=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ME=be("message-square",TE);/**
|
|
270
|
+
* @license lucide-react v0.563.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const zE=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],OE=be("monitor",zE);/**
|
|
275
|
+
* @license lucide-react v0.563.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const RE=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],kE=be("moon",RE);/**
|
|
280
|
+
* @license lucide-react v0.563.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const DE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],LE=be("plus",DE);/**
|
|
285
|
+
* @license lucide-react v0.563.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const HE=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],wv=be("radio",HE);/**
|
|
290
|
+
* @license lucide-react v0.563.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const BE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],UE=be("refresh-cw",BE);/**
|
|
295
|
+
* @license lucide-react v0.563.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const VE=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Ml=be("scroll-text",VE);/**
|
|
300
|
+
* @license lucide-react v0.563.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const $E=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],YE=be("search",$E);/**
|
|
305
|
+
* @license lucide-react v0.563.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const qE=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],XE=be("server",qE);/**
|
|
310
|
+
* @license lucide-react v0.563.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const GE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fc=be("settings",GE);/**
|
|
315
|
+
* @license lucide-react v0.563.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const ZE=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],ux=be("shield-off",ZE);/**
|
|
320
|
+
* @license lucide-react v0.563.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const QE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Xr=be("shield",QE);/**
|
|
325
|
+
* @license lucide-react v0.563.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const KE=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Sv=be("sparkles",KE);/**
|
|
330
|
+
* @license lucide-react v0.563.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const FE=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],PE=be("sun",FE);/**
|
|
335
|
+
* @license lucide-react v0.563.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const IE=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Nv=be("trash-2",IE);/**
|
|
340
|
+
* @license lucide-react v0.563.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const JE=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],WE=be("trending-up",JE);/**
|
|
345
|
+
* @license lucide-react v0.563.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*/const e4=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],jh=be("wifi-off",e4);/**
|
|
350
|
+
* @license lucide-react v0.563.0 - ISC
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the ISC license.
|
|
353
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/const t4=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Ev=be("wifi",t4);/**
|
|
355
|
+
* @license lucide-react v0.563.0 - ISC
|
|
356
|
+
*
|
|
357
|
+
* This source code is licensed under the ISC license.
|
|
358
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
+
*/const n4=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Qd=be("workflow",n4);/**
|
|
360
|
+
* @license lucide-react v0.563.0 - ISC
|
|
361
|
+
*
|
|
362
|
+
* This source code is licensed under the ISC license.
|
|
363
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
+
*/const a4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Mc=be("x",a4);/**
|
|
365
|
+
* @license lucide-react v0.563.0 - ISC
|
|
366
|
+
*
|
|
367
|
+
* This source code is licensed under the ISC license.
|
|
368
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
+
*/const i4=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],jv=be("zap",i4);function l4(t,a){let l;try{l=t()}catch{return}return{getItem:s=>{var c;const u=g=>g===null?null:JSON.parse(g,void 0),h=(c=l.getItem(s))!=null?c:null;return h instanceof Promise?h.then(u):u(h)},setItem:(s,c)=>l.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>l.removeItem(s)}}const Kd=t=>a=>{try{const l=t(a);return l instanceof Promise?l:{then(r){return Kd(r)(l)},catch(r){return this}}}catch(l){return{then(r){return this},catch(r){return Kd(r)(l)}}}},r4=(t,a)=>(l,r,s)=>{let c={storage:l4(()=>window.localStorage),partialize:E=>E,version:0,merge:(E,_)=>({..._,...E}),...a},u=!1,h=0;const g=new Set,p=new Set;let y=c.storage;if(!y)return t((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),l(...E)},r,s);const x=()=>{const E=c.partialize({...r()});return y.setItem(c.name,{state:E,version:c.version})},v=s.setState;s.setState=(E,_)=>(v(E,_),x());const w=t((...E)=>(l(...E),x()),r,s);s.getInitialState=()=>w;let S;const N=()=>{var E,_;if(!y)return;const k=++h;u=!1,g.forEach(C=>{var D;return C((D=r())!=null?D:w)});const j=((_=c.onRehydrateStorage)==null?void 0:_.call(c,(E=r())!=null?E:w))||void 0;return Kd(y.getItem.bind(y))(c.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==c.version){if(c.migrate){const D=c.migrate(C.state,C.version);return D instanceof Promise?D.then(z=>[!0,z]):[!0,D]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var D;if(k!==h)return;const[z,O]=C;if(S=c.merge(O,(D=r())!=null?D:w),l(S,!0),z)return x()}).then(()=>{k===h&&(j==null||j(S,void 0),S=r(),u=!0,p.forEach(C=>C(S)))}).catch(C=>{k===h&&(j==null||j(void 0,C))})};return s.persist={setOptions:E=>{c={...c,...E},E.storage&&(y=E.storage)},clearStorage:()=>{y==null||y.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>N(),hasHydrated:()=>u,onHydrate:E=>(g.add(E),()=>{g.delete(E)}),onFinishHydration:E=>(p.add(E),()=>{p.delete(E)})},c.skipHydration||N(),S||w},_h=r4,Ah=Cc()(_h(t=>({theme:"dark",setTheme:a=>t({theme:a})}),{name:"memory-mapper-theme"}));function Ch(t){const a=document.documentElement,l=window.matchMedia("(prefers-color-scheme: dark)").matches,r=t==="dark"||t==="system"&&l;a.classList.remove("light","dark"),a.classList.add(r?"dark":"light"),a.style.colorScheme=r?"dark":"light"}function o4(){const{theme:t,setTheme:a}=Ah();return A.useEffect(()=>{Ch(t)},[t]),{theme:t,setTheme:a}}const fx=[{value:"dark",icon:kE,label:"Dark mode"},{value:"light",icon:PE,label:"Light mode"},{value:"system",icon:OE,label:"System theme"}];function s4(){const{theme:t,setTheme:a}=o4(),l=fx.findIndex(r=>r.value===t);return d.jsxs("div",{className:Se("relative flex items-center gap-1 p-1 rounded-lg","bg-secondary/50 border border-border"),role:"radiogroup","aria-label":"Theme selection",children:[d.jsx("div",{className:"absolute top-1 h-6 w-8 rounded border-[1.5px] border-foreground/70 pointer-events-none",style:{left:`${4+l*36}px`,transition:"left 250ms cubic-bezier(0.4, 0, 0.2, 1)"}}),fx.map(r=>{const s=r.icon,c=t===r.value;return d.jsx("button",{onClick:()=>a(r.value),role:"radio","aria-checked":c,"aria-label":r.label,className:Se("relative z-10 flex items-center justify-center w-8 h-6 rounded cursor-pointer","transition-colors duration-200",c?"text-foreground":"text-muted-foreground hover:text-foreground"),children:d.jsx(s,{className:"w-4 h-4"})},r.value)})]})}function c4(){const{status:t,sources:a,refresh:l}=Gy(),{success:r,error:s}=VS(),[c,u]=A.useState("idle"),h=async()=>{if(c==="idle"){u("refreshing");try{await l(),await new Promise(p=>setTimeout(p,600)),u("done"),r("Data refreshed","All sources updated successfully")}catch{u("idle"),s("Refresh failed","Could not connect to server");return}setTimeout(()=>u("idle"),1e3)}},g=a.filter(p=>p.connected);return d.jsxs("header",{className:"h-12 flex items-center justify-between px-4 border-b border-border bg-background/80 backdrop-blur-sm",children:[d.jsxs("div",{className:"flex items-center gap-5",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:Se("w-2 h-2 rounded-full",t==="connected"&&"bg-emerald-500",t==="connecting"&&"bg-amber-500",t==="error"&&"bg-red-500")}),t==="connected"&&d.jsx("div",{className:"absolute inset-0 w-2 h-2 rounded-full bg-emerald-500 animate-ping opacity-75"})]}),d.jsxs("span",{className:Se("text-xs font-medium",t==="connected"?"text-emerald-400":"text-muted-foreground"),children:[t==="connecting"&&"Connecting...",t==="connected"&&"Connected",t==="error"&&"Disconnected"]})]}),t==="connected"&&g.length>0&&d.jsx("div",{className:"w-px h-4 bg-border/50"}),t==="connected"&&g.length>0&&d.jsx("div",{className:"flex items-center gap-3 text-xs",children:g.map(p=>d.jsx(u4,{label:p.path,connected:p.connected,icon:Tc},p.id))})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("button",{onClick:h,disabled:c!=="idle",className:Se("group flex items-center gap-2 px-3 py-1.5 rounded-lg cursor-pointer","text-xs font-medium transition-all duration-200 ease-out","border active:scale-[0.98]","disabled:cursor-not-allowed disabled:opacity-70",c==="idle"&&"border-border bg-secondary text-foreground hover:bg-secondary/80",c==="refreshing"&&"border-primary/30 bg-primary/10 text-primary",c==="done"&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"),children:[c==="done"?d.jsx(An,{className:"w-3.5 h-3.5"}):d.jsx(UE,{className:Se("w-3.5 h-3.5",c==="idle"&&"group-hover:rotate-180",c==="refreshing"&&"animate-spin"),style:{transition:"transform 500ms cubic-bezier(0.4, 0, 0.2, 1)"}}),d.jsxs("span",{children:[c==="idle"&&"Refresh",c==="refreshing"&&"Syncing...",c==="done"&&"Done"]})]}),d.jsx(s4,{})]})]})}function u4({label:t,connected:a,icon:l}){return d.jsxs("span",{className:Se("flex items-center gap-1.5 px-2 py-1 rounded-md transition-colors duration-200",a?"text-foreground bg-emerald-500/10 border border-emerald-500/20":"text-muted-foreground bg-secondary"),children:[d.jsx(l,{className:Se("w-3 h-3",a?"text-emerald-600 dark:text-emerald-400":"text-muted-foreground")}),d.jsx("span",{className:"font-mono text-[11px]",children:t})]})}const dx=[];async function hx(t){const a=t.filter(l=>l.enabled&&l.detected).map(l=>({id:l.id,path:l.path}));await fetch("/api/config/sources",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sources:a})})}const Mi=Cc()(_h((t,a)=>({completed:!1,sources:dx,completedAt:null,agentName:"",setAgentName:l=>t({agentName:l}),completeOnboarding:()=>{const{sources:l}=a();hx(l).catch(console.error),t({completed:!0,completedAt:new Date().toISOString()})},resetOnboarding:()=>t({completed:!1,sources:dx,completedAt:null,agentName:""}),setSources:l=>t({sources:l}),toggleSource:l=>t(r=>({sources:r.sources.map(s=>s.id===l?{...s,enabled:!s.enabled}:s)})),updateSourcePath:(l,r)=>t(s=>({sources:s.sources.map(c=>c.id===l?{...c,path:r,detected:!1}:c)})),syncSourcesToServer:async()=>{const{sources:l}=a();await hx(l)},addSource:()=>{const l=`custom-${Date.now()}`;return t(r=>({sources:[...r.sources,{id:l,name:"",path:"",enabled:!0,detected:!1}]})),l},removeSource:l=>t(r=>({sources:r.sources.filter(s=>s.id!==l)}))}),{name:"openclaw-memory-mapper-onboarding"})),f4=[{id:"architecture",label:"Architecture",icon:Qd,color:"258 90% 66%"},{id:"files",label:"Files",icon:Ka,color:"38 92% 50%"},{id:"timeline",label:"Timeline",icon:pv,color:"190 90% 50%"},{id:"logs",label:"Logs",icon:Ml,color:"160 84% 39%"},{id:"security",label:"Security",icon:Xr,color:"142 76% 36%"}],Ys={id:"overview",label:"Overview",icon:vv,color:"220 90% 56%"};function mx({item:t,isActive:a,label:l,onClick:r}){const s=t.icon;return d.jsxs("button",{onClick:r,className:"group relative flex items-center gap-4 px-4 py-4 rounded-xl text-base cursor-pointer",style:{color:a?`hsl(${t.color})`:"hsl(var(--muted-foreground))",background:a?`linear-gradient(135deg, hsl(${t.color} / 0.15), hsl(${t.color} / 0.05))`:"transparent",boxShadow:a?`inset 0 0 0 1.5px hsl(${t.color} / 0.5), 0 0 20px hsl(${t.color} / 0.15)`:"inset 0 0 0 1.5px transparent, 0 0 20px transparent",transition:"color 300ms ease, background 300ms ease, box-shadow 300ms ease"},onMouseEnter:c=>{a||(c.currentTarget.style.color="hsl(var(--foreground))")},onMouseLeave:c=>{a||(c.currentTarget.style.color="hsl(var(--muted-foreground))")},children:[d.jsx(s,{className:"w-5 h-5",style:{color:"inherit",transition:"color 300ms ease"}}),d.jsx("span",{className:"font-medium",children:l})]})}function d4({children:t}){const[a,l]=A.useState("architecture"),{completed:r,syncSourcesToServer:s,agentName:c}=Mi();return A.useEffect(()=>{r&&s().catch(console.error)},[r,s]),d.jsxs("div",{className:"h-screen flex flex-col bg-background text-foreground",children:[d.jsx(c4,{}),d.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[d.jsxs("nav",{className:"w-56 flex flex-col border-r",style:{backgroundColor:"hsl(var(--sidebar-bg))",borderColor:"hsl(var(--sidebar-border))"},children:[d.jsxs("div",{className:"px-4 py-5 flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-xl bg-primary/10 ring-1 ring-primary/20",children:d.jsx($l,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground tracking-tight",children:"Memory Mapper"}),d.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider font-medium",children:c||"OpenClaw"})]})]}),d.jsx("div",{className:"mx-4 h-px bg-border/60"}),d.jsxs("div",{className:"flex-1 flex flex-col p-3 pt-4",children:[d.jsx("div",{className:"flex flex-col gap-1 flex-1",children:f4.map(u=>d.jsx(mx,{item:u,isActive:a===u.id,label:u.id==="architecture"?c?`${c}'s Memory`:"Agent Memory":u.label,onClick:()=>l(u.id)},u.id))}),d.jsx("div",{className:"mx-1 h-px bg-border/40 my-2"}),d.jsx(mx,{item:Ys,isActive:a===Ys.id,label:Ys.label,onClick:()=>l(Ys.id)})]}),d.jsx("div",{className:"px-4 py-4 border-t",style:{borderColor:"hsl(var(--sidebar-border))"},children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider font-medium",children:"Version"}),d.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:"1.2.1"})]})})]}),d.jsx("main",{className:"flex-1 overflow-auto bg-background",children:t(a)})]})]})}const Th=Cc()(_h((t,a)=>({entries:[],isPaused:!1,maxEntries:500,logActivity:l=>{if(a().isPaused)return;const r={...l,id:Math.random().toString(36).substring(2,9),timestamp:new Date().toISOString()};t(s=>({entries:[r,...s.entries].slice(0,s.maxEntries)}))},clearLog:()=>t({entries:[]}),togglePause:()=>t(l=>({isPaused:!l.isPaused})),setPaused:l=>t({isPaused:l})}),{name:"openclaw-memory-mapper-activity-log",partialize:t=>({entries:t.entries.slice(0,100),isPaused:t.isPaused})}));function h4(t){const a=["Timestamp","Type","Path","Source","Success","Size"],l=t.map(r=>{var s;return[r.timestamp,r.type,r.path,r.source,r.success?"Yes":"No",((s=r.size)==null?void 0:s.toString())||""]});return[a,...l].map(r=>r.join(",")).join(`
|
|
370
|
+
`)}function zc(){const[t,a]=A.useState(null),[l,r]=A.useState(!0),[s,c]=A.useState(null),{logActivity:u,isPaused:h}=Th(),g=A.useCallback(async()=>{if(!h){r(!0);try{const p=await fetch("/api/files");if(!p.ok)throw new Error(`HTTP ${p.status}`);const y=await p.json();a(y),c(null),Object.entries(y).forEach(([x,v])=>{if(v){const w=v.path||`~/${x}`;u({type:"LIST",path:w,source:x,success:!0})}})}catch(p){c(p instanceof Error?p.message:"Failed to load files"),u({type:"LIST",path:"/api/files",source:"api",success:!1})}finally{r(!1)}}},[h,u]);return A.useEffect(()=>{g()},[g]),{data:t,loading:l,error:s,refresh:g}}function m4(){const[t,a]=A.useState(null),[l,r]=A.useState(!1),[s,c]=A.useState(null),{logActivity:u,isPaused:h}=Th(),g=A.useCallback(async(y,x)=>{if(!h){r(!0);try{const v=await fetch(`/api/file?path=${encodeURIComponent(y)}&source=${x}`);if(!v.ok)throw v.status===404?new Error("File not found"):new Error(`HTTP ${v.status}`);const w=await v.json();a(w),c(null),u({type:"READ",path:y,source:x,success:!0,size:w.size})}catch(v){c(v instanceof Error?v.message:"Failed to load file"),a(null),u({type:"READ",path:y,source:x,success:!1})}finally{r(!1)}}},[h,u]),p=A.useCallback(()=>{a(null),c(null)},[]);return{content:t,loading:l,error:s,loadFile:g,clear:p}}function p4(){const[t,a]=A.useState(null),[l,r]=A.useState(!0),[s,c]=A.useState(null),u=A.useCallback(async()=>{r(!0);try{const h=await fetch("/api/stats");if(!h.ok)throw new Error(`HTTP ${h.status}`);const g=await h.json();a(g),c(null)}catch(h){c(h instanceof Error?h.message:"Failed to load stats")}finally{r(!1)}},[]);return A.useEffect(()=>{u()},[u]),{stats:t,loading:l,error:s,refresh:u}}function g4(){const[t,a]=A.useState([]),[l,r]=A.useState(!0),[s,c]=A.useState(null),[u,h]=A.useState(null),g=A.useCallback(async()=>{r(!0);try{const p=await fetch("/api/logs");if(!p.ok){if(p.status===404){const x=await p.json();c(`Logs not found at ${x.path}`),a([]);return}throw new Error(`HTTP ${p.status}`)}const y=await p.json();a(y.logs),h(y.path),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to load logs")}finally{r(!1)}},[]);return A.useEffect(()=>{g()},[g]),{logs:t,loading:l,error:s,refresh:g,logsPath:u}}function _v(){const[t,a]=A.useState(null),[l,r]=A.useState(null),[s,c]=A.useState(!0),[u,h]=A.useState(null),g=A.useCallback(async()=>{c(!0);try{const p=await fetch("/api/config");if(!p.ok){if(p.status===404){const x=await p.json();h(`Config not found at ${x.path}`),r(x.path),a(null);return}throw new Error(`HTTP ${p.status}`)}const y=await p.json();a(y.config),r(y.path),h(null)}catch(p){h(p instanceof Error?p.message:"Failed to load config")}finally{c(!1)}},[]);return A.useEffect(()=>{g()},[g]),{config:t,configPath:l,loading:s,error:u,refresh:g}}function ln(t){if(t===0)return"0 B";const a=1024,l=["B","KB","MB","GB"],r=Math.floor(Math.log(t)/Math.log(a));return`${parseFloat((t/Math.pow(a,r)).toFixed(1))} ${l[r]}`}const bt=A.forwardRef(({className:t,...a},l)=>d.jsx("div",{ref:l,className:Se("rounded-2xl border border-border bg-card text-card-foreground shadow-lg",t),...a}));bt.displayName="Card";const x4=A.forwardRef(({className:t,...a},l)=>d.jsx("div",{ref:l,className:Se("flex flex-col space-y-1.5 p-6",t),...a}));x4.displayName="CardHeader";const y4=A.forwardRef(({className:t,...a},l)=>d.jsx("div",{ref:l,className:Se("font-semibold leading-none tracking-tight",t),...a}));y4.displayName="CardTitle";const v4=A.forwardRef(({className:t,...a},l)=>d.jsx("div",{ref:l,className:Se("text-sm text-muted-foreground",t),...a}));v4.displayName="CardDescription";const b4=A.forwardRef(({className:t,...a},l)=>d.jsx("div",{ref:l,className:Se("p-6 pt-0",t),...a}));b4.displayName="CardContent";const w4=A.forwardRef(({className:t,...a},l)=>d.jsx("div",{ref:l,className:Se("flex items-center p-6 pt-0",t),...a}));w4.displayName="CardFooter";const px=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,gx=Ky,Mh=(t,a)=>l=>{var r;if((a==null?void 0:a.variants)==null)return gx(t,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:s,defaultVariants:c}=a,u=Object.keys(s).map(p=>{const y=l==null?void 0:l[p],x=c==null?void 0:c[p];if(y===null)return null;const v=px(y)||px(x);return s[p][v]}),h=l&&Object.entries(l).reduce((p,y)=>{let[x,v]=y;return v===void 0||(p[x]=v),p},{}),g=a==null||(r=a.compoundVariants)===null||r===void 0?void 0:r.reduce((p,y)=>{let{class:x,className:v,...w}=y;return Object.entries(w).every(S=>{let[N,E]=S;return Array.isArray(E)?E.includes({...c,...h}[N]):{...c,...h}[N]===E})?[...p,x,v]:p},[]);return gx(t,u,g,l==null?void 0:l.class,l==null?void 0:l.className)},S4=Mh("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-emerald-500/15 text-emerald-400",warning:"border-transparent bg-amber-500/15 text-amber-400",error:"border-transparent bg-red-500/15 text-red-400"}},defaultVariants:{variant:"default"}});function Qr({className:t,variant:a,...l}){return d.jsx("div",{className:Se(S4({variant:a}),t),...l})}function N4({connected:t}){return d.jsx("div",{className:`w-2.5 h-2.5 rounded-full shrink-0 ${t?"bg-emerald-400 shadow-[0_0_8px_rgba(52,211,153,0.5)]":"bg-red-400 shadow-[0_0_8px_rgba(248,113,113,0.3)]"}`})}function xx(){const t=Gy(),{agentName:a}=Mi(),{config:l,configPath:r,loading:s}=_v(),{stats:c,loading:u}=p4(),{data:h,loading:g}=zc(),p=s||u||g,y=h?Object.entries(h).map(([D,z])=>({id:D,path:(z==null?void 0:z.path)||`~/${D}`,fileCount:(z==null?void 0:z.fileCount)||0,totalSize:(z==null?void 0:z.totalSize)||0,connected:z!==null})):[],x=y.reduce((D,z)=>D+z.fileCount,0),v=y.reduce((D,z)=>D+z.totalSize,0),w=l==null?void 0:l.gateway,S=(w==null?void 0:w.mode)||null,N=w==null?void 0:w.port,E=l==null?void 0:l.channels,_=E?Object.entries(E).filter(([,D])=>typeof D=="object"&&D!==null?D.enabled!==!1:!!D).map(([D])=>D):[],k=(l==null?void 0:l.model)||null,j=l==null?void 0:l.models,C=k||(j==null?void 0:j.primary)||(j==null?void 0:j.default)||null;return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-blue-500/20 to-indigo-600/20 border border-blue-500/30",children:d.jsx(vv,{className:"w-5 h-5 text-blue-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Overview"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:a?`${a}'s system status`:"System status and memory summary"})]})]}),p&&d.jsx(AE,{className:"w-4 h-4 text-muted-foreground animate-spin"})]}),d.jsxs("div",{className:"flex-1 overflow-auto p-6 space-y-6",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Connection"}),d.jsxs(bt,{className:"p-4 bg-card",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.status==="connected"?d.jsx(Ev,{className:"w-5 h-5 text-emerald-400"}):d.jsx(jh,{className:"w-5 h-5 text-red-400"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-foreground capitalize",children:t.status}),t.error&&d.jsx("p",{className:"text-xs text-red-400",children:t.error})]}),d.jsx(Qr,{variant:t.status==="connected"?"success":"error",className:"ml-auto",children:t.status==="connected"?"Online":"Offline"})]}),y.length>0&&d.jsx("div",{className:"space-y-2",children:y.map(D=>d.jsxs("div",{className:"flex items-center gap-3 p-2.5 rounded-lg bg-secondary/30 border border-border/50",children:[d.jsx(N4,{connected:D.connected}),d.jsx(Ka,{className:"w-3.5 h-3.5 text-muted-foreground"}),d.jsx("span",{className:"text-xs font-mono text-foreground flex-1 truncate",children:D.path}),d.jsxs("span",{className:"text-[10px] text-muted-foreground tabular-nums",children:[D.fileCount," files"]}),D.totalSize>0&&d.jsx("span",{className:"text-[10px] text-muted-foreground font-mono tabular-nums",children:ln(D.totalSize)})]},D.id))})]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Memory Stats"}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(bt,{className:"p-4 bg-card",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-blue-500/10 border border-blue-500/20",children:d.jsx(Ka,{className:"w-4 h-4 text-blue-400"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"Sources"}),d.jsx("p",{className:"text-lg font-semibold text-foreground tabular-nums",children:y.length})]})]})}),d.jsx(bt,{className:"p-4 bg-card",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-emerald-500/10 border border-emerald-500/20",children:d.jsx(ro,{className:"w-4 h-4 text-emerald-400"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Files"}),d.jsx("p",{className:"text-lg font-semibold text-foreground tabular-nums",children:x})]})]})}),d.jsx(bt,{className:"p-4 bg-card",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-purple-500/10 border border-purple-500/20",children:d.jsx(Tc,{className:"w-4 h-4 text-purple-400"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Size"}),d.jsx("p",{className:"text-lg font-semibold text-foreground tabular-nums",children:ln(v)})]})]})})]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Configuration"}),d.jsxs(bt,{className:"p-4 bg-card",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx(fc,{className:"w-4 h-4 text-muted-foreground"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:l?"openclaw.json found":"No openclaw.json"}),r&&d.jsx("p",{className:"text-[10px] text-muted-foreground font-mono",children:r})]}),l?d.jsx(An,{className:"w-4 h-4 text-emerald-400"}):d.jsx(Mc,{className:"w-4 h-4 text-muted-foreground/40"})]}),l&&d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[d.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30 border border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[d.jsx(xv,{className:"w-3.5 h-3.5 text-blue-400"}),d.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Gateway"})]}),d.jsx("p",{className:"text-xs font-medium text-foreground",children:S||"Not configured"}),N&&d.jsxs("p",{className:"text-[10px] text-muted-foreground",children:["Port ",N]})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30 border border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[d.jsx(wv,{className:"w-3.5 h-3.5 text-emerald-400"}),d.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Channels"})]}),_.length>0?d.jsx("div",{className:"flex flex-wrap gap-1",children:_.map(D=>d.jsx(Qr,{variant:"outline",className:"text-[10px]",children:D},D))}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"None configured"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30 border border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[d.jsx(lo,{className:"w-3.5 h-3.5 text-purple-400"}),d.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Model"})]}),d.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:C||"Not configured"})]})]})]})]}),(c==null?void 0:c.layers)&&d.jsxs("div",{children:[d.jsx("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Memory Layers"}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Object.entries(c.layers).map(([D,z])=>d.jsx(bt,{className:"p-3 bg-card",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-medium text-foreground capitalize",children:D}),d.jsx("p",{className:"text-[10px] text-muted-foreground font-mono truncate",children:z.path})]}),d.jsxs("div",{className:"text-right",children:[d.jsxs("p",{className:"text-xs font-semibold text-foreground tabular-nums",children:[z.files," files"]}),z.size>0&&d.jsx("p",{className:"text-[10px] text-muted-foreground font-mono tabular-nums",children:ln(z.size)})]})]})},D))})]})]})]})}function E4({nodes:t,selectedPath:a,onSelect:l}){return d.jsx("div",{className:"py-2",children:t.map(r=>d.jsx(Av,{node:r,selectedPath:a,onSelect:l,depth:0},r.path))})}function Av({node:t,selectedPath:a,onSelect:l,depth:r}){const[s,c]=A.useState(r<2),u=a===t.path,h=()=>{t.type==="directory"?c(!s):l(t.path)};return d.jsxs("div",{children:[d.jsxs("button",{onClick:h,className:Se("w-full flex items-center gap-1.5 px-2 py-1.5 text-xs text-left cursor-pointer transition-all duration-150",u?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),style:{paddingLeft:`${r*12+8}px`},children:[t.type==="directory"?s?d.jsx(hv,{className:"w-3 h-3 text-muted-foreground"}):d.jsx(ZN,{className:"w-3 h-3 text-muted-foreground"}):d.jsx("span",{className:"w-3 h-3"}),t.type==="directory"?d.jsx(Eh,{className:"w-4 h-4 text-amber-500/70"}):d.jsx(uE,{className:"w-4 h-4 text-blue-400/70"}),d.jsx("span",{className:"truncate",children:t.name})]}),t.type==="directory"&&s&&t.children&&d.jsx("div",{children:t.children.map(g=>d.jsx(Av,{node:g,selectedPath:a,onSelect:l,depth:r+1},g.path))})]})}const Cv=new Set([".pkl",".pickle",".pyc",".pyo",".so",".dylib",".dll",".exe",".bin",".dat",".db",".sqlite",".sqlite3",".zip",".tar",".gz",".bz2",".7z",".rar",".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg",".mp3",".mp4",".wav",".avi",".mov",".webm",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".woff",".woff2",".ttf",".otf",".eot"]),Fd={".py":"python",".js":"javascript",".ts":"typescript",".tsx":"typescript",".jsx":"javascript",".rs":"rust",".go":"go",".rb":"ruby",".sh":"bash",".bash":"bash",".zsh":"bash",".yml":"yaml",".yaml":"yaml",".toml":"toml",".ini":"ini",".cfg":"ini",".conf":"ini",".css":"css",".scss":"scss",".html":"html",".xml":"xml",".sql":"sql"};function j4(t){return t.slice(0,1e3).split("").filter(l=>{const r=l.charCodeAt(0);return r<32&&r!==9&&r!==10&&r!==13}).length>10}function _4({extension:t,className:a}){return Cv.has(t)?[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg"].includes(t)?d.jsx(yv,{className:a}):d.jsx(fv,{className:a}):t===".json"?d.jsx(iE,{className:a}):Fd[t]?d.jsx(gv,{className:a}):t===".md"||t===".txt"?d.jsx(ro,{className:a}):d.jsx(sE,{className:a})}function A4({content:t,loading:a,error:l}){if(a)return d.jsx("div",{className:"h-full flex items-center justify-center",children:d.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[d.jsx("div",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),d.jsx("span",{className:"text-sm",children:"Loading file..."})]})});if(l)return d.jsx("div",{className:"h-full flex items-center justify-center",children:d.jsxs(bt,{className:"p-6 max-w-sm text-center",children:[d.jsx(mv,{className:"w-8 h-8 text-red-400 mx-auto mb-3"}),d.jsx("p",{className:"text-sm text-red-400",children:l})]})});if(!t)return d.jsx("div",{className:"h-full flex items-center justify-center",children:d.jsx("p",{className:"text-sm text-muted-foreground/50",children:"Select a file to preview"})});const r=Cv.has(t.extension)||j4(t.content);return d.jsxs("div",{className:"h-full flex flex-col bg-card",children:[d.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border/50 bg-secondary/30",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(_4,{extension:t.extension,className:"w-4 h-4 text-muted-foreground"}),d.jsx("span",{className:"font-mono text-sm text-foreground",children:t.name}),d.jsx("span",{className:"text-xs text-muted-foreground/50 uppercase",children:t.extension.slice(1)})]}),d.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground/70",children:[d.jsx("span",{children:ln(t.size)}),d.jsx("span",{children:new Date(t.modified).toLocaleDateString()})]})]}),d.jsx("div",{className:"flex-1 overflow-auto",children:r?d.jsx(C4,{extension:t.extension,size:t.size}):t.extension===".md"?d.jsx(z4,{content:t.content}):t.extension===".json"?d.jsx(O4,{content:t.content}):Fd[t.extension]?d.jsx(T4,{content:t.content,language:Fd[t.extension]}):d.jsx(Tv,{content:t.content})})]})}function C4({extension:t,size:a}){const l=[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg"].includes(t);return d.jsx("div",{className:"h-full flex items-center justify-center p-8",children:d.jsxs(bt,{className:"p-8 text-center max-w-sm",children:[l?d.jsx(yv,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-4"}):d.jsx(fv,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-4"}),d.jsx("p",{className:"text-sm font-medium text-foreground mb-1",children:"Binary File"}),d.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:l?"Image file":"This file cannot be displayed as text"}),d.jsxs("div",{className:"flex items-center justify-center gap-3 text-xs text-muted-foreground/50",children:[d.jsx("span",{className:"uppercase",children:t.slice(1)}),d.jsx("span",{children:"•"}),d.jsx("span",{children:ln(a)})]})]})})}function Tv({content:t}){const a=t.split(`
|
|
371
|
+
`);return d.jsx("div",{className:"p-4 font-mono text-xs",children:d.jsx("table",{className:"w-full",children:d.jsx("tbody",{children:a.map((l,r)=>d.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[d.jsx("td",{className:"pr-4 py-0.5 text-right text-muted-foreground/30 select-none w-10",children:r+1}),d.jsx("td",{className:"py-0.5 text-muted-foreground whitespace-pre-wrap break-all",children:l||" "})]},r))})})})}function T4({content:t,language:a}){const l=t.split(`
|
|
372
|
+
`),r=s=>{let c=s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return c=c.replace(/(["'`])(?:(?!\1)[^\\]|\\.)*?\1/g,'<span class="text-emerald-400">$&</span>'),c=c.replace(/(#.*$|\/\/.*$)/gm,'<span class="text-zinc-600">$1</span>'),c=c.replace(/\b(\d+\.?\d*)\b/g,'<span class="text-amber-400">$1</span>'),M4(a).forEach(h=>{const g=new RegExp(`\\b(${h})\\b`,"g");c=c.replace(g,'<span class="text-violet-400">$1</span>')}),c};return d.jsx("div",{className:"p-4 font-mono text-xs",children:d.jsx("table",{className:"w-full",children:d.jsx("tbody",{children:l.map((s,c)=>d.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[d.jsx("td",{className:"pr-4 py-0.5 text-right text-muted-foreground/30 select-none w-10",children:c+1}),d.jsx("td",{className:"py-0.5 text-zinc-300 whitespace-pre",dangerouslySetInnerHTML:{__html:r(s)||" "}})]},c))})})})}function M4(t){return{python:["def","class","import","from","return","if","elif","else","for","while","try","except","finally","with","as","True","False","None","and","or","not","in","is","lambda","yield","async","await","self"],javascript:["const","let","var","function","return","if","else","for","while","class","import","export","default","from","try","catch","finally","throw","new","this","true","false","null","undefined","async","await","typeof","instanceof"],typescript:["const","let","var","function","return","if","else","for","while","class","import","export","default","from","try","catch","finally","throw","new","this","true","false","null","undefined","async","await","type","interface","extends","implements","readonly","private","public","protected"],yaml:["true","false","null","yes","no"],bash:["if","then","else","fi","for","do","done","while","case","esac","function","return","export","source","echo","exit"]}[t]||[]}function z4({content:t}){const a=t.split(`
|
|
373
|
+
`),l=[];let r=!1,s=[],c="";return a.forEach((u,h)=>{if(u.startsWith("```")){r?(l.push(d.jsxs("div",{className:"my-4 rounded-lg bg-secondary border border-border overflow-hidden",children:[d.jsx("div",{className:"px-4 py-2 bg-secondary/80 text-[10px] text-muted-foreground uppercase tracking-wider",children:c||"code"}),d.jsx("pre",{className:"p-4 text-xs text-foreground/80 overflow-x-auto font-mono",children:s.join(`
|
|
374
|
+
`)})]},`code-${h}`)),s=[],r=!1):(r=!0,c=u.slice(3).trim());return}if(r){s.push(u);return}if(u.startsWith("# ")){l.push(d.jsx("h1",{className:"text-2xl font-semibold text-foreground mt-8 mb-4 first:mt-0 pb-2 border-b border-border/30",children:u.slice(2)},h));return}if(u.startsWith("## ")){l.push(d.jsx("h2",{className:"text-xl font-semibold text-foreground mt-6 mb-3",children:u.slice(3)},h));return}if(u.startsWith("### ")){l.push(d.jsx("h3",{className:"text-lg font-medium text-foreground mt-5 mb-2",children:u.slice(4)},h));return}if(u.startsWith("#### ")){l.push(d.jsx("h4",{className:"text-base font-medium text-muted-foreground mt-4 mb-2",children:u.slice(5)},h));return}if(u.match(/^[-*] /)){l.push(d.jsxs("p",{className:"text-sm text-muted-foreground pl-4 py-0.5 flex",children:[d.jsx("span",{className:"text-violet-400 mr-3",children:"•"}),d.jsx("span",{children:_d(u.slice(2))})]},h));return}if(u.match(/^\d+\. /)){const g=u.match(/^(\d+)\. (.*)$/);g&&l.push(d.jsxs("p",{className:"text-sm text-muted-foreground pl-4 py-0.5 flex",children:[d.jsxs("span",{className:"text-violet-400 mr-3 tabular-nums",children:[g[1],"."]}),d.jsx("span",{children:_d(g[2])})]},h));return}if(u.startsWith("> ")){l.push(d.jsx("blockquote",{className:"border-l-2 border-violet-500/50 pl-4 my-2 text-sm text-muted-foreground italic",children:u.slice(2)},h));return}if(u.match(/^[-*_]{3,}$/)){l.push(d.jsx("hr",{className:"my-6 border-border/50"},h));return}if(u.trim()===""){l.push(d.jsx("div",{className:"h-3"},h));return}l.push(d.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed my-1",children:_d(u)},h))}),d.jsx("div",{className:"p-6 max-w-3xl",children:l})}function _d(t){const a=[];let l=t,r=0;for(;l.length>0;){const s=l.match(/^`([^`]+)`/);if(s){a.push(d.jsx("code",{className:"px-1.5 py-0.5 rounded bg-secondary text-emerald-600 dark:text-emerald-400 text-xs font-mono",children:s[1]},r++)),l=l.slice(s[0].length);continue}const c=l.match(/^\*\*([^*]+)\*\*/);if(c){a.push(d.jsx("strong",{className:"font-semibold text-foreground",children:c[1]},r++)),l=l.slice(c[0].length);continue}const u=l.match(/^\*([^*]+)\*/);if(u){a.push(d.jsx("em",{className:"italic",children:u[1]},r++)),l=l.slice(u[0].length);continue}const h=l.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(h){a.push(d.jsx("a",{href:h[2],className:"text-violet-400 hover:underline",target:"_blank",rel:"noopener noreferrer",children:h[1]},r++)),l=l.slice(h[0].length);continue}a.push(l[0]),l=l.slice(1)}return a}function O4({content:t}){let a;try{a=JSON.parse(t)}catch{return d.jsx(Tv,{content:t})}return d.jsx("div",{className:"p-4",children:d.jsx(Pd,{value:a,depth:0})})}function Pd({value:t,depth:a}){const l=a*16;if(t===null)return d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"null"});if(typeof t=="boolean")return d.jsx("span",{className:"text-violet-400 text-xs font-mono",children:t.toString()});if(typeof t=="number")return d.jsx("span",{className:"text-amber-400 text-xs font-mono",children:t});if(typeof t=="string")return d.jsxs("span",{className:"text-emerald-400 text-xs font-mono",children:['"',t,'"']});if(Array.isArray(t))return t.length===0?d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"[]"}):d.jsxs("div",{children:[d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"["}),t.map((r,s)=>d.jsxs("div",{style:{marginLeft:l+16},className:"py-0.5",children:[d.jsx(Pd,{value:r,depth:a+1}),s<t.length-1&&d.jsx("span",{className:"text-zinc-600",children:","})]},s)),d.jsx("div",{style:{marginLeft:l},children:d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"]"})})]});if(typeof t=="object"){const r=Object.entries(t);return r.length===0?d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"{}"}):d.jsxs("div",{children:[d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"{"}),r.map(([s,c],u)=>d.jsxs("div",{style:{marginLeft:l+16},className:"py-0.5",children:[d.jsxs("span",{className:"text-zinc-400 text-xs font-mono",children:['"',s,'"']}),d.jsx("span",{className:"text-zinc-600 text-xs font-mono",children:": "}),d.jsx(Pd,{value:c,depth:a+1}),u<r.length-1&&d.jsx("span",{className:"text-zinc-600",children:","})]},s)),d.jsx("div",{style:{marginLeft:l},children:d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"}"})})]})}return d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:String(t)})}function R4(){var w;const{data:t,loading:a,error:l}=zc(),r=m4(),[s,c]=A.useState(null),[u,h]=A.useState(null),g=A.useMemo(()=>t?Object.entries(t).filter(([,S])=>S!==null).map(([S,N])=>({id:S,path:(N==null?void 0:N.path)||`~/${S}`,fileCount:(N==null?void 0:N.fileCount)||0,totalSize:(N==null?void 0:N.totalSize)||0})):[],[t]),p=s||((w=g[0])==null?void 0:w.id)||null,y=p&&t?t[p]:null,x=S=>{p&&(h(S),r.loadFile(S,p))},v=S=>{c(S),h(null),r.clear()};return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-amber-500/20 to-orange-600/20 border border-amber-500/30",children:d.jsx(Ka,{className:"w-5 h-5 text-amber-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"File Browser"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Browse memory files and configurations"})]})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[g.length>0&&d.jsx("div",{className:"flex items-center bg-secondary rounded-lg p-1 border border-border",children:g.map(S=>d.jsx("button",{onClick:()=>v(S.id),className:Se("px-3 py-1.5 text-xs rounded-md cursor-pointer transition-all font-mono",p===S.id?"bg-amber-500/20 text-amber-500 dark:text-amber-400 border border-amber-500/30":"text-muted-foreground hover:text-foreground"),children:S.path.startsWith("~")?S.path:`~/${S.id}`},S.id))}),y&&d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(Tc,{className:"w-3.5 h-3.5"}),d.jsxs("span",{className:"tabular-nums",children:[y.fileCount," files"]}),d.jsx("span",{className:"text-muted-foreground/50",children:"·"}),d.jsx("span",{className:"tabular-nums",children:ln(y.totalSize)})]})]})]}),d.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[d.jsxs("div",{className:"w-72 border-r border-border overflow-auto",children:[a&&!t&&d.jsx("div",{className:"p-4",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}),l&&d.jsx("div",{className:"p-4",children:d.jsx("p",{className:"text-sm text-destructive",children:l})}),g.length===0&&!a&&d.jsx("div",{className:"p-4",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"No sources configured. Add paths in the onboarding wizard."})}),y?d.jsx(E4,{nodes:y.tree,selectedPath:u,onSelect:x}):!a&&g.length>0&&d.jsx("div",{className:"p-4",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Source not found"})})]}),d.jsx("div",{className:"flex-1 overflow-auto",children:d.jsx(A4,{content:r.content,loading:r.loading,error:r.error})})]})]})}function st(t){if(typeof t=="string"||typeof t=="number")return""+t;let a="";if(Array.isArray(t))for(let l=0,r;l<t.length;l++)(r=st(t[l]))!==""&&(a+=(a&&" ")+r);else for(let l in t)t[l]&&(a+=(a&&" ")+l);return a}var k4={value:()=>{}};function Oc(){for(var t=0,a=arguments.length,l={},r;t<a;++t){if(!(r=arguments[t]+"")||r in l||/[\s.]/.test(r))throw new Error("illegal type: "+r);l[r]=[]}return new tc(l)}function tc(t){this._=t}function D4(t,a){return t.trim().split(/^|\s+/).map(function(l){var r="",s=l.indexOf(".");if(s>=0&&(r=l.slice(s+1),l=l.slice(0,s)),l&&!a.hasOwnProperty(l))throw new Error("unknown type: "+l);return{type:l,name:r}})}tc.prototype=Oc.prototype={constructor:tc,on:function(t,a){var l=this._,r=D4(t+"",l),s,c=-1,u=r.length;if(arguments.length<2){for(;++c<u;)if((s=(t=r[c]).type)&&(s=L4(l[s],t.name)))return s;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++c<u;)if(s=(t=r[c]).type)l[s]=yx(l[s],t.name,a);else if(a==null)for(s in l)l[s]=yx(l[s],t.name,null);return this},copy:function(){var t={},a=this._;for(var l in a)t[l]=a[l].slice();return new tc(t)},call:function(t,a){if((s=arguments.length-2)>0)for(var l=new Array(s),r=0,s,c;r<s;++r)l[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(c=this._[t],r=0,s=c.length;r<s;++r)c[r].value.apply(a,l)},apply:function(t,a,l){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],s=0,c=r.length;s<c;++s)r[s].value.apply(a,l)}};function L4(t,a){for(var l=0,r=t.length,s;l<r;++l)if((s=t[l]).name===a)return s.value}function yx(t,a,l){for(var r=0,s=t.length;r<s;++r)if(t[r].name===a){t[r]=k4,t=t.slice(0,r).concat(t.slice(r+1));break}return l!=null&&t.push({name:a,value:l}),t}var Id="http://www.w3.org/1999/xhtml";const vx={svg:"http://www.w3.org/2000/svg",xhtml:Id,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Rc(t){var a=t+="",l=a.indexOf(":");return l>=0&&(a=t.slice(0,l))!=="xmlns"&&(t=t.slice(l+1)),vx.hasOwnProperty(a)?{space:vx[a],local:t}:t}function H4(t){return function(){var a=this.ownerDocument,l=this.namespaceURI;return l===Id&&a.documentElement.namespaceURI===Id?a.createElement(t):a.createElementNS(l,t)}}function B4(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Mv(t){var a=Rc(t);return(a.local?B4:H4)(a)}function U4(){}function zh(t){return t==null?U4:function(){return this.querySelector(t)}}function V4(t){typeof t!="function"&&(t=zh(t));for(var a=this._groups,l=a.length,r=new Array(l),s=0;s<l;++s)for(var c=a[s],u=c.length,h=r[s]=new Array(u),g,p,y=0;y<u;++y)(g=c[y])&&(p=t.call(g,g.__data__,y,c))&&("__data__"in g&&(p.__data__=g.__data__),h[y]=p);return new Ft(r,this._parents)}function $4(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Y4(){return[]}function zv(t){return t==null?Y4:function(){return this.querySelectorAll(t)}}function q4(t){return function(){return $4(t.apply(this,arguments))}}function X4(t){typeof t=="function"?t=q4(t):t=zv(t);for(var a=this._groups,l=a.length,r=[],s=[],c=0;c<l;++c)for(var u=a[c],h=u.length,g,p=0;p<h;++p)(g=u[p])&&(r.push(t.call(g,g.__data__,p,u)),s.push(g));return new Ft(r,s)}function Ov(t){return function(){return this.matches(t)}}function Rv(t){return function(a){return a.matches(t)}}var G4=Array.prototype.find;function Z4(t){return function(){return G4.call(this.children,t)}}function Q4(){return this.firstElementChild}function K4(t){return this.select(t==null?Q4:Z4(typeof t=="function"?t:Rv(t)))}var F4=Array.prototype.filter;function P4(){return Array.from(this.children)}function I4(t){return function(){return F4.call(this.children,t)}}function J4(t){return this.selectAll(t==null?P4:I4(typeof t=="function"?t:Rv(t)))}function W4(t){typeof t!="function"&&(t=Ov(t));for(var a=this._groups,l=a.length,r=new Array(l),s=0;s<l;++s)for(var c=a[s],u=c.length,h=r[s]=[],g,p=0;p<u;++p)(g=c[p])&&t.call(g,g.__data__,p,c)&&h.push(g);return new Ft(r,this._parents)}function kv(t){return new Array(t.length)}function e5(){return new Ft(this._enter||this._groups.map(kv),this._parents)}function dc(t,a){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=a}dc.prototype={constructor:dc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,a){return this._parent.insertBefore(t,a)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function t5(t){return function(){return t}}function n5(t,a,l,r,s,c){for(var u=0,h,g=a.length,p=c.length;u<p;++u)(h=a[u])?(h.__data__=c[u],r[u]=h):l[u]=new dc(t,c[u]);for(;u<g;++u)(h=a[u])&&(s[u]=h)}function a5(t,a,l,r,s,c,u){var h,g,p=new Map,y=a.length,x=c.length,v=new Array(y),w;for(h=0;h<y;++h)(g=a[h])&&(v[h]=w=u.call(g,g.__data__,h,a)+"",p.has(w)?s[h]=g:p.set(w,g));for(h=0;h<x;++h)w=u.call(t,c[h],h,c)+"",(g=p.get(w))?(r[h]=g,g.__data__=c[h],p.delete(w)):l[h]=new dc(t,c[h]);for(h=0;h<y;++h)(g=a[h])&&p.get(v[h])===g&&(s[h]=g)}function i5(t){return t.__data__}function l5(t,a){if(!arguments.length)return Array.from(this,i5);var l=a?a5:n5,r=this._parents,s=this._groups;typeof t!="function"&&(t=t5(t));for(var c=s.length,u=new Array(c),h=new Array(c),g=new Array(c),p=0;p<c;++p){var y=r[p],x=s[p],v=x.length,w=r5(t.call(y,y&&y.__data__,p,r)),S=w.length,N=h[p]=new Array(S),E=u[p]=new Array(S),_=g[p]=new Array(v);l(y,x,N,E,_,w,a);for(var k=0,j=0,C,D;k<S;++k)if(C=N[k]){for(k>=j&&(j=k+1);!(D=E[j])&&++j<S;);C._next=D||null}}return u=new Ft(u,r),u._enter=h,u._exit=g,u}function r5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function o5(){return new Ft(this._exit||this._groups.map(kv),this._parents)}function s5(t,a,l){var r=this.enter(),s=this,c=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),a!=null&&(s=a(s),s&&(s=s.selection())),l==null?c.remove():l(c),r&&s?r.merge(s).order():s}function c5(t){for(var a=t.selection?t.selection():t,l=this._groups,r=a._groups,s=l.length,c=r.length,u=Math.min(s,c),h=new Array(s),g=0;g<u;++g)for(var p=l[g],y=r[g],x=p.length,v=h[g]=new Array(x),w,S=0;S<x;++S)(w=p[S]||y[S])&&(v[S]=w);for(;g<s;++g)h[g]=l[g];return new Ft(h,this._parents)}function u5(){for(var t=this._groups,a=-1,l=t.length;++a<l;)for(var r=t[a],s=r.length-1,c=r[s],u;--s>=0;)(u=r[s])&&(c&&u.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(u,c),c=u);return this}function f5(t){t||(t=d5);function a(x,v){return x&&v?t(x.__data__,v.__data__):!x-!v}for(var l=this._groups,r=l.length,s=new Array(r),c=0;c<r;++c){for(var u=l[c],h=u.length,g=s[c]=new Array(h),p,y=0;y<h;++y)(p=u[y])&&(g[y]=p);g.sort(a)}return new Ft(s,this._parents).order()}function d5(t,a){return t<a?-1:t>a?1:t>=a?0:NaN}function h5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function m5(){return Array.from(this)}function p5(){for(var t=this._groups,a=0,l=t.length;a<l;++a)for(var r=t[a],s=0,c=r.length;s<c;++s){var u=r[s];if(u)return u}return null}function g5(){let t=0;for(const a of this)++t;return t}function x5(){return!this.node()}function y5(t){for(var a=this._groups,l=0,r=a.length;l<r;++l)for(var s=a[l],c=0,u=s.length,h;c<u;++c)(h=s[c])&&t.call(h,h.__data__,c,s);return this}function v5(t){return function(){this.removeAttribute(t)}}function b5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w5(t,a){return function(){this.setAttribute(t,a)}}function S5(t,a){return function(){this.setAttributeNS(t.space,t.local,a)}}function N5(t,a){return function(){var l=a.apply(this,arguments);l==null?this.removeAttribute(t):this.setAttribute(t,l)}}function E5(t,a){return function(){var l=a.apply(this,arguments);l==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,l)}}function j5(t,a){var l=Rc(t);if(arguments.length<2){var r=this.node();return l.local?r.getAttributeNS(l.space,l.local):r.getAttribute(l)}return this.each((a==null?l.local?b5:v5:typeof a=="function"?l.local?E5:N5:l.local?S5:w5)(l,a))}function Dv(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function _5(t){return function(){this.style.removeProperty(t)}}function A5(t,a,l){return function(){this.style.setProperty(t,a,l)}}function C5(t,a,l){return function(){var r=a.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,l)}}function T5(t,a,l){return arguments.length>1?this.each((a==null?_5:typeof a=="function"?C5:A5)(t,a,l??"")):zl(this.node(),t)}function zl(t,a){return t.style.getPropertyValue(a)||Dv(t).getComputedStyle(t,null).getPropertyValue(a)}function M5(t){return function(){delete this[t]}}function z5(t,a){return function(){this[t]=a}}function O5(t,a){return function(){var l=a.apply(this,arguments);l==null?delete this[t]:this[t]=l}}function R5(t,a){return arguments.length>1?this.each((a==null?M5:typeof a=="function"?O5:z5)(t,a)):this.node()[t]}function Lv(t){return t.trim().split(/^|\s+/)}function Oh(t){return t.classList||new Hv(t)}function Hv(t){this._node=t,this._names=Lv(t.getAttribute("class")||"")}Hv.prototype={add:function(t){var a=this._names.indexOf(t);a<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var a=this._names.indexOf(t);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Bv(t,a){for(var l=Oh(t),r=-1,s=a.length;++r<s;)l.add(a[r])}function Uv(t,a){for(var l=Oh(t),r=-1,s=a.length;++r<s;)l.remove(a[r])}function k5(t){return function(){Bv(this,t)}}function D5(t){return function(){Uv(this,t)}}function L5(t,a){return function(){(a.apply(this,arguments)?Bv:Uv)(this,t)}}function H5(t,a){var l=Lv(t+"");if(arguments.length<2){for(var r=Oh(this.node()),s=-1,c=l.length;++s<c;)if(!r.contains(l[s]))return!1;return!0}return this.each((typeof a=="function"?L5:a?k5:D5)(l,a))}function B5(){this.textContent=""}function U5(t){return function(){this.textContent=t}}function V5(t){return function(){var a=t.apply(this,arguments);this.textContent=a??""}}function $5(t){return arguments.length?this.each(t==null?B5:(typeof t=="function"?V5:U5)(t)):this.node().textContent}function Y5(){this.innerHTML=""}function q5(t){return function(){this.innerHTML=t}}function X5(t){return function(){var a=t.apply(this,arguments);this.innerHTML=a??""}}function G5(t){return arguments.length?this.each(t==null?Y5:(typeof t=="function"?X5:q5)(t)):this.node().innerHTML}function Z5(){this.nextSibling&&this.parentNode.appendChild(this)}function Q5(){return this.each(Z5)}function K5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function F5(){return this.each(K5)}function P5(t){var a=typeof t=="function"?t:Mv(t);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function I5(){return null}function J5(t,a){var l=typeof t=="function"?t:Mv(t),r=a==null?I5:typeof a=="function"?a:zh(a);return this.select(function(){return this.insertBefore(l.apply(this,arguments),r.apply(this,arguments)||null)})}function W5(){var t=this.parentNode;t&&t.removeChild(this)}function ej(){return this.each(W5)}function tj(){var t=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(t,this.nextSibling):t}function nj(){var t=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(t,this.nextSibling):t}function aj(t){return this.select(t?nj:tj)}function ij(t){return arguments.length?this.property("__data__",t):this.node().__data__}function lj(t){return function(a){t.call(this,a,this.__data__)}}function rj(t){return t.trim().split(/^|\s+/).map(function(a){var l="",r=a.indexOf(".");return r>=0&&(l=a.slice(r+1),a=a.slice(0,r)),{type:a,name:l}})}function oj(t){return function(){var a=this.__on;if(a){for(var l=0,r=-1,s=a.length,c;l<s;++l)c=a[l],(!t.type||c.type===t.type)&&c.name===t.name?this.removeEventListener(c.type,c.listener,c.options):a[++r]=c;++r?a.length=r:delete this.__on}}}function sj(t,a,l){return function(){var r=this.__on,s,c=lj(a);if(r){for(var u=0,h=r.length;u<h;++u)if((s=r[u]).type===t.type&&s.name===t.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=c,s.options=l),s.value=a;return}}this.addEventListener(t.type,c,l),s={type:t.type,name:t.name,value:a,listener:c,options:l},r?r.push(s):this.__on=[s]}}function cj(t,a,l){var r=rj(t+""),s,c=r.length,u;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,p=h.length,y;g<p;++g)for(s=0,y=h[g];s<c;++s)if((u=r[s]).type===y.type&&u.name===y.name)return y.value}return}for(h=a?sj:oj,s=0;s<c;++s)this.each(h(r[s],a,l));return this}function Vv(t,a,l){var r=Dv(t),s=r.CustomEvent;typeof s=="function"?s=new s(a,l):(s=r.document.createEvent("Event"),l?(s.initEvent(a,l.bubbles,l.cancelable),s.detail=l.detail):s.initEvent(a,!1,!1)),t.dispatchEvent(s)}function uj(t,a){return function(){return Vv(this,t,a)}}function fj(t,a){return function(){return Vv(this,t,a.apply(this,arguments))}}function dj(t,a){return this.each((typeof a=="function"?fj:uj)(t,a))}function*hj(){for(var t=this._groups,a=0,l=t.length;a<l;++a)for(var r=t[a],s=0,c=r.length,u;s<c;++s)(u=r[s])&&(yield u)}var $v=[null];function Ft(t,a){this._groups=t,this._parents=a}function oo(){return new Ft([[document.documentElement]],$v)}function mj(){return this}Ft.prototype=oo.prototype={constructor:Ft,select:V4,selectAll:X4,selectChild:K4,selectChildren:J4,filter:W4,data:l5,enter:e5,exit:o5,join:s5,merge:c5,selection:mj,order:u5,sort:f5,call:h5,nodes:m5,node:p5,size:g5,empty:x5,each:y5,attr:j5,style:T5,property:R5,classed:H5,text:$5,html:G5,raise:Q5,lower:F5,append:P5,insert:J5,remove:ej,clone:aj,datum:ij,on:cj,dispatch:dj,[Symbol.iterator]:hj};function Qt(t){return typeof t=="string"?new Ft([[document.querySelector(t)]],[document.documentElement]):new Ft([[t]],$v)}function pj(t){let a;for(;a=t.sourceEvent;)t=a;return t}function dn(t,a){if(t=pj(t),a===void 0&&(a=t.currentTarget),a){var l=a.ownerSVGElement||a;if(l.createSVGPoint){var r=l.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(a.getScreenCTM().inverse()),[r.x,r.y]}if(a.getBoundingClientRect){var s=a.getBoundingClientRect();return[t.clientX-s.left-a.clientLeft,t.clientY-s.top-a.clientTop]}}return[t.pageX,t.pageY]}const gj={passive:!1},Kr={capture:!0,passive:!1};function Ad(t){t.stopImmediatePropagation()}function Al(t){t.preventDefault(),t.stopImmediatePropagation()}function Yv(t){var a=t.document.documentElement,l=Qt(t).on("dragstart.drag",Al,Kr);"onselectstart"in a?l.on("selectstart.drag",Al,Kr):(a.__noselect=a.style.MozUserSelect,a.style.MozUserSelect="none")}function qv(t,a){var l=t.document.documentElement,r=Qt(t).on("dragstart.drag",null);a&&(r.on("click.drag",Al,Kr),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in l?r.on("selectstart.drag",null):(l.style.MozUserSelect=l.__noselect,delete l.__noselect)}const qs=t=>()=>t;function Jd(t,{sourceEvent:a,subject:l,target:r,identifier:s,active:c,x:u,y:h,dx:g,dy:p,dispatch:y}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},subject:{value:l,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:y}})}Jd.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function xj(t){return!t.ctrlKey&&!t.button}function yj(){return this.parentNode}function vj(t,a){return a??{x:t.x,y:t.y}}function bj(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xv(){var t=xj,a=yj,l=vj,r=bj,s={},c=Oc("start","drag","end"),u=0,h,g,p,y,x=0;function v(C){C.on("mousedown.drag",w).filter(r).on("touchstart.drag",E).on("touchmove.drag",_,gj).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(C,D){if(!(y||!t.call(this,C,D))){var z=j(this,a.call(this,C,D),C,D,"mouse");z&&(Qt(C.view).on("mousemove.drag",S,Kr).on("mouseup.drag",N,Kr),Yv(C.view),Ad(C),p=!1,h=C.clientX,g=C.clientY,z("start",C))}}function S(C){if(Al(C),!p){var D=C.clientX-h,z=C.clientY-g;p=D*D+z*z>x}s.mouse("drag",C)}function N(C){Qt(C.view).on("mousemove.drag mouseup.drag",null),qv(C.view,p),Al(C),s.mouse("end",C)}function E(C,D){if(t.call(this,C,D)){var z=C.changedTouches,O=a.call(this,C,D),H=z.length,Z,ne;for(Z=0;Z<H;++Z)(ne=j(this,O,C,D,z[Z].identifier,z[Z]))&&(Ad(C),ne("start",C,z[Z]))}}function _(C){var D=C.changedTouches,z=D.length,O,H;for(O=0;O<z;++O)(H=s[D[O].identifier])&&(Al(C),H("drag",C,D[O]))}function k(C){var D=C.changedTouches,z=D.length,O,H;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),O=0;O<z;++O)(H=s[D[O].identifier])&&(Ad(C),H("end",C,D[O]))}function j(C,D,z,O,H,Z){var ne=c.copy(),Q=dn(Z||z,D),K,te,L;if((L=l.call(C,new Jd("beforestart",{sourceEvent:z,target:v,identifier:H,active:u,x:Q[0],y:Q[1],dx:0,dy:0,dispatch:ne}),O))!=null)return K=L.x-Q[0]||0,te=L.y-Q[1]||0,function G(M,U,B){var Y=Q,q;switch(M){case"start":s[H]=G,q=u++;break;case"end":delete s[H],--u;case"drag":Q=dn(B||U,D),q=u;break}ne.call(M,C,new Jd(M,{sourceEvent:U,subject:L,target:v,identifier:H,active:q,x:Q[0]+K,y:Q[1]+te,dx:Q[0]-Y[0],dy:Q[1]-Y[1],dispatch:ne}),O)}}return v.filter=function(C){return arguments.length?(t=typeof C=="function"?C:qs(!!C),v):t},v.container=function(C){return arguments.length?(a=typeof C=="function"?C:qs(C),v):a},v.subject=function(C){return arguments.length?(l=typeof C=="function"?C:qs(C),v):l},v.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:qs(!!C),v):r},v.on=function(){var C=c.on.apply(c,arguments);return C===c?v:C},v.clickDistance=function(C){return arguments.length?(x=(C=+C)*C,v):Math.sqrt(x)},v}function Rh(t,a,l){t.prototype=a.prototype=l,l.constructor=t}function Gv(t,a){var l=Object.create(t.prototype);for(var r in a)l[r]=a[r];return l}function so(){}var Fr=.7,hc=1/Fr,Cl="\\s*([+-]?\\d+)\\s*",Pr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wj=/^#([0-9a-f]{3,8})$/,Sj=new RegExp(`^rgb\\(${Cl},${Cl},${Cl}\\)$`),Nj=new RegExp(`^rgb\\(${Tn},${Tn},${Tn}\\)$`),Ej=new RegExp(`^rgba\\(${Cl},${Cl},${Cl},${Pr}\\)$`),jj=new RegExp(`^rgba\\(${Tn},${Tn},${Tn},${Pr}\\)$`),_j=new RegExp(`^hsl\\(${Pr},${Tn},${Tn}\\)$`),Aj=new RegExp(`^hsla\\(${Pr},${Tn},${Tn},${Pr}\\)$`),bx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Rh(so,zi,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:wx,formatHex:wx,formatHex8:Cj,formatHsl:Tj,formatRgb:Sx,toString:Sx});function wx(){return this.rgb().formatHex()}function Cj(){return this.rgb().formatHex8()}function Tj(){return Zv(this).formatHsl()}function Sx(){return this.rgb().formatRgb()}function zi(t){var a,l;return t=(t+"").trim().toLowerCase(),(a=wj.exec(t))?(l=a[1].length,a=parseInt(a[1],16),l===6?Nx(a):l===3?new kt(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):l===8?Xs(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):l===4?Xs(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=Sj.exec(t))?new kt(a[1],a[2],a[3],1):(a=Nj.exec(t))?new kt(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=Ej.exec(t))?Xs(a[1],a[2],a[3],a[4]):(a=jj.exec(t))?Xs(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=_j.exec(t))?_x(a[1],a[2]/100,a[3]/100,1):(a=Aj.exec(t))?_x(a[1],a[2]/100,a[3]/100,a[4]):bx.hasOwnProperty(t)?Nx(bx[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function Nx(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function Xs(t,a,l,r){return r<=0&&(t=a=l=NaN),new kt(t,a,l,r)}function Mj(t){return t instanceof so||(t=zi(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function Wd(t,a,l,r){return arguments.length===1?Mj(t):new kt(t,a,l,r??1)}function kt(t,a,l,r){this.r=+t,this.g=+a,this.b=+l,this.opacity=+r}Rh(kt,Wd,Gv(so,{brighter(t){return t=t==null?hc:Math.pow(hc,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Fr:Math.pow(Fr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(Ci(this.r),Ci(this.g),Ci(this.b),mc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ex,formatHex:Ex,formatHex8:zj,formatRgb:jx,toString:jx}));function Ex(){return`#${Ai(this.r)}${Ai(this.g)}${Ai(this.b)}`}function zj(){return`#${Ai(this.r)}${Ai(this.g)}${Ai(this.b)}${Ai((isNaN(this.opacity)?1:this.opacity)*255)}`}function jx(){const t=mc(this.opacity);return`${t===1?"rgb(":"rgba("}${Ci(this.r)}, ${Ci(this.g)}, ${Ci(this.b)}${t===1?")":`, ${t})`}`}function mc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ci(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ai(t){return t=Ci(t),(t<16?"0":"")+t.toString(16)}function _x(t,a,l,r){return r<=0?t=a=l=NaN:l<=0||l>=1?t=a=NaN:a<=0&&(t=NaN),new hn(t,a,l,r)}function Zv(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);if(t instanceof so||(t=zi(t)),!t)return new hn;if(t instanceof hn)return t;t=t.rgb();var a=t.r/255,l=t.g/255,r=t.b/255,s=Math.min(a,l,r),c=Math.max(a,l,r),u=NaN,h=c-s,g=(c+s)/2;return h?(a===c?u=(l-r)/h+(l<r)*6:l===c?u=(r-a)/h+2:u=(a-l)/h+4,h/=g<.5?c+s:2-c-s,u*=60):h=g>0&&g<1?0:u,new hn(u,h,g,t.opacity)}function Oj(t,a,l,r){return arguments.length===1?Zv(t):new hn(t,a,l,r??1)}function hn(t,a,l,r){this.h=+t,this.s=+a,this.l=+l,this.opacity=+r}Rh(hn,Oj,Gv(so,{brighter(t){return t=t==null?hc:Math.pow(hc,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fr:Math.pow(Fr,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,a=isNaN(t)||isNaN(this.s)?0:this.s,l=this.l,r=l+(l<.5?l:1-l)*a,s=2*l-r;return new kt(Cd(t>=240?t-240:t+120,s,r),Cd(t,s,r),Cd(t<120?t+240:t-120,s,r),this.opacity)},clamp(){return new hn(Ax(this.h),Gs(this.s),Gs(this.l),mc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=mc(this.opacity);return`${t===1?"hsl(":"hsla("}${Ax(this.h)}, ${Gs(this.s)*100}%, ${Gs(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ax(t){return t=(t||0)%360,t<0?t+360:t}function Gs(t){return Math.max(0,Math.min(1,t||0))}function Cd(t,a,l){return(t<60?a+(l-a)*t/60:t<180?l:t<240?a+(l-a)*(240-t)/60:a)*255}const kh=t=>()=>t;function Rj(t,a){return function(l){return t+l*a}}function kj(t,a,l){return t=Math.pow(t,l),a=Math.pow(a,l)-t,l=1/l,function(r){return Math.pow(t+r*a,l)}}function Dj(t){return(t=+t)==1?Qv:function(a,l){return l-a?kj(a,l,t):kh(isNaN(a)?l:a)}}function Qv(t,a){var l=a-t;return l?Rj(t,l):kh(isNaN(t)?a:t)}const pc=(function t(a){var l=Dj(a);function r(s,c){var u=l((s=Wd(s)).r,(c=Wd(c)).r),h=l(s.g,c.g),g=l(s.b,c.b),p=Qv(s.opacity,c.opacity);return function(y){return s.r=u(y),s.g=h(y),s.b=g(y),s.opacity=p(y),s+""}}return r.gamma=t,r})(1);function Lj(t,a){a||(a=[]);var l=t?Math.min(a.length,t.length):0,r=a.slice(),s;return function(c){for(s=0;s<l;++s)r[s]=t[s]*(1-c)+a[s]*c;return r}}function Hj(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Bj(t,a){var l=a?a.length:0,r=t?Math.min(l,t.length):0,s=new Array(r),c=new Array(l),u;for(u=0;u<r;++u)s[u]=Gr(t[u],a[u]);for(;u<l;++u)c[u]=a[u];return function(h){for(u=0;u<r;++u)c[u]=s[u](h);return c}}function Uj(t,a){var l=new Date;return t=+t,a=+a,function(r){return l.setTime(t*(1-r)+a*r),l}}function _n(t,a){return t=+t,a=+a,function(l){return t*(1-l)+a*l}}function Vj(t,a){var l={},r={},s;(t===null||typeof t!="object")&&(t={}),(a===null||typeof a!="object")&&(a={});for(s in a)s in t?l[s]=Gr(t[s],a[s]):r[s]=a[s];return function(c){for(s in l)r[s]=l[s](c);return r}}var eh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Td=new RegExp(eh.source,"g");function $j(t){return function(){return t}}function Yj(t){return function(a){return t(a)+""}}function Kv(t,a){var l=eh.lastIndex=Td.lastIndex=0,r,s,c,u=-1,h=[],g=[];for(t=t+"",a=a+"";(r=eh.exec(t))&&(s=Td.exec(a));)(c=s.index)>l&&(c=a.slice(l,c),h[u]?h[u]+=c:h[++u]=c),(r=r[0])===(s=s[0])?h[u]?h[u]+=s:h[++u]=s:(h[++u]=null,g.push({i:u,x:_n(r,s)})),l=Td.lastIndex;return l<a.length&&(c=a.slice(l),h[u]?h[u]+=c:h[++u]=c),h.length<2?g[0]?Yj(g[0].x):$j(a):(a=g.length,function(p){for(var y=0,x;y<a;++y)h[(x=g[y]).i]=x.x(p);return h.join("")})}function Gr(t,a){var l=typeof a,r;return a==null||l==="boolean"?kh(a):(l==="number"?_n:l==="string"?(r=zi(a))?(a=r,pc):Kv:a instanceof zi?pc:a instanceof Date?Uj:Hj(a)?Lj:Array.isArray(a)?Bj:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?Vj:_n)(t,a)}var Cx=180/Math.PI,th={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fv(t,a,l,r,s,c){var u,h,g;return(u=Math.sqrt(t*t+a*a))&&(t/=u,a/=u),(g=t*l+a*r)&&(l-=t*g,r-=a*g),(h=Math.sqrt(l*l+r*r))&&(l/=h,r/=h,g/=h),t*r<a*l&&(t=-t,a=-a,g=-g,u=-u),{translateX:s,translateY:c,rotate:Math.atan2(a,t)*Cx,skewX:Math.atan(g)*Cx,scaleX:u,scaleY:h}}var Zs;function qj(t){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return a.isIdentity?th:Fv(a.a,a.b,a.c,a.d,a.e,a.f)}function Xj(t){return t==null||(Zs||(Zs=document.createElementNS("http://www.w3.org/2000/svg","g")),Zs.setAttribute("transform",t),!(t=Zs.transform.baseVal.consolidate()))?th:(t=t.matrix,Fv(t.a,t.b,t.c,t.d,t.e,t.f))}function Pv(t,a,l,r){function s(p){return p.length?p.pop()+" ":""}function c(p,y,x,v,w,S){if(p!==x||y!==v){var N=w.push("translate(",null,a,null,l);S.push({i:N-4,x:_n(p,x)},{i:N-2,x:_n(y,v)})}else(x||v)&&w.push("translate("+x+a+v+l)}function u(p,y,x,v){p!==y?(p-y>180?y+=360:y-p>180&&(p+=360),v.push({i:x.push(s(x)+"rotate(",null,r)-2,x:_n(p,y)})):y&&x.push(s(x)+"rotate("+y+r)}function h(p,y,x,v){p!==y?v.push({i:x.push(s(x)+"skewX(",null,r)-2,x:_n(p,y)}):y&&x.push(s(x)+"skewX("+y+r)}function g(p,y,x,v,w,S){if(p!==x||y!==v){var N=w.push(s(w)+"scale(",null,",",null,")");S.push({i:N-4,x:_n(p,x)},{i:N-2,x:_n(y,v)})}else(x!==1||v!==1)&&w.push(s(w)+"scale("+x+","+v+")")}return function(p,y){var x=[],v=[];return p=t(p),y=t(y),c(p.translateX,p.translateY,y.translateX,y.translateY,x,v),u(p.rotate,y.rotate,x,v),h(p.skewX,y.skewX,x,v),g(p.scaleX,p.scaleY,y.scaleX,y.scaleY,x,v),p=y=null,function(w){for(var S=-1,N=v.length,E;++S<N;)x[(E=v[S]).i]=E.x(w);return x.join("")}}}var Gj=Pv(qj,"px, ","px)","deg)"),Zj=Pv(Xj,", ",")",")"),Qj=1e-12;function Tx(t){return((t=Math.exp(t))+1/t)/2}function Kj(t){return((t=Math.exp(t))-1/t)/2}function Fj(t){return((t=Math.exp(2*t))-1)/(t+1)}const nc=(function t(a,l,r){function s(c,u){var h=c[0],g=c[1],p=c[2],y=u[0],x=u[1],v=u[2],w=y-h,S=x-g,N=w*w+S*S,E,_;if(N<Qj)_=Math.log(v/p)/a,E=function(O){return[h+O*w,g+O*S,p*Math.exp(a*O*_)]};else{var k=Math.sqrt(N),j=(v*v-p*p+r*N)/(2*p*l*k),C=(v*v-p*p-r*N)/(2*v*l*k),D=Math.log(Math.sqrt(j*j+1)-j),z=Math.log(Math.sqrt(C*C+1)-C);_=(z-D)/a,E=function(O){var H=O*_,Z=Tx(D),ne=p/(l*k)*(Z*Fj(a*H+D)-Kj(D));return[h+ne*w,g+ne*S,p*Z/Tx(a*H+D)]}}return E.duration=_*1e3*a/Math.SQRT2,E}return s.rho=function(c){var u=Math.max(.001,+c),h=u*u,g=h*h;return t(u,h,g)},s})(Math.SQRT2,2,4);var Ol=0,Yr=0,Vr=0,Iv=1e3,gc,qr,xc=0,Oi=0,kc=0,Ir=typeof performance=="object"&&performance.now?performance:Date,Jv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Dh(){return Oi||(Jv(Pj),Oi=Ir.now()+kc)}function Pj(){Oi=0}function yc(){this._call=this._time=this._next=null}yc.prototype=Wv.prototype={constructor:yc,restart:function(t,a,l){if(typeof t!="function")throw new TypeError("callback is not a function");l=(l==null?Dh():+l)+(a==null?0:+a),!this._next&&qr!==this&&(qr?qr._next=this:gc=this,qr=this),this._call=t,this._time=l,nh()},stop:function(){this._call&&(this._call=null,this._time=1/0,nh())}};function Wv(t,a,l){var r=new yc;return r.restart(t,a,l),r}function Ij(){Dh(),++Ol;for(var t=gc,a;t;)(a=Oi-t._time)>=0&&t._call.call(void 0,a),t=t._next;--Ol}function Mx(){Oi=(xc=Ir.now())+kc,Ol=Yr=0;try{Ij()}finally{Ol=0,Wj(),Oi=0}}function Jj(){var t=Ir.now(),a=t-xc;a>Iv&&(kc-=a,xc=t)}function Wj(){for(var t,a=gc,l,r=1/0;a;)a._call?(r>a._time&&(r=a._time),t=a,a=a._next):(l=a._next,a._next=null,a=t?t._next=l:gc=l);qr=t,nh(r)}function nh(t){if(!Ol){Yr&&(Yr=clearTimeout(Yr));var a=t-Oi;a>24?(t<1/0&&(Yr=setTimeout(Mx,t-Ir.now()-kc)),Vr&&(Vr=clearInterval(Vr))):(Vr||(xc=Ir.now(),Vr=setInterval(Jj,Iv)),Ol=1,Jv(Mx))}}function zx(t,a,l){var r=new yc;return a=a==null?0:+a,r.restart(s=>{r.stop(),t(s+a)},a,l),r}var e_=Oc("start","end","cancel","interrupt"),t_=[],e1=0,Ox=1,ah=2,ac=3,Rx=4,ih=5,ic=6;function Dc(t,a,l,r,s,c){var u=t.__transition;if(!u)t.__transition={};else if(l in u)return;n_(t,l,{name:a,index:r,group:s,on:e_,tween:t_,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:e1})}function Lh(t,a){var l=vn(t,a);if(l.state>e1)throw new Error("too late; already scheduled");return l}function Rn(t,a){var l=vn(t,a);if(l.state>ac)throw new Error("too late; already running");return l}function vn(t,a){var l=t.__transition;if(!l||!(l=l[a]))throw new Error("transition not found");return l}function n_(t,a,l){var r=t.__transition,s;r[a]=l,l.timer=Wv(c,0,l.time);function c(p){l.state=Ox,l.timer.restart(u,l.delay,l.time),l.delay<=p&&u(p-l.delay)}function u(p){var y,x,v,w;if(l.state!==Ox)return g();for(y in r)if(w=r[y],w.name===l.name){if(w.state===ac)return zx(u);w.state===Rx?(w.state=ic,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete r[y]):+y<a&&(w.state=ic,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete r[y])}if(zx(function(){l.state===ac&&(l.state=Rx,l.timer.restart(h,l.delay,l.time),h(p))}),l.state=ah,l.on.call("start",t,t.__data__,l.index,l.group),l.state===ah){for(l.state=ac,s=new Array(v=l.tween.length),y=0,x=-1;y<v;++y)(w=l.tween[y].value.call(t,t.__data__,l.index,l.group))&&(s[++x]=w);s.length=x+1}}function h(p){for(var y=p<l.duration?l.ease.call(null,p/l.duration):(l.timer.restart(g),l.state=ih,1),x=-1,v=s.length;++x<v;)s[x].call(t,y);l.state===ih&&(l.on.call("end",t,t.__data__,l.index,l.group),g())}function g(){l.state=ic,l.timer.stop(),delete r[a];for(var p in r)return;delete t.__transition}}function lc(t,a){var l=t.__transition,r,s,c=!0,u;if(l){a=a==null?null:a+"";for(u in l){if((r=l[u]).name!==a){c=!1;continue}s=r.state>ah&&r.state<ih,r.state=ic,r.timer.stop(),r.on.call(s?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete l[u]}c&&delete t.__transition}}function a_(t){return this.each(function(){lc(this,t)})}function i_(t,a){var l,r;return function(){var s=Rn(this,t),c=s.tween;if(c!==l){r=l=c;for(var u=0,h=r.length;u<h;++u)if(r[u].name===a){r=r.slice(),r.splice(u,1);break}}s.tween=r}}function l_(t,a,l){var r,s;if(typeof l!="function")throw new Error;return function(){var c=Rn(this,t),u=c.tween;if(u!==r){s=(r=u).slice();for(var h={name:a,value:l},g=0,p=s.length;g<p;++g)if(s[g].name===a){s[g]=h;break}g===p&&s.push(h)}c.tween=s}}function r_(t,a){var l=this._id;if(t+="",arguments.length<2){for(var r=vn(this.node(),l).tween,s=0,c=r.length,u;s<c;++s)if((u=r[s]).name===t)return u.value;return null}return this.each((a==null?i_:l_)(l,t,a))}function Hh(t,a,l){var r=t._id;return t.each(function(){var s=Rn(this,r);(s.value||(s.value={}))[a]=l.apply(this,arguments)}),function(s){return vn(s,r).value[a]}}function t1(t,a){var l;return(typeof a=="number"?_n:a instanceof zi?pc:(l=zi(a))?(a=l,pc):Kv)(t,a)}function o_(t){return function(){this.removeAttribute(t)}}function s_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function c_(t,a,l){var r,s=l+"",c;return function(){var u=this.getAttribute(t);return u===s?null:u===r?c:c=a(r=u,l)}}function u_(t,a,l){var r,s=l+"",c;return function(){var u=this.getAttributeNS(t.space,t.local);return u===s?null:u===r?c:c=a(r=u,l)}}function f_(t,a,l){var r,s,c;return function(){var u,h=l(this),g;return h==null?void this.removeAttribute(t):(u=this.getAttribute(t),g=h+"",u===g?null:u===r&&g===s?c:(s=g,c=a(r=u,h)))}}function d_(t,a,l){var r,s,c;return function(){var u,h=l(this),g;return h==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),g=h+"",u===g?null:u===r&&g===s?c:(s=g,c=a(r=u,h)))}}function h_(t,a){var l=Rc(t),r=l==="transform"?Zj:t1;return this.attrTween(t,typeof a=="function"?(l.local?d_:f_)(l,r,Hh(this,"attr."+t,a)):a==null?(l.local?s_:o_)(l):(l.local?u_:c_)(l,r,a))}function m_(t,a){return function(l){this.setAttribute(t,a.call(this,l))}}function p_(t,a){return function(l){this.setAttributeNS(t.space,t.local,a.call(this,l))}}function g_(t,a){var l,r;function s(){var c=a.apply(this,arguments);return c!==r&&(l=(r=c)&&p_(t,c)),l}return s._value=a,s}function x_(t,a){var l,r;function s(){var c=a.apply(this,arguments);return c!==r&&(l=(r=c)&&m_(t,c)),l}return s._value=a,s}function y_(t,a){var l="attr."+t;if(arguments.length<2)return(l=this.tween(l))&&l._value;if(a==null)return this.tween(l,null);if(typeof a!="function")throw new Error;var r=Rc(t);return this.tween(l,(r.local?g_:x_)(r,a))}function v_(t,a){return function(){Lh(this,t).delay=+a.apply(this,arguments)}}function b_(t,a){return a=+a,function(){Lh(this,t).delay=a}}function w_(t){var a=this._id;return arguments.length?this.each((typeof t=="function"?v_:b_)(a,t)):vn(this.node(),a).delay}function S_(t,a){return function(){Rn(this,t).duration=+a.apply(this,arguments)}}function N_(t,a){return a=+a,function(){Rn(this,t).duration=a}}function E_(t){var a=this._id;return arguments.length?this.each((typeof t=="function"?S_:N_)(a,t)):vn(this.node(),a).duration}function j_(t,a){if(typeof a!="function")throw new Error;return function(){Rn(this,t).ease=a}}function __(t){var a=this._id;return arguments.length?this.each(j_(a,t)):vn(this.node(),a).ease}function A_(t,a){return function(){var l=a.apply(this,arguments);if(typeof l!="function")throw new Error;Rn(this,t).ease=l}}function C_(t){if(typeof t!="function")throw new Error;return this.each(A_(this._id,t))}function T_(t){typeof t!="function"&&(t=Ov(t));for(var a=this._groups,l=a.length,r=new Array(l),s=0;s<l;++s)for(var c=a[s],u=c.length,h=r[s]=[],g,p=0;p<u;++p)(g=c[p])&&t.call(g,g.__data__,p,c)&&h.push(g);return new sa(r,this._parents,this._name,this._id)}function M_(t){if(t._id!==this._id)throw new Error;for(var a=this._groups,l=t._groups,r=a.length,s=l.length,c=Math.min(r,s),u=new Array(r),h=0;h<c;++h)for(var g=a[h],p=l[h],y=g.length,x=u[h]=new Array(y),v,w=0;w<y;++w)(v=g[w]||p[w])&&(x[w]=v);for(;h<r;++h)u[h]=a[h];return new sa(u,this._parents,this._name,this._id)}function z_(t){return(t+"").trim().split(/^|\s+/).every(function(a){var l=a.indexOf(".");return l>=0&&(a=a.slice(0,l)),!a||a==="start"})}function O_(t,a,l){var r,s,c=z_(a)?Lh:Rn;return function(){var u=c(this,t),h=u.on;h!==r&&(s=(r=h).copy()).on(a,l),u.on=s}}function R_(t,a){var l=this._id;return arguments.length<2?vn(this.node(),l).on.on(t):this.each(O_(l,t,a))}function k_(t){return function(){var a=this.parentNode;for(var l in this.__transition)if(+l!==t)return;a&&a.removeChild(this)}}function D_(){return this.on("end.remove",k_(this._id))}function L_(t){var a=this._name,l=this._id;typeof t!="function"&&(t=zh(t));for(var r=this._groups,s=r.length,c=new Array(s),u=0;u<s;++u)for(var h=r[u],g=h.length,p=c[u]=new Array(g),y,x,v=0;v<g;++v)(y=h[v])&&(x=t.call(y,y.__data__,v,h))&&("__data__"in y&&(x.__data__=y.__data__),p[v]=x,Dc(p[v],a,l,v,p,vn(y,l)));return new sa(c,this._parents,a,l)}function H_(t){var a=this._name,l=this._id;typeof t!="function"&&(t=zv(t));for(var r=this._groups,s=r.length,c=[],u=[],h=0;h<s;++h)for(var g=r[h],p=g.length,y,x=0;x<p;++x)if(y=g[x]){for(var v=t.call(y,y.__data__,x,g),w,S=vn(y,l),N=0,E=v.length;N<E;++N)(w=v[N])&&Dc(w,a,l,N,v,S);c.push(v),u.push(y)}return new sa(c,u,a,l)}var B_=oo.prototype.constructor;function U_(){return new B_(this._groups,this._parents)}function V_(t,a){var l,r,s;return function(){var c=zl(this,t),u=(this.style.removeProperty(t),zl(this,t));return c===u?null:c===l&&u===r?s:s=a(l=c,r=u)}}function n1(t){return function(){this.style.removeProperty(t)}}function $_(t,a,l){var r,s=l+"",c;return function(){var u=zl(this,t);return u===s?null:u===r?c:c=a(r=u,l)}}function Y_(t,a,l){var r,s,c;return function(){var u=zl(this,t),h=l(this),g=h+"";return h==null&&(g=h=(this.style.removeProperty(t),zl(this,t))),u===g?null:u===r&&g===s?c:(s=g,c=a(r=u,h))}}function q_(t,a){var l,r,s,c="style."+a,u="end."+c,h;return function(){var g=Rn(this,t),p=g.on,y=g.value[c]==null?h||(h=n1(a)):void 0;(p!==l||s!==y)&&(r=(l=p).copy()).on(u,s=y),g.on=r}}function X_(t,a,l){var r=(t+="")=="transform"?Gj:t1;return a==null?this.styleTween(t,V_(t,r)).on("end.style."+t,n1(t)):typeof a=="function"?this.styleTween(t,Y_(t,r,Hh(this,"style."+t,a))).each(q_(this._id,t)):this.styleTween(t,$_(t,r,a),l).on("end.style."+t,null)}function G_(t,a,l){return function(r){this.style.setProperty(t,a.call(this,r),l)}}function Z_(t,a,l){var r,s;function c(){var u=a.apply(this,arguments);return u!==s&&(r=(s=u)&&G_(t,u,l)),r}return c._value=a,c}function Q_(t,a,l){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(a==null)return this.tween(r,null);if(typeof a!="function")throw new Error;return this.tween(r,Z_(t,a,l??""))}function K_(t){return function(){this.textContent=t}}function F_(t){return function(){var a=t(this);this.textContent=a??""}}function P_(t){return this.tween("text",typeof t=="function"?F_(Hh(this,"text",t)):K_(t==null?"":t+""))}function I_(t){return function(a){this.textContent=t.call(this,a)}}function J_(t){var a,l;function r(){var s=t.apply(this,arguments);return s!==l&&(a=(l=s)&&I_(s)),a}return r._value=t,r}function W_(t){var a="text";if(arguments.length<1)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,J_(t))}function e3(){for(var t=this._name,a=this._id,l=a1(),r=this._groups,s=r.length,c=0;c<s;++c)for(var u=r[c],h=u.length,g,p=0;p<h;++p)if(g=u[p]){var y=vn(g,a);Dc(g,t,l,p,u,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new sa(r,this._parents,t,l)}function t3(){var t,a,l=this,r=l._id,s=l.size();return new Promise(function(c,u){var h={value:u},g={value:function(){--s===0&&c()}};l.each(function(){var p=Rn(this,r),y=p.on;y!==t&&(a=(t=y).copy(),a._.cancel.push(h),a._.interrupt.push(h),a._.end.push(g)),p.on=a}),s===0&&c()})}var n3=0;function sa(t,a,l,r){this._groups=t,this._parents=a,this._name=l,this._id=r}function a1(){return++n3}var la=oo.prototype;sa.prototype={constructor:sa,select:L_,selectAll:H_,selectChild:la.selectChild,selectChildren:la.selectChildren,filter:T_,merge:M_,selection:U_,transition:e3,call:la.call,nodes:la.nodes,node:la.node,size:la.size,empty:la.empty,each:la.each,on:R_,attr:h_,attrTween:y_,style:X_,styleTween:Q_,text:P_,textTween:W_,remove:D_,tween:r_,delay:w_,duration:E_,ease:__,easeVarying:C_,end:t3,[Symbol.iterator]:la[Symbol.iterator]};function a3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var i3={time:null,delay:0,duration:250,ease:a3};function l3(t,a){for(var l;!(l=t.__transition)||!(l=l[a]);)if(!(t=t.parentNode))throw new Error(`transition ${a} not found`);return l}function r3(t){var a,l;t instanceof sa?(a=t._id,t=t._name):(a=a1(),(l=i3).time=Dh(),t=t==null?null:t+"");for(var r=this._groups,s=r.length,c=0;c<s;++c)for(var u=r[c],h=u.length,g,p=0;p<h;++p)(g=u[p])&&Dc(g,t,a,p,u,l||l3(g,a));return new sa(r,this._parents,t,a)}oo.prototype.interrupt=a_;oo.prototype.transition=r3;const Qs=t=>()=>t;function o3(t,{sourceEvent:a,target:l,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function oa(t,a,l){this.k=t,this.x=a,this.y=l}oa.prototype={constructor:oa,scale:function(t){return t===1?this:new oa(this.k*t,this.x,this.y)},translate:function(t,a){return t===0&a===0?this:new oa(this.k,this.x+this.k*t,this.y+this.k*a)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Lc=new oa(1,0,0);i1.prototype=oa.prototype;function i1(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Lc;return t.__zoom}function Md(t){t.stopImmediatePropagation()}function $r(t){t.preventDefault(),t.stopImmediatePropagation()}function s3(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function c3(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function kx(){return this.__zoom||Lc}function u3(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function f3(){return navigator.maxTouchPoints||"ontouchstart"in this}function d3(t,a,l){var r=t.invertX(a[0][0])-l[0][0],s=t.invertX(a[1][0])-l[1][0],c=t.invertY(a[0][1])-l[0][1],u=t.invertY(a[1][1])-l[1][1];return t.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),u>c?(c+u)/2:Math.min(0,c)||Math.max(0,u))}function l1(){var t=s3,a=c3,l=d3,r=u3,s=f3,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],h=250,g=nc,p=Oc("start","zoom","end"),y,x,v,w=500,S=150,N=0,E=10;function _(L){L.property("__zoom",kx).on("wheel.zoom",H,{passive:!1}).on("mousedown.zoom",Z).on("dblclick.zoom",ne).filter(s).on("touchstart.zoom",Q).on("touchmove.zoom",K).on("touchend.zoom touchcancel.zoom",te).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(L,G,M,U){var B=L.selection?L.selection():L;B.property("__zoom",kx),L!==B?D(L,G,M,U):B.interrupt().each(function(){z(this,arguments).event(U).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},_.scaleBy=function(L,G,M,U){_.scaleTo(L,function(){var B=this.__zoom.k,Y=typeof G=="function"?G.apply(this,arguments):G;return B*Y},M,U)},_.scaleTo=function(L,G,M,U){_.transform(L,function(){var B=a.apply(this,arguments),Y=this.__zoom,q=M==null?C(B):typeof M=="function"?M.apply(this,arguments):M,R=Y.invert(q),V=typeof G=="function"?G.apply(this,arguments):G;return l(j(k(Y,V),q,R),B,u)},M,U)},_.translateBy=function(L,G,M,U){_.transform(L,function(){return l(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof M=="function"?M.apply(this,arguments):M),a.apply(this,arguments),u)},null,U)},_.translateTo=function(L,G,M,U,B){_.transform(L,function(){var Y=a.apply(this,arguments),q=this.__zoom,R=U==null?C(Y):typeof U=="function"?U.apply(this,arguments):U;return l(Lc.translate(R[0],R[1]).scale(q.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof M=="function"?-M.apply(this,arguments):-M),Y,u)},U,B)};function k(L,G){return G=Math.max(c[0],Math.min(c[1],G)),G===L.k?L:new oa(G,L.x,L.y)}function j(L,G,M){var U=G[0]-M[0]*L.k,B=G[1]-M[1]*L.k;return U===L.x&&B===L.y?L:new oa(L.k,U,B)}function C(L){return[(+L[0][0]+ +L[1][0])/2,(+L[0][1]+ +L[1][1])/2]}function D(L,G,M,U){L.on("start.zoom",function(){z(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(U).end()}).tween("zoom",function(){var B=this,Y=arguments,q=z(B,Y).event(U),R=a.apply(B,Y),V=M==null?C(R):typeof M=="function"?M.apply(B,Y):M,W=Math.max(R[1][0]-R[0][0],R[1][1]-R[0][1]),ae=B.__zoom,oe=typeof G=="function"?G.apply(B,Y):G,se=g(ae.invert(V).concat(W/ae.k),oe.invert(V).concat(W/oe.k));return function(fe){if(fe===1)fe=oe;else{var ce=se(fe),ue=W/ce[2];fe=new oa(ue,V[0]-ce[0]*ue,V[1]-ce[1]*ue)}q.zoom(null,fe)}})}function z(L,G,M){return!M&&L.__zooming||new O(L,G)}function O(L,G){this.that=L,this.args=G,this.active=0,this.sourceEvent=null,this.extent=a.apply(L,G),this.taps=0}O.prototype={event:function(L){return L&&(this.sourceEvent=L),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(L,G){return this.mouse&&L!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&L!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&L!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(L){var G=Qt(this.that).datum();p.call(L,this.that,new o3(L,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:p}),G)}};function H(L,...G){if(!t.apply(this,arguments))return;var M=z(this,G).event(L),U=this.__zoom,B=Math.max(c[0],Math.min(c[1],U.k*Math.pow(2,r.apply(this,arguments)))),Y=dn(L);if(M.wheel)(M.mouse[0][0]!==Y[0]||M.mouse[0][1]!==Y[1])&&(M.mouse[1]=U.invert(M.mouse[0]=Y)),clearTimeout(M.wheel);else{if(U.k===B)return;M.mouse=[Y,U.invert(Y)],lc(this),M.start()}$r(L),M.wheel=setTimeout(q,S),M.zoom("mouse",l(j(k(U,B),M.mouse[0],M.mouse[1]),M.extent,u));function q(){M.wheel=null,M.end()}}function Z(L,...G){if(v||!t.apply(this,arguments))return;var M=L.currentTarget,U=z(this,G,!0).event(L),B=Qt(L.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",W,!0),Y=dn(L,M),q=L.clientX,R=L.clientY;Yv(L.view),Md(L),U.mouse=[Y,this.__zoom.invert(Y)],lc(this),U.start();function V(ae){if($r(ae),!U.moved){var oe=ae.clientX-q,se=ae.clientY-R;U.moved=oe*oe+se*se>N}U.event(ae).zoom("mouse",l(j(U.that.__zoom,U.mouse[0]=dn(ae,M),U.mouse[1]),U.extent,u))}function W(ae){B.on("mousemove.zoom mouseup.zoom",null),qv(ae.view,U.moved),$r(ae),U.event(ae).end()}}function ne(L,...G){if(t.apply(this,arguments)){var M=this.__zoom,U=dn(L.changedTouches?L.changedTouches[0]:L,this),B=M.invert(U),Y=M.k*(L.shiftKey?.5:2),q=l(j(k(M,Y),U,B),a.apply(this,G),u);$r(L),h>0?Qt(this).transition().duration(h).call(D,q,U,L):Qt(this).call(_.transform,q,U,L)}}function Q(L,...G){if(t.apply(this,arguments)){var M=L.touches,U=M.length,B=z(this,G,L.changedTouches.length===U).event(L),Y,q,R,V;for(Md(L),q=0;q<U;++q)R=M[q],V=dn(R,this),V=[V,this.__zoom.invert(V),R.identifier],B.touch0?!B.touch1&&B.touch0[2]!==V[2]&&(B.touch1=V,B.taps=0):(B.touch0=V,Y=!0,B.taps=1+!!y);y&&(y=clearTimeout(y)),Y&&(B.taps<2&&(x=V[0],y=setTimeout(function(){y=null},w)),lc(this),B.start())}}function K(L,...G){if(this.__zooming){var M=z(this,G).event(L),U=L.changedTouches,B=U.length,Y,q,R,V;for($r(L),Y=0;Y<B;++Y)q=U[Y],R=dn(q,this),M.touch0&&M.touch0[2]===q.identifier?M.touch0[0]=R:M.touch1&&M.touch1[2]===q.identifier&&(M.touch1[0]=R);if(q=M.that.__zoom,M.touch1){var W=M.touch0[0],ae=M.touch0[1],oe=M.touch1[0],se=M.touch1[1],fe=(fe=oe[0]-W[0])*fe+(fe=oe[1]-W[1])*fe,ce=(ce=se[0]-ae[0])*ce+(ce=se[1]-ae[1])*ce;q=k(q,Math.sqrt(fe/ce)),R=[(W[0]+oe[0])/2,(W[1]+oe[1])/2],V=[(ae[0]+se[0])/2,(ae[1]+se[1])/2]}else if(M.touch0)R=M.touch0[0],V=M.touch0[1];else return;M.zoom("touch",l(j(q,R,V),M.extent,u))}}function te(L,...G){if(this.__zooming){var M=z(this,G).event(L),U=L.changedTouches,B=U.length,Y,q;for(Md(L),v&&clearTimeout(v),v=setTimeout(function(){v=null},w),Y=0;Y<B;++Y)q=U[Y],M.touch0&&M.touch0[2]===q.identifier?delete M.touch0:M.touch1&&M.touch1[2]===q.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(q=dn(q,this),Math.hypot(x[0]-q[0],x[1]-q[1])<E)){var R=Qt(this).on("dblclick.zoom");R&&R.apply(this,arguments)}}}return _.wheelDelta=function(L){return arguments.length?(r=typeof L=="function"?L:Qs(+L),_):r},_.filter=function(L){return arguments.length?(t=typeof L=="function"?L:Qs(!!L),_):t},_.touchable=function(L){return arguments.length?(s=typeof L=="function"?L:Qs(!!L),_):s},_.extent=function(L){return arguments.length?(a=typeof L=="function"?L:Qs([[+L[0][0],+L[0][1]],[+L[1][0],+L[1][1]]]),_):a},_.scaleExtent=function(L){return arguments.length?(c[0]=+L[0],c[1]=+L[1],_):[c[0],c[1]]},_.translateExtent=function(L){return arguments.length?(u[0][0]=+L[0][0],u[1][0]=+L[1][0],u[0][1]=+L[0][1],u[1][1]=+L[1][1],_):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},_.constrain=function(L){return arguments.length?(l=L,_):l},_.duration=function(L){return arguments.length?(h=+L,_):h},_.interpolate=function(L){return arguments.length?(g=L,_):g},_.on=function(){var L=p.on.apply(p,arguments);return L===p?_:L},_.clickDistance=function(L){return arguments.length?(N=(L=+L)*L,_):Math.sqrt(N)},_.tapDistance=function(L){return arguments.length?(E=+L,_):E},_}const zn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:a,sourceHandle:l,targetHandle:r})=>`Couldn't create edge for ${t} handle id: "${t==="source"?l:r}", edge id: ${a}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Jr=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],r1=["Enter"," ","Escape"],o1={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:a,y:l})=>`Moved selected node ${t}. New position, x: ${a}, y: ${l}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Rl;(function(t){t.Strict="strict",t.Loose="loose"})(Rl||(Rl={}));var Ti;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(Ti||(Ti={}));var Wr;(function(t){t.Partial="partial",t.Full="full"})(Wr||(Wr={}));const s1={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Za;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Za||(Za={}));var vc;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(vc||(vc={}));var ve;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(ve||(ve={}));const Dx={[ve.Left]:ve.Right,[ve.Right]:ve.Left,[ve.Top]:ve.Bottom,[ve.Bottom]:ve.Top};function c1(t){return t===null?null:t?"valid":"invalid"}const u1=t=>"id"in t&&"source"in t&&"target"in t,h3=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Bh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),co=(t,a=[0,0])=>{const{width:l,height:r}=fa(t),s=t.origin??a,c=l*s[0],u=r*s[1];return{x:t.position.x-c,y:t.position.y-u}},m3=(t,a={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const l=t.reduce((r,s)=>{const c=typeof s=="string";let u=!a.nodeLookup&&!c?s:void 0;a.nodeLookup&&(u=c?a.nodeLookup.get(s):Bh(s)?s:a.nodeLookup.get(s.id));const h=u?bc(u,a.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Hc(r,h)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Bc(l)},uo=(t,a={})=>{let l={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return t.forEach(s=>{(a.filter===void 0||a.filter(s))&&(l=Hc(l,bc(s)),r=!0)}),r?Bc(l):{x:0,y:0,width:0,height:0}},Uh=(t,a,[l,r,s]=[0,0,1],c=!1,u=!1)=>{const h={...ho(a,[l,r,s]),width:a.width/s,height:a.height/s},g=[];for(const p of t.values()){const{measured:y,selectable:x=!0,hidden:v=!1}=p;if(u&&!x||v)continue;const w=y.width??p.width??p.initialWidth??null,S=y.height??p.height??p.initialHeight??null,N=eo(h,Dl(p)),E=(w??0)*(S??0),_=c&&N>0;(!p.internals.handleBounds||_||N>=E||p.dragging)&&g.push(p)}return g},p3=(t,a)=>{const l=new Set;return t.forEach(r=>{l.add(r.id)}),a.filter(r=>l.has(r.source)||l.has(r.target))};function g3(t,a){const l=new Map,r=a!=null&&a.nodes?new Set(a.nodes.map(s=>s.id)):null;return t.forEach(s=>{s.measured.width&&s.measured.height&&((a==null?void 0:a.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&l.set(s.id,s)}),l}async function x3({nodes:t,width:a,height:l,panZoom:r,minZoom:s,maxZoom:c},u){if(t.size===0)return Promise.resolve(!0);const h=g3(t,u),g=uo(h),p=Vh(g,a,l,(u==null?void 0:u.minZoom)??s,(u==null?void 0:u.maxZoom)??c,(u==null?void 0:u.padding)??.1);return await r.setViewport(p,{duration:u==null?void 0:u.duration,ease:u==null?void 0:u.ease,interpolate:u==null?void 0:u.interpolate}),Promise.resolve(!0)}function f1({nodeId:t,nextPosition:a,nodeLookup:l,nodeOrigin:r=[0,0],nodeExtent:s,onError:c}){const u=l.get(t),h=u.parentId?l.get(u.parentId):void 0,{x:g,y:p}=h?h.internals.positionAbsolute:{x:0,y:0},y=u.origin??r;let x=u.extent||s;if(u.extent==="parent"&&!u.expandParent)if(!h)c==null||c("005",zn.error005());else{const w=h.measured.width,S=h.measured.height;w&&S&&(x=[[g,p],[g+w,p+S]])}else h&&Ll(u.extent)&&(x=[[u.extent[0][0]+g,u.extent[0][1]+p],[u.extent[1][0]+g,u.extent[1][1]+p]]);const v=Ll(x)?Ri(a,x,u.measured):a;return(u.measured.width===void 0||u.measured.height===void 0)&&(c==null||c("015",zn.error015())),{position:{x:v.x-g+(u.measured.width??0)*y[0],y:v.y-p+(u.measured.height??0)*y[1]},positionAbsolute:v}}async function y3({nodesToRemove:t=[],edgesToRemove:a=[],nodes:l,edges:r,onBeforeDelete:s}){const c=new Set(t.map(v=>v.id)),u=[];for(const v of l){if(v.deletable===!1)continue;const w=c.has(v.id),S=!w&&v.parentId&&u.find(N=>N.id===v.parentId);(w||S)&&u.push(v)}const h=new Set(a.map(v=>v.id)),g=r.filter(v=>v.deletable!==!1),y=p3(u,g);for(const v of g)h.has(v.id)&&!y.find(S=>S.id===v.id)&&y.push(v);if(!s)return{edges:y,nodes:u};const x=await s({nodes:u,edges:y});return typeof x=="boolean"?x?{edges:y,nodes:u}:{edges:[],nodes:[]}:x}const kl=(t,a=0,l=1)=>Math.min(Math.max(t,a),l),Ri=(t={x:0,y:0},a,l)=>({x:kl(t.x,a[0][0],a[1][0]-((l==null?void 0:l.width)??0)),y:kl(t.y,a[0][1],a[1][1]-((l==null?void 0:l.height)??0))});function d1(t,a,l){const{width:r,height:s}=fa(l),{x:c,y:u}=l.internals.positionAbsolute;return Ri(t,[[c,u],[c+r,u+s]],a)}const Lx=(t,a,l)=>t<a?kl(Math.abs(t-a),1,a)/a:t>l?-kl(Math.abs(t-l),1,a)/a:0,h1=(t,a,l=15,r=40)=>{const s=Lx(t.x,r,a.width-r)*l,c=Lx(t.y,r,a.height-r)*l;return[s,c]},Hc=(t,a)=>({x:Math.min(t.x,a.x),y:Math.min(t.y,a.y),x2:Math.max(t.x2,a.x2),y2:Math.max(t.y2,a.y2)}),lh=({x:t,y:a,width:l,height:r})=>({x:t,y:a,x2:t+l,y2:a+r}),Bc=({x:t,y:a,x2:l,y2:r})=>({x:t,y:a,width:l-t,height:r-a}),Dl=(t,a=[0,0])=>{var s,c;const{x:l,y:r}=Bh(t)?t.internals.positionAbsolute:co(t,a);return{x:l,y:r,width:((s=t.measured)==null?void 0:s.width)??t.width??t.initialWidth??0,height:((c=t.measured)==null?void 0:c.height)??t.height??t.initialHeight??0}},bc=(t,a=[0,0])=>{var s,c;const{x:l,y:r}=Bh(t)?t.internals.positionAbsolute:co(t,a);return{x:l,y:r,x2:l+(((s=t.measured)==null?void 0:s.width)??t.width??t.initialWidth??0),y2:r+(((c=t.measured)==null?void 0:c.height)??t.height??t.initialHeight??0)}},m1=(t,a)=>Bc(Hc(lh(t),lh(a))),eo=(t,a)=>{const l=Math.max(0,Math.min(t.x+t.width,a.x+a.width)-Math.max(t.x,a.x)),r=Math.max(0,Math.min(t.y+t.height,a.y+a.height)-Math.max(t.y,a.y));return Math.ceil(l*r)},Hx=t=>mn(t.width)&&mn(t.height)&&mn(t.x)&&mn(t.y),mn=t=>!isNaN(t)&&isFinite(t),v3=(t,a)=>{},fo=(t,a=[1,1])=>({x:a[0]*Math.round(t.x/a[0]),y:a[1]*Math.round(t.y/a[1])}),ho=({x:t,y:a},[l,r,s],c=!1,u=[1,1])=>{const h={x:(t-l)/s,y:(a-r)/s};return c?fo(h,u):h},wc=({x:t,y:a},[l,r,s])=>({x:t*s+l,y:a*s+r});function El(t,a){if(typeof t=="number")return Math.floor((a-a/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const l=parseFloat(t);if(!Number.isNaN(l))return Math.floor(l)}if(typeof t=="string"&&t.endsWith("%")){const l=parseFloat(t);if(!Number.isNaN(l))return Math.floor(a*l*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function b3(t,a,l){if(typeof t=="string"||typeof t=="number"){const r=El(t,l),s=El(t,a);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof t=="object"){const r=El(t.top??t.y??0,l),s=El(t.bottom??t.y??0,l),c=El(t.left??t.x??0,a),u=El(t.right??t.x??0,a);return{top:r,right:u,bottom:s,left:c,x:c+u,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function w3(t,a,l,r,s,c){const{x:u,y:h}=wc(t,[a,l,r]),{x:g,y:p}=wc({x:t.x+t.width,y:t.y+t.height},[a,l,r]),y=s-g,x=c-p;return{left:Math.floor(u),top:Math.floor(h),right:Math.floor(y),bottom:Math.floor(x)}}const Vh=(t,a,l,r,s,c)=>{const u=b3(c,a,l),h=(a-u.x)/t.width,g=(l-u.y)/t.height,p=Math.min(h,g),y=kl(p,r,s),x=t.x+t.width/2,v=t.y+t.height/2,w=a/2-x*y,S=l/2-v*y,N=w3(t,w,S,y,a,l),E={left:Math.min(N.left-u.left,0),top:Math.min(N.top-u.top,0),right:Math.min(N.right-u.right,0),bottom:Math.min(N.bottom-u.bottom,0)};return{x:w-E.left+E.right,y:S-E.top+E.bottom,zoom:y}},to=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function Ll(t){return t!=null&&t!=="parent"}function fa(t){var a,l;return{width:((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth??0,height:((l=t.measured)==null?void 0:l.height)??t.height??t.initialHeight??0}}function p1(t){var a,l;return(((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth)!==void 0&&(((l=t.measured)==null?void 0:l.height)??t.height??t.initialHeight)!==void 0}function g1(t,a={width:0,height:0},l,r,s){const c={...t},u=r.get(l);if(u){const h=u.origin||s;c.x+=u.internals.positionAbsolute.x-(a.width??0)*h[0],c.y+=u.internals.positionAbsolute.y-(a.height??0)*h[1]}return c}function Bx(t,a){if(t.size!==a.size)return!1;for(const l of t)if(!a.has(l))return!1;return!0}function S3(){let t,a;return{promise:new Promise((r,s)=>{t=r,a=s}),resolve:t,reject:a}}function N3(t){return{...o1,...t||{}}}function Zr(t,{snapGrid:a=[0,0],snapToGrid:l=!1,transform:r,containerBounds:s}){const{x:c,y:u}=pn(t),h=ho({x:c-((s==null?void 0:s.left)??0),y:u-((s==null?void 0:s.top)??0)},r),{x:g,y:p}=l?fo(h,a):h;return{xSnapped:g,ySnapped:p,...h}}const $h=t=>({width:t.offsetWidth,height:t.offsetHeight}),x1=t=>{var a;return((a=t==null?void 0:t.getRootNode)==null?void 0:a.call(t))||(window==null?void 0:window.document)},E3=["INPUT","SELECT","TEXTAREA"];function y1(t){var r,s;const a=((s=(r=t.composedPath)==null?void 0:r.call(t))==null?void 0:s[0])||t.target;return(a==null?void 0:a.nodeType)!==1?!1:E3.includes(a.nodeName)||a.hasAttribute("contenteditable")||!!a.closest(".nokey")}const v1=t=>"clientX"in t,pn=(t,a)=>{var c,u;const l=v1(t),r=l?t.clientX:(c=t.touches)==null?void 0:c[0].clientX,s=l?t.clientY:(u=t.touches)==null?void 0:u[0].clientY;return{x:r-((a==null?void 0:a.left)??0),y:s-((a==null?void 0:a.top)??0)}},Ux=(t,a,l,r,s)=>{const c=a.querySelectorAll(`.${t}`);return!c||!c.length?null:Array.from(c).map(u=>{const h=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:t,nodeId:s,position:u.getAttribute("data-handlepos"),x:(h.left-l.left)/r,y:(h.top-l.top)/r,...$h(u)}})};function b1({sourceX:t,sourceY:a,targetX:l,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:u,targetControlY:h}){const g=t*.125+s*.375+u*.375+l*.125,p=a*.125+c*.375+h*.375+r*.125,y=Math.abs(g-t),x=Math.abs(p-a);return[g,p,y,x]}function Ks(t,a){return t>=0?.5*t:a*25*Math.sqrt(-t)}function Vx({pos:t,x1:a,y1:l,x2:r,y2:s,c}){switch(t){case ve.Left:return[a-Ks(a-r,c),l];case ve.Right:return[a+Ks(r-a,c),l];case ve.Top:return[a,l-Ks(l-s,c)];case ve.Bottom:return[a,l+Ks(s-l,c)]}}function w1({sourceX:t,sourceY:a,sourcePosition:l=ve.Bottom,targetX:r,targetY:s,targetPosition:c=ve.Top,curvature:u=.25}){const[h,g]=Vx({pos:l,x1:t,y1:a,x2:r,y2:s,c:u}),[p,y]=Vx({pos:c,x1:r,y1:s,x2:t,y2:a,c:u}),[x,v,w,S]=b1({sourceX:t,sourceY:a,targetX:r,targetY:s,sourceControlX:h,sourceControlY:g,targetControlX:p,targetControlY:y});return[`M${t},${a} C${h},${g} ${p},${y} ${r},${s}`,x,v,w,S]}function S1({sourceX:t,sourceY:a,targetX:l,targetY:r}){const s=Math.abs(l-t)/2,c=l<t?l+s:l-s,u=Math.abs(r-a)/2,h=r<a?r+u:r-u;return[c,h,s,u]}function j3({sourceNode:t,targetNode:a,selected:l=!1,zIndex:r=0,elevateOnSelect:s=!1,zIndexMode:c="basic"}){if(c==="manual")return r;const u=s&&l?r+1e3:r,h=Math.max(t.parentId||s&&t.selected?t.internals.z:0,a.parentId||s&&a.selected?a.internals.z:0);return u+h}function _3({sourceNode:t,targetNode:a,width:l,height:r,transform:s}){const c=Hc(bc(t),bc(a));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u={x:-s[0]/s[2],y:-s[1]/s[2],width:l/s[2],height:r/s[2]};return eo(u,Bc(c))>0}const A3=({source:t,sourceHandle:a,target:l,targetHandle:r})=>`xy-edge__${t}${a||""}-${l}${r||""}`,C3=(t,a)=>a.some(l=>l.source===t.source&&l.target===t.target&&(l.sourceHandle===t.sourceHandle||!l.sourceHandle&&!t.sourceHandle)&&(l.targetHandle===t.targetHandle||!l.targetHandle&&!t.targetHandle)),T3=(t,a,l={})=>{if(!t.source||!t.target)return a;const r=l.getEdgeId||A3;let s;return u1(t)?s={...t}:s={...t,id:r(t)},C3(s,a)?a:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,a.concat(s))};function N1({sourceX:t,sourceY:a,targetX:l,targetY:r}){const[s,c,u,h]=S1({sourceX:t,sourceY:a,targetX:l,targetY:r});return[`M ${t},${a}L ${l},${r}`,s,c,u,h]}const $x={[ve.Left]:{x:-1,y:0},[ve.Right]:{x:1,y:0},[ve.Top]:{x:0,y:-1},[ve.Bottom]:{x:0,y:1}},M3=({source:t,sourcePosition:a=ve.Bottom,target:l})=>a===ve.Left||a===ve.Right?t.x<l.x?{x:1,y:0}:{x:-1,y:0}:t.y<l.y?{x:0,y:1}:{x:0,y:-1},Yx=(t,a)=>Math.sqrt(Math.pow(a.x-t.x,2)+Math.pow(a.y-t.y,2));function z3({source:t,sourcePosition:a=ve.Bottom,target:l,targetPosition:r=ve.Top,center:s,offset:c,stepPosition:u}){const h=$x[a],g=$x[r],p={x:t.x+h.x*c,y:t.y+h.y*c},y={x:l.x+g.x*c,y:l.y+g.y*c},x=M3({source:p,sourcePosition:a,target:y}),v=x.x!==0?"x":"y",w=x[v];let S=[],N,E;const _={x:0,y:0},k={x:0,y:0},[,,j,C]=S1({sourceX:t.x,sourceY:t.y,targetX:l.x,targetY:l.y});if(h[v]*g[v]===-1){v==="x"?(N=s.x??p.x+(y.x-p.x)*u,E=s.y??(p.y+y.y)/2):(N=s.x??(p.x+y.x)/2,E=s.y??p.y+(y.y-p.y)*u);const z=[{x:N,y:p.y},{x:N,y:y.y}],O=[{x:p.x,y:E},{x:y.x,y:E}];h[v]===w?S=v==="x"?z:O:S=v==="x"?O:z}else{const z=[{x:p.x,y:y.y}],O=[{x:y.x,y:p.y}];if(v==="x"?S=h.x===w?O:z:S=h.y===w?z:O,a===r){const K=Math.abs(t[v]-l[v]);if(K<=c){const te=Math.min(c-1,c-K);h[v]===w?_[v]=(p[v]>t[v]?-1:1)*te:k[v]=(y[v]>l[v]?-1:1)*te}}if(a!==r){const K=v==="x"?"y":"x",te=h[v]===g[K],L=p[K]>y[K],G=p[K]<y[K];(h[v]===1&&(!te&&L||te&&G)||h[v]!==1&&(!te&&G||te&&L))&&(S=v==="x"?z:O)}const H={x:p.x+_.x,y:p.y+_.y},Z={x:y.x+k.x,y:y.y+k.y},ne=Math.max(Math.abs(H.x-S[0].x),Math.abs(Z.x-S[0].x)),Q=Math.max(Math.abs(H.y-S[0].y),Math.abs(Z.y-S[0].y));ne>=Q?(N=(H.x+Z.x)/2,E=S[0].y):(N=S[0].x,E=(H.y+Z.y)/2)}return[[t,{x:p.x+_.x,y:p.y+_.y},...S,{x:y.x+k.x,y:y.y+k.y},l],N,E,j,C]}function O3(t,a,l,r){const s=Math.min(Yx(t,a)/2,Yx(a,l)/2,r),{x:c,y:u}=a;if(t.x===c&&c===l.x||t.y===u&&u===l.y)return`L${c} ${u}`;if(t.y===u){const p=t.x<l.x?-1:1,y=t.y<l.y?1:-1;return`L ${c+s*p},${u}Q ${c},${u} ${c},${u+s*y}`}const h=t.x<l.x?1:-1,g=t.y<l.y?-1:1;return`L ${c},${u+s*g}Q ${c},${u} ${c+s*h},${u}`}function rh({sourceX:t,sourceY:a,sourcePosition:l=ve.Bottom,targetX:r,targetY:s,targetPosition:c=ve.Top,borderRadius:u=5,centerX:h,centerY:g,offset:p=20,stepPosition:y=.5}){const[x,v,w,S,N]=z3({source:{x:t,y:a},sourcePosition:l,target:{x:r,y:s},targetPosition:c,center:{x:h,y:g},offset:p,stepPosition:y});return[x.reduce((_,k,j)=>{let C="";return j>0&&j<x.length-1?C=O3(x[j-1],k,x[j+1],u):C=`${j===0?"M":"L"}${k.x} ${k.y}`,_+=C,_},""),v,w,S,N]}function qx(t){var a;return t&&!!(t.internals.handleBounds||(a=t.handles)!=null&&a.length)&&!!(t.measured.width||t.width||t.initialWidth)}function R3(t){var x;const{sourceNode:a,targetNode:l}=t;if(!qx(a)||!qx(l))return null;const r=a.internals.handleBounds||Xx(a.handles),s=l.internals.handleBounds||Xx(l.handles),c=Gx((r==null?void 0:r.source)??[],t.sourceHandle),u=Gx(t.connectionMode===Rl.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),t.targetHandle);if(!c||!u)return(x=t.onError)==null||x.call(t,"008",zn.error008(c?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const h=(c==null?void 0:c.position)||ve.Bottom,g=(u==null?void 0:u.position)||ve.Top,p=ki(a,c,h),y=ki(l,u,g);return{sourceX:p.x,sourceY:p.y,targetX:y.x,targetY:y.y,sourcePosition:h,targetPosition:g}}function Xx(t){if(!t)return null;const a=[],l=[];for(const r of t)r.width=r.width??1,r.height=r.height??1,r.type==="source"?a.push(r):r.type==="target"&&l.push(r);return{source:a,target:l}}function ki(t,a,l=ve.Left,r=!1){const s=((a==null?void 0:a.x)??0)+t.internals.positionAbsolute.x,c=((a==null?void 0:a.y)??0)+t.internals.positionAbsolute.y,{width:u,height:h}=a??fa(t);if(r)return{x:s+u/2,y:c+h/2};switch((a==null?void 0:a.position)??l){case ve.Top:return{x:s+u/2,y:c};case ve.Right:return{x:s+u,y:c+h/2};case ve.Bottom:return{x:s+u/2,y:c+h};case ve.Left:return{x:s,y:c+h/2}}}function Gx(t,a){return t&&(a?t.find(l=>l.id===a):t[0])||null}function oh(t,a){return t?typeof t=="string"?t:`${a?`${a}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`:""}function k3(t,{id:a,defaultColor:l,defaultMarkerStart:r,defaultMarkerEnd:s}){const c=new Set;return t.reduce((u,h)=>([h.markerStart||r,h.markerEnd||s].forEach(g=>{if(g&&typeof g=="object"){const p=oh(g,a);c.has(p)||(u.push({id:p,color:g.color||l,...g}),c.add(p))}}),u),[]).sort((u,h)=>u.id.localeCompare(h.id))}const E1=1e3,D3=10,Yh={nodeOrigin:[0,0],nodeExtent:Jr,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},L3={...Yh,checkEquality:!0};function qh(t,a){const l={...t};for(const r in a)a[r]!==void 0&&(l[r]=a[r]);return l}function H3(t,a,l){const r=qh(Yh,l);for(const s of t.values())if(s.parentId)Gh(s,t,a,r);else{const c=co(s,r.nodeOrigin),u=Ll(s.extent)?s.extent:r.nodeExtent,h=Ri(c,u,fa(s));s.internals.positionAbsolute=h}}function B3(t,a){if(!t.handles)return t.measured?a==null?void 0:a.internals.handleBounds:void 0;const l=[],r=[];for(const s of t.handles){const c={id:s.id,width:s.width??1,height:s.height??1,nodeId:t.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?l.push(c):s.type==="target"&&r.push(c)}return{source:l,target:r}}function Xh(t){return t==="manual"}function sh(t,a,l,r={}){var p,y;const s=qh(L3,r),c={i:0},u=new Map(a),h=s!=null&&s.elevateNodesOnSelect&&!Xh(s.zIndexMode)?E1:0;let g=t.length>0;a.clear(),l.clear();for(const x of t){let v=u.get(x.id);if(s.checkEquality&&x===(v==null?void 0:v.internals.userNode))a.set(x.id,v);else{const w=co(x,s.nodeOrigin),S=Ll(x.extent)?x.extent:s.nodeExtent,N=Ri(w,S,fa(x));v={...s.defaults,...x,measured:{width:(p=x.measured)==null?void 0:p.width,height:(y=x.measured)==null?void 0:y.height},internals:{positionAbsolute:N,handleBounds:B3(x,v),z:j1(x,h,s.zIndexMode),userNode:x}},a.set(x.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(g=!1),x.parentId&&Gh(v,a,l,r,c)}return g}function U3(t,a){if(!t.parentId)return;const l=a.get(t.parentId);l?l.set(t.id,t):a.set(t.parentId,new Map([[t.id,t]]))}function Gh(t,a,l,r,s){const{elevateNodesOnSelect:c,nodeOrigin:u,nodeExtent:h,zIndexMode:g}=qh(Yh,r),p=t.parentId,y=a.get(p);if(!y){console.warn(`Parent node ${p} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}U3(t,l),s&&!y.parentId&&y.internals.rootParentIndex===void 0&&g==="auto"&&(y.internals.rootParentIndex=++s.i,y.internals.z=y.internals.z+s.i*D3),s&&y.internals.rootParentIndex!==void 0&&(s.i=y.internals.rootParentIndex);const x=c&&!Xh(g)?E1:0,{x:v,y:w,z:S}=V3(t,y,u,h,x,g),{positionAbsolute:N}=t.internals,E=v!==N.x||w!==N.y;(E||S!==t.internals.z)&&a.set(t.id,{...t,internals:{...t.internals,positionAbsolute:E?{x:v,y:w}:N,z:S}})}function j1(t,a,l){const r=mn(t.zIndex)?t.zIndex:0;return Xh(l)?r:r+(t.selected?a:0)}function V3(t,a,l,r,s,c){const{x:u,y:h}=a.internals.positionAbsolute,g=fa(t),p=co(t,l),y=Ll(t.extent)?Ri(p,t.extent,g):p;let x=Ri({x:u+y.x,y:h+y.y},r,g);t.extent==="parent"&&(x=d1(x,g,a));const v=j1(t,s,c),w=a.internals.z??0;return{x:x.x,y:x.y,z:w>=v?w+1:v}}function Zh(t,a,l,r=[0,0]){var u;const s=[],c=new Map;for(const h of t){const g=a.get(h.parentId);if(!g)continue;const p=((u=c.get(h.parentId))==null?void 0:u.expandedRect)??Dl(g),y=m1(p,h.rect);c.set(h.parentId,{expandedRect:y,parent:g})}return c.size>0&&c.forEach(({expandedRect:h,parent:g},p)=>{var j;const y=g.internals.positionAbsolute,x=fa(g),v=g.origin??r,w=h.x<y.x?Math.round(Math.abs(y.x-h.x)):0,S=h.y<y.y?Math.round(Math.abs(y.y-h.y)):0,N=Math.max(x.width,Math.round(h.width)),E=Math.max(x.height,Math.round(h.height)),_=(N-x.width)*v[0],k=(E-x.height)*v[1];(w>0||S>0||_||k)&&(s.push({id:p,type:"position",position:{x:g.position.x-w+_,y:g.position.y-S+k}}),(j=l.get(p))==null||j.forEach(C=>{t.some(D=>D.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+w,y:C.position.y+S}})})),(x.width<h.width||x.height<h.height||w||S)&&s.push({id:p,type:"dimensions",setAttributes:!0,dimensions:{width:N+(w?v[0]*w-_:0),height:E+(S?v[1]*S-k:0)}})}),s}function $3(t,a,l,r,s,c,u){const h=r==null?void 0:r.querySelector(".xyflow__viewport");let g=!1;if(!h)return{changes:[],updatedInternals:g};const p=[],y=window.getComputedStyle(h),{m22:x}=new window.DOMMatrixReadOnly(y.transform),v=[];for(const w of t.values()){const S=a.get(w.id);if(!S)continue;if(S.hidden){a.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),g=!0;continue}const N=$h(w.nodeElement),E=S.measured.width!==N.width||S.measured.height!==N.height;if(!!(N.width&&N.height&&(E||!S.internals.handleBounds||w.force))){const k=w.nodeElement.getBoundingClientRect(),j=Ll(S.extent)?S.extent:c;let{positionAbsolute:C}=S.internals;S.parentId&&S.extent==="parent"?C=d1(C,N,a.get(S.parentId)):j&&(C=Ri(C,j,N));const D={...S,measured:N,internals:{...S.internals,positionAbsolute:C,handleBounds:{source:Ux("source",w.nodeElement,k,x,S.id),target:Ux("target",w.nodeElement,k,x,S.id)}}};a.set(S.id,D),S.parentId&&Gh(D,a,l,{nodeOrigin:s,zIndexMode:u}),g=!0,E&&(p.push({id:S.id,type:"dimensions",dimensions:N}),S.expandParent&&S.parentId&&v.push({id:S.id,parentId:S.parentId,rect:Dl(D,s)}))}}if(v.length>0){const w=Zh(v,a,l,s);p.push(...w)}return{changes:p,updatedInternals:g}}async function Y3({delta:t,panZoom:a,transform:l,translateExtent:r,width:s,height:c}){if(!a||!t.x&&!t.y)return Promise.resolve(!1);const u=await a.setViewportConstrained({x:l[0]+t.x,y:l[1]+t.y,zoom:l[2]},[[0,0],[s,c]],r),h=!!u&&(u.x!==l[0]||u.y!==l[1]||u.k!==l[2]);return Promise.resolve(h)}function Zx(t,a,l,r,s,c){let u=s;const h=r.get(u)||new Map;r.set(u,h.set(l,a)),u=`${s}-${t}`;const g=r.get(u)||new Map;if(r.set(u,g.set(l,a)),c){u=`${s}-${t}-${c}`;const p=r.get(u)||new Map;r.set(u,p.set(l,a))}}function _1(t,a,l){t.clear(),a.clear();for(const r of l){const{source:s,target:c,sourceHandle:u=null,targetHandle:h=null}=r,g={edgeId:r.id,source:s,target:c,sourceHandle:u,targetHandle:h},p=`${s}-${u}--${c}-${h}`,y=`${c}-${h}--${s}-${u}`;Zx("source",g,y,t,s,u),Zx("target",g,p,t,c,h),a.set(r.id,r)}}function A1(t,a){if(!t.parentId)return!1;const l=a.get(t.parentId);return l?l.selected?!0:A1(l,a):!1}function Qx(t,a,l){var s;let r=t;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,a))return!0;if(r===l)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function q3(t,a,l,r){const s=new Map;for(const[c,u]of t)if((u.selected||u.id===r)&&(!u.parentId||!A1(u,t))&&(u.draggable||a&&typeof u.draggable>"u")){const h=t.get(c);h&&s.set(c,{id:c,position:h.position||{x:0,y:0},distance:{x:l.x-h.internals.positionAbsolute.x,y:l.y-h.internals.positionAbsolute.y},extent:h.extent,parentId:h.parentId,origin:h.origin,expandParent:h.expandParent,internals:{positionAbsolute:h.internals.positionAbsolute||{x:0,y:0}},measured:{width:h.measured.width??0,height:h.measured.height??0}})}return s}function zd({nodeId:t,dragItems:a,nodeLookup:l,dragging:r=!0}){var u,h,g;const s=[];for(const[p,y]of a){const x=(u=l.get(p))==null?void 0:u.internals.userNode;x&&s.push({...x,position:y.position,dragging:r})}if(!t)return[s[0],s];const c=(h=l.get(t))==null?void 0:h.internals.userNode;return[c?{...c,position:((g=a.get(t))==null?void 0:g.position)||c.position,dragging:r}:s[0],s]}function X3({dragItems:t,snapGrid:a,x:l,y:r}){const s=t.values().next().value;if(!s)return null;const c={x:l-s.distance.x,y:r-s.distance.y},u=fo(c,a);return{x:u.x-c.x,y:u.y-c.y}}function G3({onNodeMouseDown:t,getStoreItems:a,onDragStart:l,onDrag:r,onDragStop:s}){let c={x:null,y:null},u=0,h=new Map,g=!1,p={x:0,y:0},y=null,x=!1,v=null,w=!1,S=!1,N=null;function E({noDragClassName:k,handleSelector:j,domNode:C,isSelectable:D,nodeId:z,nodeClickDistance:O=0}){v=Qt(C);function H({x:K,y:te}){const{nodeLookup:L,nodeExtent:G,snapGrid:M,snapToGrid:U,nodeOrigin:B,onNodeDrag:Y,onSelectionDrag:q,onError:R,updateNodePositions:V}=a();c={x:K,y:te};let W=!1;const ae=h.size>1,oe=ae&&G?lh(uo(h)):null,se=ae&&U?X3({dragItems:h,snapGrid:M,x:K,y:te}):null;for(const[fe,ce]of h){if(!L.has(fe))continue;let ue={x:K-ce.distance.x,y:te-ce.distance.y};U&&(ue=se?{x:Math.round(ue.x+se.x),y:Math.round(ue.y+se.y)}:fo(ue,M));let Ee=null;if(ae&&G&&!ce.extent&&oe){const{positionAbsolute:me}=ce.internals,je=me.x-oe.x+G[0][0],Ue=me.x+ce.measured.width-oe.x2+G[1][0],Me=me.y-oe.y+G[0][1],nt=me.y+ce.measured.height-oe.y2+G[1][1];Ee=[[je,Me],[Ue,nt]]}const{position:ye,positionAbsolute:xe}=f1({nodeId:fe,nextPosition:ue,nodeLookup:L,nodeExtent:Ee||G,nodeOrigin:B,onError:R});W=W||ce.position.x!==ye.x||ce.position.y!==ye.y,ce.position=ye,ce.internals.positionAbsolute=xe}if(S=S||W,!!W&&(V(h,!0),N&&(r||Y||!z&&q))){const[fe,ce]=zd({nodeId:z,dragItems:h,nodeLookup:L});r==null||r(N,h,fe,ce),Y==null||Y(N,fe,ce),z||q==null||q(N,ce)}}async function Z(){if(!y)return;const{transform:K,panBy:te,autoPanSpeed:L,autoPanOnNodeDrag:G}=a();if(!G){g=!1,cancelAnimationFrame(u);return}const[M,U]=h1(p,y,L);(M!==0||U!==0)&&(c.x=(c.x??0)-M/K[2],c.y=(c.y??0)-U/K[2],await te({x:M,y:U})&&H(c)),u=requestAnimationFrame(Z)}function ne(K){var ae;const{nodeLookup:te,multiSelectionActive:L,nodesDraggable:G,transform:M,snapGrid:U,snapToGrid:B,selectNodesOnDrag:Y,onNodeDragStart:q,onSelectionDragStart:R,unselectNodesAndEdges:V}=a();x=!0,(!Y||!D)&&!L&&z&&((ae=te.get(z))!=null&&ae.selected||V()),D&&Y&&z&&(t==null||t(z));const W=Zr(K.sourceEvent,{transform:M,snapGrid:U,snapToGrid:B,containerBounds:y});if(c=W,h=q3(te,G,W,z),h.size>0&&(l||q||!z&&R)){const[oe,se]=zd({nodeId:z,dragItems:h,nodeLookup:te});l==null||l(K.sourceEvent,h,oe,se),q==null||q(K.sourceEvent,oe,se),z||R==null||R(K.sourceEvent,se)}}const Q=Xv().clickDistance(O).on("start",K=>{const{domNode:te,nodeDragThreshold:L,transform:G,snapGrid:M,snapToGrid:U}=a();y=(te==null?void 0:te.getBoundingClientRect())||null,w=!1,S=!1,N=K.sourceEvent,L===0&&ne(K),c=Zr(K.sourceEvent,{transform:G,snapGrid:M,snapToGrid:U,containerBounds:y}),p=pn(K.sourceEvent,y)}).on("drag",K=>{const{autoPanOnNodeDrag:te,transform:L,snapGrid:G,snapToGrid:M,nodeDragThreshold:U,nodeLookup:B}=a(),Y=Zr(K.sourceEvent,{transform:L,snapGrid:G,snapToGrid:M,containerBounds:y});if(N=K.sourceEvent,(K.sourceEvent.type==="touchmove"&&K.sourceEvent.touches.length>1||z&&!B.has(z))&&(w=!0),!w){if(!g&&te&&x&&(g=!0,Z()),!x){const q=pn(K.sourceEvent,y),R=q.x-p.x,V=q.y-p.y;Math.sqrt(R*R+V*V)>U&&ne(K)}(c.x!==Y.xSnapped||c.y!==Y.ySnapped)&&h&&x&&(p=pn(K.sourceEvent,y),H(Y))}}).on("end",K=>{if(!(!x||w)&&(g=!1,x=!1,cancelAnimationFrame(u),h.size>0)){const{nodeLookup:te,updateNodePositions:L,onNodeDragStop:G,onSelectionDragStop:M}=a();if(S&&(L(h,!1),S=!1),s||G||!z&&M){const[U,B]=zd({nodeId:z,dragItems:h,nodeLookup:te,dragging:!1});s==null||s(K.sourceEvent,h,U,B),G==null||G(K.sourceEvent,U,B),z||M==null||M(K.sourceEvent,B)}}}).filter(K=>{const te=K.target;return!K.button&&(!k||!Qx(te,`.${k}`,C))&&(!j||Qx(te,j,C))});v.call(Q)}function _(){v==null||v.on(".drag",null)}return{update:E,destroy:_}}function Z3(t,a,l){const r=[],s={x:t.x-l,y:t.y-l,width:l*2,height:l*2};for(const c of a.values())eo(s,Dl(c))>0&&r.push(c);return r}const Q3=250;function K3(t,a,l,r){var h,g;let s=[],c=1/0;const u=Z3(t,l,a+Q3);for(const p of u){const y=[...((h=p.internals.handleBounds)==null?void 0:h.source)??[],...((g=p.internals.handleBounds)==null?void 0:g.target)??[]];for(const x of y){if(r.nodeId===x.nodeId&&r.type===x.type&&r.id===x.id)continue;const{x:v,y:w}=ki(p,x,x.position,!0),S=Math.sqrt(Math.pow(v-t.x,2)+Math.pow(w-t.y,2));S>a||(S<c?(s=[{...x,x:v,y:w}],c=S):S===c&&s.push({...x,x:v,y:w}))}}if(!s.length)return null;if(s.length>1){const p=r.type==="source"?"target":"source";return s.find(y=>y.type===p)??s[0]}return s[0]}function C1(t,a,l,r,s,c=!1){var p,y,x;const u=r.get(t);if(!u)return null;const h=s==="strict"?(p=u.internals.handleBounds)==null?void 0:p[a]:[...((y=u.internals.handleBounds)==null?void 0:y.source)??[],...((x=u.internals.handleBounds)==null?void 0:x.target)??[]],g=(l?h==null?void 0:h.find(v=>v.id===l):h==null?void 0:h[0])??null;return g&&c?{...g,...ki(u,g,g.position,!0)}:g}function T1(t,a){return t||(a!=null&&a.classList.contains("target")?"target":a!=null&&a.classList.contains("source")?"source":null)}function F3(t,a){let l=null;return a?l=!0:t&&!a&&(l=!1),l}const M1=()=>!0;function P3(t,{connectionMode:a,connectionRadius:l,handleId:r,nodeId:s,edgeUpdaterType:c,isTarget:u,domNode:h,nodeLookup:g,lib:p,autoPanOnConnect:y,flowId:x,panBy:v,cancelConnection:w,onConnectStart:S,onConnect:N,onConnectEnd:E,isValidConnection:_=M1,onReconnectEnd:k,updateConnection:j,getTransform:C,getFromHandle:D,autoPanSpeed:z,dragThreshold:O=1,handleDomNode:H}){const Z=x1(t.target);let ne=0,Q;const{x:K,y:te}=pn(t),L=T1(c,H),G=h==null?void 0:h.getBoundingClientRect();let M=!1;if(!G||!L)return;const U=C1(s,L,r,g,a);if(!U)return;let B=pn(t,G),Y=!1,q=null,R=!1,V=null;function W(){if(!y||!G)return;const[ye,xe]=h1(B,G,z);v({x:ye,y:xe}),ne=requestAnimationFrame(W)}const ae={...U,nodeId:s,type:L,position:U.position},oe=g.get(s);let fe={inProgress:!0,isValid:null,from:ki(oe,ae,ve.Left,!0),fromHandle:ae,fromPosition:ae.position,fromNode:oe,to:B,toHandle:null,toPosition:Dx[ae.position],toNode:null,pointer:B};function ce(){M=!0,j(fe),S==null||S(t,{nodeId:s,handleId:r,handleType:L})}O===0&&ce();function ue(ye){if(!M){const{x:nt,y:Lt}=pn(ye),ht=nt-K,rn=Lt-te;if(!(ht*ht+rn*rn>O*O))return;ce()}if(!D()||!ae){Ee(ye);return}const xe=C();B=pn(ye,G),Q=K3(ho(B,xe,!1,[1,1]),l,g,ae),Y||(W(),Y=!0);const me=z1(ye,{handle:Q,connectionMode:a,fromNodeId:s,fromHandleId:r,fromType:u?"target":"source",isValidConnection:_,doc:Z,lib:p,flowId:x,nodeLookup:g});V=me.handleDomNode,q=me.connection,R=F3(!!Q,me.isValid);const je=g.get(s),Ue=je?ki(je,ae,ve.Left,!0):fe.from,Me={...fe,from:Ue,isValid:R,to:me.toHandle&&R?wc({x:me.toHandle.x,y:me.toHandle.y},xe):B,toHandle:me.toHandle,toPosition:R&&me.toHandle?me.toHandle.position:Dx[ae.position],toNode:me.toHandle?g.get(me.toHandle.nodeId):null,pointer:B};j(Me),fe=Me}function Ee(ye){if(!("touches"in ye&&ye.touches.length>0)){if(M){(Q||V)&&q&&R&&(N==null||N(q));const{inProgress:xe,...me}=fe,je={...me,toPosition:fe.toHandle?fe.toPosition:null};E==null||E(ye,je),c&&(k==null||k(ye,je))}w(),cancelAnimationFrame(ne),Y=!1,R=!1,q=null,V=null,Z.removeEventListener("mousemove",ue),Z.removeEventListener("mouseup",Ee),Z.removeEventListener("touchmove",ue),Z.removeEventListener("touchend",Ee)}}Z.addEventListener("mousemove",ue),Z.addEventListener("mouseup",Ee),Z.addEventListener("touchmove",ue),Z.addEventListener("touchend",Ee)}function z1(t,{handle:a,connectionMode:l,fromNodeId:r,fromHandleId:s,fromType:c,doc:u,lib:h,flowId:g,isValidConnection:p=M1,nodeLookup:y}){const x=c==="target",v=a?u.querySelector(`.${h}-flow__handle[data-id="${g}-${a==null?void 0:a.nodeId}-${a==null?void 0:a.id}-${a==null?void 0:a.type}"]`):null,{x:w,y:S}=pn(t),N=u.elementFromPoint(w,S),E=N!=null&&N.classList.contains(`${h}-flow__handle`)?N:v,_={handleDomNode:E,isValid:!1,connection:null,toHandle:null};if(E){const k=T1(void 0,E),j=E.getAttribute("data-nodeid"),C=E.getAttribute("data-handleid"),D=E.classList.contains("connectable"),z=E.classList.contains("connectableend");if(!j||!k)return _;const O={source:x?j:r,sourceHandle:x?C:s,target:x?r:j,targetHandle:x?s:C};_.connection=O;const Z=D&&z&&(l===Rl.Strict?x&&k==="source"||!x&&k==="target":j!==r||C!==s);_.isValid=Z&&p(O),_.toHandle=C1(j,k,C,y,l,!0)}return _}const ch={onPointerDown:P3,isValid:z1};function I3({domNode:t,panZoom:a,getTransform:l,getViewScale:r}){const s=Qt(t);function c({translateExtent:h,width:g,height:p,zoomStep:y=1,pannable:x=!0,zoomable:v=!0,inversePan:w=!1}){const S=j=>{if(j.sourceEvent.type!=="wheel"||!a)return;const C=l(),D=j.sourceEvent.ctrlKey&&to()?10:1,z=-j.sourceEvent.deltaY*(j.sourceEvent.deltaMode===1?.05:j.sourceEvent.deltaMode?1:.002)*y,O=C[2]*Math.pow(2,z*D);a.scaleTo(O)};let N=[0,0];const E=j=>{(j.sourceEvent.type==="mousedown"||j.sourceEvent.type==="touchstart")&&(N=[j.sourceEvent.clientX??j.sourceEvent.touches[0].clientX,j.sourceEvent.clientY??j.sourceEvent.touches[0].clientY])},_=j=>{const C=l();if(j.sourceEvent.type!=="mousemove"&&j.sourceEvent.type!=="touchmove"||!a)return;const D=[j.sourceEvent.clientX??j.sourceEvent.touches[0].clientX,j.sourceEvent.clientY??j.sourceEvent.touches[0].clientY],z=[D[0]-N[0],D[1]-N[1]];N=D;const O=r()*Math.max(C[2],Math.log(C[2]))*(w?-1:1),H={x:C[0]-z[0]*O,y:C[1]-z[1]*O},Z=[[0,0],[g,p]];a.setViewportConstrained({x:H.x,y:H.y,zoom:C[2]},Z,h)},k=l1().on("start",E).on("zoom",x?_:null).on("zoom.wheel",v?S:null);s.call(k,{})}function u(){s.on("zoom",null)}return{update:c,destroy:u,pointer:dn}}const Uc=t=>({x:t.x,y:t.y,zoom:t.k}),Od=({x:t,y:a,zoom:l})=>Lc.translate(t,a).scale(l),jl=(t,a)=>t.target.closest(`.${a}`),O1=(t,a)=>a===2&&Array.isArray(t)&&t.includes(2),J3=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,Rd=(t,a=0,l=J3,r=()=>{})=>{const s=typeof a=="number"&&a>0;return s||r(),s?t.transition().duration(a).ease(l).on("end",r):t},R1=t=>{const a=t.ctrlKey&&to()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*a};function W3({zoomPanValues:t,noWheelClassName:a,d3Selection:l,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:c,zoomOnPinch:u,onPanZoomStart:h,onPanZoom:g,onPanZoomEnd:p}){return y=>{if(jl(y,a))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const x=l.property("__zoom").k||1;if(y.ctrlKey&&u){const E=dn(y),_=R1(y),k=x*Math.pow(2,_);r.scaleTo(l,k,E,y);return}const v=y.deltaMode===1?20:1;let w=s===Ti.Vertical?0:y.deltaX*v,S=s===Ti.Horizontal?0:y.deltaY*v;!to()&&y.shiftKey&&s!==Ti.Vertical&&(w=y.deltaY*v,S=0),r.translateBy(l,-(w/x)*c,-(S/x)*c,{internal:!0});const N=Uc(l.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(g==null||g(y,N),t.panScrollTimeout=setTimeout(()=>{p==null||p(y,N),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,h==null||h(y,N))}}function eA({noWheelClassName:t,preventScrolling:a,d3ZoomHandler:l}){return function(r,s){const c=r.type==="wheel",u=!a&&c&&!r.ctrlKey,h=jl(r,t);if(r.ctrlKey&&c&&h&&r.preventDefault(),u||h)return null;r.preventDefault(),l.call(this,r,s)}}function tA({zoomPanValues:t,onDraggingChange:a,onPanZoomStart:l}){return r=>{var c,u,h;if((c=r.sourceEvent)!=null&&c.internal)return;const s=Uc(r.transform);t.mouseButton=((u=r.sourceEvent)==null?void 0:u.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=s,((h=r.sourceEvent)==null?void 0:h.type)==="mousedown"&&a(!0),l&&(l==null||l(r.sourceEvent,s))}}function nA({zoomPanValues:t,panOnDrag:a,onPaneContextMenu:l,onTransformChange:r,onPanZoom:s}){return c=>{var u,h;t.usedRightMouseButton=!!(l&&O1(a,t.mouseButton??0)),(u=c.sourceEvent)!=null&&u.sync||r([c.transform.x,c.transform.y,c.transform.k]),s&&!((h=c.sourceEvent)!=null&&h.internal)&&(s==null||s(c.sourceEvent,Uc(c.transform)))}}function aA({zoomPanValues:t,panOnDrag:a,panOnScroll:l,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:c}){return u=>{var h;if(!((h=u.sourceEvent)!=null&&h.internal)&&(t.isZoomingOrPanning=!1,c&&O1(a,t.mouseButton??0)&&!t.usedRightMouseButton&&u.sourceEvent&&c(u.sourceEvent),t.usedRightMouseButton=!1,r(!1),s)){const g=Uc(u.transform);t.prevViewport=g,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{s==null||s(u.sourceEvent,g)},l?150:0)}}}function iA({zoomActivationKeyPressed:t,zoomOnScroll:a,zoomOnPinch:l,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:c,userSelectionActive:u,noWheelClassName:h,noPanClassName:g,lib:p,connectionInProgress:y}){return x=>{var E;const v=t||a,w=l&&x.ctrlKey,S=x.type==="wheel";if(x.button===1&&x.type==="mousedown"&&(jl(x,`${p}-flow__node`)||jl(x,`${p}-flow__edge`)))return!0;if(!r&&!v&&!s&&!c&&!l||u||y&&!S||jl(x,h)&&S||jl(x,g)&&(!S||s&&S&&!t)||!l&&x.ctrlKey&&S)return!1;if(!l&&x.type==="touchstart"&&((E=x.touches)==null?void 0:E.length)>1)return x.preventDefault(),!1;if(!v&&!s&&!w&&S||!r&&(x.type==="mousedown"||x.type==="touchstart")||Array.isArray(r)&&!r.includes(x.button)&&x.type==="mousedown")return!1;const N=Array.isArray(r)&&r.includes(x.button)||!x.button||x.button<=1;return(!x.ctrlKey||S)&&N}}function lA({domNode:t,minZoom:a,maxZoom:l,translateExtent:r,viewport:s,onPanZoom:c,onPanZoomStart:u,onPanZoomEnd:h,onDraggingChange:g}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=t.getBoundingClientRect(),x=l1().scaleExtent([a,l]).translateExtent(r),v=Qt(t).call(x);k({x:s.x,y:s.y,zoom:kl(s.zoom,a,l)},[[0,0],[y.width,y.height]],r);const w=v.on("wheel.zoom"),S=v.on("dblclick.zoom");x.wheelDelta(R1);function N(Q,K){return v?new Promise(te=>{x==null||x.interpolate((K==null?void 0:K.interpolate)==="linear"?Gr:nc).transform(Rd(v,K==null?void 0:K.duration,K==null?void 0:K.ease,()=>te(!0)),Q)}):Promise.resolve(!1)}function E({noWheelClassName:Q,noPanClassName:K,onPaneContextMenu:te,userSelectionActive:L,panOnScroll:G,panOnDrag:M,panOnScrollMode:U,panOnScrollSpeed:B,preventScrolling:Y,zoomOnPinch:q,zoomOnScroll:R,zoomOnDoubleClick:V,zoomActivationKeyPressed:W,lib:ae,onTransformChange:oe,connectionInProgress:se,paneClickDistance:fe,selectionOnDrag:ce}){L&&!p.isZoomingOrPanning&&_();const ue=G&&!W&&!L;x.clickDistance(ce?1/0:!mn(fe)||fe<0?0:fe);const Ee=ue?W3({zoomPanValues:p,noWheelClassName:Q,d3Selection:v,d3Zoom:x,panOnScrollMode:U,panOnScrollSpeed:B,zoomOnPinch:q,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:h}):eA({noWheelClassName:Q,preventScrolling:Y,d3ZoomHandler:w});if(v.on("wheel.zoom",Ee,{passive:!1}),!L){const xe=tA({zoomPanValues:p,onDraggingChange:g,onPanZoomStart:u});x.on("start",xe);const me=nA({zoomPanValues:p,panOnDrag:M,onPaneContextMenu:!!te,onPanZoom:c,onTransformChange:oe});x.on("zoom",me);const je=aA({zoomPanValues:p,panOnDrag:M,panOnScroll:G,onPaneContextMenu:te,onPanZoomEnd:h,onDraggingChange:g});x.on("end",je)}const ye=iA({zoomActivationKeyPressed:W,panOnDrag:M,zoomOnScroll:R,panOnScroll:G,zoomOnDoubleClick:V,zoomOnPinch:q,userSelectionActive:L,noPanClassName:K,noWheelClassName:Q,lib:ae,connectionInProgress:se});x.filter(ye),V?v.on("dblclick.zoom",S):v.on("dblclick.zoom",null)}function _(){x.on("zoom",null)}async function k(Q,K,te){const L=Od(Q),G=x==null?void 0:x.constrain()(L,K,te);return G&&await N(G),new Promise(M=>M(G))}async function j(Q,K){const te=Od(Q);return await N(te,K),new Promise(L=>L(te))}function C(Q){if(v){const K=Od(Q),te=v.property("__zoom");(te.k!==Q.zoom||te.x!==Q.x||te.y!==Q.y)&&(x==null||x.transform(v,K,null,{sync:!0}))}}function D(){const Q=v?i1(v.node()):{x:0,y:0,k:1};return{x:Q.x,y:Q.y,zoom:Q.k}}function z(Q,K){return v?new Promise(te=>{x==null||x.interpolate((K==null?void 0:K.interpolate)==="linear"?Gr:nc).scaleTo(Rd(v,K==null?void 0:K.duration,K==null?void 0:K.ease,()=>te(!0)),Q)}):Promise.resolve(!1)}function O(Q,K){return v?new Promise(te=>{x==null||x.interpolate((K==null?void 0:K.interpolate)==="linear"?Gr:nc).scaleBy(Rd(v,K==null?void 0:K.duration,K==null?void 0:K.ease,()=>te(!0)),Q)}):Promise.resolve(!1)}function H(Q){x==null||x.scaleExtent(Q)}function Z(Q){x==null||x.translateExtent(Q)}function ne(Q){const K=!mn(Q)||Q<0?0:Q;x==null||x.clickDistance(K)}return{update:E,destroy:_,setViewport:j,setViewportConstrained:k,getViewport:D,scaleTo:z,scaleBy:O,setScaleExtent:H,setTranslateExtent:Z,syncViewport:C,setClickDistance:ne}}var Hl;(function(t){t.Line="line",t.Handle="handle"})(Hl||(Hl={}));function rA({width:t,prevWidth:a,height:l,prevHeight:r,affectsX:s,affectsY:c}){const u=t-a,h=l-r,g=[u>0?1:u<0?-1:0,h>0?1:h<0?-1:0];return u&&s&&(g[0]=g[0]*-1),h&&c&&(g[1]=g[1]*-1),g}function Kx(t){const a=t.includes("right")||t.includes("left"),l=t.includes("bottom")||t.includes("top"),r=t.includes("left"),s=t.includes("top");return{isHorizontal:a,isVertical:l,affectsX:r,affectsY:s}}function Xa(t,a){return Math.max(0,a-t)}function Ga(t,a){return Math.max(0,t-a)}function Fs(t,a,l){return Math.max(0,a-t,t-l)}function Fx(t,a){return t?!a:a}function oA(t,a,l,r,s,c,u,h){let{affectsX:g,affectsY:p}=a;const{isHorizontal:y,isVertical:x}=a,v=y&&x,{xSnapped:w,ySnapped:S}=l,{minWidth:N,maxWidth:E,minHeight:_,maxHeight:k}=r,{x:j,y:C,width:D,height:z,aspectRatio:O}=t;let H=Math.floor(y?w-t.pointerX:0),Z=Math.floor(x?S-t.pointerY:0);const ne=D+(g?-H:H),Q=z+(p?-Z:Z),K=-c[0]*D,te=-c[1]*z;let L=Fs(ne,N,E),G=Fs(Q,_,k);if(u){let B=0,Y=0;g&&H<0?B=Xa(j+H+K,u[0][0]):!g&&H>0&&(B=Ga(j+ne+K,u[1][0])),p&&Z<0?Y=Xa(C+Z+te,u[0][1]):!p&&Z>0&&(Y=Ga(C+Q+te,u[1][1])),L=Math.max(L,B),G=Math.max(G,Y)}if(h){let B=0,Y=0;g&&H>0?B=Ga(j+H,h[0][0]):!g&&H<0&&(B=Xa(j+ne,h[1][0])),p&&Z>0?Y=Ga(C+Z,h[0][1]):!p&&Z<0&&(Y=Xa(C+Q,h[1][1])),L=Math.max(L,B),G=Math.max(G,Y)}if(s){if(y){const B=Fs(ne/O,_,k)*O;if(L=Math.max(L,B),u){let Y=0;!g&&!p||g&&!p&&v?Y=Ga(C+te+ne/O,u[1][1])*O:Y=Xa(C+te+(g?H:-H)/O,u[0][1])*O,L=Math.max(L,Y)}if(h){let Y=0;!g&&!p||g&&!p&&v?Y=Xa(C+ne/O,h[1][1])*O:Y=Ga(C+(g?H:-H)/O,h[0][1])*O,L=Math.max(L,Y)}}if(x){const B=Fs(Q*O,N,E)/O;if(G=Math.max(G,B),u){let Y=0;!g&&!p||p&&!g&&v?Y=Ga(j+Q*O+K,u[1][0])/O:Y=Xa(j+(p?Z:-Z)*O+K,u[0][0])/O,G=Math.max(G,Y)}if(h){let Y=0;!g&&!p||p&&!g&&v?Y=Xa(j+Q*O,h[1][0])/O:Y=Ga(j+(p?Z:-Z)*O,h[0][0])/O,G=Math.max(G,Y)}}}Z=Z+(Z<0?G:-G),H=H+(H<0?L:-L),s&&(v?ne>Q*O?Z=(Fx(g,p)?-H:H)/O:H=(Fx(g,p)?-Z:Z)*O:y?(Z=H/O,p=g):(H=Z*O,g=p));const M=g?j+H:j,U=p?C+Z:C;return{width:D+(g?-H:H),height:z+(p?-Z:Z),x:c[0]*H*(g?-1:1)+M,y:c[1]*Z*(p?-1:1)+U}}const k1={width:0,height:0,x:0,y:0},sA={...k1,pointerX:0,pointerY:0,aspectRatio:1};function cA(t){return[[0,0],[t.measured.width,t.measured.height]]}function uA(t,a,l){const r=a.position.x+t.position.x,s=a.position.y+t.position.y,c=t.measured.width??0,u=t.measured.height??0,h=l[0]*c,g=l[1]*u;return[[r-h,s-g],[r+c-h,s+u-g]]}function fA({domNode:t,nodeId:a,getStoreItems:l,onChange:r,onEnd:s}){const c=Qt(t);let u={controlDirection:Kx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:p,boundaries:y,keepAspectRatio:x,resizeDirection:v,onResizeStart:w,onResize:S,onResizeEnd:N,shouldResize:E}){let _={...k1},k={...sA};u={boundaries:y,resizeDirection:v,keepAspectRatio:x,controlDirection:Kx(p)};let j,C=null,D=[],z,O,H,Z=!1;const ne=Xv().on("start",Q=>{const{nodeLookup:K,transform:te,snapGrid:L,snapToGrid:G,nodeOrigin:M,paneDomNode:U}=l();if(j=K.get(a),!j)return;C=(U==null?void 0:U.getBoundingClientRect())??null;const{xSnapped:B,ySnapped:Y}=Zr(Q.sourceEvent,{transform:te,snapGrid:L,snapToGrid:G,containerBounds:C});_={width:j.measured.width??0,height:j.measured.height??0,x:j.position.x??0,y:j.position.y??0},k={..._,pointerX:B,pointerY:Y,aspectRatio:_.width/_.height},z=void 0,j.parentId&&(j.extent==="parent"||j.expandParent)&&(z=K.get(j.parentId),O=z&&j.extent==="parent"?cA(z):void 0),D=[],H=void 0;for(const[q,R]of K)if(R.parentId===a&&(D.push({id:q,position:{...R.position},extent:R.extent}),R.extent==="parent"||R.expandParent)){const V=uA(R,j,R.origin??M);H?H=[[Math.min(V[0][0],H[0][0]),Math.min(V[0][1],H[0][1])],[Math.max(V[1][0],H[1][0]),Math.max(V[1][1],H[1][1])]]:H=V}w==null||w(Q,{..._})}).on("drag",Q=>{const{transform:K,snapGrid:te,snapToGrid:L,nodeOrigin:G}=l(),M=Zr(Q.sourceEvent,{transform:K,snapGrid:te,snapToGrid:L,containerBounds:C}),U=[];if(!j)return;const{x:B,y:Y,width:q,height:R}=_,V={},W=j.origin??G,{width:ae,height:oe,x:se,y:fe}=oA(k,u.controlDirection,M,u.boundaries,u.keepAspectRatio,W,O,H),ce=ae!==q,ue=oe!==R,Ee=se!==B&&ce,ye=fe!==Y&&ue;if(!Ee&&!ye&&!ce&&!ue)return;if((Ee||ye||W[0]===1||W[1]===1)&&(V.x=Ee?se:_.x,V.y=ye?fe:_.y,_.x=V.x,_.y=V.y,D.length>0)){const Ue=se-B,Me=fe-Y;for(const nt of D)nt.position={x:nt.position.x-Ue+W[0]*(ae-q),y:nt.position.y-Me+W[1]*(oe-R)},U.push(nt)}if((ce||ue)&&(V.width=ce&&(!u.resizeDirection||u.resizeDirection==="horizontal")?ae:_.width,V.height=ue&&(!u.resizeDirection||u.resizeDirection==="vertical")?oe:_.height,_.width=V.width,_.height=V.height),z&&j.expandParent){const Ue=W[0]*(V.width??0);V.x&&V.x<Ue&&(_.x=Ue,k.x=k.x-(V.x-Ue));const Me=W[1]*(V.height??0);V.y&&V.y<Me&&(_.y=Me,k.y=k.y-(V.y-Me))}const xe=rA({width:_.width,prevWidth:q,height:_.height,prevHeight:R,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),me={..._,direction:xe};(E==null?void 0:E(Q,me))!==!1&&(Z=!0,S==null||S(Q,me),r(V,U))}).on("end",Q=>{Z&&(N==null||N(Q,{..._}),s==null||s({..._}),Z=!1)});c.call(ne)}function g(){c.on(".drag",null)}return{update:h,destroy:g}}var kd={exports:{}},Dd={},Ld={exports:{}},Hd={};/**
|
|
375
|
+
* @license React
|
|
376
|
+
* use-sync-external-store-shim.production.js
|
|
377
|
+
*
|
|
378
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
379
|
+
*
|
|
380
|
+
* This source code is licensed under the MIT license found in the
|
|
381
|
+
* LICENSE file in the root directory of this source tree.
|
|
382
|
+
*/var Px;function dA(){if(Px)return Hd;Px=1;var t=io();function a(x,v){return x===v&&(x!==0||1/x===1/v)||x!==x&&v!==v}var l=typeof Object.is=="function"?Object.is:a,r=t.useState,s=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function h(x,v){var w=v(),S=r({inst:{value:w,getSnapshot:v}}),N=S[0].inst,E=S[1];return c(function(){N.value=w,N.getSnapshot=v,g(N)&&E({inst:N})},[x,w,v]),s(function(){return g(N)&&E({inst:N}),x(function(){g(N)&&E({inst:N})})},[x]),u(w),w}function g(x){var v=x.getSnapshot;x=x.value;try{var w=v();return!l(x,w)}catch{return!0}}function p(x,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return Hd.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Hd}var Ix;function hA(){return Ix||(Ix=1,Ld.exports=dA()),Ld.exports}/**
|
|
383
|
+
* @license React
|
|
384
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
385
|
+
*
|
|
386
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the MIT license found in the
|
|
389
|
+
* LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/var Jx;function mA(){if(Jx)return Dd;Jx=1;var t=io(),a=hA();function l(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var r=typeof Object.is=="function"?Object.is:l,s=a.useSyncExternalStore,c=t.useRef,u=t.useEffect,h=t.useMemo,g=t.useDebugValue;return Dd.useSyncExternalStoreWithSelector=function(p,y,x,v,w){var S=c(null);if(S.current===null){var N={hasValue:!1,value:null};S.current=N}else N=S.current;S=h(function(){function _(z){if(!k){if(k=!0,j=z,z=v(z),w!==void 0&&N.hasValue){var O=N.value;if(w(O,z))return C=O}return C=z}if(O=C,r(j,z))return O;var H=v(z);return w!==void 0&&w(O,H)?(j=z,O):(j=z,C=H)}var k=!1,j,C,D=x===void 0?null:x;return[function(){return _(y())},D===null?void 0:function(){return _(D())}]},[y,x,v,w]);var E=s(p,S[0],S[1]);return u(function(){N.hasValue=!0,N.value=E},[E]),g(E),E},Dd}var Wx;function pA(){return Wx||(Wx=1,kd.exports=mA()),kd.exports}var gA=pA();const xA=bh(gA),yA={},ey=t=>{let a;const l=new Set,r=(y,x)=>{const v=typeof y=="function"?y(a):y;if(!Object.is(v,a)){const w=a;a=x??(typeof v!="object"||v===null)?v:Object.assign({},a,v),l.forEach(S=>S(a,w))}},s=()=>a,g={setState:r,getState:s,getInitialState:()=>p,subscribe:y=>(l.add(y),()=>l.delete(y)),destroy:()=>{(yA?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),l.clear()}},p=a=t(r,s,g);return g},vA=t=>t?ey(t):ey,{useDebugValue:bA}=Gt,{useSyncExternalStoreWithSelector:wA}=xA,SA=t=>t;function D1(t,a=SA,l){const r=wA(t.subscribe,t.getState,t.getServerState||t.getInitialState,a,l);return bA(r),r}const ty=(t,a)=>{const l=vA(t),r=(s,c=a)=>D1(l,s,c);return Object.assign(r,l),r},NA=(t,a)=>t?ty(t,a):ty;function Pe(t,a){if(Object.is(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;if(t instanceof Map&&a instanceof Map){if(t.size!==a.size)return!1;for(const[r,s]of t)if(!Object.is(s,a.get(r)))return!1;return!0}if(t instanceof Set&&a instanceof Set){if(t.size!==a.size)return!1;for(const r of t)if(!a.has(r))return!1;return!0}const l=Object.keys(t);if(l.length!==Object.keys(a).length)return!1;for(const r of l)if(!Object.prototype.hasOwnProperty.call(a,r)||!Object.is(t[r],a[r]))return!1;return!0}var Vc=Xy();const EA=bh(Vc),$c=A.createContext(null),jA=$c.Provider,L1=zn.error001();function Le(t,a){const l=A.useContext($c);if(l===null)throw new Error(L1);return D1(l,t,a)}function Ie(){const t=A.useContext($c);if(t===null)throw new Error(L1);return A.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const ny={display:"none"},_A={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},H1="react-flow__node-desc",B1="react-flow__edge-desc",AA="react-flow__aria-live",CA=t=>t.ariaLiveMessage,TA=t=>t.ariaLabelConfig;function MA({rfId:t}){const a=Le(CA);return d.jsx("div",{id:`${AA}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:_A,children:a})}function zA({rfId:t,disableKeyboardA11y:a}){const l=Le(TA);return d.jsxs(d.Fragment,{children:[d.jsx("div",{id:`${H1}-${t}`,style:ny,children:a?l["node.a11yDescription.default"]:l["node.a11yDescription.keyboardDisabled"]}),d.jsx("div",{id:`${B1}-${t}`,style:ny,children:l["edge.a11yDescription.default"]}),!a&&d.jsx(MA,{rfId:t})]})}const Yc=A.forwardRef(({position:t="top-left",children:a,className:l,style:r,...s},c)=>{const u=`${t}`.split("-");return d.jsx("div",{className:st(["react-flow__panel",l,...u]),style:r,ref:c,...s,children:a})});Yc.displayName="Panel";function OA({proOptions:t,position:a="bottom-right"}){return t!=null&&t.hideAttribution?null:d.jsx(Yc,{position:a,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:d.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const RA=t=>{const a=[],l=[];for(const[,r]of t.nodeLookup)r.selected&&a.push(r.internals.userNode);for(const[,r]of t.edgeLookup)r.selected&&l.push(r);return{selectedNodes:a,selectedEdges:l}},Ps=t=>t.id;function kA(t,a){return Pe(t.selectedNodes.map(Ps),a.selectedNodes.map(Ps))&&Pe(t.selectedEdges.map(Ps),a.selectedEdges.map(Ps))}function DA({onSelectionChange:t}){const a=Ie(),{selectedNodes:l,selectedEdges:r}=Le(RA,kA);return A.useEffect(()=>{const s={nodes:l,edges:r};t==null||t(s),a.getState().onSelectionChangeHandlers.forEach(c=>c(s))},[l,r,t]),null}const LA=t=>!!t.onSelectionChangeHandlers;function HA({onSelectionChange:t}){const a=Le(LA);return t||a?d.jsx(DA,{onSelectionChange:t}):null}const U1=[0,0],BA={x:0,y:0,zoom:1},UA=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ay=[...UA,"rfId"],VA=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),iy={translateExtent:Jr,nodeOrigin:U1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function $A(t){const{setNodes:a,setEdges:l,setMinZoom:r,setMaxZoom:s,setTranslateExtent:c,setNodeExtent:u,reset:h,setDefaultNodesAndEdges:g}=Le(VA,Pe),p=Ie();A.useEffect(()=>(g(t.defaultNodes,t.defaultEdges),()=>{y.current=iy,h()}),[]);const y=A.useRef(iy);return A.useEffect(()=>{for(const x of ay){const v=t[x],w=y.current[x];v!==w&&(typeof t[x]>"u"||(x==="nodes"?a(v):x==="edges"?l(v):x==="minZoom"?r(v):x==="maxZoom"?s(v):x==="translateExtent"?c(v):x==="nodeExtent"?u(v):x==="ariaLabelConfig"?p.setState({ariaLabelConfig:N3(v)}):x==="fitView"?p.setState({fitViewQueued:v}):x==="fitViewOptions"?p.setState({fitViewOptions:v}):p.setState({[x]:v})))}y.current=t},ay.map(x=>t[x])),null}function ly(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function YA(t){var r;const[a,l]=A.useState(t==="system"?null:t);return A.useEffect(()=>{if(t!=="system"){l(t);return}const s=ly(),c=()=>l(s!=null&&s.matches?"dark":"light");return c(),s==null||s.addEventListener("change",c),()=>{s==null||s.removeEventListener("change",c)}},[t]),a!==null?a:(r=ly())!=null&&r.matches?"dark":"light"}const ry=typeof document<"u"?document:null;function no(t=null,a={target:ry,actInsideInputWithModifier:!0}){const[l,r]=A.useState(!1),s=A.useRef(!1),c=A.useRef(new Set([])),[u,h]=A.useMemo(()=>{if(t!==null){const p=(Array.isArray(t)?t:[t]).filter(x=>typeof x=="string").map(x=>x.replace("+",`
|
|
391
|
+
`).replace(`
|
|
392
|
+
|
|
393
|
+
`,`
|
|
394
|
+
+`).split(`
|
|
395
|
+
`)),y=p.reduce((x,v)=>x.concat(...v),[]);return[p,y]}return[[],[]]},[t]);return A.useEffect(()=>{const g=(a==null?void 0:a.target)??ry,p=(a==null?void 0:a.actInsideInputWithModifier)??!0;if(t!==null){const y=w=>{var E,_;if(s.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!s.current||s.current&&!p)&&y1(w))return!1;const N=sy(w.code,h);if(c.current.add(w[N]),oy(u,c.current,!1)){const k=((_=(E=w.composedPath)==null?void 0:E.call(w))==null?void 0:_[0])||w.target,j=(k==null?void 0:k.nodeName)==="BUTTON"||(k==null?void 0:k.nodeName)==="A";a.preventDefault!==!1&&(s.current||!j)&&w.preventDefault(),r(!0)}},x=w=>{const S=sy(w.code,h);oy(u,c.current,!0)?(r(!1),c.current.clear()):c.current.delete(w[S]),w.key==="Meta"&&c.current.clear(),s.current=!1},v=()=>{c.current.clear(),r(!1)};return g==null||g.addEventListener("keydown",y),g==null||g.addEventListener("keyup",x),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{g==null||g.removeEventListener("keydown",y),g==null||g.removeEventListener("keyup",x),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[t,r]),l}function oy(t,a,l){return t.filter(r=>l||r.length===a.size).some(r=>r.every(s=>a.has(s)))}function sy(t,a){return a.includes(t)?"code":"key"}const qA=()=>{const t=Ie();return A.useMemo(()=>({zoomIn:a=>{const{panZoom:l}=t.getState();return l?l.scaleBy(1.2,{duration:a==null?void 0:a.duration}):Promise.resolve(!1)},zoomOut:a=>{const{panZoom:l}=t.getState();return l?l.scaleBy(1/1.2,{duration:a==null?void 0:a.duration}):Promise.resolve(!1)},zoomTo:(a,l)=>{const{panZoom:r}=t.getState();return r?r.scaleTo(a,{duration:l==null?void 0:l.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(a,l)=>{const{transform:[r,s,c],panZoom:u}=t.getState();return u?(await u.setViewport({x:a.x??r,y:a.y??s,zoom:a.zoom??c},l),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[a,l,r]=t.getState().transform;return{x:a,y:l,zoom:r}},setCenter:async(a,l,r)=>t.getState().setCenter(a,l,r),fitBounds:async(a,l)=>{const{width:r,height:s,minZoom:c,maxZoom:u,panZoom:h}=t.getState(),g=Vh(a,r,s,c,u,(l==null?void 0:l.padding)??.1);return h?(await h.setViewport(g,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(a,l={})=>{const{transform:r,snapGrid:s,snapToGrid:c,domNode:u}=t.getState();if(!u)return a;const{x:h,y:g}=u.getBoundingClientRect(),p={x:a.x-h,y:a.y-g},y=l.snapGrid??s,x=l.snapToGrid??c;return ho(p,r,x,y)},flowToScreenPosition:a=>{const{transform:l,domNode:r}=t.getState();if(!r)return a;const{x:s,y:c}=r.getBoundingClientRect(),u=wc(a,l);return{x:u.x+s,y:u.y+c}}}),[])};function V1(t,a){const l=[],r=new Map,s=[];for(const c of t)if(c.type==="add"){s.push(c);continue}else if(c.type==="remove"||c.type==="replace")r.set(c.id,[c]);else{const u=r.get(c.id);u?u.push(c):r.set(c.id,[c])}for(const c of a){const u=r.get(c.id);if(!u){l.push(c);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){l.push({...u[0].item});continue}const h={...c};for(const g of u)XA(g,h);l.push(h)}return s.length&&s.forEach(c=>{c.index!==void 0?l.splice(c.index,0,{...c.item}):l.push({...c.item})}),l}function XA(t,a){switch(t.type){case"select":{a.selected=t.selected;break}case"position":{typeof t.position<"u"&&(a.position=t.position),typeof t.dragging<"u"&&(a.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(a.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(a.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(a.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(a.resizing=t.resizing);break}}}function GA(t,a){return V1(t,a)}function ZA(t,a){return V1(t,a)}function _i(t,a){return{id:t,type:"select",selected:a}}function _l(t,a=new Set,l=!1){const r=[];for(const[s,c]of t){const u=a.has(s);!(c.selected===void 0&&!u)&&c.selected!==u&&(l&&(c.selected=u),r.push(_i(c.id,u)))}return r}function cy({items:t=[],lookup:a}){var s;const l=[],r=new Map(t.map(c=>[c.id,c]));for(const[c,u]of t.entries()){const h=a.get(u.id),g=((s=h==null?void 0:h.internals)==null?void 0:s.userNode)??h;g!==void 0&&g!==u&&l.push({id:u.id,item:u,type:"replace"}),g===void 0&&l.push({item:u,type:"add",index:c})}for(const[c]of a)r.get(c)===void 0&&l.push({id:c,type:"remove"});return l}function uy(t){return{id:t.id,type:"remove"}}const fy=t=>h3(t),QA=t=>u1(t);function $1(t){return A.forwardRef(t)}const KA=typeof window<"u"?A.useLayoutEffect:A.useEffect;function dy(t){const[a,l]=A.useState(BigInt(0)),[r]=A.useState(()=>FA(()=>l(s=>s+BigInt(1))));return KA(()=>{const s=r.get();s.length&&(t(s),r.reset())},[a]),r}function FA(t){let a=[];return{get:()=>a,reset:()=>{a=[]},push:l=>{a.push(l),t()}}}const Y1=A.createContext(null);function PA({children:t}){const a=Ie(),l=A.useCallback(h=>{const{nodes:g=[],setNodes:p,hasDefaultNodes:y,onNodesChange:x,nodeLookup:v,fitViewQueued:w,onNodesChangeMiddlewareMap:S}=a.getState();let N=g;for(const _ of h)N=typeof _=="function"?_(N):_;let E=cy({items:N,lookup:v});for(const _ of S.values())E=_(E);y&&p(N),E.length>0?x==null||x(E):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:_,nodes:k,setNodes:j}=a.getState();_&&j(k)})},[]),r=dy(l),s=A.useCallback(h=>{const{edges:g=[],setEdges:p,hasDefaultEdges:y,onEdgesChange:x,edgeLookup:v}=a.getState();let w=g;for(const S of h)w=typeof S=="function"?S(w):S;y?p(w):x&&x(cy({items:w,lookup:v}))},[]),c=dy(s),u=A.useMemo(()=>({nodeQueue:r,edgeQueue:c}),[]);return d.jsx(Y1.Provider,{value:u,children:t})}function IA(){const t=A.useContext(Y1);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const JA=t=>!!t.panZoom;function Qh(){const t=qA(),a=Ie(),l=IA(),r=Le(JA),s=A.useMemo(()=>{const c=x=>a.getState().nodeLookup.get(x),u=x=>{l.nodeQueue.push(x)},h=x=>{l.edgeQueue.push(x)},g=x=>{var _,k;const{nodeLookup:v,nodeOrigin:w}=a.getState(),S=fy(x)?x:v.get(x.id),N=S.parentId?g1(S.position,S.measured,S.parentId,v,w):S.position,E={...S,position:N,width:((_=S.measured)==null?void 0:_.width)??S.width,height:((k=S.measured)==null?void 0:k.height)??S.height};return Dl(E)},p=(x,v,w={replace:!1})=>{u(S=>S.map(N=>{if(N.id===x){const E=typeof v=="function"?v(N):v;return w.replace&&fy(E)?E:{...N,...E}}return N}))},y=(x,v,w={replace:!1})=>{h(S=>S.map(N=>{if(N.id===x){const E=typeof v=="function"?v(N):v;return w.replace&&QA(E)?E:{...N,...E}}return N}))};return{getNodes:()=>a.getState().nodes.map(x=>({...x})),getNode:x=>{var v;return(v=c(x))==null?void 0:v.internals.userNode},getInternalNode:c,getEdges:()=>{const{edges:x=[]}=a.getState();return x.map(v=>({...v}))},getEdge:x=>a.getState().edgeLookup.get(x),setNodes:u,setEdges:h,addNodes:x=>{const v=Array.isArray(x)?x:[x];l.nodeQueue.push(w=>[...w,...v])},addEdges:x=>{const v=Array.isArray(x)?x:[x];l.edgeQueue.push(w=>[...w,...v])},toObject:()=>{const{nodes:x=[],edges:v=[],transform:w}=a.getState(),[S,N,E]=w;return{nodes:x.map(_=>({..._})),edges:v.map(_=>({..._})),viewport:{x:S,y:N,zoom:E}}},deleteElements:async({nodes:x=[],edges:v=[]})=>{const{nodes:w,edges:S,onNodesDelete:N,onEdgesDelete:E,triggerNodeChanges:_,triggerEdgeChanges:k,onDelete:j,onBeforeDelete:C}=a.getState(),{nodes:D,edges:z}=await y3({nodesToRemove:x,edgesToRemove:v,nodes:w,edges:S,onBeforeDelete:C}),O=z.length>0,H=D.length>0;if(O){const Z=z.map(uy);E==null||E(z),k(Z)}if(H){const Z=D.map(uy);N==null||N(D),_(Z)}return(H||O)&&(j==null||j({nodes:D,edges:z})),{deletedNodes:D,deletedEdges:z}},getIntersectingNodes:(x,v=!0,w)=>{const S=Hx(x),N=S?x:g(x),E=w!==void 0;return N?(w||a.getState().nodes).filter(_=>{const k=a.getState().nodeLookup.get(_.id);if(k&&!S&&(_.id===x.id||!k.internals.positionAbsolute))return!1;const j=Dl(E?_:k),C=eo(j,N);return v&&C>0||C>=j.width*j.height||C>=N.width*N.height}):[]},isNodeIntersecting:(x,v,w=!0)=>{const N=Hx(x)?x:g(x);if(!N)return!1;const E=eo(N,v);return w&&E>0||E>=v.width*v.height||E>=N.width*N.height},updateNode:p,updateNodeData:(x,v,w={replace:!1})=>{p(x,S=>{const N=typeof v=="function"?v(S):v;return w.replace?{...S,data:N}:{...S,data:{...S.data,...N}}},w)},updateEdge:y,updateEdgeData:(x,v,w={replace:!1})=>{y(x,S=>{const N=typeof v=="function"?v(S):v;return w.replace?{...S,data:N}:{...S,data:{...S.data,...N}}},w)},getNodesBounds:x=>{const{nodeLookup:v,nodeOrigin:w}=a.getState();return m3(x,{nodeLookup:v,nodeOrigin:w})},getHandleConnections:({type:x,id:v,nodeId:w})=>{var S;return Array.from(((S=a.getState().connectionLookup.get(`${w}-${x}${v?`-${v}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:x,handleId:v,nodeId:w})=>{var S;return Array.from(((S=a.getState().connectionLookup.get(`${w}${x?v?`-${x}-${v}`:`-${x}`:""}`))==null?void 0:S.values())??[])},fitView:async x=>{const v=a.getState().fitViewResolver??S3();return a.setState({fitViewQueued:!0,fitViewOptions:x,fitViewResolver:v}),l.nodeQueue.push(w=>[...w]),v.promise}}},[]);return A.useMemo(()=>({...s,...t,viewportInitialized:r}),[r])}const hy=t=>t.selected,WA=typeof window<"u"?window:void 0;function eC({deleteKeyCode:t,multiSelectionKeyCode:a}){const l=Ie(),{deleteElements:r}=Qh(),s=no(t,{actInsideInputWithModifier:!1}),c=no(a,{target:WA});A.useEffect(()=>{if(s){const{edges:u,nodes:h}=l.getState();r({nodes:h.filter(hy),edges:u.filter(hy)}),l.setState({nodesSelectionActive:!1})}},[s]),A.useEffect(()=>{l.setState({multiSelectionActive:c})},[c])}function tC(t){const a=Ie();A.useEffect(()=>{const l=()=>{var s,c,u,h;if(!t.current||!(((c=(s=t.current).checkVisibility)==null?void 0:c.call(s))??!0))return!1;const r=$h(t.current);(r.height===0||r.width===0)&&((h=(u=a.getState()).onError)==null||h.call(u,"004",zn.error004())),a.setState({width:r.width||500,height:r.height||500})};if(t.current){l(),window.addEventListener("resize",l);const r=new ResizeObserver(()=>l());return r.observe(t.current),()=>{window.removeEventListener("resize",l),r&&t.current&&r.unobserve(t.current)}}},[])}const qc={position:"absolute",width:"100%",height:"100%",top:0,left:0},nC=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function aC({onPaneContextMenu:t,zoomOnScroll:a=!0,zoomOnPinch:l=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:c=Ti.Free,zoomOnDoubleClick:u=!0,panOnDrag:h=!0,defaultViewport:g,translateExtent:p,minZoom:y,maxZoom:x,zoomActivationKeyCode:v,preventScrolling:w=!0,children:S,noWheelClassName:N,noPanClassName:E,onViewportChange:_,isControlledViewport:k,paneClickDistance:j,selectionOnDrag:C}){const D=Ie(),z=A.useRef(null),{userSelectionActive:O,lib:H,connectionInProgress:Z}=Le(nC,Pe),ne=no(v),Q=A.useRef();tC(z);const K=A.useCallback(te=>{_==null||_({x:te[0],y:te[1],zoom:te[2]}),k||D.setState({transform:te})},[_,k]);return A.useEffect(()=>{if(z.current){Q.current=lA({domNode:z.current,minZoom:y,maxZoom:x,translateExtent:p,viewport:g,onDraggingChange:M=>D.setState(U=>U.paneDragging===M?U:{paneDragging:M}),onPanZoomStart:(M,U)=>{const{onViewportChangeStart:B,onMoveStart:Y}=D.getState();Y==null||Y(M,U),B==null||B(U)},onPanZoom:(M,U)=>{const{onViewportChange:B,onMove:Y}=D.getState();Y==null||Y(M,U),B==null||B(U)},onPanZoomEnd:(M,U)=>{const{onViewportChangeEnd:B,onMoveEnd:Y}=D.getState();Y==null||Y(M,U),B==null||B(U)}});const{x:te,y:L,zoom:G}=Q.current.getViewport();return D.setState({panZoom:Q.current,transform:[te,L,G],domNode:z.current.closest(".react-flow")}),()=>{var M;(M=Q.current)==null||M.destroy()}}},[]),A.useEffect(()=>{var te;(te=Q.current)==null||te.update({onPaneContextMenu:t,zoomOnScroll:a,zoomOnPinch:l,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:c,zoomOnDoubleClick:u,panOnDrag:h,zoomActivationKeyPressed:ne,preventScrolling:w,noPanClassName:E,userSelectionActive:O,noWheelClassName:N,lib:H,onTransformChange:K,connectionInProgress:Z,selectionOnDrag:C,paneClickDistance:j})},[t,a,l,r,s,c,u,h,ne,w,E,O,N,H,K,Z,C,j]),d.jsx("div",{className:"react-flow__renderer",ref:z,style:qc,children:S})}const iC=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function lC(){const{userSelectionActive:t,userSelectionRect:a}=Le(iC,Pe);return t&&a?d.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:a.width,height:a.height,transform:`translate(${a.x}px, ${a.y}px)`}}):null}const Bd=(t,a)=>l=>{l.target===a.current&&(t==null||t(l))},rC=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function oC({isSelecting:t,selectionKeyPressed:a,selectionMode:l=Wr.Full,panOnDrag:r,paneClickDistance:s,selectionOnDrag:c,onSelectionStart:u,onSelectionEnd:h,onPaneClick:g,onPaneContextMenu:p,onPaneScroll:y,onPaneMouseEnter:x,onPaneMouseMove:v,onPaneMouseLeave:w,children:S}){const N=Ie(),{userSelectionActive:E,elementsSelectable:_,dragging:k,connectionInProgress:j}=Le(rC,Pe),C=_&&(t||E),D=A.useRef(null),z=A.useRef(),O=A.useRef(new Set),H=A.useRef(new Set),Z=A.useRef(!1),ne=B=>{if(Z.current||j){Z.current=!1;return}g==null||g(B),N.getState().resetSelectedElements(),N.setState({nodesSelectionActive:!1})},Q=B=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){B.preventDefault();return}p==null||p(B)},K=y?B=>y(B):void 0,te=B=>{Z.current&&(B.stopPropagation(),Z.current=!1)},L=B=>{var oe,se;const{domNode:Y}=N.getState();if(z.current=Y==null?void 0:Y.getBoundingClientRect(),!z.current)return;const q=B.target===D.current;if(!q&&!!B.target.closest(".nokey")||!t||!(c&&q||a)||B.button!==0||!B.isPrimary)return;(se=(oe=B.target)==null?void 0:oe.setPointerCapture)==null||se.call(oe,B.pointerId),Z.current=!1;const{x:W,y:ae}=pn(B.nativeEvent,z.current);N.setState({userSelectionRect:{width:0,height:0,startX:W,startY:ae,x:W,y:ae}}),q||(B.stopPropagation(),B.preventDefault())},G=B=>{const{userSelectionRect:Y,transform:q,nodeLookup:R,edgeLookup:V,connectionLookup:W,triggerNodeChanges:ae,triggerEdgeChanges:oe,defaultEdgeOptions:se,resetSelectedElements:fe}=N.getState();if(!z.current||!Y)return;const{x:ce,y:ue}=pn(B.nativeEvent,z.current),{startX:Ee,startY:ye}=Y;if(!Z.current){const Me=a?0:s;if(Math.hypot(ce-Ee,ue-ye)<=Me)return;fe(),u==null||u(B)}Z.current=!0;const xe={startX:Ee,startY:ye,x:ce<Ee?ce:Ee,y:ue<ye?ue:ye,width:Math.abs(ce-Ee),height:Math.abs(ue-ye)},me=O.current,je=H.current;O.current=new Set(Uh(R,xe,q,l===Wr.Partial,!0).map(Me=>Me.id)),H.current=new Set;const Ue=(se==null?void 0:se.selectable)??!0;for(const Me of O.current){const nt=W.get(Me);if(nt)for(const{edgeId:Lt}of nt.values()){const ht=V.get(Lt);ht&&(ht.selectable??Ue)&&H.current.add(Lt)}}if(!Bx(me,O.current)){const Me=_l(R,O.current,!0);ae(Me)}if(!Bx(je,H.current)){const Me=_l(V,H.current);oe(Me)}N.setState({userSelectionRect:xe,userSelectionActive:!0,nodesSelectionActive:!1})},M=B=>{var Y,q;B.button===0&&((q=(Y=B.target)==null?void 0:Y.releasePointerCapture)==null||q.call(Y,B.pointerId),!E&&B.target===D.current&&N.getState().userSelectionRect&&(ne==null||ne(B)),N.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(h==null||h(B),N.setState({nodesSelectionActive:O.current.size>0})))},U=r===!0||Array.isArray(r)&&r.includes(0);return d.jsxs("div",{className:st(["react-flow__pane",{draggable:U,dragging:k,selection:t}]),onClick:C?void 0:Bd(ne,D),onContextMenu:Bd(Q,D),onWheel:Bd(K,D),onPointerEnter:C?void 0:x,onPointerMove:C?G:v,onPointerUp:C?M:void 0,onPointerDownCapture:C?L:void 0,onClickCapture:C?te:void 0,onPointerLeave:w,ref:D,style:qc,children:[S,d.jsx(lC,{})]})}function uh({id:t,store:a,unselect:l=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:c,multiSelectionActive:u,nodeLookup:h,onError:g}=a.getState(),p=h.get(t);if(!p){g==null||g("012",zn.error012(t));return}a.setState({nodesSelectionActive:!1}),p.selected?(l||p.selected&&u)&&(c({nodes:[p],edges:[]}),requestAnimationFrame(()=>{var y;return(y=r==null?void 0:r.current)==null?void 0:y.blur()})):s([t])}function q1({nodeRef:t,disabled:a=!1,noDragClassName:l,handleSelector:r,nodeId:s,isSelectable:c,nodeClickDistance:u}){const h=Ie(),[g,p]=A.useState(!1),y=A.useRef();return A.useEffect(()=>{y.current=G3({getStoreItems:()=>h.getState(),onNodeMouseDown:x=>{uh({id:x,store:h,nodeRef:t})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),A.useEffect(()=>{if(!(a||!t.current||!y.current))return y.current.update({noDragClassName:l,handleSelector:r,domNode:t.current,isSelectable:c,nodeId:s,nodeClickDistance:u}),()=>{var x;(x=y.current)==null||x.destroy()}},[l,r,a,c,t,s,u]),g}const sC=t=>a=>a.selected&&(a.draggable||t&&typeof a.draggable>"u");function X1(){const t=Ie();return A.useCallback(l=>{const{nodeExtent:r,snapToGrid:s,snapGrid:c,nodesDraggable:u,onError:h,updateNodePositions:g,nodeLookup:p,nodeOrigin:y}=t.getState(),x=new Map,v=sC(u),w=s?c[0]:5,S=s?c[1]:5,N=l.direction.x*w*l.factor,E=l.direction.y*S*l.factor;for(const[,_]of p){if(!v(_))continue;let k={x:_.internals.positionAbsolute.x+N,y:_.internals.positionAbsolute.y+E};s&&(k=fo(k,c));const{position:j,positionAbsolute:C}=f1({nodeId:_.id,nextPosition:k,nodeLookup:p,nodeExtent:r,nodeOrigin:y,onError:h});_.position=j,_.internals.positionAbsolute=C,x.set(_.id,_)}g(x)},[])}const Kh=A.createContext(null),cC=Kh.Provider;Kh.Consumer;const G1=()=>A.useContext(Kh),uC=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),fC=(t,a,l)=>r=>{const{connectionClickStartHandle:s,connectionMode:c,connection:u}=r,{fromHandle:h,toHandle:g,isValid:p}=u,y=(g==null?void 0:g.nodeId)===t&&(g==null?void 0:g.id)===a&&(g==null?void 0:g.type)===l;return{connectingFrom:(h==null?void 0:h.nodeId)===t&&(h==null?void 0:h.id)===a&&(h==null?void 0:h.type)===l,connectingTo:y,clickConnecting:(s==null?void 0:s.nodeId)===t&&(s==null?void 0:s.id)===a&&(s==null?void 0:s.type)===l,isPossibleEndHandle:c===Rl.Strict?(h==null?void 0:h.type)!==l:t!==(h==null?void 0:h.nodeId)||a!==(h==null?void 0:h.id),connectionInProcess:!!h,clickConnectionInProcess:!!s,valid:y&&p}};function dC({type:t="source",position:a=ve.Top,isValidConnection:l,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:c=!0,id:u,onConnect:h,children:g,className:p,onMouseDown:y,onTouchStart:x,...v},w){var G,M;const S=u||null,N=t==="target",E=Ie(),_=G1(),{connectOnClick:k,noPanClassName:j,rfId:C}=Le(uC,Pe),{connectingFrom:D,connectingTo:z,clickConnecting:O,isPossibleEndHandle:H,connectionInProcess:Z,clickConnectionInProcess:ne,valid:Q}=Le(fC(_,S,t),Pe);_||(M=(G=E.getState()).onError)==null||M.call(G,"010",zn.error010());const K=U=>{const{defaultEdgeOptions:B,onConnect:Y,hasDefaultEdges:q}=E.getState(),R={...B,...U};if(q){const{edges:V,setEdges:W}=E.getState();W(T3(R,V))}Y==null||Y(R),h==null||h(R)},te=U=>{if(!_)return;const B=v1(U.nativeEvent);if(s&&(B&&U.button===0||!B)){const Y=E.getState();ch.onPointerDown(U.nativeEvent,{handleDomNode:U.currentTarget,autoPanOnConnect:Y.autoPanOnConnect,connectionMode:Y.connectionMode,connectionRadius:Y.connectionRadius,domNode:Y.domNode,nodeLookup:Y.nodeLookup,lib:Y.lib,isTarget:N,handleId:S,nodeId:_,flowId:Y.rfId,panBy:Y.panBy,cancelConnection:Y.cancelConnection,onConnectStart:Y.onConnectStart,onConnectEnd:(...q)=>{var R,V;return(V=(R=E.getState()).onConnectEnd)==null?void 0:V.call(R,...q)},updateConnection:Y.updateConnection,onConnect:K,isValidConnection:l||((...q)=>{var R,V;return((V=(R=E.getState()).isValidConnection)==null?void 0:V.call(R,...q))??!0}),getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,autoPanSpeed:Y.autoPanSpeed,dragThreshold:Y.connectionDragThreshold})}B?y==null||y(U):x==null||x(U)},L=U=>{const{onClickConnectStart:B,onClickConnectEnd:Y,connectionClickStartHandle:q,connectionMode:R,isValidConnection:V,lib:W,rfId:ae,nodeLookup:oe,connection:se}=E.getState();if(!_||!q&&!s)return;if(!q){B==null||B(U.nativeEvent,{nodeId:_,handleId:S,handleType:t}),E.setState({connectionClickStartHandle:{nodeId:_,type:t,id:S}});return}const fe=x1(U.target),ce=l||V,{connection:ue,isValid:Ee}=ch.isValid(U.nativeEvent,{handle:{nodeId:_,id:S,type:t},connectionMode:R,fromNodeId:q.nodeId,fromHandleId:q.id||null,fromType:q.type,isValidConnection:ce,flowId:ae,doc:fe,lib:W,nodeLookup:oe});Ee&&ue&&K(ue);const ye=structuredClone(se);delete ye.inProgress,ye.toPosition=ye.toHandle?ye.toHandle.position:null,Y==null||Y(U,ye),E.setState({connectionClickStartHandle:null})};return d.jsx("div",{"data-handleid":S,"data-nodeid":_,"data-handlepos":a,"data-id":`${C}-${_}-${S}-${t}`,className:st(["react-flow__handle",`react-flow__handle-${a}`,"nodrag",j,p,{source:!N,target:N,connectable:r,connectablestart:s,connectableend:c,clickconnecting:O,connectingfrom:D,connectingto:z,valid:Q,connectionindicator:r&&(!Z||H)&&(Z||ne?c:s)}]),onMouseDown:te,onTouchStart:te,onClick:k?L:void 0,ref:w,...v,children:g})}const Bl=A.memo($1(dC));function hC({data:t,isConnectable:a,sourcePosition:l=ve.Bottom}){return d.jsxs(d.Fragment,{children:[t==null?void 0:t.label,d.jsx(Bl,{type:"source",position:l,isConnectable:a})]})}function mC({data:t,isConnectable:a,targetPosition:l=ve.Top,sourcePosition:r=ve.Bottom}){return d.jsxs(d.Fragment,{children:[d.jsx(Bl,{type:"target",position:l,isConnectable:a}),t==null?void 0:t.label,d.jsx(Bl,{type:"source",position:r,isConnectable:a})]})}function pC(){return null}function gC({data:t,isConnectable:a,targetPosition:l=ve.Top}){return d.jsxs(d.Fragment,{children:[d.jsx(Bl,{type:"target",position:l,isConnectable:a}),t==null?void 0:t.label]})}const Sc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},my={input:hC,default:mC,output:gC,group:pC};function xC(t){var a,l,r,s;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((a=t.style)==null?void 0:a.width),height:t.height??t.initialHeight??((l=t.style)==null?void 0:l.height)}:{width:t.width??((r=t.style)==null?void 0:r.width),height:t.height??((s=t.style)==null?void 0:s.height)}}const yC=t=>{const{width:a,height:l,x:r,y:s}=uo(t.nodeLookup,{filter:c=>!!c.selected});return{width:mn(a)?a:null,height:mn(l)?l:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${r}px,${s}px)`}};function vC({onSelectionContextMenu:t,noPanClassName:a,disableKeyboardA11y:l}){const r=Ie(),{width:s,height:c,transformString:u,userSelectionActive:h}=Le(yC,Pe),g=X1(),p=A.useRef(null);A.useEffect(()=>{var w;l||(w=p.current)==null||w.focus({preventScroll:!0})},[l]);const y=!h&&s!==null&&c!==null;if(q1({nodeRef:p,disabled:!y}),!y)return null;const x=t?w=>{const S=r.getState().nodes.filter(N=>N.selected);t(w,S)}:void 0,v=w=>{Object.prototype.hasOwnProperty.call(Sc,w.key)&&(w.preventDefault(),g({direction:Sc[w.key],factor:w.shiftKey?4:1}))};return d.jsx("div",{className:st(["react-flow__nodesselection","react-flow__container",a]),style:{transform:u},children:d.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:l?void 0:-1,onKeyDown:l?void 0:v,style:{width:s,height:c}})})}const py=typeof window<"u"?window:void 0,bC=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function Z1({children:t,onPaneClick:a,onPaneMouseEnter:l,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:u,paneClickDistance:h,deleteKeyCode:g,selectionKeyCode:p,selectionOnDrag:y,selectionMode:x,onSelectionStart:v,onSelectionEnd:w,multiSelectionKeyCode:S,panActivationKeyCode:N,zoomActivationKeyCode:E,elementsSelectable:_,zoomOnScroll:k,zoomOnPinch:j,panOnScroll:C,panOnScrollSpeed:D,panOnScrollMode:z,zoomOnDoubleClick:O,panOnDrag:H,defaultViewport:Z,translateExtent:ne,minZoom:Q,maxZoom:K,preventScrolling:te,onSelectionContextMenu:L,noWheelClassName:G,noPanClassName:M,disableKeyboardA11y:U,onViewportChange:B,isControlledViewport:Y}){const{nodesSelectionActive:q,userSelectionActive:R}=Le(bC,Pe),V=no(p,{target:py}),W=no(N,{target:py}),ae=W||H,oe=W||C,se=y&&ae!==!0,fe=V||R||se;return eC({deleteKeyCode:g,multiSelectionKeyCode:S}),d.jsx(aC,{onPaneContextMenu:c,elementsSelectable:_,zoomOnScroll:k,zoomOnPinch:j,panOnScroll:oe,panOnScrollSpeed:D,panOnScrollMode:z,zoomOnDoubleClick:O,panOnDrag:!V&&ae,defaultViewport:Z,translateExtent:ne,minZoom:Q,maxZoom:K,zoomActivationKeyCode:E,preventScrolling:te,noWheelClassName:G,noPanClassName:M,onViewportChange:B,isControlledViewport:Y,paneClickDistance:h,selectionOnDrag:se,children:d.jsxs(oC,{onSelectionStart:v,onSelectionEnd:w,onPaneClick:a,onPaneMouseEnter:l,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:u,panOnDrag:ae,isSelecting:!!fe,selectionMode:x,selectionKeyPressed:V,paneClickDistance:h,selectionOnDrag:se,children:[t,q&&d.jsx(vC,{onSelectionContextMenu:L,noPanClassName:M,disableKeyboardA11y:U})]})})}Z1.displayName="FlowRenderer";const wC=A.memo(Z1),SC=t=>a=>t?Uh(a.nodeLookup,{x:0,y:0,width:a.width,height:a.height},a.transform,!0).map(l=>l.id):Array.from(a.nodeLookup.keys());function NC(t){return Le(A.useCallback(SC(t),[t]),Pe)}const EC=t=>t.updateNodeInternals;function jC(){const t=Le(EC),[a]=A.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(l=>{const r=new Map;l.forEach(s=>{const c=s.target.getAttribute("data-id");r.set(c,{id:c,nodeElement:s.target,force:!0})}),t(r)}));return A.useEffect(()=>()=>{a==null||a.disconnect()},[a]),a}function _C({node:t,nodeType:a,hasDimensions:l,resizeObserver:r}){const s=Ie(),c=A.useRef(null),u=A.useRef(null),h=A.useRef(t.sourcePosition),g=A.useRef(t.targetPosition),p=A.useRef(a),y=l&&!!t.internals.handleBounds;return A.useEffect(()=>{c.current&&!t.hidden&&(!y||u.current!==c.current)&&(u.current&&(r==null||r.unobserve(u.current)),r==null||r.observe(c.current),u.current=c.current)},[y,t.hidden]),A.useEffect(()=>()=>{u.current&&(r==null||r.unobserve(u.current),u.current=null)},[]),A.useEffect(()=>{if(c.current){const x=p.current!==a,v=h.current!==t.sourcePosition,w=g.current!==t.targetPosition;(x||v||w)&&(p.current=a,h.current=t.sourcePosition,g.current=t.targetPosition,s.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:c.current,force:!0}]])))}},[t.id,a,t.sourcePosition,t.targetPosition]),c}function AC({id:t,onClick:a,onMouseEnter:l,onMouseMove:r,onMouseLeave:s,onContextMenu:c,onDoubleClick:u,nodesDraggable:h,elementsSelectable:g,nodesConnectable:p,nodesFocusable:y,resizeObserver:x,noDragClassName:v,noPanClassName:w,disableKeyboardA11y:S,rfId:N,nodeTypes:E,nodeClickDistance:_,onError:k}){const{node:j,internals:C,isParent:D}=Le(ce=>{const ue=ce.nodeLookup.get(t),Ee=ce.parentLookup.has(t);return{node:ue,internals:ue.internals,isParent:Ee}},Pe);let z=j.type||"default",O=(E==null?void 0:E[z])||my[z];O===void 0&&(k==null||k("003",zn.error003(z)),z="default",O=(E==null?void 0:E.default)||my.default);const H=!!(j.draggable||h&&typeof j.draggable>"u"),Z=!!(j.selectable||g&&typeof j.selectable>"u"),ne=!!(j.connectable||p&&typeof j.connectable>"u"),Q=!!(j.focusable||y&&typeof j.focusable>"u"),K=Ie(),te=p1(j),L=_C({node:j,nodeType:z,hasDimensions:te,resizeObserver:x}),G=q1({nodeRef:L,disabled:j.hidden||!H,noDragClassName:v,handleSelector:j.dragHandle,nodeId:t,isSelectable:Z,nodeClickDistance:_}),M=X1();if(j.hidden)return null;const U=fa(j),B=xC(j),Y=Z||H||a||l||r||s,q=l?ce=>l(ce,{...C.userNode}):void 0,R=r?ce=>r(ce,{...C.userNode}):void 0,V=s?ce=>s(ce,{...C.userNode}):void 0,W=c?ce=>c(ce,{...C.userNode}):void 0,ae=u?ce=>u(ce,{...C.userNode}):void 0,oe=ce=>{const{selectNodesOnDrag:ue,nodeDragThreshold:Ee}=K.getState();Z&&(!ue||!H||Ee>0)&&uh({id:t,store:K,nodeRef:L}),a&&a(ce,{...C.userNode})},se=ce=>{if(!(y1(ce.nativeEvent)||S)){if(r1.includes(ce.key)&&Z){const ue=ce.key==="Escape";uh({id:t,store:K,unselect:ue,nodeRef:L})}else if(H&&j.selected&&Object.prototype.hasOwnProperty.call(Sc,ce.key)){ce.preventDefault();const{ariaLabelConfig:ue}=K.getState();K.setState({ariaLiveMessage:ue["node.a11yDescription.ariaLiveMessage"]({direction:ce.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),M({direction:Sc[ce.key],factor:ce.shiftKey?4:1})}}},fe=()=>{var je;if(S||!((je=L.current)!=null&&je.matches(":focus-visible")))return;const{transform:ce,width:ue,height:Ee,autoPanOnNodeFocus:ye,setCenter:xe}=K.getState();if(!ye)return;Uh(new Map([[t,j]]),{x:0,y:0,width:ue,height:Ee},ce,!0).length>0||xe(j.position.x+U.width/2,j.position.y+U.height/2,{zoom:ce[2]})};return d.jsx("div",{className:st(["react-flow__node",`react-flow__node-${z}`,{[w]:H},j.className,{selected:j.selected,selectable:Z,parent:D,draggable:H,dragging:G}]),ref:L,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:Y?"all":"none",visibility:te?"visible":"hidden",...j.style,...B},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:q,onMouseMove:R,onMouseLeave:V,onContextMenu:W,onClick:oe,onDoubleClick:ae,onKeyDown:Q?se:void 0,tabIndex:Q?0:void 0,onFocus:Q?fe:void 0,role:j.ariaRole??(Q?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${H1}-${N}`,"aria-label":j.ariaLabel,...j.domAttributes,children:d.jsx(cC,{value:t,children:d.jsx(O,{id:t,data:j.data,type:z,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:j.selected??!1,selectable:Z,draggable:H,deletable:j.deletable??!0,isConnectable:ne,sourcePosition:j.sourcePosition,targetPosition:j.targetPosition,dragging:G,dragHandle:j.dragHandle,zIndex:C.z,parentId:j.parentId,...U})})})}var CC=A.memo(AC);const TC=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function Q1(t){const{nodesDraggable:a,nodesConnectable:l,nodesFocusable:r,elementsSelectable:s,onError:c}=Le(TC,Pe),u=NC(t.onlyRenderVisibleElements),h=jC();return d.jsx("div",{className:"react-flow__nodes",style:qc,children:u.map(g=>d.jsx(CC,{id:g,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:h,nodesDraggable:a,nodesConnectable:l,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:t.nodeClickDistance,onError:c},g))})}Q1.displayName="NodeRenderer";const MC=A.memo(Q1);function zC(t){return Le(A.useCallback(l=>{if(!t)return l.edges.map(s=>s.id);const r=[];if(l.width&&l.height)for(const s of l.edges){const c=l.nodeLookup.get(s.source),u=l.nodeLookup.get(s.target);c&&u&&_3({sourceNode:c,targetNode:u,width:l.width,height:l.height,transform:l.transform})&&r.push(s.id)}return r},[t]),Pe)}const OC=({color:t="none",strokeWidth:a=1})=>{const l={strokeWidth:a,...t&&{stroke:t}};return d.jsx("polyline",{className:"arrow",style:l,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},RC=({color:t="none",strokeWidth:a=1})=>{const l={strokeWidth:a,...t&&{stroke:t,fill:t}};return d.jsx("polyline",{className:"arrowclosed",style:l,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},gy={[vc.Arrow]:OC,[vc.ArrowClosed]:RC};function kC(t){const a=Ie();return A.useMemo(()=>{var s,c;return Object.prototype.hasOwnProperty.call(gy,t)?gy[t]:((c=(s=a.getState()).onError)==null||c.call(s,"009",zn.error009(t)),null)},[t])}const DC=({id:t,type:a,color:l,width:r=12.5,height:s=12.5,markerUnits:c="strokeWidth",strokeWidth:u,orient:h="auto-start-reverse"})=>{const g=kC(a);return g?d.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:h,refX:"0",refY:"0",children:d.jsx(g,{color:l,strokeWidth:u})}):null},K1=({defaultColor:t,rfId:a})=>{const l=Le(c=>c.edges),r=Le(c=>c.defaultEdgeOptions),s=A.useMemo(()=>k3(l,{id:a,defaultColor:t,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[l,r,a,t]);return s.length?d.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:d.jsx("defs",{children:s.map(c=>d.jsx(DC,{id:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,strokeWidth:c.strokeWidth,orient:c.orient},c.id))})}):null};K1.displayName="MarkerDefinitions";var LC=A.memo(K1);function F1({x:t,y:a,label:l,labelStyle:r,labelShowBg:s=!0,labelBgStyle:c,labelBgPadding:u=[2,4],labelBgBorderRadius:h=2,children:g,className:p,...y}){const[x,v]=A.useState({x:1,y:0,width:0,height:0}),w=st(["react-flow__edge-textwrapper",p]),S=A.useRef(null);return A.useEffect(()=>{if(S.current){const N=S.current.getBBox();v({x:N.x,y:N.y,width:N.width,height:N.height})}},[l]),l?d.jsxs("g",{transform:`translate(${t-x.width/2} ${a-x.height/2})`,className:w,visibility:x.width?"visible":"hidden",...y,children:[s&&d.jsx("rect",{width:x.width+2*u[0],x:-u[0],y:-u[1],height:x.height+2*u[1],className:"react-flow__edge-textbg",style:c,rx:h,ry:h}),d.jsx("text",{className:"react-flow__edge-text",y:x.height/2,dy:"0.3em",ref:S,style:r,children:l}),g]}):null}F1.displayName="EdgeText";const HC=A.memo(F1);function Xc({path:t,labelX:a,labelY:l,label:r,labelStyle:s,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:g,interactionWidth:p=20,...y}){return d.jsxs(d.Fragment,{children:[d.jsx("path",{...y,d:t,fill:"none",className:st(["react-flow__edge-path",y.className])}),p?d.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,r&&mn(a)&&mn(l)?d.jsx(HC,{x:a,y:l,label:r,labelStyle:s,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:g}):null]})}function xy({pos:t,x1:a,y1:l,x2:r,y2:s}){return t===ve.Left||t===ve.Right?[.5*(a+r),l]:[a,.5*(l+s)]}function P1({sourceX:t,sourceY:a,sourcePosition:l=ve.Bottom,targetX:r,targetY:s,targetPosition:c=ve.Top}){const[u,h]=xy({pos:l,x1:t,y1:a,x2:r,y2:s}),[g,p]=xy({pos:c,x1:r,y1:s,x2:t,y2:a}),[y,x,v,w]=b1({sourceX:t,sourceY:a,targetX:r,targetY:s,sourceControlX:u,sourceControlY:h,targetControlX:g,targetControlY:p});return[`M${t},${a} C${u},${h} ${g},${p} ${r},${s}`,y,x,v,w]}function I1(t){return A.memo(({id:a,sourceX:l,sourceY:r,targetX:s,targetY:c,sourcePosition:u,targetPosition:h,label:g,labelStyle:p,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:N,markerStart:E,interactionWidth:_})=>{const[k,j,C]=P1({sourceX:l,sourceY:r,sourcePosition:u,targetX:s,targetY:c,targetPosition:h}),D=t.isInternal?void 0:a;return d.jsx(Xc,{id:D,path:k,labelX:j,labelY:C,label:g,labelStyle:p,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:N,markerStart:E,interactionWidth:_})})}const BC=I1({isInternal:!1}),J1=I1({isInternal:!0});BC.displayName="SimpleBezierEdge";J1.displayName="SimpleBezierEdgeInternal";function W1(t){return A.memo(({id:a,sourceX:l,sourceY:r,targetX:s,targetY:c,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:v,sourcePosition:w=ve.Bottom,targetPosition:S=ve.Top,markerEnd:N,markerStart:E,pathOptions:_,interactionWidth:k})=>{const[j,C,D]=rh({sourceX:l,sourceY:r,sourcePosition:w,targetX:s,targetY:c,targetPosition:S,borderRadius:_==null?void 0:_.borderRadius,offset:_==null?void 0:_.offset,stepPosition:_==null?void 0:_.stepPosition}),z=t.isInternal?void 0:a;return d.jsx(Xc,{id:z,path:j,labelX:C,labelY:D,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:N,markerStart:E,interactionWidth:k})})}const eb=W1({isInternal:!1}),tb=W1({isInternal:!0});eb.displayName="SmoothStepEdge";tb.displayName="SmoothStepEdgeInternal";function nb(t){return A.memo(({id:a,...l})=>{var s;const r=t.isInternal?void 0:a;return d.jsx(eb,{...l,id:r,pathOptions:A.useMemo(()=>{var c;return{borderRadius:0,offset:(c=l.pathOptions)==null?void 0:c.offset}},[(s=l.pathOptions)==null?void 0:s.offset])})})}const UC=nb({isInternal:!1}),ab=nb({isInternal:!0});UC.displayName="StepEdge";ab.displayName="StepEdgeInternal";function ib(t){return A.memo(({id:a,sourceX:l,sourceY:r,targetX:s,targetY:c,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:w,markerStart:S,interactionWidth:N})=>{const[E,_,k]=N1({sourceX:l,sourceY:r,targetX:s,targetY:c}),j=t.isInternal?void 0:a;return d.jsx(Xc,{id:j,path:E,labelX:_,labelY:k,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:w,markerStart:S,interactionWidth:N})})}const VC=ib({isInternal:!1}),lb=ib({isInternal:!0});VC.displayName="StraightEdge";lb.displayName="StraightEdgeInternal";function rb(t){return A.memo(({id:a,sourceX:l,sourceY:r,targetX:s,targetY:c,sourcePosition:u=ve.Bottom,targetPosition:h=ve.Top,label:g,labelStyle:p,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:N,markerStart:E,pathOptions:_,interactionWidth:k})=>{const[j,C,D]=w1({sourceX:l,sourceY:r,sourcePosition:u,targetX:s,targetY:c,targetPosition:h,curvature:_==null?void 0:_.curvature}),z=t.isInternal?void 0:a;return d.jsx(Xc,{id:z,path:j,labelX:C,labelY:D,label:g,labelStyle:p,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:N,markerStart:E,interactionWidth:k})})}const $C=rb({isInternal:!1}),ob=rb({isInternal:!0});$C.displayName="BezierEdge";ob.displayName="BezierEdgeInternal";const yy={default:ob,straight:lb,step:ab,smoothstep:tb,simplebezier:J1},vy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},YC=(t,a,l)=>l===ve.Left?t-a:l===ve.Right?t+a:t,qC=(t,a,l)=>l===ve.Top?t-a:l===ve.Bottom?t+a:t,by="react-flow__edgeupdater";function wy({position:t,centerX:a,centerY:l,radius:r=10,onMouseDown:s,onMouseEnter:c,onMouseOut:u,type:h}){return d.jsx("circle",{onMouseDown:s,onMouseEnter:c,onMouseOut:u,className:st([by,`${by}-${h}`]),cx:YC(a,r,t),cy:qC(l,r,t),r,stroke:"transparent",fill:"transparent"})}function XC({isReconnectable:t,reconnectRadius:a,edge:l,sourceX:r,sourceY:s,targetX:c,targetY:u,sourcePosition:h,targetPosition:g,onReconnect:p,onReconnectStart:y,onReconnectEnd:x,setReconnecting:v,setUpdateHover:w}){const S=Ie(),N=(C,D)=>{if(C.button!==0)return;const{autoPanOnConnect:z,domNode:O,connectionMode:H,connectionRadius:Z,lib:ne,onConnectStart:Q,cancelConnection:K,nodeLookup:te,rfId:L,panBy:G,updateConnection:M}=S.getState(),U=D.type==="target",B=(R,V)=>{v(!1),x==null||x(R,l,D.type,V)},Y=R=>p==null?void 0:p(l,R),q=(R,V)=>{v(!0),y==null||y(C,l,D.type),Q==null||Q(R,V)};ch.onPointerDown(C.nativeEvent,{autoPanOnConnect:z,connectionMode:H,connectionRadius:Z,domNode:O,handleId:D.id,nodeId:D.nodeId,nodeLookup:te,isTarget:U,edgeUpdaterType:D.type,lib:ne,flowId:L,cancelConnection:K,panBy:G,isValidConnection:(...R)=>{var V,W;return((W=(V=S.getState()).isValidConnection)==null?void 0:W.call(V,...R))??!0},onConnect:Y,onConnectStart:q,onConnectEnd:(...R)=>{var V,W;return(W=(V=S.getState()).onConnectEnd)==null?void 0:W.call(V,...R)},onReconnectEnd:B,updateConnection:M,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},E=C=>N(C,{nodeId:l.target,id:l.targetHandle??null,type:"target"}),_=C=>N(C,{nodeId:l.source,id:l.sourceHandle??null,type:"source"}),k=()=>w(!0),j=()=>w(!1);return d.jsxs(d.Fragment,{children:[(t===!0||t==="source")&&d.jsx(wy,{position:h,centerX:r,centerY:s,radius:a,onMouseDown:E,onMouseEnter:k,onMouseOut:j,type:"source"}),(t===!0||t==="target")&&d.jsx(wy,{position:g,centerX:c,centerY:u,radius:a,onMouseDown:_,onMouseEnter:k,onMouseOut:j,type:"target"})]})}function GC({id:t,edgesFocusable:a,edgesReconnectable:l,elementsSelectable:r,onClick:s,onDoubleClick:c,onContextMenu:u,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,reconnectRadius:y,onReconnect:x,onReconnectStart:v,onReconnectEnd:w,rfId:S,edgeTypes:N,noPanClassName:E,onError:_,disableKeyboardA11y:k}){let j=Le(xe=>xe.edgeLookup.get(t));const C=Le(xe=>xe.defaultEdgeOptions);j=C?{...C,...j}:j;let D=j.type||"default",z=(N==null?void 0:N[D])||yy[D];z===void 0&&(_==null||_("011",zn.error011(D)),D="default",z=(N==null?void 0:N.default)||yy.default);const O=!!(j.focusable||a&&typeof j.focusable>"u"),H=typeof x<"u"&&(j.reconnectable||l&&typeof j.reconnectable>"u"),Z=!!(j.selectable||r&&typeof j.selectable>"u"),ne=A.useRef(null),[Q,K]=A.useState(!1),[te,L]=A.useState(!1),G=Ie(),{zIndex:M,sourceX:U,sourceY:B,targetX:Y,targetY:q,sourcePosition:R,targetPosition:V}=Le(A.useCallback(xe=>{const me=xe.nodeLookup.get(j.source),je=xe.nodeLookup.get(j.target);if(!me||!je)return{zIndex:j.zIndex,...vy};const Ue=R3({id:t,sourceNode:me,targetNode:je,sourceHandle:j.sourceHandle||null,targetHandle:j.targetHandle||null,connectionMode:xe.connectionMode,onError:_});return{zIndex:j3({selected:j.selected,zIndex:j.zIndex,sourceNode:me,targetNode:je,elevateOnSelect:xe.elevateEdgesOnSelect,zIndexMode:xe.zIndexMode}),...Ue||vy}},[j.source,j.target,j.sourceHandle,j.targetHandle,j.selected,j.zIndex]),Pe),W=A.useMemo(()=>j.markerStart?`url('#${oh(j.markerStart,S)}')`:void 0,[j.markerStart,S]),ae=A.useMemo(()=>j.markerEnd?`url('#${oh(j.markerEnd,S)}')`:void 0,[j.markerEnd,S]);if(j.hidden||U===null||B===null||Y===null||q===null)return null;const oe=xe=>{var Me;const{addSelectedEdges:me,unselectNodesAndEdges:je,multiSelectionActive:Ue}=G.getState();Z&&(G.setState({nodesSelectionActive:!1}),j.selected&&Ue?(je({nodes:[],edges:[j]}),(Me=ne.current)==null||Me.blur()):me([t])),s&&s(xe,j)},se=c?xe=>{c(xe,{...j})}:void 0,fe=u?xe=>{u(xe,{...j})}:void 0,ce=h?xe=>{h(xe,{...j})}:void 0,ue=g?xe=>{g(xe,{...j})}:void 0,Ee=p?xe=>{p(xe,{...j})}:void 0,ye=xe=>{var me;if(!k&&r1.includes(xe.key)&&Z){const{unselectNodesAndEdges:je,addSelectedEdges:Ue}=G.getState();xe.key==="Escape"?((me=ne.current)==null||me.blur(),je({edges:[j]})):Ue([t])}};return d.jsx("svg",{style:{zIndex:M},children:d.jsxs("g",{className:st(["react-flow__edge",`react-flow__edge-${D}`,j.className,E,{selected:j.selected,animated:j.animated,inactive:!Z&&!s,updating:Q,selectable:Z}]),onClick:oe,onDoubleClick:se,onContextMenu:fe,onMouseEnter:ce,onMouseMove:ue,onMouseLeave:Ee,onKeyDown:O?ye:void 0,tabIndex:O?0:void 0,role:j.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":j.ariaLabel===null?void 0:j.ariaLabel||`Edge from ${j.source} to ${j.target}`,"aria-describedby":O?`${B1}-${S}`:void 0,ref:ne,...j.domAttributes,children:[!te&&d.jsx(z,{id:t,source:j.source,target:j.target,type:j.type,selected:j.selected,animated:j.animated,selectable:Z,deletable:j.deletable??!0,label:j.label,labelStyle:j.labelStyle,labelShowBg:j.labelShowBg,labelBgStyle:j.labelBgStyle,labelBgPadding:j.labelBgPadding,labelBgBorderRadius:j.labelBgBorderRadius,sourceX:U,sourceY:B,targetX:Y,targetY:q,sourcePosition:R,targetPosition:V,data:j.data,style:j.style,sourceHandleId:j.sourceHandle,targetHandleId:j.targetHandle,markerStart:W,markerEnd:ae,pathOptions:"pathOptions"in j?j.pathOptions:void 0,interactionWidth:j.interactionWidth}),H&&d.jsx(XC,{edge:j,isReconnectable:H,reconnectRadius:y,onReconnect:x,onReconnectStart:v,onReconnectEnd:w,sourceX:U,sourceY:B,targetX:Y,targetY:q,sourcePosition:R,targetPosition:V,setUpdateHover:K,setReconnecting:L})]})})}var ZC=A.memo(GC);const QC=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function sb({defaultMarkerColor:t,onlyRenderVisibleElements:a,rfId:l,edgeTypes:r,noPanClassName:s,onReconnect:c,onEdgeContextMenu:u,onEdgeMouseEnter:h,onEdgeMouseMove:g,onEdgeMouseLeave:p,onEdgeClick:y,reconnectRadius:x,onEdgeDoubleClick:v,onReconnectStart:w,onReconnectEnd:S,disableKeyboardA11y:N}){const{edgesFocusable:E,edgesReconnectable:_,elementsSelectable:k,onError:j}=Le(QC,Pe),C=zC(a);return d.jsxs("div",{className:"react-flow__edges",children:[d.jsx(LC,{defaultColor:t,rfId:l}),C.map(D=>d.jsx(ZC,{id:D,edgesFocusable:E,edgesReconnectable:_,elementsSelectable:k,noPanClassName:s,onReconnect:c,onContextMenu:u,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,onClick:y,reconnectRadius:x,onDoubleClick:v,onReconnectStart:w,onReconnectEnd:S,rfId:l,onError:j,edgeTypes:r,disableKeyboardA11y:N},D))]})}sb.displayName="EdgeRenderer";const KC=A.memo(sb),FC=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function PC({children:t}){const a=Le(FC);return d.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:a},children:t})}function IC(t){const a=Qh(),l=A.useRef(!1);A.useEffect(()=>{!l.current&&a.viewportInitialized&&t&&(setTimeout(()=>t(a),1),l.current=!0)},[t,a.viewportInitialized])}const JC=t=>{var a;return(a=t.panZoom)==null?void 0:a.syncViewport};function WC(t){const a=Le(JC),l=Ie();return A.useEffect(()=>{t&&(a==null||a(t),l.setState({transform:[t.x,t.y,t.zoom]}))},[t,a]),null}function eT(t){return t.connection.inProgress?{...t.connection,to:ho(t.connection.to,t.transform)}:{...t.connection}}function tT(t){return eT}function nT(t){const a=tT();return Le(a,Pe)}const aT=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function iT({containerStyle:t,style:a,type:l,component:r}){const{nodesConnectable:s,width:c,height:u,isValid:h,inProgress:g}=Le(aT,Pe);return!(c&&s&&g)?null:d.jsx("svg",{style:t,width:c,height:u,className:"react-flow__connectionline react-flow__container",children:d.jsx("g",{className:st(["react-flow__connection",c1(h)]),children:d.jsx(cb,{style:a,type:l,CustomComponent:r,isValid:h})})})}const cb=({style:t,type:a=Za.Bezier,CustomComponent:l,isValid:r})=>{const{inProgress:s,from:c,fromNode:u,fromHandle:h,fromPosition:g,to:p,toNode:y,toHandle:x,toPosition:v,pointer:w}=nT();if(!s)return;if(l)return d.jsx(l,{connectionLineType:a,connectionLineStyle:t,fromNode:u,fromHandle:h,fromX:c.x,fromY:c.y,toX:p.x,toY:p.y,fromPosition:g,toPosition:v,connectionStatus:c1(r),toNode:y,toHandle:x,pointer:w});let S="";const N={sourceX:c.x,sourceY:c.y,sourcePosition:g,targetX:p.x,targetY:p.y,targetPosition:v};switch(a){case Za.Bezier:[S]=w1(N);break;case Za.SimpleBezier:[S]=P1(N);break;case Za.Step:[S]=rh({...N,borderRadius:0});break;case Za.SmoothStep:[S]=rh(N);break;default:[S]=N1(N)}return d.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};cb.displayName="ConnectionLine";const lT={};function Sy(t=lT){A.useRef(t),Ie(),A.useEffect(()=>{},[t])}function rT(){Ie(),A.useRef(!1),A.useEffect(()=>{},[])}function ub({nodeTypes:t,edgeTypes:a,onInit:l,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:y,onSelectionContextMenu:x,onSelectionStart:v,onSelectionEnd:w,connectionLineType:S,connectionLineStyle:N,connectionLineComponent:E,connectionLineContainerStyle:_,selectionKeyCode:k,selectionOnDrag:j,selectionMode:C,multiSelectionKeyCode:D,panActivationKeyCode:z,zoomActivationKeyCode:O,deleteKeyCode:H,onlyRenderVisibleElements:Z,elementsSelectable:ne,defaultViewport:Q,translateExtent:K,minZoom:te,maxZoom:L,preventScrolling:G,defaultMarkerColor:M,zoomOnScroll:U,zoomOnPinch:B,panOnScroll:Y,panOnScrollSpeed:q,panOnScrollMode:R,zoomOnDoubleClick:V,panOnDrag:W,onPaneClick:ae,onPaneMouseEnter:oe,onPaneMouseMove:se,onPaneMouseLeave:fe,onPaneScroll:ce,onPaneContextMenu:ue,paneClickDistance:Ee,nodeClickDistance:ye,onEdgeContextMenu:xe,onEdgeMouseEnter:me,onEdgeMouseMove:je,onEdgeMouseLeave:Ue,reconnectRadius:Me,onReconnect:nt,onReconnectStart:Lt,onReconnectEnd:ht,noDragClassName:rn,noWheelClassName:Dn,noPanClassName:ei,disableKeyboardA11y:ti,nodeExtent:pt,rfId:Hi,viewport:Ln,onViewportChange:da}){return Sy(t),Sy(a),rT(),IC(l),WC(Ln),d.jsx(wC,{onPaneClick:ae,onPaneMouseEnter:oe,onPaneMouseMove:se,onPaneMouseLeave:fe,onPaneContextMenu:ue,onPaneScroll:ce,paneClickDistance:Ee,deleteKeyCode:H,selectionKeyCode:k,selectionOnDrag:j,selectionMode:C,onSelectionStart:v,onSelectionEnd:w,multiSelectionKeyCode:D,panActivationKeyCode:z,zoomActivationKeyCode:O,elementsSelectable:ne,zoomOnScroll:U,zoomOnPinch:B,zoomOnDoubleClick:V,panOnScroll:Y,panOnScrollSpeed:q,panOnScrollMode:R,panOnDrag:W,defaultViewport:Q,translateExtent:K,minZoom:te,maxZoom:L,onSelectionContextMenu:x,preventScrolling:G,noDragClassName:rn,noWheelClassName:Dn,noPanClassName:ei,disableKeyboardA11y:ti,onViewportChange:da,isControlledViewport:!!Ln,children:d.jsxs(PC,{children:[d.jsx(KC,{edgeTypes:a,onEdgeClick:s,onEdgeDoubleClick:u,onReconnect:nt,onReconnectStart:Lt,onReconnectEnd:ht,onlyRenderVisibleElements:Z,onEdgeContextMenu:xe,onEdgeMouseEnter:me,onEdgeMouseMove:je,onEdgeMouseLeave:Ue,reconnectRadius:Me,defaultMarkerColor:M,noPanClassName:ei,disableKeyboardA11y:ti,rfId:Hi}),d.jsx(iT,{style:N,type:S,component:E,containerStyle:_}),d.jsx("div",{className:"react-flow__edgelabel-renderer"}),d.jsx(MC,{nodeTypes:t,onNodeClick:r,onNodeDoubleClick:c,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:y,nodeClickDistance:ye,onlyRenderVisibleElements:Z,noPanClassName:ei,noDragClassName:rn,disableKeyboardA11y:ti,nodeExtent:pt,rfId:Hi}),d.jsx("div",{className:"react-flow__viewport-portal"})]})})}ub.displayName="GraphView";const oT=A.memo(ub),Ny=({nodes:t,edges:a,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:g=.5,maxZoom:p=2,nodeOrigin:y,nodeExtent:x,zIndexMode:v="basic"}={})=>{const w=new Map,S=new Map,N=new Map,E=new Map,_=r??a??[],k=l??t??[],j=y??[0,0],C=x??Jr;_1(N,E,_);const D=sh(k,w,S,{nodeOrigin:j,nodeExtent:C,zIndexMode:v});let z=[0,0,1];if(u&&s&&c){const O=uo(w,{filter:Q=>!!((Q.width||Q.initialWidth)&&(Q.height||Q.initialHeight))}),{x:H,y:Z,zoom:ne}=Vh(O,s,c,g,p,(h==null?void 0:h.padding)??.1);z=[H,Z,ne]}return{rfId:"1",width:s??0,height:c??0,transform:z,nodes:k,nodesInitialized:D,nodeLookup:w,parentLookup:S,edges:_,edgeLookup:E,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:l!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:g,maxZoom:p,translateExtent:Jr,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Rl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:j,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:u??!1,fitViewOptions:h,fitViewResolver:null,connection:{...s1},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:v3,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:o1,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},sT=({nodes:t,edges:a,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:y,nodeExtent:x,zIndexMode:v})=>NA((w,S)=>{async function N(){const{nodeLookup:E,panZoom:_,fitViewOptions:k,fitViewResolver:j,width:C,height:D,minZoom:z,maxZoom:O}=S();_&&(await x3({nodes:E,width:C,height:D,panZoom:_,minZoom:z,maxZoom:O},k),j==null||j.resolve(!0),w({fitViewResolver:null}))}return{...Ny({nodes:t,edges:a,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:y,nodeExtent:x,defaultNodes:l,defaultEdges:r,zIndexMode:v}),setNodes:E=>{const{nodeLookup:_,parentLookup:k,nodeOrigin:j,elevateNodesOnSelect:C,fitViewQueued:D,zIndexMode:z}=S(),O=sh(E,_,k,{nodeOrigin:j,nodeExtent:x,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:z});D&&O?(N(),w({nodes:E,nodesInitialized:O,fitViewQueued:!1,fitViewOptions:void 0})):w({nodes:E,nodesInitialized:O})},setEdges:E=>{const{connectionLookup:_,edgeLookup:k}=S();_1(_,k,E),w({edges:E})},setDefaultNodesAndEdges:(E,_)=>{if(E){const{setNodes:k}=S();k(E),w({hasDefaultNodes:!0})}if(_){const{setEdges:k}=S();k(_),w({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:_,nodeLookup:k,parentLookup:j,domNode:C,nodeOrigin:D,nodeExtent:z,debug:O,fitViewQueued:H,zIndexMode:Z}=S(),{changes:ne,updatedInternals:Q}=$3(E,k,j,C,D,z,Z);Q&&(H3(k,j,{nodeOrigin:D,nodeExtent:z,zIndexMode:Z}),H?(N(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),(ne==null?void 0:ne.length)>0&&(O&&console.log("React Flow: trigger node changes",ne),_==null||_(ne)))},updateNodePositions:(E,_=!1)=>{const k=[];let j=[];const{nodeLookup:C,triggerNodeChanges:D,connection:z,updateConnection:O,onNodesChangeMiddlewareMap:H}=S();for(const[Z,ne]of E){const Q=C.get(Z),K=!!(Q!=null&&Q.expandParent&&(Q!=null&&Q.parentId)&&(ne!=null&&ne.position)),te={id:Z,type:"position",position:K?{x:Math.max(0,ne.position.x),y:Math.max(0,ne.position.y)}:ne.position,dragging:_};if(Q&&z.inProgress&&z.fromNode.id===Q.id){const L=ki(Q,z.fromHandle,ve.Left,!0);O({...z,from:L})}K&&Q.parentId&&k.push({id:Z,parentId:Q.parentId,rect:{...ne.internals.positionAbsolute,width:ne.measured.width??0,height:ne.measured.height??0}}),j.push(te)}if(k.length>0){const{parentLookup:Z,nodeOrigin:ne}=S(),Q=Zh(k,C,Z,ne);j.push(...Q)}for(const Z of H.values())j=Z(j);D(j)},triggerNodeChanges:E=>{const{onNodesChange:_,setNodes:k,nodes:j,hasDefaultNodes:C,debug:D}=S();if(E!=null&&E.length){if(C){const z=GA(E,j);k(z)}D&&console.log("React Flow: trigger node changes",E),_==null||_(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:_,setEdges:k,edges:j,hasDefaultEdges:C,debug:D}=S();if(E!=null&&E.length){if(C){const z=ZA(E,j);k(z)}D&&console.log("React Flow: trigger edge changes",E),_==null||_(E)}},addSelectedNodes:E=>{const{multiSelectionActive:_,edgeLookup:k,nodeLookup:j,triggerNodeChanges:C,triggerEdgeChanges:D}=S();if(_){const z=E.map(O=>_i(O,!0));C(z);return}C(_l(j,new Set([...E]),!0)),D(_l(k))},addSelectedEdges:E=>{const{multiSelectionActive:_,edgeLookup:k,nodeLookup:j,triggerNodeChanges:C,triggerEdgeChanges:D}=S();if(_){const z=E.map(O=>_i(O,!0));D(z);return}D(_l(k,new Set([...E]))),C(_l(j,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:_}={})=>{const{edges:k,nodes:j,nodeLookup:C,triggerNodeChanges:D,triggerEdgeChanges:z}=S(),O=E||j,H=_||k,Z=[];for(const Q of O){if(!Q.selected)continue;const K=C.get(Q.id);K&&(K.selected=!1),Z.push(_i(Q.id,!1))}const ne=[];for(const Q of H)Q.selected&&ne.push(_i(Q.id,!1));D(Z),z(ne)},setMinZoom:E=>{const{panZoom:_,maxZoom:k}=S();_==null||_.setScaleExtent([E,k]),w({minZoom:E})},setMaxZoom:E=>{const{panZoom:_,minZoom:k}=S();_==null||_.setScaleExtent([k,E]),w({maxZoom:E})},setTranslateExtent:E=>{var _;(_=S().panZoom)==null||_.setTranslateExtent(E),w({translateExtent:E})},resetSelectedElements:()=>{const{edges:E,nodes:_,triggerNodeChanges:k,triggerEdgeChanges:j,elementsSelectable:C}=S();if(!C)return;const D=_.reduce((O,H)=>H.selected?[...O,_i(H.id,!1)]:O,[]),z=E.reduce((O,H)=>H.selected?[...O,_i(H.id,!1)]:O,[]);k(D),j(z)},setNodeExtent:E=>{const{nodes:_,nodeLookup:k,parentLookup:j,nodeOrigin:C,elevateNodesOnSelect:D,nodeExtent:z,zIndexMode:O}=S();E[0][0]===z[0][0]&&E[0][1]===z[0][1]&&E[1][0]===z[1][0]&&E[1][1]===z[1][1]||(sh(_,k,j,{nodeOrigin:C,nodeExtent:E,elevateNodesOnSelect:D,checkEquality:!1,zIndexMode:O}),w({nodeExtent:E}))},panBy:E=>{const{transform:_,width:k,height:j,panZoom:C,translateExtent:D}=S();return Y3({delta:E,panZoom:C,transform:_,translateExtent:D,width:k,height:j})},setCenter:async(E,_,k)=>{const{width:j,height:C,maxZoom:D,panZoom:z}=S();if(!z)return Promise.resolve(!1);const O=typeof(k==null?void 0:k.zoom)<"u"?k.zoom:D;return await z.setViewport({x:j/2-E*O,y:C/2-_*O,zoom:O},{duration:k==null?void 0:k.duration,ease:k==null?void 0:k.ease,interpolate:k==null?void 0:k.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{w({connection:{...s1}})},updateConnection:E=>{w({connection:E})},reset:()=>w({...Ny()})}},Object.is);function cT({initialNodes:t,initialEdges:a,defaultNodes:l,defaultEdges:r,initialWidth:s,initialHeight:c,initialMinZoom:u,initialMaxZoom:h,initialFitViewOptions:g,fitView:p,nodeOrigin:y,nodeExtent:x,zIndexMode:v,children:w}){const[S]=A.useState(()=>sT({nodes:t,edges:a,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:p,minZoom:u,maxZoom:h,fitViewOptions:g,nodeOrigin:y,nodeExtent:x,zIndexMode:v}));return d.jsx(jA,{value:S,children:d.jsx(PA,{children:w})})}function uT({children:t,nodes:a,edges:l,defaultNodes:r,defaultEdges:s,width:c,height:u,fitView:h,fitViewOptions:g,minZoom:p,maxZoom:y,nodeOrigin:x,nodeExtent:v,zIndexMode:w}){return A.useContext($c)?d.jsx(d.Fragment,{children:t}):d.jsx(cT,{initialNodes:a,initialEdges:l,defaultNodes:r,defaultEdges:s,initialWidth:c,initialHeight:u,fitView:h,initialFitViewOptions:g,initialMinZoom:p,initialMaxZoom:y,nodeOrigin:x,nodeExtent:v,zIndexMode:w,children:t})}const fT={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function dT({nodes:t,edges:a,defaultNodes:l,defaultEdges:r,className:s,nodeTypes:c,edgeTypes:u,onNodeClick:h,onEdgeClick:g,onInit:p,onMove:y,onMoveStart:x,onMoveEnd:v,onConnect:w,onConnectStart:S,onConnectEnd:N,onClickConnectStart:E,onClickConnectEnd:_,onNodeMouseEnter:k,onNodeMouseMove:j,onNodeMouseLeave:C,onNodeContextMenu:D,onNodeDoubleClick:z,onNodeDragStart:O,onNodeDrag:H,onNodeDragStop:Z,onNodesDelete:ne,onEdgesDelete:Q,onDelete:K,onSelectionChange:te,onSelectionDragStart:L,onSelectionDrag:G,onSelectionDragStop:M,onSelectionContextMenu:U,onSelectionStart:B,onSelectionEnd:Y,onBeforeDelete:q,connectionMode:R,connectionLineType:V=Za.Bezier,connectionLineStyle:W,connectionLineComponent:ae,connectionLineContainerStyle:oe,deleteKeyCode:se="Backspace",selectionKeyCode:fe="Shift",selectionOnDrag:ce=!1,selectionMode:ue=Wr.Full,panActivationKeyCode:Ee="Space",multiSelectionKeyCode:ye=to()?"Meta":"Control",zoomActivationKeyCode:xe=to()?"Meta":"Control",snapToGrid:me,snapGrid:je,onlyRenderVisibleElements:Ue=!1,selectNodesOnDrag:Me,nodesDraggable:nt,autoPanOnNodeFocus:Lt,nodesConnectable:ht,nodesFocusable:rn,nodeOrigin:Dn=U1,edgesFocusable:ei,edgesReconnectable:ti,elementsSelectable:pt=!0,defaultViewport:Hi=BA,minZoom:Ln=.5,maxZoom:da=2,translateExtent:ni=Jr,preventScrolling:tu=!0,nodeExtent:Bi,defaultMarkerColor:nu="#b1b1b7",zoomOnScroll:au=!0,zoomOnPinch:ai=!0,panOnScroll:Nt=!1,panOnScrollSpeed:bn=.5,panOnScrollMode:Et=Ti.Free,zoomOnDoubleClick:iu=!0,panOnDrag:lu=!0,onPaneClick:ru,onPaneMouseEnter:Ui,onPaneMouseMove:Vi,onPaneMouseLeave:$i,onPaneScroll:Hn,onPaneContextMenu:Yi,paneClickDistance:ii=1,nodeClickDistance:ou=0,children:xo,onReconnect:Xl,onReconnectStart:li,onReconnectEnd:su,onEdgeContextMenu:yo,onEdgeDoubleClick:vo,onEdgeMouseEnter:bo,onEdgeMouseMove:Gl,onEdgeMouseLeave:Zl,reconnectRadius:wo=10,onNodesChange:So,onEdgesChange:wn,noDragClassName:ct="nodrag",noWheelClassName:wt="nowheel",noPanClassName:Bn="nopan",fitView:qi,fitViewOptions:No,connectOnClick:cu,attributionPosition:Eo,proOptions:ri,defaultEdgeOptions:Ql,elevateNodesOnSelect:ha=!0,elevateEdgesOnSelect:ma=!1,disableKeyboardA11y:pa=!1,autoPanOnConnect:ga,autoPanOnNodeDrag:at,autoPanSpeed:jo,connectionRadius:_o,isValidConnection:Un,onError:xa,style:uu,id:Kl,nodeDragThreshold:Ao,connectionDragThreshold:fu,viewport:Xi,onViewportChange:Gi,width:on,height:_t,colorMode:Co="light",debug:du,onScroll:ya,ariaLabelConfig:To,zIndexMode:oi="basic",...hu},At){const si=Kl||"1",Mo=YA(Co),Fl=A.useCallback(Vn=>{Vn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ya==null||ya(Vn)},[ya]);return d.jsx("div",{"data-testid":"rf__wrapper",...hu,onScroll:Fl,style:{...uu,...fT},ref:At,className:st(["react-flow",s,Mo]),id:Kl,role:"application",children:d.jsxs(uT,{nodes:t,edges:a,width:on,height:_t,fitView:qi,fitViewOptions:No,minZoom:Ln,maxZoom:da,nodeOrigin:Dn,nodeExtent:Bi,zIndexMode:oi,children:[d.jsx(oT,{onInit:p,onNodeClick:h,onEdgeClick:g,onNodeMouseEnter:k,onNodeMouseMove:j,onNodeMouseLeave:C,onNodeContextMenu:D,onNodeDoubleClick:z,nodeTypes:c,edgeTypes:u,connectionLineType:V,connectionLineStyle:W,connectionLineComponent:ae,connectionLineContainerStyle:oe,selectionKeyCode:fe,selectionOnDrag:ce,selectionMode:ue,deleteKeyCode:se,multiSelectionKeyCode:ye,panActivationKeyCode:Ee,zoomActivationKeyCode:xe,onlyRenderVisibleElements:Ue,defaultViewport:Hi,translateExtent:ni,minZoom:Ln,maxZoom:da,preventScrolling:tu,zoomOnScroll:au,zoomOnPinch:ai,zoomOnDoubleClick:iu,panOnScroll:Nt,panOnScrollSpeed:bn,panOnScrollMode:Et,panOnDrag:lu,onPaneClick:ru,onPaneMouseEnter:Ui,onPaneMouseMove:Vi,onPaneMouseLeave:$i,onPaneScroll:Hn,onPaneContextMenu:Yi,paneClickDistance:ii,nodeClickDistance:ou,onSelectionContextMenu:U,onSelectionStart:B,onSelectionEnd:Y,onReconnect:Xl,onReconnectStart:li,onReconnectEnd:su,onEdgeContextMenu:yo,onEdgeDoubleClick:vo,onEdgeMouseEnter:bo,onEdgeMouseMove:Gl,onEdgeMouseLeave:Zl,reconnectRadius:wo,defaultMarkerColor:nu,noDragClassName:ct,noWheelClassName:wt,noPanClassName:Bn,rfId:si,disableKeyboardA11y:pa,nodeExtent:Bi,viewport:Xi,onViewportChange:Gi}),d.jsx($A,{nodes:t,edges:a,defaultNodes:l,defaultEdges:r,onConnect:w,onConnectStart:S,onConnectEnd:N,onClickConnectStart:E,onClickConnectEnd:_,nodesDraggable:nt,autoPanOnNodeFocus:Lt,nodesConnectable:ht,nodesFocusable:rn,edgesFocusable:ei,edgesReconnectable:ti,elementsSelectable:pt,elevateNodesOnSelect:ha,elevateEdgesOnSelect:ma,minZoom:Ln,maxZoom:da,nodeExtent:Bi,onNodesChange:So,onEdgesChange:wn,snapToGrid:me,snapGrid:je,connectionMode:R,translateExtent:ni,connectOnClick:cu,defaultEdgeOptions:Ql,fitView:qi,fitViewOptions:No,onNodesDelete:ne,onEdgesDelete:Q,onDelete:K,onNodeDragStart:O,onNodeDrag:H,onNodeDragStop:Z,onSelectionDrag:G,onSelectionDragStart:L,onSelectionDragStop:M,onMove:y,onMoveStart:x,onMoveEnd:v,noPanClassName:Bn,nodeOrigin:Dn,rfId:si,autoPanOnConnect:ga,autoPanOnNodeDrag:at,autoPanSpeed:jo,onError:xa,connectionRadius:_o,isValidConnection:Un,selectNodesOnDrag:Me,nodeDragThreshold:Ao,connectionDragThreshold:fu,onBeforeDelete:q,debug:du,ariaLabelConfig:To,zIndexMode:oi}),d.jsx(HA,{onSelectionChange:te}),xo,d.jsx(OA,{proOptions:ri,position:Eo}),d.jsx(zA,{rfId:si,disableKeyboardA11y:pa})]})})}var hT=$1(dT);function mT({dimensions:t,lineWidth:a,variant:l,className:r}){return d.jsx("path",{strokeWidth:a,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:st(["react-flow__background-pattern",l,r])})}function pT({radius:t,className:a}){return d.jsx("circle",{cx:t,cy:t,r:t,className:st(["react-flow__background-pattern","dots",a])})}var Qa;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Qa||(Qa={}));const gT={[Qa.Dots]:1,[Qa.Lines]:1,[Qa.Cross]:6},xT=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function fb({id:t,variant:a=Qa.Dots,gap:l=20,size:r,lineWidth:s=1,offset:c=0,color:u,bgColor:h,style:g,className:p,patternClassName:y}){const x=A.useRef(null),{transform:v,patternId:w}=Le(xT,Pe),S=r||gT[a],N=a===Qa.Dots,E=a===Qa.Cross,_=Array.isArray(l)?l:[l,l],k=[_[0]*v[2]||1,_[1]*v[2]||1],j=S*v[2],C=Array.isArray(c)?c:[c,c],D=E?[j,j]:k,z=[C[0]*v[2]||1+D[0]/2,C[1]*v[2]||1+D[1]/2],O=`${w}${t||""}`;return d.jsxs("svg",{className:st(["react-flow__background",p]),style:{...g,...qc,"--xy-background-color-props":h,"--xy-background-pattern-color-props":u},ref:x,"data-testid":"rf__background",children:[d.jsx("pattern",{id:O,x:v[0]%k[0],y:v[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:N?d.jsx(pT,{radius:j/2,className:y}):d.jsx(mT,{dimensions:D,lineWidth:s,variant:a,className:y})}),d.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}fb.displayName="Background";const yT=A.memo(fb);function vT(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:d.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function bT(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:d.jsx("path",{d:"M0 0h32v4.2H0z"})})}function wT(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:d.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function ST(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:d.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function NT(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:d.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Is({children:t,className:a,...l}){return d.jsx("button",{type:"button",className:st(["react-flow__controls-button",a]),...l,children:t})}const ET=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function db({style:t,showZoom:a=!0,showFitView:l=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:c,onZoomOut:u,onFitView:h,onInteractiveChange:g,className:p,children:y,position:x="bottom-left",orientation:v="vertical","aria-label":w}){const S=Ie(),{isInteractive:N,minZoomReached:E,maxZoomReached:_,ariaLabelConfig:k}=Le(ET,Pe),{zoomIn:j,zoomOut:C,fitView:D}=Qh(),z=()=>{j(),c==null||c()},O=()=>{C(),u==null||u()},H=()=>{D(s),h==null||h()},Z=()=>{S.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),g==null||g(!N)},ne=v==="horizontal"?"horizontal":"vertical";return d.jsxs(Yc,{className:st(["react-flow__controls",ne,p]),position:x,style:t,"data-testid":"rf__controls","aria-label":w??k["controls.ariaLabel"],children:[a&&d.jsxs(d.Fragment,{children:[d.jsx(Is,{onClick:z,className:"react-flow__controls-zoomin",title:k["controls.zoomIn.ariaLabel"],"aria-label":k["controls.zoomIn.ariaLabel"],disabled:_,children:d.jsx(vT,{})}),d.jsx(Is,{onClick:O,className:"react-flow__controls-zoomout",title:k["controls.zoomOut.ariaLabel"],"aria-label":k["controls.zoomOut.ariaLabel"],disabled:E,children:d.jsx(bT,{})})]}),l&&d.jsx(Is,{className:"react-flow__controls-fitview",onClick:H,title:k["controls.fitView.ariaLabel"],"aria-label":k["controls.fitView.ariaLabel"],children:d.jsx(wT,{})}),r&&d.jsx(Is,{className:"react-flow__controls-interactive",onClick:Z,title:k["controls.interactive.ariaLabel"],"aria-label":k["controls.interactive.ariaLabel"],children:N?d.jsx(NT,{}):d.jsx(ST,{})}),y]})}db.displayName="Controls";A.memo(db);function jT({id:t,x:a,y:l,width:r,height:s,style:c,color:u,strokeColor:h,strokeWidth:g,className:p,borderRadius:y,shapeRendering:x,selected:v,onClick:w}){const{background:S,backgroundColor:N}=c||{},E=u||S||N;return d.jsx("rect",{className:st(["react-flow__minimap-node",{selected:v},p]),x:a,y:l,rx:y,ry:y,width:r,height:s,style:{fill:E,stroke:h,strokeWidth:g},shapeRendering:x,onClick:w?_=>w(_,t):void 0})}const _T=A.memo(jT),AT=t=>t.nodes.map(a=>a.id),Ud=t=>t instanceof Function?t:()=>t;function CT({nodeStrokeColor:t,nodeColor:a,nodeClassName:l="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:c=_T,onClick:u}){const h=Le(AT,Pe),g=Ud(a),p=Ud(t),y=Ud(l),x=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return d.jsx(d.Fragment,{children:h.map(v=>d.jsx(MT,{id:v,nodeColorFunc:g,nodeStrokeColorFunc:p,nodeClassNameFunc:y,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:c,onClick:u,shapeRendering:x},v))})}function TT({id:t,nodeColorFunc:a,nodeStrokeColorFunc:l,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:c,shapeRendering:u,NodeComponent:h,onClick:g}){const{node:p,x:y,y:x,width:v,height:w}=Le(S=>{const N=S.nodeLookup.get(t);if(!N)return{node:void 0,x:0,y:0,width:0,height:0};const E=N.internals.userNode,{x:_,y:k}=N.internals.positionAbsolute,{width:j,height:C}=fa(E);return{node:E,x:_,y:k,width:j,height:C}},Pe);return!p||p.hidden||!p1(p)?null:d.jsx(h,{x:y,y:x,width:v,height:w,style:p.style,selected:!!p.selected,className:r(p),color:a(p),borderRadius:s,strokeColor:l(p),strokeWidth:c,shapeRendering:u,onClick:g,id:p.id})}const MT=A.memo(TT);var zT=A.memo(CT);const OT=200,RT=150,kT=t=>!t.hidden,DT=t=>{const a={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:a,boundingRect:t.nodeLookup.size>0?m1(uo(t.nodeLookup,{filter:kT}),a):a,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},LT="react-flow__minimap-desc";function hb({style:t,className:a,nodeStrokeColor:l,nodeColor:r,nodeClassName:s="",nodeBorderRadius:c=5,nodeStrokeWidth:u,nodeComponent:h,bgColor:g,maskColor:p,maskStrokeColor:y,maskStrokeWidth:x,position:v="bottom-right",onClick:w,onNodeClick:S,pannable:N=!1,zoomable:E=!1,ariaLabel:_,inversePan:k,zoomStep:j=1,offsetScale:C=5}){const D=Ie(),z=A.useRef(null),{boundingRect:O,viewBB:H,rfId:Z,panZoom:ne,translateExtent:Q,flowWidth:K,flowHeight:te,ariaLabelConfig:L}=Le(DT,Pe),G=(t==null?void 0:t.width)??OT,M=(t==null?void 0:t.height)??RT,U=O.width/G,B=O.height/M,Y=Math.max(U,B),q=Y*G,R=Y*M,V=C*Y,W=O.x-(q-O.width)/2-V,ae=O.y-(R-O.height)/2-V,oe=q+V*2,se=R+V*2,fe=`${LT}-${Z}`,ce=A.useRef(0),ue=A.useRef();ce.current=Y,A.useEffect(()=>{if(z.current&&ne)return ue.current=I3({domNode:z.current,panZoom:ne,getTransform:()=>D.getState().transform,getViewScale:()=>ce.current}),()=>{var me;(me=ue.current)==null||me.destroy()}},[ne]),A.useEffect(()=>{var me;(me=ue.current)==null||me.update({translateExtent:Q,width:K,height:te,inversePan:k,pannable:N,zoomStep:j,zoomable:E})},[N,E,k,j,Q,K,te]);const Ee=w?me=>{var Me;const[je,Ue]=((Me=ue.current)==null?void 0:Me.pointer(me))||[0,0];w(me,{x:je,y:Ue})}:void 0,ye=S?A.useCallback((me,je)=>{const Ue=D.getState().nodeLookup.get(je).internals.userNode;S(me,Ue)},[]):void 0,xe=_??L["minimap.ariaLabel"];return d.jsx(Yc,{position:v,style:{...t,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof y=="string"?y:void 0,"--xy-minimap-mask-stroke-width-props":typeof x=="number"?x*Y:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof l=="string"?l:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:st(["react-flow__minimap",a]),"data-testid":"rf__minimap",children:d.jsxs("svg",{width:G,height:M,viewBox:`${W} ${ae} ${oe} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":fe,ref:z,onClick:Ee,children:[xe&&d.jsx("title",{id:fe,children:xe}),d.jsx(zT,{onClick:ye,nodeColor:r,nodeStrokeColor:l,nodeBorderRadius:c,nodeClassName:s,nodeStrokeWidth:u,nodeComponent:h}),d.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-V},${ae-V}h${oe+V*2}v${se+V*2}h${-oe-V*2}z
|
|
396
|
+
M${H.x},${H.y}h${H.width}v${H.height}h${-H.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}hb.displayName="MiniMap";A.memo(hb);const HT=t=>a=>t?`${Math.max(1/a.transform[2],1)}`:void 0,BT={[Hl.Line]:"right",[Hl.Handle]:"bottom-right"};function UT({nodeId:t,position:a,variant:l=Hl.Handle,className:r,style:s=void 0,children:c,color:u,minWidth:h=10,minHeight:g=10,maxWidth:p=Number.MAX_VALUE,maxHeight:y=Number.MAX_VALUE,keepAspectRatio:x=!1,resizeDirection:v,autoScale:w=!0,shouldResize:S,onResizeStart:N,onResize:E,onResizeEnd:_}){const k=G1(),j=typeof t=="string"?t:k,C=Ie(),D=A.useRef(null),z=l===Hl.Handle,O=Le(A.useCallback(HT(z&&w),[z,w]),Pe),H=A.useRef(null),Z=a??BT[l];A.useEffect(()=>{if(!(!D.current||!j))return H.current||(H.current=fA({domNode:D.current,nodeId:j,getStoreItems:()=>{const{nodeLookup:Q,transform:K,snapGrid:te,snapToGrid:L,nodeOrigin:G,domNode:M}=C.getState();return{nodeLookup:Q,transform:K,snapGrid:te,snapToGrid:L,nodeOrigin:G,paneDomNode:M}},onChange:(Q,K)=>{const{triggerNodeChanges:te,nodeLookup:L,parentLookup:G,nodeOrigin:M}=C.getState(),U=[],B={x:Q.x,y:Q.y},Y=L.get(j);if(Y&&Y.expandParent&&Y.parentId){const q=Y.origin??M,R=Q.width??Y.measured.width??0,V=Q.height??Y.measured.height??0,W={id:Y.id,parentId:Y.parentId,rect:{width:R,height:V,...g1({x:Q.x??Y.position.x,y:Q.y??Y.position.y},{width:R,height:V},Y.parentId,L,q)}},ae=Zh([W],L,G,M);U.push(...ae),B.x=Q.x?Math.max(q[0]*R,Q.x):void 0,B.y=Q.y?Math.max(q[1]*V,Q.y):void 0}if(B.x!==void 0&&B.y!==void 0){const q={id:j,type:"position",position:{...B}};U.push(q)}if(Q.width!==void 0&&Q.height!==void 0){const R={id:j,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:Q.width,height:Q.height}};U.push(R)}for(const q of K){const R={...q,type:"position"};U.push(R)}te(U)},onEnd:({width:Q,height:K})=>{const te={id:j,type:"dimensions",resizing:!1,dimensions:{width:Q,height:K}};C.getState().triggerNodeChanges([te])}})),H.current.update({controlPosition:Z,boundaries:{minWidth:h,minHeight:g,maxWidth:p,maxHeight:y},keepAspectRatio:x,resizeDirection:v,onResizeStart:N,onResize:E,onResizeEnd:_,shouldResize:S}),()=>{var Q;(Q=H.current)==null||Q.destroy()}},[Z,h,g,p,y,x,N,E,_,S]);const ne=Z.split("-");return d.jsx("div",{className:st(["react-flow__resize-control","nodrag",...ne,l,r]),ref:D,style:{...s,scale:O,...u&&{[z?"backgroundColor":"borderColor"]:u}},children:c})}A.memo(UT);const fn={coreIdentity:/^(MEMORY|SOUL|IDENTITY|TOOLS|HANDOFF|USER|BOOTSTRAP|HEARTBEAT|AGENTS)\.md$/i,daily:/^\d{4}-\d{2}-\d{2}\.md$/,session:/\.jsonl$/,openclawConfig:/^openclaw\.json$/i,aiConfig:/^\.cursorrules$/i,healthData:/^(health|workouts|sleep|hrv)-.*\.json$/i,skills:/^SKILL\.md$/i,architectureDocs:/^(ARCHITECTURE|INSTRUCTION).*\.md$/i,telemetry:/\.csv$/,archive:/\.(tar\.gz|zip|gz)$/,knowledge:/^README\.md$|^KNOWLEDGE.*\.md$|^RUNBOOK.*\.md$/i};function Xt(t,a,l,r=[]){for(const s of t)s.type==="file"&&a.test(s.name)&&r.push({name:s.name,path:`${l}/${s.path}`,size:s.size}),s.children&&Xt(s.children,a,l,r);return r}function fh(t){let a=0,l=0;for(const r of t)if(r.type==="file"&&(a++,l+=r.size||0),r.children){const s=fh(r.children);a+=s.files,l+=s.size}return{files:a,size:l}}function VT(t){const a=[],l=t.gateway;if(l){const u=l.mode||"local",h=l.port,g=l.auth_mode||"none",p=[`Mode: ${u}`];h&&p.push(`Port: ${h}`),g!=="none"&&p.push(`Auth: ${g}`),a.push({id:"config-gateway",type:"processing",label:"Gateway",description:p.join(" · "),icon:xv,color:"var(--accent-blue)",files:[],totalSize:0,path:"openclaw.json → gateway",depth:-2})}const r=t.channels;if(r){const u=Object.entries(r).filter(([,h])=>typeof h=="object"&&h!==null?h.enabled!==!1:!!h).map(([h])=>h);u.length>0&&a.push({id:"config-channels",type:"processing",label:"Channels",description:u.join(", "),icon:wv,color:"var(--accent-green)",files:[],totalSize:0,path:"openclaw.json → channels",depth:-2})}const s=t.models,c=t.model;if(s||c){let u="Configured";if(c)u=c;else if(s){const h=s.primary||s.default,g=s.fallback,p=[];if(h&&p.push(h),g){const y=Array.isArray(g)?g:[g];p.push(`→ ${y.join(" → ")}`)}p.length>0&&(u=p.join(" "))}a.push({id:"config-models",type:"processing",label:"Models",description:u,icon:lo,color:"var(--accent-purple)",files:[],totalSize:0,path:"openclaw.json → models",depth:-2})}return a}function $T(t,a){const l=[];a&&l.push(...VT(a)),Object.entries(t).forEach(([s,c])=>{var D;if(!c)return;const{tree:u,path:h=`~/${s}`}=c,g=[],p=Xt(u,fn.coreIdentity,h,[]);if(p.length>0){const z=p.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-core-memory`,type:"storage",label:"Core Memory",description:p.map(O=>O.name).join(", "),icon:$l,color:"var(--accent-purple)",files:p,totalSize:z,path:h,depth:0})}const y=Xt(u,fn.daily,h,[]);if(y.length>0){const z=y.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-daily-notes`,type:"storage",label:"Daily Notes",description:`${y.length} daily log files`,icon:Ml,color:"var(--accent-green)",files:y.sort((O,H)=>H.name.localeCompare(O.name)).slice(0,6),totalSize:z,path:h,depth:1})}const x=Xt(u,fn.session,h,[]);if(x.length>0){const z=x.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-sessions`,type:"storage",label:"Session Transcripts",description:`${x.length} session files`,icon:Ml,color:"var(--accent-green)",files:x.slice(0,6),totalSize:z,path:h,depth:1})}const v=Xt(u,fn.openclawConfig,h,[]);if(v.length>0){const z=v.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-openclaw-config`,type:"processing",label:"OpenClaw Config",description:v.map(O=>O.name).join(", "),icon:fc,color:"var(--accent-blue)",files:v,totalSize:z,path:`${h}/openclaw.json`,depth:0})}const w=Xt(u,fn.aiConfig,h,[]);if(w.length>0){const z=w.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-ai-config`,type:"processing",label:"AI Config",description:w.map(O=>O.name).join(", "),icon:fc,color:"var(--accent-blue)",files:w,totalSize:z,path:h,depth:0})}const S=Xt(u,fn.knowledge,h,[]),N=u.find(z=>z.type==="directory"&&z.name==="life");if(N!=null&&N.children&&fh(N.children).files>0){const O=Xt(N.children,/\.md$/i,`${h}/life`,[]);S.push(...O)}if(S.length>0){const z=S.reduce((Z,ne)=>Z+(ne.size||0),0),O=((D=N==null?void 0:N.children)==null?void 0:D.filter(Z=>Z.type==="directory").map(Z=>Z.name))??[],H=O.length>0?`${S.length} files (${O.slice(0,3).join(", ")}${O.length>3?"...":""})`:`${S.length} documentation files`;g.push({id:`${s}-knowledge`,type:"storage",label:"Knowledge Base",description:H,icon:cc,color:"var(--accent-blue)",files:S.slice(0,6),totalSize:z,path:h,depth:1})}const E=Xt(u,fn.healthData,h,[]);if(E.length>0){const z=E.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-health-data`,type:"storage",label:"Health Data",description:`${E.length} health/fitness files`,icon:sc,color:"var(--accent-green)",files:E.slice(0,6),totalSize:z,path:`${h}/health/data`,depth:1})}const _=Xt(u,fn.skills,h,[]);if(_.length>0){const z=_.reduce((H,Z)=>H+(Z.size||0),0),O=_.map(H=>{const Z=H.path.split("/");return Z.length>=2?Z[Z.length-2]:H.name});g.push({id:`${s}-skills`,type:"specialized",label:"Skills",description:O.slice(0,4).join(", ")+(O.length>4?` +${O.length-4} more`:""),icon:lo,color:"var(--accent-amber)",files:_,totalSize:z,path:h,depth:1})}const k=Xt(u,fn.architectureDocs,h,[]);if(k.length>0){const z=k.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-arch-docs`,type:"storage",label:"Architecture Docs",description:k.map(O=>O.name).join(", "),icon:cc,color:"var(--accent-blue)",files:k,totalSize:z,path:h,depth:0})}const j=Xt(u,fn.telemetry,h,[]);if(j.length>0){const z=j.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-telemetry`,type:"telemetry",label:"Telemetry Logs",description:`${j.length} data log files`,icon:sc,color:"var(--accent-indigo)",files:j.slice(0,6),totalSize:z,path:h,depth:2})}const C=Xt(u,fn.archive,h,[]);if(C.length>0){const z=C.reduce((O,H)=>O+(H.size||0),0);g.push({id:`${s}-archive`,type:"archive",label:"Memory Archive",description:`${C.length} compressed history files`,icon:uv,color:"var(--accent-pink)",files:C,totalSize:z,path:h,depth:3})}if(g.length===0&&(u.filter(z=>z.type==="directory").forEach((z,O)=>{const H=z.children?fh(z.children):{files:0,size:0};H.files>0&&g.push({id:`${s}-${z.name}`,type:"storage",label:z.name,description:`${H.files} files`,icon:Ka,color:["var(--accent-blue)","var(--accent-green)","var(--accent-amber)","var(--accent-purple)"][O%4],files:[],totalSize:H.size,path:`${h}/${z.name}`,depth:1})}),g.length===0)){const z=u.filter(O=>O.type==="file");if(z.length>0){const O=z.reduce((H,Z)=>H+(Z.size||0),0);g.push({id:`${s}-root`,type:"storage",label:"Root Files",description:`${z.length} files`,icon:Ka,color:"var(--accent-blue)",files:z.map(H=>({name:H.name,path:`${h}/${H.path}`,size:H.size})),totalSize:O,path:h,depth:1})}}l.push(...g)});const r=new Map;for(const s of l){const c=s.label;if(r.has(c)){const u=r.get(c),h=new Set(u.files.map(g=>g.path));for(const g of s.files)h.has(g.path)||(u.files.push(g),h.add(g.path));u.totalSize=u.files.reduce((g,p)=>g+(p.size||0),0)}else r.set(c,{...s})}return[...r.values()].sort((s,c)=>s.depth-c.depth)}function YT({data:t}){const a=t.isExpanded??!1,l=t.fileCount!==void 0&&t.fileCount>0||t.size!==void 0&&t.size>0,r=t.IconComponent;return d.jsxs("div",{className:Se("group relative min-w-[220px] max-w-[260px] transition-all duration-300",l&&"hover:scale-[1.02]"),children:[!t.isFirst&&d.jsx(Bl,{type:"target",position:ve.Top,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-border"}),d.jsx("div",{className:Se("absolute -inset-0.5 rounded-2xl blur-sm transition-all duration-300 pointer-events-none",a?"opacity-70":"opacity-40 group-hover:opacity-60"),style:{background:`hsl(${t.color} / 0.4)`}}),d.jsxs(bt,{className:Se("relative overflow-hidden bg-card backdrop-blur-sm cursor-pointer transition-all duration-200",a&&"ring-1 ring-foreground/10"),style:{borderColor:a?`hsl(${t.color} / 0.6)`:`hsl(${t.color} / 0.35)`},children:[d.jsxs("div",{className:"flex items-start gap-3 p-3.5",children:[d.jsx("div",{className:"shrink-0 p-2 rounded-xl",style:{background:`linear-gradient(135deg, hsl(${t.color} / 0.2), hsl(${t.color} / 0.05))`,border:`1px solid hsl(${t.color} / 0.2)`},children:d.jsx(r,{className:"w-4 h-4",style:{color:`hsl(${t.color})`}})}),d.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[d.jsx("h3",{className:"text-[12px] font-semibold text-card-foreground tracking-tight leading-tight truncate",children:t.label}),d.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:t.description})]})]}),(t.fileCount!==void 0||t.size!==void 0)&&d.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5 border-t bg-secondary/30",style:{borderColor:`hsl(${t.color} / 0.1)`},children:[t.fileCount!==void 0&&d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Tc,{className:"w-3 h-3 text-muted-foreground/60"}),d.jsx("span",{className:"text-xs font-semibold tabular-nums",style:{color:`hsl(${t.color})`},children:t.fileCount}),d.jsx("span",{className:"text-[9px] text-muted-foreground/60",children:t.fileCount===1?"file":"files"})]}),t.size!==void 0&&t.size>0&&d.jsx("span",{className:"text-[10px] text-muted-foreground font-mono tabular-nums",children:ln(t.size)})]}),l&&d.jsx("div",{className:"absolute top-2.5 right-2.5 w-1.5 h-1.5 rounded-full",style:{backgroundColor:`hsl(${t.color})`,boxShadow:`0 0 6px hsl(${t.color})`,animation:"pulse 2s ease-in-out infinite"}})]}),!t.isLast&&d.jsx(Bl,{type:"source",position:ve.Bottom,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-border"})]})}const qT={layer:YT};function XT(){const[t,a]=A.useState(!1);return d.jsx("div",{className:"absolute bottom-4 right-4 z-10",children:d.jsxs("div",{className:Se("bg-card border border-border rounded-xl backdrop-blur-sm transition-all duration-300 overflow-hidden shadow-xl",t?"w-[260px]":"w-auto"),children:[d.jsxs("button",{onClick:()=>a(!t),className:"flex items-center gap-2.5 px-4 py-3 text-xs text-muted-foreground hover:text-foreground transition-colors w-full cursor-pointer focus:outline-none",children:[d.jsx("div",{className:"p-1.5 rounded-lg bg-secondary",children:d.jsx(uc,{className:"w-3.5 h-3.5"})}),d.jsx("span",{className:"font-medium",children:"Memory Layers"}),d.jsx(hv,{className:Se("w-4 h-4 ml-auto text-muted-foreground/60 transition-transform duration-200",t&&"rotate-180")})]}),t&&d.jsxs("div",{className:"px-4 pb-4 space-y-2.5 text-[10px] border-t border-border pt-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx($l,{className:"w-3 h-3 text-purple-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Core Memory (identity files)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(fc,{className:"w-3 h-3 text-blue-400"}),d.jsx("span",{className:"text-muted-foreground",children:"OpenClaw Config (openclaw.json)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(cc,{className:"w-3 h-3 text-blue-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Architecture Docs"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ml,{className:"w-3 h-3 text-emerald-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Daily Notes (YYYY-MM-DD.md)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ml,{className:"w-3 h-3 text-emerald-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Session transcripts (.jsonl)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(sc,{className:"w-3 h-3 text-emerald-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Health Data (health/fitness JSON)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(lo,{className:"w-3 h-3 text-amber-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Skills (SKILL.md)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(cc,{className:"w-3 h-3 text-blue-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Knowledge Base (life/ structure)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(sc,{className:"w-3 h-3 text-indigo-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Telemetry logs (.csv)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(uv,{className:"w-3 h-3 text-pink-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Memory Archive (compressed)"})]})]})]})})}function GT({nodeData:t,onClose:a}){if(!t)return null;const l=t.IconComponent;return d.jsx("div",{className:"absolute top-4 right-4 z-10 animate-in fade-in slide-in-from-right-2 duration-200",children:d.jsxs("div",{className:"w-[300px] bg-zinc-900/95 border rounded-2xl backdrop-blur-md shadow-xl overflow-hidden",style:{borderColor:`hsl(${t.color} / 0.4)`},children:[d.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[d.jsx("div",{className:"p-2 rounded-xl",style:{background:`linear-gradient(135deg, hsl(${t.color} / 0.2), hsl(${t.color} / 0.05))`,border:`1px solid hsl(${t.color} / 0.25)`},children:d.jsx(l,{className:"w-4 h-4",style:{color:`hsl(${t.color})`}})}),d.jsx("h3",{className:"flex-1 text-[14px] font-semibold text-card-foreground",children:t.label}),d.jsx("button",{onClick:a,className:"p-1.5 -mr-1 rounded-lg text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors cursor-pointer",children:d.jsx(Mc,{className:"w-4 h-4"})})]}),d.jsxs("div",{className:"px-4 pb-4 space-y-3",children:[d.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed",children:t.description}),t.path&&d.jsxs("div",{className:"p-2.5 rounded-lg bg-secondary/50 border border-border/50",children:[d.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Path"}),d.jsx("p",{className:"text-[11px] font-mono text-foreground mt-0.5 truncate",children:t.path})]}),t.files&&t.files.length>0&&d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Files"}),d.jsx("div",{className:"space-y-1 max-h-[120px] overflow-y-auto",children:t.files.map((r,s)=>d.jsxs("div",{className:"flex items-center justify-between p-1.5 rounded bg-secondary/30 border border-border/30",children:[d.jsx("span",{className:"text-[10px] font-mono text-foreground truncate flex-1",children:r.name}),r.size&&d.jsx("span",{className:"text-[9px] text-muted-foreground ml-2 shrink-0",children:ln(r.size)})]},s))})]}),t.fileCount!==void 0&&t.fileCount>0&&d.jsxs("div",{className:"flex items-center justify-between p-2.5 rounded-lg bg-secondary/50 border border-border/50",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Files"}),d.jsx("p",{className:"text-sm font-semibold text-foreground",children:t.fileCount})]}),t.size!==void 0&&t.size>0&&d.jsxs("div",{className:"text-right",children:[d.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Size"}),d.jsx("p",{className:"text-sm font-mono text-foreground",children:ln(t.size)})]})]})]})]})})}function ZT(){return d.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("div",{className:"mx-auto w-16 h-16 rounded-2xl bg-muted/50 border border-border flex items-center justify-center mb-6",children:d.jsx(Ka,{className:"w-8 h-8 text-muted-foreground/60"})}),d.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"No files found"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-4 leading-relaxed",children:"Configure a memory source path in Settings to visualize your memory architecture."}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"The app auto-discovers .md files, logs, archives, and scripts."})]})})}function QT(){const{data:t,loading:a}=zc(),{config:l}=_v(),{agentName:r}=Mi(),[s,c]=A.useState(null),u=A.useMemo(()=>t?$T(t,l):[],[t,l]),h=u.length>0,g=A.useCallback((N,E)=>{c(_=>_===E.id?null:E.id)},[]),p=A.useCallback(()=>{c(null)},[]),{nodes:y,edges:x}=A.useMemo(()=>{const N=[],E=[],_={};u.forEach(ne=>{const Q=ne.depth;_[Q]||(_[Q]=[]),_[Q].push(ne)});const k=Object.keys(_).map(Number).sort((ne,Q)=>ne-Q),j=260,C=24,D=180,O=(Math.max(1,...k.map(ne=>_[ne].length))-1)*(j+C)/2;let H=0;N.push({id:"input",type:"layer",position:{x:O,y:H},data:{label:"User Input",description:"Query triggers memory retrieval",color:"var(--accent-indigo)",IconComponent:ME,isFirst:!0,isExpanded:s==="input"}}),H+=D;let Z=["input"];return k.forEach(ne=>{const Q=_[ne],K=j+C,te=O-(Q.length-1)*K/2,L=[];Q.forEach((G,M)=>{const U=te+M*K,B=G.id;L.push(B),N.push({id:B,type:"layer",position:{x:U,y:H},data:{label:G.label,description:G.description,color:G.color,IconComponent:G.icon,fileCount:G.files.length,size:G.totalSize,path:G.path,files:G.files.slice(0,6),isExpanded:s===B,layerType:G.type}}),Z.forEach(Y=>{E.push({id:`e-${Y}-${B}`,source:Y,target:B,animated:!0,style:{stroke:"url(#edge-gradient)",strokeWidth:1.5}})})}),Z=L,H+=D}),N.push({id:"output",type:"layer",position:{x:O,y:H},data:{label:"Response",description:"Context-enriched output",color:"var(--accent-pink)",IconComponent:jv,isLast:!0,isExpanded:s==="output"}}),Z.forEach(ne=>{E.push({id:`e-${ne}-output`,source:ne,target:"output",animated:!0,style:{stroke:"url(#edge-gradient)",strokeWidth:1.5}})}),{nodes:N,edges:E}},[u,s]),v=A.useMemo(()=>{if(!s)return null;const N=y.find(E=>E.id===s);return(N==null?void 0:N.data)??null},[s,y]);if(!a&&!h)return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsx("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-violet-500/20 to-purple-600/20 border border-violet-500/30",children:d.jsx(Qd,{className:"w-5 h-5 text-violet-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:r?`${r}'s Memory Architecture`:"Agent Memory Architecture"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Visualize your memory structure"})]})]})}),d.jsx(ZT,{})]});const w=u.reduce((N,E)=>N+E.files.length,0),S=u.reduce((N,E)=>N+E.totalSize,0);return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-violet-500/20 to-purple-600/20 border border-violet-500/30",children:d.jsx(Qd,{className:"w-5 h-5 text-violet-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Memory Architecture"}),d.jsxs("p",{className:"text-xs text-muted-foreground/70",children:[u.length," layers · ",w," files ·"," ",ln(S)]})]})]}),d.jsx("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground/60",children:d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(WE,{className:"w-3 h-3"}),d.jsxs("span",{children:["Depth: ",Math.max(...u.map(N=>N.depth))+1]})]})})]}),d.jsxs("div",{className:"flex-1 relative",children:[d.jsx("svg",{style:{position:"absolute",width:0,height:0},children:d.jsx("defs",{children:d.jsxs("linearGradient",{id:"edge-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"0",y2:"1000",children:[d.jsx("stop",{offset:"0%",stopColor:"#6366f1",stopOpacity:"0.5"}),d.jsx("stop",{offset:"50%",stopColor:"#a855f7",stopOpacity:"0.3"}),d.jsx("stop",{offset:"100%",stopColor:"#ec4899",stopOpacity:"0.5"})]})})}),d.jsx(hT,{nodes:y,edges:x,nodeTypes:qT,onNodeClick:g,onPaneClick:p,fitView:!0,fitViewOptions:{padding:.05,maxZoom:1},proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!0,panOnDrag:!0,zoomOnScroll:!0,preventScrolling:!1,minZoom:.3,maxZoom:1.5,children:d.jsx(yT,{color:"hsl(var(--muted-foreground))",gap:32,size:1,style:{opacity:.08}})},u.length),d.jsx(XT,{}),d.jsx(GT,{nodeData:v,onClose:()=>c(null)})]})]})}const KT=/(\d{4}-\d{2}-\d{2})/;function mb(t,a,l,r=[]){for(const s of t){if(s.type==="file"){const c=s.name.match(KT);c&&r.push({name:s.name,path:`${a}/${s.path}`,size:s.size,source:l,date:c[1]})}s.children&&mb(s.children,a,l,r)}return r}function FT(t){const a={};for(const l of t)a[l.date]||(a[l.date]={date:l.date,files:[]}),a[l.date].files.push({name:l.name,path:l.path,size:l.size,source:l.source});return Object.values(a).sort((l,r)=>r.date.localeCompare(l.date))}function PT(t){return new Date(t+"T00:00:00").toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}function IT(t){return t===new Date().toISOString().split("T")[0]}function JT(t){const a=new Date;return a.setDate(a.getDate()-1),t===a.toISOString().split("T")[0]}function WT(){return d.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("div",{className:"mx-auto w-16 h-16 rounded-2xl bg-muted/50 border border-border flex items-center justify-center mb-6",children:d.jsx(dv,{className:"w-8 h-8 text-muted-foreground/60"})}),d.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"No temporal files found"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-4 leading-relaxed",children:"This view shows files with dates in their names (e.g., 2024-01-15.md daily logs)."}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"OpenClaw daily logs and dated session files will appear here automatically."})]})})}function eM(){const{data:t,loading:a}=zc(),l=A.useMemo(()=>{if(!t)return[];const s=[];return Object.entries(t).forEach(([c,u])=>{if(!u)return;const h=u.path||`~/${c}`;mb(u.tree,h,c,s)}),FT(s)},[t]),r=l.reduce((s,c)=>s+c.files.length,0);return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsx("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-cyan-500/20 to-blue-600/20 border border-cyan-500/30",children:d.jsx(pv,{className:"w-5 h-5 text-cyan-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Timeline"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:a?"Loading...":l.length>0?`${l.length} days · ${r} files`:"Chronological file history"})]})]})}),!a&&l.length===0?d.jsx(WT,{}):d.jsx("div",{className:"flex-1 overflow-auto",children:d.jsx("div",{className:"max-w-2xl mx-auto py-6 px-6",children:d.jsx("div",{className:"relative",children:l.map((s,c)=>{const u=IT(s.date),h=JT(s.date),g=s.files.reduce((p,y)=>p+(y.size||0),0);return d.jsxs("div",{className:"relative flex gap-6 pb-8",children:[c<l.length-1&&d.jsx("div",{className:"absolute left-[15px] top-10 bottom-0 w-px bg-border/60"}),d.jsx("div",{className:"relative shrink-0 mt-1",children:d.jsx("div",{className:`w-[30px] h-[30px] rounded-full border-2 flex items-center justify-center ${u?"border-cyan-500 bg-cyan-500/20":h?"border-blue-500/60 bg-blue-500/10":"border-border bg-secondary/50"}`,children:d.jsx(dv,{className:`w-3.5 h-3.5 ${u?"text-cyan-400":h?"text-blue-400":"text-muted-foreground"}`})})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u?"Today":h?"Yesterday":PT(s.date)}),(u||h)&&d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.date}),d.jsxs(Qr,{variant:"outline",className:"text-[10px] ml-auto",children:[s.files.length," ",s.files.length===1?"file":"files",g>0&&` · ${ln(g)}`]})]}),d.jsx("div",{className:"space-y-2",children:s.files.map((p,y)=>d.jsx(bt,{className:"p-3 bg-card hover:bg-secondary/30 transition-colors",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(ro,{className:"w-4 h-4 text-muted-foreground/60 shrink-0"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-xs font-mono text-foreground truncate",children:p.name}),d.jsx("p",{className:"text-[10px] text-muted-foreground truncate mt-0.5",children:p.source})]}),p.size!==void 0&&p.size>0&&d.jsx("span",{className:"text-[10px] text-muted-foreground font-mono tabular-nums shrink-0",children:ln(p.size)})]})},y))})]})]},s.date)})})})})]})}const tM={search_optimizer:{icon:YE,color:"text-blue-400",description:"Finds the most relevant memories for your query"},pattern_recognizer:{icon:Sv,color:"text-violet-400",description:"Identifies patterns and connections across memories"},memory_intelligence:{icon:$l,color:"text-pink-400",description:"Analyzes and ranks memory importance"},context_builder:{icon:EE,color:"text-amber-400",description:"Assembles context from multiple memory sources"},archive_manager:{icon:dE,color:"text-emerald-400",description:"Manages long-term memory storage and retrieval"}};function pb(t){const a=t.replace(".csv","");return tM[a]||{icon:gv,color:"text-zinc-400",description:"Agent activity log"}}function nM({filename:t}){const a=pb(t),l=a.icon,r=t.replace(".csv","").replace(/_/g," ");return d.jsx("div",{className:"h-full flex items-center justify-center p-6",children:d.jsxs("div",{className:"max-w-sm text-center",children:[d.jsx("div",{className:Se("inline-flex p-4 rounded-2xl bg-zinc-800/50 mb-4"),children:d.jsx(l,{className:Se("w-8 h-8",a.color)})}),d.jsx("h3",{className:"text-sm font-medium text-foreground capitalize mb-2",children:r}),d.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:a.description}),d.jsx("div",{className:"p-3 rounded-lg bg-zinc-800/30 border border-zinc-800",children:d.jsx("p",{className:"text-[11px] text-muted-foreground/70",children:"No activity recorded yet. This agent will log entries here when it runs during a Claude session with memory-swarm."})})]})})}function aM({entries:t}){return t.length===0?null:d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full text-xs",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"text-left border-b border-border bg-zinc-900/50 sticky top-0",children:[d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"When the action occurred",children:"Time"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"Which AI agent performed this action",children:"Agent"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"What the agent did (read, write, search, etc.)",children:"Action"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"The file or resource that was accessed",children:"Target"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"AI tokens consumed for this operation",children:"Tokens"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"How long the operation took",children:"Latency"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"Whether the operation succeeded",children:"Status"})]})}),d.jsx("tbody",{className:"font-mono",children:t.map((a,l)=>d.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/50",children:[d.jsx("td",{className:"px-4 py-2 text-muted-foreground",children:a.timestamp}),d.jsx("td",{className:"px-4 py-2 text-foreground",children:a.agent_name}),d.jsx("td",{className:"px-4 py-2 text-muted-foreground",children:a.action_type}),d.jsx("td",{className:"px-4 py-2 text-muted-foreground max-w-48 truncate",children:a.target_file||"-"}),d.jsx("td",{className:"px-4 py-2 text-muted-foreground tabular-nums",children:a.tokens_used||"-"}),d.jsx("td",{className:"px-4 py-2 text-muted-foreground tabular-nums",children:a.latency_ms?`${a.latency_ms}ms`:"-"}),d.jsx("td",{className:"px-4 py-2",children:a.success==="true"?d.jsx(Qr,{variant:"success",children:"OK"}):a.success==="false"?d.jsx(Qr,{variant:"error",title:a.error_message,children:"Error"}):d.jsx("span",{className:"text-muted-foreground",children:"-"})})]},l))})]})})}function iM(){const{logs:t,loading:a,error:l,logsPath:r}=g4(),[s,c]=A.useState(null),u=s?t.find(g=>g.file===s):t[0],h=t.reduce((g,p)=>g+p.entries.length,0);return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-emerald-500/20 to-teal-600/20 border border-emerald-500/30",children:d.jsx(Ml,{className:"w-5 h-5 text-emerald-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Agent Activity Logs"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"CSV logs from memory-swarm showing what AI agents did during sessions"})]})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[r&&d.jsx("code",{className:"text-xs text-muted-foreground/70 font-mono bg-zinc-800/50 px-2 py-1 rounded",children:r}),t.length>0&&d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(ro,{className:"w-3.5 h-3.5"}),d.jsxs("span",{className:"tabular-nums",children:[t.length," files"]}),d.jsx("span",{className:"text-muted-foreground/50",children:"·"}),d.jsxs("span",{className:"tabular-nums",children:[h," entries"]})]})]})]}),a&&!t.length&&d.jsx("div",{className:"p-6",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading logs..."})}),l&&d.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:d.jsxs(bt,{className:"max-w-md p-6 bg-zinc-900/50",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 rounded-lg bg-amber-500/10 border border-amber-500/20",children:d.jsx(uc,{className:"w-5 h-5 text-amber-400"})}),d.jsx("h2",{className:"text-sm font-medium text-foreground",children:"Logs Directory Not Found"})]}),d.jsx("p",{className:"text-xs text-muted-foreground mb-4 leading-relaxed",children:l}),d.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Agent activity logs are CSV files created by memory-swarm during Claude sessions. They track what AI agents read, wrote, and searched."})]})}),!l&&t.length>0&&d.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[d.jsxs("div",{className:"w-64 border-r border-border overflow-auto py-2 bg-zinc-950/30",children:[d.jsx("div",{className:"px-4 py-2 mb-1",children:d.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/50 font-medium",children:"Memory Swarm Agents"})}),t.map(g=>{var v;const p=pb(g.file),y=p.icon,x=(s||((v=t[0])==null?void 0:v.file))===g.file;return d.jsx("button",{onClick:()=>c(g.file),className:Se("w-full px-4 py-3 text-left cursor-pointer transition-colors",x?"bg-zinc-800/80":"hover:bg-zinc-800/40"),children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(y,{className:Se("w-4 h-4",p.color)}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:Se("text-xs font-medium truncate",x?"text-foreground":"text-muted-foreground"),children:g.file.replace(".csv","").replace(/_/g," ")}),d.jsx("span",{className:Se("text-[10px] tabular-nums",g.entries.length>0?"text-emerald-400":"text-zinc-600"),children:g.entries.length})]}),d.jsx("p",{className:"text-[10px] text-muted-foreground/60 truncate mt-0.5",children:p.description})]})]})},g.file)})]}),d.jsx("div",{className:"flex-1 overflow-auto",children:u&&u.entries.length>0?d.jsx(aM,{entries:u.entries}):u?d.jsx(nM,{filename:u.file}):d.jsx("div",{className:"p-6",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Select an agent to view activity"})})})]}),!l&&!a&&t.length===0&&d.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:d.jsxs(bt,{className:"max-w-md p-6 bg-zinc-900/50",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 rounded-lg bg-zinc-800",children:d.jsx(uc,{className:"w-5 h-5 text-zinc-400"})}),d.jsx("h2",{className:"text-sm font-medium text-foreground",children:"What are Agent Logs?"})]}),d.jsx("p",{className:"text-xs text-muted-foreground mb-4 leading-relaxed",children:"When you use Claude with memory-swarm, it creates CSV files that record every action the AI agents take - like reading files, searching memories, or writing summaries."}),d.jsxs("div",{className:"space-y-2 mb-4",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(lo,{className:"w-3.5 h-3.5 text-amber-400"}),d.jsxs("span",{children:[d.jsx("strong",{className:"text-foreground",children:"Agent"})," - Which AI agent performed the action"]})]}),d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(jv,{className:"w-3.5 h-3.5 text-pink-400"}),d.jsxs("span",{children:[d.jsx("strong",{className:"text-foreground",children:"Action"})," - What it did (read, write, search)"]})]}),d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx($l,{className:"w-3.5 h-3.5 text-violet-400"}),d.jsxs("span",{children:[d.jsx("strong",{className:"text-foreground",children:"Tokens"})," - How much AI capacity it used"]})]})]}),d.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["No logs found at ",d.jsx("code",{className:"bg-zinc-800 px-1 rounded",children:r||"memory-swarm/logs/"})]})]})})]})}function Ey(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function Gc(...t){return a=>{let l=!1;const r=t.map(s=>{const c=Ey(s,a);return!l&&typeof c=="function"&&(l=!0),c});if(l)return()=>{for(let s=0;s<r.length;s++){const c=r[s];typeof c=="function"?c():Ey(t[s],null)}}}}function gn(...t){return A.useCallback(Gc(...t),t)}var lM=Symbol.for("react.lazy"),Nc=qy[" use ".trim().toString()];function rM(t){return typeof t=="object"&&t!==null&&"then"in t}function gb(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===lM&&"_payload"in t&&rM(t._payload)}function oM(t){const a=cM(t),l=A.forwardRef((r,s)=>{let{children:c,...u}=r;gb(c)&&typeof Nc=="function"&&(c=Nc(c._payload));const h=A.Children.toArray(c),g=h.find(fM);if(g){const p=g.props.children,y=h.map(x=>x===g?A.Children.count(p)>1?A.Children.only(null):A.isValidElement(p)?p.props.children:null:x);return d.jsx(a,{...u,ref:s,children:A.isValidElement(p)?A.cloneElement(p,void 0,y):null})}return d.jsx(a,{...u,ref:s,children:c})});return l.displayName=`${t}.Slot`,l}var sM=oM("Slot");function cM(t){const a=A.forwardRef((l,r)=>{let{children:s,...c}=l;if(gb(s)&&typeof Nc=="function"&&(s=Nc(s._payload)),A.isValidElement(s)){const u=hM(s),h=dM(c,s.props);return s.type!==A.Fragment&&(h.ref=r?Gc(r,u):u),A.cloneElement(s,h)}return A.Children.count(s)>1?A.Children.only(null):null});return a.displayName=`${t}.SlotClone`,a}var uM=Symbol("radix.slottable");function fM(t){return A.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===uM}function dM(t,a){const l={...a};for(const r in a){const s=t[r],c=a[r];/^on[A-Z]/.test(r)?s&&c?l[r]=(...h)=>{const g=c(...h);return s(...h),g}:s&&(l[r]=s):r==="style"?l[r]={...s,...c}:r==="className"&&(l[r]=[s,c].filter(Boolean).join(" "))}return{...t,...l}}function hM(t){var r,s;let a=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}const mM=Mh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium cursor-pointer transition-all duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 active:scale-[0.98]",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-md hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 hover:shadow-md",outline:"border border-border bg-background shadow-sm hover:bg-secondary hover:text-foreground hover:border-foreground/20",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 hover:shadow-md",ghost:"hover:bg-accent/80 hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",glow:"bg-violet-600 text-white hover:bg-violet-500 transition-colors"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-11 rounded-xl px-8 text-base",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ra=A.forwardRef(({className:t,variant:a,size:l,asChild:r=!1,...s},c)=>{const u=r?sM:"button";return d.jsx(u,{className:Se(mM({variant:a,size:l,className:t})),ref:c,...s})});ra.displayName="Button";function pM(){const{entries:t,isPaused:a,togglePause:l,clearLog:r}=Th(),{sources:s,toggleSource:c,resetOnboarding:u}=Mi(),[h,g]=A.useState(!1),p=h?t:t.slice(0,20),y=s.filter(v=>v.enabled),x=()=>{const v=h4(t),w=new Blob([v],{type:"text/csv"}),S=URL.createObjectURL(w),N=document.createElement("a");N.href=S,N.download=`openclaw-memory-mapper-audit-${new Date().toISOString().split("T")[0]}.csv`,N.click(),URL.revokeObjectURL(S)};return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Xr,{className:"w-5 h-5 text-emerald-400"}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Security & Privacy"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Monitor all file access activity"})]})]}),d.jsx(ra,{variant:a?"glow":"outline",size:"sm",onClick:l,className:Se(a?"bg-red-500/20 border-red-500/30 text-red-400 hover:bg-red-500/30":"hover:bg-primary/10 hover:border-primary/30 hover:text-primary"),children:a?d.jsxs(d.Fragment,{children:[d.jsx(ux,{className:"w-4 h-4 mr-1"}),"Paused - Resume"]}):d.jsxs(d.Fragment,{children:[d.jsx(Xr,{className:"w-4 h-4 mr-1"}),"Pause All Access"]})})]}),d.jsxs("div",{className:"flex-1 overflow-auto p-6 space-y-6",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(Vd,{icon:Ev,title:"Network Status",status:"Local Only",description:"localhost:3001",variant:"success"}),d.jsx(Vd,{icon:Nh,title:"Access Mode",status:"Read-Only",description:"Files are never modified",variant:"success"}),d.jsx(Vd,{icon:XE,title:"Data Storage",status:"Local Only",description:"Nothing uploaded",variant:"success"})]}),d.jsxs(bt,{className:"p-5 bg-card",children:[d.jsx("div",{className:"flex items-center justify-between mb-4",children:d.jsxs("h2",{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[d.jsx(bv,{className:"w-4 h-4 text-muted-foreground"}),"Active Permissions"]})}),d.jsx("div",{className:"space-y-2",children:s.map(v=>d.jsxs("div",{className:Se("flex items-center justify-between p-3 rounded-lg border transition-colors",v.enabled?"bg-emerald-500/5 border-emerald-500/20":"bg-secondary/50 border-border"),children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Ka,{className:Se("w-4 h-4",v.enabled?"text-emerald-500":"text-muted-foreground")}),d.jsxs("div",{children:[d.jsx("span",{className:"text-sm font-mono text-foreground",children:v.path}),d.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:"READ-ONLY"})]})]}),d.jsx(ra,{variant:"ghost",size:"sm",onClick:()=>c(v.id),className:Se("text-xs",v.enabled?"text-red-500 hover:text-red-600 hover:bg-red-500/10":"text-emerald-500 hover:text-emerald-600 hover:bg-emerald-500/10"),children:v.enabled?"Revoke":"Grant"})]},v.id))}),y.length===0&&d.jsx("div",{className:"mt-4 p-4 rounded-xl bg-red-500/10 border border-red-500/20",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(ux,{className:"w-5 h-5 text-red-400 shrink-0 mt-0.5"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-red-400 mb-1",children:"All Access Disabled"}),d.jsx("p",{className:"text-xs text-red-400/70 mb-3",children:a?"Access is paused and all permissions are revoked. The app cannot function.":"All permissions revoked. The app cannot access any files."}),d.jsx(ra,{variant:"outline",size:"sm",onClick:()=>u(),className:"text-red-400 border-red-500/30 hover:bg-red-500/10",children:"Reconfigure Sources"})]})]})})]}),d.jsxs(bt,{className:"p-5 bg-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h2",{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[d.jsx(ro,{className:"w-4 h-4 text-muted-foreground"}),"Activity Log",d.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.length," entries)"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(ra,{variant:"ghost",size:"sm",onClick:x,disabled:t.length===0,className:"text-xs",children:[d.jsx(WN,{className:"w-3.5 h-3.5 mr-1"}),"Export CSV"]}),d.jsxs(ra,{variant:"ghost",size:"sm",onClick:r,disabled:t.length===0,className:"text-xs text-red-400 hover:text-red-300 hover:bg-red-500/10",children:[d.jsx(Nv,{className:"w-3.5 h-3.5 mr-1"}),"Clear"]})]})]}),a&&d.jsx("div",{className:"mb-4 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:d.jsxs("p",{className:"text-sm text-amber-400 flex items-center gap-2",children:[d.jsx(tE,{className:"w-4 h-4"}),"Logging paused. File access is disabled."]})}),t.length===0?d.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No activity recorded yet. Browse files to see access logs."}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"space-y-1 max-h-[400px] overflow-auto",children:p.map(v=>d.jsx(gM,{entry:v},v.id))}),t.length>20&&d.jsx(ra,{variant:"ghost",size:"sm",onClick:()=>g(!h),className:"w-full mt-3 text-xs",children:h?"Show less":`Show all ${t.length} entries`})]})]}),d.jsxs("div",{className:"p-4 rounded-xl bg-secondary/50 border border-border",children:[d.jsxs("h3",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[d.jsx(Xr,{className:"w-4 h-4 text-emerald-400"}),"Security Guarantees"]}),d.jsxs("ul",{className:"space-y-1.5 text-xs text-muted-foreground",children:[d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),d.jsx("span",{children:"All data stays on your machine. Nothing is ever uploaded or transmitted."})]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),d.jsx("span",{children:"Read-only access. Files are never created, modified, or deleted."})]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),d.jsx("span",{children:"No analytics, telemetry, or tracking of any kind."})]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),d.jsx("span",{children:"Open source. Audit the code yourself on GitHub."})]})]})]})]})]})}function Vd({icon:t,title:a,status:l,description:r,variant:s}){const c={success:"border-emerald-500/20 bg-emerald-500/5",warning:"border-amber-500/20 bg-amber-500/5",error:"border-red-500/20 bg-red-500/5"},u={success:"text-emerald-400",warning:"text-amber-400",error:"text-red-400"};return d.jsx(bt,{className:Se("p-4",c[s]),children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-secondary/50",children:d.jsx(t,{className:Se("w-4 h-4",u[s])})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:a}),d.jsx("p",{className:Se("text-sm font-medium",u[s]),children:l}),d.jsx("p",{className:"text-xs text-muted-foreground/70 mt-0.5",children:r})]})]})})}function gM({entry:t}){const a=new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),l={READ:"text-blue-500 dark:text-blue-400 bg-blue-500/10",LIST:"text-amber-500 dark:text-amber-400 bg-amber-500/10",STAT:"text-muted-foreground bg-secondary/50"};return d.jsxs("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg hover:bg-secondary/50 transition-colors text-xs",children:[d.jsx("span",{className:"text-muted-foreground/50 font-mono w-20 shrink-0",children:a}),d.jsx("span",{className:Se("px-1.5 py-0.5 rounded text-[10px] font-medium uppercase w-12 text-center shrink-0",l[t.type]),children:t.type}),d.jsx("span",{className:"font-mono text-muted-foreground truncate flex-1",children:t.path}),t.success?d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 shrink-0"}):d.jsx(Mc,{className:"w-3.5 h-3.5 text-red-400 shrink-0"})]})}function xM(){const[t,a]=A.useState(0),{sources:l,setSources:r,toggleSource:s,updateSourcePath:c,completeOnboarding:u,addSource:h,removeSource:g,agentName:p,setAgentName:y}=Mi(),[x,v]=A.useState(!1),w=A.useCallback(async()=>{v(!0);try{const C=Mi.getState().sources,D=await Promise.all(C.map(async z=>{try{const O=await fetch(`/api/check-path?path=${encodeURIComponent(z.path)}`);if(O.ok){const H=await O.json();return{...z,detected:H.exists,name:H.exists?H.expandedPath:z.name}}}catch{}return{...z,detected:!1}}));r(D)}catch{}v(!1)},[r]),S=C=>{a(C),C===2&&setTimeout(w,0)},N=l.filter(C=>C.enabled&&C.detected),E=[{title:"Welcome",component:d.jsx(yM,{})},{title:"Name",component:d.jsx(vM,{agentName:p,onChangeName:y})},{title:"Configure",component:d.jsx(bM,{sources:l,onToggle:s,onUpdatePath:c,detecting:x,onRedetect:w,onAddSource:h,onRemoveSource:g})},{title:"Review",component:d.jsx(SM,{sources:N})}],_=t===0||t===1||t===2&&N.length>0||t===3,k=()=>{t<E.length-1?S(t+1):u()},j=()=>{t>0&&S(t-1)};return d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-8",children:d.jsxs("div",{className:"w-full max-w-lg",children:[d.jsx("div",{className:"flex items-center justify-center gap-2 mb-8",children:E.map((C,D)=>d.jsxs("div",{className:"flex items-center",children:[d.jsx("div",{className:Se("w-8 h-8 rounded-full flex items-center justify-center text-xs font-medium transition-all",D<t&&"bg-emerald-500/20 text-emerald-400",D===t&&"bg-violet-500/20 text-violet-400 ring-2 ring-violet-500/50",D>t&&"bg-secondary text-muted-foreground"),children:D<t?d.jsx(An,{className:"w-4 h-4"}):D+1}),D<E.length-1&&d.jsx("div",{className:Se("w-12 h-0.5 mx-2 transition-colors",D<t?"bg-emerald-500/50":"bg-secondary")})]},D))}),d.jsxs(bt,{className:"p-8 bg-card border-border",children:[E[t].component,d.jsxs("div",{className:"flex items-center justify-between mt-8 pt-6 border-t border-border",children:[d.jsxs(ra,{variant:"ghost",onClick:j,disabled:t===0,className:Se(t===0&&"invisible"),children:[d.jsx(XN,{className:"w-4 h-4 mr-1"}),"Back"]}),d.jsx(ra,{variant:"glow",onClick:k,disabled:!_,children:t===E.length-1?"Get Started":"Continue"})]})]}),d.jsxs("p",{className:"text-center text-xs text-zinc-600 mt-6",children:["OpenClaw Memory Mapper v","1.2.1"," · Open Source"]})]})})}function yM(){return d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"inline-flex p-4 rounded-2xl bg-gradient-to-br from-violet-500/20 to-purple-600/20 border border-violet-500/30 mb-6",children:d.jsx($l,{className:"w-10 h-10 text-violet-400"})}),d.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Memory Mapper"}),d.jsx("p",{className:"text-muted-foreground mb-8",children:"Visualize your Claude agent's memory architecture"}),d.jsxs("div",{className:"grid gap-4 text-left",children:[d.jsx($d,{icon:Xr,title:"100% Local",description:"All data stays on your machine. Nothing is ever uploaded.",color:"emerald"}),d.jsx($d,{icon:Nh,title:"Read-Only",description:"We only read files. Your memory data is never modified.",color:"blue"}),d.jsx($d,{icon:jh,title:"No Telemetry",description:"Zero tracking, analytics, or external connections.",color:"amber"})]})]})}function vM({agentName:t,onChangeName:a}){return d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"inline-flex p-4 rounded-2xl bg-gradient-to-br from-amber-500/20 to-orange-600/20 border border-amber-500/30 mb-6",children:d.jsx(Sv,{className:"w-10 h-10 text-amber-400"})}),d.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-2",children:"Name Your Agent"}),d.jsx("p",{className:"text-muted-foreground mb-8",children:"Give your agent a name to personalize the experience. You can skip this."}),d.jsx("input",{type:"text",value:t,onChange:l=>a(l.target.value),placeholder:"e.g., Atlas, Sage, Nova...",className:"w-full bg-secondary border border-border rounded-xl px-4 py-3 text-center text-lg font-medium text-foreground focus:outline-none focus:border-violet-500 focus:ring-2 focus:ring-violet-500/20 placeholder:text-muted-foreground/40 transition-all",maxLength:32}),d.jsx("p",{className:"text-xs text-muted-foreground/60 mt-3",children:t?`"${t}'s Memory Architecture"`:'Leave blank to use "Agent Memory Architecture"'})]})}function $d({icon:t,title:a,description:l,color:r}){const s={emerald:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",blue:"bg-blue-500/10 text-blue-400 border-blue-500/20",amber:"bg-amber-500/10 text-amber-400 border-amber-500/20"};return d.jsxs("div",{className:"flex items-start gap-4 p-4 rounded-xl bg-secondary/30 border border-border",children:[d.jsx("div",{className:Se("p-2 rounded-lg border",s[r]),children:d.jsx(t,{className:"w-4 h-4"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-foreground",children:a}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:l})]})]})}function bM({sources:t,onToggle:a,onUpdatePath:l,detecting:r,onRedetect:s,onAddSource:c,onRemoveSource:u}){const[h,g]=A.useState(null),p=()=>{const y=c();g(y)};return d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Configure Sources"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Select which memory directories to visualize. Click paths to edit."}),d.jsx("div",{className:"space-y-3",children:t.map(y=>d.jsx(wM,{source:y,onToggle:()=>a(y.id),onUpdatePath:x=>{l(y.id,x),setTimeout(s,10)},onRemove:()=>u(y.id),detecting:r,isEditing:h===y.id,onStartEdit:()=>g(y.id),onEndEdit:()=>g(null),canRemove:t.length>1},y.id))}),d.jsxs("button",{onClick:p,className:"mt-3 w-full flex items-center justify-center gap-2 p-3 rounded-xl border border-dashed border-border text-muted-foreground hover:text-foreground hover:border-violet-500/50 transition-colors",children:[d.jsx(LE,{className:"w-4 h-4"}),d.jsx("span",{className:"text-sm",children:"Add custom path"})]}),r&&d.jsxs("p",{className:"text-xs text-muted-foreground mt-4 flex items-center gap-2",children:[d.jsx("div",{className:"w-3 h-3 border-2 border-violet-400 border-t-transparent rounded-full animate-spin"}),"Detecting memory directories..."]}),!r&&t.length===0&&d.jsxs("div",{className:"mt-4 p-4 rounded-xl bg-blue-500/10 border border-blue-500/20",children:[d.jsx("p",{className:"text-sm text-blue-400 leading-relaxed",children:"Add a custom path to your agent's memory folder."}),d.jsx("p",{className:"text-xs text-blue-400/60 mt-1 font-mono",children:"e.g. ~/my-memory"})]}),!r&&t.length>0&&t.every(y=>!y.detected)&&d.jsx("div",{className:"mt-4 p-4 rounded-xl bg-amber-500/10 border border-amber-500/20",children:d.jsx("p",{className:"text-sm text-amber-400",children:"No paths found. Click the path text to edit, or make sure the API server is running."})})]})}function wM({source:t,onToggle:a,onUpdatePath:l,onRemove:r,detecting:s,isEditing:c,onStartEdit:u,onEndEdit:h,canRemove:g}){const[p,y]=A.useState(t.path),x=s?Eh:t.detected?mE:yE,v=()=>{l(p),h()},w=S=>{S.key==="Enter"?v():S.key==="Escape"&&(y(t.path),h())};return d.jsxs("div",{className:Se("w-full flex items-center gap-4 p-4 rounded-xl border transition-all",t.enabled&&t.detected?"bg-violet-500/10 border-violet-500/30":"bg-secondary/30 border-border"),children:[d.jsx("button",{onClick:a,disabled:!t.detected,className:Se("w-5 h-5 rounded-md border-2 flex items-center justify-center transition-colors cursor-pointer",t.enabled&&t.detected?"bg-violet-500 border-violet-500":"border-border",!t.detected&&"opacity-50 cursor-not-allowed"),children:t.enabled&&t.detected&&d.jsx(An,{className:"w-3 h-3 text-white"})}),d.jsx(x,{className:Se("w-5 h-5 shrink-0",s&&"animate-pulse text-muted-foreground",!s&&t.detected&&"text-emerald-400",!s&&!t.detected&&"text-zinc-600")}),d.jsx("div",{className:"flex-1 min-w-0",children:c?d.jsx("input",{type:"text",value:p,onChange:S=>y(S.target.value),onBlur:v,onKeyDown:w,autoFocus:!0,placeholder:"Enter path to your memory folder...",className:"w-full bg-secondary border border-border rounded-md px-2 py-1 text-sm font-mono text-foreground focus:outline-none focus:border-violet-500 placeholder:text-muted-foreground/50"}):d.jsx("button",{onClick:u,className:"font-mono text-sm text-foreground hover:text-violet-400 transition-colors cursor-pointer truncate block w-full text-left",title:"Click to edit path",children:t.path||d.jsx("span",{className:"text-muted-foreground/50",children:"Click to enter path..."})})}),!s&&!c&&d.jsx("span",{className:Se("text-xs shrink-0",t.detected?"text-emerald-400":"text-zinc-600"),children:t.detected?"Found":"Not found"}),g&&!c&&d.jsx("button",{onClick:r,className:"p-1.5 rounded-md text-zinc-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",title:"Remove source",children:d.jsx(Nv,{className:"w-4 h-4"})})]})}function SM({sources:t}){return d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Review Permissions"}),d.jsxs("p",{className:"text-sm text-muted-foreground mb-6",children:["Memory Mapper will have"," ",d.jsx("strong",{className:"text-foreground",children:"read-only"})," access to:"]}),d.jsx("div",{className:"space-y-3 mb-6",children:t.map(a=>d.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-xl bg-secondary/30 border border-border",children:[d.jsx(Eh,{className:"w-5 h-5 text-violet-400"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("span",{className:"font-mono text-sm text-foreground",children:a.path}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Memory files, logs, and configuration"})]}),d.jsx(An,{className:"w-4 h-4 text-emerald-400"})]},a.id))}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Yd,{icon:bv,text:"Data never leaves your machine"}),d.jsx(Yd,{icon:Nh,text:"Files are never modified or deleted"}),d.jsx(Yd,{icon:jh,text:"No external network connections"})]})]})}function Yd({icon:t,text:a}){return d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(t,{className:"w-3.5 h-3.5 text-emerald-500"}),d.jsx("span",{children:a})]})}function dt(t,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t==null||t(s),l===!1||!s.defaultPrevented)return a==null?void 0:a(s)}}function Zc(t,a=[]){let l=[];function r(c,u){const h=A.createContext(u),g=l.length;l=[...l,u];const p=x=>{var _;const{scope:v,children:w,...S}=x,N=((_=v==null?void 0:v[t])==null?void 0:_[g])||h,E=A.useMemo(()=>S,Object.values(S));return d.jsx(N.Provider,{value:E,children:w})};p.displayName=c+"Provider";function y(x,v){var N;const w=((N=v==null?void 0:v[t])==null?void 0:N[g])||h,S=A.useContext(w);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[p,y]}const s=()=>{const c=l.map(u=>A.createContext(u));return function(h){const g=(h==null?void 0:h[t])||c;return A.useMemo(()=>({[`__scope${t}`]:{...h,[t]:g}}),[h,g])}};return s.scopeName=t,[r,NM(s,...a)]}function NM(...t){const a=t[0];if(t.length===1)return a;const l=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const u=r.reduce((h,{useScope:g,scopeName:p})=>{const x=g(c)[`__scope${p}`];return{...h,...x}},{});return A.useMemo(()=>({[`__scope${a.scopeName}`]:u}),[u])}};return l.scopeName=a.scopeName,l}function EM(t){const a=jM(t),l=A.forwardRef((r,s)=>{const{children:c,...u}=r,h=A.Children.toArray(c),g=h.find(AM);if(g){const p=g.props.children,y=h.map(x=>x===g?A.Children.count(p)>1?A.Children.only(null):A.isValidElement(p)?p.props.children:null:x);return d.jsx(a,{...u,ref:s,children:A.isValidElement(p)?A.cloneElement(p,void 0,y):null})}return d.jsx(a,{...u,ref:s,children:c})});return l.displayName=`${t}.Slot`,l}function jM(t){const a=A.forwardRef((l,r)=>{const{children:s,...c}=l;if(A.isValidElement(s)){const u=TM(s),h=CM(c,s.props);return s.type!==A.Fragment&&(h.ref=r?Gc(r,u):u),A.cloneElement(s,h)}return A.Children.count(s)>1?A.Children.only(null):null});return a.displayName=`${t}.SlotClone`,a}var _M=Symbol("radix.slottable");function AM(t){return A.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===_M}function CM(t,a){const l={...a};for(const r in a){const s=t[r],c=a[r];/^on[A-Z]/.test(r)?s&&c?l[r]=(...h)=>{const g=c(...h);return s(...h),g}:s&&(l[r]=s):r==="style"?l[r]={...s,...c}:r==="className"&&(l[r]=[s,c].filter(Boolean).join(" "))}return{...t,...l}}function TM(t){var r,s;let a=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var MM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dt=MM.reduce((t,a)=>{const l=EM(`Primitive.${a}`),r=A.forwardRef((s,c)=>{const{asChild:u,...h}=s,g=u?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(g,{...h,ref:c})});return r.displayName=`Primitive.${a}`,{...t,[a]:r}},{});function xb(t,a){t&&Vc.flushSync(()=>t.dispatchEvent(a))}function Fa(t){const a=A.useRef(t);return A.useEffect(()=>{a.current=t}),A.useMemo(()=>(...l)=>{var r;return(r=a.current)==null?void 0:r.call(a,...l)},[])}function zM(t,a=globalThis==null?void 0:globalThis.document){const l=Fa(t);A.useEffect(()=>{const r=s=>{s.key==="Escape"&&l(s)};return a.addEventListener("keydown",r,{capture:!0}),()=>a.removeEventListener("keydown",r,{capture:!0})},[l,a])}var OM="DismissableLayer",dh="dismissableLayer.update",RM="dismissableLayer.pointerDownOutside",kM="dismissableLayer.focusOutside",jy,yb=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fh=A.forwardRef((t,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,onDismiss:h,...g}=t,p=A.useContext(yb),[y,x]=A.useState(null),v=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=A.useState({}),S=gn(a,O=>x(O)),N=Array.from(p.layers),[E]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),_=N.indexOf(E),k=y?N.indexOf(y):-1,j=p.layersWithOutsidePointerEventsDisabled.size>0,C=k>=_,D=LM(O=>{const H=O.target,Z=[...p.branches].some(ne=>ne.contains(H));!C||Z||(s==null||s(O),u==null||u(O),O.defaultPrevented||h==null||h())},v),z=HM(O=>{const H=O.target;[...p.branches].some(ne=>ne.contains(H))||(c==null||c(O),u==null||u(O),O.defaultPrevented||h==null||h())},v);return zM(O=>{k===p.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&h&&(O.preventDefault(),h()))},v),A.useEffect(()=>{if(y)return l&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(jy=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),_y(),()=>{l&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=jy)}},[y,v,l,p]),A.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),_y())},[y,p]),A.useEffect(()=>{const O=()=>w({});return document.addEventListener(dh,O),()=>document.removeEventListener(dh,O)},[]),d.jsx(Dt.div,{...g,ref:S,style:{pointerEvents:j?C?"auto":"none":void 0,...t.style},onFocusCapture:dt(t.onFocusCapture,z.onFocusCapture),onBlurCapture:dt(t.onBlurCapture,z.onBlurCapture),onPointerDownCapture:dt(t.onPointerDownCapture,D.onPointerDownCapture)})});Fh.displayName=OM;var DM="DismissableLayerBranch",vb=A.forwardRef((t,a)=>{const l=A.useContext(yb),r=A.useRef(null),s=gn(a,r);return A.useEffect(()=>{const c=r.current;if(c)return l.branches.add(c),()=>{l.branches.delete(c)}},[l.branches]),d.jsx(Dt.div,{...t,ref:s})});vb.displayName=DM;function LM(t,a=globalThis==null?void 0:globalThis.document){const l=Fa(t),r=A.useRef(!1),s=A.useRef(()=>{});return A.useEffect(()=>{const c=h=>{if(h.target&&!r.current){let g=function(){bb(RM,l,p,{discrete:!0})};const p={originalEvent:h};h.pointerType==="touch"?(a.removeEventListener("click",s.current),s.current=g,a.addEventListener("click",s.current,{once:!0})):g()}else a.removeEventListener("click",s.current);r.current=!1},u=window.setTimeout(()=>{a.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),a.removeEventListener("pointerdown",c),a.removeEventListener("click",s.current)}},[a,l]),{onPointerDownCapture:()=>r.current=!0}}function HM(t,a=globalThis==null?void 0:globalThis.document){const l=Fa(t),r=A.useRef(!1);return A.useEffect(()=>{const s=c=>{c.target&&!r.current&&bb(kM,l,{originalEvent:c},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _y(){const t=new CustomEvent(dh);document.dispatchEvent(t)}function bb(t,a,l,{discrete:r}){const s=l.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(t,a,{once:!0}),r?xb(s,c):s.dispatchEvent(c)}var BM=Fh,UM=vb,Pa=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{};const VM=["top","right","bottom","left"],Ia=Math.min,Zt=Math.max,Ec=Math.round,Js=Math.floor,Mn=t=>({x:t,y:t}),$M={left:"right",right:"left",bottom:"top",top:"bottom"},YM={start:"end",end:"start"};function hh(t,a,l){return Zt(t,Ia(a,l))}function ca(t,a){return typeof t=="function"?t(a):t}function ua(t){return t.split("-")[0]}function Yl(t){return t.split("-")[1]}function Ph(t){return t==="x"?"y":"x"}function Ih(t){return t==="y"?"height":"width"}const qM=new Set(["top","bottom"]);function Cn(t){return qM.has(ua(t))?"y":"x"}function Jh(t){return Ph(Cn(t))}function XM(t,a,l){l===void 0&&(l=!1);const r=Yl(t),s=Jh(t),c=Ih(s);let u=s==="x"?r===(l?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[c]>a.floating[c]&&(u=jc(u)),[u,jc(u)]}function GM(t){const a=jc(t);return[mh(t),a,mh(a)]}function mh(t){return t.replace(/start|end/g,a=>YM[a])}const Ay=["left","right"],Cy=["right","left"],ZM=["top","bottom"],QM=["bottom","top"];function KM(t,a,l){switch(t){case"top":case"bottom":return l?a?Cy:Ay:a?Ay:Cy;case"left":case"right":return a?ZM:QM;default:return[]}}function FM(t,a,l,r){const s=Yl(t);let c=KM(ua(t),l==="start",r);return s&&(c=c.map(u=>u+"-"+s),a&&(c=c.concat(c.map(mh)))),c}function jc(t){return t.replace(/left|right|bottom|top/g,a=>$M[a])}function PM(t){return{top:0,right:0,bottom:0,left:0,...t}}function wb(t){return typeof t!="number"?PM(t):{top:t,right:t,bottom:t,left:t}}function _c(t){const{x:a,y:l,width:r,height:s}=t;return{width:r,height:s,top:l,left:a,right:a+r,bottom:l+s,x:a,y:l}}function Ty(t,a,l){let{reference:r,floating:s}=t;const c=Cn(a),u=Jh(a),h=Ih(u),g=ua(a),p=c==="y",y=r.x+r.width/2-s.width/2,x=r.y+r.height/2-s.height/2,v=r[h]/2-s[h]/2;let w;switch(g){case"top":w={x:y,y:r.y-s.height};break;case"bottom":w={x:y,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:x};break;case"left":w={x:r.x-s.width,y:x};break;default:w={x:r.x,y:r.y}}switch(Yl(a)){case"start":w[u]-=v*(l&&p?-1:1);break;case"end":w[u]+=v*(l&&p?-1:1);break}return w}async function IM(t,a){var l;a===void 0&&(a={});const{x:r,y:s,platform:c,rects:u,elements:h,strategy:g}=t,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:x="floating",altBoundary:v=!1,padding:w=0}=ca(a,t),S=wb(w),E=h[v?x==="floating"?"reference":"floating":x],_=_c(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(E)))==null||l?E:E.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:p,rootBoundary:y,strategy:g})),k=x==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,j=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),C=await(c.isElement==null?void 0:c.isElement(j))?await(c.getScale==null?void 0:c.getScale(j))||{x:1,y:1}:{x:1,y:1},D=_c(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:k,offsetParent:j,strategy:g}):k);return{top:(_.top-D.top+S.top)/C.y,bottom:(D.bottom-_.bottom+S.bottom)/C.y,left:(_.left-D.left+S.left)/C.x,right:(D.right-_.right+S.right)/C.x}}const JM=async(t,a,l)=>{const{placement:r="bottom",strategy:s="absolute",middleware:c=[],platform:u}=l,h=c.filter(Boolean),g=await(u.isRTL==null?void 0:u.isRTL(a));let p=await u.getElementRects({reference:t,floating:a,strategy:s}),{x:y,y:x}=Ty(p,r,g),v=r,w={},S=0;for(let E=0;E<h.length;E++){var N;const{name:_,fn:k}=h[E],{x:j,y:C,data:D,reset:z}=await k({x:y,y:x,initialPlacement:r,placement:v,strategy:s,middlewareData:w,rects:p,platform:{...u,detectOverflow:(N=u.detectOverflow)!=null?N:IM},elements:{reference:t,floating:a}});y=j??y,x=C??x,w={...w,[_]:{...w[_],...D}},z&&S<=50&&(S++,typeof z=="object"&&(z.placement&&(v=z.placement),z.rects&&(p=z.rects===!0?await u.getElementRects({reference:t,floating:a,strategy:s}):z.rects),{x:y,y:x}=Ty(p,v,g)),E=-1)}return{x:y,y:x,placement:v,strategy:s,middlewareData:w}},WM=t=>({name:"arrow",options:t,async fn(a){const{x:l,y:r,placement:s,rects:c,platform:u,elements:h,middlewareData:g}=a,{element:p,padding:y=0}=ca(t,a)||{};if(p==null)return{};const x=wb(y),v={x:l,y:r},w=Jh(s),S=Ih(w),N=await u.getDimensions(p),E=w==="y",_=E?"top":"left",k=E?"bottom":"right",j=E?"clientHeight":"clientWidth",C=c.reference[S]+c.reference[w]-v[w]-c.floating[S],D=v[w]-c.reference[w],z=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let O=z?z[j]:0;(!O||!await(u.isElement==null?void 0:u.isElement(z)))&&(O=h.floating[j]||c.floating[S]);const H=C/2-D/2,Z=O/2-N[S]/2-1,ne=Ia(x[_],Z),Q=Ia(x[k],Z),K=ne,te=O-N[S]-Q,L=O/2-N[S]/2+H,G=hh(K,L,te),M=!g.arrow&&Yl(s)!=null&&L!==G&&c.reference[S]/2-(L<K?ne:Q)-N[S]/2<0,U=M?L<K?L-K:L-te:0;return{[w]:v[w]+U,data:{[w]:G,centerOffset:L-G-U,...M&&{alignmentOffset:U}},reset:M}}}),ez=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(a){var l,r;const{placement:s,middlewareData:c,rects:u,initialPlacement:h,platform:g,elements:p}=a,{mainAxis:y=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:N=!0,...E}=ca(t,a);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const _=ua(s),k=Cn(h),j=ua(h)===h,C=await(g.isRTL==null?void 0:g.isRTL(p.floating)),D=v||(j||!N?[jc(h)]:GM(h)),z=S!=="none";!v&&z&&D.push(...FM(h,N,S,C));const O=[h,...D],H=await g.detectOverflow(a,E),Z=[];let ne=((r=c.flip)==null?void 0:r.overflows)||[];if(y&&Z.push(H[_]),x){const L=XM(s,u,C);Z.push(H[L[0]],H[L[1]])}if(ne=[...ne,{placement:s,overflows:Z}],!Z.every(L=>L<=0)){var Q,K;const L=(((Q=c.flip)==null?void 0:Q.index)||0)+1,G=O[L];if(G&&(!(x==="alignment"?k!==Cn(G):!1)||ne.every(B=>Cn(B.placement)===k?B.overflows[0]>0:!0)))return{data:{index:L,overflows:ne},reset:{placement:G}};let M=(K=ne.filter(U=>U.overflows[0]<=0).sort((U,B)=>U.overflows[1]-B.overflows[1])[0])==null?void 0:K.placement;if(!M)switch(w){case"bestFit":{var te;const U=(te=ne.filter(B=>{if(z){const Y=Cn(B.placement);return Y===k||Y==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Y=>Y>0).reduce((Y,q)=>Y+q,0)]).sort((B,Y)=>B[1]-Y[1])[0])==null?void 0:te[0];U&&(M=U);break}case"initialPlacement":M=h;break}if(s!==M)return{reset:{placement:M}}}return{}}}};function My(t,a){return{top:t.top-a.height,right:t.right-a.width,bottom:t.bottom-a.height,left:t.left-a.width}}function zy(t){return VM.some(a=>t[a]>=0)}const tz=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(a){const{rects:l,platform:r}=a,{strategy:s="referenceHidden",...c}=ca(t,a);switch(s){case"referenceHidden":{const u=await r.detectOverflow(a,{...c,elementContext:"reference"}),h=My(u,l.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:zy(h)}}}case"escaped":{const u=await r.detectOverflow(a,{...c,altBoundary:!0}),h=My(u,l.floating);return{data:{escapedOffsets:h,escaped:zy(h)}}}default:return{}}}}},Sb=new Set(["left","top"]);async function nz(t,a){const{placement:l,platform:r,elements:s}=t,c=await(r.isRTL==null?void 0:r.isRTL(s.floating)),u=ua(l),h=Yl(l),g=Cn(l)==="y",p=Sb.has(u)?-1:1,y=c&&g?-1:1,x=ca(a,t);let{mainAxis:v,crossAxis:w,alignmentAxis:S}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return h&&typeof S=="number"&&(w=h==="end"?S*-1:S),g?{x:w*y,y:v*p}:{x:v*p,y:w*y}}const az=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(a){var l,r;const{x:s,y:c,placement:u,middlewareData:h}=a,g=await nz(a,t);return u===((l=h.offset)==null?void 0:l.placement)&&(r=h.arrow)!=null&&r.alignmentOffset?{}:{x:s+g.x,y:c+g.y,data:{...g,placement:u}}}}},iz=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(a){const{x:l,y:r,placement:s,platform:c}=a,{mainAxis:u=!0,crossAxis:h=!1,limiter:g={fn:_=>{let{x:k,y:j}=_;return{x:k,y:j}}},...p}=ca(t,a),y={x:l,y:r},x=await c.detectOverflow(a,p),v=Cn(ua(s)),w=Ph(v);let S=y[w],N=y[v];if(u){const _=w==="y"?"top":"left",k=w==="y"?"bottom":"right",j=S+x[_],C=S-x[k];S=hh(j,S,C)}if(h){const _=v==="y"?"top":"left",k=v==="y"?"bottom":"right",j=N+x[_],C=N-x[k];N=hh(j,N,C)}const E=g.fn({...a,[w]:S,[v]:N});return{...E,data:{x:E.x-l,y:E.y-r,enabled:{[w]:u,[v]:h}}}}}},lz=function(t){return t===void 0&&(t={}),{options:t,fn(a){const{x:l,y:r,placement:s,rects:c,middlewareData:u}=a,{offset:h=0,mainAxis:g=!0,crossAxis:p=!0}=ca(t,a),y={x:l,y:r},x=Cn(s),v=Ph(x);let w=y[v],S=y[x];const N=ca(h,a),E=typeof N=="number"?{mainAxis:N,crossAxis:0}:{mainAxis:0,crossAxis:0,...N};if(g){const j=v==="y"?"height":"width",C=c.reference[v]-c.floating[j]+E.mainAxis,D=c.reference[v]+c.reference[j]-E.mainAxis;w<C?w=C:w>D&&(w=D)}if(p){var _,k;const j=v==="y"?"width":"height",C=Sb.has(ua(s)),D=c.reference[x]-c.floating[j]+(C&&((_=u.offset)==null?void 0:_[x])||0)+(C?0:E.crossAxis),z=c.reference[x]+c.reference[j]+(C?0:((k=u.offset)==null?void 0:k[x])||0)-(C?E.crossAxis:0);S<D?S=D:S>z&&(S=z)}return{[v]:w,[x]:S}}}},rz=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(a){var l,r;const{placement:s,rects:c,platform:u,elements:h}=a,{apply:g=()=>{},...p}=ca(t,a),y=await u.detectOverflow(a,p),x=ua(s),v=Yl(s),w=Cn(s)==="y",{width:S,height:N}=c.floating;let E,_;x==="top"||x==="bottom"?(E=x,_=v===(await(u.isRTL==null?void 0:u.isRTL(h.floating))?"start":"end")?"left":"right"):(_=x,E=v==="end"?"top":"bottom");const k=N-y.top-y.bottom,j=S-y.left-y.right,C=Ia(N-y[E],k),D=Ia(S-y[_],j),z=!a.middlewareData.shift;let O=C,H=D;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(H=j),(r=a.middlewareData.shift)!=null&&r.enabled.y&&(O=k),z&&!v){const ne=Zt(y.left,0),Q=Zt(y.right,0),K=Zt(y.top,0),te=Zt(y.bottom,0);w?H=S-2*(ne!==0||Q!==0?ne+Q:Zt(y.left,y.right)):O=N-2*(K!==0||te!==0?K+te:Zt(y.top,y.bottom))}await g({...a,availableWidth:H,availableHeight:O});const Z=await u.getDimensions(h.floating);return S!==Z.width||N!==Z.height?{reset:{rects:!0}}:{}}}};function Qc(){return typeof window<"u"}function ql(t){return Nb(t)?(t.nodeName||"").toLowerCase():"#document"}function Kt(t){var a;return(t==null||(a=t.ownerDocument)==null?void 0:a.defaultView)||window}function kn(t){var a;return(a=(Nb(t)?t.ownerDocument:t.document)||window.document)==null?void 0:a.documentElement}function Nb(t){return Qc()?t instanceof Node||t instanceof Kt(t).Node:!1}function xn(t){return Qc()?t instanceof Element||t instanceof Kt(t).Element:!1}function On(t){return Qc()?t instanceof HTMLElement||t instanceof Kt(t).HTMLElement:!1}function Oy(t){return!Qc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Kt(t).ShadowRoot}const oz=new Set(["inline","contents"]);function mo(t){const{overflow:a,overflowX:l,overflowY:r,display:s}=yn(t);return/auto|scroll|overlay|hidden|clip/.test(a+r+l)&&!oz.has(s)}const sz=new Set(["table","td","th"]);function cz(t){return sz.has(ql(t))}const uz=[":popover-open",":modal"];function Kc(t){return uz.some(a=>{try{return t.matches(a)}catch{return!1}})}const fz=["transform","translate","scale","rotate","perspective"],dz=["transform","translate","scale","rotate","perspective","filter"],hz=["paint","layout","strict","content"];function Wh(t){const a=em(),l=xn(t)?yn(t):t;return fz.some(r=>l[r]?l[r]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||dz.some(r=>(l.willChange||"").includes(r))||hz.some(r=>(l.contain||"").includes(r))}function mz(t){let a=Ja(t);for(;On(a)&&!Ul(a);){if(Wh(a))return a;if(Kc(a))return null;a=Ja(a)}return null}function em(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const pz=new Set(["html","body","#document"]);function Ul(t){return pz.has(ql(t))}function yn(t){return Kt(t).getComputedStyle(t)}function Fc(t){return xn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ja(t){if(ql(t)==="html")return t;const a=t.assignedSlot||t.parentNode||Oy(t)&&t.host||kn(t);return Oy(a)?a.host:a}function Eb(t){const a=Ja(t);return Ul(a)?t.ownerDocument?t.ownerDocument.body:t.body:On(a)&&mo(a)?a:Eb(a)}function ao(t,a,l){var r;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=Eb(t),c=s===((r=t.ownerDocument)==null?void 0:r.body),u=Kt(s);if(c){const h=ph(u);return a.concat(u,u.visualViewport||[],mo(s)?s:[],h&&l?ao(h):[])}return a.concat(s,ao(s,[],l))}function ph(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jb(t){const a=yn(t);let l=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const s=On(t),c=s?t.offsetWidth:l,u=s?t.offsetHeight:r,h=Ec(l)!==c||Ec(r)!==u;return h&&(l=c,r=u),{width:l,height:r,$:h}}function tm(t){return xn(t)?t:t.contextElement}function Tl(t){const a=tm(t);if(!On(a))return Mn(1);const l=a.getBoundingClientRect(),{width:r,height:s,$:c}=jb(a);let u=(c?Ec(l.width):l.width)/r,h=(c?Ec(l.height):l.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!h||!Number.isFinite(h))&&(h=1),{x:u,y:h}}const gz=Mn(0);function _b(t){const a=Kt(t);return!em()||!a.visualViewport?gz:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function xz(t,a,l){return a===void 0&&(a=!1),!l||a&&l!==Kt(t)?!1:a}function Di(t,a,l,r){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=t.getBoundingClientRect(),c=tm(t);let u=Mn(1);a&&(r?xn(r)&&(u=Tl(r)):u=Tl(t));const h=xz(c,l,r)?_b(c):Mn(0);let g=(s.left+h.x)/u.x,p=(s.top+h.y)/u.y,y=s.width/u.x,x=s.height/u.y;if(c){const v=Kt(c),w=r&&xn(r)?Kt(r):r;let S=v,N=ph(S);for(;N&&r&&w!==S;){const E=Tl(N),_=N.getBoundingClientRect(),k=yn(N),j=_.left+(N.clientLeft+parseFloat(k.paddingLeft))*E.x,C=_.top+(N.clientTop+parseFloat(k.paddingTop))*E.y;g*=E.x,p*=E.y,y*=E.x,x*=E.y,g+=j,p+=C,S=Kt(N),N=ph(S)}}return _c({width:y,height:x,x:g,y:p})}function Pc(t,a){const l=Fc(t).scrollLeft;return a?a.left+l:Di(kn(t)).left+l}function Ab(t,a){const l=t.getBoundingClientRect(),r=l.left+a.scrollLeft-Pc(t,l),s=l.top+a.scrollTop;return{x:r,y:s}}function yz(t){let{elements:a,rect:l,offsetParent:r,strategy:s}=t;const c=s==="fixed",u=kn(r),h=a?Kc(a.floating):!1;if(r===u||h&&c)return l;let g={scrollLeft:0,scrollTop:0},p=Mn(1);const y=Mn(0),x=On(r);if((x||!x&&!c)&&((ql(r)!=="body"||mo(u))&&(g=Fc(r)),On(r))){const w=Di(r);p=Tl(r),y.x=w.x+r.clientLeft,y.y=w.y+r.clientTop}const v=u&&!x&&!c?Ab(u,g):Mn(0);return{width:l.width*p.x,height:l.height*p.y,x:l.x*p.x-g.scrollLeft*p.x+y.x+v.x,y:l.y*p.y-g.scrollTop*p.y+y.y+v.y}}function vz(t){return Array.from(t.getClientRects())}function bz(t){const a=kn(t),l=Fc(t),r=t.ownerDocument.body,s=Zt(a.scrollWidth,a.clientWidth,r.scrollWidth,r.clientWidth),c=Zt(a.scrollHeight,a.clientHeight,r.scrollHeight,r.clientHeight);let u=-l.scrollLeft+Pc(t);const h=-l.scrollTop;return yn(r).direction==="rtl"&&(u+=Zt(a.clientWidth,r.clientWidth)-s),{width:s,height:c,x:u,y:h}}const Ry=25;function wz(t,a){const l=Kt(t),r=kn(t),s=l.visualViewport;let c=r.clientWidth,u=r.clientHeight,h=0,g=0;if(s){c=s.width,u=s.height;const y=em();(!y||y&&a==="fixed")&&(h=s.offsetLeft,g=s.offsetTop)}const p=Pc(r);if(p<=0){const y=r.ownerDocument,x=y.body,v=getComputedStyle(x),w=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(r.clientWidth-x.clientWidth-w);S<=Ry&&(c-=S)}else p<=Ry&&(c+=p);return{width:c,height:u,x:h,y:g}}const Sz=new Set(["absolute","fixed"]);function Nz(t,a){const l=Di(t,!0,a==="fixed"),r=l.top+t.clientTop,s=l.left+t.clientLeft,c=On(t)?Tl(t):Mn(1),u=t.clientWidth*c.x,h=t.clientHeight*c.y,g=s*c.x,p=r*c.y;return{width:u,height:h,x:g,y:p}}function ky(t,a,l){let r;if(a==="viewport")r=wz(t,l);else if(a==="document")r=bz(kn(t));else if(xn(a))r=Nz(a,l);else{const s=_b(t);r={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return _c(r)}function Cb(t,a){const l=Ja(t);return l===a||!xn(l)||Ul(l)?!1:yn(l).position==="fixed"||Cb(l,a)}function Ez(t,a){const l=a.get(t);if(l)return l;let r=ao(t,[],!1).filter(h=>xn(h)&&ql(h)!=="body"),s=null;const c=yn(t).position==="fixed";let u=c?Ja(t):t;for(;xn(u)&&!Ul(u);){const h=yn(u),g=Wh(u);!g&&h.position==="fixed"&&(s=null),(c?!g&&!s:!g&&h.position==="static"&&!!s&&Sz.has(s.position)||mo(u)&&!g&&Cb(t,u))?r=r.filter(y=>y!==u):s=h,u=Ja(u)}return a.set(t,r),r}function jz(t){let{element:a,boundary:l,rootBoundary:r,strategy:s}=t;const u=[...l==="clippingAncestors"?Kc(a)?[]:Ez(a,this._c):[].concat(l),r],h=u[0],g=u.reduce((p,y)=>{const x=ky(a,y,s);return p.top=Zt(x.top,p.top),p.right=Ia(x.right,p.right),p.bottom=Ia(x.bottom,p.bottom),p.left=Zt(x.left,p.left),p},ky(a,h,s));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}}function _z(t){const{width:a,height:l}=jb(t);return{width:a,height:l}}function Az(t,a,l){const r=On(a),s=kn(a),c=l==="fixed",u=Di(t,!0,c,a);let h={scrollLeft:0,scrollTop:0};const g=Mn(0);function p(){g.x=Pc(s)}if(r||!r&&!c)if((ql(a)!=="body"||mo(s))&&(h=Fc(a)),r){const w=Di(a,!0,c,a);g.x=w.x+a.clientLeft,g.y=w.y+a.clientTop}else s&&p();c&&!r&&s&&p();const y=s&&!r&&!c?Ab(s,h):Mn(0),x=u.left+h.scrollLeft-g.x-y.x,v=u.top+h.scrollTop-g.y-y.y;return{x,y:v,width:u.width,height:u.height}}function qd(t){return yn(t).position==="static"}function Dy(t,a){if(!On(t)||yn(t).position==="fixed")return null;if(a)return a(t);let l=t.offsetParent;return kn(t)===l&&(l=l.ownerDocument.body),l}function Tb(t,a){const l=Kt(t);if(Kc(t))return l;if(!On(t)){let s=Ja(t);for(;s&&!Ul(s);){if(xn(s)&&!qd(s))return s;s=Ja(s)}return l}let r=Dy(t,a);for(;r&&cz(r)&&qd(r);)r=Dy(r,a);return r&&Ul(r)&&qd(r)&&!Wh(r)?l:r||mz(t)||l}const Cz=async function(t){const a=this.getOffsetParent||Tb,l=this.getDimensions,r=await l(t.floating);return{reference:Az(t.reference,await a(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tz(t){return yn(t).direction==="rtl"}const Mz={convertOffsetParentRelativeRectToViewportRelativeRect:yz,getDocumentElement:kn,getClippingRect:jz,getOffsetParent:Tb,getElementRects:Cz,getClientRects:vz,getDimensions:_z,getScale:Tl,isElement:xn,isRTL:Tz};function Mb(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height}function zz(t,a){let l=null,r;const s=kn(t);function c(){var h;clearTimeout(r),(h=l)==null||h.disconnect(),l=null}function u(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),c();const p=t.getBoundingClientRect(),{left:y,top:x,width:v,height:w}=p;if(h||a(),!v||!w)return;const S=Js(x),N=Js(s.clientWidth-(y+v)),E=Js(s.clientHeight-(x+w)),_=Js(y),j={rootMargin:-S+"px "+-N+"px "+-E+"px "+-_+"px",threshold:Zt(0,Ia(1,g))||1};let C=!0;function D(z){const O=z[0].intersectionRatio;if(O!==g){if(!C)return u();O?u(!1,O):r=setTimeout(()=>{u(!1,1e-7)},1e3)}O===1&&!Mb(p,t.getBoundingClientRect())&&u(),C=!1}try{l=new IntersectionObserver(D,{...j,root:s.ownerDocument})}catch{l=new IntersectionObserver(D,j)}l.observe(t)}return u(!0),c}function Oz(t,a,l,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=r,p=tm(t),y=s||c?[...p?ao(p):[],...ao(a)]:[];y.forEach(_=>{s&&_.addEventListener("scroll",l,{passive:!0}),c&&_.addEventListener("resize",l)});const x=p&&h?zz(p,l):null;let v=-1,w=null;u&&(w=new ResizeObserver(_=>{let[k]=_;k&&k.target===p&&w&&(w.unobserve(a),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var j;(j=w)==null||j.observe(a)})),l()}),p&&!g&&w.observe(p),w.observe(a));let S,N=g?Di(t):null;g&&E();function E(){const _=Di(t);N&&!Mb(N,_)&&l(),N=_,S=requestAnimationFrame(E)}return l(),()=>{var _;y.forEach(k=>{s&&k.removeEventListener("scroll",l),c&&k.removeEventListener("resize",l)}),x==null||x(),(_=w)==null||_.disconnect(),w=null,g&&cancelAnimationFrame(S)}}const Rz=az,kz=iz,Dz=ez,Lz=rz,Hz=tz,Ly=WM,Bz=lz,Uz=(t,a,l)=>{const r=new Map,s={platform:Mz,...l},c={...s.platform,_c:r};return JM(t,a,{...s,platform:c})};var Vz=typeof document<"u",$z=function(){},rc=Vz?A.useLayoutEffect:$z;function Ac(t,a){if(t===a)return!0;if(typeof t!=typeof a)return!1;if(typeof t=="function"&&t.toString()===a.toString())return!0;let l,r,s;if(t&&a&&typeof t=="object"){if(Array.isArray(t)){if(l=t.length,l!==a.length)return!1;for(r=l;r--!==0;)if(!Ac(t[r],a[r]))return!1;return!0}if(s=Object.keys(t),l=s.length,l!==Object.keys(a).length)return!1;for(r=l;r--!==0;)if(!{}.hasOwnProperty.call(a,s[r]))return!1;for(r=l;r--!==0;){const c=s[r];if(!(c==="_owner"&&t.$$typeof)&&!Ac(t[c],a[c]))return!1}return!0}return t!==t&&a!==a}function zb(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Hy(t,a){const l=zb(t);return Math.round(a*l)/l}function Xd(t){const a=A.useRef(t);return rc(()=>{a.current=t}),a}function Yz(t){t===void 0&&(t={});const{placement:a="bottom",strategy:l="absolute",middleware:r=[],platform:s,elements:{reference:c,floating:u}={},transform:h=!0,whileElementsMounted:g,open:p}=t,[y,x]=A.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[v,w]=A.useState(r);Ac(v,r)||w(r);const[S,N]=A.useState(null),[E,_]=A.useState(null),k=A.useCallback(B=>{B!==z.current&&(z.current=B,N(B))},[]),j=A.useCallback(B=>{B!==O.current&&(O.current=B,_(B))},[]),C=c||S,D=u||E,z=A.useRef(null),O=A.useRef(null),H=A.useRef(y),Z=g!=null,ne=Xd(g),Q=Xd(s),K=Xd(p),te=A.useCallback(()=>{if(!z.current||!O.current)return;const B={placement:a,strategy:l,middleware:v};Q.current&&(B.platform=Q.current),Uz(z.current,O.current,B).then(Y=>{const q={...Y,isPositioned:K.current!==!1};L.current&&!Ac(H.current,q)&&(H.current=q,Vc.flushSync(()=>{x(q)}))})},[v,a,l,Q,K]);rc(()=>{p===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,x(B=>({...B,isPositioned:!1})))},[p]);const L=A.useRef(!1);rc(()=>(L.current=!0,()=>{L.current=!1}),[]),rc(()=>{if(C&&(z.current=C),D&&(O.current=D),C&&D){if(ne.current)return ne.current(C,D,te);te()}},[C,D,te,ne,Z]);const G=A.useMemo(()=>({reference:z,floating:O,setReference:k,setFloating:j}),[k,j]),M=A.useMemo(()=>({reference:C,floating:D}),[C,D]),U=A.useMemo(()=>{const B={position:l,left:0,top:0};if(!M.floating)return B;const Y=Hy(M.floating,y.x),q=Hy(M.floating,y.y);return h?{...B,transform:"translate("+Y+"px, "+q+"px)",...zb(M.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:Y,top:q}},[l,h,M.floating,y.x,y.y]);return A.useMemo(()=>({...y,update:te,refs:G,elements:M,floatingStyles:U}),[y,te,G,M,U])}const qz=t=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:t,fn(l){const{element:r,padding:s}=typeof t=="function"?t(l):t;return r&&a(r)?r.current!=null?Ly({element:r.current,padding:s}).fn(l):{}:r?Ly({element:r,padding:s}).fn(l):{}}}},Xz=(t,a)=>({...Rz(t),options:[t,a]}),Gz=(t,a)=>({...kz(t),options:[t,a]}),Zz=(t,a)=>({...Bz(t),options:[t,a]}),Qz=(t,a)=>({...Dz(t),options:[t,a]}),Kz=(t,a)=>({...Lz(t),options:[t,a]}),Fz=(t,a)=>({...Hz(t),options:[t,a]}),Pz=(t,a)=>({...qz(t),options:[t,a]});var Iz="Arrow",Ob=A.forwardRef((t,a)=>{const{children:l,width:r=10,height:s=5,...c}=t;return d.jsx(Dt.svg,{...c,ref:a,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?l:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ob.displayName=Iz;var Jz=Ob;function Wz(t){const[a,l]=A.useState(void 0);return Pa(()=>{if(t){l({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let u,h;if("borderBoxSize"in c){const g=c.borderBoxSize,p=Array.isArray(g)?g[0]:g;u=p.inlineSize,h=p.blockSize}else u=t.offsetWidth,h=t.offsetHeight;l({width:u,height:h})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else l(void 0)},[t]),a}var Rb="Popper",[kb,Db]=Zc(Rb),[p8,Lb]=kb(Rb),Hb="PopperAnchor",Bb=A.forwardRef((t,a)=>{const{__scopePopper:l,virtualRef:r,...s}=t,c=Lb(Hb,l),u=A.useRef(null),h=gn(a,u),g=A.useRef(null);return A.useEffect(()=>{const p=g.current;g.current=(r==null?void 0:r.current)||u.current,p!==g.current&&c.onAnchorChange(g.current)}),r?null:d.jsx(Dt.div,{...s,ref:h})});Bb.displayName=Hb;var nm="PopperContent",[e6,t6]=kb(nm),Ub=A.forwardRef((t,a)=>{var fe,ce,ue,Ee,ye,xe;const{__scopePopper:l,side:r="bottom",sideOffset:s=0,align:c="center",alignOffset:u=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:p=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:w="optimized",onPlaced:S,...N}=t,E=Lb(nm,l),[_,k]=A.useState(null),j=gn(a,me=>k(me)),[C,D]=A.useState(null),z=Wz(C),O=(z==null?void 0:z.width)??0,H=(z==null?void 0:z.height)??0,Z=r+(c!=="center"?"-"+c:""),ne=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},Q=Array.isArray(p)?p:[p],K=Q.length>0,te={padding:ne,boundary:Q.filter(a6),altBoundary:K},{refs:L,floatingStyles:G,placement:M,isPositioned:U,middlewareData:B}=Yz({strategy:"fixed",placement:Z,whileElementsMounted:(...me)=>Oz(...me,{animationFrame:w==="always"}),elements:{reference:E.anchor},middleware:[Xz({mainAxis:s+H,alignmentAxis:u}),g&&Gz({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?Zz():void 0,...te}),g&&Qz({...te}),Kz({...te,apply:({elements:me,rects:je,availableWidth:Ue,availableHeight:Me})=>{const{width:nt,height:Lt}=je.reference,ht=me.floating.style;ht.setProperty("--radix-popper-available-width",`${Ue}px`),ht.setProperty("--radix-popper-available-height",`${Me}px`),ht.setProperty("--radix-popper-anchor-width",`${nt}px`),ht.setProperty("--radix-popper-anchor-height",`${Lt}px`)}}),C&&Pz({element:C,padding:h}),i6({arrowWidth:O,arrowHeight:H}),v&&Fz({strategy:"referenceHidden",...te})]}),[Y,q]=Yb(M),R=Fa(S);Pa(()=>{U&&(R==null||R())},[U,R]);const V=(fe=B.arrow)==null?void 0:fe.x,W=(ce=B.arrow)==null?void 0:ce.y,ae=((ue=B.arrow)==null?void 0:ue.centerOffset)!==0,[oe,se]=A.useState();return Pa(()=>{_&&se(window.getComputedStyle(_).zIndex)},[_]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:U?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(Ee=B.transformOrigin)==null?void 0:Ee.x,(ye=B.transformOrigin)==null?void 0:ye.y].join(" "),...((xe=B.hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(e6,{scope:l,placedSide:Y,onArrowChange:D,arrowX:V,arrowY:W,shouldHideArrow:ae,children:d.jsx(Dt.div,{"data-side":Y,"data-align":q,...N,ref:j,style:{...N.style,animation:U?void 0:"none"}})})})});Ub.displayName=nm;var Vb="PopperArrow",n6={top:"bottom",right:"left",bottom:"top",left:"right"},$b=A.forwardRef(function(a,l){const{__scopePopper:r,...s}=a,c=t6(Vb,r),u=n6[c.placedSide];return d.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:d.jsx(Jz,{...s,ref:l,style:{...s.style,display:"block"}})})});$b.displayName=Vb;function a6(t){return t!==null}var i6=t=>({name:"transformOrigin",options:t,fn(a){var E,_,k;const{placement:l,rects:r,middlewareData:s}=a,u=((E=s.arrow)==null?void 0:E.centerOffset)!==0,h=u?0:t.arrowWidth,g=u?0:t.arrowHeight,[p,y]=Yb(l),x={start:"0%",center:"50%",end:"100%"}[y],v=(((_=s.arrow)==null?void 0:_.x)??0)+h/2,w=(((k=s.arrow)==null?void 0:k.y)??0)+g/2;let S="",N="";return p==="bottom"?(S=u?x:`${v}px`,N=`${-g}px`):p==="top"?(S=u?x:`${v}px`,N=`${r.floating.height+g}px`):p==="right"?(S=`${-g}px`,N=u?x:`${w}px`):p==="left"&&(S=`${r.floating.width+g}px`,N=u?x:`${w}px`),{data:{x:S,y:N}}}});function Yb(t){const[a,l="center"]=t.split("-");return[a,l]}var l6=Bb,r6=Ub,o6=$b,s6="Portal",am=A.forwardRef((t,a)=>{var h;const{container:l,...r}=t,[s,c]=A.useState(!1);Pa(()=>c(!0),[]);const u=l||s&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return u?EA.createPortal(d.jsx(Dt.div,{...r,ref:a}),u):null});am.displayName=s6;function c6(t,a){return A.useReducer((l,r)=>a[l][r]??l,t)}var Ic=t=>{const{present:a,children:l}=t,r=u6(a),s=typeof l=="function"?l({present:r.isPresent}):A.Children.only(l),c=gn(r.ref,f6(s));return typeof l=="function"||r.isPresent?A.cloneElement(s,{ref:c}):null};Ic.displayName="Presence";function u6(t){const[a,l]=A.useState(),r=A.useRef(null),s=A.useRef(t),c=A.useRef("none"),u=t?"mounted":"unmounted",[h,g]=c6(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const p=Ws(r.current);c.current=h==="mounted"?p:"none"},[h]),Pa(()=>{const p=r.current,y=s.current;if(y!==t){const v=c.current,w=Ws(p);t?g("MOUNT"):w==="none"||(p==null?void 0:p.display)==="none"?g("UNMOUNT"):g(y&&v!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,g]),Pa(()=>{if(a){let p;const y=a.ownerDocument.defaultView??window,x=w=>{const N=Ws(r.current).includes(CSS.escape(w.animationName));if(w.target===a&&N&&(g("ANIMATION_END"),!s.current)){const E=a.style.animationFillMode;a.style.animationFillMode="forwards",p=y.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=E)})}},v=w=>{w.target===a&&(c.current=Ws(r.current))};return a.addEventListener("animationstart",v),a.addEventListener("animationcancel",x),a.addEventListener("animationend",x),()=>{y.clearTimeout(p),a.removeEventListener("animationstart",v),a.removeEventListener("animationcancel",x),a.removeEventListener("animationend",x)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:A.useCallback(p=>{r.current=p?getComputedStyle(p):null,l(p)},[])}}function Ws(t){return(t==null?void 0:t.animationName)||"none"}function f6(t){var r,s;let a=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var d6=Symbol("radix.slottable");function h6(t){const a=({children:l})=>d.jsx(d.Fragment,{children:l});return a.displayName=`${t}.Slottable`,a.__radixId=d6,a}var m6=qy[" useInsertionEffect ".trim().toString()]||Pa;function p6({prop:t,defaultProp:a,onChange:l=()=>{},caller:r}){const[s,c,u]=g6({defaultProp:a,onChange:l}),h=t!==void 0,g=h?t:s;{const y=A.useRef(t!==void 0);A.useEffect(()=>{const x=y.current;x!==h&&console.warn(`${r} is changing from ${x?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=h},[h,r])}const p=A.useCallback(y=>{var x;if(h){const v=x6(y)?y(t):y;v!==t&&((x=u.current)==null||x.call(u,v))}else c(y)},[h,t,c,u]);return[g,p]}function g6({defaultProp:t,onChange:a}){const[l,r]=A.useState(t),s=A.useRef(l),c=A.useRef(a);return m6(()=>{c.current=a},[a]),A.useEffect(()=>{var u;s.current!==l&&((u=c.current)==null||u.call(c,l),s.current=l)},[l,s]),[l,r,c]}function x6(t){return typeof t=="function"}var y6=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),v6="VisuallyHidden",Jc=A.forwardRef((t,a)=>d.jsx(Dt.span,{...t,ref:a,style:{...y6,...t.style}}));Jc.displayName=v6;var b6=Jc,[Wc]=Zc("Tooltip",[Db]),im=Db(),qb="TooltipProvider",w6=700,By="tooltip.open",[S6,Xb]=Wc(qb),Gb=t=>{const{__scopeTooltip:a,delayDuration:l=w6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:c}=t,u=A.useRef(!0),h=A.useRef(!1),g=A.useRef(0);return A.useEffect(()=>{const p=g.current;return()=>window.clearTimeout(p)},[]),d.jsx(S6,{scope:a,isOpenDelayedRef:u,delayDuration:l,onOpen:A.useCallback(()=>{window.clearTimeout(g.current),u.current=!1},[]),onClose:A.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>u.current=!0,r)},[r]),isPointerInTransitRef:h,onPointerInTransitChange:A.useCallback(p=>{h.current=p},[]),disableHoverableContent:s,children:c})};Gb.displayName=qb;var Zb="Tooltip",[g8,po]=Wc(Zb),gh="TooltipTrigger",N6=A.forwardRef((t,a)=>{const{__scopeTooltip:l,...r}=t,s=po(gh,l),c=Xb(gh,l),u=im(l),h=A.useRef(null),g=gn(a,h,s.onTriggerChange),p=A.useRef(!1),y=A.useRef(!1),x=A.useCallback(()=>p.current=!1,[]);return A.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),d.jsx(l6,{asChild:!0,...u,children:d.jsx(Dt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:g,onPointerMove:dt(t.onPointerMove,v=>{v.pointerType!=="touch"&&!y.current&&!c.isPointerInTransitRef.current&&(s.onTriggerEnter(),y.current=!0)}),onPointerLeave:dt(t.onPointerLeave,()=>{s.onTriggerLeave(),y.current=!1}),onPointerDown:dt(t.onPointerDown,()=>{s.open&&s.onClose(),p.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:dt(t.onFocus,()=>{p.current||s.onOpen()}),onBlur:dt(t.onBlur,s.onClose),onClick:dt(t.onClick,s.onClose)})})});N6.displayName=gh;var lm="TooltipPortal",[E6,j6]=Wc(lm,{forceMount:void 0}),Qb=t=>{const{__scopeTooltip:a,forceMount:l,children:r,container:s}=t,c=po(lm,a);return d.jsx(E6,{scope:a,forceMount:l,children:d.jsx(Ic,{present:l||c.open,children:d.jsx(am,{asChild:!0,container:s,children:r})})})};Qb.displayName=lm;var Vl="TooltipContent",Kb=A.forwardRef((t,a)=>{const l=j6(Vl,t.__scopeTooltip),{forceMount:r=l.forceMount,side:s="top",...c}=t,u=po(Vl,t.__scopeTooltip);return d.jsx(Ic,{present:r||u.open,children:u.disableHoverableContent?d.jsx(Fb,{side:s,...c,ref:a}):d.jsx(_6,{side:s,...c,ref:a})})}),_6=A.forwardRef((t,a)=>{const l=po(Vl,t.__scopeTooltip),r=Xb(Vl,t.__scopeTooltip),s=A.useRef(null),c=gn(a,s),[u,h]=A.useState(null),{trigger:g,onClose:p}=l,y=s.current,{onPointerInTransitChange:x}=r,v=A.useCallback(()=>{h(null),x(!1)},[x]),w=A.useCallback((S,N)=>{const E=S.currentTarget,_={x:S.clientX,y:S.clientY},k=z6(_,E.getBoundingClientRect()),j=O6(_,k),C=R6(N.getBoundingClientRect()),D=D6([...j,...C]);h(D),x(!0)},[x]);return A.useEffect(()=>()=>v(),[v]),A.useEffect(()=>{if(g&&y){const S=E=>w(E,y),N=E=>w(E,g);return g.addEventListener("pointerleave",S),y.addEventListener("pointerleave",N),()=>{g.removeEventListener("pointerleave",S),y.removeEventListener("pointerleave",N)}}},[g,y,w,v]),A.useEffect(()=>{if(u){const S=N=>{const E=N.target,_={x:N.clientX,y:N.clientY},k=(g==null?void 0:g.contains(E))||(y==null?void 0:y.contains(E)),j=!k6(_,u);k?v():j&&(v(),p())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[g,y,u,p,v]),d.jsx(Fb,{...t,ref:c})}),[A6,C6]=Wc(Zb,{isInside:!1}),T6=h6("TooltipContent"),Fb=A.forwardRef((t,a)=>{const{__scopeTooltip:l,children:r,"aria-label":s,onEscapeKeyDown:c,onPointerDownOutside:u,...h}=t,g=po(Vl,l),p=im(l),{onClose:y}=g;return A.useEffect(()=>(document.addEventListener(By,y),()=>document.removeEventListener(By,y)),[y]),A.useEffect(()=>{if(g.trigger){const x=v=>{const w=v.target;w!=null&&w.contains(g.trigger)&&y()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[g.trigger,y]),d.jsx(Fh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:x=>x.preventDefault(),onDismiss:y,children:d.jsxs(r6,{"data-state":g.stateAttribute,...p,...h,ref:a,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(T6,{children:r}),d.jsx(A6,{scope:l,isInside:!0,children:d.jsx(b6,{id:g.contentId,role:"tooltip",children:s||r})})]})})});Kb.displayName=Vl;var Pb="TooltipArrow",M6=A.forwardRef((t,a)=>{const{__scopeTooltip:l,...r}=t,s=im(l);return C6(Pb,l).isInside?null:d.jsx(o6,{...s,...r,ref:a})});M6.displayName=Pb;function z6(t,a){const l=Math.abs(a.top-t.y),r=Math.abs(a.bottom-t.y),s=Math.abs(a.right-t.x),c=Math.abs(a.left-t.x);switch(Math.min(l,r,s,c)){case c:return"left";case s:return"right";case l:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function O6(t,a,l=5){const r=[];switch(a){case"top":r.push({x:t.x-l,y:t.y+l},{x:t.x+l,y:t.y+l});break;case"bottom":r.push({x:t.x-l,y:t.y-l},{x:t.x+l,y:t.y-l});break;case"left":r.push({x:t.x+l,y:t.y-l},{x:t.x+l,y:t.y+l});break;case"right":r.push({x:t.x-l,y:t.y-l},{x:t.x-l,y:t.y+l});break}return r}function R6(t){const{top:a,right:l,bottom:r,left:s}=t;return[{x:s,y:a},{x:l,y:a},{x:l,y:r},{x:s,y:r}]}function k6(t,a){const{x:l,y:r}=t;let s=!1;for(let c=0,u=a.length-1;c<a.length;u=c++){const h=a[c],g=a[u],p=h.x,y=h.y,x=g.x,v=g.y;y>r!=v>r&&l<(x-p)*(r-y)/(v-y)+p&&(s=!s)}return s}function D6(t){const a=t.slice();return a.sort((l,r)=>l.x<r.x?-1:l.x>r.x?1:l.y<r.y?-1:l.y>r.y?1:0),L6(a)}function L6(t){if(t.length<=1)return t.slice();const a=[];for(let r=0;r<t.length;r++){const s=t[r];for(;a.length>=2;){const c=a[a.length-1],u=a[a.length-2];if((c.x-u.x)*(s.y-u.y)>=(c.y-u.y)*(s.x-u.x))a.pop();else break}a.push(s)}a.pop();const l=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;l.length>=2;){const c=l[l.length-1],u=l[l.length-2];if((c.x-u.x)*(s.y-u.y)>=(c.y-u.y)*(s.x-u.x))l.pop();else break}l.push(s)}return l.pop(),a.length===1&&l.length===1&&a[0].x===l[0].x&&a[0].y===l[0].y?a:a.concat(l)}var H6=Gb,B6=Qb,Ib=Kb;const Uy=H6,U6=A.forwardRef(({className:t,sideOffset:a=4,...l},r)=>d.jsx(B6,{children:d.jsx(Ib,{ref:r,sideOffset:a,className:Se("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...l})}));U6.displayName=Ib.displayName;function Vy(t){const a=V6(t),l=A.forwardRef((r,s)=>{const{children:c,...u}=r,h=A.Children.toArray(c),g=h.find(Y6);if(g){const p=g.props.children,y=h.map(x=>x===g?A.Children.count(p)>1?A.Children.only(null):A.isValidElement(p)?p.props.children:null:x);return d.jsx(a,{...u,ref:s,children:A.isValidElement(p)?A.cloneElement(p,void 0,y):null})}return d.jsx(a,{...u,ref:s,children:c})});return l.displayName=`${t}.Slot`,l}function V6(t){const a=A.forwardRef((l,r)=>{const{children:s,...c}=l;if(A.isValidElement(s)){const u=X6(s),h=q6(c,s.props);return s.type!==A.Fragment&&(h.ref=r?Gc(r,u):u),A.cloneElement(s,h)}return A.Children.count(s)>1?A.Children.only(null):null});return a.displayName=`${t}.SlotClone`,a}var $6=Symbol("radix.slottable");function Y6(t){return A.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===$6}function q6(t,a){const l={...a};for(const r in a){const s=t[r],c=a[r];/^on[A-Z]/.test(r)?s&&c?l[r]=(...h)=>{const g=c(...h);return s(...h),g}:s&&(l[r]=s):r==="style"?l[r]={...s,...c}:r==="className"&&(l[r]=[s,c].filter(Boolean).join(" "))}return{...t,...l}}function X6(t){var r,s;let a=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}function G6(t){const a=t+"CollectionProvider",[l,r]=Zc(a),[s,c]=l(a,{collectionRef:{current:null},itemMap:new Map}),u=N=>{const{scope:E,children:_}=N,k=Gt.useRef(null),j=Gt.useRef(new Map).current;return d.jsx(s,{scope:E,itemMap:j,collectionRef:k,children:_})};u.displayName=a;const h=t+"CollectionSlot",g=Vy(h),p=Gt.forwardRef((N,E)=>{const{scope:_,children:k}=N,j=c(h,_),C=gn(E,j.collectionRef);return d.jsx(g,{ref:C,children:k})});p.displayName=h;const y=t+"CollectionItemSlot",x="data-radix-collection-item",v=Vy(y),w=Gt.forwardRef((N,E)=>{const{scope:_,children:k,...j}=N,C=Gt.useRef(null),D=gn(E,C),z=c(y,_);return Gt.useEffect(()=>(z.itemMap.set(C,{ref:C,...j}),()=>void z.itemMap.delete(C))),d.jsx(v,{[x]:"",ref:D,children:k})});w.displayName=y;function S(N){const E=c(t+"CollectionConsumer",N);return Gt.useCallback(()=>{const k=E.collectionRef.current;if(!k)return[];const j=Array.from(k.querySelectorAll(`[${x}]`));return Array.from(E.itemMap.values()).sort((z,O)=>j.indexOf(z.ref.current)-j.indexOf(O.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:u,Slot:p,ItemSlot:w},S,r]}var rm="ToastProvider",[om,Z6,Q6]=G6("Toast"),[Jb]=Zc("Toast",[Q6]),[K6,eu]=Jb(rm),Wb=t=>{const{__scopeToast:a,label:l="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:c=50,children:u}=t,[h,g]=A.useState(null),[p,y]=A.useState(0),x=A.useRef(!1),v=A.useRef(!1);return l.trim()||console.error(`Invalid prop \`label\` supplied to \`${rm}\`. Expected non-empty \`string\`.`),d.jsx(om.Provider,{scope:a,children:d.jsx(K6,{scope:a,label:l,duration:r,swipeDirection:s,swipeThreshold:c,toastCount:p,viewport:h,onViewportChange:g,onToastAdd:A.useCallback(()=>y(w=>w+1),[]),onToastRemove:A.useCallback(()=>y(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:x,isClosePausedRef:v,children:u})})};Wb.displayName=rm;var e2="ToastViewport",F6=["F8"],xh="toast.viewportPause",yh="toast.viewportResume",t2=A.forwardRef((t,a)=>{const{__scopeToast:l,hotkey:r=F6,label:s="Notifications ({hotkey})",...c}=t,u=eu(e2,l),h=Z6(l),g=A.useRef(null),p=A.useRef(null),y=A.useRef(null),x=A.useRef(null),v=gn(a,x,u.onViewportChange),w=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=u.toastCount>0;A.useEffect(()=>{const E=_=>{var j;r.length!==0&&r.every(C=>_[C]||_.code===C)&&((j=x.current)==null||j.focus())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[r]),A.useEffect(()=>{const E=g.current,_=x.current;if(S&&E&&_){const k=()=>{if(!u.isClosePausedRef.current){const z=new CustomEvent(xh);_.dispatchEvent(z),u.isClosePausedRef.current=!0}},j=()=>{if(u.isClosePausedRef.current){const z=new CustomEvent(yh);_.dispatchEvent(z),u.isClosePausedRef.current=!1}},C=z=>{!E.contains(z.relatedTarget)&&j()},D=()=>{E.contains(document.activeElement)||j()};return E.addEventListener("focusin",k),E.addEventListener("focusout",C),E.addEventListener("pointermove",k),E.addEventListener("pointerleave",D),window.addEventListener("blur",k),window.addEventListener("focus",j),()=>{E.removeEventListener("focusin",k),E.removeEventListener("focusout",C),E.removeEventListener("pointermove",k),E.removeEventListener("pointerleave",D),window.removeEventListener("blur",k),window.removeEventListener("focus",j)}}},[S,u.isClosePausedRef]);const N=A.useCallback(({tabbingDirection:E})=>{const k=h().map(j=>{const C=j.ref.current,D=[C,...s8(C)];return E==="forwards"?D:D.reverse()});return(E==="forwards"?k.reverse():k).flat()},[h]);return A.useEffect(()=>{const E=x.current;if(E){const _=k=>{var D,z,O;const j=k.altKey||k.ctrlKey||k.metaKey;if(k.key==="Tab"&&!j){const H=document.activeElement,Z=k.shiftKey;if(k.target===E&&Z){(D=p.current)==null||D.focus();return}const K=N({tabbingDirection:Z?"backwards":"forwards"}),te=K.findIndex(L=>L===H);Gd(K.slice(te+1))?k.preventDefault():Z?(z=p.current)==null||z.focus():(O=y.current)==null||O.focus()}};return E.addEventListener("keydown",_),()=>E.removeEventListener("keydown",_)}},[h,N]),d.jsxs(UM,{ref:g,role:"region","aria-label":s.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&d.jsx(vh,{ref:p,onFocusFromOutsideViewport:()=>{const E=N({tabbingDirection:"forwards"});Gd(E)}}),d.jsx(om.Slot,{scope:l,children:d.jsx(Dt.ol,{tabIndex:-1,...c,ref:v})}),S&&d.jsx(vh,{ref:y,onFocusFromOutsideViewport:()=>{const E=N({tabbingDirection:"backwards"});Gd(E)}})]})});t2.displayName=e2;var n2="ToastFocusProxy",vh=A.forwardRef((t,a)=>{const{__scopeToast:l,onFocusFromOutsideViewport:r,...s}=t,c=eu(n2,l);return d.jsx(Jc,{tabIndex:0,...s,ref:a,style:{position:"fixed"},onFocus:u=>{var p;const h=u.relatedTarget;!((p=c.viewport)!=null&&p.contains(h))&&r()}})});vh.displayName=n2;var go="Toast",P6="toast.swipeStart",I6="toast.swipeMove",J6="toast.swipeCancel",W6="toast.swipeEnd",a2=A.forwardRef((t,a)=>{const{forceMount:l,open:r,defaultOpen:s,onOpenChange:c,...u}=t,[h,g]=p6({prop:r,defaultProp:s??!0,onChange:c,caller:go});return d.jsx(Ic,{present:l||h,children:d.jsx(n8,{open:h,...u,ref:a,onClose:()=>g(!1),onPause:Fa(t.onPause),onResume:Fa(t.onResume),onSwipeStart:dt(t.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:dt(t.onSwipeMove,p=>{const{x:y,y:x}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${x}px`)}),onSwipeCancel:dt(t.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:dt(t.onSwipeEnd,p=>{const{x:y,y:x}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${x}px`),g(!1)})})})});a2.displayName=go;var[e8,t8]=Jb(go,{onClose(){}}),n8=A.forwardRef((t,a)=>{const{__scopeToast:l,type:r="foreground",duration:s,open:c,onClose:u,onEscapeKeyDown:h,onPause:g,onResume:p,onSwipeStart:y,onSwipeMove:x,onSwipeCancel:v,onSwipeEnd:w,...S}=t,N=eu(go,l),[E,_]=A.useState(null),k=gn(a,L=>_(L)),j=A.useRef(null),C=A.useRef(null),D=s||N.duration,z=A.useRef(0),O=A.useRef(D),H=A.useRef(0),{onToastAdd:Z,onToastRemove:ne}=N,Q=Fa(()=>{var G;(E==null?void 0:E.contains(document.activeElement))&&((G=N.viewport)==null||G.focus()),u()}),K=A.useCallback(L=>{!L||L===1/0||(window.clearTimeout(H.current),z.current=new Date().getTime(),H.current=window.setTimeout(Q,L))},[Q]);A.useEffect(()=>{const L=N.viewport;if(L){const G=()=>{K(O.current),p==null||p()},M=()=>{const U=new Date().getTime()-z.current;O.current=O.current-U,window.clearTimeout(H.current),g==null||g()};return L.addEventListener(xh,M),L.addEventListener(yh,G),()=>{L.removeEventListener(xh,M),L.removeEventListener(yh,G)}}},[N.viewport,D,g,p,K]),A.useEffect(()=>{c&&!N.isClosePausedRef.current&&K(D)},[c,D,N.isClosePausedRef,K]),A.useEffect(()=>(Z(),()=>ne()),[Z,ne]);const te=A.useMemo(()=>E?u2(E):null,[E]);return N.viewport?d.jsxs(d.Fragment,{children:[te&&d.jsx(a8,{__scopeToast:l,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:te}),d.jsx(e8,{scope:l,onClose:Q,children:Vc.createPortal(d.jsx(om.ItemSlot,{scope:l,children:d.jsx(BM,{asChild:!0,onEscapeKeyDown:dt(h,()=>{N.isFocusedToastEscapeKeyDownRef.current||Q(),N.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Dt.li,{tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":N.swipeDirection,...S,ref:k,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:dt(t.onKeyDown,L=>{L.key==="Escape"&&(h==null||h(L.nativeEvent),L.nativeEvent.defaultPrevented||(N.isFocusedToastEscapeKeyDownRef.current=!0,Q()))}),onPointerDown:dt(t.onPointerDown,L=>{L.button===0&&(j.current={x:L.clientX,y:L.clientY})}),onPointerMove:dt(t.onPointerMove,L=>{if(!j.current)return;const G=L.clientX-j.current.x,M=L.clientY-j.current.y,U=!!C.current,B=["left","right"].includes(N.swipeDirection),Y=["left","up"].includes(N.swipeDirection)?Math.min:Math.max,q=B?Y(0,G):0,R=B?0:Y(0,M),V=L.pointerType==="touch"?10:2,W={x:q,y:R},ae={originalEvent:L,delta:W};U?(C.current=W,ec(I6,x,ae,{discrete:!1})):$y(W,N.swipeDirection,V)?(C.current=W,ec(P6,y,ae,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(G)>V||Math.abs(M)>V)&&(j.current=null)}),onPointerUp:dt(t.onPointerUp,L=>{const G=C.current,M=L.target;if(M.hasPointerCapture(L.pointerId)&&M.releasePointerCapture(L.pointerId),C.current=null,j.current=null,G){const U=L.currentTarget,B={originalEvent:L,delta:G};$y(G,N.swipeDirection,N.swipeThreshold)?ec(W6,w,B,{discrete:!0}):ec(J6,v,B,{discrete:!0}),U.addEventListener("click",Y=>Y.preventDefault(),{once:!0})}})})})}),N.viewport)})]}):null}),a8=t=>{const{__scopeToast:a,children:l,...r}=t,s=eu(go,a),[c,u]=A.useState(!1),[h,g]=A.useState(!1);return r8(()=>u(!0)),A.useEffect(()=>{const p=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(p)},[]),h?null:d.jsx(am,{asChild:!0,children:d.jsx(Jc,{...r,children:c&&d.jsxs(d.Fragment,{children:[s.label," ",l]})})})},i8="ToastTitle",i2=A.forwardRef((t,a)=>{const{__scopeToast:l,...r}=t;return d.jsx(Dt.div,{...r,ref:a})});i2.displayName=i8;var l8="ToastDescription",l2=A.forwardRef((t,a)=>{const{__scopeToast:l,...r}=t;return d.jsx(Dt.div,{...r,ref:a})});l2.displayName=l8;var r2="ToastAction",o2=A.forwardRef((t,a)=>{const{altText:l,...r}=t;return l.trim()?d.jsx(c2,{altText:l,asChild:!0,children:d.jsx(sm,{...r,ref:a})}):(console.error(`Invalid prop \`altText\` supplied to \`${r2}\`. Expected non-empty \`string\`.`),null)});o2.displayName=r2;var s2="ToastClose",sm=A.forwardRef((t,a)=>{const{__scopeToast:l,...r}=t,s=t8(s2,l);return d.jsx(c2,{asChild:!0,children:d.jsx(Dt.button,{type:"button",...r,ref:a,onClick:dt(t.onClick,s.onClose)})})});sm.displayName=s2;var c2=A.forwardRef((t,a)=>{const{__scopeToast:l,altText:r,...s}=t;return d.jsx(Dt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:a})});function u2(t){const a=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&a.push(r.textContent),o8(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",c=r.dataset.radixToastAnnounceExclude==="";if(!s)if(c){const u=r.dataset.radixToastAnnounceAlt;u&&a.push(u)}else a.push(...u2(r))}}),a}function ec(t,a,l,{discrete:r}){const s=l.originalEvent.currentTarget,c=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});a&&s.addEventListener(t,a,{once:!0}),r?xb(s,c):s.dispatchEvent(c)}var $y=(t,a,l=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),c=r>s;return a==="left"||a==="right"?c&&r>l:!c&&s>l};function r8(t=()=>{}){const a=Fa(t);Pa(()=>{let l=0,r=0;return l=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(a)),()=>{window.cancelAnimationFrame(l),window.cancelAnimationFrame(r)}},[a])}function o8(t){return t.nodeType===t.ELEMENT_NODE}function s8(t){const a=[],l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function Gd(t){const a=document.activeElement;return t.some(l=>l===a?!0:(l.focus(),document.activeElement!==a))}var c8=Wb,f2=t2,d2=a2,h2=i2,m2=l2,p2=o2,g2=sm;const u8=c8,x2=A.forwardRef(({className:t,...a},l)=>d.jsx(f2,{ref:l,className:Se("fixed top-0 right-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:flex-col md:max-w-[420px]",t),...a}));x2.displayName=f2.displayName;const f8=Mh("group pointer-events-auto relative flex w-full items-center justify-between gap-4 overflow-hidden rounded-xl border p-4 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full",{variants:{variant:{default:"border-border/50 bg-zinc-900/95 text-foreground backdrop-blur-sm",success:"border-emerald-500/30 bg-emerald-950/95 text-emerald-50 backdrop-blur-sm",error:"border-red-500/30 bg-red-950/95 text-red-50 backdrop-blur-sm",info:"border-blue-500/30 bg-blue-950/95 text-blue-50 backdrop-blur-sm"}},defaultVariants:{variant:"default"}}),y2=A.forwardRef(({className:t,variant:a,...l},r)=>d.jsx(d2,{ref:r,className:Se(f8({variant:a}),t),...l}));y2.displayName=d2.displayName;const d8=A.forwardRef(({className:t,...a},l)=>d.jsx(p2,{ref:l,className:Se("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50",t),...a}));d8.displayName=p2.displayName;const v2=A.forwardRef(({className:t,...a},l)=>d.jsx(g2,{ref:l,className:Se("absolute right-3 top-3 rounded-md p-1.5 cursor-pointer","text-foreground/40 hover:text-foreground hover:bg-white/10","transition-all duration-150","focus:outline-none focus:ring-2 focus:ring-white/20",t),"toast-close":"",...a,children:d.jsx(Mc,{className:"h-4 w-4"})}));v2.displayName=g2.displayName;const b2=A.forwardRef(({className:t,...a},l)=>d.jsx(h2,{ref:l,className:Se("text-sm font-semibold",t),...a}));b2.displayName=h2.displayName;const w2=A.forwardRef(({className:t,...a},l)=>d.jsx(m2,{ref:l,className:Se("text-sm opacity-90",t),...a}));w2.displayName=m2.displayName;const h8=({variant:t})=>{switch(t){case"success":return d.jsx(FN,{className:"h-5 w-5 text-emerald-400"});case"error":return d.jsx(mv,{className:"h-5 w-5 text-red-400"});case"info":return d.jsx(uc,{className:"h-5 w-5 text-blue-400"});default:return null}};function Yy(){const{toasts:t,removeToast:a}=Zy();return d.jsxs(u8,{swipeDirection:"right",children:[t.map(l=>d.jsxs(y2,{variant:l.variant,duration:l.duration??4e3,onOpenChange:r=>{r||a(l.id)},children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(h8,{variant:l.variant}),d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx(b2,{children:l.title}),l.description&&d.jsx(w2,{children:l.description})]})]}),d.jsx(v2,{})]},l.id)),d.jsx(x2,{})]})}function m8(){const{completed:t}=Mi();return t?d.jsxs(Uy,{children:[d.jsx(d4,{children:a=>{switch(a){case"overview":return d.jsx(xx,{});case"architecture":return d.jsx(QT,{});case"files":return d.jsx(R4,{});case"timeline":return d.jsx(eM,{});case"logs":return d.jsx(iM,{});case"security":return d.jsx(pM,{});default:return d.jsx(xx,{})}}}),d.jsx(Yy,{})]}):d.jsxs(Uy,{children:[d.jsx(xM,{}),d.jsx(Yy,{})]})}Ch(Ah.getState().theme);window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Ah.getState().theme==="system"&&Ch("system")});LS.createRoot(document.getElementById("root")).render(d.jsx(A.StrictMode,{children:d.jsx(m8,{})}));
|