jetic-cli 0.1.2 → 0.1.4

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.
@@ -1,347 +0,0 @@
1
- (function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(f){if(f.ep)return;f.ep=!0;const d=i(f);fetch(f.href,d)}})();function Fx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Uu={exports:{}},ii={};/**
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 Cm;function Ly(){if(Cm)return ii;Cm=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(r,f,d){var h=null;if(d!==void 0&&(h=""+d),f.key!==void 0&&(h=""+f.key),"key"in f){d={};for(var x in f)x!=="key"&&(d[x]=f[x])}else d=f;return f=d.ref,{$$typeof:n,type:r,key:h,ref:f!==void 0?f:null,props:d}}return ii.Fragment=s,ii.jsx=i,ii.jsxs=i,ii}var Rm;function Yy(){return Rm||(Rm=1,Uu.exports=Ly()),Uu.exports}var o=Yy(),Bu={exports:{}},ve={};/**
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 Dm;function Vy(){if(Dm)return ve;Dm=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,M={};function A(N,k,Q){this.props=N,this.context=k,this.refs=M,this.updater=Q||j}A.prototype.isReactComponent={},A.prototype.setState=function(N,k){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,k,"setState")},A.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=A.prototype;function H(N,k,Q){this.props=N,this.context=k,this.refs=M,this.updater=Q||j}var V=H.prototype=new C;V.constructor=H,T(V,A.prototype),V.isPureReactComponent=!0;var R=Array.isArray,G={H:null,A:null,T:null,S:null,V:null},O=Object.prototype.hasOwnProperty;function L(N,k,Q,I,ne,oe){return Q=oe.ref,{$$typeof:n,type:N,key:k,ref:Q!==void 0?Q:null,props:oe}}function F(N,k){return L(N.type,k,void 0,void 0,void 0,N.props)}function W(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function le(N){var k={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(Q){return k[Q]})}var se=/\/+/g;function ce(N,k){return typeof N=="object"&&N!==null&&N.key!=null?le(""+N.key):k.toString(36)}function ie(){}function E(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(ie,ie):(N.status="pending",N.then(function(k){N.status==="pending"&&(N.status="fulfilled",N.value=k)},function(k){N.status==="pending"&&(N.status="rejected",N.reason=k)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function J(N,k,Q,I,ne){var oe=typeof N;(oe==="undefined"||oe==="boolean")&&(N=null);var re=!1;if(N===null)re=!0;else switch(oe){case"bigint":case"string":case"number":re=!0;break;case"object":switch(N.$$typeof){case n:case s:re=!0;break;case g:return re=N._init,J(re(N._payload),k,Q,I,ne)}}if(re)return ne=ne(N),re=I===""?"."+ce(N,0):I,R(ne)?(Q="",re!=null&&(Q=re.replace(se,"$&/")+"/"),J(ne,k,Q,"",function(Ae){return Ae})):ne!=null&&(W(ne)&&(ne=F(ne,Q+(ne.key==null||N&&N.key===ne.key?"":(""+ne.key).replace(se,"$&/")+"/")+re)),k.push(ne)),1;re=0;var be=I===""?".":I+":";if(R(N))for(var me=0;me<N.length;me++)I=N[me],oe=be+ce(I,me),re+=J(I,k,Q,oe,ne);else if(me=w(N),typeof me=="function")for(N=me.call(N),me=0;!(I=N.next()).done;)I=I.value,oe=be+ce(I,me++),re+=J(I,k,Q,oe,ne);else if(oe==="object"){if(typeof N.then=="function")return J(E(N),k,Q,I,ne);throw k=String(N),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return re}function S(N,k,Q){if(N==null)return N;var I=[],ne=0;return J(N,I,"","",function(oe){return k.call(Q,oe,ne++)}),I}function U(N){if(N._status===-1){var k=N._result;k=k(),k.then(function(Q){(N._status===0||N._status===-1)&&(N._status=1,N._result=Q)},function(Q){(N._status===0||N._status===-1)&&(N._status=2,N._result=Q)}),N._status===-1&&(N._status=0,N._result=k)}if(N._status===1)return N._result.default;throw N._result}var Z=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function q(){}return ve.Children={map:S,forEach:function(N,k,Q){S(N,function(){k.apply(this,arguments)},Q)},count:function(N){var k=0;return S(N,function(){k++}),k},toArray:function(N){return S(N,function(k){return k})||[]},only:function(N){if(!W(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},ve.Component=A,ve.Fragment=i,ve.Profiler=f,ve.PureComponent=H,ve.StrictMode=r,ve.Suspense=p,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,ve.__COMPILER_RUNTIME={__proto__:null,c:function(N){return G.H.useMemoCache(N)}},ve.cache=function(N){return function(){return N.apply(null,arguments)}},ve.cloneElement=function(N,k,Q){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var I=T({},N.props),ne=N.key,oe=void 0;if(k!=null)for(re in k.ref!==void 0&&(oe=void 0),k.key!==void 0&&(ne=""+k.key),k)!O.call(k,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&k.ref===void 0||(I[re]=k[re]);var re=arguments.length-2;if(re===1)I.children=Q;else if(1<re){for(var be=Array(re),me=0;me<re;me++)be[me]=arguments[me+2];I.children=be}return L(N.type,ne,void 0,void 0,oe,I)},ve.createContext=function(N){return N={$$typeof:h,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:d,_context:N},N},ve.createElement=function(N,k,Q){var I,ne={},oe=null;if(k!=null)for(I in k.key!==void 0&&(oe=""+k.key),k)O.call(k,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ne[I]=k[I]);var re=arguments.length-2;if(re===1)ne.children=Q;else if(1<re){for(var be=Array(re),me=0;me<re;me++)be[me]=arguments[me+2];ne.children=be}if(N&&N.defaultProps)for(I in re=N.defaultProps,re)ne[I]===void 0&&(ne[I]=re[I]);return L(N,oe,void 0,void 0,null,ne)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(N){return{$$typeof:x,render:N}},ve.isValidElement=W,ve.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:U}},ve.memo=function(N,k){return{$$typeof:m,type:N,compare:k===void 0?null:k}},ve.startTransition=function(N){var k=G.T,Q={};G.T=Q;try{var I=N(),ne=G.S;ne!==null&&ne(Q,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(q,Z)}catch(oe){Z(oe)}finally{G.T=k}},ve.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},ve.use=function(N){return G.H.use(N)},ve.useActionState=function(N,k,Q){return G.H.useActionState(N,k,Q)},ve.useCallback=function(N,k){return G.H.useCallback(N,k)},ve.useContext=function(N){return G.H.useContext(N)},ve.useDebugValue=function(){},ve.useDeferredValue=function(N,k){return G.H.useDeferredValue(N,k)},ve.useEffect=function(N,k,Q){var I=G.H;if(typeof Q=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return I.useEffect(N,k)},ve.useId=function(){return G.H.useId()},ve.useImperativeHandle=function(N,k,Q){return G.H.useImperativeHandle(N,k,Q)},ve.useInsertionEffect=function(N,k){return G.H.useInsertionEffect(N,k)},ve.useLayoutEffect=function(N,k){return G.H.useLayoutEffect(N,k)},ve.useMemo=function(N,k){return G.H.useMemo(N,k)},ve.useOptimistic=function(N,k){return G.H.useOptimistic(N,k)},ve.useReducer=function(N,k,Q){return G.H.useReducer(N,k,Q)},ve.useRef=function(N){return G.H.useRef(N)},ve.useState=function(N){return G.H.useState(N)},ve.useSyncExternalStore=function(N,k,Q){return G.H.useSyncExternalStore(N,k,Q)},ve.useTransition=function(){return G.H.useTransition()},ve.version="19.1.1",ve}var Om;function zi(){return Om||(Om=1,Bu.exports=Vy()),Bu.exports}var _=zi();const ee=Fx(_);var qu={exports:{}},ci={},Lu={exports:{}},Yu={};/**
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 km;function $y(){return km||(km=1,(function(n){function s(S,U){var Z=S.length;S.push(U);e:for(;0<Z;){var q=Z-1>>>1,N=S[q];if(0<f(N,U))S[q]=U,S[Z]=N,Z=q;else break e}}function i(S){return S.length===0?null:S[0]}function r(S){if(S.length===0)return null;var U=S[0],Z=S.pop();if(Z!==U){S[0]=Z;e:for(var q=0,N=S.length,k=N>>>1;q<k;){var Q=2*(q+1)-1,I=S[Q],ne=Q+1,oe=S[ne];if(0>f(I,Z))ne<N&&0>f(oe,I)?(S[q]=oe,S[ne]=Z,q=ne):(S[q]=I,S[Q]=Z,q=Q);else if(ne<N&&0>f(oe,Z))S[q]=oe,S[ne]=Z,q=ne;else break e}}return U}function f(S,U){var Z=S.sortIndex-U.sortIndex;return Z!==0?Z:S.id-U.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,x=h.now();n.unstable_now=function(){return h.now()-x}}var p=[],m=[],g=1,b=null,w=3,j=!1,T=!1,M=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function R(S){for(var U=i(m);U!==null;){if(U.callback===null)r(m);else if(U.startTime<=S)r(m),U.sortIndex=U.expirationTime,s(p,U);else break;U=i(m)}}function G(S){if(M=!1,R(S),!T)if(i(p)!==null)T=!0,O||(O=!0,ce());else{var U=i(m);U!==null&&J(G,U.startTime-S)}}var O=!1,L=-1,F=5,W=-1;function le(){return A?!0:!(n.unstable_now()-W<F)}function se(){if(A=!1,O){var S=n.unstable_now();W=S;var U=!0;try{e:{T=!1,M&&(M=!1,H(L),L=-1),j=!0;var Z=w;try{t:{for(R(S),b=i(p);b!==null&&!(b.expirationTime>S&&le());){var q=b.callback;if(typeof q=="function"){b.callback=null,w=b.priorityLevel;var N=q(b.expirationTime<=S);if(S=n.unstable_now(),typeof N=="function"){b.callback=N,R(S),U=!0;break t}b===i(p)&&r(p),R(S)}else r(p);b=i(p)}if(b!==null)U=!0;else{var k=i(m);k!==null&&J(G,k.startTime-S),U=!1}}break e}finally{b=null,w=Z,j=!1}U=void 0}}finally{U?ce():O=!1}}}var ce;if(typeof V=="function")ce=function(){V(se)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,E=ie.port2;ie.port1.onmessage=se,ce=function(){E.postMessage(null)}}else ce=function(){C(se,0)};function J(S,U){L=C(function(){S(n.unstable_now())},U)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(S){S.callback=null},n.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<S?Math.floor(1e3/S):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(S){switch(w){case 1:case 2:case 3:var U=3;break;default:U=w}var Z=w;w=U;try{return S()}finally{w=Z}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(S,U){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var Z=w;w=S;try{return U()}finally{w=Z}},n.unstable_scheduleCallback=function(S,U,Z){var q=n.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?q+Z:q):Z=q,S){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=Z+N,S={id:g++,callback:U,priorityLevel:S,startTime:Z,expirationTime:N,sortIndex:-1},Z>q?(S.sortIndex=Z,s(m,S),i(p)===null&&S===i(m)&&(M?(H(L),L=-1):M=!0,J(G,Z-q))):(S.sortIndex=N,s(p,S),T||j||(T=!0,O||(O=!0,ce()))),S},n.unstable_shouldYield=le,n.unstable_wrapCallback=function(S){var U=w;return function(){var Z=w;w=U;try{return S.apply(this,arguments)}finally{w=Z}}}})(Yu)),Yu}var Hm;function Gy(){return Hm||(Hm=1,Lu.exports=$y()),Lu.exports}var Vu={exports:{}},gt={};/**
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 Um;function Xy(){if(Um)return gt;Um=1;var n=zi();function s(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(p,m,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:b==null?null:""+b,children:p,containerInfo:m,implementation:g}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,gt.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(s(299));return d(p,m,null,g)},gt.flushSync=function(p){var m=h.T,g=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=g,r.d.f()}},gt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},gt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},gt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,b=x(g,m.crossOrigin),w=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:w,fetchPriority:j}):g==="script"&&r.d.X(p,{crossOrigin:b,integrity:w,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},gt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=x(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},gt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,b=x(g,m.crossOrigin);r.d.L(p,g,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},gt.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=x(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},gt.requestFormReset=function(p){r.d.r(p)},gt.unstable_batchedUpdates=function(p,m){return p(m)},gt.useFormState=function(p,m,g){return h.H.useFormState(p,m,g)},gt.useFormStatus=function(){return h.H.useHostTransitionStatus()},gt.version="19.1.1",gt}var Bm;function Ix(){if(Bm)return Vu.exports;Bm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Vu.exports=Xy(),Vu.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 qm;function Zy(){if(qm)return ci;qm=1;var n=Gy(),s=zi(),i=Ix();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(d(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var c=l.return;if(c===null)break;var u=c.alternate;if(u===null){if(a=c.return,a!==null){l=a;continue}break}if(c.child===u.child){for(u=c.child;u;){if(u===l)return x(c),e;if(u===a)return x(c),t;u=u.sibling}throw Error(r(188))}if(l.return!==a.return)l=c,a=u;else{for(var y=!1,v=c.child;v;){if(v===l){y=!0,l=c,a=u;break}if(v===a){y=!0,a=c,l=u;break}v=v.sibling}if(!y){for(v=u.child;v;){if(v===l){y=!0,l=u,a=c;break}if(v===a){y=!0,a=u,l=c;break}v=v.sibling}if(!y)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),H=Symbol.for("react.consumer"),V=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ce(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function E(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case A:return"Profiler";case M:return"StrictMode";case G:return"Suspense";case O:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case V:return(e.displayName||"Context")+".Provider";case H:return(e._context.displayName||"Context")+".Consumer";case R:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return t=e.displayName||null,t!==null?t:E(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return E(e(t))}catch{}}return null}var J=Array.isArray,S=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},q=[],N=-1;function k(e){return{current:e}}function Q(e){0>N||(e.current=q[N],q[N]=null,N--)}function I(e,t){N++,q[N]=e.current,e.current=t}var ne=k(null),oe=k(null),re=k(null),be=k(null);function me(e,t){switch(I(re,t),I(oe,e),I(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?sm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=sm(t),e=im(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Q(ne),I(ne,e)}function Ae(){Q(ne),Q(oe),Q(re)}function Ce(e){e.memoizedState!==null&&I(be,e);var t=ne.current,l=im(t,e.type);t!==l&&(I(oe,e),I(ne,l))}function ft(e){oe.current===e&&(Q(ne),Q(oe)),be.current===e&&(Q(be),ti._currentValue=Z)}var dt=Object.prototype.hasOwnProperty,bt=n.unstable_scheduleCallback,ht=n.unstable_cancelCallback,Ze=n.unstable_shouldYield,Vt=n.unstable_requestPaint,_e=n.unstable_now,he=n.unstable_getCurrentPriorityLevel,mt=n.unstable_ImmediatePriority,mn=n.unstable_UserBlockingPriority,xn=n.unstable_NormalPriority,Qn=n.unstable_LowPriority,En=n.unstable_IdlePriority,ln=n.log,Kn=n.unstable_setDisableYieldValue,Ct=null,Qe=null;function vt(e){if(typeof ln=="function"&&Kn(e),Qe&&typeof Qe.setStrictMode=="function")try{Qe.setStrictMode(Ct,e)}catch{}}var We=Math.clz32?Math.clz32:$t,Cl=Math.log,nt=Math.LN2;function $t(e){return e>>>=0,e===0?32:31-(Cl(e)/nt|0)|0}var Gt=256,Xt=4194304;function Et(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 wt(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var c=0,u=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var v=a&134217727;return v!==0?(a=v&~u,a!==0?c=Et(a):(y&=v,y!==0?c=Et(y):l||(l=v&~e,l!==0&&(c=Et(l))))):(v=a&~u,v!==0?c=Et(v):y!==0?c=Et(y):l||(l=a&~e,l!==0&&(c=Et(l)))),c===0?0:t!==0&&t!==c&&(t&u)===0&&(u=c&-c,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:c}function Rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rs(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ia(){var e=Gt;return Gt<<=1,(Gt&4194048)===0&&(Gt=256),e}function Jn(){var e=Xt;return Xt<<=1,(Xt&62914560)===0&&(Xt=4194304),e}function Rl(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Wn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _n(e,t,l,a,c,u){var y=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var v=e.entanglements,z=e.expirationTimes,$=e.hiddenUpdates;for(l=y&~l;0<l;){var P=31-We(l),ae=1<<P;v[P]=0,z[P]=-1;var X=$[P];if(X!==null)for($[P]=null,P=0;P<X.length;P++){var K=X[P];K!==null&&(K.lane&=-536870913)}l&=~ae}a!==0&&Di(e,a,0),u!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function Di(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-We(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&4194090}function Oi(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-We(l),c=1<<a;c&t|e[a]&t&&(e[a]|=t),l&=~c}}function os(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 us(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ki(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Em(e.type))}function Ar(e,t){var l=U.p;try{return U.p=e,t()}finally{U.p=l}}var pn=Math.random().toString(36).slice(2),lt="__reactFiber$"+pn,xt="__reactProps$"+pn,Fn="__reactContainer$"+pn,fs="__reactEvents$"+pn,Tr="__reactListeners$"+pn,Cr="__reactHandles$"+pn,Hi="__reactResources$"+pn,Dl="__reactMarker$"+pn;function ds(e){delete e[lt],delete e[xt],delete e[fs],delete e[Tr],delete e[Cr]}function zn(e){var t=e[lt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Fn]||l[lt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=um(e);e!==null;){if(l=e[lt])return l;e=um(e)}return t}e=l,l=e.parentNode}return null}function In(e){if(e=e[lt]||e[Fn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Ol(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Pn(e){var t=e[Hi];return t||(t=e[Hi]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Fe(e){e[Dl]=!0}var Ui=new Set,Bi={};function Mn(e,t){el(e,t),el(e+"Capture",t)}function el(e,t){for(Bi[e]=t,e=0;e<t.length;e++)Ui.add(t[e])}var qi=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]*$"),Li={},Yi={};function Rr(e){return dt.call(Yi,e)?!0:dt.call(Li,e)?!1:qi.test(e)?Yi[e]=!0:(Li[e]=!0,!1)}function ca(e,t,l){if(Rr(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function ra(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function an(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}var oa,Vi;function tl(e){if(oa===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);oa=t&&t[1]||"",Vi=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+oa+e+Vi}var hs=!1;function kl(e,t){if(!e||hs)return"";hs=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(K){var X=K}Reflect.construct(e,[],ae)}else{try{ae.call()}catch(K){X=K}e.call(ae.prototype)}}else{try{throw Error()}catch(K){X=K}(ae=e())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(K){if(K&&X&&typeof K.stack=="string")return[K.stack,X.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),y=u[0],v=u[1];if(y&&v){var z=y.split(`
44
- `),$=v.split(`
45
- `);for(c=a=0;a<z.length&&!z[a].includes("DetermineComponentFrameRoot");)a++;for(;c<$.length&&!$[c].includes("DetermineComponentFrameRoot");)c++;if(a===z.length||c===$.length)for(a=z.length-1,c=$.length-1;1<=a&&0<=c&&z[a]!==$[c];)c--;for(;1<=a&&0<=c;a--,c--)if(z[a]!==$[c]){if(a!==1||c!==1)do if(a--,c--,0>c||z[a]!==$[c]){var P=`
46
- `+z[a].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=a&&0<=c);break}}}finally{hs=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?tl(l):""}function Og(e){switch(e.tag){case 26:case 27:case 5:return tl(e.type);case 16:return tl("Lazy");case 13:return tl("Suspense");case 19:return tl("SuspenseList");case 0:case 15:return kl(e.type,!1);case 11:return kl(e.type.render,!1);case 1:return kl(e.type,!0);case 31:return tl("Activity");default:return""}}function Pf(e){try{var t="";do t+=Og(e),e=e.return;while(e);return t}catch(l){return`
47
- Error generating stack: `+l.message+`
48
- `+l.stack}}function Zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ed(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kg(e){var t=ed(e)?"checked":"value",l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){a=""+y,u.call(this,y)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $i(e){e._valueTracker||(e._valueTracker=kg(e))}function td(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=ed(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Gi(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 Hg=/[\n"\\]/g;function Qt(e){return e.replace(Hg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Dr(e,t,l,a,c,u,y,v){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Or(e,y,Zt(t)):l!=null?Or(e,y,Zt(l)):a!=null&&e.removeAttribute("value"),c==null&&u!=null&&(e.defaultChecked=!!u),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Zt(v):e.removeAttribute("name")}function nd(e,t,l,a,c,u,y,v){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null))return;l=l!=null?""+Zt(l):"",t=t!=null?""+Zt(t):l,v||t===e.value||(e.value=t),e.defaultValue=t}a=a??c,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=v?e.checked:!!a,e.defaultChecked=!!a,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y)}function Or(e,t,l){t==="number"&&Gi(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ua(e,t,l,a){if(e=e.options,t){t={};for(var c=0;c<l.length;c++)t["$"+l[c]]=!0;for(l=0;l<e.length;l++)c=t.hasOwnProperty("$"+e[l].value),e[l].selected!==c&&(e[l].selected=c),c&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Zt(l),t=null,c=0;c<e.length;c++){if(e[c].value===l){e[c].selected=!0,a&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function ld(e,t,l){if(t!=null&&(t=""+Zt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Zt(l):""}function ad(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(J(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Zt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a)}function fa(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Ug=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 sd(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Ug.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function id(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var c in t)a=t[c],t.hasOwnProperty(c)&&l[c]!==a&&sd(e,c,a)}else for(var u in t)t.hasOwnProperty(u)&&sd(e,u,t[u])}function kr(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 Bg=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"]]),qg=/^[\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 Xi(e){return qg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Hr=null;function Ur(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var da=null,ha=null;function cd(e){var t=In(e);if(t&&(e=t.stateNode)){var l=e[xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Dr(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Qt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var c=a[xt]||null;if(!c)throw Error(r(90));Dr(a,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&td(a)}break e;case"textarea":ld(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ua(e,!!l.multiple,t,!1)}}}var Br=!1;function rd(e,t,l){if(Br)return e(t,l);Br=!0;try{var a=e(t);return a}finally{if(Br=!1,(da!==null||ha!==null)&&(Tc(),da&&(t=da,e=ha,ha=da=null,cd(t),e)))for(t=0;t<e.length;t++)cd(e[t])}}function ms(e,t){var l=e.stateNode;if(l===null)return null;var a=l[xt]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qr=!1;if(An)try{var xs={};Object.defineProperty(xs,"passive",{get:function(){qr=!0}}),window.addEventListener("test",xs,xs),window.removeEventListener("test",xs,xs)}catch{qr=!1}var nl=null,Lr=null,Zi=null;function od(){if(Zi)return Zi;var e,t=Lr,l=t.length,a,c="value"in nl?nl.value:nl.textContent,u=c.length;for(e=0;e<l&&t[e]===c[e];e++);var y=l-e;for(a=1;a<=y&&t[l-a]===c[u-a];a++);return Zi=c.slice(e,1<a?1-a:void 0)}function Qi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ki(){return!0}function ud(){return!1}function _t(e){function t(l,a,c,u,y){this._reactName=l,this._targetInst=c,this.type=a,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(l=e[v],this[v]=l?l(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ki:ud,this.isPropagationStopped=ud,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ki)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ki)},persist:function(){},isPersistent:Ki}),t}var Hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ji=_t(Hl),ps=g({},Hl,{view:0,detail:0}),Lg=_t(ps),Yr,Vr,gs,Wi=g({},ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gr,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!==gs&&(gs&&e.type==="mousemove"?(Yr=e.screenX-gs.screenX,Vr=e.screenY-gs.screenY):Vr=Yr=0,gs=e),Yr)},movementY:function(e){return"movementY"in e?e.movementY:Vr}}),fd=_t(Wi),Yg=g({},Wi,{dataTransfer:0}),Vg=_t(Yg),$g=g({},ps,{relatedTarget:0}),$r=_t($g),Gg=g({},Hl,{animationName:0,elapsedTime:0,pseudoElement:0}),Xg=_t(Gg),Zg=g({},Hl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qg=_t(Zg),Kg=g({},Hl,{data:0}),dd=_t(Kg),Jg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wg={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"},Fg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ig(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fg[e])?!!t[e]:!1}function Gr(){return Ig}var Pg=g({},ps,{key:function(e){if(e.key){var t=Jg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gr,charCode:function(e){return e.type==="keypress"?Qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),e1=_t(Pg),t1=g({},Wi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hd=_t(t1),n1=g({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gr}),l1=_t(n1),a1=g({},Hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),s1=_t(a1),i1=g({},Wi,{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}),c1=_t(i1),r1=g({},Hl,{newState:0,oldState:0}),o1=_t(r1),u1=[9,13,27,32],Xr=An&&"CompositionEvent"in window,ys=null;An&&"documentMode"in document&&(ys=document.documentMode);var f1=An&&"TextEvent"in window&&!ys,md=An&&(!Xr||ys&&8<ys&&11>=ys),xd=" ",pd=!1;function gd(e,t){switch(e){case"keyup":return u1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ma=!1;function d1(e,t){switch(e){case"compositionend":return yd(t);case"keypress":return t.which!==32?null:(pd=!0,xd);case"textInput":return e=t.data,e===xd&&pd?null:e;default:return null}}function h1(e,t){if(ma)return e==="compositionend"||!Xr&&gd(e,t)?(e=od(),Zi=Lr=nl=null,ma=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return md&&t.locale!=="ko"?null:t.data;default:return null}}var m1={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 bd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!m1[e.type]:t==="textarea"}function vd(e,t,l,a){da?ha?ha.push(a):ha=[a]:da=a,t=Hc(t,"onChange"),0<t.length&&(l=new Ji("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var bs=null,vs=null;function x1(e){em(e,0)}function Fi(e){var t=Ol(e);if(td(t))return e}function wd(e,t){if(e==="change")return t}var Nd=!1;if(An){var Zr;if(An){var Qr="oninput"in document;if(!Qr){var Sd=document.createElement("div");Sd.setAttribute("oninput","return;"),Qr=typeof Sd.oninput=="function"}Zr=Qr}else Zr=!1;Nd=Zr&&(!document.documentMode||9<document.documentMode)}function jd(){bs&&(bs.detachEvent("onpropertychange",Ed),vs=bs=null)}function Ed(e){if(e.propertyName==="value"&&Fi(vs)){var t=[];vd(t,vs,e,Ur(e)),rd(x1,t)}}function p1(e,t,l){e==="focusin"?(jd(),bs=t,vs=l,bs.attachEvent("onpropertychange",Ed)):e==="focusout"&&jd()}function g1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fi(vs)}function y1(e,t){if(e==="click")return Fi(t)}function b1(e,t){if(e==="input"||e==="change")return Fi(t)}function v1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:v1;function ws(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var c=l[a];if(!dt.call(t,c)||!Dt(e[c],t[c]))return!1}return!0}function _d(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zd(e,t){var l=_d(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=_d(l)}}function Md(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Md(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ad(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gi(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Gi(e.document)}return t}function Kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var w1=An&&"documentMode"in document&&11>=document.documentMode,xa=null,Jr=null,Ns=null,Wr=!1;function Td(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Wr||xa==null||xa!==Gi(a)||(a=xa,"selectionStart"in a&&Kr(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ns&&ws(Ns,a)||(Ns=a,a=Hc(Jr,"onSelect"),0<a.length&&(t=new Ji("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=xa)))}function Ul(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var pa={animationend:Ul("Animation","AnimationEnd"),animationiteration:Ul("Animation","AnimationIteration"),animationstart:Ul("Animation","AnimationStart"),transitionrun:Ul("Transition","TransitionRun"),transitionstart:Ul("Transition","TransitionStart"),transitioncancel:Ul("Transition","TransitionCancel"),transitionend:Ul("Transition","TransitionEnd")},Fr={},Cd={};An&&(Cd=document.createElement("div").style,"AnimationEvent"in window||(delete pa.animationend.animation,delete pa.animationiteration.animation,delete pa.animationstart.animation),"TransitionEvent"in window||delete pa.transitionend.transition);function Bl(e){if(Fr[e])return Fr[e];if(!pa[e])return e;var t=pa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Cd)return Fr[e]=t[l];return e}var Rd=Bl("animationend"),Dd=Bl("animationiteration"),Od=Bl("animationstart"),N1=Bl("transitionrun"),S1=Bl("transitionstart"),j1=Bl("transitioncancel"),kd=Bl("transitionend"),Hd=new Map,Ir="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(" ");Ir.push("scrollEnd");function sn(e,t){Hd.set(e,t),Mn(t,[e])}var Ud=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var l=Ud.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Pf(t)},Ud.set(e,t),t)}return{value:e,source:t,stack:Pf(t)}}var Jt=[],ga=0,Pr=0;function Ii(){for(var e=ga,t=Pr=ga=0;t<e;){var l=Jt[t];Jt[t++]=null;var a=Jt[t];Jt[t++]=null;var c=Jt[t];Jt[t++]=null;var u=Jt[t];if(Jt[t++]=null,a!==null&&c!==null){var y=a.pending;y===null?c.next=c:(c.next=y.next,y.next=c),a.pending=c}u!==0&&Bd(l,c,u)}}function Pi(e,t,l,a){Jt[ga++]=e,Jt[ga++]=t,Jt[ga++]=l,Jt[ga++]=a,Pr|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function eo(e,t,l,a){return Pi(e,t,l,a),ec(e)}function ya(e,t){return Pi(e,null,null,t),ec(e)}function Bd(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var c=!1,u=e.return;u!==null;)u.childLanes|=l,a=u.alternate,a!==null&&(a.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(c=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,c&&t!==null&&(c=31-We(l),e=u.hiddenUpdates,a=e[c],a===null?e[c]=[t]:a.push(t),t.lane=l|536870912),u):null}function ec(e){if(50<Qs)throw Qs=0,cu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ba={};function E1(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,l,a){return new E1(e,t,l,a)}function to(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tn(e,t){var l=e.alternate;return l===null?(l=Ot(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function qd(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function tc(e,t,l,a,c,u){var y=0;if(a=e,typeof e=="function")to(e)&&(y=1);else if(typeof e=="string")y=zy(e,l,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=Ot(31,l,t,c),e.elementType=W,e.lanes=u,e;case T:return ql(l.children,c,u,t);case M:y=8,c|=24;break;case A:return e=Ot(12,l,t,c|2),e.elementType=A,e.lanes=u,e;case G:return e=Ot(13,l,t,c),e.elementType=G,e.lanes=u,e;case O:return e=Ot(19,l,t,c),e.elementType=O,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case C:case V:y=10;break e;case H:y=9;break e;case R:y=11;break e;case L:y=14;break e;case F:y=16,a=null;break e}y=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Ot(y,l,t,c),t.elementType=e,t.type=a,t.lanes=u,t}function ql(e,t,l,a){return e=Ot(7,e,a,t),e.lanes=l,e}function no(e,t,l){return e=Ot(6,e,null,t),e.lanes=l,e}function lo(e,t,l){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var va=[],wa=0,nc=null,lc=0,Wt=[],Ft=0,Ll=null,Cn=1,Rn="";function Yl(e,t){va[wa++]=lc,va[wa++]=nc,nc=e,lc=t}function Ld(e,t,l){Wt[Ft++]=Cn,Wt[Ft++]=Rn,Wt[Ft++]=Ll,Ll=e;var a=Cn;e=Rn;var c=32-We(a)-1;a&=~(1<<c),l+=1;var u=32-We(t)+c;if(30<u){var y=c-c%5;u=(a&(1<<y)-1).toString(32),a>>=y,c-=y,Cn=1<<32-We(t)+c|l<<c|a,Rn=u+e}else Cn=1<<u|l<<c|a,Rn=e}function ao(e){e.return!==null&&(Yl(e,1),Ld(e,1,0))}function so(e){for(;e===nc;)nc=va[--wa],va[wa]=null,lc=va[--wa],va[wa]=null;for(;e===Ll;)Ll=Wt[--Ft],Wt[Ft]=null,Rn=Wt[--Ft],Wt[Ft]=null,Cn=Wt[--Ft],Wt[Ft]=null}var Nt=null,$e=null,Te=!1,Vl=null,gn=!1,io=Error(r(519));function $l(e){var t=Error(r(418,""));throw Es(Kt(t,e)),io}function Yd(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[lt]=e,t[xt]=a,l){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(l=0;l<Js.length;l++)Ee(Js[l],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),nd(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),$i(t);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),ad(t,a.value,a.defaultValue,a.children),$i(t)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||am(t.textContent,l)?(a.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),a.onScroll!=null&&Ee("scroll",t),a.onScrollEnd!=null&&Ee("scrollend",t),a.onClick!=null&&(t.onclick=Uc),t=!0):t=!1,t||$l(e)}function Vd(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:Nt=Nt.return}}function Ss(e){if(e!==Nt)return!1;if(!Te)return Vd(e),Te=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Su(e.type,e.memoizedProps)),l=!l),l&&$e&&$l(e),Vd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(l=e.data,l==="/$"){if(t===0){$e=rn(e.nextSibling);break e}t--}else l!=="$"&&l!=="$!"&&l!=="$?"||t++;e=e.nextSibling}$e=null}}else t===27?(t=$e,yl(e.type)?(e=zu,zu=null,$e=e):$e=t):$e=Nt?rn(e.stateNode.nextSibling):null;return!0}function js(){$e=Nt=null,Te=!1}function $d(){var e=Vl;return e!==null&&(At===null?At=e:At.push.apply(At,e),Vl=null),e}function Es(e){Vl===null?Vl=[e]:Vl.push(e)}var co=k(null),Gl=null,Dn=null;function ll(e,t,l){I(co,t._currentValue),t._currentValue=l}function On(e){e._currentValue=co.current,Q(co)}function ro(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function oo(e,t,l,a){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var u=c.dependencies;if(u!==null){var y=c.child;u=u.firstContext;e:for(;u!==null;){var v=u;u=c;for(var z=0;z<t.length;z++)if(v.context===t[z]){u.lanes|=l,v=u.alternate,v!==null&&(v.lanes|=l),ro(u.return,l,e),a||(y=null);break e}u=v.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(r(341));y.lanes|=l,u=y.alternate,u!==null&&(u.lanes|=l),ro(y,l,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function _s(e,t,l,a){e=null;for(var c=t,u=!1;c!==null;){if(!u){if((c.flags&524288)!==0)u=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var v=c.type;Dt(c.pendingProps.value,y.value)||(e!==null?e.push(v):e=[v])}}else if(c===be.current){if(y=c.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ti):e=[ti])}c=c.return}e!==null&&oo(t,e,l,a),t.flags|=262144}function ac(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xl(e){Gl=e,Dn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pt(e){return Gd(Gl,e)}function sc(e,t){return Gl===null&&Xl(e),Gd(e,t)}function Gd(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Dn===null){if(e===null)throw Error(r(308));Dn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Dn=Dn.next=t;return l}var _1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},z1=n.unstable_scheduleCallback,M1=n.unstable_NormalPriority,et={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uo(){return{controller:new _1,data:new Map,refCount:0}}function zs(e){e.refCount--,e.refCount===0&&z1(M1,function(){e.controller.abort()})}var Ms=null,fo=0,Na=0,Sa=null;function A1(e,t){if(Ms===null){var l=Ms=[];fo=0,Na=mu(),Sa={status:"pending",value:void 0,then:function(a){l.push(a)}}}return fo++,t.then(Xd,Xd),t}function Xd(){if(--fo===0&&Ms!==null){Sa!==null&&(Sa.status="fulfilled");var e=Ms;Ms=null,Na=0,Sa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function T1(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(c){l.push(c)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var c=0;c<l.length;c++)(0,l[c])(t)},function(c){for(a.status="rejected",a.reason=c,c=0;c<l.length;c++)(0,l[c])(void 0)}),a}var Zd=S.S;S.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&A1(e,t),Zd!==null&&Zd(e,t)};var Zl=k(null);function ho(){var e=Zl.current;return e!==null?e:Be.pooledCache}function ic(e,t){t===null?I(Zl,Zl.current):I(Zl,t.pool)}function Qd(){var e=ho();return e===null?null:{parent:et._currentValue,pool:e}}var As=Error(r(460)),Kd=Error(r(474)),cc=Error(r(542)),mo={then:function(){}};function Jd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function rc(){}function Wd(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(rc,rc),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Id(e),e;default:if(typeof t.status=="string")t.then(rc,rc);else{if(e=Be,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=a}},function(a){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Id(e),e}throw Ts=t,As}}var Ts=null;function Fd(){if(Ts===null)throw Error(r(459));var e=Ts;return Ts=null,e}function Id(e){if(e===As||e===cc)throw Error(r(483))}var al=!1;function xo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function po(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function sl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function il(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Re&2)!==0){var c=a.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),a.pending=t,t=ec(e),Bd(e,null,l),t}return Pi(e,a,t,l),ec(e)}function Cs(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Oi(e,l)}}function go(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var c=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?c=u=y:u=u.next=y,l=l.next}while(l!==null);u===null?c=u=t:u=u.next=t}else c=u=t;l={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var yo=!1;function Rs(){if(yo){var e=Sa;if(e!==null)throw e}}function Ds(e,t,l,a){yo=!1;var c=e.updateQueue;al=!1;var u=c.firstBaseUpdate,y=c.lastBaseUpdate,v=c.shared.pending;if(v!==null){c.shared.pending=null;var z=v,$=z.next;z.next=null,y===null?u=$:y.next=$,y=z;var P=e.alternate;P!==null&&(P=P.updateQueue,v=P.lastBaseUpdate,v!==y&&(v===null?P.firstBaseUpdate=$:v.next=$,P.lastBaseUpdate=z))}if(u!==null){var ae=c.baseState;y=0,P=$=z=null,v=u;do{var X=v.lane&-536870913,K=X!==v.lane;if(K?(ze&X)===X:(a&X)===X){X!==0&&X===Na&&(yo=!0),P!==null&&(P=P.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ye=e,xe=v;X=t;var He=l;switch(xe.tag){case 1:if(ye=xe.payload,typeof ye=="function"){ae=ye.call(He,ae,X);break e}ae=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=xe.payload,X=typeof ye=="function"?ye.call(He,ae,X):ye,X==null)break e;ae=g({},ae,X);break e;case 2:al=!0}}X=v.callback,X!==null&&(e.flags|=64,K&&(e.flags|=8192),K=c.callbacks,K===null?c.callbacks=[X]:K.push(X))}else K={lane:X,tag:v.tag,payload:v.payload,callback:v.callback,next:null},P===null?($=P=K,z=ae):P=P.next=K,y|=X;if(v=v.next,v===null){if(v=c.shared.pending,v===null)break;K=v,v=K.next,K.next=null,c.lastBaseUpdate=K,c.shared.pending=null}}while(!0);P===null&&(z=ae),c.baseState=z,c.firstBaseUpdate=$,c.lastBaseUpdate=P,u===null&&(c.shared.lanes=0),ml|=y,e.lanes=y,e.memoizedState=ae}}function Pd(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function e0(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Pd(l[e],t)}var ja=k(null),oc=k(0);function t0(e,t){e=Yn,I(oc,e),I(ja,t),Yn=e|t.baseLanes}function bo(){I(oc,Yn),I(ja,ja.current)}function vo(){Yn=oc.current,Q(ja),Q(oc)}var cl=0,we=null,Oe=null,Ie=null,uc=!1,Ea=!1,Ql=!1,fc=0,Os=0,_a=null,C1=0;function Ke(){throw Error(r(321))}function wo(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Dt(e[l],t[l]))return!1;return!0}function No(e,t,l,a,c,u){return cl=u,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S.H=e===null||e.memoizedState===null?B0:q0,Ql=!1,u=l(a,c),Ql=!1,Ea&&(u=l0(t,l,a,c)),n0(e),u}function n0(e){S.H=gc;var t=Oe!==null&&Oe.next!==null;if(cl=0,Ie=Oe=we=null,uc=!1,Os=0,_a=null,t)throw Error(r(300));e===null||at||(e=e.dependencies,e!==null&&ac(e)&&(at=!0))}function l0(e,t,l,a){we=e;var c=0;do{if(Ea&&(_a=null),Os=0,Ea=!1,25<=c)throw Error(r(301));if(c+=1,Ie=Oe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}S.H=B1,u=t(l,a)}while(Ea);return u}function R1(){var e=S.H,t=e.useState()[0];return t=typeof t.then=="function"?ks(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(we.flags|=1024),t}function So(){var e=fc!==0;return fc=0,e}function jo(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Eo(e){if(uc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uc=!1}cl=0,Ie=Oe=we=null,Ea=!1,Os=fc=0,_a=null}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?we.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function Pe(){if(Oe===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Ie===null?we.memoizedState:Ie.next;if(t!==null)Ie=t,Oe=e;else{if(e===null)throw we.alternate===null?Error(r(467)):Error(r(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Ie===null?we.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function _o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ks(e){var t=Os;return Os+=1,_a===null&&(_a=[]),e=Wd(_a,e,t),t=we,(Ie===null?t.memoizedState:Ie.next)===null&&(t=t.alternate,S.H=t===null||t.memoizedState===null?B0:q0),e}function dc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ks(e);if(e.$$typeof===V)return pt(e)}throw Error(r(438,String(e)))}function zo(e){var t=null,l=we.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=we.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=_o(),we.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=le;return t.index++,l}function kn(e,t){return typeof t=="function"?t(e):t}function hc(e){var t=Pe();return Mo(t,Oe,e)}function Mo(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var c=e.baseQueue,u=a.pending;if(u!==null){if(c!==null){var y=c.next;c.next=u.next,u.next=y}t.baseQueue=c=u,a.pending=null}if(u=e.baseState,c===null)e.memoizedState=u;else{t=c.next;var v=y=null,z=null,$=t,P=!1;do{var ae=$.lane&-536870913;if(ae!==$.lane?(ze&ae)===ae:(cl&ae)===ae){var X=$.revertLane;if(X===0)z!==null&&(z=z.next={lane:0,revertLane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),ae===Na&&(P=!0);else if((cl&X)===X){$=$.next,X===Na&&(P=!0);continue}else ae={lane:0,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},z===null?(v=z=ae,y=u):z=z.next=ae,we.lanes|=X,ml|=X;ae=$.action,Ql&&l(u,ae),u=$.hasEagerState?$.eagerState:l(u,ae)}else X={lane:ae,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},z===null?(v=z=X,y=u):z=z.next=X,we.lanes|=ae,ml|=ae;$=$.next}while($!==null&&$!==t);if(z===null?y=u:z.next=v,!Dt(u,e.memoizedState)&&(at=!0,P&&(l=Sa,l!==null)))throw l;e.memoizedState=u,e.baseState=y,e.baseQueue=z,a.lastRenderedState=u}return c===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ao(e){var t=Pe(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,c=l.pending,u=t.memoizedState;if(c!==null){l.pending=null;var y=c=c.next;do u=e(u,y.action),y=y.next;while(y!==c);Dt(u,t.memoizedState)||(at=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,a]}function a0(e,t,l){var a=we,c=Pe(),u=Te;if(u){if(l===void 0)throw Error(r(407));l=l()}else l=t();var y=!Dt((Oe||c).memoizedState,l);y&&(c.memoizedState=l,at=!0),c=c.queue;var v=c0.bind(null,a,c,e);if(Hs(2048,8,v,[e]),c.getSnapshot!==t||y||Ie!==null&&Ie.memoizedState.tag&1){if(a.flags|=2048,za(9,mc(),i0.bind(null,a,c,l,t),null),Be===null)throw Error(r(349));u||(cl&124)!==0||s0(a,t,l)}return l}function s0(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=we.updateQueue,t===null?(t=_o(),we.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function i0(e,t,l,a){t.value=l,t.getSnapshot=a,r0(t)&&o0(e)}function c0(e,t,l){return l(function(){r0(t)&&o0(e)})}function r0(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Dt(e,l)}catch{return!0}}function o0(e){var t=ya(e,2);t!==null&&qt(t,e,2)}function To(e){var t=zt();if(typeof e=="function"){var l=e;if(e=l(),Ql){vt(!0);try{l()}finally{vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:e},t}function u0(e,t,l,a){return e.baseState=l,Mo(e,Oe,typeof a=="function"?a:kn)}function D1(e,t,l,a,c){if(pc(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};S.T!==null?l(!0):u.isTransition=!1,a(u),l=t.pending,l===null?(u.next=t.pending=u,f0(t,u)):(u.next=l.next,t.pending=l.next=u)}}function f0(e,t){var l=t.action,a=t.payload,c=e.state;if(t.isTransition){var u=S.T,y={};S.T=y;try{var v=l(c,a),z=S.S;z!==null&&z(y,v),d0(e,t,v)}catch($){Co(e,t,$)}finally{S.T=u}}else try{u=l(c,a),d0(e,t,u)}catch($){Co(e,t,$)}}function d0(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){h0(e,t,a)},function(a){return Co(e,t,a)}):h0(e,t,l)}function h0(e,t,l){t.status="fulfilled",t.value=l,m0(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,f0(e,l)))}function Co(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,m0(t),t=t.next;while(t!==a)}e.action=null}function m0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function x0(e,t){return t}function p0(e,t){if(Te){var l=Be.formState;if(l!==null){e:{var a=we;if(Te){if($e){t:{for(var c=$e,u=gn;c.nodeType!==8;){if(!u){c=null;break t}if(c=rn(c.nextSibling),c===null){c=null;break t}}u=c.data,c=u==="F!"||u==="F"?c:null}if(c){$e=rn(c.nextSibling),a=c.data==="F!";break e}}$l(a)}a=!1}a&&(t=l[0])}}return l=zt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:x0,lastRenderedState:t},l.queue=a,l=k0.bind(null,we,a),a.dispatch=l,a=To(!1),u=Ho.bind(null,we,!1,a.queue),a=zt(),c={state:t,dispatch:null,action:e,pending:null},a.queue=c,l=D1.bind(null,we,c,u,l),c.dispatch=l,a.memoizedState=e,[t,l,!1]}function g0(e){var t=Pe();return y0(t,Oe,e)}function y0(e,t,l){if(t=Mo(e,t,x0)[0],e=hc(kn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ks(t)}catch(y){throw y===As?cc:y}else a=t;t=Pe();var c=t.queue,u=c.dispatch;return l!==t.memoizedState&&(we.flags|=2048,za(9,mc(),O1.bind(null,c,l),null)),[a,u,e]}function O1(e,t){e.action=t}function b0(e){var t=Pe(),l=Oe;if(l!==null)return y0(t,l,e);Pe(),t=t.memoizedState,l=Pe();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function za(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=we.updateQueue,t===null&&(t=_o(),we.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function mc(){return{destroy:void 0,resource:void 0}}function v0(){return Pe().memoizedState}function xc(e,t,l,a){var c=zt();a=a===void 0?null:a,we.flags|=e,c.memoizedState=za(1|t,mc(),l,a)}function Hs(e,t,l,a){var c=Pe();a=a===void 0?null:a;var u=c.memoizedState.inst;Oe!==null&&a!==null&&wo(a,Oe.memoizedState.deps)?c.memoizedState=za(t,u,l,a):(we.flags|=e,c.memoizedState=za(1|t,u,l,a))}function w0(e,t){xc(8390656,8,e,t)}function N0(e,t){Hs(2048,8,e,t)}function S0(e,t){return Hs(4,2,e,t)}function j0(e,t){return Hs(4,4,e,t)}function E0(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _0(e,t,l){l=l!=null?l.concat([e]):null,Hs(4,4,E0.bind(null,t,e),l)}function Ro(){}function z0(e,t){var l=Pe();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&wo(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function M0(e,t){var l=Pe();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&wo(t,a[1]))return a[0];if(a=e(),Ql){vt(!0);try{e()}finally{vt(!1)}}return l.memoizedState=[a,t],a}function Do(e,t,l){return l===void 0||(cl&1073741824)!==0?e.memoizedState=t:(e.memoizedState=l,e=Ch(),we.lanes|=e,ml|=e,l)}function A0(e,t,l,a){return Dt(l,t)?l:ja.current!==null?(e=Do(e,l,a),Dt(e,t)||(at=!0),e):(cl&42)===0?(at=!0,e.memoizedState=l):(e=Ch(),we.lanes|=e,ml|=e,t)}function T0(e,t,l,a,c){var u=U.p;U.p=u!==0&&8>u?u:8;var y=S.T,v={};S.T=v,Ho(e,!1,t,l);try{var z=c(),$=S.S;if($!==null&&$(v,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var P=T1(z,a);Us(e,t,P,Bt(e))}else Us(e,t,a,Bt(e))}catch(ae){Us(e,t,{then:function(){},status:"rejected",reason:ae},Bt())}finally{U.p=u,S.T=y}}function k1(){}function Oo(e,t,l,a){if(e.tag!==5)throw Error(r(476));var c=C0(e).queue;T0(e,c,t,Z,l===null?k1:function(){return R0(e),l(a)})}function C0(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:Z},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:kn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function R0(e){var t=C0(e).next.queue;Us(e,t,{},Bt())}function ko(){return pt(ti)}function D0(){return Pe().memoizedState}function O0(){return Pe().memoizedState}function H1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Bt();e=sl(l);var a=il(t,e,l);a!==null&&(qt(a,t,l),Cs(a,t,l)),t={cache:uo()},e.payload=t;return}t=t.return}}function U1(e,t,l){var a=Bt();l={lane:a,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},pc(e)?H0(t,l):(l=eo(e,t,l,a),l!==null&&(qt(l,e,a),U0(l,t,a)))}function k0(e,t,l){var a=Bt();Us(e,t,l,a)}function Us(e,t,l,a){var c={lane:a,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(pc(e))H0(t,c);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var y=t.lastRenderedState,v=u(y,l);if(c.hasEagerState=!0,c.eagerState=v,Dt(v,y))return Pi(e,t,c,0),Be===null&&Ii(),!1}catch{}finally{}if(l=eo(e,t,c,a),l!==null)return qt(l,e,a),U0(l,t,a),!0}return!1}function Ho(e,t,l,a){if(a={lane:2,revertLane:mu(),action:a,hasEagerState:!1,eagerState:null,next:null},pc(e)){if(t)throw Error(r(479))}else t=eo(e,l,a,2),t!==null&&qt(t,e,2)}function pc(e){var t=e.alternate;return e===we||t!==null&&t===we}function H0(e,t){Ea=uc=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function U0(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Oi(e,l)}}var gc={readContext:pt,use:dc,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useInsertionEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useSyncExternalStore:Ke,useId:Ke,useHostTransitionStatus:Ke,useFormState:Ke,useActionState:Ke,useOptimistic:Ke,useMemoCache:Ke,useCacheRefresh:Ke},B0={readContext:pt,use:dc,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:pt,useEffect:w0,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,xc(4194308,4,E0.bind(null,t,e),l)},useLayoutEffect:function(e,t){return xc(4194308,4,e,t)},useInsertionEffect:function(e,t){xc(4,2,e,t)},useMemo:function(e,t){var l=zt();t=t===void 0?null:t;var a=e();if(Ql){vt(!0);try{e()}finally{vt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=zt();if(l!==void 0){var c=l(t);if(Ql){vt(!0);try{l(t)}finally{vt(!1)}}}else c=t;return a.memoizedState=a.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},a.queue=e,e=e.dispatch=U1.bind(null,we,e),[a.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:function(e){e=To(e);var t=e.queue,l=k0.bind(null,we,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Ro,useDeferredValue:function(e,t){var l=zt();return Do(l,e,t)},useTransition:function(){var e=To(!1);return e=T0.bind(null,we,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=we,c=zt();if(Te){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Be===null)throw Error(r(349));(ze&124)!==0||s0(a,t,l)}c.memoizedState=l;var u={value:l,getSnapshot:t};return c.queue=u,w0(c0.bind(null,a,u,e),[e]),a.flags|=2048,za(9,mc(),i0.bind(null,a,u,l,t),null),l},useId:function(){var e=zt(),t=Be.identifierPrefix;if(Te){var l=Rn,a=Cn;l=(a&~(1<<32-We(a)-1)).toString(32)+l,t="«"+t+"R"+l,l=fc++,0<l&&(t+="H"+l.toString(32)),t+="»"}else l=C1++,t="«"+t+"r"+l.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:ko,useFormState:p0,useActionState:p0,useOptimistic:function(e){var t=zt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ho.bind(null,we,!0,l),l.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return zt().memoizedState=H1.bind(null,we)}},q0={readContext:pt,use:dc,useCallback:z0,useContext:pt,useEffect:N0,useImperativeHandle:_0,useInsertionEffect:S0,useLayoutEffect:j0,useMemo:M0,useReducer:hc,useRef:v0,useState:function(){return hc(kn)},useDebugValue:Ro,useDeferredValue:function(e,t){var l=Pe();return A0(l,Oe.memoizedState,e,t)},useTransition:function(){var e=hc(kn)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:ks(e),t]},useSyncExternalStore:a0,useId:D0,useHostTransitionStatus:ko,useFormState:g0,useActionState:g0,useOptimistic:function(e,t){var l=Pe();return u0(l,Oe,e,t)},useMemoCache:zo,useCacheRefresh:O0},B1={readContext:pt,use:dc,useCallback:z0,useContext:pt,useEffect:N0,useImperativeHandle:_0,useInsertionEffect:S0,useLayoutEffect:j0,useMemo:M0,useReducer:Ao,useRef:v0,useState:function(){return Ao(kn)},useDebugValue:Ro,useDeferredValue:function(e,t){var l=Pe();return Oe===null?Do(l,e,t):A0(l,Oe.memoizedState,e,t)},useTransition:function(){var e=Ao(kn)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:ks(e),t]},useSyncExternalStore:a0,useId:D0,useHostTransitionStatus:ko,useFormState:b0,useActionState:b0,useOptimistic:function(e,t){var l=Pe();return Oe!==null?u0(l,Oe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:zo,useCacheRefresh:O0},Ma=null,Bs=0;function yc(e){var t=Bs;return Bs+=1,Ma===null&&(Ma=[]),Wd(Ma,e,t)}function qs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function bc(e,t){throw t.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function L0(e){var t=e._init;return t(e._payload)}function Y0(e){function t(B,D){if(e){var Y=B.deletions;Y===null?(B.deletions=[D],B.flags|=16):Y.push(D)}}function l(B,D){if(!e)return null;for(;D!==null;)t(B,D),D=D.sibling;return null}function a(B){for(var D=new Map;B!==null;)B.key!==null?D.set(B.key,B):D.set(B.index,B),B=B.sibling;return D}function c(B,D){return B=Tn(B,D),B.index=0,B.sibling=null,B}function u(B,D,Y){return B.index=Y,e?(Y=B.alternate,Y!==null?(Y=Y.index,Y<D?(B.flags|=67108866,D):Y):(B.flags|=67108866,D)):(B.flags|=1048576,D)}function y(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function v(B,D,Y,te){return D===null||D.tag!==6?(D=no(Y,B.mode,te),D.return=B,D):(D=c(D,Y),D.return=B,D)}function z(B,D,Y,te){var ue=Y.type;return ue===T?P(B,D,Y.props.children,te,Y.key):D!==null&&(D.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===F&&L0(ue)===D.type)?(D=c(D,Y.props),qs(D,Y),D.return=B,D):(D=tc(Y.type,Y.key,Y.props,null,B.mode,te),qs(D,Y),D.return=B,D)}function $(B,D,Y,te){return D===null||D.tag!==4||D.stateNode.containerInfo!==Y.containerInfo||D.stateNode.implementation!==Y.implementation?(D=lo(Y,B.mode,te),D.return=B,D):(D=c(D,Y.children||[]),D.return=B,D)}function P(B,D,Y,te,ue){return D===null||D.tag!==7?(D=ql(Y,B.mode,te,ue),D.return=B,D):(D=c(D,Y),D.return=B,D)}function ae(B,D,Y){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=no(""+D,B.mode,Y),D.return=B,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case w:return Y=tc(D.type,D.key,D.props,null,B.mode,Y),qs(Y,D),Y.return=B,Y;case j:return D=lo(D,B.mode,Y),D.return=B,D;case F:var te=D._init;return D=te(D._payload),ae(B,D,Y)}if(J(D)||ce(D))return D=ql(D,B.mode,Y,null),D.return=B,D;if(typeof D.then=="function")return ae(B,yc(D),Y);if(D.$$typeof===V)return ae(B,sc(B,D),Y);bc(B,D)}return null}function X(B,D,Y,te){var ue=D!==null?D.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return ue!==null?null:v(B,D,""+Y,te);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return Y.key===ue?z(B,D,Y,te):null;case j:return Y.key===ue?$(B,D,Y,te):null;case F:return ue=Y._init,Y=ue(Y._payload),X(B,D,Y,te)}if(J(Y)||ce(Y))return ue!==null?null:P(B,D,Y,te,null);if(typeof Y.then=="function")return X(B,D,yc(Y),te);if(Y.$$typeof===V)return X(B,D,sc(B,Y),te);bc(B,Y)}return null}function K(B,D,Y,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return B=B.get(Y)||null,v(D,B,""+te,ue);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case w:return B=B.get(te.key===null?Y:te.key)||null,z(D,B,te,ue);case j:return B=B.get(te.key===null?Y:te.key)||null,$(D,B,te,ue);case F:var Ne=te._init;return te=Ne(te._payload),K(B,D,Y,te,ue)}if(J(te)||ce(te))return B=B.get(Y)||null,P(D,B,te,ue,null);if(typeof te.then=="function")return K(B,D,Y,yc(te),ue);if(te.$$typeof===V)return K(B,D,Y,sc(D,te),ue);bc(D,te)}return null}function ye(B,D,Y,te){for(var ue=null,Ne=null,fe=D,pe=D=0,it=null;fe!==null&&pe<Y.length;pe++){fe.index>pe?(it=fe,fe=null):it=fe.sibling;var Me=X(B,fe,Y[pe],te);if(Me===null){fe===null&&(fe=it);break}e&&fe&&Me.alternate===null&&t(B,fe),D=u(Me,D,pe),Ne===null?ue=Me:Ne.sibling=Me,Ne=Me,fe=it}if(pe===Y.length)return l(B,fe),Te&&Yl(B,pe),ue;if(fe===null){for(;pe<Y.length;pe++)fe=ae(B,Y[pe],te),fe!==null&&(D=u(fe,D,pe),Ne===null?ue=fe:Ne.sibling=fe,Ne=fe);return Te&&Yl(B,pe),ue}for(fe=a(fe);pe<Y.length;pe++)it=K(fe,B,pe,Y[pe],te),it!==null&&(e&&it.alternate!==null&&fe.delete(it.key===null?pe:it.key),D=u(it,D,pe),Ne===null?ue=it:Ne.sibling=it,Ne=it);return e&&fe.forEach(function(Sl){return t(B,Sl)}),Te&&Yl(B,pe),ue}function xe(B,D,Y,te){if(Y==null)throw Error(r(151));for(var ue=null,Ne=null,fe=D,pe=D=0,it=null,Me=Y.next();fe!==null&&!Me.done;pe++,Me=Y.next()){fe.index>pe?(it=fe,fe=null):it=fe.sibling;var Sl=X(B,fe,Me.value,te);if(Sl===null){fe===null&&(fe=it);break}e&&fe&&Sl.alternate===null&&t(B,fe),D=u(Sl,D,pe),Ne===null?ue=Sl:Ne.sibling=Sl,Ne=Sl,fe=it}if(Me.done)return l(B,fe),Te&&Yl(B,pe),ue;if(fe===null){for(;!Me.done;pe++,Me=Y.next())Me=ae(B,Me.value,te),Me!==null&&(D=u(Me,D,pe),Ne===null?ue=Me:Ne.sibling=Me,Ne=Me);return Te&&Yl(B,pe),ue}for(fe=a(fe);!Me.done;pe++,Me=Y.next())Me=K(fe,B,pe,Me.value,te),Me!==null&&(e&&Me.alternate!==null&&fe.delete(Me.key===null?pe:Me.key),D=u(Me,D,pe),Ne===null?ue=Me:Ne.sibling=Me,Ne=Me);return e&&fe.forEach(function(qy){return t(B,qy)}),Te&&Yl(B,pe),ue}function He(B,D,Y,te){if(typeof Y=="object"&&Y!==null&&Y.type===T&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:e:{for(var ue=Y.key;D!==null;){if(D.key===ue){if(ue=Y.type,ue===T){if(D.tag===7){l(B,D.sibling),te=c(D,Y.props.children),te.return=B,B=te;break e}}else if(D.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===F&&L0(ue)===D.type){l(B,D.sibling),te=c(D,Y.props),qs(te,Y),te.return=B,B=te;break e}l(B,D);break}else t(B,D);D=D.sibling}Y.type===T?(te=ql(Y.props.children,B.mode,te,Y.key),te.return=B,B=te):(te=tc(Y.type,Y.key,Y.props,null,B.mode,te),qs(te,Y),te.return=B,B=te)}return y(B);case j:e:{for(ue=Y.key;D!==null;){if(D.key===ue)if(D.tag===4&&D.stateNode.containerInfo===Y.containerInfo&&D.stateNode.implementation===Y.implementation){l(B,D.sibling),te=c(D,Y.children||[]),te.return=B,B=te;break e}else{l(B,D);break}else t(B,D);D=D.sibling}te=lo(Y,B.mode,te),te.return=B,B=te}return y(B);case F:return ue=Y._init,Y=ue(Y._payload),He(B,D,Y,te)}if(J(Y))return ye(B,D,Y,te);if(ce(Y)){if(ue=ce(Y),typeof ue!="function")throw Error(r(150));return Y=ue.call(Y),xe(B,D,Y,te)}if(typeof Y.then=="function")return He(B,D,yc(Y),te);if(Y.$$typeof===V)return He(B,D,sc(B,Y),te);bc(B,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,D!==null&&D.tag===6?(l(B,D.sibling),te=c(D,Y),te.return=B,B=te):(l(B,D),te=no(Y,B.mode,te),te.return=B,B=te),y(B)):l(B,D)}return function(B,D,Y,te){try{Bs=0;var ue=He(B,D,Y,te);return Ma=null,ue}catch(fe){if(fe===As||fe===cc)throw fe;var Ne=Ot(29,fe,null,B.mode);return Ne.lanes=te,Ne.return=B,Ne}finally{}}}var Aa=Y0(!0),V0=Y0(!1),It=k(null),yn=null;function rl(e){var t=e.alternate;I(tt,tt.current&1),I(It,e),yn===null&&(t===null||ja.current!==null||t.memoizedState!==null)&&(yn=e)}function $0(e){if(e.tag===22){if(I(tt,tt.current),I(It,e),yn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(yn=e)}}else ol()}function ol(){I(tt,tt.current),I(It,It.current)}function Hn(e){Q(It),yn===e&&(yn=null),Q(tt)}var tt=k(0);function vc(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||_u(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Uo(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:g({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Bo={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Bt(),c=sl(a);c.payload=t,l!=null&&(c.callback=l),t=il(e,c,a),t!==null&&(qt(t,e,a),Cs(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Bt(),c=sl(a);c.tag=1,c.payload=t,l!=null&&(c.callback=l),t=il(e,c,a),t!==null&&(qt(t,e,a),Cs(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Bt(),a=sl(l);a.tag=2,t!=null&&(a.callback=t),t=il(e,a,l),t!==null&&(qt(t,e,l),Cs(t,e,l))}};function G0(e,t,l,a,c,u,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,y):t.prototype&&t.prototype.isPureReactComponent?!ws(l,a)||!ws(c,u):!0}function X0(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Bo.enqueueReplaceState(t,t.state,null)}function Kl(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=g({},l));for(var c in e)l[c]===void 0&&(l[c]=e[c])}return l}var wc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Z0(e){wc(e)}function Q0(e){console.error(e)}function K0(e){wc(e)}function Nc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function J0(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function qo(e,t,l){return l=sl(l),l.tag=3,l.payload={element:null},l.callback=function(){Nc(e,t)},l}function W0(e){return e=sl(e),e.tag=3,e}function F0(e,t,l,a){var c=l.type.getDerivedStateFromError;if(typeof c=="function"){var u=a.value;e.payload=function(){return c(u)},e.callback=function(){J0(t,l,a)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){J0(t,l,a),typeof c!="function"&&(xl===null?xl=new Set([this]):xl.add(this));var v=a.stack;this.componentDidCatch(a.value,{componentStack:v!==null?v:""})})}function q1(e,t,l,a,c){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&_s(t,l,c,!0),l=It.current,l!==null){switch(l.tag){case 13:return yn===null?ou():l.alternate===null&&Ge===0&&(Ge=3),l.flags&=-257,l.flags|=65536,l.lanes=c,a===mo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),fu(e,a,c)),!1;case 22:return l.flags|=65536,a===mo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),fu(e,a,c)),!1}throw Error(r(435,l.tag))}return fu(e,a,c),ou(),!1}if(Te)return t=It.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,a!==io&&(e=Error(r(422),{cause:a}),Es(Kt(e,l)))):(a!==io&&(t=Error(r(423),{cause:a}),Es(Kt(t,l))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,a=Kt(a,l),c=qo(e.stateNode,a,c),go(e,c),Ge!==4&&(Ge=2)),!1;var u=Error(r(520),{cause:a});if(u=Kt(u,l),Zs===null?Zs=[u]:Zs.push(u),Ge!==4&&(Ge=2),t===null)return!0;a=Kt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=c&-c,l.lanes|=e,e=qo(l.stateNode,a,e),go(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(xl===null||!xl.has(u))))return l.flags|=65536,c&=-c,l.lanes|=c,c=W0(c),F0(c,e,l,a),go(l,c),!1}l=l.return}while(l!==null);return!1}var I0=Error(r(461)),at=!1;function rt(e,t,l,a){t.child=e===null?V0(t,null,l,a):Aa(t,e.child,l,a)}function P0(e,t,l,a,c){l=l.render;var u=t.ref;if("ref"in a){var y={};for(var v in a)v!=="ref"&&(y[v]=a[v])}else y=a;return Xl(t),a=No(e,t,l,y,u,c),v=So(),e!==null&&!at?(jo(e,t,c),Un(e,t,c)):(Te&&v&&ao(t),t.flags|=1,rt(e,t,a,c),t.child)}function eh(e,t,l,a,c){if(e===null){var u=l.type;return typeof u=="function"&&!to(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,th(e,t,u,a,c)):(e=tc(l.type,null,a,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Qo(e,c)){var y=u.memoizedProps;if(l=l.compare,l=l!==null?l:ws,l(y,a)&&e.ref===t.ref)return Un(e,t,c)}return t.flags|=1,e=Tn(u,a),e.ref=t.ref,e.return=t,t.child=e}function th(e,t,l,a,c){if(e!==null){var u=e.memoizedProps;if(ws(u,a)&&e.ref===t.ref)if(at=!1,t.pendingProps=a=u,Qo(e,c))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Un(e,t,c)}return Lo(e,t,l,a,c)}function nh(e,t,l){var a=t.pendingProps,c=a.children,u=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if((t.flags&128)!==0){if(a=u!==null?u.baseLanes|l:l,e!==null){for(c=t.child=e.child,u=0;c!==null;)u=u|c.lanes|c.childLanes,c=c.sibling;t.childLanes=u&~a}else t.childLanes=0,t.child=null;return lh(e,t,a,l)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ic(t,u!==null?u.cachePool:null),u!==null?t0(t,u):bo(),$0(t);else return t.lanes=t.childLanes=536870912,lh(e,t,u!==null?u.baseLanes|l:l,l)}else u!==null?(ic(t,u.cachePool),t0(t,u),ol(),t.memoizedState=null):(e!==null&&ic(t,null),bo(),ol());return rt(e,t,c,l),t.child}function lh(e,t,l,a){var c=ho();return c=c===null?null:{parent:et._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&ic(t,null),bo(),$0(t),e!==null&&_s(e,t,a,!0),null}function Sc(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Lo(e,t,l,a,c){return Xl(t),l=No(e,t,l,a,void 0,c),a=So(),e!==null&&!at?(jo(e,t,c),Un(e,t,c)):(Te&&a&&ao(t),t.flags|=1,rt(e,t,l,c),t.child)}function ah(e,t,l,a,c,u){return Xl(t),t.updateQueue=null,l=l0(t,a,l,c),n0(e),a=So(),e!==null&&!at?(jo(e,t,u),Un(e,t,u)):(Te&&a&&ao(t),t.flags|=1,rt(e,t,l,u),t.child)}function sh(e,t,l,a,c){if(Xl(t),t.stateNode===null){var u=ba,y=l.contextType;typeof y=="object"&&y!==null&&(u=pt(y)),u=new l(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Bo,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},xo(t),y=l.contextType,u.context=typeof y=="object"&&y!==null?pt(y):ba,u.state=t.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(Uo(t,l,y,a),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&Bo.enqueueReplaceState(u,u.state,null),Ds(t,a,u,c),Rs(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var v=t.memoizedProps,z=Kl(l,v);u.props=z;var $=u.context,P=l.contextType;y=ba,typeof P=="object"&&P!==null&&(y=pt(P));var ae=l.getDerivedStateFromProps;P=typeof ae=="function"||typeof u.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,P||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(v||$!==y)&&X0(t,u,a,y),al=!1;var X=t.memoizedState;u.state=X,Ds(t,a,u,c),Rs(),$=t.memoizedState,v||X!==$||al?(typeof ae=="function"&&(Uo(t,l,ae,a),$=t.memoizedState),(z=al||G0(t,l,z,a,X,$,y))?(P||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=$),u.props=a,u.state=$,u.context=y,a=z):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,po(e,t),y=t.memoizedProps,P=Kl(l,y),u.props=P,ae=t.pendingProps,X=u.context,$=l.contextType,z=ba,typeof $=="object"&&$!==null&&(z=pt($)),v=l.getDerivedStateFromProps,($=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==ae||X!==z)&&X0(t,u,a,z),al=!1,X=t.memoizedState,u.state=X,Ds(t,a,u,c),Rs();var K=t.memoizedState;y!==ae||X!==K||al||e!==null&&e.dependencies!==null&&ac(e.dependencies)?(typeof v=="function"&&(Uo(t,l,v,a),K=t.memoizedState),(P=al||G0(t,l,P,a,X,K,z)||e!==null&&e.dependencies!==null&&ac(e.dependencies))?($||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,K,z),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,K,z)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=K),u.props=a,u.state=K,u.context=z,a=P):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Sc(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Aa(t,e.child,null,c),t.child=Aa(t,null,l,c)):rt(e,t,l,c),t.memoizedState=u.state,e=t.child):e=Un(e,t,c),e}function ih(e,t,l,a){return js(),t.flags|=256,rt(e,t,l,a),t.child}var Yo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vo(e){return{baseLanes:e,cachePool:Qd()}}function $o(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Pt),e}function ch(e,t,l){var a=t.pendingProps,c=!1,u=(t.flags&128)!==0,y;if((y=u)||(y=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(c?rl(t):ol(),Te){var v=$e,z;if(z=v){e:{for(z=v,v=gn;z.nodeType!==8;){if(!v){v=null;break e}if(z=rn(z.nextSibling),z===null){v=null;break e}}v=z}v!==null?(t.memoizedState={dehydrated:v,treeContext:Ll!==null?{id:Cn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},z=Ot(18,null,null,0),z.stateNode=v,z.return=t,t.child=z,Nt=t,$e=null,z=!0):z=!1}z||$l(t)}if(v=t.memoizedState,v!==null&&(v=v.dehydrated,v!==null))return _u(v)?t.lanes=32:t.lanes=536870912,null;Hn(t)}return v=a.children,a=a.fallback,c?(ol(),c=t.mode,v=jc({mode:"hidden",children:v},c),a=ql(a,c,l,null),v.return=t,a.return=t,v.sibling=a,t.child=v,c=t.child,c.memoizedState=Vo(l),c.childLanes=$o(e,y,l),t.memoizedState=Yo,a):(rl(t),Go(t,v))}if(z=e.memoizedState,z!==null&&(v=z.dehydrated,v!==null)){if(u)t.flags&256?(rl(t),t.flags&=-257,t=Xo(e,t,l)):t.memoizedState!==null?(ol(),t.child=e.child,t.flags|=128,t=null):(ol(),c=a.fallback,v=t.mode,a=jc({mode:"visible",children:a.children},v),c=ql(c,v,l,null),c.flags|=2,a.return=t,c.return=t,a.sibling=c,t.child=a,Aa(t,e.child,null,l),a=t.child,a.memoizedState=Vo(l),a.childLanes=$o(e,y,l),t.memoizedState=Yo,t=c);else if(rl(t),_u(v)){if(y=v.nextSibling&&v.nextSibling.dataset,y)var $=y.dgst;y=$,a=Error(r(419)),a.stack="",a.digest=y,Es({value:a,source:null,stack:null}),t=Xo(e,t,l)}else if(at||_s(e,t,l,!1),y=(l&e.childLanes)!==0,at||y){if(y=Be,y!==null&&(a=l&-l,a=(a&42)!==0?1:os(a),a=(a&(y.suspendedLanes|l))!==0?0:a,a!==0&&a!==z.retryLane))throw z.retryLane=a,ya(e,a),qt(y,e,a),I0;v.data==="$?"||ou(),t=Xo(e,t,l)}else v.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,$e=rn(v.nextSibling),Nt=t,Te=!0,Vl=null,gn=!1,e!==null&&(Wt[Ft++]=Cn,Wt[Ft++]=Rn,Wt[Ft++]=Ll,Cn=e.id,Rn=e.overflow,Ll=t),t=Go(t,a.children),t.flags|=4096);return t}return c?(ol(),c=a.fallback,v=t.mode,z=e.child,$=z.sibling,a=Tn(z,{mode:"hidden",children:a.children}),a.subtreeFlags=z.subtreeFlags&65011712,$!==null?c=Tn($,c):(c=ql(c,v,l,null),c.flags|=2),c.return=t,a.return=t,a.sibling=c,t.child=a,a=c,c=t.child,v=e.child.memoizedState,v===null?v=Vo(l):(z=v.cachePool,z!==null?($=et._currentValue,z=z.parent!==$?{parent:$,pool:$}:z):z=Qd(),v={baseLanes:v.baseLanes|l,cachePool:z}),c.memoizedState=v,c.childLanes=$o(e,y,l),t.memoizedState=Yo,a):(rl(t),l=e.child,e=l.sibling,l=Tn(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=l,t.memoizedState=null,l)}function Go(e,t){return t=jc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function jc(e,t){return e=Ot(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Xo(e,t,l){return Aa(t,e.child,null,l),e=Go(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rh(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ro(e.return,t,l)}function Zo(e,t,l,a,c){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:c}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=c)}function oh(e,t,l){var a=t.pendingProps,c=a.revealOrder,u=a.tail;if(rt(e,t,a.children,l),a=tt.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rh(e,l,t);else if(e.tag===19)rh(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}switch(I(tt,a),c){case"forwards":for(l=t.child,c=null;l!==null;)e=l.alternate,e!==null&&vc(e)===null&&(c=l),l=l.sibling;l=c,l===null?(c=t.child,t.child=null):(c=l.sibling,l.sibling=null),Zo(t,!1,c,l,u);break;case"backwards":for(l=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&vc(e)===null){t.child=c;break}e=c.sibling,c.sibling=l,l=c,c=e}Zo(t,!0,l,null,u);break;case"together":Zo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Un(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ml|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(_s(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=Tn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Tn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Qo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ac(e)))}function L1(e,t,l){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),ll(t,et,e.memoizedState.cache),js();break;case 27:case 5:Ce(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:ll(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(rl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?ch(e,t,l):(rl(t),e=Un(e,t,l),e!==null?e.sibling:null);rl(t);break;case 19:var c=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(_s(e,t,l,!1),a=(l&t.childLanes)!==0),c){if(a)return oh(e,t,l);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),I(tt,tt.current),a)break;return null;case 22:case 23:return t.lanes=0,nh(e,t,l);case 24:ll(t,et,e.memoizedState.cache)}return Un(e,t,l)}function uh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!Qo(e,l)&&(t.flags&128)===0)return at=!1,L1(e,t,l);at=(e.flags&131072)!==0}else at=!1,Te&&(t.flags&1048576)!==0&&Ld(t,lc,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,c=a._init;if(a=c(a._payload),t.type=a,typeof a=="function")to(a)?(e=Kl(a,e),t.tag=1,t=sh(null,t,a,e,l)):(t.tag=0,t=Lo(null,t,a,e,l));else{if(a!=null){if(c=a.$$typeof,c===R){t.tag=11,t=P0(null,t,a,e,l);break e}else if(c===L){t.tag=14,t=eh(null,t,a,e,l);break e}}throw t=E(a)||a,Error(r(306,t,""))}}return t;case 0:return Lo(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,c=Kl(a,t.pendingProps),sh(e,t,a,c,l);case 3:e:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var u=t.memoizedState;c=u.element,po(e,t),Ds(t,a,null,l);var y=t.memoizedState;if(a=y.cache,ll(t,et,a),a!==u.cache&&oo(t,[et],l,!0),Rs(),a=y.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=ih(e,t,a,l);break e}else if(a!==c){c=Kt(Error(r(424)),t),Es(c),t=ih(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for($e=rn(e.firstChild),Nt=t,Te=!0,Vl=null,gn=!0,l=V0(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(js(),a===c){t=Un(e,t,l);break e}rt(e,t,a,l)}t=t.child}return t;case 26:return Sc(e,t),e===null?(l=mm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Te||(l=t.type,e=t.pendingProps,a=Bc(re.current).createElement(l),a[lt]=t,a[xt]=e,ut(a,l,e),Fe(a),t.stateNode=a):t.memoizedState=mm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&Te&&(a=t.stateNode=fm(t.type,t.pendingProps,re.current),Nt=t,gn=!0,c=$e,yl(t.type)?(zu=c,$e=rn(a.firstChild)):$e=c),rt(e,t,t.pendingProps.children,l),Sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((c=a=$e)&&(a=my(a,t.type,t.pendingProps,gn),a!==null?(t.stateNode=a,Nt=t,$e=rn(a.firstChild),gn=!1,c=!0):c=!1),c||$l(t)),Ce(t),c=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,a=u.children,Su(c,u)?a=null:y!==null&&Su(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=No(e,t,R1,null,null,l),ti._currentValue=c),Sc(e,t),rt(e,t,a,l),t.child;case 6:return e===null&&Te&&((e=l=$e)&&(l=xy(l,t.pendingProps,gn),l!==null?(t.stateNode=l,Nt=t,$e=null,e=!0):e=!1),e||$l(t)),null;case 13:return ch(e,t,l);case 4:return me(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Aa(t,null,a,l):rt(e,t,a,l),t.child;case 11:return P0(e,t,t.type,t.pendingProps,l);case 7:return rt(e,t,t.pendingProps,l),t.child;case 8:return rt(e,t,t.pendingProps.children,l),t.child;case 12:return rt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ll(t,t.type,a.value),rt(e,t,a.children,l),t.child;case 9:return c=t.type._context,a=t.pendingProps.children,Xl(t),c=pt(c),a=a(c),t.flags|=1,rt(e,t,a,l),t.child;case 14:return eh(e,t,t.type,t.pendingProps,l);case 15:return th(e,t,t.type,t.pendingProps,l);case 19:return oh(e,t,l);case 31:return a=t.pendingProps,l=t.mode,a={mode:a.mode,children:a.children},e===null?(l=jc(a,l),l.ref=t.ref,t.child=l,l.return=t,t=l):(l=Tn(e.child,a),l.ref=t.ref,t.child=l,l.return=t,t=l),t;case 22:return nh(e,t,l);case 24:return Xl(t),a=pt(et),e===null?(c=ho(),c===null&&(c=Be,u=uo(),c.pooledCache=u,u.refCount++,u!==null&&(c.pooledCacheLanes|=l),c=u),t.memoizedState={parent:a,cache:c},xo(t),ll(t,et,c)):((e.lanes&l)!==0&&(po(e,t),Ds(t,null,null,l),Rs()),c=e.memoizedState,u=t.memoizedState,c.parent!==a?(c={parent:a,cache:a},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),ll(t,et,a)):(a=u.cache,ll(t,et,a),a!==c.cache&&oo(t,[et],l,!0))),rt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Bn(e){e.flags|=4}function fh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!bm(t)){if(t=It.current,t!==null&&((ze&4194048)===ze?yn!==null:(ze&62914560)!==ze&&(ze&536870912)===0||t!==yn))throw Ts=mo,Kd;e.flags|=8192}}function Ec(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Jn():536870912,e.lanes|=t,Da|=t)}function Ls(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var c=e.child;c!==null;)l|=c.lanes|c.childLanes,a|=c.subtreeFlags&65011712,a|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)l|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Y1(e,t,l){var a=t.pendingProps;switch(so(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),On(et),Ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ss(t)?Bn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$d())),Ye(t),null;case 26:return l=t.memoizedState,e===null?(Bn(t),l!==null?(Ye(t),fh(t,l)):(Ye(t),t.flags&=-16777217)):l?l!==e.memoizedState?(Bn(t),Ye(t),fh(t,l)):(Ye(t),t.flags&=-16777217):(e.memoizedProps!==a&&Bn(t),Ye(t),t.flags&=-16777217),null;case 27:ft(t),l=re.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Bn(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}e=ne.current,Ss(t)?Yd(t):(e=fm(c,a,l),t.stateNode=e,Bn(t))}return Ye(t),null;case 5:if(ft(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Bn(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}if(e=ne.current,Ss(t))Yd(t);else{switch(c=Bc(re.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?c.createElement(l,{is:a.is}):c.createElement(l)}}e[lt]=t,e[xt]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch(ut(e,l,a),l){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Bn(t)}}return Ye(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Bn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=re.current,Ss(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,c=Nt,c!==null)switch(c.tag){case 27:case 5:a=c.memoizedProps}e[lt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||am(e.nodeValue,l)),e||$l(t)}else e=Bc(e).createTextNode(a),e[lt]=t,t.stateNode=e}return Ye(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ss(t),a!==null&&a.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[lt]=t}else js(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),c=!1}else c=$d(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Hn(t),t):(Hn(t),null)}if(Hn(t),(t.flags&128)!==0)return t.lanes=l,t;if(l=a!==null,e=e!==null&&e.memoizedState!==null,l){a=t.child,c=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(c=a.alternate.memoizedState.cachePool.pool);var u=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==c&&(a.flags|=2048)}return l!==e&&l&&(t.child.flags|=8192),Ec(t,t.updateQueue),Ye(t),null;case 4:return Ae(),e===null&&yu(t.stateNode.containerInfo),Ye(t),null;case 10:return On(t.type),Ye(t),null;case 19:if(Q(tt),c=t.memoizedState,c===null)return Ye(t),null;if(a=(t.flags&128)!==0,u=c.rendering,u===null)if(a)Ls(c,!1);else{if(Ge!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=vc(e),u!==null){for(t.flags|=128,Ls(c,!1),e=u.updateQueue,t.updateQueue=e,Ec(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)qd(l,e),l=l.sibling;return I(tt,tt.current&1|2),t.child}e=e.sibling}c.tail!==null&&_e()>Mc&&(t.flags|=128,a=!0,Ls(c,!1),t.lanes=4194304)}else{if(!a)if(e=vc(u),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ec(t,e),Ls(c,!0),c.tail===null&&c.tailMode==="hidden"&&!u.alternate&&!Te)return Ye(t),null}else 2*_e()-c.renderingStartTime>Mc&&l!==536870912&&(t.flags|=128,a=!0,Ls(c,!1),t.lanes=4194304);c.isBackwards?(u.sibling=t.child,t.child=u):(e=c.last,e!==null?e.sibling=u:t.child=u,c.last=u)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=_e(),t.sibling=null,e=tt.current,I(tt,a?e&1|2:e&1),t):(Ye(t),null);case 22:case 23:return Hn(t),vo(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),l=t.updateQueue,l!==null&&Ec(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&Q(Zl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),On(et),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function V1(e,t){switch(so(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return On(et),Ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ft(t),null;case 13:if(Hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));js()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Q(tt),null;case 4:return Ae(),null;case 10:return On(t.type),null;case 22:case 23:return Hn(t),vo(),e!==null&&Q(Zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return On(et),null;case 25:return null;default:return null}}function dh(e,t){switch(so(t),t.tag){case 3:On(et),Ae();break;case 26:case 27:case 5:ft(t);break;case 4:Ae();break;case 13:Hn(t);break;case 19:Q(tt);break;case 10:On(t.type);break;case 22:case 23:Hn(t),vo(),e!==null&&Q(Zl);break;case 24:On(et)}}function Ys(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var c=a.next;l=c;do{if((l.tag&e)===e){a=void 0;var u=l.create,y=l.inst;a=u(),y.destroy=a}l=l.next}while(l!==c)}}catch(v){Ue(t,t.return,v)}}function ul(e,t,l){try{var a=t.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var u=c.next;a=u;do{if((a.tag&e)===e){var y=a.inst,v=y.destroy;if(v!==void 0){y.destroy=void 0,c=t;var z=l,$=v;try{$()}catch(P){Ue(c,z,P)}}}a=a.next}while(a!==u)}}catch(P){Ue(t,t.return,P)}}function hh(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{e0(t,l)}catch(a){Ue(e,e.return,a)}}}function mh(e,t,l){l.props=Kl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ue(e,t,a)}}function Vs(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(c){Ue(e,t,c)}}function bn(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(c){Ue(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(c){Ue(e,t,c)}else l.current=null}function xh(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(c){Ue(e,e.return,c)}}function Ko(e,t,l){try{var a=e.stateNode;oy(a,e.type,l,t),a[xt]=t}catch(c){Ue(e,e.return,c)}}function ph(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&yl(e.type)||e.tag===4}function Jo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ph(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&&yl(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 Wo(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Uc));else if(a!==4&&(a===27&&yl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Wo(e,t,l),e=e.sibling;e!==null;)Wo(e,t,l),e=e.sibling}function _c(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&yl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(_c(e,t,l),e=e.sibling;e!==null;)_c(e,t,l),e=e.sibling}function gh(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);ut(t,a,l),t[lt]=e,t[xt]=l}catch(u){Ue(e,e.return,u)}}var qn=!1,Je=!1,Fo=!1,yh=typeof WeakSet=="function"?WeakSet:Set,st=null;function $1(e,t){if(e=e.containerInfo,wu=Gc,e=Ad(e),Kr(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var c=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var y=0,v=-1,z=-1,$=0,P=0,ae=e,X=null;t:for(;;){for(var K;ae!==l||c!==0&&ae.nodeType!==3||(v=y+c),ae!==u||a!==0&&ae.nodeType!==3||(z=y+a),ae.nodeType===3&&(y+=ae.nodeValue.length),(K=ae.firstChild)!==null;)X=ae,ae=K;for(;;){if(ae===e)break t;if(X===l&&++$===c&&(v=y),X===u&&++P===a&&(z=y),(K=ae.nextSibling)!==null)break;ae=X,X=ae.parentNode}ae=K}l=v===-1||z===-1?null:{start:v,end:z}}else l=null}l=l||{start:0,end:0}}else l=null;for(Nu={focusedElem:e,selectionRange:l},Gc=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){switch(t=st,u=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,l=t,c=u.memoizedProps,u=u.memoizedState,a=l.stateNode;try{var ye=Kl(l.type,c,l.elementType===l.type);e=a.getSnapshotBeforeUpdate(ye,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(xe){Ue(l,l.return,xe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Eu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Eu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}}function bh(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:fl(e,l),a&4&&Ys(5,l);break;case 1:if(fl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(y){Ue(l,l.return,y)}else{var c=Kl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ue(l,l.return,y)}}a&64&&hh(l),a&512&&Vs(l,l.return);break;case 3:if(fl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{e0(e,t)}catch(y){Ue(l,l.return,y)}}break;case 27:t===null&&a&4&&gh(l);case 26:case 5:fl(e,l),t===null&&a&4&&xh(l),a&512&&Vs(l,l.return);break;case 12:fl(e,l);break;case 13:fl(e,l),a&4&&Nh(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=I1.bind(null,l),py(e,l))));break;case 22:if(a=l.memoizedState!==null||qn,!a){t=t!==null&&t.memoizedState!==null||Je,c=qn;var u=Je;qn=a,(Je=t)&&!u?dl(e,l,(l.subtreeFlags&8772)!==0):fl(e,l),qn=c,Je=u}break;case 30:break;default:fl(e,l)}}function vh(e){var t=e.alternate;t!==null&&(e.alternate=null,vh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ds(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qe=null,Mt=!1;function Ln(e,t,l){for(l=l.child;l!==null;)wh(e,t,l),l=l.sibling}function wh(e,t,l){if(Qe&&typeof Qe.onCommitFiberUnmount=="function")try{Qe.onCommitFiberUnmount(Ct,l)}catch{}switch(l.tag){case 26:Je||bn(l,t),Ln(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Je||bn(l,t);var a=qe,c=Mt;yl(l.type)&&(qe=l.stateNode,Mt=!1),Ln(e,t,l),Fs(l.stateNode),qe=a,Mt=c;break;case 5:Je||bn(l,t);case 6:if(a=qe,c=Mt,qe=null,Ln(e,t,l),qe=a,Mt=c,qe!==null)if(Mt)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(l.stateNode)}catch(u){Ue(l,t,u)}else try{qe.removeChild(l.stateNode)}catch(u){Ue(l,t,u)}break;case 18:qe!==null&&(Mt?(e=qe,om(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),si(e)):om(qe,l.stateNode));break;case 4:a=qe,c=Mt,qe=l.stateNode.containerInfo,Mt=!0,Ln(e,t,l),qe=a,Mt=c;break;case 0:case 11:case 14:case 15:Je||ul(2,l,t),Je||ul(4,l,t),Ln(e,t,l);break;case 1:Je||(bn(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&mh(l,t,a)),Ln(e,t,l);break;case 21:Ln(e,t,l);break;case 22:Je=(a=Je)||l.memoizedState!==null,Ln(e,t,l),Je=a;break;default:Ln(e,t,l)}}function Nh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{si(e)}catch(l){Ue(t,t.return,l)}}function G1(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yh),t;default:throw Error(r(435,e.tag))}}function Io(e,t){var l=G1(e);t.forEach(function(a){var c=P1.bind(null,e,a);l.has(a)||(l.add(a),a.then(c,c))})}function kt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var c=l[a],u=e,y=t,v=y;e:for(;v!==null;){switch(v.tag){case 27:if(yl(v.type)){qe=v.stateNode,Mt=!1;break e}break;case 5:qe=v.stateNode,Mt=!1;break e;case 3:case 4:qe=v.stateNode.containerInfo,Mt=!0;break e}v=v.return}if(qe===null)throw Error(r(160));wh(u,y,c),qe=null,Mt=!1,u=c.alternate,u!==null&&(u.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Sh(t,e),t=t.sibling}var cn=null;function Sh(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:kt(t,e),Ht(e),a&4&&(ul(3,e,e.return),Ys(3,e),ul(5,e,e.return));break;case 1:kt(t,e),Ht(e),a&512&&(Je||l===null||bn(l,l.return)),a&64&&qn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var c=cn;if(kt(t,e),Ht(e),a&512&&(Je||l===null||bn(l,l.return)),a&4){var u=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,c=c.ownerDocument||c;t:switch(a){case"title":u=c.getElementsByTagName("title")[0],(!u||u[Dl]||u[lt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=c.createElement(a),c.head.insertBefore(u,c.querySelector("head > title"))),ut(u,a,l),u[lt]=e,Fe(u),a=u;break e;case"link":var y=gm("link","href",c).get(a+(l.href||""));if(y){for(var v=0;v<y.length;v++)if(u=y[v],u.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&u.getAttribute("rel")===(l.rel==null?null:l.rel)&&u.getAttribute("title")===(l.title==null?null:l.title)&&u.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(v,1);break t}}u=c.createElement(a),ut(u,a,l),c.head.appendChild(u);break;case"meta":if(y=gm("meta","content",c).get(a+(l.content||""))){for(v=0;v<y.length;v++)if(u=y[v],u.getAttribute("content")===(l.content==null?null:""+l.content)&&u.getAttribute("name")===(l.name==null?null:l.name)&&u.getAttribute("property")===(l.property==null?null:l.property)&&u.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(v,1);break t}}u=c.createElement(a),ut(u,a,l),c.head.appendChild(u);break;default:throw Error(r(468,a))}u[lt]=e,Fe(u),a=u}e.stateNode=a}else ym(c,e.type,e.stateNode);else e.stateNode=pm(c,a,e.memoizedProps);else u!==a?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,a===null?ym(c,e.type,e.stateNode):pm(c,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ko(e,e.memoizedProps,l.memoizedProps)}break;case 27:kt(t,e),Ht(e),a&512&&(Je||l===null||bn(l,l.return)),l!==null&&a&4&&Ko(e,e.memoizedProps,l.memoizedProps);break;case 5:if(kt(t,e),Ht(e),a&512&&(Je||l===null||bn(l,l.return)),e.flags&32){c=e.stateNode;try{fa(c,"")}catch(K){Ue(e,e.return,K)}}a&4&&e.stateNode!=null&&(c=e.memoizedProps,Ko(e,c,l!==null?l.memoizedProps:c)),a&1024&&(Fo=!0);break;case 6:if(kt(t,e),Ht(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(K){Ue(e,e.return,K)}}break;case 3:if(Yc=null,c=cn,cn=qc(t.containerInfo),kt(t,e),cn=c,Ht(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{si(t.containerInfo)}catch(K){Ue(e,e.return,K)}Fo&&(Fo=!1,jh(e));break;case 4:a=cn,cn=qc(e.stateNode.containerInfo),kt(t,e),Ht(e),cn=a;break;case 12:kt(t,e),Ht(e);break;case 13:kt(t,e),Ht(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(au=_e()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Io(e,a)));break;case 22:c=e.memoizedState!==null;var z=l!==null&&l.memoizedState!==null,$=qn,P=Je;if(qn=$||c,Je=P||z,kt(t,e),Je=P,qn=$,Ht(e),a&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(l===null||z||qn||Je||Jl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){z=l=t;try{if(u=z.stateNode,c)y=u.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{v=z.stateNode;var ae=z.memoizedProps.style,X=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;v.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(K){Ue(z,z.return,K)}}}else if(t.tag===6){if(l===null){z=t;try{z.stateNode.nodeValue=c?"":z.memoizedProps}catch(K){Ue(z,z.return,K)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Io(e,l))));break;case 19:kt(t,e),Ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Io(e,a)));break;case 30:break;case 21:break;default:kt(t,e),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(ph(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var c=l.stateNode,u=Jo(e);_c(e,u,c);break;case 5:var y=l.stateNode;l.flags&32&&(fa(y,""),l.flags&=-33);var v=Jo(e);_c(e,v,y);break;case 3:case 4:var z=l.stateNode.containerInfo,$=Jo(e);Wo(e,$,z);break;default:throw Error(r(161))}}catch(P){Ue(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bh(e,t.alternate,t),t=t.sibling}function Jl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ul(4,t,t.return),Jl(t);break;case 1:bn(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&mh(t,t.return,l),Jl(t);break;case 27:Fs(t.stateNode);case 26:case 5:bn(t,t.return),Jl(t);break;case 22:t.memoizedState===null&&Jl(t);break;case 30:Jl(t);break;default:Jl(t)}e=e.sibling}}function dl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,c=e,u=t,y=u.flags;switch(u.tag){case 0:case 11:case 15:dl(c,u,l),Ys(4,u);break;case 1:if(dl(c,u,l),a=u,c=a.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch($){Ue(a,a.return,$)}if(a=u,c=a.updateQueue,c!==null){var v=a.stateNode;try{var z=c.shared.hiddenCallbacks;if(z!==null)for(c.shared.hiddenCallbacks=null,c=0;c<z.length;c++)Pd(z[c],v)}catch($){Ue(a,a.return,$)}}l&&y&64&&hh(u),Vs(u,u.return);break;case 27:gh(u);case 26:case 5:dl(c,u,l),l&&a===null&&y&4&&xh(u),Vs(u,u.return);break;case 12:dl(c,u,l);break;case 13:dl(c,u,l),l&&y&4&&Nh(c,u);break;case 22:u.memoizedState===null&&dl(c,u,l),Vs(u,u.return);break;case 30:break;default:dl(c,u,l)}t=t.sibling}}function Po(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&zs(l))}function eu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zs(e))}function vn(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Eh(e,t,l,a),t=t.sibling}function Eh(e,t,l,a){var c=t.flags;switch(t.tag){case 0:case 11:case 15:vn(e,t,l,a),c&2048&&Ys(9,t);break;case 1:vn(e,t,l,a);break;case 3:vn(e,t,l,a),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zs(e)));break;case 12:if(c&2048){vn(e,t,l,a),e=t.stateNode;try{var u=t.memoizedProps,y=u.id,v=u.onPostCommit;typeof v=="function"&&v(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){Ue(t,t.return,z)}}else vn(e,t,l,a);break;case 13:vn(e,t,l,a);break;case 23:break;case 22:u=t.stateNode,y=t.alternate,t.memoizedState!==null?u._visibility&2?vn(e,t,l,a):$s(e,t):u._visibility&2?vn(e,t,l,a):(u._visibility|=2,Ta(e,t,l,a,(t.subtreeFlags&10256)!==0)),c&2048&&Po(y,t);break;case 24:vn(e,t,l,a),c&2048&&eu(t.alternate,t);break;default:vn(e,t,l,a)}}function Ta(e,t,l,a,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var u=e,y=t,v=l,z=a,$=y.flags;switch(y.tag){case 0:case 11:case 15:Ta(u,y,v,z,c),Ys(8,y);break;case 23:break;case 22:var P=y.stateNode;y.memoizedState!==null?P._visibility&2?Ta(u,y,v,z,c):$s(u,y):(P._visibility|=2,Ta(u,y,v,z,c)),c&&$&2048&&Po(y.alternate,y);break;case 24:Ta(u,y,v,z,c),c&&$&2048&&eu(y.alternate,y);break;default:Ta(u,y,v,z,c)}t=t.sibling}}function $s(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,c=a.flags;switch(a.tag){case 22:$s(l,a),c&2048&&Po(a.alternate,a);break;case 24:$s(l,a),c&2048&&eu(a.alternate,a);break;default:$s(l,a)}t=t.sibling}}var Gs=8192;function Ca(e){if(e.subtreeFlags&Gs)for(e=e.child;e!==null;)_h(e),e=e.sibling}function _h(e){switch(e.tag){case 26:Ca(e),e.flags&Gs&&e.memoizedState!==null&&Ay(cn,e.memoizedState,e.memoizedProps);break;case 5:Ca(e);break;case 3:case 4:var t=cn;cn=qc(e.stateNode.containerInfo),Ca(e),cn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Gs,Gs=16777216,Ca(e),Gs=t):Ca(e));break;default:Ca(e)}}function zh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Xs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];st=a,Ah(a,e)}zh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mh(e),e=e.sibling}function Mh(e){switch(e.tag){case 0:case 11:case 15:Xs(e),e.flags&2048&&ul(9,e,e.return);break;case 3:Xs(e);break;case 12:Xs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zc(e)):Xs(e);break;default:Xs(e)}}function zc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];st=a,Ah(a,e)}zh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ul(8,t,t.return),zc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,zc(t));break;default:zc(t)}e=e.sibling}}function Ah(e,t){for(;st!==null;){var l=st;switch(l.tag){case 0:case 11:case 15:ul(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:zs(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,st=a;else e:for(l=e;st!==null;){a=st;var c=a.sibling,u=a.return;if(vh(a),a===l){st=null;break e}if(c!==null){c.return=u,st=c;break e}st=u}}}var X1={getCacheForType:function(e){var t=pt(et),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l}},Z1=typeof WeakMap=="function"?WeakMap:Map,Re=0,Be=null,je=null,ze=0,De=0,Ut=null,hl=!1,Ra=!1,tu=!1,Yn=0,Ge=0,ml=0,Wl=0,nu=0,Pt=0,Da=0,Zs=null,At=null,lu=!1,au=0,Mc=1/0,Ac=null,xl=null,ot=0,pl=null,Oa=null,ka=0,su=0,iu=null,Th=null,Qs=0,cu=null;function Bt(){if((Re&2)!==0&&ze!==0)return ze&-ze;if(S.T!==null){var e=Na;return e!==0?e:mu()}return ki()}function Ch(){Pt===0&&(Pt=(ze&536870912)===0||Te?ia():536870912);var e=It.current;return e!==null&&(e.flags|=32),Pt}function qt(e,t,l){(e===Be&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(Ha(e,0),gl(e,ze,Pt,!1)),Wn(e,l),((Re&2)===0||e!==Be)&&(e===Be&&((Re&2)===0&&(Wl|=l),Ge===4&&gl(e,ze,Pt,!1)),wn(e))}function Rh(e,t,l){if((Re&6)!==0)throw Error(r(327));var a=!l&&(t&124)===0&&(t&e.expiredLanes)===0||Rt(e,t),c=a?J1(e,t):uu(e,t,!0),u=a;do{if(c===0){Ra&&!a&&gl(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!Q1(l)){c=uu(e,t,!1),u=!1;continue}if(c===2){if(u=t,e.errorRecoveryDisabledLanes&u)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var v=e;c=Zs;var z=v.current.memoizedState.isDehydrated;if(z&&(Ha(v,y).flags|=256),y=uu(v,y,!1),y!==2){if(tu&&!z){v.errorRecoveryDisabledLanes|=u,Wl|=u,c=4;break e}u=At,At=c,u!==null&&(At===null?At=u:At.push.apply(At,u))}c=y}if(u=!1,c!==2)continue}}if(c===1){Ha(e,0),gl(e,t,0,!0);break}e:{switch(a=e,u=c,u){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:gl(a,t,Pt,!hl);break e;case 2:At=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(c=au+300-_e(),10<c)){if(gl(a,t,Pt,!hl),wt(a,0,!0)!==0)break e;a.timeoutHandle=cm(Dh.bind(null,a,l,At,Ac,lu,t,Pt,Wl,Da,hl,u,2,-0,0),c);break e}Dh(a,l,At,Ac,lu,t,Pt,Wl,Da,hl,u,0,-0,0)}}break}while(!0);wn(e)}function Dh(e,t,l,a,c,u,y,v,z,$,P,ae,X,K){if(e.timeoutHandle=-1,ae=t.subtreeFlags,(ae&8192||(ae&16785408)===16785408)&&(ei={stylesheets:null,count:0,unsuspend:My},_h(t),ae=Ty(),ae!==null)){e.cancelPendingCommit=ae(Lh.bind(null,e,t,u,l,a,c,y,v,z,P,1,X,K)),gl(e,u,y,!$);return}Lh(e,t,u,l,a,c,y,v,z)}function Q1(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var c=l[a],u=c.getSnapshot;c=c.value;try{if(!Dt(u(),c))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gl(e,t,l,a){t&=~nu,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var c=t;0<c;){var u=31-We(c),y=1<<u;a[u]=-1,c&=~y}l!==0&&Di(e,l,t)}function Tc(){return(Re&6)===0?(Ks(0),!1):!0}function ru(){if(je!==null){if(De===0)var e=je.return;else e=je,Dn=Gl=null,Eo(e),Ma=null,Bs=0,e=je;for(;e!==null;)dh(e.alternate,e),e=e.return;je=null}}function Ha(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,fy(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ru(),Be=e,je=l=Tn(e.current,null),ze=t,De=0,Ut=null,hl=!1,Ra=Rt(e,t),tu=!1,Da=Pt=nu=Wl=ml=Ge=0,At=Zs=null,lu=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var c=31-We(a),u=1<<c;t|=e[c],a&=~u}return Yn=t,Ii(),l}function Oh(e,t){we=null,S.H=gc,t===As||t===cc?(t=Fd(),De=3):t===Kd?(t=Fd(),De=4):De=t===I0?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,je===null&&(Ge=1,Nc(e,Kt(t,e.current)))}function kh(){var e=S.H;return S.H=gc,e===null?gc:e}function Hh(){var e=S.A;return S.A=X1,e}function ou(){Ge=4,hl||(ze&4194048)!==ze&&It.current!==null||(Ra=!0),(ml&134217727)===0&&(Wl&134217727)===0||Be===null||gl(Be,ze,Pt,!1)}function uu(e,t,l){var a=Re;Re|=2;var c=kh(),u=Hh();(Be!==e||ze!==t)&&(Ac=null,Ha(e,t)),t=!1;var y=Ge;e:do try{if(De!==0&&je!==null){var v=je,z=Ut;switch(De){case 8:ru(),y=6;break e;case 3:case 2:case 9:case 6:It.current===null&&(t=!0);var $=De;if(De=0,Ut=null,Ua(e,v,z,$),l&&Ra){y=0;break e}break;default:$=De,De=0,Ut=null,Ua(e,v,z,$)}}K1(),y=Ge;break}catch(P){Oh(e,P)}while(!0);return t&&e.shellSuspendCounter++,Dn=Gl=null,Re=a,S.H=c,S.A=u,je===null&&(Be=null,ze=0,Ii()),y}function K1(){for(;je!==null;)Uh(je)}function J1(e,t){var l=Re;Re|=2;var a=kh(),c=Hh();Be!==e||ze!==t?(Ac=null,Mc=_e()+500,Ha(e,t)):Ra=Rt(e,t);e:do try{if(De!==0&&je!==null){t=je;var u=Ut;t:switch(De){case 1:De=0,Ut=null,Ua(e,t,u,1);break;case 2:case 9:if(Jd(u)){De=0,Ut=null,Bh(t);break}t=function(){De!==2&&De!==9||Be!==e||(De=7),wn(e)},u.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:Jd(u)?(De=0,Ut=null,Bh(t)):(De=0,Ut=null,Ua(e,t,u,7));break;case 5:var y=null;switch(je.tag){case 26:y=je.memoizedState;case 5:case 27:var v=je;if(!y||bm(y)){De=0,Ut=null;var z=v.sibling;if(z!==null)je=z;else{var $=v.return;$!==null?(je=$,Cc($)):je=null}break t}}De=0,Ut=null,Ua(e,t,u,5);break;case 6:De=0,Ut=null,Ua(e,t,u,6);break;case 8:ru(),Ge=6;break e;default:throw Error(r(462))}}W1();break}catch(P){Oh(e,P)}while(!0);return Dn=Gl=null,S.H=a,S.A=c,Re=l,je!==null?0:(Be=null,ze=0,Ii(),Ge)}function W1(){for(;je!==null&&!Ze();)Uh(je)}function Uh(e){var t=uh(e.alternate,e,Yn);e.memoizedProps=e.pendingProps,t===null?Cc(e):je=t}function Bh(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=ah(l,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=ah(l,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Eo(t);default:dh(l,t),t=je=qd(t,Yn),t=uh(l,t,Yn)}e.memoizedProps=e.pendingProps,t===null?Cc(e):je=t}function Ua(e,t,l,a){Dn=Gl=null,Eo(t),Ma=null,Bs=0;var c=t.return;try{if(q1(e,c,t,l,ze)){Ge=1,Nc(e,Kt(l,e.current)),je=null;return}}catch(u){if(c!==null)throw je=c,u;Ge=1,Nc(e,Kt(l,e.current)),je=null;return}t.flags&32768?(Te||a===1?e=!0:Ra||(ze&536870912)!==0?e=!1:(hl=e=!0,(a===2||a===9||a===3||a===6)&&(a=It.current,a!==null&&a.tag===13&&(a.flags|=16384))),qh(t,e)):Cc(t)}function Cc(e){var t=e;do{if((t.flags&32768)!==0){qh(t,hl);return}e=t.return;var l=Y1(t.alternate,t,Yn);if(l!==null){je=l;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ge===0&&(Ge=5)}function qh(e,t){do{var l=V1(e.alternate,e);if(l!==null){l.flags&=32767,je=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=l}while(e!==null);Ge=6,je=null}function Lh(e,t,l,a,c,u,y,v,z){e.cancelPendingCommit=null;do Rc();while(ot!==0);if((Re&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=Pr,_n(e,l,u,y,v,z),e===Be&&(je=Be=null,ze=0),Oa=t,pl=e,ka=l,su=u,iu=c,Th=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ey(xn,function(){return Xh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=S.T,S.T=null,c=U.p,U.p=2,y=Re,Re|=4;try{$1(e,t,l)}finally{Re=y,U.p=c,S.T=a}}ot=1,Yh(),Vh(),$h()}}function Yh(){if(ot===1){ot=0;var e=pl,t=Oa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=S.T,S.T=null;var a=U.p;U.p=2;var c=Re;Re|=4;try{Sh(t,e);var u=Nu,y=Ad(e.containerInfo),v=u.focusedElem,z=u.selectionRange;if(y!==v&&v&&v.ownerDocument&&Md(v.ownerDocument.documentElement,v)){if(z!==null&&Kr(v)){var $=z.start,P=z.end;if(P===void 0&&(P=$),"selectionStart"in v)v.selectionStart=$,v.selectionEnd=Math.min(P,v.value.length);else{var ae=v.ownerDocument||document,X=ae&&ae.defaultView||window;if(X.getSelection){var K=X.getSelection(),ye=v.textContent.length,xe=Math.min(z.start,ye),He=z.end===void 0?xe:Math.min(z.end,ye);!K.extend&&xe>He&&(y=He,He=xe,xe=y);var B=zd(v,xe),D=zd(v,He);if(B&&D&&(K.rangeCount!==1||K.anchorNode!==B.node||K.anchorOffset!==B.offset||K.focusNode!==D.node||K.focusOffset!==D.offset)){var Y=ae.createRange();Y.setStart(B.node,B.offset),K.removeAllRanges(),xe>He?(K.addRange(Y),K.extend(D.node,D.offset)):(Y.setEnd(D.node,D.offset),K.addRange(Y))}}}}for(ae=[],K=v;K=K.parentNode;)K.nodeType===1&&ae.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<ae.length;v++){var te=ae[v];te.element.scrollLeft=te.left,te.element.scrollTop=te.top}}Gc=!!wu,Nu=wu=null}finally{Re=c,U.p=a,S.T=l}}e.current=t,ot=2}}function Vh(){if(ot===2){ot=0;var e=pl,t=Oa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=S.T,S.T=null;var a=U.p;U.p=2;var c=Re;Re|=4;try{bh(e,t.alternate,t)}finally{Re=c,U.p=a,S.T=l}}ot=3}}function $h(){if(ot===4||ot===3){ot=0,Vt();var e=pl,t=Oa,l=ka,a=Th;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ot=5:(ot=0,Oa=pl=null,Gh(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(xl=null),us(l),t=t.stateNode,Qe&&typeof Qe.onCommitFiberRoot=="function")try{Qe.onCommitFiberRoot(Ct,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=S.T,c=U.p,U.p=2,S.T=null;try{for(var u=e.onRecoverableError,y=0;y<a.length;y++){var v=a[y];u(v.value,{componentStack:v.stack})}}finally{S.T=t,U.p=c}}(ka&3)!==0&&Rc(),wn(e),c=e.pendingLanes,(l&4194090)!==0&&(c&42)!==0?e===cu?Qs++:(Qs=0,cu=e):Qs=0,Ks(0)}}function Gh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zs(t)))}function Rc(e){return Yh(),Vh(),$h(),Xh()}function Xh(){if(ot!==5)return!1;var e=pl,t=su;su=0;var l=us(ka),a=S.T,c=U.p;try{U.p=32>l?32:l,S.T=null,l=iu,iu=null;var u=pl,y=ka;if(ot=0,Oa=pl=null,ka=0,(Re&6)!==0)throw Error(r(331));var v=Re;if(Re|=4,Mh(u.current),Eh(u,u.current,y,l),Re=v,Ks(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot=="function")try{Qe.onPostCommitFiberRoot(Ct,u)}catch{}return!0}finally{U.p=c,S.T=a,Gh(e,t)}}function Zh(e,t,l){t=Kt(l,t),t=qo(e.stateNode,t,2),e=il(e,t,2),e!==null&&(Wn(e,2),wn(e))}function Ue(e,t,l){if(e.tag===3)Zh(e,e,l);else for(;t!==null;){if(t.tag===3){Zh(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(xl===null||!xl.has(a))){e=Kt(l,e),l=W0(2),a=il(t,l,2),a!==null&&(F0(l,a,t,e),Wn(a,2),wn(a));break}}t=t.return}}function fu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Z1;var c=new Set;a.set(t,c)}else c=a.get(t),c===void 0&&(c=new Set,a.set(t,c));c.has(l)||(tu=!0,c.add(l),e=F1.bind(null,e,t,l),t.then(e,e))}function F1(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Be===e&&(ze&l)===l&&(Ge===4||Ge===3&&(ze&62914560)===ze&&300>_e()-au?(Re&2)===0&&Ha(e,0):nu|=l,Da===ze&&(Da=0)),wn(e)}function Qh(e,t){t===0&&(t=Jn()),e=ya(e,t),e!==null&&(Wn(e,t),wn(e))}function I1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Qh(e,l)}function P1(e,t){var l=0;switch(e.tag){case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(l=c.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Qh(e,l)}function ey(e,t){return bt(e,t)}var Dc=null,Ba=null,du=!1,Oc=!1,hu=!1,Fl=0;function wn(e){e!==Ba&&e.next===null&&(Ba===null?Dc=Ba=e:Ba=Ba.next=e),Oc=!0,du||(du=!0,ny())}function Ks(e,t){if(!hu&&Oc){hu=!0;do for(var l=!1,a=Dc;a!==null;){if(e!==0){var c=a.pendingLanes;if(c===0)var u=0;else{var y=a.suspendedLanes,v=a.pingedLanes;u=(1<<31-We(42|e)+1)-1,u&=c&~(y&~v),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Fh(a,u))}else u=ze,u=wt(a,a===Be?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Rt(a,u)||(l=!0,Fh(a,u));a=a.next}while(l);hu=!1}}function ty(){Kh()}function Kh(){Oc=du=!1;var e=0;Fl!==0&&(uy()&&(e=Fl),Fl=0);for(var t=_e(),l=null,a=Dc;a!==null;){var c=a.next,u=Jh(a,t);u===0?(a.next=null,l===null?Dc=c:l.next=c,c===null&&(Ba=l)):(l=a,(e!==0||(u&3)!==0)&&(Oc=!0)),a=c}Ks(e)}function Jh(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,c=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-We(u),v=1<<y,z=c[y];z===-1?((v&l)===0||(v&a)!==0)&&(c[y]=rs(v,t)):z<=t&&(e.expiredLanes|=v),u&=~v}if(t=Be,l=ze,l=wt(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ht(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Rt(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&ht(a),us(l)){case 2:case 8:l=mn;break;case 32:l=xn;break;case 268435456:l=En;break;default:l=xn}return a=Wh.bind(null,e),l=bt(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&ht(a),e.callbackPriority=2,e.callbackNode=null,2}function Wh(e,t){if(ot!==0&&ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Rc()&&e.callbackNode!==l)return null;var a=ze;return a=wt(e,e===Be?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Rh(e,a,t),Jh(e,_e()),e.callbackNode!=null&&e.callbackNode===l?Wh.bind(null,e):null)}function Fh(e,t){if(Rc())return null;Rh(e,t,!0)}function ny(){dy(function(){(Re&6)!==0?bt(mt,ty):Kh()})}function mu(){return Fl===0&&(Fl=ia()),Fl}function Ih(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Xi(""+e)}function Ph(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function ly(e,t,l,a,c){if(t==="submit"&&l&&l.stateNode===c){var u=Ih((c[xt]||null).action),y=a.submitter;y&&(t=(t=y[xt]||null)?Ih(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var v=new Ji("action","action",null,a,c);e.push({event:v,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Fl!==0){var z=y?Ph(c,y):new FormData(c);Oo(l,{pending:!0,data:z,method:c.method,action:u},null,z)}}else typeof u=="function"&&(v.preventDefault(),z=y?Ph(c,y):new FormData(c),Oo(l,{pending:!0,data:z,method:c.method,action:u},u,z))},currentTarget:c}]})}}for(var xu=0;xu<Ir.length;xu++){var pu=Ir[xu],ay=pu.toLowerCase(),sy=pu[0].toUpperCase()+pu.slice(1);sn(ay,"on"+sy)}sn(Rd,"onAnimationEnd"),sn(Dd,"onAnimationIteration"),sn(Od,"onAnimationStart"),sn("dblclick","onDoubleClick"),sn("focusin","onFocus"),sn("focusout","onBlur"),sn(N1,"onTransitionRun"),sn(S1,"onTransitionStart"),sn(j1,"onTransitionCancel"),sn(kd,"onTransitionEnd"),el("onMouseEnter",["mouseout","mouseover"]),el("onMouseLeave",["mouseout","mouseover"]),el("onPointerEnter",["pointerout","pointerover"]),el("onPointerLeave",["pointerout","pointerover"]),Mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Js="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(" "),iy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Js));function em(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],c=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var y=a.length-1;0<=y;y--){var v=a[y],z=v.instance,$=v.currentTarget;if(v=v.listener,z!==u&&c.isPropagationStopped())break e;u=v,c.currentTarget=$;try{u(c)}catch(P){wc(P)}c.currentTarget=null,u=z}else for(y=0;y<a.length;y++){if(v=a[y],z=v.instance,$=v.currentTarget,v=v.listener,z!==u&&c.isPropagationStopped())break e;u=v,c.currentTarget=$;try{u(c)}catch(P){wc(P)}c.currentTarget=null,u=z}}}}function Ee(e,t){var l=t[fs];l===void 0&&(l=t[fs]=new Set);var a=e+"__bubble";l.has(a)||(tm(t,e,2,!1),l.add(a))}function gu(e,t,l){var a=0;t&&(a|=4),tm(l,e,a,t)}var kc="_reactListening"+Math.random().toString(36).slice(2);function yu(e){if(!e[kc]){e[kc]=!0,Ui.forEach(function(l){l!=="selectionchange"&&(iy.has(l)||gu(l,!1,e),gu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kc]||(t[kc]=!0,gu("selectionchange",!1,t))}}function tm(e,t,l,a){switch(Em(t)){case 2:var c=Dy;break;case 8:c=Oy;break;default:c=Ru}l=c.bind(null,t,l,e),c=void 0,!qr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),a?c!==void 0?e.addEventListener(t,l,{capture:!0,passive:c}):e.addEventListener(t,l,!0):c!==void 0?e.addEventListener(t,l,{passive:c}):e.addEventListener(t,l,!1)}function bu(e,t,l,a,c){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var y=a.tag;if(y===3||y===4){var v=a.stateNode.containerInfo;if(v===c)break;if(y===4)for(y=a.return;y!==null;){var z=y.tag;if((z===3||z===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;v!==null;){if(y=zn(v),y===null)return;if(z=y.tag,z===5||z===6||z===26||z===27){a=u=y;continue e}v=v.parentNode}}a=a.return}rd(function(){var $=u,P=Ur(l),ae=[];e:{var X=Hd.get(e);if(X!==void 0){var K=Ji,ye=e;switch(e){case"keypress":if(Qi(l)===0)break e;case"keydown":case"keyup":K=e1;break;case"focusin":ye="focus",K=$r;break;case"focusout":ye="blur",K=$r;break;case"beforeblur":case"afterblur":K=$r;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=fd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Vg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=l1;break;case Rd:case Dd:case Od:K=Xg;break;case kd:K=s1;break;case"scroll":case"scrollend":K=Lg;break;case"wheel":K=c1;break;case"copy":case"cut":case"paste":K=Qg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=hd;break;case"toggle":case"beforetoggle":K=o1}var xe=(t&4)!==0,He=!xe&&(e==="scroll"||e==="scrollend"),B=xe?X!==null?X+"Capture":null:X;xe=[];for(var D=$,Y;D!==null;){var te=D;if(Y=te.stateNode,te=te.tag,te!==5&&te!==26&&te!==27||Y===null||B===null||(te=ms(D,B),te!=null&&xe.push(Ws(D,te,Y))),He)break;D=D.return}0<xe.length&&(X=new K(X,ye,null,l,P),ae.push({event:X,listeners:xe}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",X&&l!==Hr&&(ye=l.relatedTarget||l.fromElement)&&(zn(ye)||ye[Fn]))break e;if((K||X)&&(X=P.window===P?P:(X=P.ownerDocument)?X.defaultView||X.parentWindow:window,K?(ye=l.relatedTarget||l.toElement,K=$,ye=ye?zn(ye):null,ye!==null&&(He=d(ye),xe=ye.tag,ye!==He||xe!==5&&xe!==27&&xe!==6)&&(ye=null)):(K=null,ye=$),K!==ye)){if(xe=fd,te="onMouseLeave",B="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(xe=hd,te="onPointerLeave",B="onPointerEnter",D="pointer"),He=K==null?X:Ol(K),Y=ye==null?X:Ol(ye),X=new xe(te,D+"leave",K,l,P),X.target=He,X.relatedTarget=Y,te=null,zn(P)===$&&(xe=new xe(B,D+"enter",ye,l,P),xe.target=Y,xe.relatedTarget=He,te=xe),He=te,K&&ye)t:{for(xe=K,B=ye,D=0,Y=xe;Y;Y=qa(Y))D++;for(Y=0,te=B;te;te=qa(te))Y++;for(;0<D-Y;)xe=qa(xe),D--;for(;0<Y-D;)B=qa(B),Y--;for(;D--;){if(xe===B||B!==null&&xe===B.alternate)break t;xe=qa(xe),B=qa(B)}xe=null}else xe=null;K!==null&&nm(ae,X,K,xe,!1),ye!==null&&He!==null&&nm(ae,He,ye,xe,!0)}}e:{if(X=$?Ol($):window,K=X.nodeName&&X.nodeName.toLowerCase(),K==="select"||K==="input"&&X.type==="file")var ue=wd;else if(bd(X))if(Nd)ue=b1;else{ue=g1;var Ne=p1}else K=X.nodeName,!K||K.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?$&&kr($.elementType)&&(ue=wd):ue=y1;if(ue&&(ue=ue(e,$))){vd(ae,ue,l,P);break e}Ne&&Ne(e,X,$),e==="focusout"&&$&&X.type==="number"&&$.memoizedProps.value!=null&&Or(X,"number",X.value)}switch(Ne=$?Ol($):window,e){case"focusin":(bd(Ne)||Ne.contentEditable==="true")&&(xa=Ne,Jr=$,Ns=null);break;case"focusout":Ns=Jr=xa=null;break;case"mousedown":Wr=!0;break;case"contextmenu":case"mouseup":case"dragend":Wr=!1,Td(ae,l,P);break;case"selectionchange":if(w1)break;case"keydown":case"keyup":Td(ae,l,P)}var fe;if(Xr)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else ma?gd(e,l)&&(pe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(pe="onCompositionStart");pe&&(md&&l.locale!=="ko"&&(ma||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&ma&&(fe=od()):(nl=P,Lr="value"in nl?nl.value:nl.textContent,ma=!0)),Ne=Hc($,pe),0<Ne.length&&(pe=new dd(pe,e,null,l,P),ae.push({event:pe,listeners:Ne}),fe?pe.data=fe:(fe=yd(l),fe!==null&&(pe.data=fe)))),(fe=f1?d1(e,l):h1(e,l))&&(pe=Hc($,"onBeforeInput"),0<pe.length&&(Ne=new dd("onBeforeInput","beforeinput",null,l,P),ae.push({event:Ne,listeners:pe}),Ne.data=fe)),ly(ae,e,$,l,P)}em(ae,t)})}function Ws(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Hc(e,t){for(var l=t+"Capture",a=[];e!==null;){var c=e,u=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||u===null||(c=ms(e,l),c!=null&&a.unshift(Ws(e,c,u)),c=ms(e,t),c!=null&&a.push(Ws(e,c,u))),e.tag===3)return a;e=e.return}return[]}function qa(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function nm(e,t,l,a,c){for(var u=t._reactName,y=[];l!==null&&l!==a;){var v=l,z=v.alternate,$=v.stateNode;if(v=v.tag,z!==null&&z===a)break;v!==5&&v!==26&&v!==27||$===null||(z=$,c?($=ms(l,u),$!=null&&y.unshift(Ws(l,$,z))):c||($=ms(l,u),$!=null&&y.push(Ws(l,$,z)))),l=l.return}y.length!==0&&e.push({event:t,listeners:y})}var cy=/\r\n?/g,ry=/\u0000|\uFFFD/g;function lm(e){return(typeof e=="string"?e:""+e).replace(cy,`
49
- `).replace(ry,"")}function am(e,t){return t=lm(t),lm(e)===t}function Uc(){}function ke(e,t,l,a,c,u){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||fa(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&fa(e,""+a);break;case"className":ra(e,"class",a);break;case"tabIndex":ra(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ra(e,l,a);break;case"style":id(e,a,u);break;case"data":if(t!=="object"){ra(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Xi(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(l==="formAction"?(t!=="input"&&ke(e,t,"name",c.name,c,null),ke(e,t,"formEncType",c.formEncType,c,null),ke(e,t,"formMethod",c.formMethod,c,null),ke(e,t,"formTarget",c.formTarget,c,null)):(ke(e,t,"encType",c.encType,c,null),ke(e,t,"method",c.method,c,null),ke(e,t,"target",c.target,c,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Xi(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Uc);break;case"onScroll":a!=null&&Ee("scroll",e);break;case"onScrollEnd":a!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Xi(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),ca(e,"popover",a);break;case"xlinkActuate":an(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":an(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":an(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":an(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":an(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":an(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":an(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":an(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":an(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ca(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Bg.get(l)||l,ca(e,l,a))}}function vu(e,t,l,a,c,u){switch(l){case"style":id(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?fa(e,a):(typeof a=="number"||typeof a=="bigint")&&fa(e,""+a);break;case"onScroll":a!=null&&Ee("scroll",e);break;case"onScrollEnd":a!=null&&Ee("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Uc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bi.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(c=l.endsWith("Capture"),t=l.slice(2,c?l.length-7:void 0),u=e[xt]||null,u=u!=null?u[l]:null,typeof u=="function"&&e.removeEventListener(t,u,c),typeof a=="function")){typeof u!="function"&&u!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,c);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):ca(e,l,a)}}}function ut(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var a=!1,c=!1,u;for(u in l)if(l.hasOwnProperty(u)){var y=l[u];if(y!=null)switch(u){case"src":a=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ke(e,t,u,y,l,null)}}c&&ke(e,t,"srcSet",l.srcSet,l,null),a&&ke(e,t,"src",l.src,l,null);return;case"input":Ee("invalid",e);var v=u=y=c=null,z=null,$=null;for(a in l)if(l.hasOwnProperty(a)){var P=l[a];if(P!=null)switch(a){case"name":c=P;break;case"type":y=P;break;case"checked":z=P;break;case"defaultChecked":$=P;break;case"value":u=P;break;case"defaultValue":v=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(137,t));break;default:ke(e,t,a,P,l,null)}}nd(e,u,v,z,$,y,c,!1),$i(e);return;case"select":Ee("invalid",e),a=y=u=null;for(c in l)if(l.hasOwnProperty(c)&&(v=l[c],v!=null))switch(c){case"value":u=v;break;case"defaultValue":y=v;break;case"multiple":a=v;default:ke(e,t,c,v,l,null)}t=u,l=y,e.multiple=!!a,t!=null?ua(e,!!a,t,!1):l!=null&&ua(e,!!a,l,!0);return;case"textarea":Ee("invalid",e),u=c=a=null;for(y in l)if(l.hasOwnProperty(y)&&(v=l[y],v!=null))switch(y){case"value":a=v;break;case"defaultValue":c=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:ke(e,t,y,v,l,null)}ad(e,a,c,u),$i(e);return;case"option":for(z in l)if(l.hasOwnProperty(z)&&(a=l[z],a!=null))switch(z){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ke(e,t,z,a,l,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(a=0;a<Js.length;a++)Ee(Js[a],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("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($ in l)if(l.hasOwnProperty($)&&(a=l[$],a!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ke(e,t,$,a,l,null)}return;default:if(kr(t)){for(P in l)l.hasOwnProperty(P)&&(a=l[P],a!==void 0&&vu(e,t,P,a,l,void 0));return}}for(v in l)l.hasOwnProperty(v)&&(a=l[v],a!=null&&ke(e,t,v,a,l,null))}function oy(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,u=null,y=null,v=null,z=null,$=null,P=null;for(K in l){var ae=l[K];if(l.hasOwnProperty(K)&&ae!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":z=ae;default:a.hasOwnProperty(K)||ke(e,t,K,null,a,ae)}}for(var X in a){var K=a[X];if(ae=l[X],a.hasOwnProperty(X)&&(K!=null||ae!=null))switch(X){case"type":u=K;break;case"name":c=K;break;case"checked":$=K;break;case"defaultChecked":P=K;break;case"value":y=K;break;case"defaultValue":v=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(137,t));break;default:K!==ae&&ke(e,t,X,K,a,ae)}}Dr(e,y,v,z,$,P,u,c);return;case"select":K=y=v=X=null;for(u in l)if(z=l[u],l.hasOwnProperty(u)&&z!=null)switch(u){case"value":break;case"multiple":K=z;default:a.hasOwnProperty(u)||ke(e,t,u,null,a,z)}for(c in a)if(u=a[c],z=l[c],a.hasOwnProperty(c)&&(u!=null||z!=null))switch(c){case"value":X=u;break;case"defaultValue":v=u;break;case"multiple":y=u;default:u!==z&&ke(e,t,c,u,a,z)}t=v,l=y,a=K,X!=null?ua(e,!!l,X,!1):!!a!=!!l&&(t!=null?ua(e,!!l,t,!0):ua(e,!!l,l?[]:"",!1));return;case"textarea":K=X=null;for(v in l)if(c=l[v],l.hasOwnProperty(v)&&c!=null&&!a.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:ke(e,t,v,null,a,c)}for(y in a)if(c=a[y],u=l[y],a.hasOwnProperty(y)&&(c!=null||u!=null))switch(y){case"value":X=c;break;case"defaultValue":K=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==u&&ke(e,t,y,c,a,u)}ld(e,X,K);return;case"option":for(var ye in l)if(X=l[ye],l.hasOwnProperty(ye)&&X!=null&&!a.hasOwnProperty(ye))switch(ye){case"selected":e.selected=!1;break;default:ke(e,t,ye,null,a,X)}for(z in a)if(X=a[z],K=l[z],a.hasOwnProperty(z)&&X!==K&&(X!=null||K!=null))switch(z){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:ke(e,t,z,X,a,K)}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 xe in l)X=l[xe],l.hasOwnProperty(xe)&&X!=null&&!a.hasOwnProperty(xe)&&ke(e,t,xe,null,a,X);for($ in a)if(X=a[$],K=l[$],a.hasOwnProperty($)&&X!==K&&(X!=null||K!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,t));break;default:ke(e,t,$,X,a,K)}return;default:if(kr(t)){for(var He in l)X=l[He],l.hasOwnProperty(He)&&X!==void 0&&!a.hasOwnProperty(He)&&vu(e,t,He,void 0,a,X);for(P in a)X=a[P],K=l[P],!a.hasOwnProperty(P)||X===K||X===void 0&&K===void 0||vu(e,t,P,X,a,K);return}}for(var B in l)X=l[B],l.hasOwnProperty(B)&&X!=null&&!a.hasOwnProperty(B)&&ke(e,t,B,null,a,X);for(ae in a)X=a[ae],K=l[ae],!a.hasOwnProperty(ae)||X===K||X==null&&K==null||ke(e,t,ae,X,a,K)}var wu=null,Nu=null;function Bc(e){return e.nodeType===9?e:e.ownerDocument}function sm(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 im(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Su(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ju=null;function uy(){var e=window.event;return e&&e.type==="popstate"?e===ju?!1:(ju=e,!0):(ju=null,!1)}var cm=typeof setTimeout=="function"?setTimeout:void 0,fy=typeof clearTimeout=="function"?clearTimeout:void 0,rm=typeof Promise=="function"?Promise:void 0,dy=typeof queueMicrotask=="function"?queueMicrotask:typeof rm<"u"?function(e){return rm.resolve(null).then(e).catch(hy)}:cm;function hy(e){setTimeout(function(){throw e})}function yl(e){return e==="head"}function om(e,t){var l=t,a=0,c=0;do{var u=l.nextSibling;if(e.removeChild(l),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(0<a&&8>a){l=a;var y=e.ownerDocument;if(l&1&&Fs(y.documentElement),l&2&&Fs(y.body),l&4)for(l=y.head,Fs(l),y=l.firstChild;y;){var v=y.nextSibling,z=y.nodeName;y[Dl]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&y.rel.toLowerCase()==="stylesheet"||l.removeChild(y),y=v}}if(c===0){e.removeChild(u),si(t);return}c--}else l==="$"||l==="$?"||l==="$!"?c++:a=l.charCodeAt(0)-48;else a=0;l=u}while(l);si(t)}function Eu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Eu(l),ds(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function my(e,t,l,a){for(;e.nodeType===1;){var c=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Dl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=rn(e.nextSibling),e===null)break}return null}function xy(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=rn(e.nextSibling),e===null))return null;return e}function _u(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function py(e,t){var l=e.ownerDocument;if(e.data!=="$?"||l.readyState==="complete")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function rn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var zu=null;function um(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"){if(t===0)return e;t--}else l==="/$"&&t++}e=e.previousSibling}return null}function fm(e,t,l){switch(t=Bc(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Fs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ds(e)}var en=new Map,dm=new Set;function qc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Vn=U.d;U.d={f:gy,r:yy,D:by,C:vy,L:wy,m:Ny,X:jy,S:Sy,M:Ey};function gy(){var e=Vn.f(),t=Tc();return e||t}function yy(e){var t=In(e);t!==null&&t.tag===5&&t.type==="form"?R0(t):Vn.r(e)}var La=typeof document>"u"?null:document;function hm(e,t,l){var a=La;if(a&&typeof t=="string"&&t){var c=Qt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof l=="string"&&(c+='[crossorigin="'+l+'"]'),dm.has(c)||(dm.add(c),e={rel:e,crossOrigin:l,href:t},a.querySelector(c)===null&&(t=a.createElement("link"),ut(t,"link",e),Fe(t),a.head.appendChild(t)))}}function by(e){Vn.D(e),hm("dns-prefetch",e,null)}function vy(e,t){Vn.C(e,t),hm("preconnect",e,t)}function wy(e,t,l){Vn.L(e,t,l);var a=La;if(a&&e&&t){var c='link[rel="preload"][as="'+Qt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(c+='[imagesrcset="'+Qt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(c+='[imagesizes="'+Qt(l.imageSizes)+'"]')):c+='[href="'+Qt(e)+'"]';var u=c;switch(t){case"style":u=Ya(e);break;case"script":u=Va(e)}en.has(u)||(e=g({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),en.set(u,e),a.querySelector(c)!==null||t==="style"&&a.querySelector(Is(u))||t==="script"&&a.querySelector(Ps(u))||(t=a.createElement("link"),ut(t,"link",e),Fe(t),a.head.appendChild(t)))}}function Ny(e,t){Vn.m(e,t);var l=La;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Qt(a)+'"][href="'+Qt(e)+'"]',u=c;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Va(e)}if(!en.has(u)&&(e=g({rel:"modulepreload",href:e},t),en.set(u,e),l.querySelector(c)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ps(u)))return}a=l.createElement("link"),ut(a,"link",e),Fe(a),l.head.appendChild(a)}}}function Sy(e,t,l){Vn.S(e,t,l);var a=La;if(a&&e){var c=Pn(a).hoistableStyles,u=Ya(e);t=t||"default";var y=c.get(u);if(!y){var v={loading:0,preload:null};if(y=a.querySelector(Is(u)))v.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},l),(l=en.get(u))&&Mu(e,l);var z=y=a.createElement("link");Fe(z),ut(z,"link",e),z._p=new Promise(function($,P){z.onload=$,z.onerror=P}),z.addEventListener("load",function(){v.loading|=1}),z.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Lc(y,t,a)}y={type:"stylesheet",instance:y,count:1,state:v},c.set(u,y)}}}function jy(e,t){Vn.X(e,t);var l=La;if(l&&e){var a=Pn(l).hoistableScripts,c=Va(e),u=a.get(c);u||(u=l.querySelector(Ps(c)),u||(e=g({src:e,async:!0},t),(t=en.get(c))&&Au(e,t),u=l.createElement("script"),Fe(u),ut(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(c,u))}}function Ey(e,t){Vn.M(e,t);var l=La;if(l&&e){var a=Pn(l).hoistableScripts,c=Va(e),u=a.get(c);u||(u=l.querySelector(Ps(c)),u||(e=g({src:e,async:!0,type:"module"},t),(t=en.get(c))&&Au(e,t),u=l.createElement("script"),Fe(u),ut(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(c,u))}}function mm(e,t,l,a){var c=(c=re.current)?qc(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ya(l.href),l=Pn(c).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ya(l.href);var u=Pn(c).hoistableStyles,y=u.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,y),(u=c.querySelector(Is(e)))&&!u._p&&(y.instance=u,y.state.loading=5),en.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},en.set(e,l),u||_y(c,e,l,y.state))),t&&a===null)throw Error(r(528,""));return y}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Va(l),l=Pn(c).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ya(e){return'href="'+Qt(e)+'"'}function Is(e){return'link[rel="stylesheet"]['+e+"]"}function xm(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function _y(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),ut(t,"link",l),Fe(t),e.head.appendChild(t))}function Va(e){return'[src="'+Qt(e)+'"]'}function Ps(e){return"script[async]"+e}function pm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Qt(l.href)+'"]');if(a)return t.instance=a,Fe(a),a;var c=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Fe(a),ut(a,"style",c),Lc(a,l.precedence,e),t.instance=a;case"stylesheet":c=Ya(l.href);var u=e.querySelector(Is(c));if(u)return t.state.loading|=4,t.instance=u,Fe(u),u;a=xm(l),(c=en.get(c))&&Mu(a,c),u=(e.ownerDocument||e).createElement("link"),Fe(u);var y=u;return y._p=new Promise(function(v,z){y.onload=v,y.onerror=z}),ut(u,"link",a),t.state.loading|=4,Lc(u,l.precedence,e),t.instance=u;case"script":return u=Va(l.src),(c=e.querySelector(Ps(u)))?(t.instance=c,Fe(c),c):(a=l,(c=en.get(u))&&(a=g({},l),Au(a,c)),e=e.ownerDocument||e,c=e.createElement("script"),Fe(c),ut(c,"link",a),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Lc(a,l.precedence,e));return t.instance}function Lc(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=a.length?a[a.length-1]:null,u=c,y=0;y<a.length;y++){var v=a[y];if(v.dataset.precedence===t)u=v;else if(u!==c)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Mu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Au(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Yc=null;function gm(e,t,l){if(Yc===null){var a=new Map,c=Yc=new Map;c.set(l,a)}else c=Yc,a=c.get(l),a||(a=new Map,c.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),c=0;c<l.length;c++){var u=l[c];if(!(u[Dl]||u[lt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(t)||"";y=e+y;var v=a.get(y);v?v.push(u):a.set(y,[u])}}return a}function ym(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function zy(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function bm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var ei=null;function My(){}function Ay(e,t,l){if(ei===null)throw Error(r(475));var a=ei;if(t.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Ya(l.href),u=e.querySelector(Is(c));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=Vc.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=u,Fe(u);return}u=e.ownerDocument||e,l=xm(l),(c=en.get(c))&&Mu(l,c),u=u.createElement("link"),Fe(u);var y=u;y._p=new Promise(function(v,z){y.onload=v,y.onerror=z}),ut(u,"link",l),t.instance=u}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(a.count++,t=Vc.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function Ty(){if(ei===null)throw Error(r(475));var e=ei;return e.stylesheets&&e.count===0&&Tu(e,e.stylesheets),0<e.count?function(t){var l=setTimeout(function(){if(e.stylesheets&&Tu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(l)}}:null}function Vc(){if(this.count--,this.count===0){if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $c=null;function Tu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$c=new Map,t.forEach(Cy,e),$c=null,Vc.call(e))}function Cy(e,t){if(!(t.state.loading&4)){var l=$c.get(e);if(l)var a=l.get(null);else{l=new Map,$c.set(e,l);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<c.length;u++){var y=c[u];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),a=y)}a&&l.set(null,a)}c=t.instance,y=c.getAttribute("data-precedence"),u=l.get(y)||a,u===a&&l.set(null,c),l.set(y,c),this.count++,a=Vc.bind(this),c.addEventListener("load",a),c.addEventListener("error",a),u?u.parentNode.insertBefore(c,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var ti={$$typeof:V,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function Ry(e,t,l,a,c,u,y,v){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=Rl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rl(0),this.hiddenUpdates=Rl(null),this.identifierPrefix=a,this.onUncaughtError=c,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function vm(e,t,l,a,c,u,y,v,z,$,P,ae){return e=new Ry(e,t,l,y,v,z,$,ae),t=1,u===!0&&(t|=24),u=Ot(3,null,null,t),e.current=u,u.stateNode=e,t=uo(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:l,cache:t},xo(u),e}function wm(e){return e?(e=ba,e):ba}function Nm(e,t,l,a,c,u){c=wm(c),a.context===null?a.context=c:a.pendingContext=c,a=sl(t),a.payload={element:l},u=u===void 0?null:u,u!==null&&(a.callback=u),l=il(e,a,t),l!==null&&(qt(l,e,t),Cs(l,e,t))}function Sm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Cu(e,t){Sm(e,t),(e=e.alternate)&&Sm(e,t)}function jm(e){if(e.tag===13){var t=ya(e,67108864);t!==null&&qt(t,e,67108864),Cu(e,67108864)}}var Gc=!0;function Dy(e,t,l,a){var c=S.T;S.T=null;var u=U.p;try{U.p=2,Ru(e,t,l,a)}finally{U.p=u,S.T=c}}function Oy(e,t,l,a){var c=S.T;S.T=null;var u=U.p;try{U.p=8,Ru(e,t,l,a)}finally{U.p=u,S.T=c}}function Ru(e,t,l,a){if(Gc){var c=Du(a);if(c===null)bu(e,t,a,Xc,l),_m(e,a);else if(Hy(c,e,t,l,a))a.stopPropagation();else if(_m(e,a),t&4&&-1<ky.indexOf(e)){for(;c!==null;){var u=In(c);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=Et(u.pendingLanes);if(y!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;y;){var z=1<<31-We(y);v.entanglements[1]|=z,y&=~z}wn(u),(Re&6)===0&&(Mc=_e()+500,Ks(0))}}break;case 13:v=ya(u,2),v!==null&&qt(v,u,2),Tc(),Cu(u,2)}if(u=Du(a),u===null&&bu(e,t,a,Xc,l),u===c)break;c=u}c!==null&&a.stopPropagation()}else bu(e,t,a,null,l)}}function Du(e){return e=Ur(e),Ou(e)}var Xc=null;function Ou(e){if(Xc=null,e=zn(e),e!==null){var t=d(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Xc=e,null}function Em(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(he()){case mt:return 2;case mn:return 8;case xn:case Qn:return 32;case En:return 268435456;default:return 32}default:return 32}}var ku=!1,bl=null,vl=null,wl=null,ni=new Map,li=new Map,Nl=[],ky="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 _m(e,t){switch(e){case"focusin":case"focusout":bl=null;break;case"dragenter":case"dragleave":vl=null;break;case"mouseover":case"mouseout":wl=null;break;case"pointerover":case"pointerout":ni.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":li.delete(t.pointerId)}}function ai(e,t,l,a,c,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:u,targetContainers:[c]},t!==null&&(t=In(t),t!==null&&jm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Hy(e,t,l,a,c){switch(t){case"focusin":return bl=ai(bl,e,t,l,a,c),!0;case"dragenter":return vl=ai(vl,e,t,l,a,c),!0;case"mouseover":return wl=ai(wl,e,t,l,a,c),!0;case"pointerover":var u=c.pointerId;return ni.set(u,ai(ni.get(u)||null,e,t,l,a,c)),!0;case"gotpointercapture":return u=c.pointerId,li.set(u,ai(li.get(u)||null,e,t,l,a,c)),!0}return!1}function zm(e){var t=zn(e.target);if(t!==null){var l=d(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,Ar(e.priority,function(){if(l.tag===13){var a=Bt();a=os(a);var c=ya(l,a);c!==null&&qt(c,l,a),Cu(l,a)}});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Du(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Hr=a,l.target.dispatchEvent(a),Hr=null}else return t=In(l),t!==null&&jm(t),e.blockedOn=l,!1;t.shift()}return!0}function Mm(e,t,l){Zc(e)&&l.delete(t)}function Uy(){ku=!1,bl!==null&&Zc(bl)&&(bl=null),vl!==null&&Zc(vl)&&(vl=null),wl!==null&&Zc(wl)&&(wl=null),ni.forEach(Mm),li.forEach(Mm)}function Qc(e,t){e.blockedOn===t&&(e.blockedOn=null,ku||(ku=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Uy)))}var Kc=null;function Am(e){Kc!==e&&(Kc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Kc===e&&(Kc=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],c=e[t+2];if(typeof a!="function"){if(Ou(a||l)===null)continue;break}var u=In(l);u!==null&&(e.splice(t,3),t-=3,Oo(u,{pending:!0,data:c,method:l.method,action:a},a,c))}}))}function si(e){function t(z){return Qc(z,e)}bl!==null&&Qc(bl,e),vl!==null&&Qc(vl,e),wl!==null&&Qc(wl,e),ni.forEach(t),li.forEach(t);for(var l=0;l<Nl.length;l++){var a=Nl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Nl.length&&(l=Nl[0],l.blockedOn===null);)zm(l),l.blockedOn===null&&Nl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var c=l[a],u=l[a+1],y=c[xt]||null;if(typeof u=="function")y||Am(l);else if(y){var v=null;if(u&&u.hasAttribute("formAction")){if(c=u,y=u[xt]||null)v=y.formAction;else if(Ou(c)!==null)continue}else v=y.action;typeof v=="function"?l[a+1]=v:(l.splice(a,3),a-=3),Am(l)}}}function Hu(e){this._internalRoot=e}Jc.prototype.render=Hu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Bt();Nm(l,a,e,t,null,null)},Jc.prototype.unmount=Hu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nm(e.current,2,null,e,null,null),Tc(),t[Fn]=null}};function Jc(e){this._internalRoot=e}Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=ki();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Nl.length&&t!==0&&t<Nl[l].priority;l++);Nl.splice(l,0,e),l===0&&zm(e)}};var Tm=s.version;if(Tm!=="19.1.1")throw Error(r(527,Tm,"19.1.1"));U.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var By={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:S,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wc.isDisabled&&Wc.supportsFiber)try{Ct=Wc.inject(By),Qe=Wc}catch{}}return ci.createRoot=function(e,t){if(!f(e))throw Error(r(299));var l=!1,a="",c=Z0,u=Q0,y=K0,v=null;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(v=t.unstable_transitionCallbacks)),t=vm(e,1,!1,null,null,l,a,c,u,y,v,null),e[Fn]=t.current,yu(e),new Hu(t)},ci.hydrateRoot=function(e,t,l){if(!f(e))throw Error(r(299));var a=!1,c="",u=Z0,y=Q0,v=K0,z=null,$=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(c=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(v=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(z=l.unstable_transitionCallbacks),l.formState!==void 0&&($=l.formState)),t=vm(e,1,!0,t,l??null,a,c,u,y,v,z,$),t.context=wm(null),l=t.current,a=Bt(),a=os(a),c=sl(a),c.callback=null,il(l,c,a),l=a,t.current.lanes=l,Wn(t,l),wn(t),e[Fn]=t.current,yu(e),new Jc(t)},ci.version="19.1.1",ci}var Lm;function Qy(){if(Lm)return qu.exports;Lm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),qu.exports=Zy(),qu.exports}var Ky=Qy();/**
50
- * @license lucide-react v1.33.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 Px=(...n)=>n.filter((s,i,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===i).join(" ").trim();/**
55
- * @license lucide-react v1.33.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 Jy=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
60
- * @license lucide-react v1.33.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 Wy=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,i,r)=>r?r.toUpperCase():i.toLowerCase());/**
65
- * @license lucide-react v1.33.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 Ym=n=>{const s=Wy(n);return s.charAt(0).toUpperCase()+s.slice(1)};/**
70
- * @license lucide-react v1.33.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 $u={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 v1.33.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 Fy=n=>{for(const s in n)if(s.startsWith("aria-")||s==="role"||s==="title")return!0;return!1},Iy=_.createContext({}),Py=()=>_.useContext(Iy),eb=_.forwardRef(({color:n,size:s,strokeWidth:i,absoluteStrokeWidth:r,className:f="",children:d,iconNode:h,...x},p)=>{const{size:m=24,strokeWidth:g=2,absoluteStrokeWidth:b=!1,color:w="currentColor",className:j=""}=Py()??{},T=r??b?Number(i??g)*24/Number(s??m):i??g;return _.createElement("svg",{ref:p,...$u,width:s??m??$u.width,height:s??m??$u.height,stroke:n??w,strokeWidth:T,className:Px("lucide",j,f),...!d&&!Fy(x)&&{"aria-hidden":"true"},...x},[...h.map(([M,A])=>_.createElement(M,A)),...Array.isArray(d)?d:[d]])});/**
80
- * @license lucide-react v1.33.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 ge=(n,s)=>{const i=_.forwardRef(({className:r,...f},d)=>_.createElement(eb,{ref:d,iconNode:s,className:Px(`lucide-${Jy(Ym(n))}`,`lucide-${n}`,r),...f}));return i.displayName=Ym(n),i};/**
85
- * @license lucide-react v1.33.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 tb=[["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"}]],ep=ge("activity",tb);/**
90
- * @license lucide-react v1.33.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 nb=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Vm=ge("arrow-left",nb);/**
95
- * @license lucide-react v1.33.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 lb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],yi=ge("arrow-right",lb);/**
100
- * @license lucide-react v1.33.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 ab=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],tp=ge("bell",ab);/**
105
- * @license lucide-react v1.33.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 sb=[["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"}]],$m=ge("brain",sb);/**
110
- * @license lucide-react v1.33.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 ib=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fn=ge("check",ib);/**
115
- * @license lucide-react v1.33.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 cb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Mi=ge("chevron-down",cb);/**
120
- * @license lucide-react v1.33.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 rb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],cs=ge("chevron-right",rb);/**
125
- * @license lucide-react v1.33.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 ob=[["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"}]],dn=ge("circle-alert",ob);/**
130
- * @license lucide-react v1.33.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 ub=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fb=ge("circle-play",ub);/**
135
- * @license lucide-react v1.33.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 db=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],hb=ge("circle-question-mark",db);/**
140
- * @license lucide-react v1.33.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 mb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Mf=ge("clock",mb);/**
145
- * @license lucide-react v1.33.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 xb=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Af=ge("code-xml",xb);/**
150
- * @license lucide-react v1.33.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 pb=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],rf=ge("database",pb);/**
155
- * @license lucide-react v1.33.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 gb=[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]],np=ge("diamond",gb);/**
160
- * @license lucide-react v1.33.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 yb=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],lp=ge("file-code-corner",yb);/**
165
- * @license lucide-react v1.33.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 bb=[["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"}]],ap=ge("file-text",bb);/**
170
- * @license lucide-react v1.33.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 vb=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],sp=ge("git-branch",vb);/**
175
- * @license lucide-react v1.33.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 wb=[["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"}]],Tf=ge("globe",wb);/**
180
- * @license lucide-react v1.33.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 Nb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Sb=ge("info",Nb);/**
185
- * @license lucide-react v1.33.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 jb=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],ip=ge("key",jb);/**
190
- * @license lucide-react v1.33.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 Eb=[["path",{d:"M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z",key:"15q6uc"}],["path",{d:"m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845",key:"byia6g"}]],_b=ge("layers-2",Eb);/**
195
- * @license lucide-react v1.33.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 zb=[["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"}]],Mb=ge("layers",zb);/**
200
- * @license lucide-react v1.33.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 Ab=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Tb=ge("layout-grid",Ab);/**
205
- * @license lucide-react v1.33.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 Cb=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Cf=ge("list",Cb);/**
210
- * @license lucide-react v1.33.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 Rb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],St=ge("loader-circle",Rb);/**
215
- * @license lucide-react v1.33.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 Db=[["path",{d:"M3 5h1",key:"1mv5vm"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M3 19h1",key:"w6f3n9"}],["path",{d:"M8 5h1",key:"1nxr5w"}],["path",{d:"M8 12h1",key:"1con00"}],["path",{d:"M8 19h1",key:"k7p10e"}],["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}]],Ob=ge("logs",Db);/**
220
- * @license lucide-react v1.33.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 kb=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Gm=ge("network",kb);/**
225
- * @license lucide-react v1.33.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 Hb=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],cp=ge("palette",Hb);/**
230
- * @license lucide-react v1.33.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 Ub=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Bb=ge("pen-line",Ub);/**
235
- * @license lucide-react v1.33.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 qb=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],hr=ge("play",qb);/**
240
- * @license lucide-react v1.33.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 Lb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Xm=ge("plus",Lb);/**
245
- * @license lucide-react v1.33.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 Yb=[["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"}]],Ai=ge("refresh-cw",Yb);/**
250
- * @license lucide-react v1.33.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 Vb=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],$b=ge("rotate-ccw",Vb);/**
255
- * @license lucide-react v1.33.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 Gb=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Xb=ge("save",Gb);/**
260
- * @license lucide-react v1.33.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 Zb=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]],mr=ge("scan-line",Zb);/**
265
- * @license lucide-react v1.33.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 Qb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Zm=ge("search",Qb);/**
270
- * @license lucide-react v1.33.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 Kb=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],of=ge("send",Kb);/**
275
- * @license lucide-react v1.33.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 Jb=[["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"}]],Wb=ge("settings",Jb);/**
280
- * @license lucide-react v1.33.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 Fb=[["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"}]],ts=ge("shield",Fb);/**
285
- * @license lucide-react v1.33.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 Ib=[["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"}]],rp=ge("sparkles",Ib);/**
290
- * @license lucide-react v1.33.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 Pb=[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]],ev=ge("square-mouse-pointer",Pb);/**
295
- * @license lucide-react v1.33.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 tv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],nv=ge("square",tv);/**
300
- * @license lucide-react v1.33.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 lv=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Rf=ge("terminal",lv);/**
305
- * @license lucide-react v1.33.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 av=[["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"}]],rr=ge("trash-2",av);/**
310
- * @license lucide-react v1.33.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 sv=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],op=ge("user",sv);/**
315
- * @license lucide-react v1.33.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 iv=[["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"}]],Qm=ge("workflow",iv);/**
320
- * @license lucide-react v1.33.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 cv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Tl=ge("x",cv);/**
325
- * @license lucide-react v1.33.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 rv=[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]],Wa=ge("zap",rv),ov=[{label:"WORKFLOW",items:[{id:"overview",label:"Overview",icon:Tb},{id:"model",label:"Model",icon:_b},{id:"simulations",label:"Simulations",icon:np},{id:"inspect",label:"Inspect",icon:ev}]},{label:"AGENT",items:[{id:"memory",label:"Memory",icon:rf}]},{label:"OBSERVABILITY",items:[{id:"traces",label:"Traces",icon:ep},{id:"events",label:"Events",icon:Cf}]}],uv=[{id:"settings",label:"Settings",icon:Wb},{id:"docs",label:"Docs",icon:hb}];function Km({icon:n,label:s,active:i=!1,onClick:r}){return o.jsxs("button",{type:"button",onClick:r,className:`relative hover:cursor-pointer flex w-full items-center gap-3 rounded-lg px-3 py-1.5 text-left text-[13.5px] transition-colors ${i?"bg-white/[0.07] text-white font-medium":"text-zinc-400 hover:bg-white/[0.03] hover:text-zinc-200"}`,children:[i&&o.jsx("span",{className:"absolute -left-3 top-1/2 h-4 w-[3px] -translate-y-1/2 rounded-full bg-blue-500"}),o.jsx(n,{className:"h-[15px] w-[15px] shrink-0",strokeWidth:2}),o.jsx("span",{children:s})]})}function fv({currentPage:n,onNavigate:s,onToggleAssistant:i,isAssistantOpen:r}){return o.jsxs("div",{className:"flex w-60 shrink-0 flex-col border-r border-white/10 bg-black/30 select-none",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 pb-6 pt-5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("img",{src:"/jetic.png",alt:"jetic",className:"h-6 w-6"}),o.jsxs("span",{className:"text-[15px] tracking-wide text-white",children:["Jetic",o.jsx("span",{className:"ml-1 text-blue-300 animate-pulse",children:"Studio"})," "]})]}),o.jsxs("div",{className:"flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.02] px-2 py-0.5 text-[11px] font-medium text-zinc-400",children:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500"}),"v1.0.0"]})]}),o.jsx("div",{className:"flex-1 overflow-y-auto px-3",children:o.jsx("div",{className:"flex flex-col gap-6",children:ov.map(f=>o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("span",{className:"px-3 pb-1 text-[11px] font-semibold tracking-wider text-zinc-500",children:f.label}),o.jsx("div",{className:"flex flex-col gap-0.5",children:f.items.map(d=>o.jsx(Km,{icon:d.icon,label:d.label,active:n===d.id,onClick:()=>s(d.id)},d.id))})]},f.label))})}),o.jsx("div",{className:"mx-3 my-3 border-t border-white/10"}),o.jsx("div",{className:"flex flex-col gap-0.5 px-3",children:o.jsxs("button",{type:"button",onClick:i,className:`relative flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-[13.5px] font-medium transition-colors ${r?"bg-blue-500/10 text-blue-400":"text-zinc-300 hover:bg-white/[0.05]"}`,children:[o.jsx(rp,{className:"h-[15px] w-[15px] shrink-0",strokeWidth:2}),o.jsx("span",{children:"Jetic Assistant"})]})}),o.jsx("div",{className:"mx-3 my-3 border-t border-white/10"}),o.jsx("div",{className:"flex flex-col gap-0.5 px-3 pb-4",children:uv.map(f=>o.jsx(Km,{icon:f.icon,label:f.label,active:n===f.id,onClick:()=>s(f.id)},f.id))})]})}function dv({isOpen:n,onClose:s}){return n?o.jsxs("div",{className:"absolute inset-y-0 right-0 w-[400px] border-l border-white/10 bg-[#0a0a0a] shadow-2xl flex flex-col z-50",children:[o.jsxs("div",{className:"flex h-14 items-center justify-between border-b border-white/10 px-5",children:[o.jsx("div",{className:"flex items-center gap-2 text-emerald-400",children:o.jsx("span",{className:"text-[14px] font-medium",children:"Jetic AI"})}),o.jsx("button",{onClick:s,className:" hover:text-zinc-300 text-sm hover:bg-zinc-800/20 p-2 rounded-full",children:o.jsx(Tl,{className:"",size:13})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto p-5 space-y-4",children:o.jsxs("div",{className:"flex flex-col items-center pt-8 pb-4",children:[o.jsx("div",{className:"mb-4 flex h-10 w-10 items-center justify-center rounded-full bg-zinc-800 text-[13px] font-medium text-zinc-300",children:"J"}),o.jsx("h2",{className:"text-[17px] font-semibold text-white text-center",children:"How can I help you test your APIs?"}),o.jsx("p",{className:"text-zinc-500 text-[13px] mt-2 text-center",children:"Ask me to generate simulations, debug traces, or explain API behavior."})]})}),o.jsx("div",{className:"p-4 border-t border-white/10 bg-white/[0.01]",children:o.jsxs("div",{className:"rounded border border-emerald-600/60 bg-white/[0.015] focus-within:border-emerald-500 transition-colors",children:[o.jsx("textarea",{rows:2,placeholder:"E.g. Test password reset flow...",className:"w-full resize-none bg-transparent px-4 pb-2 pt-3.5 text-[13.5px] text-zinc-200 placeholder:text-zinc-500 focus:outline-none"}),o.jsxs("div",{className:"flex items-center justify-between px-3 pb-3 pt-1",children:[o.jsx("div",{className:"flex gap-2",children:o.jsx("span",{className:"text-[11px] text-zinc-500 font-mono bg-white/[0.05] px-2 py-0.5 rounded",children:"gpt-4o"})}),o.jsx("button",{className:"text-[12px] font-medium text-emerald-400 hover:text-emerald-300",children:"Send"})]})]})})]}):null}const hv={GET:{bg:"bg-emerald-500/10",text:"text-emerald-400",dot:"#34d399"},POST:{bg:"bg-blue-500/10",text:"text-blue-400",dot:"#60a5fa"},PUT:{bg:"bg-amber-500/10",text:"text-amber-400",dot:"#fbbf24"},PATCH:{bg:"bg-orange-500/10",text:"text-orange-400",dot:"#fb923c"},DELETE:{bg:"bg-red-500/10",text:"text-red-400",dot:"#f87171"}};function uf(n){return hv[n.toUpperCase()]??{bg:"bg-zinc-500/10",text:"text-zinc-400",dot:"#a1a1aa"}}function Fc({label:n,value:s,sub:i,icon:r,accent:f="blue"}){const d={blue:{glow:"bg-blue-500/10",text:"text-blue-400",border:"border-blue-500/20"},emerald:{glow:"bg-emerald-500/10",text:"text-emerald-400",border:"border-emerald-500/20"},amber:{glow:"bg-amber-500/10",text:"text-amber-400",border:"border-amber-500/20"},red:{glow:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"},zinc:{glow:"bg-zinc-500/10",text:"text-zinc-400",border:"border-zinc-500/20"}}[f];return o.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-white/10 bg-white/[0.02] p-4 hover:bg-white/[0.04] transition-colors",children:[o.jsx("div",{className:`absolute top-0 right-0 h-20 w-20 rounded-full blur-2xl ${d.glow} opacity-50 -translate-y-4 translate-x-4`}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:`mb-3 flex h-8 w-8 items-center justify-center rounded-lg border border-white/10 ${d.glow}`,children:o.jsx(r,{className:`h-[15px] w-[15px] ${d.text}`,strokeWidth:2})}),o.jsx("p",{className:"text-2xl font-semibold text-white tabular-nums leading-none",children:s}),o.jsx("p",{className:"mt-1 text-[11px] font-semibold tracking-wider text-zinc-500 uppercase",children:n}),i&&o.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-600",children:i})]})]})}function ri({title:n,icon:s,action:i,children:r,noPad:f=!1}){return o.jsxs("div",{className:"rounded-lg border border-white/10 bg-white/[0.02] overflow-hidden",children:[o.jsxs("div",{className:"flex items-center gap-2.5 border-b border-white/10 px-4 py-2.5",children:[s&&o.jsx(s,{className:"h-[15px] w-[15px] text-blue-400/70",strokeWidth:2}),o.jsx("span",{className:"text-[11px] font-semibold tracking-wider text-zinc-400 uppercase",children:n}),i&&o.jsx("span",{className:"ml-auto",children:i})]}),o.jsx("div",{className:f?"":"p-4",children:r})]})}function mv({method:n}){const s=uf(n);return o.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium tracking-widest ${s.bg} ${s.text}`,children:n.toUpperCase()})}function Ic({msg:n}){return o.jsx("p",{className:"py-6 text-center text-[12px] text-zinc-600",children:n})}function Jm({onNavigate:n}){const[s,i]=_.useState(null),[r,f]=_.useState([]),[d,h]=_.useState([]),[x,p]=_.useState(!0),[m,g]=_.useState(!1),[b,w]=_.useState(null),j=_.useCallback(async(O=!1)=>{O?g(!0):p(!0),w(null);try{const[L,F,W]=await Promise.allSettled([fetch("/api/model").then(le=>le.ok?le.json():null),fetch("/api/workflows").then(le=>le.ok?le.json():[]),fetch("/api/memory").then(le=>le.ok?le.json():[])]);L.status==="fulfilled"&&i(L.value),F.status==="fulfilled"&&f(F.value??[]),W.status==="fulfilled"&&h(W.value??[])}catch(L){w(L.message)}finally{p(!1),g(!1)}},[]);_.useEffect(()=>{j()},[j]);const T=s?.endpoints?.length??0,M=r.length,A=d.length,C=s?.endpoints?.filter(O=>(O.security?.length??0)>0).length??0,H=(s?.endpoints??[]).reduce((O,L)=>(O[L.method.toUpperCase()]=(O[L.method.toUpperCase()]??0)+1,O),{}),V=(s?.endpoints??[]).slice(0,8),R=r.slice(0,4),G=d.slice(0,6);return o.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 px-6 py-5",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-[15px] font-medium text-white leading-none",children:s?.project?.name??"Overview"}),o.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:x?"Loading…":s?`${s.project.framework??s.project.language??""} · v${s.version} · ${new Date(s.generatedAt).toLocaleString()}`:"No model yet — run a scan"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>j(!0),disabled:m||x,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-white/10 bg-white/[0.02] text-zinc-500 hover:bg-white/[0.06] hover:text-zinc-200 disabled:opacity-40 transition-colors",children:o.jsx(Ai,{className:`h-[15px] w-[15px] ${m?"animate-spin":""}`,strokeWidth:2})}),!x&&!s&&o.jsxs("button",{onClick:()=>n?.("model"),className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-1.5 text-[12px] font-medium text-white hover:bg-blue-400 transition-colors",children:[o.jsx(mr,{className:"h-[15px] w-[15px]",strokeWidth:2})," Scan Project"]})]})]}),o.jsxs("div",{className:"flex-1 overflow-auto",children:[x&&o.jsx("div",{className:"space-y-3 p-6",children:[1,2,3,4,5].map(O=>o.jsx("div",{className:"h-14 animate-pulse rounded-lg border border-white/10 bg-white/[0.02]",style:{opacity:1-O*.15}},O))}),!x&&b&&o.jsxs("div",{className:"m-6 flex flex-col items-center gap-4 rounded-lg border border-red-500/20 bg-red-500/[0.04] p-10 text-center",children:[o.jsx(dn,{className:"h-8 w-8 text-red-400",strokeWidth:2}),o.jsx("p",{className:"text-[13px] text-red-300",children:b}),o.jsx("button",{onClick:()=>j(),className:"rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-1.5 text-[12px] text-red-400 hover:bg-red-500/20 transition-colors",children:"Retry"})]}),!x&&!b&&o.jsxs("div",{className:"p-6 space-y-5",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[o.jsx(Fc,{label:"Endpoints",value:T,icon:Gm,accent:"blue"}),o.jsx(Fc,{label:"Workflows",value:M,icon:Qm,accent:"zinc"}),o.jsx(Fc,{label:"Memory Keys",value:A,icon:rf,accent:"emerald"}),o.jsx(Fc,{label:"Secured",value:C,icon:ts,accent:"amber",sub:T>0?`${Math.round(C/T*100)}% of routes`:void 0})]}),s&&o.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[o.jsx(ri,{title:"Project",icon:rp,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg border border-white/10 bg-white/[0.04]",children:o.jsx(Rf,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-[13.5px] font-medium text-white",children:s.project.name}),o.jsx("p",{className:"text-[11px] text-zinc-500",children:s.project.framework??s.project.language??"Unknown framework"})]})]}),(s.environments?.length??0)>0&&o.jsxs("div",{children:[o.jsx("p",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:"Environments"}),o.jsx("div",{className:"space-y-1",children:s.environments.map(O=>o.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-white/10 bg-white/[0.02] px-3 py-2",children:[o.jsx(Tf,{className:"h-[15px] w-[15px] text-zinc-600 shrink-0",strokeWidth:2}),o.jsx("span",{className:"text-[11px] text-zinc-500 w-12 shrink-0",children:O.name}),o.jsx("span",{className:"font-mono text-[11px] text-zinc-400 truncate",children:O.baseUrl})]},O.name))})]}),o.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[o.jsxs("button",{onClick:()=>n?.("model"),className:"flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/[0.02] px-3 py-1.5 text-[12px] text-zinc-400 hover:bg-blue-500 hover:text-white hover:border-blue-400 transition-colors",children:[o.jsx(Mb,{className:"h-[15px] w-[15px]",strokeWidth:2})," View Model"]}),o.jsxs("button",{onClick:()=>n?.("simulations"),className:"flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/[0.02] px-3 py-1.5 text-[12px] text-zinc-400 hover:bg-white/[0.06] hover:text-zinc-200 transition-colors",children:[o.jsx(fb,{className:"h-[15px] w-[15px]",strokeWidth:2})," Simulations"]})]})]})}),o.jsx(ri,{title:"Method Distribution",icon:ep,children:Object.keys(H).length===0?o.jsx(Ic,{msg:"No endpoints scanned yet"}):o.jsx("div",{className:"space-y-3",children:Object.entries(H).sort(([,O],[,L])=>L-O).map(([O,L])=>{const F=uf(O),W=Math.round(L/T*100);return o.jsxs("div",{children:[o.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[o.jsx("span",{className:`text-[12px] font-medium ${F.text}`,children:O}),o.jsxs("span",{className:"text-[11px] text-zinc-500",children:[L," ",o.jsxs("span",{className:"text-zinc-600",children:["(",W,"%)"]})]})]}),o.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-white/[0.05]",children:o.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${W}%`,background:F.dot}})})]},O)})})})]}),o.jsx(ri,{title:"Endpoints",icon:Gm,noPad:!0,action:o.jsxs("button",{onClick:()=>n?.("model"),className:"flex items-center gap-1 text-[11px] text-blue-400 hover:text-blue-300 transition-colors",children:["View all ",o.jsx(yi,{className:"h-3.5 w-3.5",strokeWidth:2})]}),children:V.length===0?o.jsx(Ic,{msg:"No endpoints — scan your project first"}):o.jsxs("div",{className:"divide-y divide-white/[0.06]",children:[V.map(O=>{const L=uf(O.method);return o.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 hover:bg-white/[0.03] transition-colors",children:[o.jsx("div",{className:"h-1.5 w-1.5 shrink-0 rounded-full",style:{background:L.dot}}),o.jsx(mv,{method:O.method}),o.jsx("span",{className:"flex-1 truncate font-mono text-[12px] text-zinc-300",children:O.path}),O.handlerName&&o.jsx("span",{className:"hidden sm:block truncate text-[11px] text-zinc-600 max-w-[140px]",children:O.handlerName}),(O.security?.length??0)>0&&o.jsx(ts,{className:"h-[15px] w-[15px] text-amber-500/50 shrink-0",strokeWidth:2})]},O.id)}),T>8&&o.jsxs("div",{className:"px-4 py-2.5 text-[11px] text-zinc-600",children:["+",T-8," more endpoints"]})]})}),o.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[o.jsx(ri,{title:"Workflows",icon:Qm,noPad:!0,action:o.jsxs("button",{onClick:()=>n?.("simulations"),className:"flex items-center gap-1 text-[11px] text-blue-400 hover:text-blue-300 transition-colors",children:["View all ",o.jsx(yi,{className:"h-3.5 w-3.5",strokeWidth:2})]}),children:R.length===0?o.jsx(Ic,{msg:"No workflows found"}):o.jsx("div",{className:"divide-y divide-white/[0.06]",children:R.map((O,L)=>o.jsxs("button",{onClick:()=>n?.("simulations"),className:"group flex w-full items-center gap-3 px-4 py-2.5 hover:bg-white/[0.03] text-left transition-colors",children:[o.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-white/10 bg-white/[0.04]",children:o.jsx(Wa,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-[13px] text-zinc-200",children:O.name}),o.jsxs("p",{className:"text-[11px] text-zinc-600",children:[O.steps.length," steps"]})]}),o.jsx(cs,{className:"h-[15px] w-[15px] shrink-0 text-zinc-600 opacity-0 group-hover:opacity-100 transition-opacity",strokeWidth:2})]},L))})}),o.jsx(ri,{title:"Runtime Memory",icon:rf,noPad:!0,action:o.jsxs("button",{onClick:()=>n?.("memory"),className:"flex items-center gap-1 text-[11px] text-blue-400 hover:text-blue-300 transition-colors",children:["Inspect ",o.jsx(yi,{className:"h-3.5 w-3.5",strokeWidth:2})]}),children:G.length===0?o.jsx(Ic,{msg:"No memory entries"}):o.jsxs("div",{className:"divide-y divide-white/[0.06]",children:[G.map((O,L)=>o.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 hover:bg-white/[0.03] transition-colors",children:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500/50 shrink-0"}),o.jsx("span",{className:"font-mono text-[11px] text-zinc-400 flex-1 truncate",children:O.key}),o.jsx("span",{className:"text-[11px] text-zinc-600 truncate max-w-[100px]",children:typeof O.value=="object"?JSON.stringify(O.value):String(O.value)})]},L)),d.length>6&&o.jsxs("p",{className:"px-4 py-2.5 text-[11px] text-zinc-600",children:["+",d.length-6," more entries"]})]})})]}),o.jsxs("div",{className:"flex items-center gap-2 border-t border-white/10 pt-3 text-[11px] text-zinc-600",children:[o.jsx(Mf,{className:"h-[15px] w-[15px]",strokeWidth:2}),s?`Model generated ${new Date(s.generatedAt).toLocaleString()}`:"No model generated yet"]})]})]})]})}function jt(n){if(typeof n=="string"||typeof n=="number")return""+n;let s="";if(Array.isArray(n))for(let i=0,r;i<n.length;i++)(r=jt(n[i]))!==""&&(s+=(s&&" ")+r);else for(let i in n)n[i]&&(s+=(s&&" ")+i);return s}var Gu={exports:{}},Xu={},Zu={exports:{}},Qu={};/**
330
- * @license React
331
- * use-sync-external-store-shim.production.js
332
- *
333
- * Copyright (c) Meta Platforms, Inc. and affiliates.
334
- *
335
- * This source code is licensed under the MIT license found in the
336
- * LICENSE file in the root directory of this source tree.
337
- */var Wm;function xv(){if(Wm)return Qu;Wm=1;var n=zi();function s(b,w){return b===w&&(b!==0||1/b===1/w)||b!==b&&w!==w}var i=typeof Object.is=="function"?Object.is:s,r=n.useState,f=n.useEffect,d=n.useLayoutEffect,h=n.useDebugValue;function x(b,w){var j=w(),T=r({inst:{value:j,getSnapshot:w}}),M=T[0].inst,A=T[1];return d(function(){M.value=j,M.getSnapshot=w,p(M)&&A({inst:M})},[b,j,w]),f(function(){return p(M)&&A({inst:M}),b(function(){p(M)&&A({inst:M})})},[b]),h(j),j}function p(b){var w=b.getSnapshot;b=b.value;try{var j=w();return!i(b,j)}catch{return!0}}function m(b,w){return w()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:x;return Qu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,Qu}var Fm;function pv(){return Fm||(Fm=1,Zu.exports=xv()),Zu.exports}/**
338
- * @license React
339
- * use-sync-external-store-shim/with-selector.production.js
340
- *
341
- * Copyright (c) Meta Platforms, Inc. and affiliates.
342
- *
343
- * This source code is licensed under the MIT license found in the
344
- * LICENSE file in the root directory of this source tree.
345
- */var Im;function gv(){if(Im)return Xu;Im=1;var n=zi(),s=pv();function i(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var r=typeof Object.is=="function"?Object.is:i,f=s.useSyncExternalStore,d=n.useRef,h=n.useEffect,x=n.useMemo,p=n.useDebugValue;return Xu.useSyncExternalStoreWithSelector=function(m,g,b,w,j){var T=d(null);if(T.current===null){var M={hasValue:!1,value:null};T.current=M}else M=T.current;T=x(function(){function C(O){if(!H){if(H=!0,V=O,O=w(O),j!==void 0&&M.hasValue){var L=M.value;if(j(L,O))return R=L}return R=O}if(L=R,r(V,O))return L;var F=w(O);return j!==void 0&&j(L,F)?(V=O,L):(V=O,R=F)}var H=!1,V,R,G=b===void 0?null:b;return[function(){return C(g())},G===null?void 0:function(){return C(G())}]},[g,b,w,j]);var A=f(m,T[0],T[1]);return h(function(){M.hasValue=!0,M.value=A},[A]),p(A),A},Xu}var Pm;function yv(){return Pm||(Pm=1,Gu.exports=gv()),Gu.exports}var bv=yv();const vv=Fx(bv),wv={},ex=n=>{let s;const i=new Set,r=(g,b)=>{const w=typeof g=="function"?g(s):g;if(!Object.is(w,s)){const j=s;s=b??(typeof w!="object"||w===null)?w:Object.assign({},s,w),i.forEach(T=>T(s,j))}},f=()=>s,p={setState:r,getState:f,getInitialState:()=>m,subscribe:g=>(i.add(g),()=>i.delete(g)),destroy:()=>{(wv?"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."),i.clear()}},m=s=n(r,f,p);return p},Nv=n=>n?ex(n):ex,{useDebugValue:Sv}=ee,{useSyncExternalStoreWithSelector:jv}=vv,Ev=n=>n;function up(n,s=Ev,i){const r=jv(n.subscribe,n.getState,n.getServerState||n.getInitialState,s,i);return Sv(r),r}const tx=(n,s)=>{const i=Nv(n),r=(f,d=s)=>up(i,f,d);return Object.assign(r,i),r},_v=(n,s)=>n?tx(n,s):tx;function yt(n,s){if(Object.is(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;if(n instanceof Map&&s instanceof Map){if(n.size!==s.size)return!1;for(const[r,f]of n)if(!Object.is(f,s.get(r)))return!1;return!0}if(n instanceof Set&&s instanceof Set){if(n.size!==s.size)return!1;for(const r of n)if(!s.has(r))return!1;return!0}const i=Object.keys(n);if(i.length!==Object.keys(s).length)return!1;for(const r of i)if(!Object.prototype.hasOwnProperty.call(s,r)||!Object.is(n[r],s[r]))return!1;return!0}var zv={value:()=>{}};function Sr(){for(var n=0,s=arguments.length,i={},r;n<s;++n){if(!(r=arguments[n]+"")||r in i||/[\s.]/.test(r))throw new Error("illegal type: "+r);i[r]=[]}return new or(i)}function or(n){this._=n}function Mv(n,s){return n.trim().split(/^|\s+/).map(function(i){var r="",f=i.indexOf(".");if(f>=0&&(r=i.slice(f+1),i=i.slice(0,f)),i&&!s.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:r}})}or.prototype=Sr.prototype={constructor:or,on:function(n,s){var i=this._,r=Mv(n+"",i),f,d=-1,h=r.length;if(arguments.length<2){for(;++d<h;)if((f=(n=r[d]).type)&&(f=Av(i[f],n.name)))return f;return}if(s!=null&&typeof s!="function")throw new Error("invalid callback: "+s);for(;++d<h;)if(f=(n=r[d]).type)i[f]=nx(i[f],n.name,s);else if(s==null)for(f in i)i[f]=nx(i[f],n.name,null);return this},copy:function(){var n={},s=this._;for(var i in s)n[i]=s[i].slice();return new or(n)},call:function(n,s){if((f=arguments.length-2)>0)for(var i=new Array(f),r=0,f,d;r<f;++r)i[r]=arguments[r+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(d=this._[n],r=0,f=d.length;r<f;++r)d[r].value.apply(s,i)},apply:function(n,s,i){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var r=this._[n],f=0,d=r.length;f<d;++f)r[f].value.apply(s,i)}};function Av(n,s){for(var i=0,r=n.length,f;i<r;++i)if((f=n[i]).name===s)return f.value}function nx(n,s,i){for(var r=0,f=n.length;r<f;++r)if(n[r].name===s){n[r]=zv,n=n.slice(0,r).concat(n.slice(r+1));break}return i!=null&&n.push({name:s,value:i}),n}var ff="http://www.w3.org/1999/xhtml";const lx={svg:"http://www.w3.org/2000/svg",xhtml:ff,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function jr(n){var s=n+="",i=s.indexOf(":");return i>=0&&(s=n.slice(0,i))!=="xmlns"&&(n=n.slice(i+1)),lx.hasOwnProperty(s)?{space:lx[s],local:n}:n}function Tv(n){return function(){var s=this.ownerDocument,i=this.namespaceURI;return i===ff&&s.documentElement.namespaceURI===ff?s.createElement(n):s.createElementNS(i,n)}}function Cv(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function fp(n){var s=jr(n);return(s.local?Cv:Tv)(s)}function Rv(){}function Df(n){return n==null?Rv:function(){return this.querySelector(n)}}function Dv(n){typeof n!="function"&&(n=Df(n));for(var s=this._groups,i=s.length,r=new Array(i),f=0;f<i;++f)for(var d=s[f],h=d.length,x=r[f]=new Array(h),p,m,g=0;g<h;++g)(p=d[g])&&(m=n.call(p,p.__data__,g,d))&&("__data__"in p&&(m.__data__=p.__data__),x[g]=m);return new Yt(r,this._parents)}function Ov(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function kv(){return[]}function dp(n){return n==null?kv:function(){return this.querySelectorAll(n)}}function Hv(n){return function(){return Ov(n.apply(this,arguments))}}function Uv(n){typeof n=="function"?n=Hv(n):n=dp(n);for(var s=this._groups,i=s.length,r=[],f=[],d=0;d<i;++d)for(var h=s[d],x=h.length,p,m=0;m<x;++m)(p=h[m])&&(r.push(n.call(p,p.__data__,m,h)),f.push(p));return new Yt(r,f)}function hp(n){return function(){return this.matches(n)}}function mp(n){return function(s){return s.matches(n)}}var Bv=Array.prototype.find;function qv(n){return function(){return Bv.call(this.children,n)}}function Lv(){return this.firstElementChild}function Yv(n){return this.select(n==null?Lv:qv(typeof n=="function"?n:mp(n)))}var Vv=Array.prototype.filter;function $v(){return Array.from(this.children)}function Gv(n){return function(){return Vv.call(this.children,n)}}function Xv(n){return this.selectAll(n==null?$v:Gv(typeof n=="function"?n:mp(n)))}function Zv(n){typeof n!="function"&&(n=hp(n));for(var s=this._groups,i=s.length,r=new Array(i),f=0;f<i;++f)for(var d=s[f],h=d.length,x=r[f]=[],p,m=0;m<h;++m)(p=d[m])&&n.call(p,p.__data__,m,d)&&x.push(p);return new Yt(r,this._parents)}function xp(n){return new Array(n.length)}function Qv(){return new Yt(this._enter||this._groups.map(xp),this._parents)}function xr(n,s){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=s}xr.prototype={constructor:xr,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,s){return this._parent.insertBefore(n,s)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function Kv(n){return function(){return n}}function Jv(n,s,i,r,f,d){for(var h=0,x,p=s.length,m=d.length;h<m;++h)(x=s[h])?(x.__data__=d[h],r[h]=x):i[h]=new xr(n,d[h]);for(;h<p;++h)(x=s[h])&&(f[h]=x)}function Wv(n,s,i,r,f,d,h){var x,p,m=new Map,g=s.length,b=d.length,w=new Array(g),j;for(x=0;x<g;++x)(p=s[x])&&(w[x]=j=h.call(p,p.__data__,x,s)+"",m.has(j)?f[x]=p:m.set(j,p));for(x=0;x<b;++x)j=h.call(n,d[x],x,d)+"",(p=m.get(j))?(r[x]=p,p.__data__=d[x],m.delete(j)):i[x]=new xr(n,d[x]);for(x=0;x<g;++x)(p=s[x])&&m.get(w[x])===p&&(f[x]=p)}function Fv(n){return n.__data__}function Iv(n,s){if(!arguments.length)return Array.from(this,Fv);var i=s?Wv:Jv,r=this._parents,f=this._groups;typeof n!="function"&&(n=Kv(n));for(var d=f.length,h=new Array(d),x=new Array(d),p=new Array(d),m=0;m<d;++m){var g=r[m],b=f[m],w=b.length,j=Pv(n.call(g,g&&g.__data__,m,r)),T=j.length,M=x[m]=new Array(T),A=h[m]=new Array(T),C=p[m]=new Array(w);i(g,b,M,A,C,j,s);for(var H=0,V=0,R,G;H<T;++H)if(R=M[H]){for(H>=V&&(V=H+1);!(G=A[V])&&++V<T;);R._next=G||null}}return h=new Yt(h,r),h._enter=x,h._exit=p,h}function Pv(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function e2(){return new Yt(this._exit||this._groups.map(xp),this._parents)}function t2(n,s,i){var r=this.enter(),f=this,d=this.exit();return typeof n=="function"?(r=n(r),r&&(r=r.selection())):r=r.append(n+""),s!=null&&(f=s(f),f&&(f=f.selection())),i==null?d.remove():i(d),r&&f?r.merge(f).order():f}function n2(n){for(var s=n.selection?n.selection():n,i=this._groups,r=s._groups,f=i.length,d=r.length,h=Math.min(f,d),x=new Array(f),p=0;p<h;++p)for(var m=i[p],g=r[p],b=m.length,w=x[p]=new Array(b),j,T=0;T<b;++T)(j=m[T]||g[T])&&(w[T]=j);for(;p<f;++p)x[p]=i[p];return new Yt(x,this._parents)}function l2(){for(var n=this._groups,s=-1,i=n.length;++s<i;)for(var r=n[s],f=r.length-1,d=r[f],h;--f>=0;)(h=r[f])&&(d&&h.compareDocumentPosition(d)^4&&d.parentNode.insertBefore(h,d),d=h);return this}function a2(n){n||(n=s2);function s(b,w){return b&&w?n(b.__data__,w.__data__):!b-!w}for(var i=this._groups,r=i.length,f=new Array(r),d=0;d<r;++d){for(var h=i[d],x=h.length,p=f[d]=new Array(x),m,g=0;g<x;++g)(m=h[g])&&(p[g]=m);p.sort(s)}return new Yt(f,this._parents).order()}function s2(n,s){return n<s?-1:n>s?1:n>=s?0:NaN}function i2(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function c2(){return Array.from(this)}function r2(){for(var n=this._groups,s=0,i=n.length;s<i;++s)for(var r=n[s],f=0,d=r.length;f<d;++f){var h=r[f];if(h)return h}return null}function o2(){let n=0;for(const s of this)++n;return n}function u2(){return!this.node()}function f2(n){for(var s=this._groups,i=0,r=s.length;i<r;++i)for(var f=s[i],d=0,h=f.length,x;d<h;++d)(x=f[d])&&n.call(x,x.__data__,d,f);return this}function d2(n){return function(){this.removeAttribute(n)}}function h2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function m2(n,s){return function(){this.setAttribute(n,s)}}function x2(n,s){return function(){this.setAttributeNS(n.space,n.local,s)}}function p2(n,s){return function(){var i=s.apply(this,arguments);i==null?this.removeAttribute(n):this.setAttribute(n,i)}}function g2(n,s){return function(){var i=s.apply(this,arguments);i==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,i)}}function y2(n,s){var i=jr(n);if(arguments.length<2){var r=this.node();return i.local?r.getAttributeNS(i.space,i.local):r.getAttribute(i)}return this.each((s==null?i.local?h2:d2:typeof s=="function"?i.local?g2:p2:i.local?x2:m2)(i,s))}function pp(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function b2(n){return function(){this.style.removeProperty(n)}}function v2(n,s,i){return function(){this.style.setProperty(n,s,i)}}function w2(n,s,i){return function(){var r=s.apply(this,arguments);r==null?this.style.removeProperty(n):this.style.setProperty(n,r,i)}}function N2(n,s,i){return arguments.length>1?this.each((s==null?b2:typeof s=="function"?w2:v2)(n,s,i??"")):ns(this.node(),n)}function ns(n,s){return n.style.getPropertyValue(s)||pp(n).getComputedStyle(n,null).getPropertyValue(s)}function S2(n){return function(){delete this[n]}}function j2(n,s){return function(){this[n]=s}}function E2(n,s){return function(){var i=s.apply(this,arguments);i==null?delete this[n]:this[n]=i}}function _2(n,s){return arguments.length>1?this.each((s==null?S2:typeof s=="function"?E2:j2)(n,s)):this.node()[n]}function gp(n){return n.trim().split(/^|\s+/)}function Of(n){return n.classList||new yp(n)}function yp(n){this._node=n,this._names=gp(n.getAttribute("class")||"")}yp.prototype={add:function(n){var s=this._names.indexOf(n);s<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var s=this._names.indexOf(n);s>=0&&(this._names.splice(s,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function bp(n,s){for(var i=Of(n),r=-1,f=s.length;++r<f;)i.add(s[r])}function vp(n,s){for(var i=Of(n),r=-1,f=s.length;++r<f;)i.remove(s[r])}function z2(n){return function(){bp(this,n)}}function M2(n){return function(){vp(this,n)}}function A2(n,s){return function(){(s.apply(this,arguments)?bp:vp)(this,n)}}function T2(n,s){var i=gp(n+"");if(arguments.length<2){for(var r=Of(this.node()),f=-1,d=i.length;++f<d;)if(!r.contains(i[f]))return!1;return!0}return this.each((typeof s=="function"?A2:s?z2:M2)(i,s))}function C2(){this.textContent=""}function R2(n){return function(){this.textContent=n}}function D2(n){return function(){var s=n.apply(this,arguments);this.textContent=s??""}}function O2(n){return arguments.length?this.each(n==null?C2:(typeof n=="function"?D2:R2)(n)):this.node().textContent}function k2(){this.innerHTML=""}function H2(n){return function(){this.innerHTML=n}}function U2(n){return function(){var s=n.apply(this,arguments);this.innerHTML=s??""}}function B2(n){return arguments.length?this.each(n==null?k2:(typeof n=="function"?U2:H2)(n)):this.node().innerHTML}function q2(){this.nextSibling&&this.parentNode.appendChild(this)}function L2(){return this.each(q2)}function Y2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function V2(){return this.each(Y2)}function $2(n){var s=typeof n=="function"?n:fp(n);return this.select(function(){return this.appendChild(s.apply(this,arguments))})}function G2(){return null}function X2(n,s){var i=typeof n=="function"?n:fp(n),r=s==null?G2:typeof s=="function"?s:Df(s);return this.select(function(){return this.insertBefore(i.apply(this,arguments),r.apply(this,arguments)||null)})}function Z2(){var n=this.parentNode;n&&n.removeChild(this)}function Q2(){return this.each(Z2)}function K2(){var n=this.cloneNode(!1),s=this.parentNode;return s?s.insertBefore(n,this.nextSibling):n}function J2(){var n=this.cloneNode(!0),s=this.parentNode;return s?s.insertBefore(n,this.nextSibling):n}function W2(n){return this.select(n?J2:K2)}function F2(n){return arguments.length?this.property("__data__",n):this.node().__data__}function I2(n){return function(s){n.call(this,s,this.__data__)}}function P2(n){return n.trim().split(/^|\s+/).map(function(s){var i="",r=s.indexOf(".");return r>=0&&(i=s.slice(r+1),s=s.slice(0,r)),{type:s,name:i}})}function ew(n){return function(){var s=this.__on;if(s){for(var i=0,r=-1,f=s.length,d;i<f;++i)d=s[i],(!n.type||d.type===n.type)&&d.name===n.name?this.removeEventListener(d.type,d.listener,d.options):s[++r]=d;++r?s.length=r:delete this.__on}}}function tw(n,s,i){return function(){var r=this.__on,f,d=I2(s);if(r){for(var h=0,x=r.length;h<x;++h)if((f=r[h]).type===n.type&&f.name===n.name){this.removeEventListener(f.type,f.listener,f.options),this.addEventListener(f.type,f.listener=d,f.options=i),f.value=s;return}}this.addEventListener(n.type,d,i),f={type:n.type,name:n.name,value:s,listener:d,options:i},r?r.push(f):this.__on=[f]}}function nw(n,s,i){var r=P2(n+""),f,d=r.length,h;if(arguments.length<2){var x=this.node().__on;if(x){for(var p=0,m=x.length,g;p<m;++p)for(f=0,g=x[p];f<d;++f)if((h=r[f]).type===g.type&&h.name===g.name)return g.value}return}for(x=s?tw:ew,f=0;f<d;++f)this.each(x(r[f],s,i));return this}function wp(n,s,i){var r=pp(n),f=r.CustomEvent;typeof f=="function"?f=new f(s,i):(f=r.document.createEvent("Event"),i?(f.initEvent(s,i.bubbles,i.cancelable),f.detail=i.detail):f.initEvent(s,!1,!1)),n.dispatchEvent(f)}function lw(n,s){return function(){return wp(this,n,s)}}function aw(n,s){return function(){return wp(this,n,s.apply(this,arguments))}}function sw(n,s){return this.each((typeof s=="function"?aw:lw)(n,s))}function*iw(){for(var n=this._groups,s=0,i=n.length;s<i;++s)for(var r=n[s],f=0,d=r.length,h;f<d;++f)(h=r[f])&&(yield h)}var Np=[null];function Yt(n,s){this._groups=n,this._parents=s}function Ti(){return new Yt([[document.documentElement]],Np)}function cw(){return this}Yt.prototype=Ti.prototype={constructor:Yt,select:Dv,selectAll:Uv,selectChild:Yv,selectChildren:Xv,filter:Zv,data:Iv,enter:Qv,exit:e2,join:t2,merge:n2,selection:cw,order:l2,sort:a2,call:i2,nodes:c2,node:r2,size:o2,empty:u2,each:f2,attr:y2,style:N2,property:_2,classed:T2,text:O2,html:B2,raise:L2,lower:V2,append:$2,insert:X2,remove:Q2,clone:W2,datum:F2,on:nw,dispatch:sw,[Symbol.iterator]:iw};function on(n){return typeof n=="string"?new Yt([[document.querySelector(n)]],[document.documentElement]):new Yt([[n]],Np)}function rw(n){let s;for(;s=n.sourceEvent;)n=s;return n}function Nn(n,s){if(n=rw(n),s===void 0&&(s=n.currentTarget),s){var i=s.ownerSVGElement||s;if(i.createSVGPoint){var r=i.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(s.getScreenCTM().inverse()),[r.x,r.y]}if(s.getBoundingClientRect){var f=s.getBoundingClientRect();return[n.clientX-f.left-s.clientLeft,n.clientY-f.top-s.clientTop]}}return[n.pageX,n.pageY]}const ow={passive:!1},bi={capture:!0,passive:!1};function Ku(n){n.stopImmediatePropagation()}function Fa(n){n.preventDefault(),n.stopImmediatePropagation()}function Sp(n){var s=n.document.documentElement,i=on(n).on("dragstart.drag",Fa,bi);"onselectstart"in s?i.on("selectstart.drag",Fa,bi):(s.__noselect=s.style.MozUserSelect,s.style.MozUserSelect="none")}function jp(n,s){var i=n.document.documentElement,r=on(n).on("dragstart.drag",null);s&&(r.on("click.drag",Fa,bi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in i?r.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const Pc=n=>()=>n;function df(n,{sourceEvent:s,subject:i,target:r,identifier:f,active:d,x:h,y:x,dx:p,dy:m,dispatch:g}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:s,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:f,enumerable:!0,configurable:!0},active:{value:d,enumerable:!0,configurable:!0},x:{value:h,enumerable:!0,configurable:!0},y:{value:x,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:g}})}df.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function uw(n){return!n.ctrlKey&&!n.button}function fw(){return this.parentNode}function dw(n,s){return s??{x:n.x,y:n.y}}function hw(){return navigator.maxTouchPoints||"ontouchstart"in this}function mw(){var n=uw,s=fw,i=dw,r=hw,f={},d=Sr("start","drag","end"),h=0,x,p,m,g,b=0;function w(R){R.on("mousedown.drag",j).filter(r).on("touchstart.drag",A).on("touchmove.drag",C,ow).on("touchend.drag touchcancel.drag",H).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function j(R,G){if(!(g||!n.call(this,R,G))){var O=V(this,s.call(this,R,G),R,G,"mouse");O&&(on(R.view).on("mousemove.drag",T,bi).on("mouseup.drag",M,bi),Sp(R.view),Ku(R),m=!1,x=R.clientX,p=R.clientY,O("start",R))}}function T(R){if(Fa(R),!m){var G=R.clientX-x,O=R.clientY-p;m=G*G+O*O>b}f.mouse("drag",R)}function M(R){on(R.view).on("mousemove.drag mouseup.drag",null),jp(R.view,m),Fa(R),f.mouse("end",R)}function A(R,G){if(n.call(this,R,G)){var O=R.changedTouches,L=s.call(this,R,G),F=O.length,W,le;for(W=0;W<F;++W)(le=V(this,L,R,G,O[W].identifier,O[W]))&&(Ku(R),le("start",R,O[W]))}}function C(R){var G=R.changedTouches,O=G.length,L,F;for(L=0;L<O;++L)(F=f[G[L].identifier])&&(Fa(R),F("drag",R,G[L]))}function H(R){var G=R.changedTouches,O=G.length,L,F;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),L=0;L<O;++L)(F=f[G[L].identifier])&&(Ku(R),F("end",R,G[L]))}function V(R,G,O,L,F,W){var le=d.copy(),se=Nn(W||O,G),ce,ie,E;if((E=i.call(R,new df("beforestart",{sourceEvent:O,target:w,identifier:F,active:h,x:se[0],y:se[1],dx:0,dy:0,dispatch:le}),L))!=null)return ce=E.x-se[0]||0,ie=E.y-se[1]||0,function J(S,U,Z){var q=se,N;switch(S){case"start":f[F]=J,N=h++;break;case"end":delete f[F],--h;case"drag":se=Nn(Z||U,G),N=h;break}le.call(S,R,new df(S,{sourceEvent:U,subject:E,target:w,identifier:F,active:N,x:se[0]+ce,y:se[1]+ie,dx:se[0]-q[0],dy:se[1]-q[1],dispatch:le}),L)}}return w.filter=function(R){return arguments.length?(n=typeof R=="function"?R:Pc(!!R),w):n},w.container=function(R){return arguments.length?(s=typeof R=="function"?R:Pc(R),w):s},w.subject=function(R){return arguments.length?(i=typeof R=="function"?R:Pc(R),w):i},w.touchable=function(R){return arguments.length?(r=typeof R=="function"?R:Pc(!!R),w):r},w.on=function(){var R=d.on.apply(d,arguments);return R===d?w:R},w.clickDistance=function(R){return arguments.length?(b=(R=+R)*R,w):Math.sqrt(b)},w}function kf(n,s,i){n.prototype=s.prototype=i,i.constructor=n}function Ep(n,s){var i=Object.create(n.prototype);for(var r in s)i[r]=s[r];return i}function Ci(){}var vi=.7,pr=1/vi,Ia="\\s*([+-]?\\d+)\\s*",wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xw=/^#([0-9a-f]{3,8})$/,pw=new RegExp(`^rgb\\(${Ia},${Ia},${Ia}\\)$`),gw=new RegExp(`^rgb\\(${Sn},${Sn},${Sn}\\)$`),yw=new RegExp(`^rgba\\(${Ia},${Ia},${Ia},${wi}\\)$`),bw=new RegExp(`^rgba\\(${Sn},${Sn},${Sn},${wi}\\)$`),vw=new RegExp(`^hsl\\(${wi},${Sn},${Sn}\\)$`),ww=new RegExp(`^hsla\\(${wi},${Sn},${Sn},${wi}\\)$`),ax={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};kf(Ci,Ni,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:sx,formatHex:sx,formatHex8:Nw,formatHsl:Sw,formatRgb:ix,toString:ix});function sx(){return this.rgb().formatHex()}function Nw(){return this.rgb().formatHex8()}function Sw(){return _p(this).formatHsl()}function ix(){return this.rgb().formatRgb()}function Ni(n){var s,i;return n=(n+"").trim().toLowerCase(),(s=xw.exec(n))?(i=s[1].length,s=parseInt(s[1],16),i===6?cx(s):i===3?new Tt(s>>8&15|s>>4&240,s>>4&15|s&240,(s&15)<<4|s&15,1):i===8?er(s>>24&255,s>>16&255,s>>8&255,(s&255)/255):i===4?er(s>>12&15|s>>8&240,s>>8&15|s>>4&240,s>>4&15|s&240,((s&15)<<4|s&15)/255):null):(s=pw.exec(n))?new Tt(s[1],s[2],s[3],1):(s=gw.exec(n))?new Tt(s[1]*255/100,s[2]*255/100,s[3]*255/100,1):(s=yw.exec(n))?er(s[1],s[2],s[3],s[4]):(s=bw.exec(n))?er(s[1]*255/100,s[2]*255/100,s[3]*255/100,s[4]):(s=vw.exec(n))?ux(s[1],s[2]/100,s[3]/100,1):(s=ww.exec(n))?ux(s[1],s[2]/100,s[3]/100,s[4]):ax.hasOwnProperty(n)?cx(ax[n]):n==="transparent"?new Tt(NaN,NaN,NaN,0):null}function cx(n){return new Tt(n>>16&255,n>>8&255,n&255,1)}function er(n,s,i,r){return r<=0&&(n=s=i=NaN),new Tt(n,s,i,r)}function jw(n){return n instanceof Ci||(n=Ni(n)),n?(n=n.rgb(),new Tt(n.r,n.g,n.b,n.opacity)):new Tt}function hf(n,s,i,r){return arguments.length===1?jw(n):new Tt(n,s,i,r??1)}function Tt(n,s,i,r){this.r=+n,this.g=+s,this.b=+i,this.opacity=+r}kf(Tt,hf,Ep(Ci,{brighter(n){return n=n==null?pr:Math.pow(pr,n),new Tt(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?vi:Math.pow(vi,n),new Tt(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new Tt(ta(this.r),ta(this.g),ta(this.b),gr(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:rx,formatHex:rx,formatHex8:Ew,formatRgb:ox,toString:ox}));function rx(){return`#${Pl(this.r)}${Pl(this.g)}${Pl(this.b)}`}function Ew(){return`#${Pl(this.r)}${Pl(this.g)}${Pl(this.b)}${Pl((isNaN(this.opacity)?1:this.opacity)*255)}`}function ox(){const n=gr(this.opacity);return`${n===1?"rgb(":"rgba("}${ta(this.r)}, ${ta(this.g)}, ${ta(this.b)}${n===1?")":`, ${n})`}`}function gr(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function ta(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function Pl(n){return n=ta(n),(n<16?"0":"")+n.toString(16)}function ux(n,s,i,r){return r<=0?n=s=i=NaN:i<=0||i>=1?n=s=NaN:s<=0&&(n=NaN),new un(n,s,i,r)}function _p(n){if(n instanceof un)return new un(n.h,n.s,n.l,n.opacity);if(n instanceof Ci||(n=Ni(n)),!n)return new un;if(n instanceof un)return n;n=n.rgb();var s=n.r/255,i=n.g/255,r=n.b/255,f=Math.min(s,i,r),d=Math.max(s,i,r),h=NaN,x=d-f,p=(d+f)/2;return x?(s===d?h=(i-r)/x+(i<r)*6:i===d?h=(r-s)/x+2:h=(s-i)/x+4,x/=p<.5?d+f:2-d-f,h*=60):x=p>0&&p<1?0:h,new un(h,x,p,n.opacity)}function _w(n,s,i,r){return arguments.length===1?_p(n):new un(n,s,i,r??1)}function un(n,s,i,r){this.h=+n,this.s=+s,this.l=+i,this.opacity=+r}kf(un,_w,Ep(Ci,{brighter(n){return n=n==null?pr:Math.pow(pr,n),new un(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?vi:Math.pow(vi,n),new un(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,s=isNaN(n)||isNaN(this.s)?0:this.s,i=this.l,r=i+(i<.5?i:1-i)*s,f=2*i-r;return new Tt(Ju(n>=240?n-240:n+120,f,r),Ju(n,f,r),Ju(n<120?n+240:n-120,f,r),this.opacity)},clamp(){return new un(fx(this.h),tr(this.s),tr(this.l),gr(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 n=gr(this.opacity);return`${n===1?"hsl(":"hsla("}${fx(this.h)}, ${tr(this.s)*100}%, ${tr(this.l)*100}%${n===1?")":`, ${n})`}`}}));function fx(n){return n=(n||0)%360,n<0?n+360:n}function tr(n){return Math.max(0,Math.min(1,n||0))}function Ju(n,s,i){return(n<60?s+(i-s)*n/60:n<180?i:n<240?s+(i-s)*(240-n)/60:s)*255}const zp=n=>()=>n;function zw(n,s){return function(i){return n+i*s}}function Mw(n,s,i){return n=Math.pow(n,i),s=Math.pow(s,i)-n,i=1/i,function(r){return Math.pow(n+r*s,i)}}function Aw(n){return(n=+n)==1?Mp:function(s,i){return i-s?Mw(s,i,n):zp(isNaN(s)?i:s)}}function Mp(n,s){var i=s-n;return i?zw(n,i):zp(isNaN(n)?s:n)}const dx=(function n(s){var i=Aw(s);function r(f,d){var h=i((f=hf(f)).r,(d=hf(d)).r),x=i(f.g,d.g),p=i(f.b,d.b),m=Mp(f.opacity,d.opacity);return function(g){return f.r=h(g),f.g=x(g),f.b=p(g),f.opacity=m(g),f+""}}return r.gamma=n,r})(1);function El(n,s){return n=+n,s=+s,function(i){return n*(1-i)+s*i}}var mf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wu=new RegExp(mf.source,"g");function Tw(n){return function(){return n}}function Cw(n){return function(s){return n(s)+""}}function Rw(n,s){var i=mf.lastIndex=Wu.lastIndex=0,r,f,d,h=-1,x=[],p=[];for(n=n+"",s=s+"";(r=mf.exec(n))&&(f=Wu.exec(s));)(d=f.index)>i&&(d=s.slice(i,d),x[h]?x[h]+=d:x[++h]=d),(r=r[0])===(f=f[0])?x[h]?x[h]+=f:x[++h]=f:(x[++h]=null,p.push({i:h,x:El(r,f)})),i=Wu.lastIndex;return i<s.length&&(d=s.slice(i),x[h]?x[h]+=d:x[++h]=d),x.length<2?p[0]?Cw(p[0].x):Tw(s):(s=p.length,function(m){for(var g=0,b;g<s;++g)x[(b=p[g]).i]=b.x(m);return x.join("")})}var hx=180/Math.PI,xf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ap(n,s,i,r,f,d){var h,x,p;return(h=Math.sqrt(n*n+s*s))&&(n/=h,s/=h),(p=n*i+s*r)&&(i-=n*p,r-=s*p),(x=Math.sqrt(i*i+r*r))&&(i/=x,r/=x,p/=x),n*r<s*i&&(n=-n,s=-s,p=-p,h=-h),{translateX:f,translateY:d,rotate:Math.atan2(s,n)*hx,skewX:Math.atan(p)*hx,scaleX:h,scaleY:x}}var nr;function Dw(n){const s=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return s.isIdentity?xf:Ap(s.a,s.b,s.c,s.d,s.e,s.f)}function Ow(n){return n==null||(nr||(nr=document.createElementNS("http://www.w3.org/2000/svg","g")),nr.setAttribute("transform",n),!(n=nr.transform.baseVal.consolidate()))?xf:(n=n.matrix,Ap(n.a,n.b,n.c,n.d,n.e,n.f))}function Tp(n,s,i,r){function f(m){return m.length?m.pop()+" ":""}function d(m,g,b,w,j,T){if(m!==b||g!==w){var M=j.push("translate(",null,s,null,i);T.push({i:M-4,x:El(m,b)},{i:M-2,x:El(g,w)})}else(b||w)&&j.push("translate("+b+s+w+i)}function h(m,g,b,w){m!==g?(m-g>180?g+=360:g-m>180&&(m+=360),w.push({i:b.push(f(b)+"rotate(",null,r)-2,x:El(m,g)})):g&&b.push(f(b)+"rotate("+g+r)}function x(m,g,b,w){m!==g?w.push({i:b.push(f(b)+"skewX(",null,r)-2,x:El(m,g)}):g&&b.push(f(b)+"skewX("+g+r)}function p(m,g,b,w,j,T){if(m!==b||g!==w){var M=j.push(f(j)+"scale(",null,",",null,")");T.push({i:M-4,x:El(m,b)},{i:M-2,x:El(g,w)})}else(b!==1||w!==1)&&j.push(f(j)+"scale("+b+","+w+")")}return function(m,g){var b=[],w=[];return m=n(m),g=n(g),d(m.translateX,m.translateY,g.translateX,g.translateY,b,w),h(m.rotate,g.rotate,b,w),x(m.skewX,g.skewX,b,w),p(m.scaleX,m.scaleY,g.scaleX,g.scaleY,b,w),m=g=null,function(j){for(var T=-1,M=w.length,A;++T<M;)b[(A=w[T]).i]=A.x(j);return b.join("")}}}var kw=Tp(Dw,"px, ","px)","deg)"),Hw=Tp(Ow,", ",")",")"),Uw=1e-12;function mx(n){return((n=Math.exp(n))+1/n)/2}function Bw(n){return((n=Math.exp(n))-1/n)/2}function qw(n){return((n=Math.exp(2*n))-1)/(n+1)}const Lw=(function n(s,i,r){function f(d,h){var x=d[0],p=d[1],m=d[2],g=h[0],b=h[1],w=h[2],j=g-x,T=b-p,M=j*j+T*T,A,C;if(M<Uw)C=Math.log(w/m)/s,A=function(L){return[x+L*j,p+L*T,m*Math.exp(s*L*C)]};else{var H=Math.sqrt(M),V=(w*w-m*m+r*M)/(2*m*i*H),R=(w*w-m*m-r*M)/(2*w*i*H),G=Math.log(Math.sqrt(V*V+1)-V),O=Math.log(Math.sqrt(R*R+1)-R);C=(O-G)/s,A=function(L){var F=L*C,W=mx(G),le=m/(i*H)*(W*qw(s*F+G)-Bw(G));return[x+le*j,p+le*T,m*W/mx(s*F+G)]}}return A.duration=C*1e3*s/Math.SQRT2,A}return f.rho=function(d){var h=Math.max(.001,+d),x=h*h,p=x*x;return n(h,x,p)},f})(Math.SQRT2,2,4);var ls=0,xi=0,oi=0,Cp=1e3,yr,pi,br=0,na=0,Er=0,Si=typeof performance=="object"&&performance.now?performance:Date,Rp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function Hf(){return na||(Rp(Yw),na=Si.now()+Er)}function Yw(){na=0}function vr(){this._call=this._time=this._next=null}vr.prototype=Dp.prototype={constructor:vr,restart:function(n,s,i){if(typeof n!="function")throw new TypeError("callback is not a function");i=(i==null?Hf():+i)+(s==null?0:+s),!this._next&&pi!==this&&(pi?pi._next=this:yr=this,pi=this),this._call=n,this._time=i,pf()},stop:function(){this._call&&(this._call=null,this._time=1/0,pf())}};function Dp(n,s,i){var r=new vr;return r.restart(n,s,i),r}function Vw(){Hf(),++ls;for(var n=yr,s;n;)(s=na-n._time)>=0&&n._call.call(void 0,s),n=n._next;--ls}function xx(){na=(br=Si.now())+Er,ls=xi=0;try{Vw()}finally{ls=0,Gw(),na=0}}function $w(){var n=Si.now(),s=n-br;s>Cp&&(Er-=s,br=n)}function Gw(){for(var n,s=yr,i,r=1/0;s;)s._call?(r>s._time&&(r=s._time),n=s,s=s._next):(i=s._next,s._next=null,s=n?n._next=i:yr=i);pi=n,pf(r)}function pf(n){if(!ls){xi&&(xi=clearTimeout(xi));var s=n-na;s>24?(n<1/0&&(xi=setTimeout(xx,n-Si.now()-Er)),oi&&(oi=clearInterval(oi))):(oi||(br=Si.now(),oi=setInterval($w,Cp)),ls=1,Rp(xx))}}function px(n,s,i){var r=new vr;return s=s==null?0:+s,r.restart(f=>{r.stop(),n(f+s)},s,i),r}var Xw=Sr("start","end","cancel","interrupt"),Zw=[],Op=0,gx=1,gf=2,ur=3,yx=4,yf=5,fr=6;function _r(n,s,i,r,f,d){var h=n.__transition;if(!h)n.__transition={};else if(i in h)return;Qw(n,i,{name:s,index:r,group:f,on:Xw,tween:Zw,time:d.time,delay:d.delay,duration:d.duration,ease:d.ease,timer:null,state:Op})}function Uf(n,s){var i=hn(n,s);if(i.state>Op)throw new Error("too late; already scheduled");return i}function jn(n,s){var i=hn(n,s);if(i.state>ur)throw new Error("too late; already running");return i}function hn(n,s){var i=n.__transition;if(!i||!(i=i[s]))throw new Error("transition not found");return i}function Qw(n,s,i){var r=n.__transition,f;r[s]=i,i.timer=Dp(d,0,i.time);function d(m){i.state=gx,i.timer.restart(h,i.delay,i.time),i.delay<=m&&h(m-i.delay)}function h(m){var g,b,w,j;if(i.state!==gx)return p();for(g in r)if(j=r[g],j.name===i.name){if(j.state===ur)return px(h);j.state===yx?(j.state=fr,j.timer.stop(),j.on.call("interrupt",n,n.__data__,j.index,j.group),delete r[g]):+g<s&&(j.state=fr,j.timer.stop(),j.on.call("cancel",n,n.__data__,j.index,j.group),delete r[g])}if(px(function(){i.state===ur&&(i.state=yx,i.timer.restart(x,i.delay,i.time),x(m))}),i.state=gf,i.on.call("start",n,n.__data__,i.index,i.group),i.state===gf){for(i.state=ur,f=new Array(w=i.tween.length),g=0,b=-1;g<w;++g)(j=i.tween[g].value.call(n,n.__data__,i.index,i.group))&&(f[++b]=j);f.length=b+1}}function x(m){for(var g=m<i.duration?i.ease.call(null,m/i.duration):(i.timer.restart(p),i.state=yf,1),b=-1,w=f.length;++b<w;)f[b].call(n,g);i.state===yf&&(i.on.call("end",n,n.__data__,i.index,i.group),p())}function p(){i.state=fr,i.timer.stop(),delete r[s];for(var m in r)return;delete n.__transition}}function dr(n,s){var i=n.__transition,r,f,d=!0,h;if(i){s=s==null?null:s+"";for(h in i){if((r=i[h]).name!==s){d=!1;continue}f=r.state>gf&&r.state<yf,r.state=fr,r.timer.stop(),r.on.call(f?"interrupt":"cancel",n,n.__data__,r.index,r.group),delete i[h]}d&&delete n.__transition}}function Kw(n){return this.each(function(){dr(this,n)})}function Jw(n,s){var i,r;return function(){var f=jn(this,n),d=f.tween;if(d!==i){r=i=d;for(var h=0,x=r.length;h<x;++h)if(r[h].name===s){r=r.slice(),r.splice(h,1);break}}f.tween=r}}function Ww(n,s,i){var r,f;if(typeof i!="function")throw new Error;return function(){var d=jn(this,n),h=d.tween;if(h!==r){f=(r=h).slice();for(var x={name:s,value:i},p=0,m=f.length;p<m;++p)if(f[p].name===s){f[p]=x;break}p===m&&f.push(x)}d.tween=f}}function Fw(n,s){var i=this._id;if(n+="",arguments.length<2){for(var r=hn(this.node(),i).tween,f=0,d=r.length,h;f<d;++f)if((h=r[f]).name===n)return h.value;return null}return this.each((s==null?Jw:Ww)(i,n,s))}function Bf(n,s,i){var r=n._id;return n.each(function(){var f=jn(this,r);(f.value||(f.value={}))[s]=i.apply(this,arguments)}),function(f){return hn(f,r).value[s]}}function kp(n,s){var i;return(typeof s=="number"?El:s instanceof Ni?dx:(i=Ni(s))?(s=i,dx):Rw)(n,s)}function Iw(n){return function(){this.removeAttribute(n)}}function Pw(n){return function(){this.removeAttributeNS(n.space,n.local)}}function e5(n,s,i){var r,f=i+"",d;return function(){var h=this.getAttribute(n);return h===f?null:h===r?d:d=s(r=h,i)}}function t5(n,s,i){var r,f=i+"",d;return function(){var h=this.getAttributeNS(n.space,n.local);return h===f?null:h===r?d:d=s(r=h,i)}}function n5(n,s,i){var r,f,d;return function(){var h,x=i(this),p;return x==null?void this.removeAttribute(n):(h=this.getAttribute(n),p=x+"",h===p?null:h===r&&p===f?d:(f=p,d=s(r=h,x)))}}function l5(n,s,i){var r,f,d;return function(){var h,x=i(this),p;return x==null?void this.removeAttributeNS(n.space,n.local):(h=this.getAttributeNS(n.space,n.local),p=x+"",h===p?null:h===r&&p===f?d:(f=p,d=s(r=h,x)))}}function a5(n,s){var i=jr(n),r=i==="transform"?Hw:kp;return this.attrTween(n,typeof s=="function"?(i.local?l5:n5)(i,r,Bf(this,"attr."+n,s)):s==null?(i.local?Pw:Iw)(i):(i.local?t5:e5)(i,r,s))}function s5(n,s){return function(i){this.setAttribute(n,s.call(this,i))}}function i5(n,s){return function(i){this.setAttributeNS(n.space,n.local,s.call(this,i))}}function c5(n,s){var i,r;function f(){var d=s.apply(this,arguments);return d!==r&&(i=(r=d)&&i5(n,d)),i}return f._value=s,f}function r5(n,s){var i,r;function f(){var d=s.apply(this,arguments);return d!==r&&(i=(r=d)&&s5(n,d)),i}return f._value=s,f}function o5(n,s){var i="attr."+n;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(s==null)return this.tween(i,null);if(typeof s!="function")throw new Error;var r=jr(n);return this.tween(i,(r.local?c5:r5)(r,s))}function u5(n,s){return function(){Uf(this,n).delay=+s.apply(this,arguments)}}function f5(n,s){return s=+s,function(){Uf(this,n).delay=s}}function d5(n){var s=this._id;return arguments.length?this.each((typeof n=="function"?u5:f5)(s,n)):hn(this.node(),s).delay}function h5(n,s){return function(){jn(this,n).duration=+s.apply(this,arguments)}}function m5(n,s){return s=+s,function(){jn(this,n).duration=s}}function x5(n){var s=this._id;return arguments.length?this.each((typeof n=="function"?h5:m5)(s,n)):hn(this.node(),s).duration}function p5(n,s){if(typeof s!="function")throw new Error;return function(){jn(this,n).ease=s}}function g5(n){var s=this._id;return arguments.length?this.each(p5(s,n)):hn(this.node(),s).ease}function y5(n,s){return function(){var i=s.apply(this,arguments);if(typeof i!="function")throw new Error;jn(this,n).ease=i}}function b5(n){if(typeof n!="function")throw new Error;return this.each(y5(this._id,n))}function v5(n){typeof n!="function"&&(n=hp(n));for(var s=this._groups,i=s.length,r=new Array(i),f=0;f<i;++f)for(var d=s[f],h=d.length,x=r[f]=[],p,m=0;m<h;++m)(p=d[m])&&n.call(p,p.__data__,m,d)&&x.push(p);return new Xn(r,this._parents,this._name,this._id)}function w5(n){if(n._id!==this._id)throw new Error;for(var s=this._groups,i=n._groups,r=s.length,f=i.length,d=Math.min(r,f),h=new Array(r),x=0;x<d;++x)for(var p=s[x],m=i[x],g=p.length,b=h[x]=new Array(g),w,j=0;j<g;++j)(w=p[j]||m[j])&&(b[j]=w);for(;x<r;++x)h[x]=s[x];return new Xn(h,this._parents,this._name,this._id)}function N5(n){return(n+"").trim().split(/^|\s+/).every(function(s){var i=s.indexOf(".");return i>=0&&(s=s.slice(0,i)),!s||s==="start"})}function S5(n,s,i){var r,f,d=N5(s)?Uf:jn;return function(){var h=d(this,n),x=h.on;x!==r&&(f=(r=x).copy()).on(s,i),h.on=f}}function j5(n,s){var i=this._id;return arguments.length<2?hn(this.node(),i).on.on(n):this.each(S5(i,n,s))}function E5(n){return function(){var s=this.parentNode;for(var i in this.__transition)if(+i!==n)return;s&&s.removeChild(this)}}function _5(){return this.on("end.remove",E5(this._id))}function z5(n){var s=this._name,i=this._id;typeof n!="function"&&(n=Df(n));for(var r=this._groups,f=r.length,d=new Array(f),h=0;h<f;++h)for(var x=r[h],p=x.length,m=d[h]=new Array(p),g,b,w=0;w<p;++w)(g=x[w])&&(b=n.call(g,g.__data__,w,x))&&("__data__"in g&&(b.__data__=g.__data__),m[w]=b,_r(m[w],s,i,w,m,hn(g,i)));return new Xn(d,this._parents,s,i)}function M5(n){var s=this._name,i=this._id;typeof n!="function"&&(n=dp(n));for(var r=this._groups,f=r.length,d=[],h=[],x=0;x<f;++x)for(var p=r[x],m=p.length,g,b=0;b<m;++b)if(g=p[b]){for(var w=n.call(g,g.__data__,b,p),j,T=hn(g,i),M=0,A=w.length;M<A;++M)(j=w[M])&&_r(j,s,i,M,w,T);d.push(w),h.push(g)}return new Xn(d,h,s,i)}var A5=Ti.prototype.constructor;function T5(){return new A5(this._groups,this._parents)}function C5(n,s){var i,r,f;return function(){var d=ns(this,n),h=(this.style.removeProperty(n),ns(this,n));return d===h?null:d===i&&h===r?f:f=s(i=d,r=h)}}function Hp(n){return function(){this.style.removeProperty(n)}}function R5(n,s,i){var r,f=i+"",d;return function(){var h=ns(this,n);return h===f?null:h===r?d:d=s(r=h,i)}}function D5(n,s,i){var r,f,d;return function(){var h=ns(this,n),x=i(this),p=x+"";return x==null&&(p=x=(this.style.removeProperty(n),ns(this,n))),h===p?null:h===r&&p===f?d:(f=p,d=s(r=h,x))}}function O5(n,s){var i,r,f,d="style."+s,h="end."+d,x;return function(){var p=jn(this,n),m=p.on,g=p.value[d]==null?x||(x=Hp(s)):void 0;(m!==i||f!==g)&&(r=(i=m).copy()).on(h,f=g),p.on=r}}function k5(n,s,i){var r=(n+="")=="transform"?kw:kp;return s==null?this.styleTween(n,C5(n,r)).on("end.style."+n,Hp(n)):typeof s=="function"?this.styleTween(n,D5(n,r,Bf(this,"style."+n,s))).each(O5(this._id,n)):this.styleTween(n,R5(n,r,s),i).on("end.style."+n,null)}function H5(n,s,i){return function(r){this.style.setProperty(n,s.call(this,r),i)}}function U5(n,s,i){var r,f;function d(){var h=s.apply(this,arguments);return h!==f&&(r=(f=h)&&H5(n,h,i)),r}return d._value=s,d}function B5(n,s,i){var r="style."+(n+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(s==null)return this.tween(r,null);if(typeof s!="function")throw new Error;return this.tween(r,U5(n,s,i??""))}function q5(n){return function(){this.textContent=n}}function L5(n){return function(){var s=n(this);this.textContent=s??""}}function Y5(n){return this.tween("text",typeof n=="function"?L5(Bf(this,"text",n)):q5(n==null?"":n+""))}function V5(n){return function(s){this.textContent=n.call(this,s)}}function $5(n){var s,i;function r(){var f=n.apply(this,arguments);return f!==i&&(s=(i=f)&&V5(f)),s}return r._value=n,r}function G5(n){var s="text";if(arguments.length<1)return(s=this.tween(s))&&s._value;if(n==null)return this.tween(s,null);if(typeof n!="function")throw new Error;return this.tween(s,$5(n))}function X5(){for(var n=this._name,s=this._id,i=Up(),r=this._groups,f=r.length,d=0;d<f;++d)for(var h=r[d],x=h.length,p,m=0;m<x;++m)if(p=h[m]){var g=hn(p,s);_r(p,n,i,m,h,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new Xn(r,this._parents,n,i)}function Z5(){var n,s,i=this,r=i._id,f=i.size();return new Promise(function(d,h){var x={value:h},p={value:function(){--f===0&&d()}};i.each(function(){var m=jn(this,r),g=m.on;g!==n&&(s=(n=g).copy(),s._.cancel.push(x),s._.interrupt.push(x),s._.end.push(p)),m.on=s}),f===0&&d()})}var Q5=0;function Xn(n,s,i,r){this._groups=n,this._parents=s,this._name=i,this._id=r}function Up(){return++Q5}var $n=Ti.prototype;Xn.prototype={constructor:Xn,select:z5,selectAll:M5,selectChild:$n.selectChild,selectChildren:$n.selectChildren,filter:v5,merge:w5,selection:T5,transition:X5,call:$n.call,nodes:$n.nodes,node:$n.node,size:$n.size,empty:$n.empty,each:$n.each,on:j5,attr:a5,attrTween:o5,style:k5,styleTween:B5,text:Y5,textTween:G5,remove:_5,tween:Fw,delay:d5,duration:x5,ease:g5,easeVarying:b5,end:Z5,[Symbol.iterator]:$n[Symbol.iterator]};function K5(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var J5={time:null,delay:0,duration:250,ease:K5};function W5(n,s){for(var i;!(i=n.__transition)||!(i=i[s]);)if(!(n=n.parentNode))throw new Error(`transition ${s} not found`);return i}function F5(n){var s,i;n instanceof Xn?(s=n._id,n=n._name):(s=Up(),(i=J5).time=Hf(),n=n==null?null:n+"");for(var r=this._groups,f=r.length,d=0;d<f;++d)for(var h=r[d],x=h.length,p,m=0;m<x;++m)(p=h[m])&&_r(p,n,s,m,h,i||W5(p,s));return new Xn(r,this._parents,n,s)}Ti.prototype.interrupt=Kw;Ti.prototype.transition=F5;const lr=n=>()=>n;function I5(n,{sourceEvent:s,target:i,transform:r,dispatch:f}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:s,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:f}})}function Gn(n,s,i){this.k=n,this.x=s,this.y=i}Gn.prototype={constructor:Gn,scale:function(n){return n===1?this:new Gn(this.k*n,this.x,this.y)},translate:function(n,s){return n===0&s===0?this:new Gn(this.k,this.x+this.k*n,this.y+this.k*s)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ml=new Gn(1,0,0);Gn.prototype;function Fu(n){n.stopImmediatePropagation()}function ui(n){n.preventDefault(),n.stopImmediatePropagation()}function P5(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function eN(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function bx(){return this.__zoom||Ml}function tN(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function nN(){return navigator.maxTouchPoints||"ontouchstart"in this}function lN(n,s,i){var r=n.invertX(s[0][0])-i[0][0],f=n.invertX(s[1][0])-i[1][0],d=n.invertY(s[0][1])-i[0][1],h=n.invertY(s[1][1])-i[1][1];return n.translate(f>r?(r+f)/2:Math.min(0,r)||Math.max(0,f),h>d?(d+h)/2:Math.min(0,d)||Math.max(0,h))}function aN(){var n=P5,s=eN,i=lN,r=tN,f=nN,d=[0,1/0],h=[[-1/0,-1/0],[1/0,1/0]],x=250,p=Lw,m=Sr("start","zoom","end"),g,b,w,j=500,T=150,M=0,A=10;function C(E){E.property("__zoom",bx).on("wheel.zoom",F,{passive:!1}).on("mousedown.zoom",W).on("dblclick.zoom",le).filter(f).on("touchstart.zoom",se).on("touchmove.zoom",ce).on("touchend.zoom touchcancel.zoom",ie).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(E,J,S,U){var Z=E.selection?E.selection():E;Z.property("__zoom",bx),E!==Z?G(E,J,S,U):Z.interrupt().each(function(){O(this,arguments).event(U).start().zoom(null,typeof J=="function"?J.apply(this,arguments):J).end()})},C.scaleBy=function(E,J,S,U){C.scaleTo(E,function(){var Z=this.__zoom.k,q=typeof J=="function"?J.apply(this,arguments):J;return Z*q},S,U)},C.scaleTo=function(E,J,S,U){C.transform(E,function(){var Z=s.apply(this,arguments),q=this.__zoom,N=S==null?R(Z):typeof S=="function"?S.apply(this,arguments):S,k=q.invert(N),Q=typeof J=="function"?J.apply(this,arguments):J;return i(V(H(q,Q),N,k),Z,h)},S,U)},C.translateBy=function(E,J,S,U){C.transform(E,function(){return i(this.__zoom.translate(typeof J=="function"?J.apply(this,arguments):J,typeof S=="function"?S.apply(this,arguments):S),s.apply(this,arguments),h)},null,U)},C.translateTo=function(E,J,S,U,Z){C.transform(E,function(){var q=s.apply(this,arguments),N=this.__zoom,k=U==null?R(q):typeof U=="function"?U.apply(this,arguments):U;return i(Ml.translate(k[0],k[1]).scale(N.k).translate(typeof J=="function"?-J.apply(this,arguments):-J,typeof S=="function"?-S.apply(this,arguments):-S),q,h)},U,Z)};function H(E,J){return J=Math.max(d[0],Math.min(d[1],J)),J===E.k?E:new Gn(J,E.x,E.y)}function V(E,J,S){var U=J[0]-S[0]*E.k,Z=J[1]-S[1]*E.k;return U===E.x&&Z===E.y?E:new Gn(E.k,U,Z)}function R(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function G(E,J,S,U){E.on("start.zoom",function(){O(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(U).end()}).tween("zoom",function(){var Z=this,q=arguments,N=O(Z,q).event(U),k=s.apply(Z,q),Q=S==null?R(k):typeof S=="function"?S.apply(Z,q):S,I=Math.max(k[1][0]-k[0][0],k[1][1]-k[0][1]),ne=Z.__zoom,oe=typeof J=="function"?J.apply(Z,q):J,re=p(ne.invert(Q).concat(I/ne.k),oe.invert(Q).concat(I/oe.k));return function(be){if(be===1)be=oe;else{var me=re(be),Ae=I/me[2];be=new Gn(Ae,Q[0]-me[0]*Ae,Q[1]-me[1]*Ae)}N.zoom(null,be)}})}function O(E,J,S){return!S&&E.__zooming||new L(E,J)}function L(E,J){this.that=E,this.args=J,this.active=0,this.sourceEvent=null,this.extent=s.apply(E,J),this.taps=0}L.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,J){return this.mouse&&E!=="mouse"&&(this.mouse[1]=J.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=J.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=J.invert(this.touch1[0])),this.that.__zoom=J,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var J=on(this.that).datum();m.call(E,this.that,new I5(E,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:m}),J)}};function F(E,...J){if(!n.apply(this,arguments))return;var S=O(this,J).event(E),U=this.__zoom,Z=Math.max(d[0],Math.min(d[1],U.k*Math.pow(2,r.apply(this,arguments)))),q=Nn(E);if(S.wheel)(S.mouse[0][0]!==q[0]||S.mouse[0][1]!==q[1])&&(S.mouse[1]=U.invert(S.mouse[0]=q)),clearTimeout(S.wheel);else{if(U.k===Z)return;S.mouse=[q,U.invert(q)],dr(this),S.start()}ui(E),S.wheel=setTimeout(N,T),S.zoom("mouse",i(V(H(U,Z),S.mouse[0],S.mouse[1]),S.extent,h));function N(){S.wheel=null,S.end()}}function W(E,...J){if(w||!n.apply(this,arguments))return;var S=E.currentTarget,U=O(this,J,!0).event(E),Z=on(E.view).on("mousemove.zoom",Q,!0).on("mouseup.zoom",I,!0),q=Nn(E,S),N=E.clientX,k=E.clientY;Sp(E.view),Fu(E),U.mouse=[q,this.__zoom.invert(q)],dr(this),U.start();function Q(ne){if(ui(ne),!U.moved){var oe=ne.clientX-N,re=ne.clientY-k;U.moved=oe*oe+re*re>M}U.event(ne).zoom("mouse",i(V(U.that.__zoom,U.mouse[0]=Nn(ne,S),U.mouse[1]),U.extent,h))}function I(ne){Z.on("mousemove.zoom mouseup.zoom",null),jp(ne.view,U.moved),ui(ne),U.event(ne).end()}}function le(E,...J){if(n.apply(this,arguments)){var S=this.__zoom,U=Nn(E.changedTouches?E.changedTouches[0]:E,this),Z=S.invert(U),q=S.k*(E.shiftKey?.5:2),N=i(V(H(S,q),U,Z),s.apply(this,J),h);ui(E),x>0?on(this).transition().duration(x).call(G,N,U,E):on(this).call(C.transform,N,U,E)}}function se(E,...J){if(n.apply(this,arguments)){var S=E.touches,U=S.length,Z=O(this,J,E.changedTouches.length===U).event(E),q,N,k,Q;for(Fu(E),N=0;N<U;++N)k=S[N],Q=Nn(k,this),Q=[Q,this.__zoom.invert(Q),k.identifier],Z.touch0?!Z.touch1&&Z.touch0[2]!==Q[2]&&(Z.touch1=Q,Z.taps=0):(Z.touch0=Q,q=!0,Z.taps=1+!!g);g&&(g=clearTimeout(g)),q&&(Z.taps<2&&(b=Q[0],g=setTimeout(function(){g=null},j)),dr(this),Z.start())}}function ce(E,...J){if(this.__zooming){var S=O(this,J).event(E),U=E.changedTouches,Z=U.length,q,N,k,Q;for(ui(E),q=0;q<Z;++q)N=U[q],k=Nn(N,this),S.touch0&&S.touch0[2]===N.identifier?S.touch0[0]=k:S.touch1&&S.touch1[2]===N.identifier&&(S.touch1[0]=k);if(N=S.that.__zoom,S.touch1){var I=S.touch0[0],ne=S.touch0[1],oe=S.touch1[0],re=S.touch1[1],be=(be=oe[0]-I[0])*be+(be=oe[1]-I[1])*be,me=(me=re[0]-ne[0])*me+(me=re[1]-ne[1])*me;N=H(N,Math.sqrt(be/me)),k=[(I[0]+oe[0])/2,(I[1]+oe[1])/2],Q=[(ne[0]+re[0])/2,(ne[1]+re[1])/2]}else if(S.touch0)k=S.touch0[0],Q=S.touch0[1];else return;S.zoom("touch",i(V(N,k,Q),S.extent,h))}}function ie(E,...J){if(this.__zooming){var S=O(this,J).event(E),U=E.changedTouches,Z=U.length,q,N;for(Fu(E),w&&clearTimeout(w),w=setTimeout(function(){w=null},j),q=0;q<Z;++q)N=U[q],S.touch0&&S.touch0[2]===N.identifier?delete S.touch0:S.touch1&&S.touch1[2]===N.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(N=Nn(N,this),Math.hypot(b[0]-N[0],b[1]-N[1])<A)){var k=on(this).on("dblclick.zoom");k&&k.apply(this,arguments)}}}return C.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:lr(+E),C):r},C.filter=function(E){return arguments.length?(n=typeof E=="function"?E:lr(!!E),C):n},C.touchable=function(E){return arguments.length?(f=typeof E=="function"?E:lr(!!E),C):f},C.extent=function(E){return arguments.length?(s=typeof E=="function"?E:lr([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),C):s},C.scaleExtent=function(E){return arguments.length?(d[0]=+E[0],d[1]=+E[1],C):[d[0],d[1]]},C.translateExtent=function(E){return arguments.length?(h[0][0]=+E[0][0],h[1][0]=+E[1][0],h[0][1]=+E[0][1],h[1][1]=+E[1][1],C):[[h[0][0],h[0][1]],[h[1][0],h[1][1]]]},C.constrain=function(E){return arguments.length?(i=E,C):i},C.duration=function(E){return arguments.length?(x=+E,C):x},C.interpolate=function(E){return arguments.length?(p=E,C):p},C.on=function(){var E=m.on.apply(m,arguments);return E===m?C:E},C.clickDistance=function(E){return arguments.length?(M=(E=+E)*E,C):Math.sqrt(M)},C.tapDistance=function(E){return arguments.length?(A=+E,C):A},C}Ix();const zr=_.createContext(null),sN=zr.Provider,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:n=>`Node type "${n}" 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:n=>`The old edge with id=${n} does not exist.`,error009:n=>`Marker type "${n}" doesn't exist.`,error008:(n,s)=>`Couldn't create edge for ${n?"target":"source"} handle id: "${n?s.targetHandle:s.sourceHandle}", edge id: ${s.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:n=>`Edge type "${n}" not found. Using fallback type "default".`,error012:n=>`Node with id "${n}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},Bp=Zn.error001();function Ve(n,s){const i=_.useContext(zr);if(i===null)throw new Error(Bp);return up(i,n,s)}const ct=()=>{const n=_.useContext(zr);if(n===null)throw new Error(Bp);return _.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe,destroy:n.destroy}),[n])},iN=n=>n.userSelectionActive?"none":"all";function qp({position:n,children:s,className:i,style:r,...f}){const d=Ve(iN),h=`${n}`.split("-");return ee.createElement("div",{className:jt(["react-flow__panel",i,...h]),style:{...r,pointerEvents:d},...f},s)}function cN({proOptions:n,position:s="bottom-right"}){return n?.hideAttribution?null:ee.createElement(qp,{position:s,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},ee.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const rN=({x:n,y:s,label:i,labelStyle:r={},labelShowBg:f=!0,labelBgStyle:d={},labelBgPadding:h=[2,4],labelBgBorderRadius:x=2,children:p,className:m,...g})=>{const b=_.useRef(null),[w,j]=_.useState({x:0,y:0,width:0,height:0}),T=jt(["react-flow__edge-textwrapper",m]);return _.useEffect(()=>{if(b.current){const M=b.current.getBBox();j({x:M.x,y:M.y,width:M.width,height:M.height})}},[i]),typeof i>"u"||!i?null:ee.createElement("g",{transform:`translate(${n-w.width/2} ${s-w.height/2})`,className:T,visibility:w.width?"visible":"hidden",...g},f&&ee.createElement("rect",{width:w.width+2*h[0],x:-h[0],y:-h[1],height:w.height+2*h[1],className:"react-flow__edge-textbg",style:d,rx:x,ry:x}),ee.createElement("text",{className:"react-flow__edge-text",y:w.height/2,dy:"0.3em",ref:b,style:r},i),p)};var oN=_.memo(rN);const qf=n=>({width:n.offsetWidth,height:n.offsetHeight}),as=(n,s=0,i=1)=>Math.min(Math.max(n,s),i),Lf=(n={x:0,y:0},s)=>({x:as(n.x,s[0][0],s[1][0]),y:as(n.y,s[0][1],s[1][1])}),vx=(n,s,i)=>n<s?as(Math.abs(n-s),1,50)/50:n>i?-as(Math.abs(n-i),1,50)/50:0,Lp=(n,s)=>{const i=vx(n.x,35,s.width-35)*20,r=vx(n.y,35,s.height-35)*20;return[i,r]},Yp=n=>n.getRootNode?.()||window?.document,uN=(n,s)=>({x:Math.min(n.x,s.x),y:Math.min(n.y,s.y),x2:Math.max(n.x2,s.x2),y2:Math.max(n.y2,s.y2)}),Yf=({x:n,y:s,width:i,height:r})=>({x:n,y:s,x2:n+i,y2:s+r}),fN=({x:n,y:s,x2:i,y2:r})=>({x:n,y:s,width:i-n,height:r-s}),wx=n=>({...n.positionAbsolute||{x:0,y:0},width:n.width||0,height:n.height||0}),bf=(n,s)=>{const i=Math.max(0,Math.min(n.x+n.width,s.x+s.width)-Math.max(n.x,s.x)),r=Math.max(0,Math.min(n.y+n.height,s.y+s.height)-Math.max(n.y,s.y));return Math.ceil(i*r)},dN=n=>tn(n.width)&&tn(n.height)&&tn(n.x)&&tn(n.y),tn=n=>!isNaN(n)&&isFinite(n),Xe=Symbol.for("internals"),Vp=["Enter"," ","Escape"],hN=(n,s)=>{},mN=n=>"nativeEvent"in n;function vf(n){const i=(mN(n)?n.nativeEvent:n).composedPath?.()?.[0]||n.target;return["INPUT","SELECT","TEXTAREA"].includes(i?.nodeName)||i?.hasAttribute("contenteditable")||!!i?.closest(".nokey")}const $p=n=>"clientX"in n,Al=(n,s)=>{const i=$p(n),r=i?n.clientX:n.touches?.[0].clientX,f=i?n.clientY:n.touches?.[0].clientY;return{x:r-(s?.left??0),y:f-(s?.top??0)}},wr=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,Ri=({id:n,path:s,labelX:i,labelY:r,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:w,interactionWidth:j=20})=>ee.createElement(ee.Fragment,null,ee.createElement("path",{id:n,style:g,d:s,fill:"none",className:"react-flow__edge-path",markerEnd:b,markerStart:w}),j&&ee.createElement("path",{d:s,fill:"none",strokeOpacity:0,strokeWidth:j,className:"react-flow__edge-interaction"}),f&&tn(i)&&tn(r)?ee.createElement(oN,{x:i,y:r,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:m}):null);Ri.displayName="BaseEdge";function fi(n,s,i){return i===void 0?i:r=>{const f=s().edges.find(d=>d.id===n);f&&i(r,{...f})}}function Gp({sourceX:n,sourceY:s,targetX:i,targetY:r}){const f=Math.abs(i-n)/2,d=i<n?i+f:i-f,h=Math.abs(r-s)/2,x=r<s?r+h:r-h;return[d,x,f,h]}function Xp({sourceX:n,sourceY:s,targetX:i,targetY:r,sourceControlX:f,sourceControlY:d,targetControlX:h,targetControlY:x}){const p=n*.125+f*.375+h*.375+i*.125,m=s*.125+d*.375+x*.375+r*.125,g=Math.abs(p-n),b=Math.abs(m-s);return[p,m,g,b]}var la;(function(n){n.Strict="strict",n.Loose="loose"})(la||(la={}));var ea;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(ea||(ea={}));var ji;(function(n){n.Partial="partial",n.Full="full"})(ji||(ji={}));var zl;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(zl||(zl={}));var Ei;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(Ei||(Ei={}));var de;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(de||(de={}));function Nx({pos:n,x1:s,y1:i,x2:r,y2:f}){return n===de.Left||n===de.Right?[.5*(s+r),i]:[s,.5*(i+f)]}function Zp({sourceX:n,sourceY:s,sourcePosition:i=de.Bottom,targetX:r,targetY:f,targetPosition:d=de.Top}){const[h,x]=Nx({pos:i,x1:n,y1:s,x2:r,y2:f}),[p,m]=Nx({pos:d,x1:r,y1:f,x2:n,y2:s}),[g,b,w,j]=Xp({sourceX:n,sourceY:s,targetX:r,targetY:f,sourceControlX:h,sourceControlY:x,targetControlX:p,targetControlY:m});return[`M${n},${s} C${h},${x} ${p},${m} ${r},${f}`,g,b,w,j]}const Vf=_.memo(({sourceX:n,sourceY:s,targetX:i,targetY:r,sourcePosition:f=de.Bottom,targetPosition:d=de.Top,label:h,labelStyle:x,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:b,style:w,markerEnd:j,markerStart:T,interactionWidth:M})=>{const[A,C,H]=Zp({sourceX:n,sourceY:s,sourcePosition:f,targetX:i,targetY:r,targetPosition:d});return ee.createElement(Ri,{path:A,labelX:C,labelY:H,label:h,labelStyle:x,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:b,style:w,markerEnd:j,markerStart:T,interactionWidth:M})});Vf.displayName="SimpleBezierEdge";const Sx={[de.Left]:{x:-1,y:0},[de.Right]:{x:1,y:0},[de.Top]:{x:0,y:-1},[de.Bottom]:{x:0,y:1}},xN=({source:n,sourcePosition:s=de.Bottom,target:i})=>s===de.Left||s===de.Right?n.x<i.x?{x:1,y:0}:{x:-1,y:0}:n.y<i.y?{x:0,y:1}:{x:0,y:-1},jx=(n,s)=>Math.sqrt(Math.pow(s.x-n.x,2)+Math.pow(s.y-n.y,2));function pN({source:n,sourcePosition:s=de.Bottom,target:i,targetPosition:r=de.Top,center:f,offset:d}){const h=Sx[s],x=Sx[r],p={x:n.x+h.x*d,y:n.y+h.y*d},m={x:i.x+x.x*d,y:i.y+x.y*d},g=xN({source:p,sourcePosition:s,target:m}),b=g.x!==0?"x":"y",w=g[b];let j=[],T,M;const A={x:0,y:0},C={x:0,y:0},[H,V,R,G]=Gp({sourceX:n.x,sourceY:n.y,targetX:i.x,targetY:i.y});if(h[b]*x[b]===-1){T=f.x??H,M=f.y??V;const L=[{x:T,y:p.y},{x:T,y:m.y}],F=[{x:p.x,y:M},{x:m.x,y:M}];h[b]===w?j=b==="x"?L:F:j=b==="x"?F:L}else{const L=[{x:p.x,y:m.y}],F=[{x:m.x,y:p.y}];if(b==="x"?j=h.x===w?F:L:j=h.y===w?L:F,s===r){const ie=Math.abs(n[b]-i[b]);if(ie<=d){const E=Math.min(d-1,d-ie);h[b]===w?A[b]=(p[b]>n[b]?-1:1)*E:C[b]=(m[b]>i[b]?-1:1)*E}}if(s!==r){const ie=b==="x"?"y":"x",E=h[b]===x[ie],J=p[ie]>m[ie],S=p[ie]<m[ie];(h[b]===1&&(!E&&J||E&&S)||h[b]!==1&&(!E&&S||E&&J))&&(j=b==="x"?L:F)}const W={x:p.x+A.x,y:p.y+A.y},le={x:m.x+C.x,y:m.y+C.y},se=Math.max(Math.abs(W.x-j[0].x),Math.abs(le.x-j[0].x)),ce=Math.max(Math.abs(W.y-j[0].y),Math.abs(le.y-j[0].y));se>=ce?(T=(W.x+le.x)/2,M=j[0].y):(T=j[0].x,M=(W.y+le.y)/2)}return[[n,{x:p.x+A.x,y:p.y+A.y},...j,{x:m.x+C.x,y:m.y+C.y},i],T,M,R,G]}function gN(n,s,i,r){const f=Math.min(jx(n,s)/2,jx(s,i)/2,r),{x:d,y:h}=s;if(n.x===d&&d===i.x||n.y===h&&h===i.y)return`L${d} ${h}`;if(n.y===h){const m=n.x<i.x?-1:1,g=n.y<i.y?1:-1;return`L ${d+f*m},${h}Q ${d},${h} ${d},${h+f*g}`}const x=n.x<i.x?1:-1,p=n.y<i.y?-1:1;return`L ${d},${h+f*p}Q ${d},${h} ${d+f*x},${h}`}function wf({sourceX:n,sourceY:s,sourcePosition:i=de.Bottom,targetX:r,targetY:f,targetPosition:d=de.Top,borderRadius:h=5,centerX:x,centerY:p,offset:m=20}){const[g,b,w,j,T]=pN({source:{x:n,y:s},sourcePosition:i,target:{x:r,y:f},targetPosition:d,center:{x,y:p},offset:m});return[g.reduce((A,C,H)=>{let V="";return H>0&&H<g.length-1?V=gN(g[H-1],C,g[H+1],h):V=`${H===0?"M":"L"}${C.x} ${C.y}`,A+=V,A},""),b,w,j,T]}const Mr=_.memo(({sourceX:n,sourceY:s,targetX:i,targetY:r,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:m,style:g,sourcePosition:b=de.Bottom,targetPosition:w=de.Top,markerEnd:j,markerStart:T,pathOptions:M,interactionWidth:A})=>{const[C,H,V]=wf({sourceX:n,sourceY:s,sourcePosition:b,targetX:i,targetY:r,targetPosition:w,borderRadius:M?.borderRadius,offset:M?.offset});return ee.createElement(Ri,{path:C,labelX:H,labelY:V,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:j,markerStart:T,interactionWidth:A})});Mr.displayName="SmoothStepEdge";const $f=_.memo(n=>ee.createElement(Mr,{...n,pathOptions:_.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])}));$f.displayName="StepEdge";function yN({sourceX:n,sourceY:s,targetX:i,targetY:r}){const[f,d,h,x]=Gp({sourceX:n,sourceY:s,targetX:i,targetY:r});return[`M ${n},${s}L ${i},${r}`,f,d,h,x]}const Gf=_.memo(({sourceX:n,sourceY:s,targetX:i,targetY:r,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:w,interactionWidth:j})=>{const[T,M,A]=yN({sourceX:n,sourceY:s,targetX:i,targetY:r});return ee.createElement(Ri,{path:T,labelX:M,labelY:A,label:f,labelStyle:d,labelShowBg:h,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:w,interactionWidth:j})});Gf.displayName="StraightEdge";function ar(n,s){return n>=0?.5*n:s*25*Math.sqrt(-n)}function Ex({pos:n,x1:s,y1:i,x2:r,y2:f,c:d}){switch(n){case de.Left:return[s-ar(s-r,d),i];case de.Right:return[s+ar(r-s,d),i];case de.Top:return[s,i-ar(i-f,d)];case de.Bottom:return[s,i+ar(f-i,d)]}}function Qp({sourceX:n,sourceY:s,sourcePosition:i=de.Bottom,targetX:r,targetY:f,targetPosition:d=de.Top,curvature:h=.25}){const[x,p]=Ex({pos:i,x1:n,y1:s,x2:r,y2:f,c:h}),[m,g]=Ex({pos:d,x1:r,y1:f,x2:n,y2:s,c:h}),[b,w,j,T]=Xp({sourceX:n,sourceY:s,targetX:r,targetY:f,sourceControlX:x,sourceControlY:p,targetControlX:m,targetControlY:g});return[`M${n},${s} C${x},${p} ${m},${g} ${r},${f}`,b,w,j,T]}const Nr=_.memo(({sourceX:n,sourceY:s,targetX:i,targetY:r,sourcePosition:f=de.Bottom,targetPosition:d=de.Top,label:h,labelStyle:x,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:b,style:w,markerEnd:j,markerStart:T,pathOptions:M,interactionWidth:A})=>{const[C,H,V]=Qp({sourceX:n,sourceY:s,sourcePosition:f,targetX:i,targetY:r,targetPosition:d,curvature:M?.curvature});return ee.createElement(Ri,{path:C,labelX:H,labelY:V,label:h,labelStyle:x,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:b,style:w,markerEnd:j,markerStart:T,interactionWidth:A})});Nr.displayName="BezierEdge";const Xf=_.createContext(null),bN=Xf.Provider;Xf.Consumer;const vN=()=>_.useContext(Xf),wN=n=>"id"in n&&"source"in n&&"target"in n,NN=({source:n,sourceHandle:s,target:i,targetHandle:r})=>`reactflow__edge-${n}${s||""}-${i}${r||""}`,Nf=(n,s)=>typeof n>"u"?"":typeof n=="string"?n:`${s?`${s}__`:""}${Object.keys(n).sort().map(r=>`${r}=${n[r]}`).join("&")}`,SN=(n,s)=>s.some(i=>i.source===n.source&&i.target===n.target&&(i.sourceHandle===n.sourceHandle||!i.sourceHandle&&!n.sourceHandle)&&(i.targetHandle===n.targetHandle||!i.targetHandle&&!n.targetHandle)),jN=(n,s)=>{if(!n.source||!n.target)return s;let i;return wN(n)?i={...n}:i={...n,id:NN(n)},SN(i,s)?s:s.concat(i)},Sf=({x:n,y:s},[i,r,f],d,[h,x])=>{const p={x:(n-i)/f,y:(s-r)/f};return d?{x:h*Math.round(p.x/h),y:x*Math.round(p.y/x)}:p},Kp=({x:n,y:s},[i,r,f])=>({x:n*f+i,y:s*f+r}),Pa=(n,s=[0,0])=>{if(!n)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const i=(n.width??0)*s[0],r=(n.height??0)*s[1],f={x:n.position.x-i,y:n.position.y-r};return{...f,positionAbsolute:n.positionAbsolute?{x:n.positionAbsolute.x-i,y:n.positionAbsolute.y-r}:f}},Zf=(n,s=[0,0])=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const i=n.reduce((r,f)=>{const{x:d,y:h}=Pa(f,s).positionAbsolute;return uN(r,Yf({x:d,y:h,width:f.width||0,height:f.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return fN(i)},Jp=(n,s,[i,r,f]=[0,0,1],d=!1,h=!1,x=[0,0])=>{const p={x:(s.x-i)/f,y:(s.y-r)/f,width:s.width/f,height:s.height/f},m=[];return n.forEach(g=>{const{width:b,height:w,selectable:j=!0,hidden:T=!1}=g;if(h&&!j||T)return!1;const{positionAbsolute:M}=Pa(g,x),A={x:M.x,y:M.y,width:b||0,height:w||0},C=bf(p,A),H=typeof b>"u"||typeof w>"u"||b===null||w===null,V=d&&C>0,R=(b||0)*(w||0);(H||V||C>=R||g.dragging)&&m.push(g)}),m},Wp=(n,s)=>{const i=n.map(r=>r.id);return s.filter(r=>i.includes(r.source)||i.includes(r.target))},Fp=(n,s,i,r,f,d=.1)=>{const h=s/(n.width*(1+d)),x=i/(n.height*(1+d)),p=Math.min(h,x),m=as(p,r,f),g=n.x+n.width/2,b=n.y+n.height/2,w=s/2-g*m,j=i/2-b*m;return{x:w,y:j,zoom:m}},Il=(n,s=0)=>n.transition().duration(s);function _x(n,s,i,r){return(s[i]||[]).reduce((f,d)=>(`${n.id}-${d.id}-${i}`!==r&&f.push({id:d.id||null,type:i,nodeId:n.id,x:(n.positionAbsolute?.x??0)+d.x+d.width/2,y:(n.positionAbsolute?.y??0)+d.y+d.height/2}),f),[])}function EN(n,s,i,r,f,d){const{x:h,y:x}=Al(n),m=s.elementsFromPoint(h,x).find(T=>T.classList.contains("react-flow__handle"));if(m){const T=m.getAttribute("data-nodeid");if(T){const M=Qf(void 0,m),A=m.getAttribute("data-handleid"),C=d({nodeId:T,id:A,type:M});if(C){const H=f.find(V=>V.nodeId===T&&V.type===M&&V.id===A);return{handle:{id:A,type:M,nodeId:T,x:H?.x||i.x,y:H?.y||i.y},validHandleResult:C}}}}let g=[],b=1/0;if(f.forEach(T=>{const M=Math.sqrt((T.x-i.x)**2+(T.y-i.y)**2);if(M<=r){const A=d(T);M<=b&&(M<b?g=[{handle:T,validHandleResult:A}]:M===b&&g.push({handle:T,validHandleResult:A}),b=M)}}),!g.length)return{handle:null,validHandleResult:Ip()};if(g.length===1)return g[0];const w=g.some(({validHandleResult:T})=>T.isValid),j=g.some(({handle:T})=>T.type==="target");return g.find(({handle:T,validHandleResult:M})=>j?T.type==="target":w?M.isValid:!0)||g[0]}const _N={source:null,target:null,sourceHandle:null,targetHandle:null},Ip=()=>({handleDomNode:null,isValid:!1,connection:_N,endHandle:null});function Pp(n,s,i,r,f,d,h){const x=f==="target",p=h.querySelector(`.react-flow__handle[data-id="${n?.nodeId}-${n?.id}-${n?.type}"]`),m={...Ip(),handleDomNode:p};if(p){const g=Qf(void 0,p),b=p.getAttribute("data-nodeid"),w=p.getAttribute("data-handleid"),j=p.classList.contains("connectable"),T=p.classList.contains("connectableend"),M={source:x?b:i,sourceHandle:x?w:r,target:x?i:b,targetHandle:x?r:w};m.connection=M,j&&T&&(s===la.Strict?x&&g==="source"||!x&&g==="target":b!==i||w!==r)&&(m.endHandle={nodeId:b,handleId:w,type:g},m.isValid=d(M))}return m}function zN({nodes:n,nodeId:s,handleId:i,handleType:r}){return n.reduce((f,d)=>{if(d[Xe]){const{handleBounds:h}=d[Xe];let x=[],p=[];h&&(x=_x(d,h,"source",`${s}-${i}-${r}`),p=_x(d,h,"target",`${s}-${i}-${r}`)),f.push(...x,...p)}return f},[])}function Qf(n,s){return n||(s?.classList.contains("target")?"target":s?.classList.contains("source")?"source":null)}function Iu(n){n?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function MN(n,s){let i=null;return s?i="valid":n&&!s&&(i="invalid"),i}function eg({event:n,handleId:s,nodeId:i,onConnect:r,isTarget:f,getState:d,setState:h,isValidConnection:x,edgeUpdaterType:p,onReconnectEnd:m}){const g=Yp(n.target),{connectionMode:b,domNode:w,autoPanOnConnect:j,connectionRadius:T,onConnectStart:M,panBy:A,getNodes:C,cancelConnection:H}=d();let V=0,R;const{x:G,y:O}=Al(n),L=g?.elementFromPoint(G,O),F=Qf(p,L),W=w?.getBoundingClientRect();if(!W||!F)return;let le,se=Al(n,W),ce=!1,ie=null,E=!1,J=null;const S=zN({nodes:C(),nodeId:i,handleId:s,handleType:F}),U=()=>{if(!j)return;const[N,k]=Lp(se,W);A({x:N,y:k}),V=requestAnimationFrame(U)};h({connectionPosition:se,connectionStatus:null,connectionNodeId:i,connectionHandleId:s,connectionHandleType:F,connectionStartHandle:{nodeId:i,handleId:s,type:F},connectionEndHandle:null}),M?.(n,{nodeId:i,handleId:s,handleType:F});function Z(N){const{transform:k}=d();se=Al(N,W);const{handle:Q,validHandleResult:I}=EN(N,g,Sf(se,k,!1,[1,1]),T,S,ne=>Pp(ne,b,i,s,f?"target":"source",x,g));if(R=Q,ce||(U(),ce=!0),J=I.handleDomNode,ie=I.connection,E=I.isValid,h({connectionPosition:R&&E?Kp({x:R.x,y:R.y},k):se,connectionStatus:MN(!!R,E),connectionEndHandle:I.endHandle}),!R&&!E&&!J)return Iu(le);ie.source!==ie.target&&J&&(Iu(le),le=J,J.classList.add("connecting","react-flow__handle-connecting"),J.classList.toggle("valid",E),J.classList.toggle("react-flow__handle-valid",E))}function q(N){(R||J)&&ie&&E&&r?.(ie),d().onConnectEnd?.(N),p&&m?.(N),Iu(le),H(),cancelAnimationFrame(V),ce=!1,E=!1,ie=null,J=null,g.removeEventListener("mousemove",Z),g.removeEventListener("mouseup",q),g.removeEventListener("touchmove",Z),g.removeEventListener("touchend",q)}g.addEventListener("mousemove",Z),g.addEventListener("mouseup",q),g.addEventListener("touchmove",Z),g.addEventListener("touchend",q)}const zx=()=>!0,AN=n=>({connectionStartHandle:n.connectionStartHandle,connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName}),TN=(n,s,i)=>r=>{const{connectionStartHandle:f,connectionEndHandle:d,connectionClickStartHandle:h}=r;return{connecting:f?.nodeId===n&&f?.handleId===s&&f?.type===i||d?.nodeId===n&&d?.handleId===s&&d?.type===i,clickConnecting:h?.nodeId===n&&h?.handleId===s&&h?.type===i}},tg=_.forwardRef(({type:n="source",position:s=de.Top,isValidConnection:i,isConnectable:r=!0,isConnectableStart:f=!0,isConnectableEnd:d=!0,id:h,onConnect:x,children:p,className:m,onMouseDown:g,onTouchStart:b,...w},j)=>{const T=h||null,M=n==="target",A=ct(),C=vN(),{connectOnClick:H,noPanClassName:V}=Ve(AN,yt),{connecting:R,clickConnecting:G}=Ve(TN(C,T,n),yt);C||A.getState().onError?.("010",Zn.error010());const O=W=>{const{defaultEdgeOptions:le,onConnect:se,hasDefaultEdges:ce}=A.getState(),ie={...le,...W};if(ce){const{edges:E,setEdges:J}=A.getState();J(jN(ie,E))}se?.(ie),x?.(ie)},L=W=>{if(!C)return;const le=$p(W);f&&(le&&W.button===0||!le)&&eg({event:W,handleId:T,nodeId:C,onConnect:O,isTarget:M,getState:A.getState,setState:A.setState,isValidConnection:i||A.getState().isValidConnection||zx}),le?g?.(W):b?.(W)},F=W=>{const{onClickConnectStart:le,onClickConnectEnd:se,connectionClickStartHandle:ce,connectionMode:ie,isValidConnection:E}=A.getState();if(!C||!ce&&!f)return;if(!ce){le?.(W,{nodeId:C,handleId:T,handleType:n}),A.setState({connectionClickStartHandle:{nodeId:C,type:n,handleId:T}});return}const J=Yp(W.target),S=i||E||zx,{connection:U,isValid:Z}=Pp({nodeId:C,id:T,type:n},ie,ce.nodeId,ce.handleId||null,ce.type,S,J);Z&&O(U),se?.(W),A.setState({connectionClickStartHandle:null})};return ee.createElement("div",{"data-handleid":T,"data-nodeid":C,"data-handlepos":s,"data-id":`${C}-${T}-${n}`,className:jt(["react-flow__handle",`react-flow__handle-${s}`,"nodrag",V,m,{source:!M,target:M,connectable:r,connectablestart:f,connectableend:d,connecting:G,connectionindicator:r&&(f&&!R||d&&R)}]),onMouseDown:L,onTouchStart:L,onClick:H?F:void 0,ref:j,...w},p)});tg.displayName="Handle";var ss=_.memo(tg);const ng=({data:n,isConnectable:s,targetPosition:i=de.Top,sourcePosition:r=de.Bottom})=>ee.createElement(ee.Fragment,null,ee.createElement(ss,{type:"target",position:i,isConnectable:s}),n?.label,ee.createElement(ss,{type:"source",position:r,isConnectable:s}));ng.displayName="DefaultNode";var jf=_.memo(ng);const lg=({data:n,isConnectable:s,sourcePosition:i=de.Bottom})=>ee.createElement(ee.Fragment,null,n?.label,ee.createElement(ss,{type:"source",position:i,isConnectable:s}));lg.displayName="InputNode";var ag=_.memo(lg);const sg=({data:n,isConnectable:s,targetPosition:i=de.Top})=>ee.createElement(ee.Fragment,null,ee.createElement(ss,{type:"target",position:i,isConnectable:s}),n?.label);sg.displayName="OutputNode";var ig=_.memo(sg);const Kf=()=>null;Kf.displayName="GroupNode";const CN=n=>({selectedNodes:n.getNodes().filter(s=>s.selected),selectedEdges:n.edges.filter(s=>s.selected).map(s=>({...s}))}),sr=n=>n.id;function RN(n,s){return yt(n.selectedNodes.map(sr),s.selectedNodes.map(sr))&&yt(n.selectedEdges.map(sr),s.selectedEdges.map(sr))}const cg=_.memo(({onSelectionChange:n})=>{const s=ct(),{selectedNodes:i,selectedEdges:r}=Ve(CN,RN);return _.useEffect(()=>{const f={nodes:i,edges:r};n?.(f),s.getState().onSelectionChange.forEach(d=>d(f))},[i,r,n]),null});cg.displayName="SelectionListener";const DN=n=>!!n.onSelectionChange;function ON({onSelectionChange:n}){const s=Ve(DN);return n||s?ee.createElement(cg,{onSelectionChange:n}):null}const kN=n=>({setNodes:n.setNodes,setEdges:n.setEdges,setDefaultNodesAndEdges:n.setDefaultNodesAndEdges,setMinZoom:n.setMinZoom,setMaxZoom:n.setMaxZoom,setTranslateExtent:n.setTranslateExtent,setNodeExtent:n.setNodeExtent,reset:n.reset});function $a(n,s){_.useEffect(()=>{typeof n<"u"&&s(n)},[n])}function Se(n,s,i){_.useEffect(()=>{typeof s<"u"&&i({[n]:s})},[s])}const HN=({nodes:n,edges:s,defaultNodes:i,defaultEdges:r,onConnect:f,onConnectStart:d,onConnectEnd:h,onClickConnectStart:x,onClickConnectEnd:p,nodesDraggable:m,nodesConnectable:g,nodesFocusable:b,edgesFocusable:w,edgesUpdatable:j,elevateNodesOnSelect:T,minZoom:M,maxZoom:A,nodeExtent:C,onNodesChange:H,onEdgesChange:V,elementsSelectable:R,connectionMode:G,snapGrid:O,snapToGrid:L,translateExtent:F,connectOnClick:W,defaultEdgeOptions:le,fitView:se,fitViewOptions:ce,onNodesDelete:ie,onEdgesDelete:E,onNodeDrag:J,onNodeDragStart:S,onNodeDragStop:U,onSelectionDrag:Z,onSelectionDragStart:q,onSelectionDragStop:N,noPanClassName:k,nodeOrigin:Q,rfId:I,autoPanOnConnect:ne,autoPanOnNodeDrag:oe,onError:re,connectionRadius:be,isValidConnection:me,nodeDragThreshold:Ae})=>{const{setNodes:Ce,setEdges:ft,setDefaultNodesAndEdges:dt,setMinZoom:bt,setMaxZoom:ht,setTranslateExtent:Ze,setNodeExtent:Vt,reset:_e}=Ve(kN,yt),he=ct();return _.useEffect(()=>{const mt=r?.map(mn=>({...mn,...le}));return dt(i,mt),()=>{_e()}},[]),Se("defaultEdgeOptions",le,he.setState),Se("connectionMode",G,he.setState),Se("onConnect",f,he.setState),Se("onConnectStart",d,he.setState),Se("onConnectEnd",h,he.setState),Se("onClickConnectStart",x,he.setState),Se("onClickConnectEnd",p,he.setState),Se("nodesDraggable",m,he.setState),Se("nodesConnectable",g,he.setState),Se("nodesFocusable",b,he.setState),Se("edgesFocusable",w,he.setState),Se("edgesUpdatable",j,he.setState),Se("elementsSelectable",R,he.setState),Se("elevateNodesOnSelect",T,he.setState),Se("snapToGrid",L,he.setState),Se("snapGrid",O,he.setState),Se("onNodesChange",H,he.setState),Se("onEdgesChange",V,he.setState),Se("connectOnClick",W,he.setState),Se("fitViewOnInit",se,he.setState),Se("fitViewOnInitOptions",ce,he.setState),Se("onNodesDelete",ie,he.setState),Se("onEdgesDelete",E,he.setState),Se("onNodeDrag",J,he.setState),Se("onNodeDragStart",S,he.setState),Se("onNodeDragStop",U,he.setState),Se("onSelectionDrag",Z,he.setState),Se("onSelectionDragStart",q,he.setState),Se("onSelectionDragStop",N,he.setState),Se("noPanClassName",k,he.setState),Se("nodeOrigin",Q,he.setState),Se("rfId",I,he.setState),Se("autoPanOnConnect",ne,he.setState),Se("autoPanOnNodeDrag",oe,he.setState),Se("onError",re,he.setState),Se("connectionRadius",be,he.setState),Se("isValidConnection",me,he.setState),Se("nodeDragThreshold",Ae,he.setState),$a(n,Ce),$a(s,ft),$a(M,bt),$a(A,ht),$a(F,Ze),$a(C,Vt),null},Mx={display:"none"},UN={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},rg="react-flow__node-desc",og="react-flow__edge-desc",BN="react-flow__aria-live",qN=n=>n.ariaLiveMessage;function LN({rfId:n}){const s=Ve(qN);return ee.createElement("div",{id:`${BN}-${n}`,"aria-live":"assertive","aria-atomic":"true",style:UN},s)}function YN({rfId:n,disableKeyboardA11y:s}){return ee.createElement(ee.Fragment,null,ee.createElement("div",{id:`${rg}-${n}`,style:Mx},"Press enter or space to select a node.",!s&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),ee.createElement("div",{id:`${og}-${n}`,style:Mx},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!s&&ee.createElement(LN,{rfId:n}))}var _i=(n=null,s={actInsideInputWithModifier:!0})=>{const[i,r]=_.useState(!1),f=_.useRef(!1),d=_.useRef(new Set([])),[h,x]=_.useMemo(()=>{if(n!==null){const m=(Array.isArray(n)?n:[n]).filter(b=>typeof b=="string").map(b=>b.split("+")),g=m.reduce((b,w)=>b.concat(...w),[]);return[m,g]}return[[],[]]},[n]);return _.useEffect(()=>{const p=typeof document<"u"?document:null,m=s?.target||p;if(n!==null){const g=j=>{if(f.current=j.ctrlKey||j.metaKey||j.shiftKey,(!f.current||f.current&&!s.actInsideInputWithModifier)&&vf(j))return!1;const M=Tx(j.code,x);d.current.add(j[M]),Ax(h,d.current,!1)&&(j.preventDefault(),r(!0))},b=j=>{if((!f.current||f.current&&!s.actInsideInputWithModifier)&&vf(j))return!1;const M=Tx(j.code,x);Ax(h,d.current,!0)?(r(!1),d.current.clear()):d.current.delete(j[M]),j.key==="Meta"&&d.current.clear(),f.current=!1},w=()=>{d.current.clear(),r(!1)};return m?.addEventListener("keydown",g),m?.addEventListener("keyup",b),window.addEventListener("blur",w),()=>{m?.removeEventListener("keydown",g),m?.removeEventListener("keyup",b),window.removeEventListener("blur",w)}}},[n,r]),i};function Ax(n,s,i){return n.filter(r=>i||r.length===s.size).some(r=>r.every(f=>s.has(f)))}function Tx(n,s){return s.includes(n)?"code":"key"}function ug(n,s,i,r){const f=n.parentNode||n.parentId;if(!f)return i;const d=s.get(f),h=Pa(d,r);return ug(d,s,{x:(i.x??0)+h.x,y:(i.y??0)+h.y,z:(d[Xe]?.z??0)>(i.z??0)?d[Xe]?.z??0:i.z??0},r)}function fg(n,s,i){n.forEach(r=>{const f=r.parentNode||r.parentId;if(f&&!n.has(f))throw new Error(`Parent node ${f} not found`);if(f||i?.[r.id]){const{x:d,y:h,z:x}=ug(r,n,{...r.position,z:r[Xe]?.z??0},s);r.positionAbsolute={x:d,y:h},r[Xe].z=x,i?.[r.id]&&(r[Xe].isParent=!0)}})}function Pu(n,s,i,r){const f=new Map,d={},h=r?1e3:0;return n.forEach(x=>{const p=(tn(x.zIndex)?x.zIndex:0)+(x.selected?h:0),m=s.get(x.id),g={...x,positionAbsolute:{x:x.position.x,y:x.position.y}},b=x.parentNode||x.parentId;b&&(d[b]=!0);const w=m?.type&&m?.type!==x.type;Object.defineProperty(g,Xe,{enumerable:!1,value:{handleBounds:w?void 0:m?.[Xe]?.handleBounds,z:p}}),f.set(x.id,g)}),fg(f,i,d),f}function dg(n,s={}){const{getNodes:i,width:r,height:f,minZoom:d,maxZoom:h,d3Zoom:x,d3Selection:p,fitViewOnInitDone:m,fitViewOnInit:g,nodeOrigin:b}=n(),w=s.initial&&!m&&g;if(x&&p&&(w||!s.initial)){const T=i().filter(A=>{const C=s.includeHiddenNodes?A.width&&A.height:!A.hidden;return s.nodes?.length?C&&s.nodes.some(H=>H.id===A.id):C}),M=T.every(A=>A.width&&A.height);if(T.length>0&&M){const A=Zf(T,b),{x:C,y:H,zoom:V}=Fp(A,r,f,s.minZoom??d,s.maxZoom??h,s.padding??.1),R=Ml.translate(C,H).scale(V);return typeof s.duration=="number"&&s.duration>0?x.transform(Il(p,s.duration),R):x.transform(p,R),!0}}return!1}function VN(n,s){return n.forEach(i=>{const r=s.get(i.id);r&&s.set(r.id,{...r,[Xe]:r[Xe],selected:i.selected})}),new Map(s)}function $N(n,s){return s.map(i=>{const r=n.find(f=>f.id===i.id);return r&&(i.selected=r.selected),i})}function ir({changedNodes:n,changedEdges:s,get:i,set:r}){const{nodeInternals:f,edges:d,onNodesChange:h,onEdgesChange:x,hasDefaultNodes:p,hasDefaultEdges:m}=i();n?.length&&(p&&r({nodeInternals:VN(n,f)}),h?.(n)),s?.length&&(m&&r({edges:$N(s,d)}),x?.(s))}const Ga=()=>{},GN={zoomIn:Ga,zoomOut:Ga,zoomTo:Ga,getZoom:()=>1,setViewport:Ga,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Ga,fitBounds:Ga,project:n=>n,screenToFlowPosition:n=>n,flowToScreenPosition:n=>n,viewportInitialized:!1},XN=n=>({d3Zoom:n.d3Zoom,d3Selection:n.d3Selection}),ZN=()=>{const n=ct(),{d3Zoom:s,d3Selection:i}=Ve(XN,yt);return _.useMemo(()=>i&&s?{zoomIn:f=>s.scaleBy(Il(i,f?.duration),1.2),zoomOut:f=>s.scaleBy(Il(i,f?.duration),1/1.2),zoomTo:(f,d)=>s.scaleTo(Il(i,d?.duration),f),getZoom:()=>n.getState().transform[2],setViewport:(f,d)=>{const[h,x,p]=n.getState().transform,m=Ml.translate(f.x??h,f.y??x).scale(f.zoom??p);s.transform(Il(i,d?.duration),m)},getViewport:()=>{const[f,d,h]=n.getState().transform;return{x:f,y:d,zoom:h}},fitView:f=>dg(n.getState,f),setCenter:(f,d,h)=>{const{width:x,height:p,maxZoom:m}=n.getState(),g=typeof h?.zoom<"u"?h.zoom:m,b=x/2-f*g,w=p/2-d*g,j=Ml.translate(b,w).scale(g);s.transform(Il(i,h?.duration),j)},fitBounds:(f,d)=>{const{width:h,height:x,minZoom:p,maxZoom:m}=n.getState(),{x:g,y:b,zoom:w}=Fp(f,h,x,p,m,d?.padding??.1),j=Ml.translate(g,b).scale(w);s.transform(Il(i,d?.duration),j)},project:f=>{const{transform:d,snapToGrid:h,snapGrid:x}=n.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Sf(f,d,h,x)},screenToFlowPosition:f=>{const{transform:d,snapToGrid:h,snapGrid:x,domNode:p}=n.getState();if(!p)return f;const{x:m,y:g}=p.getBoundingClientRect(),b={x:f.x-m,y:f.y-g};return Sf(b,d,h,x)},flowToScreenPosition:f=>{const{transform:d,domNode:h}=n.getState();if(!h)return f;const{x,y:p}=h.getBoundingClientRect(),m=Kp(f,d);return{x:m.x+x,y:m.y+p}},viewportInitialized:!0}:GN,[s,i])};function Jf(){const n=ZN(),s=ct(),i=_.useCallback(()=>s.getState().getNodes().map(M=>({...M})),[]),r=_.useCallback(M=>s.getState().nodeInternals.get(M),[]),f=_.useCallback(()=>{const{edges:M=[]}=s.getState();return M.map(A=>({...A}))},[]),d=_.useCallback(M=>{const{edges:A=[]}=s.getState();return A.find(C=>C.id===M)},[]),h=_.useCallback(M=>{const{getNodes:A,setNodes:C,hasDefaultNodes:H,onNodesChange:V}=s.getState(),R=A(),G=typeof M=="function"?M(R):M;if(H)C(G);else if(V){const O=G.length===0?R.map(L=>({type:"remove",id:L.id})):G.map(L=>({item:L,type:"reset"}));V(O)}},[]),x=_.useCallback(M=>{const{edges:A=[],setEdges:C,hasDefaultEdges:H,onEdgesChange:V}=s.getState(),R=typeof M=="function"?M(A):M;if(H)C(R);else if(V){const G=R.length===0?A.map(O=>({type:"remove",id:O.id})):R.map(O=>({item:O,type:"reset"}));V(G)}},[]),p=_.useCallback(M=>{const A=Array.isArray(M)?M:[M],{getNodes:C,setNodes:H,hasDefaultNodes:V,onNodesChange:R}=s.getState();if(V){const O=[...C(),...A];H(O)}else if(R){const G=A.map(O=>({item:O,type:"add"}));R(G)}},[]),m=_.useCallback(M=>{const A=Array.isArray(M)?M:[M],{edges:C=[],setEdges:H,hasDefaultEdges:V,onEdgesChange:R}=s.getState();if(V)H([...C,...A]);else if(R){const G=A.map(O=>({item:O,type:"add"}));R(G)}},[]),g=_.useCallback(()=>{const{getNodes:M,edges:A=[],transform:C}=s.getState(),[H,V,R]=C;return{nodes:M().map(G=>({...G})),edges:A.map(G=>({...G})),viewport:{x:H,y:V,zoom:R}}},[]),b=_.useCallback(({nodes:M,edges:A})=>{const{nodeInternals:C,getNodes:H,edges:V,hasDefaultNodes:R,hasDefaultEdges:G,onNodesDelete:O,onEdgesDelete:L,onNodesChange:F,onEdgesChange:W}=s.getState(),le=(M||[]).map(J=>J.id),se=(A||[]).map(J=>J.id),ce=H().reduce((J,S)=>{const U=S.parentNode||S.parentId,Z=!le.includes(S.id)&&U&&J.find(N=>N.id===U);return(typeof S.deletable=="boolean"?S.deletable:!0)&&(le.includes(S.id)||Z)&&J.push(S),J},[]),ie=V.filter(J=>typeof J.deletable=="boolean"?J.deletable:!0),E=ie.filter(J=>se.includes(J.id));if(ce||E){const J=Wp(ce,ie),S=[...E,...J],U=S.reduce((Z,q)=>(Z.includes(q.id)||Z.push(q.id),Z),[]);if((G||R)&&(G&&s.setState({edges:V.filter(Z=>!U.includes(Z.id))}),R&&(ce.forEach(Z=>{C.delete(Z.id)}),s.setState({nodeInternals:new Map(C)}))),U.length>0&&(L?.(S),W&&W(U.map(Z=>({id:Z,type:"remove"})))),ce.length>0&&(O?.(ce),F)){const Z=ce.map(q=>({id:q.id,type:"remove"}));F(Z)}}},[]),w=_.useCallback(M=>{const A=dN(M),C=A?null:s.getState().nodeInternals.get(M.id);return!A&&!C?[null,null,A]:[A?M:wx(C),C,A]},[]),j=_.useCallback((M,A=!0,C)=>{const[H,V,R]=w(M);return H?(C||s.getState().getNodes()).filter(G=>{if(!R&&(G.id===V.id||!G.positionAbsolute))return!1;const O=wx(G),L=bf(O,H);return A&&L>0||L>=H.width*H.height}):[]},[]),T=_.useCallback((M,A,C=!0)=>{const[H]=w(M);if(!H)return!1;const V=bf(H,A);return C&&V>0||V>=H.width*H.height},[]);return _.useMemo(()=>({...n,getNodes:i,getNode:r,getEdges:f,getEdge:d,setNodes:h,setEdges:x,addNodes:p,addEdges:m,toObject:g,deleteElements:b,getIntersectingNodes:j,isNodeIntersecting:T}),[n,i,r,f,d,h,x,p,m,g,b,j,T])}const QN={actInsideInputWithModifier:!1};var KN=({deleteKeyCode:n,multiSelectionKeyCode:s})=>{const i=ct(),{deleteElements:r}=Jf(),f=_i(n,QN),d=_i(s);_.useEffect(()=>{if(f){const{edges:h,getNodes:x}=i.getState(),p=x().filter(g=>g.selected),m=h.filter(g=>g.selected);r({nodes:p,edges:m}),i.setState({nodesSelectionActive:!1})}},[f]),_.useEffect(()=>{i.setState({multiSelectionActive:d})},[d])};function JN(n){const s=ct();_.useEffect(()=>{let i;const r=()=>{if(!n.current)return;const f=qf(n.current);(f.height===0||f.width===0)&&s.getState().onError?.("004",Zn.error004()),s.setState({width:f.width||500,height:f.height||500})};return r(),window.addEventListener("resize",r),n.current&&(i=new ResizeObserver(()=>r()),i.observe(n.current)),()=>{window.removeEventListener("resize",r),i&&n.current&&i.unobserve(n.current)}},[])}const Wf={position:"absolute",width:"100%",height:"100%",top:0,left:0},WN=(n,s)=>n.x!==s.x||n.y!==s.y||n.zoom!==s.k,cr=n=>({x:n.x,y:n.y,zoom:n.k}),Xa=(n,s)=>n.target.closest(`.${s}`),Cx=(n,s)=>s===2&&Array.isArray(n)&&n.includes(2),Rx=n=>{const s=n.ctrlKey&&wr()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*s},FN=n=>({d3Zoom:n.d3Zoom,d3Selection:n.d3Selection,d3ZoomHandler:n.d3ZoomHandler,userSelectionActive:n.userSelectionActive}),IN=({onMove:n,onMoveStart:s,onMoveEnd:i,onPaneContextMenu:r,zoomOnScroll:f=!0,zoomOnPinch:d=!0,panOnScroll:h=!1,panOnScrollSpeed:x=.5,panOnScrollMode:p=ea.Free,zoomOnDoubleClick:m=!0,elementsSelectable:g,panOnDrag:b=!0,defaultViewport:w,translateExtent:j,minZoom:T,maxZoom:M,zoomActivationKeyCode:A,preventScrolling:C=!0,children:H,noWheelClassName:V,noPanClassName:R})=>{const G=_.useRef(),O=ct(),L=_.useRef(!1),F=_.useRef(!1),W=_.useRef(null),le=_.useRef({x:0,y:0,zoom:0}),{d3Zoom:se,d3Selection:ce,d3ZoomHandler:ie,userSelectionActive:E}=Ve(FN,yt),J=_i(A),S=_.useRef(0),U=_.useRef(!1),Z=_.useRef();return JN(W),_.useEffect(()=>{if(W.current){const q=W.current.getBoundingClientRect(),N=aN().scaleExtent([T,M]).translateExtent(j),k=on(W.current).call(N),Q=Ml.translate(w.x,w.y).scale(as(w.zoom,T,M)),I=[[0,0],[q.width,q.height]],ne=N.constrain()(Q,I,j);N.transform(k,ne),N.wheelDelta(Rx),O.setState({d3Zoom:N,d3Selection:k,d3ZoomHandler:k.on("wheel.zoom"),transform:[ne.x,ne.y,ne.k],domNode:W.current.closest(".react-flow")})}},[]),_.useEffect(()=>{ce&&se&&(h&&!J&&!E?ce.on("wheel.zoom",q=>{if(Xa(q,V))return!1;q.preventDefault(),q.stopImmediatePropagation();const N=ce.property("__zoom").k||1;if(q.ctrlKey&&d){const me=Nn(q),Ae=Rx(q),Ce=N*Math.pow(2,Ae);se.scaleTo(ce,Ce,me,q);return}const k=q.deltaMode===1?20:1;let Q=p===ea.Vertical?0:q.deltaX*k,I=p===ea.Horizontal?0:q.deltaY*k;!wr()&&q.shiftKey&&p!==ea.Vertical&&(Q=q.deltaY*k,I=0),se.translateBy(ce,-(Q/N)*x,-(I/N)*x,{internal:!0});const ne=cr(ce.property("__zoom")),{onViewportChangeStart:oe,onViewportChange:re,onViewportChangeEnd:be}=O.getState();clearTimeout(Z.current),U.current||(U.current=!0,s?.(q,ne),oe?.(ne)),U.current&&(n?.(q,ne),re?.(ne),Z.current=setTimeout(()=>{i?.(q,ne),be?.(ne),U.current=!1},150))},{passive:!1}):typeof ie<"u"&&ce.on("wheel.zoom",function(q,N){if(!C&&q.type==="wheel"&&!q.ctrlKey||Xa(q,V))return null;q.preventDefault(),ie.call(this,q,N)},{passive:!1}))},[E,h,p,ce,se,ie,J,d,C,V,s,n,i]),_.useEffect(()=>{se&&se.on("start",q=>{if(!q.sourceEvent||q.sourceEvent.internal)return null;S.current=q.sourceEvent?.button;const{onViewportChangeStart:N}=O.getState(),k=cr(q.transform);L.current=!0,le.current=k,q.sourceEvent?.type==="mousedown"&&O.setState({paneDragging:!0}),N?.(k),s?.(q.sourceEvent,k)})},[se,s]),_.useEffect(()=>{se&&(E&&!L.current?se.on("zoom",null):E||se.on("zoom",q=>{const{onViewportChange:N}=O.getState();if(O.setState({transform:[q.transform.x,q.transform.y,q.transform.k]}),F.current=!!(r&&Cx(b,S.current??0)),(n||N)&&!q.sourceEvent?.internal){const k=cr(q.transform);N?.(k),n?.(q.sourceEvent,k)}}))},[E,se,n,b,r]),_.useEffect(()=>{se&&se.on("end",q=>{if(!q.sourceEvent||q.sourceEvent.internal)return null;const{onViewportChangeEnd:N}=O.getState();if(L.current=!1,O.setState({paneDragging:!1}),r&&Cx(b,S.current??0)&&!F.current&&r(q.sourceEvent),F.current=!1,(i||N)&&WN(le.current,q.transform)){const k=cr(q.transform);le.current=k,clearTimeout(G.current),G.current=setTimeout(()=>{N?.(k),i?.(q.sourceEvent,k)},h?150:0)}})},[se,h,b,i,r]),_.useEffect(()=>{se&&se.filter(q=>{const N=J||f,k=d&&q.ctrlKey;if((b===!0||Array.isArray(b)&&b.includes(1))&&q.button===1&&q.type==="mousedown"&&(Xa(q,"react-flow__node")||Xa(q,"react-flow__edge")))return!0;if(!b&&!N&&!h&&!m&&!d||E||!m&&q.type==="dblclick"||Xa(q,V)&&q.type==="wheel"||Xa(q,R)&&(q.type!=="wheel"||h&&q.type==="wheel"&&!J)||!d&&q.ctrlKey&&q.type==="wheel"||!N&&!h&&!k&&q.type==="wheel"||!b&&(q.type==="mousedown"||q.type==="touchstart")||Array.isArray(b)&&!b.includes(q.button)&&q.type==="mousedown")return!1;const Q=Array.isArray(b)&&b.includes(q.button)||!q.button||q.button<=1;return(!q.ctrlKey||q.type==="wheel")&&Q})},[E,se,f,d,h,m,b,g,J]),ee.createElement("div",{className:"react-flow__renderer",ref:W,style:Wf},H)},PN=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function e3(){const{userSelectionActive:n,userSelectionRect:s}=Ve(PN,yt);return n&&s?ee.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:s.width,height:s.height,transform:`translate(${s.x}px, ${s.y}px)`}}):null}function Dx(n,s){const i=s.parentNode||s.parentId,r=n.find(f=>f.id===i);if(r){const f=s.position.x+s.width-r.width,d=s.position.y+s.height-r.height;if(f>0||d>0||s.position.x<0||s.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,f>0&&(r.style.width+=f),d>0&&(r.style.height+=d),s.position.x<0){const h=Math.abs(s.position.x);r.position.x=r.position.x-h,r.style.width+=h,s.position.x=0}if(s.position.y<0){const h=Math.abs(s.position.y);r.position.y=r.position.y-h,r.style.height+=h,s.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function hg(n,s){if(n.some(r=>r.type==="reset"))return n.filter(r=>r.type==="reset").map(r=>r.item);const i=n.filter(r=>r.type==="add").map(r=>r.item);return s.reduce((r,f)=>{const d=n.filter(x=>x.id===f.id);if(d.length===0)return r.push(f),r;const h={...f};for(const x of d)if(x)switch(x.type){case"select":{h.selected=x.selected;break}case"position":{typeof x.position<"u"&&(h.position=x.position),typeof x.positionAbsolute<"u"&&(h.positionAbsolute=x.positionAbsolute),typeof x.dragging<"u"&&(h.dragging=x.dragging),h.expandParent&&Dx(r,h);break}case"dimensions":{typeof x.dimensions<"u"&&(h.width=x.dimensions.width,h.height=x.dimensions.height),typeof x.updateStyle<"u"&&(h.style={...h.style||{},...x.dimensions}),typeof x.resizing=="boolean"&&(h.resizing=x.resizing),h.expandParent&&Dx(r,h);break}case"remove":return r}return r.push(h),r},i)}function mg(n,s){return hg(n,s)}function t3(n,s){return hg(n,s)}const _l=(n,s)=>({id:n,type:"select",selected:s});function Ja(n,s){return n.reduce((i,r)=>{const f=s.includes(r.id);return!r.selected&&f?(r.selected=!0,i.push(_l(r.id,!0))):r.selected&&!f&&(r.selected=!1,i.push(_l(r.id,!1))),i},[])}const ef=(n,s)=>i=>{i.target===s.current&&n?.(i)},n3=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,dragging:n.paneDragging}),xg=_.memo(({isSelecting:n,selectionMode:s=ji.Full,panOnDrag:i,onSelectionStart:r,onSelectionEnd:f,onPaneClick:d,onPaneContextMenu:h,onPaneScroll:x,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:g,children:b})=>{const w=_.useRef(null),j=ct(),T=_.useRef(0),M=_.useRef(0),A=_.useRef(),{userSelectionActive:C,elementsSelectable:H,dragging:V}=Ve(n3,yt),R=()=>{j.setState({userSelectionActive:!1,userSelectionRect:null}),T.current=0,M.current=0},G=ie=>{d?.(ie),j.getState().resetSelectedElements(),j.setState({nodesSelectionActive:!1})},O=ie=>{if(Array.isArray(i)&&i?.includes(2)){ie.preventDefault();return}h?.(ie)},L=x?ie=>x(ie):void 0,F=ie=>{const{resetSelectedElements:E,domNode:J}=j.getState();if(A.current=J?.getBoundingClientRect(),!H||!n||ie.button!==0||ie.target!==w.current||!A.current)return;const{x:S,y:U}=Al(ie,A.current);E(),j.setState({userSelectionRect:{width:0,height:0,startX:S,startY:U,x:S,y:U}}),r?.(ie)},W=ie=>{const{userSelectionRect:E,nodeInternals:J,edges:S,transform:U,onNodesChange:Z,onEdgesChange:q,nodeOrigin:N,getNodes:k}=j.getState();if(!n||!A.current||!E)return;j.setState({userSelectionActive:!0,nodesSelectionActive:!1});const Q=Al(ie,A.current),I=E.startX??0,ne=E.startY??0,oe={...E,x:Q.x<I?Q.x:I,y:Q.y<ne?Q.y:ne,width:Math.abs(Q.x-I),height:Math.abs(Q.y-ne)},re=k(),be=Jp(J,oe,U,s===ji.Partial,!0,N),me=Wp(be,S).map(Ce=>Ce.id),Ae=be.map(Ce=>Ce.id);if(T.current!==Ae.length){T.current=Ae.length;const Ce=Ja(re,Ae);Ce.length&&Z?.(Ce)}if(M.current!==me.length){M.current=me.length;const Ce=Ja(S,me);Ce.length&&q?.(Ce)}j.setState({userSelectionRect:oe})},le=ie=>{if(ie.button!==0)return;const{userSelectionRect:E}=j.getState();!C&&E&&ie.target===w.current&&G?.(ie),j.setState({nodesSelectionActive:T.current>0}),R(),f?.(ie)},se=ie=>{C&&(j.setState({nodesSelectionActive:T.current>0}),f?.(ie)),R()},ce=H&&(n||C);return ee.createElement("div",{className:jt(["react-flow__pane",{dragging:V,selection:n}]),onClick:ce?void 0:ef(G,w),onContextMenu:ef(O,w),onWheel:ef(L,w),onMouseEnter:ce?void 0:p,onMouseDown:ce?F:void 0,onMouseMove:ce?W:m,onMouseUp:ce?le:void 0,onMouseLeave:ce?se:g,ref:w,style:Wf},b,ee.createElement(e3,null))});xg.displayName="Pane";function pg(n,s){const i=n.parentNode||n.parentId;if(!i)return!1;const r=s.get(i);return r?r.selected?!0:pg(r,s):!1}function Ox(n,s,i){let r=n;do{if(r?.matches(s))return!0;if(r===i.current)return!1;r=r.parentElement}while(r);return!1}function l3(n,s,i,r){return Array.from(n.values()).filter(f=>(f.selected||f.id===r)&&(!f.parentNode||f.parentId||!pg(f,n))&&(f.draggable||s&&typeof f.draggable>"u")).map(f=>({id:f.id,position:f.position||{x:0,y:0},positionAbsolute:f.positionAbsolute||{x:0,y:0},distance:{x:i.x-(f.positionAbsolute?.x??0),y:i.y-(f.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:f.extent,parentNode:f.parentNode||f.parentId,parentId:f.parentNode||f.parentId,width:f.width,height:f.height,expandParent:f.expandParent}))}function a3(n,s){return!s||s==="parent"?s:[s[0],[s[1][0]-(n.width||0),s[1][1]-(n.height||0)]]}function gg(n,s,i,r,f=[0,0],d){const h=a3(n,n.extent||r);let x=h;const p=n.parentNode||n.parentId;if(n.extent==="parent"&&!n.expandParent)if(p&&n.width&&n.height){const b=i.get(p),{x:w,y:j}=Pa(b,f).positionAbsolute;x=b&&tn(w)&&tn(j)&&tn(b.width)&&tn(b.height)?[[w+n.width*f[0],j+n.height*f[1]],[w+b.width-n.width+n.width*f[0],j+b.height-n.height+n.height*f[1]]]:x}else d?.("005",Zn.error005()),x=h;else if(n.extent&&p&&n.extent!=="parent"){const b=i.get(p),{x:w,y:j}=Pa(b,f).positionAbsolute;x=[[n.extent[0][0]+w,n.extent[0][1]+j],[n.extent[1][0]+w,n.extent[1][1]+j]]}let m={x:0,y:0};if(p){const b=i.get(p);m=Pa(b,f).positionAbsolute}const g=x&&x!=="parent"?Lf(s,x):s;return{position:{x:g.x-m.x,y:g.y-m.y},positionAbsolute:g}}function tf({nodeId:n,dragItems:s,nodeInternals:i}){const r=s.map(f=>({...i.get(f.id),position:f.position,positionAbsolute:f.positionAbsolute}));return[n?r.find(f=>f.id===n):r[0],r]}const kx=(n,s,i,r)=>{const f=s.querySelectorAll(n);if(!f||!f.length)return null;const d=Array.from(f),h=s.getBoundingClientRect(),x={x:h.width*r[0],y:h.height*r[1]};return d.map(p=>{const m=p.getBoundingClientRect();return{id:p.getAttribute("data-handleid"),position:p.getAttribute("data-handlepos"),x:(m.left-h.left-x.x)/i,y:(m.top-h.top-x.y)/i,...qf(p)}})};function di(n,s,i){return i===void 0?i:r=>{const f=s().nodeInternals.get(n);f&&i(r,{...f})}}function Ef({id:n,store:s,unselect:i=!1,nodeRef:r}){const{addSelectedNodes:f,unselectNodesAndEdges:d,multiSelectionActive:h,nodeInternals:x,onError:p}=s.getState(),m=x.get(n);if(!m){p?.("012",Zn.error012(n));return}s.setState({nodesSelectionActive:!1}),m.selected?(i||m.selected&&h)&&(d({nodes:[m],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):f([n])}function s3(){const n=ct();return _.useCallback(({sourceEvent:i})=>{const{transform:r,snapGrid:f,snapToGrid:d}=n.getState(),h=i.touches?i.touches[0].clientX:i.clientX,x=i.touches?i.touches[0].clientY:i.clientY,p={x:(h-r[0])/r[2],y:(x-r[1])/r[2]};return{xSnapped:d?f[0]*Math.round(p.x/f[0]):p.x,ySnapped:d?f[1]*Math.round(p.y/f[1]):p.y,...p}},[])}function nf(n){return(s,i,r)=>n?.(s,r)}function yg({nodeRef:n,disabled:s=!1,noDragClassName:i,handleSelector:r,nodeId:f,isSelectable:d,selectNodesOnDrag:h}){const x=ct(),[p,m]=_.useState(!1),g=_.useRef([]),b=_.useRef({x:null,y:null}),w=_.useRef(0),j=_.useRef(null),T=_.useRef({x:0,y:0}),M=_.useRef(null),A=_.useRef(!1),C=_.useRef(!1),H=_.useRef(!1),V=s3();return _.useEffect(()=>{if(n?.current){const R=on(n.current),G=({x:F,y:W})=>{const{nodeInternals:le,onNodeDrag:se,onSelectionDrag:ce,updateNodePositions:ie,nodeExtent:E,snapGrid:J,snapToGrid:S,nodeOrigin:U,onError:Z}=x.getState();b.current={x:F,y:W};let q=!1,N={x:0,y:0,x2:0,y2:0};if(g.current.length>1&&E){const Q=Zf(g.current,U);N=Yf(Q)}if(g.current=g.current.map(Q=>{const I={x:F-Q.distance.x,y:W-Q.distance.y};S&&(I.x=J[0]*Math.round(I.x/J[0]),I.y=J[1]*Math.round(I.y/J[1]));const ne=[[E[0][0],E[0][1]],[E[1][0],E[1][1]]];g.current.length>1&&E&&!Q.extent&&(ne[0][0]=Q.positionAbsolute.x-N.x+E[0][0],ne[1][0]=Q.positionAbsolute.x+(Q.width??0)-N.x2+E[1][0],ne[0][1]=Q.positionAbsolute.y-N.y+E[0][1],ne[1][1]=Q.positionAbsolute.y+(Q.height??0)-N.y2+E[1][1]);const oe=gg(Q,I,le,ne,U,Z);return q=q||Q.position.x!==oe.position.x||Q.position.y!==oe.position.y,Q.position=oe.position,Q.positionAbsolute=oe.positionAbsolute,Q}),!q)return;ie(g.current,!0,!0),m(!0);const k=f?se:nf(ce);if(k&&M.current){const[Q,I]=tf({nodeId:f,dragItems:g.current,nodeInternals:le});k(M.current,Q,I)}},O=()=>{if(!j.current)return;const[F,W]=Lp(T.current,j.current);if(F!==0||W!==0){const{transform:le,panBy:se}=x.getState();b.current.x=(b.current.x??0)-F/le[2],b.current.y=(b.current.y??0)-W/le[2],se({x:F,y:W})&&G(b.current)}w.current=requestAnimationFrame(O)},L=F=>{const{nodeInternals:W,multiSelectionActive:le,nodesDraggable:se,unselectNodesAndEdges:ce,onNodeDragStart:ie,onSelectionDragStart:E}=x.getState();C.current=!0;const J=f?ie:nf(E);(!h||!d)&&!le&&f&&(W.get(f)?.selected||ce()),f&&d&&h&&Ef({id:f,store:x,nodeRef:n});const S=V(F);if(b.current=S,g.current=l3(W,se,S,f),J&&g.current){const[U,Z]=tf({nodeId:f,dragItems:g.current,nodeInternals:W});J(F.sourceEvent,U,Z)}};if(s)R.on(".drag",null);else{const F=mw().on("start",W=>{const{domNode:le,nodeDragThreshold:se}=x.getState();se===0&&L(W),H.current=!1;const ce=V(W);b.current=ce,j.current=le?.getBoundingClientRect()||null,T.current=Al(W.sourceEvent,j.current)}).on("drag",W=>{const le=V(W),{autoPanOnNodeDrag:se,nodeDragThreshold:ce}=x.getState();if(W.sourceEvent.type==="touchmove"&&W.sourceEvent.touches.length>1&&(H.current=!0),!H.current){if(!A.current&&C.current&&se&&(A.current=!0,O()),!C.current){const ie=le.xSnapped-(b?.current?.x??0),E=le.ySnapped-(b?.current?.y??0);Math.sqrt(ie*ie+E*E)>ce&&L(W)}(b.current.x!==le.xSnapped||b.current.y!==le.ySnapped)&&g.current&&C.current&&(M.current=W.sourceEvent,T.current=Al(W.sourceEvent,j.current),G(le))}}).on("end",W=>{if(!(!C.current||H.current)&&(m(!1),A.current=!1,C.current=!1,cancelAnimationFrame(w.current),g.current)){const{updateNodePositions:le,nodeInternals:se,onNodeDragStop:ce,onSelectionDragStop:ie}=x.getState(),E=f?ce:nf(ie);if(le(g.current,!1,!1),E){const[J,S]=tf({nodeId:f,dragItems:g.current,nodeInternals:se});E(W.sourceEvent,J,S)}}}).filter(W=>{const le=W.target;return!W.button&&(!i||!Ox(le,`.${i}`,n))&&(!r||Ox(le,r,n))});return R.call(F),()=>{R.on(".drag",null)}}}},[n,s,i,r,d,x,f,h,V]),p}function bg(){const n=ct();return _.useCallback(i=>{const{nodeInternals:r,nodeExtent:f,updateNodePositions:d,getNodes:h,snapToGrid:x,snapGrid:p,onError:m,nodesDraggable:g}=n.getState(),b=h().filter(H=>H.selected&&(H.draggable||g&&typeof H.draggable>"u")),w=x?p[0]:5,j=x?p[1]:5,T=i.isShiftPressed?4:1,M=i.x*w*T,A=i.y*j*T,C=b.map(H=>{if(H.positionAbsolute){const V={x:H.positionAbsolute.x+M,y:H.positionAbsolute.y+A};x&&(V.x=p[0]*Math.round(V.x/p[0]),V.y=p[1]*Math.round(V.y/p[1]));const{positionAbsolute:R,position:G}=gg(H,V,r,f,void 0,m);H.position=G,H.positionAbsolute=R}return H});d(C,!0,!1)},[])}const es={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var hi=n=>{const s=({id:i,type:r,data:f,xPos:d,yPos:h,xPosOrigin:x,yPosOrigin:p,selected:m,onClick:g,onMouseEnter:b,onMouseMove:w,onMouseLeave:j,onContextMenu:T,onDoubleClick:M,style:A,className:C,isDraggable:H,isSelectable:V,isConnectable:R,isFocusable:G,selectNodesOnDrag:O,sourcePosition:L,targetPosition:F,hidden:W,resizeObserver:le,dragHandle:se,zIndex:ce,isParent:ie,noDragClassName:E,noPanClassName:J,initialized:S,disableKeyboardA11y:U,ariaLabel:Z,rfId:q,hasHandleBounds:N})=>{const k=ct(),Q=_.useRef(null),I=_.useRef(null),ne=_.useRef(L),oe=_.useRef(F),re=_.useRef(r),be=V||H||g||b||w||j,me=bg(),Ae=di(i,k.getState,b),Ce=di(i,k.getState,w),ft=di(i,k.getState,j),dt=di(i,k.getState,T),bt=di(i,k.getState,M),ht=_e=>{const{nodeDragThreshold:he}=k.getState();if(V&&(!O||!H||he>0)&&Ef({id:i,store:k,nodeRef:Q}),g){const mt=k.getState().nodeInternals.get(i);mt&&g(_e,{...mt})}},Ze=_e=>{if(!vf(_e)&&!U)if(Vp.includes(_e.key)&&V){const he=_e.key==="Escape";Ef({id:i,store:k,unselect:he,nodeRef:Q})}else H&&m&&Object.prototype.hasOwnProperty.call(es,_e.key)&&(k.setState({ariaLiveMessage:`Moved selected node ${_e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~d}, y: ${~~h}`}),me({x:es[_e.key].x,y:es[_e.key].y,isShiftPressed:_e.shiftKey}))};_.useEffect(()=>()=>{I.current&&(le?.unobserve(I.current),I.current=null)},[]),_.useEffect(()=>{if(Q.current&&!W){const _e=Q.current;(!S||!N||I.current!==_e)&&(I.current&&le?.unobserve(I.current),le?.observe(_e),I.current=_e)}},[W,S,N]),_.useEffect(()=>{const _e=re.current!==r,he=ne.current!==L,mt=oe.current!==F;Q.current&&(_e||he||mt)&&(_e&&(re.current=r),he&&(ne.current=L),mt&&(oe.current=F),k.getState().updateNodeDimensions([{id:i,nodeElement:Q.current,forceUpdate:!0}]))},[i,r,L,F]);const Vt=yg({nodeRef:Q,disabled:W||!H,noDragClassName:E,handleSelector:se,nodeId:i,isSelectable:V,selectNodesOnDrag:O});return W?null:ee.createElement("div",{className:jt(["react-flow__node",`react-flow__node-${r}`,{[J]:H},C,{selected:m,selectable:V,parent:ie,dragging:Vt}]),ref:Q,style:{zIndex:ce,transform:`translate(${x}px,${p}px)`,pointerEvents:be?"all":"none",visibility:S?"visible":"hidden",...A},"data-id":i,"data-testid":`rf__node-${i}`,onMouseEnter:Ae,onMouseMove:Ce,onMouseLeave:ft,onContextMenu:dt,onClick:ht,onDoubleClick:bt,onKeyDown:G?Ze:void 0,tabIndex:G?0:void 0,role:G?"button":void 0,"aria-describedby":U?void 0:`${rg}-${q}`,"aria-label":Z},ee.createElement(bN,{value:i},ee.createElement(n,{id:i,data:f,type:r,xPos:d,yPos:h,selected:m,isConnectable:R,sourcePosition:L,targetPosition:F,dragging:Vt,dragHandle:se,zIndex:ce})))};return s.displayName="NodeWrapper",_.memo(s)};const i3=n=>{const s=n.getNodes().filter(i=>i.selected);return{...Zf(s,n.nodeOrigin),transformString:`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`,userSelectionActive:n.userSelectionActive}};function c3({onSelectionContextMenu:n,noPanClassName:s,disableKeyboardA11y:i}){const r=ct(),{width:f,height:d,x:h,y:x,transformString:p,userSelectionActive:m}=Ve(i3,yt),g=bg(),b=_.useRef(null);if(_.useEffect(()=>{i||b.current?.focus({preventScroll:!0})},[i]),yg({nodeRef:b}),m||!f||!d)return null;const w=n?T=>{const M=r.getState().getNodes().filter(A=>A.selected);n(T,M)}:void 0,j=T=>{Object.prototype.hasOwnProperty.call(es,T.key)&&g({x:es[T.key].x,y:es[T.key].y,isShiftPressed:T.shiftKey})};return ee.createElement("div",{className:jt(["react-flow__nodesselection","react-flow__container",s]),style:{transform:p}},ee.createElement("div",{ref:b,className:"react-flow__nodesselection-rect",onContextMenu:w,tabIndex:i?void 0:-1,onKeyDown:i?void 0:j,style:{width:f,height:d,top:x,left:h}}))}var r3=_.memo(c3);const o3=n=>n.nodesSelectionActive,vg=({children:n,onPaneClick:s,onPaneMouseEnter:i,onPaneMouseMove:r,onPaneMouseLeave:f,onPaneContextMenu:d,onPaneScroll:h,deleteKeyCode:x,onMove:p,onMoveStart:m,onMoveEnd:g,selectionKeyCode:b,selectionOnDrag:w,selectionMode:j,onSelectionStart:T,onSelectionEnd:M,multiSelectionKeyCode:A,panActivationKeyCode:C,zoomActivationKeyCode:H,elementsSelectable:V,zoomOnScroll:R,zoomOnPinch:G,panOnScroll:O,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:W,panOnDrag:le,defaultViewport:se,translateExtent:ce,minZoom:ie,maxZoom:E,preventScrolling:J,onSelectionContextMenu:S,noWheelClassName:U,noPanClassName:Z,disableKeyboardA11y:q})=>{const N=Ve(o3),k=_i(b),Q=_i(C),I=Q||le,ne=Q||O,oe=k||w&&I!==!0;return KN({deleteKeyCode:x,multiSelectionKeyCode:A}),ee.createElement(IN,{onMove:p,onMoveStart:m,onMoveEnd:g,onPaneContextMenu:d,elementsSelectable:V,zoomOnScroll:R,zoomOnPinch:G,panOnScroll:ne,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:W,panOnDrag:!k&&I,defaultViewport:se,translateExtent:ce,minZoom:ie,maxZoom:E,zoomActivationKeyCode:H,preventScrolling:J,noWheelClassName:U,noPanClassName:Z},ee.createElement(xg,{onSelectionStart:T,onSelectionEnd:M,onPaneClick:s,onPaneMouseEnter:i,onPaneMouseMove:r,onPaneMouseLeave:f,onPaneContextMenu:d,onPaneScroll:h,panOnDrag:I,isSelecting:!!oe,selectionMode:j},n,N&&ee.createElement(r3,{onSelectionContextMenu:S,noPanClassName:Z,disableKeyboardA11y:q})))};vg.displayName="FlowRenderer";var u3=_.memo(vg);function f3(n){return Ve(_.useCallback(i=>n?Jp(i.nodeInternals,{x:0,y:0,width:i.width,height:i.height},i.transform,!0):i.getNodes(),[n]))}function d3(n){const s={input:hi(n.input||ag),default:hi(n.default||jf),output:hi(n.output||ig),group:hi(n.group||Kf)},i={},r=Object.keys(n).filter(f=>!["input","default","output","group"].includes(f)).reduce((f,d)=>(f[d]=hi(n[d]||jf),f),i);return{...s,...r}}const h3=({x:n,y:s,width:i,height:r,origin:f})=>!i||!r?{x:n,y:s}:f[0]<0||f[1]<0||f[0]>1||f[1]>1?{x:n,y:s}:{x:n-i*f[0],y:s-r*f[1]},m3=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,updateNodeDimensions:n.updateNodeDimensions,onError:n.onError}),wg=n=>{const{nodesDraggable:s,nodesConnectable:i,nodesFocusable:r,elementsSelectable:f,updateNodeDimensions:d,onError:h}=Ve(m3,yt),x=f3(n.onlyRenderVisibleElements),p=_.useRef(),m=_.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const g=new ResizeObserver(b=>{const w=b.map(j=>({id:j.target.getAttribute("data-id"),nodeElement:j.target,forceUpdate:!0}));d(w)});return p.current=g,g},[]);return _.useEffect(()=>()=>{p?.current?.disconnect()},[]),ee.createElement("div",{className:"react-flow__nodes",style:Wf},x.map(g=>{let b=g.type||"default";n.nodeTypes[b]||(h?.("003",Zn.error003(b)),b="default");const w=n.nodeTypes[b]||n.nodeTypes.default,j=!!(g.draggable||s&&typeof g.draggable>"u"),T=!!(g.selectable||f&&typeof g.selectable>"u"),M=!!(g.connectable||i&&typeof g.connectable>"u"),A=!!(g.focusable||r&&typeof g.focusable>"u"),C=n.nodeExtent?Lf(g.positionAbsolute,n.nodeExtent):g.positionAbsolute,H=C?.x??0,V=C?.y??0,R=h3({x:H,y:V,width:g.width??0,height:g.height??0,origin:n.nodeOrigin});return ee.createElement(w,{key:g.id,id:g.id,className:g.className,style:g.style,type:b,data:g.data,sourcePosition:g.sourcePosition||de.Bottom,targetPosition:g.targetPosition||de.Top,hidden:g.hidden,xPos:H,yPos:V,xPosOrigin:R.x,yPosOrigin:R.y,selectNodesOnDrag:n.selectNodesOnDrag,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,selected:!!g.selected,isDraggable:j,isSelectable:T,isConnectable:M,isFocusable:A,resizeObserver:m,dragHandle:g.dragHandle,zIndex:g[Xe]?.z??0,isParent:!!g[Xe]?.isParent,noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,initialized:!!g.width&&!!g.height,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,ariaLabel:g.ariaLabel,hasHandleBounds:!!g[Xe]?.handleBounds})}))};wg.displayName="NodeRenderer";var x3=_.memo(wg);const p3=(n,s,i)=>i===de.Left?n-s:i===de.Right?n+s:n,g3=(n,s,i)=>i===de.Top?n-s:i===de.Bottom?n+s:n,Hx="react-flow__edgeupdater",Ux=({position:n,centerX:s,centerY:i,radius:r=10,onMouseDown:f,onMouseEnter:d,onMouseOut:h,type:x})=>ee.createElement("circle",{onMouseDown:f,onMouseEnter:d,onMouseOut:h,className:jt([Hx,`${Hx}-${x}`]),cx:p3(s,r,n),cy:g3(i,r,n),r,stroke:"transparent",fill:"transparent"}),y3=()=>!0;var Za=n=>{const s=({id:i,className:r,type:f,data:d,onClick:h,onEdgeDoubleClick:x,selected:p,animated:m,label:g,labelStyle:b,labelShowBg:w,labelBgStyle:j,labelBgPadding:T,labelBgBorderRadius:M,style:A,source:C,target:H,sourceX:V,sourceY:R,targetX:G,targetY:O,sourcePosition:L,targetPosition:F,elementsSelectable:W,hidden:le,sourceHandleId:se,targetHandleId:ce,onContextMenu:ie,onMouseEnter:E,onMouseMove:J,onMouseLeave:S,reconnectRadius:U,onReconnect:Z,onReconnectStart:q,onReconnectEnd:N,markerEnd:k,markerStart:Q,rfId:I,ariaLabel:ne,isFocusable:oe,isReconnectable:re,pathOptions:be,interactionWidth:me,disableKeyboardA11y:Ae})=>{const Ce=_.useRef(null),[ft,dt]=_.useState(!1),[bt,ht]=_.useState(!1),Ze=ct(),Vt=_.useMemo(()=>`url('#${Nf(Q,I)}')`,[Q,I]),_e=_.useMemo(()=>`url('#${Nf(k,I)}')`,[k,I]);if(le)return null;const he=nt=>{const{edges:$t,addSelectedEdges:Gt,unselectNodesAndEdges:Xt,multiSelectionActive:Et}=Ze.getState(),wt=$t.find(Rt=>Rt.id===i);wt&&(W&&(Ze.setState({nodesSelectionActive:!1}),wt.selected&&Et?(Xt({nodes:[],edges:[wt]}),Ce.current?.blur()):Gt([i])),h&&h(nt,wt))},mt=fi(i,Ze.getState,x),mn=fi(i,Ze.getState,ie),xn=fi(i,Ze.getState,E),Qn=fi(i,Ze.getState,J),En=fi(i,Ze.getState,S),ln=(nt,$t)=>{if(nt.button!==0)return;const{edges:Gt,isValidConnection:Xt}=Ze.getState(),Et=$t?H:C,wt=($t?ce:se)||null,Rt=$t?"target":"source",rs=Xt||y3,ia=$t,Jn=Gt.find(_n=>_n.id===i);ht(!0),q?.(nt,Jn,Rt);const Rl=_n=>{ht(!1),N?.(_n,Jn,Rt)};eg({event:nt,handleId:wt,nodeId:Et,onConnect:_n=>Z?.(Jn,_n),isTarget:ia,getState:Ze.getState,setState:Ze.setState,isValidConnection:rs,edgeUpdaterType:Rt,onReconnectEnd:Rl})},Kn=nt=>ln(nt,!0),Ct=nt=>ln(nt,!1),Qe=()=>dt(!0),vt=()=>dt(!1),We=!W&&!h,Cl=nt=>{if(!Ae&&Vp.includes(nt.key)&&W){const{unselectNodesAndEdges:$t,addSelectedEdges:Gt,edges:Xt}=Ze.getState();nt.key==="Escape"?(Ce.current?.blur(),$t({edges:[Xt.find(wt=>wt.id===i)]})):Gt([i])}};return ee.createElement("g",{className:jt(["react-flow__edge",`react-flow__edge-${f}`,r,{selected:p,animated:m,inactive:We,updating:ft}]),onClick:he,onDoubleClick:mt,onContextMenu:mn,onMouseEnter:xn,onMouseMove:Qn,onMouseLeave:En,onKeyDown:oe?Cl:void 0,tabIndex:oe?0:void 0,role:oe?"button":"img","data-testid":`rf__edge-${i}`,"aria-label":ne===null?void 0:ne||`Edge from ${C} to ${H}`,"aria-describedby":oe?`${og}-${I}`:void 0,ref:Ce},!bt&&ee.createElement(n,{id:i,source:C,target:H,selected:p,animated:m,label:g,labelStyle:b,labelShowBg:w,labelBgStyle:j,labelBgPadding:T,labelBgBorderRadius:M,data:d,style:A,sourceX:V,sourceY:R,targetX:G,targetY:O,sourcePosition:L,targetPosition:F,sourceHandleId:se,targetHandleId:ce,markerStart:Vt,markerEnd:_e,pathOptions:be,interactionWidth:me}),re&&ee.createElement(ee.Fragment,null,(re==="source"||re===!0)&&ee.createElement(Ux,{position:L,centerX:V,centerY:R,radius:U,onMouseDown:Kn,onMouseEnter:Qe,onMouseOut:vt,type:"source"}),(re==="target"||re===!0)&&ee.createElement(Ux,{position:F,centerX:G,centerY:O,radius:U,onMouseDown:Ct,onMouseEnter:Qe,onMouseOut:vt,type:"target"})))};return s.displayName="EdgeWrapper",_.memo(s)};function b3(n){const s={default:Za(n.default||Nr),straight:Za(n.bezier||Gf),step:Za(n.step||$f),smoothstep:Za(n.step||Mr),simplebezier:Za(n.simplebezier||Vf)},i={},r=Object.keys(n).filter(f=>!["default","bezier"].includes(f)).reduce((f,d)=>(f[d]=Za(n[d]||Nr),f),i);return{...s,...r}}function Bx(n,s,i=null){const r=(i?.x||0)+s.x,f=(i?.y||0)+s.y,d=i?.width||s.width,h=i?.height||s.height;switch(n){case de.Top:return{x:r+d/2,y:f};case de.Right:return{x:r+d,y:f+h/2};case de.Bottom:return{x:r+d/2,y:f+h};case de.Left:return{x:r,y:f+h/2}}}function qx(n,s){return n?n.length===1||!s?n[0]:s&&n.find(i=>i.id===s)||null:null}const v3=(n,s,i,r,f,d)=>{const h=Bx(i,n,s),x=Bx(d,r,f);return{sourceX:h.x,sourceY:h.y,targetX:x.x,targetY:x.y}};function w3({sourcePos:n,targetPos:s,sourceWidth:i,sourceHeight:r,targetWidth:f,targetHeight:d,width:h,height:x,transform:p}){const m={x:Math.min(n.x,s.x),y:Math.min(n.y,s.y),x2:Math.max(n.x+i,s.x+f),y2:Math.max(n.y+r,s.y+d)};m.x===m.x2&&(m.x2+=1),m.y===m.y2&&(m.y2+=1);const g=Yf({x:(0-p[0])/p[2],y:(0-p[1])/p[2],width:h/p[2],height:x/p[2]}),b=Math.max(0,Math.min(g.x2,m.x2)-Math.max(g.x,m.x)),w=Math.max(0,Math.min(g.y2,m.y2)-Math.max(g.y,m.y));return Math.ceil(b*w)>0}function Lx(n){const s=n?.[Xe]?.handleBounds||null,i=s&&n?.width&&n?.height&&typeof n?.positionAbsolute?.x<"u"&&typeof n?.positionAbsolute?.y<"u";return[{x:n?.positionAbsolute?.x||0,y:n?.positionAbsolute?.y||0,width:n?.width||0,height:n?.height||0},s,!!i]}const N3=[{level:0,isMaxLevel:!0,edges:[]}];function S3(n,s,i=!1){let r=-1;const f=n.reduce((h,x)=>{const p=tn(x.zIndex);let m=p?x.zIndex:0;if(i){const g=s.get(x.target),b=s.get(x.source),w=x.selected||g?.selected||b?.selected,j=Math.max(b?.[Xe]?.z||0,g?.[Xe]?.z||0,1e3);m=(p?x.zIndex:0)+(w?j:0)}return h[m]?h[m].push(x):h[m]=[x],r=m>r?m:r,h},{}),d=Object.entries(f).map(([h,x])=>{const p=+h;return{edges:x,level:p,isMaxLevel:p===r}});return d.length===0?N3:d}function j3(n,s,i){const r=Ve(_.useCallback(f=>n?f.edges.filter(d=>{const h=s.get(d.source),x=s.get(d.target);return h?.width&&h?.height&&x?.width&&x?.height&&w3({sourcePos:h.positionAbsolute||{x:0,y:0},targetPos:x.positionAbsolute||{x:0,y:0},sourceWidth:h.width,sourceHeight:h.height,targetWidth:x.width,targetHeight:x.height,width:f.width,height:f.height,transform:f.transform})}):f.edges,[n,s]));return S3(r,s,i)}const E3=({color:n="none",strokeWidth:s=1})=>ee.createElement("polyline",{style:{stroke:n,strokeWidth:s},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),_3=({color:n="none",strokeWidth:s=1})=>ee.createElement("polyline",{style:{stroke:n,fill:n,strokeWidth:s},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Yx={[Ei.Arrow]:E3,[Ei.ArrowClosed]:_3};function z3(n){const s=ct();return _.useMemo(()=>Object.prototype.hasOwnProperty.call(Yx,n)?Yx[n]:(s.getState().onError?.("009",Zn.error009(n)),null),[n])}const M3=({id:n,type:s,color:i,width:r=12.5,height:f=12.5,markerUnits:d="strokeWidth",strokeWidth:h,orient:x="auto-start-reverse"})=>{const p=z3(s);return p?ee.createElement("marker",{className:"react-flow__arrowhead",id:n,markerWidth:`${r}`,markerHeight:`${f}`,viewBox:"-10 -10 20 20",markerUnits:d,orient:x,refX:"0",refY:"0"},ee.createElement(p,{color:i,strokeWidth:h})):null},A3=({defaultColor:n,rfId:s})=>i=>{const r=[];return i.edges.reduce((f,d)=>([d.markerStart,d.markerEnd].forEach(h=>{if(h&&typeof h=="object"){const x=Nf(h,s);r.includes(x)||(f.push({id:x,color:h.color||n,...h}),r.push(x))}}),f),[]).sort((f,d)=>f.id.localeCompare(d.id))},Ng=({defaultColor:n,rfId:s})=>{const i=Ve(_.useCallback(A3({defaultColor:n,rfId:s}),[n,s]),(r,f)=>!(r.length!==f.length||r.some((d,h)=>d.id!==f[h].id)));return ee.createElement("defs",null,i.map(r=>ee.createElement(M3,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};Ng.displayName="MarkerDefinitions";var T3=_.memo(Ng);const C3=n=>({nodesConnectable:n.nodesConnectable,edgesFocusable:n.edgesFocusable,edgesUpdatable:n.edgesUpdatable,elementsSelectable:n.elementsSelectable,width:n.width,height:n.height,connectionMode:n.connectionMode,nodeInternals:n.nodeInternals,onError:n.onError}),Sg=({defaultMarkerColor:n,onlyRenderVisibleElements:s,elevateEdgesOnSelect:i,rfId:r,edgeTypes:f,noPanClassName:d,onEdgeContextMenu:h,onEdgeMouseEnter:x,onEdgeMouseMove:p,onEdgeMouseLeave:m,onEdgeClick:g,onEdgeDoubleClick:b,onReconnect:w,onReconnectStart:j,onReconnectEnd:T,reconnectRadius:M,children:A,disableKeyboardA11y:C})=>{const{edgesFocusable:H,edgesUpdatable:V,elementsSelectable:R,width:G,height:O,connectionMode:L,nodeInternals:F,onError:W}=Ve(C3,yt),le=j3(s,F,i);return G?ee.createElement(ee.Fragment,null,le.map(({level:se,edges:ce,isMaxLevel:ie})=>ee.createElement("svg",{key:se,style:{zIndex:se},width:G,height:O,className:"react-flow__edges react-flow__container"},ie&&ee.createElement(T3,{defaultColor:n,rfId:r}),ee.createElement("g",null,ce.map(E=>{const[J,S,U]=Lx(F.get(E.source)),[Z,q,N]=Lx(F.get(E.target));if(!U||!N)return null;let k=E.type||"default";f[k]||(W?.("011",Zn.error011(k)),k="default");const Q=f[k]||f.default,I=L===la.Strict?q.target:(q.target??[]).concat(q.source??[]),ne=qx(S.source,E.sourceHandle),oe=qx(I,E.targetHandle),re=ne?.position||de.Bottom,be=oe?.position||de.Top,me=!!(E.focusable||H&&typeof E.focusable>"u"),Ae=E.reconnectable||E.updatable,Ce=typeof w<"u"&&(Ae||V&&typeof Ae>"u");if(!ne||!oe)return W?.("008",Zn.error008(ne,E)),null;const{sourceX:ft,sourceY:dt,targetX:bt,targetY:ht}=v3(J,ne,re,Z,oe,be);return ee.createElement(Q,{key:E.id,id:E.id,className:jt([E.className,d]),type:k,data:E.data,selected:!!E.selected,animated:!!E.animated,hidden:!!E.hidden,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,style:E.style,source:E.source,target:E.target,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerEnd:E.markerEnd,markerStart:E.markerStart,sourceX:ft,sourceY:dt,targetX:bt,targetY:ht,sourcePosition:re,targetPosition:be,elementsSelectable:R,onContextMenu:h,onMouseEnter:x,onMouseMove:p,onMouseLeave:m,onClick:g,onEdgeDoubleClick:b,onReconnect:w,onReconnectStart:j,onReconnectEnd:T,reconnectRadius:M,rfId:r,ariaLabel:E.ariaLabel,isFocusable:me,isReconnectable:Ce,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth,disableKeyboardA11y:C})})))),A):null};Sg.displayName="EdgeRenderer";var R3=_.memo(Sg);const D3=n=>`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`;function O3({children:n}){const s=Ve(D3);return ee.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:s}},n)}function k3(n){const s=Jf(),i=_.useRef(!1);_.useEffect(()=>{!i.current&&s.viewportInitialized&&n&&(setTimeout(()=>n(s),1),i.current=!0)},[n,s.viewportInitialized])}const H3={[de.Left]:de.Right,[de.Right]:de.Left,[de.Top]:de.Bottom,[de.Bottom]:de.Top},jg=({nodeId:n,handleType:s,style:i,type:r=zl.Bezier,CustomComponent:f,connectionStatus:d})=>{const{fromNode:h,handleId:x,toX:p,toY:m,connectionMode:g}=Ve(_.useCallback(O=>({fromNode:O.nodeInternals.get(n),handleId:O.connectionHandleId,toX:(O.connectionPosition.x-O.transform[0])/O.transform[2],toY:(O.connectionPosition.y-O.transform[1])/O.transform[2],connectionMode:O.connectionMode}),[n]),yt),b=h?.[Xe]?.handleBounds;let w=b?.[s];if(g===la.Loose&&(w=w||b?.[s==="source"?"target":"source"]),!h||!w)return null;const j=x?w.find(O=>O.id===x):w[0],T=j?j.x+j.width/2:(h.width??0)/2,M=j?j.y+j.height/2:h.height??0,A=(h.positionAbsolute?.x??0)+T,C=(h.positionAbsolute?.y??0)+M,H=j?.position,V=H?H3[H]:null;if(!H||!V)return null;if(f)return ee.createElement(f,{connectionLineType:r,connectionLineStyle:i,fromNode:h,fromHandle:j,fromX:A,fromY:C,toX:p,toY:m,fromPosition:H,toPosition:V,connectionStatus:d});let R="";const G={sourceX:A,sourceY:C,sourcePosition:H,targetX:p,targetY:m,targetPosition:V};return r===zl.Bezier?[R]=Qp(G):r===zl.Step?[R]=wf({...G,borderRadius:0}):r===zl.SmoothStep?[R]=wf(G):r===zl.SimpleBezier?[R]=Zp(G):R=`M${A},${C} ${p},${m}`,ee.createElement("path",{d:R,fill:"none",className:"react-flow__connection-path",style:i})};jg.displayName="ConnectionLine";const U3=n=>({nodeId:n.connectionNodeId,handleType:n.connectionHandleType,nodesConnectable:n.nodesConnectable,connectionStatus:n.connectionStatus,width:n.width,height:n.height});function B3({containerStyle:n,style:s,type:i,component:r}){const{nodeId:f,handleType:d,nodesConnectable:h,width:x,height:p,connectionStatus:m}=Ve(U3,yt);return!(f&&d&&x&&h)?null:ee.createElement("svg",{style:n,width:x,height:p,className:"react-flow__edges react-flow__connectionline react-flow__container"},ee.createElement("g",{className:jt(["react-flow__connection",m])},ee.createElement(jg,{nodeId:f,handleType:d,style:s,type:i,CustomComponent:r,connectionStatus:m})))}function Vx(n,s){return _.useRef(null),ct(),_.useMemo(()=>s(n),[n])}const Eg=({nodeTypes:n,edgeTypes:s,onMove:i,onMoveStart:r,onMoveEnd:f,onInit:d,onNodeClick:h,onEdgeClick:x,onNodeDoubleClick:p,onEdgeDoubleClick:m,onNodeMouseEnter:g,onNodeMouseMove:b,onNodeMouseLeave:w,onNodeContextMenu:j,onSelectionContextMenu:T,onSelectionStart:M,onSelectionEnd:A,connectionLineType:C,connectionLineStyle:H,connectionLineComponent:V,connectionLineContainerStyle:R,selectionKeyCode:G,selectionOnDrag:O,selectionMode:L,multiSelectionKeyCode:F,panActivationKeyCode:W,zoomActivationKeyCode:le,deleteKeyCode:se,onlyRenderVisibleElements:ce,elementsSelectable:ie,selectNodesOnDrag:E,defaultViewport:J,translateExtent:S,minZoom:U,maxZoom:Z,preventScrolling:q,defaultMarkerColor:N,zoomOnScroll:k,zoomOnPinch:Q,panOnScroll:I,panOnScrollSpeed:ne,panOnScrollMode:oe,zoomOnDoubleClick:re,panOnDrag:be,onPaneClick:me,onPaneMouseEnter:Ae,onPaneMouseMove:Ce,onPaneMouseLeave:ft,onPaneScroll:dt,onPaneContextMenu:bt,onEdgeContextMenu:ht,onEdgeMouseEnter:Ze,onEdgeMouseMove:Vt,onEdgeMouseLeave:_e,onReconnect:he,onReconnectStart:mt,onReconnectEnd:mn,reconnectRadius:xn,noDragClassName:Qn,noWheelClassName:En,noPanClassName:ln,elevateEdgesOnSelect:Kn,disableKeyboardA11y:Ct,nodeOrigin:Qe,nodeExtent:vt,rfId:We})=>{const Cl=Vx(n,d3),nt=Vx(s,b3);return k3(d),ee.createElement(u3,{onPaneClick:me,onPaneMouseEnter:Ae,onPaneMouseMove:Ce,onPaneMouseLeave:ft,onPaneContextMenu:bt,onPaneScroll:dt,deleteKeyCode:se,selectionKeyCode:G,selectionOnDrag:O,selectionMode:L,onSelectionStart:M,onSelectionEnd:A,multiSelectionKeyCode:F,panActivationKeyCode:W,zoomActivationKeyCode:le,elementsSelectable:ie,onMove:i,onMoveStart:r,onMoveEnd:f,zoomOnScroll:k,zoomOnPinch:Q,zoomOnDoubleClick:re,panOnScroll:I,panOnScrollSpeed:ne,panOnScrollMode:oe,panOnDrag:be,defaultViewport:J,translateExtent:S,minZoom:U,maxZoom:Z,onSelectionContextMenu:T,preventScrolling:q,noDragClassName:Qn,noWheelClassName:En,noPanClassName:ln,disableKeyboardA11y:Ct},ee.createElement(O3,null,ee.createElement(R3,{edgeTypes:nt,onEdgeClick:x,onEdgeDoubleClick:m,onlyRenderVisibleElements:ce,onEdgeContextMenu:ht,onEdgeMouseEnter:Ze,onEdgeMouseMove:Vt,onEdgeMouseLeave:_e,onReconnect:he,onReconnectStart:mt,onReconnectEnd:mn,reconnectRadius:xn,defaultMarkerColor:N,noPanClassName:ln,elevateEdgesOnSelect:!!Kn,disableKeyboardA11y:Ct,rfId:We},ee.createElement(B3,{style:H,type:C,component:V,containerStyle:R})),ee.createElement("div",{className:"react-flow__edgelabel-renderer"}),ee.createElement(x3,{nodeTypes:Cl,onNodeClick:h,onNodeDoubleClick:p,onNodeMouseEnter:g,onNodeMouseMove:b,onNodeMouseLeave:w,onNodeContextMenu:j,selectNodesOnDrag:E,onlyRenderVisibleElements:ce,noPanClassName:ln,noDragClassName:Qn,disableKeyboardA11y:Ct,nodeOrigin:Qe,nodeExtent:vt,rfId:We})))};Eg.displayName="GraphView";var q3=_.memo(Eg);const _f=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],jl={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:_f,nodeExtent:_f,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:la.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:hN,isValidConnection:void 0},L3=()=>_v((n,s)=>({...jl,setNodes:i=>{const{nodeInternals:r,nodeOrigin:f,elevateNodesOnSelect:d}=s();n({nodeInternals:Pu(i,r,f,d)})},getNodes:()=>Array.from(s().nodeInternals.values()),setEdges:i=>{const{defaultEdgeOptions:r={}}=s();n({edges:i.map(f=>({...r,...f}))})},setDefaultNodesAndEdges:(i,r)=>{const f=typeof i<"u",d=typeof r<"u",h=f?Pu(i,new Map,s().nodeOrigin,s().elevateNodesOnSelect):new Map;n({nodeInternals:h,edges:d?r:[],hasDefaultNodes:f,hasDefaultEdges:d})},updateNodeDimensions:i=>{const{onNodesChange:r,nodeInternals:f,fitViewOnInit:d,fitViewOnInitDone:h,fitViewOnInitOptions:x,domNode:p,nodeOrigin:m}=s(),g=p?.querySelector(".react-flow__viewport");if(!g)return;const b=window.getComputedStyle(g),{m22:w}=new window.DOMMatrixReadOnly(b.transform),j=i.reduce((M,A)=>{const C=f.get(A.id);if(C?.hidden)f.set(C.id,{...C,[Xe]:{...C[Xe],handleBounds:void 0}});else if(C){const H=qf(A.nodeElement);!!(H.width&&H.height&&(C.width!==H.width||C.height!==H.height||A.forceUpdate))&&(f.set(C.id,{...C,[Xe]:{...C[Xe],handleBounds:{source:kx(".source",A.nodeElement,w,m),target:kx(".target",A.nodeElement,w,m)}},...H}),M.push({id:C.id,type:"dimensions",dimensions:H}))}return M},[]);fg(f,m);const T=h||d&&!h&&dg(s,{initial:!0,...x});n({nodeInternals:new Map(f),fitViewOnInitDone:T}),j?.length>0&&r?.(j)},updateNodePositions:(i,r=!0,f=!1)=>{const{triggerNodeChanges:d}=s(),h=i.map(x=>{const p={id:x.id,type:"position",dragging:f};return r&&(p.positionAbsolute=x.positionAbsolute,p.position=x.position),p});d(h)},triggerNodeChanges:i=>{const{onNodesChange:r,nodeInternals:f,hasDefaultNodes:d,nodeOrigin:h,getNodes:x,elevateNodesOnSelect:p}=s();if(i?.length){if(d){const m=mg(i,x()),g=Pu(m,f,h,p);n({nodeInternals:g})}r?.(i)}},addSelectedNodes:i=>{const{multiSelectionActive:r,edges:f,getNodes:d}=s();let h,x=null;r?h=i.map(p=>_l(p,!0)):(h=Ja(d(),i),x=Ja(f,[])),ir({changedNodes:h,changedEdges:x,get:s,set:n})},addSelectedEdges:i=>{const{multiSelectionActive:r,edges:f,getNodes:d}=s();let h,x=null;r?h=i.map(p=>_l(p,!0)):(h=Ja(f,i),x=Ja(d(),[])),ir({changedNodes:x,changedEdges:h,get:s,set:n})},unselectNodesAndEdges:({nodes:i,edges:r}={})=>{const{edges:f,getNodes:d}=s(),h=i||d(),x=r||f,p=h.map(g=>(g.selected=!1,_l(g.id,!1))),m=x.map(g=>_l(g.id,!1));ir({changedNodes:p,changedEdges:m,get:s,set:n})},setMinZoom:i=>{const{d3Zoom:r,maxZoom:f}=s();r?.scaleExtent([i,f]),n({minZoom:i})},setMaxZoom:i=>{const{d3Zoom:r,minZoom:f}=s();r?.scaleExtent([f,i]),n({maxZoom:i})},setTranslateExtent:i=>{s().d3Zoom?.translateExtent(i),n({translateExtent:i})},resetSelectedElements:()=>{const{edges:i,getNodes:r}=s(),d=r().filter(x=>x.selected).map(x=>_l(x.id,!1)),h=i.filter(x=>x.selected).map(x=>_l(x.id,!1));ir({changedNodes:d,changedEdges:h,get:s,set:n})},setNodeExtent:i=>{const{nodeInternals:r}=s();r.forEach(f=>{f.positionAbsolute=Lf(f.position,i)}),n({nodeExtent:i,nodeInternals:new Map(r)})},panBy:i=>{const{transform:r,width:f,height:d,d3Zoom:h,d3Selection:x,translateExtent:p}=s();if(!h||!x||!i.x&&!i.y)return!1;const m=Ml.translate(r[0]+i.x,r[1]+i.y).scale(r[2]),g=[[0,0],[f,d]],b=h?.constrain()(m,g,p);return h.transform(x,b),r[0]!==b.x||r[1]!==b.y||r[2]!==b.k},cancelConnection:()=>n({connectionNodeId:jl.connectionNodeId,connectionHandleId:jl.connectionHandleId,connectionHandleType:jl.connectionHandleType,connectionStatus:jl.connectionStatus,connectionStartHandle:jl.connectionStartHandle,connectionEndHandle:jl.connectionEndHandle}),reset:()=>n({...jl})}),Object.is),_g=({children:n})=>{const s=_.useRef(null);return s.current||(s.current=L3()),ee.createElement(sN,{value:s.current},n)};_g.displayName="ReactFlowProvider";const zg=({children:n})=>_.useContext(zr)?ee.createElement(ee.Fragment,null,n):ee.createElement(_g,null,n);zg.displayName="ReactFlowWrapper";const Y3={input:ag,default:jf,output:ig,group:Kf},V3={default:Nr,straight:Gf,step:$f,smoothstep:Mr,simplebezier:Vf},$3=[0,0],G3=[15,15],X3={x:0,y:0,zoom:1},Z3={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Mg=_.forwardRef(({nodes:n,edges:s,defaultNodes:i,defaultEdges:r,className:f,nodeTypes:d=Y3,edgeTypes:h=V3,onNodeClick:x,onEdgeClick:p,onInit:m,onMove:g,onMoveStart:b,onMoveEnd:w,onConnect:j,onConnectStart:T,onConnectEnd:M,onClickConnectStart:A,onClickConnectEnd:C,onNodeMouseEnter:H,onNodeMouseMove:V,onNodeMouseLeave:R,onNodeContextMenu:G,onNodeDoubleClick:O,onNodeDragStart:L,onNodeDrag:F,onNodeDragStop:W,onNodesDelete:le,onEdgesDelete:se,onSelectionChange:ce,onSelectionDragStart:ie,onSelectionDrag:E,onSelectionDragStop:J,onSelectionContextMenu:S,onSelectionStart:U,onSelectionEnd:Z,connectionMode:q=la.Strict,connectionLineType:N=zl.Bezier,connectionLineStyle:k,connectionLineComponent:Q,connectionLineContainerStyle:I,deleteKeyCode:ne="Backspace",selectionKeyCode:oe="Shift",selectionOnDrag:re=!1,selectionMode:be=ji.Full,panActivationKeyCode:me="Space",multiSelectionKeyCode:Ae=wr()?"Meta":"Control",zoomActivationKeyCode:Ce=wr()?"Meta":"Control",snapToGrid:ft=!1,snapGrid:dt=G3,onlyRenderVisibleElements:bt=!1,selectNodesOnDrag:ht=!0,nodesDraggable:Ze,nodesConnectable:Vt,nodesFocusable:_e,nodeOrigin:he=$3,edgesFocusable:mt,edgesUpdatable:mn,elementsSelectable:xn,defaultViewport:Qn=X3,minZoom:En=.5,maxZoom:ln=2,translateExtent:Kn=_f,preventScrolling:Ct=!0,nodeExtent:Qe,defaultMarkerColor:vt="#b1b1b7",zoomOnScroll:We=!0,zoomOnPinch:Cl=!0,panOnScroll:nt=!1,panOnScrollSpeed:$t=.5,panOnScrollMode:Gt=ea.Free,zoomOnDoubleClick:Xt=!0,panOnDrag:Et=!0,onPaneClick:wt,onPaneMouseEnter:Rt,onPaneMouseMove:rs,onPaneMouseLeave:ia,onPaneScroll:Jn,onPaneContextMenu:Rl,children:Wn,onEdgeContextMenu:_n,onEdgeDoubleClick:Di,onEdgeMouseEnter:Oi,onEdgeMouseMove:os,onEdgeMouseLeave:us,onEdgeUpdate:ki,onEdgeUpdateStart:Ar,onEdgeUpdateEnd:pn,onReconnect:lt,onReconnectStart:xt,onReconnectEnd:Fn,reconnectRadius:fs=10,edgeUpdaterRadius:Tr=10,onNodesChange:Cr,onEdgesChange:Hi,noDragClassName:Dl="nodrag",noWheelClassName:ds="nowheel",noPanClassName:zn="nopan",fitView:In=!1,fitViewOptions:Ol,connectOnClick:Pn=!0,attributionPosition:Fe,proOptions:Ui,defaultEdgeOptions:Bi,elevateNodesOnSelect:Mn=!0,elevateEdgesOnSelect:el=!1,disableKeyboardA11y:qi=!1,autoPanOnConnect:Li=!0,autoPanOnNodeDrag:Yi=!0,connectionRadius:Rr=20,isValidConnection:ca,onError:ra,style:an,id:oa,nodeDragThreshold:Vi,...tl},hs)=>{const kl=oa||"1";return ee.createElement("div",{...tl,style:{...an,...Z3},ref:hs,className:jt(["react-flow",f]),"data-testid":"rf__wrapper",id:oa},ee.createElement(zg,null,ee.createElement(q3,{onInit:m,onMove:g,onMoveStart:b,onMoveEnd:w,onNodeClick:x,onEdgeClick:p,onNodeMouseEnter:H,onNodeMouseMove:V,onNodeMouseLeave:R,onNodeContextMenu:G,onNodeDoubleClick:O,nodeTypes:d,edgeTypes:h,connectionLineType:N,connectionLineStyle:k,connectionLineComponent:Q,connectionLineContainerStyle:I,selectionKeyCode:oe,selectionOnDrag:re,selectionMode:be,deleteKeyCode:ne,multiSelectionKeyCode:Ae,panActivationKeyCode:me,zoomActivationKeyCode:Ce,onlyRenderVisibleElements:bt,selectNodesOnDrag:ht,defaultViewport:Qn,translateExtent:Kn,minZoom:En,maxZoom:ln,preventScrolling:Ct,zoomOnScroll:We,zoomOnPinch:Cl,zoomOnDoubleClick:Xt,panOnScroll:nt,panOnScrollSpeed:$t,panOnScrollMode:Gt,panOnDrag:Et,onPaneClick:wt,onPaneMouseEnter:Rt,onPaneMouseMove:rs,onPaneMouseLeave:ia,onPaneScroll:Jn,onPaneContextMenu:Rl,onSelectionContextMenu:S,onSelectionStart:U,onSelectionEnd:Z,onEdgeContextMenu:_n,onEdgeDoubleClick:Di,onEdgeMouseEnter:Oi,onEdgeMouseMove:os,onEdgeMouseLeave:us,onReconnect:lt??ki,onReconnectStart:xt??Ar,onReconnectEnd:Fn??pn,reconnectRadius:fs??Tr,defaultMarkerColor:vt,noDragClassName:Dl,noWheelClassName:ds,noPanClassName:zn,elevateEdgesOnSelect:el,rfId:kl,disableKeyboardA11y:qi,nodeOrigin:he,nodeExtent:Qe}),ee.createElement(HN,{nodes:n,edges:s,defaultNodes:i,defaultEdges:r,onConnect:j,onConnectStart:T,onConnectEnd:M,onClickConnectStart:A,onClickConnectEnd:C,nodesDraggable:Ze,nodesConnectable:Vt,nodesFocusable:_e,edgesFocusable:mt,edgesUpdatable:mn,elementsSelectable:xn,elevateNodesOnSelect:Mn,minZoom:En,maxZoom:ln,nodeExtent:Qe,onNodesChange:Cr,onEdgesChange:Hi,snapToGrid:ft,snapGrid:dt,connectionMode:q,translateExtent:Kn,connectOnClick:Pn,defaultEdgeOptions:Bi,fitView:In,fitViewOptions:Ol,onNodesDelete:le,onEdgesDelete:se,onNodeDragStart:L,onNodeDrag:F,onNodeDragStop:W,onSelectionDrag:E,onSelectionDragStart:ie,onSelectionDragStop:J,noPanClassName:zn,nodeOrigin:he,rfId:kl,autoPanOnConnect:Li,autoPanOnNodeDrag:Yi,onError:ra,connectionRadius:Rr,isValidConnection:ca,nodeDragThreshold:Vi}),ee.createElement(ON,{onSelectionChange:ce}),Wn,ee.createElement(cN,{proOptions:Ui,position:Fe}),ee.createElement(YN,{rfId:kl,disableKeyboardA11y:qi})))});Mg.displayName="ReactFlow";function Ag(n){return s=>{const[i,r]=_.useState(s),f=_.useCallback(d=>r(h=>n(d,h)),[]);return[i,r,f]}}const Q3=Ag(mg),K3=Ag(t3);function J3(){return ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},ee.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function W3(){return ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},ee.createElement("path",{d:"M0 0h32v4.2H0z"}))}function F3(){return ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},ee.createElement("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 I3(){return ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},ee.createElement("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 P3(){return ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},ee.createElement("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"}))}const gi=({children:n,className:s,...i})=>ee.createElement("button",{type:"button",className:jt(["react-flow__controls-button",s]),...i},n);gi.displayName="ControlButton";const eS=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom}),Tg=({style:n,showZoom:s=!0,showFitView:i=!0,showInteractive:r=!0,fitViewOptions:f,onZoomIn:d,onZoomOut:h,onFitView:x,onInteractiveChange:p,className:m,children:g,position:b="bottom-left"})=>{const w=ct(),[j,T]=_.useState(!1),{isInteractive:M,minZoomReached:A,maxZoomReached:C}=Ve(eS,yt),{zoomIn:H,zoomOut:V,fitView:R}=Jf();if(_.useEffect(()=>{T(!0)},[]),!j)return null;const G=()=>{H(),d?.()},O=()=>{V(),h?.()},L=()=>{R(f),x?.()},F=()=>{w.setState({nodesDraggable:!M,nodesConnectable:!M,elementsSelectable:!M}),p?.(!M)};return ee.createElement(qp,{className:jt(["react-flow__controls",m]),position:b,style:n,"data-testid":"rf__controls"},s&&ee.createElement(ee.Fragment,null,ee.createElement(gi,{onClick:G,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:C},ee.createElement(J3,null)),ee.createElement(gi,{onClick:O,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:A},ee.createElement(W3,null))),i&&ee.createElement(gi,{className:"react-flow__controls-fitview",onClick:L,title:"fit view","aria-label":"fit view"},ee.createElement(F3,null)),r&&ee.createElement(gi,{className:"react-flow__controls-interactive",onClick:F,title:"toggle interactivity","aria-label":"toggle interactivity"},M?ee.createElement(P3,null):ee.createElement(I3,null)),g)};Tg.displayName="Controls";var tS=_.memo(Tg),nn;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(nn||(nn={}));function nS({color:n,dimensions:s,lineWidth:i}){return ee.createElement("path",{stroke:n,strokeWidth:i,d:`M${s[0]/2} 0 V${s[1]} M0 ${s[1]/2} H${s[0]}`})}function lS({color:n,radius:s}){return ee.createElement("circle",{cx:s,cy:s,r:s,fill:n})}const aS={[nn.Dots]:"#91919a",[nn.Lines]:"#eee",[nn.Cross]:"#e2e2e2"},sS={[nn.Dots]:1,[nn.Lines]:1,[nn.Cross]:6},iS=n=>({transform:n.transform,patternId:`pattern-${n.rfId}`});function Cg({id:n,variant:s=nn.Dots,gap:i=20,size:r,lineWidth:f=1,offset:d=2,color:h,style:x,className:p}){const m=_.useRef(null),{transform:g,patternId:b}=Ve(iS,yt),w=h||aS[s],j=r||sS[s],T=s===nn.Dots,M=s===nn.Cross,A=Array.isArray(i)?i:[i,i],C=[A[0]*g[2]||1,A[1]*g[2]||1],H=j*g[2],V=M?[H,H]:C,R=T?[H/d,H/d]:[V[0]/d,V[1]/d];return ee.createElement("svg",{className:jt(["react-flow__background",p]),style:{...x,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:m,"data-testid":"rf__background"},ee.createElement("pattern",{id:b+n,x:g[0]%C[0],y:g[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`},T?ee.createElement(lS,{color:w,radius:H/d}):ee.createElement(nS,{dimensions:V,color:w,lineWidth:f})),ee.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${b+n})`}))}Cg.displayName="Background";var cS=_.memo(Cg);const $x={GET:{bg:"bg-emerald-500/10",text:"text-emerald-400",dot:"#34d399"},POST:{bg:"bg-blue-500/10",text:"text-blue-400",dot:"#60a5fa"},PUT:{bg:"bg-amber-500/10",text:"text-amber-400",dot:"#fbbf24"},PATCH:{bg:"bg-orange-500/10",text:"text-orange-400",dot:"#fb923c"},DELETE:{bg:"bg-red-500/10",text:"text-red-400",dot:"#f87171"},HEAD:{bg:"bg-zinc-500/10",text:"text-zinc-400",dot:"#a1a1aa"},OPTIONS:{bg:"bg-purple-500/10",text:"text-purple-400",dot:"#c084fc"}};function Ff(n){return $x[n.toUpperCase()]??$x.GET}function rS({method:n}){const s=Ff(n);return o.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-medium tracking-widest ${s.bg} ${s.text}`,children:n.toUpperCase()})}async function oS(){const n=await fetch("/api/workflows");if(!n.ok)throw new Error(`HTTP ${n.status}`);return n.json()}const uS=230,zf=64;function fS({data:n}){const s=Ff(n.method),i={idle:"border-white/[0.08]",running:"border-violet-500/60",passed:"border-emerald-500/40",failed:"border-red-500/40",skipped:"border-zinc-600/40"},r={idle:"",running:"shadow-[0_0_12px_rgba(139,92,246,0.25)]",passed:"shadow-[0_0_8px_rgba(52,211,153,0.15)]",failed:"shadow-[0_0_8px_rgba(248,113,113,0.15)]",skipped:""},f=n.status??"idle";return o.jsxs("div",{className:`rounded border bg-[#111] flex items-center gap-2.5 px-3 overflow-hidden transition-all duration-300 ${i[f]} ${r[f]}`,style:{width:uS,height:zf},children:[o.jsx(ss,{type:"target",position:de.Top,style:{background:"transparent",border:"none"}}),o.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300",style:{background:f==="running"?"#8b5cf6":f==="passed"?s.dot:f==="failed"?"#f87171":s.dot+"60"}}),o.jsxs("div",{className:"shrink-0 flex items-center justify-center",children:[f==="running"&&o.jsx(St,{className:"h-3.5 w-3.5 text-violet-400 animate-spin"}),f==="passed"&&o.jsx(fn,{className:"h-3.5 w-3.5 text-emerald-400"}),f==="failed"&&o.jsx(dn,{className:"h-3.5 w-3.5 text-red-400"}),f==="idle"&&o.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center rounded-full border border-white/[0.10] text-[8px] font-medium text-zinc-600",children:n.index+1}),f==="skipped"&&o.jsx("span",{className:"h-3.5 w-3.5 rounded-full border border-zinc-700 bg-zinc-800"})]}),o.jsxs("div",{className:"min-w-0 flex-1 pl-0.5",children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[o.jsx("span",{className:`text-[9px] font-medium ${s.text}`,children:n.method}),o.jsx("span",{className:" text-[10px] text-zinc-300 truncate",children:n.path}),n.result&&o.jsxs("span",{className:`ml-auto shrink-0 text-[9px] ${n.result.passed?"text-emerald-400":"text-red-400"}`,children:[n.result.status>0?n.result.status:"ERR"," · ",n.result.durationMs,"ms"]})]}),o.jsx("p",{className:"text-[9px] text-zinc-600 truncate",children:n.name})]}),o.jsx(ss,{type:"source",position:de.Bottom,style:{background:"transparent",border:"none"}})]})}const dS={step:fS};function hS({steps:n,runState:s}){const[i,r,f]=Q3([]),[d,h,x]=K3([]);return _.useEffect(()=>{const p=n.map((g,b)=>({id:`step-${b}`,type:"step",position:{x:0,y:b*(zf+36)+40},data:{index:b,name:g.name,method:g.method,path:g.path,status:s.stepStatuses[b]??"idle",result:s.stepResults[b]??null}})),m=n.slice(0,-1).map((g,b)=>{const w=Object.keys(g.capture??{}),j=w.length>0?w.map(M=>M.split(":").pop()).join(", "):void 0,T=s.stepStatuses[b]??"idle";return{id:`e-${b}`,source:`step-${b}`,target:`step-${b+1}`,label:j,labelStyle:{fill:"rgba(167,139,250,0.6)",fontSize:9,fontFamily:"monospace"},labelBgStyle:{fill:"transparent"},style:{stroke:T==="passed"?"rgba(52,211,153,0.3)":T==="failed"?"rgba(248,113,113,0.3)":"rgba(139,92,246,0.15)",strokeWidth:1.5,strokeDasharray:T==="idle"||T==="running"?"5 5":void 0},markerEnd:{type:Ei.ArrowClosed,color:T==="passed"?"rgba(52,211,153,0.4)":"rgba(139,92,246,0.25)"},animated:T==="running"}});r(p),h(m)},[n,s.stepStatuses,s.stepResults]),o.jsx("div",{style:{height:Math.max(400,n.length*(zf+36)+120)},className:"w-full rounded",children:o.jsxs(Mg,{nodes:i,edges:d,onNodesChange:f,onEdgesChange:x,nodeTypes:dS,fitView:!0,fitViewOptions:{padding:.3},proOptions:{hideAttribution:!0},minZoom:.3,maxZoom:2,children:[o.jsx(cS,{variant:nn.Dots,gap:20,size:1,color:"rgba(255,255,255,0.04)"}),o.jsx(tS,{showInteractive:!1,style:{background:"#111",border:"1px solid rgba(255,255,255,0.06)"}})]})})}function mS({runState:n,steps:s}){const i=_.useRef(null);return _.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[n.stepResults,n.phase]),n.phase==="idle"?null:o.jsxs("div",{className:"mt-3 rounded border border-white/[0.06] bg-[#0a0a0a]",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-white/[0.04] bg-white/[0.01]",children:[o.jsx("span",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Run Log"}),n.baseUrl&&o.jsxs("span",{className:"text-[10px] text-zinc-700 ",children:["→ ",n.baseUrl]}),o.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px]",children:[n.passed>0&&o.jsxs("span",{className:"text-emerald-400",children:[n.passed," passed"]}),n.failed>0&&o.jsxs("span",{className:"text-red-400",children:[n.failed," failed"]}),n.phase==="running"&&o.jsx(St,{className:"h-3 w-3 text-violet-400 animate-spin"}),n.phase==="done"&&o.jsx(fn,{className:"h-3 w-3 text-emerald-400"}),n.phase==="aborted"&&o.jsx(dn,{className:"h-3 w-3 text-red-400"})]})]}),o.jsxs("div",{ref:i,className:"overflow-y-auto max-h-80 text-[11px] p-3 space-y-1",children:[o.jsx("p",{className:"text-zinc-600",children:"▶ Starting workflow execution…"}),n.stepResults.map((r,f)=>{if(!r&&n.stepStatuses[f]!=="running")return null;const d=s[f],h=Ff(d.method);return n.stepStatuses[f]==="running"?o.jsxs("div",{className:"flex items-center gap-2 text-zinc-500",children:[o.jsx(St,{className:"h-3 w-3 animate-spin text-violet-400"}),o.jsxs("span",{className:"text-zinc-600",children:["Step ",f+1,"/",s.length]}),o.jsx("span",{className:h.text,children:d.method}),o.jsx("span",{className:"text-zinc-400",children:d.path}),o.jsx("span",{className:"text-zinc-700",children:"…"})]},f):r?o.jsxs("div",{className:"space-y-0.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:r.passed?"text-emerald-400":"text-red-400",children:r.passed?"✓":"✗"}),o.jsxs("span",{className:"text-zinc-600",children:["Step ",f+1,"/",s.length]}),o.jsx("span",{className:`${h.text}`,children:d.method.padEnd(6)}),o.jsx("span",{className:"text-zinc-300",children:d.path}),o.jsx("span",{className:`${r.passed?"text-emerald-400":"text-red-400"}`,children:r.status>0?r.status:"NO RESPONSE"}),o.jsxs("span",{className:"text-zinc-700",children:[r.durationMs,"ms"]})]}),d.name&&o.jsx("p",{className:"pl-5 text-zinc-700 italic",children:d.name}),Object.entries(r.injected??{}).filter(([p])=>p!=="Content-Type").map(([p,m])=>o.jsxs("p",{className:"pl-5 text-zinc-700",children:["📥 ",o.jsxs("span",{className:"text-amber-500/70",children:[p,":"]})," ",o.jsx("span",{className:"text-zinc-600",children:String(m).length>60?String(m).slice(0,57)+"…":m})]},p)),r.captured.map((p,m)=>o.jsxs("p",{className:"pl-5 text-emerald-600",children:["💾 captured ",p]},m)),r.error&&o.jsxs("p",{className:"pl-5 text-red-500",children:["Error: ",r.error]}),!r.passed&&r.responseBody&&!r.error&&o.jsxs("p",{className:"pl-5 text-red-600/80 truncate",children:["Response: ",typeof r.responseBody=="string"?r.responseBody.slice(0,120):JSON.stringify(r.responseBody).slice(0,120)]})]},f):null}),n.phase==="done"&&o.jsxs("p",{className:`mt-1 ${n.failed===0?"text-emerald-400":"text-amber-400"}`,children:["✓ Done — ",n.passed,"/",n.passed+n.failed," steps passed"]}),n.phase==="aborted"&&o.jsxs("p",{className:"mt-1 text-red-400",children:["✗ Aborted — ",n.error]}),n.phase==="error"&&o.jsxs("p",{className:"mt-1 text-red-400",children:["✗ Error — ",n.error]})]})]})}function xS({step:n,index:s,total:i,status:r,result:f}){const[d,h]=_.useState(!1),x=n.capture&&Object.keys(n.capture).length>0,p=n.inject&&Object.keys(n.inject).length>0,m=n.body&&Object.keys(n.body).length>0,g={idle:o.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full border border-white/[0.08] text-[9px] text-zinc-600",children:s+1}),running:o.jsx(St,{className:"h-5 w-5 text-violet-400 animate-spin"}),passed:o.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-emerald-500/10 text-emerald-400",children:o.jsx(fn,{className:"h-3 w-3"})}),failed:o.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-red-500/10 text-red-400",children:o.jsx(dn,{className:"h-3 w-3"})}),skipped:o.jsx("span",{className:"h-5 w-5 rounded-full border border-zinc-700 bg-zinc-800/40"})}[r];return o.jsxs("div",{className:"relative",children:[s<i-1&&o.jsx("div",{className:`absolute left-[19px] top-[38px] bottom-0 w-px z-0 transition-colors duration-500 ${r==="passed"?"bg-emerald-500/20":"bg-white/[0.05]"}`}),o.jsxs("div",{className:"relative z-10",children:[o.jsxs("button",{onClick:()=>h(b=>!b),className:"flex w-full items-center gap-3 px-4 py-2.5 hover:bg-white/[0.025] transition-colors text-left",children:[o.jsx("span",{className:"shrink-0",children:g}),o.jsx(rS,{method:n.method}),o.jsx("span",{className:" text-xs text-zinc-300 flex-1 truncate",children:n.path}),f&&o.jsxs("span",{className:` text-[10px] ${f.passed?"text-emerald-400":"text-red-400"}`,children:[f.status>0?f.status:"ERR"," · ",f.durationMs,"ms"]}),o.jsxs("span",{className:"flex items-center gap-1",children:[p&&o.jsx("span",{className:"rounded bg-amber-500/10 px-1 py-0.5 text-[9px] text-amber-400",children:"auth"}),x&&o.jsx("span",{className:"rounded bg-violet-500/10 px-1 py-0.5 text-[9px] text-violet-400",children:"capture"})]}),o.jsx("span",{className:"text-zinc-600 shrink-0",children:d?o.jsx(Mi,{className:"h-3.5 w-3.5"}):o.jsx(cs,{className:"h-3.5 w-3.5"})})]}),d&&o.jsxs("div",{className:"ml-12 mr-4 my-3 space-y-2.5 border-y border-white/[0.05] bg-white/[0.015] p-3",children:[n.description&&o.jsx("p",{className:"text-[11px] text-zinc-500",children:n.description}),f&&o.jsxs("div",{className:` border px-3 py-2 ${f.passed?"border-emerald-500/15 bg-emerald-500/[0.04]":"border-red-500/15 bg-red-500/[0.04]"}`,children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1 uppercase tracking-wider",children:"Response"}),f.error?o.jsx("p",{className:"text-[11px] text-red-400",children:f.error}):o.jsx("pre",{className:"text-[10px] text-zinc-400 overflow-auto max-h-24 whitespace-pre-wrap break-all",children:typeof f.responseBody=="string"?f.responseBody.slice(0,300):JSON.stringify(f.responseBody,null,2).slice(0,300)})]}),m&&o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1 uppercase tracking-wider ",children:"Request Body"}),o.jsx("div",{className:"space-y-1",children:Object.entries(n.body).map(([b,w])=>o.jsxs("div",{className:"flex items-center gap-2 rounded-full bg-white/[0.02] px-3 py-1.5",children:[o.jsx("span",{className:" text-[10px] text-zinc-400",children:b}),o.jsx("span",{className:" text-[10px] text-violet-300/70 truncate",children:String(w)})]},b))})]}),p&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-[10px] text-zinc-600 mb-1 uppercase tracking-wider flex items-center gap-1",children:[o.jsx(ip,{className:"h-3 w-3"})," Inject"]}),o.jsx("div",{className:"space-y-1",children:Object.entries(n.inject).map(([b,w])=>o.jsxs("div",{className:"flex items-center gap-2 rounded-full bg-amber-500/[0.04] border border-amber-500/10 px-3 py-1.5",children:[o.jsx("span",{className:" text-[10px] text-amber-400/70",children:b}),o.jsx(yi,{className:"h-3 w-3 text-zinc-700 shrink-0"}),o.jsx("span",{className:" text-[10px] text-zinc-500",children:w})]},b))})]}),x&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-[10px] text-zinc-600 mb-1 uppercase tracking-wider flex items-center gap-1",children:[o.jsx(Wa,{className:"h-3 w-3"})," Capture"]}),o.jsx("div",{className:"space-y-1",children:Object.entries(n.capture).map(([b,w])=>o.jsxs("div",{className:"flex items-center gap-2 rounded-full bg-violet-500/[0.04] border border-violet-500/10 px-3 py-1.5",children:[o.jsx("span",{className:" text-[10px] text-violet-400",children:b}),o.jsx(yi,{className:"h-3 w-3 text-zinc-700 shrink-0"}),o.jsx("span",{className:" text-[10px] text-zinc-500",children:w})]},b))})]})]})]})]})}function lf(n){return{phase:"idle",currentStep:-1,stepStatuses:Array(n).fill("idle"),stepResults:Array(n).fill(null),passed:0,failed:0}}function pS({workflow:n}){const[s,i]=_.useState("list"),[r,f]=_.useState(!1),[d,h]=_.useState(!1),[x,p]=_.useState(()=>lf(n.steps.length)),m=_.useRef(!1),g=_.useRef(null),b=()=>{m.current=!0,g.current?.close(),g.current=null,p(A=>({...A,phase:A.phase==="running"?"aborted":A.phase}))},w=()=>{b(),p(lf(n.steps.length))},j=()=>{m.current=!1;const A=n.steps.length;p(lf(A)),f(!0);const C=async()=>{p(R=>({...R,phase:"running"}));let H=0,V=0;for(let R=0;R<A&&!m.current;R++){p(W=>{const le=[...W.stepStatuses];return le[R]="running",{...W,stepStatuses:le,currentStep:R}});const G=600+Math.random()*800;if(await new Promise(W=>{const le=setTimeout(W,G),se=setInterval(()=>{m.current&&(clearTimeout(le),clearInterval(se),W())},50);setTimeout(()=>clearInterval(se),G+100)}),m.current)break;const O=!0,L=Math.round(G),F={index:R,step:{name:n.steps[R].name,method:n.steps[R].method,path:n.steps[R].path,description:n.steps[R].description},status:200,passed:O,durationMs:L,captured:Object.keys(n.steps[R].capture??{}).map(W=>W.split(":").pop()??W),injected:{},responseBody:{simulated:!0},error:null};H++,p(W=>{const le=[...W.stepStatuses],se=[...W.stepResults];return le[R]="passed",se[R]=F,{...W,stepStatuses:le,stepResults:se,passed:H,failed:V}})}m.current||p(R=>({...R,phase:"done",passed:H,failed:V}))};fetch("/api/workflows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:n._file})}).then(H=>{if(!H.ok||!H.body){C();return}const V=H.body.getReader(),R=new TextDecoder;let G="";p(L=>({...L,phase:"running"})),(async()=>{let L=!1;for(;!m.current;){const{value:F,done:W}=await V.read();if(W)break;L=!0,G+=R.decode(F,{stream:!0});const le=G.split(`
346
- `);G=le.pop()??"";for(const se of le){const ce=se.trim();if(!ce.startsWith("data:"))continue;const ie=ce.slice(5).trim();if(!ie)continue;let E;try{E=JSON.parse(ie)}catch{continue}p(J=>{const S={...J};if(E.type==="start")S.phase="running",S.baseUrl=E.baseUrl;else if(E.type==="step_start"){const U=E.index,Z=[...S.stepStatuses];Z[U]="running",S.stepStatuses=Z,S.currentStep=U}else if(E.type==="step_result"){const U=E.index,Z=[...S.stepStatuses],q=[...S.stepResults];Z[U]=E.passed?"passed":"failed",q[U]={index:E.index,step:E.step??{name:"",method:"",path:""},status:E.status,passed:E.passed,durationMs:E.durationMs,captured:E.captured??[],injected:E.injected??{},responseBody:E.responseBody,error:E.error??null},E.passed?S.passed=(S.passed??0)+1:S.failed=(S.failed??0)+1,S.stepStatuses=Z,S.stepResults=q}else if(E.type==="aborted"){const U=[...S.stepStatuses];for(let Z=0;Z<U.length;Z++)U[Z]==="running"?U[Z]="failed":U[Z]==="idle"&&(U[Z]="skipped");S.stepStatuses=U,S.phase="aborted",S.error=E.reason}else E.type==="done"&&(S.phase="done",(E.passed>0||E.failed>0)&&(S.passed=E.passed,S.failed=E.failed));return S})}}!L&&!m.current&&C()})().catch(()=>{m.current||C()})}).catch(()=>{m.current||C()})},T=x.phase==="running",M=x.phase!=="idle";return o.jsxs("div",{className:"relative",children:[o.jsx("span",{onClick:j,className:"absolute -top-2 -right-2 bg-blue-400 text-black text-[10px] px-2 py-0.5 rounded-full shadow-sm z-10 hover:cursor-pointer",children:o.jsxs("span",{className:"flex items-center",children:[o.jsx(hr,{className:"mr-1",size:10}),"Run Workflow"]})}),o.jsxs("div",{className:"border rounded-lg border-white/[0.06] bg-white/[0.015] overflow-hidden",children:[o.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-white/[0.04]",children:[o.jsx("button",{onClick:()=>h(A=>!A),className:"text-violet-400/50 hover:text-violet-300 transition-colors shrink-0",children:d?o.jsx(cs,{className:"h-3.5 w-3.5"}):o.jsx(Mi,{className:"h-3.5 w-3.5"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-zinc-200 truncate",children:n.name}),n.generatedAt&&o.jsxs("p",{className:"flex items-center gap-1 text-[10px] text-zinc-700 mt-0.5",children:[o.jsx(Mf,{className:"h-2.5 w-2.5"}),new Date(n.generatedAt).toLocaleString()]})]}),o.jsxs("span",{className:"rounded-full bg-white/[0.05] px-2 py-0.5 text-[10px] text-zinc-500 shrink-0",children:[n.steps.length," steps"]}),M&&o.jsxs("span",{className:`flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] shrink-0 ${x.phase==="done"&&x.failed===0?"bg-emerald-500/10 text-emerald-400":x.phase==="running"?"bg-violet-500/10 text-violet-400":"bg-red-500/10 text-red-400"}`,children:[x.phase==="running"&&o.jsx(St,{className:"h-2.5 w-2.5 animate-spin"}),x.phase==="done"&&x.failed===0&&o.jsx(fn,{className:"h-2.5 w-2.5"}),(x.phase==="done"||x.phase==="aborted")&&x.failed>0&&o.jsx(dn,{className:"h-2.5 w-2.5"}),x.phase==="running"?"Running…":x.phase==="done"?`${x.passed}/${x.passed+x.failed}`:x.phase==="aborted"?"Aborted":"Error"]}),!d&&o.jsx("div",{className:"flex overflow-hidden rounded border border-white/[0.06] shrink-0",children:["list","graph"].map(A=>o.jsxs("button",{onClick:()=>i(A),className:`flex items-center gap-1 px-2.5 py-1 text-[10px] transition-colors ${s===A?"bg-violet-600 text-white":"text-zinc-500 hover:text-zinc-300 bg-white/[0.02]"}`,children:[A==="list"?o.jsx(Cf,{className:"h-3 w-3"}):o.jsx(sp,{className:"h-3 w-3"}),A.charAt(0).toUpperCase()+A.slice(1)]},A))}),M&&!d&&o.jsxs("button",{onClick:()=>f(A=>!A),className:`flex items-center gap-1 px-2.5 py-1 text-[10px] transition-colors rounded border border-white/[0.06] ${r?"bg-zinc-800 text-zinc-300":"text-zinc-500 hover:text-zinc-300 bg-white/[0.02]"}`,children:[o.jsx(Ob,{className:"h-3 w-3"})," Log"]}),T&&o.jsxs("button",{onClick:b,className:"flex items-center gap-1 rounded border border-red-500/30 bg-red-500/10 px-2.5 py-1 text-[10px] text-red-400 hover:bg-red-500/20 transition-colors shrink-0",children:[o.jsx(nv,{className:"h-3 w-3"})," Stop"]}),M&&!T&&o.jsxs("button",{onClick:w,className:"flex items-center gap-1 rounded border border-white/[0.06] bg-white/[0.02] px-2.5 py-1 text-[10px] text-zinc-500 hover:text-zinc-300 transition-colors shrink-0",children:[o.jsx($b,{className:"h-3 w-3"})," Reset"]}),!T&&o.jsxs("button",{onClick:j,className:"hidden flex items-center gap-1.5 rounded bg-blue-500 px-3 py-1.5 text-[10px] font-medium text-white hover:bg-blue-400 transition-colors shrink-0",children:[o.jsx(hr,{className:"h-3 w-3"}),M?"Re-run":"Run"]})]}),!d&&o.jsxs(o.Fragment,{children:[r&&o.jsx("div",{className:"border-b border-white/[0.04]",children:o.jsx(mS,{runState:x,steps:n.steps})}),s==="list"&&o.jsx("div",{className:"divide-y divide-white/[0.04]",children:n.steps.map((A,C)=>o.jsx(xS,{step:A,index:C,total:n.steps.length,status:x.stepStatuses[C]??"idle",result:x.stepResults[C]??null},C))}),s==="graph"&&o.jsx("div",{className:"p-4",children:o.jsx(hS,{steps:n.steps,runState:x})})]})]})]})}function gS(){return o.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-5 py-20 text-center",children:[o.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[o.jsx("div",{className:"absolute inset-0 rounded-full bg-violet-500/10 blur-xl"}),o.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full border border-white/[0.06] bg-white/[0.02] text-violet-400",children:o.jsx(np,{className:"h-7 w-7"})})]}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-zinc-300",children:"No simulations found"}),o.jsxs("p",{className:"mt-1 text-[11px] text-zinc-600",children:["Generate a workflow with ",o.jsx("code",{className:"text-zinc-500",children:"jetic simulate-workflow"})," or create a"," ",o.jsx("code",{className:"text-zinc-500",children:".jetic/workflow.json"})," file."]})]})]})}function yS(){const[n,s]=_.useState([]),[i,r]=_.useState(!0),[f,d]=_.useState(!1),[h,x]=_.useState(null),p=_.useCallback(async(m=!1)=>{m?d(!0):r(!0),x(null);try{s(await oS())}catch(g){x(g.message)}finally{r(!1),d(!1)}},[]);return _.useEffect(()=>{p()},[p]),o.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-white/[0.06] px-6 py-5 sticky",children:[o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-[15px] font-medium text-white leading-none",children:"Simulations"}),o.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:i?"Loading…":`${n.length} workflow${n.length!==1?"s":""} found`})]})}),o.jsx("button",{onClick:()=>p(!0),disabled:f||i,className:"flex h-6 w-6 items-center justify-center rounded border border-white/[0.06] bg-white/[0.02] text-zinc-500 hover:bg-white/[0.06] hover:text-zinc-300 disabled:opacity-40 transition-all",children:o.jsx(Ai,{className:`h-3.5 w-3.5 ${f?"animate-spin":""}`})})]}),o.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-6",children:[i&&o.jsx("div",{className:"space-y-3",children:[1,2].map(m=>o.jsx("div",{className:"h-16 animate-pulse rounded border border-white/[0.04] bg-white/[0.02]",style:{opacity:1-m*.3}},m))}),!i&&h&&o.jsxs("div",{className:"flex flex-col items-center gap-4 rounded border border-red-500/20 bg-red-500/[0.05] p-10 text-center",children:[o.jsx(dn,{className:"h-8 w-8 text-red-400"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-red-300",children:"Could not load simulations"}),o.jsx("p",{className:"mt-1 text-[11px] text-red-500/80",children:h})]}),o.jsx("button",{onClick:()=>p(),className:"rounded border border-red-500/20 bg-red-500/10 px-4 py-1.5 text-[11px] text-red-400 hover:bg-red-500/20 transition-colors",children:"Retry"})]}),!i&&!h&&n.length===0&&o.jsx(gS,{}),!i&&!h&&n.length>0&&o.jsx("div",{className:"space-y-5",children:n.map((m,g)=>o.jsx(pS,{workflow:m},`${m._file}-${g}`))}),!i&&!h&&n.length>0&&o.jsxs("div",{className:"flex items-center gap-1.5 border-t border-white/[0.04] pt-3 text-[10px] text-zinc-700",children:["Workflow from ",o.jsx("code",{className:"text-zinc-600",children:".jetic/workflow.json"})]})]})]})}const bS={GET:{bg:"bg-emerald-500/10",text:"text-emerald-400",dot:"#34d399"},POST:{bg:"bg-blue-500/10",text:"text-blue-400",dot:"#60a5fa"},PUT:{bg:"bg-amber-500/10",text:"text-amber-400",dot:"#fbbf24"},PATCH:{bg:"bg-orange-500/10",text:"text-orange-400",dot:"#fb923c"},DELETE:{bg:"bg-red-500/10",text:"text-red-400",dot:"#f87171"},HEAD:{bg:"bg-zinc-500/10",text:"text-zinc-400",dot:"#a1a1aa"},OPTIONS:{bg:"bg-purple-500/10",text:"text-purple-400",dot:"#c084fc"}};function Rg(n){return bS[n.toUpperCase()]??{bg:"bg-zinc-500/10",text:"text-zinc-400",dot:"#a1a1aa"}}async function vS(){const n=await fetch("/api/model");if(!n.ok)throw new Error(`HTTP ${n.status}`);return n.json()}async function wS(){const n=await fetch("/api/model/scan",{method:"POST"});if(!n.ok){const s=await n.json().catch(()=>({}));throw new Error(s.error??`Scan failed (${n.status})`)}return(await n.json()).model}async function NS(n,s){const i=await fetch(`/api/model/endpoint/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`Save failed (${i.status})`)}function SS({method:n}){const s=Rg(n);return o.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[10px] tracking-widest ${s.bg} ${s.text}`,children:n.toUpperCase()})}function Gx({value:n,onSave:s,mono:i=!0}){const[r,f]=_.useState(!1),[d,h]=_.useState(n),[x,p]=_.useState(!1),m=_.useRef(null);_.useEffect(()=>{r&&m.current?.focus()},[r]);const g=async()=>{if(d===n){f(!1);return}p(!0);try{await s(d)}finally{p(!1),f(!1)}};return r?o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx("input",{ref:m,value:d,onChange:b=>h(b.target.value),onKeyDown:b=>{b.key==="Enter"&&g(),b.key==="Escape"&&(h(n),f(!1))},className:"rounded border border-violet-500/40 bg-zinc-900 px-1.5 py-0.5 text-xs text-zinc-200 outline-none w-56 "}),o.jsx("button",{onClick:g,disabled:x,className:"text-emerald-400 hover:text-emerald-300",children:x?o.jsx(St,{className:"h-3 w-3 animate-spin"}):o.jsx(fn,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>{h(n),f(!1)},className:"text-zinc-600 hover:text-zinc-400",children:o.jsx(Tl,{className:"h-3 w-3"})})]}):o.jsxs("button",{onClick:()=>f(!0),className:"group/ie inline-flex items-center gap-1 rounded px-1 py-0.5 hover:bg-white/[0.04] transition-colors ",children:[o.jsx("span",{className:"text-xs text-zinc-300",children:n}),o.jsx(Bb,{className:"h-2.5 w-2.5 text-zinc-700 opacity-0 group-hover/ie:opacity-100 transition-opacity"})]})}function jS({ep:n,onUpdate:s,onInspect:i}){const[r,f]=_.useState(!1),[d,h]=_.useState(""),x=async(g,b)=>{h("");try{await NS(g,b),s(g,b)}catch(w){h(w.message)}},p=n.requestBody?.fields??{},m=n.responses??{};return o.jsxs("div",{className:"border-b border-white/[0.04] last:border-0",children:[o.jsxs("button",{onClick:()=>f(g=>!g),className:"group flex w-full items-center gap-3 px-7 py-2.5 hover:bg-white/[0.025] transition-colors text-left",children:[o.jsx("span",{className:"shrink-0 text-zinc-600",children:r?o.jsx(Mi,{className:"h-3.5 w-3.5"}):o.jsx(cs,{className:"h-3.5 w-3.5"})}),o.jsx(SS,{method:n.method}),o.jsx("span",{className:" text-xs text-zinc-300 flex-1 truncate",children:n.path}),n.security&&n.security.length>0&&o.jsx(ts,{className:"h-3 w-3 text-amber-500/50 shrink-0"}),o.jsx("span",{onClick:g=>{g.stopPropagation(),i(n)},className:"inline-flex items-center rounded px-1.5 py-0.5 text-[10px] border border-violet-500/40 text-violet-300 hover:bg-violet-500/10 hover:border-violet-400/60 hover:cursor-pointer transition-colors",children:"INSPECT"}),o.jsx("span",{className:"hidden sm:block text-[10px] text-zinc-600 truncate max-w-[180px]",children:n.handlerName})]}),r&&o.jsxs("div",{className:"px-10 pb-4 pt-1 space-y-3 bg-white/[0.01]",children:[d&&o.jsx("p",{className:"text-xs text-red-400 rounded border border-red-500/20 bg-red-500/10 px-2 py-1",children:d}),o.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-2",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1 uppercase tracking-wider",children:"Method"}),o.jsx("select",{value:n.method,onChange:g=>x(n.id,{method:g.target.value}),className:"rounded-full border border-white/[0.08] bg-zinc-900 px-2 py-1 text-xs text-zinc-300 outline-none",children:["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].map(g=>o.jsx("option",{children:g},g))})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1 uppercase tracking-wider",children:"Path"}),o.jsx(Gx,{value:n.path,onSave:g=>x(n.id,{path:g})})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1 uppercase tracking-wider",children:"Handler"}),o.jsx(Gx,{value:n.handlerName??"—",onSave:g=>x(n.id,{handlerName:g}),mono:!1})]})]}),n.source&&o.jsxs("p",{className:"text-[10px] text-zinc-600",children:["📄 ",n.source.file.split(/[/\\]/).slice(-2).join("/"),":",n.source.line]}),Object.keys(p).length>0&&o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Request Body"}),o.jsx("div",{className:"space-y-1",children:Object.entries(p).map(([g,b])=>o.jsxs("div",{className:"flex items-center gap-2 rounded-full bg-white/[0.02] px-3 py-1.5",children:[o.jsx("span",{className:" text-[11px] text-zinc-300",children:g}),o.jsx("span",{className:"text-[10px] text-zinc-600",children:b.type}),b.required&&o.jsx("span",{className:"text-[10px] text-rose-400/80",children:"required"})]},g))})]}),Object.keys(m).length>0&&o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Responses"}),o.jsx("div",{className:"space-y-1",children:Object.entries(m).map(([g,b])=>o.jsxs("div",{className:"flex items-start gap-2 rounded-full bg-white/[0.02] px-3 py-1.5",children:[o.jsx("span",{className:` text-[11px] ${g.startsWith("2")?"text-emerald-400":"text-red-400"}`,children:g}),b.schema&&o.jsx("span",{className:"text-[10px] text-zinc-500",children:Object.keys(b.schema).join(", ")})]},g))})]}),n.middleware&&n.middleware.length>0&&o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Middleware"}),o.jsx("div",{className:"flex flex-wrap gap-1",children:n.middleware.map((g,b)=>o.jsx("span",{className:"rounded-full bg-white/[0.04] px-2 py-0.5 text-[10px] text-zinc-500",children:g.name},b))})]})]})]})}function ES({prefix:n,endpoints:s,onUpdate:i,onInspect:r}){const[f,d]=_.useState(!1);return o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>d(h=>!h),className:"flex w-full items-center gap-3 px-4 py-2 hover:bg-white/[0.02] transition-colors bg-white/[0.01]",children:[o.jsx("span",{className:"text-violet-400/70",children:f?o.jsx(cs,{className:"h-3 w-3"}):o.jsx(Mi,{className:"h-3 w-3"})}),o.jsx("span",{className:" text-xs text-violet-300",children:n}),o.jsx("span",{className:"ml-auto rounded-full bg-white/[0.05] px-2 py-0.5 text-[10px] text-zinc-500",children:s.length})]}),!f&&s.map(h=>o.jsx(jS,{ep:h,onUpdate:i,onInspect:r},h.id))]})}const Qa=210,mi=52,af=100,Xx=14,Ka=36;function _S({endpoints:n}){const s=_.useRef(null),i=new Map;for(const p of n){const m="/"+(p.path.split("/")[1]??"");i.has(m)||i.set(m,[]),i.get(m).push(p)}const r=Array.from(i.entries()),f=Math.max(1,...r.map(([,p])=>p.length)),d=r.length*Qa+(r.length-1)*af+Ka*2,h=f*mi+(f-1)*Xx+Ka*2+24,x=new Map;return r.forEach(([,p],m)=>{const g=Ka+m*(Qa+af);p.forEach((b,w)=>{x.set(b.id,{x:g,y:Ka+24+w*(mi+Xx)})})}),_.useEffect(()=>{const p=s.current;if(!p)return;const m=p.getContext("2d");m&&(m.clearRect(0,0,p.width,p.height),r.forEach(([,g],b)=>{if(b>=r.length-1)return;const w=r[b+1][1];g.forEach(j=>{const T=x.get(j.id);w.forEach(M=>{const A=x.get(M.id),C=T.x+Qa,H=T.y+mi/2,V=A.x,R=A.y+mi/2,G=(C+V)/2;m.beginPath(),m.strokeStyle="rgba(139,92,246,0.10)",m.lineWidth=1,m.moveTo(C,H),m.bezierCurveTo(G,H,G,R,V,R),m.stroke()})})}))}),o.jsxs("div",{className:"relative overflow-auto",style:{minWidth:d,minHeight:h},children:[o.jsx("canvas",{ref:s,width:d,height:h,className:"absolute inset-0 pointer-events-none"}),r.map(([p],m)=>o.jsx("div",{className:"absolute text-[9px] text-violet-400/50 uppercase tracking-widest text-center",style:{left:Ka+m*(Qa+af),top:Ka,width:Qa},children:p},p)),n.map(p=>{const m=x.get(p.id);if(!m)return null;const g=Rg(p.method);return o.jsxs("div",{className:"absolute rounded border border-white/[0.07] bg-[#111] shadow-md flex items-center gap-2 px-3 overflow-hidden hover:border-white/[0.15] transition-colors",style:{left:m.x,top:m.y,width:Qa,height:mi},children:[o.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-[3px]",style:{background:g.dot}}),o.jsx("span",{className:`shrink-0 text-[9px] ${g.text}`,children:p.method}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:" text-[10px] text-zinc-300 truncate",children:p.path}),o.jsx("p",{className:"text-[9px] text-zinc-600 truncate",children:p.handlerName})]})]},p.id)})]})}function zS({onScan:n,scanning:s,error:i}){return o.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-5 py-20 text-center",children:[o.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[o.jsx("div",{className:"absolute inset-0 rounded-full bg-violet-500/10 blur-xl"}),o.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full border border-white/[0.06] bg-white/[0.02] text-violet-400",children:o.jsx(mr,{className:"h-7 w-7"})})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-zinc-300",children:"No model found"}),o.jsxs("p",{className:"mt-1 text-xs text-zinc-600",children:["Scan your project to generate ",o.jsx("code",{className:"text-zinc-500",children:".jetic/model.json"})]})]}),i&&o.jsx("p",{className:"text-xs text-red-400 max-w-xs",children:i}),o.jsxs("button",{onClick:n,disabled:s,className:"flex items-center gap-2 rounded bg-violet-600 px-5 py-2.5 text-sm font-medium text-white hover:bg-violet-500 disabled:opacity-50 transition-colors",children:[s?o.jsx(St,{className:"h-4 w-4 animate-spin"}):o.jsx(mr,{className:"h-4 w-4"}),s?"Scanning project…":"Scan Project"]})]})}function MS({onInspect:n}){const[s,i]=_.useState(null),[r,f]=_.useState(!0),[d,h]=_.useState(!1),[x,p]=_.useState(!1),[m,g]=_.useState(null),[b,w]=_.useState(""),[j,T]=_.useState("list"),[M,A]=_.useState(""),C=_.useCallback(async(O=!1)=>{O?h(!0):f(!0),g(null);try{i(await vS())}catch(L){g(L.message)}finally{f(!1),h(!1)}},[]);_.useEffect(()=>{C()},[C]);const H=async()=>{p(!0),w("");try{i(await wS())}catch(O){w(O.message)}finally{p(!1)}},V=(O,L)=>{i(F=>F&&{...F,endpoints:F.endpoints.map(W=>W.id===O?{...W,...L}:W)})},R=(s?.endpoints??[]).filter(O=>!M||O.path.toLowerCase().includes(M.toLowerCase())||O.method.toLowerCase().includes(M.toLowerCase())||(O.handlerName??"").toLowerCase().includes(M.toLowerCase())),G=new Map;for(const O of R){const L="/"+(O.path.split("/")[1]??"");G.has(L)||G.set(L,[]),G.get(L).push(O)}return o.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-white/[0.06] px-6 py-5",children:[o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-[15px] text-white leading-none",children:s?.project?.name??"Model"}),o.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:r?"Loading…":s?`v${s.version} · ${s.endpoints.length} endpoints · ${s.project.framework??s.project.language??""}`:"No model generated yet"})]})}),o.jsxs("div",{className:"flex items-center gap-2",children:[s&&o.jsx("div",{className:"flex overflow-hidden rounded border border-white/[0.06]",children:["list","graph"].map(O=>o.jsxs("button",{onClick:()=>T(O),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs transition-colors ${j===O?"bg-violet-600 text-white":"text-zinc-500 hover:text-zinc-300 bg-white/[0.02]"}`,children:[O==="list"?o.jsx(Cf,{className:"h-3.5 w-3.5"}):o.jsx(sp,{className:"h-3.5 w-3.5"}),O.charAt(0).toUpperCase()+O.slice(1)]},O))}),o.jsx("button",{onClick:()=>C(!0),disabled:d||r,className:"flex h-8 w-8 items-center justify-center rounded border border-white/[0.06] bg-white/[0.02] text-zinc-500 hover:bg-white/[0.06] hover:text-zinc-300 disabled:opacity-40 transition-all",children:o.jsx(Ai,{className:`h-3.5 w-3.5 ${d?"animate-spin":""}`})}),o.jsxs("button",{onClick:H,disabled:x,className:"flex items-center gap-1.5 rounded bg-violet-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-violet-500 disabled:opacity-50 transition-colors",children:[x?o.jsx(St,{className:"h-3.5 w-3.5 animate-spin"}):o.jsx(mr,{className:"h-3.5 w-3.5"}),x?"Scanning…":"Re-scan"]})]})]}),b&&o.jsxs("div",{className:"flex items-center gap-2 border-b border-red-500/20 bg-red-500/[0.05] px-6 py-2 text-xs text-red-400",children:[o.jsx(dn,{className:"h-3.5 w-3.5 shrink-0"}),b,o.jsx("button",{onClick:()=>w(""),className:"ml-auto",children:o.jsx(Tl,{className:"h-3.5 w-3.5"})})]}),o.jsxs("div",{className:"flex flex-1 flex-col",children:[r&&o.jsx("div",{className:"space-y-2 p-6",children:[1,2,3,4].map(O=>o.jsx("div",{className:"h-10 animate-pulse rounded border border-white/[0.04] bg-white/[0.02]",style:{opacity:1-O*.18}},O))}),!r&&m&&o.jsxs("div",{className:"flex flex-col items-center gap-4 m-6 rounded border border-red-500/20 bg-red-500/[0.05] p-10 text-center",children:[o.jsx(dn,{className:"h-8 w-8 text-red-400"}),o.jsx("p",{className:"text-sm text-red-300",children:m}),o.jsx("button",{onClick:()=>C(),className:"rounded border border-red-500/20 bg-red-500/10 px-4 py-1.5 text-xs text-red-400 hover:bg-red-500/20 transition-colors",children:"Retry"})]}),!r&&!m&&!s&&o.jsx(zS,{onScan:H,scanning:x,error:b}),!r&&!m&&s&&j==="graph"&&o.jsx("div",{className:"flex-1 overflow-auto p-6",children:o.jsx(_S,{endpoints:R})}),!r&&!m&&s&&j==="list"&&o.jsxs("div",{className:"flex flex-1 flex-col",children:[o.jsxs("div",{className:"flex items-center gap-3 border-b border-white/[0.04] px-6 py-3",children:[o.jsx("input",{value:M,onChange:O=>A(O.target.value),placeholder:"Filter by path, method or handler…",className:"w-full max-w-sm rounded border border-white/[0.06] bg-white/[0.02] py-1.5 px-3 text-xs text-zinc-300 placeholder-zinc-600 outline-none focus:border-violet-500/40 transition-all"}),M&&o.jsx("button",{onClick:()=>A(""),className:"text-zinc-600 hover:text-zinc-400",children:o.jsx(Tl,{className:"h-3.5 w-3.5"})}),o.jsxs("span",{className:"ml-auto text-[10px] text-zinc-600",children:[R.length," endpoint",R.length!==1?"s":""]})]}),o.jsxs("div",{className:"flex-1 overflow-auto divide-y divide-white/[0.04]",children:[Array.from(G.entries()).map(([O,L])=>o.jsx(ES,{prefix:O,endpoints:L,onUpdate:V,onInspect:F=>n?.(F)},O)),R.length===0&&o.jsxs("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[o.jsxs("p",{className:"text-sm text-zinc-500",children:['No endpoints match "',M,'"']}),o.jsx("button",{onClick:()=>A(""),className:"text-xs text-violet-400 hover:text-violet-300 transition-colors",children:"Clear filter"})]})]}),o.jsxs("div",{className:"flex items-center gap-1.5 border-t border-white/[0.04] px-6 py-2.5 text-[10px] text-zinc-700",children:["Generated ",new Date(s.generatedAt).toLocaleString(),o.jsx("span",{className:"ml-auto",children:o.jsx("button",{onClick:()=>C(!0),className:"text-zinc-600 hover:text-zinc-400 transition-colors",children:"Refresh"})})]})]})]})]})}const Zx={GET:{bg:"bg-emerald-500/10",text:"text-emerald-400",dot:"#34d399",border:"border-emerald-500/30"},POST:{bg:"bg-blue-500/10",text:"text-blue-400",dot:"#60a5fa",border:"border-blue-500/30"},PUT:{bg:"bg-amber-500/10",text:"text-amber-400",dot:"#fbbf24",border:"border-amber-500/30"},PATCH:{bg:"bg-orange-500/10",text:"text-orange-400",dot:"#fb923c",border:"border-orange-500/30"},DELETE:{bg:"bg-red-500/10",text:"text-red-400",dot:"#f87171",border:"border-red-500/30"},HEAD:{bg:"bg-zinc-500/10",text:"text-zinc-400",dot:"#a1a1aa",border:"border-zinc-500/30"},OPTIONS:{bg:"bg-purple-500/10",text:"text-purple-400",dot:"#c084fc",border:"border-purple-500/30"}};function AS(n){return Zx[n.toUpperCase()]??Zx.GET}function Qx({method:n}){const s=AS(n);return o.jsx("span",{className:`inline-flex items-center px-2 py-0.5 text-[11px] font-medium tracking-widest ${s.bg} ${s.text} ${s.border} border`,children:n.toUpperCase()})}function Kx(n,s,i){const r=n.toLowerCase();return r.includes("email")?"user@example.com":r.includes("name")?"Jane Doe":r.includes("username")?"jane_doe":r.includes("password")?"P@ssw0rd123!":r.includes("phone")?"+14155552671":r.includes("url")?"https://example.com":r.includes("id")?Math.random().toString(36).slice(2,10):r.includes("date")||i==="date"?new Date().toISOString().split("T")[0]:r.includes("time")||i==="date-time"?new Date().toISOString():s==="integer"||s==="number"?String(Math.floor(Math.random()*100)+1):s==="boolean"?"true":s==="array"?"[]":s==="object"?"{}":`fake_${r}`}function TS({endpoint:n}){const[s,i]=_.useState(null),[r,f]=_.useState(1),[d,h]=_.useState(!1),[x,p]=_.useState(""),m=_.useCallback(async()=>{if(n.source){h(!0),p(""),i(null);try{const j=await fetch(`/api/model/source?file=${encodeURIComponent(n.source.file)}&line=${n.source.line}`);if(!j.ok){if((j.headers.get("content-type")??"").includes("application/json")){const A=await j.json().catch(()=>({}));throw new Error(A.error??`HTTP ${j.status}`)}throw new Error(`HTTP ${j.status}`)}if((j.headers.get("content-type")??"").includes("application/json")){const M=await j.json();i(M.source??M.content??""),f(M.startLine??1)}else i(await j.text()),f(1)}catch(j){p(j.message)}finally{h(!1)}}},[n]);if(_.useEffect(()=>{m()},[m]),!n.source)return null;const g=n.source.file.split(/[/\\]/).slice(-3).join("/"),b=s?s.split(`
347
- `):[],w=n.source.line-r;return o.jsxs("div",{className:" border border-white/[0.06] bg-[#0a0a0a] overflow-hidden",children:[o.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-white/[0.04] bg-white/[0.015]",children:[o.jsx(lp,{className:"h-3.5 w-3.5 text-violet-400/60"}),o.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-500",children:"Source"}),o.jsx("span",{className:"ml-2 font-mono text-[10px] text-zinc-500",children:g}),o.jsxs("span",{className:" bg-violet-500/10 border border-violet-500/20 px-1.5 py-0.5 font-mono text-[9px] text-violet-400",children:[":",n.source.line]}),o.jsx("button",{onClick:m,disabled:d,className:"ml-auto flex h-5 w-5 items-center justify-center text-zinc-600 hover:text-zinc-400 hover:bg-white/[0.04] transition-colors",children:o.jsx(Ai,{className:`h-3 w-3 ${d?"animate-spin":""}`})})]}),o.jsxs("div",{className:"relative",children:[d&&o.jsxs("div",{className:"flex items-center gap-2 px-4 py-4 text-[10px] text-zinc-600",children:[o.jsx(St,{className:"h-3 w-3 animate-spin"})," Loading source…"]}),x&&o.jsxs("div",{className:"flex items-start gap-2 px-4 py-3 text-[10px] text-red-400/60",children:[o.jsx(dn,{className:"h-3 w-3 mt-0.5 shrink-0"}),o.jsxs("span",{children:["Source unavailable — ",x]})]}),s&&!d&&o.jsx("div",{className:"overflow-auto max-h-[340px]",children:o.jsx("table",{className:"w-full border-collapse",children:o.jsx("tbody",{children:b.map((j,T)=>{const M=r+T,A=T===w;return o.jsxs("tr",{className:A?"bg-violet-500/[0.07]":"hover:bg-white/[0.012]",children:[o.jsx("td",{className:`select-none w-12 px-3 py-0 text-right font-mono text-[10px] border-r border-white/[0.04] leading-5 ${A?"text-violet-400":"text-zinc-700"}`,children:M}),o.jsx("td",{className:`px-4 py-0 font-mono text-[11px] whitespace-pre leading-5 ${A?"text-zinc-100":"text-zinc-400"}`,children:j||" "})]},T)})})})})]})]})}function CS({endpoint:n}){const[s,i]=_.useState([]),[r,f]=_.useState(!0),[d,h]=_.useState("");return _.useEffect(()=>{f(!0),h(""),i([]),fetch(`/api/model/related?id=${encodeURIComponent(n.id)}`).then(x=>{const p=x.headers.get("content-type")??"";if(!x.ok||!p.includes("application/json"))throw new Error(`HTTP ${x.status}`);return x.json()}).then(x=>{i(x?.files??[])}).catch(x=>h(x.message)).finally(()=>f(!1))},[n.id]),o.jsxs("div",{className:" border border-white/[0.06] bg-[#0a0a0a] overflow-hidden",children:[o.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-white/[0.04] bg-white/[0.015]",children:[o.jsx(ap,{className:"h-3.5 w-3.5 text-blue-400/60"}),o.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-500",children:"Related Files"}),!r&&!d&&o.jsx("span",{className:"ml-auto -full bg-white/[0.04] px-2 py-0.5 text-[9px] text-zinc-600",children:s.length})]}),o.jsxs("div",{className:"divide-y divide-white/[0.03]",children:[r&&o.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 text-[10px] text-zinc-600",children:[o.jsx(St,{className:"h-3 w-3 animate-spin"})," Resolving files…"]}),!r&&d&&o.jsxs("div",{className:"flex items-start gap-2 px-4 py-3 text-[10px] text-red-400/60",children:[o.jsx(dn,{className:"h-3 w-3 mt-0.5 shrink-0"}),o.jsxs("span",{children:["Could not resolve — ",d]})]}),!r&&!d&&s.length===0&&o.jsx("p",{className:"px-4 py-3 text-[10px] text-zinc-700 italic",children:"No related files resolved"}),s.map(x=>{const p=x.split(/[/\\]/),m=p.pop()??x,g=p.slice(-2).join("/"),b=m.split(".").pop()??"",j={ts:"text-blue-400",tsx:"text-cyan-400",js:"text-amber-400",jsx:"text-amber-300",json:"text-emerald-400"}[b]??"text-zinc-600";return o.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 hover:bg-white/[0.015] transition-colors group",children:[o.jsx(Af,{className:`h-3.5 w-3.5 shrink-0 ${j}`}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"text-[11px] text-zinc-300 truncate",children:m}),g&&o.jsx("p",{className:"text-[9px] text-zinc-600 truncate font-mono",children:g})]}),o.jsxs("span",{className:`shrink-0 px-1.5 py-0.5 text-[9px] font-mono ${j} bg-white/[0.03]`,children:[".",b]})]},x)})]})]})}function RS({endpoint:n}){const[s,i]=_.useState(!1),[r,f]=_.useState("fake"),[d,h]=_.useState(""),[x,p]=_.useState({}),[m,g]=_.useState(!1),[b,w]=_.useState(null),[j,T]=_.useState("http://localhost:3000"),M=_.useRef(null),A=n.requestBody?.fields??{},C=(n.security?.length??0)>0,H=["POST","PUT","PATCH"].includes(n.method.toUpperCase());_.useEffect(()=>{if(!s)return;const L=F=>{M.current&&!M.current.contains(F.target)&&i(!1)};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[s]);const V=()=>{const L={};for(const[F,W]of Object.entries(A))L[F]=Kx(F,W.type,W.format);return L},R=()=>{const L={};for(const[F,W]of Object.entries(A)){const le=x[F]??"";le&&(W.type==="integer"||W.type==="number"?L[F]=Number(le):W.type==="boolean"?L[F]=le.toLowerCase()==="true":L[F]=le)}return L},G=async()=>{g(!0),w(null);const L=Date.now();try{const F=r==="fake"?V():R(),W={};(H||r==="fake")&&(W["Content-Type"]="application/json"),d&&(W.Authorization=`Bearer ${d}`);const le=`${j}${n.path}`,se=await fetch(le,{method:n.method.toUpperCase(),headers:W,body:H?JSON.stringify(F):void 0}),ce=Date.now()-L;let ie;try{ie=await se.json()}catch{ie=await se.text().catch(()=>"(no body)")}w({status:se.status,body:ie,durationMs:ce})}catch(F){w({status:0,body:null,durationMs:Date.now()-L,error:F.message})}finally{g(!1)}},O=b&&b.status>=200&&b.status<300;return o.jsxs("div",{className:" border border-white/[0.06] bg-[#0a0a0a] overflow-hidden",children:[o.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-white/[0.04] bg-white/[0.015]",children:[o.jsx(Wa,{className:"h-3.5 w-3.5 text-amber-400/60"}),o.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-500",children:"Simulate Endpoint"}),o.jsx("div",{className:"ml-auto",ref:M,children:o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>i(L=>!L),className:"flex items-center gap-1.5 border border-amber-500/30 bg-amber-500/[0.07] px-3 py-1.5 text-[10px] text-amber-300 hover:bg-amber-500/15 hover:border-amber-400/50 transition-colors",children:[o.jsx(hr,{className:"h-3 w-3"}),"Simulate",o.jsx(Mi,{className:`h-3 w-3 transition-transform ${s?"rotate-180":""}`})]}),s&&o.jsx("div",{className:"absolute right-0 top-full mt-1 z-50 w-40 border border-white/[0.08] bg-[#111] shadow-xl overflow-hidden",children:["fake","real"].map(L=>o.jsxs("button",{onClick:()=>{f(L),i(!1),w(null)},className:`flex w-full items-center gap-2 px-3 py-2.5 text-[11px] hover:bg-white/[0.04] transition-colors text-left ${r===L?"text-amber-300":"text-zinc-400"}`,children:[L==="fake"?o.jsx(Wa,{className:"h-3 w-3"}):o.jsx(of,{className:"h-3 w-3"}),L==="fake"?"Fake Data":"Real Data",r===L&&o.jsx(fn,{className:"h-3 w-3 ml-auto"})]},L))})]})})]}),o.jsxs("div",{className:"p-4 space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-[10px] text-zinc-600 uppercase tracking-wider w-20 shrink-0",children:"Base URL"}),o.jsx("input",{value:j,onChange:L=>T(L.target.value),className:"flex-1 border border-white/[0.06] bg-white/[0.02] px-2.5 py-1.5 font-mono text-[11px] text-zinc-300 outline-none focus:border-violet-500/40 transition-colors",placeholder:"http://localhost:3000"})]}),(C||r==="real")&&o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"text-[10px] text-zinc-600 uppercase tracking-wider w-20 shrink-0 flex items-center gap-1",children:[o.jsx(ip,{className:"h-3 w-3"})," Token"]}),o.jsx("input",{type:"password",value:d,onChange:L=>h(L.target.value),className:"flex-1 border border-amber-500/20 bg-amber-500/[0.03] px-2.5 py-1.5 font-mono text-[11px] text-zinc-300 outline-none focus:border-amber-400/40 transition-colors",placeholder:"Bearer token (optional)"})]}),r==="fake"&&Object.keys(A).length>0&&o.jsxs("div",{children:[o.jsxs("p",{className:"mb-2 text-[10px] text-zinc-600 uppercase tracking-wider flex items-center gap-1",children:[o.jsx(Wa,{className:"h-3 w-3 text-amber-400/60"})," Auto-generated body"]}),o.jsx("div",{className:"space-y-1",children:Object.entries(A).map(([L,F])=>o.jsxs("div",{className:"flex items-center gap-2 bg-white/[0.02] border border-white/[0.04] px-3 py-1.5",children:[o.jsx("span",{className:"text-[10px] text-zinc-400 w-24 truncate shrink-0",children:L}),o.jsx("span",{className:"text-[10px] text-zinc-700 shrink-0",children:F.type}),o.jsx("span",{className:"ml-auto font-mono text-[10px] text-amber-300/70 truncate",children:Kx(L,F.type,F.format)})]},L))})]}),r==="real"&&Object.keys(A).length>0&&o.jsxs("div",{children:[o.jsxs("p",{className:"mb-2 text-[10px] text-zinc-600 uppercase tracking-wider flex items-center gap-1",children:[o.jsx(of,{className:"h-3 w-3 text-blue-400/60"})," Request body"]}),o.jsx("div",{className:"space-y-2",children:Object.entries(A).map(([L,F])=>o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"w-28 shrink-0",children:[o.jsx("span",{className:"text-[10px] text-zinc-400",children:L}),F.required&&o.jsx("span",{className:"ml-1 text-[9px] text-rose-400/70",children:"*"})]}),o.jsx("input",{value:x[L]??"",onChange:W=>p(le=>({...le,[L]:W.target.value})),placeholder:`${F.type}${F.format?` (${F.format})`:""}`,className:"flex-1 border border-white/[0.06] bg-white/[0.02] px-2.5 py-1.5 font-mono text-[11px] text-zinc-300 outline-none focus:border-blue-500/40 placeholder-zinc-700 transition-colors"})]},L))})]}),r==="real"&&Object.keys(A).length===0&&!H&&o.jsxs("p",{className:"text-[10px] text-zinc-700 italic",children:["No body required for ",n.method.toUpperCase()," requests."]}),o.jsxs("button",{onClick:G,disabled:m,className:"flex w-full items-center justify-center gap-2 border border-amber-500/30 bg-amber-500/[0.07] py-2 text-[11px] font-medium text-amber-300 hover:bg-amber-500/15 disabled:opacity-50 transition-colors",children:[m?o.jsx(St,{className:"h-3.5 w-3.5 animate-spin"}):o.jsx(hr,{className:"h-3.5 w-3.5"}),m?"Sending…":`Run ${r==="fake"?"with Fake Data":"with Real Data"}`]}),b&&o.jsxs("div",{className:` border overflow-hidden ${O?"border-emerald-500/20 bg-emerald-500/[0.04]":"border-red-500/20 bg-red-500/[0.04]"}`,children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-white/[0.04]",children:[O?o.jsx(fn,{className:"h-3.5 w-3.5 text-emerald-400"}):o.jsx(dn,{className:"h-3.5 w-3.5 text-red-400"}),o.jsx("span",{className:`text-[11px] font-medium ${O?"text-emerald-400":"text-red-400"}`,children:b.status>0?b.status:"Error"}),o.jsxs("span",{className:"text-[10px] text-zinc-600",children:[b.durationMs,"ms"]}),o.jsx("button",{onClick:()=>w(null),className:"ml-auto text-zinc-700 hover:text-zinc-500",children:o.jsx(Tl,{className:"h-3.5 w-3.5"})})]}),b.error&&o.jsx("p",{className:"px-3 py-2 text-[11px] text-red-400",children:b.error}),!b.error&&b.body!=null&&o.jsx("pre",{className:"overflow-auto max-h-56 p-3 text-[10px] text-zinc-400 whitespace-pre-wrap break-all leading-5",children:typeof b.body=="string"?b.body:JSON.stringify(b.body,null,2)})]})]})]})}function sf({children:n,className:s=""}){return o.jsx("div",{className:` border border-white/[0.06] bg-black/30 overflow-hidden ${s}`,children:n})}function cf({icon:n,label:s,count:i}){return o.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-white/[0.04] bg-white/[0.015]",children:[n,o.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-500",children:s}),i!==void 0&&o.jsx("span",{className:"ml-auto -full bg-white/[0.04] px-2 py-0.5 text-[9px] text-zinc-600",children:i})]})}const DS=({endpoint:n,onBack:s})=>{if(!n)return o.jsxs("div",{className:"flex min-h-full w-full flex-col items-center justify-center gap-5 text-center p-12",children:[o.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[o.jsx("div",{className:"absolute inset-0 -full bg-violet-500/10 blur-xl"}),o.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center -full border border-white/[0.06] bg-white/[0.02] text-violet-400",children:o.jsx(lp,{className:"h-7 w-7"})})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-zinc-300",children:"No endpoint selected"}),o.jsxs("p",{className:"mt-1 text-[11px] text-zinc-600",children:["Click ",o.jsx("span",{className:"text-violet-300",children:"INSPECT"})," on any endpoint in the Model view."]})]}),o.jsxs("button",{onClick:s,className:"flex items-center gap-1.5 border border-white/[0.08] bg-white/[0.03] px-4 py-2 text-xs text-zinc-400 hover:text-zinc-200 hover:bg-white/[0.06] transition-colors",children:[o.jsx(Vm,{className:"h-3.5 w-3.5"})," Back to Model"]})]});const i=n.requestBody?.fields??{},r=n.responses??{},f=Object.keys(i).length>0,d=Object.keys(r).length>0,h=(n.security?.length??0)>0,x=(n.middleware?.length??0)>0,p=n.source?n.source.file.split(/[/\\]/).slice(-3).join("/")+":"+n.source.line:null;return o.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[o.jsxs("div",{className:"flex items-center gap-4 border-b border-white/[0.06] px-6 py-5",children:[o.jsx("button",{onClick:s,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded border border-white/[0.06] bg-white/[0.02] text-zinc-500 hover:bg-white/[0.06] hover:text-zinc-300 transition-all",children:o.jsx(Vm,{className:"h-3.5 w-3.5"})}),o.jsxs("div",{className:"relative flex items-center gap-3 flex-1 min-w-0",children:[o.jsx(Qx,{method:n.method}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("h1",{className:" text-sm text-zinc-100 leading-none truncate",children:n.path}),n.handlerName&&o.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600 truncate",children:n.handlerName})]})]}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[h&&o.jsxs("span",{className:"flex items-center gap-1 border border-amber-500/20 bg-amber-500/[0.06] px-2 py-1 text-[10px] text-amber-400/80",children:[o.jsx(ts,{className:"h-3 w-3"}),n.security[0].scheme]}),p&&o.jsxs("span",{className:"hidden sm:block font-mono text-[10px] text-zinc-700 truncate max-w-[200px]",children:["📄 ",p]})]})]}),o.jsxs("div",{className:"flex-1 overflow-auto p-6 space-y-4",children:[o.jsxs(sf,{children:[o.jsx(cf,{icon:o.jsx(ap,{className:"h-3.5 w-3.5 text-zinc-500"}),label:"Details"}),o.jsxs("div",{className:"p-4 grid grid-cols-2 sm:grid-cols-3 gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Method"}),o.jsx(Qx,{method:n.method})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Path"}),o.jsx("code",{className:"font-mono text-[11px] text-zinc-300",children:n.path})]}),n.handlerName&&o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Handler"}),o.jsx("code",{className:"font-mono text-[11px] text-zinc-400",children:n.handlerName})]}),n.source&&o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Source"}),o.jsx("code",{className:"font-mono text-[10px] text-zinc-500",children:p})]}),n.requestBody?.contentType&&o.jsxs("div",{children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Content-Type"}),o.jsx("code",{className:"font-mono text-[10px] text-zinc-500",children:n.requestBody.contentType})]}),x&&o.jsxs("div",{className:"col-span-2 sm:col-span-3",children:[o.jsx("p",{className:"text-[10px] text-zinc-600 mb-1.5 uppercase tracking-wider",children:"Middleware"}),o.jsx("div",{className:"flex flex-wrap gap-1",children:n.middleware.map((m,g)=>o.jsx("span",{className:"-full bg-white/[0.04] border border-white/[0.06] px-2 py-0.5 text-[10px] text-zinc-500",children:m.name},g))})]})]})]}),f&&o.jsxs(sf,{children:[o.jsx(cf,{icon:o.jsx(of,{className:"h-3.5 w-3.5 text-blue-400/60"}),label:"Request Body",count:Object.keys(i).length}),o.jsxs("div",{className:"p-4 space-y-1.5",children:[o.jsxs("div",{className:"mb-2 flex items-center gap-4 px-3 py-1.5 text-[9px] uppercase tracking-wider text-zinc-700",children:[o.jsx("span",{className:"w-28",children:"Field"}),o.jsx("span",{className:"w-16",children:"Type"}),o.jsx("span",{children:"Format"}),o.jsx("span",{className:"ml-auto",children:"Required"})]}),Object.entries(i).map(([m,g])=>o.jsxs("div",{className:"flex items-center gap-4 bg-white/[0.02] border border-white/[0.04] px-3 py-2 hover:bg-white/[0.03] transition-colors",children:[o.jsx("span",{className:"w-28 shrink-0 font-mono text-[11px] text-zinc-300 truncate",children:m}),o.jsx("span",{className:"w-16 shrink-0 text-[10px] text-blue-400/80",children:g.type}),o.jsx("span",{className:"flex-1 text-[10px] text-zinc-600",children:g.format??"—"}),g.required?o.jsx("span",{className:"ml-auto shrink-0 bg-rose-500/10 border border-rose-500/20 px-1.5 py-0.5 text-[9px] text-rose-400",children:"required"}):o.jsx("span",{className:"ml-auto shrink-0 text-[9px] text-zinc-700",children:"optional"})]},m))]})]}),d&&o.jsxs(sf,{children:[o.jsx(cf,{icon:o.jsx(fn,{className:"h-3.5 w-3.5 text-emerald-400/60"}),label:"Responses",count:Object.keys(r).length}),o.jsx("div",{className:"p-4 space-y-1.5",children:Object.entries(r).map(([m,g])=>{const b=m.startsWith("2");return o.jsxs("div",{className:`flex items-start gap-3 border px-3 py-2 ${b?"border-emerald-500/10 bg-emerald-500/[0.03]":"border-red-500/10 bg-red-500/[0.03]"}`,children:[o.jsx("span",{className:`shrink-0 w-10 font-mono text-[11px] font-medium ${b?"text-emerald-400":"text-red-400"}`,children:m}),g.schema&&o.jsx("div",{className:"flex flex-wrap gap-1",children:Object.keys(g.schema).map(w=>o.jsx("span",{className:" bg-white/[0.04] px-1.5 py-0.5 font-mono text-[9px] text-zinc-500",children:w},w))})]},m)})})]}),o.jsx(TS,{endpoint:n}),o.jsx(CS,{endpoint:n}),o.jsx(RS,{endpoint:n})]})]})};function OS(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Agents"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This is under developnment."})]})}function kS(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Tools"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Tools page."})]})}function HS(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Context"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Context page."})]})}const If="/api/memory";async function Jx(){const n=await fetch(If);if(!n.ok)throw new Error(`Failed to fetch memory (${n.status})`);return n.json()}async function US(n,s){const i=await fetch(If,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:n,value:s})});if(!i.ok){const r=await i.json().catch(()=>({}));throw new Error(r.error??`Failed to add entry (${i.status})`)}}async function BS(n){const s=await fetch(If,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:n})});if(!s.ok)throw new Error(`Failed to delete entry (${s.status})`)}function Wx(n){return typeof n=="object"&&n!==null?JSON.stringify(n):String(n)}function qS(n){const s=n.indexOf(":");return s!==-1?n.slice(s+1):n}function LS({value:n}){const[s,i]=_.useState(!1),r=n.length>200?n.slice(0,200)+"…":n;return o.jsx("div",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),className:"cursor-pointer min-w-[200px]",children:s?o.jsx("p",{className:"text-zinc-300 text-wrap break-all transition-colors",children:r}):o.jsx("p",{className:"text-zinc-500 font-mono tracking-widest select-none",children:"******"})})}function YS({onClose:n,onSave:s}){const[i,r]=_.useState(""),[f,d]=_.useState(""),[h,x]=_.useState(!1),[p,m]=_.useState(""),g=_.useRef(null);_.useEffect(()=>{g.current?.focus()},[]);const b=async w=>{if(w.preventDefault(),!i.trim()){m("Key is required");return}if(f.trim()===""){m("Value is required");return}x(!0),m("");try{await s(i.trim(),f.trim()),n()}catch(j){m(j.message??"An error occurred"),x(!1)}};return o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:w=>{w.target===w.currentTarget&&n()},children:o.jsxs("div",{className:"relative w-full max-w-md rounded border border-white/[0.08] bg-[#111111] shadow-2xl shadow-black/60 p-6",children:[o.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[o.jsx("h2",{className:"text-base text-white",children:"Add Memory Entry"}),o.jsx("button",{onClick:n,className:"flex h-7 w-7 items-center justify-center rounded text-zinc-500 hover:bg-white/[0.06] hover:text-zinc-300 transition-colors",children:o.jsx(Tl,{className:"h-4 w-4"})})]}),o.jsxs("form",{onSubmit:b,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1.5 block text-xs font-medium text-zinc-400",children:"Key / Identifier"}),o.jsx("input",{ref:g,value:i,onChange:w=>r(w.target.value),placeholder:"global:myKey or myKey",className:"w-full rounded border border-white/[0.08] bg-white/[0.03] px-3 py-2 text-zinc-200 placeholder-zinc-600 outline-none focus:border-violet-500/50 focus:ring-1 focus:ring-violet-500/30 transition-all "}),o.jsxs("p",{className:"mt-1 text-[10px] text-zinc-600",children:["Prefix with ",o.jsx("code",{className:"text-zinc-500",children:"scope:"})," to organise by scope (e.g."," ",o.jsx("code",{className:"text-zinc-500",children:"user:name"}),"). Defaults to"," ",o.jsx("code",{className:"text-zinc-500",children:"global"}),"."]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1.5 block text-xs font-medium text-zinc-400",children:"Value"}),o.jsx("textarea",{value:f,onChange:w=>d(w.target.value),placeholder:"Enter a string value…",rows:4,className:"w-full resize-none rounded border border-white/[0.08] bg-white/[0.03] px-3 py-2 text-zinc-200 placeholder-zinc-600 outline-none focus:border-violet-500/50 focus:ring-1 focus:ring-violet-500/30 transition-all "})]}),p&&o.jsx("p",{className:"rounded border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:p}),o.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[o.jsx("button",{type:"button",onClick:n,className:"rounded px-4 py-2 text-zinc-400 hover:text-zinc-200 transition-colors",children:"Cancel"}),o.jsxs("button",{type:"submit",disabled:h,className:"flex items-center gap-2 rounded bg-violet-600 px-4 py-2 font-medium text-white hover:bg-violet-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[h&&o.jsx(St,{className:"h-3.5 w-3.5 animate-spin"}),h?"Saving…":"Save Entry"]})]})]})]})})}function VS(){const[n,s]=_.useState([]),[i,r]=_.useState(!0),[f,d]=_.useState(!1),[h,x]=_.useState(null),[p,m]=_.useState(""),[g,b]=_.useState(!1),[w,j]=_.useState(null),T=_.useCallback(async(H=!1)=>{H?d(!0):r(!0),x(null);try{const V=await Jx();s(V)}catch(V){x(V.message??"Could not load memory data. Is `jetic dev` running?")}finally{r(!1),d(!1)}},[]);_.useEffect(()=>{T()},[T]);const M=async H=>{j(H);try{await BS(H),s(V=>V.filter(R=>R.key!==H))}catch(V){x(V.message??"Failed to delete entry")}finally{j(null)}},A=async(H,V)=>{await US(H,V);const R=await Jx();s(R)},C=n.filter(H=>!p||H.key.toLowerCase().includes(p.toLowerCase())||Wx(H.value).toLowerCase().includes(p.toLowerCase()));return o.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-white/[0.06] px-6 py-5 sticky",children:[o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-[15px] text-white leading-none",children:"Memory"}),o.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:i?"Loading…":`${n.length} entr${n.length===1?"y":"ies"} stored`})]})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>T(!0),disabled:f||i,title:"Refresh",className:"flex h-8 w-8 items-center justify-center rounded border border-white/[0.06] bg-white/[0.02] text-zinc-500 hover:bg-white/[0.06] hover:text-zinc-300 disabled:opacity-40 transition-all",children:o.jsx(Ai,{className:`h-3.5 w-3.5 ${f?"animate-spin":""}`})}),o.jsxs("button",{onClick:()=>b(!0),className:"flex items-center gap-1.5 rounded bg-violet-600 px-3 py-1.5 font-medium text-white hover:bg-violet-500 transition-colors",children:[o.jsx(Xm,{className:"h-3.5 w-3.5"}),"Add Entry"]})]})]}),o.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-6",children:[!i&&n.length>0&&o.jsxs("div",{className:"relative",children:[o.jsx(Zm,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-600"}),o.jsx("input",{value:p,onChange:H=>m(H.target.value),placeholder:"Filter by key or value…",className:"w-full rounded border border-white/[0.06] bg-white/[0.02] py-2 pl-9 pr-4 text-zinc-300 placeholder-zinc-600 outline-none focus:border-violet-500/50 focus:ring-1 focus:ring-violet-500/20 transition-all"}),p&&o.jsx("button",{onClick:()=>m(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-zinc-600 hover:text-zinc-400 transition-colors",children:o.jsx(Tl,{className:"h-3.5 w-3.5"})})]}),i&&o.jsx("div",{className:"space-y-3",children:[1,2,3].map(H=>o.jsx("div",{className:"h-24 animate-pulse rounded border border-white/[0.04] bg-white/[0.02]",style:{opacity:1-H*.2}},H))}),!i&&h&&o.jsxs("div",{className:"flex flex-col items-center gap-4 rounded border border-red-500/20 bg-red-500/[0.05] p-10 text-center",children:[o.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10 text-red-400",children:o.jsx($m,{className:"h-6 w-6"})}),o.jsxs("div",{children:[o.jsx("p",{className:" font-medium text-red-300",children:"Could not load memory"}),o.jsx("p",{className:"mt-1 text-xs text-red-500/80",children:h})]}),o.jsx("button",{onClick:()=>T(),className:"rounded border border-red-500/20 bg-red-500/10 px-4 py-1.5 text-xs text-red-400 hover:bg-red-500/20 transition-colors",children:"Retry"})]}),!i&&!h&&n.length===0&&o.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4 py-20 text-center",children:[o.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[o.jsx("div",{className:"absolute inset-0 rounded-full bg-violet-500/10 blur-xl"}),o.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full border border-white/[0.06] bg-white/[0.02] text-violet-400",children:o.jsx($m,{className:"h-7 w-7"})})]}),o.jsxs("div",{children:[o.jsx("p",{className:" font-medium text-zinc-300",children:"Memory is empty"}),o.jsxs("p",{className:"mt-1 text-xs text-zinc-600",children:["Add your first entry or run"," ",o.jsx("code",{className:"text-zinc-500",children:"jetic memory add"})," in the CLI."]})]}),o.jsxs("button",{onClick:()=>b(!0),className:"flex items-center gap-1.5 rounded bg-violet-600 px-4 py-2 font-medium text-white hover:bg-violet-500 transition-colors",children:[o.jsx(Xm,{className:"h-3.5 w-3.5"}),"Add Entry"]})]}),!i&&!h&&n.length>0&&p&&C.length===0&&o.jsxs("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[o.jsx(Zm,{className:"h-6 w-6 text-zinc-700"}),o.jsxs("p",{className:" text-zinc-500",children:['No entries match "',p,'"']}),o.jsx("button",{onClick:()=>m(""),className:"text-xs text-violet-400 hover:text-violet-300 transition-colors",children:"Clear filter"})]}),!i&&!h&&C.length>0&&o.jsx("div",{className:"border-y border-white/[0.06] bg-white/[0.02] overflow-x-auto",children:o.jsxs("table",{className:"w-full text-left whitespace-nowrap",children:[o.jsx("thead",{className:"border-b border-white/[0.06] bg-white/[0.02]",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-4 py-3 font-medium text-zinc-400 w-32",children:"Scope"}),o.jsx("th",{className:"px-4 py-3 font-medium text-zinc-400 w-48",children:"Key"}),o.jsx("th",{className:"px-4 py-3 font-medium text-zinc-400",children:"Value"}),o.jsx("th",{className:"px-4 py-3 font-medium text-zinc-400 text-right w-16",children:"Actions"})]})}),o.jsx("tbody",{className:"divide-y divide-white/[0.04]",children:C.map(H=>{const V=H.key.includes(":")?H.key.split(":")[0]:"global",R=qS(H.key),G=Wx(H.value),O=w===H.key;return o.jsxs("tr",{className:"group hover:bg-white/[0.025] transition-colors",children:[o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:"inline-flex rounded-full bg-white/[0.06] px-2 py-0.5 text-[10px] text-zinc-400 uppercase tracking-wider",children:V})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:"inline-block rounded bg-white/[0.06] px-2 py-0.5 text-zinc-300",children:R})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx(LS,{value:G})}),o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsx("button",{onClick:()=>M(H.key),disabled:O,title:"Delete entry",className:"inline-flex h-7 w-7 items-center justify-center rounded text-zinc-600group-hover:opacity-100 hover:bg-red-500/10 hover:text-red-400 transition-all disabled:cursor-not-allowed disabled:opacity-50",children:O?o.jsx(St,{className:"h-3.5 w-3.5 animate-spin"}):o.jsx(rr,{className:"h-3.5 w-3.5"})})})]},H.key)})})]})}),!i&&!h&&p&&C.length>0&&o.jsxs("p",{className:"text-center text-xs text-zinc-600",children:["Showing ",C.length," of ",n.length," entries"]})]}),!i&&!h&&n.length>0&&o.jsxs("div",{className:"flex items-center gap-1.5 border-t border-white/[0.04] px-6 py-3 text-[10px] text-zinc-700",children:[o.jsx(Mf,{className:"h-3 w-3"}),"Data read from ",o.jsx("code",{className:"text-zinc-600",children:".jetic/memory.json"}),o.jsx("span",{className:"ml-auto",children:o.jsx("button",{onClick:()=>T(!0),className:"text-zinc-600 hover:text-zinc-400 transition-colors",children:"Refresh"})})]}),g&&o.jsx(YS,{onClose:()=>b(!1),onSave:A})]})}function $S(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"APIs"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the APIs page."})]})}function GS(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Email"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Email page."})]})}function XS(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"OAuth"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the OAuth page."})]})}function ZS(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Webhooks"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Webhooks page."})]})}function QS(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Traces"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This page is under developnment."})]})}function KS(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Events"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This page is underdevelopnment."})]})}function aa({icon:n,label:s,description:i}){return o.jsxs("div",{className:"flex items-start gap-3 pb-4 border-b border-white/10",children:[o.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-white/10 bg-white/[0.04]",children:o.jsx(n,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-[13.5px] font-medium text-white",children:s}),i&&o.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:i})]})]})}function Le({label:n,description:s,children:i}){return o.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-white/[0.06] last:border-0",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-[13px] text-zinc-200",children:n}),s&&o.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:s})]}),o.jsx("div",{className:"shrink-0",children:i})]})}function Lt({value:n,onChange:s}){return o.jsx("button",{onClick:()=>s(!n),className:`relative flex h-5 w-9 items-center rounded-full border transition-colors ${n?"bg-blue-500 border-blue-400":"bg-white/[0.04] border-white/10"}`,children:o.jsx("span",{className:`absolute h-3.5 w-3.5 rounded-full bg-white shadow transition-transform ${n?"translate-x-4":"translate-x-0.5"}`})})}function JS({value:n,onChange:s,placeholder:i,mono:r=!1,type:f="text"}){return o.jsx("input",{type:f,value:n,onChange:d=>s(d.target.value),placeholder:i,className:`w-56 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-1.5 text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 focus:bg-white/[0.05] placeholder-zinc-600 transition-colors ${r?"font-mono":""}`})}function is({value:n,onChange:s,options:i}){return o.jsx("select",{value:n,onChange:r=>s(r.target.value),className:"rounded-lg border border-white/10 bg-zinc-900 px-3 py-1.5 text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 transition-colors",children:i.map(r=>o.jsx("option",{value:r,children:r},r))})}function sa({children:n,className:s=""}){return o.jsx("div",{className:`rounded-lg border border-white/10 bg-white/[0.02] p-5 space-y-1 ${s}`,children:n})}function Dg({saving:n,onClick:s}){return o.jsxs("button",{onClick:s,disabled:n,className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-1.5 text-[12px] font-medium text-white hover:bg-blue-400 disabled:opacity-50 transition-colors",children:[n?o.jsx(St,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:2}):o.jsx(Xb,{className:"h-3.5 w-3.5",strokeWidth:2}),n?"Saving…":"Save"]})}const WS=[{id:"general",label:"General",icon:op},{id:"environments",label:"Environments",icon:Tf},{id:"appearance",label:"Appearance",icon:cp},{id:"editor",label:"Editor",icon:Af},{id:"notifications",label:"Notifications",icon:tp},{id:"api",label:"API & Auth",icon:ts},{id:"advanced",label:"Advanced",icon:Rf}];function FS({model:n}){const[s,i]=_.useState(n?.project?.name??""),[r,f]=_.useState(n?.project?.language??"TypeScript"),[d,h]=_.useState(n?.project?.framework??"Express"),[x,p]=_.useState(!1),[m,g]=_.useState(!1);_.useEffect(()=>{i(n?.project?.name??""),f(n?.project?.language??"TypeScript"),h(n?.project?.framework??"Express")},[n]);const b=async()=>{p(!0),await new Promise(w=>setTimeout(w,600)),p(!1),g(!0),setTimeout(()=>g(!1),2e3)};return o.jsxs("div",{className:"space-y-5",children:[o.jsx(aa,{icon:op,label:"General",description:"Project identity and basic configuration"}),o.jsxs(sa,{children:[o.jsx(Le,{label:"Project Name",description:"Display name shown in the dashboard",children:o.jsx(JS,{value:s,onChange:i,placeholder:"My API"})}),o.jsx(Le,{label:"Language",description:"Primary language of your backend",children:o.jsx(is,{value:r,onChange:f,options:["TypeScript","JavaScript","Python","Go","Rust"]})}),o.jsx(Le,{label:"Framework",description:"HTTP framework used by your server",children:o.jsx(is,{value:d,onChange:h,options:["Express","Fastify","Hono","Koa","NestJS","Other"]})}),o.jsxs("div",{className:"flex justify-end pt-2 gap-2",children:[m&&o.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-emerald-400",children:[o.jsx(fn,{className:"h-3.5 w-3.5",strokeWidth:2})," Saved"]}),o.jsx(Dg,{saving:x,onClick:b})]})]})]})}function IS({model:n}){const[s,i]=_.useState(n?.environments??[{name:"local",baseUrl:"http://localhost:3000"}]),[r,f]=_.useState(!1),[d,h]=_.useState(!1);_.useEffect(()=>{i(n?.environments??[{name:"local",baseUrl:"http://localhost:3000"}])},[n]);const x=()=>i(b=>[...b,{name:"",baseUrl:""}]),p=b=>i(w=>w.filter((j,T)=>T!==b)),m=(b,w,j)=>i(T=>T.map((M,A)=>A===b?{...M,[w]:j}:M)),g=async()=>{f(!0),await new Promise(b=>setTimeout(b,600)),f(!1),h(!0),setTimeout(()=>h(!1),2e3)};return o.jsxs("div",{className:"space-y-5",children:[o.jsx(aa,{icon:Tf,label:"Environments",description:"Configure your API base URLs for simulation"}),o.jsxs(sa,{children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-4 px-1 mb-2",children:[o.jsx("p",{className:"w-24 text-[10px] uppercase tracking-wider text-zinc-600 font-semibold",children:"Name"}),o.jsx("p",{className:"flex-1 text-[10px] uppercase tracking-wider text-zinc-600 font-semibold",children:"Base URL"})]}),s.map((b,w)=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{value:b.name,onChange:j=>m(w,"name",j.target.value),placeholder:"local",className:"w-24 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-1.5 text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 focus:bg-white/[0.05] placeholder-zinc-600 transition-colors"}),o.jsx("input",{value:b.baseUrl,onChange:j=>m(w,"baseUrl",j.target.value),placeholder:"http://localhost:3000",className:"flex-1 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-1.5 font-mono text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 focus:bg-white/[0.05] placeholder-zinc-600 transition-colors"}),o.jsx("button",{onClick:()=>p(w),className:"flex h-7 w-7 items-center justify-center rounded-lg border border-white/10 bg-white/[0.03] text-zinc-500 hover:bg-red-500/10 hover:border-red-500/30 hover:text-red-400 transition-colors",children:o.jsx(Tl,{className:"h-3.5 w-3.5",strokeWidth:2})})]},w)),o.jsx("button",{onClick:x,className:"text-[12px] text-blue-400 hover:text-blue-300 transition-colors mt-1",children:"+ Add environment"})]}),o.jsxs("div",{className:"flex justify-end pt-3 gap-2 border-t border-white/[0.06]",children:[d&&o.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-emerald-400",children:[o.jsx(fn,{className:"h-3.5 w-3.5",strokeWidth:2})," Saved"]}),o.jsx(Dg,{saving:r,onClick:g})]})]}),o.jsxs("div",{className:"rounded-lg border border-white/10 bg-white/[0.02] px-4 py-3 flex items-start gap-2.5",children:[o.jsx(Sb,{className:"h-3.5 w-3.5 text-blue-400/70 shrink-0 mt-0.5",strokeWidth:2}),o.jsxs("p",{className:"text-[11px] text-zinc-500",children:["The"," ",o.jsx("code",{className:"text-zinc-300 bg-white/[0.06] px-1 py-0.5 rounded text-[10px]",children:"local"})," ","environment is used as the default base URL for simulations and endpoint testing."]})]})]})}function PS(){const[n,s]=_.useState("dark"),[i,r]=_.useState("blue"),[f,d]=_.useState("comfortable"),[h,x]=_.useState(!0),p=["blue","violet","emerald","amber","rose"],m={blue:"#3b82f6",violet:"#8b5cf6",emerald:"#34d399",amber:"#fbbf24",rose:"#fb7185"};return o.jsxs("div",{className:"space-y-5",children:[o.jsx(aa,{icon:cp,label:"Appearance",description:"Customize the look and feel of the dashboard"}),o.jsxs(sa,{children:[o.jsx(Le,{label:"Theme",description:"Choose your preferred colour scheme",children:o.jsx("div",{className:"flex gap-px overflow-hidden rounded-lg border border-white/10",children:["dark","darker"].map(g=>o.jsx("button",{onClick:()=>s(g),className:`px-3 py-1.5 text-[12px] transition-colors capitalize ${n===g?"bg-blue-500 text-white":"text-zinc-400 hover:text-zinc-200 bg-white/[0.02] hover:bg-white/[0.05]"}`,children:g},g))})}),o.jsx(Le,{label:"Accent Colour",description:"Primary highlight colour throughout the UI",children:o.jsx("div",{className:"flex items-center gap-2",children:p.map(g=>o.jsx("button",{onClick:()=>r(g),className:`h-5 w-5 rounded-full border-2 transition-transform ${i===g?"scale-110 border-white/40":"border-transparent hover:scale-105"}`,style:{background:m[g]}},g))})}),o.jsx(Le,{label:"Density",description:"Controls spacing throughout the layout",children:o.jsx("div",{className:"flex gap-px overflow-hidden rounded-lg border border-white/10",children:["comfortable","compact"].map(g=>o.jsx("button",{onClick:()=>d(g),className:`px-3 py-1.5 text-[12px] transition-colors capitalize ${f===g?"bg-blue-500 text-white":"text-zinc-400 hover:text-zinc-200 bg-white/[0.02] hover:bg-white/[0.05]"}`,children:g},g))})}),o.jsx(Le,{label:"Animations",description:"Smooth transitions and micro-animations",children:o.jsx(Lt,{value:h,onChange:x})})]})]})}function e4(){const[n,s]=_.useState("11"),[i,r]=_.useState("2"),[f,d]=_.useState(!0),[h,x]=_.useState(!0),[p,m]=_.useState(!0);return o.jsxs("div",{className:"space-y-5",children:[o.jsx(aa,{icon:Af,label:"Editor",description:"Source viewer and code display preferences"}),o.jsxs(sa,{children:[o.jsx(Le,{label:"Font Size",description:"Monospace font size in the source viewer",children:o.jsx(is,{value:n,onChange:s,options:["10","11","12","13","14"]})}),o.jsx(Le,{label:"Tab Size",description:"Number of spaces per indentation level",children:o.jsx(is,{value:i,onChange:r,options:["2","4","8"]})}),o.jsx(Le,{label:"Word Wrap",description:"Wrap long lines in the source viewer",children:o.jsx(Lt,{value:f,onChange:d})}),o.jsx(Le,{label:"Line Numbers",description:"Show line numbers in the source viewer gutter",children:o.jsx(Lt,{value:h,onChange:x})}),o.jsx(Le,{label:"Highlight Handler Line",description:"Highlight the matched handler line in source view",children:o.jsx(Lt,{value:p,onChange:m})})]})]})}function t4(){const[n,s]=_.useState(!0),[i,r]=_.useState(!0),[f,d]=_.useState(!0),[h,x]=_.useState(!1),[p,m]=_.useState(!1);return o.jsxs("div",{className:"space-y-5",children:[o.jsx(aa,{icon:tp,label:"Notifications",description:"Control when and how you're notified"}),o.jsxs(sa,{children:[o.jsx(Le,{label:"Scan complete",description:"Notify when a project scan finishes",children:o.jsx(Lt,{value:n,onChange:s})}),o.jsx(Le,{label:"Simulation complete",description:"Notify when a workflow run finishes",children:o.jsx(Lt,{value:i,onChange:r})}),o.jsx(Le,{label:"Simulation failure",description:"Notify when a workflow step fails",children:o.jsx(Lt,{value:f,onChange:d})}),o.jsx(Le,{label:"Memory updates",description:"Notify on runtime memory changes",children:o.jsx(Lt,{value:h,onChange:x})}),o.jsx(Le,{label:"Desktop notifications",description:"Show browser push notifications",children:o.jsx(Lt,{value:p,onChange:m})})]})]})}function n4(){const[n,s]=_.useState(""),[i,r]=_.useState("10000"),[f,d]=_.useState(!1),[h,x]=_.useState(!1);return o.jsxs("div",{className:"space-y-5",children:[o.jsx(aa,{icon:ts,label:"API & Auth",description:"Default request settings for endpoint simulation"}),o.jsxs(sa,{children:[o.jsx(Le,{label:"Default Bearer Token",description:"Pre-fill bearer token in simulate panels",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("input",{type:h?"text":"password",value:n,onChange:p=>s(p.target.value),placeholder:"eyJ…",className:"w-48 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-1.5 font-mono text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 focus:bg-white/[0.05] placeholder-zinc-600 transition-colors"}),o.jsx("button",{onClick:()=>x(p=>!p),className:"text-[11px] text-zinc-500 hover:text-zinc-300 transition-colors",children:h?"Hide":"Show"})]})}),o.jsx(Le,{label:"Request Timeout",description:"Milliseconds before a simulated request times out",children:o.jsx(is,{value:i,onChange:r,options:["5000","10000","15000","30000","60000"]})}),o.jsx(Le,{label:"Auto-retry on 5xx",description:"Automatically retry failed requests once",children:o.jsx(Lt,{value:f,onChange:d})})]})]})}function l4({onClearMemory:n}){const[s,i]=_.useState(!1),[r,f]=_.useState(!1),[d,h]=_.useState(!1),[x,p]=_.useState("30"),[m,g]=_.useState(!1),[b,w]=_.useState(!1),j=async()=>{g(!0),await new Promise(T=>setTimeout(T,800)),g(!1),w(!0),setTimeout(()=>w(!1),2e3),n()};return o.jsxs("div",{className:"space-y-5",children:[o.jsx(aa,{icon:Rf,label:"Advanced",description:"Developer and diagnostic options"}),o.jsxs(sa,{children:[o.jsx(Le,{label:"Scan on start",description:"Auto-scan project when the dashboard loads",children:o.jsx(Lt,{value:s,onChange:i})}),o.jsx(Le,{label:"Auto-refresh model",description:"Periodically reload model.json from disk",children:o.jsx(Lt,{value:d,onChange:h})}),d&&o.jsx(Le,{label:"Refresh interval",description:"How often to poll for model changes",children:o.jsx(is,{value:x,onChange:p,options:["10","30","60","120"]})}),o.jsx(Le,{label:"Debug mode",description:"Verbose logging in the browser console",children:o.jsx(Lt,{value:r,onChange:f})})]}),o.jsxs("div",{className:"rounded-lg border border-red-500/20 bg-red-500/[0.03] overflow-hidden",children:[o.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-red-500/10",children:[o.jsx(rr,{className:"h-[15px] w-[15px] text-red-400/60",strokeWidth:2}),o.jsx("span",{className:"text-[11px] font-semibold tracking-wider text-red-400/70",children:"DANGER ZONE"})]}),o.jsxs("div",{className:"p-4 space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-[13px] text-zinc-200",children:"Clear Runtime Memory"}),o.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:"Delete all stored memory keys and values"})]}),o.jsxs("button",{onClick:j,disabled:m,className:"flex items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/[0.06] px-3 py-1.5 text-[12px] text-red-400 hover:bg-red-500/10 disabled:opacity-50 transition-colors",children:[m?o.jsx(St,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:2}):b?o.jsx(fn,{className:"h-3.5 w-3.5",strokeWidth:2}):o.jsx(rr,{className:"h-3.5 w-3.5",strokeWidth:2}),m?"Clearing…":b?"Cleared":"Clear Memory"]})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4 pt-3 border-t border-red-500/10",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-[13px] text-zinc-200",children:"Reset Model"}),o.jsxs("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:["Delete"," ",o.jsx("code",{className:"text-zinc-400 bg-white/[0.06] px-1 py-0.5 rounded text-[10px]",children:".jetic/model.json"})," ","and start fresh"]})]}),o.jsxs("button",{className:"flex items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/[0.06] px-3 py-1.5 text-[12px] text-red-400 hover:bg-red-500/10 transition-colors",children:[o.jsx(rr,{className:"h-3.5 w-3.5",strokeWidth:2})," Reset Model"]})]})]})]})]})}function a4(){return o.jsxs("div",{className:"rounded-lg border border-white/10 bg-white/[0.02] p-4 flex items-center gap-3",children:[o.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg border border-white/10 bg-white/[0.04]",children:o.jsx(Wa,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-[13.5px] font-medium text-white",children:"Jetic Studio"}),o.jsx("p",{className:"text-[11px] text-zinc-500",children:"v0.1.0 · Local development dashboard"})]}),o.jsxs("div",{className:"ml-auto flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.02] px-2.5 py-1",children:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse"}),o.jsx("span",{className:"text-[11px] text-zinc-400 font-medium",children:"Running"})]})]})}function s4({icon:n,label:s,active:i,onClick:r}){return o.jsxs("button",{type:"button",onClick:r,className:`relative flex w-full items-center gap-3 rounded-lg px-3 py-1.5 text-left text-[13.5px] transition-colors ${i?"bg-white/[0.07] text-white font-medium":"text-zinc-400 hover:bg-white/[0.03] hover:text-zinc-200"}`,children:[i&&o.jsx("span",{className:"absolute -left-3 top-1/2 h-4 w-[3px] -translate-y-1/2 rounded-full bg-blue-500"}),o.jsx(n,{className:"h-[15px] w-[15px] shrink-0",strokeWidth:2}),o.jsx("span",{children:s}),i&&o.jsx(cs,{className:"ml-auto h-3.5 w-3.5 opacity-40",strokeWidth:2})]})}function i4(){const[n,s]=_.useState("general"),[i,r]=_.useState(null),[f,d]=_.useState(!0);_.useEffect(()=>{fetch("/api/model").then(x=>x.ok?x.json():null).then(x=>r(x)).catch(()=>{}).finally(()=>d(!1))},[]);const h=()=>{switch(n){case"general":return o.jsx(FS,{model:i});case"environments":return o.jsx(IS,{model:i});case"appearance":return o.jsx(PS,{});case"editor":return o.jsx(e4,{});case"notifications":return o.jsx(t4,{});case"api":return o.jsx(n4,{});case"advanced":return o.jsx(l4,{onClearMemory:()=>{}});default:return null}};return o.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[o.jsx("div",{className:"flex items-center justify-between border-b border-white/10 px-6 py-5",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-[15px] font-medium text-white leading-none",children:"Settings"}),o.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:"Configure Jetic Studio"})]})}),o.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[o.jsxs("nav",{className:"w-52 shrink-0 border-r border-white/10 bg-black/20 select-none overflow-y-auto p-3 space-y-0.5",children:[o.jsx("span",{className:"px-3 pb-1.5 pt-1 block text-[11px] font-semibold tracking-wider text-zinc-500",children:"CONFIGURATION"}),o.jsx("div",{className:"flex flex-col gap-0.5",children:WS.map(({id:x,label:p,icon:m})=>o.jsx(s4,{icon:m,label:p,active:n===x,onClick:()=>s(x)},x))}),o.jsx("div",{className:"hidden pt-4 mt-2 border-t border-white/10",children:o.jsxs("div",{className:"flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.02] px-2.5 py-1 w-fit",children:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500"}),o.jsx("span",{className:"text-[11px] font-medium text-zinc-400",children:"v0.1.0"})]})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto p-6 space-y-5",children:f?o.jsx("div",{className:"space-y-3",children:[1,2,3].map(x=>o.jsx("div",{className:"h-16 animate-pulse rounded-lg border border-white/10 bg-white/[0.02]",style:{opacity:1-x*.25}},x))}):o.jsxs(o.Fragment,{children:[o.jsx(a4,{}),h()]})})]})]})}function c4(){return o.jsxs("div",{className:"p-8",children:[o.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Docs"}),o.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Docs page."})]})}const r4=["overview","simulations","model","inspect","agents","tools","context","memory","apis","email","oauth","webhooks","traces","events","settings","docs"],o4=()=>{const[n,s]=_.useState(()=>{const m=localStorage.getItem("active_sidebar_item");return r4.includes(m)?m:"overview"}),[i,r]=_.useState(!1),[f,d]=_.useState(()=>{try{const m=localStorage.getItem("inspected_endpoint");return m?JSON.parse(m):null}catch{return null}});_.useEffect(()=>{localStorage.setItem("active_sidebar_item",n)},[n]),_.useEffect(()=>{f?localStorage.setItem("inspected_endpoint",JSON.stringify(f)):localStorage.removeItem("inspected_endpoint")},[f]);const h=m=>{m!=="inspect"&&d(null),s(m)},x=m=>{d(m),s("inspect")},p=()=>{switch(n){case"overview":return o.jsx(Jm,{onNavigate:h});case"simulations":return o.jsx(yS,{});case"model":return o.jsx(MS,{onInspect:x});case"inspect":return o.jsx(DS,{endpoint:f,onBack:()=>h("model")});case"agents":return o.jsx(OS,{});case"tools":return o.jsx(kS,{});case"context":return o.jsx(HS,{});case"memory":return o.jsx(VS,{});case"apis":return o.jsx($S,{});case"email":return o.jsx(GS,{});case"oauth":return o.jsx(XS,{});case"webhooks":return o.jsx(ZS,{});case"traces":return o.jsx(QS,{});case"events":return o.jsx(KS,{});case"settings":return o.jsx(i4,{});case"docs":return o.jsx(c4,{});default:return o.jsx(Jm,{})}};return o.jsxs("div",{className:"flex h-screen w-full overflow-hidden bg-[#0a0a0a] text-zinc-300 antialiased [font-feature-settings:'ss01'] font-sans text-xs",children:[o.jsx(fv,{currentPage:n,onNavigate:h,onToggleAssistant:()=>r(!i),isAssistantOpen:i}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col relative",children:[o.jsx("div",{className:"flex min-h-0 flex-1 overflow-auto bg-[#0a0a0a]",children:p()}),o.jsx(dv,{isOpen:i,onClose:()=>r(!1)})]})]})};Ky.createRoot(document.getElementById("root")).render(o.jsx(_.StrictMode,{children:o.jsx(o4,{})}));