morpheus-cli 0.5.0 → 0.5.2

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.
Files changed (38) hide show
  1. package/README.md +26 -7
  2. package/dist/channels/telegram.js +173 -0
  3. package/dist/cli/commands/restart.js +15 -14
  4. package/dist/cli/commands/start.js +17 -12
  5. package/dist/config/manager.js +31 -0
  6. package/dist/config/mcp-manager.js +19 -1
  7. package/dist/config/schemas.js +2 -0
  8. package/dist/http/api.js +222 -0
  9. package/dist/runtime/memory/session-embedding-worker.js +3 -3
  10. package/dist/runtime/memory/trinity-db.js +203 -0
  11. package/dist/runtime/neo.js +16 -26
  12. package/dist/runtime/oracle.js +16 -8
  13. package/dist/runtime/session-embedding-scheduler.js +1 -1
  14. package/dist/runtime/tasks/dispatcher.js +21 -0
  15. package/dist/runtime/tasks/repository.js +4 -0
  16. package/dist/runtime/tasks/worker.js +4 -1
  17. package/dist/runtime/tools/__tests__/tools.test.js +1 -3
  18. package/dist/runtime/tools/factory.js +1 -1
  19. package/dist/runtime/tools/index.js +1 -3
  20. package/dist/runtime/tools/morpheus-tools.js +742 -0
  21. package/dist/runtime/tools/neo-tool.js +19 -9
  22. package/dist/runtime/tools/trinity-tool.js +98 -0
  23. package/dist/runtime/trinity-connector.js +611 -0
  24. package/dist/runtime/trinity-crypto.js +52 -0
  25. package/dist/runtime/trinity.js +246 -0
  26. package/dist/runtime/webhooks/dispatcher.js +73 -2
  27. package/dist/runtime/webhooks/repository.js +7 -0
  28. package/dist/ui/assets/index-DP2V4kRd.js +112 -0
  29. package/dist/ui/assets/index-mglRG5Zw.css +1 -0
  30. package/dist/ui/index.html +2 -2
  31. package/dist/ui/sw.js +1 -1
  32. package/package.json +6 -1
  33. package/dist/runtime/tools/analytics-tools.js +0 -139
  34. package/dist/runtime/tools/config-tools.js +0 -64
  35. package/dist/runtime/tools/diagnostic-tools.js +0 -153
  36. package/dist/runtime/tools/task-query-tool.js +0 -76
  37. package/dist/ui/assets/index-20lLB1sM.js +0 -112
  38. package/dist/ui/assets/index-BJ56bRfs.css +0 -1
@@ -1,112 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(o){if(o.ep)return;o.ep=!0;const u=n(o);fetch(o.href,u)}})();function Up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rh={exports:{}},qs={};var e0;function gE(){if(e0)return qs;e0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,u){var l=null;if(u!==void 0&&(l=""+u),o.key!==void 0&&(l=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:e,type:a,key:l,ref:o!==void 0?o:null,props:u}}return qs.Fragment=t,qs.jsx=n,qs.jsxs=n,qs}var t0;function yE(){return t0||(t0=1,Rh.exports=gE()),Rh.exports}var p=yE(),Mh={exports:{}},Ee={};var n0;function xE(){if(n0)return Ee;n0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),b=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=b&&A[b]||A["@@iterator"],typeof A=="function"?A:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function N(A,G,T){this.props=A,this.context=G,this.refs=C,this.updater=T||w}N.prototype.isReactComponent={},N.prototype.setState=function(A,G){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,G,"setState")},N.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function R(){}R.prototype=N.prototype;function j(A,G,T){this.props=A,this.context=G,this.refs=C,this.updater=T||w}var L=j.prototype=new R;L.constructor=j,_(L,N.prototype),L.isPureReactComponent=!0;var P=Array.isArray;function $(){}var Y={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function X(A,G,T){var ie=T.ref;return{$$typeof:e,type:A,key:G,ref:ie!==void 0?ie:null,props:T}}function ue(A,G){return X(A.type,G,A.props)}function ae(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function oe(A){var G={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(T){return G[T]})}var te=/\/+/g;function se(A,G){return typeof A=="object"&&A!==null&&A.key!=null?oe(""+A.key):G.toString(36)}function re(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then($,$):(A.status="pending",A.then(function(G){A.status==="pending"&&(A.status="fulfilled",A.value=G)},function(G){A.status==="pending"&&(A.status="rejected",A.reason=G)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function E(A,G,T,ie,ve){var ge=typeof A;(ge==="undefined"||ge==="boolean")&&(A=null);var ye=!1;if(A===null)ye=!0;else switch(ge){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(A.$$typeof){case e:case t:ye=!0;break;case g:return ye=A._init,E(ye(A._payload),G,T,ie,ve)}}if(ye)return ve=ve(A),ye=ie===""?"."+se(A,0):ie,P(ve)?(T="",ye!=null&&(T=ye.replace(te,"$&/")+"/"),E(ve,G,T,"",function(At){return At})):ve!=null&&(ae(ve)&&(ve=ue(ve,T+(ve.key==null||A&&A.key===ve.key?"":(""+ve.key).replace(te,"$&/")+"/")+ye)),G.push(ve)),1;ye=0;var Ye=ie===""?".":ie+":";if(P(A))for(var $e=0;$e<A.length;$e++)ie=A[$e],ge=Ye+se(ie,$e),ye+=E(ie,G,T,ge,ve);else if($e=v(A),typeof $e=="function")for(A=$e.call(A),$e=0;!(ie=A.next()).done;)ie=ie.value,ge=Ye+se(ie,$e++),ye+=E(ie,G,T,ge,ve);else if(ge==="object"){if(typeof A.then=="function")return E(re(A),G,T,ie,ve);throw G=String(A),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ye}function F(A,G,T){if(A==null)return A;var ie=[],ve=0;return E(A,ie,"","",function(ge){return G.call(T,ge,ve++)}),ie}function Z(A){if(A._status===-1){var G=A._result;G=G(),G.then(function(T){(A._status===0||A._status===-1)&&(A._status=1,A._result=T)},function(T){(A._status===0||A._status===-1)&&(A._status=2,A._result=T)}),A._status===-1&&(A._status=0,A._result=G)}if(A._status===1)return A._result.default;throw A._result}var de=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},O={map:F,forEach:function(A,G,T){F(A,function(){G.apply(this,arguments)},T)},count:function(A){var G=0;return F(A,function(){G++}),G},toArray:function(A){return F(A,function(G){return G})||[]},only:function(A){if(!ae(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ee.Activity=x,Ee.Children=O,Ee.Component=N,Ee.Fragment=n,Ee.Profiler=o,Ee.PureComponent=j,Ee.StrictMode=a,Ee.Suspense=f,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Y.H.useMemoCache(A)}},Ee.cache=function(A){return function(){return A.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(A,G,T){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ie=_({},A.props),ve=A.key;if(G!=null)for(ge in G.key!==void 0&&(ve=""+G.key),G)!U.call(G,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&G.ref===void 0||(ie[ge]=G[ge]);var ge=arguments.length-2;if(ge===1)ie.children=T;else if(1<ge){for(var ye=Array(ge),Ye=0;Ye<ge;Ye++)ye[Ye]=arguments[Ye+2];ie.children=ye}return X(A.type,ve,ie)},Ee.createContext=function(A){return A={$$typeof:l,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:u,_context:A},A},Ee.createElement=function(A,G,T){var ie,ve={},ge=null;if(G!=null)for(ie in G.key!==void 0&&(ge=""+G.key),G)U.call(G,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ve[ie]=G[ie]);var ye=arguments.length-2;if(ye===1)ve.children=T;else if(1<ye){for(var Ye=Array(ye),$e=0;$e<ye;$e++)Ye[$e]=arguments[$e+2];ve.children=Ye}if(A&&A.defaultProps)for(ie in ye=A.defaultProps,ye)ve[ie]===void 0&&(ve[ie]=ye[ie]);return X(A,ge,ve)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(A){return{$$typeof:d,render:A}},Ee.isValidElement=ae,Ee.lazy=function(A){return{$$typeof:g,_payload:{_status:-1,_result:A},_init:Z}},Ee.memo=function(A,G){return{$$typeof:h,type:A,compare:G===void 0?null:G}},Ee.startTransition=function(A){var G=Y.T,T={};Y.T=T;try{var ie=A(),ve=Y.S;ve!==null&&ve(T,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then($,de)}catch(ge){de(ge)}finally{G!==null&&T.types!==null&&(G.types=T.types),Y.T=G}},Ee.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},Ee.use=function(A){return Y.H.use(A)},Ee.useActionState=function(A,G,T){return Y.H.useActionState(A,G,T)},Ee.useCallback=function(A,G){return Y.H.useCallback(A,G)},Ee.useContext=function(A){return Y.H.useContext(A)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(A,G){return Y.H.useDeferredValue(A,G)},Ee.useEffect=function(A,G){return Y.H.useEffect(A,G)},Ee.useEffectEvent=function(A){return Y.H.useEffectEvent(A)},Ee.useId=function(){return Y.H.useId()},Ee.useImperativeHandle=function(A,G,T){return Y.H.useImperativeHandle(A,G,T)},Ee.useInsertionEffect=function(A,G){return Y.H.useInsertionEffect(A,G)},Ee.useLayoutEffect=function(A,G){return Y.H.useLayoutEffect(A,G)},Ee.useMemo=function(A,G){return Y.H.useMemo(A,G)},Ee.useOptimistic=function(A,G){return Y.H.useOptimistic(A,G)},Ee.useReducer=function(A,G,T){return Y.H.useReducer(A,G,T)},Ee.useRef=function(A){return Y.H.useRef(A)},Ee.useState=function(A){return Y.H.useState(A)},Ee.useSyncExternalStore=function(A,G,T){return Y.H.useSyncExternalStore(A,G,T)},Ee.useTransition=function(){return Y.H.useTransition()},Ee.version="19.2.4",Ee}var r0;function Wc(){return r0||(r0=1,Mh.exports=xE()),Mh.exports}var z=Wc();const Pp=Up(z);var Dh={exports:{}},Gs={},$h={exports:{}},Lh={};var a0;function bE(){return a0||(a0=1,(function(e){function t(E,F){var Z=E.length;E.push(F);e:for(;0<Z;){var de=Z-1>>>1,O=E[de];if(0<o(O,F))E[de]=F,E[Z]=O,Z=de;else break e}}function n(E){return E.length===0?null:E[0]}function a(E){if(E.length===0)return null;var F=E[0],Z=E.pop();if(Z!==F){E[0]=Z;e:for(var de=0,O=E.length,A=O>>>1;de<A;){var G=2*(de+1)-1,T=E[G],ie=G+1,ve=E[ie];if(0>o(T,Z))ie<O&&0>o(ve,T)?(E[de]=ve,E[ie]=Z,de=ie):(E[de]=T,E[G]=Z,de=G);else if(ie<O&&0>o(ve,Z))E[de]=ve,E[ie]=Z,de=ie;else break e}}return F}function o(E,F){var Z=E.sortIndex-F.sortIndex;return Z!==0?Z:E.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,d=l.now();e.unstable_now=function(){return l.now()-d}}var f=[],h=[],g=1,x=null,b=3,v=!1,w=!1,_=!1,C=!1,N=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function L(E){for(var F=n(h);F!==null;){if(F.callback===null)a(h);else if(F.startTime<=E)a(h),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(h)}}function P(E){if(_=!1,L(E),!w)if(n(f)!==null)w=!0,$||($=!0,oe());else{var F=n(h);F!==null&&re(P,F.startTime-E)}}var $=!1,Y=-1,U=5,X=-1;function ue(){return C?!0:!(e.unstable_now()-X<U)}function ae(){if(C=!1,$){var E=e.unstable_now();X=E;var F=!0;try{e:{w=!1,_&&(_=!1,R(Y),Y=-1),v=!0;var Z=b;try{t:{for(L(E),x=n(f);x!==null&&!(x.expirationTime>E&&ue());){var de=x.callback;if(typeof de=="function"){x.callback=null,b=x.priorityLevel;var O=de(x.expirationTime<=E);if(E=e.unstable_now(),typeof O=="function"){x.callback=O,L(E),F=!0;break t}x===n(f)&&a(f),L(E)}else a(f);x=n(f)}if(x!==null)F=!0;else{var A=n(h);A!==null&&re(P,A.startTime-E),F=!1}}break e}finally{x=null,b=Z,v=!1}F=void 0}}finally{F?oe():$=!1}}}var oe;if(typeof j=="function")oe=function(){j(ae)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,se=te.port2;te.port1.onmessage=ae,oe=function(){se.postMessage(null)}}else oe=function(){N(ae,0)};function re(E,F){Y=N(function(){E(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(E){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var Z=b;b=F;try{return E()}finally{b=Z}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(E,F){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var Z=b;b=E;try{return F()}finally{b=Z}},e.unstable_scheduleCallback=function(E,F,Z){var de=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?de+Z:de):Z=de,E){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=Z+O,E={id:g++,callback:F,priorityLevel:E,startTime:Z,expirationTime:O,sortIndex:-1},Z>de?(E.sortIndex=Z,t(h,E),n(f)===null&&E===n(h)&&(_?(R(Y),Y=-1):_=!0,re(P,Z-de))):(E.sortIndex=O,t(f,E),w||v||(w=!0,$||($=!0,oe()))),E},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(E){var F=b;return function(){var Z=b;b=F;try{return E.apply(this,arguments)}finally{b=Z}}}})(Lh)),Lh}var i0;function vE(){return i0||(i0=1,$h.exports=bE()),$h.exports}var Uh={exports:{}},nn={};var o0;function kE(){if(o0)return nn;o0=1;var e=Wc();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(f,h,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:x==null?null:""+x,children:f,containerInfo:h,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,nn.createPortal=function(f,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return u(f,h,null,g)},nn.flushSync=function(f){var h=l.T,g=a.p;try{if(l.T=null,a.p=2,f)return f()}finally{l.T=h,a.p=g,a.d.f()}},nn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},nn.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},nn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,x=d(g,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:b,fetchPriority:v}):g==="script"&&a.d.X(f,{crossOrigin:x,integrity:b,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},nn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},nn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,x=d(g,h.crossOrigin);a.d.L(f,g,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},nn.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},nn.requestFormReset=function(f){a.d.r(f)},nn.unstable_batchedUpdates=function(f,h){return f(h)},nn.useFormState=function(f,h,g){return l.H.useFormState(f,h,g)},nn.useFormStatus=function(){return l.H.useHostTransitionStatus()},nn.version="19.2.4",nn}var s0;function wE(){if(s0)return Uh.exports;s0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Uh.exports=kE(),Uh.exports}var l0;function SE(){if(l0)return Gs;l0=1;var e=vE(),t=Wc(),n=wE();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function u(r){var i=r,s=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(s=i.return),r=i.return;while(r)}return i.tag===3?s:null}function l(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(u(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=u(r),i===null)throw Error(a(188));return i!==r?null:r}for(var s=r,c=i;;){var m=s.return;if(m===null)break;var y=m.alternate;if(y===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===y.child){for(y=m.child;y;){if(y===s)return f(m),r;if(y===c)return f(m),i;y=y.sibling}throw Error(a(188))}if(s.return!==c.return)s=m,c=y;else{for(var k=!1,S=m.child;S;){if(S===s){k=!0,s=m,c=y;break}if(S===c){k=!0,c=m,s=y;break}S=S.sibling}if(!k){for(S=y.child;S;){if(S===s){k=!0,s=y,c=m;break}if(S===c){k=!0,c=y,s=m;break}S=S.sibling}if(!k)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:i}function g(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=g(r),i!==null)return i;r=r.sibling}return null}var x=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),j=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=ae&&r[ae]||r["@@iterator"],typeof r=="function"?r:null)}var te=Symbol.for("react.client.reference");function se(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===te?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case _:return"Fragment";case N:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case $:return"SuspenseList";case X:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case j:return r.displayName||"Context";case R:return(r._context.displayName||"Context")+".Consumer";case L:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Y:return i=r.displayName||null,i!==null?i:se(r.type)||"Memo";case U:i=r._payload,r=r._init;try{return se(r(i))}catch{}}return null}var re=Array.isArray,E=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},de=[],O=-1;function A(r){return{current:r}}function G(r){0>O||(r.current=de[O],de[O]=null,O--)}function T(r,i){O++,de[O]=r.current,r.current=i}var ie=A(null),ve=A(null),ge=A(null),ye=A(null);function Ye(r,i){switch(T(ge,i),T(ve,r),T(ie,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?Sv(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=Sv(i),r=zv(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}G(ie),T(ie,r)}function $e(){G(ie),G(ve),G(ge)}function At(r){r.memoizedState!==null&&T(ye,r);var i=ie.current,s=zv(i,r.type);i!==s&&(T(ve,r),T(ie,s))}function ln(r){ve.current===r&&(G(ie),G(ve)),ye.current===r&&(G(ye),Bs._currentValue=Z)}var Zn,gr;function Bn(r){if(Zn===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Zn=i&&i[1]||"",gr=-1<s.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Zn+r+gr}var Ka=!1;function Be(r,i){if(!r||Ka)return"";Ka=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(q){var H=q}Reflect.construct(r,[],ee)}else{try{ee.call()}catch(q){H=q}r.call(ee.prototype)}}else{try{throw Error()}catch(q){H=q}(ee=r())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(q){if(q&&H&&typeof q.stack=="string")return[q.stack,H.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=c.DetermineComponentFrameRoot(),k=y[0],S=y[1];if(k&&S){var M=k.split(`
4
- `),I=S.split(`
5
- `);for(m=c=0;c<M.length&&!M[c].includes("DetermineComponentFrameRoot");)c++;for(;m<I.length&&!I[m].includes("DetermineComponentFrameRoot");)m++;if(c===M.length||m===I.length)for(c=M.length-1,m=I.length-1;1<=c&&0<=m&&M[c]!==I[m];)m--;for(;1<=c&&0<=m;c--,m--)if(M[c]!==I[m]){if(c!==1||m!==1)do if(c--,m--,0>m||M[c]!==I[m]){var K=`
6
- `+M[c].replace(" at new "," at ");return r.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",r.displayName)),K}while(1<=c&&0<=m);break}}}finally{Ka=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?Bn(s):""}function rt(r,i){switch(r.tag){case 26:case 27:case 5:return Bn(r.type);case 16:return Bn("Lazy");case 13:return r.child!==i&&i!==null?Bn("Suspense Fallback"):Bn("Suspense");case 19:return Bn("SuspenseList");case 0:case 15:return Be(r.type,!1);case 11:return Be(r.type.render,!1);case 1:return Be(r.type,!0);case 31:return Bn("Activity");default:return""}}function ct(r){try{var i="",s=null;do i+=rt(r,s),s=r,r=r.return;while(r);return i}catch(c){return`
7
- Error generating stack: `+c.message+`
8
- `+c.stack}}var Qe=Object.prototype.hasOwnProperty,qt=e.unstable_scheduleCallback,In=e.unstable_cancelCallback,jt=e.unstable_shouldYield,Zt=e.unstable_requestPaint,dt=e.unstable_now,Ai=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,_e=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,un=e.log,Nn=e.unstable_setDisableYieldValue,cn=null,Bt=null;function xn(r){if(typeof un=="function"&&Nn(r),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(cn,r)}catch{}}var at=Math.clz32?Math.clz32:nT,ia=Math.log,sr=Math.LN2;function nT(r){return r>>>=0,r===0?32:31-(ia(r)/sr|0)|0}var Vl=256,Zl=262144,Bl=4194304;function Ja(r){var i=r&42;if(i!==0)return i;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Il(r,i,s){var c=r.pendingLanes;if(c===0)return 0;var m=0,y=r.suspendedLanes,k=r.pingedLanes;r=r.warmLanes;var S=c&134217727;return S!==0?(c=S&~y,c!==0?m=Ja(c):(k&=S,k!==0?m=Ja(k):s||(s=S&~r,s!==0&&(m=Ja(s))))):(S=c&~y,S!==0?m=Ja(S):k!==0?m=Ja(k):s||(s=c&~r,s!==0&&(m=Ja(s)))),m===0?0:i!==0&&i!==m&&(i&y)===0&&(y=m&-m,s=i&-i,y>=s||y===32&&(s&4194048)!==0)?i:m}function ts(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function rT(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 ay(){var r=Bl;return Bl<<=1,(Bl&62914560)===0&&(Bl=4194304),r}function vd(r){for(var i=[],s=0;31>s;s++)i.push(r);return i}function ns(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function aT(r,i,s,c,m,y){var k=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var S=r.entanglements,M=r.expirationTimes,I=r.hiddenUpdates;for(s=k&~s;0<s;){var K=31-at(s),ee=1<<K;S[K]=0,M[K]=-1;var H=I[K];if(H!==null)for(I[K]=null,K=0;K<H.length;K++){var q=H[K];q!==null&&(q.lane&=-536870913)}s&=~ee}c!==0&&iy(r,c,0),y!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=y&~(k&~i))}function iy(r,i,s){r.pendingLanes|=i,r.suspendedLanes&=~i;var c=31-at(i);r.entangledLanes|=i,r.entanglements[c]=r.entanglements[c]|1073741824|s&261930}function oy(r,i){var s=r.entangledLanes|=i;for(r=r.entanglements;s;){var c=31-at(s),m=1<<c;m&i|r[c]&i&&(r[c]|=i),s&=~m}}function sy(r,i){var s=i&-i;return s=(s&42)!==0?1:kd(s),(s&(r.suspendedLanes|i))!==0?0:s}function kd(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function wd(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function ly(){var r=F.p;return r!==0?r:(r=window.event,r===void 0?32:Gv(r.type))}function uy(r,i){var s=F.p;try{return F.p=r,i()}finally{F.p=s}}var oa=Math.random().toString(36).slice(2),Xt="__reactFiber$"+oa,bn="__reactProps$"+oa,Oi="__reactContainer$"+oa,Sd="__reactEvents$"+oa,iT="__reactListeners$"+oa,oT="__reactHandles$"+oa,cy="__reactResources$"+oa,rs="__reactMarker$"+oa;function zd(r){delete r[Xt],delete r[bn],delete r[Sd],delete r[iT],delete r[oT]}function Ri(r){var i=r[Xt];if(i)return i;for(var s=r.parentNode;s;){if(i=s[Oi]||s[Xt]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(r=Av(r);r!==null;){if(s=r[Xt])return s;r=Av(r)}return i}r=s,s=r.parentNode}return null}function Mi(r){if(r=r[Xt]||r[Oi]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function as(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Di(r){var i=r[cy];return i||(i=r[cy]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Gt(r){r[rs]=!0}var dy=new Set,fy={};function Qa(r,i){$i(r,i),$i(r+"Capture",i)}function $i(r,i){for(fy[r]=i,r=0;r<i.length;r++)dy.add(i[r])}var sT=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]*$"),hy={},my={};function lT(r){return Qe.call(my,r)?!0:Qe.call(hy,r)?!1:sT.test(r)?my[r]=!0:(hy[r]=!0,!1)}function Hl(r,i,s){if(lT(i))if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+s)}}function Fl(r,i,s){if(s===null)r.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+s)}}function Rr(r,i,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(i,s,""+c)}}function Hn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function py(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function uT(r,i,s){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,y=c.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(k){s=""+k,y.call(this,k)}}),Object.defineProperty(r,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(k){s=""+k},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function _d(r){if(!r._valueTracker){var i=py(r)?"checked":"value";r._valueTracker=uT(r,i,""+r[i])}}function gy(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return r&&(c=py(r)?r.checked?"true":"false":r.value),r=c,r!==s?(i.setValue(r),!0):!1}function ql(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var cT=/[\n"\\]/g;function Fn(r){return r.replace(cT,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Td(r,i,s,c,m,y,k,S){r.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?r.type=k:r.removeAttribute("type"),i!=null?k==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Hn(i)):r.value!==""+Hn(i)&&(r.value=""+Hn(i)):k!=="submit"&&k!=="reset"||r.removeAttribute("value"),i!=null?jd(r,k,Hn(i)):s!=null?jd(r,k,Hn(s)):c!=null&&r.removeAttribute("value"),m==null&&y!=null&&(r.defaultChecked=!!y),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?r.name=""+Hn(S):r.removeAttribute("name")}function yy(r,i,s,c,m,y,k,S){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(r.type=y),i!=null||s!=null){if(!(y!=="submit"&&y!=="reset"||i!=null)){_d(r);return}s=s!=null?""+Hn(s):"",i=i!=null?""+Hn(i):s,S||i===r.value||(r.value=i),r.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=S?r.checked:!!c,r.defaultChecked=!!c,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(r.name=k),_d(r)}function jd(r,i,s){i==="number"&&ql(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Li(r,i,s,c){if(r=r.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=i.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&c&&(r[s].defaultSelected=!0)}else{for(s=""+Hn(s),i=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function xy(r,i,s){if(i!=null&&(i=""+Hn(i),i!==r.value&&(r.value=i),s==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=s!=null?""+Hn(s):""}function by(r,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(re(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=Hn(i),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),_d(r)}function Ui(r,i){if(i){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=i;return}}r.textContent=i}var dT=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 vy(r,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":c?r.setProperty(i,s):typeof s!="number"||s===0||dT.has(i)?i==="float"?r.cssFloat=s:r[i]=(""+s).trim():r[i]=s+"px"}function ky(r,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&vy(r,m,c)}else for(var y in i)i.hasOwnProperty(y)&&vy(r,y,i[y])}function Ed(r){if(r.indexOf("-")===-1)return!1;switch(r){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 fT=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"]]),hT=/^[\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 Gl(r){return hT.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Mr(){}var Cd=null;function Nd(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Pi=null,Vi=null;function wy(r){var i=Mi(r);if(i&&(r=i.stateNode)){var s=r[bn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Td(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Fn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==r&&c.form===r.form){var m=c[bn]||null;if(!m)throw Error(a(90));Td(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===r.form&&gy(c)}break e;case"textarea":xy(r,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&Li(r,!!s.multiple,i,!1)}}}var Ad=!1;function Sy(r,i,s){if(Ad)return r(i,s);Ad=!0;try{var c=r(i);return c}finally{if(Ad=!1,(Pi!==null||Vi!==null)&&(Mu(),Pi&&(i=Pi,r=Vi,Vi=Pi=null,wy(i),r)))for(i=0;i<r.length;i++)wy(r[i])}}function is(r,i){var s=r.stateNode;if(s===null)return null;var c=s[bn]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Od=!1;if(Dr)try{var os={};Object.defineProperty(os,"passive",{get:function(){Od=!0}}),window.addEventListener("test",os,os),window.removeEventListener("test",os,os)}catch{Od=!1}var sa=null,Rd=null,Yl=null;function zy(){if(Yl)return Yl;var r,i=Rd,s=i.length,c,m="value"in sa?sa.value:sa.textContent,y=m.length;for(r=0;r<s&&i[r]===m[r];r++);var k=s-r;for(c=1;c<=k&&i[s-c]===m[y-c];c++);return Yl=m.slice(r,1<c?1-c:void 0)}function Xl(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Kl(){return!0}function _y(){return!1}function vn(r){function i(s,c,m,y,k){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var S in r)r.hasOwnProperty(S)&&(s=r[S],this[S]=s?s(y):y[S]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Kl:_y,this.isPropagationStopped=_y,this}return x(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Kl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Kl)},persist:function(){},isPersistent:Kl}),i}var Wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jl=vn(Wa),ss=x({},Wa,{view:0,detail:0}),mT=vn(ss),Md,Dd,ls,Ql=x({},ss,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ld,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ls&&(ls&&r.type==="mousemove"?(Md=r.screenX-ls.screenX,Dd=r.screenY-ls.screenY):Dd=Md=0,ls=r),Md)},movementY:function(r){return"movementY"in r?r.movementY:Dd}}),Ty=vn(Ql),pT=x({},Ql,{dataTransfer:0}),gT=vn(pT),yT=x({},ss,{relatedTarget:0}),$d=vn(yT),xT=x({},Wa,{animationName:0,elapsedTime:0,pseudoElement:0}),bT=vn(xT),vT=x({},Wa,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),kT=vn(vT),wT=x({},Wa,{data:0}),jy=vn(wT),ST={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zT={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"},_T={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TT(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=_T[r])?!!i[r]:!1}function Ld(){return TT}var jT=x({},ss,{key:function(r){if(r.key){var i=ST[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Xl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?zT[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ld,charCode:function(r){return r.type==="keypress"?Xl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Xl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),ET=vn(jT),CT=x({},Ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ey=vn(CT),NT=x({},ss,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ld}),AT=vn(NT),OT=x({},Wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),RT=vn(OT),MT=x({},Ql,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),DT=vn(MT),$T=x({},Wa,{newState:0,oldState:0}),LT=vn($T),UT=[9,13,27,32],Ud=Dr&&"CompositionEvent"in window,us=null;Dr&&"documentMode"in document&&(us=document.documentMode);var PT=Dr&&"TextEvent"in window&&!us,Cy=Dr&&(!Ud||us&&8<us&&11>=us),Ny=" ",Ay=!1;function Oy(r,i){switch(r){case"keyup":return UT.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ry(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Zi=!1;function VT(r,i){switch(r){case"compositionend":return Ry(i);case"keypress":return i.which!==32?null:(Ay=!0,Ny);case"textInput":return r=i.data,r===Ny&&Ay?null:r;default:return null}}function ZT(r,i){if(Zi)return r==="compositionend"||!Ud&&Oy(r,i)?(r=zy(),Yl=Rd=sa=null,Zi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Cy&&i.locale!=="ko"?null:i.data;default:return null}}var BT={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 My(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!BT[r.type]:i==="textarea"}function Dy(r,i,s,c){Pi?Vi?Vi.push(c):Vi=[c]:Pi=c,i=Zu(i,"onChange"),0<i.length&&(s=new Jl("onChange","change",null,s,c),r.push({event:s,listeners:i}))}var cs=null,ds=null;function IT(r){yv(r,0)}function Wl(r){var i=as(r);if(gy(i))return r}function $y(r,i){if(r==="change")return i}var Ly=!1;if(Dr){var Pd;if(Dr){var Vd="oninput"in document;if(!Vd){var Uy=document.createElement("div");Uy.setAttribute("oninput","return;"),Vd=typeof Uy.oninput=="function"}Pd=Vd}else Pd=!1;Ly=Pd&&(!document.documentMode||9<document.documentMode)}function Py(){cs&&(cs.detachEvent("onpropertychange",Vy),ds=cs=null)}function Vy(r){if(r.propertyName==="value"&&Wl(ds)){var i=[];Dy(i,ds,r,Nd(r)),Sy(IT,i)}}function HT(r,i,s){r==="focusin"?(Py(),cs=i,ds=s,cs.attachEvent("onpropertychange",Vy)):r==="focusout"&&Py()}function FT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Wl(ds)}function qT(r,i){if(r==="click")return Wl(i)}function GT(r,i){if(r==="input"||r==="change")return Wl(i)}function YT(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var An=typeof Object.is=="function"?Object.is:YT;function fs(r,i){if(An(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var s=Object.keys(r),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Qe.call(i,m)||!An(r[m],i[m]))return!1}return!0}function Zy(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function By(r,i){var s=Zy(r);r=0;for(var c;s;){if(s.nodeType===3){if(c=r+s.textContent.length,r<=i&&c>=i)return{node:s,offset:i-r};r=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Zy(s)}}function Iy(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Iy(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Hy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=ql(r.document);i instanceof r.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)r=i.contentWindow;else break;i=ql(r.document)}return i}function Zd(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var XT=Dr&&"documentMode"in document&&11>=document.documentMode,Bi=null,Bd=null,hs=null,Id=!1;function Fy(r,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Id||Bi==null||Bi!==ql(c)||(c=Bi,"selectionStart"in c&&Zd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),hs&&fs(hs,c)||(hs=c,c=Zu(Bd,"onSelect"),0<c.length&&(i=new Jl("onSelect","select",null,i,s),r.push({event:i,listeners:c}),i.target=Bi)))}function ei(r,i){var s={};return s[r.toLowerCase()]=i.toLowerCase(),s["Webkit"+r]="webkit"+i,s["Moz"+r]="moz"+i,s}var Ii={animationend:ei("Animation","AnimationEnd"),animationiteration:ei("Animation","AnimationIteration"),animationstart:ei("Animation","AnimationStart"),transitionrun:ei("Transition","TransitionRun"),transitionstart:ei("Transition","TransitionStart"),transitioncancel:ei("Transition","TransitionCancel"),transitionend:ei("Transition","TransitionEnd")},Hd={},qy={};Dr&&(qy=document.createElement("div").style,"AnimationEvent"in window||(delete Ii.animationend.animation,delete Ii.animationiteration.animation,delete Ii.animationstart.animation),"TransitionEvent"in window||delete Ii.transitionend.transition);function ti(r){if(Hd[r])return Hd[r];if(!Ii[r])return r;var i=Ii[r],s;for(s in i)if(i.hasOwnProperty(s)&&s in qy)return Hd[r]=i[s];return r}var Gy=ti("animationend"),Yy=ti("animationiteration"),Xy=ti("animationstart"),KT=ti("transitionrun"),JT=ti("transitionstart"),QT=ti("transitioncancel"),Ky=ti("transitionend"),Jy=new Map,Fd="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(" ");Fd.push("scrollEnd");function lr(r,i){Jy.set(r,i),Qa(i,[r])}var eu=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},qn=[],Hi=0,qd=0;function tu(){for(var r=Hi,i=qd=Hi=0;i<r;){var s=qn[i];qn[i++]=null;var c=qn[i];qn[i++]=null;var m=qn[i];qn[i++]=null;var y=qn[i];if(qn[i++]=null,c!==null&&m!==null){var k=c.pending;k===null?m.next=m:(m.next=k.next,k.next=m),c.pending=m}y!==0&&Qy(s,m,y)}}function nu(r,i,s,c){qn[Hi++]=r,qn[Hi++]=i,qn[Hi++]=s,qn[Hi++]=c,qd|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Gd(r,i,s,c){return nu(r,i,s,c),ru(r)}function ni(r,i){return nu(r,null,null,i),ru(r)}function Qy(r,i,s){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s);for(var m=!1,y=r.return;y!==null;)y.childLanes|=s,c=y.alternate,c!==null&&(c.childLanes|=s),y.tag===22&&(r=y.stateNode,r===null||r._visibility&1||(m=!0)),r=y,y=y.return;return r.tag===3?(y=r.stateNode,m&&i!==null&&(m=31-at(s),r=y.hiddenUpdates,c=r[m],c===null?r[m]=[i]:c.push(i),i.lane=s|536870912),y):null}function ru(r){if(50<Ds)throw Ds=0,rh=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Fi={};function WT(r,i,s,c){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(r,i,s,c){return new WT(r,i,s,c)}function Yd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function $r(r,i){var s=r.alternate;return s===null?(s=On(r.tag,i,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=i,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,i=r.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function Wy(r,i){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,i=s.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function au(r,i,s,c,m,y){var k=0;if(c=r,typeof r=="function")Yd(r)&&(k=1);else if(typeof r=="string")k=aE(r,s,ie.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case X:return r=On(31,s,i,m),r.elementType=X,r.lanes=y,r;case _:return ri(s.children,m,y,i);case C:k=8,m|=24;break;case N:return r=On(12,s,i,m|2),r.elementType=N,r.lanes=y,r;case P:return r=On(13,s,i,m),r.elementType=P,r.lanes=y,r;case $:return r=On(19,s,i,m),r.elementType=$,r.lanes=y,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case j:k=10;break e;case R:k=9;break e;case L:k=11;break e;case Y:k=14;break e;case U:k=16,c=null;break e}k=29,s=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=On(k,s,i,m),i.elementType=r,i.type=c,i.lanes=y,i}function ri(r,i,s,c){return r=On(7,r,c,i),r.lanes=s,r}function Xd(r,i,s){return r=On(6,r,null,i),r.lanes=s,r}function ex(r){var i=On(18,null,null,0);return i.stateNode=r,i}function Kd(r,i,s){return i=On(4,r.children!==null?r.children:[],r.key,i),i.lanes=s,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var tx=new WeakMap;function Gn(r,i){if(typeof r=="object"&&r!==null){var s=tx.get(r);return s!==void 0?s:(i={value:r,source:i,stack:ct(i)},tx.set(r,i),i)}return{value:r,source:i,stack:ct(i)}}var qi=[],Gi=0,iu=null,ms=0,Yn=[],Xn=0,la=null,yr=1,xr="";function Lr(r,i){qi[Gi++]=ms,qi[Gi++]=iu,iu=r,ms=i}function nx(r,i,s){Yn[Xn++]=yr,Yn[Xn++]=xr,Yn[Xn++]=la,la=r;var c=yr;r=xr;var m=32-at(c)-1;c&=~(1<<m),s+=1;var y=32-at(i)+m;if(30<y){var k=m-m%5;y=(c&(1<<k)-1).toString(32),c>>=k,m-=k,yr=1<<32-at(i)+m|s<<m|c,xr=y+r}else yr=1<<y|s<<m|c,xr=r}function Jd(r){r.return!==null&&(Lr(r,1),nx(r,1,0))}function Qd(r){for(;r===iu;)iu=qi[--Gi],qi[Gi]=null,ms=qi[--Gi],qi[Gi]=null;for(;r===la;)la=Yn[--Xn],Yn[Xn]=null,xr=Yn[--Xn],Yn[Xn]=null,yr=Yn[--Xn],Yn[Xn]=null}function rx(r,i){Yn[Xn++]=yr,Yn[Xn++]=xr,Yn[Xn++]=la,yr=i.id,xr=i.overflow,la=r}var Kt=null,ft=null,Pe=!1,ua=null,Kn=!1,Wd=Error(a(519));function ca(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ps(Gn(i,r)),Wd}function ax(r){var i=r.stateNode,s=r.type,c=r.memoizedProps;switch(i[Xt]=r,i[bn]=c,s){case"dialog":De("cancel",i),De("close",i);break;case"iframe":case"object":case"embed":De("load",i);break;case"video":case"audio":for(s=0;s<Ls.length;s++)De(Ls[s],i);break;case"source":De("error",i);break;case"img":case"image":case"link":De("error",i),De("load",i);break;case"details":De("toggle",i);break;case"input":De("invalid",i),yy(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":De("invalid",i);break;case"textarea":De("invalid",i),by(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||kv(i.textContent,s)?(c.popover!=null&&(De("beforetoggle",i),De("toggle",i)),c.onScroll!=null&&De("scroll",i),c.onScrollEnd!=null&&De("scrollend",i),c.onClick!=null&&(i.onclick=Mr),i=!0):i=!1,i||ca(r,!0)}function ix(r){for(Kt=r.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Kt=Kt.return}}function Yi(r){if(r!==Kt)return!1;if(!Pe)return ix(r),Pe=!0,!1;var i=r.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||xh(r.type,r.memoizedProps)),s=!s),s&&ft&&ca(r),ix(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));ft=Nv(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));ft=Nv(r)}else i===27?(i=ft,za(r.type)?(r=Sh,Sh=null,ft=r):ft=i):ft=Kt?Qn(r.stateNode.nextSibling):null;return!0}function ai(){ft=Kt=null,Pe=!1}function ef(){var r=ua;return r!==null&&(zn===null?zn=r:zn.push.apply(zn,r),ua=null),r}function ps(r){ua===null?ua=[r]:ua.push(r)}var tf=A(null),ii=null,Ur=null;function da(r,i,s){T(tf,i._currentValue),i._currentValue=s}function Pr(r){r._currentValue=tf.current,G(tf)}function nf(r,i,s){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===s)break;r=r.return}}function rf(r,i,s,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var y=m.dependencies;if(y!==null){var k=m.child;y=y.firstContext;e:for(;y!==null;){var S=y;y=m;for(var M=0;M<i.length;M++)if(S.context===i[M]){y.lanes|=s,S=y.alternate,S!==null&&(S.lanes|=s),nf(y.return,s,r),c||(k=null);break e}y=S.next}}else if(m.tag===18){if(k=m.return,k===null)throw Error(a(341));k.lanes|=s,y=k.alternate,y!==null&&(y.lanes|=s),nf(k,s,r),k=null}else k=m.child;if(k!==null)k.return=m;else for(k=m;k!==null;){if(k===r){k=null;break}if(m=k.sibling,m!==null){m.return=k.return,k=m;break}k=k.return}m=k}}function Xi(r,i,s,c){r=null;for(var m=i,y=!1;m!==null;){if(!y){if((m.flags&524288)!==0)y=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var k=m.alternate;if(k===null)throw Error(a(387));if(k=k.memoizedProps,k!==null){var S=m.type;An(m.pendingProps.value,k.value)||(r!==null?r.push(S):r=[S])}}else if(m===ye.current){if(k=m.alternate,k===null)throw Error(a(387));k.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Bs):r=[Bs])}m=m.return}r!==null&&rf(i,r,s,c),i.flags|=262144}function ou(r){for(r=r.firstContext;r!==null;){if(!An(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function oi(r){ii=r,Ur=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Jt(r){return ox(ii,r)}function su(r,i){return ii===null&&oi(r),ox(r,i)}function ox(r,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Ur===null){if(r===null)throw Error(a(308));Ur=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Ur=Ur.next=i;return s}var ej=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(s,c){r.push(c)}};this.abort=function(){i.aborted=!0,r.forEach(function(s){return s()})}},tj=e.unstable_scheduleCallback,nj=e.unstable_NormalPriority,Ot={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function af(){return{controller:new ej,data:new Map,refCount:0}}function gs(r){r.refCount--,r.refCount===0&&tj(nj,function(){r.controller.abort()})}var ys=null,of=0,Ki=0,Ji=null;function rj(r,i){if(ys===null){var s=ys=[];of=0,Ki=uh(),Ji={status:"pending",value:void 0,then:function(c){s.push(c)}}}return of++,i.then(sx,sx),i}function sx(){if(--of===0&&ys!==null){Ji!==null&&(Ji.status="fulfilled");var r=ys;ys=null,Ki=0,Ji=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function aj(r,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var lx=E.S;E.S=function(r,i){Fb=dt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&rj(r,i),lx!==null&&lx(r,i)};var si=A(null);function sf(){var r=si.current;return r!==null?r:it.pooledCache}function lu(r,i){i===null?T(si,si.current):T(si,i.pool)}function ux(){var r=sf();return r===null?null:{parent:Ot._currentValue,pool:r}}var Qi=Error(a(460)),lf=Error(a(474)),uu=Error(a(542)),cu={then:function(){}};function cx(r){return r=r.status,r==="fulfilled"||r==="rejected"}function dx(r,i,s){switch(s=r[s],s===void 0?r.push(i):s!==i&&(i.then(Mr,Mr),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,hx(r),r;default:if(typeof i.status=="string")i.then(Mr,Mr);else{if(r=it,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,hx(r),r}throw ui=i,Qi}}function li(r){try{var i=r._init;return i(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ui=s,Qi):s}}var ui=null;function fx(){if(ui===null)throw Error(a(459));var r=ui;return ui=null,r}function hx(r){if(r===Qi||r===uu)throw Error(a(483))}var Wi=null,xs=0;function du(r){var i=xs;return xs+=1,Wi===null&&(Wi=[]),dx(Wi,r,i)}function bs(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function fu(r,i){throw i.$$typeof===b?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function mx(r){function i(V,D){if(r){var B=V.deletions;B===null?(V.deletions=[D],V.flags|=16):B.push(D)}}function s(V,D){if(!r)return null;for(;D!==null;)i(V,D),D=D.sibling;return null}function c(V){for(var D=new Map;V!==null;)V.key!==null?D.set(V.key,V):D.set(V.index,V),V=V.sibling;return D}function m(V,D){return V=$r(V,D),V.index=0,V.sibling=null,V}function y(V,D,B){return V.index=B,r?(B=V.alternate,B!==null?(B=B.index,B<D?(V.flags|=67108866,D):B):(V.flags|=67108866,D)):(V.flags|=1048576,D)}function k(V){return r&&V.alternate===null&&(V.flags|=67108866),V}function S(V,D,B,W){return D===null||D.tag!==6?(D=Xd(B,V.mode,W),D.return=V,D):(D=m(D,B),D.return=V,D)}function M(V,D,B,W){var we=B.type;return we===_?K(V,D,B.props.children,W,B.key):D!==null&&(D.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===U&&li(we)===D.type)?(D=m(D,B.props),bs(D,B),D.return=V,D):(D=au(B.type,B.key,B.props,null,V.mode,W),bs(D,B),D.return=V,D)}function I(V,D,B,W){return D===null||D.tag!==4||D.stateNode.containerInfo!==B.containerInfo||D.stateNode.implementation!==B.implementation?(D=Kd(B,V.mode,W),D.return=V,D):(D=m(D,B.children||[]),D.return=V,D)}function K(V,D,B,W,we){return D===null||D.tag!==7?(D=ri(B,V.mode,W,we),D.return=V,D):(D=m(D,B),D.return=V,D)}function ee(V,D,B){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Xd(""+D,V.mode,B),D.return=V,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case v:return B=au(D.type,D.key,D.props,null,V.mode,B),bs(B,D),B.return=V,B;case w:return D=Kd(D,V.mode,B),D.return=V,D;case U:return D=li(D),ee(V,D,B)}if(re(D)||oe(D))return D=ri(D,V.mode,B,null),D.return=V,D;if(typeof D.then=="function")return ee(V,du(D),B);if(D.$$typeof===j)return ee(V,su(V,D),B);fu(V,D)}return null}function H(V,D,B,W){var we=D!==null?D.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return we!==null?null:S(V,D,""+B,W);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case v:return B.key===we?M(V,D,B,W):null;case w:return B.key===we?I(V,D,B,W):null;case U:return B=li(B),H(V,D,B,W)}if(re(B)||oe(B))return we!==null?null:K(V,D,B,W,null);if(typeof B.then=="function")return H(V,D,du(B),W);if(B.$$typeof===j)return H(V,D,su(V,B),W);fu(V,B)}return null}function q(V,D,B,W,we){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return V=V.get(B)||null,S(D,V,""+W,we);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case v:return V=V.get(W.key===null?B:W.key)||null,M(D,V,W,we);case w:return V=V.get(W.key===null?B:W.key)||null,I(D,V,W,we);case U:return W=li(W),q(V,D,B,W,we)}if(re(W)||oe(W))return V=V.get(B)||null,K(D,V,W,we,null);if(typeof W.then=="function")return q(V,D,B,du(W),we);if(W.$$typeof===j)return q(V,D,B,su(D,W),we);fu(D,W)}return null}function fe(V,D,B,W){for(var we=null,Ie=null,be=D,Ae=D=0,Ue=null;be!==null&&Ae<B.length;Ae++){be.index>Ae?(Ue=be,be=null):Ue=be.sibling;var He=H(V,be,B[Ae],W);if(He===null){be===null&&(be=Ue);break}r&&be&&He.alternate===null&&i(V,be),D=y(He,D,Ae),Ie===null?we=He:Ie.sibling=He,Ie=He,be=Ue}if(Ae===B.length)return s(V,be),Pe&&Lr(V,Ae),we;if(be===null){for(;Ae<B.length;Ae++)be=ee(V,B[Ae],W),be!==null&&(D=y(be,D,Ae),Ie===null?we=be:Ie.sibling=be,Ie=be);return Pe&&Lr(V,Ae),we}for(be=c(be);Ae<B.length;Ae++)Ue=q(be,V,Ae,B[Ae],W),Ue!==null&&(r&&Ue.alternate!==null&&be.delete(Ue.key===null?Ae:Ue.key),D=y(Ue,D,Ae),Ie===null?we=Ue:Ie.sibling=Ue,Ie=Ue);return r&&be.forEach(function(Ca){return i(V,Ca)}),Pe&&Lr(V,Ae),we}function Se(V,D,B,W){if(B==null)throw Error(a(151));for(var we=null,Ie=null,be=D,Ae=D=0,Ue=null,He=B.next();be!==null&&!He.done;Ae++,He=B.next()){be.index>Ae?(Ue=be,be=null):Ue=be.sibling;var Ca=H(V,be,He.value,W);if(Ca===null){be===null&&(be=Ue);break}r&&be&&Ca.alternate===null&&i(V,be),D=y(Ca,D,Ae),Ie===null?we=Ca:Ie.sibling=Ca,Ie=Ca,be=Ue}if(He.done)return s(V,be),Pe&&Lr(V,Ae),we;if(be===null){for(;!He.done;Ae++,He=B.next())He=ee(V,He.value,W),He!==null&&(D=y(He,D,Ae),Ie===null?we=He:Ie.sibling=He,Ie=He);return Pe&&Lr(V,Ae),we}for(be=c(be);!He.done;Ae++,He=B.next())He=q(be,V,Ae,He.value,W),He!==null&&(r&&He.alternate!==null&&be.delete(He.key===null?Ae:He.key),D=y(He,D,Ae),Ie===null?we=He:Ie.sibling=He,Ie=He);return r&&be.forEach(function(pE){return i(V,pE)}),Pe&&Lr(V,Ae),we}function tt(V,D,B,W){if(typeof B=="object"&&B!==null&&B.type===_&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case v:e:{for(var we=B.key;D!==null;){if(D.key===we){if(we=B.type,we===_){if(D.tag===7){s(V,D.sibling),W=m(D,B.props.children),W.return=V,V=W;break e}}else if(D.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===U&&li(we)===D.type){s(V,D.sibling),W=m(D,B.props),bs(W,B),W.return=V,V=W;break e}s(V,D);break}else i(V,D);D=D.sibling}B.type===_?(W=ri(B.props.children,V.mode,W,B.key),W.return=V,V=W):(W=au(B.type,B.key,B.props,null,V.mode,W),bs(W,B),W.return=V,V=W)}return k(V);case w:e:{for(we=B.key;D!==null;){if(D.key===we)if(D.tag===4&&D.stateNode.containerInfo===B.containerInfo&&D.stateNode.implementation===B.implementation){s(V,D.sibling),W=m(D,B.children||[]),W.return=V,V=W;break e}else{s(V,D);break}else i(V,D);D=D.sibling}W=Kd(B,V.mode,W),W.return=V,V=W}return k(V);case U:return B=li(B),tt(V,D,B,W)}if(re(B))return fe(V,D,B,W);if(oe(B)){if(we=oe(B),typeof we!="function")throw Error(a(150));return B=we.call(B),Se(V,D,B,W)}if(typeof B.then=="function")return tt(V,D,du(B),W);if(B.$$typeof===j)return tt(V,D,su(V,B),W);fu(V,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,D!==null&&D.tag===6?(s(V,D.sibling),W=m(D,B),W.return=V,V=W):(s(V,D),W=Xd(B,V.mode,W),W.return=V,V=W),k(V)):s(V,D)}return function(V,D,B,W){try{xs=0;var we=tt(V,D,B,W);return Wi=null,we}catch(be){if(be===Qi||be===uu)throw be;var Ie=On(29,be,null,V.mode);return Ie.lanes=W,Ie.return=V,Ie}}}var ci=mx(!0),px=mx(!1),fa=!1;function uf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ha(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ma(r,i,s){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(Fe&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=ru(r),Qy(r,null,s),i}return nu(r,c,i,s),ru(r)}function vs(r,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,oy(r,s)}}function df(r,i){var s=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,y=null;if(s=s.firstBaseUpdate,s!==null){do{var k={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};y===null?m=y=k:y=y.next=k,s=s.next}while(s!==null);y===null?m=y=i:y=y.next=i}else m=y=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=i:r.next=i,s.lastBaseUpdate=i}var ff=!1;function ks(){if(ff){var r=Ji;if(r!==null)throw r}}function ws(r,i,s,c){ff=!1;var m=r.updateQueue;fa=!1;var y=m.firstBaseUpdate,k=m.lastBaseUpdate,S=m.shared.pending;if(S!==null){m.shared.pending=null;var M=S,I=M.next;M.next=null,k===null?y=I:k.next=I,k=M;var K=r.alternate;K!==null&&(K=K.updateQueue,S=K.lastBaseUpdate,S!==k&&(S===null?K.firstBaseUpdate=I:S.next=I,K.lastBaseUpdate=M))}if(y!==null){var ee=m.baseState;k=0,K=I=M=null,S=y;do{var H=S.lane&-536870913,q=H!==S.lane;if(q?(Le&H)===H:(c&H)===H){H!==0&&H===Ki&&(ff=!0),K!==null&&(K=K.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var fe=r,Se=S;H=i;var tt=s;switch(Se.tag){case 1:if(fe=Se.payload,typeof fe=="function"){ee=fe.call(tt,ee,H);break e}ee=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=Se.payload,H=typeof fe=="function"?fe.call(tt,ee,H):fe,H==null)break e;ee=x({},ee,H);break e;case 2:fa=!0}}H=S.callback,H!==null&&(r.flags|=64,q&&(r.flags|=8192),q=m.callbacks,q===null?m.callbacks=[H]:q.push(H))}else q={lane:H,tag:S.tag,payload:S.payload,callback:S.callback,next:null},K===null?(I=K=q,M=ee):K=K.next=q,k|=H;if(S=S.next,S===null){if(S=m.shared.pending,S===null)break;q=S,S=q.next,q.next=null,m.lastBaseUpdate=q,m.shared.pending=null}}while(!0);K===null&&(M=ee),m.baseState=M,m.firstBaseUpdate=I,m.lastBaseUpdate=K,y===null&&(m.shared.lanes=0),ba|=k,r.lanes=k,r.memoizedState=ee}}function gx(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function yx(r,i){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)gx(s[r],i)}var eo=A(null),hu=A(0);function xx(r,i){r=Yr,T(hu,r),T(eo,i),Yr=r|i.baseLanes}function hf(){T(hu,Yr),T(eo,eo.current)}function mf(){Yr=hu.current,G(eo),G(hu)}var Rn=A(null),Jn=null;function pa(r){var i=r.alternate;T(Et,Et.current&1),T(Rn,r),Jn===null&&(i===null||eo.current!==null||i.memoizedState!==null)&&(Jn=r)}function pf(r){T(Et,Et.current),T(Rn,r),Jn===null&&(Jn=r)}function bx(r){r.tag===22?(T(Et,Et.current),T(Rn,r),Jn===null&&(Jn=r)):ga()}function ga(){T(Et,Et.current),T(Rn,Rn.current)}function Mn(r){G(Rn),Jn===r&&(Jn=null),G(Et)}var Et=A(0);function mu(r){for(var i=r;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||kh(s)||wh(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Vr=0,Ce=null,We=null,Rt=null,pu=!1,to=!1,di=!1,gu=0,Ss=0,no=null,ij=0;function zt(){throw Error(a(321))}function gf(r,i){if(i===null)return!1;for(var s=0;s<i.length&&s<r.length;s++)if(!An(r[s],i[s]))return!1;return!0}function yf(r,i,s,c,m,y){return Vr=y,Ce=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,E.H=r===null||r.memoizedState===null?nb:Of,di=!1,y=s(c,m),di=!1,to&&(y=kx(i,s,c,m)),vx(r),y}function vx(r){E.H=Ts;var i=We!==null&&We.next!==null;if(Vr=0,Rt=We=Ce=null,pu=!1,Ss=0,no=null,i)throw Error(a(300));r===null||Mt||(r=r.dependencies,r!==null&&ou(r)&&(Mt=!0))}function kx(r,i,s,c){Ce=r;var m=0;do{if(to&&(no=null),Ss=0,to=!1,25<=m)throw Error(a(301));if(m+=1,Rt=We=null,r.updateQueue!=null){var y=r.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}E.H=rb,y=i(s,c)}while(to);return y}function oj(){var r=E.H,i=r.useState()[0];return i=typeof i.then=="function"?zs(i):i,r=r.useState()[0],(We!==null?We.memoizedState:null)!==r&&(Ce.flags|=1024),i}function xf(){var r=gu!==0;return gu=0,r}function bf(r,i,s){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~s}function vf(r){if(pu){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}pu=!1}Vr=0,Rt=We=Ce=null,to=!1,Ss=gu=0,no=null}function dn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?Ce.memoizedState=Rt=r:Rt=Rt.next=r,Rt}function Ct(){if(We===null){var r=Ce.alternate;r=r!==null?r.memoizedState:null}else r=We.next;var i=Rt===null?Ce.memoizedState:Rt.next;if(i!==null)Rt=i,We=r;else{if(r===null)throw Ce.alternate===null?Error(a(467)):Error(a(310));We=r,r={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Rt===null?Ce.memoizedState=Rt=r:Rt=Rt.next=r}return Rt}function yu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zs(r){var i=Ss;return Ss+=1,no===null&&(no=[]),r=dx(no,r,i),i=Ce,(Rt===null?i.memoizedState:Rt.next)===null&&(i=i.alternate,E.H=i===null||i.memoizedState===null?nb:Of),r}function xu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return zs(r);if(r.$$typeof===j)return Jt(r)}throw Error(a(438,String(r)))}function kf(r){var i=null,s=Ce.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=Ce.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=yu(),Ce.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(r),c=0;c<r;c++)s[c]=ue;return i.index++,s}function Zr(r,i){return typeof i=="function"?i(r):i}function bu(r){var i=Ct();return wf(i,We,r)}function wf(r,i,s){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var m=r.baseQueue,y=c.pending;if(y!==null){if(m!==null){var k=m.next;m.next=y.next,y.next=k}i.baseQueue=m=y,c.pending=null}if(y=r.baseState,m===null)r.memoizedState=y;else{i=m.next;var S=k=null,M=null,I=i,K=!1;do{var ee=I.lane&-536870913;if(ee!==I.lane?(Le&ee)===ee:(Vr&ee)===ee){var H=I.revertLane;if(H===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),ee===Ki&&(K=!0);else if((Vr&H)===H){I=I.next,H===Ki&&(K=!0);continue}else ee={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},M===null?(S=M=ee,k=y):M=M.next=ee,Ce.lanes|=H,ba|=H;ee=I.action,di&&s(y,ee),y=I.hasEagerState?I.eagerState:s(y,ee)}else H={lane:ee,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},M===null?(S=M=H,k=y):M=M.next=H,Ce.lanes|=ee,ba|=ee;I=I.next}while(I!==null&&I!==i);if(M===null?k=y:M.next=S,!An(y,r.memoizedState)&&(Mt=!0,K&&(s=Ji,s!==null)))throw s;r.memoizedState=y,r.baseState=k,r.baseQueue=M,c.lastRenderedState=y}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Sf(r){var i=Ct(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var c=s.dispatch,m=s.pending,y=i.memoizedState;if(m!==null){s.pending=null;var k=m=m.next;do y=r(y,k.action),k=k.next;while(k!==m);An(y,i.memoizedState)||(Mt=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),s.lastRenderedState=y}return[y,c]}function wx(r,i,s){var c=Ce,m=Ct(),y=Pe;if(y){if(s===void 0)throw Error(a(407));s=s()}else s=i();var k=!An((We||m).memoizedState,s);if(k&&(m.memoizedState=s,Mt=!0),m=m.queue,Tf(_x.bind(null,c,m,r),[r]),m.getSnapshot!==i||k||Rt!==null&&Rt.memoizedState.tag&1){if(c.flags|=2048,ro(9,{destroy:void 0},zx.bind(null,c,m,s,i),null),it===null)throw Error(a(349));y||(Vr&127)!==0||Sx(c,i,s)}return s}function Sx(r,i,s){r.flags|=16384,r={getSnapshot:i,value:s},i=Ce.updateQueue,i===null?(i=yu(),Ce.updateQueue=i,i.stores=[r]):(s=i.stores,s===null?i.stores=[r]:s.push(r))}function zx(r,i,s,c){i.value=s,i.getSnapshot=c,Tx(i)&&jx(r)}function _x(r,i,s){return s(function(){Tx(i)&&jx(r)})}function Tx(r){var i=r.getSnapshot;r=r.value;try{var s=i();return!An(r,s)}catch{return!0}}function jx(r){var i=ni(r,2);i!==null&&_n(i,r,2)}function zf(r){var i=dn();if(typeof r=="function"){var s=r;if(r=s(),di){xn(!0);try{s()}finally{xn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zr,lastRenderedState:r},i}function Ex(r,i,s,c){return r.baseState=s,wf(r,We,typeof c=="function"?c:Zr)}function sj(r,i,s,c,m){if(wu(r))throw Error(a(485));if(r=i.action,r!==null){var y={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){y.listeners.push(k)}};E.T!==null?s(!0):y.isTransition=!1,c(y),s=i.pending,s===null?(y.next=i.pending=y,Cx(i,y)):(y.next=s.next,i.pending=s.next=y)}}function Cx(r,i){var s=i.action,c=i.payload,m=r.state;if(i.isTransition){var y=E.T,k={};E.T=k;try{var S=s(m,c),M=E.S;M!==null&&M(k,S),Nx(r,i,S)}catch(I){_f(r,i,I)}finally{y!==null&&k.types!==null&&(y.types=k.types),E.T=y}}else try{y=s(m,c),Nx(r,i,y)}catch(I){_f(r,i,I)}}function Nx(r,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){Ax(r,i,c)},function(c){return _f(r,i,c)}):Ax(r,i,s)}function Ax(r,i,s){i.status="fulfilled",i.value=s,Ox(i),r.state=s,i=r.pending,i!==null&&(s=i.next,s===i?r.pending=null:(s=s.next,i.next=s,Cx(r,s)))}function _f(r,i,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,Ox(i),i=i.next;while(i!==c)}r.action=null}function Ox(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Rx(r,i){return i}function Mx(r,i){if(Pe){var s=it.formState;if(s!==null){e:{var c=Ce;if(Pe){if(ft){t:{for(var m=ft,y=Kn;m.nodeType!==8;){if(!y){m=null;break t}if(m=Qn(m.nextSibling),m===null){m=null;break t}}y=m.data,m=y==="F!"||y==="F"?m:null}if(m){ft=Qn(m.nextSibling),c=m.data==="F!";break e}}ca(c)}c=!1}c&&(i=s[0])}}return s=dn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rx,lastRenderedState:i},s.queue=c,s=Wx.bind(null,Ce,c),c.dispatch=s,c=zf(!1),y=Af.bind(null,Ce,!1,c.queue),c=dn(),m={state:i,dispatch:null,action:r,pending:null},c.queue=m,s=sj.bind(null,Ce,m,y,s),m.dispatch=s,c.memoizedState=r,[i,s,!1]}function Dx(r){var i=Ct();return $x(i,We,r)}function $x(r,i,s){if(i=wf(r,i,Rx)[0],r=bu(Zr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=zs(i)}catch(k){throw k===Qi?uu:k}else c=i;i=Ct();var m=i.queue,y=m.dispatch;return s!==i.memoizedState&&(Ce.flags|=2048,ro(9,{destroy:void 0},lj.bind(null,m,s),null)),[c,y,r]}function lj(r,i){r.action=i}function Lx(r){var i=Ct(),s=We;if(s!==null)return $x(i,s,r);Ct(),i=i.memoizedState,s=Ct();var c=s.queue.dispatch;return s.memoizedState=r,[i,c,!1]}function ro(r,i,s,c){return r={tag:r,create:s,deps:c,inst:i,next:null},i=Ce.updateQueue,i===null&&(i=yu(),Ce.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=r.next=r:(c=s.next,s.next=r,r.next=c,i.lastEffect=r),r}function Ux(){return Ct().memoizedState}function vu(r,i,s,c){var m=dn();Ce.flags|=r,m.memoizedState=ro(1|i,{destroy:void 0},s,c===void 0?null:c)}function ku(r,i,s,c){var m=Ct();c=c===void 0?null:c;var y=m.memoizedState.inst;We!==null&&c!==null&&gf(c,We.memoizedState.deps)?m.memoizedState=ro(i,y,s,c):(Ce.flags|=r,m.memoizedState=ro(1|i,y,s,c))}function Px(r,i){vu(8390656,8,r,i)}function Tf(r,i){ku(2048,8,r,i)}function uj(r){Ce.flags|=4;var i=Ce.updateQueue;if(i===null)i=yu(),Ce.updateQueue=i,i.events=[r];else{var s=i.events;s===null?i.events=[r]:s.push(r)}}function Vx(r){var i=Ct().memoizedState;return uj({ref:i,nextImpl:r}),function(){if((Fe&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Zx(r,i){return ku(4,2,r,i)}function Bx(r,i){return ku(4,4,r,i)}function Ix(r,i){if(typeof i=="function"){r=r();var s=i(r);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function Hx(r,i,s){s=s!=null?s.concat([r]):null,ku(4,4,Ix.bind(null,i,r),s)}function jf(){}function Fx(r,i){var s=Ct();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&gf(i,c[1])?c[0]:(s.memoizedState=[r,i],r)}function qx(r,i){var s=Ct();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&gf(i,c[1]))return c[0];if(c=r(),di){xn(!0);try{r()}finally{xn(!1)}}return s.memoizedState=[c,i],c}function Ef(r,i,s){return s===void 0||(Vr&1073741824)!==0&&(Le&261930)===0?r.memoizedState=i:(r.memoizedState=s,r=Gb(),Ce.lanes|=r,ba|=r,s)}function Gx(r,i,s,c){return An(s,i)?s:eo.current!==null?(r=Ef(r,s,c),An(r,i)||(Mt=!0),r):(Vr&42)===0||(Vr&1073741824)!==0&&(Le&261930)===0?(Mt=!0,r.memoizedState=s):(r=Gb(),Ce.lanes|=r,ba|=r,i)}function Yx(r,i,s,c,m){var y=F.p;F.p=y!==0&&8>y?y:8;var k=E.T,S={};E.T=S,Af(r,!1,i,s);try{var M=m(),I=E.S;if(I!==null&&I(S,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var K=aj(M,c);_s(r,i,K,Ln(r))}else _s(r,i,c,Ln(r))}catch(ee){_s(r,i,{then:function(){},status:"rejected",reason:ee},Ln())}finally{F.p=y,k!==null&&S.types!==null&&(k.types=S.types),E.T=k}}function cj(){}function Cf(r,i,s,c){if(r.tag!==5)throw Error(a(476));var m=Xx(r).queue;Yx(r,m,i,Z,s===null?cj:function(){return Kx(r),s(c)})}function Xx(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zr,lastRenderedState:Z},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zr,lastRenderedState:s},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function Kx(r){var i=Xx(r);i.next===null&&(i=r.alternate.memoizedState),_s(r,i.next.queue,{},Ln())}function Nf(){return Jt(Bs)}function Jx(){return Ct().memoizedState}function Qx(){return Ct().memoizedState}function dj(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var s=Ln();r=ha(s);var c=ma(i,r,s);c!==null&&(_n(c,i,s),vs(c,i,s)),i={cache:af()},r.payload=i;return}i=i.return}}function fj(r,i,s){var c=Ln();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},wu(r)?eb(i,s):(s=Gd(r,i,s,c),s!==null&&(_n(s,r,c),tb(s,i,c)))}function Wx(r,i,s){var c=Ln();_s(r,i,s,c)}function _s(r,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(wu(r))eb(i,m);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var k=i.lastRenderedState,S=y(k,s);if(m.hasEagerState=!0,m.eagerState=S,An(S,k))return nu(r,i,m,0),it===null&&tu(),!1}catch{}if(s=Gd(r,i,m,c),s!==null)return _n(s,r,c),tb(s,i,c),!0}return!1}function Af(r,i,s,c){if(c={lane:2,revertLane:uh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},wu(r)){if(i)throw Error(a(479))}else i=Gd(r,s,c,2),i!==null&&_n(i,r,2)}function wu(r){var i=r.alternate;return r===Ce||i!==null&&i===Ce}function eb(r,i){to=pu=!0;var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}function tb(r,i,s){if((s&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,oy(r,s)}}var Ts={readContext:Jt,use:xu,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Ts.useEffectEvent=zt;var nb={readContext:Jt,use:xu,useCallback:function(r,i){return dn().memoizedState=[r,i===void 0?null:i],r},useContext:Jt,useEffect:Px,useImperativeHandle:function(r,i,s){s=s!=null?s.concat([r]):null,vu(4194308,4,Ix.bind(null,i,r),s)},useLayoutEffect:function(r,i){return vu(4194308,4,r,i)},useInsertionEffect:function(r,i){vu(4,2,r,i)},useMemo:function(r,i){var s=dn();i=i===void 0?null:i;var c=r();if(di){xn(!0);try{r()}finally{xn(!1)}}return s.memoizedState=[c,i],c},useReducer:function(r,i,s){var c=dn();if(s!==void 0){var m=s(i);if(di){xn(!0);try{s(i)}finally{xn(!1)}}}else m=i;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=fj.bind(null,Ce,r),[c.memoizedState,r]},useRef:function(r){var i=dn();return r={current:r},i.memoizedState=r},useState:function(r){r=zf(r);var i=r.queue,s=Wx.bind(null,Ce,i);return i.dispatch=s,[r.memoizedState,s]},useDebugValue:jf,useDeferredValue:function(r,i){var s=dn();return Ef(s,r,i)},useTransition:function(){var r=zf(!1);return r=Yx.bind(null,Ce,r.queue,!0,!1),dn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,s){var c=Ce,m=dn();if(Pe){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),it===null)throw Error(a(349));(Le&127)!==0||Sx(c,i,s)}m.memoizedState=s;var y={value:s,getSnapshot:i};return m.queue=y,Px(_x.bind(null,c,y,r),[r]),c.flags|=2048,ro(9,{destroy:void 0},zx.bind(null,c,y,s,i),null),s},useId:function(){var r=dn(),i=it.identifierPrefix;if(Pe){var s=xr,c=yr;s=(c&~(1<<32-at(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=gu++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=ij++,i="_"+i+"r_"+s.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:Nf,useFormState:Mx,useActionState:Mx,useOptimistic:function(r){var i=dn();i.memoizedState=i.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=Af.bind(null,Ce,!0,s),s.dispatch=i,[r,i]},useMemoCache:kf,useCacheRefresh:function(){return dn().memoizedState=dj.bind(null,Ce)},useEffectEvent:function(r){var i=dn(),s={impl:r};return i.memoizedState=s,function(){if((Fe&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},Of={readContext:Jt,use:xu,useCallback:Fx,useContext:Jt,useEffect:Tf,useImperativeHandle:Hx,useInsertionEffect:Zx,useLayoutEffect:Bx,useMemo:qx,useReducer:bu,useRef:Ux,useState:function(){return bu(Zr)},useDebugValue:jf,useDeferredValue:function(r,i){var s=Ct();return Gx(s,We.memoizedState,r,i)},useTransition:function(){var r=bu(Zr)[0],i=Ct().memoizedState;return[typeof r=="boolean"?r:zs(r),i]},useSyncExternalStore:wx,useId:Jx,useHostTransitionStatus:Nf,useFormState:Dx,useActionState:Dx,useOptimistic:function(r,i){var s=Ct();return Ex(s,We,r,i)},useMemoCache:kf,useCacheRefresh:Qx};Of.useEffectEvent=Vx;var rb={readContext:Jt,use:xu,useCallback:Fx,useContext:Jt,useEffect:Tf,useImperativeHandle:Hx,useInsertionEffect:Zx,useLayoutEffect:Bx,useMemo:qx,useReducer:Sf,useRef:Ux,useState:function(){return Sf(Zr)},useDebugValue:jf,useDeferredValue:function(r,i){var s=Ct();return We===null?Ef(s,r,i):Gx(s,We.memoizedState,r,i)},useTransition:function(){var r=Sf(Zr)[0],i=Ct().memoizedState;return[typeof r=="boolean"?r:zs(r),i]},useSyncExternalStore:wx,useId:Jx,useHostTransitionStatus:Nf,useFormState:Lx,useActionState:Lx,useOptimistic:function(r,i){var s=Ct();return We!==null?Ex(s,We,r,i):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:kf,useCacheRefresh:Qx};rb.useEffectEvent=Vx;function Rf(r,i,s,c){i=r.memoizedState,s=s(c,i),s=s==null?i:x({},i,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var Mf={enqueueSetState:function(r,i,s){r=r._reactInternals;var c=Ln(),m=ha(c);m.payload=i,s!=null&&(m.callback=s),i=ma(r,m,c),i!==null&&(_n(i,r,c),vs(i,r,c))},enqueueReplaceState:function(r,i,s){r=r._reactInternals;var c=Ln(),m=ha(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=ma(r,m,c),i!==null&&(_n(i,r,c),vs(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var s=Ln(),c=ha(s);c.tag=2,i!=null&&(c.callback=i),i=ma(r,c,s),i!==null&&(_n(i,r,s),vs(i,r,s))}};function ab(r,i,s,c,m,y,k){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,y,k):i.prototype&&i.prototype.isPureReactComponent?!fs(s,c)||!fs(m,y):!0}function ib(r,i,s,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==r&&Mf.enqueueReplaceState(i,i.state,null)}function fi(r,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(r=r.defaultProps){s===i&&(s=x({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function ob(r){eu(r)}function sb(r){console.error(r)}function lb(r){eu(r)}function Su(r,i){try{var s=r.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function ub(r,i,s){try{var c=r.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Df(r,i,s){return s=ha(s),s.tag=3,s.payload={element:null},s.callback=function(){Su(r,i)},s}function cb(r){return r=ha(r),r.tag=3,r}function db(r,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var y=c.value;r.payload=function(){return m(y)},r.callback=function(){ub(i,s,c)}}var k=s.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(r.callback=function(){ub(i,s,c),typeof m!="function"&&(va===null?va=new Set([this]):va.add(this));var S=c.stack;this.componentDidCatch(c.value,{componentStack:S!==null?S:""})})}function hj(r,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&Xi(i,s,m,!0),s=Rn.current,s!==null){switch(s.tag){case 31:case 13:return Jn===null?Du():s.alternate===null&&_t===0&&(_t=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===cu?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),oh(r,c,m)),!1;case 22:return s.flags|=65536,c===cu?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),oh(r,c,m)),!1}throw Error(a(435,s.tag))}return oh(r,c,m),Du(),!1}if(Pe)return i=Rn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==Wd&&(r=Error(a(422),{cause:c}),ps(Gn(r,s)))):(c!==Wd&&(i=Error(a(423),{cause:c}),ps(Gn(i,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=Gn(c,s),m=Df(r.stateNode,c,m),df(r,m),_t!==4&&(_t=2)),!1;var y=Error(a(520),{cause:c});if(y=Gn(y,s),Ms===null?Ms=[y]:Ms.push(y),_t!==4&&(_t=2),i===null)return!0;c=Gn(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=Df(s.stateNode,c,r),df(s,r),!1;case 1:if(i=s.type,y=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(va===null||!va.has(y))))return s.flags|=65536,m&=-m,s.lanes|=m,m=cb(m),db(m,r,s,c),df(s,m),!1}s=s.return}while(s!==null);return!1}var $f=Error(a(461)),Mt=!1;function Qt(r,i,s,c){i.child=r===null?px(i,null,s,c):ci(i,r.child,s,c)}function fb(r,i,s,c,m){s=s.render;var y=i.ref;if("ref"in c){var k={};for(var S in c)S!=="ref"&&(k[S]=c[S])}else k=c;return oi(i),c=yf(r,i,s,k,y,m),S=xf(),r!==null&&!Mt?(bf(r,i,m),Br(r,i,m)):(Pe&&S&&Jd(i),i.flags|=1,Qt(r,i,c,m),i.child)}function hb(r,i,s,c,m){if(r===null){var y=s.type;return typeof y=="function"&&!Yd(y)&&y.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=y,mb(r,i,y,c,m)):(r=au(s.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(y=r.child,!Hf(r,m)){var k=y.memoizedProps;if(s=s.compare,s=s!==null?s:fs,s(k,c)&&r.ref===i.ref)return Br(r,i,m)}return i.flags|=1,r=$r(y,c),r.ref=i.ref,r.return=i,i.child=r}function mb(r,i,s,c,m){if(r!==null){var y=r.memoizedProps;if(fs(y,c)&&r.ref===i.ref)if(Mt=!1,i.pendingProps=c=y,Hf(r,m))(r.flags&131072)!==0&&(Mt=!0);else return i.lanes=r.lanes,Br(r,i,m)}return Lf(r,i,s,c,m)}function pb(r,i,s,c){var m=c.children,y=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(y=y!==null?y.baseLanes|s:s,r!==null){for(c=i.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~y}else c=0,i.child=null;return gb(r,i,y,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&lu(i,y!==null?y.cachePool:null),y!==null?xx(i,y):hf(),bx(i);else return c=i.lanes=536870912,gb(r,i,y!==null?y.baseLanes|s:s,s,c)}else y!==null?(lu(i,y.cachePool),xx(i,y),ga(),i.memoizedState=null):(r!==null&&lu(i,null),hf(),ga());return Qt(r,i,m,s),i.child}function js(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function gb(r,i,s,c,m){var y=sf();return y=y===null?null:{parent:Ot._currentValue,pool:y},i.memoizedState={baseLanes:s,cachePool:y},r!==null&&lu(i,null),hf(),bx(i),r!==null&&Xi(r,i,c,!0),i.childLanes=m,null}function zu(r,i){return i=Tu({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function yb(r,i,s){return ci(i,r.child,null,s),r=zu(i,i.pendingProps),r.flags|=2,Mn(i),i.memoizedState=null,r}function mj(r,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Pe){if(c.mode==="hidden")return r=zu(i,c),i.lanes=536870912,js(null,r);if(pf(i),(r=ft)?(r=Cv(r,Kn),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:la!==null?{id:yr,overflow:xr}:null,retryLane:536870912,hydrationErrors:null},s=ex(r),s.return=i,i.child=s,Kt=i,ft=null)):r=null,r===null)throw ca(i);return i.lanes=536870912,null}return zu(i,c)}var y=r.memoizedState;if(y!==null){var k=y.dehydrated;if(pf(i),m)if(i.flags&256)i.flags&=-257,i=yb(r,i,s);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Mt||Xi(r,i,s,!1),m=(s&r.childLanes)!==0,Mt||m){if(c=it,c!==null&&(k=sy(c,s),k!==0&&k!==y.retryLane))throw y.retryLane=k,ni(r,k),_n(c,r,k),$f;Du(),i=yb(r,i,s)}else r=y.treeContext,ft=Qn(k.nextSibling),Kt=i,Pe=!0,ua=null,Kn=!1,r!==null&&rx(i,r),i=zu(i,c),i.flags|=4096;return i}return r=$r(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function _u(r,i){var s=i.ref;if(s===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(i.flags|=4194816)}}function Lf(r,i,s,c,m){return oi(i),s=yf(r,i,s,c,void 0,m),c=xf(),r!==null&&!Mt?(bf(r,i,m),Br(r,i,m)):(Pe&&c&&Jd(i),i.flags|=1,Qt(r,i,s,m),i.child)}function xb(r,i,s,c,m,y){return oi(i),i.updateQueue=null,s=kx(i,c,s,m),vx(r),c=xf(),r!==null&&!Mt?(bf(r,i,y),Br(r,i,y)):(Pe&&c&&Jd(i),i.flags|=1,Qt(r,i,s,y),i.child)}function bb(r,i,s,c,m){if(oi(i),i.stateNode===null){var y=Fi,k=s.contextType;typeof k=="object"&&k!==null&&(y=Jt(k)),y=new s(c,y),i.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Mf,i.stateNode=y,y._reactInternals=i,y=i.stateNode,y.props=c,y.state=i.memoizedState,y.refs={},uf(i),k=s.contextType,y.context=typeof k=="object"&&k!==null?Jt(k):Fi,y.state=i.memoizedState,k=s.getDerivedStateFromProps,typeof k=="function"&&(Rf(i,s,k,c),y.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(k=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),k!==y.state&&Mf.enqueueReplaceState(y,y.state,null),ws(i,c,y,m),ks(),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){y=i.stateNode;var S=i.memoizedProps,M=fi(s,S);y.props=M;var I=y.context,K=s.contextType;k=Fi,typeof K=="object"&&K!==null&&(k=Jt(K));var ee=s.getDerivedStateFromProps;K=typeof ee=="function"||typeof y.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,K||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S||I!==k)&&ib(i,y,c,k),fa=!1;var H=i.memoizedState;y.state=H,ws(i,c,y,m),ks(),I=i.memoizedState,S||H!==I||fa?(typeof ee=="function"&&(Rf(i,s,ee,c),I=i.memoizedState),(M=fa||ab(i,s,M,c,H,I,k))?(K||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=I),y.props=c,y.state=I,y.context=k,c=M):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{y=i.stateNode,cf(r,i),k=i.memoizedProps,K=fi(s,k),y.props=K,ee=i.pendingProps,H=y.context,I=s.contextType,M=Fi,typeof I=="object"&&I!==null&&(M=Jt(I)),S=s.getDerivedStateFromProps,(I=typeof S=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(k!==ee||H!==M)&&ib(i,y,c,M),fa=!1,H=i.memoizedState,y.state=H,ws(i,c,y,m),ks();var q=i.memoizedState;k!==ee||H!==q||fa||r!==null&&r.dependencies!==null&&ou(r.dependencies)?(typeof S=="function"&&(Rf(i,s,S,c),q=i.memoizedState),(K=fa||ab(i,s,K,c,H,q,M)||r!==null&&r.dependencies!==null&&ou(r.dependencies))?(I||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,q,M),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,q,M)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||k===r.memoizedProps&&H===r.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===r.memoizedProps&&H===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=q),y.props=c,y.state=q,y.context=M,c=K):(typeof y.componentDidUpdate!="function"||k===r.memoizedProps&&H===r.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===r.memoizedProps&&H===r.memoizedState||(i.flags|=1024),c=!1)}return y=c,_u(r,i),c=(i.flags&128)!==0,y||c?(y=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:y.render(),i.flags|=1,r!==null&&c?(i.child=ci(i,r.child,null,m),i.child=ci(i,null,s,m)):Qt(r,i,s,m),i.memoizedState=y.state,r=i.child):r=Br(r,i,m),r}function vb(r,i,s,c){return ai(),i.flags|=256,Qt(r,i,s,c),i.child}var Uf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pf(r){return{baseLanes:r,cachePool:ux()}}function Vf(r,i,s){return r=r!==null?r.childLanes&~s:0,i&&(r|=$n),r}function kb(r,i,s){var c=i.pendingProps,m=!1,y=(i.flags&128)!==0,k;if((k=y)||(k=r!==null&&r.memoizedState===null?!1:(Et.current&2)!==0),k&&(m=!0,i.flags&=-129),k=(i.flags&32)!==0,i.flags&=-33,r===null){if(Pe){if(m?pa(i):ga(),(r=ft)?(r=Cv(r,Kn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:la!==null?{id:yr,overflow:xr}:null,retryLane:536870912,hydrationErrors:null},s=ex(r),s.return=i,i.child=s,Kt=i,ft=null)):r=null,r===null)throw ca(i);return wh(r)?i.lanes=32:i.lanes=536870912,null}var S=c.children;return c=c.fallback,m?(ga(),m=i.mode,S=Tu({mode:"hidden",children:S},m),c=ri(c,m,s,null),S.return=i,c.return=i,S.sibling=c,i.child=S,c=i.child,c.memoizedState=Pf(s),c.childLanes=Vf(r,k,s),i.memoizedState=Uf,js(null,c)):(pa(i),Zf(i,S))}var M=r.memoizedState;if(M!==null&&(S=M.dehydrated,S!==null)){if(y)i.flags&256?(pa(i),i.flags&=-257,i=Bf(r,i,s)):i.memoizedState!==null?(ga(),i.child=r.child,i.flags|=128,i=null):(ga(),S=c.fallback,m=i.mode,c=Tu({mode:"visible",children:c.children},m),S=ri(S,m,s,null),S.flags|=2,c.return=i,S.return=i,c.sibling=S,i.child=c,ci(i,r.child,null,s),c=i.child,c.memoizedState=Pf(s),c.childLanes=Vf(r,k,s),i.memoizedState=Uf,i=js(null,c));else if(pa(i),wh(S)){if(k=S.nextSibling&&S.nextSibling.dataset,k)var I=k.dgst;k=I,c=Error(a(419)),c.stack="",c.digest=k,ps({value:c,source:null,stack:null}),i=Bf(r,i,s)}else if(Mt||Xi(r,i,s,!1),k=(s&r.childLanes)!==0,Mt||k){if(k=it,k!==null&&(c=sy(k,s),c!==0&&c!==M.retryLane))throw M.retryLane=c,ni(r,c),_n(k,r,c),$f;kh(S)||Du(),i=Bf(r,i,s)}else kh(S)?(i.flags|=192,i.child=r.child,i=null):(r=M.treeContext,ft=Qn(S.nextSibling),Kt=i,Pe=!0,ua=null,Kn=!1,r!==null&&rx(i,r),i=Zf(i,c.children),i.flags|=4096);return i}return m?(ga(),S=c.fallback,m=i.mode,M=r.child,I=M.sibling,c=$r(M,{mode:"hidden",children:c.children}),c.subtreeFlags=M.subtreeFlags&65011712,I!==null?S=$r(I,S):(S=ri(S,m,s,null),S.flags|=2),S.return=i,c.return=i,c.sibling=S,i.child=c,js(null,c),c=i.child,S=r.child.memoizedState,S===null?S=Pf(s):(m=S.cachePool,m!==null?(M=Ot._currentValue,m=m.parent!==M?{parent:M,pool:M}:m):m=ux(),S={baseLanes:S.baseLanes|s,cachePool:m}),c.memoizedState=S,c.childLanes=Vf(r,k,s),i.memoizedState=Uf,js(r.child,c)):(pa(i),s=r.child,r=s.sibling,s=$r(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,r!==null&&(k=i.deletions,k===null?(i.deletions=[r],i.flags|=16):k.push(r)),i.child=s,i.memoizedState=null,s)}function Zf(r,i){return i=Tu({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function Tu(r,i){return r=On(22,r,null,i),r.lanes=0,r}function Bf(r,i,s){return ci(i,r.child,null,s),r=Zf(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function wb(r,i,s){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),nf(r.return,i,s)}function If(r,i,s,c,m,y){var k=r.memoizedState;k===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:y}:(k.isBackwards=i,k.rendering=null,k.renderingStartTime=0,k.last=c,k.tail=s,k.tailMode=m,k.treeForkCount=y)}function Sb(r,i,s){var c=i.pendingProps,m=c.revealOrder,y=c.tail;c=c.children;var k=Et.current,S=(k&2)!==0;if(S?(k=k&1|2,i.flags|=128):k&=1,T(Et,k),Qt(r,i,c,s),c=Pe?ms:0,!S&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&wb(r,s,i);else if(r.tag===19)wb(r,s,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=i.child,m=null;s!==null;)r=s.alternate,r!==null&&mu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),If(i,!1,m,s,y,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&mu(r)===null){i.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}If(i,!0,s,null,y,c);break;case"together":If(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Br(r,i,s){if(r!==null&&(i.dependencies=r.dependencies),ba|=i.lanes,(s&i.childLanes)===0)if(r!==null){if(Xi(r,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,s=$r(r,r.pendingProps),i.child=s,s.return=i;r.sibling!==null;)r=r.sibling,s=s.sibling=$r(r,r.pendingProps),s.return=i;s.sibling=null}return i.child}function Hf(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&ou(r)))}function pj(r,i,s){switch(i.tag){case 3:Ye(i,i.stateNode.containerInfo),da(i,Ot,r.memoizedState.cache),ai();break;case 27:case 5:At(i);break;case 4:Ye(i,i.stateNode.containerInfo);break;case 10:da(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,pf(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(pa(i),i.flags|=128,null):(s&i.child.childLanes)!==0?kb(r,i,s):(pa(i),r=Br(r,i,s),r!==null?r.sibling:null);pa(i);break;case 19:var m=(r.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(Xi(r,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return Sb(r,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),T(Et,Et.current),c)break;return null;case 22:return i.lanes=0,pb(r,i,s,i.pendingProps);case 24:da(i,Ot,r.memoizedState.cache)}return Br(r,i,s)}function zb(r,i,s){if(r!==null)if(r.memoizedProps!==i.pendingProps)Mt=!0;else{if(!Hf(r,s)&&(i.flags&128)===0)return Mt=!1,pj(r,i,s);Mt=(r.flags&131072)!==0}else Mt=!1,Pe&&(i.flags&1048576)!==0&&nx(i,ms,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=li(i.elementType),i.type=r,typeof r=="function")Yd(r)?(c=fi(r,c),i.tag=1,i=bb(null,i,r,c,s)):(i.tag=0,i=Lf(null,i,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===L){i.tag=11,i=fb(null,i,r,c,s);break e}else if(m===Y){i.tag=14,i=hb(null,i,r,c,s);break e}}throw i=se(r)||r,Error(a(306,i,""))}}return i;case 0:return Lf(r,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=fi(c,i.pendingProps),bb(r,i,c,m,s);case 3:e:{if(Ye(i,i.stateNode.containerInfo),r===null)throw Error(a(387));c=i.pendingProps;var y=i.memoizedState;m=y.element,cf(r,i),ws(i,c,null,s);var k=i.memoizedState;if(c=k.cache,da(i,Ot,c),c!==y.cache&&rf(i,[Ot],s,!0),ks(),c=k.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:k.cache},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){i=vb(r,i,c,s);break e}else if(c!==m){m=Gn(Error(a(424)),i),ps(m),i=vb(r,i,c,s);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,ft=Qn(r.firstChild),Kt=i,Pe=!0,ua=null,Kn=!0,s=px(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ai(),c===m){i=Br(r,i,s);break e}Qt(r,i,c,s)}i=i.child}return i;case 26:return _u(r,i),r===null?(s=Dv(i.type,null,i.pendingProps,null))?i.memoizedState=s:Pe||(s=i.type,r=i.pendingProps,c=Bu(ge.current).createElement(s),c[Xt]=i,c[bn]=r,Wt(c,s,r),Gt(c),i.stateNode=c):i.memoizedState=Dv(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return At(i),r===null&&Pe&&(c=i.stateNode=Ov(i.type,i.pendingProps,ge.current),Kt=i,Kn=!0,m=ft,za(i.type)?(Sh=m,ft=Qn(c.firstChild)):ft=m),Qt(r,i,i.pendingProps.children,s),_u(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Pe&&((m=c=ft)&&(c=Fj(c,i.type,i.pendingProps,Kn),c!==null?(i.stateNode=c,Kt=i,ft=Qn(c.firstChild),Kn=!1,m=!0):m=!1),m||ca(i)),At(i),m=i.type,y=i.pendingProps,k=r!==null?r.memoizedProps:null,c=y.children,xh(m,y)?c=null:k!==null&&xh(m,k)&&(i.flags|=32),i.memoizedState!==null&&(m=yf(r,i,oj,null,null,s),Bs._currentValue=m),_u(r,i),Qt(r,i,c,s),i.child;case 6:return r===null&&Pe&&((r=s=ft)&&(s=qj(s,i.pendingProps,Kn),s!==null?(i.stateNode=s,Kt=i,ft=null,r=!0):r=!1),r||ca(i)),null;case 13:return kb(r,i,s);case 4:return Ye(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=ci(i,null,c,s):Qt(r,i,c,s),i.child;case 11:return fb(r,i,i.type,i.pendingProps,s);case 7:return Qt(r,i,i.pendingProps,s),i.child;case 8:return Qt(r,i,i.pendingProps.children,s),i.child;case 12:return Qt(r,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,da(i,i.type,c.value),Qt(r,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,oi(i),m=Jt(m),c=c(m),i.flags|=1,Qt(r,i,c,s),i.child;case 14:return hb(r,i,i.type,i.pendingProps,s);case 15:return mb(r,i,i.type,i.pendingProps,s);case 19:return Sb(r,i,s);case 31:return mj(r,i,s);case 22:return pb(r,i,s,i.pendingProps);case 24:return oi(i),c=Jt(Ot),r===null?(m=sf(),m===null&&(m=it,y=af(),m.pooledCache=y,y.refCount++,y!==null&&(m.pooledCacheLanes|=s),m=y),i.memoizedState={parent:c,cache:m},uf(i),da(i,Ot,m)):((r.lanes&s)!==0&&(cf(r,i),ws(i,null,null,s),ks()),m=r.memoizedState,y=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),da(i,Ot,c)):(c=y.cache,da(i,Ot,c),c!==m.cache&&rf(i,[Ot],s,!0))),Qt(r,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Ir(r){r.flags|=4}function Ff(r,i,s,c,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(Jb())r.flags|=8192;else throw ui=cu,lf}else r.flags&=-16777217}function _b(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Vv(i))if(Jb())r.flags|=8192;else throw ui=cu,lf}function ju(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?ay():536870912,r.lanes|=i,so|=i)}function Es(r,i){if(!Pe)switch(r.tailMode){case"hidden":i=r.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function ht(r){var i=r.alternate!==null&&r.alternate.child===r.child,s=0,c=0;if(i)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=s,i}function gj(r,i,s){var c=i.pendingProps;switch(Qd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(i),null;case 1:return ht(i),null;case 3:return s=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Pr(Ot),$e(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Yi(i)?Ir(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,ef())),ht(i),null;case 26:var m=i.type,y=i.memoizedState;return r===null?(Ir(i),y!==null?(ht(i),_b(i,y)):(ht(i),Ff(i,m,null,c,s))):y?y!==r.memoizedState?(Ir(i),ht(i),_b(i,y)):(ht(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&Ir(i),ht(i),Ff(i,m,r,c,s)),null;case 27:if(ln(i),s=ge.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Ir(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return ht(i),null}r=ie.current,Yi(i)?ax(i):(r=Ov(m,c,s),i.stateNode=r,Ir(i))}return ht(i),null;case 5:if(ln(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Ir(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return ht(i),null}if(y=ie.current,Yi(i))ax(i);else{var k=Bu(ge.current);switch(y){case 1:y=k.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:y=k.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":y=k.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":y=k.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":y=k.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof c.is=="string"?k.createElement("select",{is:c.is}):k.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?k.createElement(m,{is:c.is}):k.createElement(m)}}y[Xt]=i,y[bn]=c;e:for(k=i.child;k!==null;){if(k.tag===5||k.tag===6)y.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===i)break e;for(;k.sibling===null;){if(k.return===null||k.return===i)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}i.stateNode=y;e:switch(Wt(y,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Ir(i)}}return ht(i),Ff(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,s),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&Ir(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=ge.current,Yi(i)){if(r=i.stateNode,s=i.memoizedProps,c=null,m=Kt,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[Xt]=i,r=!!(r.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||kv(r.nodeValue,s)),r||ca(i,!0)}else r=Bu(r).createTextNode(c),r[Xt]=i,i.stateNode=r}return ht(i),null;case 31:if(s=i.memoizedState,r===null||r.memoizedState!==null){if(c=Yi(i),s!==null){if(r===null){if(!c)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Xt]=i}else ai(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ht(i),r=!1}else s=ef(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return i.flags&256?(Mn(i),i):(Mn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return ht(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Yi(i),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[Xt]=i}else ai(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ht(i),m=!1}else m=ef(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(Mn(i),i):(Mn(i),null)}return Mn(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,r=r!==null&&r.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==m&&(c.flags|=2048)),s!==r&&s&&(i.child.flags|=8192),ju(i,i.updateQueue),ht(i),null);case 4:return $e(),r===null&&hh(i.stateNode.containerInfo),ht(i),null;case 10:return Pr(i.type),ht(i),null;case 19:if(G(Et),c=i.memoizedState,c===null)return ht(i),null;if(m=(i.flags&128)!==0,y=c.rendering,y===null)if(m)Es(c,!1);else{if(_t!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(y=mu(r),y!==null){for(i.flags|=128,Es(c,!1),r=y.updateQueue,i.updateQueue=r,ju(i,r),i.subtreeFlags=0,r=s,s=i.child;s!==null;)Wy(s,r),s=s.sibling;return T(Et,Et.current&1|2),Pe&&Lr(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&dt()>Ou&&(i.flags|=128,m=!0,Es(c,!1),i.lanes=4194304)}else{if(!m)if(r=mu(y),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,ju(i,r),Es(c,!0),c.tail===null&&c.tailMode==="hidden"&&!y.alternate&&!Pe)return ht(i),null}else 2*dt()-c.renderingStartTime>Ou&&s!==536870912&&(i.flags|=128,m=!0,Es(c,!1),i.lanes=4194304);c.isBackwards?(y.sibling=i.child,i.child=y):(r=c.last,r!==null?r.sibling=y:i.child=y,c.last=y)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=dt(),r.sibling=null,s=Et.current,T(Et,m?s&1|2:s&1),Pe&&Lr(i,c.treeForkCount),r):(ht(i),null);case 22:case 23:return Mn(i),mf(),c=i.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(ht(i),i.subtreeFlags&6&&(i.flags|=8192)):ht(i),s=i.updateQueue,s!==null&&ju(i,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),r!==null&&G(si),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Pr(Ot),ht(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function yj(r,i){switch(Qd(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Pr(Ot),$e(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return ln(i),null;case 31:if(i.memoizedState!==null){if(Mn(i),i.alternate===null)throw Error(a(340));ai()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Mn(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));ai()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return G(Et),null;case 4:return $e(),null;case 10:return Pr(i.type),null;case 22:case 23:return Mn(i),mf(),r!==null&&G(si),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Pr(Ot),null;case 25:return null;default:return null}}function Tb(r,i){switch(Qd(i),i.tag){case 3:Pr(Ot),$e();break;case 26:case 27:case 5:ln(i);break;case 4:$e();break;case 31:i.memoizedState!==null&&Mn(i);break;case 13:Mn(i);break;case 19:G(Et);break;case 10:Pr(i.type);break;case 22:case 23:Mn(i),mf(),r!==null&&G(si);break;case 24:Pr(Ot)}}function Cs(r,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&r)===r){c=void 0;var y=s.create,k=s.inst;c=y(),k.destroy=c}s=s.next}while(s!==m)}}catch(S){Ke(i,i.return,S)}}function ya(r,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var y=m.next;c=y;do{if((c.tag&r)===r){var k=c.inst,S=k.destroy;if(S!==void 0){k.destroy=void 0,m=i;var M=s,I=S;try{I()}catch(K){Ke(m,M,K)}}}c=c.next}while(c!==y)}}catch(K){Ke(i,i.return,K)}}function jb(r){var i=r.updateQueue;if(i!==null){var s=r.stateNode;try{yx(i,s)}catch(c){Ke(r,r.return,c)}}}function Eb(r,i,s){s.props=fi(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){Ke(r,i,c)}}function Ns(r,i){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof s=="function"?r.refCleanup=s(c):s.current=c}}catch(m){Ke(r,i,m)}}function br(r,i){var s=r.ref,c=r.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){Ke(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Ke(r,i,m)}else s.current=null}function Cb(r){var i=r.type,s=r.memoizedProps,c=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){Ke(r,r.return,m)}}function qf(r,i,s){try{var c=r.stateNode;Pj(c,r.type,s,i),c[bn]=i}catch(m){Ke(r,r.return,m)}}function Nb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&za(r.type)||r.tag===4}function Gf(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Nb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&za(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Yf(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(r),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Mr));else if(c!==4&&(c===27&&za(r.type)&&(s=r.stateNode,i=null),r=r.child,r!==null))for(Yf(r,i,s),r=r.sibling;r!==null;)Yf(r,i,s),r=r.sibling}function Eu(r,i,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?s.insertBefore(r,i):s.appendChild(r);else if(c!==4&&(c===27&&za(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(Eu(r,i,s),r=r.sibling;r!==null;)Eu(r,i,s),r=r.sibling}function Ab(r){var i=r.stateNode,s=r.memoizedProps;try{for(var c=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Wt(i,c,s),i[Xt]=r,i[bn]=s}catch(y){Ke(r,r.return,y)}}var Hr=!1,Dt=!1,Xf=!1,Ob=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function xj(r,i){if(r=r.containerInfo,gh=Xu,r=Hy(r),Zd(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{s.nodeType,y.nodeType}catch{s=null;break e}var k=0,S=-1,M=-1,I=0,K=0,ee=r,H=null;t:for(;;){for(var q;ee!==s||m!==0&&ee.nodeType!==3||(S=k+m),ee!==y||c!==0&&ee.nodeType!==3||(M=k+c),ee.nodeType===3&&(k+=ee.nodeValue.length),(q=ee.firstChild)!==null;)H=ee,ee=q;for(;;){if(ee===r)break t;if(H===s&&++I===m&&(S=k),H===y&&++K===c&&(M=k),(q=ee.nextSibling)!==null)break;ee=H,H=ee.parentNode}ee=q}s=S===-1||M===-1?null:{start:S,end:M}}else s=null}s=s||{start:0,end:0}}else s=null;for(yh={focusedElem:r,selectionRange:s},Xu=!1,Yt=i;Yt!==null;)if(i=Yt,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Yt=r;else for(;Yt!==null;){switch(i=Yt,y=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&y!==null){r=void 0,s=i,m=y.memoizedProps,y=y.memoizedState,c=s.stateNode;try{var fe=fi(s.type,m);r=c.getSnapshotBeforeUpdate(fe,y),c.__reactInternalSnapshotBeforeUpdate=r}catch(Se){Ke(s,s.return,Se)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,s=r.nodeType,s===9)vh(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":vh(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,Yt=r;break}Yt=i.return}}function Rb(r,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:qr(r,s),c&4&&Cs(5,s);break;case 1:if(qr(r,s),c&4)if(r=s.stateNode,i===null)try{r.componentDidMount()}catch(k){Ke(s,s.return,k)}else{var m=fi(s.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(k){Ke(s,s.return,k)}}c&64&&jb(s),c&512&&Ns(s,s.return);break;case 3:if(qr(r,s),c&64&&(r=s.updateQueue,r!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{yx(r,i)}catch(k){Ke(s,s.return,k)}}break;case 27:i===null&&c&4&&Ab(s);case 26:case 5:qr(r,s),i===null&&c&4&&Cb(s),c&512&&Ns(s,s.return);break;case 12:qr(r,s);break;case 31:qr(r,s),c&4&&$b(r,s);break;case 13:qr(r,s),c&4&&Lb(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=jj.bind(null,s),Gj(r,s))));break;case 22:if(c=s.memoizedState!==null||Hr,!c){i=i!==null&&i.memoizedState!==null||Dt,m=Hr;var y=Dt;Hr=c,(Dt=i)&&!y?Gr(r,s,(s.subtreeFlags&8772)!==0):qr(r,s),Hr=m,Dt=y}break;case 30:break;default:qr(r,s)}}function Mb(r){var i=r.alternate;i!==null&&(r.alternate=null,Mb(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&zd(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var pt=null,kn=!1;function Fr(r,i,s){for(s=s.child;s!==null;)Db(r,i,s),s=s.sibling}function Db(r,i,s){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(cn,s)}catch{}switch(s.tag){case 26:Dt||br(s,i),Fr(r,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Dt||br(s,i);var c=pt,m=kn;za(s.type)&&(pt=s.stateNode,kn=!1),Fr(r,i,s),Ps(s.stateNode),pt=c,kn=m;break;case 5:Dt||br(s,i);case 6:if(c=pt,m=kn,pt=null,Fr(r,i,s),pt=c,kn=m,pt!==null)if(kn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(s.stateNode)}catch(y){Ke(s,i,y)}else try{pt.removeChild(s.stateNode)}catch(y){Ke(s,i,y)}break;case 18:pt!==null&&(kn?(r=pt,jv(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),go(r)):jv(pt,s.stateNode));break;case 4:c=pt,m=kn,pt=s.stateNode.containerInfo,kn=!0,Fr(r,i,s),pt=c,kn=m;break;case 0:case 11:case 14:case 15:ya(2,s,i),Dt||ya(4,s,i),Fr(r,i,s);break;case 1:Dt||(br(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&Eb(s,i,c)),Fr(r,i,s);break;case 21:Fr(r,i,s);break;case 22:Dt=(c=Dt)||s.memoizedState!==null,Fr(r,i,s),Dt=c;break;default:Fr(r,i,s)}}function $b(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{go(r)}catch(s){Ke(i,i.return,s)}}}function Lb(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{go(r)}catch(s){Ke(i,i.return,s)}}function bj(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Ob),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Ob),i;default:throw Error(a(435,r.tag))}}function Cu(r,i){var s=bj(r);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=Ej.bind(null,r,c);c.then(m,m)}})}function wn(r,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],y=r,k=i,S=k;e:for(;S!==null;){switch(S.tag){case 27:if(za(S.type)){pt=S.stateNode,kn=!1;break e}break;case 5:pt=S.stateNode,kn=!1;break e;case 3:case 4:pt=S.stateNode.containerInfo,kn=!0;break e}S=S.return}if(pt===null)throw Error(a(160));Db(y,k,m),pt=null,kn=!1,y=m.alternate,y!==null&&(y.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Ub(i,r),i=i.sibling}var ur=null;function Ub(r,i){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:wn(i,r),Sn(r),c&4&&(ya(3,r,r.return),Cs(3,r),ya(5,r,r.return));break;case 1:wn(i,r),Sn(r),c&512&&(Dt||s===null||br(s,s.return)),c&64&&Hr&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=ur;if(wn(i,r),Sn(r),c&512&&(Dt||s===null||br(s,s.return)),c&4){var y=s!==null?s.memoizedState:null;if(c=r.memoizedState,s===null)if(c===null)if(r.stateNode===null){e:{c=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":y=m.getElementsByTagName("title")[0],(!y||y[rs]||y[Xt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=m.createElement(c),m.head.insertBefore(y,m.querySelector("head > title"))),Wt(y,c,s),y[Xt]=r,Gt(y),c=y;break e;case"link":var k=Uv("link","href",m).get(c+(s.href||""));if(k){for(var S=0;S<k.length;S++)if(y=k[S],y.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&y.getAttribute("rel")===(s.rel==null?null:s.rel)&&y.getAttribute("title")===(s.title==null?null:s.title)&&y.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){k.splice(S,1);break t}}y=m.createElement(c),Wt(y,c,s),m.head.appendChild(y);break;case"meta":if(k=Uv("meta","content",m).get(c+(s.content||""))){for(S=0;S<k.length;S++)if(y=k[S],y.getAttribute("content")===(s.content==null?null:""+s.content)&&y.getAttribute("name")===(s.name==null?null:s.name)&&y.getAttribute("property")===(s.property==null?null:s.property)&&y.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&y.getAttribute("charset")===(s.charSet==null?null:s.charSet)){k.splice(S,1);break t}}y=m.createElement(c),Wt(y,c,s),m.head.appendChild(y);break;default:throw Error(a(468,c))}y[Xt]=r,Gt(y),c=y}r.stateNode=c}else Pv(m,r.type,r.stateNode);else r.stateNode=Lv(m,c,r.memoizedProps);else y!==c?(y===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):y.count--,c===null?Pv(m,r.type,r.stateNode):Lv(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&qf(r,r.memoizedProps,s.memoizedProps)}break;case 27:wn(i,r),Sn(r),c&512&&(Dt||s===null||br(s,s.return)),s!==null&&c&4&&qf(r,r.memoizedProps,s.memoizedProps);break;case 5:if(wn(i,r),Sn(r),c&512&&(Dt||s===null||br(s,s.return)),r.flags&32){m=r.stateNode;try{Ui(m,"")}catch(fe){Ke(r,r.return,fe)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,qf(r,m,s!==null?s.memoizedProps:m)),c&1024&&(Xf=!0);break;case 6:if(wn(i,r),Sn(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(fe){Ke(r,r.return,fe)}}break;case 3:if(Fu=null,m=ur,ur=Iu(i.containerInfo),wn(i,r),ur=m,Sn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{go(i.containerInfo)}catch(fe){Ke(r,r.return,fe)}Xf&&(Xf=!1,Pb(r));break;case 4:c=ur,ur=Iu(r.stateNode.containerInfo),wn(i,r),Sn(r),ur=c;break;case 12:wn(i,r),Sn(r);break;case 31:wn(i,r),Sn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Cu(r,c)));break;case 13:wn(i,r),Sn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Au=dt()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Cu(r,c)));break;case 22:m=r.memoizedState!==null;var M=s!==null&&s.memoizedState!==null,I=Hr,K=Dt;if(Hr=I||m,Dt=K||M,wn(i,r),Dt=K,Hr=I,Sn(r),c&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||M||Hr||Dt||hi(r)),s=null,i=r;;){if(i.tag===5||i.tag===26){if(s===null){M=s=i;try{if(y=M.stateNode,m)k=y.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{S=M.stateNode;var ee=M.memoizedProps.style,H=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;S.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(fe){Ke(M,M.return,fe)}}}else if(i.tag===6){if(s===null){M=i;try{M.stateNode.nodeValue=m?"":M.memoizedProps}catch(fe){Ke(M,M.return,fe)}}}else if(i.tag===18){if(s===null){M=i;try{var q=M.stateNode;m?Ev(q,!0):Ev(M.stateNode,!1)}catch(fe){Ke(M,M.return,fe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=r.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Cu(r,s))));break;case 19:wn(i,r),Sn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Cu(r,c)));break;case 30:break;case 21:break;default:wn(i,r),Sn(r)}}function Sn(r){var i=r.flags;if(i&2){try{for(var s,c=r.return;c!==null;){if(Nb(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,y=Gf(r);Eu(r,y,m);break;case 5:var k=s.stateNode;s.flags&32&&(Ui(k,""),s.flags&=-33);var S=Gf(r);Eu(r,S,k);break;case 3:case 4:var M=s.stateNode.containerInfo,I=Gf(r);Yf(r,I,M);break;default:throw Error(a(161))}}catch(K){Ke(r,r.return,K)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function Pb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;Pb(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function qr(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Rb(r,i.alternate,i),i=i.sibling}function hi(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:ya(4,i,i.return),hi(i);break;case 1:br(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&Eb(i,i.return,s),hi(i);break;case 27:Ps(i.stateNode);case 26:case 5:br(i,i.return),hi(i);break;case 22:i.memoizedState===null&&hi(i);break;case 30:hi(i);break;default:hi(i)}r=r.sibling}}function Gr(r,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=r,y=i,k=y.flags;switch(y.tag){case 0:case 11:case 15:Gr(m,y,s),Cs(4,y);break;case 1:if(Gr(m,y,s),c=y,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(I){Ke(c,c.return,I)}if(c=y,m=c.updateQueue,m!==null){var S=c.stateNode;try{var M=m.shared.hiddenCallbacks;if(M!==null)for(m.shared.hiddenCallbacks=null,m=0;m<M.length;m++)gx(M[m],S)}catch(I){Ke(c,c.return,I)}}s&&k&64&&jb(y),Ns(y,y.return);break;case 27:Ab(y);case 26:case 5:Gr(m,y,s),s&&c===null&&k&4&&Cb(y),Ns(y,y.return);break;case 12:Gr(m,y,s);break;case 31:Gr(m,y,s),s&&k&4&&$b(m,y);break;case 13:Gr(m,y,s),s&&k&4&&Lb(m,y);break;case 22:y.memoizedState===null&&Gr(m,y,s),Ns(y,y.return);break;case 30:break;default:Gr(m,y,s)}i=i.sibling}}function Kf(r,i){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&gs(s))}function Jf(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&gs(r))}function cr(r,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Vb(r,i,s,c),i=i.sibling}function Vb(r,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:cr(r,i,s,c),m&2048&&Cs(9,i);break;case 1:cr(r,i,s,c);break;case 3:cr(r,i,s,c),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&gs(r)));break;case 12:if(m&2048){cr(r,i,s,c),r=i.stateNode;try{var y=i.memoizedProps,k=y.id,S=y.onPostCommit;typeof S=="function"&&S(k,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(M){Ke(i,i.return,M)}}else cr(r,i,s,c);break;case 31:cr(r,i,s,c);break;case 13:cr(r,i,s,c);break;case 23:break;case 22:y=i.stateNode,k=i.alternate,i.memoizedState!==null?y._visibility&2?cr(r,i,s,c):As(r,i):y._visibility&2?cr(r,i,s,c):(y._visibility|=2,ao(r,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&Kf(k,i);break;case 24:cr(r,i,s,c),m&2048&&Jf(i.alternate,i);break;default:cr(r,i,s,c)}}function ao(r,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var y=r,k=i,S=s,M=c,I=k.flags;switch(k.tag){case 0:case 11:case 15:ao(y,k,S,M,m),Cs(8,k);break;case 23:break;case 22:var K=k.stateNode;k.memoizedState!==null?K._visibility&2?ao(y,k,S,M,m):As(y,k):(K._visibility|=2,ao(y,k,S,M,m)),m&&I&2048&&Kf(k.alternate,k);break;case 24:ao(y,k,S,M,m),m&&I&2048&&Jf(k.alternate,k);break;default:ao(y,k,S,M,m)}i=i.sibling}}function As(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=r,c=i,m=c.flags;switch(c.tag){case 22:As(s,c),m&2048&&Kf(c.alternate,c);break;case 24:As(s,c),m&2048&&Jf(c.alternate,c);break;default:As(s,c)}i=i.sibling}}var Os=8192;function io(r,i,s){if(r.subtreeFlags&Os)for(r=r.child;r!==null;)Zb(r,i,s),r=r.sibling}function Zb(r,i,s){switch(r.tag){case 26:io(r,i,s),r.flags&Os&&r.memoizedState!==null&&iE(s,ur,r.memoizedState,r.memoizedProps);break;case 5:io(r,i,s);break;case 3:case 4:var c=ur;ur=Iu(r.stateNode.containerInfo),io(r,i,s),ur=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Os,Os=16777216,io(r,i,s),Os=c):io(r,i,s));break;default:io(r,i,s)}}function Bb(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Rs(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Yt=c,Hb(c,r)}Bb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ib(r),r=r.sibling}function Ib(r){switch(r.tag){case 0:case 11:case 15:Rs(r),r.flags&2048&&ya(9,r,r.return);break;case 3:Rs(r);break;case 12:Rs(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Nu(r)):Rs(r);break;default:Rs(r)}}function Nu(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Yt=c,Hb(c,r)}Bb(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:ya(8,i,i.return),Nu(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Nu(i));break;default:Nu(i)}r=r.sibling}}function Hb(r,i){for(;Yt!==null;){var s=Yt;switch(s.tag){case 0:case 11:case 15:ya(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:gs(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,Yt=c;else e:for(s=r;Yt!==null;){c=Yt;var m=c.sibling,y=c.return;if(Mb(c),c===s){Yt=null;break e}if(m!==null){m.return=y,Yt=m;break e}Yt=y}}}var vj={getCacheForType:function(r){var i=Jt(Ot),s=i.data.get(r);return s===void 0&&(s=r(),i.data.set(r,s)),s},cacheSignal:function(){return Jt(Ot).controller.signal}},kj=typeof WeakMap=="function"?WeakMap:Map,Fe=0,it=null,Me=null,Le=0,Xe=0,Dn=null,xa=!1,oo=!1,Qf=!1,Yr=0,_t=0,ba=0,mi=0,Wf=0,$n=0,so=0,Ms=null,zn=null,eh=!1,Au=0,Fb=0,Ou=1/0,Ru=null,va=null,It=0,ka=null,lo=null,Xr=0,th=0,nh=null,qb=null,Ds=0,rh=null;function Ln(){return(Fe&2)!==0&&Le!==0?Le&-Le:E.T!==null?uh():ly()}function Gb(){if($n===0)if((Le&536870912)===0||Pe){var r=Zl;Zl<<=1,(Zl&3932160)===0&&(Zl=262144),$n=r}else $n=536870912;return r=Rn.current,r!==null&&(r.flags|=32),$n}function _n(r,i,s){(r===it&&(Xe===2||Xe===9)||r.cancelPendingCommit!==null)&&(uo(r,0),wa(r,Le,$n,!1)),ns(r,s),((Fe&2)===0||r!==it)&&(r===it&&((Fe&2)===0&&(mi|=s),_t===4&&wa(r,Le,$n,!1)),vr(r))}function Yb(r,i,s){if((Fe&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&r.expiredLanes)===0||ts(r,i),m=c?zj(r,i):ih(r,i,!0),y=c;do{if(m===0){oo&&!c&&wa(r,i,0,!1);break}else{if(s=r.current.alternate,y&&!wj(s)){m=ih(r,i,!1),y=!1;continue}if(m===2){if(y=i,r.errorRecoveryDisabledLanes&y)var k=0;else k=r.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){i=k;e:{var S=r;m=Ms;var M=S.current.memoizedState.isDehydrated;if(M&&(uo(S,k).flags|=256),k=ih(S,k,!1),k!==2){if(Qf&&!M){S.errorRecoveryDisabledLanes|=y,mi|=y,m=4;break e}y=zn,zn=m,y!==null&&(zn===null?zn=y:zn.push.apply(zn,y))}m=k}if(y=!1,m!==2)continue}}if(m===1){uo(r,0),wa(r,i,0,!0);break}e:{switch(c=r,y=m,y){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:wa(c,i,$n,!xa);break e;case 2:zn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=Au+300-dt(),10<m)){if(wa(c,i,$n,!xa),Il(c,0,!0)!==0)break e;Xr=i,c.timeoutHandle=_v(Xb.bind(null,c,s,zn,Ru,eh,i,$n,mi,so,xa,y,"Throttled",-0,0),m);break e}Xb(c,s,zn,Ru,eh,i,$n,mi,so,xa,y,null,-0,0)}}break}while(!0);vr(r)}function Xb(r,i,s,c,m,y,k,S,M,I,K,ee,H,q){if(r.timeoutHandle=-1,ee=i.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Mr},Zb(i,y,ee);var fe=(y&62914560)===y?Au-dt():(y&4194048)===y?Fb-dt():0;if(fe=oE(ee,fe),fe!==null){Xr=y,r.cancelPendingCommit=fe(rv.bind(null,r,i,y,s,c,m,k,S,M,K,ee,null,H,q)),wa(r,y,k,!I);return}}rv(r,i,y,s,c,m,k,S,M)}function wj(r){for(var i=r;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],y=m.getSnapshot;m=m.value;try{if(!An(y(),m))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function wa(r,i,s,c){i&=~Wf,i&=~mi,r.suspendedLanes|=i,r.pingedLanes&=~i,c&&(r.warmLanes|=i),c=r.expirationTimes;for(var m=i;0<m;){var y=31-at(m),k=1<<y;c[y]=-1,m&=~k}s!==0&&iy(r,s,i)}function Mu(){return(Fe&6)===0?($s(0),!1):!0}function ah(){if(Me!==null){if(Xe===0)var r=Me.return;else r=Me,Ur=ii=null,vf(r),Wi=null,xs=0,r=Me;for(;r!==null;)Tb(r.alternate,r),r=r.return;Me=null}}function uo(r,i){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,Bj(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Xr=0,ah(),it=r,Me=s=$r(r.current,null),Le=i,Xe=0,Dn=null,xa=!1,oo=ts(r,i),Qf=!1,so=$n=Wf=mi=ba=_t=0,zn=Ms=null,eh=!1,(i&8)!==0&&(i|=i&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=i;0<c;){var m=31-at(c),y=1<<m;i|=r[m],c&=~y}return Yr=i,tu(),s}function Kb(r,i){Ce=null,E.H=Ts,i===Qi||i===uu?(i=fx(),Xe=3):i===lf?(i=fx(),Xe=4):Xe=i===$f?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Dn=i,Me===null&&(_t=1,Su(r,Gn(i,r.current)))}function Jb(){var r=Rn.current;return r===null?!0:(Le&4194048)===Le?Jn===null:(Le&62914560)===Le||(Le&536870912)!==0?r===Jn:!1}function Qb(){var r=E.H;return E.H=Ts,r===null?Ts:r}function Wb(){var r=E.A;return E.A=vj,r}function Du(){_t=4,xa||(Le&4194048)!==Le&&Rn.current!==null||(oo=!0),(ba&134217727)===0&&(mi&134217727)===0||it===null||wa(it,Le,$n,!1)}function ih(r,i,s){var c=Fe;Fe|=2;var m=Qb(),y=Wb();(it!==r||Le!==i)&&(Ru=null,uo(r,i)),i=!1;var k=_t;e:do try{if(Xe!==0&&Me!==null){var S=Me,M=Dn;switch(Xe){case 8:ah(),k=6;break e;case 3:case 2:case 9:case 6:Rn.current===null&&(i=!0);var I=Xe;if(Xe=0,Dn=null,co(r,S,M,I),s&&oo){k=0;break e}break;default:I=Xe,Xe=0,Dn=null,co(r,S,M,I)}}Sj(),k=_t;break}catch(K){Kb(r,K)}while(!0);return i&&r.shellSuspendCounter++,Ur=ii=null,Fe=c,E.H=m,E.A=y,Me===null&&(it=null,Le=0,tu()),k}function Sj(){for(;Me!==null;)ev(Me)}function zj(r,i){var s=Fe;Fe|=2;var c=Qb(),m=Wb();it!==r||Le!==i?(Ru=null,Ou=dt()+500,uo(r,i)):oo=ts(r,i);e:do try{if(Xe!==0&&Me!==null){i=Me;var y=Dn;t:switch(Xe){case 1:Xe=0,Dn=null,co(r,i,y,1);break;case 2:case 9:if(cx(y)){Xe=0,Dn=null,tv(i);break}i=function(){Xe!==2&&Xe!==9||it!==r||(Xe=7),vr(r)},y.then(i,i);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:cx(y)?(Xe=0,Dn=null,tv(i)):(Xe=0,Dn=null,co(r,i,y,7));break;case 5:var k=null;switch(Me.tag){case 26:k=Me.memoizedState;case 5:case 27:var S=Me;if(k?Vv(k):S.stateNode.complete){Xe=0,Dn=null;var M=S.sibling;if(M!==null)Me=M;else{var I=S.return;I!==null?(Me=I,$u(I)):Me=null}break t}}Xe=0,Dn=null,co(r,i,y,5);break;case 6:Xe=0,Dn=null,co(r,i,y,6);break;case 8:ah(),_t=6;break e;default:throw Error(a(462))}}_j();break}catch(K){Kb(r,K)}while(!0);return Ur=ii=null,E.H=c,E.A=m,Fe=s,Me!==null?0:(it=null,Le=0,tu(),_t)}function _j(){for(;Me!==null&&!jt();)ev(Me)}function ev(r){var i=zb(r.alternate,r,Yr);r.memoizedProps=r.pendingProps,i===null?$u(r):Me=i}function tv(r){var i=r,s=i.alternate;switch(i.tag){case 15:case 0:i=xb(s,i,i.pendingProps,i.type,void 0,Le);break;case 11:i=xb(s,i,i.pendingProps,i.type.render,i.ref,Le);break;case 5:vf(i);default:Tb(s,i),i=Me=Wy(i,Yr),i=zb(s,i,Yr)}r.memoizedProps=r.pendingProps,i===null?$u(r):Me=i}function co(r,i,s,c){Ur=ii=null,vf(i),Wi=null,xs=0;var m=i.return;try{if(hj(r,m,i,s,Le)){_t=1,Su(r,Gn(s,r.current)),Me=null;return}}catch(y){if(m!==null)throw Me=m,y;_t=1,Su(r,Gn(s,r.current)),Me=null;return}i.flags&32768?(Pe||c===1?r=!0:oo||(Le&536870912)!==0?r=!1:(xa=r=!0,(c===2||c===9||c===3||c===6)&&(c=Rn.current,c!==null&&c.tag===13&&(c.flags|=16384))),nv(i,r)):$u(i)}function $u(r){var i=r;do{if((i.flags&32768)!==0){nv(i,xa);return}r=i.return;var s=gj(i.alternate,i,Yr);if(s!==null){Me=s;return}if(i=i.sibling,i!==null){Me=i;return}Me=i=r}while(i!==null);_t===0&&(_t=5)}function nv(r,i){do{var s=yj(r.alternate,r);if(s!==null){s.flags&=32767,Me=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(r=r.sibling,r!==null)){Me=r;return}Me=r=s}while(r!==null);_t=6,Me=null}function rv(r,i,s,c,m,y,k,S,M){r.cancelPendingCommit=null;do Lu();while(It!==0);if((Fe&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(y=i.lanes|i.childLanes,y|=qd,aT(r,s,y,k,S,M),r===it&&(Me=it=null,Le=0),lo=i,ka=r,Xr=s,th=y,nh=m,qb=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Cj(xe,function(){return lv(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=E.T,E.T=null,m=F.p,F.p=2,k=Fe,Fe|=4;try{xj(r,i,s)}finally{Fe=k,F.p=m,E.T=c}}It=1,av(),iv(),ov()}}function av(){if(It===1){It=0;var r=ka,i=lo,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=E.T,E.T=null;var c=F.p;F.p=2;var m=Fe;Fe|=4;try{Ub(i,r);var y=yh,k=Hy(r.containerInfo),S=y.focusedElem,M=y.selectionRange;if(k!==S&&S&&S.ownerDocument&&Iy(S.ownerDocument.documentElement,S)){if(M!==null&&Zd(S)){var I=M.start,K=M.end;if(K===void 0&&(K=I),"selectionStart"in S)S.selectionStart=I,S.selectionEnd=Math.min(K,S.value.length);else{var ee=S.ownerDocument||document,H=ee&&ee.defaultView||window;if(H.getSelection){var q=H.getSelection(),fe=S.textContent.length,Se=Math.min(M.start,fe),tt=M.end===void 0?Se:Math.min(M.end,fe);!q.extend&&Se>tt&&(k=tt,tt=Se,Se=k);var V=By(S,Se),D=By(S,tt);if(V&&D&&(q.rangeCount!==1||q.anchorNode!==V.node||q.anchorOffset!==V.offset||q.focusNode!==D.node||q.focusOffset!==D.offset)){var B=ee.createRange();B.setStart(V.node,V.offset),q.removeAllRanges(),Se>tt?(q.addRange(B),q.extend(D.node,D.offset)):(B.setEnd(D.node,D.offset),q.addRange(B))}}}}for(ee=[],q=S;q=q.parentNode;)q.nodeType===1&&ee.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ee.length;S++){var W=ee[S];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Xu=!!gh,yh=gh=null}finally{Fe=m,F.p=c,E.T=s}}r.current=i,It=2}}function iv(){if(It===2){It=0;var r=ka,i=lo,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=E.T,E.T=null;var c=F.p;F.p=2;var m=Fe;Fe|=4;try{Rb(r,i.alternate,i)}finally{Fe=m,F.p=c,E.T=s}}It=3}}function ov(){if(It===4||It===3){It=0,Zt();var r=ka,i=lo,s=Xr,c=qb;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?It=5:(It=0,lo=ka=null,sv(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(va=null),wd(s),i=i.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(cn,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=E.T,m=F.p,F.p=2,E.T=null;try{for(var y=r.onRecoverableError,k=0;k<c.length;k++){var S=c[k];y(S.value,{componentStack:S.stack})}}finally{E.T=i,F.p=m}}(Xr&3)!==0&&Lu(),vr(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===rh?Ds++:(Ds=0,rh=r):Ds=0,$s(0)}}function sv(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,gs(i)))}function Lu(){return av(),iv(),ov(),lv()}function lv(){if(It!==5)return!1;var r=ka,i=th;th=0;var s=wd(Xr),c=E.T,m=F.p;try{F.p=32>s?32:s,E.T=null,s=nh,nh=null;var y=ka,k=Xr;if(It=0,lo=ka=null,Xr=0,(Fe&6)!==0)throw Error(a(331));var S=Fe;if(Fe|=4,Ib(y.current),Vb(y,y.current,k,s),Fe=S,$s(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(cn,y)}catch{}return!0}finally{F.p=m,E.T=c,sv(r,i)}}function uv(r,i,s){i=Gn(s,i),i=Df(r.stateNode,i,2),r=ma(r,i,2),r!==null&&(ns(r,2),vr(r))}function Ke(r,i,s){if(r.tag===3)uv(r,r,s);else for(;i!==null;){if(i.tag===3){uv(i,r,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(va===null||!va.has(c))){r=Gn(s,r),s=cb(2),c=ma(i,s,2),c!==null&&(db(s,c,i,r),ns(c,2),vr(c));break}}i=i.return}}function oh(r,i,s){var c=r.pingCache;if(c===null){c=r.pingCache=new kj;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(Qf=!0,m.add(s),r=Tj.bind(null,r,i,s),i.then(r,r))}function Tj(r,i,s){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,it===r&&(Le&s)===s&&(_t===4||_t===3&&(Le&62914560)===Le&&300>dt()-Au?(Fe&2)===0&&uo(r,0):Wf|=s,so===Le&&(so=0)),vr(r)}function cv(r,i){i===0&&(i=ay()),r=ni(r,i),r!==null&&(ns(r,i),vr(r))}function jj(r){var i=r.memoizedState,s=0;i!==null&&(s=i.retryLane),cv(r,s)}function Ej(r,i){var s=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),cv(r,s)}function Cj(r,i){return qt(r,i)}var Uu=null,fo=null,sh=!1,Pu=!1,lh=!1,Sa=0;function vr(r){r!==fo&&r.next===null&&(fo===null?Uu=fo=r:fo=fo.next=r),Pu=!0,sh||(sh=!0,Aj())}function $s(r,i){if(!lh&&Pu){lh=!0;do for(var s=!1,c=Uu;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var y=0;else{var k=c.suspendedLanes,S=c.pingedLanes;y=(1<<31-at(42|r)+1)-1,y&=m&~(k&~S),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(s=!0,mv(c,y))}else y=Le,y=Il(c,c===it?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||ts(c,y)||(s=!0,mv(c,y));c=c.next}while(s);lh=!1}}function Nj(){dv()}function dv(){Pu=sh=!1;var r=0;Sa!==0&&Zj()&&(r=Sa);for(var i=dt(),s=null,c=Uu;c!==null;){var m=c.next,y=fv(c,i);y===0?(c.next=null,s===null?Uu=m:s.next=m,m===null&&(fo=s)):(s=c,(r!==0||(y&3)!==0)&&(Pu=!0)),c=m}It!==0&&It!==5||$s(r),Sa!==0&&(Sa=0)}function fv(r,i){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,y=r.pendingLanes&-62914561;0<y;){var k=31-at(y),S=1<<k,M=m[k];M===-1?((S&s)===0||(S&c)!==0)&&(m[k]=rT(S,i)):M<=i&&(r.expiredLanes|=S),y&=~S}if(i=it,s=Le,s=Il(r,r===i?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,s===0||r===i&&(Xe===2||Xe===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&In(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||ts(r,s)){if(i=s&-s,i===r.callbackPriority)return i;switch(c!==null&&In(c),wd(s)){case 2:case 8:s=ce;break;case 32:s=xe;break;case 268435456:s=Ve;break;default:s=xe}return c=hv.bind(null,r),s=qt(s,c),r.callbackPriority=i,r.callbackNode=s,i}return c!==null&&c!==null&&In(c),r.callbackPriority=2,r.callbackNode=null,2}function hv(r,i){if(It!==0&&It!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Lu()&&r.callbackNode!==s)return null;var c=Le;return c=Il(r,r===it?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(Yb(r,c,i),fv(r,dt()),r.callbackNode!=null&&r.callbackNode===s?hv.bind(null,r):null)}function mv(r,i){if(Lu())return null;Yb(r,i,!0)}function Aj(){Ij(function(){(Fe&6)!==0?qt(J,Nj):dv()})}function uh(){if(Sa===0){var r=Ki;r===0&&(r=Vl,Vl<<=1,(Vl&261888)===0&&(Vl=256)),Sa=r}return Sa}function pv(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Gl(""+r)}function gv(r,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,r.id&&s.setAttribute("form",r.id),i.parentNode.insertBefore(s,i),r=new FormData(r),s.parentNode.removeChild(s),r}function Oj(r,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var y=pv((m[bn]||null).action),k=c.submitter;k&&(i=(i=k[bn]||null)?pv(i.formAction):k.getAttribute("formAction"),i!==null&&(y=i,k=null));var S=new Jl("action","action",null,c,m);r.push({event:S,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Sa!==0){var M=k?gv(m,k):new FormData(m);Cf(s,{pending:!0,data:M,method:m.method,action:y},null,M)}}else typeof y=="function"&&(S.preventDefault(),M=k?gv(m,k):new FormData(m),Cf(s,{pending:!0,data:M,method:m.method,action:y},y,M))},currentTarget:m}]})}}for(var ch=0;ch<Fd.length;ch++){var dh=Fd[ch],Rj=dh.toLowerCase(),Mj=dh[0].toUpperCase()+dh.slice(1);lr(Rj,"on"+Mj)}lr(Gy,"onAnimationEnd"),lr(Yy,"onAnimationIteration"),lr(Xy,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(KT,"onTransitionRun"),lr(JT,"onTransitionStart"),lr(QT,"onTransitionCancel"),lr(Ky,"onTransitionEnd"),$i("onMouseEnter",["mouseout","mouseover"]),$i("onMouseLeave",["mouseout","mouseover"]),$i("onPointerEnter",["pointerout","pointerover"]),$i("onPointerLeave",["pointerout","pointerover"]),Qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ls="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(" "),Dj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ls));function yv(r,i){i=(i&4)!==0;for(var s=0;s<r.length;s++){var c=r[s],m=c.event;c=c.listeners;e:{var y=void 0;if(i)for(var k=c.length-1;0<=k;k--){var S=c[k],M=S.instance,I=S.currentTarget;if(S=S.listener,M!==y&&m.isPropagationStopped())break e;y=S,m.currentTarget=I;try{y(m)}catch(K){eu(K)}m.currentTarget=null,y=M}else for(k=0;k<c.length;k++){if(S=c[k],M=S.instance,I=S.currentTarget,S=S.listener,M!==y&&m.isPropagationStopped())break e;y=S,m.currentTarget=I;try{y(m)}catch(K){eu(K)}m.currentTarget=null,y=M}}}}function De(r,i){var s=i[Sd];s===void 0&&(s=i[Sd]=new Set);var c=r+"__bubble";s.has(c)||(xv(i,r,2,!1),s.add(c))}function fh(r,i,s){var c=0;i&&(c|=4),xv(s,r,c,i)}var Vu="_reactListening"+Math.random().toString(36).slice(2);function hh(r){if(!r[Vu]){r[Vu]=!0,dy.forEach(function(s){s!=="selectionchange"&&(Dj.has(s)||fh(s,!1,r),fh(s,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Vu]||(i[Vu]=!0,fh("selectionchange",!1,i))}}function xv(r,i,s,c){switch(Gv(i)){case 2:var m=uE;break;case 8:m=cE;break;default:m=Eh}s=m.bind(null,i,s,r),m=void 0,!Od||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,s,{capture:!0,passive:m}):r.addEventListener(i,s,!0):m!==void 0?r.addEventListener(i,s,{passive:m}):r.addEventListener(i,s,!1)}function mh(r,i,s,c,m){var y=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var k=c.tag;if(k===3||k===4){var S=c.stateNode.containerInfo;if(S===m)break;if(k===4)for(k=c.return;k!==null;){var M=k.tag;if((M===3||M===4)&&k.stateNode.containerInfo===m)return;k=k.return}for(;S!==null;){if(k=Ri(S),k===null)return;if(M=k.tag,M===5||M===6||M===26||M===27){c=y=k;continue e}S=S.parentNode}}c=c.return}Sy(function(){var I=y,K=Nd(s),ee=[];e:{var H=Jy.get(r);if(H!==void 0){var q=Jl,fe=r;switch(r){case"keypress":if(Xl(s)===0)break e;case"keydown":case"keyup":q=ET;break;case"focusin":fe="focus",q=$d;break;case"focusout":fe="blur",q=$d;break;case"beforeblur":case"afterblur":q=$d;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Ty;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=gT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=AT;break;case Gy:case Yy:case Xy:q=bT;break;case Ky:q=RT;break;case"scroll":case"scrollend":q=mT;break;case"wheel":q=DT;break;case"copy":case"cut":case"paste":q=kT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Ey;break;case"toggle":case"beforetoggle":q=LT}var Se=(i&4)!==0,tt=!Se&&(r==="scroll"||r==="scrollend"),V=Se?H!==null?H+"Capture":null:H;Se=[];for(var D=I,B;D!==null;){var W=D;if(B=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||B===null||V===null||(W=is(D,V),W!=null&&Se.push(Us(D,W,B))),tt)break;D=D.return}0<Se.length&&(H=new q(H,fe,null,s,K),ee.push({event:H,listeners:Se}))}}if((i&7)===0){e:{if(H=r==="mouseover"||r==="pointerover",q=r==="mouseout"||r==="pointerout",H&&s!==Cd&&(fe=s.relatedTarget||s.fromElement)&&(Ri(fe)||fe[Oi]))break e;if((q||H)&&(H=K.window===K?K:(H=K.ownerDocument)?H.defaultView||H.parentWindow:window,q?(fe=s.relatedTarget||s.toElement,q=I,fe=fe?Ri(fe):null,fe!==null&&(tt=u(fe),Se=fe.tag,fe!==tt||Se!==5&&Se!==27&&Se!==6)&&(fe=null)):(q=null,fe=I),q!==fe)){if(Se=Ty,W="onMouseLeave",V="onMouseEnter",D="mouse",(r==="pointerout"||r==="pointerover")&&(Se=Ey,W="onPointerLeave",V="onPointerEnter",D="pointer"),tt=q==null?H:as(q),B=fe==null?H:as(fe),H=new Se(W,D+"leave",q,s,K),H.target=tt,H.relatedTarget=B,W=null,Ri(K)===I&&(Se=new Se(V,D+"enter",fe,s,K),Se.target=B,Se.relatedTarget=tt,W=Se),tt=W,q&&fe)t:{for(Se=$j,V=q,D=fe,B=0,W=V;W;W=Se(W))B++;W=0;for(var we=D;we;we=Se(we))W++;for(;0<B-W;)V=Se(V),B--;for(;0<W-B;)D=Se(D),W--;for(;B--;){if(V===D||D!==null&&V===D.alternate){Se=V;break t}V=Se(V),D=Se(D)}Se=null}else Se=null;q!==null&&bv(ee,H,q,Se,!1),fe!==null&&tt!==null&&bv(ee,tt,fe,Se,!0)}}e:{if(H=I?as(I):window,q=H.nodeName&&H.nodeName.toLowerCase(),q==="select"||q==="input"&&H.type==="file")var Ie=$y;else if(My(H))if(Ly)Ie=GT;else{Ie=FT;var be=HT}else q=H.nodeName,!q||q.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?I&&Ed(I.elementType)&&(Ie=$y):Ie=qT;if(Ie&&(Ie=Ie(r,I))){Dy(ee,Ie,s,K);break e}be&&be(r,H,I),r==="focusout"&&I&&H.type==="number"&&I.memoizedProps.value!=null&&jd(H,"number",H.value)}switch(be=I?as(I):window,r){case"focusin":(My(be)||be.contentEditable==="true")&&(Bi=be,Bd=I,hs=null);break;case"focusout":hs=Bd=Bi=null;break;case"mousedown":Id=!0;break;case"contextmenu":case"mouseup":case"dragend":Id=!1,Fy(ee,s,K);break;case"selectionchange":if(XT)break;case"keydown":case"keyup":Fy(ee,s,K)}var Ae;if(Ud)e:{switch(r){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Zi?Oy(r,s)&&(Ue="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(Ue="onCompositionStart");Ue&&(Cy&&s.locale!=="ko"&&(Zi||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Zi&&(Ae=zy()):(sa=K,Rd="value"in sa?sa.value:sa.textContent,Zi=!0)),be=Zu(I,Ue),0<be.length&&(Ue=new jy(Ue,r,null,s,K),ee.push({event:Ue,listeners:be}),Ae?Ue.data=Ae:(Ae=Ry(s),Ae!==null&&(Ue.data=Ae)))),(Ae=PT?VT(r,s):ZT(r,s))&&(Ue=Zu(I,"onBeforeInput"),0<Ue.length&&(be=new jy("onBeforeInput","beforeinput",null,s,K),ee.push({event:be,listeners:Ue}),be.data=Ae)),Oj(ee,r,I,s,K)}yv(ee,i)})}function Us(r,i,s){return{instance:r,listener:i,currentTarget:s}}function Zu(r,i){for(var s=i+"Capture",c=[];r!==null;){var m=r,y=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||y===null||(m=is(r,s),m!=null&&c.unshift(Us(r,m,y)),m=is(r,i),m!=null&&c.push(Us(r,m,y))),r.tag===3)return c;r=r.return}return[]}function $j(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function bv(r,i,s,c,m){for(var y=i._reactName,k=[];s!==null&&s!==c;){var S=s,M=S.alternate,I=S.stateNode;if(S=S.tag,M!==null&&M===c)break;S!==5&&S!==26&&S!==27||I===null||(M=I,m?(I=is(s,y),I!=null&&k.unshift(Us(s,I,M))):m||(I=is(s,y),I!=null&&k.push(Us(s,I,M)))),s=s.return}k.length!==0&&r.push({event:i,listeners:k})}var Lj=/\r\n?/g,Uj=/\u0000|\uFFFD/g;function vv(r){return(typeof r=="string"?r:""+r).replace(Lj,`
9
- `).replace(Uj,"")}function kv(r,i){return i=vv(i),vv(r)===i}function et(r,i,s,c,m,y){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Ui(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Ui(r,""+c);break;case"className":Fl(r,"class",c);break;case"tabIndex":Fl(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Fl(r,s,c);break;case"style":ky(r,c,y);break;case"data":if(i!=="object"){Fl(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Gl(""+c),r.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(s,"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 y=="function"&&(s==="formAction"?(i!=="input"&&et(r,i,"name",m.name,m,null),et(r,i,"formEncType",m.formEncType,m,null),et(r,i,"formMethod",m.formMethod,m,null),et(r,i,"formTarget",m.formTarget,m,null)):(et(r,i,"encType",m.encType,m,null),et(r,i,"method",m.method,m,null),et(r,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Gl(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=Mr);break;case"onScroll":c!=null&&De("scroll",r);break;case"onScrollEnd":c!=null&&De("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}s=Gl(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""+c):r.removeAttribute(s);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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":c===!0?r.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,c):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(s,c):r.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(s):r.setAttribute(s,c);break;case"popover":De("beforetoggle",r),De("toggle",r),Hl(r,"popover",c);break;case"xlinkActuate":Rr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Rr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Rr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Rr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Rr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Rr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Hl(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=fT.get(s)||s,Hl(r,s,c))}}function ph(r,i,s,c,m,y){switch(s){case"style":ky(r,c,y);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof c=="string"?Ui(r,c):(typeof c=="number"||typeof c=="bigint")&&Ui(r,""+c);break;case"onScroll":c!=null&&De("scroll",r);break;case"onScrollEnd":c!=null&&De("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Mr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fy.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),y=r[bn]||null,y=y!=null?y[s]:null,typeof y=="function"&&r.removeEventListener(i,y,m),typeof c=="function")){typeof y!="function"&&y!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(i,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):Hl(r,s,c)}}}function Wt(r,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",r),De("load",r);var c=!1,m=!1,y;for(y in s)if(s.hasOwnProperty(y)){var k=s[y];if(k!=null)switch(y){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:et(r,i,y,k,s,null)}}m&&et(r,i,"srcSet",s.srcSet,s,null),c&&et(r,i,"src",s.src,s,null);return;case"input":De("invalid",r);var S=y=k=m=null,M=null,I=null;for(c in s)if(s.hasOwnProperty(c)){var K=s[c];if(K!=null)switch(c){case"name":m=K;break;case"type":k=K;break;case"checked":M=K;break;case"defaultChecked":I=K;break;case"value":y=K;break;case"defaultValue":S=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(a(137,i));break;default:et(r,i,c,K,s,null)}}yy(r,y,S,M,I,k,m,!1);return;case"select":De("invalid",r),c=k=y=null;for(m in s)if(s.hasOwnProperty(m)&&(S=s[m],S!=null))switch(m){case"value":y=S;break;case"defaultValue":k=S;break;case"multiple":c=S;default:et(r,i,m,S,s,null)}i=y,s=k,r.multiple=!!c,i!=null?Li(r,!!c,i,!1):s!=null&&Li(r,!!c,s,!0);return;case"textarea":De("invalid",r),y=m=c=null;for(k in s)if(s.hasOwnProperty(k)&&(S=s[k],S!=null))switch(k){case"value":c=S;break;case"defaultValue":m=S;break;case"children":y=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:et(r,i,k,S,s,null)}by(r,c,m,y);return;case"option":for(M in s)s.hasOwnProperty(M)&&(c=s[M],c!=null)&&(M==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":et(r,i,M,c,s,null));return;case"dialog":De("beforetoggle",r),De("toggle",r),De("cancel",r),De("close",r);break;case"iframe":case"object":De("load",r);break;case"video":case"audio":for(c=0;c<Ls.length;c++)De(Ls[c],r);break;case"image":De("error",r),De("load",r);break;case"details":De("toggle",r);break;case"embed":case"source":case"link":De("error",r),De("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in s)if(s.hasOwnProperty(I)&&(c=s[I],c!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:et(r,i,I,c,s,null)}return;default:if(Ed(i)){for(K in s)s.hasOwnProperty(K)&&(c=s[K],c!==void 0&&ph(r,i,K,c,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(c=s[S],c!=null&&et(r,i,S,c,s,null))}function Pj(r,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,y=null,k=null,S=null,M=null,I=null,K=null;for(q in s){var ee=s[q];if(s.hasOwnProperty(q)&&ee!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":M=ee;default:c.hasOwnProperty(q)||et(r,i,q,null,c,ee)}}for(var H in c){var q=c[H];if(ee=s[H],c.hasOwnProperty(H)&&(q!=null||ee!=null))switch(H){case"type":y=q;break;case"name":m=q;break;case"checked":I=q;break;case"defaultChecked":K=q;break;case"value":k=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,i));break;default:q!==ee&&et(r,i,H,q,c,ee)}}Td(r,k,S,M,I,K,y,m);return;case"select":q=k=S=H=null;for(y in s)if(M=s[y],s.hasOwnProperty(y)&&M!=null)switch(y){case"value":break;case"multiple":q=M;default:c.hasOwnProperty(y)||et(r,i,y,null,c,M)}for(m in c)if(y=c[m],M=s[m],c.hasOwnProperty(m)&&(y!=null||M!=null))switch(m){case"value":H=y;break;case"defaultValue":S=y;break;case"multiple":k=y;default:y!==M&&et(r,i,m,y,c,M)}i=S,s=k,c=q,H!=null?Li(r,!!s,H,!1):!!c!=!!s&&(i!=null?Li(r,!!s,i,!0):Li(r,!!s,s?[]:"",!1));return;case"textarea":q=H=null;for(S in s)if(m=s[S],s.hasOwnProperty(S)&&m!=null&&!c.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:et(r,i,S,null,c,m)}for(k in c)if(m=c[k],y=s[k],c.hasOwnProperty(k)&&(m!=null||y!=null))switch(k){case"value":H=m;break;case"defaultValue":q=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==y&&et(r,i,k,m,c,y)}xy(r,H,q);return;case"option":for(var fe in s)H=s[fe],s.hasOwnProperty(fe)&&H!=null&&!c.hasOwnProperty(fe)&&(fe==="selected"?r.selected=!1:et(r,i,fe,null,c,H));for(M in c)H=c[M],q=s[M],c.hasOwnProperty(M)&&H!==q&&(H!=null||q!=null)&&(M==="selected"?r.selected=H&&typeof H!="function"&&typeof H!="symbol":et(r,i,M,H,c,q));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in s)H=s[Se],s.hasOwnProperty(Se)&&H!=null&&!c.hasOwnProperty(Se)&&et(r,i,Se,null,c,H);for(I in c)if(H=c[I],q=s[I],c.hasOwnProperty(I)&&H!==q&&(H!=null||q!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,i));break;default:et(r,i,I,H,c,q)}return;default:if(Ed(i)){for(var tt in s)H=s[tt],s.hasOwnProperty(tt)&&H!==void 0&&!c.hasOwnProperty(tt)&&ph(r,i,tt,void 0,c,H);for(K in c)H=c[K],q=s[K],!c.hasOwnProperty(K)||H===q||H===void 0&&q===void 0||ph(r,i,K,H,c,q);return}}for(var V in s)H=s[V],s.hasOwnProperty(V)&&H!=null&&!c.hasOwnProperty(V)&&et(r,i,V,null,c,H);for(ee in c)H=c[ee],q=s[ee],!c.hasOwnProperty(ee)||H===q||H==null&&q==null||et(r,i,ee,H,c,q)}function wv(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vj(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],y=m.transferSize,k=m.initiatorType,S=m.duration;if(y&&S&&wv(k)){for(k=0,S=m.responseEnd,c+=1;c<s.length;c++){var M=s[c],I=M.startTime;if(I>S)break;var K=M.transferSize,ee=M.initiatorType;K&&wv(ee)&&(M=M.responseEnd,k+=K*(M<S?1:(S-I)/(M-I)))}if(--c,i+=8*(y+k)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var gh=null,yh=null;function Bu(r){return r.nodeType===9?r:r.ownerDocument}function Sv(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zv(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function xh(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var bh=null;function Zj(){var r=window.event;return r&&r.type==="popstate"?r===bh?!1:(bh=r,!0):(bh=null,!1)}var _v=typeof setTimeout=="function"?setTimeout:void 0,Bj=typeof clearTimeout=="function"?clearTimeout:void 0,Tv=typeof Promise=="function"?Promise:void 0,Ij=typeof queueMicrotask=="function"?queueMicrotask:typeof Tv<"u"?function(r){return Tv.resolve(null).then(r).catch(Hj)}:_v;function Hj(r){setTimeout(function(){throw r})}function za(r){return r==="head"}function jv(r,i){var s=i,c=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){r.removeChild(m),go(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ps(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ps(s);for(var y=s.firstChild;y;){var k=y.nextSibling,S=y.nodeName;y[rs]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&y.rel.toLowerCase()==="stylesheet"||s.removeChild(y),y=k}}else s==="body"&&Ps(r.ownerDocument.body);s=m}while(s);go(i)}function Ev(r,i){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=c}while(s)}function vh(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":vh(s),zd(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function Fj(r,i,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[rs])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(y=r.getAttribute("rel"),y==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(y!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(y=r.getAttribute("src"),(y!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&y&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var y=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===y)return r}else return r;if(r=Qn(r.nextSibling),r===null)break}return null}function qj(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Qn(r.nextSibling),r===null))return null;return r}function Cv(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Qn(r.nextSibling),r===null))return null;return r}function kh(r){return r.data==="$?"||r.data==="$~"}function wh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function Gj(r,i){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Qn(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Sh=null;function Nv(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return Qn(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function Av(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return r;i--}else s!=="/$"&&s!=="/&"||i++}r=r.previousSibling}return null}function Ov(r,i,s){switch(i=Bu(s),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ps(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);zd(r)}var Wn=new Map,Rv=new Set;function Iu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Kr=F.d;F.d={f:Yj,r:Xj,D:Kj,C:Jj,L:Qj,m:Wj,X:tE,S:eE,M:nE};function Yj(){var r=Kr.f(),i=Mu();return r||i}function Xj(r){var i=Mi(r);i!==null&&i.tag===5&&i.type==="form"?Kx(i):Kr.r(r)}var ho=typeof document>"u"?null:document;function Mv(r,i,s){var c=ho;if(c&&typeof i=="string"&&i){var m=Fn(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Rv.has(m)||(Rv.add(m),r={rel:r,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Wt(i,"link",r),Gt(i),c.head.appendChild(i)))}}function Kj(r){Kr.D(r),Mv("dns-prefetch",r,null)}function Jj(r,i){Kr.C(r,i),Mv("preconnect",r,i)}function Qj(r,i,s){Kr.L(r,i,s);var c=ho;if(c&&r&&i){var m='link[rel="preload"][as="'+Fn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Fn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Fn(s.imageSizes)+'"]')):m+='[href="'+Fn(r)+'"]';var y=m;switch(i){case"style":y=mo(r);break;case"script":y=po(r)}Wn.has(y)||(r=x({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),Wn.set(y,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(Vs(y))||i==="script"&&c.querySelector(Zs(y))||(i=c.createElement("link"),Wt(i,"link",r),Gt(i),c.head.appendChild(i)))}}function Wj(r,i){Kr.m(r,i);var s=ho;if(s&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Fn(c)+'"][href="'+Fn(r)+'"]',y=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=po(r)}if(!Wn.has(y)&&(r=x({rel:"modulepreload",href:r},i),Wn.set(y,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Zs(y)))return}c=s.createElement("link"),Wt(c,"link",r),Gt(c),s.head.appendChild(c)}}}function eE(r,i,s){Kr.S(r,i,s);var c=ho;if(c&&r){var m=Di(c).hoistableStyles,y=mo(r);i=i||"default";var k=m.get(y);if(!k){var S={loading:0,preload:null};if(k=c.querySelector(Vs(y)))S.loading=5;else{r=x({rel:"stylesheet",href:r,"data-precedence":i},s),(s=Wn.get(y))&&zh(r,s);var M=k=c.createElement("link");Gt(M),Wt(M,"link",r),M._p=new Promise(function(I,K){M.onload=I,M.onerror=K}),M.addEventListener("load",function(){S.loading|=1}),M.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Hu(k,i,c)}k={type:"stylesheet",instance:k,count:1,state:S},m.set(y,k)}}}function tE(r,i){Kr.X(r,i);var s=ho;if(s&&r){var c=Di(s).hoistableScripts,m=po(r),y=c.get(m);y||(y=s.querySelector(Zs(m)),y||(r=x({src:r,async:!0},i),(i=Wn.get(m))&&_h(r,i),y=s.createElement("script"),Gt(y),Wt(y,"link",r),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(m,y))}}function nE(r,i){Kr.M(r,i);var s=ho;if(s&&r){var c=Di(s).hoistableScripts,m=po(r),y=c.get(m);y||(y=s.querySelector(Zs(m)),y||(r=x({src:r,async:!0,type:"module"},i),(i=Wn.get(m))&&_h(r,i),y=s.createElement("script"),Gt(y),Wt(y,"link",r),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(m,y))}}function Dv(r,i,s,c){var m=(m=ge.current)?Iu(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=mo(s.href),s=Di(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=mo(s.href);var y=Di(m).hoistableStyles,k=y.get(r);if(k||(m=m.ownerDocument||m,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(r,k),(y=m.querySelector(Vs(r)))&&!y._p&&(k.instance=y,k.state.loading=5),Wn.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Wn.set(r,s),y||rE(m,r,s,k.state))),i&&c===null)throw Error(a(528,""));return k}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=po(s),s=Di(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function mo(r){return'href="'+Fn(r)+'"'}function Vs(r){return'link[rel="stylesheet"]['+r+"]"}function $v(r){return x({},r,{"data-precedence":r.precedence,precedence:null})}function rE(r,i,s,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Wt(i,"link",s),Gt(i),r.head.appendChild(i))}function po(r){return'[src="'+Fn(r)+'"]'}function Zs(r){return"script[async]"+r}function Lv(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Fn(s.href)+'"]');if(c)return i.instance=c,Gt(c),c;var m=x({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Gt(c),Wt(c,"style",m),Hu(c,s.precedence,r),i.instance=c;case"stylesheet":m=mo(s.href);var y=r.querySelector(Vs(m));if(y)return i.state.loading|=4,i.instance=y,Gt(y),y;c=$v(s),(m=Wn.get(m))&&zh(c,m),y=(r.ownerDocument||r).createElement("link"),Gt(y);var k=y;return k._p=new Promise(function(S,M){k.onload=S,k.onerror=M}),Wt(y,"link",c),i.state.loading|=4,Hu(y,s.precedence,r),i.instance=y;case"script":return y=po(s.src),(m=r.querySelector(Zs(y)))?(i.instance=m,Gt(m),m):(c=s,(m=Wn.get(y))&&(c=x({},s),_h(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),Gt(m),Wt(m,"link",c),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,Hu(c,s.precedence,r));return i.instance}function Hu(r,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,y=m,k=0;k<c.length;k++){var S=c[k];if(S.dataset.precedence===i)y=S;else if(y!==m)break}y?y.parentNode.insertBefore(r,y.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(r,i.firstChild))}function zh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function _h(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Fu=null;function Uv(r,i,s){if(Fu===null){var c=new Map,m=Fu=new Map;m.set(s,c)}else m=Fu,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(r))return c;for(c.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var y=s[m];if(!(y[rs]||y[Xt]||r==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var k=y.getAttribute(i)||"";k=r+k;var S=c.get(k);S?S.push(y):c.set(k,[y])}}return c}function Pv(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function aE(r,i,s){if(s===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Vv(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function iE(r,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=mo(c.href),y=i.querySelector(Vs(m));if(y){i=y._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=qu.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=y,Gt(y);return}y=i.ownerDocument||i,c=$v(c),(m=Wn.get(m))&&zh(c,m),y=y.createElement("link"),Gt(y);var k=y;k._p=new Promise(function(S,M){k.onload=S,k.onerror=M}),Wt(y,"link",c),s.instance=y}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=qu.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var Th=0;function oE(r,i){return r.stylesheets&&r.count===0&&Yu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&Yu(r,r.stylesheets),r.unsuspend){var y=r.unsuspend;r.unsuspend=null,y()}},6e4+i);0<r.imgBytes&&Th===0&&(Th=62500*Vj());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Yu(r,r.stylesheets),r.unsuspend)){var y=r.unsuspend;r.unsuspend=null,y()}},(r.imgBytes>Th?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function qu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Gu=null;function Yu(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Gu=new Map,i.forEach(sE,r),Gu=null,qu.call(r))}function sE(r,i){if(!(i.state.loading&4)){var s=Gu.get(r);if(s)var c=s.get(null);else{s=new Map,Gu.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<m.length;y++){var k=m[y];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(s.set(k.dataset.precedence,k),c=k)}c&&s.set(null,c)}m=i.instance,k=m.getAttribute("data-precedence"),y=s.get(k)||c,y===c&&s.set(null,m),s.set(k,m),this.count++,c=qu.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),y?y.parentNode.insertBefore(m,y.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var Bs={$$typeof:j,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function lE(r,i,s,c,m,y,k,S,M){this.tag=1,this.containerInfo=r,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=vd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vd(0),this.hiddenUpdates=vd(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=y,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Zv(r,i,s,c,m,y,k,S,M,I,K,ee){return r=new lE(r,i,s,k,M,I,K,ee,S),i=1,y===!0&&(i|=24),y=On(3,null,null,i),r.current=y,y.stateNode=r,i=af(),i.refCount++,r.pooledCache=i,i.refCount++,y.memoizedState={element:c,isDehydrated:s,cache:i},uf(y),r}function Bv(r){return r?(r=Fi,r):Fi}function Iv(r,i,s,c,m,y){m=Bv(m),c.context===null?c.context=m:c.pendingContext=m,c=ha(i),c.payload={element:s},y=y===void 0?null:y,y!==null&&(c.callback=y),s=ma(r,c,i),s!==null&&(_n(s,r,i),vs(s,r,i))}function Hv(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function jh(r,i){Hv(r,i),(r=r.alternate)&&Hv(r,i)}function Fv(r){if(r.tag===13||r.tag===31){var i=ni(r,67108864);i!==null&&_n(i,r,67108864),jh(r,67108864)}}function qv(r){if(r.tag===13||r.tag===31){var i=Ln();i=kd(i);var s=ni(r,i);s!==null&&_n(s,r,i),jh(r,i)}}var Xu=!0;function uE(r,i,s,c){var m=E.T;E.T=null;var y=F.p;try{F.p=2,Eh(r,i,s,c)}finally{F.p=y,E.T=m}}function cE(r,i,s,c){var m=E.T;E.T=null;var y=F.p;try{F.p=8,Eh(r,i,s,c)}finally{F.p=y,E.T=m}}function Eh(r,i,s,c){if(Xu){var m=Ch(c);if(m===null)mh(r,i,c,Ku,s),Yv(r,c);else if(fE(m,r,i,s,c))c.stopPropagation();else if(Yv(r,c),i&4&&-1<dE.indexOf(r)){for(;m!==null;){var y=Mi(m);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var k=Ja(y.pendingLanes);if(k!==0){var S=y;for(S.pendingLanes|=2,S.entangledLanes|=2;k;){var M=1<<31-at(k);S.entanglements[1]|=M,k&=~M}vr(y),(Fe&6)===0&&(Ou=dt()+500,$s(0))}}break;case 31:case 13:S=ni(y,2),S!==null&&_n(S,y,2),Mu(),jh(y,2)}if(y=Ch(c),y===null&&mh(r,i,c,Ku,s),y===m)break;m=y}m!==null&&c.stopPropagation()}else mh(r,i,c,null,s)}}function Ch(r){return r=Nd(r),Nh(r)}var Ku=null;function Nh(r){if(Ku=null,r=Ri(r),r!==null){var i=u(r);if(i===null)r=null;else{var s=i.tag;if(s===13){if(r=l(i),r!==null)return r;r=null}else if(s===31){if(r=d(i),r!==null)return r;r=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Ku=r,null}function Gv(r){switch(r){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(Ai()){case J:return 2;case ce:return 8;case xe:case _e:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var Ah=!1,_a=null,Ta=null,ja=null,Is=new Map,Hs=new Map,Ea=[],dE="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 Yv(r,i){switch(r){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":Ta=null;break;case"mouseover":case"mouseout":ja=null;break;case"pointerover":case"pointerout":Is.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hs.delete(i.pointerId)}}function Fs(r,i,s,c,m,y){return r===null||r.nativeEvent!==y?(r={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:y,targetContainers:[m]},i!==null&&(i=Mi(i),i!==null&&Fv(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function fE(r,i,s,c,m){switch(i){case"focusin":return _a=Fs(_a,r,i,s,c,m),!0;case"dragenter":return Ta=Fs(Ta,r,i,s,c,m),!0;case"mouseover":return ja=Fs(ja,r,i,s,c,m),!0;case"pointerover":var y=m.pointerId;return Is.set(y,Fs(Is.get(y)||null,r,i,s,c,m)),!0;case"gotpointercapture":return y=m.pointerId,Hs.set(y,Fs(Hs.get(y)||null,r,i,s,c,m)),!0}return!1}function Xv(r){var i=Ri(r.target);if(i!==null){var s=u(i);if(s!==null){if(i=s.tag,i===13){if(i=l(s),i!==null){r.blockedOn=i,uy(r.priority,function(){qv(s)});return}}else if(i===31){if(i=d(s),i!==null){r.blockedOn=i,uy(r.priority,function(){qv(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Ju(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var s=Ch(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);Cd=c,s.target.dispatchEvent(c),Cd=null}else return i=Mi(s),i!==null&&Fv(i),r.blockedOn=s,!1;i.shift()}return!0}function Kv(r,i,s){Ju(r)&&s.delete(i)}function hE(){Ah=!1,_a!==null&&Ju(_a)&&(_a=null),Ta!==null&&Ju(Ta)&&(Ta=null),ja!==null&&Ju(ja)&&(ja=null),Is.forEach(Kv),Hs.forEach(Kv)}function Qu(r,i){r.blockedOn===i&&(r.blockedOn=null,Ah||(Ah=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,hE)))}var Wu=null;function Jv(r){Wu!==r&&(Wu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wu===r&&(Wu=null);for(var i=0;i<r.length;i+=3){var s=r[i],c=r[i+1],m=r[i+2];if(typeof c!="function"){if(Nh(c||s)===null)continue;break}var y=Mi(s);y!==null&&(r.splice(i,3),i-=3,Cf(y,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function go(r){function i(M){return Qu(M,r)}_a!==null&&Qu(_a,r),Ta!==null&&Qu(Ta,r),ja!==null&&Qu(ja,r),Is.forEach(i),Hs.forEach(i);for(var s=0;s<Ea.length;s++){var c=Ea[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Ea.length&&(s=Ea[0],s.blockedOn===null);)Xv(s),s.blockedOn===null&&Ea.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],y=s[c+1],k=m[bn]||null;if(typeof y=="function")k||Jv(s);else if(k){var S=null;if(y&&y.hasAttribute("formAction")){if(m=y,k=y[bn]||null)S=k.formAction;else if(Nh(m)!==null)continue}else S=k.action;typeof S=="function"?s[c+1]=S:(s.splice(c,3),c-=3),Jv(s)}}}function Qv(){function r(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(k){return m=k})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function Oh(r){this._internalRoot=r}ec.prototype.render=Oh.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=Ln();Iv(s,c,r,i,null,null)},ec.prototype.unmount=Oh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Iv(r.current,2,null,r,null,null),Mu(),i[Oi]=null}};function ec(r){this._internalRoot=r}ec.prototype.unstable_scheduleHydration=function(r){if(r){var i=ly();r={blockedOn:null,target:r,priority:i};for(var s=0;s<Ea.length&&i!==0&&i<Ea[s].priority;s++);Ea.splice(s,0,r),s===0&&Xv(r)}};var Wv=t.version;if(Wv!=="19.2.4")throw Error(a(527,Wv,"19.2.4"));F.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var mE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tc.isDisabled&&tc.supportsFiber)try{cn=tc.inject(mE),Bt=tc}catch{}}return Gs.createRoot=function(r,i){if(!o(r))throw Error(a(299));var s=!1,c="",m=ob,y=sb,k=lb;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError)),i=Zv(r,1,!1,null,null,s,c,null,m,y,k,Qv),r[Oi]=i.current,hh(r),new Oh(i)},Gs.hydrateRoot=function(r,i,s){if(!o(r))throw Error(a(299));var c=!1,m="",y=ob,k=sb,S=lb,M=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(y=s.onUncaughtError),s.onCaughtError!==void 0&&(k=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(M=s.formState)),i=Zv(r,1,!0,i,s??null,c,m,M,y,k,S,Qv),i.context=Bv(null),s=i.current,c=Ln(),c=kd(c),m=ha(c),m.callback=null,ma(s,m,c),s=c,i.current.lanes=s,ns(i,s),vr(i),r[Oi]=i.current,hh(r),new ec(i)},Gs.version="19.2.4",Gs}var u0;function zE(){if(u0)return Dh.exports;u0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Dh.exports=SE(),Dh.exports}var _E=zE();var c0="popstate";function TE(e={}){function t(a,o){let{pathname:u,search:l,hash:d}=a.location;return Dm("",{pathname:u,search:l,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(a,o){return typeof o=="string"?o:pl(o)}return EE(t,n,null,e)}function gt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function mr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jE(){return Math.random().toString(36).substring(2,10)}function d0(e,t){return{usr:e.state,key:e.key,idx:t}}function Dm(e,t,n=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Io(t):t,state:n,key:t&&t.key||a||jE()}}function pl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Io(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function EE(e,t,n,a={}){let{window:o=document.defaultView,v5Compat:u=!1}=a,l=o.history,d="POP",f=null,h=g();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function g(){return(l.state||{idx:null}).idx}function x(){d="POP";let C=g(),N=C==null?null:C-h;h=C,f&&f({action:d,location:_.location,delta:N})}function b(C,N){d="PUSH";let R=Dm(_.location,C,N);h=g()+1;let j=d0(R,h),L=_.createHref(R);try{l.pushState(j,"",L)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(L)}u&&f&&f({action:d,location:_.location,delta:1})}function v(C,N){d="REPLACE";let R=Dm(_.location,C,N);h=g();let j=d0(R,h),L=_.createHref(R);l.replaceState(j,"",L),u&&f&&f({action:d,location:_.location,delta:0})}function w(C){return CE(C)}let _={get action(){return d},get location(){return e(o,l)},listen(C){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(c0,x),f=C,()=>{o.removeEventListener(c0,x),f=null}},createHref(C){return t(o,C)},createURL:w,encodeLocation(C){let N=w(C);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:b,replace:v,go(C){return l.go(C)}};return _}function CE(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),gt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:pl(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function $w(e,t,n="/"){return NE(e,t,n,!1)}function NE(e,t,n,a){let o=typeof t=="string"?Io(t):t,u=ra(o.pathname||"/",n);if(u==null)return null;let l=Lw(e);AE(l);let d=null;for(let f=0;d==null&&f<l.length;++f){let h=BE(u);d=VE(l[f],h,a)}return d}function Lw(e,t=[],n=[],a="",o=!1){let u=(l,d,f=o,h)=>{let g={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(a)&&f)return;gt(g.relativePath.startsWith(a),`Absolute route path "${g.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(a.length)}let x=ta([a,g.relativePath]),b=n.concat(g);l.children&&l.children.length>0&&(gt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Lw(l.children,t,b,x,f)),!(l.path==null&&!l.index)&&t.push({path:x,score:UE(x,l.index),routesMeta:b})};return e.forEach((l,d)=>{if(l.path===""||!l.path?.includes("?"))u(l,d);else for(let f of Uw(l.path))u(l,d,!0,f)}),t}function Uw(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,o=n.endsWith("?"),u=n.replace(/\?$/,"");if(a.length===0)return o?[u,""]:[u];let l=Uw(a.join("/")),d=[];return d.push(...l.map(f=>f===""?u:[u,f].join("/"))),o&&d.push(...l),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function AE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:PE(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var OE=/^:[\w-]+$/,RE=3,ME=2,DE=1,$E=10,LE=-2,f0=e=>e==="*";function UE(e,t){let n=e.split("/"),a=n.length;return n.some(f0)&&(a+=LE),t&&(a+=ME),n.filter(o=>!f0(o)).reduce((o,u)=>o+(OE.test(u)?RE:u===""?DE:$E),a)}function PE(e,t){return e.length===t.length&&e.slice(0,-1).every((a,o)=>a===t[o])?e[e.length-1]-t[t.length-1]:0}function VE(e,t,n=!1){let{routesMeta:a}=e,o={},u="/",l=[];for(let d=0;d<a.length;++d){let f=a[d],h=d===a.length-1,g=u==="/"?t:t.slice(u.length)||"/",x=Rc({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},g),b=f.route;if(!x&&h&&n&&!a[a.length-1].route.index&&(x=Rc({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},g)),!x)return null;Object.assign(o,x.params),l.push({params:o,pathname:ta([u,x.pathname]),pathnameBase:qE(ta([u,x.pathnameBase])),route:b}),x.pathnameBase!=="/"&&(u=ta([u,x.pathnameBase]))}return l}function Rc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=ZE(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let u=o[0],l=u.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:a.reduce((h,{paramName:g,isOptional:x},b)=>{if(g==="*"){let w=d[b]||"";l=u.slice(0,u.length-w.length).replace(/(.)\/+$/,"$1")}const v=d[b];return x&&!v?h[g]=void 0:h[g]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:l,pattern:e}}function ZE(e,t=!1,n=!0){mr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,d,f)=>(a.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),a]}function BE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ra(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var IE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function HE(e,t="/"){let{pathname:n,search:a="",hash:o=""}=typeof e=="string"?Io(e):e,u;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?u=h0(n.substring(1),"/"):u=h0(n,t)):u=t,{pathname:u,search:GE(a),hash:YE(o)}}function h0(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ph(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function FE(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Vp(e){let t=FE(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Zp(e,t,n,a=!1){let o;typeof e=="string"?o=Io(e):(o={...e},gt(!o.pathname||!o.pathname.includes("?"),Ph("?","pathname","search",o)),gt(!o.pathname||!o.pathname.includes("#"),Ph("#","pathname","hash",o)),gt(!o.search||!o.search.includes("#"),Ph("#","search","hash",o)));let u=e===""||o.pathname==="",l=u?"/":o.pathname,d;if(l==null)d=n;else{let x=t.length-1;if(!a&&l.startsWith("..")){let b=l.split("/");for(;b[0]==="..";)b.shift(),x-=1;o.pathname=b.join("/")}d=x>=0?t[x]:"/"}let f=HE(o,d),h=l&&l!=="/"&&l.endsWith("/"),g=(u||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||g)&&(f.pathname+="/"),f}var ta=e=>e.join("/").replace(/\/\/+/g,"/"),qE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),GE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,YE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,XE=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function KE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function JE(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Pw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vw(e,t){let n=e;if(typeof n!="string"||!IE.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,o=!1;if(Pw)try{let u=new URL(window.location.href),l=n.startsWith("//")?new URL(u.protocol+n):new URL(n),d=ra(l.pathname,t);l.origin===u.origin&&d!=null?n=d+l.search+l.hash:o=!0}catch{mr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Zw=["POST","PUT","PATCH","DELETE"];new Set(Zw);var QE=["GET",...Zw];new Set(QE);var Ho=z.createContext(null);Ho.displayName="DataRouter";var ed=z.createContext(null);ed.displayName="DataRouterState";var WE=z.createContext(!1),Bw=z.createContext({isTransitioning:!1});Bw.displayName="ViewTransition";var eC=z.createContext(new Map);eC.displayName="Fetchers";var tC=z.createContext(null);tC.displayName="Await";var Vn=z.createContext(null);Vn.displayName="Navigation";var Al=z.createContext(null);Al.displayName="Location";var Ar=z.createContext({outlet:null,matches:[],isDataRoute:!1});Ar.displayName="Route";var Bp=z.createContext(null);Bp.displayName="RouteError";var Iw="REACT_ROUTER_ERROR",nC="REDIRECT",rC="ROUTE_ERROR_RESPONSE";function aC(e){if(e.startsWith(`${Iw}:${nC}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function iC(e){if(e.startsWith(`${Iw}:${rC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new XE(t.status,t.statusText,t.data)}catch{}}function oC(e,{relative:t}={}){gt(Fo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=z.useContext(Vn),{hash:o,pathname:u,search:l}=Ol(e,{relative:t}),d=u;return n!=="/"&&(d=u==="/"?n:ta([n,u])),a.createHref({pathname:d,search:l,hash:o})}function Fo(){return z.useContext(Al)!=null}function pr(){return gt(Fo(),"useLocation() may be used only in the context of a <Router> component."),z.useContext(Al).location}var Hw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fw(e){z.useContext(Vn).static||z.useLayoutEffect(e)}function Ip(){let{isDataRoute:e}=z.useContext(Ar);return e?bC():sC()}function sC(){gt(Fo(),"useNavigate() may be used only in the context of a <Router> component.");let e=z.useContext(Ho),{basename:t,navigator:n}=z.useContext(Vn),{matches:a}=z.useContext(Ar),{pathname:o}=pr(),u=JSON.stringify(Vp(a)),l=z.useRef(!1);return Fw(()=>{l.current=!0}),z.useCallback((f,h={})=>{if(mr(l.current,Hw),!l.current)return;if(typeof f=="number"){n.go(f);return}let g=Zp(f,JSON.parse(u),o,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:ta([t,g.pathname])),(h.replace?n.replace:n.push)(g,h.state,h)},[t,n,u,o,e])}z.createContext(null);function Ol(e,{relative:t}={}){let{matches:n}=z.useContext(Ar),{pathname:a}=pr(),o=JSON.stringify(Vp(n));return z.useMemo(()=>Zp(e,JSON.parse(o),a,t==="path"),[e,o,a,t])}function lC(e,t){return qw(e,t)}function qw(e,t,n,a,o){gt(Fo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=z.useContext(Vn),{matches:l}=z.useContext(Ar),d=l[l.length-1],f=d?d.params:{},h=d?d.pathname:"/",g=d?d.pathnameBase:"/",x=d&&d.route;{let R=x&&x.path||"";Yw(h,!x||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
-
11
- Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let b=pr(),v;if(t){let R=typeof t=="string"?Io(t):t;gt(g==="/"||R.pathname?.startsWith(g),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${R.pathname}" was given in the \`location\` prop.`),v=R}else v=b;let w=v.pathname||"/",_=w;if(g!=="/"){let R=g.replace(/^\//,"").split("/");_="/"+w.replace(/^\//,"").split("/").slice(R.length).join("/")}let C=$w(e,{pathname:_});mr(x||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),mr(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let N=hC(C&&C.map(R=>Object.assign({},R,{params:Object.assign({},f,R.params),pathname:ta([g,u.encodeLocation?u.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?g:ta([g,u.encodeLocation?u.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),l,n,a,o);return t&&N?z.createElement(Al.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},N):N}function uC(){let e=xC(),t=KE(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},u={padding:"2px 4px",backgroundColor:a},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=z.createElement(z.Fragment,null,z.createElement("p",null,"💿 Hey developer 👋"),z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",z.createElement("code",{style:u},"ErrorBoundary")," or"," ",z.createElement("code",{style:u},"errorElement")," prop on your route.")),z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},t),n?z.createElement("pre",{style:o},n):null,l)}var cC=z.createElement(uC,null),Gw=class extends z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=iC(e.digest);n&&(e=n)}let t=e!==void 0?z.createElement(Ar.Provider,{value:this.props.routeContext},z.createElement(Bp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?z.createElement(dC,{error:e},t):t}};Gw.contextType=WE;var Vh=new WeakMap;function dC({children:e,error:t}){let{basename:n}=z.useContext(Vn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=aC(t.digest);if(a){let o=Vh.get(t);if(o)throw o;let u=Vw(a.location,n);if(Pw&&!Vh.get(t))if(u.isExternal||a.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:a.replace}));throw Vh.set(t,l),l}return z.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function fC({routeContext:e,match:t,children:n}){let a=z.useContext(Ho);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),z.createElement(Ar.Provider,{value:e},n)}function hC(e,t=[],n=null,a=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let u=e,l=n?.errors;if(l!=null){let g=u.findIndex(x=>x.route.id&&l?.[x.route.id]!==void 0);gt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),u=u.slice(0,Math.min(u.length,g+1))}let d=!1,f=-1;if(n)for(let g=0;g<u.length;g++){let x=u[g];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(f=g),x.route.id){let{loaderData:b,errors:v}=n,w=x.route.loader&&!b.hasOwnProperty(x.route.id)&&(!v||v[x.route.id]===void 0);if(x.route.lazy||w){d=!0,f>=0?u=u.slice(0,f+1):u=[u[0]];break}}}let h=n&&a?(g,x)=>{a(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:JE(n.matches),errorInfo:x})}:void 0;return u.reduceRight((g,x,b)=>{let v,w=!1,_=null,C=null;n&&(v=l&&x.route.id?l[x.route.id]:void 0,_=x.route.errorElement||cC,d&&(f<0&&b===0?(Yw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,C=null):f===b&&(w=!0,C=x.route.hydrateFallbackElement||null)));let N=t.concat(u.slice(0,b+1)),R=()=>{let j;return v?j=_:w?j=C:x.route.Component?j=z.createElement(x.route.Component,null):x.route.element?j=x.route.element:j=g,z.createElement(fC,{match:x,routeContext:{outlet:g,matches:N,isDataRoute:n!=null},children:j})};return n&&(x.route.ErrorBoundary||x.route.errorElement||b===0)?z.createElement(Gw,{location:n.location,revalidation:n.revalidation,component:_,error:v,children:R(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:h}):R()},null)}function Hp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mC(e){let t=z.useContext(Ho);return gt(t,Hp(e)),t}function pC(e){let t=z.useContext(ed);return gt(t,Hp(e)),t}function gC(e){let t=z.useContext(Ar);return gt(t,Hp(e)),t}function Fp(e){let t=gC(e),n=t.matches[t.matches.length-1];return gt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function yC(){return Fp("useRouteId")}function xC(){let e=z.useContext(Bp),t=pC("useRouteError"),n=Fp("useRouteError");return e!==void 0?e:t.errors?.[n]}function bC(){let{router:e}=mC("useNavigate"),t=Fp("useNavigate"),n=z.useRef(!1);return Fw(()=>{n.current=!0}),z.useCallback(async(o,u={})=>{mr(n.current,Hw),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var m0={};function Yw(e,t,n){!t&&!m0[e]&&(m0[e]=!0,mr(!1,n))}z.memo(vC);function vC({routes:e,future:t,state:n,onError:a}){return qw(e,void 0,n,a,t)}function Xw({to:e,replace:t,state:n,relative:a}){gt(Fo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=z.useContext(Vn);mr(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=z.useContext(Ar),{pathname:l}=pr(),d=Ip(),f=Zp(e,Vp(u),l,a==="path"),h=JSON.stringify(f);return z.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:a})},[d,h,a,t,n]),null}function fn(e){gt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function kC({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:o,static:u=!1,unstable_useTransitions:l}){gt(!Fo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=z.useMemo(()=>({basename:d,navigator:o,static:u,unstable_useTransitions:l,future:{}}),[d,o,u,l]);typeof n=="string"&&(n=Io(n));let{pathname:h="/",search:g="",hash:x="",state:b=null,key:v="default"}=n,w=z.useMemo(()=>{let _=ra(h,d);return _==null?null:{location:{pathname:_,search:g,hash:x,state:b,key:v},navigationType:a}},[d,h,g,x,b,v,a]);return mr(w!=null,`<Router basename="${d}"> is not able to match the URL "${h}${g}${x}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:z.createElement(Vn.Provider,{value:f},z.createElement(Al.Provider,{children:t,value:w}))}function p0({children:e,location:t}){return lC($m(e),t)}function $m(e,t=[]){let n=[];return z.Children.forEach(e,(a,o)=>{if(!z.isValidElement(a))return;let u=[...t,o];if(a.type===z.Fragment){n.push.apply(n,$m(a.props.children,u));return}gt(a.type===fn,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),gt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let l={id:a.props.id||u.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(l.children=$m(a.props.children,u)),n.push(l)}),n}var zc="get",_c="application/x-www-form-urlencoded";function td(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function wC(e){return td(e)&&e.tagName.toLowerCase()==="button"}function SC(e){return td(e)&&e.tagName.toLowerCase()==="form"}function zC(e){return td(e)&&e.tagName.toLowerCase()==="input"}function _C(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function TC(e,t){return e.button===0&&(!t||t==="_self")&&!_C(e)}var nc=null;function jC(){if(nc===null)try{new FormData(document.createElement("form"),0),nc=!1}catch{nc=!0}return nc}var EC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zh(e){return e!=null&&!EC.has(e)?(mr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_c}"`),null):e}function CC(e,t){let n,a,o,u,l;if(SC(e)){let d=e.getAttribute("action");a=d?ra(d,t):null,n=e.getAttribute("method")||zc,o=Zh(e.getAttribute("enctype"))||_c,u=new FormData(e)}else if(wC(e)||zC(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(a=f?ra(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||zc,o=Zh(e.getAttribute("formenctype"))||Zh(d.getAttribute("enctype"))||_c,u=new FormData(d,e),!jC()){let{name:h,type:g,value:x}=e;if(g==="image"){let b=h?`${h}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else h&&u.append(h,x)}}else{if(td(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=zc,a=null,o=_c,l=e}return u&&o==="text/plain"&&(l=u,u=void 0),{action:a,method:n.toLowerCase(),encType:o,formData:u,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function NC(e,t,n,a){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${a}`:o.pathname=`${o.pathname}.${a}`:o.pathname==="/"?o.pathname=`_root.${a}`:t&&ra(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${a}`,o}async function AC(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function OC(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function RC(e,t,n){let a=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let l=await AC(u,n);return l.links?l.links():[]}return[]}));return LC(a.flat(1).filter(OC).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function g0(e,t,n,a,o,u){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,d=(f,h)=>n[h].pathname!==f.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==f.params["*"];return u==="assets"?t.filter((f,h)=>l(f,h)||d(f,h)):u==="data"?t.filter((f,h)=>{let g=a.routes[f.route.id];if(!g||!g.hasLoader)return!1;if(l(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let x=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function MC(e,t,{includeHydrateFallback:n}={}){return DC(e.map(a=>{let o=t.routes[a.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function DC(e){return[...new Set(e)]}function $C(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function LC(e,t){let n=new Set;return new Set(t),e.reduce((a,o)=>{let u=JSON.stringify($C(o));return n.has(u)||(n.add(u),a.push({key:u,link:o})),a},[])}function Kw(){let e=z.useContext(Ho);return qp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function UC(){let e=z.useContext(ed);return qp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Gp=z.createContext(void 0);Gp.displayName="FrameworkContext";function Jw(){let e=z.useContext(Gp);return qp(e,"You must render this element inside a <HydratedRouter> element"),e}function PC(e,t){let n=z.useContext(Gp),[a,o]=z.useState(!1),[u,l]=z.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:g,onTouchStart:x}=t,b=z.useRef(null);z.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let _=N=>{N.forEach(R=>{l(R.isIntersecting)})},C=new IntersectionObserver(_,{threshold:.5});return b.current&&C.observe(b.current),()=>{C.disconnect()}}},[e]),z.useEffect(()=>{if(a){let _=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(_)}}},[a]);let v=()=>{o(!0)},w=()=>{o(!1),l(!1)};return n?e!=="intent"?[u,b,{}]:[u,b,{onFocus:Ys(d,v),onBlur:Ys(f,w),onMouseEnter:Ys(h,v),onMouseLeave:Ys(g,w),onTouchStart:Ys(x,v)}]:[!1,b,{}]}function Ys(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function VC({page:e,...t}){let{router:n}=Kw(),a=z.useMemo(()=>$w(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?z.createElement(BC,{page:e,matches:a,...t}):null}function ZC(e){let{manifest:t,routeModules:n}=Jw(),[a,o]=z.useState([]);return z.useEffect(()=>{let u=!1;return RC(e,t,n).then(l=>{u||o(l)}),()=>{u=!0}},[e,t,n]),a}function BC({page:e,matches:t,...n}){let a=pr(),{future:o,manifest:u,routeModules:l}=Jw(),{basename:d}=Kw(),{loaderData:f,matches:h}=UC(),g=z.useMemo(()=>g0(e,t,h,u,a,"data"),[e,t,h,u,a]),x=z.useMemo(()=>g0(e,t,h,u,a,"assets"),[e,t,h,u,a]),b=z.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let _=new Set,C=!1;if(t.forEach(R=>{let j=u.routes[R.route.id];!j||!j.hasLoader||(!g.some(L=>L.route.id===R.route.id)&&R.route.id in f&&l[R.route.id]?.shouldRevalidate||j.hasClientLoader?C=!0:_.add(R.route.id))}),_.size===0)return[];let N=NC(e,d,o.unstable_trailingSlashAwareDataRequests,"data");return C&&_.size>0&&N.searchParams.set("_routes",t.filter(R=>_.has(R.route.id)).map(R=>R.route.id).join(",")),[N.pathname+N.search]},[d,o.unstable_trailingSlashAwareDataRequests,f,a,u,g,t,e,l]),v=z.useMemo(()=>MC(x,u),[x,u]),w=ZC(x);return z.createElement(z.Fragment,null,b.map(_=>z.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),v.map(_=>z.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),w.map(({key:_,link:C})=>z.createElement("link",{key:_,nonce:n.nonce,...C,crossOrigin:C.crossOrigin??n.crossOrigin})))}function IC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var HC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{HC&&(window.__reactRouterVersion="7.13.0")}catch{}function FC({basename:e,children:t,unstable_useTransitions:n,window:a}){let o=z.useRef();o.current==null&&(o.current=TE({window:a,v5Compat:!0}));let u=o.current,[l,d]=z.useState({action:u.action,location:u.location}),f=z.useCallback(h=>{n===!1?d(h):z.startTransition(()=>d(h))},[n]);return z.useLayoutEffect(()=>u.listen(f),[u,f]),z.createElement(kC,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,unstable_useTransitions:n})}var Qw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wr=z.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:o,reloadDocument:u,replace:l,state:d,target:f,to:h,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:b,...v},w){let{basename:_,unstable_useTransitions:C}=z.useContext(Vn),N=typeof h=="string"&&Qw.test(h),R=Vw(h,_);h=R.to;let j=oC(h,{relative:o}),[L,P,$]=PC(a,v),Y=XC(h,{replace:l,state:d,target:f,preventScrollReset:g,relative:o,viewTransition:x,unstable_defaultShouldRevalidate:b,unstable_useTransitions:C});function U(ue){t&&t(ue),ue.defaultPrevented||Y(ue)}let X=z.createElement("a",{...v,...$,href:R.absoluteURL||j,onClick:R.isExternal||u?t:U,ref:IC(w,P),target:f,"data-discover":!N&&n==="render"?"true":void 0});return L&&!N?z.createElement(z.Fragment,null,X,z.createElement(VC,{page:j})):X});wr.displayName="Link";var qC=z.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:o=!1,style:u,to:l,viewTransition:d,children:f,...h},g){let x=Ol(l,{relative:h.relative}),b=pr(),v=z.useContext(ed),{navigator:w,basename:_}=z.useContext(Vn),C=v!=null&&eN(x)&&d===!0,N=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,R=b.pathname,j=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(R=R.toLowerCase(),j=j?j.toLowerCase():null,N=N.toLowerCase()),j&&_&&(j=ra(j,_)||j);const L=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let P=R===N||!o&&R.startsWith(N)&&R.charAt(L)==="/",$=j!=null&&(j===N||!o&&j.startsWith(N)&&j.charAt(N.length)==="/"),Y={isActive:P,isPending:$,isTransitioning:C},U=P?t:void 0,X;typeof a=="function"?X=a(Y):X=[a,P?"active":null,$?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let ue=typeof u=="function"?u(Y):u;return z.createElement(wr,{...h,"aria-current":U,className:X,ref:g,style:ue,to:l,viewTransition:d},typeof f=="function"?f(Y):f)});qC.displayName="NavLink";var GC=z.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:o,state:u,method:l=zc,action:d,onSubmit:f,relative:h,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:b,...v},w)=>{let{unstable_useTransitions:_}=z.useContext(Vn),C=QC(),N=WC(d,{relative:h}),R=l.toLowerCase()==="get"?"get":"post",j=typeof d=="string"&&Qw.test(d),L=P=>{if(f&&f(P),P.defaultPrevented)return;P.preventDefault();let $=P.nativeEvent.submitter,Y=$?.getAttribute("formmethod")||l,U=()=>C($||P.currentTarget,{fetcherKey:t,method:Y,navigate:n,replace:o,state:u,relative:h,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:b});_&&n!==!1?z.startTransition(()=>U()):U()};return z.createElement("form",{ref:w,method:R,action:N,onSubmit:a?f:L,...v,"data-discover":!j&&e==="render"?"true":void 0})});GC.displayName="Form";function YC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ww(e){let t=z.useContext(Ho);return gt(t,YC(e)),t}function XC(e,{target:t,replace:n,state:a,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:d,unstable_useTransitions:f}={}){let h=Ip(),g=pr(),x=Ol(e,{relative:u});return z.useCallback(b=>{if(TC(b,t)){b.preventDefault();let v=n!==void 0?n:pl(g)===pl(x),w=()=>h(e,{replace:v,state:a,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:d});f?z.startTransition(()=>w()):w()}},[g,h,x,n,a,t,e,o,u,l,d,f])}var KC=0,JC=()=>`__${String(++KC)}__`;function QC(){let{router:e}=Ww("useSubmit"),{basename:t}=z.useContext(Vn),n=yC(),a=e.fetch,o=e.navigate;return z.useCallback(async(u,l={})=>{let{action:d,method:f,encType:h,formData:g,body:x}=CC(u,t);if(l.navigate===!1){let b=l.fetcherKey||JC();await a(b,n,l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:x,formMethod:l.method||f,formEncType:l.encType||h,flushSync:l.flushSync})}else await o(l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:x,formMethod:l.method||f,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[a,o,t,n])}function WC(e,{relative:t}={}){let{basename:n}=z.useContext(Vn),a=z.useContext(Ar);gt(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),u={...Ol(e||".",{relative:t})},l=pr();if(e==null){u.search=l.search;let d=new URLSearchParams(u.search),f=d.getAll("index");if(f.some(g=>g==="")){d.delete("index"),f.filter(x=>x).forEach(x=>d.append("index",x));let g=d.toString();u.search=g?`?${g}`:""}}return(!e||e===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(u.pathname=u.pathname==="/"?n:ta([n,u.pathname])),pl(u)}function eN(e,{relative:t}={}){let n=z.useContext(Bw);gt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ww("useViewTransitionState"),o=Ol(e,{relative:t});if(!n.isTransitioning)return!1;let u=ra(n.currentLocation.pathname,a)||n.currentLocation.pathname,l=ra(n.nextLocation.pathname,a)||n.nextLocation.pathname;return Rc(o.pathname,l)!=null||Rc(o.pathname,u)!=null}const eS=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();const tN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const nN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());const y0=e=>{const t=nN(e);return t.charAt(0).toUpperCase()+t.slice(1)};var rN={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"};const aN=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const iN=z.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:u,iconNode:l,...d},f)=>z.createElement("svg",{ref:f,...rN,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:eS("lucide",o),...!u&&!aN(d)&&{"aria-hidden":"true"},...d},[...l.map(([h,g])=>z.createElement(h,g)),...Array.isArray(u)?u:[u]]));const ze=(e,t)=>{const n=z.forwardRef(({className:a,...o},u)=>z.createElement(iN,{ref:u,iconNode:t,className:eS(`lucide-${tN(y0(e))}`,`lucide-${e}`,a),...o}));return n.displayName=y0(e),n};const oN=[["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"}]],So=ze("activity",oN);const sN=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],lN=ze("archive",sN);const uN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],tS=ze("arrow-down",uN);const cN=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],dN=ze("arrow-left",cN);const fN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],nS=ze("arrow-up",fN);const hN=[["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"}]],gl=ze("bell",hN);const mN=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],x0=ze("bot",mN);const pN=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],gN=ze("box",pN);const yN=[["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"}]],xN=ze("brain",yN);const bN=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],rS=ze("calendar",bN);const vN=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Lm=ze("chart-column",vN);const kN=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],wN=ze("check-check",kN);const SN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Um=ze("check",SN);const zN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],aS=ze("circle-check",zN);const _N=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Pm=ze("circle-x",_N);const TN=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nd=ze("clock",TN);const jN=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],EN=ze("copy",jN);const CN=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],iS=ze("cpu",CN);const NN=[["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"}]],AN=ze("database",NN);const ON=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],Mc=ze("dollar-sign",ON);const RN=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],rd=ze("eye",RN);const MN=[["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"}]],DN=ze("file-text",MN);const $N=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],LN=ze("funnel",$N);const UN=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],PN=ze("hash",UN);const VN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ZN=ze("info",VN);const BN=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],b0=ze("layout-dashboard",BN);const IN=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Vm=ze("list-checks",IN);const HN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],FN=ze("loader-circle",HN);const qN=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],v0=ze("log-out",qN);const GN=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],YN=ze("menu",GN);const XN=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],k0=ze("message-square-plus",XN);const KN=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],yl=ze("message-square",KN);const JN=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],oS=ze("moon",JN);const QN=[["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"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Yp=ze("pencil",QN);const WN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],sS=ze("plus",WN);const eA=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],w0=ze("puzzle",eA);const tA=[["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"}]],nA=ze("refresh-cw",tA);const rA=[["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"}]],S0=ze("rotate-ccw",rA);const aA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],iA=ze("search",aA);const oA=[["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"}]],sA=ze("send",oA);const lA=[["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"}]],z0=ze("settings",lA);const uA=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],lS=ze("sun",uA);const cA=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],dA=ze("tag",cA);const fA=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Zm=ze("terminal",fA);const hA=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],mA=ze("toggle-left",hA);const pA=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],gA=ze("toggle-right",pA);const yA=[["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"}]],xl=ze("trash-2",yA);const xA=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],bA=ze("trending-up",xA);const vA=[["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"}]],kA=ze("user",vA);const wA=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],Bm=ze("webhook",wA);const SA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zA=ze("x",SA);var Bh={exports:{}},Ih={};var _0;function _A(){if(_0)return Ih;_0=1;var e=Wc();function t(x,b){return x===b&&(x!==0||1/x===1/b)||x!==x&&b!==b}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,u=e.useLayoutEffect,l=e.useDebugValue;function d(x,b){var v=b(),w=a({inst:{value:v,getSnapshot:b}}),_=w[0].inst,C=w[1];return u(function(){_.value=v,_.getSnapshot=b,f(_)&&C({inst:_})},[x,v,b]),o(function(){return f(_)&&C({inst:_}),x(function(){f(_)&&C({inst:_})})},[x]),l(v),v}function f(x){var b=x.getSnapshot;x=x.value;try{var v=b();return!n(x,v)}catch{return!0}}function h(x,b){return b()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return Ih.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,Ih}var T0;function TA(){return T0||(T0=1,Bh.exports=_A()),Bh.exports}var j0=TA();const uS=0,cS=1,dS=2,E0=3;var C0=Object.prototype.hasOwnProperty;function Im(e,t){var n,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((a=e.length)===t.length)for(;a--&&Im(e[a],t[a]););return a===-1}if(!n||typeof e=="object"){a=0;for(n in e)if(C0.call(e,n)&&++a&&!C0.call(t,n)||!(n in t)||!Im(e[n],t[n]))return!1;return Object.keys(t).length===a}}return e!==e&&t!==t}const Wr=new WeakMap,ea=()=>{},rn=ea(),Hm=Object,Ze=e=>e===rn,Sr=e=>typeof e=="function",Pa=(e,t)=>({...e,...t}),fS=e=>Sr(e.then),Hh={},rc={},Xp="undefined",Rl=typeof window!=Xp,Fm=typeof document!=Xp,jA=Rl&&"Deno"in window,EA=()=>Rl&&typeof window.requestAnimationFrame!=Xp,hS=(e,t)=>{const n=Wr.get(e);return[()=>!Ze(t)&&e.get(t)||Hh,a=>{if(!Ze(t)){const o=e.get(t);t in rc||(rc[t]=o),n[5](t,Pa(o,a),o||Hh)}},n[6],()=>!Ze(t)&&t in rc?rc[t]:!Ze(t)&&e.get(t)||Hh]};let qm=!0;const CA=()=>qm,[Gm,Ym]=Rl&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ea,ea],NA=()=>{const e=Fm&&document.visibilityState;return Ze(e)||e!=="hidden"},AA=e=>(Fm&&document.addEventListener("visibilitychange",e),Gm("focus",e),()=>{Fm&&document.removeEventListener("visibilitychange",e),Ym("focus",e)}),OA=e=>{const t=()=>{qm=!0,e()},n=()=>{qm=!1};return Gm("online",t),Gm("offline",n),()=>{Ym("online",t),Ym("offline",n)}},RA={isOnline:CA,isVisible:NA},MA={initFocus:AA,initReconnect:OA},N0=!Pp.useId,Ao=!Rl||jA,DA=e=>EA()?window.requestAnimationFrame(e):setTimeout(e,1),Fh=Ao?z.useEffect:z.useLayoutEffect,qh=typeof navigator<"u"&&navigator.connection,A0=!Ao&&qh&&(["slow-2g","2g"].includes(qh.effectiveType)||qh.saveData),ac=new WeakMap,$A=e=>Hm.prototype.toString.call(e),Gh=(e,t)=>e===`[object ${t}]`;let LA=0;const Xm=e=>{const t=typeof e,n=$A(e),a=Gh(n,"Date"),o=Gh(n,"RegExp"),u=Gh(n,"Object");let l,d;if(Hm(e)===e&&!a&&!o){if(l=ac.get(e),l)return l;if(l=++LA+"~",ac.set(e,l),Array.isArray(e)){for(l="@",d=0;d<e.length;d++)l+=Xm(e[d])+",";ac.set(e,l)}if(u){l="#";const f=Hm.keys(e).sort();for(;!Ze(d=f.pop());)Ze(e[d])||(l+=d+":"+Xm(e[d])+",");ac.set(e,l)}}else l=a?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return l},Kp=e=>{if(Sr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Xm(e):"",[e,t]};let UA=0;const Km=()=>++UA;async function mS(...e){const[t,n,a,o]=e,u=Pa({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let l=u.populateCache;const d=u.rollbackOnError;let f=u.optimisticData;const h=b=>typeof d=="function"?d(b):d!==!1,g=u.throwOnError;if(Sr(n)){const b=n,v=[],w=t.keys();for(const _ of w)!/^\$(inf|sub)\$/.test(_)&&b(t.get(_)._k)&&v.push(_);return Promise.all(v.map(x))}return x(n);async function x(b){const[v]=Kp(b);if(!v)return;const[w,_]=hS(t,v),[C,N,R,j]=Wr.get(t),L=()=>{const se=C[v];return(Sr(u.revalidate)?u.revalidate(w().data,b):u.revalidate!==!1)&&(delete R[v],delete j[v],se&&se[0])?se[0](dS).then(()=>w().data):w().data};if(e.length<3)return L();let P=a,$,Y=!1;const U=Km();N[v]=[U,0];const X=!Ze(f),ue=w(),ae=ue.data,oe=ue._c,te=Ze(oe)?ae:oe;if(X&&(f=Sr(f)?f(te,ae):f,_({data:f,_c:te})),Sr(P))try{P=P(te)}catch(se){$=se,Y=!0}if(P&&fS(P))if(P=await P.catch(se=>{$=se,Y=!0}),U!==N[v][0]){if(Y)throw $;return P}else Y&&X&&h($)&&(l=!0,_({data:te,_c:rn}));if(l&&!Y)if(Sr(l)){const se=l(P,te);_({data:se,error:rn,_c:rn})}else _({data:P,error:rn,_c:rn});if(N[v][1]=Km(),Promise.resolve(L()).then(()=>{_({_c:rn})}),Y){if(g)throw $;return}return P}}const O0=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},PA=(e,t)=>{if(!Wr.has(e)){const n=Pa(MA,t),a=Object.create(null),o=mS.bind(rn,e);let u=ea;const l=Object.create(null),d=(g,x)=>{const b=l[g]||[];return l[g]=b,b.push(x),()=>b.splice(b.indexOf(x),1)},f=(g,x,b)=>{e.set(g,x);const v=l[g];if(v)for(const w of v)w(x,b)},h=()=>{if(!Wr.has(e)&&(Wr.set(e,[a,Object.create(null),Object.create(null),Object.create(null),o,f,d]),!Ao)){const g=n.initFocus(setTimeout.bind(rn,O0.bind(rn,a,uS))),x=n.initReconnect(setTimeout.bind(rn,O0.bind(rn,a,cS)));u=()=>{g&&g(),x&&x(),Wr.delete(e)}}};return h(),[e,o,h,u]}return[e,Wr.get(e)[4]]},VA=(e,t,n,a,o)=>{const u=n.errorRetryCount,l=o.retryCount,d=~~((Math.random()+.5)*(1<<(l<8?l:8)))*n.errorRetryInterval;!Ze(u)&&l>u||setTimeout(a,d,o)},ZA=Im,[pS,rl]=PA(new Map),BA=Pa({onLoadingSlow:ea,onSuccess:ea,onError:ea,onErrorRetry:VA,onDiscarded:ea,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:A0?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:A0?5e3:3e3,compare:ZA,isPaused:()=>!1,cache:pS,mutate:rl,fallback:{}},RA),IA=(e,t)=>{const n=Pa(e,t);if(t){const{use:a,fallback:o}=e,{use:u,fallback:l}=t;a&&u&&(n.use=a.concat(u)),o&&l&&(n.fallback=Pa(o,l))}return n},HA=z.createContext({}),FA="$inf$",gS=Rl&&window.__SWR_DEVTOOLS_USE__,qA=gS?window.__SWR_DEVTOOLS_USE__:[],GA=()=>{gS&&(window.__SWR_DEVTOOLS_REACT__=Pp)},YA=e=>Sr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],XA=()=>{const e=z.useContext(HA);return z.useMemo(()=>Pa(BA,e),[e])},KA=e=>(t,n,a)=>e(t,n&&((...u)=>{const[l]=Kp(t),[,,,d]=Wr.get(pS);if(l.startsWith(FA))return n(...u);const f=d[l];return Ze(f)?n(...u):(delete d[l],f)}),a),JA=qA.concat(KA),QA=e=>function(...n){const a=XA(),[o,u,l]=YA(n),d=IA(a,l);let f=e;const{use:h}=d,g=(h||[]).concat(JA);for(let x=g.length;x--;)f=g[x](f);return f(o,u||d.fetcher||null,d)},WA=(e,t,n)=>{const a=t[e]||(t[e]=[]);return a.push(n),()=>{const o=a.indexOf(n);o>=0&&(a[o]=a[a.length-1],a.pop())}};GA();const Yh=Pp.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),Xh={dedupe:!0},R0=Promise.resolve(rn),e4=(e,t,n)=>{const{cache:a,compare:o,suspense:u,fallbackData:l,revalidateOnMount:d,revalidateIfStale:f,refreshInterval:h,refreshWhenHidden:g,refreshWhenOffline:x,keepPreviousData:b,strictServerPrefetchWarning:v}=n,[w,_,C,N]=Wr.get(a),[R,j]=Kp(e),L=z.useRef(!1),P=z.useRef(!1),$=z.useRef(R),Y=z.useRef(t),U=z.useRef(n),X=()=>U.current,ue=()=>X().isVisible()&&X().isOnline(),[ae,oe,te,se]=hS(a,R),re=z.useRef({}).current,E=Ze(l)?Ze(n.fallback)?rn:n.fallback[R]:l,F=(Be,rt)=>{for(const ct in re){const Qe=ct;if(Qe==="data"){if(!o(Be[Qe],rt[Qe])&&(!Ze(Be[Qe])||!o(ge,rt[Qe])))return!1}else if(rt[Qe]!==Be[Qe])return!1}return!0},Z=z.useMemo(()=>{const Be=!R||!t?!1:Ze(d)?X().isPaused()||u?!1:f!==!1:d,rt=Zt=>{const dt=Pa(Zt);return delete dt._k,Be?{isValidating:!0,isLoading:!0,...dt}:dt},ct=ae(),Qe=se(),qt=rt(ct),In=ct===Qe?qt:rt(Qe);let jt=qt;return[()=>{const Zt=rt(ae());return F(Zt,jt)?(jt.data=Zt.data,jt.isLoading=Zt.isLoading,jt.isValidating=Zt.isValidating,jt.error=Zt.error,jt):(jt=Zt,Zt)},()=>In]},[a,R]),de=j0.useSyncExternalStore(z.useCallback(Be=>te(R,(rt,ct)=>{F(ct,rt)||Be()}),[a,R]),Z[0],Z[1]),O=!L.current,A=w[R]&&w[R].length>0,G=de.data,T=Ze(G)?E&&fS(E)?Yh(E):E:G,ie=de.error,ve=z.useRef(T),ge=b?Ze(G)?Ze(ve.current)?T:ve.current:G:T,ye=R&&Ze(T),Ye=!Ao&&j0.useSyncExternalStore(()=>ea,()=>!1,()=>!0);v&&Ye&&!u&&ye&&console.warn(`Missing pre-initiated data for serialized key "${R}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const $e=A&&!Ze(ie)?!1:O&&!Ze(d)?d:X().isPaused()?!1:u?Ze(T)?!1:f:Ze(T)||f,At=!!(R&&t&&O&&$e),ln=Ze(de.isValidating)?At:de.isValidating,Zn=Ze(de.isLoading)?At:de.isLoading,gr=z.useCallback(async Be=>{const rt=Y.current;if(!R||!rt||P.current||X().isPaused())return!1;let ct,Qe,qt=!0;const In=Be||{},jt=!C[R]||!In.dedupe,Zt=()=>N0?!P.current&&R===$.current&&L.current:R===$.current,dt={isValidating:!1,isLoading:!1},Ai=()=>{oe(dt)},J=()=>{const xe=C[R];xe&&xe[1]===Qe&&delete C[R]},ce={isValidating:!0};Ze(ae().data)&&(ce.isLoading=!0);try{if(jt&&(oe(ce),n.loadingTimeout&&Ze(ae().data)&&setTimeout(()=>{qt&&Zt()&&X().onLoadingSlow(R,n)},n.loadingTimeout),C[R]=[rt(j),Km()]),[ct,Qe]=C[R],ct=await ct,jt&&setTimeout(J,n.dedupingInterval),!C[R]||C[R][1]!==Qe)return jt&&Zt()&&X().onDiscarded(R),!1;dt.error=rn;const xe=_[R];if(!Ze(xe)&&(Qe<=xe[0]||Qe<=xe[1]||xe[1]===0))return Ai(),jt&&Zt()&&X().onDiscarded(R),!1;const _e=ae().data;dt.data=o(_e,ct)?_e:ct,jt&&Zt()&&X().onSuccess(ct,R,n)}catch(xe){J();const _e=X(),{shouldRetryOnError:Ve}=_e;_e.isPaused()||(dt.error=xe,jt&&Zt()&&(_e.onError(xe,R,_e),(Ve===!0||Sr(Ve)&&Ve(xe))&&(!X().revalidateOnFocus||!X().revalidateOnReconnect||ue())&&_e.onErrorRetry(xe,R,_e,un=>{const Nn=w[R];Nn&&Nn[0]&&Nn[0](E0,un)},{retryCount:(In.retryCount||0)+1,dedupe:!0})))}return qt=!1,Ai(),!0},[R,a]),Bn=z.useCallback((...Be)=>mS(a,$.current,...Be),[]);if(Fh(()=>{Y.current=t,U.current=n,Ze(G)||(ve.current=G)}),Fh(()=>{if(!R)return;const Be=gr.bind(rn,Xh);let rt=0;X().revalidateOnFocus&&(rt=Date.now()+X().focusThrottleInterval);const Qe=WA(R,w,(qt,In={})=>{if(qt==uS){const jt=Date.now();X().revalidateOnFocus&&jt>rt&&ue()&&(rt=jt+X().focusThrottleInterval,Be())}else if(qt==cS)X().revalidateOnReconnect&&ue()&&Be();else{if(qt==dS)return gr();if(qt==E0)return gr(In)}});return P.current=!1,$.current=R,L.current=!0,oe({_k:j}),$e&&(C[R]||(Ze(T)||Ao?Be():DA(Be))),()=>{P.current=!0,Qe()}},[R]),Fh(()=>{let Be;function rt(){const Qe=Sr(h)?h(ae().data):h;Qe&&Be!==-1&&(Be=setTimeout(ct,Qe))}function ct(){!ae().error&&(g||X().isVisible())&&(x||X().isOnline())?gr(Xh).then(rt):rt()}return rt(),()=>{Be&&(clearTimeout(Be),Be=-1)}},[h,g,x,R]),z.useDebugValue(ge),u){if(!N0&&Ao&&ye)throw new Error("Fallback data is required when using Suspense in SSR.");ye&&(Y.current=t,U.current=n,P.current=!1);const Be=N[R],rt=!Ze(Be)&&ye?Bn(Be):R0;if(Yh(rt),!Ze(ie)&&ye)throw ie;const ct=ye?gr(Xh):R0;!Ze(ge)&&ye&&(ct.status="fulfilled",ct.value=!0),Yh(ct)}return{mutate:Bn,get data(){return re.data=!0,ge},get error(){return re.error=!0,ie},get isValidating(){return re.isValidating=!0,ln},get isLoading(){return re.isLoading=!0,Zn}}},an=QA(e4),t4="x-architect-pass",Xs="/api";class wi{static instance;constructor(){}static getInstance(){return wi.instance||(wi.instance=new wi),wi.instance}getHeaders(t={}){const n=localStorage.getItem("morpheus.auth.token"),a={...t};return n&&(a[t4]=n),a}async handleResponse(t){if(t.status===401)throw localStorage.removeItem("morpheus.auth.token"),window.location.pathname.endsWith("/login")||(window.location.href="/login"),new Error("Unauthorized");if(!t.ok){const n=await t.json().catch(()=>({error:"Unknown error"})),a=new Error(n.error||`HTTP error! status: ${t.status}`);throw a.details=n.details,a}return t.json()}async get(t){const n=await fetch(`${Xs}${t}`,{headers:this.getHeaders()});return this.handleResponse(n)}async post(t,n){const a=await fetch(`${Xs}${t}`,{method:"POST",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(a)}async put(t,n){const a=await fetch(`${Xs}${t}`,{method:"PUT",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(a)}async patch(t,n){const a=await fetch(`${Xs}${t}`,{method:"PATCH",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(a)}async delete(t){const n=await fetch(`${Xs}${t}`,{method:"DELETE",headers:this.getHeaders()});return this.handleResponse(n)}}const Ne=wi.getInstance(),bl="/api",Jp=e=>{const t=e.startsWith(bl)?e.substring(bl.length):e;return Ne.get(t)};function yS(){return an(`${bl}/status`,Jp,{refreshInterval:5e3})}function n4(){return an(`${bl}/logs`,Jp)}function r4(e){return an(e?`${bl}/logs/${e}?limit=1000`:null,Jp,{refreshInterval:2e3})}function xS(e){const t=Math.floor(e/60);if(t>59){const n=Math.floor(t/60),a=t%60;return`${n}h ${a}m`}return`${t}m`}function a4(){const{data:e}=yS();return p.jsxs("footer",{className:"h-8 bg-azure-bg dark:bg-zinc-950 border-t border-azure-border dark:border-matrix-primary flex items-center px-4 text-xs justify-between select-none z-10 shrink-0",children:[p.jsxs("div",{className:"flex gap-4",children:[p.jsxs("span",{className:e?"text-azure-primary dark:text-matrix-highlight":"text-red-500",children:["● ",e?.status.toUpperCase()||"OFFLINE"]}),p.jsxs("span",{children:["PID: ",e?.pid||"-"]}),p.jsxs("span",{children:["UPTIME: ",e?xS(e.uptimeSeconds):"-"]})]}),p.jsxs("div",{className:"flex gap-4 opacity-70",children:[p.jsxs("span",{children:["v",e?.projectVersion||"0.0.0"]}),p.jsx("span",{children:e?.agentName||"Morpheus"})]})]})}const Qp=z.createContext({});function Wp(e){const t=z.useRef(null);return t.current===null&&(t.current=e()),t.current}const bS=typeof window<"u",vS=bS?z.useLayoutEffect:z.useEffect,ad=z.createContext(null);function eg(e,t){e.indexOf(t)===-1&&e.push(t)}function tg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Tr=(e,t,n)=>n>t?t:n<e?e:n;let ng=()=>{};const aa={},kS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function wS(e){return typeof e=="object"&&e!==null}const SS=e=>/^0[^.\s]+$/u.test(e);function rg(e){let t;return()=>(t===void 0&&(t=e()),t)}const ar=e=>e,i4=(e,t)=>n=>t(e(n)),Ml=(...e)=>e.reduce(i4),vl=(e,t,n)=>{const a=t-e;return a===0?1:(n-e)/a};class ag{constructor(){this.subscriptions=[]}add(t){return eg(this.subscriptions,t),()=>tg(this.subscriptions,t)}notify(t,n,a){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,a);else for(let u=0;u<o;u++){const l=this.subscriptions[u];l&&l(t,n,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const na=e=>e*1e3,rr=e=>e/1e3;function zS(e,t){return t?e*(1e3/t):0}const _S=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,o4=1e-7,s4=12;function l4(e,t,n,a,o){let u,l,d=0;do l=t+(n-t)/2,u=_S(l,a,o)-e,u>0?n=l:t=l;while(Math.abs(u)>o4&&++d<s4);return l}function Dl(e,t,n,a){if(e===t&&n===a)return ar;const o=u=>l4(u,0,1,e,n);return u=>u===0||u===1?u:_S(o(u),t,a)}const TS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jS=e=>t=>1-e(1-t),ES=Dl(.33,1.53,.69,.99),ig=jS(ES),CS=TS(ig),NS=e=>(e*=2)<1?.5*ig(e):.5*(2-Math.pow(2,-10*(e-1))),og=e=>1-Math.sin(Math.acos(e)),AS=jS(og),OS=TS(og),u4=Dl(.42,0,1,1),c4=Dl(0,0,.58,1),RS=Dl(.42,0,.58,1),d4=e=>Array.isArray(e)&&typeof e[0]!="number",MS=e=>Array.isArray(e)&&typeof e[0]=="number",f4={linear:ar,easeIn:u4,easeInOut:RS,easeOut:c4,circIn:og,circInOut:OS,circOut:AS,backIn:ig,backInOut:CS,backOut:ES,anticipate:NS},h4=e=>typeof e=="string",M0=e=>{if(MS(e)){ng(e.length===4);const[t,n,a,o]=e;return Dl(t,n,a,o)}else if(h4(e))return f4[e];return e},ic=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function m4(e,t){let n=new Set,a=new Set,o=!1,u=!1;const l=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function f(g){l.has(g)&&(h.schedule(g),e()),g(d)}const h={schedule:(g,x=!1,b=!1)=>{const w=b&&o?n:a;return x&&l.add(g),w.has(g)||w.add(g),g},cancel:g=>{a.delete(g),l.delete(g)},process:g=>{if(d=g,o){u=!0;return}o=!0,[n,a]=[a,n],n.forEach(f),n.clear(),o=!1,u&&(u=!1,h.process(g))}};return h}const p4=40;function DS(e,t){let n=!1,a=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=()=>n=!0,l=ic.reduce((j,L)=>(j[L]=m4(u),j),{}),{setup:d,read:f,resolveKeyframes:h,preUpdate:g,update:x,preRender:b,render:v,postRender:w}=l,_=()=>{const j=aa.useManualTiming?o.timestamp:performance.now();n=!1,aa.useManualTiming||(o.delta=a?1e3/60:Math.max(Math.min(j-o.timestamp,p4),1)),o.timestamp=j,o.isProcessing=!0,d.process(o),f.process(o),h.process(o),g.process(o),x.process(o),b.process(o),v.process(o),w.process(o),o.isProcessing=!1,n&&t&&(a=!1,e(_))},C=()=>{n=!0,a=!0,o.isProcessing||e(_)};return{schedule:ic.reduce((j,L)=>{const P=l[L];return j[L]=($,Y=!1,U=!1)=>(n||C(),P.schedule($,Y,U)),j},{}),cancel:j=>{for(let L=0;L<ic.length;L++)l[ic[L]].cancel(j)},state:o,steps:l}}const{schedule:mt,cancel:Va,state:en,steps:Kh}=DS(typeof requestAnimationFrame<"u"?requestAnimationFrame:ar,!0);let Tc;function g4(){Tc=void 0}const gn={now:()=>(Tc===void 0&&gn.set(en.isProcessing||aa.useManualTiming?en.timestamp:performance.now()),Tc),set:e=>{Tc=e,queueMicrotask(g4)}},$S=e=>t=>typeof t=="string"&&t.startsWith(e),LS=$S("--"),y4=$S("var(--"),sg=e=>y4(e)?x4.test(e.split("/*")[0].trim()):!1,x4=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function D0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const qo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kl={...qo,transform:e=>Tr(0,1,e)},oc={...qo,default:1},ll=e=>Math.round(e*1e5)/1e5,lg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function b4(e){return e==null}const v4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ug=(e,t)=>n=>!!(typeof n=="string"&&v4.test(n)&&n.startsWith(e)||t&&!b4(n)&&Object.prototype.hasOwnProperty.call(n,t)),US=(e,t,n)=>a=>{if(typeof a!="string")return a;const[o,u,l,d]=a.match(lg);return{[e]:parseFloat(o),[t]:parseFloat(u),[n]:parseFloat(l),alpha:d!==void 0?parseFloat(d):1}},k4=e=>Tr(0,255,e),Jh={...qo,transform:e=>Math.round(k4(e))},Si={test:ug("rgb","red"),parse:US("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:a=1})=>"rgba("+Jh.transform(e)+", "+Jh.transform(t)+", "+Jh.transform(n)+", "+ll(kl.transform(a))+")"};function w4(e){let t="",n="",a="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),a=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),a=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,a+=a,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(a,16),alpha:o?parseInt(o,16)/255:1}}const Jm={test:ug("#"),parse:w4,transform:Si.transform},$l=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ma=$l("deg"),_r=$l("%"),pe=$l("px"),S4=$l("vh"),z4=$l("vw"),$0={..._r,parse:e=>_r.parse(e)/100,transform:e=>_r.transform(e*100)},zo={test:ug("hsl","hue"),parse:US("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:a=1})=>"hsla("+Math.round(e)+", "+_r.transform(ll(t))+", "+_r.transform(ll(n))+", "+ll(kl.transform(a))+")"},Lt={test:e=>Si.test(e)||Jm.test(e)||zo.test(e),parse:e=>Si.test(e)?Si.parse(e):zo.test(e)?zo.parse(e):Jm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Si.transform(e):zo.transform(e),getAnimatableNone:e=>{const t=Lt.parse(e);return t.alpha=0,Lt.transform(t)}},_4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function T4(e){return isNaN(e)&&typeof e=="string"&&(e.match(lg)?.length||0)+(e.match(_4)?.length||0)>0}const PS="number",VS="color",j4="var",E4="var(",L0="${}",C4=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function wl(e){const t=e.toString(),n=[],a={color:[],number:[],var:[]},o=[];let u=0;const d=t.replace(C4,f=>(Lt.test(f)?(a.color.push(u),o.push(VS),n.push(Lt.parse(f))):f.startsWith(E4)?(a.var.push(u),o.push(j4),n.push(f)):(a.number.push(u),o.push(PS),n.push(parseFloat(f))),++u,L0)).split(L0);return{values:n,split:d,indexes:a,types:o}}function ZS(e){return wl(e).values}function BS(e){const{split:t,types:n}=wl(e),a=t.length;return o=>{let u="";for(let l=0;l<a;l++)if(u+=t[l],o[l]!==void 0){const d=n[l];d===PS?u+=ll(o[l]):d===VS?u+=Lt.transform(o[l]):u+=o[l]}return u}}const N4=e=>typeof e=="number"?0:Lt.test(e)?Lt.getAnimatableNone(e):e;function A4(e){const t=ZS(e);return BS(e)(t.map(N4))}const Za={test:T4,parse:ZS,createTransformer:BS,getAnimatableNone:A4};function Qh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function O4({hue:e,saturation:t,lightness:n,alpha:a}){e/=360,t/=100,n/=100;let o=0,u=0,l=0;if(!t)o=u=l=n;else{const d=n<.5?n*(1+t):n+t-n*t,f=2*n-d;o=Qh(f,d,e+1/3),u=Qh(f,d,e),l=Qh(f,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(l*255),alpha:a}}function Dc(e,t){return n=>n>0?t:e}const bt=(e,t,n)=>e+(t-e)*n,Wh=(e,t,n)=>{const a=e*e,o=n*(t*t-a)+a;return o<0?0:Math.sqrt(o)},R4=[Jm,Si,zo],M4=e=>R4.find(t=>t.test(e));function U0(e){const t=M4(e);if(!t)return!1;let n=t.parse(e);return t===zo&&(n=O4(n)),n}const P0=(e,t)=>{const n=U0(e),a=U0(t);if(!n||!a)return Dc(e,t);const o={...n};return u=>(o.red=Wh(n.red,a.red,u),o.green=Wh(n.green,a.green,u),o.blue=Wh(n.blue,a.blue,u),o.alpha=bt(n.alpha,a.alpha,u),Si.transform(o))},Qm=new Set(["none","hidden"]);function D4(e,t){return Qm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $4(e,t){return n=>bt(e,t,n)}function cg(e){return typeof e=="number"?$4:typeof e=="string"?sg(e)?Dc:Lt.test(e)?P0:P4:Array.isArray(e)?IS:typeof e=="object"?Lt.test(e)?P0:L4:Dc}function IS(e,t){const n=[...e],a=n.length,o=e.map((u,l)=>cg(u)(u,t[l]));return u=>{for(let l=0;l<a;l++)n[l]=o[l](u);return n}}function L4(e,t){const n={...e,...t},a={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(a[o]=cg(e[o])(e[o],t[o]));return o=>{for(const u in a)n[u]=a[u](o);return n}}function U4(e,t){const n=[],a={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const u=t.types[o],l=e.indexes[u][a[u]],d=e.values[l]??0;n[o]=d,a[u]++}return n}const P4=(e,t)=>{const n=Za.createTransformer(t),a=wl(e),o=wl(t);return a.indexes.var.length===o.indexes.var.length&&a.indexes.color.length===o.indexes.color.length&&a.indexes.number.length>=o.indexes.number.length?Qm.has(e)&&!o.values.length||Qm.has(t)&&!a.values.length?D4(e,t):Ml(IS(U4(a,o),o.values),n):Dc(e,t)};function HS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?bt(e,t,n):cg(e)(e,t)}const V4=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>mt.update(t,n),stop:()=>Va(t),now:()=>en.isProcessing?en.timestamp:gn.now()}},FS=(e,t,n=10)=>{let a="";const o=Math.max(Math.round(t/n),2);for(let u=0;u<o;u++)a+=Math.round(e(u/(o-1))*1e4)/1e4+", ";return`linear(${a.substring(0,a.length-2)})`},$c=2e4;function dg(e){let t=0;const n=50;let a=e.next(t);for(;!a.done&&t<$c;)t+=n,a=e.next(t);return t>=$c?1/0:t}function Z4(e,t=100,n){const a=n({...e,keyframes:[0,t]}),o=Math.min(dg(a),$c);return{type:"keyframes",ease:u=>a.next(o*u).value/t,duration:rr(o)}}const B4=5;function qS(e,t,n){const a=Math.max(t-B4,0);return zS(n-e(a),t-a)}const Tt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},em=.001;function I4({duration:e=Tt.duration,bounce:t=Tt.bounce,velocity:n=Tt.velocity,mass:a=Tt.mass}){let o,u,l=1-t;l=Tr(Tt.minDamping,Tt.maxDamping,l),e=Tr(Tt.minDuration,Tt.maxDuration,rr(e)),l<1?(o=h=>{const g=h*l,x=g*e,b=g-n,v=Wm(h,l),w=Math.exp(-x);return em-b/v*w},u=h=>{const x=h*l*e,b=x*n+n,v=Math.pow(l,2)*Math.pow(h,2)*e,w=Math.exp(-x),_=Wm(Math.pow(h,2),l);return(-o(h)+em>0?-1:1)*((b-v)*w)/_}):(o=h=>{const g=Math.exp(-h*e),x=(h-n)*e+1;return-em+g*x},u=h=>{const g=Math.exp(-h*e),x=(n-h)*(e*e);return g*x});const d=5/e,f=F4(o,u,d);if(e=na(e),isNaN(f))return{stiffness:Tt.stiffness,damping:Tt.damping,duration:e};{const h=Math.pow(f,2)*a;return{stiffness:h,damping:l*2*Math.sqrt(a*h),duration:e}}}const H4=12;function F4(e,t,n){let a=n;for(let o=1;o<H4;o++)a=a-e(a)/t(a);return a}function Wm(e,t){return e*Math.sqrt(1-t*t)}const q4=["duration","bounce"],G4=["stiffness","damping","mass"];function V0(e,t){return t.some(n=>e[n]!==void 0)}function Y4(e){let t={velocity:Tt.velocity,stiffness:Tt.stiffness,damping:Tt.damping,mass:Tt.mass,isResolvedFromDuration:!1,...e};if(!V0(e,G4)&&V0(e,q4))if(e.visualDuration){const n=e.visualDuration,a=2*Math.PI/(n*1.2),o=a*a,u=2*Tr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Tt.mass,stiffness:o,damping:u}}else{const n=I4(e);t={...t,...n,mass:Tt.mass},t.isResolvedFromDuration=!0}return t}function Lc(e=Tt.visualDuration,t=Tt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:a,restDelta:o}=n;const u=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],d={done:!1,value:u},{stiffness:f,damping:h,mass:g,duration:x,velocity:b,isResolvedFromDuration:v}=Y4({...n,velocity:-rr(n.velocity||0)}),w=b||0,_=h/(2*Math.sqrt(f*g)),C=l-u,N=rr(Math.sqrt(f/g)),R=Math.abs(C)<5;a||(a=R?Tt.restSpeed.granular:Tt.restSpeed.default),o||(o=R?Tt.restDelta.granular:Tt.restDelta.default);let j;if(_<1){const P=Wm(N,_);j=$=>{const Y=Math.exp(-_*N*$);return l-Y*((w+_*N*C)/P*Math.sin(P*$)+C*Math.cos(P*$))}}else if(_===1)j=P=>l-Math.exp(-N*P)*(C+(w+N*C)*P);else{const P=N*Math.sqrt(_*_-1);j=$=>{const Y=Math.exp(-_*N*$),U=Math.min(P*$,300);return l-Y*((w+_*N*C)*Math.sinh(U)+P*C*Math.cosh(U))/P}}const L={calculatedDuration:v&&x||null,next:P=>{const $=j(P);if(v)d.done=P>=x;else{let Y=P===0?w:0;_<1&&(Y=P===0?na(w):qS(j,P,$));const U=Math.abs(Y)<=a,X=Math.abs(l-$)<=o;d.done=U&&X}return d.value=d.done?l:$,d},toString:()=>{const P=Math.min(dg(L),$c),$=FS(Y=>L.next(P*Y).value,P,30);return P+"ms "+$},toTransition:()=>{}};return L}Lc.applyToOptions=e=>{const t=Z4(e,100,Lc);return e.ease=t.ease,e.duration=na(t.duration),e.type="keyframes",e};function ep({keyframes:e,velocity:t=0,power:n=.8,timeConstant:a=325,bounceDamping:o=10,bounceStiffness:u=500,modifyTarget:l,min:d,max:f,restDelta:h=.5,restSpeed:g}){const x=e[0],b={done:!1,value:x},v=U=>d!==void 0&&U<d||f!==void 0&&U>f,w=U=>d===void 0?f:f===void 0||Math.abs(d-U)<Math.abs(f-U)?d:f;let _=n*t;const C=x+_,N=l===void 0?C:l(C);N!==C&&(_=N-x);const R=U=>-_*Math.exp(-U/a),j=U=>N+R(U),L=U=>{const X=R(U),ue=j(U);b.done=Math.abs(X)<=h,b.value=b.done?N:ue};let P,$;const Y=U=>{v(b.value)&&(P=U,$=Lc({keyframes:[b.value,w(b.value)],velocity:qS(j,U,b.value),damping:o,stiffness:u,restDelta:h,restSpeed:g}))};return Y(0),{calculatedDuration:null,next:U=>{let X=!1;return!$&&P===void 0&&(X=!0,L(U),Y(U)),P!==void 0&&U>=P?$.next(U-P):(!X&&L(U),b)}}}function X4(e,t,n){const a=[],o=n||aa.mix||HS,u=e.length-1;for(let l=0;l<u;l++){let d=o(e[l],e[l+1]);if(t){const f=Array.isArray(t)?t[l]||ar:t;d=Ml(f,d)}a.push(d)}return a}function K4(e,t,{clamp:n=!0,ease:a,mixer:o}={}){const u=e.length;if(ng(u===t.length),u===1)return()=>t[0];if(u===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[u-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=X4(t,a,o),f=d.length,h=g=>{if(l&&g<e[0])return t[0];let x=0;if(f>1)for(;x<e.length-2&&!(g<e[x+1]);x++);const b=vl(e[x],e[x+1],g);return d[x](b)};return n?g=>h(Tr(e[0],e[u-1],g)):h}function J4(e,t){const n=e[e.length-1];for(let a=1;a<=t;a++){const o=vl(0,t,a);e.push(bt(n,1,o))}}function Q4(e){const t=[0];return J4(t,e.length-1),t}function W4(e,t){return e.map(n=>n*t)}function eO(e,t){return e.map(()=>t||RS).splice(0,e.length-1)}function ul({duration:e=300,keyframes:t,times:n,ease:a="easeInOut"}){const o=d4(a)?a.map(M0):M0(a),u={done:!1,value:t[0]},l=W4(n&&n.length===t.length?n:Q4(t),e),d=K4(l,t,{ease:Array.isArray(o)?o:eO(t,o)});return{calculatedDuration:e,next:f=>(u.value=d(f),u.done=f>=e,u)}}const tO=e=>e!==null;function fg(e,{repeat:t,repeatType:n="loop"},a,o=1){const u=e.filter(tO),d=o<0||t&&n!=="loop"&&t%2===1?0:u.length-1;return!d||a===void 0?u[d]:a}const nO={decay:ep,inertia:ep,tween:ul,keyframes:ul,spring:Lc};function GS(e){typeof e.type=="string"&&(e.type=nO[e.type])}class hg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const rO=e=>e/100;class mg extends hg{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==gn.now()&&this.tick(gn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;GS(t);const{type:n=ul,repeat:a=0,repeatDelay:o=0,repeatType:u,velocity:l=0}=t;let{keyframes:d}=t;const f=n||ul;f!==ul&&typeof d[0]!="number"&&(this.mixKeyframes=Ml(rO,HS(d[0],d[1])),d=[0,100]);const h=f({...t,keyframes:d});u==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...d].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=dg(h));const{calculatedDuration:g}=h;this.calculatedDuration=g,this.resolvedDuration=g+o,this.totalDuration=this.resolvedDuration*(a+1)-o,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:a,totalDuration:o,mixKeyframes:u,mirroredGenerator:l,resolvedDuration:d,calculatedDuration:f}=this;if(this.startTime===null)return a.next(0);const{delay:h=0,keyframes:g,repeat:x,repeatType:b,repeatDelay:v,type:w,onUpdate:_,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const N=this.currentTime-h*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?N<0:N>o;this.currentTime=Math.max(N,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let j=this.currentTime,L=a;if(x){const U=Math.min(this.currentTime,o)/d;let X=Math.floor(U),ue=U%1;!ue&&U>=1&&(ue=1),ue===1&&X--,X=Math.min(X,x+1),X%2&&(b==="reverse"?(ue=1-ue,v&&(ue-=v/d)):b==="mirror"&&(L=l)),j=Tr(0,1,ue)*d}const P=R?{done:!1,value:g[0]}:L.next(j);u&&(P.value=u(P.value));let{done:$}=P;!R&&f!==null&&($=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const Y=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return Y&&w!==ep&&(P.value=fg(g,this.options,C,this.speed)),_&&_(P.value),Y&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return rr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+rr(t)}get time(){return rr(this.currentTime)}set time(t){t=na(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(gn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=rr(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=V4,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime||(this.startTime=n??a),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(gn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function aO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const zi=e=>e*180/Math.PI,tp=e=>{const t=zi(Math.atan2(e[1],e[0]));return np(t)},iO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:tp,rotateZ:tp,skewX:e=>zi(Math.atan(e[1])),skewY:e=>zi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},np=e=>(e=e%360,e<0&&(e+=360),e),Z0=tp,B0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),I0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:B0,scaleY:I0,scale:e=>(B0(e)+I0(e))/2,rotateX:e=>np(zi(Math.atan2(e[6],e[5]))),rotateY:e=>np(zi(Math.atan2(-e[2],e[0]))),rotateZ:Z0,rotate:Z0,skewX:e=>zi(Math.atan(e[4])),skewY:e=>zi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function rp(e){return e.includes("scale")?1:0}function ap(e,t){if(!e||e==="none")return rp(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let a,o;if(n)a=oO,o=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);a=iO,o=d}if(!o)return rp(t);const u=a[t],l=o[1].split(",").map(lO);return typeof u=="function"?u(l):l[u]}const sO=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ap(n,t)};function lO(e){return parseFloat(e.trim())}const Go=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yo=new Set(Go),H0=e=>e===qo||e===pe,uO=new Set(["x","y","z"]),cO=Go.filter(e=>!uO.has(e));function dO(e){const t=[];return cO.forEach(n=>{const a=e.getValue(n);a!==void 0&&(t.push([n,a.get()]),a.set(n.startsWith("scale")?1:0))}),t}const La={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ap(t,"x"),y:(e,{transform:t})=>ap(t,"y")};La.translateX=La.x;La.translateY=La.y;const _i=new Set;let ip=!1,op=!1,sp=!1;function YS(){if(op){const e=Array.from(_i).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),n=new Map;t.forEach(a=>{const o=dO(a);o.length&&(n.set(a,o),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();const o=n.get(a);o&&o.forEach(([u,l])=>{a.getValue(u)?.set(l)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}op=!1,ip=!1,_i.forEach(e=>e.complete(sp)),_i.clear()}function XS(){_i.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(op=!0)})}function fO(){sp=!0,XS(),YS(),sp=!1}class pg{constructor(t,n,a,o,u,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=a,this.motionValue=o,this.element=u,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(_i.add(this),ip||(ip=!0,mt.read(XS),mt.resolveKeyframes(YS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:a,motionValue:o}=this;if(t[0]===null){const u=o?.get(),l=t[t.length-1];if(u!==void 0)t[0]=u;else if(a&&n){const d=a.readValue(n,l);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=l),o&&u===void 0&&o.set(t[0])}aO(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),_i.delete(this)}cancel(){this.state==="scheduled"&&(_i.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const hO=e=>e.startsWith("--");function mO(e,t,n){hO(t)?e.style.setProperty(t,n):e.style[t]=n}const pO=rg(()=>window.ScrollTimeline!==void 0),gO={};function yO(e,t){const n=rg(e);return()=>gO[t]??n()}const KS=yO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),al=([e,t,n,a])=>`cubic-bezier(${e}, ${t}, ${n}, ${a})`,F0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:al([0,.65,.55,1]),circOut:al([.55,0,1,.45]),backIn:al([.31,.01,.66,-.59]),backOut:al([.33,1.53,.69,.99])};function JS(e,t){if(e)return typeof e=="function"?KS()?FS(e,t):"ease-out":MS(e)?al(e):Array.isArray(e)?e.map(n=>JS(n,t)||F0.easeOut):F0[e]}function xO(e,t,n,{delay:a=0,duration:o=300,repeat:u=0,repeatType:l="loop",ease:d="easeOut",times:f}={},h=void 0){const g={[t]:n};f&&(g.offset=f);const x=JS(d,o);Array.isArray(x)&&(g.easing=x);const b={delay:a,duration:o,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:u+1,direction:l==="reverse"?"alternate":"normal"};return h&&(b.pseudoElement=h),e.animate(g,b)}function QS(e){return typeof e=="function"&&"applyToOptions"in e}function bO({type:e,...t}){return QS(e)&&KS()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vO extends hg{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:a,keyframes:o,pseudoElement:u,allowFlatten:l=!1,finalKeyframe:d,onComplete:f}=t;this.isPseudoElement=!!u,this.allowFlatten=l,this.options=t,ng(typeof t.type!="string");const h=bO(t);this.animation=xO(n,a,o,h,u),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const g=fg(o,this.options,d,this.speed);this.updateMotionValue?this.updateMotionValue(g):mO(n,a,g),this.animation.cancel()}f?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return rr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+rr(t)}get time(){return rr(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=na(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&pO()?(this.animation.timeline=t,ar):n(this)}}const WS={anticipate:NS,backInOut:CS,circInOut:OS};function kO(e){return e in WS}function wO(e){typeof e.ease=="string"&&kO(e.ease)&&(e.ease=WS[e.ease])}const tm=10;class SO extends vO{constructor(t){wO(t),GS(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:a,onComplete:o,element:u,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const d=new mg({...l,autoplay:!1}),f=Math.max(tm,gn.now()-this.startTime),h=Tr(0,tm,f-tm);n.setWithVelocity(d.sample(Math.max(0,f-h)).value,d.sample(f).value,h),d.stop()}}const q0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Za.test(e)||e==="0")&&!e.startsWith("url("));function zO(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function _O(e,t,n,a){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const u=e[e.length-1],l=q0(o,t),d=q0(u,t);return!l||!d?!1:zO(e)||(n==="spring"||QS(n))&&a}function lp(e){e.duration=0,e.type="keyframes"}const TO=new Set(["opacity","clipPath","filter","transform"]),jO=rg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function EO(e){const{motionValue:t,name:n,repeatDelay:a,repeatType:o,damping:u,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:h}=t.owner.getProps();return jO()&&n&&TO.has(n)&&(n!=="transform"||!h)&&!f&&!a&&o!=="mirror"&&u!==0&&l!=="inertia"}const CO=40;class NO extends hg{constructor({autoplay:t=!0,delay:n=0,type:a="keyframes",repeat:o=0,repeatDelay:u=0,repeatType:l="loop",keyframes:d,name:f,motionValue:h,element:g,...x}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=gn.now();const b={autoplay:t,delay:n,type:a,repeat:o,repeatDelay:u,repeatType:l,name:f,motionValue:h,element:g,...x},v=g?.KeyframeResolver||pg;this.keyframeResolver=new v(d,(w,_,C)=>this.onKeyframesResolved(w,_,b,!C),f,h,g),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,a,o){this.keyframeResolver=void 0;const{name:u,type:l,velocity:d,delay:f,isHandoff:h,onUpdate:g}=a;this.resolvedAt=gn.now(),_O(t,u,l,d)||((aa.instantAnimations||!f)&&g?.(fg(t,a,n)),t[0]=t[t.length-1],lp(a),a.repeat=0);const b={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>CO?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...a,keyframes:t},v=!h&&EO(b),w=b.motionValue?.owner?.current,_=v?new SO({...b,element:w}):new mg(b);_.finished.then(()=>{this.notifyFinished()}).catch(ar),this.pendingTimeline&&(this.stopTimeline=_.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=_}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),fO()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function ez(e,t,n,a=0,o=1){const u=Array.from(e).sort((h,g)=>h.sortNodePosition(g)).indexOf(t),l=e.size,d=(l-1)*a;return typeof n=="function"?n(u,l):o===1?u*a:d-u*a}const AO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function OO(e){const t=AO.exec(e);if(!t)return[,];const[,n,a,o]=t;return[`--${n??a}`,o]}function tz(e,t,n=1){const[a,o]=OO(e);if(!a)return;const u=window.getComputedStyle(t).getPropertyValue(a);if(u){const l=u.trim();return kS(l)?parseFloat(l):l}return sg(o)?tz(o,t,n+1):o}const RO={type:"spring",stiffness:500,damping:25,restSpeed:10},MO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),DO={type:"keyframes",duration:.8},$O={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},LO=(e,{keyframes:t})=>t.length>2?DO:Yo.has(e)?e.startsWith("scale")?MO(t[1]):RO:$O,UO=e=>e!==null;function PO(e,{repeat:t,repeatType:n="loop"},a){const o=e.filter(UO),u=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[u]}function gg(e,t){return e?.[t]??e?.default??e}function VO({when:e,delay:t,delayChildren:n,staggerChildren:a,staggerDirection:o,repeat:u,repeatType:l,repeatDelay:d,from:f,elapsed:h,...g}){return!!Object.keys(g).length}const yg=(e,t,n,a={},o,u)=>l=>{const d=gg(a,e)||{},f=d.delay||a.delay||0;let{elapsed:h=0}=a;h=h-na(f);const g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-h,onUpdate:b=>{t.set(b),d.onUpdate&&d.onUpdate(b)},onComplete:()=>{l(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:u?void 0:o};VO(d)||Object.assign(g,LO(e,g)),g.duration&&(g.duration=na(g.duration)),g.repeatDelay&&(g.repeatDelay=na(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let x=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(lp(g),g.delay===0&&(x=!0)),(aa.instantAnimations||aa.skipAnimations)&&(x=!0,lp(g),g.delay=0),g.allowFlatten=!d.type&&!d.ease,x&&!u&&t.get()!==void 0){const b=PO(g.keyframes,d);if(b!==void 0){mt.update(()=>{g.onUpdate(b),g.onComplete()});return}}return d.isSync?new mg(g):new NO(g)};function G0(e){const t=[{},{}];return e?.values.forEach((n,a)=>{t[0][a]=n.get(),t[1][a]=n.getVelocity()}),t}function xg(e,t,n,a){if(typeof t=="function"){const[o,u]=G0(a);t=t(n!==void 0?n:e.custom,o,u)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,u]=G0(a);t=t(n!==void 0?n:e.custom,o,u)}return t}function Oo(e,t,n){const a=e.getProps();return xg(a,t,n!==void 0?n:a.custom,e)}const nz=new Set(["width","height","top","left","right","bottom",...Go]),Y0=30,ZO=e=>!isNaN(parseFloat(e));class BO{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{const o=gn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=gn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ZO(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ag);const a=this.events[t].add(n);return t==="change"?()=>{a(),mt.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,a){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=gn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Y0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Y0);return zS(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Uo(e,t){return new BO(e,t)}const up=e=>Array.isArray(e);function IO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Uo(n))}function HO(e){return up(e)?e[e.length-1]||0:e}function FO(e,t){const n=Oo(e,t);let{transitionEnd:a={},transition:o={},...u}=n||{};u={...u,...a};for(const l in u){const d=HO(u[l]);IO(e,l,d)}}const on=e=>!!(e&&e.getVelocity);function qO(e){return!!(on(e)&&e.add)}function cp(e,t){const n=e.getValue("willChange");if(qO(n))return n.add(t);if(!n&&aa.WillChange){const a=new aa.WillChange("auto");e.addValue("willChange",a),a.add(t)}}function bg(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const GO="framerAppearId",rz="data-"+bg(GO);function az(e){return e.props[rz]}function YO({protectedKeys:e,needsAnimating:t},n){const a=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,a}function iz(e,t,{delay:n=0,transitionOverride:a,type:o}={}){let{transition:u=e.getDefaultTransition(),transitionEnd:l,...d}=t;const f=u?.reduceMotion;a&&(u=a);const h=[],g=o&&e.animationState&&e.animationState.getState()[o];for(const x in d){const b=e.getValue(x,e.latestValues[x]??null),v=d[x];if(v===void 0||g&&YO(g,x))continue;const w={delay:n,...gg(u||{},x)},_=b.get();if(_!==void 0&&!b.isAnimating&&!Array.isArray(v)&&v===_&&!w.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const j=az(e);if(j){const L=window.MotionHandoffAnimation(j,x,mt);L!==null&&(w.startTime=L,C=!0)}}cp(e,x);const N=f??e.shouldReduceMotion;b.start(yg(x,b,v,N&&nz.has(x)?{type:!1}:w,e,C));const R=b.animation;R&&h.push(R)}return l&&Promise.all(h).then(()=>{mt.update(()=>{l&&FO(e,l)})}),h}function dp(e,t,n={}){const a=Oo(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(o=n.transitionOverride);const u=a?()=>Promise.all(iz(e,a,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:x}=o;return XO(e,t,f,h,g,x,n)}:()=>Promise.resolve(),{when:d}=o;if(d){const[f,h]=d==="beforeChildren"?[u,l]:[l,u];return f().then(()=>h())}else return Promise.all([u(),l(n.delay)])}function XO(e,t,n=0,a=0,o=0,u=1,l){const d=[];for(const f of e.variantChildren)f.notify("AnimationStart",t),d.push(dp(f,t,{...l,delay:n+(typeof a=="function"?0:a)+ez(e.variantChildren,f,a,o,u)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(d)}function KO(e,t,n={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const o=t.map(u=>dp(e,u,n));a=Promise.all(o)}else if(typeof t=="string")a=dp(e,t,n);else{const o=typeof t=="function"?Oo(e,t,n.custom):t;a=Promise.all(iz(e,o,n))}return a.then(()=>{e.notify("AnimationComplete",t)})}const JO={test:e=>e==="auto",parse:e=>e},oz=e=>t=>t.test(e),sz=[qo,pe,_r,Ma,z4,S4,JO],X0=e=>sz.find(oz(e));function QO(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||SS(e):!0}const WO=new Set(["brightness","contrast","saturate","opacity"]);function eR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=n.match(lg)||[];if(!a)return e;const o=n.replace(a,"");let u=WO.has(t)?1:0;return a!==n&&(u*=100),t+"("+u+o+")"}const tR=/\b([a-z-]*)\(.*?\)/gu,fp={...Za,getAnimatableNone:e=>{const t=e.match(tR);return t?t.map(eR).join(" "):e}},K0={...qo,transform:Math.round},nR={rotate:Ma,rotateX:Ma,rotateY:Ma,rotateZ:Ma,scale:oc,scaleX:oc,scaleY:oc,scaleZ:oc,skew:Ma,skewX:Ma,skewY:Ma,distance:pe,translateX:pe,translateY:pe,translateZ:pe,x:pe,y:pe,z:pe,perspective:pe,transformPerspective:pe,opacity:kl,originX:$0,originY:$0,originZ:pe},vg={borderWidth:pe,borderTopWidth:pe,borderRightWidth:pe,borderBottomWidth:pe,borderLeftWidth:pe,borderRadius:pe,borderTopLeftRadius:pe,borderTopRightRadius:pe,borderBottomRightRadius:pe,borderBottomLeftRadius:pe,width:pe,maxWidth:pe,height:pe,maxHeight:pe,top:pe,right:pe,bottom:pe,left:pe,inset:pe,insetBlock:pe,insetBlockStart:pe,insetBlockEnd:pe,insetInline:pe,insetInlineStart:pe,insetInlineEnd:pe,padding:pe,paddingTop:pe,paddingRight:pe,paddingBottom:pe,paddingLeft:pe,paddingBlock:pe,paddingBlockStart:pe,paddingBlockEnd:pe,paddingInline:pe,paddingInlineStart:pe,paddingInlineEnd:pe,margin:pe,marginTop:pe,marginRight:pe,marginBottom:pe,marginLeft:pe,marginBlock:pe,marginBlockStart:pe,marginBlockEnd:pe,marginInline:pe,marginInlineStart:pe,marginInlineEnd:pe,fontSize:pe,backgroundPositionX:pe,backgroundPositionY:pe,...nR,zIndex:K0,fillOpacity:kl,strokeOpacity:kl,numOctaves:K0},rR={...vg,color:Lt,backgroundColor:Lt,outlineColor:Lt,fill:Lt,stroke:Lt,borderColor:Lt,borderTopColor:Lt,borderRightColor:Lt,borderBottomColor:Lt,borderLeftColor:Lt,filter:fp,WebkitFilter:fp},lz=e=>rR[e];function uz(e,t){let n=lz(e);return n!==fp&&(n=Za),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const aR=new Set(["auto","none","0"]);function iR(e,t,n){let a=0,o;for(;a<e.length&&!o;){const u=e[a];typeof u=="string"&&!aR.has(u)&&wl(u).values.length&&(o=e[a]),a++}if(o&&n)for(const u of t)e[u]=uz(n,o)}class oR extends pg{constructor(t,n,a,o,u){super(t,n,a,o,u,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:a}=this;if(!n||!n.current)return;super.readKeyframes();for(let g=0;g<t.length;g++){let x=t[g];if(typeof x=="string"&&(x=x.trim(),sg(x))){const b=tz(x,n.current);b!==void 0&&(t[g]=b),g===t.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!nz.has(a)||t.length!==2)return;const[o,u]=t,l=X0(o),d=X0(u),f=D0(o),h=D0(u);if(f!==h&&La[a]){this.needsMeasurement=!0;return}if(l!==d)if(H0(l)&&H0(d))for(let g=0;g<t.length;g++){const x=t[g];typeof x=="string"&&(t[g]=parseFloat(x))}else La[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,a=[];for(let o=0;o<t.length;o++)(t[o]===null||QO(t[o]))&&a.push(o);a.length&&iR(t,a,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:a}=this;if(!t||!t.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=La[a](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(a,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:a}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const u=a.length-1,l=a[u];a[u]=La[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([d,f])=>{t.getValue(d).set(f)}),this.resolveNoneKeyframes()}}function sR(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let a=document;const o=n?.[e]??a.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(a=>a!=null)}const cz=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function hp(e){return wS(e)&&"offsetHeight"in e}const{schedule:kg}=DS(queueMicrotask,!1),hr={x:!1,y:!1};function dz(){return hr.x||hr.y}function lR(e){return e==="x"||e==="y"?hr[e]?null:(hr[e]=!0,()=>{hr[e]=!1}):hr.x||hr.y?null:(hr.x=hr.y=!0,()=>{hr.x=hr.y=!1})}function fz(e,t){const n=sR(e),a=new AbortController,o={passive:!0,...t,signal:a.signal};return[n,o,()=>a.abort()]}function J0(e){return!(e.pointerType==="touch"||dz())}function uR(e,t,n={}){const[a,o,u]=fz(e,n),l=d=>{if(!J0(d))return;const{target:f}=d,h=t(f,d);if(typeof h!="function"||!f)return;const g=x=>{J0(x)&&(h(x),f.removeEventListener("pointerleave",g))};f.addEventListener("pointerleave",g,o)};return a.forEach(d=>{d.addEventListener("pointerenter",l,o)}),u}const hz=(e,t)=>t?e===t?!0:hz(e,t.parentElement):!1,wg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,cR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function mz(e){return cR.has(e.tagName)||e.isContentEditable===!0}const jc=new WeakSet;function Q0(e){return t=>{t.key==="Enter"&&e(t)}}function nm(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const dR=(e,t)=>{const n=e.currentTarget;if(!n)return;const a=Q0(()=>{if(jc.has(n))return;nm(n,"down");const o=Q0(()=>{nm(n,"up")}),u=()=>nm(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",u,t)});n.addEventListener("keydown",a,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",a),t)};function W0(e){return wg(e)&&!dz()}function fR(e,t,n={}){const[a,o,u]=fz(e,n),l=d=>{const f=d.currentTarget;if(!W0(d))return;jc.add(f);const h=t(f,d),g=(v,w)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",b),jc.has(f)&&jc.delete(f),W0(v)&&typeof h=="function"&&h(v,{success:w})},x=v=>{g(v,f===window||f===document||n.useGlobalTarget||hz(f,v.target))},b=v=>{g(v,!1)};window.addEventListener("pointerup",x,o),window.addEventListener("pointercancel",b,o)};return a.forEach(d=>{(n.useGlobalTarget?window:d).addEventListener("pointerdown",l,o),hp(d)&&(d.addEventListener("focus",h=>dR(h,o)),!mz(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),u}function pz(e){return wS(e)&&"ownerSVGElement"in e}function hR(e){return pz(e)&&e.tagName==="svg"}const mR=[...sz,Lt,Za],pR=e=>mR.find(oz(e)),e1=()=>({translate:0,scale:1,origin:0,originPoint:0}),_o=()=>({x:e1(),y:e1()}),t1=()=>({min:0,max:0}),Ft=()=>({x:t1(),y:t1()}),mp={current:null},gz={current:!1},gR=typeof window<"u";function yR(){if(gz.current=!0,!!gR)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>mp.current=e.matches;e.addEventListener("change",t),t()}else mp.current=!1}const xR=new WeakMap;function id(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Sl(e){return typeof e=="string"||Array.isArray(e)}const Sg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zg=["initial",...Sg];function od(e){return id(e.animate)||zg.some(t=>Sl(e[t]))}function yz(e){return!!(od(e)||e.variants)}function bR(e,t,n){for(const a in t){const o=t[a],u=n[a];if(on(o))e.addValue(a,o);else if(on(u))e.addValue(a,Uo(o,{owner:e}));else if(u!==o)if(e.hasValue(a)){const l=e.getValue(a);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(a);e.addValue(a,Uo(l!==void 0?l:o,{owner:e}))}}for(const a in n)t[a]===void 0&&e.removeValue(a);return t}const n1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Uc={};function xz(e){Uc=e}function vR(){return Uc}class kR{scrapeMotionValuesFromProps(t,n,a){return{}}constructor({parent:t,props:n,presenceContext:a,reducedMotionConfig:o,blockInitialAnimation:u,visualState:l},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=gn.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,mt.render(this.render,!1,!0))};const{latestValues:f,renderState:h}=l;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=d,this.blockInitialAnimation=!!u,this.isControllingVariants=od(n),this.isVariantNode=yz(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...x}=this.scrapeMotionValuesFromProps(n,{},this);for(const b in x){const v=x[b];f[b]!==void 0&&on(v)&&v.set(f[b])}}mount(t){this.current=t,xR.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,a)=>this.bindToMotionValue(a,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(gz.current||yR(),this.shouldReduceMotion=mp.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Va(this.notifyUpdate),Va(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const a=Yo.has(t);a&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&mt.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let u;typeof window<"u"&&window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),u&&u(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Uc){const n=Uc[t];if(!n)continue;const{isEnabled:a,Feature:o}=n;if(!this.features[t]&&o&&a(this.props)&&(this.features[t]=new o(this)),this.features[t]){const u=this.features[t];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ft()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let a=0;a<n1.length;a++){const o=n1[a];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const u="on"+o,l=t[u];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=bR(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const a=this.values.get(t);n!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&n!==void 0&&(a=Uo(n===null?void 0:n,{owner:this}),this.addValue(t,a)),a}readValue(t,n){let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(kS(a)||SS(a))?a=parseFloat(a):!pR(a)&&Za.test(n)&&(a=uz(t,n)),this.setBaseTarget(t,on(a)?a.get():a)),on(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let a;if(typeof n=="string"||typeof n=="object"){const u=xg(this.props,n,this.presenceContext?.custom);u&&(a=u[t])}if(n&&a!==void 0)return a;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!on(o)?o:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ag),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){kg.render(this.render)}}class bz extends kR{constructor(){super(...arguments),this.KeyframeResolver=oR}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const a=t.style;return a?a[n]:void 0}removeValueFromRenderState(t,{vars:n,style:a}){delete n[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;on(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ha{constructor(t){this.isMounted=!1,this.node=t}update(){}}function vz({top:e,left:t,right:n,bottom:a}){return{x:{min:t,max:n},y:{min:e,max:a}}}function wR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:a.y,right:a.x}}function rm(e){return e===void 0||e===1}function pp({scale:e,scaleX:t,scaleY:n}){return!rm(e)||!rm(t)||!rm(n)}function vi(e){return pp(e)||kz(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kz(e){return r1(e.x)||r1(e.y)}function r1(e){return e&&e!=="0%"}function Pc(e,t,n){const a=e-n,o=t*a;return n+o}function a1(e,t,n,a,o){return o!==void 0&&(e=Pc(e,o,a)),Pc(e,n,a)+t}function gp(e,t=0,n=1,a,o){e.min=a1(e.min,t,n,a,o),e.max=a1(e.max,t,n,a,o)}function wz(e,{x:t,y:n}){gp(e.x,t.translate,t.scale,t.originPoint),gp(e.y,n.translate,n.scale,n.originPoint)}const i1=.999999999999,o1=1.0000000000001;function zR(e,t,n,a=!1){const o=n.length;if(!o)return;t.x=t.y=1;let u,l;for(let d=0;d<o;d++){u=n[d],l=u.projectionDelta;const{visualElement:f}=u.options;f&&f.props.style&&f.props.style.display==="contents"||(a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&jo(e,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,wz(e,l)),a&&vi(u.latestValues)&&jo(e,u.latestValues))}t.x<o1&&t.x>i1&&(t.x=1),t.y<o1&&t.y>i1&&(t.y=1)}function To(e,t){e.min=e.min+t,e.max=e.max+t}function s1(e,t,n,a,o=.5){const u=bt(e.min,e.max,o);gp(e,t,n,u,a)}function jo(e,t){s1(e.x,t.x,t.scaleX,t.scale,t.originX),s1(e.y,t.y,t.scaleY,t.scale,t.originY)}function Sz(e,t){return vz(SR(e.getBoundingClientRect(),t))}function _R(e,t,n){const a=Sz(e,n),{scroll:o}=t;return o&&(To(a.x,o.offset.x),To(a.y,o.offset.y)),a}const TR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jR=Go.length;function ER(e,t,n){let a="",o=!0;for(let u=0;u<jR;u++){const l=Go[u],d=e[l];if(d===void 0)continue;let f=!0;if(typeof d=="number")f=d===(l.startsWith("scale")?1:0);else{const h=parseFloat(d);f=l.startsWith("scale")?h===1:h===0}if(!f||n){const h=cz(d,vg[l]);if(!f){o=!1;const g=TR[l]||l;a+=`${g}(${h}) `}n&&(t[l]=h)}}return a=a.trim(),n?a=n(t,o?"":a):o&&(a="none"),a}function _g(e,t,n){const{style:a,vars:o,transformOrigin:u}=e;let l=!1,d=!1;for(const f in t){const h=t[f];if(Yo.has(f)){l=!0;continue}else if(LS(f)){o[f]=h;continue}else{const g=cz(h,vg[f]);f.startsWith("origin")?(d=!0,u[f]=g):a[f]=g}}if(t.transform||(l||n?a.transform=ER(t,e.transform,n):a.transform&&(a.transform="none")),d){const{originX:f="50%",originY:h="50%",originZ:g=0}=u;a.transformOrigin=`${f} ${h} ${g}`}}function zz(e,{style:t,vars:n},a,o){const u=e.style;let l;for(l in t)u[l]=t[l];o?.applyProjectionStyles(u,a);for(l in n)u.setProperty(l,n[l])}function l1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ks={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(pe.test(e))e=parseFloat(e);else return e;const n=l1(e,t.target.x),a=l1(e,t.target.y);return`${n}% ${a}%`}},CR={correct:(e,{treeScale:t,projectionDelta:n})=>{const a=e,o=Za.parse(e);if(o.length>5)return a;const u=Za.createTransformer(e),l=typeof o[0]!="number"?1:0,d=n.x.scale*t.x,f=n.y.scale*t.y;o[0+l]/=d,o[1+l]/=f;const h=bt(d,f,.5);return typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h),u(o)}},yp={borderRadius:{...Ks,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ks,borderTopRightRadius:Ks,borderBottomLeftRadius:Ks,borderBottomRightRadius:Ks,boxShadow:CR};function _z(e,{layout:t,layoutId:n}){return Yo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yp[e]||e==="opacity")}function Tg(e,t,n){const a=e.style,o=t?.style,u={};if(!a)return u;for(const l in a)(on(a[l])||o&&on(o[l])||_z(l,e)||n?.getValue(l)?.liveStyle!==void 0)&&(u[l]=a[l]);return u}function NR(e){return window.getComputedStyle(e)}class AR extends bz{constructor(){super(...arguments),this.type="html",this.renderInstance=zz}readValueFromInstance(t,n){if(Yo.has(n))return this.projection?.isProjecting?rp(n):sO(t,n);{const a=NR(t),o=(LS(n)?a.getPropertyValue(n):a[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Sz(t,n)}build(t,n,a){_g(t,n,a.transformTemplate)}scrapeMotionValuesFromProps(t,n,a){return Tg(t,n,a)}}const OR={offset:"stroke-dashoffset",array:"stroke-dasharray"},RR={offset:"strokeDashoffset",array:"strokeDasharray"};function MR(e,t,n=1,a=0,o=!0){e.pathLength=1;const u=o?OR:RR;e[u.offset]=`${-a}`,e[u.array]=`${t} ${n}`}const DR=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Tz(e,{attrX:t,attrY:n,attrScale:a,pathLength:o,pathSpacing:u=1,pathOffset:l=0,...d},f,h,g){if(_g(e,d,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:x,style:b}=e;x.transform&&(b.transform=x.transform,delete x.transform),(b.transform||x.transformOrigin)&&(b.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),b.transform&&(b.transformBox=g?.transformBox??"fill-box",delete x.transformBox);for(const v of DR)x[v]!==void 0&&(b[v]=x[v],delete x[v]);t!==void 0&&(x.x=t),n!==void 0&&(x.y=n),a!==void 0&&(x.scale=a),o!==void 0&&MR(x,o,u,l,!1)}const jz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ez=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $R(e,t,n,a){zz(e,t,void 0,a);for(const o in t.attrs)e.setAttribute(jz.has(o)?o:bg(o),t.attrs[o])}function Cz(e,t,n){const a=Tg(e,t,n);for(const o in e)if(on(e[o])||on(t[o])){const u=Go.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;a[u]=e[o]}return a}class LR extends bz{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ft}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yo.has(n)){const a=lz(n);return a&&a.default||0}return n=jz.has(n)?n:bg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,a){return Cz(t,n,a)}build(t,n,a){Tz(t,n,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,n,a,o){$R(t,n,a,o)}mount(t){this.isSVGTag=Ez(t.tagName),super.mount(t)}}const UR=zg.length;function Nz(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Nz(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<UR;n++){const a=zg[n],o=e.props[a];(Sl(o)||o===!1)&&(t[a]=o)}return t}function Az(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let a=0;a<n;a++)if(t[a]!==e[a])return!1;return!0}const PR=[...Sg].reverse(),VR=Sg.length;function ZR(e){return t=>Promise.all(t.map(({animation:n,options:a})=>KO(e,n,a)))}function BR(e){let t=ZR(e),n=u1(),a=!0;const o=f=>(h,g)=>{const x=Oo(e,g,f==="exit"?e.presenceContext?.custom:void 0);if(x){const{transition:b,transitionEnd:v,...w}=x;h={...h,...w,...v}}return h};function u(f){t=f(e)}function l(f){const{props:h}=e,g=Nz(e.parent)||{},x=[],b=new Set;let v={},w=1/0;for(let C=0;C<VR;C++){const N=PR[C],R=n[N],j=h[N]!==void 0?h[N]:g[N],L=Sl(j),P=N===f?R.isActive:null;P===!1&&(w=C);let $=j===g[N]&&j!==h[N]&&L;if($&&a&&e.manuallyAnimateOnMount&&($=!1),R.protectedKeys={...v},!R.isActive&&P===null||!j&&!R.prevProp||id(j)||typeof j=="boolean")continue;const Y=IR(R.prevProp,j);let U=Y||N===f&&R.isActive&&!$&&L||C>w&&L,X=!1;const ue=Array.isArray(j)?j:[j];let ae=ue.reduce(o(N),{});P===!1&&(ae={});const{prevResolvedValues:oe={}}=R,te={...oe,...ae},se=F=>{U=!0,b.has(F)&&(X=!0,b.delete(F)),R.needsAnimating[F]=!0;const Z=e.getValue(F);Z&&(Z.liveStyle=!1)};for(const F in te){const Z=ae[F],de=oe[F];if(v.hasOwnProperty(F))continue;let O=!1;up(Z)&&up(de)?O=!Az(Z,de):O=Z!==de,O?Z!=null?se(F):b.add(F):Z!==void 0&&b.has(F)?se(F):R.protectedKeys[F]=!0}R.prevProp=j,R.prevResolvedValues=ae,R.isActive&&(v={...v,...ae}),a&&e.blockInitialAnimation&&(U=!1);const re=$&&Y;U&&(!re||X)&&x.push(...ue.map(F=>{const Z={type:N};if(typeof F=="string"&&a&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:de}=e,O=Oo(de,F);if(de.enteringChildren&&O){const{delayChildren:A}=O.transition||{};Z.delay=ez(de.enteringChildren,e,A)}}return{animation:F,options:Z}}))}if(b.size){const C={};if(typeof h.initial!="boolean"){const N=Oo(e,Array.isArray(h.initial)?h.initial[0]:h.initial);N&&N.transition&&(C.transition=N.transition)}b.forEach(N=>{const R=e.getBaseTarget(N),j=e.getValue(N);j&&(j.liveStyle=!0),C[N]=R??null}),x.push({animation:C})}let _=!!x.length;return a&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(_=!1),a=!1,_?t(x):Promise.resolve()}function d(f,h){if(n[f].isActive===h)return Promise.resolve();e.variantChildren?.forEach(x=>x.animationState?.setActive(f,h)),n[f].isActive=h;const g=l(f);for(const x in n)n[x].protectedKeys={};return g}return{animateChanges:l,setActive:d,setAnimateFunction:u,getState:()=>n,reset:()=>{n=u1()}}}function IR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Az(t,e):!1}function pi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function u1(){return{animate:pi(!0),whileInView:pi(),whileHover:pi(),whileTap:pi(),whileDrag:pi(),whileFocus:pi(),exit:pi()}}function c1(e,t){e.min=t.min,e.max=t.max}function dr(e,t){c1(e.x,t.x),c1(e.y,t.y)}function d1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Oz=1e-4,HR=1-Oz,FR=1+Oz,Rz=.01,qR=0-Rz,GR=0+Rz;function yn(e){return e.max-e.min}function YR(e,t,n){return Math.abs(e-t)<=n}function f1(e,t,n,a=.5){e.origin=a,e.originPoint=bt(t.min,t.max,e.origin),e.scale=yn(n)/yn(t),e.translate=bt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=HR&&e.scale<=FR||isNaN(e.scale))&&(e.scale=1),(e.translate>=qR&&e.translate<=GR||isNaN(e.translate))&&(e.translate=0)}function cl(e,t,n,a){f1(e.x,t.x,n.x,a?a.originX:void 0),f1(e.y,t.y,n.y,a?a.originY:void 0)}function h1(e,t,n){e.min=n.min+t.min,e.max=e.min+yn(t)}function XR(e,t,n){h1(e.x,t.x,n.x),h1(e.y,t.y,n.y)}function m1(e,t,n){e.min=t.min-n.min,e.max=e.min+yn(t)}function Vc(e,t,n){m1(e.x,t.x,n.x),m1(e.y,t.y,n.y)}function p1(e,t,n,a,o){return e-=t,e=Pc(e,1/n,a),o!==void 0&&(e=Pc(e,1/o,a)),e}function KR(e,t=0,n=1,a=.5,o,u=e,l=e){if(_r.test(t)&&(t=parseFloat(t),t=bt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let d=bt(u.min,u.max,a);e===u&&(d-=t),e.min=p1(e.min,t,n,d,o),e.max=p1(e.max,t,n,d,o)}function g1(e,t,[n,a,o],u,l){KR(e,t[n],t[a],t[o],t.scale,u,l)}const JR=["x","scaleX","originX"],QR=["y","scaleY","originY"];function y1(e,t,n,a){g1(e.x,t,JR,n?n.x:void 0,a?a.x:void 0),g1(e.y,t,QR,n?n.y:void 0,a?a.y:void 0)}function x1(e){return e.translate===0&&e.scale===1}function Mz(e){return x1(e.x)&&x1(e.y)}function b1(e,t){return e.min===t.min&&e.max===t.max}function WR(e,t){return b1(e.x,t.x)&&b1(e.y,t.y)}function v1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dz(e,t){return v1(e.x,t.x)&&v1(e.y,t.y)}function k1(e){return yn(e.x)/yn(e.y)}function w1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function er(e){return[e("x"),e("y")]}function eM(e,t,n){let a="";const o=e.x.translate/t.x,u=e.y.translate/t.y,l=n?.z||0;if((o||u||l)&&(a=`translate3d(${o}px, ${u}px, ${l}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:g,rotateX:x,rotateY:b,skewX:v,skewY:w}=n;h&&(a=`perspective(${h}px) ${a}`),g&&(a+=`rotate(${g}deg) `),x&&(a+=`rotateX(${x}deg) `),b&&(a+=`rotateY(${b}deg) `),v&&(a+=`skewX(${v}deg) `),w&&(a+=`skewY(${w}deg) `)}const d=e.x.scale*t.x,f=e.y.scale*t.y;return(d!==1||f!==1)&&(a+=`scale(${d}, ${f})`),a||"none"}const $z=["TopLeft","TopRight","BottomLeft","BottomRight"],tM=$z.length,S1=e=>typeof e=="string"?parseFloat(e):e,z1=e=>typeof e=="number"||pe.test(e);function nM(e,t,n,a,o,u){o?(e.opacity=bt(0,n.opacity??1,rM(a)),e.opacityExit=bt(t.opacity??1,0,aM(a))):u&&(e.opacity=bt(t.opacity??1,n.opacity??1,a));for(let l=0;l<tM;l++){const d=`border${$z[l]}Radius`;let f=_1(t,d),h=_1(n,d);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||z1(f)===z1(h)?(e[d]=Math.max(bt(S1(f),S1(h),a),0),(_r.test(h)||_r.test(f))&&(e[d]+="%")):e[d]=h}(t.rotate||n.rotate)&&(e.rotate=bt(t.rotate||0,n.rotate||0,a))}function _1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rM=Lz(0,.5,AS),aM=Lz(.5,.95,ar);function Lz(e,t,n){return a=>a<e?0:a>t?1:n(vl(e,t,a))}function iM(e,t,n){const a=on(e)?e:Uo(e);return a.start(yg("",a,t,n)),a.animation}function zl(e,t,n,a={passive:!0}){return e.addEventListener(t,n,a),()=>e.removeEventListener(t,n)}const oM=(e,t)=>e.depth-t.depth;class sM{constructor(){this.children=[],this.isDirty=!1}add(t){eg(this.children,t),this.isDirty=!0}remove(t){tg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(oM),this.isDirty=!1,this.children.forEach(t)}}function lM(e,t){const n=gn.now(),a=({timestamp:o})=>{const u=o-n;u>=t&&(Va(a),e(u-t))};return mt.setup(a,!0),()=>Va(a)}function Ec(e){return on(e)?e.get():e}class uM{constructor(){this.members=[]}add(t){eg(this.members,t),t.scheduleRender()}remove(t){if(tg(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let a;for(let o=n;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1){a=u;break}}return a?(this.promote(a),!0):!1}promote(t,n){const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.instance&&a.scheduleRender(),t.scheduleRender();const o=a.options.layoutDependency,u=t.options.layoutDependency;o!==void 0&&u!==void 0&&o===u||(t.resumeFrom=a,n&&(t.resumeFrom.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:d}=t.options;d===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:a}=t;n.onExitComplete&&n.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Cc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},am=["","X","Y","Z"],cM=1e3;let dM=0;function im(e,t,n,a){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),a&&(a[e]=0))}function Uz(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=az(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:u}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",mt,!(o||u))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&Uz(a)}function Pz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:a,resetTransform:o}){return class{constructor(l={},d=t?.()){this.id=dM++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(mM),this.nodes.forEach(xM),this.nodes.forEach(bM),this.nodes.forEach(pM)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new sM)}addEventListener(l,d){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new ag),this.eventHandlers.get(l).add(d)}notifyListeners(l,...d){const f=this.eventHandlers.get(l);f&&f.notify(...d)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=pz(l)&&!hR(l),this.instance=l;const{layoutId:d,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||d)&&(this.isLayoutDirty=!0),e){let g,x=0;const b=()=>this.root.updateBlockedByResize=!1;mt.read(()=>{x=window.innerWidth}),e(l,()=>{const v=window.innerWidth;v!==x&&(x=v,this.root.updateBlockedByResize=!0,g&&g(),g=lM(b,250),Cc.hasAnimatedSinceResize&&(Cc.hasAnimatedSinceResize=!1,this.nodes.forEach(E1)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&h&&(d||f)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:x,hasRelativeLayoutChanged:b,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||h.getDefaultTransition()||zM,{onLayoutAnimationStart:_,onLayoutAnimationComplete:C}=h.getProps(),N=!this.targetLayout||!Dz(this.targetLayout,v),R=!x&&b;if(this.options.layoutRoot||this.resumeFrom||R||x&&(N||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const j={...gg(w,"layout"),onPlay:_,onComplete:C};(h.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j),this.setAnimationOrigin(g,R)}else x||E1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Va(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(vM),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Uz(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const x=this.path[g];x.shouldResetTransform=!0,x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:d,layout:f}=this.options;if(d===void 0&&!f)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(T1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(j1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yM),this.nodes.forEach(fM),this.nodes.forEach(hM)):this.nodes.forEach(j1),this.clearAllSnapshots();const d=gn.now();en.delta=Tr(0,1e3/60,d-en.timestamp),en.timestamp=d,en.isProcessing=!0,Kh.update.process(en),Kh.preRender.process(en),Kh.render.process(en),en.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gM),this.sharedNodes.forEach(kM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!yn(this.snapshot.measuredBox.x)&&!yn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ft(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(d=!1),d&&this.instance){const f=a(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:f,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!Mz(this.projectionDelta),f=this.getTransformTemplate(),h=f?f(this.latestValues,""):void 0,g=h!==this.prevTransformTemplateValue;l&&this.instance&&(d||vi(this.latestValues)||g)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const d=this.measurePageBox();let f=this.removeElementScroll(d);return l&&(f=this.removeTransform(f)),_M(f),{animationId:this.root.animationId,measuredBox:d,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Ft();const d=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(TM))){const{scroll:h}=this.root;h&&(To(d.x,h.offset.x),To(d.y,h.offset.y))}return d}removeElementScroll(l){const d=Ft();if(dr(d,l),this.scroll?.wasRoot)return d;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:g,options:x}=h;h!==this.root&&g&&x.layoutScroll&&(g.wasRoot&&dr(d,l),To(d.x,g.offset.x),To(d.y,g.offset.y))}return d}applyTransform(l,d=!1){const f=Ft();dr(f,l);for(let h=0;h<this.path.length;h++){const g=this.path[h];!d&&g.options.layoutScroll&&g.scroll&&g!==g.root&&jo(f,{x:-g.scroll.offset.x,y:-g.scroll.offset.y}),vi(g.latestValues)&&jo(f,g.latestValues)}return vi(this.latestValues)&&jo(f,this.latestValues),f}removeTransform(l){const d=Ft();dr(d,l);for(let f=0;f<this.path.length;f++){const h=this.path[f];if(!h.instance||!vi(h.latestValues))continue;pp(h.latestValues)&&h.updateSnapshot();const g=Ft(),x=h.measurePageBox();dr(g,x),y1(d,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,g)}return vi(this.latestValues)&&y1(d,this.latestValues),d}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==en.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:x}=this.options;if(!this.layout||!(g||x))return;this.resolvedRelativeTargetAt=en.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ft(),this.targetWithTransforms=Ft()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),XR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dr(this.target,this.layout.layoutBox),wz(this.target,this.targetDelta)):dr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pp(this.parent.latestValues)||kz(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,d,f){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ft(),this.relativeTargetOrigin=Ft(),Vc(this.relativeTargetOrigin,d,f),dr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),d=!!this.resumingFrom||this!==l;let f=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===en.timestamp&&(f=!1),f)return;const{layout:h,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||g))return;dr(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,b=this.treeScale.y;zR(this.layoutCorrected,this.treeScale,this.path,d),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Ft());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(d1(this.prevProjectionDelta.x,this.projectionDelta.x),d1(this.prevProjectionDelta.y,this.projectionDelta.y)),cl(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==b||!w1(this.projectionDelta.x,this.prevProjectionDelta.x)||!w1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_o(),this.projectionDelta=_o(),this.projectionDeltaWithTransform=_o()}setAnimationOrigin(l,d=!1){const f=this.snapshot,h=f?f.latestValues:{},g={...this.latestValues},x=_o();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const b=Ft(),v=f?f.source:void 0,w=this.layout?this.layout.source:void 0,_=v!==w,C=this.getStack(),N=!C||C.members.length<=1,R=!!(_&&!N&&this.options.crossfade===!0&&!this.path.some(SM));this.animationProgress=0;let j;this.mixTargetDelta=L=>{const P=L/1e3;C1(x.x,l.x,P),C1(x.y,l.y,P),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vc(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wM(this.relativeTarget,this.relativeTargetOrigin,b,P),j&&WR(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=Ft()),dr(j,this.relativeTarget)),_&&(this.animationValues=g,nM(g,h,this.latestValues,P,R,N)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Va(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mt.update(()=>{Cc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Uo(0)),this.currentAnimation=iM(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),l.onUpdate&&l.onUpdate(d)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:d,target:f,layout:h,latestValues:g}=l;if(!(!d||!f||!h)){if(this!==l&&this.layout&&h&&Vz(this.options.animationType,this.layout.layoutBox,h.layoutBox)){f=this.target||Ft();const x=yn(this.layout.layoutBox.x);f.x.min=l.target.x.min,f.x.max=f.x.min+x;const b=yn(this.layout.layoutBox.y);f.y.min=l.target.y.min,f.y.max=f.y.min+b}dr(d,f),jo(d,g),cl(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(l,d){this.sharedNodes.has(l)||this.sharedNodes.set(l,new uM),this.sharedNodes.get(l).add(d);const h=d.options.initialPromotionConfig;d.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(d):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:d,preserveFollowOpacity:f}={}){const h=this.getStack();h&&h.promote(this,f),l&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let d=!1;const{latestValues:f}=l;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const h={};f.z&&im("z",l,h,this.animationValues);for(let g=0;g<am.length;g++)im(`rotate${am[g]}`,l,h,this.animationValues),im(`skew${am[g]}`,l,h,this.animationValues);l.render();for(const g in h)l.setStaticValue(g,h[g]),this.animationValues&&(this.animationValues[g]=h[g]);l.scheduleRender()}applyProjectionStyles(l,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=Ec(d?.pointerEvents)||"",l.transform=f?f(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=Ec(d?.pointerEvents)||""),this.hasProjected&&!vi(this.latestValues)&&(l.transform=f?f({},""):"none",this.hasProjected=!1);return}l.visibility="";const g=h.animationValues||h.latestValues;this.applyTransformsToTarget();let x=eM(this.projectionDeltaWithTransform,this.treeScale,g);f&&(x=f(g,x)),l.transform=x;const{x:b,y:v}=this.projectionDelta;l.transformOrigin=`${b.origin*100}% ${v.origin*100}% 0`,h.animationValues?l.opacity=h===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:l.opacity=h===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const w in yp){if(g[w]===void 0)continue;const{correct:_,applyTo:C,isCSSVariable:N}=yp[w],R=x==="none"?g[w]:_(g[w],h);if(C){const j=C.length;for(let L=0;L<j;L++)l[C[L]]=R}else N?this.options.visualElement.renderState.vars[w]=R:l[w]=R}this.options.layoutId&&(l.pointerEvents=h===this?Ec(d?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(T1),this.root.sharedNodes.clear()}}}function fM(e){e.updateLayout()}function hM(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:a}=e.layout,{animationType:o}=e.options,u=t.source!==e.layout.source;o==="size"?er(g=>{const x=u?t.measuredBox[g]:t.layoutBox[g],b=yn(x);x.min=n[g].min,x.max=x.min+b}):Vz(o,t.layoutBox,n)&&er(g=>{const x=u?t.measuredBox[g]:t.layoutBox[g],b=yn(n[g]);x.max=x.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+b)});const l=_o();cl(l,n,t.layoutBox);const d=_o();u?cl(d,e.applyTransform(a,!0),t.measuredBox):cl(d,n,t.layoutBox);const f=!Mz(l);let h=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:x,layout:b}=g;if(x&&b){const v=Ft();Vc(v,t.layoutBox,x.layoutBox);const w=Ft();Vc(w,n,b.layoutBox),Dz(v,w)||(h=!0),g.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:d,layoutDelta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function mM(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function pM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gM(e){e.clearSnapshot()}function T1(e){e.clearMeasurements()}function j1(e){e.isLayoutDirty=!1}function yM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function E1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xM(e){e.resolveTargetDelta()}function bM(e){e.calcProjection()}function vM(e){e.resetSkewAndRotation()}function kM(e){e.removeLeadSnapshot()}function C1(e,t,n){e.translate=bt(t.translate,0,n),e.scale=bt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function N1(e,t,n,a){e.min=bt(t.min,n.min,a),e.max=bt(t.max,n.max,a)}function wM(e,t,n,a){N1(e.x,t.x,n.x,a),N1(e.y,t.y,n.y,a)}function SM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zM={duration:.45,ease:[.4,0,.1,1]},A1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),O1=A1("applewebkit/")&&!A1("chrome/")?Math.round:ar;function R1(e){e.min=O1(e.min),e.max=O1(e.max)}function _M(e){R1(e.x),R1(e.y)}function Vz(e,t,n){return e==="position"||e==="preserve-aspect"&&!YR(k1(t),k1(n),.2)}function TM(e){return e!==e.root&&e.scroll?.wasRoot}const jM=Pz({attachResizeListener:(e,t)=>zl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),om={current:void 0},Zz=Pz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!om.current){const e=new jM({});e.mount(window),e.setOptions({layoutScroll:!0}),om.current=e}return om.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),jg=z.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function M1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function EM(...e){return t=>{let n=!1;const a=e.map(o=>{const u=M1(o,t);return!n&&typeof u=="function"&&(n=!0),u});if(n)return()=>{for(let o=0;o<a.length;o++){const u=a[o];typeof u=="function"?u():M1(e[o],null)}}}}function CM(...e){return z.useCallback(EM(...e),e)}class NM extends z.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const a=n.offsetParent,o=hp(a)&&a.offsetWidth||0,u=hp(a)&&a.offsetHeight||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=o-l.width-l.left,l.bottom=u-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function AM({children:e,isPresent:t,anchorX:n,anchorY:a,root:o}){const u=z.useId(),l=z.useRef(null),d=z.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=z.useContext(jg),h=e.props?.ref??e?.ref,g=CM(l,h);return z.useInsertionEffect(()=>{const{width:x,height:b,top:v,left:w,right:_,bottom:C}=d.current;if(t||!l.current||!x||!b)return;const N=n==="left"?`left: ${w}`:`right: ${_}`,R=a==="bottom"?`bottom: ${C}`:`top: ${v}`;l.current.dataset.motionPopId=u;const j=document.createElement("style");f&&(j.nonce=f);const L=o??document.head;return L.appendChild(j),j.sheet&&j.sheet.insertRule(`
12
- [data-motion-pop-id="${u}"] {
13
- position: absolute !important;
14
- width: ${x}px !important;
15
- height: ${b}px !important;
16
- ${N}px !important;
17
- ${R}px !important;
18
- }
19
- `),()=>{L.contains(j)&&L.removeChild(j)}},[t]),p.jsx(NM,{isPresent:t,childRef:l,sizeRef:d,children:z.cloneElement(e,{ref:g})})}const OM=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:u,mode:l,anchorX:d,anchorY:f,root:h})=>{const g=Wp(RM),x=z.useId();let b=!0,v=z.useMemo(()=>(b=!1,{id:x,initial:t,isPresent:n,custom:o,onExitComplete:w=>{g.set(w,!0);for(const _ of g.values())if(!_)return;a&&a()},register:w=>(g.set(w,!1),()=>g.delete(w))}),[n,g,a]);return u&&b&&(v={...v}),z.useMemo(()=>{g.forEach((w,_)=>g.set(_,!1))},[n]),z.useEffect(()=>{!n&&!g.size&&a&&a()},[n]),l==="popLayout"&&(e=p.jsx(AM,{isPresent:n,anchorX:d,anchorY:f,root:h,children:e})),p.jsx(ad.Provider,{value:v,children:e})};function RM(){return new Map}function Bz(e=!0){const t=z.useContext(ad);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:o}=t,u=z.useId();z.useEffect(()=>{if(e)return o(u)},[e]);const l=z.useCallback(()=>e&&a&&a(u),[u,a,e]);return!n&&a?[!1,l]:[!0]}const sc=e=>e.key||"";function D1(e){const t=[];return z.Children.forEach(e,n=>{z.isValidElement(n)&&t.push(n)}),t}const MM=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:u="sync",propagate:l=!1,anchorX:d="left",anchorY:f="top",root:h})=>{const[g,x]=Bz(l),b=z.useMemo(()=>D1(e),[e]),v=l&&!g?[]:b.map(sc),w=z.useRef(!0),_=z.useRef(b),C=Wp(()=>new Map),N=z.useRef(new Set),[R,j]=z.useState(b),[L,P]=z.useState(b);vS(()=>{w.current=!1,_.current=b;for(let U=0;U<L.length;U++){const X=sc(L[U]);v.includes(X)?(C.delete(X),N.current.delete(X)):C.get(X)!==!0&&C.set(X,!1)}},[L,v.length,v.join("-")]);const $=[];if(b!==R){let U=[...b];for(let X=0;X<L.length;X++){const ue=L[X],ae=sc(ue);v.includes(ae)||(U.splice(X,0,ue),$.push(ue))}return u==="wait"&&$.length&&(U=$),P(D1(U)),j(b),null}const{forceRender:Y}=z.useContext(Qp);return p.jsx(p.Fragment,{children:L.map(U=>{const X=sc(U),ue=l&&!g?!1:b===L||v.includes(X),ae=()=>{if(N.current.has(X))return;if(N.current.add(X),C.has(X))C.set(X,!0);else return;let oe=!0;C.forEach(te=>{te||(oe=!1)}),oe&&(Y?.(),P(_.current),l&&x?.(),a&&a())};return p.jsx(OM,{isPresent:ue,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:u,root:h,onExitComplete:ue?void 0:ae,anchorX:d,anchorY:f,children:U},X)})})},Iz=z.createContext({strict:!1}),$1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let L1=!1;function DM(){if(L1)return;const e={};for(const t in $1)e[t]={isEnabled:n=>$1[t].some(a=>!!n[a])};xz(e),L1=!0}function Hz(){return DM(),vR()}function $M(e){const t=Hz();for(const n in e)t[n]={...t[n],...e[n]};xz(t)}const LM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||LM.has(e)}let Fz=e=>!Zc(e);function UM(e){typeof e=="function"&&(Fz=t=>t.startsWith("on")?!Zc(t):e(t))}try{UM(require("@emotion/is-prop-valid").default)}catch{}function PM(e,t,n){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||(Fz(o)||n===!0&&Zc(o)||!t&&!Zc(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const sd=z.createContext({});function VM(e,t){if(od(e)){const{initial:n,animate:a}=e;return{initial:n===!1||Sl(n)?n:void 0,animate:Sl(a)?a:void 0}}return e.inherit!==!1?t:{}}function ZM(e){const{initial:t,animate:n}=VM(e,z.useContext(sd));return z.useMemo(()=>({initial:t,animate:n}),[U1(t),U1(n)])}function U1(e){return Array.isArray(e)?e.join(" "):e}const Eg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qz(e,t,n){for(const a in t)!on(t[a])&&!_z(a,n)&&(e[a]=t[a])}function BM({transformTemplate:e},t){return z.useMemo(()=>{const n=Eg();return _g(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IM(e,t){const n=e.style||{},a={};return qz(a,n,e),Object.assign(a,BM(e,t)),a}function HM(e,t){const n={},a=IM(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=a,n}const Gz=()=>({...Eg(),attrs:{}});function FM(e,t,n,a){const o=z.useMemo(()=>{const u=Gz();return Tz(u,t,Ez(a),e.transformTemplate,e.style),{...u.attrs,style:{...u.style}}},[t]);if(e.style){const u={};qz(u,e.style,e),o.style={...u,...o.style}}return o}const qM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Cg(e){return typeof e!="string"||e.includes("-")?!1:!!(qM.indexOf(e)>-1||/[A-Z]/u.test(e))}function GM(e,t,n,{latestValues:a},o,u=!1,l){const f=(l??Cg(e)?FM:HM)(t,a,o,e),h=PM(t,typeof e=="string",u),g=e!==z.Fragment?{...h,...f,ref:n}:{},{children:x}=t,b=z.useMemo(()=>on(x)?x.get():x,[x]);return z.createElement(e,{...g,children:b})}function YM({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,o){return{latestValues:XM(n,a,o,e),renderState:t()}}function XM(e,t,n,a){const o={},u=a(e,{});for(const b in u)o[b]=Ec(u[b]);let{initial:l,animate:d}=e;const f=od(e),h=yz(e);t&&h&&!f&&e.inherit!==!1&&(l===void 0&&(l=t.initial),d===void 0&&(d=t.animate));let g=n?n.initial===!1:!1;g=g||l===!1;const x=g?d:l;if(x&&typeof x!="boolean"&&!id(x)){const b=Array.isArray(x)?x:[x];for(let v=0;v<b.length;v++){const w=xg(e,b[v]);if(w){const{transitionEnd:_,transition:C,...N}=w;for(const R in N){let j=N[R];if(Array.isArray(j)){const L=g?j.length-1:0;j=j[L]}j!==null&&(o[R]=j)}for(const R in _)o[R]=_[R]}}}return o}const Yz=e=>(t,n)=>{const a=z.useContext(sd),o=z.useContext(ad),u=()=>YM(e,t,a,o);return n?u():Wp(u)},KM=Yz({scrapeMotionValuesFromProps:Tg,createRenderState:Eg}),JM=Yz({scrapeMotionValuesFromProps:Cz,createRenderState:Gz}),QM=Symbol.for("motionComponentSymbol");function WM(e,t,n){const a=z.useRef(n);z.useInsertionEffect(()=>{a.current=n});const o=z.useRef(null);return z.useCallback(u=>{u&&e.onMount?.(u),t&&(u?t.mount(u):t.unmount());const l=a.current;if(typeof l=="function")if(u){const d=l(u);typeof d=="function"&&(o.current=d)}else o.current?(o.current(),o.current=null):l(u);else l&&(l.current=u)},[t])}const Xz=z.createContext({});function il(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function e3(e,t,n,a,o,u){const{visualElement:l}=z.useContext(sd),d=z.useContext(Iz),f=z.useContext(ad),h=z.useContext(jg).reducedMotion,g=z.useRef(null),x=z.useRef(!1);a=a||d.renderer,!g.current&&a&&(g.current=a(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:h,isSVG:u}),x.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));const b=g.current,v=z.useContext(Xz);b&&!b.projection&&o&&(b.type==="html"||b.type==="svg")&&t3(g.current,n,o,v);const w=z.useRef(!1);z.useInsertionEffect(()=>{b&&w.current&&b.update(n,f)});const _=n[rz],C=z.useRef(!!_&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return vS(()=>{x.current=!0,b&&(w.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),C.current&&b.animationState&&b.animationState.animateChanges())}),z.useEffect(()=>{b&&(!C.current&&b.animationState&&b.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),C.current=!1),b.enteringChildren=void 0)}),b}function t3(e,t,n,a){const{layoutId:o,layout:u,drag:l,dragConstraints:d,layoutScroll:f,layoutRoot:h,layoutCrossfade:g}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Kz(e.parent)),e.projection.setOptions({layoutId:o,layout:u,alwaysMeasureLayout:!!l||d&&il(d),visualElement:e,animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,crossfade:g,layoutScroll:f,layoutRoot:h})}function Kz(e){if(e)return e.options.allowProjection!==!1?e.projection:Kz(e.parent)}function sm(e,{forwardMotionProps:t=!1,type:n}={},a,o){a&&$M(a);const u=n?n==="svg":Cg(e),l=u?JM:KM;function d(h,g){let x;const b={...z.useContext(jg),...h,layoutId:n3(h)},{isStatic:v}=b,w=ZM(h),_=l(h,v);if(!v&&bS){r3();const C=a3(b);x=C.MeasureLayout,w.visualElement=e3(e,_,b,o,C.ProjectionNode,u)}return p.jsxs(sd.Provider,{value:w,children:[x&&w.visualElement?p.jsx(x,{visualElement:w.visualElement,...b}):null,GM(e,h,WM(_,w.visualElement,g),_,v,t,u)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=z.forwardRef(d);return f[QM]=e,f}function n3({layoutId:e}){const t=z.useContext(Qp).id;return t&&e!==void 0?t+"-"+e:e}function r3(e,t){z.useContext(Iz).strict}function a3(e){const t=Hz(),{drag:n,layout:a}=t;if(!n&&!a)return{};const o={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function i3(e,t){if(typeof Proxy>"u")return sm;const n=new Map,a=(u,l)=>sm(u,l,e,t),o=(u,l)=>a(u,l);return new Proxy(o,{get:(u,l)=>l==="create"?a:(n.has(l)||n.set(l,sm(l,void 0,e,t)),n.get(l))})}const o3=(e,t)=>t.isSVG??Cg(e)?new LR(t):new AR(t,{allowProjection:e!==z.Fragment});class s3 extends Ha{constructor(t){super(t),t.animationState||(t.animationState=BR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();id(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let l3=0;class u3 extends Ha{constructor(){super(...arguments),this.id=l3++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const c3={animation:{Feature:s3},exit:{Feature:u3}};function Ll(e){return{point:{x:e.pageX,y:e.pageY}}}const d3=e=>t=>wg(t)&&e(t,Ll(t));function dl(e,t,n,a){return zl(e,t,d3(n),a)}const Jz=({current:e})=>e?e.ownerDocument.defaultView:null,P1=(e,t)=>Math.abs(e-t);function f3(e,t){const n=P1(e.x,t.x),a=P1(e.y,t.y);return Math.sqrt(n**2+a**2)}const V1=new Set(["auto","scroll"]);class Qz{constructor(t,n,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:u=!1,distanceThreshold:l=3,element:d}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=um(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,_=f3(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!_)return;const{point:C}=v,{timestamp:N}=en;this.history.push({...C,timestamp:N});const{onStart:R,onMove:j}=this.handlers;w||(R&&R(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=lm(w,this.transformPagePoint),mt.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:_,onSessionEnd:C,resumeAnimation:N}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&N&&N(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=um(v.type==="pointercancel"?this.lastMoveEventInfo:lm(w,this.transformPagePoint),this.history);this.startEvent&&_&&_(v,R),C&&C(v,R)},!wg(t))return;this.dragSnapToOrigin=u,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=o||window;const f=Ll(t),h=lm(f,this.transformPagePoint),{point:g}=h,{timestamp:x}=en;this.history=[{...g,timestamp:x}];const{onSessionStart:b}=n;b&&b(t,um(h,this.history)),this.removeListeners=Ml(dl(this.contextWindow,"pointermove",this.handlePointerMove),dl(this.contextWindow,"pointerup",this.handlePointerUp),dl(this.contextWindow,"pointercancel",this.handlePointerUp)),d&&this.startScrollTracking(d)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(V1.has(a.overflowX)||V1.has(a.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const a=t===window,o=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},u={x:o.x-n.x,y:o.y-n.y};u.x===0&&u.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=u.x,this.lastMoveEventInfo.point.y+=u.y):this.history.length>0&&(this.history[0].x-=u.x,this.history[0].y-=u.y),this.scrollPositions.set(t,o),mt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Va(this.updatePoint)}}function lm(e,t){return t?{point:t(e.point)}:e}function Z1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function um({point:e},t){return{point:e,delta:Z1(e,Wz(t)),offset:Z1(e,h3(t)),velocity:m3(t,.1)}}function h3(e){return e[0]}function Wz(e){return e[e.length-1]}function m3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const o=Wz(e);for(;n>=0&&(a=e[n],!(o.timestamp-a.timestamp>na(t)));)n--;if(!a)return{x:0,y:0};const u=rr(o.timestamp-a.timestamp);if(u===0)return{x:0,y:0};const l={x:(o.x-a.x)/u,y:(o.y-a.y)/u};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function p3(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?bt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?bt(n,e,a.max):Math.min(e,n)),e}function B1(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function g3(e,{top:t,left:n,bottom:a,right:o}){return{x:B1(e.x,n,o),y:B1(e.y,t,a)}}function I1(e,t){let n=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,a]=[a,n]),{min:n,max:a}}function y3(e,t){return{x:I1(e.x,t.x),y:I1(e.y,t.y)}}function x3(e,t){let n=.5;const a=yn(e),o=yn(t);return o>a?n=vl(t.min,t.max-a,e.min):a>o&&(n=vl(e.min,e.max-o,t.min)),Tr(0,1,n)}function b3(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const xp=.35;function v3(e=xp){return e===!1?e=0:e===!0&&(e=xp),{x:H1(e,"left","right"),y:H1(e,"top","bottom")}}function H1(e,t,n){return{min:F1(e,t),max:F1(e,n)}}function F1(e,t){return typeof e=="number"?e:e[t]||0}const k3=new WeakMap;class w3{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ft(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const u=x=>{n?(this.stopAnimation(),this.snapToCursor(Ll(x).point)):this.pauseAnimation()},l=(x,b)=>{this.stopAnimation();const{drag:v,dragPropagation:w,onDragStart:_}=this.getProps();if(v&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lR(v),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),er(N=>{let R=this.getAxisMotionValue(N).get()||0;if(_r.test(R)){const{projection:j}=this.visualElement;if(j&&j.layout){const L=j.layout.layoutBox[N];L&&(R=yn(L)*(parseFloat(R)/100))}}this.originPoint[N]=R}),_&&mt.postRender(()=>_(x,b)),cp(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},d=(x,b)=>{this.latestPointerEvent=x,this.latestPanInfo=b;const{dragPropagation:v,dragDirectionLock:w,onDirectionLock:_,onDrag:C}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:N}=b;if(w&&this.currentDirection===null){this.currentDirection=S3(N),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",b.point,N),this.updateAxis("y",b.point,N),this.visualElement.render(),C&&C(x,b)},f=(x,b)=>{this.latestPointerEvent=x,this.latestPanInfo=b,this.stop(x,b),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>er(x=>this.getAnimationState(x)==="paused"&&this.getAxisMotionValue(x).animation?.play()),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Qz(t,{onSessionStart:u,onStart:l,onMove:d,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:a,contextWindow:Jz(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,o=n||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!o||!a)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:d}=this.getProps();d&&mt.postRender(()=>d(a,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,a){const{drag:o}=this.getProps();if(!a||!lc(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let l=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(l=p3(l,this.constraints[t],this.elastic[t])),u.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&il(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=g3(a.layoutBox,t):this.constraints=!1,this.elastic=v3(n),o!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&er(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=b3(a.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!il(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=_R(a,o.root,this.visualElement.getTransformPagePoint());let l=y3(o.layout.layoutBox,u);if(n){const d=n(wR(l));this.hasMutatedConstraints=!!d,d&&(l=vz(d))}return l}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:o,dragTransition:u,dragSnapToOrigin:l,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},h=er(g=>{if(!lc(g,n,this.currentDirection))return;let x=f&&f[g]||{};l&&(x={min:0,max:0});const b=o?200:1e6,v=o?40:1e7,w={type:"inertia",velocity:a?t[g]:0,bounceStiffness:b,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...u,...x};return this.startAxisValueAnimation(g,w)});return Promise.all(h).then(d)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return cp(this.visualElement,t),a.start(yg(t,a,0,n,this.visualElement,!1))}stopAnimation(){er(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){er(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[n];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){er(n=>{const{drag:a}=this.getProps();if(!lc(n,a,this.currentDirection))return;const{projection:o}=this.visualElement,u=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:d}=o.layout.layoutBox[n],f=u.get()||0;u.set(t[n]-bt(l,d,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!il(n)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};er(l=>{const d=this.getAxisMotionValue(l);if(d&&this.constraints!==!1){const f=d.get();o[l]=x3({min:f,max:f},this.constraints[l])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),er(l=>{if(!lc(l,t,null))return;const d=this.getAxisMotionValue(l),{min:f,max:h}=this.constraints[l];d.set(bt(f,h,o[l]))})}addListeners(){if(!this.visualElement.current)return;k3.set(this.visualElement,this);const t=this.visualElement.current,n=dl(t,"pointerdown",f=>{const{drag:h,dragListener:g=!0}=this.getProps(),x=f.target,b=x!==t&&mz(x);h&&g&&!b&&this.start(f)}),a=()=>{const{dragConstraints:f}=this.getProps();il(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,u=o.addEventListener("measure",a);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),mt.read(a);const l=zl(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:h})=>{this.isDragging&&h&&(er(g=>{const x=this.getAxisMotionValue(g);x&&(this.originPoint[g]+=f[g].translate,x.set(x.get()+f[g].translate))}),this.visualElement.render())}));return()=>{l(),n(),u(),d&&d()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:u=!1,dragElastic:l=xp,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:o,dragConstraints:u,dragElastic:l,dragMomentum:d}}}function lc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class z3 extends Ha{constructor(t){super(t),this.removeGroupControls=ar,this.removeListeners=ar,this.controls=new w3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ar}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const q1=e=>(t,n)=>{e&&mt.postRender(()=>e(t,n))};class _3 extends Ha{constructor(){super(...arguments),this.removePointerDownListener=ar}onPointerDown(t){this.session=new Qz(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jz(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:q1(t),onStart:q1(n),onMove:a,onEnd:(u,l)=>{delete this.session,o&&mt.postRender(()=>o(u,l))}}}mount(){this.removePointerDownListener=dl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let cm=!1;class T3 extends z.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:o}=this.props,{projection:u}=t;u&&(n.group&&n.group.add(u),a&&a.register&&o&&a.register(u),cm&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Cc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:o,isPresent:u}=this.props,{projection:l}=a;return l&&(l.isPresent=u,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),cm=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==u?l.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?l.promote():l.relegate()||mt.postRender(()=>{const d=l.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kg.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:o}=t;cm=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function e_(e){const[t,n]=Bz(),a=z.useContext(Qp);return p.jsx(T3,{...e,layoutGroup:a,switchLayoutGroup:z.useContext(Xz),isPresent:t,safeToRemove:n})}const j3={pan:{Feature:_3},drag:{Feature:z3,ProjectionNode:Zz,MeasureLayout:e_}};function G1(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,u=a[o];u&&mt.postRender(()=>u(t,Ll(t)))}class E3 extends Ha{mount(){const{current:t}=this.node;t&&(this.unmount=uR(t,(n,a)=>(G1(this.node,a,"Start"),o=>G1(this.node,o,"End"))))}unmount(){}}class C3 extends Ha{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ml(zl(this.node.current,"focus",()=>this.onFocus()),zl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Y1(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),u=a[o];u&&mt.postRender(()=>u(t,Ll(t)))}class N3 extends Ha{mount(){const{current:t}=this.node;t&&(this.unmount=fR(t,(n,a)=>(Y1(this.node,a,"Start"),(o,{success:u})=>Y1(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bp=new WeakMap,dm=new WeakMap,A3=e=>{const t=bp.get(e.target);t&&t(e)},O3=e=>{e.forEach(A3)};function R3({root:e,...t}){const n=e||document;dm.has(n)||dm.set(n,{});const a=dm.get(n),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(O3,{root:e,...t})),a[o]}function M3(e,t,n){const a=R3(t);return bp.set(e,n),a.observe(e),()=>{bp.delete(e),a.unobserve(e)}}const D3={some:0,all:1};class $3 extends Ha{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:u}=t,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:D3[o]},d=f=>{const{isIntersecting:h}=f;if(this.isInView===h||(this.isInView=h,u&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:g,onViewportLeave:x}=this.node.getProps(),b=h?g:x;b&&b(f)};return M3(this.node.current,l,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(L3(t,n))&&this.startObserver()}unmount(){}}function L3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const U3={inView:{Feature:$3},tap:{Feature:N3},focus:{Feature:C3},hover:{Feature:E3}},P3={layout:{ProjectionNode:Zz,MeasureLayout:e_}},V3={...c3,...U3,...j3,...P3},ot=i3(V3,o3),t_=()=>{const[e,t]=z.useState(!!localStorage.getItem("morpheus.auth.token"));return z.useEffect(()=>{const o=()=>{t(!!localStorage.getItem("morpheus.auth.token"))};return window.addEventListener("storage",o),()=>window.removeEventListener("storage",o)},[]),{isAuthenticated:e,login:o=>{localStorage.setItem("morpheus.auth.token",o),t(!0)},logout:()=>{localStorage.removeItem("morpheus.auth.token"),t(!1),window.location.href="/login"}}};function Z3({onMenuClick:e,isDark:t,toggleTheme:n}){return p.jsxs("header",{className:"lg:hidden fixed top-0 left-0 right-0 z-50 bg-azure-surface dark:bg-black border-b border-azure-border dark:border-matrix-primary/30 p-4 flex items-center justify-between",children:[p.jsxs("h1",{className:"text-lg font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[p.jsx(So,{className:"w-6 h-6"}),"MORPHEUS"]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:n,className:"p-1 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight","aria-label":t?"Modo claro":"Modo escuro",children:t?p.jsx(lS,{className:"w-5 h-5"}):p.jsx(oS,{className:"w-5 h-5"})}),p.jsx("button",{onClick:e,className:"p-2 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-secondary","aria-label":"Abrir menu",children:p.jsx(YN,{className:"w-6 h-6"})})]})]})}const Da={list:()=>Ne.get("/webhooks"),get:e=>Ne.get(`/webhooks/${e}`),create:e=>Ne.post("/webhooks",e),update:(e,t)=>Ne.put(`/webhooks/${e}`,t),delete:e=>Ne.delete(`/webhooks/${e}`),listNotifications:e=>{const t=new URLSearchParams;e?.webhookId&&t.set("webhookId",e.webhookId),e?.unreadOnly&&t.set("unreadOnly","true");const n=t.toString()?`?${t}`:"";return Ne.get(`/webhooks/notifications${n}`)},unreadCount:()=>Ne.get("/webhooks/notifications/unread-count"),markRead:e=>Ne.post("/webhooks/notifications/read",{ids:e})},jr=({open:e,onOpenChange:t,children:n})=>e?p.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[p.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>t(!1)}),p.jsx("div",{className:"relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full max-w-md md:max-w-2xl max-h-[90vh] overflow-hidden flex flex-col",children:n})]}):null,Po=({className:e,children:t})=>p.jsx("div",{className:`relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full max-w-md md:max-w-2xl max-h-[90vh] overflow-hidden flex flex-col ${e}`,children:p.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:t})}),Er=({children:e})=>p.jsx("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left border-b border-azure-border dark:border-matrix-primary p-6",children:e}),Cr=({className:e,children:t})=>p.jsx("h3",{className:`text-lg font-semibold leading-none tracking-tight ${e}`,children:t}),B3=({className:e,children:t})=>p.jsx("div",{className:`mt-6 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 ${e}`,children:t}),nr=({className:e,variant:t="default",size:n="default",...a})=>{const d=`inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 ${t==="destructive"?"bg-red-500 text-zinc-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-zinc-50 dark:hover:bg-red-900/90":t==="outline"?"border border-azure-border dark:border-matrix-primary bg-transparent hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-primary dark:text-matrix-secondary":t==="secondary"?"bg-azure-surface dark:bg-zinc-800 hover:bg-azure-hover dark:hover:bg-zinc-700/80 text-azure-text-primary dark:text-matrix-secondary":t==="ghost"?"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-primary dark:text-matrix-secondary":t==="link"?"text-azure-primary dark:text-matrix-highlight underline-offset-4 hover:underline":"bg-azure-primary dark:bg-matrix-highlight text-azure-text-inverse dark:text-black hover:bg-azure-primary/90 dark:hover:bg-matrix-highlight/90"} ${n==="sm"?"h-9 px-3 rounded-md":n==="lg"?"h-11 px-8 rounded-md":n==="icon"?"h-10 w-10":"h-10 px-4 py-2"} ${e||""}`;return p.jsx("button",{className:d,...a})};function I3({isOpen:e,onClose:t,onConfirm:n}){return p.jsx(jr,{open:e,onOpenChange:t,children:p.jsxs(Po,{className:"sm:max-w-md bg-azure-surface dark:bg-zinc-900 border-azure-border dark:border-matrix-primary",children:[p.jsx(Er,{children:p.jsx(Cr,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:"Confirm Restart"})}),p.jsxs("div",{children:[p.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary mb-6",children:"Are you sure you want to restart the Morpheus agent? This will temporarily disconnect all services and channels."}),p.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-end",children:[p.jsx(nr,{variant:"outline",onClick:t,children:"Cancel"}),p.jsx(nr,{variant:"destructive",onClick:()=>{n(),t()},children:"Confirm Restart"})]})]})]})})}const Nc={list:e=>{const t=new URLSearchParams;e?.status&&t.set("status",e.status),e?.agent&&t.set("agent",e.agent),e?.origin_channel&&t.set("origin_channel",e.origin_channel),e?.session_id&&t.set("session_id",e.session_id),e?.limit&&t.set("limit",String(e.limit));const n=t.toString()?`?${t}`:"";return Ne.get(`/tasks${n}`)},get:e=>Ne.get(`/tasks/${e}`),stats:()=>Ne.get("/tasks/stats"),retry:e=>Ne.post(`/tasks/${e}/retry`,{})};function H3({children:e}){const t=pr(),[n,a]=z.useState(()=>{const C=localStorage.getItem("theme");return C?C==="dark":!0}),[o,u]=z.useState(!1),[l,d]=z.useState(!1),{logout:f}=t_(),{data:h}=an("/webhooks/notifications/unread-count",()=>Da.unreadCount(),{refreshInterval:1e4}),g=h?.count??0,{data:x}=an("/tasks/stats",()=>Nc.stats(),{refreshInterval:5e3}),b=(x?.pending??0)+(x?.running??0),v=async()=>{try{await Ne.post("/restart",{}),alert("Restart initiated successfully. The agent will restart shortly.")}catch(C){console.error("Failed to restart:",C),alert("Failed to restart the agent. Please try again.")}};z.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]),z.useEffect(()=>{u(!1)},[t.pathname]);const w=[{icon:b0,label:"Dashboard",path:"/"},{icon:yl,label:"Chat",path:"/chat"},{icon:z0,label:"Zaion",path:"/zaion"},{icon:w0,label:"MCP Servers",path:"/mcp-servers"},{icon:Lm,label:"Usage Stats",path:"/stats"},{icon:Mc,label:"Model Pricing",path:"/model-pricing"},{icon:So,label:"Sati Memories",path:"/sati-memories"},{icon:Bm,label:"Webhooks",path:"/webhooks"},{icon:Vm,label:"Tasks",path:"/tasks"}],_=[{icon:b0,label:"Dashboard",path:"/"},{icon:yl,label:"Chat",path:"/chat"},{icon:z0,label:"Zaion",path:"/zaion"},{icon:w0,label:"MCP Servers",path:"/mcp-servers"},{icon:Lm,label:"Usage Stats",path:"/stats"},{icon:Mc,label:"Model Pricing",path:"/model-pricing"},{icon:So,label:"Sati Memories",path:"/sati-memories"},{icon:Bm,label:"Webhooks",path:"/webhooks"},{icon:Vm,label:"Tasks",path:"/tasks"}];return p.jsxs("div",{className:"flex flex-col h-screen bg-azure-bg dark:bg-black text-azure-text-primary dark:text-matrix-secondary font-mono overflow-hidden transition-colors duration-300",children:[p.jsx(Z3,{onMenuClick:()=>u(!0),isDark:n,toggleTheme:()=>a(!n)}),p.jsxs("div",{className:"flex flex-1 overflow-hidden pt-16 lg:pt-0",children:[" ",p.jsxs("div",{className:"hidden lg:flex w-64 border-r border-azure-border dark:border-matrix-primary/30 bg-azure-surface dark:bg-black flex-col shrink-0 transition-colors duration-300",children:[p.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[p.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[p.jsx(So,{className:"w-6 h-6"}),"MORPHEUS"]}),p.jsx("button",{onClick:()=>a(!n),className:"p-1 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors",children:n?p.jsx(lS,{className:"w-4 h-4"}):p.jsx(oS,{className:"w-4 h-4"})})]}),p.jsxs("nav",{className:"flex-1 p-4 space-y-2",children:[w.map(C=>{const N=t.pathname===C.path;return p.jsxs(wr,{to:C.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${N?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,children:[p.jsx(C.icon,{className:"w-5 h-5"}),p.jsx("span",{children:C.label}),C.path==="/tasks"&&b>0&&p.jsx("span",{className:"ml-auto bg-yellow-500 text-black text-[10px] font-bold rounded-full px-1.5 py-0.5 leading-none",children:b>99?"99+":b})]},C.path)}),p.jsxs(wr,{to:"/logs",className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${t.pathname==="/logs"?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,children:[p.jsx(Zm,{className:"w-5 h-5"}),p.jsx("span",{children:"Logs"})]},"/logs"),p.jsxs(wr,{to:"/notifications",className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${t.pathname==="/notifications"?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,children:[p.jsxs("div",{className:"relative",children:[p.jsx(gl,{className:"w-5 h-5"}),g>0&&p.jsx("span",{className:"absolute -top-1.5 -right-1.5 bg-red-500 text-white text-[9px] font-bold rounded-full w-3.5 h-3.5 flex items-center justify-center leading-none",children:g>9?"9+":g})]}),p.jsx("span",{children:"Notifications"}),g>0&&p.jsx("span",{className:"ml-auto bg-red-500 text-white text-[10px] font-bold rounded-full px-1.5 py-0.5 leading-none",children:g>99?"99+":g})]},"/notifications")]}),p.jsx("div",{className:"p-2",children:p.jsxs("button",{onClick:()=>d(!0),className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary transition-colors",children:[p.jsx(S0,{className:"w-5 h-5"}),p.jsx("span",{children:"Restart"})]})}),p.jsx("div",{className:"p-2",children:p.jsxs("button",{onClick:f,className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-secondary hover:text-red-600 transition-colors",children:[p.jsx(v0,{className:"w-5 h-5"}),p.jsx("span",{children:"Logout"})]})})]}),p.jsx(MM,{children:o&&p.jsxs(ot.div,{className:"fixed inset-0 z-50 lg:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>u(!1),children:[p.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),p.jsxs(ot.div,{className:"absolute left-0 top-0 bottom-0 w-64 bg-azure-surface dark:bg-black flex flex-col shadow-xl",initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{type:"spring",damping:25,stiffness:200},onClick:C=>C.stopPropagation(),children:[p.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[p.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[p.jsx(So,{className:"w-6 h-6"}),"MORPHEUS"]}),p.jsx("button",{onClick:()=>u(!1),className:"p-2 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors","aria-label":"Fechar menu",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),p.jsxs("nav",{className:"flex-1 p-4 space-y-2 overflow-y-auto",children:[_.map(C=>{const N=t.pathname===C.path;return p.jsxs(wr,{to:C.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${N?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,onClick:()=>u(!1),children:[p.jsx(C.icon,{className:"w-5 h-5"}),p.jsx("span",{children:C.label}),C.path==="/tasks"&&b>0&&p.jsx("span",{className:"ml-auto bg-yellow-500 text-black text-[10px] font-bold rounded-full px-1.5 py-0.5 leading-none",children:b>99?"99+":b})]},C.path)}),p.jsxs(wr,{to:"/logs",className:"flex items-center gap-3 px-4 py-3 rounded transition-colors hidden lg:flex hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary",onClick:()=>u(!1),children:[p.jsx(Zm,{className:"w-5 h-5"}),p.jsx("span",{children:"Logs"})]}),p.jsxs(wr,{to:"/notifications",className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${t.pathname==="/notifications"?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,onClick:()=>u(!1),children:[p.jsxs("div",{className:"relative",children:[p.jsx(gl,{className:"w-5 h-5"}),g>0&&p.jsx("span",{className:"absolute -top-1.5 -right-1.5 bg-red-500 text-white text-[9px] font-bold rounded-full w-3.5 h-3.5 flex items-center justify-center leading-none",children:g>9?"9+":g})]}),p.jsx("span",{children:"Notifications"}),g>0&&p.jsx("span",{className:"ml-auto bg-red-500 text-white text-[10px] font-bold rounded-full px-1.5 py-0.5 leading-none",children:g>99?"99+":g})]})]}),p.jsx("div",{className:"p-2",children:p.jsxs("button",{onClick:()=>{d(!0),u(!1)},className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary transition-colors",children:[p.jsx(S0,{className:"w-5 h-5"}),p.jsx("span",{children:"Restart"})]})}),p.jsx("div",{className:"p-2",children:p.jsxs("button",{onClick:()=>{f(),u(!1)},className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-secondary hover:text-red-600 transition-colors",children:[p.jsx(v0,{className:"w-5 h-5"}),p.jsx("span",{children:"Logout"})]})})]})]})}),p.jsxs("main",{className:`flex-1 p-4 md:p-8 relative flex flex-col ${t.pathname==="/chat"?"overflow-hidden":"overflow-auto"}`,children:[p.jsx("div",{className:`w-full mx-auto flex-1 ${t.pathname==="/chat"?"h-full":"max-w-6xl"}`,children:e}),p.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.1)_50%),linear-gradient(90deg,rgba(0,255,0,0.03),rgba(0,255,0,0.01))] bg-[length:100%_2px,3px_100%] opacity-0 dark:opacity-20 transition-opacity duration-300"})]})]}),p.jsx(a4,{}),p.jsx(I3,{isOpen:l,onClose:()=>d(!1),onConfirm:v})]})}const F3={hidden:{opacity:0,y:20},show:{opacity:1,y:0}},ki=({title:e,value:t,icon:n,subValue:a})=>p.jsxs(ot.div,{variants:F3,className:"border border-azure-border dark:border-matrix-primary bg-azure-surface/50 dark:bg-zinc-950/50 p-6 rounded relative overflow-hidden group hover:border-azure-primary dark:hover:border-matrix-highlight transition-colors",children:[p.jsxs("div",{className:"flex justify-between items-start mb-4",children:[p.jsx("h3",{className:"text-azure-text-secondary dark:text-matrix-secondary text-sm font-bold uppercase",children:e}),p.jsx(n,{className:"w-6 h-6 text-azure-primary dark:text-matrix-primary group-hover:text-azure-primary dark:group-hover:text-matrix-highlight transition-colors"})]}),p.jsx("div",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight mb-1 font-mono tracking-tighter truncate",children:t}),a&&p.jsx("div",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary opacity-70 font-mono",children:a})]}),vp={fetchUsageStats:async()=>Ne.get("/stats/usage"),fetchGroupedUsageStats:async()=>Ne.get("/stats/usage/grouped")};function q3(){const{data:e}=an("/api/stats/usage",vp.fetchUsageStats,{refreshInterval:5e3});return p.jsxs(p.Fragment,{children:[p.jsx(ki,{title:"Total Input",value:e?e.totalInputTokens.toLocaleString():"-",icon:tS,subValue:"Tokens processed"}),p.jsx(ki,{title:"Total Output",value:e?e.totalOutputTokens.toLocaleString():"-",icon:nS,subValue:"Tokens generated"})]})}function G3(){const{data:e}=yS(),t={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},n={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return p.jsxs(ot.div,{className:"space-y-8",variants:t,initial:"hidden",animate:"show",children:[p.jsxs(ot.div,{variants:n,children:[p.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight mb-2",children:"SYSTEM STATUS"}),p.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"Overview of the Morpheus agent runtime."})]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[p.jsx(ki,{title:"Agent Status",value:e?.status.toUpperCase()||"CONNECTING...",icon:So,subValue:e?`PID: ${e.pid}`:""}),p.jsx(ki,{title:"Uptime",value:e?xS(e.uptimeSeconds):"-",icon:nd,subValue:e?`${e.uptimeSeconds.toFixed(0)} seconds`:""}),p.jsx(ki,{title:"Version",value:e?.projectVersion||"-",icon:iS,subValue:`Node ${e?.nodeVersion||"-"}`}),p.jsx(ki,{title:"Provider",value:e?.llmProvider?.toUpperCase()||"-",icon:xN,subValue:"LLM Inference Engine"}),p.jsx(ki,{title:"Model",value:e?.llmModel||"-",icon:gN,subValue:"Active Model"}),p.jsx(q3,{})]})]})}const Y3=({sessions:e,activeSessionId:t,onSelectSession:n,onCreateSession:a,onArchiveSession:o,onDeleteSession:u,onRenameSession:l,isOpen:d,toggleSidebar:f})=>{const[h,g]=z.useState(null),[x,b]=z.useState(""),v=z.useRef(null);z.useEffect(()=>{h&&v.current&&v.current.focus()},[h]);const w=(R,j)=>{R.stopPropagation(),g(j.id),b(j.title||"Untitled Session")},_=R=>{R?.stopPropagation(),h&&x.trim()&&(l(h,x.trim()),g(null))},C=R=>{R?.stopPropagation(),g(null)},N=R=>{R.key==="Enter"?_():R.key==="Escape"&&C()};return d?p.jsxs("div",{className:"w-80 bg-white dark:bg-black border-r border-gray-200 dark:border-matrix-primary/30 flex flex-col h-full transition-all duration-300",children:[p.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-matrix-primary/30 flex justify-between items-center bg-azure-bg dark:bg-black",children:[p.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-matrix-highlight",children:"Sessions"}),p.jsx("button",{onClick:f,className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-matrix-primary/20 text-gray-500 dark:text-matrix-secondary",children:p.jsx(yl,{size:18})})]}),p.jsx("div",{className:"p-4",children:p.jsxs("button",{onClick:a,className:"w-full flex items-center justify-center gap-2 bg-azure-primary text-white dark:bg-matrix-highlight dark:text-black py-2 px-4 rounded-lg hover:bg-azure-secondary dark:hover:bg-matrix-secondary transition-colors shadow-sm",children:[p.jsx(k0,{size:18}),p.jsx("span",{children:"New Chat"})]})}),p.jsxs("div",{className:"flex-1 overflow-y-auto px-2 space-y-1 custom-scrollbar",children:[e.map(R=>p.jsxs("div",{onClick:()=>n(R.id),className:`group flex items-center justify-between p-3 rounded-lg cursor-pointer transition-all border ${t===R.id?"bg-azure-hover dark:bg-matrix-primary/20 border-azure-primary dark:border-matrix-highlight":"hover:bg-gray-50 dark:hover:bg-matrix-primary/10 border-transparent"}`,children:[p.jsx("div",{className:"flex flex-col overflow-hidden w-full mr-2",children:h===R.id?p.jsx("div",{className:"flex items-center gap-1 w-full",onClick:j=>j.stopPropagation(),children:p.jsx("input",{ref:v,type:"text",value:x,onChange:j=>b(j.target.value),onKeyDown:N,className:"w-full text-sm px-1 py-0.5 bg-white dark:bg-black border border-azure-primary dark:border-matrix-highlight rounded focus:outline-none dark:text-matrix-highlight"})}):p.jsxs(p.Fragment,{children:[p.jsx("span",{className:`text-sm font-medium truncate ${t===R.id?"text-azure-primary dark:text-matrix-highlight":"text-gray-700 dark:text-matrix-secondary"}`,children:R.title||"Untitled Session"}),p.jsx("span",{className:"text-xs text-gray-400 dark:text-matrix-secondary/70 mt-0.5",children:new Date(R.started_at).toLocaleString()})]})}),p.jsx("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:h===R.id?p.jsxs(p.Fragment,{children:[p.jsx("button",{onClick:_,className:"p-1.5 text-green-600 hover:bg-green-50 dark:text-matrix-highlight dark:hover:bg-matrix-primary/20 rounded",title:"Save",children:p.jsx(Um,{size:14})}),p.jsx("button",{onClick:C,className:"p-1.5 text-red-500 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20 rounded",title:"Cancel",children:p.jsx(zA,{size:14})})]}):p.jsxs(p.Fragment,{children:[p.jsx("button",{onClick:j=>w(j,R),className:"p-1.5 text-gray-400 hover:text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20 dark:text-matrix-secondary/50 dark:hover:text-blue-400 rounded",title:"Rename",children:p.jsx(Yp,{size:14})}),p.jsx("button",{onClick:j=>{j.stopPropagation(),o(R.id)},className:"p-1.5 text-gray-400 hover:text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-900/20 dark:text-matrix-secondary/50 dark:hover:text-amber-500 rounded",title:"Archive",children:p.jsx(lN,{size:14})}),p.jsx("button",{onClick:j=>{j.stopPropagation(),u(R.id)},className:"p-1.5 text-gray-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 dark:text-matrix-secondary/50 dark:hover:text-red-500 rounded",title:"Delete",children:p.jsx(xl,{size:14})})]})})]},R.id)),e.length===0&&p.jsx("div",{className:"text-center text-gray-400 dark:text-matrix-secondary/50 mt-10 text-sm",children:"No active sessions."})]})]}):p.jsxs("div",{className:"w-16 bg-white dark:bg-black border-r border-gray-200 dark:border-matrix-primary/30 flex flex-col items-center py-4 space-y-4 transition-colors duration-300",children:[p.jsx("button",{onClick:f,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-matrix-primary/20 text-gray-500 dark:text-matrix-secondary",title:"Expand Sidebar",children:p.jsx(yl,{})}),p.jsx("div",{className:"border-t border-gray-200 dark:border-matrix-primary/30 w-full my-2"}),p.jsx("button",{onClick:a,className:"p-3 bg-azure-primary text-white dark:bg-matrix-highlight dark:text-black rounded-full hover:bg-azure-secondary dark:hover:bg-matrix-secondary shadow-lg transition-all",title:"New Session",children:p.jsx(k0,{size:20})})]})};function X3(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const K3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,J3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Q3={};function X1(e,t){return(Q3.jsx?J3:K3).test(e)}const W3=/[ \t\n\f\r]/g;function eD(e){return typeof e=="object"?e.type==="text"?K1(e.value):!1:K1(e)}function K1(e){return e.replace(W3,"")===""}class Ul{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}Ul.prototype.normal={};Ul.prototype.property={};Ul.prototype.space=void 0;function n_(e,t){const n={},a={};for(const o of e)Object.assign(n,o.property),Object.assign(a,o.normal);return new Ul(n,a,t)}function kp(e){return e.toLowerCase()}class En{constructor(t,n){this.attribute=n,this.property=t}}En.prototype.attribute="";En.prototype.booleanish=!1;En.prototype.boolean=!1;En.prototype.commaOrSpaceSeparated=!1;En.prototype.commaSeparated=!1;En.prototype.defined=!1;En.prototype.mustUseProperty=!1;En.prototype.number=!1;En.prototype.overloadedBoolean=!1;En.prototype.property="";En.prototype.spaceSeparated=!1;En.prototype.space=void 0;let tD=0;const Oe=Ei(),$t=Ei(),wp=Ei(),le=Ei(),lt=Ei(),Ro=Ei(),Un=Ei();function Ei(){return 2**++tD}const Sp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:$t,commaOrSpaceSeparated:Un,commaSeparated:Ro,number:le,overloadedBoolean:wp,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),fm=Object.keys(Sp);class Ng extends En{constructor(t,n,a,o){let u=-1;if(super(t,n),J1(this,"space",o),typeof a=="number")for(;++u<fm.length;){const l=fm[u];J1(this,fm[u],(a&Sp[l])===Sp[l])}}}Ng.prototype.defined=!0;function J1(e,t,n){n&&(e[t]=n)}function Xo(e){const t={},n={};for(const[a,o]of Object.entries(e.properties)){const u=new Ng(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),t[a]=u,n[kp(a)]=a,n[kp(u.attribute)]=a}return new Ul(t,n,e.space)}const r_=Xo({properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:lt,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:le,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:lt,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:$t,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function a_(e,t){return t in e?e[t]:t}function i_(e,t){return a_(e,t.toLowerCase())}const nD=Xo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ro,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:lt,autoFocus:Oe,autoPlay:Oe,blocking:lt,capture:null,charSet:null,checked:Oe,cite:null,className:lt,cols:le,colSpan:null,content:null,contentEditable:$t,controls:Oe,controlsList:lt,coords:le|Ro,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:wp,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:lt,height:le,hidden:wp,high:le,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:lt,itemRef:lt,itemScope:Oe,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oe,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Oe,muted:Oe,name:null,nonce:null,noModule:Oe,noValidate:Oe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Oe,optimum:le,pattern:null,ping:lt,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:lt,required:Oe,reversed:Oe,rows:le,rowSpan:le,sandbox:lt,scope:null,scoped:Oe,seamless:Oe,selected:Oe,shadowRootClonable:Oe,shadowRootDelegatesFocus:Oe,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Oe,useMap:null,value:$t,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oe,declare:Oe,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Oe,noHref:Oe,noShade:Oe,noWrap:Oe,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Oe,disableRemotePlayback:Oe,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:i_}),rD=Xo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Un,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ro,g2:Ro,glyphName:Ro,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:a_}),o_=Xo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),s_=Xo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:i_}),l_=Xo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),aD={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},iD=/[A-Z]/g,Q1=/-[a-z]/g,oD=/^data[-\w.:]+$/i;function sD(e,t){const n=kp(t);let a=t,o=En;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&oD.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Q1,uD);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Q1.test(u)){let l=u.replace(iD,lD);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=Ng}return new o(a,t)}function lD(e){return"-"+e.toLowerCase()}function uD(e){return e.charAt(1).toUpperCase()}const cD=n_([r_,nD,o_,s_,l_],"html"),Ag=n_([r_,rD,o_,s_,l_],"svg");function dD(e){return e.join(" ").trim()}var yo={},hm,W1;function fD(){if(W1)return hm;W1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
20
- `,h="/",g="*",x="",b="comment",v="declaration";function w(C,N){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];N=N||{};var R=1,j=1;function L(se){var re=se.match(t);re&&(R+=re.length);var E=se.lastIndexOf(f);j=~E?se.length-E:j+se.length}function P(){var se={line:R,column:j};return function(re){return re.position=new $(se),X(),re}}function $(se){this.start=se,this.end={line:R,column:j},this.source=N.source}$.prototype.content=C;function Y(se){var re=new Error(N.source+":"+R+":"+j+": "+se);if(re.reason=se,re.filename=N.source,re.line=R,re.column=j,re.source=C,!N.silent)throw re}function U(se){var re=se.exec(C);if(re){var E=re[0];return L(E),C=C.slice(E.length),re}}function X(){U(n)}function ue(se){var re;for(se=se||[];re=ae();)re!==!1&&se.push(re);return se}function ae(){var se=P();if(!(h!=C.charAt(0)||g!=C.charAt(1))){for(var re=2;x!=C.charAt(re)&&(g!=C.charAt(re)||h!=C.charAt(re+1));)++re;if(re+=2,x===C.charAt(re-1))return Y("End of comment missing");var E=C.slice(2,re-2);return j+=2,L(E),C=C.slice(re),j+=2,se({type:b,comment:E})}}function oe(){var se=P(),re=U(a);if(re){if(ae(),!U(o))return Y("property missing ':'");var E=U(u),F=se({type:v,property:_(re[0].replace(e,x)),value:E?_(E[0].replace(e,x)):x});return U(l),F}}function te(){var se=[];ue(se);for(var re;re=oe();)re!==!1&&(se.push(re),ue(se));return se}return X(),te()}function _(C){return C?C.replace(d,x):x}return hm=w,hm}var ek;function hD(){if(ek)return yo;ek=1;var e=yo&&yo.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=n;const t=e(fD());function n(a,o){let u=null;if(!a||typeof a!="string")return u;const l=(0,t.default)(a),d=typeof o=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:g}=f;d?o(h,g,f):g&&(u=u||{},u[h]=g)}),u}return yo}var Js={},tk;function mD(){if(tk)return Js;tk=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},l=function(h,g){return g.toUpperCase()},d=function(h,g){return"".concat(g,"-")},f=function(h,g){return g===void 0&&(g={}),u(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(o,d):h=h.replace(a,d),h.replace(t,l))};return Js.camelCase=f,Js}var Qs,nk;function pD(){if(nk)return Qs;nk=1;var e=Qs&&Qs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(hD()),n=mD();function a(o,u){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(d,f){d&&f&&(l[(0,n.camelCase)(d,u)]=f)}),l}return a.default=a,Qs=a,Qs}var gD=pD();const yD=Up(gD),u_=c_("end"),Og=c_("start");function c_(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function xD(e){const t=Og(e),n=u_(e);if(t&&n)return{start:t,end:n}}function fl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rk(e.position):"start"in e||"end"in e?rk(e):"line"in e||"column"in e?zp(e):""}function zp(e){return ak(e&&e.line)+":"+ak(e&&e.column)}function rk(e){return zp(e&&e.start)+"-"+zp(e&&e.end)}function ak(e){return e&&typeof e=="number"?e:1}class sn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let o="",u={},l=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?o=t:!u.cause&&t&&(l=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof a=="string"){const f=a.indexOf(":");f===-1?u.ruleId=a:(u.source=a.slice(0,f),u.ruleId=a.slice(f+1))}if(!u.place&&u.ancestors&&u.ancestors){const f=u.ancestors[u.ancestors.length-1];f&&(u.place=f.position)}const d=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=fl(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=l&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}sn.prototype.file="";sn.prototype.name="";sn.prototype.reason="";sn.prototype.message="";sn.prototype.stack="";sn.prototype.column=void 0;sn.prototype.line=void 0;sn.prototype.ancestors=void 0;sn.prototype.cause=void 0;sn.prototype.fatal=void 0;sn.prototype.place=void 0;sn.prototype.ruleId=void 0;sn.prototype.source=void 0;const Rg={}.hasOwnProperty,bD=new Map,vD=/[A-Z]/g,kD=new Set(["table","tbody","thead","tfoot","tr"]),wD=new Set(["td","th"]),d_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function SD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=AD(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=ND(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ag:cD,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=f_(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function f_(e,t,n){if(t.type==="element")return zD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _D(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jD(e,t,n);if(t.type==="mdxjsEsm")return TD(e,t);if(t.type==="root")return ED(e,t,n);if(t.type==="text")return CD(e,t)}function zD(e,t,n){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=Ag,e.schema=o),e.ancestors.push(t);const u=m_(e,t.tagName,!1),l=OD(e,t);let d=Dg(e,t);return kD.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!eD(f):!0})),h_(e,l,u,t),Mg(l,d),e.ancestors.pop(),e.schema=a,e.create(t,u,l,n)}function _D(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}_l(e,t.position)}function TD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);_l(e,t.position)}function jD(e,t,n){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=Ag,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:m_(e,t.name,!0),l=RD(e,t),d=Dg(e,t);return h_(e,l,u,t),Mg(l,d),e.ancestors.pop(),e.schema=a,e.create(t,u,l,n)}function ED(e,t,n){const a={};return Mg(a,Dg(e,t)),e.create(t,e.Fragment,a,n)}function CD(e,t){return t.value}function h_(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Mg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ND(e,t,n){return a;function a(o,u,l,d){const h=Array.isArray(l.children)?n:t;return d?h(u,l,d):h(u,l)}}function AD(e,t){return n;function n(a,o,u,l){const d=Array.isArray(u.children),f=Og(a);return t(o,u,l,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function OD(e,t){const n={};let a,o;for(o in t.properties)if(o!=="children"&&Rg.call(t.properties,o)){const u=MD(e,o,t.properties[o]);if(u){const[l,d]=u;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&wD.has(t.tagName)?a=d:n[l]=d}}if(a){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function RD(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const u=a.data.estree.body[0];u.type;const l=u.expression;l.type;const d=l.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else _l(e,t.position);else{const o=a.name;let u;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,u=e.evaluater.evaluateExpression(d.expression)}else _l(e,t.position);else u=a.value===null?!0:a.value;n[o]=u}return n}function Dg(e,t){const n=[];let a=-1;const o=e.passKeys?new Map:bD;for(;++a<t.children.length;){const u=t.children[a];let l;if(e.passKeys){const f=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(f){const h=o.get(f)||0;l=f+"-"+h,o.set(f,h+1)}}const d=f_(e,u,l);d!==void 0&&n.push(d)}return n}function MD(e,t,n){const a=sD(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?X3(n):dD(n)),a.property==="style"){let o=typeof n=="object"?n:DD(e,String(n));return e.stylePropertyNameCase==="css"&&(o=$D(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?aD[a.property]||a.property:a.attribute,n]}}function DD(e,t){try{return yD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,o=new sn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=d_+"#cannot-parse-style-attribute",o}}function m_(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,l;for(;++u<o.length;){const d=X1(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};l=l?{type:"MemberExpression",object:l,property:d,computed:!!(u&&d.type==="Literal"),optional:!1}:d}a=l}else a=X1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return Rg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);_l(e)}function _l(e,t){const n=new sn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=d_+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $D(e){const t={};let n;for(n in e)Rg.call(e,n)&&(t[LD(n)]=e[n]);return t}function LD(e){let t=e.replace(vD,UD);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function UD(e){return"-"+e.toLowerCase()}const mm={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},PD={};function VD(e,t){const n=PD,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return p_(e,a,o)}function p_(e,t,n){if(ZD(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ik(e.children,t,n)}return Array.isArray(e)?ik(e,t,n):""}function ik(e,t,n){const a=[];let o=-1;for(;++o<e.length;)a[o]=p_(e[o],t,n);return a.join("")}function ZD(e){return!!(e&&typeof e=="object")}const ok=document.createElement("i");function $g(e){const t="&"+e+";";ok.innerHTML=t;const n=ok.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Nr(e,t,n,a){const o=e.length;let u=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,a.length<1e4)l=Array.from(a),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);u<a.length;)l=a.slice(u,u+1e4),l.unshift(t,0),e.splice(...l),u+=1e4,t+=1e4}function tr(e,t){return e.length>0?(Nr(e,e.length,0,t),e):t}const sk={}.hasOwnProperty;function BD(e){const t={};let n=-1;for(;++n<e.length;)ID(t,e[n]);return t}function ID(e,t){let n;for(n in t){const o=(sk.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){sk.call(o,l)||(o[l]=[]);const d=u[l];HD(o[l],Array.isArray(d)?d:d?[d]:[])}}}function HD(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Nr(e,0,0,a)}function g_(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zr=Fa(/[A-Za-z]/),Pn=Fa(/[\dA-Za-z]/),FD=Fa(/[#-'*+\--9=?A-Z^-~]/);function _p(e){return e!==null&&(e<32||e===127)}const Tp=Fa(/\d/),qD=Fa(/[\dA-Fa-f]/),GD=Fa(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function jn(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const YD=Fa(new RegExp("\\p{P}|\\p{S}","u")),XD=Fa(/\s/);function Fa(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ko(e){const t=[];let n=-1,a=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&Pn(e.charCodeAt(n+1))&&Pn(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const d=e.charCodeAt(n+1);u<56320&&d>56319&&d<57344?(l=String.fromCharCode(u,d),o=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(a,n),encodeURIComponent(l)),a=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(a)}function ut(e,t,n,a){const o=a?a-1:Number.POSITIVE_INFINITY;let u=0;return l;function l(f){return qe(f)?(e.enter(n),d(f)):t(f)}function d(f){return qe(f)&&u++<o?(e.consume(f),d):(e.exit(n),t(f))}}const KD={tokenize:JD};function JD(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let n;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ut(e,t,"linePrefix")}function o(d){return e.enter("paragraph"),u(d)}function u(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(d)}function l(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Te(d)?(e.consume(d),e.exit("chunkText"),u):(e.consume(d),l)}}const QD={tokenize:WD},lk={tokenize:e5};function WD(e){const t=this,n=[];let a=0,o,u,l;return d;function d(j){if(a<n.length){const L=n[a];return t.containerState=L[1],e.attempt(L[0].continuation,f,h)(j)}return h(j)}function f(j){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&R();const L=t.events.length;let P=L,$;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){$=t.events[P][1].end;break}N(a);let Y=L;for(;Y<t.events.length;)t.events[Y][1].end={...$},Y++;return Nr(t.events,P+1,0,t.events.slice(L)),t.events.length=Y,h(j)}return d(j)}function h(j){if(a===n.length){if(!o)return b(j);if(o.currentConstruct&&o.currentConstruct.concrete)return w(j);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lk,g,x)(j)}function g(j){return o&&R(),N(a),b(j)}function x(j){return t.parser.lazy[t.now().line]=a!==n.length,l=t.now().offset,w(j)}function b(j){return t.containerState={},e.attempt(lk,v,w)(j)}function v(j){return a++,n.push([t.currentConstruct,t.containerState]),b(j)}function w(j){if(j===null){o&&R(),N(0),e.consume(j);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),_(j)}function _(j){if(j===null){C(e.exit("chunkFlow"),!0),N(0),e.consume(j);return}return Te(j)?(e.consume(j),C(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(j),_)}function C(j,L){const P=t.sliceStream(j);if(L&&P.push(null),j.previous=u,u&&(u.next=j),u=j,o.defineSkip(j.start),o.write(P),t.parser.lazy[j.start.line]){let $=o.events.length;for(;$--;)if(o.events[$][1].start.offset<l&&(!o.events[$][1].end||o.events[$][1].end.offset>l))return;const Y=t.events.length;let U=Y,X,ue;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(X){ue=t.events[U][1].end;break}X=!0}for(N(a),$=Y;$<t.events.length;)t.events[$][1].end={...ue},$++;Nr(t.events,U+1,0,t.events.slice(Y)),t.events.length=$}}function N(j){let L=n.length;for(;L-- >j;){const P=n[L];t.containerState=P[1],P[0].exit.call(t,e)}n.length=j}function R(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function e5(e,t,n){return ut(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function uk(e){if(e===null||jn(e)||XD(e))return 1;if(YD(e))return 2}function Lg(e,t,n){const a=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!a.includes(u)&&(t=u(t,n),a.push(u))}return t}const jp={name:"attention",resolveAll:t5,tokenize:n5};function t5(e,t){let n=-1,a,o,u,l,d,f,h,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const x={...e[a][1].end},b={...e[n][1].start};ck(x,-f),ck(b,f),l={type:f>1?"strongSequence":"emphasisSequence",start:x,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},u={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},o={type:f>1?"strong":"emphasis",start:{...l.start},end:{...d.end}},e[a][1].end={...l.start},e[n][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=tr(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=tr(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",u,t]]),h=tr(h,Lg(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=tr(h,[["exit",u,t],["enter",d,t],["exit",d,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=tr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Nr(e,a-1,n-a+3,h),n=a+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function n5(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,o=uk(a);let u;return l;function l(f){return u=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===u)return e.consume(f),d;const h=e.exit("attentionSequence"),g=uk(f),x=!g||g===2&&o||n.includes(f),b=!o||o===2&&g||n.includes(a);return h._open=!!(u===42?x:x&&(o||!b)),h._close=!!(u===42?b:b&&(g||!x)),t(f)}}function ck(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const r5={name:"autolink",tokenize:a5};function a5(e,t,n){let a=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(v){return zr(v)?(e.consume(v),l):v===64?n(v):h(v)}function l(v){return v===43||v===45||v===46||Pn(v)?(a=1,d(v)):h(v)}function d(v){return v===58?(e.consume(v),a=0,f):(v===43||v===45||v===46||Pn(v))&&a++<32?(e.consume(v),d):(a=0,h(v))}function f(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||_p(v)?n(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),g):FD(v)?(e.consume(v),h):n(v)}function g(v){return Pn(v)?x(v):n(v)}function x(v){return v===46?(e.consume(v),a=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||Pn(v))&&a++<63){const w=v===45?b:x;return e.consume(v),w}return n(v)}}const ld={partial:!0,tokenize:i5};function i5(e,t,n){return a;function a(u){return qe(u)?ut(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Te(u)?t(u):n(u)}}const y_={continuation:{tokenize:s5},exit:l5,name:"blockQuote",tokenize:o5};function o5(e,t,n){const a=this;return o;function o(l){if(l===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),u}return n(l)}function u(l){return qe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function s5(e,t,n){const a=this;return o;function o(l){return qe(l)?ut(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt(y_,t,n)(l)}}function l5(e){e.exit("blockQuote")}const x_={name:"characterEscape",tokenize:u5};function u5(e,t,n){return a;function a(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return GD(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const b_={name:"characterReference",tokenize:c5};function c5(e,t,n){const a=this;let o=0,u,l;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),f}function f(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,l=Pn,g(x))}function h(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=qD,g):(e.enter("characterReferenceValue"),u=7,l=Tp,g(x))}function g(x){if(x===59&&o){const b=e.exit("characterReferenceValue");return l===Pn&&!$g(a.sliceSerialize(b))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(x)&&o++<u?(e.consume(x),g):n(x)}}const dk={partial:!0,tokenize:f5},fk={concrete:!0,name:"codeFenced",tokenize:d5};function d5(e,t,n){const a=this,o={partial:!0,tokenize:P};let u=0,l=0,d;return f;function f($){return h($)}function h($){const Y=a.events[a.events.length-1];return u=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,d=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g($)}function g($){return $===d?(l++,e.consume($),g):l<3?n($):(e.exit("codeFencedFenceSequence"),qe($)?ut(e,x,"whitespace")($):x($))}function x($){return $===null||Te($)?(e.exit("codeFencedFence"),a.interrupt?t($):e.check(dk,_,L)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b($))}function b($){return $===null||Te($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x($)):qe($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ut(e,v,"whitespace")($)):$===96&&$===d?n($):(e.consume($),b)}function v($){return $===null||Te($)?x($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w($))}function w($){return $===null||Te($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x($)):$===96&&$===d?n($):(e.consume($),w)}function _($){return e.attempt(o,L,C)($)}function C($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),N}function N($){return u>0&&qe($)?ut(e,R,"linePrefix",u+1)($):R($)}function R($){return $===null||Te($)?e.check(dk,_,L)($):(e.enter("codeFlowValue"),j($))}function j($){return $===null||Te($)?(e.exit("codeFlowValue"),R($)):(e.consume($),j)}function L($){return e.exit("codeFenced"),t($)}function P($,Y,U){let X=0;return ue;function ue(re){return $.enter("lineEnding"),$.consume(re),$.exit("lineEnding"),ae}function ae(re){return $.enter("codeFencedFence"),qe(re)?ut($,oe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):oe(re)}function oe(re){return re===d?($.enter("codeFencedFenceSequence"),te(re)):U(re)}function te(re){return re===d?(X++,$.consume(re),te):X>=l?($.exit("codeFencedFenceSequence"),qe(re)?ut($,se,"whitespace")(re):se(re)):U(re)}function se(re){return re===null||Te(re)?($.exit("codeFencedFence"),Y(re)):U(re)}}}function f5(e,t,n){const a=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return a.parser.lazy[a.now().line]?n(l):t(l)}}const pm={name:"codeIndented",tokenize:m5},h5={partial:!0,tokenize:p5};function m5(e,t,n){const a=this;return o;function o(h){return e.enter("codeIndented"),ut(e,u,"linePrefix",5)(h)}function u(h){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):Te(h)?e.attempt(h5,l,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Te(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function p5(e,t,n){const a=this;return o;function o(l){return a.parser.lazy[a.now().line]?n(l):Te(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):ut(e,u,"linePrefix",5)(l)}function u(l){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):Te(l)?o(l):n(l)}}const g5={name:"codeText",previous:x5,resolve:y5,tokenize:b5};function y5(e){let t=e.length-4,n=3,a,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)o===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(o=a):(a===t||e[a][1].type==="lineEnding")&&(e[o][1].type="codeTextData",a!==o+2&&(e[o][1].end=e[a-1][1].end,e.splice(o+2,a-o-2),t-=a-o-2,a=o+2),o=void 0);return e}function x5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function b5(e,t,n){let a=0,o,u;return l;function l(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),a++,d):(e.exit("codeTextSequence"),f(x))}function f(x){return x===null?n(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),f):x===96?(u=e.enter("codeTextSequence"),o=0,g(x)):Te(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(x))}function h(x){return x===null||x===32||x===96||Te(x)?(e.exit("codeTextData"),f(x)):(e.consume(x),h)}function g(x){return x===96?(e.consume(x),o++,g):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(u.type="codeTextData",h(x))}}class v5{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const o=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&Ws(this.left,a),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ws(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ws(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ws(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ws(this.left,n.reverse())}}}function Ws(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function v_(e){const t={};let n=-1,a,o,u,l,d,f,h;const g=new v5(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(a=g.get(n),n&&a[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(f=a[1]._tokenizer.events,u=0,u<f.length&&f[u][1].type==="lineEndingBlank"&&(u+=2),u<f.length&&f[u][1].type==="content"))for(;++u<f.length&&f[u][1].type!=="content";)f[u][1].type==="chunkText"&&(f[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,k5(g,n)),n=t[n],h=!0);else if(a[1]._container){for(u=n,o=void 0;u--;)if(l=g.get(u),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=u);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(a[1].end={...g.get(o)[1].start},d=g.slice(o,n),d.unshift(a),g.splice(o,n-o+1,d))}}return Nr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function k5(e,t){const n=e.get(t)[1],a=e.get(t)[2];let o=t-1;const u=[];let l=n._tokenizer;l||(l=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const d=l.events,f=[],h={};let g,x,b=-1,v=n,w=0,_=0;const C=[_];for(;v;){for(;e.get(++o)[1]!==v;);u.push(o),v._tokenizer||(g=a.sliceStream(v),v.next||g.push(null),x&&l.defineSkip(v.start),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=n;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(_=b+1,C.push(_),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(l.events=[],v?(v._tokenizer=void 0,v.previous=void 0):C.pop(),b=C.length;b--;){const N=d.slice(C[b],C[b+1]),R=u.pop();f.push([R,R+N.length-1]),e.splice(R,2,N)}for(f.reverse(),b=-1;++b<f.length;)h[w+f[b][0]]=w+f[b][1],w+=f[b][1]-f[b][0]-1;return h}const w5={resolve:z5,tokenize:_5},S5={partial:!0,tokenize:T5};function z5(e){return v_(e),e}function _5(e,t){let n;return a;function a(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?u(d):Te(d)?e.check(S5,l,u)(d):(e.consume(d),o)}function u(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function l(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function T5(e,t,n){const a=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ut(e,u,"linePrefix")}function u(l){if(l===null||Te(l))return n(l);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):e.interrupt(a.parser.constructs.flow,n,t)(l)}}function k_(e,t,n,a,o,u,l,d,f){const h=f||Number.POSITIVE_INFINITY;let g=0;return x;function x(N){return N===60?(e.enter(a),e.enter(o),e.enter(u),e.consume(N),e.exit(u),b):N===null||N===32||N===41||_p(N)?n(N):(e.enter(a),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),_(N))}function b(N){return N===62?(e.enter(u),e.consume(N),e.exit(u),e.exit(o),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(e.exit("chunkString"),e.exit(d),b(N)):N===null||N===60||Te(N)?n(N):(e.consume(N),N===92?w:v)}function w(N){return N===60||N===62||N===92?(e.consume(N),v):v(N)}function _(N){return!g&&(N===null||N===41||jn(N))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(a),t(N)):g<h&&N===40?(e.consume(N),g++,_):N===41?(e.consume(N),g--,_):N===null||N===32||N===40||_p(N)?n(N):(e.consume(N),N===92?C:_)}function C(N){return N===40||N===41||N===92?(e.consume(N),_):_(N)}}function w_(e,t,n,a,o,u){const l=this;let d=0,f;return h;function h(v){return e.enter(a),e.enter(o),e.consume(v),e.exit(o),e.enter(u),g}function g(v){return d>999||v===null||v===91||v===93&&!f||v===94&&!d&&"_hiddenFootnoteSupport"in l.parser.constructs?n(v):v===93?(e.exit(u),e.enter(o),e.consume(v),e.exit(o),e.exit(a),t):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||Te(v)||d++>999?(e.exit("chunkString"),g(v)):(e.consume(v),f||(f=!qe(v)),v===92?b:x)}function b(v){return v===91||v===92||v===93?(e.consume(v),d++,x):x(v)}}function S_(e,t,n,a,o,u){let l;return d;function d(b){return b===34||b===39||b===40?(e.enter(a),e.enter(o),e.consume(b),e.exit(o),l=b===40?41:b,f):n(b)}function f(b){return b===l?(e.enter(o),e.consume(b),e.exit(o),e.exit(a),t):(e.enter(u),h(b))}function h(b){return b===l?(e.exit(u),f(l)):b===null?n(b):Te(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),ut(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===l||b===null||Te(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?x:g)}function x(b){return b===l||b===92?(e.consume(b),g):g(b)}}function hl(e,t){let n;return a;function a(o){return Te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,a):qe(o)?ut(e,a,n?"linePrefix":"lineSuffix")(o):t(o)}}const j5={name:"definition",tokenize:C5},E5={partial:!0,tokenize:N5};function C5(e,t,n){const a=this;let o;return u;function u(v){return e.enter("definition"),l(v)}function l(v){return w_.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return o=Mo(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):n(v)}function f(v){return jn(v)?hl(e,h)(v):h(v)}function h(v){return k_(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(E5,x,x)(v)}function x(v){return qe(v)?ut(e,b,"whitespace")(v):b(v)}function b(v){return v===null||Te(v)?(e.exit("definition"),a.parser.defined.push(o),t(v)):n(v)}}function N5(e,t,n){return a;function a(d){return jn(d)?hl(e,o)(d):n(d)}function o(d){return S_(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return qe(d)?ut(e,l,"whitespace")(d):l(d)}function l(d){return d===null||Te(d)?t(d):n(d)}}const A5={name:"hardBreakEscape",tokenize:O5};function O5(e,t,n){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Te(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const R5={name:"headingAtx",resolve:M5,tokenize:D5};function M5(e,t){let n=e.length-2,a=3,o,u;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(o={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},u={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Nr(e,a,n-a+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function D5(e,t,n){let a=0;return o;function o(g){return e.enter("atxHeading"),u(g)}function u(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&a++<6?(e.consume(g),l):g===null||jn(g)?(e.exit("atxHeadingSequence"),d(g)):n(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||Te(g)?(e.exit("atxHeading"),t(g)):qe(g)?ut(e,d,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function f(g){return g===35?(e.consume(g),f):(e.exit("atxHeadingSequence"),d(g))}function h(g){return g===null||g===35||jn(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),h)}}const $5=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hk=["pre","script","style","textarea"],L5={concrete:!0,name:"htmlFlow",resolveTo:V5,tokenize:Z5},U5={partial:!0,tokenize:I5},P5={partial:!0,tokenize:B5};function V5(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Z5(e,t,n){const a=this;let o,u,l,d,f;return h;function h(T){return g(T)}function g(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),x}function x(T){return T===33?(e.consume(T),b):T===47?(e.consume(T),u=!0,_):T===63?(e.consume(T),o=3,a.interrupt?t:O):zr(T)?(e.consume(T),l=String.fromCharCode(T),C):n(T)}function b(T){return T===45?(e.consume(T),o=2,v):T===91?(e.consume(T),o=5,d=0,w):zr(T)?(e.consume(T),o=4,a.interrupt?t:O):n(T)}function v(T){return T===45?(e.consume(T),a.interrupt?t:O):n(T)}function w(T){const ie="CDATA[";return T===ie.charCodeAt(d++)?(e.consume(T),d===ie.length?a.interrupt?t:oe:w):n(T)}function _(T){return zr(T)?(e.consume(T),l=String.fromCharCode(T),C):n(T)}function C(T){if(T===null||T===47||T===62||jn(T)){const ie=T===47,ve=l.toLowerCase();return!ie&&!u&&hk.includes(ve)?(o=1,a.interrupt?t(T):oe(T)):$5.includes(l.toLowerCase())?(o=6,ie?(e.consume(T),N):a.interrupt?t(T):oe(T)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(T):u?R(T):j(T))}return T===45||Pn(T)?(e.consume(T),l+=String.fromCharCode(T),C):n(T)}function N(T){return T===62?(e.consume(T),a.interrupt?t:oe):n(T)}function R(T){return qe(T)?(e.consume(T),R):ue(T)}function j(T){return T===47?(e.consume(T),ue):T===58||T===95||zr(T)?(e.consume(T),L):qe(T)?(e.consume(T),j):ue(T)}function L(T){return T===45||T===46||T===58||T===95||Pn(T)?(e.consume(T),L):P(T)}function P(T){return T===61?(e.consume(T),$):qe(T)?(e.consume(T),P):j(T)}function $(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),f=T,Y):qe(T)?(e.consume(T),$):U(T)}function Y(T){return T===f?(e.consume(T),f=null,X):T===null||Te(T)?n(T):(e.consume(T),Y)}function U(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||jn(T)?P(T):(e.consume(T),U)}function X(T){return T===47||T===62||qe(T)?j(T):n(T)}function ue(T){return T===62?(e.consume(T),ae):n(T)}function ae(T){return T===null||Te(T)?oe(T):qe(T)?(e.consume(T),ae):n(T)}function oe(T){return T===45&&o===2?(e.consume(T),E):T===60&&o===1?(e.consume(T),F):T===62&&o===4?(e.consume(T),A):T===63&&o===3?(e.consume(T),O):T===93&&o===5?(e.consume(T),de):Te(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(U5,G,te)(T)):T===null||Te(T)?(e.exit("htmlFlowData"),te(T)):(e.consume(T),oe)}function te(T){return e.check(P5,se,G)(T)}function se(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),re}function re(T){return T===null||Te(T)?te(T):(e.enter("htmlFlowData"),oe(T))}function E(T){return T===45?(e.consume(T),O):oe(T)}function F(T){return T===47?(e.consume(T),l="",Z):oe(T)}function Z(T){if(T===62){const ie=l.toLowerCase();return hk.includes(ie)?(e.consume(T),A):oe(T)}return zr(T)&&l.length<8?(e.consume(T),l+=String.fromCharCode(T),Z):oe(T)}function de(T){return T===93?(e.consume(T),O):oe(T)}function O(T){return T===62?(e.consume(T),A):T===45&&o===2?(e.consume(T),O):oe(T)}function A(T){return T===null||Te(T)?(e.exit("htmlFlowData"),G(T)):(e.consume(T),A)}function G(T){return e.exit("htmlFlow"),t(T)}}function B5(e,t,n){const a=this;return o;function o(l){return Te(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u):n(l)}function u(l){return a.parser.lazy[a.now().line]?n(l):t(l)}}function I5(e,t,n){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ld,t,n)}}const H5={name:"htmlText",tokenize:F5};function F5(e,t,n){const a=this;let o,u,l;return d;function d(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),f}function f(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),P):O===63?(e.consume(O),j):zr(O)?(e.consume(O),U):n(O)}function h(O){return O===45?(e.consume(O),g):O===91?(e.consume(O),u=0,w):zr(O)?(e.consume(O),R):n(O)}function g(O){return O===45?(e.consume(O),v):n(O)}function x(O){return O===null?n(O):O===45?(e.consume(O),b):Te(O)?(l=x,F(O)):(e.consume(O),x)}function b(O){return O===45?(e.consume(O),v):x(O)}function v(O){return O===62?E(O):O===45?b(O):x(O)}function w(O){const A="CDATA[";return O===A.charCodeAt(u++)?(e.consume(O),u===A.length?_:w):n(O)}function _(O){return O===null?n(O):O===93?(e.consume(O),C):Te(O)?(l=_,F(O)):(e.consume(O),_)}function C(O){return O===93?(e.consume(O),N):_(O)}function N(O){return O===62?E(O):O===93?(e.consume(O),N):_(O)}function R(O){return O===null||O===62?E(O):Te(O)?(l=R,F(O)):(e.consume(O),R)}function j(O){return O===null?n(O):O===63?(e.consume(O),L):Te(O)?(l=j,F(O)):(e.consume(O),j)}function L(O){return O===62?E(O):j(O)}function P(O){return zr(O)?(e.consume(O),$):n(O)}function $(O){return O===45||Pn(O)?(e.consume(O),$):Y(O)}function Y(O){return Te(O)?(l=Y,F(O)):qe(O)?(e.consume(O),Y):E(O)}function U(O){return O===45||Pn(O)?(e.consume(O),U):O===47||O===62||jn(O)?X(O):n(O)}function X(O){return O===47?(e.consume(O),E):O===58||O===95||zr(O)?(e.consume(O),ue):Te(O)?(l=X,F(O)):qe(O)?(e.consume(O),X):E(O)}function ue(O){return O===45||O===46||O===58||O===95||Pn(O)?(e.consume(O),ue):ae(O)}function ae(O){return O===61?(e.consume(O),oe):Te(O)?(l=ae,F(O)):qe(O)?(e.consume(O),ae):X(O)}function oe(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),o=O,te):Te(O)?(l=oe,F(O)):qe(O)?(e.consume(O),oe):(e.consume(O),se)}function te(O){return O===o?(e.consume(O),o=void 0,re):O===null?n(O):Te(O)?(l=te,F(O)):(e.consume(O),te)}function se(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||jn(O)?X(O):(e.consume(O),se)}function re(O){return O===47||O===62||jn(O)?X(O):n(O)}function E(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function F(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Z}function Z(O){return qe(O)?ut(e,de,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):de(O)}function de(O){return e.enter("htmlTextData"),l(O)}}const Ug={name:"labelEnd",resolveAll:X5,resolveTo:K5,tokenize:J5},q5={tokenize:Q5},G5={tokenize:W5},Y5={tokenize:e$};function X5(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",t+=o}}return e.length!==n.length&&Nr(e,0,e.length,n),e}function K5(e,t){let n=e.length,a=0,o,u,l,d;for(;n--;)if(o=e[n][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=n,o.type!=="labelLink")){a=2;break}}else o.type==="labelEnd"&&(l=n);const f={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[l-2][1].start}};return d=[["enter",f,t],["enter",h,t]],d=tr(d,e.slice(u+1,u+a+3)),d=tr(d,[["enter",g,t]]),d=tr(d,Lg(t.parser.constructs.insideSpan.null,e.slice(u+a+4,l-3),t)),d=tr(d,[["exit",g,t],e[l-2],e[l-1],["exit",h,t]]),d=tr(d,e.slice(l+1)),d=tr(d,[["exit",f,t]]),Nr(e,u,e.length,d),e}function J5(e,t,n){const a=this;let o=a.events.length,u,l;for(;o--;)if((a.events[o][1].type==="labelImage"||a.events[o][1].type==="labelLink")&&!a.events[o][1]._balanced){u=a.events[o][1];break}return d;function d(b){return u?u._inactive?x(b):(l=a.parser.defined.includes(Mo(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(q5,g,l?g:x)(b):b===91?e.attempt(G5,g,l?h:x)(b):l?g(b):x(b)}function h(b){return e.attempt(Y5,g,x)(b)}function g(b){return t(b)}function x(b){return u._balanced=!0,n(b)}}function Q5(e,t,n){return a;function a(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),o}function o(x){return jn(x)?hl(e,u)(x):u(x)}function u(x){return x===41?g(x):k_(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function l(x){return jn(x)?hl(e,f)(x):g(x)}function d(x){return n(x)}function f(x){return x===34||x===39||x===40?S_(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):g(x)}function h(x){return jn(x)?hl(e,g)(x):g(x)}function g(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):n(x)}}function W5(e,t,n){const a=this;return o;function o(d){return w_.call(a,e,u,l,"reference","referenceMarker","referenceString")(d)}function u(d){return a.parser.defined.includes(Mo(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function l(d){return n(d)}}function e$(e,t,n){return a;function a(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const t$={name:"labelStartImage",resolveAll:Ug.resolveAll,tokenize:n$};function n$(e,t,n){const a=this;return o;function o(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),u}function u(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),l):n(d)}function l(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):t(d)}}const r$={name:"labelStartLink",resolveAll:Ug.resolveAll,tokenize:a$};function a$(e,t,n){const a=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),u}function u(l){return l===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(l):t(l)}}const gm={name:"lineEnding",tokenize:i$};function i$(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ut(e,t,"linePrefix")}}const Ac={name:"thematicBreak",tokenize:o$};function o$(e,t,n){let a=0,o;return u;function u(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,d(h)}function d(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):a>=3&&(h===null||Te(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),a++,f):(e.exit("thematicBreakSequence"),qe(h)?ut(e,d,"whitespace")(h):d(h))}}const Tn={continuation:{tokenize:c$},exit:f$,name:"list",tokenize:u$},s$={partial:!0,tokenize:h$},l$={partial:!0,tokenize:d$};function u$(e,t,n){const a=this,o=a.events[a.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return d;function d(v){const w=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:Tp(v)){if(a.containerState.type||(a.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Ac,n,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return n(v)}function f(v){return Tp(v)&&++l<10?(e.consume(v),f):(!a.interrupt||l<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(ld,a.interrupt?n:g,e.attempt(s$,b,x))}function g(v){return a.containerState.initialBlankLine=!0,u++,b(v)}function x(v){return qe(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):n(v)}function b(v){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function c$(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(ld,o,u);function o(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,ut(e,t,"listItemIndent",a.containerState.size+1)(d)}function u(d){return a.containerState.furtherBlankLines||!qe(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,l(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(l$,t,l)(d))}function l(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,ut(e,e.attempt(Tn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function d$(e,t,n){const a=this;return ut(e,o,"listItemIndent",a.containerState.size+1);function o(u){const l=a.events[a.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===a.containerState.size?t(u):n(u)}}function f$(e){e.exit(this.containerState.type)}function h$(e,t,n){const a=this;return ut(e,o,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const l=a.events[a.events.length-1];return!qe(u)&&l&&l[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const mk={name:"setextUnderline",resolveTo:m$,tokenize:p$};function m$(e,t){let n=e.length,a,o,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const l={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",l,t]),e.splice(u+1,0,["exit",e[a][1],t]),e[a][1].end={...e[u][1].end}):e[a][1]=l,e.push(["exit",l,t]),e}function p$(e,t,n){const a=this;let o;return u;function u(h){let g=a.events.length,x;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){x=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||x)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===o?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),qe(h)?ut(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const g$={tokenize:y$};function y$(e){const t=this,n=e.attempt(ld,a,e.attempt(this.parser.constructs.flowInitial,o,ut(e,e.attempt(this.parser.constructs.flow,o,e.attempt(w5,o)),"linePrefix")));return n;function a(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const x$={resolveAll:__()},b$=z_("string"),v$=z_("text");function z_(e){return{resolveAll:__(e==="text"?k$:void 0),tokenize:t};function t(n){const a=this,o=this.parser.constructs[e],u=n.attempt(o,l,d);return l;function l(g){return h(g)?u(g):d(g)}function d(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),f}function f(g){return h(g)?(n.exit("data"),u(g)):(n.consume(g),f)}function h(g){if(g===null)return!0;const x=o[g];let b=-1;if(x)for(;++b<x.length;){const v=x[b];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function __(e){return t;function t(n,a){let o=-1,u;for(;++o<=n.length;)u===void 0?n[o]&&n[o][1].type==="data"&&(u=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(n,a):n}}function k$(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],o=t.sliceStream(a);let u=o.length,l=-1,d=0,f;for(;u--;){const h=o[u];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)d++,l--;if(l)break;l=-1}else if(h===-2)f=!0,d++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?l:a.start._bufferIndex+l,_index:a.start._index+u,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const w$={42:Tn,43:Tn,45:Tn,48:Tn,49:Tn,50:Tn,51:Tn,52:Tn,53:Tn,54:Tn,55:Tn,56:Tn,57:Tn,62:y_},S$={91:j5},z$={[-2]:pm,[-1]:pm,32:pm},_$={35:R5,42:Ac,45:[mk,Ac],60:L5,61:mk,95:Ac,96:fk,126:fk},T$={38:b_,92:x_},j$={[-5]:gm,[-4]:gm,[-3]:gm,33:t$,38:b_,42:jp,60:[r5,H5],91:r$,92:[A5,x_],93:Ug,95:jp,96:g5},E$={null:[jp,x$]},C$={null:[42,95]},N$={null:[]},A$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:C$,contentInitial:S$,disable:N$,document:w$,flow:_$,flowInitial:z$,insideSpan:E$,string:T$,text:j$},Symbol.toStringTag,{value:"Module"}));function O$(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},u=[];let l=[],d=[];const f={attempt:Y(P),check:Y($),consume:R,enter:j,exit:L,interrupt:Y($,{interrupt:!0})},h={code:null,containerState:{},defineSkip:_,events:[],now:w,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:x};let g=t.tokenize.call(h,f);return t.resolveAll&&u.push(t),h;function x(ae){return l=tr(l,ae),C(),l[l.length-1]!==null?[]:(U(t,0),h.events=Lg(u,h.events,h),h.events)}function b(ae,oe){return M$(v(ae),oe)}function v(ae){return R$(l,ae)}function w(){const{_bufferIndex:ae,_index:oe,line:te,column:se,offset:re}=a;return{_bufferIndex:ae,_index:oe,line:te,column:se,offset:re}}function _(ae){o[ae.line]=ae.column,ue()}function C(){let ae;for(;a._index<l.length;){const oe=l[a._index];if(typeof oe=="string")for(ae=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ae&&a._bufferIndex<oe.length;)N(oe.charCodeAt(a._bufferIndex));else N(oe)}}function N(ae){g=g(ae)}function R(ae){Te(ae)?(a.line++,a.column=1,a.offset+=ae===-3?2:1,ue()):ae!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===l[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=ae}function j(ae,oe){const te=oe||{};return te.type=ae,te.start=w(),h.events.push(["enter",te,h]),d.push(te),te}function L(ae){const oe=d.pop();return oe.end=w(),h.events.push(["exit",oe,h]),oe}function P(ae,oe){U(ae,oe.from)}function $(ae,oe){oe.restore()}function Y(ae,oe){return te;function te(se,re,E){let F,Z,de,O;return Array.isArray(se)?G(se):"tokenize"in se?G([se]):A(se);function A(ge){return ye;function ye(Ye){const $e=Ye!==null&&ge[Ye],At=Ye!==null&&ge.null,ln=[...Array.isArray($e)?$e:$e?[$e]:[],...Array.isArray(At)?At:At?[At]:[]];return G(ln)(Ye)}}function G(ge){return F=ge,Z=0,ge.length===0?E:T(ge[Z])}function T(ge){return ye;function ye(Ye){return O=X(),de=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?ve():ge.tokenize.call(oe?Object.assign(Object.create(h),oe):h,f,ie,ve)(Ye)}}function ie(ge){return ae(de,O),re}function ve(ge){return O.restore(),++Z<F.length?T(F[Z]):E}}}function U(ae,oe){ae.resolveAll&&!u.includes(ae)&&u.push(ae),ae.resolve&&Nr(h.events,oe,h.events.length-oe,ae.resolve(h.events.slice(oe),h)),ae.resolveTo&&(h.events=ae.resolveTo(h.events,h))}function X(){const ae=w(),oe=h.previous,te=h.currentConstruct,se=h.events.length,re=Array.from(d);return{from:se,restore:E};function E(){a=ae,h.previous=oe,h.currentConstruct=te,h.events.length=se,d=re,ue()}}function ue(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function R$(e,t){const n=t.start._index,a=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(a,u)];else{if(l=e.slice(n,o),a>-1){const d=l[0];typeof d=="string"?l[0]=d.slice(a):l.shift()}u>0&&l.push(e[o].slice(0,u))}return l}function M$(e,t){let n=-1;const a=[];let o;for(;++n<e.length;){const u=e[n];let l;if(typeof u=="string")l=u;else switch(u){case-5:{l="\r";break}case-4:{l=`
21
- `;break}case-3:{l=`\r
22
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(u)}o=u===-2,a.push(l)}return a.join("")}function D$(e){const a={constructs:BD([A$,...(e||{}).extensions||[]]),content:o(KD),defined:[],document:o(QD),flow:o(g$),lazy:{},string:o(b$),text:o(v$)};return a;function o(u){return l;function l(d){return O$(a,u,d)}}}function $$(e){for(;!v_(e););return e}const pk=/[\0\t\n\r]/g;function L$(){let e=1,t="",n=!0,a;return o;function o(u,l,d){const f=[];let h,g,x,b,v;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(l||void 0).decode(u)),x=0,t="",n&&(u.charCodeAt(0)===65279&&x++,n=void 0);x<u.length;){if(pk.lastIndex=x,h=pk.exec(u),b=h&&h.index!==void 0?h.index:u.length,v=u.charCodeAt(b),!h){t=u.slice(x);break}if(v===10&&x===b&&a)f.push(-3),a=void 0;else switch(a&&(f.push(-5),a=void 0),x<b&&(f.push(u.slice(x,b)),e+=b-x),v){case 0:{f.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,f.push(-2);e++<g;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:a=!0,e=1}x=b+1}return d&&(a&&f.push(-5),t&&f.push(t),f.push(null)),f}}const U$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function P$(e){return e.replace(U$,V$)}function V$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return g_(n.slice(u?2:1),u?16:10)}return $g(n)||e}const T_={}.hasOwnProperty;function Z$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),B$(n)($$(D$(n).document().write(L$()(e,t,!0))))}function B$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Qe),autolinkProtocol:X,autolinkEmail:X,atxHeading:u(Ka),blockQuote:u(At),characterEscape:X,characterReference:X,codeFenced:u(ln),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(ln,l),codeText:u(Zn,l),codeTextData:X,data:X,codeFlowValue:X,definition:u(gr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(Bn),hardBreakEscape:u(Be),hardBreakTrailing:u(Be),htmlFlow:u(rt,l),htmlFlowData:X,htmlText:u(rt,l),htmlTextData:X,image:u(ct),label:l,link:u(Qe),listItem:u(In),listItemValue:b,listOrdered:u(qt,x),listUnordered:u(qt),paragraph:u(jt),reference:T,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Ka),strong:u(Zt),thematicBreak:u(Ai)},exit:{atxHeading:f(),atxHeadingSequence:P,autolink:f(),autolinkEmail:$e,autolinkProtocol:Ye,blockQuote:f(),characterEscapeValue:ue,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:ge,characterReference:ye,codeFenced:f(C),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:w,codeFlowValue:ue,codeIndented:f(N),codeText:f(re),codeTextData:ue,data:ue,definition:f(),definitionDestinationString:L,definitionLabelString:R,definitionTitleString:j,emphasis:f(),hardBreakEscape:f(oe),hardBreakTrailing:f(oe),htmlFlow:f(te),htmlFlowData:ue,htmlText:f(se),htmlTextData:ue,image:f(F),label:de,labelText:Z,lineEnding:ae,link:f(E),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ie,resourceDestinationString:O,resourceTitleString:A,resource:G,setextHeading:f(U),setextHeadingLineSequence:Y,setextHeadingText:$,strong:f(),thematicBreak:f()}};j_(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(J){let ce={type:"root",children:[]};const xe={stack:[ce],tokenStack:[],config:t,enter:d,exit:h,buffer:l,resume:g,data:n},_e=[];let Ve=-1;for(;++Ve<J.length;)if(J[Ve][1].type==="listOrdered"||J[Ve][1].type==="listUnordered")if(J[Ve][0]==="enter")_e.push(Ve);else{const un=_e.pop();Ve=o(J,un,Ve)}for(Ve=-1;++Ve<J.length;){const un=t[J[Ve][0]];T_.call(un,J[Ve][1].type)&&un[J[Ve][1].type].call(Object.assign({sliceSerialize:J[Ve][2].sliceSerialize},xe),J[Ve][1])}if(xe.tokenStack.length>0){const un=xe.tokenStack[xe.tokenStack.length-1];(un[1]||gk).call(xe,void 0,un[0])}for(ce.position={start:Na(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Na(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<t.transforms.length;)ce=t.transforms[Ve](ce)||ce;return ce}function o(J,ce,xe){let _e=ce-1,Ve=-1,un=!1,Nn,cn,Bt,xn;for(;++_e<=xe;){const at=J[_e];switch(at[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{at[0]==="enter"?Ve++:Ve--,xn=void 0;break}case"lineEndingBlank":{at[0]==="enter"&&(Nn&&!xn&&!Ve&&!Bt&&(Bt=_e),xn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:xn=void 0}if(!Ve&&at[0]==="enter"&&at[1].type==="listItemPrefix"||Ve===-1&&at[0]==="exit"&&(at[1].type==="listUnordered"||at[1].type==="listOrdered")){if(Nn){let ia=_e;for(cn=void 0;ia--;){const sr=J[ia];if(sr[1].type==="lineEnding"||sr[1].type==="lineEndingBlank"){if(sr[0]==="exit")continue;cn&&(J[cn][1].type="lineEndingBlank",un=!0),sr[1].type="lineEnding",cn=ia}else if(!(sr[1].type==="linePrefix"||sr[1].type==="blockQuotePrefix"||sr[1].type==="blockQuotePrefixWhitespace"||sr[1].type==="blockQuoteMarker"||sr[1].type==="listItemIndent"))break}Bt&&(!cn||Bt<cn)&&(Nn._spread=!0),Nn.end=Object.assign({},cn?J[cn][1].start:at[1].end),J.splice(cn||_e,0,["exit",Nn,at[2]]),_e++,xe++}if(at[1].type==="listItemPrefix"){const ia={type:"listItem",_spread:!1,start:Object.assign({},at[1].start),end:void 0};Nn=ia,J.splice(_e,0,["enter",ia,at[2]]),_e++,xe++,Bt=void 0,xn=!0}}}return J[ce][1]._spread=un,xe}function u(J,ce){return xe;function xe(_e){d.call(this,J(_e),_e),ce&&ce.call(this,_e)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(J,ce,xe){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ce,xe||void 0]),J.position={start:Na(ce.start),end:void 0}}function f(J){return ce;function ce(xe){J&&J.call(this,xe),h.call(this,xe)}}function h(J,ce){const xe=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==J.type&&(ce?ce.call(this,J,_e[0]):(_e[1]||gk).call(this,J,_e[0]));else throw new Error("Cannot close `"+J.type+"` ("+fl({start:J.start,end:J.end})+"): it’s not open");xe.position.end=Na(J.end)}function g(){return VD(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function v(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=J}function w(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=J}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J.replace(/(\r?\n|\r)$/g,"")}function R(J){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ce,xe.identifier=Mo(this.sliceSerialize(J)).toLowerCase()}function j(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.title=J}function L(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.url=J}function P(J){const ce=this.stack[this.stack.length-1];if(!ce.depth){const xe=this.sliceSerialize(J).length;ce.depth=xe}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function Y(J){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function X(J){const xe=this.stack[this.stack.length-1].children;let _e=xe[xe.length-1];(!_e||_e.type!=="text")&&(_e=dt(),_e.position={start:Na(J.start),end:void 0},xe.push(_e)),this.stack.push(_e)}function ue(J){const ce=this.stack.pop();ce.value+=this.sliceSerialize(J),ce.position.end=Na(J.end)}function ae(J){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ce.children[ce.children.length-1];xe.position.end=Na(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(X.call(this,J),ue.call(this,J))}function oe(){this.data.atHardBreak=!0}function te(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function se(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function re(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.value=J}function E(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ce,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function F(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ce,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Z(J){const ce=this.sliceSerialize(J),xe=this.stack[this.stack.length-2];xe.label=P$(ce),xe.identifier=Mo(ce).toLowerCase()}function de(){const J=this.stack[this.stack.length-1],ce=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const _e=J.children;xe.children=_e}else xe.alt=ce}function O(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.url=J}function A(){const J=this.resume(),ce=this.stack[this.stack.length-1];ce.title=J}function G(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ie(J){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ce,xe.identifier=Mo(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function ve(J){this.data.characterReferenceType=J.type}function ge(J){const ce=this.sliceSerialize(J),xe=this.data.characterReferenceType;let _e;xe?(_e=g_(ce,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=$g(ce);const Ve=this.stack[this.stack.length-1];Ve.value+=_e}function ye(J){const ce=this.stack.pop();ce.position.end=Na(J.end)}function Ye(J){ue.call(this,J);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(J)}function $e(J){ue.call(this,J);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(J)}function At(){return{type:"blockquote",children:[]}}function ln(){return{type:"code",lang:null,meta:null,value:""}}function Zn(){return{type:"inlineCode",value:""}}function gr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Bn(){return{type:"emphasis",children:[]}}function Ka(){return{type:"heading",depth:0,children:[]}}function Be(){return{type:"break"}}function rt(){return{type:"html",value:""}}function ct(){return{type:"image",title:null,url:"",alt:null}}function Qe(){return{type:"link",title:null,url:"",children:[]}}function qt(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function In(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function jt(){return{type:"paragraph",children:[]}}function Zt(){return{type:"strong",children:[]}}function dt(){return{type:"text",value:""}}function Ai(){return{type:"thematicBreak"}}}function Na(e){return{line:e.line,column:e.column,offset:e.offset}}function j_(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?j_(e,a):I$(e,a)}}function I$(e,t){let n;for(n in t)if(T_.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function gk(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fl({start:t.start,end:t.end})+") is still open")}function H$(e){const t=this;t.parser=n;function n(a){return Z$(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function F$(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function q$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
23
- `}]}function G$(e,t){const n=t.value?t.value+`
24
- `:"",a={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(a.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function Y$(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function X$(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function K$(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=Ko(a.toLowerCase()),u=e.footnoteOrder.indexOf(a);let l,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),l=e.footnoteOrder.length):l=u+1,d+=1,e.footnoteCounts.set(a,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function J$(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Q$(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function E_(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const o=e.all(t),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=a:o.push({type:"text",value:a}),o}function W$(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return E_(e,t);const o={src:Ko(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function e6(e,t){const n={src:Ko(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function t6(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function n6(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return E_(e,t);const o={href:Ko(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function r6(e,t){const n={href:Ko(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function a6(e,t,n){const a=e.all(t),o=n?i6(n):C_(t),u={},l=[];if(typeof t.checked=="boolean"){const g=a[0];let x;g&&g.type==="element"&&g.tagName==="p"?x=g:(x={type:"element",tagName:"p",properties:{},children:[]},a.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const g=a[d];(o||d!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
25
- `}),g.type==="element"&&g.tagName==="p"&&!o?l.push(...g.children):l.push(g)}const f=a[a.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
26
- `});const h={type:"element",tagName:"li",properties:u,children:l};return e.patch(t,h),e.applyData(t,h)}function i6(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=C_(n[a])}return t}function C_(e){const t=e.spread;return t??e.children.length>1}function o6(e,t){const n={},a=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<a.length;){const l=a[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function s6(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l6(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function u6(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function c6(e,t){const n=e.all(t),a=n.shift(),o=[];if(a){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Og(t.children[1]),f=u_(t.children[t.children.length-1]);d&&f&&(l.position={start:d,end:f}),o.push(l)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function d6(e,t,n){const a=n?n.children:void 0,u=(a?a.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,d=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<d;){const x=t.children[f],b={},v=l?l[f]:void 0;v&&(b.align=v);let w={type:"element",tagName:u,properties:b,children:[]};x&&(w.children=e.all(x),e.patch(x,w),w=e.applyData(x,w)),h.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function f6(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yk=9,xk=32;function h6(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),o=0;const u=[];for(;a;)u.push(bk(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=n.exec(t);return u.push(bk(t.slice(o),o>0,!1)),u.join("")}function bk(e,t,n){let a=0,o=e.length;if(t){let u=e.codePointAt(a);for(;u===yk||u===xk;)a++,u=e.codePointAt(a)}if(n){let u=e.codePointAt(o-1);for(;u===yk||u===xk;)o--,u=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function m6(e,t){const n={type:"text",value:h6(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function p6(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const g6={blockquote:F$,break:q$,code:G$,delete:Y$,emphasis:X$,footnoteReference:K$,heading:J$,html:Q$,imageReference:W$,image:e6,inlineCode:t6,linkReference:n6,link:r6,listItem:a6,list:o6,paragraph:s6,root:l6,strong:u6,table:c6,tableCell:f6,tableRow:d6,text:m6,thematicBreak:p6,toml:uc,yaml:uc,definition:uc,footnoteDefinition:uc};function uc(){}const N_=-1,ud=0,ml=1,Bc=2,Pg=3,Vg=4,Zg=5,Bg=6,A_=7,O_=8,vk=typeof self=="object"?self:globalThis,y6=(e,t)=>{const n=(o,u)=>(e.set(u,o),o),a=o=>{if(e.has(o))return e.get(o);const[u,l]=t[o];switch(u){case ud:case N_:return n(l,o);case ml:{const d=n([],o);for(const f of l)d.push(a(f));return d}case Bc:{const d=n({},o);for(const[f,h]of l)d[a(f)]=a(h);return d}case Pg:return n(new Date(l),o);case Vg:{const{source:d,flags:f}=l;return n(new RegExp(d,f),o)}case Zg:{const d=n(new Map,o);for(const[f,h]of l)d.set(a(f),a(h));return d}case Bg:{const d=n(new Set,o);for(const f of l)d.add(a(f));return d}case A_:{const{name:d,message:f}=l;return n(new vk[d](f),o)}case O_:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:d}=new Uint8Array(l);return n(new DataView(d),l)}}return n(new vk[u](l),o)};return a},kk=e=>y6(new Map,e)(0),xo="",{toString:x6}={},{keys:b6}=Object,el=e=>{const t=typeof e;if(t!=="object"||!e)return[ud,t];const n=x6.call(e).slice(8,-1);switch(n){case"Array":return[ml,xo];case"Object":return[Bc,xo];case"Date":return[Pg,xo];case"RegExp":return[Vg,xo];case"Map":return[Zg,xo];case"Set":return[Bg,xo];case"DataView":return[ml,n]}return n.includes("Array")?[ml,n]:n.includes("Error")?[A_,n]:[Bc,n]},cc=([e,t])=>e===ud&&(t==="function"||t==="symbol"),v6=(e,t,n,a)=>{const o=(l,d)=>{const f=a.push(l)-1;return n.set(d,f),f},u=l=>{if(n.has(l))return n.get(l);let[d,f]=el(l);switch(d){case ud:{let g=l;switch(f){case"bigint":d=O_,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);g=null;break;case"undefined":return o([N_],l)}return o([d,g],l)}case ml:{if(f){let b=l;return f==="DataView"?b=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(l)),o([f,[...b]],l)}const g=[],x=o([d,g],l);for(const b of l)g.push(u(b));return x}case Bc:{if(f)switch(f){case"BigInt":return o([f,l.toString()],l);case"Boolean":case"Number":case"String":return o([f,l.valueOf()],l)}if(t&&"toJSON"in l)return u(l.toJSON());const g=[],x=o([d,g],l);for(const b of b6(l))(e||!cc(el(l[b])))&&g.push([u(b),u(l[b])]);return x}case Pg:return o([d,l.toISOString()],l);case Vg:{const{source:g,flags:x}=l;return o([d,{source:g,flags:x}],l)}case Zg:{const g=[],x=o([d,g],l);for(const[b,v]of l)(e||!(cc(el(b))||cc(el(v))))&&g.push([u(b),u(v)]);return x}case Bg:{const g=[],x=o([d,g],l);for(const b of l)(e||!cc(el(b)))&&g.push(u(b));return x}}const{message:h}=l;return o([d,{name:f,message:h}],l)};return u},wk=(e,{json:t,lossy:n}={})=>{const a=[];return v6(!(t||n),!!t,new Map,a)(e),a},Ic=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?kk(wk(e,t)):structuredClone(e):(e,t)=>kk(wk(e,t));function k6(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function w6(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function S6(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||k6,a=e.options.footnoteBackLabel||w6,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const g=e.all(h),x=String(h.identifier).toUpperCase(),b=Ko(x.toLowerCase());let v=0;const w=[],_=e.footnoteCounts.get(x);for(;_!==void 0&&++v<=_;){w.length>0&&w.push({type:"text",value:" "});let R=typeof n=="string"?n:n(f,v);typeof R=="string"&&(R={type:"text",value:R}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(f,v),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const C=g[g.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const R=C.children[C.children.length-1];R&&R.type==="text"?R.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...w)}else g.push(...w);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(g,!0)};e.patch(h,N),d.push(N)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ic(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
27
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
28
- `}]}}const R_=(function(e){if(e==null)return j6;if(typeof e=="function")return cd(e);if(typeof e=="object")return Array.isArray(e)?z6(e):_6(e);if(typeof e=="string")return T6(e);throw new Error("Expected function, string, or object as test")});function z6(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=R_(e[n]);return cd(a);function a(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function _6(e){const t=e;return cd(n);function n(a){const o=a;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function T6(e){return cd(t);function t(n){return n&&n.type===e}}function cd(e){return t;function t(n,a,o){return!!(E6(n)&&e.call(this,n,typeof a=="number"?a:void 0,o||void 0))}}function j6(){return!0}function E6(e){return e!==null&&typeof e=="object"&&"type"in e}const M_=[],C6=!0,Sk=!1,N6="skip";function A6(e,t,n,a){let o;typeof t=="function"&&typeof n!="function"?(a=n,n=t):o=t;const u=R_(o),l=a?-1:1;d(e,void 0,[])();function d(f,h,g){const x=f&&typeof f=="object"?f:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(f.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=M_,w,_,C;if((!t||u(f,h,g[g.length-1]||void 0))&&(v=O6(n(f,g)),v[0]===Sk))return v;if("children"in f&&f.children){const N=f;if(N.children&&v[0]!==N6)for(_=(a?N.children.length:-1)+l,C=g.concat(N);_>-1&&_<N.children.length;){const R=N.children[_];if(w=d(R,_,C)(),w[0]===Sk)return w;_=typeof w[1]=="number"?w[1]:_+l}}return v}}}function O6(e){return Array.isArray(e)?e:typeof e=="number"?[C6,e]:e==null?M_:[e]}function D_(e,t,n,a){let o,u,l;typeof t=="function"&&typeof n!="function"?(u=void 0,l=t,o=n):(u=t,l=n,o=a),A6(e,u,d,o);function d(f,h){const g=h[h.length-1],x=g?g.children.indexOf(f):void 0;return l(f,x,g)}}const Ep={}.hasOwnProperty,R6={};function M6(e,t){const n=t||R6,a=new Map,o=new Map,u=new Map,l={...g6,...n.handlers},d={all:h,applyData:$6,definitionById:a,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:l,one:f,options:n,patch:D6,wrap:U6};return D_(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const x=g.type==="definition"?a:o,b=String(g.identifier).toUpperCase();x.has(b)||x.set(b,g)}}),d;function f(g,x){const b=g.type,v=d.handlers[b];if(Ep.call(d.handlers,b)&&v)return v(d,g,x);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in g){const{children:_,...C}=g,N=Ic(C);return N.children=d.all(g),N}return Ic(g)}return(d.options.unknownHandler||L6)(d,g,x)}function h(g){const x=[];if("children"in g){const b=g.children;let v=-1;for(;++v<b.length;){const w=d.one(b[v],g);if(w){if(v&&b[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=zk(w.value)),!Array.isArray(w)&&w.type==="element")){const _=w.children[0];_&&_.type==="text"&&(_.value=zk(_.value))}Array.isArray(w)?x.push(...w):x.push(w)}}}return x}}function D6(e,t){e.position&&(t.position=xD(e))}function $6(e,t){let n=t;if(e&&e.data){const a=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const l="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:l}}n.type==="element"&&u&&Object.assign(n.properties,Ic(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function L6(e,t){const n=t.data||{},a="value"in t&&!(Ep.call(n,"hProperties")||Ep.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function U6(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
29
- `});++a<e.length;)a&&n.push({type:"text",value:`
30
- `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
31
- `}),n}function zk(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _k(e,t){const n=M6(e,t),a=n.one(e,void 0),o=S6(n),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
32
- `},o),u}function P6(e,t){return e&&"run"in e?async function(n,a){const o=_k(n,{file:a,...t});await e.run(o,a)}:function(n,a){return _k(n,{file:a,...e||t})}}function Tk(e){if(e)throw e}var ym,jk;function V6(){if(jk)return ym;jk=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),x=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!x)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},l=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},d=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(a)return a(h,g).value}else return;return h[g]};return ym=function f(){var h,g,x,b,v,w,_=arguments[0],C=1,N=arguments.length,R=!1;for(typeof _=="boolean"&&(R=_,_=arguments[1]||{},C=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});C<N;++C)if(h=arguments[C],h!=null)for(g in h)x=d(_,g),b=d(h,g),_!==b&&(R&&b&&(u(b)||(v=o(b)))?(v?(v=!1,w=x&&o(x)?x:[]):w=x&&u(x)?x:{},l(_,{name:g,newValue:f(R,w,b)})):typeof b<"u"&&l(_,{name:g,newValue:b}));return _},ym}var Z6=V6();const xm=Up(Z6);function Cp(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function B6(){const e=[],t={run:n,use:a};return t;function n(...o){let u=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);d(null,...o);function d(f,...h){const g=e[++u];let x=-1;if(f){l(f);return}for(;++x<o.length;)(h[x]===null||h[x]===void 0)&&(h[x]=o[x]);o=h,g?I6(g,d)(...h):l(null,...h)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function I6(e,t){let n;return a;function a(...l){const d=e.length>l.length;let f;d&&l.push(o);try{f=e.apply(this,l)}catch(h){const g=h;if(d&&n)throw g;return o(g)}d||(f&&f.then&&typeof f.then=="function"?f.then(u,o):f instanceof Error?o(f):u(f))}function o(l,...d){n||(n=!0,t(l,...d))}function u(l){o(null,l)}}const kr={basename:H6,dirname:F6,extname:q6,join:G6,sep:"/"};function H6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pl(e);let n=0,a=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else a<0&&(u=!0,a=o+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let l=-1,d=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else l<0&&(u=!0,l=o+1),d>-1&&(e.codePointAt(o)===t.codePointAt(d--)?d<0&&(a=o):(d=-1,a=l));return n===a?a=l:a<0&&(a=e.length),e.slice(n,a)}function F6(e){if(Pl(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function q6(e){Pl(e);let t=e.length,n=-1,a=0,o=-1,u=0,l;for(;t--;){const d=e.codePointAt(t);if(d===47){if(l){a=t+1;break}continue}n<0&&(l=!0,n=t+1),d===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||n<0||u===0||u===1&&o===n-1&&o===a+1?"":e.slice(o,n)}function G6(...e){let t=-1,n;for(;++t<e.length;)Pl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Y6(n)}function Y6(e){Pl(e);const t=e.codePointAt(0)===47;let n=X6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function X6(e,t){let n="",a=0,o=-1,u=0,l=-1,d,f;for(;++l<=e.length;){if(l<e.length)d=e.codePointAt(l);else{if(d===47)break;d=47}if(d===47){if(!(o===l-1||u===1))if(o!==l-1&&u===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",a=0):(n=n.slice(0,f),a=n.length-1-n.lastIndexOf("/")),o=l,u=0;continue}}else if(n.length>0){n="",a=0,o=l,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),a=l-o-1;o=l,u=0}else d===46&&u>-1?u++:u=-1}return n}function Pl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const K6={cwd:J6};function J6(){return"/"}function Np(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Q6(e){if(typeof e=="string")e=new URL(e);else if(!Np(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return W6(e)}function W6(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const bm=["history","path","basename","stem","extname","dirname"];class $_{constructor(t){let n;t?Np(t)?n={path:t}:typeof t=="string"||eL(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":K6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<bm.length;){const u=bm[a];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let o;for(o in n)bm.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?kr.basename(this.path):void 0}set basename(t){km(t,"basename"),vm(t,"basename"),this.path=kr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?kr.dirname(this.path):void 0}set dirname(t){Ek(this.basename,"dirname"),this.path=kr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?kr.extname(this.path):void 0}set extname(t){if(vm(t,"extname"),Ek(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=kr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Np(t)&&(t=Q6(t)),km(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?kr.basename(this.path,this.extname):void 0}set stem(t){km(t,"stem"),vm(t,"stem"),this.path=kr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const o=this.message(t,n,a);throw o.fatal=!0,o}info(t,n,a){const o=this.message(t,n,a);return o.fatal=void 0,o}message(t,n,a){const o=new sn(t,n,a);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function vm(e,t){if(e&&e.includes(kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+kr.sep+"`")}function km(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ek(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function eL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tL=(function(e){const a=this.constructor.prototype,o=a[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),nL={}.hasOwnProperty;class Ig extends tL{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=B6()}copy(){const t=new Ig;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(xm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(zm("data",this.frozen),this.namespace[t]=n,this):nL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(zm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=n.call(t,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=dc(t),a=this.parser||this.Parser;return wm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),wm("process",this.parser||this.Parser),Sm("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,l){const d=dc(t),f=a.parse(d);a.run(f,d,function(g,x,b){if(g||!x||!b)return h(g);const v=x,w=a.stringify(v,b);iL(w)?b.value=w:b.result=w,h(g,b)});function h(g,x){g||!x?l(g):u?u(x):n(void 0,x)}}}processSync(t){let n=!1,a;return this.freeze(),wm("processSync",this.parser||this.Parser),Sm("processSync",this.compiler||this.Compiler),this.process(t,o),Nk("processSync","process",n),a;function o(u,l){n=!0,Tk(u),a=l}}run(t,n,a){Ck(t),this.freeze();const o=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?u(void 0,a):new Promise(u);function u(l,d){const f=dc(n);o.run(t,f,h);function h(g,x,b){const v=x||t;g?d(g):l?l(v):a(void 0,v,b)}}}runSync(t,n){let a=!1,o;return this.run(t,n,u),Nk("runSync","run",a),o;function u(l,d){Tk(l),o=d,a=!0}}stringify(t,n){this.freeze();const a=dc(n),o=this.compiler||this.Compiler;return Sm("stringify",o),Ck(t),o(t,a)}use(t,...n){const a=this.attachers,o=this.namespace;if(zm("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...x]=h;f(g,x)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(o.settings=xm(!0,o.settings,h.settings))}function d(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const x=h[g];u(x)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,g){let x=-1,b=-1;for(;++x<a.length;)if(a[x][0]===h){b=x;break}if(b===-1)a.push([h,...g]);else if(g.length>0){let[v,...w]=g;const _=a[b][1];Cp(_)&&Cp(v)&&(v=xm(!0,_,v)),a[b]=[h,v,...w]}}}}const rL=new Ig().freeze();function wm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zm(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ck(e){if(!Cp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Nk(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function dc(e){return aL(e)?e:new $_(e)}function aL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function iL(e){return typeof e=="string"||oL(e)}function oL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ak=[],Ok={allowDangerousHtml:!0},lL=/^(https?|ircs?|mailto|xmpp)$/i,uL=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function cL(e){const t=dL(e),n=fL(e);return hL(t.runSync(t.parse(n),n),e)}function dL(e){const t=e.rehypePlugins||Ak,n=e.remarkPlugins||Ak,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ok}:Ok;return rL().use(H$).use(n).use(P6,a).use(t)}function fL(e){const t=e.children||"",n=new $_;return typeof t=="string"&&(n.value=t),n}function hL(e,t){const n=t.allowedElements,a=t.allowElement,o=t.components,u=t.disallowedElements,l=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||mL;for(const g of uL)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+sL+g.id,void 0);return D_(e,h),SD(e,{Fragment:p.Fragment,components:o,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function h(g,x,b){if(g.type==="raw"&&b&&typeof x=="number")return l?b.children.splice(x,1):b.children[x]={type:"text",value:g.value},x;if(g.type==="element"){let v;for(v in mm)if(Object.hasOwn(mm,v)&&Object.hasOwn(g.properties,v)){const w=g.properties[v],_=mm[v];(_===null||_.includes(g.tagName))&&(g.properties[v]=f(String(w||""),v,g))}}if(g.type==="element"){let v=n?!n.includes(g.tagName):u?u.includes(g.tagName):!1;if(!v&&a&&typeof x=="number"&&(v=!a(g,x,b)),v&&b&&typeof x=="number")return d&&g.children?b.children.splice(x,1,...g.children):b.children.splice(x,1),x}}}function mL(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||a!==-1&&t>a||lL.test(e.slice(0,t))?e:""}const pL=({messages:e,onSendMessage:t,isLoading:n,activeSessionId:a})=>{const[o,u]=z.useState(""),l=z.useRef(null),d=()=>{l.current?.scrollIntoView({behavior:"smooth"})};z.useEffect(()=>{d()},[e,n]);const f=w=>{w.preventDefault(),!(!o.trim()||n)&&(t(o),u(""))},h=w=>w.session_id?.startsWith("sati-evaluation-")||w.tool_name?.toLowerCase().includes("sati")||w.tool_call_id?.toLowerCase().includes("sati")?!0:Array.isArray(w.tool_calls)?w.tool_calls.some(_=>String(_?.name||"").toLowerCase().includes("sati")):!1,g=w=>h(w)?"SATI Memory":"Tool Call",x=w=>{if(typeof w=="string")try{return JSON.stringify(JSON.parse(w),null,2)}catch{return w}try{return JSON.stringify(w,null,2)}catch{return String(w)}},b=w=>{const _=w.usage_metadata;if(!_||typeof _!="object")return null;const C=_.input_tokens??_.prompt_tokens??_.input??0,N=_.output_tokens??_.completion_tokens??_.output??0,R=Number(C),j=Number(N);if(!Number.isFinite(R)&&!Number.isFinite(j))return null;const L=Number.isFinite(R)?Math.max(0,Math.round(R)):0,P=Number.isFinite(j)?Math.max(0,Math.round(j)):0;return L===0&&P===0?null:{input:L,output:P}},v=w=>w.toLocaleString("pt-BR");return a?p.jsxs("div",{className:"flex-1 flex flex-col h-full bg-gray-50 dark:bg-black relative overflow-hidden transition-colors duration-300",children:[p.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6 min-h-0",children:[e.map((w,_)=>{const C=b(w),N=w.type==="human"?"bg-white/20 border border-white/30 text-white":"bg-gray-100 border border-gray-200 text-gray-600 dark:bg-zinc-900 dark:border-zinc-700 dark:text-gray-300";return p.jsxs("div",{className:`flex gap-4 ${w.type==="human"?"justify-end":"justify-start"}`,children:[w.type!=="human"&&p.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 ${w.type==="tool"?"bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400":"bg-azure-primary/10 text-azure-primary dark:bg-matrix-primary/20 dark:text-matrix-highlight"}`,children:w.type==="tool"?p.jsx(iS,{size:16}):p.jsx(x0,{size:18})}),p.jsxs("div",{className:`max-w-[80%] rounded-2xl p-4 shadow-sm ${w.type==="human"?"bg-azure-primary text-white dark:bg-matrix-primary dark:text-matrix-highlight dark:border dark:border-matrix-highlight/20 rounded-br-none":w.type==="tool"?"bg-white dark:bg-black border border-gray-200 dark:border-zinc-800 text-gray-800 dark:text-gray-200 rounded-bl-none":"bg-white dark:bg-black border border-gray-100 dark:border-matrix-primary/30 text-gray-800 dark:text-matrix-secondary rounded-bl-none"}`,children:[w.type==="tool"&&p.jsxs("details",{className:"rounded-lg border border-gray-200 dark:border-zinc-700 bg-gray-50 dark:bg-zinc-900/50 p-3",children:[p.jsx("summary",{className:"cursor-pointer text-sm font-medium text-gray-700 dark:text-gray-200",children:g(w)}),p.jsx("pre",{className:"mt-3 whitespace-pre-wrap break-all text-xs font-mono text-gray-700 dark:text-gray-300 overflow-x-auto",children:x(w.content)})]}),w.type==="ai"&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"prose dark:prose-invert max-w-none text-sm leading-relaxed dark:prose-p:text-matrix-secondary dark:prose-headings:text-matrix-highlight dark:prose-strong:text-matrix-highlight dark:prose-code:text-matrix-highlight",children:p.jsx(cL,{children:w.content})}),Array.isArray(w.tool_calls)&&w.tool_calls.length>0&&p.jsxs("details",{className:"mt-3 rounded-lg border border-gray-200 dark:border-zinc-700 bg-gray-50 dark:bg-zinc-900/50 p-3",children:[p.jsx("summary",{className:"cursor-pointer text-sm font-medium text-gray-700 dark:text-gray-200",children:g(w)}),p.jsx("pre",{className:"mt-3 whitespace-pre-wrap break-all text-xs font-mono text-gray-700 dark:text-gray-300 overflow-x-auto",children:x(w.tool_calls)})]})]}),w.type==="human"&&p.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:w.content}),C&&p.jsx("div",{className:"mt-3 flex justify-end",children:p.jsxs("div",{className:`inline-flex items-center gap-1.5 rounded-full px-2 py-1 text-[11px] font-medium ${N}`,children:[p.jsx(nS,{size:12}),p.jsx("span",{children:v(C.input)}),p.jsx("span",{className:"opacity-60",children:"/"}),p.jsx("span",{children:v(C.output)}),p.jsx(tS,{size:12})]})})]}),w.type==="human"&&p.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-200 dark:bg-matrix-primary/20 flex items-center justify-center flex-shrink-0 text-gray-500 dark:text-matrix-secondary",children:p.jsx(kA,{size:18})})]},_)}),n&&p.jsxs("div",{className:"flex gap-4 justify-start",children:[p.jsx("div",{className:"w-8 h-8 rounded-full bg-azure-primary/10 text-azure-primary dark:bg-matrix-primary/20 dark:text-matrix-highlight flex items-center justify-center flex-shrink-0",children:p.jsx(x0,{size:18})}),p.jsxs("div",{className:"bg-white dark:bg-black border border-gray-100 dark:border-matrix-primary/30 p-4 rounded-2xl rounded-bl-none shadow-sm flex items-center gap-2",children:[p.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"0ms"}}),p.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"150ms"}}),p.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]}),p.jsx("div",{ref:l})]}),p.jsx("div",{className:"p-4 bg-white dark:bg-black border-t border-gray-200 dark:border-matrix-primary/30 shrink-0",children:p.jsxs("form",{onSubmit:f,className:"max-w-4xl mx-auto relative flex items-center gap-2",children:[p.jsx("input",{type:"text",value:o,onChange:w=>u(w.target.value),placeholder:"Type your message...",className:"flex-1 bg-gray-100 dark:bg-black/50 border border-transparent dark:border-matrix-primary/30 rounded-xl px-4 py-3 focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight outline-none transition-all dark:text-matrix-highlight dark:placeholder-matrix-secondary/50",disabled:n}),p.jsx("button",{type:"submit",disabled:!o.trim()||n,className:"p-3 bg-azure-primary text-white dark:bg-matrix-secondary dark:text-black dark:hover:bg-matrix-highlight rounded-xl hover:bg-azure-secondary disabled:opacity-50 disabled:cursor-not-allowed transition-colors shadow-md",children:p.jsx(sA,{size:20})})]})})]}):p.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center bg-gray-50 dark:bg-black text-gray-400 dark:text-matrix-secondary/50 h-full",children:[p.jsx(gL,{size:48,className:"mb-4 opacity-20"}),p.jsx("p",{children:"Select a session to start chatting or create a new one."})]})},gL=({size:e,className:t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:p.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),Aa={getSessions:async()=>Ne.get("/sessions"),createSession:async()=>Ne.post("/sessions",{}),deleteSession:async e=>Ne.delete(`/sessions/${e}`),renameSession:async(e,t)=>Ne.patch(`/sessions/${e}/title`,{title:t}),archiveSession:async e=>Ne.post(`/sessions/${e}/archive`,{}),getMessages:async e=>Ne.get(`/sessions/${e}/messages`),sendMessage:async(e,t)=>Ne.post("/chat",{sessionId:e,message:t})};function yL({isOpen:e,onClose:t,onConfirm:n,title:a,description:o,confirmJson:u="Confirm",variant:l="default"}){return p.jsx(jr,{open:e,onOpenChange:t,children:p.jsxs(Po,{className:"sm:max-w-md bg-azure-surface dark:bg-black border-azure-border dark:border-matrix-primary/30",children:[p.jsx(Er,{children:p.jsx(Cr,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:a})}),p.jsx("div",{className:"py-4",children:p.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary",children:o})}),p.jsxs(B3,{className:"flex flex-col sm:flex-row gap-3 sm:justify-end",children:[p.jsx(nr,{variant:"outline",onClick:t,className:"dark:border-matrix-primary/30 dark:text-matrix-secondary dark:hover:bg-matrix-primary/20",children:"Cancel"}),p.jsx(nr,{variant:l,onClick:()=>{n(),t()},className:l==="destructive"?"dark:bg-red-900/50 dark:text-red-200 dark:hover:bg-red-800/60":"dark:bg-matrix-primary dark:text-black dark:hover:bg-matrix-highlight",children:u})]})]})})}const xL=()=>{const[e,t]=z.useState([]),[n,a]=z.useState(null),[o,u]=z.useState([]),[l,d]=z.useState(!1),[f,h]=z.useState(!0),g=z.useRef(!1);z.useEffect(()=>{g.current=l},[l]),z.useEffect(()=>{if(!n)return;const L=setInterval(async()=>{if(!g.current)try{const $=(await Aa.getMessages(n)).filter(Y=>Y.type!=="system");u(Y=>{if($.length!==Y.length)return $;const U=$.at(-1)?.created_at??0,X=Y.at(-1)?.created_at??0;return U>X?$:Y})}catch{}},3e3);return()=>clearInterval(L)},[n]);const[x,b]=z.useState({isOpen:!1,title:"",description:"",onConfirm:()=>{}}),v=async()=>{try{const L=await Aa.getSessions();t(L)}catch(L){console.error("Failed to load sessions:",L)}};z.useEffect(()=>{v()},[]),z.useEffect(()=>{n?w(n):u([])},[n]);const w=async L=>{try{const P=await Aa.getMessages(L);u(P.filter($=>$.type!=="system"))}catch(P){console.error("Failed to load messages:",P)}},_=async()=>{try{const L=await Aa.createSession();await v(),a(L.id)}catch(L){console.error("Failed to create session:",L)}},C=async L=>{if(!n)return;const P={type:"human",content:L};u($=>[...$,P]),d(!0);try{await Aa.sendMessage(n,L),await w(n),await v()}catch($){console.error("Failed to send message:",$)}finally{d(!1)}},N=L=>{b({isOpen:!0,title:"Archive Session",description:"Are you sure you want to archive this session? It will be moved to the archives.",confirmJson:"Archive",onConfirm:async()=>{try{await Aa.archiveSession(L),n===L&&a(null),await v()}catch(P){console.error("Failed to archive session:",P)}}})},R=L=>{b({isOpen:!0,title:"Delete Session",description:"Are you sure you want to DELETE this session? This action cannot be undone.",confirmJson:"Delete",variant:"destructive",onConfirm:async()=>{try{await Aa.deleteSession(L),n===L&&a(null),await v()}catch(P){console.error("Failed to delete session:",P)}}})},j=async(L,P)=>{try{await Aa.renameSession(L,P),await v()}catch($){console.error("Failed to rename session:",$)}};return p.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-gray-50 dark:bg-zinc-950",children:[p.jsx(Y3,{sessions:e,activeSessionId:n,onSelectSession:a,onCreateSession:_,onArchiveSession:N,onDeleteSession:R,onRenameSession:j,isOpen:f,toggleSidebar:()=>h(!f)}),p.jsx("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:p.jsx(pL,{messages:o,onSendMessage:C,isLoading:l,activeSessionId:n})}),p.jsx(yL,{isOpen:x.isOpen,onClose:()=>b(L=>({...L,isOpen:!1})),onConfirm:x.onConfirm,title:x.title,description:x.description,confirmJson:x.confirmJson,variant:x.variant})]})};function Jr({title:e,description:t,children:n}){return p.jsxs("div",{className:"border border-azure-border dark:border-matrix-primary rounded-lg p-6 bg-azure-surface/50 dark:bg-matrix-base/50",children:[p.jsxs("div",{className:"mb-4",children:[p.jsx("h3",{className:"text-lg font-medium text-azure-text-primary dark:text-matrix-highlight",children:e}),t&&p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mt-1",children:t})]}),p.jsx("div",{className:"space-y-4",children:n})]})}const bL=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},vL=(e,t)=>({classGroupId:e,validator:t}),L_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hc="-",Rk=[],kL="arbitrary..",wL=e=>{const t=zL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return SL(l);const d=l.split(Hc),f=d[0]===""&&d.length>1?1:0;return U_(d,f,t)},getConflictingClassGroupIds:(l,d)=>{if(d){const f=a[l],h=n[l];return f?h?bL(h,f):f:h||Rk}return n[l]||Rk}}},U_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],u=n.nextPart.get(o);if(u){const h=U_(e,t+1,u);if(h)return h}const l=n.validators;if(l===null)return;const d=t===0?e.join(Hc):e.slice(t).join(Hc),f=l.length;for(let h=0;h<f;h++){const g=l[h];if(g.validator(d))return g.classGroupId}},SL=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?kL+a:void 0})(),zL=e=>{const{theme:t,classGroups:n}=e;return _L(n,t)},_L=(e,t)=>{const n=L_();for(const a in e){const o=e[a];Hg(o,n,a,t)}return n},Hg=(e,t,n,a)=>{const o=e.length;for(let u=0;u<o;u++){const l=e[u];TL(l,t,n,a)}},TL=(e,t,n,a)=>{if(typeof e=="string"){jL(e,t,n);return}if(typeof e=="function"){EL(e,t,n,a);return}CL(e,t,n,a)},jL=(e,t,n)=>{const a=e===""?t:P_(t,e);a.classGroupId=n},EL=(e,t,n,a)=>{if(NL(e)){Hg(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(vL(n,e))},CL=(e,t,n,a)=>{const o=Object.entries(e),u=o.length;for(let l=0;l<u;l++){const[d,f]=o[l];Hg(f,P_(t,d),n,a)}},P_=(e,t)=>{let n=e;const a=t.split(Hc),o=a.length;for(let u=0;u<o;u++){const l=a[u];let d=n.nextPart.get(l);d||(d=L_(),n.nextPart.set(l,d)),n=d}return n},NL=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,AL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(u,l)=>{n[u]=l,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(u){let l=n[u];if(l!==void 0)return l;if((l=a[u])!==void 0)return o(u,l),l},set(u,l){u in n?n[u]=l:o(u,l)}}},Ap="!",Mk=":",OL=[],Dk=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),RL=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const u=[];let l=0,d=0,f=0,h;const g=o.length;for(let _=0;_<g;_++){const C=o[_];if(l===0&&d===0){if(C===Mk){u.push(o.slice(f,_)),f=_+1;continue}if(C==="/"){h=_;continue}}C==="["?l++:C==="]"?l--:C==="("?d++:C===")"&&d--}const x=u.length===0?o:o.slice(f);let b=x,v=!1;x.endsWith(Ap)?(b=x.slice(0,-1),v=!0):x.startsWith(Ap)&&(b=x.slice(1),v=!0);const w=h&&h>f?h-f:void 0;return Dk(u,v,b,w)};if(t){const o=t+Mk,u=a;a=l=>l.startsWith(o)?u(l.slice(o.length)):Dk(OL,!1,l,void 0,!0)}if(n){const o=a;a=u=>n({className:u,parseClassName:o})}return a},ML=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let u=0;u<n.length;u++){const l=n[u],d=l[0]==="[",f=t.has(l);d||f?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(l)):o.push(l)}return o.length>0&&(o.sort(),a.push(...o)),a}},DL=e=>({cache:AL(e.cacheSize),parseClassName:RL(e),sortModifiers:ML(e),...wL(e)}),$L=/\s+/,LL=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:u}=t,l=[],d=e.trim().split($L);let f="";for(let h=d.length-1;h>=0;h-=1){const g=d[h],{isExternal:x,modifiers:b,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:_}=n(g);if(x){f=g+(f.length>0?" "+f:f);continue}let C=!!_,N=a(C?w.substring(0,_):w);if(!N){if(!C){f=g+(f.length>0?" "+f:f);continue}if(N=a(w),!N){f=g+(f.length>0?" "+f:f);continue}C=!1}const R=b.length===0?"":b.length===1?b[0]:u(b).join(":"),j=v?R+Ap:R,L=j+N;if(l.indexOf(L)>-1)continue;l.push(L);const P=o(N,C);for(let $=0;$<P.length;++$){const Y=P[$];l.push(j+Y)}f=g+(f.length>0?" "+f:f)}return f},UL=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=V_(n))&&(o&&(o+=" "),o+=a);return o},V_=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=V_(e[a]))&&(n&&(n+=" "),n+=t);return n},PL=(e,...t)=>{let n,a,o,u;const l=f=>{const h=t.reduce((g,x)=>x(g),e());return n=DL(h),a=n.cache.get,o=n.cache.set,u=d,d(f)},d=f=>{const h=a(f);if(h)return h;const g=LL(f,n);return o(f,g),g};return u=l,(...f)=>u(UL(...f))},VL=[],Ht=e=>{const t=n=>n[e]||VL;return t.isThemeGetter=!0,t},Z_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,B_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZL=/^\d+\/\d+$/,BL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,FL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bo=e=>ZL.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),Oa=e=>!!e&&Number.isInteger(Number(e)),_m=e=>e.endsWith("%")&&Re(e.slice(0,-1)),Qr=e=>BL.test(e),GL=()=>!0,YL=e=>IL.test(e)&&!HL.test(e),I_=()=>!1,XL=e=>FL.test(e),KL=e=>qL.test(e),JL=e=>!he(e)&&!me(e),QL=e=>Jo(e,q_,I_),he=e=>Z_.test(e),gi=e=>Jo(e,G_,YL),Tm=e=>Jo(e,r9,Re),$k=e=>Jo(e,H_,I_),WL=e=>Jo(e,F_,KL),fc=e=>Jo(e,Y_,XL),me=e=>B_.test(e),tl=e=>Qo(e,G_),e9=e=>Qo(e,a9),Lk=e=>Qo(e,H_),t9=e=>Qo(e,q_),n9=e=>Qo(e,F_),hc=e=>Qo(e,Y_,!0),Jo=(e,t,n)=>{const a=Z_.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Qo=(e,t,n=!1)=>{const a=B_.exec(e);return a?a[1]?t(a[1]):n:!1},H_=e=>e==="position"||e==="percentage",F_=e=>e==="image"||e==="url",q_=e=>e==="length"||e==="size"||e==="bg-size",G_=e=>e==="length",r9=e=>e==="number",a9=e=>e==="family-name",Y_=e=>e==="shadow",i9=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),a=Ht("font-weight"),o=Ht("tracking"),u=Ht("leading"),l=Ht("breakpoint"),d=Ht("container"),f=Ht("spacing"),h=Ht("radius"),g=Ht("shadow"),x=Ht("inset-shadow"),b=Ht("text-shadow"),v=Ht("drop-shadow"),w=Ht("blur"),_=Ht("perspective"),C=Ht("aspect"),N=Ht("ease"),R=Ht("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...L(),me,he],$=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],U=()=>[me,he,f],X=()=>[bo,"full","auto",...U()],ue=()=>[Oa,"none","subgrid",me,he],ae=()=>["auto",{span:["full",Oa,me,he]},Oa,me,he],oe=()=>[Oa,"auto",me,he],te=()=>["auto","min","max","fr",me,he],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...U()],F=()=>[bo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],Z=()=>[e,me,he],de=()=>[...L(),Lk,$k,{position:[me,he]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",t9,QL,{size:[me,he]}],G=()=>[_m,tl,gi],T=()=>["","none","full",h,me,he],ie=()=>["",Re,tl,gi],ve=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[Re,_m,Lk,$k],Ye=()=>["","none",w,me,he],$e=()=>["none",Re,me,he],At=()=>["none",Re,me,he],ln=()=>[Re,me,he],Zn=()=>[bo,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qr],breakpoint:[Qr],color:[GL],container:[Qr],"drop-shadow":[Qr],ease:["in","out","in-out"],font:[JL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qr],shadow:[Qr],spacing:["px",Re],text:[Qr],"text-shadow":[Qr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bo,he,me,C]}],container:["container"],columns:[{columns:[Re,he,me,d]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{start:X()}],end:[{end:X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[Oa,"auto",me,he]}],basis:[{basis:[bo,"full","auto",d,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,bo,"auto","initial","none",he]}],grow:[{grow:["",Re,me,he]}],shrink:[{shrink:["",Re,me,he]}],order:[{order:[Oa,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[d,"screen",...F()]}],"min-w":[{"min-w":[d,"screen","none",...F()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[l]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,tl,gi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,me,Tm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_m,he]}],"font-family":[{font:[e9,he,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,me,he]}],"line-clamp":[{"line-clamp":[Re,"none",me,Tm]}],leading:[{leading:[u,...U()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",me,gi]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Re,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oa,me,he],radial:["",me,he],conic:[Oa,me,he]},n9,WL]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,me,he]}],"outline-w":[{outline:["",Re,tl,gi]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",g,hc,fc]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",x,hc,fc]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Re,gi]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",b,hc,fc]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Re,me,he]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[me,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,he]}],filter:[{filter:["","none",me,he]}],blur:[{blur:Ye()}],brightness:[{brightness:[Re,me,he]}],contrast:[{contrast:[Re,me,he]}],"drop-shadow":[{"drop-shadow":["","none",v,hc,fc]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Re,me,he]}],"hue-rotate":[{"hue-rotate":[Re,me,he]}],invert:[{invert:["",Re,me,he]}],saturate:[{saturate:[Re,me,he]}],sepia:[{sepia:["",Re,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[Re,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Re,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Re,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Re,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Re,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",me,he]}],ease:[{ease:["linear","initial",N,me,he]}],delay:[{delay:[Re,me,he]}],animate:[{animate:["none",R,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,me,he]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:$e()}],"rotate-x":[{"rotate-x":$e()}],"rotate-y":[{"rotate-y":$e()}],"rotate-z":[{"rotate-z":$e()}],scale:[{scale:At()}],"scale-x":[{"scale-x":At()}],"scale-y":[{"scale-y":At()}],"scale-z":[{"scale-z":At()}],"scale-3d":["scale-3d"],skew:[{skew:ln()}],"skew-x":[{"skew-x":ln()}],"skew-y":[{"skew-y":ln()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Zn()}],"translate-x":[{"translate-x":Zn()}],"translate-y":[{"translate-y":Zn()}],"translate-z":[{"translate-z":Zn()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me,he]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Re,tl,gi,Tm]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Do=PL(i9);function Nt({label:e,error:t,helperText:n,className:a,...o}){return p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),p.jsx("input",{className:Do("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight placeholder-azure-text-secondary/50 dark:placeholder-matrix-secondary/50 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors",t&&"border-red-500 focus:border-red-500 focus:ring-red-500",a),...o}),n&&!t&&p.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&p.jsx("p",{className:"text-xs text-red-500",children:t})]})}function vo({label:e,options:t,error:n,helperText:a,className:o,...u}){return p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),p.jsx("select",{className:Do("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors appearance-none",n&&"border-red-500 focus:border-red-500 focus:ring-red-500",o),...u,children:t.map(l=>p.jsx("option",{value:l.value,className:"bg-azure-bg dark:bg-matrix-base",children:l.label},l.value))}),a&&!n&&p.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:a}),n&&p.jsx("p",{className:"text-xs text-red-500",children:n})]})}function fr({label:e,error:t,helperText:n,className:a,...o}){return p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),p.jsx("input",{type:"number",className:Do("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight placeholder-azure-text-secondary/50 dark:placeholder-matrix-secondary/50 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors",t&&"border-red-500 focus:border-red-500 focus:ring-red-500",a),...o}),n&&!t&&p.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&p.jsx("p",{className:"text-xs text-red-500",children:t})]})}function nl({label:e,checked:t,onChange:n,helperText:a,disabled:o}){return p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:Do("text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",o&&"opacity-50"),children:e}),a&&p.jsx("span",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:a})]}),p.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>!o&&n(!t),className:Do("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:ring-offset-2 focus:ring-offset-azure-bg dark:focus:ring-offset-black",t?"bg-azure-primary dark:bg-matrix-highlight":"bg-slate-300 dark:bg-matrix-primary",o&&"opacity-50 cursor-not-allowed"),children:p.jsx("span",{className:Do("inline-block h-4 w-4 transform rounded-full bg-white dark:bg-black transition-transform",t?"translate-x-6":"translate-x-1")})})]})}const Ra={fetchConfig:async()=>Ne.get("/config"),updateConfig:async e=>Ne.post("/config",e),getSatiConfig:async()=>Ne.get("/config/sati"),updateSatiConfig:async e=>Ne.post("/config/sati",e),deleteSatiConfig:async()=>Ne.delete("/config/sati"),getApocConfig:async()=>Ne.get("/config/apoc"),updateApocConfig:async e=>Ne.post("/config/apoc",e),deleteApocConfig:async()=>Ne.delete("/config/apoc"),getNeoConfig:async()=>Ne.get("/config/neo"),updateNeoConfig:async e=>Ne.post("/config/neo",e),deleteNeoConfig:async()=>Ne.delete("/config/neo")};function Q(e,t,n){function a(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:l,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);const h=l.prototype,g=Object.keys(h);for(let x=0;x<g.length;x++){const b=g[x];b in d||(d[b]=h[b].bind(d))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function l(d){var f;const h=n?.Parent?new u:this;a(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const g of h._zod.deferred)g();return h}return Object.defineProperty(l,"init",{value:a}),Object.defineProperty(l,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}let $o=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},X_=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};const K_={};function Ba(e){return K_}function J_(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,o])=>t.indexOf(+a)===-1).map(([a,o])=>o)}function Op(e,t){return typeof t=="bigint"?t.toString():t}function dd(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Fg(e){return e==null}function qg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function o9(e,t){const n=(e.toString().split(".")[1]||"").length,a=t.toString();let o=(a.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(a)){const f=a.match(/\d?e-(\d?)/);f?.[1]&&(o=Number.parseInt(f[1]))}const u=n>o?n:o,l=Number.parseInt(e.toFixed(u).replace(".","")),d=Number.parseInt(t.toFixed(u).replace(".",""));return l%d/10**u}const Uk=Symbol("evaluating");function Ge(e,t,n){let a;Object.defineProperty(e,t,{get(){if(a!==Uk)return a===void 0&&(a=Uk,a=n()),a},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Ci(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qa(...e){const t={};for(const n of e){const a=Object.getOwnPropertyDescriptors(n);Object.assign(t,a)}return Object.defineProperties({},t)}function Pk(e){return JSON.stringify(e)}function s9(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Q_="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Tl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const l9=dd(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Vo(e){if(Tl(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Tl(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function W_(e){return Vo(e)?{...e}:Array.isArray(e)?[...e]:e}const u9=new Set(["string","number","symbol"]);function Zo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ga(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function ke(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function c9(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const d9={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function f9(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=qa(e._zod.def,{get shape(){const l={};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&(l[d]=n.shape[d])}return Ci(this,"shape",l),l},checks:[]});return Ga(e,u)}function h9(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=qa(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&delete l[d]}return Ci(this,"shape",l),l},checks:[]});return Ga(e,u)}function m9(e,t){if(!Vo(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const u=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(u,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=qa(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return Ci(this,"shape",u),u}});return Ga(e,o)}function p9(e,t){if(!Vo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=qa(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Ci(this,"shape",a),a}});return Ga(e,n)}function g9(e,t){const n=qa(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return Ci(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:[]});return Ga(e,n)}function y9(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=qa(t._zod.def,{get shape(){const d=t._zod.def.shape,f={...d};if(n)for(const h in n){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(f[h]=e?new e({type:"optional",innerType:d[h]}):d[h])}else for(const h in d)f[h]=e?new e({type:"optional",innerType:d[h]}):d[h];return Ci(this,"shape",f),f},checks:[]});return Ga(t,l)}function x9(e,t,n){const a=qa(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(n)for(const l in n){if(!(l in u))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)u[l]=new e({type:"nonoptional",innerType:o[l]});return Ci(this,"shape",u),u}});return Ga(t,a)}function Eo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Co(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function mc(e){return typeof e=="string"?e:e?.message}function Ia(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const o=mc(e.inst?._zod.def?.error?.(e))??mc(t?.error?.(e))??mc(n.customError?.(e))??mc(n.localeError?.(e))??"Invalid input";a.message=o}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function Gg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function jl(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const e2=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Op,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},t2=Q("$ZodError",e2),n2=Q("$ZodError",e2,{Parent:Error});function b9(e,t=n=>n.message){const n={},a=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):a.push(t(o));return{formErrors:a,fieldErrors:n}}function v9(e,t=n=>n.message){const n={_errors:[]},a=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>a({issues:l}));else if(u.code==="invalid_key")a({issues:u.issues});else if(u.code==="invalid_element")a({issues:u.issues});else if(u.path.length===0)n._errors.push(t(u));else{let l=n,d=0;for(;d<u.path.length;){const f=u.path[d];d===u.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(t(u))):l[f]=l[f]||{_errors:[]},l=l[f],d++}}};return a(e),n}const Yg=e=>(t,n,a,o)=>{const u=a?Object.assign(a,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise)throw new $o;if(l.issues.length){const d=new(o?.Err??e)(l.issues.map(f=>Ia(f,u,Ba())));throw Q_(d,o?.callee),d}return l.value},Xg=e=>async(t,n,a,o)=>{const u=a?Object.assign(a,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){const d=new(o?.Err??e)(l.issues.map(f=>Ia(f,u,Ba())));throw Q_(d,o?.callee),d}return l.value},fd=e=>(t,n,a)=>{const o=a?{...a,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new $o;return u.issues.length?{success:!1,error:new(e??t2)(u.issues.map(l=>Ia(l,o,Ba())))}:{success:!0,data:u.value}},k9=fd(n2),hd=e=>async(t,n,a)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(l=>Ia(l,o,Ba())))}:{success:!0,data:u.value}},w9=hd(n2),S9=e=>(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Yg(e)(t,n,o)},z9=e=>(t,n,a)=>Yg(e)(t,n,a),_9=e=>async(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Xg(e)(t,n,o)},T9=e=>async(t,n,a)=>Xg(e)(t,n,a),j9=e=>(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return fd(e)(t,n,o)},E9=e=>(t,n,a)=>fd(e)(t,n,a),C9=e=>async(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return hd(e)(t,n,o)},N9=e=>async(t,n,a)=>hd(e)(t,n,a),A9=/^[cC][^\s-]{8,}$/,O9=/^[0-9a-z]+$/,R9=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,M9=/^[0-9a-vA-V]{20}$/,D9=/^[A-Za-z0-9]{27}$/,$9=/^[a-zA-Z0-9_-]{21}$/,L9=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,U9=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Vk=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,P9=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,V9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Z9(){return new RegExp(V9,"u")}const B9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,I9=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,H9=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,F9=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q9=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,r2=/^[A-Za-z0-9_-]*$/,G9=/^\+[1-9]\d{6,14}$/,a2="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Y9=new RegExp(`^${a2}$`);function i2(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function X9(e){return new RegExp(`^${i2(e)}$`)}function K9(e){const t=i2({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${n.join("|")})`;return new RegExp(`^${a2}T(?:${a})$`)}const J9=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Q9=/^-?\d+$/,o2=/^-?\d+(?:\.\d+)?$/,W9=/^(?:true|false)$/i,eU=/^[^A-Z]*$/,tU=/^[^a-z]*$/,Cn=Q("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),s2={number:"number",bigint:"bigint",object:"date"},l2=Q("$ZodCheckLessThan",(e,t)=>{Cn.init(e,t);const n=s2[typeof t.value];e._zod.onattach.push(a=>{const o=a._zod.bag,u=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<u&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),u2=Q("$ZodCheckGreaterThan",(e,t)=>{Cn.init(e,t);const n=s2[typeof t.value];e._zod.onattach.push(a=>{const o=a._zod.bag,u=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nU=Q("$ZodCheckMultipleOf",(e,t)=>{Cn.init(e,t),e._zod.onattach.push(n=>{var a;(a=n._zod.bag).multipleOf??(a.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):o9(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),rU=Q("$ZodCheckNumberFormat",(e,t)=>{Cn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),a=n?"int":"number",[o,u]=d9[t.format];e._zod.onattach.push(l=>{const d=l._zod.bag;d.format=t.format,d.minimum=o,d.maximum=u,n&&(d.pattern=Q9)}),e._zod.check=l=>{const d=l.value;if(n){if(!Number.isInteger(d)){l.issues.push({expected:a,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?l.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort}):l.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort});return}}d<o&&l.issues.push({origin:"number",input:d,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),d>u&&l.issues.push({origin:"number",input:d,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}}),aU=Q("$ZodCheckMaxLength",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Fg(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const o=a.value;if(o.length<=t.maximum)return;const l=Gg(o);a.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),iU=Q("$ZodCheckMinLength",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Fg(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const o=a.value;if(o.length>=t.minimum)return;const l=Gg(o);a.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oU=Q("$ZodCheckLengthEquals",(e,t)=>{var n;Cn.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Fg(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=a=>{const o=a.value,u=o.length;if(u===t.length)return;const l=Gg(o),d=u>t.length;a.issues.push({origin:l,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),md=Q("$ZodCheckStringFormat",(e,t)=>{var n,a;Cn.init(e,t),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),sU=Q("$ZodCheckRegex",(e,t)=>{md.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lU=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eU),md.init(e,t)}),uU=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tU),md.init(e,t)}),cU=Q("$ZodCheckIncludes",(e,t)=>{Cn.init(e,t);const n=Zo(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=a,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(a)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),dU=Q("$ZodCheckStartsWith",(e,t)=>{Cn.init(e,t);const n=new RegExp(`^${Zo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),fU=Q("$ZodCheckEndsWith",(e,t)=>{Cn.init(e,t);const n=new RegExp(`.*${Zo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),hU=Q("$ZodCheckOverwrite",(e,t)=>{Cn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});let mU=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const a=t.split(`
33
- `).filter(l=>l),o=Math.min(...a.map(l=>l.length-l.trimStart().length)),u=a.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of u)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new t(...n,o.join(`
34
- `))}};const pU={major:4,minor:3,patch:6},vt=Q("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pU;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const o of a)for(const u of o._zod.onattach)u(e);if(a.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,d,f)=>{let h=Eo(l),g;for(const x of d){if(x._zod.def.when){if(!x._zod.def.when(l))continue}else if(h)continue;const b=l.issues.length,v=x._zod.check(l);if(v instanceof Promise&&f?.async===!1)throw new $o;if(g||v instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await v,l.issues.length!==b&&(h||(h=Eo(l,b)))});else{if(l.issues.length===b)continue;h||(h=Eo(l,b))}}return g?g.then(()=>l):l},u=(l,d,f)=>{if(Eo(l))return l.aborted=!0,l;const h=o(d,a,f);if(h instanceof Promise){if(f.async===!1)throw new $o;return h.then(g=>e._zod.parse(g,f))}return e._zod.parse(h,f)};e._zod.run=(l,d)=>{if(d.skipChecks)return e._zod.parse(l,d);if(d.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(g=>u(g,l,d)):u(h,l,d)}const f=e._zod.parse(l,d);if(f instanceof Promise){if(d.async===!1)throw new $o;return f.then(h=>o(h,a,d))}return o(f,a,d)}}Ge(e,"~standard",()=>({validate:o=>{try{const u=k9(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return w9(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Kg=Q("$ZodString",(e,t)=>{vt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??J9(e._zod.bag),e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),yt=Q("$ZodStringFormat",(e,t)=>{md.init(e,t),Kg.init(e,t)}),gU=Q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=U9),yt.init(e,t)}),yU=Q("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Vk(a))}else t.pattern??(t.pattern=Vk());yt.init(e,t)}),xU=Q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=P9),yt.init(e,t)}),bU=Q("$ZodURL",(e,t)=>{yt.init(e,t),e._zod.check=n=>{try{const a=n.value.trim(),o=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),vU=Q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Z9()),yt.init(e,t)}),kU=Q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$9),yt.init(e,t)}),wU=Q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=A9),yt.init(e,t)}),SU=Q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=O9),yt.init(e,t)}),zU=Q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=R9),yt.init(e,t)}),_U=Q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=M9),yt.init(e,t)}),TU=Q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=D9),yt.init(e,t)}),jU=Q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=K9(t)),yt.init(e,t)}),EU=Q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Y9),yt.init(e,t)}),CU=Q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=X9(t)),yt.init(e,t)}),NU=Q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=L9),yt.init(e,t)}),AU=Q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=B9),yt.init(e,t),e._zod.bag.format="ipv4"}),OU=Q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=I9),yt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),RU=Q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=H9),yt.init(e,t)}),MU=Q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=F9),yt.init(e,t),e._zod.check=n=>{const a=n.value.split("/");try{if(a.length!==2)throw new Error;const[o,u]=a;if(!u)throw new Error;const l=Number(u);if(`${l}`!==u)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function c2(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const DU=Q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=q9),yt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{c2(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function $U(e){if(!r2.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return c2(n)}const LU=Q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=r2),yt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{$U(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),UU=Q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=G9),yt.init(e,t)});function PU(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[a]=n;if(!a)return!1;const o=JSON.parse(atob(a));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const VU=Q("$ZodJWT",(e,t)=>{yt.init(e,t),e._zod.check=n=>{PU(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),d2=Q("$ZodNumber",(e,t)=>{vt.init(e,t),e._zod.pattern=e._zod.bag.pattern??o2,e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...u?{received:u}:{}}),n}}),ZU=Q("$ZodNumberFormat",(e,t)=>{rU.init(e,t),d2.init(e,t)}),BU=Q("$ZodBoolean",(e,t)=>{vt.init(e,t),e._zod.pattern=W9,e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),IU=Q("$ZodUnknown",(e,t)=>{vt.init(e,t),e._zod.parse=n=>n}),HU=Q("$ZodNever",(e,t)=>{vt.init(e,t),e._zod.parse=(n,a)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Zk(e,t,n){e.issues.length&&t.issues.push(...Co(n,e.issues)),t.value[n]=e.value}const FU=Q("$ZodArray",(e,t)=>{vt.init(e,t),e._zod.parse=(n,a)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const u=[];for(let l=0;l<o.length;l++){const d=o[l],f=t.element._zod.run({value:d,issues:[]},a);f instanceof Promise?u.push(f.then(h=>Zk(h,n,l))):Zk(f,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Fc(e,t,n,a,o){if(e.issues.length){if(o&&!(n in a))return;t.issues.push(...Co(n,e.issues))}e.value===void 0?n in a&&(t.value[n]=void 0):t.value[n]=e.value}function f2(e){const t=Object.keys(e.shape);for(const a of t)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=c9(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function h2(e,t,n,a,o,u){const l=[],d=o.keySet,f=o.catchall._zod,h=f.def.type,g=f.optout==="optional";for(const x in t){if(d.has(x))continue;if(h==="never"){l.push(x);continue}const b=f.run({value:t[x],issues:[]},a);b instanceof Promise?e.push(b.then(v=>Fc(v,n,x,t,g))):Fc(b,n,x,t,g)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const qU=Q("$ZodObject",(e,t)=>{if(vt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const d=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...d};return Object.defineProperty(t,"shape",{value:f}),f}})}const a=dd(()=>f2(t));Ge(e._zod,"propValues",()=>{const d=t.shape,f={};for(const h in d){const g=d[h]._zod;if(g.values){f[h]??(f[h]=new Set);for(const x of g.values)f[h].add(x)}}return f});const o=Tl,u=t.catchall;let l;e._zod.parse=(d,f)=>{l??(l=a.value);const h=d.value;if(!o(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};const g=[],x=l.shape;for(const b of l.keys){const v=x[b],w=v._zod.optout==="optional",_=v._zod.run({value:h[b],issues:[]},f);_ instanceof Promise?g.push(_.then(C=>Fc(C,d,b,h,w))):Fc(_,d,b,h,w)}return u?h2(g,h,d,f,a.value,e):g.length?Promise.all(g).then(()=>d):d}}),GU=Q("$ZodObjectJIT",(e,t)=>{qU.init(e,t);const n=e._zod.parse,a=dd(()=>f2(t)),o=b=>{const v=new mU(["shape","payload","ctx"]),w=a.value,_=j=>{const L=Pk(j);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};v.write("const input = payload.value;");const C=Object.create(null);let N=0;for(const j of w.keys)C[j]=`key_${N++}`;v.write("const newResult = {};");for(const j of w.keys){const L=C[j],P=Pk(j),Y=b[j]?._zod?.optout==="optional";v.write(`const ${L} = ${_(j)};`),Y?v.write(`
35
- if (${L}.issues.length) {
36
- if (${P} in input) {
37
- payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
38
- ...iss,
39
- path: iss.path ? [${P}, ...iss.path] : [${P}]
40
- })));
41
- }
42
- }
43
-
44
- if (${L}.value === undefined) {
45
- if (${P} in input) {
46
- newResult[${P}] = undefined;
47
- }
48
- } else {
49
- newResult[${P}] = ${L}.value;
50
- }
51
-
52
- `):v.write(`
53
- if (${L}.issues.length) {
54
- payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
55
- ...iss,
56
- path: iss.path ? [${P}, ...iss.path] : [${P}]
57
- })));
58
- }
59
-
60
- if (${L}.value === undefined) {
61
- if (${P} in input) {
62
- newResult[${P}] = undefined;
63
- }
64
- } else {
65
- newResult[${P}] = ${L}.value;
66
- }
67
-
68
- `)}v.write("payload.value = newResult;"),v.write("return payload;");const R=v.compile();return(j,L)=>R(b,j,L)};let u;const l=Tl,d=!K_.jitless,h=d&&l9.value,g=t.catchall;let x;e._zod.parse=(b,v)=>{x??(x=a.value);const w=b.value;return l(w)?d&&h&&v?.async===!1&&v.jitless!==!0?(u||(u=o(t.shape)),b=u(b,v),g?h2([],w,b,v,x,e):b):n(b,v):(b.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),b)}});function Bk(e,t,n,a){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!Eo(u));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(u=>u.issues.map(l=>Ia(l,a,Ba())))}),t)}const m2=Q("$ZodUnion",(e,t)=>{vt.init(e,t),Ge(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ge(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ge(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Ge(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>qg(u.source)).join("|")})$`)}});const n=t.options.length===1,a=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(n)return a(o,u);let l=!1;const d=[];for(const f of t.options){const h=f._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)d.push(h),l=!0;else{if(h.issues.length===0)return h;d.push(h)}}return l?Promise.all(d).then(f=>Bk(f,o,e,u)):Bk(d,o,e,u)}}),YU=Q("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,m2.init(e,t);const n=e._zod.parse;Ge(e._zod,"propValues",()=>{const o={};for(const u of t.options){const l=u._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const[d,f]of Object.entries(l)){o[d]||(o[d]=new Set);for(const h of f)o[d].add(h)}}return o});const a=dd(()=>{const o=t.options,u=new Map;for(const l of o){const d=l._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const f of d){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,l)}}return u});e._zod.parse=(o,u)=>{const l=o.value;if(!Tl(l))return o.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),o;const d=a.value.get(l?.[t.discriminator]);return d?d._zod.run(o,u):t.unionFallback?n(o,u):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),o)}}),XU=Q("$ZodIntersection",(e,t)=>{vt.init(e,t),e._zod.parse=(n,a)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},a),l=t.right._zod.run({value:o,issues:[]},a);return u instanceof Promise||l instanceof Promise?Promise.all([u,l]).then(([f,h])=>Ik(n,f,h)):Ik(n,u,l)}});function Rp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Vo(e)&&Vo(t)){const n=Object.keys(t),a=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of a){const l=Rp(e[u],t[u]);if(!l.valid)return{valid:!1,mergeErrorPath:[u,...l.mergeErrorPath]};o[u]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let a=0;a<e.length;a++){const o=e[a],u=t[a],l=Rp(o,u);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ik(e,t,n){const a=new Map;let o;for(const d of t.issues)if(d.code==="unrecognized_keys"){o??(o=d);for(const f of d.keys)a.has(f)||a.set(f,{}),a.get(f).l=!0}else e.issues.push(d);for(const d of n.issues)if(d.code==="unrecognized_keys")for(const f of d.keys)a.has(f)||a.set(f,{}),a.get(f).r=!0;else e.issues.push(d);const u=[...a].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(u.length&&o&&e.issues.push({...o,keys:u}),Eo(e))return e;const l=Rp(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const KU=Q("$ZodRecord",(e,t)=>{vt.init(e,t),e._zod.parse=(n,a)=>{const o=n.value;if(!Vo(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const u=[],l=t.keyType._zod.values;if(l){n.value={};const d=new Set;for(const h of l)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);const g=t.valueType._zod.run({value:o[h],issues:[]},a);g instanceof Promise?u.push(g.then(x=>{x.issues.length&&n.issues.push(...Co(h,x.issues)),n.value[h]=x.value})):(g.issues.length&&n.issues.push(...Co(h,g.issues)),n.value[h]=g.value)}let f;for(const h in o)d.has(h)||(f=f??[],f.push(h));f&&f.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:f})}else{n.value={};for(const d of Reflect.ownKeys(o)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},a);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&o2.test(d)&&f.issues.length){const x=t.keyType._zod.run({value:Number(d),issues:[]},a);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(f=x)}if(f.issues.length){t.mode==="loose"?n.value[d]=o[d]:n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(x=>Ia(x,a,Ba())),input:d,path:[d],inst:e});continue}const g=t.valueType._zod.run({value:o[d],issues:[]},a);g instanceof Promise?u.push(g.then(x=>{x.issues.length&&n.issues.push(...Co(d,x.issues)),n.value[f.value]=x.value})):(g.issues.length&&n.issues.push(...Co(d,g.issues)),n.value[f.value]=g.value)}}return u.length?Promise.all(u).then(()=>n):n}}),JU=Q("$ZodEnum",(e,t)=>{vt.init(e,t);const n=J_(t.entries),a=new Set(n);e._zod.values=a,e._zod.pattern=new RegExp(`^(${n.filter(o=>u9.has(typeof o)).map(o=>typeof o=="string"?Zo(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const l=o.value;return a.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),QU=Q("$ZodLiteral",(e,t)=>{if(vt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(a=>typeof a=="string"?Zo(a):a?Zo(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,o)=>{const u=a.value;return n.has(u)||a.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),a}}),WU=Q("$ZodTransform",(e,t)=>{vt.init(e,t),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new X_(e.constructor.name);const o=t.transform(n.value,n);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new $o;return n.value=o,n}});function Hk(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const p2=Q("$ZodOptional",(e,t)=>{vt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ge(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${qg(n.source)})?$`):void 0}),e._zod.parse=(n,a)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>Hk(u,n.value)):Hk(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,a)}}),eP=Q("$ZodExactOptional",(e,t)=>{p2.init(e,t),Ge(e._zod,"values",()=>t.innerType._zod.values),Ge(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,a)=>t.innerType._zod.run(n,a)}),tP=Q("$ZodNullable",(e,t)=>{vt.init(e,t),Ge(e._zod,"optin",()=>t.innerType._zod.optin),Ge(e._zod,"optout",()=>t.innerType._zod.optout),Ge(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${qg(n.source)}|null)$`):void 0}),Ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,a)=>n.value===null?n:t.innerType._zod.run(n,a)}),nP=Q("$ZodDefault",(e,t)=>{vt.init(e,t),e._zod.optin="optional",Ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>{if(a.direction==="backward")return t.innerType._zod.run(n,a);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>Fk(u,t)):Fk(o,t)}});function Fk(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const rP=Q("$ZodPrefault",(e,t)=>{vt.init(e,t),e._zod.optin="optional",Ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>(a.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,a))}),aP=Q("$ZodNonOptional",(e,t)=>{vt.init(e,t),Ge(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(a=>a!==void 0)):void 0}),e._zod.parse=(n,a)=>{const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>qk(u,e)):qk(o,e)}});function qk(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const iP=Q("$ZodCatch",(e,t)=>{vt.init(e,t),Ge(e._zod,"optin",()=>t.innerType._zod.optin),Ge(e._zod,"optout",()=>t.innerType._zod.optout),Ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>{if(a.direction==="backward")return t.innerType._zod.run(n,a);const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>(n.value=u.value,u.issues.length&&(n.value=t.catchValue({...n,error:{issues:u.issues.map(l=>Ia(l,a,Ba()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>Ia(u,a,Ba()))},input:n.value}),n.issues=[]),n)}}),oP=Q("$ZodPipe",(e,t)=>{vt.init(e,t),Ge(e._zod,"values",()=>t.in._zod.values),Ge(e._zod,"optin",()=>t.in._zod.optin),Ge(e._zod,"optout",()=>t.out._zod.optout),Ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,a)=>{if(a.direction==="backward"){const u=t.out._zod.run(n,a);return u instanceof Promise?u.then(l=>pc(l,t.in,a)):pc(u,t.in,a)}const o=t.in._zod.run(n,a);return o instanceof Promise?o.then(u=>pc(u,t.out,a)):pc(o,t.out,a)}});function pc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const sP=Q("$ZodReadonly",(e,t)=>{vt.init(e,t),Ge(e._zod,"propValues",()=>t.innerType._zod.propValues),Ge(e._zod,"values",()=>t.innerType._zod.values),Ge(e._zod,"optin",()=>t.innerType?._zod?.optin),Ge(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,a)=>{if(a.direction==="backward")return t.innerType._zod.run(n,a);const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(Gk):Gk(o)}});function Gk(e){return e.value=Object.freeze(e.value),e}const lP=Q("$ZodCustom",(e,t)=>{Cn.init(e,t),vt.init(e,t),e._zod.parse=(n,a)=>n,e._zod.check=n=>{const a=n.value,o=t.fn(a);if(o instanceof Promise)return o.then(u=>Yk(u,n,a,e));Yk(o,n,a,e)}});function Yk(e,t,n,a){if(!e){const o={code:"custom",input:n,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(o.params=a._zod.def.params),t.issues.push(jl(o))}}var Xk;let uP=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const a=n[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const a={...this.get(n)??{}};delete a.id;const o={...a,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function cP(){return new uP}(Xk=globalThis).__zod_globalRegistry??(Xk.__zod_globalRegistry=cP());const ol=globalThis.__zod_globalRegistry;function dP(e,t){return new e({type:"string",...ke(t)})}function fP(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ke(t)})}function Kk(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ke(t)})}function hP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ke(t)})}function mP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ke(t)})}function pP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ke(t)})}function gP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ke(t)})}function yP(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ke(t)})}function xP(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ke(t)})}function bP(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ke(t)})}function vP(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ke(t)})}function kP(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ke(t)})}function wP(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ke(t)})}function SP(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ke(t)})}function zP(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ke(t)})}function _P(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ke(t)})}function TP(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ke(t)})}function jP(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ke(t)})}function EP(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ke(t)})}function CP(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ke(t)})}function NP(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ke(t)})}function AP(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ke(t)})}function OP(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ke(t)})}function RP(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ke(t)})}function MP(e,t){return new e({type:"string",format:"date",check:"string_format",...ke(t)})}function DP(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ke(t)})}function $P(e,t){return new e({type:"string",format:"duration",check:"string_format",...ke(t)})}function LP(e,t){return new e({type:"number",checks:[],...ke(t)})}function UP(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ke(t)})}function PP(e,t){return new e({type:"boolean",...ke(t)})}function VP(e){return new e({type:"unknown"})}function ZP(e,t){return new e({type:"never",...ke(t)})}function Jk(e,t){return new l2({check:"less_than",...ke(t),value:e,inclusive:!1})}function jm(e,t){return new l2({check:"less_than",...ke(t),value:e,inclusive:!0})}function Qk(e,t){return new u2({check:"greater_than",...ke(t),value:e,inclusive:!1})}function Em(e,t){return new u2({check:"greater_than",...ke(t),value:e,inclusive:!0})}function Wk(e,t){return new nU({check:"multiple_of",...ke(t),value:e})}function g2(e,t){return new aU({check:"max_length",...ke(t),maximum:e})}function qc(e,t){return new iU({check:"min_length",...ke(t),minimum:e})}function y2(e,t){return new oU({check:"length_equals",...ke(t),length:e})}function BP(e,t){return new sU({check:"string_format",format:"regex",...ke(t),pattern:e})}function IP(e){return new lU({check:"string_format",format:"lowercase",...ke(e)})}function HP(e){return new uU({check:"string_format",format:"uppercase",...ke(e)})}function FP(e,t){return new cU({check:"string_format",format:"includes",...ke(t),includes:e})}function qP(e,t){return new dU({check:"string_format",format:"starts_with",...ke(t),prefix:e})}function GP(e,t){return new fU({check:"string_format",format:"ends_with",...ke(t),suffix:e})}function Wo(e){return new hU({check:"overwrite",tx:e})}function YP(e){return Wo(t=>t.normalize(e))}function XP(){return Wo(e=>e.trim())}function KP(){return Wo(e=>e.toLowerCase())}function JP(){return Wo(e=>e.toUpperCase())}function QP(){return Wo(e=>s9(e))}function WP(e,t,n){return new e({type:"array",element:t,...ke(n)})}function e8(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ke(n)})}function t8(e){const t=n8(n=>(n.addIssue=a=>{if(typeof a=="string")n.issues.push(jl(a,n.value,t._zod.def));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(jl(o))}},e(n.value,n)));return t}function n8(e,t){const n=new Cn({check:"custom",...ke(t)});return n._zod.check=e,n}function x2(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ol,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ut(e,t,n={path:[],schemaPath:[]}){var a;const o=e._zod.def,u=t.seen.get(e);if(u)return u.count++,n.schemaPath.includes(e)&&(u.cycle=n.path),u.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const d=e._zod.toJSONSchema?.();if(d)l.schema=d;else{const g={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,g);else{const b=l.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,b,g)}const x=e._zod.parent;x&&(l.ref||(l.ref=x),Ut(x,t,g),t.seen.get(x).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(l.schema,f),t.io==="input"&&hn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((a=l.schema).default??(a.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function b2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const l of e.seen.entries()){const d=e.metadataRegistry.get(l[0])?.id;if(d){const f=a.get(d);if(f&&f!==l[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(d,l[0])}}const o=l=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const x=e.external.registry.get(l[0])?.id,b=e.external.uri??(w=>w);if(x)return{ref:b(x)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${b("__shared")}#/${d}/${v}`}}if(l[1]===n)return{ref:"#"};const h=`#/${d}/`,g=l[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:h+g}},u=l=>{if(l[1].schema.$ref)return;const d=l[1],{ref:f,defId:h}=o(l);d.def={...d.schema},h&&(d.defId=h);const g=d.schema;for(const x in g)delete g[x];g.$ref=f};if(e.cycles==="throw")for(const l of e.seen.entries()){const d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
69
-
70
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const d=l[1];if(t===l[0]){u(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){u(l);continue}}if(e.metadataRegistry.get(l[0])?.id){u(l);continue}if(d.cycle){u(l);continue}if(d.count>1&&e.reused==="ref"){u(l);continue}}}function v2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=l=>{const d=e.seen.get(l);if(d.ref===null)return;const f=d.def??d.schema,h={...f},g=d.ref;if(d.ref=null,g){a(g);const b=e.seen.get(g),v=b.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(v)):Object.assign(f,v),Object.assign(f,h),l._zod.parent===g)for(const _ in f)_==="$ref"||_==="allOf"||_ in h||delete f[_];if(v.$ref&&b.def)for(const _ in f)_==="$ref"||_==="allOf"||_ in b.def&&JSON.stringify(f[_])===JSON.stringify(b.def[_])&&delete f[_]}const x=l._zod.parent;if(x&&x!==g){a(x);const b=e.seen.get(x);if(b?.schema.$ref&&(f.$ref=b.schema.$ref,b.def))for(const v in f)v==="$ref"||v==="allOf"||v in b.def&&JSON.stringify(f[v])===JSON.stringify(b.def[v])&&delete f[v]}e.override({zodSchema:l,jsonSchema:f,path:d.path??[]})};for(const l of[...e.seen.entries()].reverse())a(l[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const u=e.external?.defs??{};for(const l of e.seen.entries()){const d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Gc(t,"input",e.processors),output:Gc(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function hn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return hn(a.element,n);if(a.type==="set")return hn(a.valueType,n);if(a.type==="lazy")return hn(a.getter(),n);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return hn(a.innerType,n);if(a.type==="intersection")return hn(a.left,n)||hn(a.right,n);if(a.type==="record"||a.type==="map")return hn(a.keyType,n)||hn(a.valueType,n);if(a.type==="pipe")return hn(a.in,n)||hn(a.out,n);if(a.type==="object"){for(const o in a.shape)if(hn(a.shape[o],n))return!0;return!1}if(a.type==="union"){for(const o of a.options)if(hn(o,n))return!0;return!1}if(a.type==="tuple"){for(const o of a.items)if(hn(o,n))return!0;return!!(a.rest&&hn(a.rest,n))}return!1}const r8=(e,t={})=>n=>{const a=x2({...n,processors:t});return Ut(e,a),b2(a,e),v2(a,e)},Gc=(e,t,n={})=>a=>{const{libraryOptions:o,target:u}=a??{},l=x2({...o??{},target:u,io:t,processors:n});return Ut(e,l),b2(l,e),v2(l,e)},a8={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},i8=(e,t,n,a)=>{const o=n;o.type="string";const{minimum:u,maximum:l,format:d,patterns:f,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof l=="number"&&(o.maxLength=l),d&&(o.format=a8[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),h&&(o.contentEncoding=h),f&&f.size>0){const g=[...f];g.length===1?o.pattern=g[0].source:g.length>1&&(o.allOf=[...g.map(x=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},o8=(e,t,n,a)=>{const o=n,{minimum:u,maximum:l,format:d,multipleOf:f,exclusiveMaximum:h,exclusiveMinimum:g}=e._zod.bag;typeof d=="string"&&d.includes("int")?o.type="integer":o.type="number",typeof g=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=g,o.exclusiveMinimum=!0):o.exclusiveMinimum=g),typeof u=="number"&&(o.minimum=u,typeof g=="number"&&t.target!=="draft-04"&&(g>=u?delete o.minimum:delete o.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=h,o.exclusiveMaximum=!0):o.exclusiveMaximum=h),typeof l=="number"&&(o.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof f=="number"&&(o.multipleOf=f)},s8=(e,t,n,a)=>{n.type="boolean"},l8=(e,t,n,a)=>{n.not={}},u8=(e,t,n,a)=>{},c8=(e,t,n,a)=>{const o=e._zod.def,u=J_(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},d8=(e,t,n,a)=>{const o=e._zod.def,u=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(l))}else u.push(l);if(u.length!==0)if(u.length===1){const l=u[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),u.every(l=>typeof l=="boolean")&&(n.type="boolean"),u.every(l=>l===null)&&(n.type="null"),n.enum=u},f8=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},h8=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},m8=(e,t,n,a)=>{const o=n,u=e._zod.def,{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof d=="number"&&(o.maxItems=d),o.type="array",o.items=Ut(u.element,t,{...a,path:[...a.path,"items"]})},p8=(e,t,n,a)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const l=u.shape;for(const h in l)o.properties[h]=Ut(l[h],t,{...a,path:[...a.path,"properties",h]});const d=new Set(Object.keys(l)),f=new Set([...d].filter(h=>{const g=u.shape[h]._zod;return t.io==="input"?g.optin===void 0:g.optout===void 0}));f.size>0&&(o.required=Array.from(f)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=Ut(u.catchall,t,{...a,path:[...a.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},g8=(e,t,n,a)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((d,f)=>Ut(d,t,{...a,path:[...a.path,u?"oneOf":"anyOf",f]}));u?n.oneOf=l:n.anyOf=l},y8=(e,t,n,a)=>{const o=e._zod.def,u=Ut(o.left,t,{...a,path:[...a.path,"allOf",0]}),l=Ut(o.right,t,{...a,path:[...a.path,"allOf",1]}),d=h=>"allOf"in h&&Object.keys(h).length===1,f=[...d(u)?u.allOf:[u],...d(l)?l.allOf:[l]];n.allOf=f},x8=(e,t,n,a)=>{const o=n,u=e._zod.def;o.type="object";const l=u.keyType,f=l._zod.bag?.patterns;if(u.mode==="loose"&&f&&f.size>0){const g=Ut(u.valueType,t,{...a,path:[...a.path,"patternProperties","*"]});o.patternProperties={};for(const x of f)o.patternProperties[x.source]=g}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Ut(u.keyType,t,{...a,path:[...a.path,"propertyNames"]})),o.additionalProperties=Ut(u.valueType,t,{...a,path:[...a.path,"additionalProperties"]});const h=l._zod.values;if(h){const g=[...h].filter(x=>typeof x=="string"||typeof x=="number");g.length>0&&(o.required=g)}},b8=(e,t,n,a)=>{const o=e._zod.def,u=Ut(o.innerType,t,a),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},v8=(e,t,n,a)=>{const o=e._zod.def;Ut(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},k8=(e,t,n,a)=>{const o=e._zod.def;Ut(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},w8=(e,t,n,a)=>{const o=e._zod.def;Ut(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},S8=(e,t,n,a)=>{const o=e._zod.def;Ut(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},z8=(e,t,n,a)=>{const o=e._zod.def,u=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ut(u,t,a);const l=t.seen.get(e);l.ref=u},_8=(e,t,n,a)=>{const o=e._zod.def;Ut(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},k2=(e,t,n,a)=>{const o=e._zod.def;Ut(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},T8=Q("ZodISODateTime",(e,t)=>{jU.init(e,t),wt.init(e,t)});function j8(e){return RP(T8,e)}const E8=Q("ZodISODate",(e,t)=>{EU.init(e,t),wt.init(e,t)});function C8(e){return MP(E8,e)}const N8=Q("ZodISOTime",(e,t)=>{CU.init(e,t),wt.init(e,t)});function A8(e){return DP(N8,e)}const O8=Q("ZodISODuration",(e,t)=>{NU.init(e,t),wt.init(e,t)});function R8(e){return $P(O8,e)}const M8=(e,t)=>{t2.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>v9(e,n)},flatten:{value:n=>b9(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Op,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Op,2)}},isEmpty:{get(){return e.issues.length===0}}})},ir=Q("ZodError",M8,{Parent:Error}),D8=Yg(ir),$8=Xg(ir),L8=fd(ir),U8=hd(ir),P8=S9(ir),V8=z9(ir),Z8=_9(ir),B8=T9(ir),I8=j9(ir),H8=E9(ir),F8=C9(ir),q8=N9(ir),kt=Q("ZodType",(e,t)=>(vt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Gc(e,"input"),output:Gc(e,"output")}}),e.toJSONSchema=r8(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(qa(t,{checks:[...t.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(n,a)=>Ga(e,n,a),e.brand=()=>e,e.register=((n,a)=>(n.add(e,a),e)),e.parse=(n,a)=>D8(e,n,a,{callee:e.parse}),e.safeParse=(n,a)=>L8(e,n,a),e.parseAsync=async(n,a)=>$8(e,n,a,{callee:e.parseAsync}),e.safeParseAsync=async(n,a)=>U8(e,n,a),e.spa=e.safeParseAsync,e.encode=(n,a)=>P8(e,n,a),e.decode=(n,a)=>V8(e,n,a),e.encodeAsync=async(n,a)=>Z8(e,n,a),e.decodeAsync=async(n,a)=>B8(e,n,a),e.safeEncode=(n,a)=>I8(e,n,a),e.safeDecode=(n,a)=>H8(e,n,a),e.safeEncodeAsync=async(n,a)=>F8(e,n,a),e.safeDecodeAsync=async(n,a)=>q8(e,n,a),e.refine=(n,a)=>e.check(VV(n,a)),e.superRefine=n=>e.check(ZV(n)),e.overwrite=n=>e.check(Wo(n)),e.optional=()=>aw(e),e.exactOptional=()=>jV(e),e.nullable=()=>iw(e),e.nullish=()=>aw(iw(e)),e.nonoptional=n=>RV(e,n),e.array=()=>El(e),e.or=n=>_2([e,n]),e.and=n=>kV(e,n),e.transform=n=>ow(e,_V(n)),e.default=n=>NV(e,n),e.prefault=n=>OV(e,n),e.catch=n=>DV(e,n),e.pipe=n=>ow(e,n),e.readonly=()=>UV(e),e.describe=n=>{const a=e.clone();return ol.add(a,{description:n}),a},Object.defineProperty(e,"description",{get(){return ol.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ol.get(e);const a=e.clone();return ol.add(a,n[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),w2=Q("_ZodString",(e,t)=>{Kg.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>i8(e,a,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...a)=>e.check(BP(...a)),e.includes=(...a)=>e.check(FP(...a)),e.startsWith=(...a)=>e.check(qP(...a)),e.endsWith=(...a)=>e.check(GP(...a)),e.min=(...a)=>e.check(qc(...a)),e.max=(...a)=>e.check(g2(...a)),e.length=(...a)=>e.check(y2(...a)),e.nonempty=(...a)=>e.check(qc(1,...a)),e.lowercase=a=>e.check(IP(a)),e.uppercase=a=>e.check(HP(a)),e.trim=()=>e.check(XP()),e.normalize=(...a)=>e.check(YP(...a)),e.toLowerCase=()=>e.check(KP()),e.toUpperCase=()=>e.check(JP()),e.slugify=()=>e.check(QP())}),G8=Q("ZodString",(e,t)=>{Kg.init(e,t),w2.init(e,t),e.email=n=>e.check(fP(Y8,n)),e.url=n=>e.check(yP(X8,n)),e.jwt=n=>e.check(OP(cV,n)),e.emoji=n=>e.check(xP(K8,n)),e.guid=n=>e.check(Kk(ew,n)),e.uuid=n=>e.check(hP(gc,n)),e.uuidv4=n=>e.check(mP(gc,n)),e.uuidv6=n=>e.check(pP(gc,n)),e.uuidv7=n=>e.check(gP(gc,n)),e.nanoid=n=>e.check(bP(J8,n)),e.guid=n=>e.check(Kk(ew,n)),e.cuid=n=>e.check(vP(Q8,n)),e.cuid2=n=>e.check(kP(W8,n)),e.ulid=n=>e.check(wP(eV,n)),e.base64=n=>e.check(CP(sV,n)),e.base64url=n=>e.check(NP(lV,n)),e.xid=n=>e.check(SP(tV,n)),e.ksuid=n=>e.check(zP(nV,n)),e.ipv4=n=>e.check(_P(rV,n)),e.ipv6=n=>e.check(TP(aV,n)),e.cidrv4=n=>e.check(jP(iV,n)),e.cidrv6=n=>e.check(EP(oV,n)),e.e164=n=>e.check(AP(uV,n)),e.datetime=n=>e.check(j8(n)),e.date=n=>e.check(C8(n)),e.time=n=>e.check(A8(n)),e.duration=n=>e.check(R8(n))});function nt(e){return dP(G8,e)}const wt=Q("ZodStringFormat",(e,t)=>{yt.init(e,t),w2.init(e,t)}),Y8=Q("ZodEmail",(e,t)=>{xU.init(e,t),wt.init(e,t)}),ew=Q("ZodGUID",(e,t)=>{gU.init(e,t),wt.init(e,t)}),gc=Q("ZodUUID",(e,t)=>{yU.init(e,t),wt.init(e,t)}),X8=Q("ZodURL",(e,t)=>{bU.init(e,t),wt.init(e,t)}),K8=Q("ZodEmoji",(e,t)=>{vU.init(e,t),wt.init(e,t)}),J8=Q("ZodNanoID",(e,t)=>{kU.init(e,t),wt.init(e,t)}),Q8=Q("ZodCUID",(e,t)=>{wU.init(e,t),wt.init(e,t)}),W8=Q("ZodCUID2",(e,t)=>{SU.init(e,t),wt.init(e,t)}),eV=Q("ZodULID",(e,t)=>{zU.init(e,t),wt.init(e,t)}),tV=Q("ZodXID",(e,t)=>{_U.init(e,t),wt.init(e,t)}),nV=Q("ZodKSUID",(e,t)=>{TU.init(e,t),wt.init(e,t)}),rV=Q("ZodIPv4",(e,t)=>{AU.init(e,t),wt.init(e,t)}),aV=Q("ZodIPv6",(e,t)=>{OU.init(e,t),wt.init(e,t)}),iV=Q("ZodCIDRv4",(e,t)=>{RU.init(e,t),wt.init(e,t)}),oV=Q("ZodCIDRv6",(e,t)=>{MU.init(e,t),wt.init(e,t)}),sV=Q("ZodBase64",(e,t)=>{DU.init(e,t),wt.init(e,t)}),lV=Q("ZodBase64URL",(e,t)=>{LU.init(e,t),wt.init(e,t)}),uV=Q("ZodE164",(e,t)=>{UU.init(e,t),wt.init(e,t)}),cV=Q("ZodJWT",(e,t)=>{VU.init(e,t),wt.init(e,t)}),S2=Q("ZodNumber",(e,t)=>{d2.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>o8(e,a,o),e.gt=(a,o)=>e.check(Qk(a,o)),e.gte=(a,o)=>e.check(Em(a,o)),e.min=(a,o)=>e.check(Em(a,o)),e.lt=(a,o)=>e.check(Jk(a,o)),e.lte=(a,o)=>e.check(jm(a,o)),e.max=(a,o)=>e.check(jm(a,o)),e.int=a=>e.check(tw(a)),e.safe=a=>e.check(tw(a)),e.positive=a=>e.check(Qk(0,a)),e.nonnegative=a=>e.check(Em(0,a)),e.negative=a=>e.check(Jk(0,a)),e.nonpositive=a=>e.check(jm(0,a)),e.multipleOf=(a,o)=>e.check(Wk(a,o)),e.step=(a,o)=>e.check(Wk(a,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ua(e){return LP(S2,e)}const dV=Q("ZodNumberFormat",(e,t)=>{ZU.init(e,t),S2.init(e,t)});function tw(e){return UP(dV,e)}const fV=Q("ZodBoolean",(e,t)=>{BU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>s8(e,n,a)});function $a(e){return PP(fV,e)}const hV=Q("ZodUnknown",(e,t)=>{IU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>u8()});function nw(){return VP(hV)}const mV=Q("ZodNever",(e,t)=>{HU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>l8(e,n,a)});function pV(e){return ZP(mV,e)}const gV=Q("ZodArray",(e,t)=>{FU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>m8(e,n,a,o),e.element=t.element,e.min=(n,a)=>e.check(qc(n,a)),e.nonempty=n=>e.check(qc(1,n)),e.max=(n,a)=>e.check(g2(n,a)),e.length=(n,a)=>e.check(y2(n,a)),e.unwrap=()=>e.element});function El(e,t){return WP(gV,e,t)}const yV=Q("ZodObject",(e,t)=>{GU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>p8(e,n,a,o),Ge(e,"shape",()=>t.shape),e.keyof=()=>pd(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nw()}),e.loose=()=>e.clone({...e._zod.def,catchall:nw()}),e.strict=()=>e.clone({...e._zod.def,catchall:pV()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>m9(e,n),e.safeExtend=n=>p9(e,n),e.merge=n=>g9(e,n),e.pick=n=>f9(e,n),e.omit=n=>h9(e,n),e.partial=(...n)=>y9(T2,e,n[0]),e.required=(...n)=>x9(j2,e,n[0])});function pn(e,t){const n={type:"object",shape:e??{},...ke(t)};return new yV(n)}const z2=Q("ZodUnion",(e,t)=>{m2.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>g8(e,n,a,o),e.options=t.options});function _2(e,t){return new z2({type:"union",options:e,...ke(t)})}const xV=Q("ZodDiscriminatedUnion",(e,t)=>{z2.init(e,t),YU.init(e,t)});function bV(e,t,n){return new xV({type:"union",options:t,discriminator:e,...ke(n)})}const vV=Q("ZodIntersection",(e,t)=>{XU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>y8(e,n,a,o)});function kV(e,t){return new vV({type:"intersection",left:e,right:t})}const wV=Q("ZodRecord",(e,t)=>{KU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>x8(e,n,a,o),e.keyType=t.keyType,e.valueType=t.valueType});function Oc(e,t,n){return new wV({type:"record",keyType:e,valueType:t,...ke(n)})}const Mp=Q("ZodEnum",(e,t)=>{JU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>c8(e,a,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(a,o)=>{const u={};for(const l of a)if(n.has(l))u[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Mp({...t,checks:[],...ke(o),entries:u})},e.exclude=(a,o)=>{const u={...t.entries};for(const l of a)if(n.has(l))delete u[l];else throw new Error(`Key ${l} not found in enum`);return new Mp({...t,checks:[],...ke(o),entries:u})}});function pd(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new Mp({type:"enum",entries:n,...ke(t)})}const SV=Q("ZodLiteral",(e,t)=>{QU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>d8(e,n,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function rw(e,t){return new SV({type:"literal",values:Array.isArray(e)?e:[e],...ke(t)})}const zV=Q("ZodTransform",(e,t)=>{WU.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>h8(e,n),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new X_(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(jl(u,n.value,t));else{const l=u;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(jl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function _V(e){return new zV({type:"transform",transform:e})}const T2=Q("ZodOptional",(e,t)=>{p2.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>k2(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function aw(e){return new T2({type:"optional",innerType:e})}const TV=Q("ZodExactOptional",(e,t)=>{eP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>k2(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function jV(e){return new TV({type:"optional",innerType:e})}const EV=Q("ZodNullable",(e,t)=>{tP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>b8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function iw(e){return new EV({type:"nullable",innerType:e})}const CV=Q("ZodDefault",(e,t)=>{nP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>k8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function NV(e,t){return new CV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():W_(t)}})}const AV=Q("ZodPrefault",(e,t)=>{rP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>w8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function OV(e,t){return new AV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():W_(t)}})}const j2=Q("ZodNonOptional",(e,t)=>{aP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>v8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function RV(e,t){return new j2({type:"nonoptional",innerType:e,...ke(t)})}const MV=Q("ZodCatch",(e,t)=>{iP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>S8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function DV(e,t){return new MV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const $V=Q("ZodPipe",(e,t)=>{oP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>z8(e,n,a,o),e.in=t.in,e.out=t.out});function ow(e,t){return new $V({type:"pipe",in:e,out:t})}const LV=Q("ZodReadonly",(e,t)=>{sP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>_8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function UV(e){return new LV({type:"readonly",innerType:e})}const PV=Q("ZodCustom",(e,t)=>{lP.init(e,t),kt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>f8(e,n)});function VV(e,t={}){return e8(PV,e,t)}function ZV(e){return t8(e)}const st={agent:{name:"morpheus",personality:"helpful_dev"},logging:{enabled:!0,level:"info",retention:"14d"},audio:{provider:"google",model:"gemini-2.5-flash-lite",enabled:!0,maxDurationSeconds:300,supportedMimeTypes:["audio/ogg","audio/mp3","audio/mpeg","audio/wav"]},memory:{limit:100},runtime:{async_tasks:{enabled:!0}},llm:{provider:"openai",model:"gpt-4",temperature:.7,context_window:100},channels:{telegram:{enabled:!1,allowedUsers:[]},discord:{enabled:!1}},ui:{enabled:!0,port:3333}},BV=pn({provider:pd(["google","openai","openrouter","ollama"]).default(st.audio.provider),model:nt().min(1).default(st.audio.model),enabled:$a().default(st.audio.enabled),apiKey:nt().optional(),base_url:nt().optional(),maxDurationSeconds:Ua().default(st.audio.maxDurationSeconds),supportedMimeTypes:El(nt()).default(st.audio.supportedMimeTypes)}),gd=pn({provider:pd(["openai","anthropic","openrouter","ollama","gemini"]).default(st.llm.provider),model:nt().min(1).default(st.llm.model),temperature:Ua().min(0).max(1).default(st.llm.temperature),max_tokens:Ua().int().positive().optional(),api_key:nt().optional(),base_url:nt().optional(),context_window:Ua().int().positive().optional()}),IV=gd.extend({memory_limit:Ua().int().positive().optional(),enabled_archived_sessions:$a().default(!0)}),HV=gd.extend({working_dir:nt().optional(),timeout_ms:Ua().int().positive().optional()}),FV=gd,qV=pn({telegram_notify_all:$a().optional()}).optional(),GV=pn({agent:pn({name:nt().default(st.agent.name),personality:nt().default(st.agent.personality)}).default(st.agent),llm:gd.default(st.llm),sati:IV.optional(),neo:FV.optional(),apoc:HV.optional(),webhooks:qV,audio:BV.default(st.audio),memory:pn({limit:Ua().int().positive().optional()}).default(st.memory),runtime:pn({async_tasks:pn({enabled:$a().default(st.runtime?.async_tasks.enabled)}).default(st.runtime?.async_tasks??{enabled:!0})}).optional(),channels:pn({telegram:pn({enabled:$a().default(!1),token:nt().optional(),allowedUsers:El(nt()).default([])}).default(st.channels.telegram),discord:pn({enabled:$a().default(!1),token:nt().optional()}).default(st.channels.discord)}).default(st.channels),ui:pn({enabled:$a().default(st.ui.enabled),port:Ua().default(st.ui.port)}).default(st.ui),logging:pn({enabled:$a().default(st.logging.enabled),level:pd(["debug","info","warn","error"]).default(st.logging.level),retention:nt().default(st.logging.retention)}).default(st.logging)}),YV=bV("transport",[pn({transport:rw("stdio"),command:nt().min(1,"Command is required for stdio transport"),args:El(nt()).optional().default([]),env:Oc(nt(),nt()).optional().default({}),_comment:nt().optional()}),pn({transport:rw("http"),url:nt().url("Valid URL is required for http transport"),headers:Oc(nt(),nt()).optional().default({}),args:El(nt()).optional().default([]),env:Oc(nt(),nt()).optional().default({}),_comment:nt().optional()})]);Oc(nt(),_2([YV,nt()]));function ne(e,t,n){function a(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:l,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);const h=l.prototype,g=Object.keys(h);for(let x=0;x<g.length;x++){const b=g[x];b in d||(d[b]=h[b].bind(d))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function l(d){var f;const h=n?.Parent?new u:this;a(h,d),(f=h._zod).deferred??(f.deferred=[]);for(const g of h._zod.deferred)g();return h}return Object.defineProperty(l,"init",{value:a}),Object.defineProperty(l,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Lo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class E2 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const C2={};function Ti(e){return C2}function N2(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,o])=>t.indexOf(+a)===-1).map(([a,o])=>o)}function Dp(e,t){return typeof t=="bigint"?t.toString():t}function Jg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Qg(e){return e==null}function Wg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const sw=Symbol("evaluating");function Je(e,t,n){let a;Object.defineProperty(e,t,{get(){if(a!==sw)return a===void 0&&(a=sw,a=n()),a},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Ni(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ya(...e){const t={};for(const n of e){const a=Object.getOwnPropertyDescriptors(n);Object.assign(t,a)}return Object.defineProperties({},t)}function lw(e){return JSON.stringify(e)}function XV(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const A2="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Yc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const KV=Jg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Cl(e){if(Yc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Yc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function O2(e){return Cl(e)?{...e}:Array.isArray(e)?[...e]:e}const JV=new Set(["string","number","symbol"]);function Bo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xa(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function je(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function QV(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function WV(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Ya(e._zod.def,{get shape(){const l={};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&(l[d]=n.shape[d])}return Ni(this,"shape",l),l},checks:[]});return Xa(e,u)}function eZ(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Ya(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&delete l[d]}return Ni(this,"shape",l),l},checks:[]});return Xa(e,u)}function tZ(e,t){if(!Cl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const u=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(u,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Ya(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return Ni(this,"shape",u),u}});return Xa(e,o)}function nZ(e,t){if(!Cl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ya(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Ni(this,"shape",a),a}});return Xa(e,n)}function rZ(e,t){const n=Ya(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return Ni(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:[]});return Xa(e,n)}function aZ(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Ya(t._zod.def,{get shape(){const d=t._zod.def.shape,f={...d};if(n)for(const h in n){if(!(h in d))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(f[h]=e?new e({type:"optional",innerType:d[h]}):d[h])}else for(const h in d)f[h]=e?new e({type:"optional",innerType:d[h]}):d[h];return Ni(this,"shape",f),f},checks:[]});return Xa(t,l)}function iZ(e,t,n){const a=Ya(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(n)for(const l in n){if(!(l in u))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)u[l]=new e({type:"nonoptional",innerType:o[l]});return Ni(this,"shape",u),u}});return Xa(t,a)}function No(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function R2(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function yc(e){return typeof e=="string"?e:e?.message}function ji(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const o=yc(e.inst?._zod.def?.error?.(e))??yc(t?.error?.(e))??yc(n.customError?.(e))??yc(n.localeError?.(e))??"Invalid input";a.message=o}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function ey(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Nl(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const M2=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Dp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},D2=ne("$ZodError",M2),$2=ne("$ZodError",M2,{Parent:Error});function oZ(e,t=n=>n.message){const n={},a=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):a.push(t(o));return{formErrors:a,fieldErrors:n}}function sZ(e,t=n=>n.message){const n={_errors:[]},a=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>a({issues:l}));else if(u.code==="invalid_key")a({issues:u.issues});else if(u.code==="invalid_element")a({issues:u.issues});else if(u.path.length===0)n._errors.push(t(u));else{let l=n,d=0;for(;d<u.path.length;){const f=u.path[d];d===u.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(t(u))):l[f]=l[f]||{_errors:[]},l=l[f],d++}}};return a(e),n}const ty=e=>(t,n,a,o)=>{const u=a?Object.assign(a,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise)throw new Lo;if(l.issues.length){const d=new(o?.Err??e)(l.issues.map(f=>ji(f,u,Ti())));throw A2(d,o?.callee),d}return l.value},ny=e=>async(t,n,a,o)=>{const u=a?Object.assign(a,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){const d=new(o?.Err??e)(l.issues.map(f=>ji(f,u,Ti())));throw A2(d,o?.callee),d}return l.value},yd=e=>(t,n,a)=>{const o=a?{...a,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new Lo;return u.issues.length?{success:!1,error:new(e??D2)(u.issues.map(l=>ji(l,o,Ti())))}:{success:!0,data:u.value}},lZ=yd($2),xd=e=>async(t,n,a)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(l=>ji(l,o,Ti())))}:{success:!0,data:u.value}},uZ=xd($2),cZ=e=>(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return ty(e)(t,n,o)},dZ=e=>(t,n,a)=>ty(e)(t,n,a),fZ=e=>async(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return ny(e)(t,n,o)},hZ=e=>async(t,n,a)=>ny(e)(t,n,a),mZ=e=>(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return yd(e)(t,n,o)},pZ=e=>(t,n,a)=>yd(e)(t,n,a),gZ=e=>async(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return xd(e)(t,n,o)},yZ=e=>async(t,n,a)=>xd(e)(t,n,a),xZ=/^[cC][^\s-]{8,}$/,bZ=/^[0-9a-z]+$/,vZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kZ=/^[0-9a-vA-V]{20}$/,wZ=/^[A-Za-z0-9]{27}$/,SZ=/^[a-zA-Z0-9_-]{21}$/,zZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_Z=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,uw=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,TZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jZ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function EZ(){return new RegExp(jZ,"u")}const CZ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,NZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,AZ=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,OZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,RZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,L2=/^[A-Za-z0-9_-]*$/,MZ=/^\+[1-9]\d{6,14}$/,U2="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",DZ=new RegExp(`^${U2}$`);function P2(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $Z(e){return new RegExp(`^${P2(e)}$`)}function LZ(e){const t=P2({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${n.join("|")})`;return new RegExp(`^${U2}T(?:${a})$`)}const UZ=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},PZ=/^[^A-Z]*$/,VZ=/^[^a-z]*$/,Or=ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ZZ=ne("$ZodCheckMaxLength",(e,t)=>{var n;Or.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Qg(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const o=a.value;if(o.length<=t.maximum)return;const l=ey(o);a.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),BZ=ne("$ZodCheckMinLength",(e,t)=>{var n;Or.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Qg(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const o=a.value;if(o.length>=t.minimum)return;const l=ey(o);a.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),IZ=ne("$ZodCheckLengthEquals",(e,t)=>{var n;Or.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Qg(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=a=>{const o=a.value,u=o.length;if(u===t.length)return;const l=ey(o),d=u>t.length;a.issues.push({origin:l,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),bd=ne("$ZodCheckStringFormat",(e,t)=>{var n,a;Or.init(e,t),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),HZ=ne("$ZodCheckRegex",(e,t)=>{bd.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),FZ=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=PZ),bd.init(e,t)}),qZ=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=VZ),bd.init(e,t)}),GZ=ne("$ZodCheckIncludes",(e,t)=>{Or.init(e,t);const n=Bo(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=a,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(a)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),YZ=ne("$ZodCheckStartsWith",(e,t)=>{Or.init(e,t);const n=new RegExp(`^${Bo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),XZ=ne("$ZodCheckEndsWith",(e,t)=>{Or.init(e,t);const n=new RegExp(`.*${Bo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),KZ=ne("$ZodCheckOverwrite",(e,t)=>{Or.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class JZ{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const a=t.split(`
71
- `).filter(l=>l),o=Math.min(...a.map(l=>l.length-l.trimStart().length)),u=a.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of u)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new t(...n,o.join(`
72
- `))}}const QZ={major:4,minor:3,patch:6},Pt=ne("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=QZ;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const o of a)for(const u of o._zod.onattach)u(e);if(a.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,d,f)=>{let h=No(l),g;for(const x of d){if(x._zod.def.when){if(!x._zod.def.when(l))continue}else if(h)continue;const b=l.issues.length,v=x._zod.check(l);if(v instanceof Promise&&f?.async===!1)throw new Lo;if(g||v instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await v,l.issues.length!==b&&(h||(h=No(l,b)))});else{if(l.issues.length===b)continue;h||(h=No(l,b))}}return g?g.then(()=>l):l},u=(l,d,f)=>{if(No(l))return l.aborted=!0,l;const h=o(d,a,f);if(h instanceof Promise){if(f.async===!1)throw new Lo;return h.then(g=>e._zod.parse(g,f))}return e._zod.parse(h,f)};e._zod.run=(l,d)=>{if(d.skipChecks)return e._zod.parse(l,d);if(d.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(g=>u(g,l,d)):u(h,l,d)}const f=e._zod.parse(l,d);if(f instanceof Promise){if(d.async===!1)throw new Lo;return f.then(h=>o(h,a,d))}return o(f,a,d)}}Je(e,"~standard",()=>({validate:o=>{try{const u=lZ(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return uZ(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),ry=ne("$ZodString",(e,t)=>{Pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??UZ(e._zod.bag),e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),xt=ne("$ZodStringFormat",(e,t)=>{bd.init(e,t),ry.init(e,t)}),WZ=ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=_Z),xt.init(e,t)}),eB=ne("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=uw(a))}else t.pattern??(t.pattern=uw());xt.init(e,t)}),tB=ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=TZ),xt.init(e,t)}),nB=ne("$ZodURL",(e,t)=>{xt.init(e,t),e._zod.check=n=>{try{const a=n.value.trim(),o=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),rB=ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=EZ()),xt.init(e,t)}),aB=ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=SZ),xt.init(e,t)}),iB=ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=xZ),xt.init(e,t)}),oB=ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=bZ),xt.init(e,t)}),sB=ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=vZ),xt.init(e,t)}),lB=ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=kZ),xt.init(e,t)}),uB=ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=wZ),xt.init(e,t)}),cB=ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=LZ(t)),xt.init(e,t)}),dB=ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=DZ),xt.init(e,t)}),fB=ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=$Z(t)),xt.init(e,t)}),hB=ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=zZ),xt.init(e,t)}),mB=ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=CZ),xt.init(e,t),e._zod.bag.format="ipv4"}),pB=ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=NZ),xt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),gB=ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=AZ),xt.init(e,t)}),yB=ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=OZ),xt.init(e,t),e._zod.check=n=>{const a=n.value.split("/");try{if(a.length!==2)throw new Error;const[o,u]=a;if(!u)throw new Error;const l=Number(u);if(`${l}`!==u)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function V2(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const xB=ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=RZ),xt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{V2(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function bB(e){if(!L2.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return V2(n)}const vB=ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=L2),xt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{bB(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),kB=ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=MZ),xt.init(e,t)});function wB(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[a]=n;if(!a)return!1;const o=JSON.parse(atob(a));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const SB=ne("$ZodJWT",(e,t)=>{xt.init(e,t),e._zod.check=n=>{wB(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),zB=ne("$ZodUnknown",(e,t)=>{Pt.init(e,t),e._zod.parse=n=>n}),_B=ne("$ZodNever",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,a)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function cw(e,t,n){e.issues.length&&t.issues.push(...R2(n,e.issues)),t.value[n]=e.value}const TB=ne("$ZodArray",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,a)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const u=[];for(let l=0;l<o.length;l++){const d=o[l],f=t.element._zod.run({value:d,issues:[]},a);f instanceof Promise?u.push(f.then(h=>cw(h,n,l))):cw(f,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Xc(e,t,n,a,o){if(e.issues.length){if(o&&!(n in a))return;t.issues.push(...R2(n,e.issues))}e.value===void 0?n in a&&(t.value[n]=void 0):t.value[n]=e.value}function Z2(e){const t=Object.keys(e.shape);for(const a of t)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=QV(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function B2(e,t,n,a,o,u){const l=[],d=o.keySet,f=o.catchall._zod,h=f.def.type,g=f.optout==="optional";for(const x in t){if(d.has(x))continue;if(h==="never"){l.push(x);continue}const b=f.run({value:t[x],issues:[]},a);b instanceof Promise?e.push(b.then(v=>Xc(v,n,x,t,g))):Xc(b,n,x,t,g)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const jB=ne("$ZodObject",(e,t)=>{if(Pt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const d=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...d};return Object.defineProperty(t,"shape",{value:f}),f}})}const a=Jg(()=>Z2(t));Je(e._zod,"propValues",()=>{const d=t.shape,f={};for(const h in d){const g=d[h]._zod;if(g.values){f[h]??(f[h]=new Set);for(const x of g.values)f[h].add(x)}}return f});const o=Yc,u=t.catchall;let l;e._zod.parse=(d,f)=>{l??(l=a.value);const h=d.value;if(!o(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};const g=[],x=l.shape;for(const b of l.keys){const v=x[b],w=v._zod.optout==="optional",_=v._zod.run({value:h[b],issues:[]},f);_ instanceof Promise?g.push(_.then(C=>Xc(C,d,b,h,w))):Xc(_,d,b,h,w)}return u?B2(g,h,d,f,a.value,e):g.length?Promise.all(g).then(()=>d):d}}),EB=ne("$ZodObjectJIT",(e,t)=>{jB.init(e,t);const n=e._zod.parse,a=Jg(()=>Z2(t)),o=b=>{const v=new JZ(["shape","payload","ctx"]),w=a.value,_=j=>{const L=lw(j);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};v.write("const input = payload.value;");const C=Object.create(null);let N=0;for(const j of w.keys)C[j]=`key_${N++}`;v.write("const newResult = {};");for(const j of w.keys){const L=C[j],P=lw(j),Y=b[j]?._zod?.optout==="optional";v.write(`const ${L} = ${_(j)};`),Y?v.write(`
73
- if (${L}.issues.length) {
74
- if (${P} in input) {
75
- payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
76
- ...iss,
77
- path: iss.path ? [${P}, ...iss.path] : [${P}]
78
- })));
79
- }
80
- }
81
-
82
- if (${L}.value === undefined) {
83
- if (${P} in input) {
84
- newResult[${P}] = undefined;
85
- }
86
- } else {
87
- newResult[${P}] = ${L}.value;
88
- }
89
-
90
- `):v.write(`
91
- if (${L}.issues.length) {
92
- payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
93
- ...iss,
94
- path: iss.path ? [${P}, ...iss.path] : [${P}]
95
- })));
96
- }
97
-
98
- if (${L}.value === undefined) {
99
- if (${P} in input) {
100
- newResult[${P}] = undefined;
101
- }
102
- } else {
103
- newResult[${P}] = ${L}.value;
104
- }
105
-
106
- `)}v.write("payload.value = newResult;"),v.write("return payload;");const R=v.compile();return(j,L)=>R(b,j,L)};let u;const l=Yc,d=!C2.jitless,h=d&&KV.value,g=t.catchall;let x;e._zod.parse=(b,v)=>{x??(x=a.value);const w=b.value;return l(w)?d&&h&&v?.async===!1&&v.jitless!==!0?(u||(u=o(t.shape)),b=u(b,v),g?B2([],w,b,v,x,e):b):n(b,v):(b.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),b)}});function dw(e,t,n,a){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!No(u));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(u=>u.issues.map(l=>ji(l,a,Ti())))}),t)}const CB=ne("$ZodUnion",(e,t)=>{Pt.init(e,t),Je(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Je(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Je(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Je(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>Wg(u.source)).join("|")})$`)}});const n=t.options.length===1,a=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(n)return a(o,u);let l=!1;const d=[];for(const f of t.options){const h=f._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)d.push(h),l=!0;else{if(h.issues.length===0)return h;d.push(h)}}return l?Promise.all(d).then(f=>dw(f,o,e,u)):dw(d,o,e,u)}}),NB=ne("$ZodIntersection",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,a)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},a),l=t.right._zod.run({value:o,issues:[]},a);return u instanceof Promise||l instanceof Promise?Promise.all([u,l]).then(([f,h])=>fw(n,f,h)):fw(n,u,l)}});function $p(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Cl(e)&&Cl(t)){const n=Object.keys(t),a=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of a){const l=$p(e[u],t[u]);if(!l.valid)return{valid:!1,mergeErrorPath:[u,...l.mergeErrorPath]};o[u]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let a=0;a<e.length;a++){const o=e[a],u=t[a],l=$p(o,u);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fw(e,t,n){const a=new Map;let o;for(const d of t.issues)if(d.code==="unrecognized_keys"){o??(o=d);for(const f of d.keys)a.has(f)||a.set(f,{}),a.get(f).l=!0}else e.issues.push(d);for(const d of n.issues)if(d.code==="unrecognized_keys")for(const f of d.keys)a.has(f)||a.set(f,{}),a.get(f).r=!0;else e.issues.push(d);const u=[...a].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(u.length&&o&&e.issues.push({...o,keys:u}),No(e))return e;const l=$p(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const AB=ne("$ZodEnum",(e,t)=>{Pt.init(e,t);const n=N2(t.entries),a=new Set(n);e._zod.values=a,e._zod.pattern=new RegExp(`^(${n.filter(o=>JV.has(typeof o)).map(o=>typeof o=="string"?Bo(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const l=o.value;return a.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),OB=ne("$ZodLiteral",(e,t)=>{if(Pt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(a=>typeof a=="string"?Bo(a):a?Bo(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,o)=>{const u=a.value;return n.has(u)||a.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),a}}),RB=ne("$ZodTransform",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new E2(e.constructor.name);const o=t.transform(n.value,n);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new Lo;return n.value=o,n}});function hw(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const I2=ne("$ZodOptional",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Je(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Je(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Wg(n.source)})?$`):void 0}),e._zod.parse=(n,a)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>hw(u,n.value)):hw(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,a)}}),MB=ne("$ZodExactOptional",(e,t)=>{I2.init(e,t),Je(e._zod,"values",()=>t.innerType._zod.values),Je(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,a)=>t.innerType._zod.run(n,a)}),DB=ne("$ZodNullable",(e,t)=>{Pt.init(e,t),Je(e._zod,"optin",()=>t.innerType._zod.optin),Je(e._zod,"optout",()=>t.innerType._zod.optout),Je(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Wg(n.source)}|null)$`):void 0}),Je(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,a)=>n.value===null?n:t.innerType._zod.run(n,a)}),$B=ne("$ZodDefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",Je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>{if(a.direction==="backward")return t.innerType._zod.run(n,a);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>mw(u,t)):mw(o,t)}});function mw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const LB=ne("$ZodPrefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",Je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>(a.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,a))}),UB=ne("$ZodNonOptional",(e,t)=>{Pt.init(e,t),Je(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(a=>a!==void 0)):void 0}),e._zod.parse=(n,a)=>{const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>pw(u,e)):pw(o,e)}});function pw(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const PB=ne("$ZodCatch",(e,t)=>{Pt.init(e,t),Je(e._zod,"optin",()=>t.innerType._zod.optin),Je(e._zod,"optout",()=>t.innerType._zod.optout),Je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>{if(a.direction==="backward")return t.innerType._zod.run(n,a);const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>(n.value=u.value,u.issues.length&&(n.value=t.catchValue({...n,error:{issues:u.issues.map(l=>ji(l,a,Ti()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>ji(u,a,Ti()))},input:n.value}),n.issues=[]),n)}}),VB=ne("$ZodPipe",(e,t)=>{Pt.init(e,t),Je(e._zod,"values",()=>t.in._zod.values),Je(e._zod,"optin",()=>t.in._zod.optin),Je(e._zod,"optout",()=>t.out._zod.optout),Je(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,a)=>{if(a.direction==="backward"){const u=t.out._zod.run(n,a);return u instanceof Promise?u.then(l=>xc(l,t.in,a)):xc(u,t.in,a)}const o=t.in._zod.run(n,a);return o instanceof Promise?o.then(u=>xc(u,t.out,a)):xc(o,t.out,a)}});function xc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const ZB=ne("$ZodReadonly",(e,t)=>{Pt.init(e,t),Je(e._zod,"propValues",()=>t.innerType._zod.propValues),Je(e._zod,"values",()=>t.innerType._zod.values),Je(e._zod,"optin",()=>t.innerType?._zod?.optin),Je(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,a)=>{if(a.direction==="backward")return t.innerType._zod.run(n,a);const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(gw):gw(o)}});function gw(e){return e.value=Object.freeze(e.value),e}const BB=ne("$ZodCustom",(e,t)=>{Or.init(e,t),Pt.init(e,t),e._zod.parse=(n,a)=>n,e._zod.check=n=>{const a=n.value,o=t.fn(a);if(o instanceof Promise)return o.then(u=>yw(u,n,a,e));yw(o,n,a,e)}});function yw(e,t,n,a){if(!e){const o={code:"custom",input:n,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(o.params=a._zod.def.params),t.issues.push(Nl(o))}}var xw;class IB{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const a=n[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const a={...this.get(n)??{}};delete a.id;const o={...a,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function HB(){return new IB}(xw=globalThis).__zod_globalRegistry??(xw.__zod_globalRegistry=HB());const sl=globalThis.__zod_globalRegistry;function FB(e,t){return new e({type:"string",...je(t)})}function qB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...je(t)})}function bw(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...je(t)})}function GB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...je(t)})}function YB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...je(t)})}function XB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...je(t)})}function KB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...je(t)})}function JB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...je(t)})}function QB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...je(t)})}function WB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...je(t)})}function eI(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...je(t)})}function tI(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...je(t)})}function nI(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...je(t)})}function rI(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...je(t)})}function aI(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...je(t)})}function iI(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...je(t)})}function oI(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...je(t)})}function sI(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...je(t)})}function lI(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...je(t)})}function uI(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...je(t)})}function cI(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...je(t)})}function dI(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...je(t)})}function fI(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...je(t)})}function hI(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...je(t)})}function mI(e,t){return new e({type:"string",format:"date",check:"string_format",...je(t)})}function pI(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...je(t)})}function gI(e,t){return new e({type:"string",format:"duration",check:"string_format",...je(t)})}function yI(e){return new e({type:"unknown"})}function xI(e,t){return new e({type:"never",...je(t)})}function H2(e,t){return new ZZ({check:"max_length",...je(t),maximum:e})}function Kc(e,t){return new BZ({check:"min_length",...je(t),minimum:e})}function F2(e,t){return new IZ({check:"length_equals",...je(t),length:e})}function bI(e,t){return new HZ({check:"string_format",format:"regex",...je(t),pattern:e})}function vI(e){return new FZ({check:"string_format",format:"lowercase",...je(e)})}function kI(e){return new qZ({check:"string_format",format:"uppercase",...je(e)})}function wI(e,t){return new GZ({check:"string_format",format:"includes",...je(t),includes:e})}function SI(e,t){return new YZ({check:"string_format",format:"starts_with",...je(t),prefix:e})}function zI(e,t){return new XZ({check:"string_format",format:"ends_with",...je(t),suffix:e})}function es(e){return new KZ({check:"overwrite",tx:e})}function _I(e){return es(t=>t.normalize(e))}function TI(){return es(e=>e.trim())}function jI(){return es(e=>e.toLowerCase())}function EI(){return es(e=>e.toUpperCase())}function CI(){return es(e=>XV(e))}function NI(e,t,n){return new e({type:"array",element:t,...je(n)})}function AI(e,t,n){return new e({type:"custom",check:"custom",fn:t,...je(n)})}function OI(e){const t=RI(n=>(n.addIssue=a=>{if(typeof a=="string")n.issues.push(Nl(a,n.value,t._zod.def));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Nl(o))}},e(n.value,n)));return t}function RI(e,t){const n=new Or({check:"custom",...je(t)});return n._zod.check=e,n}function q2(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??sl,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function tn(e,t,n={path:[],schemaPath:[]}){var a;const o=e._zod.def,u=t.seen.get(e);if(u)return u.count++,n.schemaPath.includes(e)&&(u.cycle=n.path),u.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const d=e._zod.toJSONSchema?.();if(d)l.schema=d;else{const g={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,g);else{const b=l.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,b,g)}const x=e._zod.parent;x&&(l.ref||(l.ref=x),tn(x,t,g),t.seen.get(x).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(l.schema,f),t.io==="input"&&mn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((a=l.schema).default??(a.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function G2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const l of e.seen.entries()){const d=e.metadataRegistry.get(l[0])?.id;if(d){const f=a.get(d);if(f&&f!==l[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(d,l[0])}}const o=l=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const x=e.external.registry.get(l[0])?.id,b=e.external.uri??(w=>w);if(x)return{ref:b(x)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${b("__shared")}#/${d}/${v}`}}if(l[1]===n)return{ref:"#"};const h=`#/${d}/`,g=l[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:h+g}},u=l=>{if(l[1].schema.$ref)return;const d=l[1],{ref:f,defId:h}=o(l);d.def={...d.schema},h&&(d.defId=h);const g=d.schema;for(const x in g)delete g[x];g.$ref=f};if(e.cycles==="throw")for(const l of e.seen.entries()){const d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
107
-
108
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const d=l[1];if(t===l[0]){u(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){u(l);continue}}if(e.metadataRegistry.get(l[0])?.id){u(l);continue}if(d.cycle){u(l);continue}if(d.count>1&&e.reused==="ref"){u(l);continue}}}function Y2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=l=>{const d=e.seen.get(l);if(d.ref===null)return;const f=d.def??d.schema,h={...f},g=d.ref;if(d.ref=null,g){a(g);const b=e.seen.get(g),v=b.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(v)):Object.assign(f,v),Object.assign(f,h),l._zod.parent===g)for(const _ in f)_==="$ref"||_==="allOf"||_ in h||delete f[_];if(v.$ref&&b.def)for(const _ in f)_==="$ref"||_==="allOf"||_ in b.def&&JSON.stringify(f[_])===JSON.stringify(b.def[_])&&delete f[_]}const x=l._zod.parent;if(x&&x!==g){a(x);const b=e.seen.get(x);if(b?.schema.$ref&&(f.$ref=b.schema.$ref,b.def))for(const v in f)v==="$ref"||v==="allOf"||v in b.def&&JSON.stringify(f[v])===JSON.stringify(b.def[v])&&delete f[v]}e.override({zodSchema:l,jsonSchema:f,path:d.path??[]})};for(const l of[...e.seen.entries()].reverse())a(l[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const u=e.external?.defs??{};for(const l of e.seen.entries()){const d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Jc(t,"input",e.processors),output:Jc(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function mn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return mn(a.element,n);if(a.type==="set")return mn(a.valueType,n);if(a.type==="lazy")return mn(a.getter(),n);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return mn(a.innerType,n);if(a.type==="intersection")return mn(a.left,n)||mn(a.right,n);if(a.type==="record"||a.type==="map")return mn(a.keyType,n)||mn(a.valueType,n);if(a.type==="pipe")return mn(a.in,n)||mn(a.out,n);if(a.type==="object"){for(const o in a.shape)if(mn(a.shape[o],n))return!0;return!1}if(a.type==="union"){for(const o of a.options)if(mn(o,n))return!0;return!1}if(a.type==="tuple"){for(const o of a.items)if(mn(o,n))return!0;return!!(a.rest&&mn(a.rest,n))}return!1}const MI=(e,t={})=>n=>{const a=q2({...n,processors:t});return tn(e,a),G2(a,e),Y2(a,e)},Jc=(e,t,n={})=>a=>{const{libraryOptions:o,target:u}=a??{},l=q2({...o??{},target:u,io:t,processors:n});return tn(e,l),G2(l,e),Y2(l,e)},DI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$I=(e,t,n,a)=>{const o=n;o.type="string";const{minimum:u,maximum:l,format:d,patterns:f,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof l=="number"&&(o.maxLength=l),d&&(o.format=DI[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),h&&(o.contentEncoding=h),f&&f.size>0){const g=[...f];g.length===1?o.pattern=g[0].source:g.length>1&&(o.allOf=[...g.map(x=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},LI=(e,t,n,a)=>{n.not={}},UI=(e,t,n,a)=>{},PI=(e,t,n,a)=>{const o=e._zod.def,u=N2(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},VI=(e,t,n,a)=>{const o=e._zod.def,u=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(l))}else u.push(l);if(u.length!==0)if(u.length===1){const l=u[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),u.every(l=>typeof l=="boolean")&&(n.type="boolean"),u.every(l=>l===null)&&(n.type="null"),n.enum=u},ZI=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},BI=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},II=(e,t,n,a)=>{const o=n,u=e._zod.def,{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof d=="number"&&(o.maxItems=d),o.type="array",o.items=tn(u.element,t,{...a,path:[...a.path,"items"]})},HI=(e,t,n,a)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const l=u.shape;for(const h in l)o.properties[h]=tn(l[h],t,{...a,path:[...a.path,"properties",h]});const d=new Set(Object.keys(l)),f=new Set([...d].filter(h=>{const g=u.shape[h]._zod;return t.io==="input"?g.optin===void 0:g.optout===void 0}));f.size>0&&(o.required=Array.from(f)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=tn(u.catchall,t,{...a,path:[...a.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},FI=(e,t,n,a)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((d,f)=>tn(d,t,{...a,path:[...a.path,u?"oneOf":"anyOf",f]}));u?n.oneOf=l:n.anyOf=l},qI=(e,t,n,a)=>{const o=e._zod.def,u=tn(o.left,t,{...a,path:[...a.path,"allOf",0]}),l=tn(o.right,t,{...a,path:[...a.path,"allOf",1]}),d=h=>"allOf"in h&&Object.keys(h).length===1,f=[...d(u)?u.allOf:[u],...d(l)?l.allOf:[l]];n.allOf=f},GI=(e,t,n,a)=>{const o=e._zod.def,u=tn(o.innerType,t,a),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},YI=(e,t,n,a)=>{const o=e._zod.def;tn(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},XI=(e,t,n,a)=>{const o=e._zod.def;tn(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},KI=(e,t,n,a)=>{const o=e._zod.def;tn(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},JI=(e,t,n,a)=>{const o=e._zod.def;tn(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},QI=(e,t,n,a)=>{const o=e._zod.def,u=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;tn(u,t,a);const l=t.seen.get(e);l.ref=u},WI=(e,t,n,a)=>{const o=e._zod.def;tn(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},X2=(e,t,n,a)=>{const o=e._zod.def;tn(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},e7=ne("ZodISODateTime",(e,t)=>{cB.init(e,t),St.init(e,t)});function t7(e){return hI(e7,e)}const n7=ne("ZodISODate",(e,t)=>{dB.init(e,t),St.init(e,t)});function r7(e){return mI(n7,e)}const a7=ne("ZodISOTime",(e,t)=>{fB.init(e,t),St.init(e,t)});function i7(e){return pI(a7,e)}const o7=ne("ZodISODuration",(e,t)=>{hB.init(e,t),St.init(e,t)});function s7(e){return gI(o7,e)}const K2=(e,t)=>{D2.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>sZ(e,n)},flatten:{value:n=>oZ(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Dp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Dp,2)}},isEmpty:{get(){return e.issues.length===0}}})},l7=ne("ZodError",K2),or=ne("ZodError",K2,{Parent:Error}),u7=ty(or),c7=ny(or),d7=yd(or),f7=xd(or),h7=cZ(or),m7=dZ(or),p7=fZ(or),g7=hZ(or),y7=mZ(or),x7=pZ(or),b7=gZ(or),v7=yZ(or),Vt=ne("ZodType",(e,t)=>(Pt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Jc(e,"input"),output:Jc(e,"output")}}),e.toJSONSchema=MI(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ya(t,{checks:[...t.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(n,a)=>Xa(e,n,a),e.brand=()=>e,e.register=((n,a)=>(n.add(e,a),e)),e.parse=(n,a)=>u7(e,n,a,{callee:e.parse}),e.safeParse=(n,a)=>d7(e,n,a),e.parseAsync=async(n,a)=>c7(e,n,a,{callee:e.parseAsync}),e.safeParseAsync=async(n,a)=>f7(e,n,a),e.spa=e.safeParseAsync,e.encode=(n,a)=>h7(e,n,a),e.decode=(n,a)=>m7(e,n,a),e.encodeAsync=async(n,a)=>p7(e,n,a),e.decodeAsync=async(n,a)=>g7(e,n,a),e.safeEncode=(n,a)=>y7(e,n,a),e.safeDecode=(n,a)=>x7(e,n,a),e.safeEncodeAsync=async(n,a)=>b7(e,n,a),e.safeDecodeAsync=async(n,a)=>v7(e,n,a),e.refine=(n,a)=>e.check(hH(n,a)),e.superRefine=n=>e.check(mH(n)),e.overwrite=n=>e.check(es(n)),e.optional=()=>Sw(e),e.exactOptional=()=>eH(e),e.nullable=()=>zw(e),e.nullish=()=>Sw(zw(e)),e.nonoptional=n=>oH(e,n),e.array=()=>I7(e),e.or=n=>Q2([e,n]),e.and=n=>Y7(e,n),e.transform=n=>_w(e,Q7(n)),e.default=n=>rH(e,n),e.prefault=n=>iH(e,n),e.catch=n=>lH(e,n),e.pipe=n=>_w(e,n),e.readonly=()=>dH(e),e.describe=n=>{const a=e.clone();return sl.add(a,{description:n}),a},Object.defineProperty(e,"description",{get(){return sl.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return sl.get(e);const a=e.clone();return sl.add(a,n[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),J2=ne("_ZodString",(e,t)=>{ry.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>$I(e,a,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...a)=>e.check(bI(...a)),e.includes=(...a)=>e.check(wI(...a)),e.startsWith=(...a)=>e.check(SI(...a)),e.endsWith=(...a)=>e.check(zI(...a)),e.min=(...a)=>e.check(Kc(...a)),e.max=(...a)=>e.check(H2(...a)),e.length=(...a)=>e.check(F2(...a)),e.nonempty=(...a)=>e.check(Kc(1,...a)),e.lowercase=a=>e.check(vI(a)),e.uppercase=a=>e.check(kI(a)),e.trim=()=>e.check(TI()),e.normalize=(...a)=>e.check(_I(...a)),e.toLowerCase=()=>e.check(jI()),e.toUpperCase=()=>e.check(EI()),e.slugify=()=>e.check(CI())}),k7=ne("ZodString",(e,t)=>{ry.init(e,t),J2.init(e,t),e.email=n=>e.check(qB(w7,n)),e.url=n=>e.check(JB(S7,n)),e.jwt=n=>e.check(fI(U7,n)),e.emoji=n=>e.check(QB(z7,n)),e.guid=n=>e.check(bw(vw,n)),e.uuid=n=>e.check(GB(bc,n)),e.uuidv4=n=>e.check(YB(bc,n)),e.uuidv6=n=>e.check(XB(bc,n)),e.uuidv7=n=>e.check(KB(bc,n)),e.nanoid=n=>e.check(WB(_7,n)),e.guid=n=>e.check(bw(vw,n)),e.cuid=n=>e.check(eI(T7,n)),e.cuid2=n=>e.check(tI(j7,n)),e.ulid=n=>e.check(nI(E7,n)),e.base64=n=>e.check(uI(D7,n)),e.base64url=n=>e.check(cI($7,n)),e.xid=n=>e.check(rI(C7,n)),e.ksuid=n=>e.check(aI(N7,n)),e.ipv4=n=>e.check(iI(A7,n)),e.ipv6=n=>e.check(oI(O7,n)),e.cidrv4=n=>e.check(sI(R7,n)),e.cidrv6=n=>e.check(lI(M7,n)),e.e164=n=>e.check(dI(L7,n)),e.datetime=n=>e.check(t7(n)),e.date=n=>e.check(r7(n)),e.time=n=>e.check(i7(n)),e.duration=n=>e.check(s7(n))});function Cm(e){return FB(k7,e)}const St=ne("ZodStringFormat",(e,t)=>{xt.init(e,t),J2.init(e,t)}),w7=ne("ZodEmail",(e,t)=>{tB.init(e,t),St.init(e,t)}),vw=ne("ZodGUID",(e,t)=>{WZ.init(e,t),St.init(e,t)}),bc=ne("ZodUUID",(e,t)=>{eB.init(e,t),St.init(e,t)}),S7=ne("ZodURL",(e,t)=>{nB.init(e,t),St.init(e,t)}),z7=ne("ZodEmoji",(e,t)=>{rB.init(e,t),St.init(e,t)}),_7=ne("ZodNanoID",(e,t)=>{aB.init(e,t),St.init(e,t)}),T7=ne("ZodCUID",(e,t)=>{iB.init(e,t),St.init(e,t)}),j7=ne("ZodCUID2",(e,t)=>{oB.init(e,t),St.init(e,t)}),E7=ne("ZodULID",(e,t)=>{sB.init(e,t),St.init(e,t)}),C7=ne("ZodXID",(e,t)=>{lB.init(e,t),St.init(e,t)}),N7=ne("ZodKSUID",(e,t)=>{uB.init(e,t),St.init(e,t)}),A7=ne("ZodIPv4",(e,t)=>{mB.init(e,t),St.init(e,t)}),O7=ne("ZodIPv6",(e,t)=>{pB.init(e,t),St.init(e,t)}),R7=ne("ZodCIDRv4",(e,t)=>{gB.init(e,t),St.init(e,t)}),M7=ne("ZodCIDRv6",(e,t)=>{yB.init(e,t),St.init(e,t)}),D7=ne("ZodBase64",(e,t)=>{xB.init(e,t),St.init(e,t)}),$7=ne("ZodBase64URL",(e,t)=>{vB.init(e,t),St.init(e,t)}),L7=ne("ZodE164",(e,t)=>{kB.init(e,t),St.init(e,t)}),U7=ne("ZodJWT",(e,t)=>{SB.init(e,t),St.init(e,t)}),P7=ne("ZodUnknown",(e,t)=>{zB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>UI()});function kw(){return yI(P7)}const V7=ne("ZodNever",(e,t)=>{_B.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>LI(e,n,a)});function Z7(e){return xI(V7,e)}const B7=ne("ZodArray",(e,t)=>{TB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>II(e,n,a,o),e.element=t.element,e.min=(n,a)=>e.check(Kc(n,a)),e.nonempty=n=>e.check(Kc(1,n)),e.max=(n,a)=>e.check(H2(n,a)),e.length=(n,a)=>e.check(F2(n,a)),e.unwrap=()=>e.element});function I7(e,t){return NI(B7,e,t)}const H7=ne("ZodObject",(e,t)=>{EB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>HI(e,n,a,o),Je(e,"shape",()=>t.shape),e.keyof=()=>X7(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:kw()}),e.loose=()=>e.clone({...e._zod.def,catchall:kw()}),e.strict=()=>e.clone({...e._zod.def,catchall:Z7()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>tZ(e,n),e.safeExtend=n=>nZ(e,n),e.merge=n=>rZ(e,n),e.pick=n=>WV(e,n),e.omit=n=>eZ(e,n),e.partial=(...n)=>aZ(W2,e,n[0]),e.required=(...n)=>iZ(eT,e,n[0])});function F7(e,t){const n={type:"object",shape:e??{},...je(t)};return new H7(n)}const q7=ne("ZodUnion",(e,t)=>{CB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>FI(e,n,a,o),e.options=t.options});function Q2(e,t){return new q7({type:"union",options:e,...je(t)})}const G7=ne("ZodIntersection",(e,t)=>{NB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>qI(e,n,a,o)});function Y7(e,t){return new G7({type:"intersection",left:e,right:t})}const Lp=ne("ZodEnum",(e,t)=>{AB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>PI(e,a,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(a,o)=>{const u={};for(const l of a)if(n.has(l))u[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Lp({...t,checks:[],...je(o),entries:u})},e.exclude=(a,o)=>{const u={...t.entries};for(const l of a)if(n.has(l))delete u[l];else throw new Error(`Key ${l} not found in enum`);return new Lp({...t,checks:[],...je(o),entries:u})}});function X7(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new Lp({type:"enum",entries:n,...je(t)})}const K7=ne("ZodLiteral",(e,t)=>{OB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>VI(e,n,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ww(e,t){return new K7({type:"literal",values:Array.isArray(e)?e:[e],...je(t)})}const J7=ne("ZodTransform",(e,t)=>{RB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>BI(e,n),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new E2(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(Nl(u,n.value,t));else{const l=u;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Nl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function Q7(e){return new J7({type:"transform",transform:e})}const W2=ne("ZodOptional",(e,t)=>{I2.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>X2(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function Sw(e){return new W2({type:"optional",innerType:e})}const W7=ne("ZodExactOptional",(e,t)=>{MB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>X2(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function eH(e){return new W7({type:"optional",innerType:e})}const tH=ne("ZodNullable",(e,t)=>{DB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>GI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function zw(e){return new tH({type:"nullable",innerType:e})}const nH=ne("ZodDefault",(e,t)=>{$B.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>XI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function rH(e,t){return new nH({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():O2(t)}})}const aH=ne("ZodPrefault",(e,t)=>{LB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>KI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function iH(e,t){return new aH({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():O2(t)}})}const eT=ne("ZodNonOptional",(e,t)=>{UB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>YI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function oH(e,t){return new eT({type:"nonoptional",innerType:e,...je(t)})}const sH=ne("ZodCatch",(e,t)=>{PB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>JI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function lH(e,t){return new sH({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const uH=ne("ZodPipe",(e,t)=>{VB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>QI(e,n,a,o),e.in=t.in,e.out=t.out});function _w(e,t){return new uH({type:"pipe",in:e,out:t})}const cH=ne("ZodReadonly",(e,t)=>{ZB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>WI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function dH(e){return new cH({type:"readonly",innerType:e})}const fH=ne("ZodCustom",(e,t)=>{BB.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>ZI(e,n)});function hH(e,t={}){return AI(fH,e,t)}function mH(e){return OI(e)}const pH=[{id:"general",label:"General"},{id:"agents",label:"Agents"},{id:"audio",label:"Audio"},{id:"channels",label:"Channels"},{id:"ui",label:"Interface"},{id:"logging",label:"Logging"}],gH=[{id:"oracle",label:"Oracle"},{id:"sati",label:"Sati"},{id:"neo",label:"Neo"},{id:"apoc",label:"Apoc"}],vc=[{label:"OpenAI",value:"openai"},{label:"Anthropic",value:"anthropic"},{label:"OpenRouter",value:"openrouter"},{label:"Ollama",value:"ollama"},{label:"Google Gemini",value:"gemini"}];function yH(){const{data:e,error:t}=an("/api/config",Ra.fetchConfig),{data:n}=an("/api/config/sati",Ra.getSatiConfig),{data:a}=an("/api/config/apoc",Ra.getApocConfig),{data:o}=an("/api/config/neo",Ra.getNeoConfig),[u,l]=z.useState(null),[d,f]=z.useState(null),[h,g]=z.useState(null),[x,b]=z.useState(null),[v,w]=z.useState("general"),[_,C]=z.useState("oracle"),[N,R]=z.useState(!1),[j,L]=z.useState({}),[P,$]=z.useState(null);z.useEffect(()=>{e&&!u&&l(e)},[e]),z.useEffect(()=>{n&&!d&&f(n)},[n]),z.useEffect(()=>{a&&!x?b(a):!a&&!x&&u&&b({...u.apoc??u.llm,temperature:u.apoc?.temperature??.2,timeout_ms:u.apoc?.timeout_ms??3e4})},[a,u]),z.useEffect(()=>{o&&!h?g(o):!o&&!h&&u&&g({...u.neo??u.llm,temperature:u.neo?.temperature??.2})},[o,u]);const Y=JSON.stringify(e)!==JSON.stringify(u)||JSON.stringify(n)!==JSON.stringify(d)||JSON.stringify(o)!==JSON.stringify(h)||JSON.stringify(a)!==JSON.stringify(x),U=(E,F)=>{if(!u)return;const Z=JSON.parse(JSON.stringify(u));let de=Z;for(let O=0;O<E.length-1;O++)de=de[E[O]];de[E[E.length-1]]=F,l(Z);try{GV.parse(Z),L({})}catch(O){if(O instanceof l7){const A={};O.errors.forEach(G=>{const T=G.path.join(".");A[T]=G.message}),L(A)}}},X=(E,F)=>{d&&f({...d,[E]:F})},ue=(E,F)=>{x&&b({...x,[E]:F})},ae=(E,F)=>{h&&g({...h,[E]:F})},oe=()=>{!u||!d||f({...d,provider:u.llm.provider,model:u.llm.model,api_key:u.llm.api_key})},te=()=>{!u||!x||b({...x,provider:u.llm.provider,model:u.llm.model,api_key:u.llm.api_key})},se=()=>{!u||!h||g({...h,provider:u.llm.provider,model:u.llm.model,api_key:u.llm.api_key})},re=async()=>{if(u){R(!0),$(null);try{await Ra.updateConfig(u),d&&await Ra.updateSatiConfig(d),h&&await Ra.updateNeoConfig(h),x&&await Ra.updateApocConfig(x),rl("/api/config"),rl("/api/config/sati"),rl("/api/config/neo"),rl("/api/config/apoc"),$({type:"success",message:"Settings saved successfully. Restart Morpheus daemon for changes to take effect."})}catch(E){if($({type:"error",message:E.message}),E.details&&Array.isArray(E.details)){const F={};E.details.forEach(Z=>{const de=Z.path.join(".");F[de]=Z.message}),L(F)}}finally{R(!1)}}};return t?p.jsx("div",{className:"p-8 text-red-500",children:"Failed to load configuration"}):u?p.jsxs("div",{className:"max-w-4xl mx-auto p-0 md:p-6 space-y-6",children:[p.jsxs("div",{className:"flex justify-between items-center",children:[p.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Zaion Settings"}),p.jsx("button",{onClick:re,disabled:!Y||Object.keys(j).length>0||N,className:`px-4 py-2 rounded font-medium transition-colors ${Y&&Object.keys(j).length===0?"bg-azure-primary text-white hover:bg-azure-active dark:bg-matrix-highlight dark:text-black dark:hover:bg-matrix-highlight/90":"bg-azure-border text-azure-text-secondary cursor-not-allowed dark:bg-matrix-primary/50 dark:text-matrix-highlight/50"}`,children:N?"Saving...":"Save Changes"})]}),P&&p.jsx("div",{className:`p-4 rounded border ${P.type==="success"?"border-azure-primary text-azure-primary bg-azure-primary/10 dark:border-matrix-highlight dark:text-matrix-highlight dark:bg-matrix-highlight/10":"border-red-500 text-red-500 bg-red-900/10"}`,children:P.message}),p.jsx("div",{className:"overflow-x-auto py-1 hide-scrollbar",children:p.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px min-w-max",children:pH.map(E=>p.jsx("button",{onClick:()=>w(E.id),className:`px-4 py-2 text-sm font-medium rounded-t-md transition-colors flex-shrink-0 ${v===E.id?"bg-azure-surface/50 text-azure-primary border-t border-x border-azure-border dark:bg-matrix-primary/20 dark:text-matrix-highlight dark:border-t dark:border-x dark:border-matrix-primary":"text-azure-text-secondary hover:text-azure-primary dark:text-matrix-secondary dark:hover:text-matrix-highlight"}`,children:E.label},E.id))})}),p.jsxs("div",{className:"space-y-6",children:[v==="general"&&p.jsxs(Jr,{title:"Agent Identity",children:[p.jsx(Nt,{label:"Agent Name",value:u.agent.name,onChange:E=>U(["agent","name"],E.target.value),error:j["agent.name"]}),p.jsx(Nt,{label:"Personality",value:u.agent.personality,onChange:E=>U(["agent","personality"],E.target.value),error:j["agent.personality"]})]}),v==="agents"&&p.jsxs("div",{className:"space-y-4",children:[p.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px",children:gH.map(E=>p.jsx("button",{onClick:()=>C(E.id),className:`px-4 py-2 text-sm font-medium rounded-t-md transition-colors ${_===E.id?"bg-azure-primary/10 text-azure-primary border-b-2 border-azure-primary dark:bg-matrix-highlight/10 dark:text-matrix-highlight dark:border-matrix-highlight":"text-azure-text-secondary hover:text-azure-primary dark:text-matrix-secondary dark:hover:text-matrix-highlight"}`,children:E.label},E.id))}),_==="oracle"&&p.jsxs(Jr,{title:"Oracle Agent",children:[p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mb-4",children:"Main orchestration agent — handles user requests and delegates to subagents"}),p.jsx(vo,{label:"Provider",value:u.llm.provider,onChange:E=>U(["llm","provider"],E.target.value),options:vc,error:j["llm.provider"]}),p.jsx(Nt,{label:"Model Name",value:u.llm.model,onChange:E=>U(["llm","model"],E.target.value),error:j["llm.model"]}),p.jsx(fr,{label:"Temperature",value:u.llm.temperature,onChange:E=>U(["llm","temperature"],parseFloat(E.target.value)),step:.1,min:0,max:1,error:j["llm.temperature"]}),p.jsx(fr,{label:"Max Tokens",value:u.llm.max_tokens??"",onChange:E=>U(["llm","max_tokens"],E.target.value?parseInt(E.target.value):void 0),min:1,error:j["llm.max_tokens"],helperText:"Maximum tokens per response. Leave empty for model default."}),p.jsx(fr,{label:"Context Window (Messages)",value:u.llm.context_window??100,onChange:E=>U(["llm","context_window"],parseInt(E.target.value)),min:1,step:1,error:j["llm.context_window"],helperText:"Number of past interactions to load into LLM context (e.g., 100)."}),p.jsx(Nt,{label:"API Key",type:"password",value:u.llm.api_key||"",onChange:E=>U(["llm","api_key"],E.target.value),placeholder:"sk-...",helperText:"Stored locally."}),u.llm.provider==="openrouter"&&p.jsx(Nt,{label:"Base URL",value:u.llm.base_url||"https://openrouter.ai/api/v1",onChange:E=>U(["llm","base_url"],E.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"})]}),_==="sati"&&p.jsxs(Jr,{title:"Sati Agent",children:[p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mb-4",children:"Background memory consolidation agent — evaluates conversations and persists important context"}),p.jsxs("div",{className:"mb-4",children:[p.jsx("button",{type:"button",onClick:oe,className:"px-3 py-1.5 text-sm bg-azure-surface border border-azure-border rounded hover:bg-azure-primary/10 dark:bg-matrix-primary/20 dark:border-matrix-primary dark:hover:bg-matrix-highlight/10 text-azure-primary dark:text-matrix-highlight transition-colors",children:"Copy from Oracle Agent"}),p.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary mt-1",children:"Copy Provider, Model, and API Key from Oracle Agent configuration"})]}),d&&p.jsxs(p.Fragment,{children:[p.jsx(vo,{label:"Provider",value:d.provider,onChange:E=>X("provider",E.target.value),options:vc}),p.jsx(Nt,{label:"Model Name",value:d.model,onChange:E=>X("model",E.target.value)}),p.jsx(Nt,{label:"API Key",type:"password",value:d.api_key||"",onChange:E=>X("api_key",E.target.value),placeholder:"sk-...",helperText:"Stored locally."}),d.provider==="openrouter"&&p.jsx(Nt,{label:"Base URL",value:d.base_url||"https://openrouter.ai/api/v1",onChange:E=>X("base_url",E.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"}),p.jsx(fr,{label:"Memory Limit",value:d.memory_limit??10,onChange:E=>X("memory_limit",parseInt(E.target.value)),min:1,step:1,helperText:"Number of memory items to retrieve from long-term storage."}),p.jsx(nl,{label:"Enable Archived Sessions in Memory Retrieval",checked:d.enabled_archived_sessions??!0,onChange:E=>X("enabled_archived_sessions",E)})]})]}),_==="neo"&&p.jsxs(Jr,{title:"Neo Agent",children:[p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mb-4",children:"MCP + internal tools subagent — executes analytical and operational tasks delegated by Oracle"}),p.jsxs("div",{className:"mb-4",children:[p.jsx("button",{type:"button",onClick:se,className:"px-3 py-1.5 text-sm bg-azure-surface border border-azure-border rounded hover:bg-azure-primary/10 dark:bg-matrix-primary/20 dark:border-matrix-primary dark:hover:bg-matrix-highlight/10 text-azure-primary dark:text-matrix-highlight transition-colors",children:"Copy from Oracle Agent"}),p.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary mt-1",children:"Copy Provider, Model, and API Key from Oracle Agent configuration"})]}),h&&p.jsxs(p.Fragment,{children:[p.jsx(vo,{label:"Provider",value:h.provider,onChange:E=>ae("provider",E.target.value),options:vc}),p.jsx(Nt,{label:"Model Name",value:h.model,onChange:E=>ae("model",E.target.value)}),p.jsx(fr,{label:"Temperature",value:h.temperature,onChange:E=>ae("temperature",parseFloat(E.target.value)),step:.1,min:0,max:1}),p.jsx(fr,{label:"Max Tokens",value:h.max_tokens??"",onChange:E=>ae("max_tokens",E.target.value?parseInt(E.target.value):void 0),min:1,helperText:"Maximum tokens per response. Leave empty for model default."}),p.jsx(fr,{label:"Context Window (Messages)",value:h.context_window??100,onChange:E=>ae("context_window",parseInt(E.target.value)),min:1,step:1}),p.jsx(Nt,{label:"API Key",type:"password",value:h.api_key||"",onChange:E=>ae("api_key",E.target.value),placeholder:"sk-...",helperText:"Stored locally."}),h.provider==="openrouter"&&p.jsx(Nt,{label:"Base URL",value:h.base_url||"https://openrouter.ai/api/v1",onChange:E=>ae("base_url",E.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"})]})]}),_==="apoc"&&p.jsxs(Jr,{title:"Apoc Agent",children:[p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mb-4",children:"DevTools subagent — executes file, shell, git, network, and system operations on behalf of Oracle"}),p.jsxs("div",{className:"mb-4",children:[p.jsx("button",{type:"button",onClick:te,className:"px-3 py-1.5 text-sm bg-azure-surface border border-azure-border rounded hover:bg-azure-primary/10 dark:bg-matrix-primary/20 dark:border-matrix-primary dark:hover:bg-matrix-highlight/10 text-azure-primary dark:text-matrix-highlight transition-colors",children:"Copy from Oracle Agent"}),p.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary mt-1",children:"Copy Provider, Model, and API Key from Oracle Agent configuration"})]}),x&&p.jsxs(p.Fragment,{children:[p.jsx(vo,{label:"Provider",value:x.provider,onChange:E=>ue("provider",E.target.value),options:vc}),p.jsx(Nt,{label:"Model Name",value:x.model,onChange:E=>ue("model",E.target.value)}),p.jsx(fr,{label:"Temperature",value:x.temperature,onChange:E=>ue("temperature",parseFloat(E.target.value)),step:.1,min:0,max:1}),p.jsx(Nt,{label:"API Key",type:"password",value:x.api_key||"",onChange:E=>ue("api_key",E.target.value),placeholder:"sk-...",helperText:"Stored locally."}),x.provider==="openrouter"&&p.jsx(Nt,{label:"Base URL",value:x.base_url||"https://openrouter.ai/api/v1",onChange:E=>ue("base_url",E.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"}),p.jsx(Nt,{label:"Working Directory",value:x.working_dir||"",onChange:E=>ue("working_dir",E.target.value),placeholder:"/home/user/projects",helperText:"Root directory for file and shell operations. Leave empty to use process working directory."}),p.jsx(fr,{label:"Timeout (ms)",value:x.timeout_ms??3e4,onChange:E=>ue("timeout_ms",parseInt(E.target.value)),min:1e3,step:1e3,helperText:"Maximum execution time for shell and system operations in milliseconds."})]})]})]}),v==="audio"&&p.jsxs(Jr,{title:"Audio Transcription",children:[p.jsx(nl,{label:"Enable Audio",checked:u.audio.enabled,onChange:E=>U(["audio","enabled"],E)}),p.jsx(vo,{label:"Provider",value:u.audio.provider||"google",onChange:E=>U(["audio","provider"],E.target.value),options:[{label:"Google Gemini",value:"google"},{label:"OpenAI (Whisper)",value:"openai"},{label:"OpenRouter (multimodal)",value:"openrouter"},{label:"Ollama (Whisper local)",value:"ollama"}],error:j["audio.provider"]}),p.jsx(Nt,{label:"Model",value:u.audio.model,onChange:E=>U(["audio","model"],E.target.value),placeholder:"e.g. whisper-1, gemini-2.5-flash-lite...",helperText:"Model to use for audio transcription.",error:j["audio.model"]}),u.audio.provider==="ollama"&&p.jsx(Nt,{label:"Base URL",value:u.audio.base_url||"",onChange:E=>U(["audio","base_url"],E.target.value),placeholder:"http://localhost:11434",helperText:"Ollama base URL. Requires a Whisper model loaded (ollama pull whisper)."}),p.jsx(Nt,{label:"API Key",type:"password",value:u.audio.apiKey||"",onChange:E=>U(["audio","apiKey"],E.target.value),placeholder:"If different from LLM key...",helperText:"Leave empty to use LLM API key if using the same provider."}),p.jsx(fr,{label:"Max Duration (Seconds)",value:u.audio.maxDurationSeconds,onChange:E=>U(["audio","maxDurationSeconds"],parseInt(E.target.value)),min:1}),p.jsx(Nt,{label:"Supported Mime Types",value:u.audio.supportedMimeTypes.join(", "),onChange:E=>U(["audio","supportedMimeTypes"],E.target.value.split(",").map(F=>F.trim()).filter(Boolean)),helperText:"Comma separated list (e.g. audio/ogg, audio/mp3)"})]}),v==="channels"&&p.jsxs(Jr,{title:"Telegram",children:[p.jsx(nl,{label:"Enable Telegram",checked:u.channels.telegram.enabled,onChange:E=>U(["channels","telegram","enabled"],E)}),u.channels.telegram.enabled&&p.jsxs("div",{className:"space-y-4 mt-4 pl-4 border-l border-matrix-primary",children:[p.jsx(Nt,{label:"Bot Token",type:"password",value:u.channels.telegram.token||"",onChange:E=>U(["channels","telegram","token"],E.target.value)}),p.jsx(Nt,{label:"Allowed Users (comma separated)",value:u.channels.telegram.allowedUsers.join(", "),onChange:E=>U(["channels","telegram","allowedUsers"],E.target.value.split(",").map(F=>F.trim()).filter(Boolean)),helperText:"User IDs allowed to interact with the bot"})]})]}),v==="ui"&&p.jsxs(Jr,{title:"Dashboard",children:[p.jsx(nl,{label:"Enable Web UI",checked:u.ui.enabled,onChange:E=>U(["ui","enabled"],E)}),p.jsx(fr,{label:"Port",value:u.ui.port,onChange:E=>U(["ui","port"],parseInt(E.target.value)),disabled:!0,helperText:"Requires restart to change."})]}),v==="logging"&&p.jsxs(Jr,{title:"Logging",children:[p.jsx(nl,{label:"Enable Logging",checked:u.logging.enabled,onChange:E=>U(["logging","enabled"],E)}),p.jsx(vo,{label:"Log Level",value:u.logging.level,onChange:E=>U(["logging","level"],E.target.value),options:[{label:"Debug",value:"debug"},{label:"Info",value:"info"},{label:"Warning",value:"warn"},{label:"Error",value:"error"}]})]})]})]}):p.jsx("div",{className:"p-8 text-azure-primary dark:text-matrix-highlight",children:"Loading settings..."})}function xH(){const{data:e}=n4(),[t,n]=z.useState(null),{data:a,mutate:o}=r4(t);return z.useEffect(()=>{!t&&e&&e.length>0&&n(e[0].name)},[e,t]),p.jsxs(ot.div,{className:"h-full flex flex-col space-y-4 pt-16 md:pt-0",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.3},children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"SYSTEM LOGS"}),p.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"View runtime logs."})]}),p.jsxs("div",{className:"flex-1 flex gap-4 overflow-hidden border border-azure-border dark:border-matrix-primary rounded bg-azure-surface dark:bg-zinc-950 p-4",children:[p.jsxs("div",{className:"w-64 flex flex-col gap-2 border-r border-azure-border dark:border-matrix-primary pr-4 overflow-y-auto shrink-0",children:[p.jsx("h3",{className:"font-bold text-azure-text-secondary dark:text-matrix-secondary mb-2 sticky top-0 bg-azure-surface dark:bg-zinc-950",children:"LOG FILES"}),e?.map(u=>p.jsxs("button",{onClick:()=>n(u.name),className:`text-left px-3 py-2 rounded text-sm truncate flex items-center gap-2 group transition-colors ${t===u.name?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"text-azure-text-secondary dark:text-matrix-secondary hover:bg-azure-hover dark:hover:bg-zinc-900 group-hover:text-azure-primary dark:group-hover:text-matrix-highlight"}`,children:[p.jsx(DN,{className:"w-4 h-4 shrink-0"}),p.jsxs("div",{className:"flex flex-col overflow-hidden",children:[p.jsx("span",{className:"truncate font-bold",children:u.name}),p.jsxs("span",{className:"text-xs opacity-70",children:[(u.size/1024).toFixed(1)," KB"]})]})]},u.name))]}),p.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden bg-azure-bg dark:bg-black border border-azure-border dark:border-matrix-primary/50 rounded",children:[p.jsxs("div",{className:"flex justify-between items-center p-2 bg-azure-hover dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary/50",children:[p.jsx("span",{className:"text-azure-text-primary dark:text-matrix-highlight font-bold font-mono text-sm",children:t}),p.jsx("button",{onClick:()=>o(),className:"text-azure-text-secondary dark:text-matrix-secondary hover:text-azure-primary dark:hover:text-matrix-highlight transition-colors",children:p.jsx(nA,{className:"w-4 h-4"})})]}),p.jsx("div",{className:"flex-1 overflow-auto p-4 font-mono text-xs whitespace-pre-wrap text-azure-text-primary dark:text-white",children:a?a.lines.join(`
109
- `):"Select a log file to view content..."})]})]})]})}function bH(){const[e,t]=z.useState(null),[n,a]=z.useState([]),[o,u]=z.useState(!0),[l,d]=z.useState("");if(z.useEffect(()=>{async function g(){try{const[x,b]=await Promise.all([vp.fetchUsageStats(),vp.fetchGroupedUsageStats()]);t(x),a(b)}catch(x){d("Failed to load usage statistics"),console.error(x)}finally{u(!1)}}g()},[]),o)return p.jsx("div",{className:"flex items-center justify-center h-64 text-azure-accent dark:text-matrix-highlight font-mono animate-pulse",children:"LOADING_DATA_STREAM..."});if(l)return p.jsxs("div",{className:"p-4 bg-red-900/20 border border-red-500/50 text-red-500 font-mono rounded",children:["ERROR_ACCESSING_DATABASE: ",l]});const f={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},h={hidden:{y:20,opacity:0},show:{y:0,opacity:1}};return p.jsxs(ot.div,{variants:f,initial:"hidden",animate:"show",className:"space-y-6",children:[p.jsx("div",{className:"flex items-center justify-between border-b border-azure-border dark:border-matrix-primary pb-4",children:p.jsxs("div",{children:[p.jsxs("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight font-mono flex items-center gap-2",children:[p.jsx(Lm,{className:"w-6 h-6"}),"USAGE_ANALYTICS"]}),p.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1 font-mono text-sm",children:"Resource consumption tracking and metrics"})]})}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[p.jsxs(ot.div,{variants:h,className:"p-6 bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg shadow-sm backdrop-blur-sm",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[p.jsx(yl,{className:"w-5 h-5"}),p.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Input Tokens"})]}),p.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalInputTokens.toLocaleString()??0})]}),p.jsxs(ot.div,{variants:h,className:"p-6 bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg shadow-sm backdrop-blur-sm",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[p.jsx(AN,{className:"w-5 h-5"}),p.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Output Tokens"})]}),p.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalOutputTokens.toLocaleString()??0})]}),p.jsxs(ot.div,{variants:h,className:"p-6 bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg shadow-sm backdrop-blur-sm",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[p.jsx(Mc,{className:"w-5 h-5"}),p.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Est. Total Cost"})]}),p.jsx("p",{className:"text-3xl font-bold text-green-600 dark:text-green-400 font-mono",children:e?.totalEstimatedCostUsd!=null?`$${e.totalEstimatedCostUsd.toFixed(4)}`:"—"})]})]}),p.jsxs(ot.div,{variants:h,className:"bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg overflow-hidden backdrop-blur-sm",children:[p.jsx("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary bg-azure-bg dark:bg-zinc-900/50",children:p.jsx("h3",{className:"text-lg font-bold text-azure-text-primary dark:text-matrix-highlight font-mono uppercase",children:"Usage Breakdown by Model"})}),p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full text-left font-mono text-sm",children:[p.jsx("thead",{className:"bg-azure-bg dark:bg-zinc-900/50 text-azure-text-secondary dark:text-matrix-secondary border-b border-azure-border dark:border-matrix-primary",children:p.jsxs("tr",{children:[p.jsx("th",{className:"p-4",children:"Provider"}),p.jsx("th",{className:"p-4",children:"Model"}),p.jsx("th",{className:"p-4 text-right",children:"Messages"}),p.jsx("th",{className:"p-4 text-right",children:"Input Tokens"}),p.jsx("th",{className:"p-4 text-right",children:"Output Tokens"}),p.jsx("th",{className:"p-4 text-right",children:"Total Tokens"}),p.jsx("th",{className:"p-4 text-right",children:"Audio (s)"}),p.jsx("th",{className:"p-4 text-right",children:"Est. Cost (USD)"})]})}),p.jsx("tbody",{className:"divide-y divide-azure-border dark:divide-matrix-primary/30",children:n.length===0?p.jsx("tr",{children:p.jsx("td",{colSpan:8,className:"p-8 text-center text-azure-text-muted dark:text-matrix-secondary italic",children:"NO_DATA_AVAILABLE"})}):n.map((g,x)=>p.jsxs("tr",{className:"hover:bg-azure-hover dark:hover:bg-matrix-primary/10 transition-colors",children:[p.jsx("td",{className:"p-4 font-bold text-azure-text-primary dark:text-matrix-highlight",children:g.provider}),p.jsx("td",{className:"p-4 text-azure-text-secondary dark:text-matrix-secondary",children:g.model}),p.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:g.messageCount.toLocaleString()}),p.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:g.totalInputTokens.toLocaleString()}),p.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:g.totalOutputTokens.toLocaleString()}),p.jsx("td",{className:"p-4 text-right font-bold text-azure-text-primary dark:text-matrix-highlight",children:g.totalTokens.toLocaleString()}),p.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:g.totalAudioSeconds>0?g.totalAudioSeconds.toLocaleString():"—"}),p.jsx("td",{className:"p-4 text-right font-bold text-green-600 dark:text-green-400",children:g.estimatedCostUsd!=null?`$${g.estimatedCostUsd.toFixed(4)}`:"—"})]},`${g.provider}-${g.model}-${x}`))})]})})]})]})}const vH=()=>{const[e,t]=z.useState(""),[n,a]=z.useState(""),o=Ip(),u=pr(),l=d=>{d.preventDefault(),e&&(a(""),fetch("/api/config",{headers:{"x-architect-pass":e}}).then(async f=>{if(f.ok){localStorage.setItem("morpheus.auth.token",e);const h=u.state?.from?.pathname||"/";o(h,{replace:!0})}else a("Invalid architect password")}).catch(()=>{a("Connection failed")}))};return p.jsx("div",{className:"flex items-center justify-center min-h-screen bg-azure-bg dark:bg-black text-azure-primary dark:text-green-500 font-mono",children:p.jsxs("div",{className:"max-w-md w-full p-8 border border-azure-primary dark:border-green-500 shadow-xl dark:shadow-[0_0_15px_rgba(34,197,94,0.3)] bg-white dark:bg-black rounded-lg dark:rounded-none",children:[p.jsx("h1",{className:"text-2xl font-bold mb-6 text-center tracking-widest uppercase text-azure-primary dark:text-green-500",children:"> The Architect Login"}),p.jsxs("form",{onSubmit:l,className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm mb-2 opacity-70 text-azure-text-secondary dark:text-green-500",children:"ACCESS_PASS:"}),p.jsx("input",{type:"password",value:e,onChange:d=>t(d.target.value),className:"w-full bg-azure-bg dark:bg-black border border-azure-border dark:border-green-800 p-2 focus:outline-none focus:border-azure-primary dark:focus:border-green-500 text-azure-text-primary dark:text-green-500 placeholder-azure-text-secondary/50 dark:placeholder-green-900 rounded dark:rounded-none",placeholder:"••••••••",autoFocus:!0})]}),n&&p.jsxs("div",{className:"text-red-500 text-sm animate-pulse",children:["[!] ERROR: ",n]}),p.jsx("button",{type:"submit",className:"w-full bg-azure-primary hover:bg-azure-active dark:bg-green-900 dark:hover:bg-green-700 text-white dark:text-black font-bold py-2 transition-colors duration-200 uppercase tracking-wider rounded dark:rounded-none",children:"Authenticate"})]}),p.jsx("div",{className:"mt-8 text-[10px] opacity-30 text-center uppercase text-azure-text-secondary dark:text-green-500",children:"Morpheus OS v0.1.5 | Unauthorized access is logged."})]})})},kH=({children:e})=>{const{isAuthenticated:t}=t_(),n=pr();return t?p.jsx(p.Fragment,{children:e}):p.jsx(Xw,{to:"/login",state:{from:n},replace:!0})},wH=({className:e,...t})=>p.jsx("div",{className:"relative w-full overflow-auto",children:p.jsx("table",{className:`w-full caption-bottom text-sm ${e}`,...t})}),SH=({...e})=>p.jsx("thead",{...e}),zH=({...e})=>p.jsx("tbody",{...e}),Nm=({...e})=>p.jsx("tr",{className:"border-b border-azure-border dark:border-matrix-primary/30 transition-colors hover:bg-azure-hover/50 dark:hover:bg-matrix-primary/10",...e}),ko=({className:e,...t})=>p.jsx("th",{className:`h-12 px-4 text-left align-middle font-medium text-azure-text-secondary dark:text-matrix-secondary/70 [&:has([role=checkbox])]:pr-0 ${e}`,...t}),yi=({className:e,...t})=>p.jsx("td",{className:`p-4 align-middle [&:has([role=checkbox])]:pr-0 ${e}`,...t}),Tw=({checked:e,onCheckedChange:t,className:n,...a})=>{const o=u=>{t&&t(u.target.checked),a.onChange&&a.onChange(u)};return p.jsx("input",{type:"checkbox",checked:e,onChange:o,className:`h-4 w-4 rounded border-azure-border dark:border-matrix-primary bg-azure-surface dark:bg-zinc-900 text-azure-primary dark:text-matrix-highlight focus:ring-azure-primary dark:focus:ring-matrix-highlight ${n||""}`,...a})},Qc=({className:e,variant:t="default",...n})=>{const o=`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-zinc-950 focus:ring-offset-2 dark:focus:ring-zinc-300 ${t==="destructive"?"border-transparent bg-red-500 text-zinc-50 dark:bg-red-900 dark:text-zinc-50":t==="secondary"?"border-transparent bg-azure-surface dark:bg-zinc-800 text-azure-text-secondary dark:text-matrix-secondary":t==="outline"?"text-azure-text-primary dark:text-matrix-secondary border-azure-border dark:border-matrix-primary":"border-transparent bg-azure-primary dark:bg-matrix-highlight text-azure-text-inverse dark:text-black"} ${e||""}`;return p.jsx("div",{className:o,...n})},Am=({className:e,...t})=>p.jsx("div",{className:`rounded-lg border border-azure-border dark:border-matrix-primary/30 bg-azure-surface dark:bg-zinc-900 text-azure-text-primary dark:text-matrix-secondary shadow-sm ${e||""}`,...t}),jw=({className:e,...t})=>p.jsx("div",{className:`flex flex-col space-y-1.5 p-6 ${e||""}`,...t}),_H=({className:e,...t})=>p.jsx("h3",{className:`text-2xl font-semibold leading-none tracking-tight ${e||""}`,...t}),Om=({className:e,...t})=>p.jsx("div",{className:`p-6 pt-0 ${e||""}`,...t}),TH=({className:e,variant:t="default",...n})=>{const o=`relative w-full rounded-lg border p-4 ${t==="destructive"?"border-red-500/50 text-red-700 dark:border-red-900/50 dark:text-red-300":"border-azure-border dark:border-matrix-primary"} ${e||""}`;return p.jsx("div",{className:o,...n})},jH=({className:e,...t})=>p.jsx("div",{className:`text-sm [&_p]:leading-relaxed ${e||""}`,...t}),tT=({isOpen:e,onClose:t,title:n,children:a,size:o="md"})=>{if(!e)return null;const u={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"};return p.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[p.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),p.jsxs("div",{className:`relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full ${u[o]} max-h-[90vh] overflow-hidden flex flex-col`,children:[n&&p.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-azure-border dark:border-matrix-primary",children:[n&&p.jsx("h3",{className:"text-lg font-semibold text-azure-text-primary dark:text-matrix-secondary",children:n}),t&&p.jsx("button",{onClick:t,className:"text-azure-text-secondary dark:text-matrix-tertiary hover:text-azure-text-primary dark:hover:text-matrix-secondary",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),p.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:a})]})]})},EH=({isOpen:e,onClose:t,memory:n})=>n?p.jsx(tT,{isOpen:e,onClose:t,title:"Memory Details",size:"lg",children:p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(dA,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),p.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Category"})]}),p.jsx("div",{children:p.jsx(Qc,{variant:"outline",children:n.category})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(bA,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),p.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Importance"})]}),p.jsx("div",{children:p.jsx(Qc,{variant:n.importance==="critical"?"destructive":n.importance==="high"?"default":n.importance==="medium"?"secondary":"outline",children:n.importance})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(rS,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),p.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Created"})]}),p.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.created_at).toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(nd,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),p.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Updated"})]}),p.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.updated_at).toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(rd,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),p.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Access Count"})]}),p.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.access_count}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(PN,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),p.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Hash"})]}),p.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary break-all text-sm",children:n.hash}),n.source&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(ZN,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),p.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Source"})]}),p.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.source})]})]}),p.jsxs("div",{children:[p.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Summary"}),p.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary bg-azure-surface dark:bg-zinc-800 p-3 rounded-md",children:n.summary})]}),n.details&&p.jsxs("div",{children:[p.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Details"}),p.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary bg-azure-surface dark:bg-zinc-800 p-3 rounded-md whitespace-pre-wrap",children:n.details})]}),p.jsx("div",{className:"flex justify-end pt-4",children:p.jsx(nr,{onClick:t,children:"Close"})})]})}):null,CH=({isOpen:e,onClose:t,onConfirm:n,title:a="Confirm Deletion",message:o="Are you sure you want to delete this item? This action cannot be undone.",confirmButtonText:u="Delete",cancelButtonText:l="Cancel"})=>p.jsx(tT,{isOpen:e,onClose:t,title:a,size:"md",children:p.jsxs("div",{className:"space-y-6",children:[p.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary",children:o}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(nr,{variant:"outline",onClick:t,children:l}),p.jsx(nr,{variant:"destructive",onClick:()=>{n(),t()},children:u})]})]})}),NH=()=>{const[e,t]=z.useState(!1),[n,a]=z.useState(null),o=z.useCallback(f=>(t(!0),a(null),Ne.get(f).then(h=>h).catch(h=>{throw a(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]),u=z.useCallback((f,h)=>(t(!0),a(null),Ne.post(f,h).then(g=>g).catch(g=>{throw a(g.message||"An error occurred"),g}).finally(()=>{t(!1)})),[]),l=z.useCallback((f,h)=>(t(!0),a(null),Ne.post(f,h).then(g=>g).catch(g=>{throw a(g.message||"An error occurred"),g}).finally(()=>{t(!1)})),[]),d=z.useCallback(f=>(t(!0),a(null),Ne.delete(f).then(h=>h).catch(h=>{throw a(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]);return{get:o,post:u,put:l,del:d,loading:e,error:n}},AH=()=>{const[e,t]=z.useState([]),[n,a]=z.useState(!0),[o,u]=z.useState([]),[l,d]=z.useState(""),[f,h]=z.useState("all"),[g,x]=z.useState("all"),[b,v]=z.useState(null),[w,_]=z.useState(!1),[C,N]=z.useState(null),[R,j]=z.useState(!1),[L,P]=z.useState(null),[$,Y]=z.useState(!1),{get:U,del:X,post:ue}=NH();z.useEffect(()=>{ae()},[]);const ae=async()=>{try{a(!0);const A=await U("/sati/memories");t(A),v(null)}catch(A){v("Failed to load memories. Please try again."),console.error("Error fetching memories:",A)}finally{a(!1)}},oe=()=>{o.length===Z.length?u([]):u(Z.map(A=>A.id))},te=A=>{o.includes(A)?u(o.filter(G=>G!==A)):u([...o,A])},se=async()=>{if(o.length!==0)try{await ue("/sati/memories/bulk-delete",{ids:o}),await ae(),u([]),_(!1)}catch(A){v("Failed to delete memories. Please try again."),console.error("Error deleting memories:",A)}},re=A=>{P(A),Y(!0)},E=async()=>{if(L)try{await X(`/sati/memories/${L}`),await ae()}catch(A){v("Failed to delete memory. Please try again."),console.error("Error deleting memory:",A)}finally{P(null),Y(!1)}},F=A=>{N(A),j(!0)},Z=e.filter(A=>{const G=A.summary.toLowerCase().includes(l.toLowerCase())||A.details?.toLowerCase().includes(l.toLowerCase())||A.category.toLowerCase().includes(l.toLowerCase()),T=f==="all"||A.category===f,ie=g==="all"||A.importance===g;return G&&T&&ie&&!A.archived}),de=Array.from(new Set(e.map(A=>A.category))),O=Array.from(new Set(e.map(A=>A.importance)));return n?p.jsx(Am,{className:"w-full",children:p.jsx(Om,{className:"flex justify-center items-center h-64",children:p.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-azure-primary dark:border-matrix-highlight"})})}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Sati Memories"}),p.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1",children:"View and manage your long-term memories stored by Sati"})]}),o.length>0&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("span",{className:"text-sm text-azure-text-muted dark:text-matrix-secondary",children:[o.length," selected"]}),p.jsxs(nr,{variant:"destructive",size:"sm",onClick:()=>_(!0),disabled:o.length===0,children:[p.jsx(xl,{className:"w-4 h-4 mr-1"}),"Delete Selected"]})]})]}),b&&p.jsx(TH,{variant:"destructive",children:p.jsx(jH,{children:b})}),p.jsxs(Am,{children:[p.jsx(jw,{className:"border-b border-azure-border dark:border-matrix-primary",children:p.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[p.jsxs("div",{className:"flex flex-col relative w-full",children:[p.jsx(iA,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-azure-text-secondary dark:text-matrix-secondary w-4 h-4"}),p.jsx("input",{type:"text",placeholder:"Search memories...",value:l,onChange:A=>d(A.target.value),className:"w-full pl-10 pr-4 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]}),p.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[p.jsxs("select",{value:f,onChange:A=>h(A.target.value),className:"px-3 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight flex-grow",children:[p.jsx("option",{value:"all",children:"All Categories"}),de.map(A=>p.jsx("option",{value:A,children:A},A))]}),p.jsxs("select",{value:g,onChange:A=>x(A.target.value),className:"px-3 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight flex-grow",children:[p.jsx("option",{value:"all",children:"All Importance"}),O.map(A=>p.jsx("option",{value:A,children:A},A))]})]})]})}),p.jsx(Om,{className:"p-0",children:p.jsxs(wH,{children:[p.jsx(SH,{children:p.jsxs(Nm,{className:"hover:bg-transparent",children:[p.jsx(ko,{className:"w-12",children:p.jsx(Tw,{checked:Z.length>0&&o.length===Z.length,onCheckedChange:oe})}),p.jsx(ko,{children:"Summary"}),p.jsx(ko,{children:"Category"}),p.jsx(ko,{children:"Importance"}),p.jsx(ko,{children:"Created"}),p.jsx(ko,{className:"w-32",children:"Actions"})]})}),p.jsx(zH,{children:Z.length===0?p.jsx(Nm,{children:p.jsx(yi,{colSpan:6,className:"text-center py-8 text-azure-text-secondary dark:text-matrix-secondary",children:n?"Loading memories...":"No memories found"})}):Z.map(A=>p.jsxs(Nm,{children:[p.jsx(yi,{children:p.jsx(Tw,{checked:o.includes(A.id),onCheckedChange:()=>te(A.id)})}),p.jsx(yi,{className:"font-medium max-w-xs truncate",children:A.summary}),p.jsx(yi,{children:p.jsx(Qc,{variant:"outline",children:A.category})}),p.jsx(yi,{children:p.jsx(Qc,{variant:A.importance==="critical"?"destructive":A.importance==="high"?"default":A.importance==="medium"?"secondary":"outline",children:A.importance})}),p.jsx(yi,{children:p.jsxs("div",{className:"flex items-center gap-1 text-azure-text-secondary dark:text-matrix-secondary",children:[p.jsx(rS,{className:"w-4 h-4"}),new Date(A.created_at).toLocaleDateString()]})}),p.jsx(yi,{children:p.jsxs("div",{className:"flex gap-1",children:[p.jsx(nr,{variant:"ghost",size:"sm",onClick:()=>F(A),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",children:p.jsx(rd,{className:"w-4 h-4"})}),p.jsx(nr,{variant:"ghost",size:"sm",onClick:()=>re(A.id),className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",children:p.jsx(xl,{className:"w-4 h-4"})})]})})]},A.id))})]})})]}),w&&p.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:p.jsxs(Am,{className:"w-full max-w-md mx-4",children:[p.jsx(jw,{children:p.jsx(_H,{children:"Delete Memories"})}),p.jsxs(Om,{children:[p.jsxs("p",{className:"mb-4",children:["Are you sure you want to delete ",o.length," ","memory(ies)? This action cannot be undone."]}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(nr,{variant:"outline",onClick:()=>_(!1),children:"Cancel"}),p.jsx(nr,{variant:"destructive",onClick:se,children:"Delete"})]})]})]})}),p.jsx(EH,{isOpen:R,onClose:()=>j(!1),memory:C}),p.jsx(CH,{isOpen:$,onClose:()=>Y(!1),onConfirm:E,title:"Confirm Memory Deletion",message:"Are you sure you want to delete this memory? This action cannot be undone.",confirmButtonText:"Delete Memory",cancelButtonText:"Cancel"})]})},xi=wi.getInstance(),bi={fetchServers:async()=>xi.get("/mcp/servers"),addServer:async(e,t)=>xi.post("/mcp/servers",{name:e,config:t}),updateServer:async(e,t)=>xi.put(`/mcp/servers/${encodeURIComponent(e)}`,{config:t}),deleteServer:async e=>xi.delete(`/mcp/servers/${encodeURIComponent(e)}`),toggleServer:async(e,t)=>xi.patch(`/mcp/servers/${encodeURIComponent(e)}/toggle`,{enabled:t}),reloadTools:async()=>xi.post("/mcp/reload",{}),fetchStatus:async()=>xi.get("/mcp/status")},OH=({label:e,values:t,onChange:n,placeholder:a})=>{const o=t.length>0?t:[""],u=(f,h)=>{const g=[...o];g[f]=h,n(g.filter(x=>x.trim().length>0))},l=()=>n([...o,""]),d=f=>{const h=o.filter((g,x)=>x!==f);n(h.filter(g=>g.trim().length>0))};return p.jsxs("div",{className:"space-y-2",children:[p.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),o.map((f,h)=>p.jsxs("div",{className:"flex gap-2",children:[p.jsx("input",{className:"flex-1 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:f,placeholder:a,onChange:g=>u(h,g.target.value)}),p.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>d(h),children:"Remove"})]},`${e}-${h}`)),p.jsx("button",{type:"button",className:"text-sm font-semibold text-azure-primary hover:text-azure-secondary dark:text-matrix-highlight hover:dark:text-matrix-secondary",onClick:l,children:"Add argument"})]})},Ew=({label:e,values:t,onChange:n,keyPlaceholder:a,valuePlaceholder:o})=>{const u=z.useMemo(()=>t.length>0?t:[{key:"",value:""}],[t]),l=(h,g,x)=>{const b=[...u];b[h]={...b[h],[g]:x},n(b.filter(v=>v.key.trim().length>0||v.value.trim().length>0))},d=()=>n([...u,{key:"",value:""}]),f=h=>{const g=u.filter((x,b)=>b!==h);n(g.filter(x=>x.key.trim().length>0||x.value.trim().length>0))};return p.jsxs("div",{className:"space-y-2",children:[p.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),u.map((h,g)=>p.jsxs("div",{className:"grid gap-2 md:grid-cols-5",children:[p.jsx("input",{className:"col-span-2 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:h.key,placeholder:a,onChange:x=>l(g,"key",x.target.value)}),p.jsx("input",{className:"col-span-2 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:h.value,placeholder:o,onChange:x=>l(g,"value",x.target.value)}),p.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>f(g),children:"Remove"})]},`${e}-${g}`)),p.jsx("button",{type:"button",className:"text-sm font-semibold text-azure-primary hover:text-azure-secondary dark:text-matrix-highlight hover:dark:text-matrix-secondary",onClick:d,children:"Add entry"})]})},RH=({transport:e,command:t,url:n,args:a,env:o,headers:u,onCommandChange:l,onUrlChange:d,onArgsChange:f,onEnvChange:h,onHeadersChange:g})=>p.jsxs("div",{className:"space-y-4",children:[e==="stdio"&&p.jsxs(p.Fragment,{children:[p.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Command",p.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:t,onChange:x=>l(x.target.value),placeholder:"npx"})]}),p.jsx(OH,{label:"Arguments",values:a,onChange:f,placeholder:"--flag"})]}),e==="http"&&p.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["URL",p.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:n,onChange:x=>d(x.target.value),placeholder:"https://example.com/mcp"})]}),p.jsx(Ew,{label:"Environment Variables",values:o,onChange:h,keyPlaceholder:"KEY",valuePlaceholder:"value"}),e==="http"&&p.jsx(Ew,{label:"Headers",values:u,onChange:g,keyPlaceholder:"Header",valuePlaceholder:"value"})]}),MH=F7({name:Cm().min(1,"Name is required"),transport:Q2([ww("stdio"),ww("http")]),command:Cm().optional(),url:Cm().optional()}),kc=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Rm=e=>e.reduce((t,n)=>(n.key.trim().length===0||(t[n.key]=n.value),t),{}),DH=({open:e,mode:t,initial:n,onClose:a,onSubmit:o})=>{const[u,l]=z.useState(n?.name??""),[d,f]=z.useState(n?.config.transport??"stdio"),[h,g]=z.useState(n?.config.transport==="stdio"?n.config.command:""),[x,b]=z.useState(n?.config.transport==="http"?n.config.url:""),[v,w]=z.useState(n?.config.args??[]),[_,C]=z.useState(kc(n?.config.env)),[N,R]=z.useState(n?.config.transport==="http"?kc(n.config.headers):[]),[j,L]=z.useState(null);z.useEffect(()=>{e&&(l(n?.name??""),f(n?.config.transport??"stdio"),g(n?.config.transport==="stdio"?n.config.command:""),b(n?.config.transport==="http"?n.config.url:""),w(n?.config.args??[]),C(kc(n?.config.env)),R(n?.config.transport==="http"?kc(n.config.headers):[]),L(null))},[e,n]);const P=t==="create",$=async()=>{const U=MH.safeParse({name:u,transport:d,command:h,url:x});if(!U.success){L(U.error.issues[0]?.message??"Invalid form");return}if(d==="stdio"&&(!h||h.trim().length===0)){L("Command is required for stdio transport.");return}if(d==="http"&&(!x||x.trim().length===0)){L("URL is required for http transport.");return}const X=d==="stdio"?{transport:"stdio",command:h.trim(),args:v.length>0?v:void 0,env:_.length>0?Rm(_):void 0}:{transport:"http",url:x.trim(),headers:N.length>0?Rm(N):void 0,env:_.length>0?Rm(_):void 0};L(null),await o(u.trim(),X)},Y=z.useMemo(()=>t==="create"?"Add MCP Server":"Edit MCP Server",[t]);return p.jsx(jr,{open:e,onOpenChange:a,children:p.jsxs(Po,{children:[p.jsx(Er,{children:p.jsx(Cr,{children:Y})}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Name",p.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none disabled:bg-azure-border dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight dark:disabled:bg-matrix-primary/50",value:u,onChange:U=>l(U.target.value),placeholder:"coolify",disabled:!P})]}),p.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Transport",p.jsxs("select",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:d,onChange:U=>f(U.target.value),children:[p.jsx("option",{value:"stdio",children:"stdio"}),p.jsx("option",{value:"http",children:"http"})]})]}),p.jsx(RH,{transport:d,command:h,url:x,args:v,env:_,headers:N,onCommandChange:g,onUrlChange:b,onArgsChange:w,onEnvChange:C,onHeadersChange:R}),j&&p.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700 dark:border-red-900 dark:bg-red-950/50 dark:text-red-400",children:j}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-4 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:a,children:"Cancel"}),p.jsx("button",{type:"button",className:"rounded-md bg-azure-primary px-4 py-2 text-sm font-semibold text-white shadow hover:bg-azure-secondary dark:bg-matrix-highlight dark:text-matrix-bg hover:dark:bg-matrix-secondary",onClick:$,children:"Save"})]})]})]})})},$H=({server:e,probeResult:t,onEdit:n,onDelete:a,onToggle:o})=>p.jsxs("div",{className:"rounded-2xl border border-azure-border bg-azure-surface/80 p-4 shadow-sm overflow-hidden dark:border-matrix-primary dark:bg-zinc-950/70",children:[p.jsxs("div",{className:"flex items-start justify-between gap-3",children:[p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-lg font-semibold text-azure-text-primary break-words dark:text-matrix-highlight",children:e.name}),p.jsx("div",{className:"text-xs uppercase tracking-wide text-azure-text-muted dark:text-matrix-secondary",children:e.config.transport})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[t&&p.jsx("span",{title:t.ok?`${t.toolCount} tools`:t.error,className:`rounded-full px-2 py-0.5 text-xs font-semibold ${t.ok?"bg-green-500/20 text-green-600 dark:bg-green-400/20 dark:text-green-400":"bg-red-500/20 text-red-600 dark:bg-red-400/20 dark:text-red-400"}`,children:t.ok?`✓ ${t.toolCount} tools`:"✗ Failed"}),p.jsx("button",{type:"button",className:`rounded-full px-3 py-1 text-xs font-semibold ${e.enabled?"bg-matrix-highlight dark:text-matrix-primary":"bg-azure-border text-azure-text-secondary dark:bg-matrix-primary/50 dark:text-matrix-secondary"}`,onClick:()=>o(e,!e.enabled),children:e.enabled?"Enabled":"Disabled"})]})]}),p.jsxs("div",{className:"mt-4 space-y-2 text-sm text-azure-text-secondary dark:text-matrix-secondary",children:[e.config.transport==="stdio"&&p.jsxs("div",{className:"break-all",children:[p.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Command:"})," ",e.config.command]}),e.config.transport==="http"&&p.jsxs("div",{className:"break-all",children:[p.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"URL:"})," ",e.config.url]}),e.config.args&&e.config.args.length>0&&p.jsxs("div",{className:"break-all",children:[p.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Args:"})," ",e.config.args.join(" ")]}),t&&!t.ok&&t.error&&p.jsx("div",{className:"mt-1 break-all rounded border border-red-300 bg-red-50 px-2 py-1 text-xs text-red-600 dark:border-red-900 dark:bg-red-950/30 dark:text-red-400",children:t.error.length>120?t.error.slice(0,120)+"…":t.error})]}),p.jsxs("div",{className:"mt-4 flex gap-2",children:[p.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-3 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:()=>n(e),children:"Edit"}),p.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>a(e),children:"Delete"})]})]}),LH=()=>{const{data:e,error:t,mutate:n,isLoading:a}=an("/api/mcp/servers",()=>bi.fetchServers()),[o,u]=z.useState(""),[l,d]=z.useState("all"),[f,h]=z.useState(!1),[g,x]=z.useState(null),[b,v]=z.useState(!1),[w,_]=z.useState(null),[C,N]=z.useState(null),[R,j]=z.useState({}),[L,P]=z.useState(!1),[$,Y]=z.useState(!1),U=e?.servers??[],X=z.useMemo(()=>U.filter(Z=>{const de=Z.name.toLowerCase().includes(o.toLowerCase()),O=l==="all"||Z.config.transport===l;return de&&O}),[U,o,l]),ue=()=>{x(null),h(!0)},ae=Z=>{x(Z),h(!0)},oe=async(Z,de)=>{try{g?await bi.updateServer(g.name,de):await bi.addServer(Z,de),h(!1),x(null),await n(),N({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(O){N({type:"error",message:O.message||"Failed to save MCP server."})}},te=async Z=>{_(Z),v(!0)},se=async()=>{if(w)try{await bi.deleteServer(w.name),await n(),v(!1),_(null),N({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(Z){N({type:"error",message:Z.message||"Failed to delete MCP server."})}},re=async()=>{P(!0);try{const Z=await bi.fetchStatus(),de={};for(const O of Z.servers)de[O.name]=O;j(de)}catch(Z){N({type:"error",message:Z.message||"Failed to check MCP status."})}finally{P(!1)}},E=async()=>{Y(!0);try{await bi.reloadTools(),N({type:"success",message:"MCP tools reloaded successfully."})}catch(Z){N({type:"error",message:Z.message||"Failed to reload MCP tools."})}finally{Y(!1)}},F=async(Z,de)=>{try{await bi.toggleServer(Z.name,de),await n(),N({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(O){N({type:"error",message:O.message||"Failed to toggle MCP server."})}};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-semibold text-azure-primary dark:text-matrix-highlight",children:"MCP Servers"}),p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Manage MCP servers stored in mcps.json."})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{type:"button",disabled:L,className:"rounded-md border border-azure-border px-4 py-2 text-sm font-semibold text-azure-text-primary shadow hover:border-azure-primary hover:text-azure-primary disabled:opacity-50 dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:re,children:L?"Checking…":"Check Status"}),p.jsx("button",{type:"button",disabled:$,className:"rounded-md border border-azure-border px-4 py-2 text-sm font-semibold text-azure-text-primary shadow hover:border-azure-primary hover:text-azure-primary disabled:opacity-50 dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:E,children:$?"Reloading…":"Reload MCPs"}),p.jsx("button",{type:"button",className:"rounded-md bg-azure-primary px-4 py-2 text-sm font-semibold text-white shadow hover:bg-azure-secondary dark:bg-matrix-highlight dark:text-matrix-bg hover:dark:bg-matrix-secondary",onClick:ue,children:"Add Server"})]})]}),C&&p.jsx("div",{className:`p-4 rounded border ${C.type==="success"?"border-azure-primary text-azure-primary bg-azure-primary/10 dark:border-matrix-highlight dark:text-matrix-highlight dark:bg-matrix-highlight/10":"border-red-500 text-red-500 bg-red-900/10"}`,children:C.message}),p.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center",children:[p.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:o,onChange:Z=>u(Z.target.value),placeholder:"Search by name"}),p.jsxs("select",{className:"rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:l,onChange:Z=>d(Z.target.value),children:[p.jsx("option",{value:"all",children:"All"}),p.jsx("option",{value:"stdio",children:"stdio"}),p.jsx("option",{value:"http",children:"http"})]})]}),a&&p.jsx("div",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Loading MCP servers..."}),t&&p.jsx("div",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to load MCP servers."}),!a&&X.length===0&&p.jsx("div",{className:"rounded-2xl border border-dashed border-azure-border bg-azure-surface/60 p-6 text-center text-sm text-azure-text-secondary dark:border-matrix-primary dark:bg-zinc-950/60 dark:text-matrix-secondary",children:"No MCP servers found. Add a server to get started."}),p.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:X.map(Z=>p.jsx($H,{server:Z,probeResult:R[Z.name],onEdit:ae,onDelete:te,onToggle:F},`${Z.name}-${Z.enabled?"on":"off"}`))}),p.jsx(DH,{open:f,mode:g?"edit":"create",initial:g??void 0,onClose:()=>h(!1),onSubmit:oe}),p.jsx(jr,{open:b,onOpenChange:v,children:p.jsxs(Po,{children:[p.jsx(Er,{children:p.jsx(Cr,{children:"Confirm Deletion"})}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:["Are you sure you want to delete the MCP server ",p.jsxs("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:['"',w?.name,'"']}),"? This action cannot be undone."]}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-4 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:()=>v(!1),children:"Cancel"}),p.jsx("button",{type:"button",className:"rounded-md bg-red-500 px-4 py-2 text-sm font-semibold text-white shadow hover:bg-red-400 dark:bg-red-600 hover:dark:bg-red-500",onClick:se,children:"Delete"})]})]})]})})]})},Mm={list:()=>Ne.get("/model-pricing"),upsert:e=>Ne.post("/model-pricing",e),update:(e,t,n)=>Ne.put(`/model-pricing/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,n),delete:(e,t)=>Ne.delete(`/model-pricing/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},UH={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},Cw={hidden:{opacity:0,y:10},show:{opacity:1,y:0}},PH=["anthropic","openai","google","openrouter","ollama","other"],Nw=()=>({provider:"",model:"",input_price_per_1m:0,output_price_per_1m:0}),VH=()=>{const{data:e=[],mutate:t}=an("/api/model-pricing",()=>Mm.list()),[n,a]=z.useState(!1),[o,u]=z.useState(null),[l,d]=z.useState(Nw()),[f,h]=z.useState(null),[g,x]=z.useState(null),[b,v]=z.useState(!1),w=(j,L)=>{x({type:j,message:L}),setTimeout(()=>x(null),3e3)},_=()=>{u(null),d(Nw()),a(!0)},C=j=>{u(j),d({...j}),a(!0)},N=async()=>{if(!(!l.provider.trim()||!l.model.trim())){v(!0);try{await Mm.upsert(l),await t(),a(!1),w("success",o?"Pricing updated.":"Pricing created.")}catch{w("error","Failed to save pricing entry.")}finally{v(!1)}}},R=async()=>{if(f)try{await Mm.delete(f.provider,f.model),await t(),h(null),w("success","Pricing entry deleted.")}catch{w("error","Failed to delete pricing entry.")}};return p.jsxs(ot.div,{variants:UH,initial:"hidden",animate:"show",className:"space-y-6",children:[p.jsxs(ot.div,{variants:Cw,className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Mc,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Model Pricing"}),p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-dim mt-0.5",children:"Manage per-model pricing to estimate LLM costs in Usage Stats."})]})]}),p.jsxs("button",{onClick:_,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-azure-primary dark:bg-matrix-primary text-white dark:text-matrix-highlight text-sm font-medium hover:opacity-90 transition-opacity",children:[p.jsx(sS,{className:"w-4 h-4"})," Add Pricing"]})]}),g&&p.jsx(ot.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:`px-4 py-3 rounded-lg text-sm font-medium border ${g.type==="success"?"bg-green-50 dark:bg-green-900/20 border-green-300 dark:border-green-700 text-green-800 dark:text-green-400":"bg-red-50 dark:bg-red-900/20 border-red-300 dark:border-red-700 text-red-800 dark:text-red-400"}`,children:g.message}),p.jsx(ot.div,{variants:Cw,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-hidden",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:p.jsx("tr",{children:["Provider","Model","Input ($/1M tokens)","Output ($/1M tokens)","Actions"].map(j=>p.jsx("th",{className:"px-4 py-3 text-left font-semibold text-azure-text-secondary dark:text-matrix-dim",children:j},j))})}),p.jsx("tbody",{children:e.length===0?p.jsx("tr",{children:p.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-azure-text-secondary dark:text-matrix-dim",children:'No pricing entries. Click "Add Pricing" to get started.'})}):e.map(j=>p.jsxs("tr",{className:"border-b border-azure-border dark:border-matrix-primary/30 hover:bg-azure-surface/50 dark:hover:bg-zinc-800/50 transition-colors",children:[p.jsx("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text capitalize",children:j.provider}),p.jsx("td",{className:"px-4 py-3 font-mono text-azure-text-primary dark:text-matrix-highlight text-xs",children:j.model}),p.jsxs("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:["$",j.input_price_per_1m.toFixed(4)]}),p.jsxs("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:["$",j.output_price_per_1m.toFixed(4)]}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>C(j),className:"p-1.5 rounded hover:bg-azure-border dark:hover:bg-matrix-primary/30 text-azure-text-secondary dark:text-matrix-dim hover:text-azure-primary dark:hover:text-matrix-highlight transition-colors",title:"Edit",children:p.jsx(Yp,{className:"w-4 h-4"})}),p.jsx("button",{onClick:()=>h(j),className:"p-1.5 rounded hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-dim hover:text-red-600 dark:hover:text-red-400 transition-colors",title:"Delete",children:p.jsx(xl,{className:"w-4 h-4"})})]})})]},`${j.provider}/${j.model}`))})]})}),p.jsx(jr,{open:n,onOpenChange:a,children:p.jsxs(Po,{children:[p.jsx(Er,{children:p.jsx(Cr,{children:o?"Edit Pricing":"Add Pricing"})}),p.jsxs("div",{className:"p-4 space-y-4",children:[p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Provider"}),o?p.jsx("p",{className:"px-3 py-2 rounded-lg bg-azure-bg dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm capitalize",children:l.provider}):p.jsxs("select",{value:l.provider,onChange:j=>d({...l,provider:j.target.value}),className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight",children:[p.jsx("option",{value:"",children:"Select provider..."}),PH.map(j=>p.jsx("option",{value:j,children:j},j))]})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Model"}),o?p.jsx("p",{className:"px-3 py-2 rounded-lg bg-azure-bg dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm font-mono",children:l.model}):p.jsx("input",{type:"text",value:l.model,onChange:j=>d({...l,model:j.target.value}),placeholder:"e.g. gpt-4o",className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Input price / 1M tokens ($)"}),p.jsx("input",{type:"number",min:0,step:.001,value:l.input_price_per_1m,onChange:j=>d({...l,input_price_per_1m:parseFloat(j.target.value)||0}),className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Output price / 1M tokens ($)"}),p.jsx("input",{type:"number",min:0,step:.001,value:l.output_price_per_1m,onChange:j=>d({...l,output_price_per_1m:parseFloat(j.target.value)||0}),className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]})]}),p.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[p.jsx("button",{onClick:()=>a(!1),className:"px-4 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-azure-text-secondary dark:text-matrix-dim text-sm hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:"Cancel"}),p.jsx("button",{onClick:N,disabled:b||!l.provider.trim()||!l.model.trim(),className:"px-4 py-2 rounded-lg bg-azure-primary dark:bg-matrix-primary text-white dark:text-matrix-highlight text-sm font-medium hover:opacity-90 disabled:opacity-50 transition-opacity",children:b?"Saving...":"Save"})]})]})]})}),p.jsx(jr,{open:!!f,onOpenChange:j=>!j&&h(null),children:p.jsxs(Po,{children:[p.jsx(Er,{children:p.jsx(Cr,{children:"Delete Pricing Entry"})}),p.jsxs("div",{className:"p-4 space-y-4",children:[p.jsxs("p",{className:"text-sm text-azure-text-primary dark:text-matrix-text",children:["Are you sure you want to delete the pricing for"," ",p.jsxs("span",{className:"font-mono font-semibold text-azure-primary dark:text-matrix-highlight",children:[f?.provider,"/",f?.model]}),"? This cannot be undone."]}),p.jsxs("div",{className:"flex justify-end gap-3",children:[p.jsx("button",{onClick:()=>h(null),className:"px-4 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-azure-text-secondary dark:text-matrix-dim text-sm hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:"Cancel"}),p.jsx("button",{onClick:R,className:"px-4 py-2 rounded-lg bg-red-600 text-white text-sm font-medium hover:bg-red-700 transition-colors",children:"Delete"})]})]})]})})]})},ZH={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},Aw={hidden:{opacity:0,y:10},show:{opacity:1,y:0}},BH=["ui","telegram"],Ow=()=>({name:"",prompt:"",notification_channels:["ui"]}),IH=()=>{const{data:e=[],mutate:t}=an("/webhooks",()=>Da.list(),{refreshInterval:1e4}),[n,a]=z.useState(!1),[o,u]=z.useState(null),[l,d]=z.useState(Ow()),[f,h]=z.useState(null),[g,x]=z.useState(null),[b,v]=z.useState(!1),[w,_]=z.useState(null),[C,N]=z.useState(null),R=(te,se)=>{x({type:te,message:se}),setTimeout(()=>x(null),3500)},j=()=>{u(null),d(Ow()),N(null),a(!0)},L=te=>{u(te),d({name:te.name,prompt:te.prompt,notification_channels:te.notification_channels}),N(null),a(!0)},P=te=>/^[a-z0-9-_]+$/.test(te),$=async()=>{if(!(!l.name.trim()||!l.prompt.trim())){if(!P(l.name)){N("Name must only contain lowercase letters, numbers, hyphens (-) and underscores (_).");return}if(l.notification_channels.length===0){N("Select at least one notification channel.");return}N(null),v(!0);try{o?(await Da.update(o.id,l),R("success","Webhook updated.")):(await Da.create(l),R("success","Webhook created.")),await t(),a(!1)}catch(te){const se=te?.message||"Failed to save webhook.";N(se)}finally{v(!1)}}},Y=async te=>{try{await Da.update(te.id,{enabled:!te.enabled}),await t()}catch{R("error","Failed to toggle webhook.")}},U=async()=>{if(f)try{await Da.delete(f.id),await t(),h(null),R("success","Webhook deleted.")}catch{R("error","Failed to delete webhook.")}},X=te=>`${window.location.origin}/api/webhooks/trigger/${te}`,ue=te=>`curl -X POST ${X(te.name)} \\
110
- -H "x-api-key: ${te.api_key}" \\
111
- -H "Content-Type: application/json" \\
112
- -d '{"event":"your_payload"}'`,ae=async(te,se)=>{await navigator.clipboard.writeText(te),_(se),setTimeout(()=>_(null),2e3)},oe=te=>{const se=l.notification_channels.includes(te);d({...l,notification_channels:se?l.notification_channels.filter(re=>re!==te):[...l.notification_channels,te]})};return p.jsxs(ot.div,{variants:ZH,initial:"hidden",animate:"show",className:"space-y-6",children:[p.jsxs(ot.div,{variants:Aw,className:"flex items-center justify-between flex-wrap gap-3",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Bm,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Webhooks"}),p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-dim mt-0.5",children:"Trigger Oracle agent tasks from external events."})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs(wr,{to:"/notifications",className:"flex items-center gap-2 px-4 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-sm text-azure-text-secondary dark:text-matrix-dim hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:[p.jsx(gl,{className:"w-4 h-4"}),"Notifications"]}),p.jsxs("button",{onClick:j,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-azure-primary dark:bg-matrix-primary text-white dark:text-matrix-highlight text-sm font-medium hover:opacity-90 transition-opacity",children:[p.jsx(sS,{className:"w-4 h-4"}),"New Webhook"]})]})]}),g&&p.jsx(ot.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:`px-4 py-3 rounded-lg text-sm font-medium border ${g.type==="success"?"bg-green-50 dark:bg-green-900/20 border-green-300 dark:border-green-700 text-green-800 dark:text-green-400":"bg-red-50 dark:bg-red-900/20 border-red-300 dark:border-red-700 text-red-800 dark:text-red-400"}`,children:g.message}),p.jsx(ot.div,{variants:Aw,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-hidden",children:p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:p.jsx("tr",{children:["Name","API Key","Channels","Triggers","Status","Actions"].map(te=>p.jsx("th",{className:"px-4 py-3 text-left font-semibold text-azure-text-secondary dark:text-matrix-dim",children:te},te))})}),p.jsx("tbody",{children:e.length===0?p.jsx("tr",{children:p.jsxs("td",{colSpan:6,className:"px-4 py-10 text-center text-azure-text-secondary dark:text-matrix-dim",children:["No webhooks yet."," ",p.jsx("button",{onClick:j,className:"underline text-azure-primary dark:text-matrix-highlight",children:"Create one"})]})}):e.map(te=>p.jsxs("tr",{className:"border-b border-azure-border dark:border-matrix-primary/30 hover:bg-azure-surface/50 dark:hover:bg-zinc-800/50 transition-colors",children:[p.jsx("td",{className:"px-4 py-3",children:p.jsx("span",{className:"font-mono text-azure-text-primary dark:text-matrix-text font-medium",children:te.name})}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("code",{className:"text-xs font-mono text-azure-text-secondary dark:text-matrix-dim truncate max-w-[140px]",children:[te.api_key.slice(0,16),"…"]}),p.jsx("button",{onClick:()=>ae(ue(te),`curl-${te.id}`),className:"p-1 rounded hover:bg-azure-border dark:hover:bg-matrix-primary/30 text-azure-text-secondary dark:text-matrix-dim",title:"Copy curl example",children:w===`curl-${te.id}`?p.jsx(Um,{className:"w-3.5 h-3.5 text-green-500"}):p.jsx(Zm,{className:"w-3.5 h-3.5"})}),p.jsx("button",{onClick:()=>ae(te.api_key,`key-${te.id}`),className:"p-1 rounded hover:bg-azure-border dark:hover:bg-matrix-primary/30 text-azure-text-secondary dark:text-matrix-dim",title:"Copy API key",children:w===`key-${te.id}`?p.jsx(Um,{className:"w-3.5 h-3.5 text-green-500"}):p.jsx(EN,{className:"w-3.5 h-3.5"})})]})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("div",{className:"flex gap-1 flex-wrap",children:te.notification_channels.map(se=>p.jsx("span",{className:"px-2 py-0.5 text-xs rounded bg-azure-border dark:bg-matrix-primary/20 text-azure-text-secondary dark:text-matrix-dim capitalize",children:se},se))})}),p.jsx("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:te.trigger_count}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{onClick:()=>Y(te),className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded transition-colors ${te.enabled?"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 hover:bg-green-100 dark:hover:bg-green-900/30":"bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 hover:bg-zinc-200 dark:hover:bg-zinc-700"}`,children:te.enabled?p.jsxs(p.Fragment,{children:[p.jsx(gA,{className:"w-3.5 h-3.5"})," Enabled"]}):p.jsxs(p.Fragment,{children:[p.jsx(mA,{className:"w-3.5 h-3.5"})," Disabled"]})})}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{onClick:()=>L(te),title:"Edit",className:"p-1.5 rounded hover:bg-azure-border dark:hover:bg-matrix-primary/30 text-azure-text-secondary dark:text-matrix-dim hover:text-azure-primary dark:hover:text-matrix-highlight transition-colors",children:p.jsx(Yp,{className:"w-4 h-4"})}),p.jsx("button",{onClick:()=>h(te),title:"Delete",className:"p-1.5 rounded hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-dim hover:text-red-600 dark:hover:text-red-400 transition-colors",children:p.jsx(xl,{className:"w-4 h-4"})})]})})]},te.id))})]})})}),p.jsxs(jr,{open:n,onOpenChange:a,children:[p.jsx(Er,{children:p.jsx(Cr,{className:"text-azure-text-primary dark:text-matrix-highlight",children:o?"Edit Webhook":"New Webhook"})}),p.jsxs("div",{className:"p-6 space-y-4 overflow-y-auto",children:[p.jsxs("div",{children:[p.jsxs("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:["Name ",p.jsx("span",{className:"text-azure-text-muted dark:text-matrix-dim/60 font-normal",children:"(slug — used in URL)"})]}),p.jsx("input",{type:"text",value:l.name,onChange:te=>{d({...l,name:te.target.value.toLowerCase().replace(/\s+/g,"-")}),N(null)},placeholder:"e.g. deploy-done, github-issue-opened",disabled:!!o,className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight disabled:opacity-50 disabled:cursor-not-allowed"}),l.name&&p.jsxs("p",{className:"mt-1 text-xs text-azure-text-secondary dark:text-matrix-dim",children:["Trigger URL:"," ",p.jsxs("code",{className:"font-mono text-azure-primary dark:text-matrix-highlight",children:["POST /api/webhooks/trigger/",l.name]})]})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Agent Prompt"}),p.jsx("textarea",{rows:5,value:l.prompt,onChange:te=>d({...l,prompt:te.target.value}),placeholder:"Describe what Apoc should do when this webhook fires. The received payload will be appended automatically.",className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight resize-none"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-2",children:"Notification Channels"}),p.jsx("div",{className:"flex gap-4",children:BH.map(te=>p.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[p.jsx("input",{type:"checkbox",checked:l.notification_channels.includes(te),onChange:()=>oe(te),className:"rounded border-azure-border dark:border-matrix-primary accent-azure-primary dark:accent-matrix-highlight"}),p.jsx("span",{className:"text-sm text-azure-text-primary dark:text-matrix-text capitalize",children:te})]},te))})]}),C&&p.jsx("p",{className:"text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded px-3 py-2",children:C}),p.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[p.jsx("button",{onClick:()=>a(!1),className:"px-4 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-azure-text-secondary dark:text-matrix-dim text-sm hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:"Cancel"}),p.jsx("button",{onClick:$,disabled:b||!l.name.trim()||!l.prompt.trim()||l.notification_channels.length===0,className:"px-4 py-2 rounded-lg bg-azure-primary dark:bg-matrix-primary text-white dark:text-matrix-highlight text-sm font-medium hover:opacity-90 disabled:opacity-50 transition-opacity",children:b?"Saving…":o?"Update":"Create"})]})]})]}),p.jsxs(jr,{open:!!f,onOpenChange:te=>!te&&h(null),children:[p.jsx(Er,{children:p.jsx(Cr,{className:"text-azure-text-primary dark:text-matrix-highlight",children:"Delete Webhook"})}),p.jsxs("div",{className:"p-6 space-y-4",children:[p.jsxs("p",{className:"text-sm text-azure-text-primary dark:text-matrix-text",children:["Delete"," ",p.jsx("span",{className:"font-semibold font-mono dark:text-matrix-highlight",children:f?.name}),"? This also removes all associated notifications and cannot be undone."]}),p.jsxs("div",{className:"flex justify-end gap-3",children:[p.jsx("button",{onClick:()=>h(null),className:"px-4 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-azure-text-secondary dark:text-matrix-dim text-sm hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:"Cancel"}),p.jsx("button",{onClick:U,className:"px-4 py-2 rounded-lg bg-red-600 text-white text-sm font-medium hover:bg-red-700 transition-colors",children:"Delete"})]})]})]})]})},HH={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},Rw={hidden:{opacity:0,y:10},show:{opacity:1,y:0}},Mw=({status:e})=>e==="completed"?p.jsxs("div",{className:"flex items-center gap-1.5 text-green-600 dark:text-green-400",children:[p.jsx(aS,{className:"w-4 h-4"}),p.jsx("span",{className:"text-xs",children:"Completed"})]}):e==="failed"?p.jsxs("div",{className:"flex items-center gap-1.5 text-red-600 dark:text-red-400",children:[p.jsx(Pm,{className:"w-4 h-4"}),p.jsx("span",{className:"text-xs",children:"Failed"})]}):p.jsxs("div",{className:"flex items-center gap-1.5 text-yellow-600 dark:text-yellow-400",children:[p.jsx(nd,{className:"w-4 h-4 animate-pulse"}),p.jsx("span",{className:"text-xs",children:"Pending"})]}),wc=e=>new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),FH=e=>{try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}},qH=()=>{const[e,t]=z.useState(!1),[n,a]=z.useState(null),{data:o=[],mutate:u}=an(["/webhooks/notifications",e],()=>Da.listNotifications({unreadOnly:e}),{refreshInterval:5e3}),l=o.filter(g=>!g.read).length,d=async g=>{g.length!==0&&(await Da.markRead(g),await u())},f=()=>{const g=o.filter(x=>!x.read).map(x=>x.id);d(g)},h=async g=>{a(g),g.read||await d([g.id])};return p.jsxs(ot.div,{variants:HH,initial:"hidden",animate:"show",className:"space-y-6",children:[p.jsxs(ot.div,{variants:Rw,className:"flex items-center justify-between flex-wrap gap-3",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{className:"relative",children:[p.jsx(gl,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),l>0&&p.jsx("span",{className:"absolute -top-1.5 -right-1.5 bg-red-500 text-white text-[10px] font-bold rounded-full w-4 h-4 flex items-center justify-center leading-none",children:l>9?"9+":l})]}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Notifications"}),p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-dim mt-0.5",children:"Webhook execution results from the Oracle agent."})]})]}),p.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[p.jsxs(wr,{to:"/webhooks",className:"flex items-center gap-2 text-sm text-azure-text-secondary dark:text-matrix-dim hover:text-azure-primary dark:hover:text-matrix-highlight transition-colors",children:[p.jsx(dN,{className:"w-4 h-4"}),"Back to Webhooks"]}),p.jsxs("button",{onClick:()=>t(!e),className:`flex items-center gap-2 px-3 py-2 rounded-lg border text-sm transition-colors ${e?"border-azure-primary dark:border-matrix-highlight bg-azure-active dark:bg-matrix-primary/20 text-azure-primary dark:text-matrix-highlight":"border-azure-border dark:border-matrix-primary text-azure-text-secondary dark:text-matrix-dim hover:bg-azure-surface dark:hover:bg-zinc-800"}`,children:[p.jsx(LN,{className:"w-4 h-4"}),"Unread only"]}),l>0&&p.jsxs("button",{onClick:f,className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-sm text-azure-text-secondary dark:text-matrix-dim hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:[p.jsx(wN,{className:"w-4 h-4"}),"Mark all read"]})]})]}),p.jsx(ot.div,{variants:Rw,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-hidden",children:p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:p.jsx("tr",{children:["","Webhook","Status","Created","Completed","Actions"].map(g=>p.jsx("th",{className:"px-4 py-3 text-left font-semibold text-azure-text-secondary dark:text-matrix-dim",children:g},g))})}),p.jsx("tbody",{children:o.length===0?p.jsx("tr",{children:p.jsx("td",{colSpan:6,className:"px-4 py-10 text-center text-azure-text-secondary dark:text-matrix-dim",children:e?"No unread notifications.":"No notifications yet."})}):o.map(g=>p.jsxs("tr",{className:`border-b border-azure-border dark:border-matrix-primary/30 hover:bg-azure-surface/50 dark:hover:bg-zinc-800/50 transition-colors ${g.read?"":"bg-blue-50/40 dark:bg-blue-900/10"}`,children:[p.jsx("td",{className:"px-4 py-3 w-6",children:!g.read&&p.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500 dark:bg-matrix-highlight"})}),p.jsx("td",{className:"px-4 py-3 font-mono font-medium text-azure-text-primary dark:text-matrix-text",children:g.webhook_name}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Mw,{status:g.status})}),p.jsx("td",{className:"px-4 py-3 text-xs text-azure-text-secondary dark:text-matrix-dim whitespace-nowrap",children:wc(g.created_at)}),p.jsx("td",{className:"px-4 py-3 text-xs text-azure-text-secondary dark:text-matrix-dim whitespace-nowrap",children:g.completed_at?wc(g.completed_at):"—"}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{onClick:()=>h(g),title:"View details",className:"p-1.5 rounded hover:bg-azure-border dark:hover:bg-matrix-primary/30 text-azure-text-secondary dark:text-matrix-dim hover:text-azure-primary dark:hover:text-matrix-highlight transition-colors",children:p.jsx(rd,{className:"w-4 h-4"})})})]},g.id))})]})})}),p.jsxs(jr,{open:!!n,onOpenChange:g=>!g&&a(null),children:[p.jsx(Er,{children:p.jsxs(Cr,{className:"text-azure-text-primary dark:text-matrix-highlight flex items-center gap-2",children:[p.jsx(gl,{className:"w-4 h-4"}),n?.webhook_name]})}),n&&p.jsxs("div",{className:"p-6 space-y-4 overflow-y-auto max-h-[65vh]",children:[p.jsxs("div",{className:"flex items-center gap-4 text-xs text-azure-text-secondary dark:text-matrix-dim",children:[p.jsx(Mw,{status:n.status}),p.jsx("span",{children:wc(n.created_at)}),n.completed_at&&p.jsxs("span",{children:["→ ",wc(n.completed_at)]})]}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1.5",children:"Received Payload"}),p.jsx("pre",{className:"bg-azure-bg dark:bg-zinc-950 rounded-lg p-3 text-xs font-mono overflow-auto max-h-44 text-azure-text-primary dark:text-matrix-text border border-azure-border dark:border-matrix-primary/30 whitespace-pre-wrap",children:FH(n.payload)})]}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1.5",children:"Agent Result"}),p.jsx("div",{className:"bg-azure-bg dark:bg-zinc-950 rounded-lg p-3 text-xs font-mono overflow-auto max-h-64 text-azure-text-primary dark:text-matrix-text border border-azure-border dark:border-matrix-primary/30 whitespace-pre-wrap",children:n.result??p.jsx("span",{className:"text-yellow-600 dark:text-yellow-400 animate-pulse",children:"Processing…"})})]}),p.jsx("div",{className:"flex justify-end pt-2",children:p.jsx("button",{onClick:()=>a(null),className:"px-4 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-azure-text-secondary dark:text-matrix-dim text-sm hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:"Close"})})]})]})]})},GH={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},Sc={hidden:{opacity:0,y:8},show:{opacity:1,y:0}},YH={pending:"Pending",running:"Running",completed:"Completed",failed:"Failed",cancelled:"Cancelled"};function XH({status:e}){return e==="completed"?p.jsxs("span",{className:"inline-flex items-center gap-1 text-green-600 dark:text-green-400",children:[p.jsx(aS,{className:"w-4 h-4"}),"Completed"]}):e==="failed"?p.jsxs("span",{className:"inline-flex items-center gap-1 text-red-600 dark:text-red-400",children:[p.jsx(Pm,{className:"w-4 h-4"}),"Failed"]}):e==="running"?p.jsxs("span",{className:"inline-flex items-center gap-1 text-blue-600 dark:text-blue-400",children:[p.jsx(FN,{className:"w-4 h-4 animate-spin"}),"Running"]}):e==="cancelled"?p.jsxs("span",{className:"inline-flex items-center gap-1 text-zinc-500 dark:text-zinc-400",children:[p.jsx(Pm,{className:"w-4 h-4"}),"Cancelled"]}):p.jsxs("span",{className:"inline-flex items-center gap-1 text-yellow-600 dark:text-yellow-400",children:[p.jsx(nd,{className:"w-4 h-4"}),"Pending"]})}const Dw=e=>e?new Date(e).toLocaleString():"—";function KH(){const[e,t]=z.useState(""),[n,a]=z.useState(""),[o,u]=z.useState(""),[l,d]=z.useState(""),[f,h]=z.useState(null),g=z.useMemo(()=>({status:e||void 0,agent:n||void 0,origin_channel:o||void 0,session_id:l.trim()||void 0,limit:200}),[e,n,o,l]),{data:x}=an("/tasks/stats",()=>Nc.stats(),{refreshInterval:5e3}),{data:b=[],mutate:v}=an(["/tasks",g],()=>Nc.list(g),{refreshInterval:3e3});return p.jsxs(ot.div,{variants:GH,initial:"hidden",animate:"show",className:"space-y-6",children:[p.jsxs(ot.div,{variants:Sc,className:"flex items-center gap-3",children:[p.jsx(Vm,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Tasks"}),p.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-dim",children:"Async tasks delegated by Oracle and processed by workers."})]})]}),p.jsxs(ot.div,{variants:Sc,className:"grid grid-cols-2 md:grid-cols-6 gap-3",children:[p.jsx(wo,{label:"Pending",value:x?.pending??0}),p.jsx(wo,{label:"Running",value:x?.running??0}),p.jsx(wo,{label:"Completed",value:x?.completed??0}),p.jsx(wo,{label:"Failed",value:x?.failed??0}),p.jsx(wo,{label:"Cancelled",value:x?.cancelled??0}),p.jsx(wo,{label:"Total",value:x?.total??0})]}),p.jsxs(ot.div,{variants:Sc,className:"rounded-lg border border-azure-border dark:border-matrix-primary p-4 bg-azure-surface dark:bg-zinc-950 grid grid-cols-1 md:grid-cols-4 gap-3",children:[p.jsxs("select",{className:"px-3 py-2 rounded border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-900",value:e,onChange:w=>t(w.target.value||""),children:[p.jsx("option",{value:"",children:"All status"}),Object.entries(YH).map(([w,_])=>p.jsx("option",{value:w,children:_},w))]}),p.jsxs("select",{className:"px-3 py-2 rounded border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-900",value:n,onChange:w=>a(w.target.value||""),children:[p.jsx("option",{value:"",children:"All agents"}),p.jsx("option",{value:"apoc",children:"Apoc"}),p.jsx("option",{value:"neo",children:"Neo"})]}),p.jsxs("select",{className:"px-3 py-2 rounded border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-900",value:o,onChange:w=>u(w.target.value||""),children:[p.jsx("option",{value:"",children:"All channels"}),p.jsx("option",{value:"telegram",children:"Telegram"}),p.jsx("option",{value:"ui",children:"UI"}),p.jsx("option",{value:"api",children:"API"}),p.jsx("option",{value:"webhook",children:"Webhook"}),p.jsx("option",{value:"cli",children:"CLI"})]}),p.jsx("input",{className:"px-3 py-2 rounded border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-900",value:l,onChange:w=>d(w.target.value),placeholder:"Filter by session id"})]}),p.jsx(ot.div,{variants:Sc,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-x-auto",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:p.jsx("tr",{children:["Task ID","Status","Agent","Channel","Session","Attempts","Created","Finished","Actions"].map(w=>p.jsx("th",{className:"text-left px-4 py-3 font-semibold text-azure-text-secondary dark:text-matrix-dim",children:w},w))})}),p.jsx("tbody",{children:b.length===0?p.jsx("tr",{children:p.jsx("td",{colSpan:9,className:"px-4 py-10 text-center text-azure-text-secondary dark:text-matrix-dim",children:"No tasks found."})}):b.map(w=>p.jsxs("tr",{className:"border-b border-azure-border dark:border-matrix-primary/30 hover:bg-azure-surface/50 dark:hover:bg-zinc-900/40 transition-colors",children:[p.jsx("td",{className:"px-4 py-3 font-mono",children:w.id.slice(0,8)}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(XH,{status:w.status})}),p.jsx("td",{className:"px-4 py-3",children:w.agent.toUpperCase()}),p.jsx("td",{className:"px-4 py-3",children:w.origin_channel.toUpperCase()}),p.jsx("td",{className:"px-4 py-3 font-mono",children:w.session_id}),p.jsxs("td",{className:"px-4 py-3",children:[w.attempt_count,"/",w.max_attempts]}),p.jsx("td",{className:"px-4 py-3",children:Dw(w.created_at)}),p.jsx("td",{className:"px-4 py-3",children:Dw(w.finished_at)}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{onClick:()=>h(w),className:"p-1.5 rounded hover:bg-azure-border dark:hover:bg-matrix-primary/30 text-azure-text-secondary dark:text-matrix-dim",children:p.jsx(rd,{className:"w-4 h-4"})})})]},w.id))})]})}),p.jsxs(jr,{open:!!f,onOpenChange:w=>!w&&h(null),children:[p.jsx(Er,{children:p.jsx(Cr,{className:"text-azure-text-primary dark:text-matrix-highlight",children:"Task Details"})}),f&&p.jsxs("div",{className:"p-6 space-y-4 overflow-y-auto max-h-[70vh] text-sm",children:[p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-azure-text-secondary dark:text-matrix-dim",children:[p.jsxs("div",{children:[p.jsx("b",{children:"ID:"})," ",p.jsx("span",{className:"font-mono",children:f.id})]}),p.jsxs("div",{children:[p.jsx("b",{children:"Status:"})," ",f.status]}),p.jsxs("div",{children:[p.jsx("b",{children:"Agent:"})," ",f.agent]}),p.jsxs("div",{children:[p.jsx("b",{children:"Origin:"})," ",f.origin_channel]}),p.jsxs("div",{children:[p.jsx("b",{children:"Session:"})," ",p.jsx("span",{className:"font-mono",children:f.session_id})]}),p.jsxs("div",{children:[p.jsx("b",{children:"Attempts:"})," ",f.attempt_count,"/",f.max_attempts]})]}),p.jsxs("section",{children:[p.jsx("p",{className:"font-medium mb-1",children:"Input"}),p.jsx("pre",{className:"text-xs whitespace-pre-wrap rounded-lg border border-azure-border dark:border-matrix-primary/30 p-3 bg-azure-bg dark:bg-zinc-950",children:f.input})]}),f.output&&p.jsxs("section",{children:[p.jsx("p",{className:"font-medium mb-1",children:"Output"}),p.jsx("pre",{className:"text-xs whitespace-pre-wrap rounded-lg border border-azure-border dark:border-matrix-primary/30 p-3 bg-azure-bg dark:bg-zinc-950",children:f.output})]}),f.error&&p.jsxs("section",{children:[p.jsx("p",{className:"font-medium mb-1 text-red-600 dark:text-red-400",children:"Error"}),p.jsx("pre",{className:"text-xs whitespace-pre-wrap rounded-lg border border-red-200 dark:border-red-900/50 p-3 bg-red-50 dark:bg-red-950/40",children:f.error})]}),f.status==="failed"&&p.jsx("div",{className:"flex justify-end",children:p.jsx("button",{onClick:async()=>{await Nc.retry(f.id),h(null),await v()},className:"px-4 py-2 rounded-lg bg-azure-primary text-white dark:bg-matrix-highlight dark:text-black text-sm",children:"Retry Task"})})]})]})]})}function wo({label:e,value:t}){return p.jsxs("div",{className:"rounded-lg border border-azure-border dark:border-matrix-primary bg-azure-surface dark:bg-zinc-950 px-4 py-3",children:[p.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-dim",children:e}),p.jsx("p",{className:"text-xl font-semibold text-azure-text-primary dark:text-matrix-highlight",children:t})]})}function JH(){return p.jsx(FC,{children:p.jsxs(p0,{children:[p.jsx(fn,{path:"/login",element:p.jsx(vH,{})}),p.jsx(fn,{path:"/*",element:p.jsx(kH,{children:p.jsx(H3,{children:p.jsxs(p0,{children:[p.jsx(fn,{path:"/",element:p.jsx(G3,{})}),p.jsx(fn,{path:"/chat",element:p.jsx(xL,{})}),p.jsx(fn,{path:"/zaion",element:p.jsx(yH,{})}),p.jsx(fn,{path:"/logs",element:p.jsx(xH,{})}),p.jsx(fn,{path:"/stats",element:p.jsx(bH,{})}),p.jsx(fn,{path:"/sati-memories",element:p.jsx(AH,{})}),p.jsx(fn,{path:"/mcp-servers",element:p.jsx(LH,{})}),p.jsx(fn,{path:"/model-pricing",element:p.jsx(VH,{})}),p.jsx(fn,{path:"/webhooks",element:p.jsx(IH,{})}),p.jsx(fn,{path:"/notifications",element:p.jsx(qH,{})}),p.jsx(fn,{path:"/tasks",element:p.jsx(KH,{})}),p.jsx(fn,{path:"*",element:p.jsx(Xw,{to:"/",replace:!0})})]})})})})]})})}_E.createRoot(document.getElementById("root")).render(p.jsx(z.StrictMode,{children:p.jsx(JH,{})}));