morpheus-cli 0.4.4 → 0.4.6

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.
@@ -0,0 +1,112 @@
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 Np(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Th={exports:{}},Hs={};var Xv;function sC(){if(Xv)return Hs;Xv=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 Hs.Fragment=t,Hs.jsx=n,Hs.jsxs=n,Hs}var Kv;function lC(){return Kv||(Kv=1,Th.exports=sC()),Th.exports}var g=lC(),Eh={exports:{}},Ce={};var Jv;function uC(){if(Jv)return Ce;Jv=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"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),b=Symbol.iterator;function v(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,N={};function j(C,Y,T){this.props=C,this.context=Y,this.refs=N,this.updater=T||w}j.prototype.isReactComponent={},j.prototype.setState=function(C,Y){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,Y,"setState")},j.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function A(){}A.prototype=j.prototype;function _(C,Y,T){this.props=C,this.context=Y,this.refs=N,this.updater=T||w}var P=_.prototype=new A;P.constructor=_,E(P,j.prototype),P.isPureReactComponent=!0;var D=Array.isArray;function L(){}var G={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function J(C,Y,T){var se=T.ref;return{$$typeof:e,type:C,key:Y,ref:se!==void 0?se:null,props:T}}function ce(C,Y){return J(C.type,Y,C.props)}function $(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function ie(C){var Y={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(T){return Y[T]})}var te=/\/+/g;function oe(C,Y){return typeof C=="object"&&C!==null&&C.key!=null?ie(""+C.key):Y.toString(36)}function re(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(L,L):(C.status="pending",C.then(function(Y){C.status==="pending"&&(C.status="fulfilled",C.value=Y)},function(Y){C.status==="pending"&&(C.status="rejected",C.reason=Y)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function V(C,Y,T,se,ve){var ge=typeof C;(ge==="undefined"||ge==="boolean")&&(C=null);var ye=!1;if(C===null)ye=!0;else switch(ge){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(C.$$typeof){case e:case t:ye=!0;break;case p:return ye=C._init,V(ye(C._payload),Y,T,se,ve)}}if(ye)return ve=ve(C),ye=se===""?"."+oe(C,0):se,D(ve)?(T="",ye!=null&&(T=ye.replace(te,"$&/")+"/"),V(ve,Y,T,"",function(Nt){return Nt})):ve!=null&&($(ve)&&(ve=ce(ve,T+(ve.key==null||C&&C.key===ve.key?"":(""+ve.key).replace(te,"$&/")+"/")+ye)),Y.push(ve)),1;ye=0;var Ye=se===""?".":se+":";if(D(C))for(var De=0;De<C.length;De++)se=C[De],ge=Ye+oe(se,De),ye+=V(se,Y,T,ge,ve);else if(De=v(C),typeof De=="function")for(C=De.call(C),De=0;!(se=C.next()).done;)se=se.value,ge=Ye+oe(se,De++),ye+=V(se,Y,T,ge,ve);else if(ge==="object"){if(typeof C.then=="function")return V(re(C),Y,T,se,ve);throw Y=String(C),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ye}function X(C,Y,T){if(C==null)return C;var se=[],ve=0;return V(C,se,"","",function(ge){return Y.call(T,ge,ve++)}),se}function B(C){if(C._status===-1){var Y=C._result;Y=Y(),Y.then(function(T){(C._status===0||C._status===-1)&&(C._status=1,C._result=T)},function(T){(C._status===0||C._status===-1)&&(C._status=2,C._result=T)}),C._status===-1&&(C._status=0,C._result=Y)}if(C._status===1)return C._result.default;throw C._result}var de=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},O={map:X,forEach:function(C,Y,T){X(C,function(){Y.apply(this,arguments)},T)},count:function(C){var Y=0;return X(C,function(){Y++}),Y},toArray:function(C){return X(C,function(Y){return Y})||[]},only:function(C){if(!$(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Ce.Activity=x,Ce.Children=O,Ce.Component=j,Ce.Fragment=n,Ce.Profiler=o,Ce.PureComponent=_,Ce.StrictMode=a,Ce.Suspense=f,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(C){return G.H.useMemoCache(C)}},Ce.cache=function(C){return function(){return C.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(C,Y,T){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var se=E({},C.props),ve=C.key;if(Y!=null)for(ge in Y.key!==void 0&&(ve=""+Y.key),Y)!Z.call(Y,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&Y.ref===void 0||(se[ge]=Y[ge]);var ge=arguments.length-2;if(ge===1)se.children=T;else if(1<ge){for(var ye=Array(ge),Ye=0;Ye<ge;Ye++)ye[Ye]=arguments[Ye+2];se.children=ye}return J(C.type,ve,se)},Ce.createContext=function(C){return C={$$typeof:l,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},Ce.createElement=function(C,Y,T){var se,ve={},ge=null;if(Y!=null)for(se in Y.key!==void 0&&(ge=""+Y.key),Y)Z.call(Y,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ve[se]=Y[se]);var ye=arguments.length-2;if(ye===1)ve.children=T;else if(1<ye){for(var Ye=Array(ye),De=0;De<ye;De++)Ye[De]=arguments[De+2];ve.children=Ye}if(C&&C.defaultProps)for(se in ye=C.defaultProps,ye)ve[se]===void 0&&(ve[se]=ye[se]);return J(C,ge,ve)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(C){return{$$typeof:d,render:C}},Ce.isValidElement=$,Ce.lazy=function(C){return{$$typeof:p,_payload:{_status:-1,_result:C},_init:B}},Ce.memo=function(C,Y){return{$$typeof:h,type:C,compare:Y===void 0?null:Y}},Ce.startTransition=function(C){var Y=G.T,T={};G.T=T;try{var se=C(),ve=G.S;ve!==null&&ve(T,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(L,de)}catch(ge){de(ge)}finally{Y!==null&&T.types!==null&&(Y.types=T.types),G.T=Y}},Ce.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Ce.use=function(C){return G.H.use(C)},Ce.useActionState=function(C,Y,T){return G.H.useActionState(C,Y,T)},Ce.useCallback=function(C,Y){return G.H.useCallback(C,Y)},Ce.useContext=function(C){return G.H.useContext(C)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(C,Y){return G.H.useDeferredValue(C,Y)},Ce.useEffect=function(C,Y){return G.H.useEffect(C,Y)},Ce.useEffectEvent=function(C){return G.H.useEffectEvent(C)},Ce.useId=function(){return G.H.useId()},Ce.useImperativeHandle=function(C,Y,T){return G.H.useImperativeHandle(C,Y,T)},Ce.useInsertionEffect=function(C,Y){return G.H.useInsertionEffect(C,Y)},Ce.useLayoutEffect=function(C,Y){return G.H.useLayoutEffect(C,Y)},Ce.useMemo=function(C,Y){return G.H.useMemo(C,Y)},Ce.useOptimistic=function(C,Y){return G.H.useOptimistic(C,Y)},Ce.useReducer=function(C,Y,T){return G.H.useReducer(C,Y,T)},Ce.useRef=function(C){return G.H.useRef(C)},Ce.useState=function(C){return G.H.useState(C)},Ce.useSyncExternalStore=function(C,Y,T){return G.H.useSyncExternalStore(C,Y,T)},Ce.useTransition=function(){return G.H.useTransition()},Ce.version="19.2.4",Ce}var Qv;function Xc(){return Qv||(Qv=1,Eh.exports=uC()),Eh.exports}var z=Xc();const Ap=Np(z);var Ch={exports:{}},Fs={},jh={exports:{}},Nh={};var Wv;function cC(){return Wv||(Wv=1,(function(e){function t(V,X){var B=V.length;V.push(X);e:for(;0<B;){var de=B-1>>>1,O=V[de];if(0<o(O,X))V[de]=X,V[B]=O,B=de;else break e}}function n(V){return V.length===0?null:V[0]}function a(V){if(V.length===0)return null;var X=V[0],B=V.pop();if(B!==X){V[0]=B;e:for(var de=0,O=V.length,C=O>>>1;de<C;){var Y=2*(de+1)-1,T=V[Y],se=Y+1,ve=V[se];if(0>o(T,B))se<O&&0>o(ve,T)?(V[de]=ve,V[se]=B,de=se):(V[de]=T,V[Y]=B,de=Y);else if(se<O&&0>o(ve,B))V[de]=ve,V[se]=B,de=se;else break e}}return X}function o(V,X){var B=V.sortIndex-X.sortIndex;return B!==0?B:V.id-X.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=[],p=1,x=null,b=3,v=!1,w=!1,E=!1,N=!1,j=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function P(V){for(var X=n(h);X!==null;){if(X.callback===null)a(h);else if(X.startTime<=V)a(h),X.sortIndex=X.expirationTime,t(f,X);else break;X=n(h)}}function D(V){if(E=!1,P(V),!w)if(n(f)!==null)w=!0,L||(L=!0,ie());else{var X=n(h);X!==null&&re(D,X.startTime-V)}}var L=!1,G=-1,Z=5,J=-1;function ce(){return N?!0:!(e.unstable_now()-J<Z)}function $(){if(N=!1,L){var V=e.unstable_now();J=V;var X=!0;try{e:{w=!1,E&&(E=!1,A(G),G=-1),v=!0;var B=b;try{t:{for(P(V),x=n(f);x!==null&&!(x.expirationTime>V&&ce());){var de=x.callback;if(typeof de=="function"){x.callback=null,b=x.priorityLevel;var O=de(x.expirationTime<=V);if(V=e.unstable_now(),typeof O=="function"){x.callback=O,P(V),X=!0;break t}x===n(f)&&a(f),P(V)}else a(f);x=n(f)}if(x!==null)X=!0;else{var C=n(h);C!==null&&re(D,C.startTime-V),X=!1}}break e}finally{x=null,b=B,v=!1}X=void 0}}finally{X?ie():L=!1}}}var ie;if(typeof _=="function")ie=function(){_($)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,oe=te.port2;te.port1.onmessage=$,ie=function(){oe.postMessage(null)}}else ie=function(){j($,0)};function re(V,X){G=j(function(){V(e.unstable_now())},X)}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(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(V){switch(b){case 1:case 2:case 3:var X=3;break;default:X=b}var B=b;b=X;try{return V()}finally{b=B}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(V,X){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var B=b;b=V;try{return X()}finally{b=B}},e.unstable_scheduleCallback=function(V,X,B){var de=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?de+B:de):B=de,V){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=B+O,V={id:p++,callback:X,priorityLevel:V,startTime:B,expirationTime:O,sortIndex:-1},B>de?(V.sortIndex=B,t(h,V),n(f)===null&&V===n(h)&&(E?(A(G),G=-1):E=!0,re(D,B-de))):(V.sortIndex=O,t(f,V),w||v||(w=!0,L||(L=!0,ie()))),V},e.unstable_shouldYield=ce,e.unstable_wrapCallback=function(V){var X=b;return function(){var B=b;b=X;try{return V.apply(this,arguments)}finally{b=B}}}})(Nh)),Nh}var e0;function dC(){return e0||(e0=1,jh.exports=cC()),jh.exports}var Ah={exports:{}},nn={};var t0;function fC(){if(t0)return nn;t0=1;var e=Xc();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}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,p){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:p}}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 p=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,p)},nn.flushSync=function(f){var h=l.T,p=a.p;try{if(l.T=null,a.p=2,f)return f()}finally{l.T=h,a.p=p,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 p=h.as,x=d(p,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:b,fetchPriority:v}):p==="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 p=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:p,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 p=h.as,x=d(p,h.crossOrigin);a.d.L(f,p,{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 p=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,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,p){return l.H.useFormState(f,h,p)},nn.useFormStatus=function(){return l.H.useHostTransitionStatus()},nn.version="19.2.4",nn}var n0;function hC(){if(n0)return Ah.exports;n0=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(),Ah.exports=fC(),Ah.exports}var r0;function mC(){if(r0)return Fs;r0=1;var e=dC(),t=Xc(),n=hC();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 p(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=p(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"),E=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),_=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),ce=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function ie(r){return r===null||typeof r!="object"?null:(r=$&&r[$]||r["@@iterator"],typeof r=="function"?r:null)}var te=Symbol.for("react.client.reference");function oe(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 E:return"Fragment";case j:return"Profiler";case N:return"StrictMode";case D:return"Suspense";case L:return"SuspenseList";case J:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case _:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case P:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case G:return i=r.displayName||null,i!==null?i:oe(r.type)||"Memo";case Z:i=r._payload,r=r._init;try{return oe(r(i))}catch{}}return null}var re=Array.isArray,V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},de=[],O=-1;function C(r){return{current:r}}function Y(r){0>O||(r.current=de[O],de[O]=null,O--)}function T(r,i){O++,de[O]=r.current,r.current=i}var se=C(null),ve=C(null),ge=C(null),ye=C(null);function Ye(r,i){switch(T(ge,i),T(ve,r),T(se,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?xv(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=xv(i),r=bv(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Y(se),T(se,r)}function De(){Y(se),Y(ve),Y(ge)}function Nt(r){r.memoizedState!==null&&T(ye,r);var i=se.current,s=bv(i,r.type);i!==s&&(T(ve,r),T(se,s))}function sn(r){ve.current===r&&(Y(se),Y(ve)),ye.current===r&&(Y(ye),Vs._currentValue=B)}var Vn,pr;function Zn(r){if(Vn===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Vn=i&&i[1]||"",pr=-1<s.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Vn+r+pr}var Ga=!1;function Be(r,i){if(!r||Ga)return"";Ga=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(q){var F=q}Reflect.construct(r,[],ne)}else{try{ne.call()}catch(q){F=q}r.call(ne.prototype)}}else{try{throw Error()}catch(q){F=q}(ne=r())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(q){if(q&&F&&typeof q.stack=="string")return[q.stack,F.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 R=k.split(`
4
+ `),H=S.split(`
5
+ `);for(m=c=0;c<R.length&&!R[c].includes("DetermineComponentFrameRoot");)c++;for(;m<H.length&&!H[m].includes("DetermineComponentFrameRoot");)m++;if(c===R.length||m===H.length)for(c=R.length-1,m=H.length-1;1<=c&&0<=m&&R[c]!==H[m];)m--;for(;1<=c&&0<=m;c--,m--)if(R[c]!==H[m]){if(c!==1||m!==1)do if(c--,m--,0>m||R[c]!==H[m]){var K=`
6
+ `+R[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{Ga=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?Zn(s):""}function rt(r,i){switch(r.tag){case 26:case 27:case 5:return Zn(r.type);case 16:return Zn("Lazy");case 13:return r.child!==i&&i!==null?Zn("Suspense Fallback"):Zn("Suspense");case 19:return Zn("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 Zn("Activity");default:return""}}function lt(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,Ft=e.unstable_scheduleCallback,Bn=e.unstable_cancelCallback,Et=e.unstable_shouldYield,Vt=e.unstable_requestPaint,ut=e.unstable_now,Ni=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,ue=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,_e=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,ln=e.log,Cn=e.unstable_setDisableYieldValue,un=null,Zt=null;function pn(r){if(typeof ln=="function"&&Cn(r),Zt&&typeof Zt.setStrictMode=="function")try{Zt.setStrictMode(un,r)}catch{}}var at=Math.clz32?Math.clz32:G2,ra=Math.log,sr=Math.LN2;function G2(r){return r>>>=0,r===0?32:31-(ra(r)/sr|0)|0}var Ul=256,Pl=262144,Vl=4194304;function Ya(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 Zl(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=Ya(c):(k&=S,k!==0?m=Ya(k):s||(s=S&~r,s!==0&&(m=Ya(s))))):(S=c&~y,S!==0?m=Ya(S):k!==0?m=Ya(k):s||(s=c&~r,s!==0&&(m=Ya(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 Wo(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function Y2(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 Wg(){var r=Vl;return Vl<<=1,(Vl&62914560)===0&&(Vl=4194304),r}function hd(r){for(var i=[],s=0;31>s;s++)i.push(r);return i}function es(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function X2(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,R=r.expirationTimes,H=r.hiddenUpdates;for(s=k&~s;0<s;){var K=31-at(s),ne=1<<K;S[K]=0,R[K]=-1;var F=H[K];if(F!==null)for(H[K]=null,K=0;K<F.length;K++){var q=F[K];q!==null&&(q.lane&=-536870913)}s&=~ne}c!==0&&ey(r,c,0),y!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=y&~(k&~i))}function ey(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 ty(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 ny(r,i){var s=i&-i;return s=(s&42)!==0?1:md(s),(s&(r.suspendedLanes|i))!==0?0:s}function md(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 pd(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function ry(){var r=X.p;return r!==0?r:(r=window.event,r===void 0?32:Bv(r.type))}function ay(r,i){var s=X.p;try{return X.p=r,i()}finally{X.p=s}}var aa=Math.random().toString(36).slice(2),Xt="__reactFiber$"+aa,gn="__reactProps$"+aa,Ai="__reactContainer$"+aa,gd="__reactEvents$"+aa,K2="__reactListeners$"+aa,J2="__reactHandles$"+aa,iy="__reactResources$"+aa,ts="__reactMarker$"+aa;function yd(r){delete r[Xt],delete r[gn],delete r[gd],delete r[K2],delete r[J2]}function Oi(r){var i=r[Xt];if(i)return i;for(var s=r.parentNode;s;){if(i=s[Ai]||s[Xt]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(r=Tv(r);r!==null;){if(s=r[Xt])return s;r=Tv(r)}return i}r=s,s=r.parentNode}return null}function Ri(r){if(r=r[Xt]||r[Ai]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function ns(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Mi(r){var i=r[iy];return i||(i=r[iy]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function qt(r){r[ts]=!0}var oy=new Set,sy={};function Xa(r,i){Di(r,i),Di(r+"Capture",i)}function Di(r,i){for(sy[r]=i,r=0;r<i.length;r++)oy.add(i[r])}var Q2=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]*$"),ly={},uy={};function W2(r){return Qe.call(uy,r)?!0:Qe.call(ly,r)?!1:Q2.test(r)?uy[r]=!0:(ly[r]=!0,!1)}function Bl(r,i,s){if(W2(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 Il(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 jr(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 In(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function cy(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function eT(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 xd(r){if(!r._valueTracker){var i=cy(r)?"checked":"value";r._valueTracker=eT(r,i,""+r[i])}}function dy(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return r&&(c=cy(r)?r.checked?"true":"false":r.value),r=c,r!==s?(i.setValue(r),!0):!1}function Hl(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 tT=/[\n"\\]/g;function Hn(r){return r.replace(tT,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function bd(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=""+In(i)):r.value!==""+In(i)&&(r.value=""+In(i)):k!=="submit"&&k!=="reset"||r.removeAttribute("value"),i!=null?vd(r,k,In(i)):s!=null?vd(r,k,In(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=""+In(S):r.removeAttribute("name")}function fy(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)){xd(r);return}s=s!=null?""+In(s):"",i=i!=null?""+In(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),xd(r)}function vd(r,i,s){i==="number"&&Hl(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function $i(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=""+In(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 hy(r,i,s){if(i!=null&&(i=""+In(i),i!==r.value&&(r.value=i),s==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=s!=null?""+In(s):""}function my(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=In(i),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),xd(r)}function Li(r,i){if(i){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=i;return}}r.textContent=i}var nT=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 py(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||nT.has(i)?i==="float"?r.cssFloat=s:r[i]=(""+s).trim():r[i]=s+"px"}function gy(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&&py(r,m,c)}else for(var y in i)i.hasOwnProperty(y)&&py(r,y,i[y])}function kd(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 rT=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"]]),aT=/^[\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 Fl(r){return aT.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Nr(){}var Sd=null;function wd(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ui=null,Pi=null;function yy(r){var i=Ri(r);if(i&&(r=i.stateNode)){var s=r[gn]||null;e:switch(r=i.stateNode,i.type){case"input":if(bd(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="'+Hn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==r&&c.form===r.form){var m=c[gn]||null;if(!m)throw Error(a(90));bd(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&&dy(c)}break e;case"textarea":hy(r,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&$i(r,!!s.multiple,i,!1)}}}var zd=!1;function xy(r,i,s){if(zd)return r(i,s);zd=!0;try{var c=r(i);return c}finally{if(zd=!1,(Ui!==null||Pi!==null)&&(Ou(),Ui&&(i=Ui,r=Pi,Pi=Ui=null,yy(i),r)))for(i=0;i<r.length;i++)yy(r[i])}}function rs(r,i){var s=r.stateNode;if(s===null)return null;var c=s[gn]||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 Ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_d=!1;if(Ar)try{var as={};Object.defineProperty(as,"passive",{get:function(){_d=!0}}),window.addEventListener("test",as,as),window.removeEventListener("test",as,as)}catch{_d=!1}var ia=null,Td=null,ql=null;function by(){if(ql)return ql;var r,i=Td,s=i.length,c,m="value"in ia?ia.value:ia.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 ql=m.slice(r,1<c?1-c:void 0)}function Gl(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 Yl(){return!0}function vy(){return!1}function yn(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)?Yl:vy,this.isPropagationStopped=vy,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=Yl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Yl)},persist:function(){},isPersistent:Yl}),i}var Ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xl=yn(Ka),is=x({},Ka,{view:0,detail:0}),iT=yn(is),Ed,Cd,os,Kl=x({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nd,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!==os&&(os&&r.type==="mousemove"?(Ed=r.screenX-os.screenX,Cd=r.screenY-os.screenY):Cd=Ed=0,os=r),Ed)},movementY:function(r){return"movementY"in r?r.movementY:Cd}}),ky=yn(Kl),oT=x({},Kl,{dataTransfer:0}),sT=yn(oT),lT=x({},is,{relatedTarget:0}),jd=yn(lT),uT=x({},Ka,{animationName:0,elapsedTime:0,pseudoElement:0}),cT=yn(uT),dT=x({},Ka,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),fT=yn(dT),hT=x({},Ka,{data:0}),Sy=yn(hT),mT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pT={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"},gT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yT(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=gT[r])?!!i[r]:!1}function Nd(){return yT}var xT=x({},is,{key:function(r){if(r.key){var i=mT[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Gl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?pT[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nd,charCode:function(r){return r.type==="keypress"?Gl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Gl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),bT=yn(xT),vT=x({},Kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wy=yn(vT),kT=x({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nd}),ST=yn(kT),wT=x({},Ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),zT=yn(wT),_T=x({},Kl,{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}),TT=yn(_T),ET=x({},Ka,{newState:0,oldState:0}),CT=yn(ET),jT=[9,13,27,32],Ad=Ar&&"CompositionEvent"in window,ss=null;Ar&&"documentMode"in document&&(ss=document.documentMode);var NT=Ar&&"TextEvent"in window&&!ss,zy=Ar&&(!Ad||ss&&8<ss&&11>=ss),_y=" ",Ty=!1;function Ey(r,i){switch(r){case"keyup":return jT.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cy(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Vi=!1;function AT(r,i){switch(r){case"compositionend":return Cy(i);case"keypress":return i.which!==32?null:(Ty=!0,_y);case"textInput":return r=i.data,r===_y&&Ty?null:r;default:return null}}function OT(r,i){if(Vi)return r==="compositionend"||!Ad&&Ey(r,i)?(r=by(),ql=Td=ia=null,Vi=!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 zy&&i.locale!=="ko"?null:i.data;default:return null}}var RT={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 jy(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!RT[r.type]:i==="textarea"}function Ny(r,i,s,c){Ui?Pi?Pi.push(c):Pi=[c]:Ui=c,i=Pu(i,"onChange"),0<i.length&&(s=new Xl("onChange","change",null,s,c),r.push({event:s,listeners:i}))}var ls=null,us=null;function MT(r){fv(r,0)}function Jl(r){var i=ns(r);if(dy(i))return r}function Ay(r,i){if(r==="change")return i}var Oy=!1;if(Ar){var Od;if(Ar){var Rd="oninput"in document;if(!Rd){var Ry=document.createElement("div");Ry.setAttribute("oninput","return;"),Rd=typeof Ry.oninput=="function"}Od=Rd}else Od=!1;Oy=Od&&(!document.documentMode||9<document.documentMode)}function My(){ls&&(ls.detachEvent("onpropertychange",Dy),us=ls=null)}function Dy(r){if(r.propertyName==="value"&&Jl(us)){var i=[];Ny(i,us,r,wd(r)),xy(MT,i)}}function DT(r,i,s){r==="focusin"?(My(),ls=i,us=s,ls.attachEvent("onpropertychange",Dy)):r==="focusout"&&My()}function $T(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Jl(us)}function LT(r,i){if(r==="click")return Jl(i)}function UT(r,i){if(r==="input"||r==="change")return Jl(i)}function PT(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var jn=typeof Object.is=="function"?Object.is:PT;function cs(r,i){if(jn(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)||!jn(r[m],i[m]))return!1}return!0}function $y(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Ly(r,i){var s=$y(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=$y(s)}}function Uy(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Uy(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Py(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Hl(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=Hl(r.document)}return i}function Md(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 VT=Ar&&"documentMode"in document&&11>=document.documentMode,Zi=null,Dd=null,ds=null,$d=!1;function Vy(r,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;$d||Zi==null||Zi!==Hl(c)||(c=Zi,"selectionStart"in c&&Md(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}),ds&&cs(ds,c)||(ds=c,c=Pu(Dd,"onSelect"),0<c.length&&(i=new Xl("onSelect","select",null,i,s),r.push({event:i,listeners:c}),i.target=Zi)))}function Ja(r,i){var s={};return s[r.toLowerCase()]=i.toLowerCase(),s["Webkit"+r]="webkit"+i,s["Moz"+r]="moz"+i,s}var Bi={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionrun:Ja("Transition","TransitionRun"),transitionstart:Ja("Transition","TransitionStart"),transitioncancel:Ja("Transition","TransitionCancel"),transitionend:Ja("Transition","TransitionEnd")},Ld={},Zy={};Ar&&(Zy=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);function Qa(r){if(Ld[r])return Ld[r];if(!Bi[r])return r;var i=Bi[r],s;for(s in i)if(i.hasOwnProperty(s)&&s in Zy)return Ld[r]=i[s];return r}var By=Qa("animationend"),Iy=Qa("animationiteration"),Hy=Qa("animationstart"),ZT=Qa("transitionrun"),BT=Qa("transitionstart"),IT=Qa("transitioncancel"),Fy=Qa("transitionend"),qy=new Map,Ud="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(" ");Ud.push("scrollEnd");function lr(r,i){qy.set(r,i),Xa(i,[r])}var Ql=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)},Fn=[],Ii=0,Pd=0;function Wl(){for(var r=Ii,i=Pd=Ii=0;i<r;){var s=Fn[i];Fn[i++]=null;var c=Fn[i];Fn[i++]=null;var m=Fn[i];Fn[i++]=null;var y=Fn[i];if(Fn[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&&Gy(s,m,y)}}function eu(r,i,s,c){Fn[Ii++]=r,Fn[Ii++]=i,Fn[Ii++]=s,Fn[Ii++]=c,Pd|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Vd(r,i,s,c){return eu(r,i,s,c),tu(r)}function Wa(r,i){return eu(r,null,null,i),tu(r)}function Gy(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 tu(r){if(50<Rs)throw Rs=0,Kf=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Hi={};function HT(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 Nn(r,i,s,c){return new HT(r,i,s,c)}function Zd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Or(r,i){var s=r.alternate;return s===null?(s=Nn(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 Yy(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 nu(r,i,s,c,m,y){var k=0;if(c=r,typeof r=="function")Zd(r)&&(k=1);else if(typeof r=="string")k=XE(r,s,se.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case J:return r=Nn(31,s,i,m),r.elementType=J,r.lanes=y,r;case E:return ei(s.children,m,y,i);case N:k=8,m|=24;break;case j:return r=Nn(12,s,i,m|2),r.elementType=j,r.lanes=y,r;case D:return r=Nn(13,s,i,m),r.elementType=D,r.lanes=y,r;case L:return r=Nn(19,s,i,m),r.elementType=L,r.lanes=y,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case _:k=10;break e;case A:k=9;break e;case P:k=11;break e;case G:k=14;break e;case Z:k=16,c=null;break e}k=29,s=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=Nn(k,s,i,m),i.elementType=r,i.type=c,i.lanes=y,i}function ei(r,i,s,c){return r=Nn(7,r,c,i),r.lanes=s,r}function Bd(r,i,s){return r=Nn(6,r,null,i),r.lanes=s,r}function Xy(r){var i=Nn(18,null,null,0);return i.stateNode=r,i}function Id(r,i,s){return i=Nn(4,r.children!==null?r.children:[],r.key,i),i.lanes=s,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var Ky=new WeakMap;function qn(r,i){if(typeof r=="object"&&r!==null){var s=Ky.get(r);return s!==void 0?s:(i={value:r,source:i,stack:lt(i)},Ky.set(r,i),i)}return{value:r,source:i,stack:lt(i)}}var Fi=[],qi=0,ru=null,fs=0,Gn=[],Yn=0,oa=null,gr=1,yr="";function Rr(r,i){Fi[qi++]=fs,Fi[qi++]=ru,ru=r,fs=i}function Jy(r,i,s){Gn[Yn++]=gr,Gn[Yn++]=yr,Gn[Yn++]=oa,oa=r;var c=gr;r=yr;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,gr=1<<32-at(i)+m|s<<m|c,yr=y+r}else gr=1<<y|s<<m|c,yr=r}function Hd(r){r.return!==null&&(Rr(r,1),Jy(r,1,0))}function Fd(r){for(;r===ru;)ru=Fi[--qi],Fi[qi]=null,fs=Fi[--qi],Fi[qi]=null;for(;r===oa;)oa=Gn[--Yn],Gn[Yn]=null,yr=Gn[--Yn],Gn[Yn]=null,gr=Gn[--Yn],Gn[Yn]=null}function Qy(r,i){Gn[Yn++]=gr,Gn[Yn++]=yr,Gn[Yn++]=oa,gr=i.id,yr=i.overflow,oa=r}var Kt=null,ct=null,Ue=!1,sa=null,Xn=!1,qd=Error(a(519));function la(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hs(qn(i,r)),qd}function Wy(r){var i=r.stateNode,s=r.type,c=r.memoizedProps;switch(i[Xt]=r,i[gn]=c,s){case"dialog":Me("cancel",i),Me("close",i);break;case"iframe":case"object":case"embed":Me("load",i);break;case"video":case"audio":for(s=0;s<Ds.length;s++)Me(Ds[s],i);break;case"source":Me("error",i);break;case"img":case"image":case"link":Me("error",i),Me("load",i);break;case"details":Me("toggle",i);break;case"input":Me("invalid",i),fy(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Me("invalid",i);break;case"textarea":Me("invalid",i),my(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||gv(i.textContent,s)?(c.popover!=null&&(Me("beforetoggle",i),Me("toggle",i)),c.onScroll!=null&&Me("scroll",i),c.onScrollEnd!=null&&Me("scrollend",i),c.onClick!=null&&(i.onclick=Nr),i=!0):i=!1,i||la(r,!0)}function ex(r){for(Kt=r.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:Xn=!1;return;case 27:case 3:Xn=!0;return;default:Kt=Kt.return}}function Gi(r){if(r!==Kt)return!1;if(!Ue)return ex(r),Ue=!0,!1;var i=r.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||dh(r.type,r.memoizedProps)),s=!s),s&&ct&&la(r),ex(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));ct=_v(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));ct=_v(r)}else i===27?(i=ct,Sa(r.type)?(r=gh,gh=null,ct=r):ct=i):ct=Kt?Jn(r.stateNode.nextSibling):null;return!0}function ti(){ct=Kt=null,Ue=!1}function Gd(){var r=sa;return r!==null&&(kn===null?kn=r:kn.push.apply(kn,r),sa=null),r}function hs(r){sa===null?sa=[r]:sa.push(r)}var Yd=C(null),ni=null,Mr=null;function ua(r,i,s){T(Yd,i._currentValue),i._currentValue=s}function Dr(r){r._currentValue=Yd.current,Y(Yd)}function Xd(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 Kd(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 R=0;R<i.length;R++)if(S.context===i[R]){y.lanes|=s,S=y.alternate,S!==null&&(S.lanes|=s),Xd(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),Xd(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 Yi(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;jn(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(Vs):r=[Vs])}m=m.return}r!==null&&Kd(i,r,s,c),i.flags|=262144}function au(r){for(r=r.firstContext;r!==null;){if(!jn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ri(r){ni=r,Mr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Jt(r){return tx(ni,r)}function iu(r,i){return ni===null&&ri(r),tx(r,i)}function tx(r,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Mr===null){if(r===null)throw Error(a(308));Mr=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Mr=Mr.next=i;return s}var FT=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()})}},qT=e.unstable_scheduleCallback,GT=e.unstable_NormalPriority,At={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jd(){return{controller:new FT,data:new Map,refCount:0}}function ms(r){r.refCount--,r.refCount===0&&qT(GT,function(){r.controller.abort()})}var ps=null,Qd=0,Xi=0,Ki=null;function YT(r,i){if(ps===null){var s=ps=[];Qd=0,Xi=nh(),Ki={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Qd++,i.then(nx,nx),i}function nx(){if(--Qd===0&&ps!==null){Ki!==null&&(Ki.status="fulfilled");var r=ps;ps=null,Xi=0,Ki=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function XT(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 rx=V.S;V.S=function(r,i){Vb=ut(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&YT(r,i),rx!==null&&rx(r,i)};var ai=C(null);function Wd(){var r=ai.current;return r!==null?r:it.pooledCache}function ou(r,i){i===null?T(ai,ai.current):T(ai,i.pool)}function ax(){var r=Wd();return r===null?null:{parent:At._currentValue,pool:r}}var Ji=Error(a(460)),ef=Error(a(474)),su=Error(a(542)),lu={then:function(){}};function ix(r){return r=r.status,r==="fulfilled"||r==="rejected"}function ox(r,i,s){switch(s=r[s],s===void 0?r.push(i):s!==i&&(i.then(Nr,Nr),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,lx(r),r;default:if(typeof i.status=="string")i.then(Nr,Nr);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,lx(r),r}throw oi=i,Ji}}function ii(r){try{var i=r._init;return i(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(oi=s,Ji):s}}var oi=null;function sx(){if(oi===null)throw Error(a(459));var r=oi;return oi=null,r}function lx(r){if(r===Ji||r===su)throw Error(a(483))}var Qi=null,gs=0;function uu(r){var i=gs;return gs+=1,Qi===null&&(Qi=[]),ox(Qi,r,i)}function ys(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function cu(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 ux(r){function i(U,M){if(r){var I=U.deletions;I===null?(U.deletions=[M],U.flags|=16):I.push(M)}}function s(U,M){if(!r)return null;for(;M!==null;)i(U,M),M=M.sibling;return null}function c(U){for(var M=new Map;U!==null;)U.key!==null?M.set(U.key,U):M.set(U.index,U),U=U.sibling;return M}function m(U,M){return U=Or(U,M),U.index=0,U.sibling=null,U}function y(U,M,I){return U.index=I,r?(I=U.alternate,I!==null?(I=I.index,I<M?(U.flags|=67108866,M):I):(U.flags|=67108866,M)):(U.flags|=1048576,M)}function k(U){return r&&U.alternate===null&&(U.flags|=67108866),U}function S(U,M,I,ee){return M===null||M.tag!==6?(M=Bd(I,U.mode,ee),M.return=U,M):(M=m(M,I),M.return=U,M)}function R(U,M,I,ee){var Se=I.type;return Se===E?K(U,M,I.props.children,ee,I.key):M!==null&&(M.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===Z&&ii(Se)===M.type)?(M=m(M,I.props),ys(M,I),M.return=U,M):(M=nu(I.type,I.key,I.props,null,U.mode,ee),ys(M,I),M.return=U,M)}function H(U,M,I,ee){return M===null||M.tag!==4||M.stateNode.containerInfo!==I.containerInfo||M.stateNode.implementation!==I.implementation?(M=Id(I,U.mode,ee),M.return=U,M):(M=m(M,I.children||[]),M.return=U,M)}function K(U,M,I,ee,Se){return M===null||M.tag!==7?(M=ei(I,U.mode,ee,Se),M.return=U,M):(M=m(M,I),M.return=U,M)}function ne(U,M,I){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Bd(""+M,U.mode,I),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return I=nu(M.type,M.key,M.props,null,U.mode,I),ys(I,M),I.return=U,I;case w:return M=Id(M,U.mode,I),M.return=U,M;case Z:return M=ii(M),ne(U,M,I)}if(re(M)||ie(M))return M=ei(M,U.mode,I,null),M.return=U,M;if(typeof M.then=="function")return ne(U,uu(M),I);if(M.$$typeof===_)return ne(U,iu(U,M),I);cu(U,M)}return null}function F(U,M,I,ee){var Se=M!==null?M.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return Se!==null?null:S(U,M,""+I,ee);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case v:return I.key===Se?R(U,M,I,ee):null;case w:return I.key===Se?H(U,M,I,ee):null;case Z:return I=ii(I),F(U,M,I,ee)}if(re(I)||ie(I))return Se!==null?null:K(U,M,I,ee,null);if(typeof I.then=="function")return F(U,M,uu(I),ee);if(I.$$typeof===_)return F(U,M,iu(U,I),ee);cu(U,I)}return null}function q(U,M,I,ee,Se){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return U=U.get(I)||null,S(M,U,""+ee,Se);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case v:return U=U.get(ee.key===null?I:ee.key)||null,R(M,U,ee,Se);case w:return U=U.get(ee.key===null?I:ee.key)||null,H(M,U,ee,Se);case Z:return ee=ii(ee),q(U,M,I,ee,Se)}if(re(ee)||ie(ee))return U=U.get(I)||null,K(M,U,ee,Se,null);if(typeof ee.then=="function")return q(U,M,I,uu(ee),Se);if(ee.$$typeof===_)return q(U,M,I,iu(M,ee),Se);cu(M,ee)}return null}function fe(U,M,I,ee){for(var Se=null,Ie=null,be=M,Ne=M=0,Le=null;be!==null&&Ne<I.length;Ne++){be.index>Ne?(Le=be,be=null):Le=be.sibling;var He=F(U,be,I[Ne],ee);if(He===null){be===null&&(be=Le);break}r&&be&&He.alternate===null&&i(U,be),M=y(He,M,Ne),Ie===null?Se=He:Ie.sibling=He,Ie=He,be=Le}if(Ne===I.length)return s(U,be),Ue&&Rr(U,Ne),Se;if(be===null){for(;Ne<I.length;Ne++)be=ne(U,I[Ne],ee),be!==null&&(M=y(be,M,Ne),Ie===null?Se=be:Ie.sibling=be,Ie=be);return Ue&&Rr(U,Ne),Se}for(be=c(be);Ne<I.length;Ne++)Le=q(be,U,Ne,I[Ne],ee),Le!==null&&(r&&Le.alternate!==null&&be.delete(Le.key===null?Ne:Le.key),M=y(Le,M,Ne),Ie===null?Se=Le:Ie.sibling=Le,Ie=Le);return r&&be.forEach(function(Ea){return i(U,Ea)}),Ue&&Rr(U,Ne),Se}function we(U,M,I,ee){if(I==null)throw Error(a(151));for(var Se=null,Ie=null,be=M,Ne=M=0,Le=null,He=I.next();be!==null&&!He.done;Ne++,He=I.next()){be.index>Ne?(Le=be,be=null):Le=be.sibling;var Ea=F(U,be,He.value,ee);if(Ea===null){be===null&&(be=Le);break}r&&be&&Ea.alternate===null&&i(U,be),M=y(Ea,M,Ne),Ie===null?Se=Ea:Ie.sibling=Ea,Ie=Ea,be=Le}if(He.done)return s(U,be),Ue&&Rr(U,Ne),Se;if(be===null){for(;!He.done;Ne++,He=I.next())He=ne(U,He.value,ee),He!==null&&(M=y(He,M,Ne),Ie===null?Se=He:Ie.sibling=He,Ie=He);return Ue&&Rr(U,Ne),Se}for(be=c(be);!He.done;Ne++,He=I.next())He=q(be,U,Ne,He.value,ee),He!==null&&(r&&He.alternate!==null&&be.delete(He.key===null?Ne:He.key),M=y(He,M,Ne),Ie===null?Se=He:Ie.sibling=He,Ie=He);return r&&be.forEach(function(oC){return i(U,oC)}),Ue&&Rr(U,Ne),Se}function tt(U,M,I,ee){if(typeof I=="object"&&I!==null&&I.type===E&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case v:e:{for(var Se=I.key;M!==null;){if(M.key===Se){if(Se=I.type,Se===E){if(M.tag===7){s(U,M.sibling),ee=m(M,I.props.children),ee.return=U,U=ee;break e}}else if(M.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===Z&&ii(Se)===M.type){s(U,M.sibling),ee=m(M,I.props),ys(ee,I),ee.return=U,U=ee;break e}s(U,M);break}else i(U,M);M=M.sibling}I.type===E?(ee=ei(I.props.children,U.mode,ee,I.key),ee.return=U,U=ee):(ee=nu(I.type,I.key,I.props,null,U.mode,ee),ys(ee,I),ee.return=U,U=ee)}return k(U);case w:e:{for(Se=I.key;M!==null;){if(M.key===Se)if(M.tag===4&&M.stateNode.containerInfo===I.containerInfo&&M.stateNode.implementation===I.implementation){s(U,M.sibling),ee=m(M,I.children||[]),ee.return=U,U=ee;break e}else{s(U,M);break}else i(U,M);M=M.sibling}ee=Id(I,U.mode,ee),ee.return=U,U=ee}return k(U);case Z:return I=ii(I),tt(U,M,I,ee)}if(re(I))return fe(U,M,I,ee);if(ie(I)){if(Se=ie(I),typeof Se!="function")throw Error(a(150));return I=Se.call(I),we(U,M,I,ee)}if(typeof I.then=="function")return tt(U,M,uu(I),ee);if(I.$$typeof===_)return tt(U,M,iu(U,I),ee);cu(U,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,M!==null&&M.tag===6?(s(U,M.sibling),ee=m(M,I),ee.return=U,U=ee):(s(U,M),ee=Bd(I,U.mode,ee),ee.return=U,U=ee),k(U)):s(U,M)}return function(U,M,I,ee){try{gs=0;var Se=tt(U,M,I,ee);return Qi=null,Se}catch(be){if(be===Ji||be===su)throw be;var Ie=Nn(29,be,null,U.mode);return Ie.lanes=ee,Ie.return=U,Ie}}}var si=ux(!0),cx=ux(!1),ca=!1;function tf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nf(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 da(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function fa(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=tu(r),Gy(r,null,s),i}return eu(r,c,i,s),tu(r)}function xs(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,ty(r,s)}}function rf(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 af=!1;function bs(){if(af){var r=Ki;if(r!==null)throw r}}function vs(r,i,s,c){af=!1;var m=r.updateQueue;ca=!1;var y=m.firstBaseUpdate,k=m.lastBaseUpdate,S=m.shared.pending;if(S!==null){m.shared.pending=null;var R=S,H=R.next;R.next=null,k===null?y=H:k.next=H,k=R;var K=r.alternate;K!==null&&(K=K.updateQueue,S=K.lastBaseUpdate,S!==k&&(S===null?K.firstBaseUpdate=H:S.next=H,K.lastBaseUpdate=R))}if(y!==null){var ne=m.baseState;k=0,K=H=R=null,S=y;do{var F=S.lane&-536870913,q=F!==S.lane;if(q?($e&F)===F:(c&F)===F){F!==0&&F===Xi&&(af=!0),K!==null&&(K=K.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var fe=r,we=S;F=i;var tt=s;switch(we.tag){case 1:if(fe=we.payload,typeof fe=="function"){ne=fe.call(tt,ne,F);break e}ne=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=we.payload,F=typeof fe=="function"?fe.call(tt,ne,F):fe,F==null)break e;ne=x({},ne,F);break e;case 2:ca=!0}}F=S.callback,F!==null&&(r.flags|=64,q&&(r.flags|=8192),q=m.callbacks,q===null?m.callbacks=[F]:q.push(F))}else q={lane:F,tag:S.tag,payload:S.payload,callback:S.callback,next:null},K===null?(H=K=q,R=ne):K=K.next=q,k|=F;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&&(R=ne),m.baseState=R,m.firstBaseUpdate=H,m.lastBaseUpdate=K,y===null&&(m.shared.lanes=0),ya|=k,r.lanes=k,r.memoizedState=ne}}function dx(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function fx(r,i){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)dx(s[r],i)}var Wi=C(null),du=C(0);function hx(r,i){r=Hr,T(du,r),T(Wi,i),Hr=r|i.baseLanes}function of(){T(du,Hr),T(Wi,Wi.current)}function sf(){Hr=du.current,Y(Wi),Y(du)}var An=C(null),Kn=null;function ha(r){var i=r.alternate;T(Ct,Ct.current&1),T(An,r),Kn===null&&(i===null||Wi.current!==null||i.memoizedState!==null)&&(Kn=r)}function lf(r){T(Ct,Ct.current),T(An,r),Kn===null&&(Kn=r)}function mx(r){r.tag===22?(T(Ct,Ct.current),T(An,r),Kn===null&&(Kn=r)):ma()}function ma(){T(Ct,Ct.current),T(An,An.current)}function On(r){Y(An),Kn===r&&(Kn=null),Y(Ct)}var Ct=C(0);function fu(r){for(var i=r;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||mh(s)||ph(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 $r=0,je=null,We=null,Ot=null,hu=!1,eo=!1,li=!1,mu=0,ks=0,to=null,KT=0;function wt(){throw Error(a(321))}function uf(r,i){if(i===null)return!1;for(var s=0;s<i.length&&s<r.length;s++)if(!jn(r[s],i[s]))return!1;return!0}function cf(r,i,s,c,m,y){return $r=y,je=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,V.H=r===null||r.memoizedState===null?Jx:_f,li=!1,y=s(c,m),li=!1,eo&&(y=gx(i,s,c,m)),px(r),y}function px(r){V.H=zs;var i=We!==null&&We.next!==null;if($r=0,Ot=We=je=null,hu=!1,ks=0,to=null,i)throw Error(a(300));r===null||Rt||(r=r.dependencies,r!==null&&au(r)&&(Rt=!0))}function gx(r,i,s,c){je=r;var m=0;do{if(eo&&(to=null),ks=0,eo=!1,25<=m)throw Error(a(301));if(m+=1,Ot=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)}V.H=Qx,y=i(s,c)}while(eo);return y}function JT(){var r=V.H,i=r.useState()[0];return i=typeof i.then=="function"?Ss(i):i,r=r.useState()[0],(We!==null?We.memoizedState:null)!==r&&(je.flags|=1024),i}function df(){var r=mu!==0;return mu=0,r}function ff(r,i,s){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~s}function hf(r){if(hu){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}hu=!1}$r=0,Ot=We=je=null,eo=!1,ks=mu=0,to=null}function cn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?je.memoizedState=Ot=r:Ot=Ot.next=r,Ot}function jt(){if(We===null){var r=je.alternate;r=r!==null?r.memoizedState:null}else r=We.next;var i=Ot===null?je.memoizedState:Ot.next;if(i!==null)Ot=i,We=r;else{if(r===null)throw je.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},Ot===null?je.memoizedState=Ot=r:Ot=Ot.next=r}return Ot}function pu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ss(r){var i=ks;return ks+=1,to===null&&(to=[]),r=ox(to,r,i),i=je,(Ot===null?i.memoizedState:Ot.next)===null&&(i=i.alternate,V.H=i===null||i.memoizedState===null?Jx:_f),r}function gu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Ss(r);if(r.$$typeof===_)return Jt(r)}throw Error(a(438,String(r)))}function mf(r){var i=null,s=je.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=je.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=pu(),je.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]=ce;return i.index++,s}function Lr(r,i){return typeof i=="function"?i(r):i}function yu(r){var i=jt();return pf(i,We,r)}function pf(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,R=null,H=i,K=!1;do{var ne=H.lane&-536870913;if(ne!==H.lane?($e&ne)===ne:($r&ne)===ne){var F=H.revertLane;if(F===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),ne===Xi&&(K=!0);else if(($r&F)===F){H=H.next,F===Xi&&(K=!0);continue}else ne={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(S=R=ne,k=y):R=R.next=ne,je.lanes|=F,ya|=F;ne=H.action,li&&s(y,ne),y=H.hasEagerState?H.eagerState:s(y,ne)}else F={lane:ne,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(S=R=F,k=y):R=R.next=F,je.lanes|=ne,ya|=ne;H=H.next}while(H!==null&&H!==i);if(R===null?k=y:R.next=S,!jn(y,r.memoizedState)&&(Rt=!0,K&&(s=Ki,s!==null)))throw s;r.memoizedState=y,r.baseState=k,r.baseQueue=R,c.lastRenderedState=y}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function gf(r){var i=jt(),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);jn(y,i.memoizedState)||(Rt=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),s.lastRenderedState=y}return[y,c]}function yx(r,i,s){var c=je,m=jt(),y=Ue;if(y){if(s===void 0)throw Error(a(407));s=s()}else s=i();var k=!jn((We||m).memoizedState,s);if(k&&(m.memoizedState=s,Rt=!0),m=m.queue,bf(vx.bind(null,c,m,r),[r]),m.getSnapshot!==i||k||Ot!==null&&Ot.memoizedState.tag&1){if(c.flags|=2048,no(9,{destroy:void 0},bx.bind(null,c,m,s,i),null),it===null)throw Error(a(349));y||($r&127)!==0||xx(c,i,s)}return s}function xx(r,i,s){r.flags|=16384,r={getSnapshot:i,value:s},i=je.updateQueue,i===null?(i=pu(),je.updateQueue=i,i.stores=[r]):(s=i.stores,s===null?i.stores=[r]:s.push(r))}function bx(r,i,s,c){i.value=s,i.getSnapshot=c,kx(i)&&Sx(r)}function vx(r,i,s){return s(function(){kx(i)&&Sx(r)})}function kx(r){var i=r.getSnapshot;r=r.value;try{var s=i();return!jn(r,s)}catch{return!0}}function Sx(r){var i=Wa(r,2);i!==null&&Sn(i,r,2)}function yf(r){var i=cn();if(typeof r=="function"){var s=r;if(r=s(),li){pn(!0);try{s()}finally{pn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lr,lastRenderedState:r},i}function wx(r,i,s,c){return r.baseState=s,pf(r,We,typeof c=="function"?c:Lr)}function QT(r,i,s,c,m){if(vu(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)}};V.T!==null?s(!0):y.isTransition=!1,c(y),s=i.pending,s===null?(y.next=i.pending=y,zx(i,y)):(y.next=s.next,i.pending=s.next=y)}}function zx(r,i){var s=i.action,c=i.payload,m=r.state;if(i.isTransition){var y=V.T,k={};V.T=k;try{var S=s(m,c),R=V.S;R!==null&&R(k,S),_x(r,i,S)}catch(H){xf(r,i,H)}finally{y!==null&&k.types!==null&&(y.types=k.types),V.T=y}}else try{y=s(m,c),_x(r,i,y)}catch(H){xf(r,i,H)}}function _x(r,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){Tx(r,i,c)},function(c){return xf(r,i,c)}):Tx(r,i,s)}function Tx(r,i,s){i.status="fulfilled",i.value=s,Ex(i),r.state=s,i=r.pending,i!==null&&(s=i.next,s===i?r.pending=null:(s=s.next,i.next=s,zx(r,s)))}function xf(r,i,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,Ex(i),i=i.next;while(i!==c)}r.action=null}function Ex(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Cx(r,i){return i}function jx(r,i){if(Ue){var s=it.formState;if(s!==null){e:{var c=je;if(Ue){if(ct){t:{for(var m=ct,y=Xn;m.nodeType!==8;){if(!y){m=null;break t}if(m=Jn(m.nextSibling),m===null){m=null;break t}}y=m.data,m=y==="F!"||y==="F"?m:null}if(m){ct=Jn(m.nextSibling),c=m.data==="F!";break e}}la(c)}c=!1}c&&(i=s[0])}}return s=cn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cx,lastRenderedState:i},s.queue=c,s=Yx.bind(null,je,c),c.dispatch=s,c=yf(!1),y=zf.bind(null,je,!1,c.queue),c=cn(),m={state:i,dispatch:null,action:r,pending:null},c.queue=m,s=QT.bind(null,je,m,y,s),m.dispatch=s,c.memoizedState=r,[i,s,!1]}function Nx(r){var i=jt();return Ax(i,We,r)}function Ax(r,i,s){if(i=pf(r,i,Cx)[0],r=yu(Lr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=Ss(i)}catch(k){throw k===Ji?su:k}else c=i;i=jt();var m=i.queue,y=m.dispatch;return s!==i.memoizedState&&(je.flags|=2048,no(9,{destroy:void 0},WT.bind(null,m,s),null)),[c,y,r]}function WT(r,i){r.action=i}function Ox(r){var i=jt(),s=We;if(s!==null)return Ax(i,s,r);jt(),i=i.memoizedState,s=jt();var c=s.queue.dispatch;return s.memoizedState=r,[i,c,!1]}function no(r,i,s,c){return r={tag:r,create:s,deps:c,inst:i,next:null},i=je.updateQueue,i===null&&(i=pu(),je.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 Rx(){return jt().memoizedState}function xu(r,i,s,c){var m=cn();je.flags|=r,m.memoizedState=no(1|i,{destroy:void 0},s,c===void 0?null:c)}function bu(r,i,s,c){var m=jt();c=c===void 0?null:c;var y=m.memoizedState.inst;We!==null&&c!==null&&uf(c,We.memoizedState.deps)?m.memoizedState=no(i,y,s,c):(je.flags|=r,m.memoizedState=no(1|i,y,s,c))}function Mx(r,i){xu(8390656,8,r,i)}function bf(r,i){bu(2048,8,r,i)}function eE(r){je.flags|=4;var i=je.updateQueue;if(i===null)i=pu(),je.updateQueue=i,i.events=[r];else{var s=i.events;s===null?i.events=[r]:s.push(r)}}function Dx(r){var i=jt().memoizedState;return eE({ref:i,nextImpl:r}),function(){if((Fe&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function $x(r,i){return bu(4,2,r,i)}function Lx(r,i){return bu(4,4,r,i)}function Ux(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 Px(r,i,s){s=s!=null?s.concat([r]):null,bu(4,4,Ux.bind(null,i,r),s)}function vf(){}function Vx(r,i){var s=jt();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&uf(i,c[1])?c[0]:(s.memoizedState=[r,i],r)}function Zx(r,i){var s=jt();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&uf(i,c[1]))return c[0];if(c=r(),li){pn(!0);try{r()}finally{pn(!1)}}return s.memoizedState=[c,i],c}function kf(r,i,s){return s===void 0||($r&1073741824)!==0&&($e&261930)===0?r.memoizedState=i:(r.memoizedState=s,r=Bb(),je.lanes|=r,ya|=r,s)}function Bx(r,i,s,c){return jn(s,i)?s:Wi.current!==null?(r=kf(r,s,c),jn(r,i)||(Rt=!0),r):($r&42)===0||($r&1073741824)!==0&&($e&261930)===0?(Rt=!0,r.memoizedState=s):(r=Bb(),je.lanes|=r,ya|=r,i)}function Ix(r,i,s,c,m){var y=X.p;X.p=y!==0&&8>y?y:8;var k=V.T,S={};V.T=S,zf(r,!1,i,s);try{var R=m(),H=V.S;if(H!==null&&H(S,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var K=XT(R,c);ws(r,i,K,Dn(r))}else ws(r,i,c,Dn(r))}catch(ne){ws(r,i,{then:function(){},status:"rejected",reason:ne},Dn())}finally{X.p=y,k!==null&&S.types!==null&&(k.types=S.types),V.T=k}}function tE(){}function Sf(r,i,s,c){if(r.tag!==5)throw Error(a(476));var m=Hx(r).queue;Ix(r,m,i,B,s===null?tE:function(){return Fx(r),s(c)})}function Hx(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lr,lastRenderedState:B},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lr,lastRenderedState:s},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function Fx(r){var i=Hx(r);i.next===null&&(i=r.alternate.memoizedState),ws(r,i.next.queue,{},Dn())}function wf(){return Jt(Vs)}function qx(){return jt().memoizedState}function Gx(){return jt().memoizedState}function nE(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var s=Dn();r=da(s);var c=fa(i,r,s);c!==null&&(Sn(c,i,s),xs(c,i,s)),i={cache:Jd()},r.payload=i;return}i=i.return}}function rE(r,i,s){var c=Dn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},vu(r)?Xx(i,s):(s=Vd(r,i,s,c),s!==null&&(Sn(s,r,c),Kx(s,i,c)))}function Yx(r,i,s){var c=Dn();ws(r,i,s,c)}function ws(r,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(vu(r))Xx(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,jn(S,k))return eu(r,i,m,0),it===null&&Wl(),!1}catch{}if(s=Vd(r,i,m,c),s!==null)return Sn(s,r,c),Kx(s,i,c),!0}return!1}function zf(r,i,s,c){if(c={lane:2,revertLane:nh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},vu(r)){if(i)throw Error(a(479))}else i=Vd(r,s,c,2),i!==null&&Sn(i,r,2)}function vu(r){var i=r.alternate;return r===je||i!==null&&i===je}function Xx(r,i){eo=hu=!0;var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}function Kx(r,i,s){if((s&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,s|=c,i.lanes=s,ty(r,s)}}var zs={readContext:Jt,use:gu,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};zs.useEffectEvent=wt;var Jx={readContext:Jt,use:gu,useCallback:function(r,i){return cn().memoizedState=[r,i===void 0?null:i],r},useContext:Jt,useEffect:Mx,useImperativeHandle:function(r,i,s){s=s!=null?s.concat([r]):null,xu(4194308,4,Ux.bind(null,i,r),s)},useLayoutEffect:function(r,i){return xu(4194308,4,r,i)},useInsertionEffect:function(r,i){xu(4,2,r,i)},useMemo:function(r,i){var s=cn();i=i===void 0?null:i;var c=r();if(li){pn(!0);try{r()}finally{pn(!1)}}return s.memoizedState=[c,i],c},useReducer:function(r,i,s){var c=cn();if(s!==void 0){var m=s(i);if(li){pn(!0);try{s(i)}finally{pn(!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=rE.bind(null,je,r),[c.memoizedState,r]},useRef:function(r){var i=cn();return r={current:r},i.memoizedState=r},useState:function(r){r=yf(r);var i=r.queue,s=Yx.bind(null,je,i);return i.dispatch=s,[r.memoizedState,s]},useDebugValue:vf,useDeferredValue:function(r,i){var s=cn();return kf(s,r,i)},useTransition:function(){var r=yf(!1);return r=Ix.bind(null,je,r.queue,!0,!1),cn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,s){var c=je,m=cn();if(Ue){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),it===null)throw Error(a(349));($e&127)!==0||xx(c,i,s)}m.memoizedState=s;var y={value:s,getSnapshot:i};return m.queue=y,Mx(vx.bind(null,c,y,r),[r]),c.flags|=2048,no(9,{destroy:void 0},bx.bind(null,c,y,s,i),null),s},useId:function(){var r=cn(),i=it.identifierPrefix;if(Ue){var s=yr,c=gr;s=(c&~(1<<32-at(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=mu++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=KT++,i="_"+i+"r_"+s.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:wf,useFormState:jx,useActionState:jx,useOptimistic:function(r){var i=cn();i.memoizedState=i.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=zf.bind(null,je,!0,s),s.dispatch=i,[r,i]},useMemoCache:mf,useCacheRefresh:function(){return cn().memoizedState=nE.bind(null,je)},useEffectEvent:function(r){var i=cn(),s={impl:r};return i.memoizedState=s,function(){if((Fe&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},_f={readContext:Jt,use:gu,useCallback:Vx,useContext:Jt,useEffect:bf,useImperativeHandle:Px,useInsertionEffect:$x,useLayoutEffect:Lx,useMemo:Zx,useReducer:yu,useRef:Rx,useState:function(){return yu(Lr)},useDebugValue:vf,useDeferredValue:function(r,i){var s=jt();return Bx(s,We.memoizedState,r,i)},useTransition:function(){var r=yu(Lr)[0],i=jt().memoizedState;return[typeof r=="boolean"?r:Ss(r),i]},useSyncExternalStore:yx,useId:qx,useHostTransitionStatus:wf,useFormState:Nx,useActionState:Nx,useOptimistic:function(r,i){var s=jt();return wx(s,We,r,i)},useMemoCache:mf,useCacheRefresh:Gx};_f.useEffectEvent=Dx;var Qx={readContext:Jt,use:gu,useCallback:Vx,useContext:Jt,useEffect:bf,useImperativeHandle:Px,useInsertionEffect:$x,useLayoutEffect:Lx,useMemo:Zx,useReducer:gf,useRef:Rx,useState:function(){return gf(Lr)},useDebugValue:vf,useDeferredValue:function(r,i){var s=jt();return We===null?kf(s,r,i):Bx(s,We.memoizedState,r,i)},useTransition:function(){var r=gf(Lr)[0],i=jt().memoizedState;return[typeof r=="boolean"?r:Ss(r),i]},useSyncExternalStore:yx,useId:qx,useHostTransitionStatus:wf,useFormState:Ox,useActionState:Ox,useOptimistic:function(r,i){var s=jt();return We!==null?wx(s,We,r,i):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:mf,useCacheRefresh:Gx};Qx.useEffectEvent=Dx;function Tf(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 Ef={enqueueSetState:function(r,i,s){r=r._reactInternals;var c=Dn(),m=da(c);m.payload=i,s!=null&&(m.callback=s),i=fa(r,m,c),i!==null&&(Sn(i,r,c),xs(i,r,c))},enqueueReplaceState:function(r,i,s){r=r._reactInternals;var c=Dn(),m=da(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=fa(r,m,c),i!==null&&(Sn(i,r,c),xs(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var s=Dn(),c=da(s);c.tag=2,i!=null&&(c.callback=i),i=fa(r,c,s),i!==null&&(Sn(i,r,s),xs(i,r,s))}};function Wx(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?!cs(s,c)||!cs(m,y):!0}function eb(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&&Ef.enqueueReplaceState(i,i.state,null)}function ui(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 tb(r){Ql(r)}function nb(r){console.error(r)}function rb(r){Ql(r)}function ku(r,i){try{var s=r.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function ab(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 Cf(r,i,s){return s=da(s),s.tag=3,s.payload={element:null},s.callback=function(){ku(r,i)},s}function ib(r){return r=da(r),r.tag=3,r}function ob(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(){ab(i,s,c)}}var k=s.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(r.callback=function(){ab(i,s,c),typeof m!="function"&&(xa===null?xa=new Set([this]):xa.add(this));var S=c.stack;this.componentDidCatch(c.value,{componentStack:S!==null?S:""})})}function aE(r,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&Yi(i,s,m,!0),s=An.current,s!==null){switch(s.tag){case 31:case 13:return Kn===null?Ru():s.alternate===null&&zt===0&&(zt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===lu?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Wf(r,c,m)),!1;case 22:return s.flags|=65536,c===lu?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)),Wf(r,c,m)),!1}throw Error(a(435,s.tag))}return Wf(r,c,m),Ru(),!1}if(Ue)return i=An.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==qd&&(r=Error(a(422),{cause:c}),hs(qn(r,s)))):(c!==qd&&(i=Error(a(423),{cause:c}),hs(qn(i,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=qn(c,s),m=Cf(r.stateNode,c,m),rf(r,m),zt!==4&&(zt=2)),!1;var y=Error(a(520),{cause:c});if(y=qn(y,s),Os===null?Os=[y]:Os.push(y),zt!==4&&(zt=2),i===null)return!0;c=qn(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=Cf(s.stateNode,c,r),rf(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"&&(xa===null||!xa.has(y))))return s.flags|=65536,m&=-m,s.lanes|=m,m=ib(m),ob(m,r,s,c),rf(s,m),!1}s=s.return}while(s!==null);return!1}var jf=Error(a(461)),Rt=!1;function Qt(r,i,s,c){i.child=r===null?cx(i,null,s,c):si(i,r.child,s,c)}function sb(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 ri(i),c=cf(r,i,s,k,y,m),S=df(),r!==null&&!Rt?(ff(r,i,m),Ur(r,i,m)):(Ue&&S&&Hd(i),i.flags|=1,Qt(r,i,c,m),i.child)}function lb(r,i,s,c,m){if(r===null){var y=s.type;return typeof y=="function"&&!Zd(y)&&y.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=y,ub(r,i,y,c,m)):(r=nu(s.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(y=r.child,!Lf(r,m)){var k=y.memoizedProps;if(s=s.compare,s=s!==null?s:cs,s(k,c)&&r.ref===i.ref)return Ur(r,i,m)}return i.flags|=1,r=Or(y,c),r.ref=i.ref,r.return=i,i.child=r}function ub(r,i,s,c,m){if(r!==null){var y=r.memoizedProps;if(cs(y,c)&&r.ref===i.ref)if(Rt=!1,i.pendingProps=c=y,Lf(r,m))(r.flags&131072)!==0&&(Rt=!0);else return i.lanes=r.lanes,Ur(r,i,m)}return Nf(r,i,s,c,m)}function cb(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 db(r,i,y,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&ou(i,y!==null?y.cachePool:null),y!==null?hx(i,y):of(),mx(i);else return c=i.lanes=536870912,db(r,i,y!==null?y.baseLanes|s:s,s,c)}else y!==null?(ou(i,y.cachePool),hx(i,y),ma(),i.memoizedState=null):(r!==null&&ou(i,null),of(),ma());return Qt(r,i,m,s),i.child}function _s(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function db(r,i,s,c,m){var y=Wd();return y=y===null?null:{parent:At._currentValue,pool:y},i.memoizedState={baseLanes:s,cachePool:y},r!==null&&ou(i,null),of(),mx(i),r!==null&&Yi(r,i,c,!0),i.childLanes=m,null}function Su(r,i){return i=zu({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function fb(r,i,s){return si(i,r.child,null,s),r=Su(i,i.pendingProps),r.flags|=2,On(i),i.memoizedState=null,r}function iE(r,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Ue){if(c.mode==="hidden")return r=Su(i,c),i.lanes=536870912,_s(null,r);if(lf(i),(r=ct)?(r=zv(r,Xn),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:oa!==null?{id:gr,overflow:yr}:null,retryLane:536870912,hydrationErrors:null},s=Xy(r),s.return=i,i.child=s,Kt=i,ct=null)):r=null,r===null)throw la(i);return i.lanes=536870912,null}return Su(i,c)}var y=r.memoizedState;if(y!==null){var k=y.dehydrated;if(lf(i),m)if(i.flags&256)i.flags&=-257,i=fb(r,i,s);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Rt||Yi(r,i,s,!1),m=(s&r.childLanes)!==0,Rt||m){if(c=it,c!==null&&(k=ny(c,s),k!==0&&k!==y.retryLane))throw y.retryLane=k,Wa(r,k),Sn(c,r,k),jf;Ru(),i=fb(r,i,s)}else r=y.treeContext,ct=Jn(k.nextSibling),Kt=i,Ue=!0,sa=null,Xn=!1,r!==null&&Qy(i,r),i=Su(i,c),i.flags|=4096;return i}return r=Or(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function wu(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 Nf(r,i,s,c,m){return ri(i),s=cf(r,i,s,c,void 0,m),c=df(),r!==null&&!Rt?(ff(r,i,m),Ur(r,i,m)):(Ue&&c&&Hd(i),i.flags|=1,Qt(r,i,s,m),i.child)}function hb(r,i,s,c,m,y){return ri(i),i.updateQueue=null,s=gx(i,c,s,m),px(r),c=df(),r!==null&&!Rt?(ff(r,i,y),Ur(r,i,y)):(Ue&&c&&Hd(i),i.flags|=1,Qt(r,i,s,y),i.child)}function mb(r,i,s,c,m){if(ri(i),i.stateNode===null){var y=Hi,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=Ef,i.stateNode=y,y._reactInternals=i,y=i.stateNode,y.props=c,y.state=i.memoizedState,y.refs={},tf(i),k=s.contextType,y.context=typeof k=="object"&&k!==null?Jt(k):Hi,y.state=i.memoizedState,k=s.getDerivedStateFromProps,typeof k=="function"&&(Tf(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&&Ef.enqueueReplaceState(y,y.state,null),vs(i,c,y,m),bs(),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){y=i.stateNode;var S=i.memoizedProps,R=ui(s,S);y.props=R;var H=y.context,K=s.contextType;k=Hi,typeof K=="object"&&K!==null&&(k=Jt(K));var ne=s.getDerivedStateFromProps;K=typeof ne=="function"||typeof y.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,K||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S||H!==k)&&eb(i,y,c,k),ca=!1;var F=i.memoizedState;y.state=F,vs(i,c,y,m),bs(),H=i.memoizedState,S||F!==H||ca?(typeof ne=="function"&&(Tf(i,s,ne,c),H=i.memoizedState),(R=ca||Wx(i,s,R,c,F,H,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=H),y.props=c,y.state=H,y.context=k,c=R):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{y=i.stateNode,nf(r,i),k=i.memoizedProps,K=ui(s,k),y.props=K,ne=i.pendingProps,F=y.context,H=s.contextType,R=Hi,typeof H=="object"&&H!==null&&(R=Jt(H)),S=s.getDerivedStateFromProps,(H=typeof S=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(k!==ne||F!==R)&&eb(i,y,c,R),ca=!1,F=i.memoizedState,y.state=F,vs(i,c,y,m),bs();var q=i.memoizedState;k!==ne||F!==q||ca||r!==null&&r.dependencies!==null&&au(r.dependencies)?(typeof S=="function"&&(Tf(i,s,S,c),q=i.memoizedState),(K=ca||Wx(i,s,K,c,F,q,R)||r!==null&&r.dependencies!==null&&au(r.dependencies))?(H||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,q,R),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,q,R)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||k===r.memoizedProps&&F===r.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===r.memoizedProps&&F===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=q),y.props=c,y.state=q,y.context=R,c=K):(typeof y.componentDidUpdate!="function"||k===r.memoizedProps&&F===r.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===r.memoizedProps&&F===r.memoizedState||(i.flags|=1024),c=!1)}return y=c,wu(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=si(i,r.child,null,m),i.child=si(i,null,s,m)):Qt(r,i,s,m),i.memoizedState=y.state,r=i.child):r=Ur(r,i,m),r}function pb(r,i,s,c){return ti(),i.flags|=256,Qt(r,i,s,c),i.child}var Af={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Of(r){return{baseLanes:r,cachePool:ax()}}function Rf(r,i,s){return r=r!==null?r.childLanes&~s:0,i&&(r|=Mn),r}function gb(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:(Ct.current&2)!==0),k&&(m=!0,i.flags&=-129),k=(i.flags&32)!==0,i.flags&=-33,r===null){if(Ue){if(m?ha(i):ma(),(r=ct)?(r=zv(r,Xn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:oa!==null?{id:gr,overflow:yr}:null,retryLane:536870912,hydrationErrors:null},s=Xy(r),s.return=i,i.child=s,Kt=i,ct=null)):r=null,r===null)throw la(i);return ph(r)?i.lanes=32:i.lanes=536870912,null}var S=c.children;return c=c.fallback,m?(ma(),m=i.mode,S=zu({mode:"hidden",children:S},m),c=ei(c,m,s,null),S.return=i,c.return=i,S.sibling=c,i.child=S,c=i.child,c.memoizedState=Of(s),c.childLanes=Rf(r,k,s),i.memoizedState=Af,_s(null,c)):(ha(i),Mf(i,S))}var R=r.memoizedState;if(R!==null&&(S=R.dehydrated,S!==null)){if(y)i.flags&256?(ha(i),i.flags&=-257,i=Df(r,i,s)):i.memoizedState!==null?(ma(),i.child=r.child,i.flags|=128,i=null):(ma(),S=c.fallback,m=i.mode,c=zu({mode:"visible",children:c.children},m),S=ei(S,m,s,null),S.flags|=2,c.return=i,S.return=i,c.sibling=S,i.child=c,si(i,r.child,null,s),c=i.child,c.memoizedState=Of(s),c.childLanes=Rf(r,k,s),i.memoizedState=Af,i=_s(null,c));else if(ha(i),ph(S)){if(k=S.nextSibling&&S.nextSibling.dataset,k)var H=k.dgst;k=H,c=Error(a(419)),c.stack="",c.digest=k,hs({value:c,source:null,stack:null}),i=Df(r,i,s)}else if(Rt||Yi(r,i,s,!1),k=(s&r.childLanes)!==0,Rt||k){if(k=it,k!==null&&(c=ny(k,s),c!==0&&c!==R.retryLane))throw R.retryLane=c,Wa(r,c),Sn(k,r,c),jf;mh(S)||Ru(),i=Df(r,i,s)}else mh(S)?(i.flags|=192,i.child=r.child,i=null):(r=R.treeContext,ct=Jn(S.nextSibling),Kt=i,Ue=!0,sa=null,Xn=!1,r!==null&&Qy(i,r),i=Mf(i,c.children),i.flags|=4096);return i}return m?(ma(),S=c.fallback,m=i.mode,R=r.child,H=R.sibling,c=Or(R,{mode:"hidden",children:c.children}),c.subtreeFlags=R.subtreeFlags&65011712,H!==null?S=Or(H,S):(S=ei(S,m,s,null),S.flags|=2),S.return=i,c.return=i,c.sibling=S,i.child=c,_s(null,c),c=i.child,S=r.child.memoizedState,S===null?S=Of(s):(m=S.cachePool,m!==null?(R=At._currentValue,m=m.parent!==R?{parent:R,pool:R}:m):m=ax(),S={baseLanes:S.baseLanes|s,cachePool:m}),c.memoizedState=S,c.childLanes=Rf(r,k,s),i.memoizedState=Af,_s(r.child,c)):(ha(i),s=r.child,r=s.sibling,s=Or(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 Mf(r,i){return i=zu({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function zu(r,i){return r=Nn(22,r,null,i),r.lanes=0,r}function Df(r,i,s){return si(i,r.child,null,s),r=Mf(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function yb(r,i,s){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Xd(r.return,i,s)}function $f(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 xb(r,i,s){var c=i.pendingProps,m=c.revealOrder,y=c.tail;c=c.children;var k=Ct.current,S=(k&2)!==0;if(S?(k=k&1|2,i.flags|=128):k&=1,T(Ct,k),Qt(r,i,c,s),c=Ue?fs:0,!S&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&yb(r,s,i);else if(r.tag===19)yb(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&&fu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),$f(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&&fu(r)===null){i.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}$f(i,!0,s,null,y,c);break;case"together":$f(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Ur(r,i,s){if(r!==null&&(i.dependencies=r.dependencies),ya|=i.lanes,(s&i.childLanes)===0)if(r!==null){if(Yi(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=Or(r,r.pendingProps),i.child=s,s.return=i;r.sibling!==null;)r=r.sibling,s=s.sibling=Or(r,r.pendingProps),s.return=i;s.sibling=null}return i.child}function Lf(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&au(r)))}function oE(r,i,s){switch(i.tag){case 3:Ye(i,i.stateNode.containerInfo),ua(i,At,r.memoizedState.cache),ti();break;case 27:case 5:Nt(i);break;case 4:Ye(i,i.stateNode.containerInfo);break;case 10:ua(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,lf(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(ha(i),i.flags|=128,null):(s&i.child.childLanes)!==0?gb(r,i,s):(ha(i),r=Ur(r,i,s),r!==null?r.sibling:null);ha(i);break;case 19:var m=(r.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(Yi(r,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return xb(r,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),T(Ct,Ct.current),c)break;return null;case 22:return i.lanes=0,cb(r,i,s,i.pendingProps);case 24:ua(i,At,r.memoizedState.cache)}return Ur(r,i,s)}function bb(r,i,s){if(r!==null)if(r.memoizedProps!==i.pendingProps)Rt=!0;else{if(!Lf(r,s)&&(i.flags&128)===0)return Rt=!1,oE(r,i,s);Rt=(r.flags&131072)!==0}else Rt=!1,Ue&&(i.flags&1048576)!==0&&Jy(i,fs,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=ii(i.elementType),i.type=r,typeof r=="function")Zd(r)?(c=ui(r,c),i.tag=1,i=mb(null,i,r,c,s)):(i.tag=0,i=Nf(null,i,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===P){i.tag=11,i=sb(null,i,r,c,s);break e}else if(m===G){i.tag=14,i=lb(null,i,r,c,s);break e}}throw i=oe(r)||r,Error(a(306,i,""))}}return i;case 0:return Nf(r,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=ui(c,i.pendingProps),mb(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,nf(r,i),vs(i,c,null,s);var k=i.memoizedState;if(c=k.cache,ua(i,At,c),c!==y.cache&&Kd(i,[At],s,!0),bs(),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=pb(r,i,c,s);break e}else if(c!==m){m=qn(Error(a(424)),i),hs(m),i=pb(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,ct=Jn(r.firstChild),Kt=i,Ue=!0,sa=null,Xn=!0,s=cx(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ti(),c===m){i=Ur(r,i,s);break e}Qt(r,i,c,s)}i=i.child}return i;case 26:return wu(r,i),r===null?(s=Nv(i.type,null,i.pendingProps,null))?i.memoizedState=s:Ue||(s=i.type,r=i.pendingProps,c=Vu(ge.current).createElement(s),c[Xt]=i,c[gn]=r,Wt(c,s,r),qt(c),i.stateNode=c):i.memoizedState=Nv(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Nt(i),r===null&&Ue&&(c=i.stateNode=Ev(i.type,i.pendingProps,ge.current),Kt=i,Xn=!0,m=ct,Sa(i.type)?(gh=m,ct=Jn(c.firstChild)):ct=m),Qt(r,i,i.pendingProps.children,s),wu(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Ue&&((m=c=ct)&&(c=$E(c,i.type,i.pendingProps,Xn),c!==null?(i.stateNode=c,Kt=i,ct=Jn(c.firstChild),Xn=!1,m=!0):m=!1),m||la(i)),Nt(i),m=i.type,y=i.pendingProps,k=r!==null?r.memoizedProps:null,c=y.children,dh(m,y)?c=null:k!==null&&dh(m,k)&&(i.flags|=32),i.memoizedState!==null&&(m=cf(r,i,JT,null,null,s),Vs._currentValue=m),wu(r,i),Qt(r,i,c,s),i.child;case 6:return r===null&&Ue&&((r=s=ct)&&(s=LE(s,i.pendingProps,Xn),s!==null?(i.stateNode=s,Kt=i,ct=null,r=!0):r=!1),r||la(i)),null;case 13:return gb(r,i,s);case 4:return Ye(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=si(i,null,c,s):Qt(r,i,c,s),i.child;case 11:return sb(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,ua(i,i.type,c.value),Qt(r,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,ri(i),m=Jt(m),c=c(m),i.flags|=1,Qt(r,i,c,s),i.child;case 14:return lb(r,i,i.type,i.pendingProps,s);case 15:return ub(r,i,i.type,i.pendingProps,s);case 19:return xb(r,i,s);case 31:return iE(r,i,s);case 22:return cb(r,i,s,i.pendingProps);case 24:return ri(i),c=Jt(At),r===null?(m=Wd(),m===null&&(m=it,y=Jd(),m.pooledCache=y,y.refCount++,y!==null&&(m.pooledCacheLanes|=s),m=y),i.memoizedState={parent:c,cache:m},tf(i),ua(i,At,m)):((r.lanes&s)!==0&&(nf(r,i),vs(i,null,null,s),bs()),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),ua(i,At,c)):(c=y.cache,ua(i,At,c),c!==m.cache&&Kd(i,[At],s,!0))),Qt(r,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Pr(r){r.flags|=4}function Uf(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(qb())r.flags|=8192;else throw oi=lu,ef}else r.flags&=-16777217}function vb(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Dv(i))if(qb())r.flags|=8192;else throw oi=lu,ef}function _u(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?Wg():536870912,r.lanes|=i,oo|=i)}function Ts(r,i){if(!Ue)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 dt(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 sE(r,i,s){var c=i.pendingProps;switch(Fd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(i),null;case 1:return dt(i),null;case 3:return s=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Dr(At),De(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Gi(i)?Pr(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Gd())),dt(i),null;case 26:var m=i.type,y=i.memoizedState;return r===null?(Pr(i),y!==null?(dt(i),vb(i,y)):(dt(i),Uf(i,m,null,c,s))):y?y!==r.memoizedState?(Pr(i),dt(i),vb(i,y)):(dt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&Pr(i),dt(i),Uf(i,m,r,c,s)),null;case 27:if(sn(i),s=ge.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return dt(i),null}r=se.current,Gi(i)?Wy(i):(r=Ev(m,c,s),i.stateNode=r,Pr(i))}return dt(i),null;case 5:if(sn(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return dt(i),null}if(y=se.current,Gi(i))Wy(i);else{var k=Vu(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[gn]=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&&Pr(i)}}return dt(i),Uf(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,s),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=ge.current,Gi(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||gv(r.nodeValue,s)),r||la(i,!0)}else r=Vu(r).createTextNode(c),r[Xt]=i,i.stateNode=r}return dt(i),null;case 31:if(s=i.memoizedState,r===null||r.memoizedState!==null){if(c=Gi(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 ti(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;dt(i),r=!1}else s=Gd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return i.flags&256?(On(i),i):(On(i),null);if((i.flags&128)!==0)throw Error(a(558))}return dt(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Gi(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 ti(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;dt(i),m=!1}else m=Gd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(On(i),i):(On(i),null)}return On(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),_u(i,i.updateQueue),dt(i),null);case 4:return De(),r===null&&oh(i.stateNode.containerInfo),dt(i),null;case 10:return Dr(i.type),dt(i),null;case 19:if(Y(Ct),c=i.memoizedState,c===null)return dt(i),null;if(m=(i.flags&128)!==0,y=c.rendering,y===null)if(m)Ts(c,!1);else{if(zt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(y=fu(r),y!==null){for(i.flags|=128,Ts(c,!1),r=y.updateQueue,i.updateQueue=r,_u(i,r),i.subtreeFlags=0,r=s,s=i.child;s!==null;)Yy(s,r),s=s.sibling;return T(Ct,Ct.current&1|2),Ue&&Rr(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&ut()>Nu&&(i.flags|=128,m=!0,Ts(c,!1),i.lanes=4194304)}else{if(!m)if(r=fu(y),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,_u(i,r),Ts(c,!0),c.tail===null&&c.tailMode==="hidden"&&!y.alternate&&!Ue)return dt(i),null}else 2*ut()-c.renderingStartTime>Nu&&s!==536870912&&(i.flags|=128,m=!0,Ts(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=ut(),r.sibling=null,s=Ct.current,T(Ct,m?s&1|2:s&1),Ue&&Rr(i,c.treeForkCount),r):(dt(i),null);case 22:case 23:return On(i),sf(),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&&(dt(i),i.subtreeFlags&6&&(i.flags|=8192)):dt(i),s=i.updateQueue,s!==null&&_u(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&&Y(ai),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Dr(At),dt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function lE(r,i){switch(Fd(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Dr(At),De(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return sn(i),null;case 31:if(i.memoizedState!==null){if(On(i),i.alternate===null)throw Error(a(340));ti()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(On(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));ti()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Y(Ct),null;case 4:return De(),null;case 10:return Dr(i.type),null;case 22:case 23:return On(i),sf(),r!==null&&Y(ai),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Dr(At),null;case 25:return null;default:return null}}function kb(r,i){switch(Fd(i),i.tag){case 3:Dr(At),De();break;case 26:case 27:case 5:sn(i);break;case 4:De();break;case 31:i.memoizedState!==null&&On(i);break;case 13:On(i);break;case 19:Y(Ct);break;case 10:Dr(i.type);break;case 22:case 23:On(i),sf(),r!==null&&Y(ai);break;case 24:Dr(At)}}function Es(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 pa(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 R=s,H=S;try{H()}catch(K){Ke(m,R,K)}}}c=c.next}while(c!==y)}}catch(K){Ke(i,i.return,K)}}function Sb(r){var i=r.updateQueue;if(i!==null){var s=r.stateNode;try{fx(i,s)}catch(c){Ke(r,r.return,c)}}}function wb(r,i,s){s.props=ui(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){Ke(r,i,c)}}function Cs(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 xr(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 zb(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 Pf(r,i,s){try{var c=r.stateNode;NE(c,r.type,s,i),c[gn]=i}catch(m){Ke(r,r.return,m)}}function _b(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Sa(r.type)||r.tag===4}function Vf(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||_b(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&&Sa(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 Zf(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=Nr));else if(c!==4&&(c===27&&Sa(r.type)&&(s=r.stateNode,i=null),r=r.child,r!==null))for(Zf(r,i,s),r=r.sibling;r!==null;)Zf(r,i,s),r=r.sibling}function Tu(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&&Sa(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(Tu(r,i,s),r=r.sibling;r!==null;)Tu(r,i,s),r=r.sibling}function Tb(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[gn]=s}catch(y){Ke(r,r.return,y)}}var Vr=!1,Mt=!1,Bf=!1,Eb=typeof WeakSet=="function"?WeakSet:Set,Gt=null;function uE(r,i){if(r=r.containerInfo,uh=Gu,r=Py(r),Md(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,R=-1,H=0,K=0,ne=r,F=null;t:for(;;){for(var q;ne!==s||m!==0&&ne.nodeType!==3||(S=k+m),ne!==y||c!==0&&ne.nodeType!==3||(R=k+c),ne.nodeType===3&&(k+=ne.nodeValue.length),(q=ne.firstChild)!==null;)F=ne,ne=q;for(;;){if(ne===r)break t;if(F===s&&++H===m&&(S=k),F===y&&++K===c&&(R=k),(q=ne.nextSibling)!==null)break;ne=F,F=ne.parentNode}ne=q}s=S===-1||R===-1?null:{start:S,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;for(ch={focusedElem:r,selectionRange:s},Gu=!1,Gt=i;Gt!==null;)if(i=Gt,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Gt=r;else for(;Gt!==null;){switch(i=Gt,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=ui(s.type,m);r=c.getSnapshotBeforeUpdate(fe,y),c.__reactInternalSnapshotBeforeUpdate=r}catch(we){Ke(s,s.return,we)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,s=r.nodeType,s===9)hh(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":hh(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,Gt=r;break}Gt=i.return}}function Cb(r,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Br(r,s),c&4&&Es(5,s);break;case 1:if(Br(r,s),c&4)if(r=s.stateNode,i===null)try{r.componentDidMount()}catch(k){Ke(s,s.return,k)}else{var m=ui(s.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(k){Ke(s,s.return,k)}}c&64&&Sb(s),c&512&&Cs(s,s.return);break;case 3:if(Br(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{fx(r,i)}catch(k){Ke(s,s.return,k)}}break;case 27:i===null&&c&4&&Tb(s);case 26:case 5:Br(r,s),i===null&&c&4&&zb(s),c&512&&Cs(s,s.return);break;case 12:Br(r,s);break;case 31:Br(r,s),c&4&&Ab(r,s);break;case 13:Br(r,s),c&4&&Ob(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=xE.bind(null,s),UE(r,s))));break;case 22:if(c=s.memoizedState!==null||Vr,!c){i=i!==null&&i.memoizedState!==null||Mt,m=Vr;var y=Mt;Vr=c,(Mt=i)&&!y?Ir(r,s,(s.subtreeFlags&8772)!==0):Br(r,s),Vr=m,Mt=y}break;case 30:break;default:Br(r,s)}}function jb(r){var i=r.alternate;i!==null&&(r.alternate=null,jb(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&yd(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 ht=null,xn=!1;function Zr(r,i,s){for(s=s.child;s!==null;)Nb(r,i,s),s=s.sibling}function Nb(r,i,s){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(un,s)}catch{}switch(s.tag){case 26:Mt||xr(s,i),Zr(r,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Mt||xr(s,i);var c=ht,m=xn;Sa(s.type)&&(ht=s.stateNode,xn=!1),Zr(r,i,s),Ls(s.stateNode),ht=c,xn=m;break;case 5:Mt||xr(s,i);case 6:if(c=ht,m=xn,ht=null,Zr(r,i,s),ht=c,xn=m,ht!==null)if(xn)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(s.stateNode)}catch(y){Ke(s,i,y)}else try{ht.removeChild(s.stateNode)}catch(y){Ke(s,i,y)}break;case 18:ht!==null&&(xn?(r=ht,Sv(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),po(r)):Sv(ht,s.stateNode));break;case 4:c=ht,m=xn,ht=s.stateNode.containerInfo,xn=!0,Zr(r,i,s),ht=c,xn=m;break;case 0:case 11:case 14:case 15:pa(2,s,i),Mt||pa(4,s,i),Zr(r,i,s);break;case 1:Mt||(xr(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&wb(s,i,c)),Zr(r,i,s);break;case 21:Zr(r,i,s);break;case 22:Mt=(c=Mt)||s.memoizedState!==null,Zr(r,i,s),Mt=c;break;default:Zr(r,i,s)}}function Ab(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{po(r)}catch(s){Ke(i,i.return,s)}}}function Ob(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{po(r)}catch(s){Ke(i,i.return,s)}}function cE(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Eb),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Eb),i;default:throw Error(a(435,r.tag))}}function Eu(r,i){var s=cE(r);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=bE.bind(null,r,c);c.then(m,m)}})}function bn(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(Sa(S.type)){ht=S.stateNode,xn=!1;break e}break;case 5:ht=S.stateNode,xn=!1;break e;case 3:case 4:ht=S.stateNode.containerInfo,xn=!0;break e}S=S.return}if(ht===null)throw Error(a(160));Nb(y,k,m),ht=null,xn=!1,y=m.alternate,y!==null&&(y.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Rb(i,r),i=i.sibling}var ur=null;function Rb(r,i){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:bn(i,r),vn(r),c&4&&(pa(3,r,r.return),Es(3,r),pa(5,r,r.return));break;case 1:bn(i,r),vn(r),c&512&&(Mt||s===null||xr(s,s.return)),c&64&&Vr&&(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(bn(i,r),vn(r),c&512&&(Mt||s===null||xr(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[ts]||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,qt(y),c=y;break e;case"link":var k=Rv("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=Rv("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,qt(y),c=y}r.stateNode=c}else Mv(m,r.type,r.stateNode);else r.stateNode=Ov(m,c,r.memoizedProps);else y!==c?(y===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):y.count--,c===null?Mv(m,r.type,r.stateNode):Ov(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&Pf(r,r.memoizedProps,s.memoizedProps)}break;case 27:bn(i,r),vn(r),c&512&&(Mt||s===null||xr(s,s.return)),s!==null&&c&4&&Pf(r,r.memoizedProps,s.memoizedProps);break;case 5:if(bn(i,r),vn(r),c&512&&(Mt||s===null||xr(s,s.return)),r.flags&32){m=r.stateNode;try{Li(m,"")}catch(fe){Ke(r,r.return,fe)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,Pf(r,m,s!==null?s.memoizedProps:m)),c&1024&&(Bf=!0);break;case 6:if(bn(i,r),vn(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(Iu=null,m=ur,ur=Zu(i.containerInfo),bn(i,r),ur=m,vn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{po(i.containerInfo)}catch(fe){Ke(r,r.return,fe)}Bf&&(Bf=!1,Mb(r));break;case 4:c=ur,ur=Zu(r.stateNode.containerInfo),bn(i,r),vn(r),ur=c;break;case 12:bn(i,r),vn(r);break;case 31:bn(i,r),vn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Eu(r,c)));break;case 13:bn(i,r),vn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(ju=ut()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Eu(r,c)));break;case 22:m=r.memoizedState!==null;var R=s!==null&&s.memoizedState!==null,H=Vr,K=Mt;if(Vr=H||m,Mt=K||R,bn(i,r),Mt=K,Vr=H,vn(r),c&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||R||Vr||Mt||ci(r)),s=null,i=r;;){if(i.tag===5||i.tag===26){if(s===null){R=s=i;try{if(y=R.stateNode,m)k=y.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{S=R.stateNode;var ne=R.memoizedProps.style,F=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;S.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(fe){Ke(R,R.return,fe)}}}else if(i.tag===6){if(s===null){R=i;try{R.stateNode.nodeValue=m?"":R.memoizedProps}catch(fe){Ke(R,R.return,fe)}}}else if(i.tag===18){if(s===null){R=i;try{var q=R.stateNode;m?wv(q,!0):wv(R.stateNode,!1)}catch(fe){Ke(R,R.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,Eu(r,s))));break;case 19:bn(i,r),vn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Eu(r,c)));break;case 30:break;case 21:break;default:bn(i,r),vn(r)}}function vn(r){var i=r.flags;if(i&2){try{for(var s,c=r.return;c!==null;){if(_b(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,y=Vf(r);Tu(r,y,m);break;case 5:var k=s.stateNode;s.flags&32&&(Li(k,""),s.flags&=-33);var S=Vf(r);Tu(r,S,k);break;case 3:case 4:var R=s.stateNode.containerInfo,H=Vf(r);Zf(r,H,R);break;default:throw Error(a(161))}}catch(K){Ke(r,r.return,K)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function Mb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;Mb(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Br(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Cb(r,i.alternate,i),i=i.sibling}function ci(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:pa(4,i,i.return),ci(i);break;case 1:xr(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&wb(i,i.return,s),ci(i);break;case 27:Ls(i.stateNode);case 26:case 5:xr(i,i.return),ci(i);break;case 22:i.memoizedState===null&&ci(i);break;case 30:ci(i);break;default:ci(i)}r=r.sibling}}function Ir(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:Ir(m,y,s),Es(4,y);break;case 1:if(Ir(m,y,s),c=y,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(H){Ke(c,c.return,H)}if(c=y,m=c.updateQueue,m!==null){var S=c.stateNode;try{var R=m.shared.hiddenCallbacks;if(R!==null)for(m.shared.hiddenCallbacks=null,m=0;m<R.length;m++)dx(R[m],S)}catch(H){Ke(c,c.return,H)}}s&&k&64&&Sb(y),Cs(y,y.return);break;case 27:Tb(y);case 26:case 5:Ir(m,y,s),s&&c===null&&k&4&&zb(y),Cs(y,y.return);break;case 12:Ir(m,y,s);break;case 31:Ir(m,y,s),s&&k&4&&Ab(m,y);break;case 13:Ir(m,y,s),s&&k&4&&Ob(m,y);break;case 22:y.memoizedState===null&&Ir(m,y,s),Cs(y,y.return);break;case 30:break;default:Ir(m,y,s)}i=i.sibling}}function If(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&&ms(s))}function Hf(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&ms(r))}function cr(r,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Db(r,i,s,c),i=i.sibling}function Db(r,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:cr(r,i,s,c),m&2048&&Es(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&&ms(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(R){Ke(i,i.return,R)}}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):js(r,i):y._visibility&2?cr(r,i,s,c):(y._visibility|=2,ro(r,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&If(k,i);break;case 24:cr(r,i,s,c),m&2048&&Hf(i.alternate,i);break;default:cr(r,i,s,c)}}function ro(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,R=c,H=k.flags;switch(k.tag){case 0:case 11:case 15:ro(y,k,S,R,m),Es(8,k);break;case 23:break;case 22:var K=k.stateNode;k.memoizedState!==null?K._visibility&2?ro(y,k,S,R,m):js(y,k):(K._visibility|=2,ro(y,k,S,R,m)),m&&H&2048&&If(k.alternate,k);break;case 24:ro(y,k,S,R,m),m&&H&2048&&Hf(k.alternate,k);break;default:ro(y,k,S,R,m)}i=i.sibling}}function js(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:js(s,c),m&2048&&If(c.alternate,c);break;case 24:js(s,c),m&2048&&Hf(c.alternate,c);break;default:js(s,c)}i=i.sibling}}var Ns=8192;function ao(r,i,s){if(r.subtreeFlags&Ns)for(r=r.child;r!==null;)$b(r,i,s),r=r.sibling}function $b(r,i,s){switch(r.tag){case 26:ao(r,i,s),r.flags&Ns&&r.memoizedState!==null&&KE(s,ur,r.memoizedState,r.memoizedProps);break;case 5:ao(r,i,s);break;case 3:case 4:var c=ur;ur=Zu(r.stateNode.containerInfo),ao(r,i,s),ur=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Ns,Ns=16777216,ao(r,i,s),Ns=c):ao(r,i,s));break;default:ao(r,i,s)}}function Lb(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 As(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];Gt=c,Pb(c,r)}Lb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ub(r),r=r.sibling}function Ub(r){switch(r.tag){case 0:case 11:case 15:As(r),r.flags&2048&&pa(9,r,r.return);break;case 3:As(r);break;case 12:As(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Cu(r)):As(r);break;default:As(r)}}function Cu(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];Gt=c,Pb(c,r)}Lb(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:pa(8,i,i.return),Cu(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Cu(i));break;default:Cu(i)}r=r.sibling}}function Pb(r,i){for(;Gt!==null;){var s=Gt;switch(s.tag){case 0:case 11:case 15:pa(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:ms(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,Gt=c;else e:for(s=r;Gt!==null;){c=Gt;var m=c.sibling,y=c.return;if(jb(c),c===s){Gt=null;break e}if(m!==null){m.return=y,Gt=m;break e}Gt=y}}}var dE={getCacheForType:function(r){var i=Jt(At),s=i.data.get(r);return s===void 0&&(s=r(),i.data.set(r,s)),s},cacheSignal:function(){return Jt(At).controller.signal}},fE=typeof WeakMap=="function"?WeakMap:Map,Fe=0,it=null,Re=null,$e=0,Xe=0,Rn=null,ga=!1,io=!1,Ff=!1,Hr=0,zt=0,ya=0,di=0,qf=0,Mn=0,oo=0,Os=null,kn=null,Gf=!1,ju=0,Vb=0,Nu=1/0,Au=null,xa=null,Bt=0,ba=null,so=null,Fr=0,Yf=0,Xf=null,Zb=null,Rs=0,Kf=null;function Dn(){return(Fe&2)!==0&&$e!==0?$e&-$e:V.T!==null?nh():ry()}function Bb(){if(Mn===0)if(($e&536870912)===0||Ue){var r=Pl;Pl<<=1,(Pl&3932160)===0&&(Pl=262144),Mn=r}else Mn=536870912;return r=An.current,r!==null&&(r.flags|=32),Mn}function Sn(r,i,s){(r===it&&(Xe===2||Xe===9)||r.cancelPendingCommit!==null)&&(lo(r,0),va(r,$e,Mn,!1)),es(r,s),((Fe&2)===0||r!==it)&&(r===it&&((Fe&2)===0&&(di|=s),zt===4&&va(r,$e,Mn,!1)),br(r))}function Ib(r,i,s){if((Fe&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&r.expiredLanes)===0||Wo(r,i),m=c?pE(r,i):Qf(r,i,!0),y=c;do{if(m===0){io&&!c&&va(r,i,0,!1);break}else{if(s=r.current.alternate,y&&!hE(s)){m=Qf(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=Os;var R=S.current.memoizedState.isDehydrated;if(R&&(lo(S,k).flags|=256),k=Qf(S,k,!1),k!==2){if(Ff&&!R){S.errorRecoveryDisabledLanes|=y,di|=y,m=4;break e}y=kn,kn=m,y!==null&&(kn===null?kn=y:kn.push.apply(kn,y))}m=k}if(y=!1,m!==2)continue}}if(m===1){lo(r,0),va(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:va(c,i,Mn,!ga);break e;case 2:kn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=ju+300-ut(),10<m)){if(va(c,i,Mn,!ga),Zl(c,0,!0)!==0)break e;Fr=i,c.timeoutHandle=vv(Hb.bind(null,c,s,kn,Au,Gf,i,Mn,di,oo,ga,y,"Throttled",-0,0),m);break e}Hb(c,s,kn,Au,Gf,i,Mn,di,oo,ga,y,null,-0,0)}}break}while(!0);br(r)}function Hb(r,i,s,c,m,y,k,S,R,H,K,ne,F,q){if(r.timeoutHandle=-1,ne=i.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nr},$b(i,y,ne);var fe=(y&62914560)===y?ju-ut():(y&4194048)===y?Vb-ut():0;if(fe=JE(ne,fe),fe!==null){Fr=y,r.cancelPendingCommit=fe(Qb.bind(null,r,i,y,s,c,m,k,S,R,K,ne,null,F,q)),va(r,y,k,!H);return}}Qb(r,i,y,s,c,m,k,S,R)}function hE(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(!jn(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 va(r,i,s,c){i&=~qf,i&=~di,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&&ey(r,s,i)}function Ou(){return(Fe&6)===0?(Ms(0),!1):!0}function Jf(){if(Re!==null){if(Xe===0)var r=Re.return;else r=Re,Mr=ni=null,hf(r),Qi=null,gs=0,r=Re;for(;r!==null;)kb(r.alternate,r),r=r.return;Re=null}}function lo(r,i){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,RE(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Fr=0,Jf(),it=r,Re=s=Or(r.current,null),$e=i,Xe=0,Rn=null,ga=!1,io=Wo(r,i),Ff=!1,oo=Mn=qf=di=ya=zt=0,kn=Os=null,Gf=!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 Hr=i,Wl(),s}function Fb(r,i){je=null,V.H=zs,i===Ji||i===su?(i=sx(),Xe=3):i===ef?(i=sx(),Xe=4):Xe=i===jf?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Rn=i,Re===null&&(zt=1,ku(r,qn(i,r.current)))}function qb(){var r=An.current;return r===null?!0:($e&4194048)===$e?Kn===null:($e&62914560)===$e||($e&536870912)!==0?r===Kn:!1}function Gb(){var r=V.H;return V.H=zs,r===null?zs:r}function Yb(){var r=V.A;return V.A=dE,r}function Ru(){zt=4,ga||($e&4194048)!==$e&&An.current!==null||(io=!0),(ya&134217727)===0&&(di&134217727)===0||it===null||va(it,$e,Mn,!1)}function Qf(r,i,s){var c=Fe;Fe|=2;var m=Gb(),y=Yb();(it!==r||$e!==i)&&(Au=null,lo(r,i)),i=!1;var k=zt;e:do try{if(Xe!==0&&Re!==null){var S=Re,R=Rn;switch(Xe){case 8:Jf(),k=6;break e;case 3:case 2:case 9:case 6:An.current===null&&(i=!0);var H=Xe;if(Xe=0,Rn=null,uo(r,S,R,H),s&&io){k=0;break e}break;default:H=Xe,Xe=0,Rn=null,uo(r,S,R,H)}}mE(),k=zt;break}catch(K){Fb(r,K)}while(!0);return i&&r.shellSuspendCounter++,Mr=ni=null,Fe=c,V.H=m,V.A=y,Re===null&&(it=null,$e=0,Wl()),k}function mE(){for(;Re!==null;)Xb(Re)}function pE(r,i){var s=Fe;Fe|=2;var c=Gb(),m=Yb();it!==r||$e!==i?(Au=null,Nu=ut()+500,lo(r,i)):io=Wo(r,i);e:do try{if(Xe!==0&&Re!==null){i=Re;var y=Rn;t:switch(Xe){case 1:Xe=0,Rn=null,uo(r,i,y,1);break;case 2:case 9:if(ix(y)){Xe=0,Rn=null,Kb(i);break}i=function(){Xe!==2&&Xe!==9||it!==r||(Xe=7),br(r)},y.then(i,i);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:ix(y)?(Xe=0,Rn=null,Kb(i)):(Xe=0,Rn=null,uo(r,i,y,7));break;case 5:var k=null;switch(Re.tag){case 26:k=Re.memoizedState;case 5:case 27:var S=Re;if(k?Dv(k):S.stateNode.complete){Xe=0,Rn=null;var R=S.sibling;if(R!==null)Re=R;else{var H=S.return;H!==null?(Re=H,Mu(H)):Re=null}break t}}Xe=0,Rn=null,uo(r,i,y,5);break;case 6:Xe=0,Rn=null,uo(r,i,y,6);break;case 8:Jf(),zt=6;break e;default:throw Error(a(462))}}gE();break}catch(K){Fb(r,K)}while(!0);return Mr=ni=null,V.H=c,V.A=m,Fe=s,Re!==null?0:(it=null,$e=0,Wl(),zt)}function gE(){for(;Re!==null&&!Et();)Xb(Re)}function Xb(r){var i=bb(r.alternate,r,Hr);r.memoizedProps=r.pendingProps,i===null?Mu(r):Re=i}function Kb(r){var i=r,s=i.alternate;switch(i.tag){case 15:case 0:i=hb(s,i,i.pendingProps,i.type,void 0,$e);break;case 11:i=hb(s,i,i.pendingProps,i.type.render,i.ref,$e);break;case 5:hf(i);default:kb(s,i),i=Re=Yy(i,Hr),i=bb(s,i,Hr)}r.memoizedProps=r.pendingProps,i===null?Mu(r):Re=i}function uo(r,i,s,c){Mr=ni=null,hf(i),Qi=null,gs=0;var m=i.return;try{if(aE(r,m,i,s,$e)){zt=1,ku(r,qn(s,r.current)),Re=null;return}}catch(y){if(m!==null)throw Re=m,y;zt=1,ku(r,qn(s,r.current)),Re=null;return}i.flags&32768?(Ue||c===1?r=!0:io||($e&536870912)!==0?r=!1:(ga=r=!0,(c===2||c===9||c===3||c===6)&&(c=An.current,c!==null&&c.tag===13&&(c.flags|=16384))),Jb(i,r)):Mu(i)}function Mu(r){var i=r;do{if((i.flags&32768)!==0){Jb(i,ga);return}r=i.return;var s=sE(i.alternate,i,Hr);if(s!==null){Re=s;return}if(i=i.sibling,i!==null){Re=i;return}Re=i=r}while(i!==null);zt===0&&(zt=5)}function Jb(r,i){do{var s=lE(r.alternate,r);if(s!==null){s.flags&=32767,Re=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(r=r.sibling,r!==null)){Re=r;return}Re=r=s}while(r!==null);zt=6,Re=null}function Qb(r,i,s,c,m,y,k,S,R){r.cancelPendingCommit=null;do Du();while(Bt!==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|=Pd,X2(r,s,y,k,S,R),r===it&&(Re=it=null,$e=0),so=i,ba=r,Fr=s,Yf=y,Xf=m,Zb=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,vE(xe,function(){return rv(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=V.T,V.T=null,m=X.p,X.p=2,k=Fe,Fe|=4;try{uE(r,i,s)}finally{Fe=k,X.p=m,V.T=c}}Bt=1,Wb(),ev(),tv()}}function Wb(){if(Bt===1){Bt=0;var r=ba,i=so,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=V.T,V.T=null;var c=X.p;X.p=2;var m=Fe;Fe|=4;try{Rb(i,r);var y=ch,k=Py(r.containerInfo),S=y.focusedElem,R=y.selectionRange;if(k!==S&&S&&S.ownerDocument&&Uy(S.ownerDocument.documentElement,S)){if(R!==null&&Md(S)){var H=R.start,K=R.end;if(K===void 0&&(K=H),"selectionStart"in S)S.selectionStart=H,S.selectionEnd=Math.min(K,S.value.length);else{var ne=S.ownerDocument||document,F=ne&&ne.defaultView||window;if(F.getSelection){var q=F.getSelection(),fe=S.textContent.length,we=Math.min(R.start,fe),tt=R.end===void 0?we:Math.min(R.end,fe);!q.extend&&we>tt&&(k=tt,tt=we,we=k);var U=Ly(S,we),M=Ly(S,tt);if(U&&M&&(q.rangeCount!==1||q.anchorNode!==U.node||q.anchorOffset!==U.offset||q.focusNode!==M.node||q.focusOffset!==M.offset)){var I=ne.createRange();I.setStart(U.node,U.offset),q.removeAllRanges(),we>tt?(q.addRange(I),q.extend(M.node,M.offset)):(I.setEnd(M.node,M.offset),q.addRange(I))}}}}for(ne=[],q=S;q=q.parentNode;)q.nodeType===1&&ne.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ne.length;S++){var ee=ne[S];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}Gu=!!uh,ch=uh=null}finally{Fe=m,X.p=c,V.T=s}}r.current=i,Bt=2}}function ev(){if(Bt===2){Bt=0;var r=ba,i=so,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=V.T,V.T=null;var c=X.p;X.p=2;var m=Fe;Fe|=4;try{Cb(r,i.alternate,i)}finally{Fe=m,X.p=c,V.T=s}}Bt=3}}function tv(){if(Bt===4||Bt===3){Bt=0,Vt();var r=ba,i=so,s=Fr,c=Zb;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Bt=5:(Bt=0,so=ba=null,nv(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(xa=null),pd(s),i=i.stateNode,Zt&&typeof Zt.onCommitFiberRoot=="function")try{Zt.onCommitFiberRoot(un,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=V.T,m=X.p,X.p=2,V.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{V.T=i,X.p=m}}(Fr&3)!==0&&Du(),br(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===Kf?Rs++:(Rs=0,Kf=r):Rs=0,Ms(0)}}function nv(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,ms(i)))}function Du(){return Wb(),ev(),tv(),rv()}function rv(){if(Bt!==5)return!1;var r=ba,i=Yf;Yf=0;var s=pd(Fr),c=V.T,m=X.p;try{X.p=32>s?32:s,V.T=null,s=Xf,Xf=null;var y=ba,k=Fr;if(Bt=0,so=ba=null,Fr=0,(Fe&6)!==0)throw Error(a(331));var S=Fe;if(Fe|=4,Ub(y.current),Db(y,y.current,k,s),Fe=S,Ms(0,!1),Zt&&typeof Zt.onPostCommitFiberRoot=="function")try{Zt.onPostCommitFiberRoot(un,y)}catch{}return!0}finally{X.p=m,V.T=c,nv(r,i)}}function av(r,i,s){i=qn(s,i),i=Cf(r.stateNode,i,2),r=fa(r,i,2),r!==null&&(es(r,2),br(r))}function Ke(r,i,s){if(r.tag===3)av(r,r,s);else for(;i!==null;){if(i.tag===3){av(i,r,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(xa===null||!xa.has(c))){r=qn(s,r),s=ib(2),c=fa(i,s,2),c!==null&&(ob(s,c,i,r),es(c,2),br(c));break}}i=i.return}}function Wf(r,i,s){var c=r.pingCache;if(c===null){c=r.pingCache=new fE;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)||(Ff=!0,m.add(s),r=yE.bind(null,r,i,s),i.then(r,r))}function yE(r,i,s){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,it===r&&($e&s)===s&&(zt===4||zt===3&&($e&62914560)===$e&&300>ut()-ju?(Fe&2)===0&&lo(r,0):qf|=s,oo===$e&&(oo=0)),br(r)}function iv(r,i){i===0&&(i=Wg()),r=Wa(r,i),r!==null&&(es(r,i),br(r))}function xE(r){var i=r.memoizedState,s=0;i!==null&&(s=i.retryLane),iv(r,s)}function bE(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),iv(r,s)}function vE(r,i){return Ft(r,i)}var $u=null,co=null,eh=!1,Lu=!1,th=!1,ka=0;function br(r){r!==co&&r.next===null&&(co===null?$u=co=r:co=co.next=r),Lu=!0,eh||(eh=!0,SE())}function Ms(r,i){if(!th&&Lu){th=!0;do for(var s=!1,c=$u;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,uv(c,y))}else y=$e,y=Zl(c,c===it?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||Wo(c,y)||(s=!0,uv(c,y));c=c.next}while(s);th=!1}}function kE(){ov()}function ov(){Lu=eh=!1;var r=0;ka!==0&&OE()&&(r=ka);for(var i=ut(),s=null,c=$u;c!==null;){var m=c.next,y=sv(c,i);y===0?(c.next=null,s===null?$u=m:s.next=m,m===null&&(co=s)):(s=c,(r!==0||(y&3)!==0)&&(Lu=!0)),c=m}Bt!==0&&Bt!==5||Ms(r),ka!==0&&(ka=0)}function sv(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,R=m[k];R===-1?((S&s)===0||(S&c)!==0)&&(m[k]=Y2(S,i)):R<=i&&(r.expiredLanes|=S),y&=~S}if(i=it,s=$e,s=Zl(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&&Bn(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Wo(r,s)){if(i=s&-s,i===r.callbackPriority)return i;switch(c!==null&&Bn(c),pd(s)){case 2:case 8:s=ue;break;case 32:s=xe;break;case 268435456:s=Ve;break;default:s=xe}return c=lv.bind(null,r),s=Ft(s,c),r.callbackPriority=i,r.callbackNode=s,i}return c!==null&&c!==null&&Bn(c),r.callbackPriority=2,r.callbackNode=null,2}function lv(r,i){if(Bt!==0&&Bt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Du()&&r.callbackNode!==s)return null;var c=$e;return c=Zl(r,r===it?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(Ib(r,c,i),sv(r,ut()),r.callbackNode!=null&&r.callbackNode===s?lv.bind(null,r):null)}function uv(r,i){if(Du())return null;Ib(r,i,!0)}function SE(){ME(function(){(Fe&6)!==0?Ft(Q,kE):ov()})}function nh(){if(ka===0){var r=Xi;r===0&&(r=Ul,Ul<<=1,(Ul&261888)===0&&(Ul=256)),ka=r}return ka}function cv(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Fl(""+r)}function dv(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 wE(r,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var y=cv((m[gn]||null).action),k=c.submitter;k&&(i=(i=k[gn]||null)?cv(i.formAction):k.getAttribute("formAction"),i!==null&&(y=i,k=null));var S=new Xl("action","action",null,c,m);r.push({event:S,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(ka!==0){var R=k?dv(m,k):new FormData(m);Sf(s,{pending:!0,data:R,method:m.method,action:y},null,R)}}else typeof y=="function"&&(S.preventDefault(),R=k?dv(m,k):new FormData(m),Sf(s,{pending:!0,data:R,method:m.method,action:y},y,R))},currentTarget:m}]})}}for(var rh=0;rh<Ud.length;rh++){var ah=Ud[rh],zE=ah.toLowerCase(),_E=ah[0].toUpperCase()+ah.slice(1);lr(zE,"on"+_E)}lr(By,"onAnimationEnd"),lr(Iy,"onAnimationIteration"),lr(Hy,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(ZT,"onTransitionRun"),lr(BT,"onTransitionStart"),lr(IT,"onTransitionCancel"),lr(Fy,"onTransitionEnd"),Di("onMouseEnter",["mouseout","mouseover"]),Di("onMouseLeave",["mouseout","mouseover"]),Di("onPointerEnter",["pointerout","pointerover"]),Di("onPointerLeave",["pointerout","pointerover"]),Xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ds="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(" "),TE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ds));function fv(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],R=S.instance,H=S.currentTarget;if(S=S.listener,R!==y&&m.isPropagationStopped())break e;y=S,m.currentTarget=H;try{y(m)}catch(K){Ql(K)}m.currentTarget=null,y=R}else for(k=0;k<c.length;k++){if(S=c[k],R=S.instance,H=S.currentTarget,S=S.listener,R!==y&&m.isPropagationStopped())break e;y=S,m.currentTarget=H;try{y(m)}catch(K){Ql(K)}m.currentTarget=null,y=R}}}}function Me(r,i){var s=i[gd];s===void 0&&(s=i[gd]=new Set);var c=r+"__bubble";s.has(c)||(hv(i,r,2,!1),s.add(c))}function ih(r,i,s){var c=0;i&&(c|=4),hv(s,r,c,i)}var Uu="_reactListening"+Math.random().toString(36).slice(2);function oh(r){if(!r[Uu]){r[Uu]=!0,oy.forEach(function(s){s!=="selectionchange"&&(TE.has(s)||ih(s,!1,r),ih(s,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Uu]||(i[Uu]=!0,ih("selectionchange",!1,i))}}function hv(r,i,s,c){switch(Bv(i)){case 2:var m=eC;break;case 8:m=tC;break;default:m=kh}s=m.bind(null,i,s,r),m=void 0,!_d||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 sh(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 R=k.tag;if((R===3||R===4)&&k.stateNode.containerInfo===m)return;k=k.return}for(;S!==null;){if(k=Oi(S),k===null)return;if(R=k.tag,R===5||R===6||R===26||R===27){c=y=k;continue e}S=S.parentNode}}c=c.return}xy(function(){var H=y,K=wd(s),ne=[];e:{var F=qy.get(r);if(F!==void 0){var q=Xl,fe=r;switch(r){case"keypress":if(Gl(s)===0)break e;case"keydown":case"keyup":q=bT;break;case"focusin":fe="focus",q=jd;break;case"focusout":fe="blur",q=jd;break;case"beforeblur":case"afterblur":q=jd;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=ky;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=sT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=ST;break;case By:case Iy:case Hy:q=cT;break;case Fy:q=zT;break;case"scroll":case"scrollend":q=iT;break;case"wheel":q=TT;break;case"copy":case"cut":case"paste":q=fT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=wy;break;case"toggle":case"beforetoggle":q=CT}var we=(i&4)!==0,tt=!we&&(r==="scroll"||r==="scrollend"),U=we?F!==null?F+"Capture":null:F;we=[];for(var M=H,I;M!==null;){var ee=M;if(I=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||I===null||U===null||(ee=rs(M,U),ee!=null&&we.push($s(M,ee,I))),tt)break;M=M.return}0<we.length&&(F=new q(F,fe,null,s,K),ne.push({event:F,listeners:we}))}}if((i&7)===0){e:{if(F=r==="mouseover"||r==="pointerover",q=r==="mouseout"||r==="pointerout",F&&s!==Sd&&(fe=s.relatedTarget||s.fromElement)&&(Oi(fe)||fe[Ai]))break e;if((q||F)&&(F=K.window===K?K:(F=K.ownerDocument)?F.defaultView||F.parentWindow:window,q?(fe=s.relatedTarget||s.toElement,q=H,fe=fe?Oi(fe):null,fe!==null&&(tt=u(fe),we=fe.tag,fe!==tt||we!==5&&we!==27&&we!==6)&&(fe=null)):(q=null,fe=H),q!==fe)){if(we=ky,ee="onMouseLeave",U="onMouseEnter",M="mouse",(r==="pointerout"||r==="pointerover")&&(we=wy,ee="onPointerLeave",U="onPointerEnter",M="pointer"),tt=q==null?F:ns(q),I=fe==null?F:ns(fe),F=new we(ee,M+"leave",q,s,K),F.target=tt,F.relatedTarget=I,ee=null,Oi(K)===H&&(we=new we(U,M+"enter",fe,s,K),we.target=I,we.relatedTarget=tt,ee=we),tt=ee,q&&fe)t:{for(we=EE,U=q,M=fe,I=0,ee=U;ee;ee=we(ee))I++;ee=0;for(var Se=M;Se;Se=we(Se))ee++;for(;0<I-ee;)U=we(U),I--;for(;0<ee-I;)M=we(M),ee--;for(;I--;){if(U===M||M!==null&&U===M.alternate){we=U;break t}U=we(U),M=we(M)}we=null}else we=null;q!==null&&mv(ne,F,q,we,!1),fe!==null&&tt!==null&&mv(ne,tt,fe,we,!0)}}e:{if(F=H?ns(H):window,q=F.nodeName&&F.nodeName.toLowerCase(),q==="select"||q==="input"&&F.type==="file")var Ie=Ay;else if(jy(F))if(Oy)Ie=UT;else{Ie=$T;var be=DT}else q=F.nodeName,!q||q.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?H&&kd(H.elementType)&&(Ie=Ay):Ie=LT;if(Ie&&(Ie=Ie(r,H))){Ny(ne,Ie,s,K);break e}be&&be(r,F,H),r==="focusout"&&H&&F.type==="number"&&H.memoizedProps.value!=null&&vd(F,"number",F.value)}switch(be=H?ns(H):window,r){case"focusin":(jy(be)||be.contentEditable==="true")&&(Zi=be,Dd=H,ds=null);break;case"focusout":ds=Dd=Zi=null;break;case"mousedown":$d=!0;break;case"contextmenu":case"mouseup":case"dragend":$d=!1,Vy(ne,s,K);break;case"selectionchange":if(VT)break;case"keydown":case"keyup":Vy(ne,s,K)}var Ne;if(Ad)e:{switch(r){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Vi?Ey(r,s)&&(Le="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(zy&&s.locale!=="ko"&&(Vi||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Vi&&(Ne=by()):(ia=K,Td="value"in ia?ia.value:ia.textContent,Vi=!0)),be=Pu(H,Le),0<be.length&&(Le=new Sy(Le,r,null,s,K),ne.push({event:Le,listeners:be}),Ne?Le.data=Ne:(Ne=Cy(s),Ne!==null&&(Le.data=Ne)))),(Ne=NT?AT(r,s):OT(r,s))&&(Le=Pu(H,"onBeforeInput"),0<Le.length&&(be=new Sy("onBeforeInput","beforeinput",null,s,K),ne.push({event:be,listeners:Le}),be.data=Ne)),wE(ne,r,H,s,K)}fv(ne,i)})}function $s(r,i,s){return{instance:r,listener:i,currentTarget:s}}function Pu(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=rs(r,s),m!=null&&c.unshift($s(r,m,y)),m=rs(r,i),m!=null&&c.push($s(r,m,y))),r.tag===3)return c;r=r.return}return[]}function EE(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function mv(r,i,s,c,m){for(var y=i._reactName,k=[];s!==null&&s!==c;){var S=s,R=S.alternate,H=S.stateNode;if(S=S.tag,R!==null&&R===c)break;S!==5&&S!==26&&S!==27||H===null||(R=H,m?(H=rs(s,y),H!=null&&k.unshift($s(s,H,R))):m||(H=rs(s,y),H!=null&&k.push($s(s,H,R)))),s=s.return}k.length!==0&&r.push({event:i,listeners:k})}var CE=/\r\n?/g,jE=/\u0000|\uFFFD/g;function pv(r){return(typeof r=="string"?r:""+r).replace(CE,`
9
+ `).replace(jE,"")}function gv(r,i){return i=pv(i),pv(r)===i}function et(r,i,s,c,m,y){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Li(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Li(r,""+c);break;case"className":Il(r,"class",c);break;case"tabIndex":Il(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Il(r,s,c);break;case"style":gy(r,c,y);break;case"data":if(i!=="object"){Il(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=Fl(""+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=Fl(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=Nr);break;case"onScroll":c!=null&&Me("scroll",r);break;case"onScrollEnd":c!=null&&Me("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=Fl(""+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":Me("beforetoggle",r),Me("toggle",r),Bl(r,"popover",c);break;case"xlinkActuate":jr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":jr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":jr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":jr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":jr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":jr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":jr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":jr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":jr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Bl(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=rT.get(s)||s,Bl(r,s,c))}}function lh(r,i,s,c,m,y){switch(s){case"style":gy(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"?Li(r,c):(typeof c=="number"||typeof c=="bigint")&&Li(r,""+c);break;case"onScroll":c!=null&&Me("scroll",r);break;case"onScrollEnd":c!=null&&Me("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Nr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sy.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[gn]||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,""):Bl(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":Me("error",r),Me("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":Me("invalid",r);var S=y=k=m=null,R=null,H=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":R=K;break;case"defaultChecked":H=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)}}fy(r,y,S,R,H,k,m,!1);return;case"select":Me("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?$i(r,!!c,i,!1):s!=null&&$i(r,!!c,s,!0);return;case"textarea":Me("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)}my(r,c,m,y);return;case"option":for(R in s)s.hasOwnProperty(R)&&(c=s[R],c!=null)&&(R==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":et(r,i,R,c,s,null));return;case"dialog":Me("beforetoggle",r),Me("toggle",r),Me("cancel",r),Me("close",r);break;case"iframe":case"object":Me("load",r);break;case"video":case"audio":for(c=0;c<Ds.length;c++)Me(Ds[c],r);break;case"image":Me("error",r),Me("load",r);break;case"details":Me("toggle",r);break;case"embed":case"source":case"link":Me("error",r),Me("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(H in s)if(s.hasOwnProperty(H)&&(c=s[H],c!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:et(r,i,H,c,s,null)}return;default:if(kd(i)){for(K in s)s.hasOwnProperty(K)&&(c=s[K],c!==void 0&&lh(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 NE(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,R=null,H=null,K=null;for(q in s){var ne=s[q];if(s.hasOwnProperty(q)&&ne!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":R=ne;default:c.hasOwnProperty(q)||et(r,i,q,null,c,ne)}}for(var F in c){var q=c[F];if(ne=s[F],c.hasOwnProperty(F)&&(q!=null||ne!=null))switch(F){case"type":y=q;break;case"name":m=q;break;case"checked":H=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!==ne&&et(r,i,F,q,c,ne)}}bd(r,k,S,R,H,K,y,m);return;case"select":q=k=S=F=null;for(y in s)if(R=s[y],s.hasOwnProperty(y)&&R!=null)switch(y){case"value":break;case"multiple":q=R;default:c.hasOwnProperty(y)||et(r,i,y,null,c,R)}for(m in c)if(y=c[m],R=s[m],c.hasOwnProperty(m)&&(y!=null||R!=null))switch(m){case"value":F=y;break;case"defaultValue":S=y;break;case"multiple":k=y;default:y!==R&&et(r,i,m,y,c,R)}i=S,s=k,c=q,F!=null?$i(r,!!s,F,!1):!!c!=!!s&&(i!=null?$i(r,!!s,i,!0):$i(r,!!s,s?[]:"",!1));return;case"textarea":q=F=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":F=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)}hy(r,F,q);return;case"option":for(var fe in s)F=s[fe],s.hasOwnProperty(fe)&&F!=null&&!c.hasOwnProperty(fe)&&(fe==="selected"?r.selected=!1:et(r,i,fe,null,c,F));for(R in c)F=c[R],q=s[R],c.hasOwnProperty(R)&&F!==q&&(F!=null||q!=null)&&(R==="selected"?r.selected=F&&typeof F!="function"&&typeof F!="symbol":et(r,i,R,F,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 we in s)F=s[we],s.hasOwnProperty(we)&&F!=null&&!c.hasOwnProperty(we)&&et(r,i,we,null,c,F);for(H in c)if(F=c[H],q=s[H],c.hasOwnProperty(H)&&F!==q&&(F!=null||q!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,i));break;default:et(r,i,H,F,c,q)}return;default:if(kd(i)){for(var tt in s)F=s[tt],s.hasOwnProperty(tt)&&F!==void 0&&!c.hasOwnProperty(tt)&&lh(r,i,tt,void 0,c,F);for(K in c)F=c[K],q=s[K],!c.hasOwnProperty(K)||F===q||F===void 0&&q===void 0||lh(r,i,K,F,c,q);return}}for(var U in s)F=s[U],s.hasOwnProperty(U)&&F!=null&&!c.hasOwnProperty(U)&&et(r,i,U,null,c,F);for(ne in c)F=c[ne],q=s[ne],!c.hasOwnProperty(ne)||F===q||F==null&&q==null||et(r,i,ne,F,c,q)}function yv(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AE(){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&&yv(k)){for(k=0,S=m.responseEnd,c+=1;c<s.length;c++){var R=s[c],H=R.startTime;if(H>S)break;var K=R.transferSize,ne=R.initiatorType;K&&yv(ne)&&(R=R.responseEnd,k+=K*(R<S?1:(S-H)/(R-H)))}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 uh=null,ch=null;function Vu(r){return r.nodeType===9?r:r.ownerDocument}function xv(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 bv(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 dh(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 fh=null;function OE(){var r=window.event;return r&&r.type==="popstate"?r===fh?!1:(fh=r,!0):(fh=null,!1)}var vv=typeof setTimeout=="function"?setTimeout:void 0,RE=typeof clearTimeout=="function"?clearTimeout:void 0,kv=typeof Promise=="function"?Promise:void 0,ME=typeof queueMicrotask=="function"?queueMicrotask:typeof kv<"u"?function(r){return kv.resolve(null).then(r).catch(DE)}:vv;function DE(r){setTimeout(function(){throw r})}function Sa(r){return r==="head"}function Sv(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),po(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ls(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ls(s);for(var y=s.firstChild;y;){var k=y.nextSibling,S=y.nodeName;y[ts]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&y.rel.toLowerCase()==="stylesheet"||s.removeChild(y),y=k}}else s==="body"&&Ls(r.ownerDocument.body);s=m}while(s);po(i)}function wv(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 hh(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":hh(s),yd(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function $E(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[ts])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=Jn(r.nextSibling),r===null)break}return null}function LE(r,i,s){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Jn(r.nextSibling),r===null))return null;return r}function zv(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Jn(r.nextSibling),r===null))return null;return r}function mh(r){return r.data==="$?"||r.data==="$~"}function ph(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function UE(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 Jn(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 gh=null;function _v(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(i===0)return Jn(r.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}r=r.nextSibling}return null}function Tv(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 Ev(r,i,s){switch(i=Vu(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 Ls(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);yd(r)}var Qn=new Map,Cv=new Set;function Zu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var qr=X.d;X.d={f:PE,r:VE,D:ZE,C:BE,L:IE,m:HE,X:qE,S:FE,M:GE};function PE(){var r=qr.f(),i=Ou();return r||i}function VE(r){var i=Ri(r);i!==null&&i.tag===5&&i.type==="form"?Fx(i):qr.r(r)}var fo=typeof document>"u"?null:document;function jv(r,i,s){var c=fo;if(c&&typeof i=="string"&&i){var m=Hn(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Cv.has(m)||(Cv.add(m),r={rel:r,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Wt(i,"link",r),qt(i),c.head.appendChild(i)))}}function ZE(r){qr.D(r),jv("dns-prefetch",r,null)}function BE(r,i){qr.C(r,i),jv("preconnect",r,i)}function IE(r,i,s){qr.L(r,i,s);var c=fo;if(c&&r&&i){var m='link[rel="preload"][as="'+Hn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Hn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Hn(s.imageSizes)+'"]')):m+='[href="'+Hn(r)+'"]';var y=m;switch(i){case"style":y=ho(r);break;case"script":y=mo(r)}Qn.has(y)||(r=x({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:r,as:i},s),Qn.set(y,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(Us(y))||i==="script"&&c.querySelector(Ps(y))||(i=c.createElement("link"),Wt(i,"link",r),qt(i),c.head.appendChild(i)))}}function HE(r,i){qr.m(r,i);var s=fo;if(s&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Hn(c)+'"][href="'+Hn(r)+'"]',y=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=mo(r)}if(!Qn.has(y)&&(r=x({rel:"modulepreload",href:r},i),Qn.set(y,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ps(y)))return}c=s.createElement("link"),Wt(c,"link",r),qt(c),s.head.appendChild(c)}}}function FE(r,i,s){qr.S(r,i,s);var c=fo;if(c&&r){var m=Mi(c).hoistableStyles,y=ho(r);i=i||"default";var k=m.get(y);if(!k){var S={loading:0,preload:null};if(k=c.querySelector(Us(y)))S.loading=5;else{r=x({rel:"stylesheet",href:r,"data-precedence":i},s),(s=Qn.get(y))&&yh(r,s);var R=k=c.createElement("link");qt(R),Wt(R,"link",r),R._p=new Promise(function(H,K){R.onload=H,R.onerror=K}),R.addEventListener("load",function(){S.loading|=1}),R.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Bu(k,i,c)}k={type:"stylesheet",instance:k,count:1,state:S},m.set(y,k)}}}function qE(r,i){qr.X(r,i);var s=fo;if(s&&r){var c=Mi(s).hoistableScripts,m=mo(r),y=c.get(m);y||(y=s.querySelector(Ps(m)),y||(r=x({src:r,async:!0},i),(i=Qn.get(m))&&xh(r,i),y=s.createElement("script"),qt(y),Wt(y,"link",r),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(m,y))}}function GE(r,i){qr.M(r,i);var s=fo;if(s&&r){var c=Mi(s).hoistableScripts,m=mo(r),y=c.get(m);y||(y=s.querySelector(Ps(m)),y||(r=x({src:r,async:!0,type:"module"},i),(i=Qn.get(m))&&xh(r,i),y=s.createElement("script"),qt(y),Wt(y,"link",r),s.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(m,y))}}function Nv(r,i,s,c){var m=(m=ge.current)?Zu(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=ho(s.href),s=Mi(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=ho(s.href);var y=Mi(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(Us(r)))&&!y._p&&(k.instance=y,k.state.loading=5),Qn.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},Qn.set(r,s),y||YE(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=mo(s),s=Mi(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 ho(r){return'href="'+Hn(r)+'"'}function Us(r){return'link[rel="stylesheet"]['+r+"]"}function Av(r){return x({},r,{"data-precedence":r.precedence,precedence:null})}function YE(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),qt(i),r.head.appendChild(i))}function mo(r){return'[src="'+Hn(r)+'"]'}function Ps(r){return"script[async]"+r}function Ov(r,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Hn(s.href)+'"]');if(c)return i.instance=c,qt(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"),qt(c),Wt(c,"style",m),Bu(c,s.precedence,r),i.instance=c;case"stylesheet":m=ho(s.href);var y=r.querySelector(Us(m));if(y)return i.state.loading|=4,i.instance=y,qt(y),y;c=Av(s),(m=Qn.get(m))&&yh(c,m),y=(r.ownerDocument||r).createElement("link"),qt(y);var k=y;return k._p=new Promise(function(S,R){k.onload=S,k.onerror=R}),Wt(y,"link",c),i.state.loading|=4,Bu(y,s.precedence,r),i.instance=y;case"script":return y=mo(s.src),(m=r.querySelector(Ps(y)))?(i.instance=m,qt(m),m):(c=s,(m=Qn.get(y))&&(c=x({},s),xh(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),qt(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,Bu(c,s.precedence,r));return i.instance}function Bu(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 yh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function xh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Iu=null;function Rv(r,i,s){if(Iu===null){var c=new Map,m=Iu=new Map;m.set(s,c)}else m=Iu,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[ts]||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 Mv(r,i,s){r=r.ownerDocument||r,r.head.insertBefore(s,i==="title"?r.querySelector("head > title"):null)}function XE(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 Dv(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function KE(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=ho(c.href),y=i.querySelector(Us(m));if(y){i=y._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Hu.bind(r),i.then(r,r)),s.state.loading|=4,s.instance=y,qt(y);return}y=i.ownerDocument||i,c=Av(c),(m=Qn.get(m))&&yh(c,m),y=y.createElement("link"),qt(y);var k=y;k._p=new Promise(function(S,R){k.onload=S,k.onerror=R}),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=Hu.bind(r),i.addEventListener("load",s),i.addEventListener("error",s))}}var bh=0;function JE(r,i){return r.stylesheets&&r.count===0&&qu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&qu(r,r.stylesheets),r.unsuspend){var y=r.unsuspend;r.unsuspend=null,y()}},6e4+i);0<r.imgBytes&&bh===0&&(bh=62500*AE());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&qu(r,r.stylesheets),r.unsuspend)){var y=r.unsuspend;r.unsuspend=null,y()}},(r.imgBytes>bh?50:800)+i);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Hu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Fu=null;function qu(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Fu=new Map,i.forEach(QE,r),Fu=null,Hu.call(r))}function QE(r,i){if(!(i.state.loading&4)){var s=Fu.get(r);if(s)var c=s.get(null);else{s=new Map,Fu.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=Hu.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 Vs={$$typeof:_,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function WE(r,i,s,c,m,y,k,S,R){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=hd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hd(0),this.hiddenUpdates=hd(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=y,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function $v(r,i,s,c,m,y,k,S,R,H,K,ne){return r=new WE(r,i,s,k,R,H,K,ne,S),i=1,y===!0&&(i|=24),y=Nn(3,null,null,i),r.current=y,y.stateNode=r,i=Jd(),i.refCount++,r.pooledCache=i,i.refCount++,y.memoizedState={element:c,isDehydrated:s,cache:i},tf(y),r}function Lv(r){return r?(r=Hi,r):Hi}function Uv(r,i,s,c,m,y){m=Lv(m),c.context===null?c.context=m:c.pendingContext=m,c=da(i),c.payload={element:s},y=y===void 0?null:y,y!==null&&(c.callback=y),s=fa(r,c,i),s!==null&&(Sn(s,r,i),xs(s,r,i))}function Pv(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<i?s:i}}function vh(r,i){Pv(r,i),(r=r.alternate)&&Pv(r,i)}function Vv(r){if(r.tag===13||r.tag===31){var i=Wa(r,67108864);i!==null&&Sn(i,r,67108864),vh(r,67108864)}}function Zv(r){if(r.tag===13||r.tag===31){var i=Dn();i=md(i);var s=Wa(r,i);s!==null&&Sn(s,r,i),vh(r,i)}}var Gu=!0;function eC(r,i,s,c){var m=V.T;V.T=null;var y=X.p;try{X.p=2,kh(r,i,s,c)}finally{X.p=y,V.T=m}}function tC(r,i,s,c){var m=V.T;V.T=null;var y=X.p;try{X.p=8,kh(r,i,s,c)}finally{X.p=y,V.T=m}}function kh(r,i,s,c){if(Gu){var m=Sh(c);if(m===null)sh(r,i,c,Yu,s),Iv(r,c);else if(rC(m,r,i,s,c))c.stopPropagation();else if(Iv(r,c),i&4&&-1<nC.indexOf(r)){for(;m!==null;){var y=Ri(m);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var k=Ya(y.pendingLanes);if(k!==0){var S=y;for(S.pendingLanes|=2,S.entangledLanes|=2;k;){var R=1<<31-at(k);S.entanglements[1]|=R,k&=~R}br(y),(Fe&6)===0&&(Nu=ut()+500,Ms(0))}}break;case 31:case 13:S=Wa(y,2),S!==null&&Sn(S,y,2),Ou(),vh(y,2)}if(y=Sh(c),y===null&&sh(r,i,c,Yu,s),y===m)break;m=y}m!==null&&c.stopPropagation()}else sh(r,i,c,null,s)}}function Sh(r){return r=wd(r),wh(r)}var Yu=null;function wh(r){if(Yu=null,r=Oi(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 Yu=r,null}function Bv(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(Ni()){case Q:return 2;case ue:return 8;case xe:case _e:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var zh=!1,wa=null,za=null,_a=null,Zs=new Map,Bs=new Map,Ta=[],nC="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 Iv(r,i){switch(r){case"focusin":case"focusout":wa=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":_a=null;break;case"pointerover":case"pointerout":Zs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bs.delete(i.pointerId)}}function Is(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=Ri(i),i!==null&&Vv(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function rC(r,i,s,c,m){switch(i){case"focusin":return wa=Is(wa,r,i,s,c,m),!0;case"dragenter":return za=Is(za,r,i,s,c,m),!0;case"mouseover":return _a=Is(_a,r,i,s,c,m),!0;case"pointerover":var y=m.pointerId;return Zs.set(y,Is(Zs.get(y)||null,r,i,s,c,m)),!0;case"gotpointercapture":return y=m.pointerId,Bs.set(y,Is(Bs.get(y)||null,r,i,s,c,m)),!0}return!1}function Hv(r){var i=Oi(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,ay(r.priority,function(){Zv(s)});return}}else if(i===31){if(i=d(s),i!==null){r.blockedOn=i,ay(r.priority,function(){Zv(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 Xu(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var s=Sh(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);Sd=c,s.target.dispatchEvent(c),Sd=null}else return i=Ri(s),i!==null&&Vv(i),r.blockedOn=s,!1;i.shift()}return!0}function Fv(r,i,s){Xu(r)&&s.delete(i)}function aC(){zh=!1,wa!==null&&Xu(wa)&&(wa=null),za!==null&&Xu(za)&&(za=null),_a!==null&&Xu(_a)&&(_a=null),Zs.forEach(Fv),Bs.forEach(Fv)}function Ku(r,i){r.blockedOn===i&&(r.blockedOn=null,zh||(zh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,aC)))}var Ju=null;function qv(r){Ju!==r&&(Ju=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ju===r&&(Ju=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(wh(c||s)===null)continue;break}var y=Ri(s);y!==null&&(r.splice(i,3),i-=3,Sf(y,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function po(r){function i(R){return Ku(R,r)}wa!==null&&Ku(wa,r),za!==null&&Ku(za,r),_a!==null&&Ku(_a,r),Zs.forEach(i),Bs.forEach(i);for(var s=0;s<Ta.length;s++){var c=Ta[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Ta.length&&(s=Ta[0],s.blockedOn===null);)Hv(s),s.blockedOn===null&&Ta.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[gn]||null;if(typeof y=="function")k||qv(s);else if(k){var S=null;if(y&&y.hasAttribute("formAction")){if(m=y,k=y[gn]||null)S=k.formAction;else if(wh(m)!==null)continue}else S=k.action;typeof S=="function"?s[c+1]=S:(s.splice(c,3),c-=3),qv(s)}}}function Gv(){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 _h(r){this._internalRoot=r}Qu.prototype.render=_h.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=Dn();Uv(s,c,r,i,null,null)},Qu.prototype.unmount=_h.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Uv(r.current,2,null,r,null,null),Ou(),i[Ai]=null}};function Qu(r){this._internalRoot=r}Qu.prototype.unstable_scheduleHydration=function(r){if(r){var i=ry();r={blockedOn:null,target:r,priority:i};for(var s=0;s<Ta.length&&i!==0&&i<Ta[s].priority;s++);Ta.splice(s,0,r),s===0&&Hv(r)}};var Yv=t.version;if(Yv!=="19.2.4")throw Error(a(527,Yv,"19.2.4"));X.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?p(r):null,r=r===null?null:r.stateNode,r};var iC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wu.isDisabled&&Wu.supportsFiber)try{un=Wu.inject(iC),Zt=Wu}catch{}}return Fs.createRoot=function(r,i){if(!o(r))throw Error(a(299));var s=!1,c="",m=tb,y=nb,k=rb;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=$v(r,1,!1,null,null,s,c,null,m,y,k,Gv),r[Ai]=i.current,oh(r),new _h(i)},Fs.hydrateRoot=function(r,i,s){if(!o(r))throw Error(a(299));var c=!1,m="",y=tb,k=nb,S=rb,R=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&&(R=s.formState)),i=$v(r,1,!0,i,s??null,c,m,R,y,k,S,Gv),i.context=Lv(null),s=i.current,c=Dn(),c=md(c),m=da(c),m.callback=null,fa(s,m,c),s=c,i.current.lanes=s,es(i,s),br(i),r[Ai]=i.current,oh(r),new Qu(i)},Fs.version="19.2.4",Fs}var a0;function pC(){if(a0)return Ch.exports;a0=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(),Ch.exports=mC(),Ch.exports}var gC=pC();var i0="popstate";function yC(e={}){function t(a,o){let{pathname:u,search:l,hash:d}=a.location;return jm("",{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:hl(o)}return bC(t,n,null,e)}function pt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xC(){return Math.random().toString(36).substring(2,10)}function o0(e,t){return{usr:e.state,key:e.key,idx:t}}function jm(e,t,n=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Zo(t):t,state:n,key:t&&t.key||a||xC()}}function hl({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 Zo(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 bC(e,t,n,a={}){let{window:o=document.defaultView,v5Compat:u=!1}=a,l=o.history,d="POP",f=null,h=p();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function p(){return(l.state||{idx:null}).idx}function x(){d="POP";let N=p(),j=N==null?null:N-h;h=N,f&&f({action:d,location:E.location,delta:j})}function b(N,j){d="PUSH";let A=jm(E.location,N,j);h=p()+1;let _=o0(A,h),P=E.createHref(A);try{l.pushState(_,"",P)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;o.location.assign(P)}u&&f&&f({action:d,location:E.location,delta:1})}function v(N,j){d="REPLACE";let A=jm(E.location,N,j);h=p();let _=o0(A,h),P=E.createHref(A);l.replaceState(_,"",P),u&&f&&f({action:d,location:E.location,delta:0})}function w(N){return vC(N)}let E={get action(){return d},get location(){return e(o,l)},listen(N){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(i0,x),f=N,()=>{o.removeEventListener(i0,x),f=null}},createHref(N){return t(o,N)},createURL:w,encodeLocation(N){let j=w(N);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:b,replace:v,go(N){return l.go(N)}};return E}function vC(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),pt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:hl(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function NS(e,t,n="/"){return kC(e,t,n,!1)}function kC(e,t,n,a){let o=typeof t=="string"?Zo(t):t,u=Qr(o.pathname||"/",n);if(u==null)return null;let l=AS(e);SC(l);let d=null;for(let f=0;d==null&&f<l.length;++f){let h=RC(u);d=AC(l[f],h,a)}return d}function AS(e,t=[],n=[],a="",o=!1){let u=(l,d,f=o,h)=>{let p={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(a)&&f)return;pt(p.relativePath.startsWith(a),`Absolute route path "${p.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(a.length)}let x=Kr([a,p.relativePath]),b=n.concat(p);l.children&&l.children.length>0&&(pt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),AS(l.children,t,b,x,f)),!(l.path==null&&!l.index)&&t.push({path:x,score:jC(x,l.index),routesMeta:b})};return e.forEach((l,d)=>{if(l.path===""||!l.path?.includes("?"))u(l,d);else for(let f of OS(l.path))u(l,d,!0,f)}),t}function OS(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=OS(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 SC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:NC(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var wC=/^:[\w-]+$/,zC=3,_C=2,TC=1,EC=10,CC=-2,s0=e=>e==="*";function jC(e,t){let n=e.split("/"),a=n.length;return n.some(s0)&&(a+=CC),t&&(a+=_C),n.filter(o=>!s0(o)).reduce((o,u)=>o+(wC.test(u)?zC:u===""?TC:EC),a)}function NC(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 AC(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,p=u==="/"?t:t.slice(u.length)||"/",x=jc({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},p),b=f.route;if(!x&&h&&n&&!a[a.length-1].route.index&&(x=jc({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!x)return null;Object.assign(o,x.params),l.push({params:o,pathname:Kr([u,x.pathname]),pathnameBase:LC(Kr([u,x.pathnameBase])),route:b}),x.pathnameBase!=="/"&&(u=Kr([u,x.pathnameBase]))}return l}function jc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=OC(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:p,isOptional:x},b)=>{if(p==="*"){let w=d[b]||"";l=u.slice(0,u.length-w.length).replace(/(.)\/+$/,"$1")}const v=d[b];return x&&!v?h[p]=void 0:h[p]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:l,pattern:e}}function OC(e,t=!1,n=!0){hr(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 RC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hr(!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 Qr(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 MC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function DC(e,t="/"){let{pathname:n,search:a="",hash:o=""}=typeof e=="string"?Zo(e):e,u;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?u=l0(n.substring(1),"/"):u=l0(n,t)):u=t,{pathname:u,search:UC(a),hash:PC(o)}}function l0(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 Oh(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 $C(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Op(e){let t=$C(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Rp(e,t,n,a=!1){let o;typeof e=="string"?o=Zo(e):(o={...e},pt(!o.pathname||!o.pathname.includes("?"),Oh("?","pathname","search",o)),pt(!o.pathname||!o.pathname.includes("#"),Oh("#","pathname","hash",o)),pt(!o.search||!o.search.includes("#"),Oh("#","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=DC(o,d),h=l&&l!=="/"&&l.endsWith("/"),p=(u||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}var Kr=e=>e.join("/").replace(/\/\/+/g,"/"),LC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),UC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,PC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,VC=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 ZC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function BC(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var RS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function MS(e,t){let n=e;if(typeof n!="string"||!MC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,o=!1;if(RS)try{let u=new URL(window.location.href),l=n.startsWith("//")?new URL(u.protocol+n):new URL(n),d=Qr(l.pathname,t);l.origin===u.origin&&d!=null?n=d+l.search+l.hash:o=!0}catch{hr(!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 DS=["POST","PUT","PATCH","DELETE"];new Set(DS);var IC=["GET",...DS];new Set(IC);var Bo=z.createContext(null);Bo.displayName="DataRouter";var Kc=z.createContext(null);Kc.displayName="DataRouterState";var HC=z.createContext(!1),$S=z.createContext({isTransitioning:!1});$S.displayName="ViewTransition";var FC=z.createContext(new Map);FC.displayName="Fetchers";var qC=z.createContext(null);qC.displayName="Await";var Pn=z.createContext(null);Pn.displayName="Navigation";var jl=z.createContext(null);jl.displayName="Location";var Er=z.createContext({outlet:null,matches:[],isDataRoute:!1});Er.displayName="Route";var Mp=z.createContext(null);Mp.displayName="RouteError";var LS="REACT_ROUTER_ERROR",GC="REDIRECT",YC="ROUTE_ERROR_RESPONSE";function XC(e){if(e.startsWith(`${LS}:${GC}:{`))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 KC(e){if(e.startsWith(`${LS}:${YC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new VC(t.status,t.statusText,t.data)}catch{}}function JC(e,{relative:t}={}){pt(Io(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=z.useContext(Pn),{hash:o,pathname:u,search:l}=Nl(e,{relative:t}),d=u;return n!=="/"&&(d=u==="/"?n:Kr([n,u])),a.createHref({pathname:d,search:l,hash:o})}function Io(){return z.useContext(jl)!=null}function mr(){return pt(Io(),"useLocation() may be used only in the context of a <Router> component."),z.useContext(jl).location}var US="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function PS(e){z.useContext(Pn).static||z.useLayoutEffect(e)}function Dp(){let{isDataRoute:e}=z.useContext(Er);return e?cj():QC()}function QC(){pt(Io(),"useNavigate() may be used only in the context of a <Router> component.");let e=z.useContext(Bo),{basename:t,navigator:n}=z.useContext(Pn),{matches:a}=z.useContext(Er),{pathname:o}=mr(),u=JSON.stringify(Op(a)),l=z.useRef(!1);return PS(()=>{l.current=!0}),z.useCallback((f,h={})=>{if(hr(l.current,US),!l.current)return;if(typeof f=="number"){n.go(f);return}let p=Rp(f,JSON.parse(u),o,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Kr([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,u,o,e])}z.createContext(null);function Nl(e,{relative:t}={}){let{matches:n}=z.useContext(Er),{pathname:a}=mr(),o=JSON.stringify(Op(n));return z.useMemo(()=>Rp(e,JSON.parse(o),a,t==="path"),[e,o,a,t])}function WC(e,t){return VS(e,t)}function VS(e,t,n,a,o){pt(Io(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=z.useContext(Pn),{matches:l}=z.useContext(Er),d=l[l.length-1],f=d?d.params:{},h=d?d.pathname:"/",p=d?d.pathnameBase:"/",x=d&&d.route;{let A=x&&x.path||"";BS(h,!x||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${A}">) 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="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=mr(),v;if(t){let A=typeof t=="string"?Zo(t):t;pt(p==="/"||A.pathname?.startsWith(p),`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 "${p}" but pathname "${A.pathname}" was given in the \`location\` prop.`),v=A}else v=b;let w=v.pathname||"/",E=w;if(p!=="/"){let A=p.replace(/^\//,"").split("/");E="/"+w.replace(/^\//,"").split("/").slice(A.length).join("/")}let N=NS(e,{pathname:E});hr(x||N!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),hr(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.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 j=aj(N&&N.map(A=>Object.assign({},A,{params:Object.assign({},f,A.params),pathname:Kr([p,u.encodeLocation?u.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?p:Kr([p,u.encodeLocation?u.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),l,n,a,o);return t&&j?z.createElement(jl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},j):j}function ej(){let e=uj(),t=ZC(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 tj=z.createElement(ej,null),ZS=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=KC(e.digest);n&&(e=n)}let t=e!==void 0?z.createElement(Er.Provider,{value:this.props.routeContext},z.createElement(Mp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?z.createElement(nj,{error:e},t):t}};ZS.contextType=HC;var Rh=new WeakMap;function nj({children:e,error:t}){let{basename:n}=z.useContext(Pn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=XC(t.digest);if(a){let o=Rh.get(t);if(o)throw o;let u=MS(a.location,n);if(RS&&!Rh.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 Rh.set(t,l),l}return z.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function rj({routeContext:e,match:t,children:n}){let a=z.useContext(Bo);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),z.createElement(Er.Provider,{value:e},n)}function aj(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 p=u.findIndex(x=>x.route.id&&l?.[x.route.id]!==void 0);pt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),u=u.slice(0,Math.min(u.length,p+1))}let d=!1,f=-1;if(n)for(let p=0;p<u.length;p++){let x=u[p];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(f=p),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?(p,x)=>{a(p,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:BC(n.matches),errorInfo:x})}:void 0;return u.reduceRight((p,x,b)=>{let v,w=!1,E=null,N=null;n&&(v=l&&x.route.id?l[x.route.id]:void 0,E=x.route.errorElement||tj,d&&(f<0&&b===0?(BS("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,N=null):f===b&&(w=!0,N=x.route.hydrateFallbackElement||null)));let j=t.concat(u.slice(0,b+1)),A=()=>{let _;return v?_=E:w?_=N:x.route.Component?_=z.createElement(x.route.Component,null):x.route.element?_=x.route.element:_=p,z.createElement(rj,{match:x,routeContext:{outlet:p,matches:j,isDataRoute:n!=null},children:_})};return n&&(x.route.ErrorBoundary||x.route.errorElement||b===0)?z.createElement(ZS,{location:n.location,revalidation:n.revalidation,component:E,error:v,children:A(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:h}):A()},null)}function $p(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ij(e){let t=z.useContext(Bo);return pt(t,$p(e)),t}function oj(e){let t=z.useContext(Kc);return pt(t,$p(e)),t}function sj(e){let t=z.useContext(Er);return pt(t,$p(e)),t}function Lp(e){let t=sj(e),n=t.matches[t.matches.length-1];return pt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function lj(){return Lp("useRouteId")}function uj(){let e=z.useContext(Mp),t=oj("useRouteError"),n=Lp("useRouteError");return e!==void 0?e:t.errors?.[n]}function cj(){let{router:e}=ij("useNavigate"),t=Lp("useNavigate"),n=z.useRef(!1);return PS(()=>{n.current=!0}),z.useCallback(async(o,u={})=>{hr(n.current,US),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var u0={};function BS(e,t,n){!t&&!u0[e]&&(u0[e]=!0,hr(!1,n))}z.memo(dj);function dj({routes:e,future:t,state:n,onError:a}){return VS(e,void 0,n,a,t)}function IS({to:e,replace:t,state:n,relative:a}){pt(Io(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=z.useContext(Pn);hr(!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(Er),{pathname:l}=mr(),d=Dp(),f=Rp(e,Op(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 wn(e){pt(!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 fj({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:o,static:u=!1,unstable_useTransitions:l}){pt(!Io(),"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=Zo(n));let{pathname:h="/",search:p="",hash:x="",state:b=null,key:v="default"}=n,w=z.useMemo(()=>{let E=Qr(h,d);return E==null?null:{location:{pathname:E,search:p,hash:x,state:b,key:v},navigationType:a}},[d,h,p,x,b,v,a]);return hr(w!=null,`<Router basename="${d}"> is not able to match the URL "${h}${p}${x}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:z.createElement(Pn.Provider,{value:f},z.createElement(jl.Provider,{children:t,value:w}))}function c0({children:e,location:t}){return WC(Nm(e),t)}function Nm(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,Nm(a.props.children,u));return}pt(a.type===wn,`[${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>`),pt(!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=Nm(a.props.children,u)),n.push(l)}),n}var vc="get",kc="application/x-www-form-urlencoded";function Jc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function hj(e){return Jc(e)&&e.tagName.toLowerCase()==="button"}function mj(e){return Jc(e)&&e.tagName.toLowerCase()==="form"}function pj(e){return Jc(e)&&e.tagName.toLowerCase()==="input"}function gj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yj(e,t){return e.button===0&&(!t||t==="_self")&&!gj(e)}var ec=null;function xj(){if(ec===null)try{new FormData(document.createElement("form"),0),ec=!1}catch{ec=!0}return ec}var bj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mh(e){return e!=null&&!bj.has(e)?(hr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kc}"`),null):e}function vj(e,t){let n,a,o,u,l;if(mj(e)){let d=e.getAttribute("action");a=d?Qr(d,t):null,n=e.getAttribute("method")||vc,o=Mh(e.getAttribute("enctype"))||kc,u=new FormData(e)}else if(hj(e)||pj(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?Qr(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||vc,o=Mh(e.getAttribute("formenctype"))||Mh(d.getAttribute("enctype"))||kc,u=new FormData(d,e),!xj()){let{name:h,type:p,value:x}=e;if(p==="image"){let b=h?`${h}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else h&&u.append(h,x)}}else{if(Jc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=vc,a=null,o=kc,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 Up(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function kj(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&&Qr(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${a}`,o}async function Sj(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 wj(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 zj(e,t,n){let a=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let l=await Sj(u,n);return l.links?l.links():[]}return[]}));return Cj(a.flat(1).filter(wj).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function d0(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 p=a.routes[f.route.id];if(!p||!p.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 _j(e,t,{includeHydrateFallback:n}={}){return Tj(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 Tj(e){return[...new Set(e)]}function Ej(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function Cj(e,t){let n=new Set;return new Set(t),e.reduce((a,o)=>{let u=JSON.stringify(Ej(o));return n.has(u)||(n.add(u),a.push({key:u,link:o})),a},[])}function HS(){let e=z.useContext(Bo);return Up(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function jj(){let e=z.useContext(Kc);return Up(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Pp=z.createContext(void 0);Pp.displayName="FrameworkContext";function FS(){let e=z.useContext(Pp);return Up(e,"You must render this element inside a <HydratedRouter> element"),e}function Nj(e,t){let n=z.useContext(Pp),[a,o]=z.useState(!1),[u,l]=z.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:p,onTouchStart:x}=t,b=z.useRef(null);z.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let E=j=>{j.forEach(A=>{l(A.isIntersecting)})},N=new IntersectionObserver(E,{threshold:.5});return b.current&&N.observe(b.current),()=>{N.disconnect()}}},[e]),z.useEffect(()=>{if(a){let E=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(E)}}},[a]);let v=()=>{o(!0)},w=()=>{o(!1),l(!1)};return n?e!=="intent"?[u,b,{}]:[u,b,{onFocus:qs(d,v),onBlur:qs(f,w),onMouseEnter:qs(h,v),onMouseLeave:qs(p,w),onTouchStart:qs(x,v)}]:[!1,b,{}]}function qs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Aj({page:e,...t}){let{router:n}=HS(),a=z.useMemo(()=>NS(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?z.createElement(Rj,{page:e,matches:a,...t}):null}function Oj(e){let{manifest:t,routeModules:n}=FS(),[a,o]=z.useState([]);return z.useEffect(()=>{let u=!1;return zj(e,t,n).then(l=>{u||o(l)}),()=>{u=!0}},[e,t,n]),a}function Rj({page:e,matches:t,...n}){let a=mr(),{future:o,manifest:u,routeModules:l}=FS(),{basename:d}=HS(),{loaderData:f,matches:h}=jj(),p=z.useMemo(()=>d0(e,t,h,u,a,"data"),[e,t,h,u,a]),x=z.useMemo(()=>d0(e,t,h,u,a,"assets"),[e,t,h,u,a]),b=z.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,N=!1;if(t.forEach(A=>{let _=u.routes[A.route.id];!_||!_.hasLoader||(!p.some(P=>P.route.id===A.route.id)&&A.route.id in f&&l[A.route.id]?.shouldRevalidate||_.hasClientLoader?N=!0:E.add(A.route.id))}),E.size===0)return[];let j=kj(e,d,o.unstable_trailingSlashAwareDataRequests,"data");return N&&E.size>0&&j.searchParams.set("_routes",t.filter(A=>E.has(A.route.id)).map(A=>A.route.id).join(",")),[j.pathname+j.search]},[d,o.unstable_trailingSlashAwareDataRequests,f,a,u,p,t,e,l]),v=z.useMemo(()=>_j(x,u),[x,u]),w=Oj(x);return z.createElement(z.Fragment,null,b.map(E=>z.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...n})),v.map(E=>z.createElement("link",{key:E,rel:"modulepreload",href:E,...n})),w.map(({key:E,link:N})=>z.createElement("link",{key:E,nonce:n.nonce,...N,crossOrigin:N.crossOrigin??n.crossOrigin})))}function Mj(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Dj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Dj&&(window.__reactRouterVersion="7.13.0")}catch{}function $j({basename:e,children:t,unstable_useTransitions:n,window:a}){let o=z.useRef();o.current==null&&(o.current=yC({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(fj,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,unstable_useTransitions:n})}var qS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kr=z.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:o,reloadDocument:u,replace:l,state:d,target:f,to:h,preventScrollReset:p,viewTransition:x,unstable_defaultShouldRevalidate:b,...v},w){let{basename:E,unstable_useTransitions:N}=z.useContext(Pn),j=typeof h=="string"&&qS.test(h),A=MS(h,E);h=A.to;let _=JC(h,{relative:o}),[P,D,L]=Nj(a,v),G=Vj(h,{replace:l,state:d,target:f,preventScrollReset:p,relative:o,viewTransition:x,unstable_defaultShouldRevalidate:b,unstable_useTransitions:N});function Z(ce){t&&t(ce),ce.defaultPrevented||G(ce)}let J=z.createElement("a",{...v,...L,href:A.absoluteURL||_,onClick:A.isExternal||u?t:Z,ref:Mj(w,D),target:f,"data-discover":!j&&n==="render"?"true":void 0});return P&&!j?z.createElement(z.Fragment,null,J,z.createElement(Aj,{page:_})):J});kr.displayName="Link";var Lj=z.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:o=!1,style:u,to:l,viewTransition:d,children:f,...h},p){let x=Nl(l,{relative:h.relative}),b=mr(),v=z.useContext(Kc),{navigator:w,basename:E}=z.useContext(Pn),N=v!=null&&Fj(x)&&d===!0,j=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,A=b.pathname,_=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(A=A.toLowerCase(),_=_?_.toLowerCase():null,j=j.toLowerCase()),_&&E&&(_=Qr(_,E)||_);const P=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let D=A===j||!o&&A.startsWith(j)&&A.charAt(P)==="/",L=_!=null&&(_===j||!o&&_.startsWith(j)&&_.charAt(j.length)==="/"),G={isActive:D,isPending:L,isTransitioning:N},Z=D?t:void 0,J;typeof a=="function"?J=a(G):J=[a,D?"active":null,L?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let ce=typeof u=="function"?u(G):u;return z.createElement(kr,{...h,"aria-current":Z,className:J,ref:p,style:ce,to:l,viewTransition:d},typeof f=="function"?f(G):f)});Lj.displayName="NavLink";var Uj=z.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:o,state:u,method:l=vc,action:d,onSubmit:f,relative:h,preventScrollReset:p,viewTransition:x,unstable_defaultShouldRevalidate:b,...v},w)=>{let{unstable_useTransitions:E}=z.useContext(Pn),N=Ij(),j=Hj(d,{relative:h}),A=l.toLowerCase()==="get"?"get":"post",_=typeof d=="string"&&qS.test(d),P=D=>{if(f&&f(D),D.defaultPrevented)return;D.preventDefault();let L=D.nativeEvent.submitter,G=L?.getAttribute("formmethod")||l,Z=()=>N(L||D.currentTarget,{fetcherKey:t,method:G,navigate:n,replace:o,state:u,relative:h,preventScrollReset:p,viewTransition:x,unstable_defaultShouldRevalidate:b});E&&n!==!1?z.startTransition(()=>Z()):Z()};return z.createElement("form",{ref:w,method:A,action:j,onSubmit:a?f:P,...v,"data-discover":!_&&e==="render"?"true":void 0})});Uj.displayName="Form";function Pj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function GS(e){let t=z.useContext(Bo);return pt(t,Pj(e)),t}function Vj(e,{target:t,replace:n,state:a,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:d,unstable_useTransitions:f}={}){let h=Dp(),p=mr(),x=Nl(e,{relative:u});return z.useCallback(b=>{if(yj(b,t)){b.preventDefault();let v=n!==void 0?n:hl(p)===hl(x),w=()=>h(e,{replace:v,state:a,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:d});f?z.startTransition(()=>w()):w()}},[p,h,x,n,a,t,e,o,u,l,d,f])}var Zj=0,Bj=()=>`__${String(++Zj)}__`;function Ij(){let{router:e}=GS("useSubmit"),{basename:t}=z.useContext(Pn),n=lj(),a=e.fetch,o=e.navigate;return z.useCallback(async(u,l={})=>{let{action:d,method:f,encType:h,formData:p,body:x}=vj(u,t);if(l.navigate===!1){let b=l.fetcherKey||Bj();await a(b,n,l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,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:p,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 Hj(e,{relative:t}={}){let{basename:n}=z.useContext(Pn),a=z.useContext(Er);pt(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),u={...Nl(e||".",{relative:t})},l=mr();if(e==null){u.search=l.search;let d=new URLSearchParams(u.search),f=d.getAll("index");if(f.some(p=>p==="")){d.delete("index"),f.filter(x=>x).forEach(x=>d.append("index",x));let p=d.toString();u.search=p?`?${p}`:""}}return(!e||e===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(u.pathname=u.pathname==="/"?n:Kr([n,u.pathname])),hl(u)}function Fj(e,{relative:t}={}){let n=z.useContext($S);pt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=GS("useViewTransitionState"),o=Nl(e,{relative:t});if(!n.isTransitioning)return!1;let u=Qr(n.currentLocation.pathname,a)||n.currentLocation.pathname,l=Qr(n.nextLocation.pathname,a)||n.nextLocation.pathname;return jc(o.pathname,l)!=null||jc(o.pathname,u)!=null}const YS=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();const qj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Gj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());const f0=e=>{const t=Gj(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Yj={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 Xj=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Kj=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,...Yj,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:YS("lucide",o),...!u&&!Xj(d)&&{"aria-hidden":"true"},...d},[...l.map(([h,p])=>z.createElement(h,p)),...Array.isArray(u)?u:[u]]));const ze=(e,t)=>{const n=z.forwardRef(({className:a,...o},u)=>z.createElement(Kj,{ref:u,iconNode:t,className:YS(`lucide-${qj(f0(e))}`,`lucide-${e}`,a),...o}));return n.displayName=f0(e),n};const Jj=[["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"}]],ko=ze("activity",Jj);const Qj=[["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"}]],Wj=ze("archive",Qj);const eN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],tN=ze("arrow-down",eN);const nN=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],rN=ze("arrow-left",nN);const aN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],iN=ze("arrow-up",aN);const oN=[["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"}]],ml=ze("bell",oN);const sN=[["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"}]],h0=ze("bot",sN);const lN=[["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"}]],uN=ze("box",lN);const cN=[["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"}]],dN=ze("brain",cN);const fN=[["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"}]],XS=ze("calendar",fN);const hN=[["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"}]],Am=ze("chart-column",hN);const mN=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],pN=ze("check-check",mN);const gN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Om=ze("check",gN);const yN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],xN=ze("circle-check",yN);const bN=[["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"}]],vN=ze("circle-x",bN);const kN=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Vp=ze("clock",kN);const SN=[["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"}]],wN=ze("copy",SN);const zN=[["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"}]],KS=ze("cpu",zN);const _N=[["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"}]],TN=ze("database",_N);const EN=[["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"}]],Nc=ze("dollar-sign",EN);const CN=[["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"}]],Zp=ze("eye",CN);const jN=[["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"}]],NN=ze("file-text",jN);const AN=[["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"}]],ON=ze("funnel",AN);const RN=[["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"}]],MN=ze("hash",RN);const DN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],$N=ze("info",DN);const LN=[["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"}]],m0=ze("layout-dashboard",LN);const UN=[["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"}]],p0=ze("log-out",UN);const PN=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],VN=ze("menu",PN);const ZN=[["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"}]],g0=ze("message-square-plus",ZN);const BN=[["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"}]],pl=ze("message-square",BN);const IN=[["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"}]],JS=ze("moon",IN);const HN=[["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"}]],Bp=ze("pencil",HN);const FN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],QS=ze("plus",FN);const qN=[["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"}]],y0=ze("puzzle",qN);const GN=[["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"}]],YN=ze("refresh-cw",GN);const XN=[["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"}]],x0=ze("rotate-ccw",XN);const KN=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],JN=ze("search",KN);const QN=[["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"}]],WN=ze("send",QN);const eA=[["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"}]],b0=ze("settings",eA);const tA=[["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"}]],WS=ze("sun",tA);const nA=[["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"}]],rA=ze("tag",nA);const aA=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Rm=ze("terminal",aA);const iA=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],oA=ze("toggle-left",iA);const sA=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],lA=ze("toggle-right",sA);const uA=[["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"}]],gl=ze("trash-2",uA);const cA=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],dA=ze("trending-up",cA);const fA=[["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"}]],hA=ze("user",fA);const mA=[["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"}]],Mm=ze("webhook",mA);const pA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gA=ze("x",pA);var Dh={exports:{}},$h={};var v0;function yA(){if(v0)return $h;v0=1;var e=Xc();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}}),E=w[0].inst,N=w[1];return u(function(){E.value=v,E.getSnapshot=b,f(E)&&N({inst:E})},[x,v,b]),o(function(){return f(E)&&N({inst:E}),x(function(){f(E)&&N({inst:E})})},[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 p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return $h.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,$h}var k0;function xA(){return k0||(k0=1,Dh.exports=yA()),Dh.exports}var S0=xA();const ew=0,tw=1,nw=2,w0=3;var z0=Object.prototype.hasOwnProperty;function Dm(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--&&Dm(e[a],t[a]););return a===-1}if(!n||typeof e=="object"){a=0;for(n in e)if(z0.call(e,n)&&++a&&!z0.call(t,n)||!(n in t)||!Dm(e[n],t[n]))return!1;return Object.keys(t).length===a}}return e!==e&&t!==t}const Yr=new WeakMap,Xr=()=>{},rn=Xr(),$m=Object,Ze=e=>e===rn,Sr=e=>typeof e=="function",$a=(e,t)=>({...e,...t}),rw=e=>Sr(e.then),Lh={},tc={},Ip="undefined",Al=typeof window!=Ip,Lm=typeof document!=Ip,bA=Al&&"Deno"in window,vA=()=>Al&&typeof window.requestAnimationFrame!=Ip,aw=(e,t)=>{const n=Yr.get(e);return[()=>!Ze(t)&&e.get(t)||Lh,a=>{if(!Ze(t)){const o=e.get(t);t in tc||(tc[t]=o),n[5](t,$a(o,a),o||Lh)}},n[6],()=>!Ze(t)&&t in tc?tc[t]:!Ze(t)&&e.get(t)||Lh]};let Um=!0;const kA=()=>Um,[Pm,Vm]=Al&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Xr,Xr],SA=()=>{const e=Lm&&document.visibilityState;return Ze(e)||e!=="hidden"},wA=e=>(Lm&&document.addEventListener("visibilitychange",e),Pm("focus",e),()=>{Lm&&document.removeEventListener("visibilitychange",e),Vm("focus",e)}),zA=e=>{const t=()=>{Um=!0,e()},n=()=>{Um=!1};return Pm("online",t),Pm("offline",n),()=>{Vm("online",t),Vm("offline",n)}},_A={isOnline:kA,isVisible:SA},TA={initFocus:wA,initReconnect:zA},_0=!Ap.useId,jo=!Al||bA,EA=e=>vA()?window.requestAnimationFrame(e):setTimeout(e,1),Uh=jo?z.useEffect:z.useLayoutEffect,Ph=typeof navigator<"u"&&navigator.connection,T0=!jo&&Ph&&(["slow-2g","2g"].includes(Ph.effectiveType)||Ph.saveData),nc=new WeakMap,CA=e=>$m.prototype.toString.call(e),Vh=(e,t)=>e===`[object ${t}]`;let jA=0;const Zm=e=>{const t=typeof e,n=CA(e),a=Vh(n,"Date"),o=Vh(n,"RegExp"),u=Vh(n,"Object");let l,d;if($m(e)===e&&!a&&!o){if(l=nc.get(e),l)return l;if(l=++jA+"~",nc.set(e,l),Array.isArray(e)){for(l="@",d=0;d<e.length;d++)l+=Zm(e[d])+",";nc.set(e,l)}if(u){l="#";const f=$m.keys(e).sort();for(;!Ze(d=f.pop());)Ze(e[d])||(l+=d+":"+Zm(e[d])+",");nc.set(e,l)}}else l=a?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return l},Hp=e=>{if(Sr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Zm(e):"",[e,t]};let NA=0;const Bm=()=>++NA;async function iw(...e){const[t,n,a,o]=e,u=$a({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,p=u.throwOnError;if(Sr(n)){const b=n,v=[],w=t.keys();for(const E of w)!/^\$(inf|sub)\$/.test(E)&&b(t.get(E)._k)&&v.push(E);return Promise.all(v.map(x))}return x(n);async function x(b){const[v]=Hp(b);if(!v)return;const[w,E]=aw(t,v),[N,j,A,_]=Yr.get(t),P=()=>{const oe=N[v];return(Sr(u.revalidate)?u.revalidate(w().data,b):u.revalidate!==!1)&&(delete A[v],delete _[v],oe&&oe[0])?oe[0](nw).then(()=>w().data):w().data};if(e.length<3)return P();let D=a,L,G=!1;const Z=Bm();j[v]=[Z,0];const J=!Ze(f),ce=w(),$=ce.data,ie=ce._c,te=Ze(ie)?$:ie;if(J&&(f=Sr(f)?f(te,$):f,E({data:f,_c:te})),Sr(D))try{D=D(te)}catch(oe){L=oe,G=!0}if(D&&rw(D))if(D=await D.catch(oe=>{L=oe,G=!0}),Z!==j[v][0]){if(G)throw L;return D}else G&&J&&h(L)&&(l=!0,E({data:te,_c:rn}));if(l&&!G)if(Sr(l)){const oe=l(D,te);E({data:oe,error:rn,_c:rn})}else E({data:D,error:rn,_c:rn});if(j[v][1]=Bm(),Promise.resolve(P()).then(()=>{E({_c:rn})}),G){if(p)throw L;return}return D}}const E0=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},AA=(e,t)=>{if(!Yr.has(e)){const n=$a(TA,t),a=Object.create(null),o=iw.bind(rn,e);let u=Xr;const l=Object.create(null),d=(p,x)=>{const b=l[p]||[];return l[p]=b,b.push(x),()=>b.splice(b.indexOf(x),1)},f=(p,x,b)=>{e.set(p,x);const v=l[p];if(v)for(const w of v)w(x,b)},h=()=>{if(!Yr.has(e)&&(Yr.set(e,[a,Object.create(null),Object.create(null),Object.create(null),o,f,d]),!jo)){const p=n.initFocus(setTimeout.bind(rn,E0.bind(rn,a,ew))),x=n.initReconnect(setTimeout.bind(rn,E0.bind(rn,a,tw)));u=()=>{p&&p(),x&&x(),Yr.delete(e)}}};return h(),[e,o,h,u]}return[e,Yr.get(e)[4]]},OA=(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)},RA=Dm,[ow,Sc]=AA(new Map),MA=$a({onLoadingSlow:Xr,onSuccess:Xr,onError:Xr,onErrorRetry:OA,onDiscarded:Xr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:T0?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:T0?5e3:3e3,compare:RA,isPaused:()=>!1,cache:ow,mutate:Sc,fallback:{}},_A),DA=(e,t)=>{const n=$a(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=$a(o,l))}return n},$A=z.createContext({}),LA="$inf$",sw=Al&&window.__SWR_DEVTOOLS_USE__,UA=sw?window.__SWR_DEVTOOLS_USE__:[],PA=()=>{sw&&(window.__SWR_DEVTOOLS_REACT__=Ap)},VA=e=>Sr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],ZA=()=>{const e=z.useContext($A);return z.useMemo(()=>$a(MA,e),[e])},BA=e=>(t,n,a)=>e(t,n&&((...u)=>{const[l]=Hp(t),[,,,d]=Yr.get(ow);if(l.startsWith(LA))return n(...u);const f=d[l];return Ze(f)?n(...u):(delete d[l],f)}),a),IA=UA.concat(BA),HA=e=>function(...n){const a=ZA(),[o,u,l]=VA(n),d=DA(a,l);let f=e;const{use:h}=d,p=(h||[]).concat(IA);for(let x=p.length;x--;)f=p[x](f);return f(o,u||d.fetcher||null,d)},FA=(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())}};PA();const Zh=Ap.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}}),Bh={dedupe:!0},C0=Promise.resolve(rn),qA=(e,t,n)=>{const{cache:a,compare:o,suspense:u,fallbackData:l,revalidateOnMount:d,revalidateIfStale:f,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:x,keepPreviousData:b,strictServerPrefetchWarning:v}=n,[w,E,N,j]=Yr.get(a),[A,_]=Hp(e),P=z.useRef(!1),D=z.useRef(!1),L=z.useRef(A),G=z.useRef(t),Z=z.useRef(n),J=()=>Z.current,ce=()=>J().isVisible()&&J().isOnline(),[$,ie,te,oe]=aw(a,A),re=z.useRef({}).current,V=Ze(l)?Ze(n.fallback)?rn:n.fallback[A]:l,X=(Be,rt)=>{for(const lt in re){const Qe=lt;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},B=z.useMemo(()=>{const Be=!A||!t?!1:Ze(d)?J().isPaused()||u?!1:f!==!1:d,rt=Vt=>{const ut=$a(Vt);return delete ut._k,Be?{isValidating:!0,isLoading:!0,...ut}:ut},lt=$(),Qe=oe(),Ft=rt(lt),Bn=lt===Qe?Ft:rt(Qe);let Et=Ft;return[()=>{const Vt=rt($());return X(Vt,Et)?(Et.data=Vt.data,Et.isLoading=Vt.isLoading,Et.isValidating=Vt.isValidating,Et.error=Vt.error,Et):(Et=Vt,Vt)},()=>Bn]},[a,A]),de=S0.useSyncExternalStore(z.useCallback(Be=>te(A,(rt,lt)=>{X(lt,rt)||Be()}),[a,A]),B[0],B[1]),O=!P.current,C=w[A]&&w[A].length>0,Y=de.data,T=Ze(Y)?V&&rw(V)?Zh(V):V:Y,se=de.error,ve=z.useRef(T),ge=b?Ze(Y)?Ze(ve.current)?T:ve.current:Y:T,ye=A&&Ze(T),Ye=!jo&&S0.useSyncExternalStore(()=>Xr,()=>!1,()=>!0);v&&Ye&&!u&&ye&&console.warn(`Missing pre-initiated data for serialized key "${A}" 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 De=C&&!Ze(se)?!1:O&&!Ze(d)?d:J().isPaused()?!1:u?Ze(T)?!1:f:Ze(T)||f,Nt=!!(A&&t&&O&&De),sn=Ze(de.isValidating)?Nt:de.isValidating,Vn=Ze(de.isLoading)?Nt:de.isLoading,pr=z.useCallback(async Be=>{const rt=G.current;if(!A||!rt||D.current||J().isPaused())return!1;let lt,Qe,Ft=!0;const Bn=Be||{},Et=!N[A]||!Bn.dedupe,Vt=()=>_0?!D.current&&A===L.current&&P.current:A===L.current,ut={isValidating:!1,isLoading:!1},Ni=()=>{ie(ut)},Q=()=>{const xe=N[A];xe&&xe[1]===Qe&&delete N[A]},ue={isValidating:!0};Ze($().data)&&(ue.isLoading=!0);try{if(Et&&(ie(ue),n.loadingTimeout&&Ze($().data)&&setTimeout(()=>{Ft&&Vt()&&J().onLoadingSlow(A,n)},n.loadingTimeout),N[A]=[rt(_),Bm()]),[lt,Qe]=N[A],lt=await lt,Et&&setTimeout(Q,n.dedupingInterval),!N[A]||N[A][1]!==Qe)return Et&&Vt()&&J().onDiscarded(A),!1;ut.error=rn;const xe=E[A];if(!Ze(xe)&&(Qe<=xe[0]||Qe<=xe[1]||xe[1]===0))return Ni(),Et&&Vt()&&J().onDiscarded(A),!1;const _e=$().data;ut.data=o(_e,lt)?_e:lt,Et&&Vt()&&J().onSuccess(lt,A,n)}catch(xe){Q();const _e=J(),{shouldRetryOnError:Ve}=_e;_e.isPaused()||(ut.error=xe,Et&&Vt()&&(_e.onError(xe,A,_e),(Ve===!0||Sr(Ve)&&Ve(xe))&&(!J().revalidateOnFocus||!J().revalidateOnReconnect||ce())&&_e.onErrorRetry(xe,A,_e,ln=>{const Cn=w[A];Cn&&Cn[0]&&Cn[0](w0,ln)},{retryCount:(Bn.retryCount||0)+1,dedupe:!0})))}return Ft=!1,Ni(),!0},[A,a]),Zn=z.useCallback((...Be)=>iw(a,L.current,...Be),[]);if(Uh(()=>{G.current=t,Z.current=n,Ze(Y)||(ve.current=Y)}),Uh(()=>{if(!A)return;const Be=pr.bind(rn,Bh);let rt=0;J().revalidateOnFocus&&(rt=Date.now()+J().focusThrottleInterval);const Qe=FA(A,w,(Ft,Bn={})=>{if(Ft==ew){const Et=Date.now();J().revalidateOnFocus&&Et>rt&&ce()&&(rt=Et+J().focusThrottleInterval,Be())}else if(Ft==tw)J().revalidateOnReconnect&&ce()&&Be();else{if(Ft==nw)return pr();if(Ft==w0)return pr(Bn)}});return D.current=!1,L.current=A,P.current=!0,ie({_k:_}),De&&(N[A]||(Ze(T)||jo?Be():EA(Be))),()=>{D.current=!0,Qe()}},[A]),Uh(()=>{let Be;function rt(){const Qe=Sr(h)?h($().data):h;Qe&&Be!==-1&&(Be=setTimeout(lt,Qe))}function lt(){!$().error&&(p||J().isVisible())&&(x||J().isOnline())?pr(Bh).then(rt):rt()}return rt(),()=>{Be&&(clearTimeout(Be),Be=-1)}},[h,p,x,A]),z.useDebugValue(ge),u){if(!_0&&jo&&ye)throw new Error("Fallback data is required when using Suspense in SSR.");ye&&(G.current=t,Z.current=n,D.current=!1);const Be=j[A],rt=!Ze(Be)&&ye?Zn(Be):C0;if(Zh(rt),!Ze(se)&&ye)throw se;const lt=ye?pr(Bh):C0;!Ze(ge)&&ye&&(lt.status="fulfilled",lt.value=!0),Zh(lt)}return{mutate:Zn,get data(){return re.data=!0,ge},get error(){return re.error=!0,se},get isValidating(){return re.isValidating=!0,sn},get isLoading(){return re.isLoading=!0,Vn}}},rr=HA(qA),GA="x-architect-pass",Gs="/api";class vi{static instance;constructor(){}static getInstance(){return vi.instance||(vi.instance=new vi),vi.instance}getHeaders(t={}){const n=localStorage.getItem("morpheus.auth.token"),a={...t};return n&&(a[GA]=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(`${Gs}${t}`,{headers:this.getHeaders()});return this.handleResponse(n)}async post(t,n){const a=await fetch(`${Gs}${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(`${Gs}${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(`${Gs}${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(`${Gs}${t}`,{method:"DELETE",headers:this.getHeaders()});return this.handleResponse(n)}}const Pe=vi.getInstance(),yl="/api",Fp=e=>{const t=e.startsWith(yl)?e.substring(yl.length):e;return Pe.get(t)};function lw(){return rr(`${yl}/status`,Fp,{refreshInterval:5e3})}function YA(){return rr(`${yl}/logs`,Fp)}function XA(e){return rr(e?`${yl}/logs/${e}?limit=1000`:null,Fp,{refreshInterval:2e3})}function uw(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 KA(){const{data:e}=lw();return g.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:[g.jsxs("div",{className:"flex gap-4",children:[g.jsxs("span",{className:e?"text-azure-primary dark:text-matrix-highlight":"text-red-500",children:["● ",e?.status.toUpperCase()||"OFFLINE"]}),g.jsxs("span",{children:["PID: ",e?.pid||"-"]}),g.jsxs("span",{children:["UPTIME: ",e?uw(e.uptimeSeconds):"-"]})]}),g.jsxs("div",{className:"flex gap-4 opacity-70",children:[g.jsxs("span",{children:["v",e?.projectVersion||"0.0.0"]}),g.jsx("span",{children:e?.agentName||"Morpheus"})]})]})}const qp=z.createContext({});function Gp(e){const t=z.useRef(null);return t.current===null&&(t.current=e()),t.current}const cw=typeof window<"u",dw=cw?z.useLayoutEffect:z.useEffect,Qc=z.createContext(null);function Yp(e,t){e.indexOf(t)===-1&&e.push(t)}function Xp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const _r=(e,t,n)=>n>t?t:n<e?e:n;let Kp=()=>{};const Wr={},fw=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function hw(e){return typeof e=="object"&&e!==null}const mw=e=>/^0[^.\s]+$/u.test(e);function Jp(e){let t;return()=>(t===void 0&&(t=e()),t)}const ar=e=>e,JA=(e,t)=>n=>t(e(n)),Ol=(...e)=>e.reduce(JA),xl=(e,t,n)=>{const a=t-e;return a===0?1:(n-e)/a};class Qp{constructor(){this.subscriptions=[]}add(t){return Yp(this.subscriptions,t),()=>Xp(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 Jr=e=>e*1e3,nr=e=>e/1e3;function pw(e,t){return t?e*(1e3/t):0}const gw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,QA=1e-7,WA=12;function e4(e,t,n,a,o){let u,l,d=0;do l=t+(n-t)/2,u=gw(l,a,o)-e,u>0?n=l:t=l;while(Math.abs(u)>QA&&++d<WA);return l}function Rl(e,t,n,a){if(e===t&&n===a)return ar;const o=u=>e4(u,0,1,e,n);return u=>u===0||u===1?u:gw(o(u),t,a)}const yw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xw=e=>t=>1-e(1-t),bw=Rl(.33,1.53,.69,.99),Wp=xw(bw),vw=yw(Wp),kw=e=>(e*=2)<1?.5*Wp(e):.5*(2-Math.pow(2,-10*(e-1))),eg=e=>1-Math.sin(Math.acos(e)),Sw=xw(eg),ww=yw(eg),t4=Rl(.42,0,1,1),n4=Rl(0,0,.58,1),zw=Rl(.42,0,.58,1),r4=e=>Array.isArray(e)&&typeof e[0]!="number",_w=e=>Array.isArray(e)&&typeof e[0]=="number",a4={linear:ar,easeIn:t4,easeInOut:zw,easeOut:n4,circIn:eg,circInOut:ww,circOut:Sw,backIn:Wp,backInOut:vw,backOut:bw,anticipate:kw},i4=e=>typeof e=="string",j0=e=>{if(_w(e)){Kp(e.length===4);const[t,n,a,o]=e;return Rl(t,n,a,o)}else if(i4(e))return a4[e];return e},rc=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function o4(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(p){l.has(p)&&(h.schedule(p),e()),p(d)}const h={schedule:(p,x=!1,b=!1)=>{const w=b&&o?n:a;return x&&l.add(p),w.has(p)||w.add(p),p},cancel:p=>{a.delete(p),l.delete(p)},process:p=>{if(d=p,o){u=!0;return}o=!0,[n,a]=[a,n],n.forEach(f),n.clear(),o=!1,u&&(u=!1,h.process(p))}};return h}const s4=40;function Tw(e,t){let n=!1,a=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=()=>n=!0,l=rc.reduce((_,P)=>(_[P]=o4(u),_),{}),{setup:d,read:f,resolveKeyframes:h,preUpdate:p,update:x,preRender:b,render:v,postRender:w}=l,E=()=>{const _=Wr.useManualTiming?o.timestamp:performance.now();n=!1,Wr.useManualTiming||(o.delta=a?1e3/60:Math.max(Math.min(_-o.timestamp,s4),1)),o.timestamp=_,o.isProcessing=!0,d.process(o),f.process(o),h.process(o),p.process(o),x.process(o),b.process(o),v.process(o),w.process(o),o.isProcessing=!1,n&&t&&(a=!1,e(E))},N=()=>{n=!0,a=!0,o.isProcessing||e(E)};return{schedule:rc.reduce((_,P)=>{const D=l[P];return _[P]=(L,G=!1,Z=!1)=>(n||N(),D.schedule(L,G,Z)),_},{}),cancel:_=>{for(let P=0;P<rc.length;P++)l[rc[P]].cancel(_)},state:o,steps:l}}const{schedule:ft,cancel:La,state:en,steps:Ih}=Tw(typeof requestAnimationFrame<"u"?requestAnimationFrame:ar,!0);let wc;function l4(){wc=void 0}const hn={now:()=>(wc===void 0&&hn.set(en.isProcessing||Wr.useManualTiming?en.timestamp:performance.now()),wc),set:e=>{wc=e,queueMicrotask(l4)}},Ew=e=>t=>typeof t=="string"&&t.startsWith(e),Cw=Ew("--"),u4=Ew("var(--"),tg=e=>u4(e)?c4.test(e.split("/*")[0].trim()):!1,c4=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function N0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ho={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},bl={...Ho,transform:e=>_r(0,1,e)},ac={...Ho,default:1},ol=e=>Math.round(e*1e5)/1e5,ng=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function d4(e){return e==null}const f4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rg=(e,t)=>n=>!!(typeof n=="string"&&f4.test(n)&&n.startsWith(e)||t&&!d4(n)&&Object.prototype.hasOwnProperty.call(n,t)),jw=(e,t,n)=>a=>{if(typeof a!="string")return a;const[o,u,l,d]=a.match(ng);return{[e]:parseFloat(o),[t]:parseFloat(u),[n]:parseFloat(l),alpha:d!==void 0?parseFloat(d):1}},h4=e=>_r(0,255,e),Hh={...Ho,transform:e=>Math.round(h4(e))},ki={test:rg("rgb","red"),parse:jw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:a=1})=>"rgba("+Hh.transform(e)+", "+Hh.transform(t)+", "+Hh.transform(n)+", "+ol(bl.transform(a))+")"};function m4(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 Im={test:rg("#"),parse:m4,transform:ki.transform},Ml=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Oa=Ml("deg"),zr=Ml("%"),pe=Ml("px"),p4=Ml("vh"),g4=Ml("vw"),A0={...zr,parse:e=>zr.parse(e)/100,transform:e=>zr.transform(e*100)},So={test:rg("hsl","hue"),parse:jw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:a=1})=>"hsla("+Math.round(e)+", "+zr.transform(ol(t))+", "+zr.transform(ol(n))+", "+ol(bl.transform(a))+")"},$t={test:e=>ki.test(e)||Im.test(e)||So.test(e),parse:e=>ki.test(e)?ki.parse(e):So.test(e)?So.parse(e):Im.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ki.transform(e):So.transform(e),getAnimatableNone:e=>{const t=$t.parse(e);return t.alpha=0,$t.transform(t)}},y4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function x4(e){return isNaN(e)&&typeof e=="string"&&(e.match(ng)?.length||0)+(e.match(y4)?.length||0)>0}const Nw="number",Aw="color",b4="var",v4="var(",O0="${}",k4=/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 vl(e){const t=e.toString(),n=[],a={color:[],number:[],var:[]},o=[];let u=0;const d=t.replace(k4,f=>($t.test(f)?(a.color.push(u),o.push(Aw),n.push($t.parse(f))):f.startsWith(v4)?(a.var.push(u),o.push(b4),n.push(f)):(a.number.push(u),o.push(Nw),n.push(parseFloat(f))),++u,O0)).split(O0);return{values:n,split:d,indexes:a,types:o}}function Ow(e){return vl(e).values}function Rw(e){const{split:t,types:n}=vl(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===Nw?u+=ol(o[l]):d===Aw?u+=$t.transform(o[l]):u+=o[l]}return u}}const S4=e=>typeof e=="number"?0:$t.test(e)?$t.getAnimatableNone(e):e;function w4(e){const t=Ow(e);return Rw(e)(t.map(S4))}const Ua={test:x4,parse:Ow,createTransformer:Rw,getAnimatableNone:w4};function Fh(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 z4({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=Fh(f,d,e+1/3),u=Fh(f,d,e),l=Fh(f,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(l*255),alpha:a}}function Ac(e,t){return n=>n>0?t:e}const xt=(e,t,n)=>e+(t-e)*n,qh=(e,t,n)=>{const a=e*e,o=n*(t*t-a)+a;return o<0?0:Math.sqrt(o)},_4=[Im,ki,So],T4=e=>_4.find(t=>t.test(e));function R0(e){const t=T4(e);if(!t)return!1;let n=t.parse(e);return t===So&&(n=z4(n)),n}const M0=(e,t)=>{const n=R0(e),a=R0(t);if(!n||!a)return Ac(e,t);const o={...n};return u=>(o.red=qh(n.red,a.red,u),o.green=qh(n.green,a.green,u),o.blue=qh(n.blue,a.blue,u),o.alpha=xt(n.alpha,a.alpha,u),ki.transform(o))},Hm=new Set(["none","hidden"]);function E4(e,t){return Hm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function C4(e,t){return n=>xt(e,t,n)}function ag(e){return typeof e=="number"?C4:typeof e=="string"?tg(e)?Ac:$t.test(e)?M0:A4:Array.isArray(e)?Mw:typeof e=="object"?$t.test(e)?M0:j4:Ac}function Mw(e,t){const n=[...e],a=n.length,o=e.map((u,l)=>ag(u)(u,t[l]));return u=>{for(let l=0;l<a;l++)n[l]=o[l](u);return n}}function j4(e,t){const n={...e,...t},a={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(a[o]=ag(e[o])(e[o],t[o]));return o=>{for(const u in a)n[u]=a[u](o);return n}}function N4(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 A4=(e,t)=>{const n=Ua.createTransformer(t),a=vl(e),o=vl(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?Hm.has(e)&&!o.values.length||Hm.has(t)&&!a.values.length?E4(e,t):Ol(Mw(N4(a,o),o.values),n):Ac(e,t)};function Dw(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xt(e,t,n):ag(e)(e,t)}const O4=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ft.update(t,n),stop:()=>La(t),now:()=>en.isProcessing?en.timestamp:hn.now()}},$w=(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)})`},Oc=2e4;function ig(e){let t=0;const n=50;let a=e.next(t);for(;!a.done&&t<Oc;)t+=n,a=e.next(t);return t>=Oc?1/0:t}function R4(e,t=100,n){const a=n({...e,keyframes:[0,t]}),o=Math.min(ig(a),Oc);return{type:"keyframes",ease:u=>a.next(o*u).value/t,duration:nr(o)}}const M4=5;function Lw(e,t,n){const a=Math.max(t-M4,0);return pw(n-e(a),t-a)}const _t={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},Gh=.001;function D4({duration:e=_t.duration,bounce:t=_t.bounce,velocity:n=_t.velocity,mass:a=_t.mass}){let o,u,l=1-t;l=_r(_t.minDamping,_t.maxDamping,l),e=_r(_t.minDuration,_t.maxDuration,nr(e)),l<1?(o=h=>{const p=h*l,x=p*e,b=p-n,v=Fm(h,l),w=Math.exp(-x);return Gh-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),E=Fm(Math.pow(h,2),l);return(-o(h)+Gh>0?-1:1)*((b-v)*w)/E}):(o=h=>{const p=Math.exp(-h*e),x=(h-n)*e+1;return-Gh+p*x},u=h=>{const p=Math.exp(-h*e),x=(n-h)*(e*e);return p*x});const d=5/e,f=L4(o,u,d);if(e=Jr(e),isNaN(f))return{stiffness:_t.stiffness,damping:_t.damping,duration:e};{const h=Math.pow(f,2)*a;return{stiffness:h,damping:l*2*Math.sqrt(a*h),duration:e}}}const $4=12;function L4(e,t,n){let a=n;for(let o=1;o<$4;o++)a=a-e(a)/t(a);return a}function Fm(e,t){return e*Math.sqrt(1-t*t)}const U4=["duration","bounce"],P4=["stiffness","damping","mass"];function D0(e,t){return t.some(n=>e[n]!==void 0)}function V4(e){let t={velocity:_t.velocity,stiffness:_t.stiffness,damping:_t.damping,mass:_t.mass,isResolvedFromDuration:!1,...e};if(!D0(e,P4)&&D0(e,U4))if(e.visualDuration){const n=e.visualDuration,a=2*Math.PI/(n*1.2),o=a*a,u=2*_r(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:_t.mass,stiffness:o,damping:u}}else{const n=D4(e);t={...t,...n,mass:_t.mass},t.isResolvedFromDuration=!0}return t}function Rc(e=_t.visualDuration,t=_t.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:p,duration:x,velocity:b,isResolvedFromDuration:v}=V4({...n,velocity:-nr(n.velocity||0)}),w=b||0,E=h/(2*Math.sqrt(f*p)),N=l-u,j=nr(Math.sqrt(f/p)),A=Math.abs(N)<5;a||(a=A?_t.restSpeed.granular:_t.restSpeed.default),o||(o=A?_t.restDelta.granular:_t.restDelta.default);let _;if(E<1){const D=Fm(j,E);_=L=>{const G=Math.exp(-E*j*L);return l-G*((w+E*j*N)/D*Math.sin(D*L)+N*Math.cos(D*L))}}else if(E===1)_=D=>l-Math.exp(-j*D)*(N+(w+j*N)*D);else{const D=j*Math.sqrt(E*E-1);_=L=>{const G=Math.exp(-E*j*L),Z=Math.min(D*L,300);return l-G*((w+E*j*N)*Math.sinh(Z)+D*N*Math.cosh(Z))/D}}const P={calculatedDuration:v&&x||null,next:D=>{const L=_(D);if(v)d.done=D>=x;else{let G=D===0?w:0;E<1&&(G=D===0?Jr(w):Lw(_,D,L));const Z=Math.abs(G)<=a,J=Math.abs(l-L)<=o;d.done=Z&&J}return d.value=d.done?l:L,d},toString:()=>{const D=Math.min(ig(P),Oc),L=$w(G=>P.next(D*G).value,D,30);return D+"ms "+L},toTransition:()=>{}};return P}Rc.applyToOptions=e=>{const t=R4(e,100,Rc);return e.ease=t.ease,e.duration=Jr(t.duration),e.type="keyframes",e};function qm({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:p}){const x=e[0],b={done:!1,value:x},v=Z=>d!==void 0&&Z<d||f!==void 0&&Z>f,w=Z=>d===void 0?f:f===void 0||Math.abs(d-Z)<Math.abs(f-Z)?d:f;let E=n*t;const N=x+E,j=l===void 0?N:l(N);j!==N&&(E=j-x);const A=Z=>-E*Math.exp(-Z/a),_=Z=>j+A(Z),P=Z=>{const J=A(Z),ce=_(Z);b.done=Math.abs(J)<=h,b.value=b.done?j:ce};let D,L;const G=Z=>{v(b.value)&&(D=Z,L=Rc({keyframes:[b.value,w(b.value)],velocity:Lw(_,Z,b.value),damping:o,stiffness:u,restDelta:h,restSpeed:p}))};return G(0),{calculatedDuration:null,next:Z=>{let J=!1;return!L&&D===void 0&&(J=!0,P(Z),G(Z)),D!==void 0&&Z>=D?L.next(Z-D):(!J&&P(Z),b)}}}function Z4(e,t,n){const a=[],o=n||Wr.mix||Dw,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=Ol(f,d)}a.push(d)}return a}function B4(e,t,{clamp:n=!0,ease:a,mixer:o}={}){const u=e.length;if(Kp(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=Z4(t,a,o),f=d.length,h=p=>{if(l&&p<e[0])return t[0];let x=0;if(f>1)for(;x<e.length-2&&!(p<e[x+1]);x++);const b=xl(e[x],e[x+1],p);return d[x](b)};return n?p=>h(_r(e[0],e[u-1],p)):h}function I4(e,t){const n=e[e.length-1];for(let a=1;a<=t;a++){const o=xl(0,t,a);e.push(xt(n,1,o))}}function H4(e){const t=[0];return I4(t,e.length-1),t}function F4(e,t){return e.map(n=>n*t)}function q4(e,t){return e.map(()=>t||zw).splice(0,e.length-1)}function sl({duration:e=300,keyframes:t,times:n,ease:a="easeInOut"}){const o=r4(a)?a.map(j0):j0(a),u={done:!1,value:t[0]},l=F4(n&&n.length===t.length?n:H4(t),e),d=B4(l,t,{ease:Array.isArray(o)?o:q4(t,o)});return{calculatedDuration:e,next:f=>(u.value=d(f),u.done=f>=e,u)}}const G4=e=>e!==null;function og(e,{repeat:t,repeatType:n="loop"},a,o=1){const u=e.filter(G4),d=o<0||t&&n!=="loop"&&t%2===1?0:u.length-1;return!d||a===void 0?u[d]:a}const Y4={decay:qm,inertia:qm,tween:sl,keyframes:sl,spring:Rc};function Uw(e){typeof e.type=="string"&&(e.type=Y4[e.type])}class sg{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 X4=e=>e/100;class lg extends sg{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!==hn.now()&&this.tick(hn.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;Uw(t);const{type:n=sl,repeat:a=0,repeatDelay:o=0,repeatType:u,velocity:l=0}=t;let{keyframes:d}=t;const f=n||sl;f!==sl&&typeof d[0]!="number"&&(this.mixKeyframes=Ol(X4,Dw(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=ig(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+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:p,repeat:x,repeatType:b,repeatDelay:v,type:w,onUpdate:E,finalKeyframe:N}=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 j=this.currentTime-h*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?j<0:j>o;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let _=this.currentTime,P=a;if(x){const Z=Math.min(this.currentTime,o)/d;let J=Math.floor(Z),ce=Z%1;!ce&&Z>=1&&(ce=1),ce===1&&J--,J=Math.min(J,x+1),J%2&&(b==="reverse"?(ce=1-ce,v&&(ce-=v/d)):b==="mirror"&&(P=l)),_=_r(0,1,ce)*d}const D=A?{done:!1,value:p[0]}:P.next(_);u&&(D.value=u(D.value));let{done:L}=D;!A&&f!==null&&(L=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return G&&w!==qm&&(D.value=og(p,this.options,N,this.speed)),E&&E(D.value),G&&this.finish(),D}then(t,n){return this.finished.then(t,n)}get duration(){return nr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+nr(t)}get time(){return nr(this.currentTime)}set time(t){t=Jr(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(hn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=nr(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=O4,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(hn.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 K4(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Si=e=>e*180/Math.PI,Gm=e=>{const t=Si(Math.atan2(e[1],e[0]));return Ym(t)},J4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gm,rotateZ:Gm,skewX:e=>Si(Math.atan(e[1])),skewY:e=>Si(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ym=e=>(e=e%360,e<0&&(e+=360),e),$0=Gm,L0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),U0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Q4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:L0,scaleY:U0,scale:e=>(L0(e)+U0(e))/2,rotateX:e=>Ym(Si(Math.atan2(e[6],e[5]))),rotateY:e=>Ym(Si(Math.atan2(-e[2],e[0]))),rotateZ:$0,rotate:$0,skewX:e=>Si(Math.atan(e[4])),skewY:e=>Si(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xm(e){return e.includes("scale")?1:0}function Km(e,t){if(!e||e==="none")return Xm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let a,o;if(n)a=Q4,o=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);a=J4,o=d}if(!o)return Xm(t);const u=a[t],l=o[1].split(",").map(eO);return typeof u=="function"?u(l):l[u]}const W4=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Km(n,t)};function eO(e){return parseFloat(e.trim())}const Fo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qo=new Set(Fo),P0=e=>e===Ho||e===pe,tO=new Set(["x","y","z"]),nO=Fo.filter(e=>!tO.has(e));function rO(e){const t=[];return nO.forEach(n=>{const a=e.getValue(n);a!==void 0&&(t.push([n,a.get()]),a.set(n.startsWith("scale")?1:0))}),t}const Ma={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})=>Km(t,"x"),y:(e,{transform:t})=>Km(t,"y")};Ma.translateX=Ma.x;Ma.translateY=Ma.y;const zi=new Set;let Jm=!1,Qm=!1,Wm=!1;function Pw(){if(Qm){const e=Array.from(zi).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),n=new Map;t.forEach(a=>{const o=rO(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)})}Qm=!1,Jm=!1,zi.forEach(e=>e.complete(Wm)),zi.clear()}function Vw(){zi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qm=!0)})}function aO(){Wm=!0,Vw(),Pw(),Wm=!1}class ug{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?(zi.add(this),Jm||(Jm=!0,ft.read(Vw),ft.resolveKeyframes(Pw))):(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])}K4(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),zi.delete(this)}cancel(){this.state==="scheduled"&&(zi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const iO=e=>e.startsWith("--");function oO(e,t,n){iO(t)?e.style.setProperty(t,n):e.style[t]=n}const sO=Jp(()=>window.ScrollTimeline!==void 0),lO={};function uO(e,t){const n=Jp(e);return()=>lO[t]??n()}const Zw=uO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),nl=([e,t,n,a])=>`cubic-bezier(${e}, ${t}, ${n}, ${a})`,V0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:nl([0,.65,.55,1]),circOut:nl([.55,0,1,.45]),backIn:nl([.31,.01,.66,-.59]),backOut:nl([.33,1.53,.69,.99])};function Bw(e,t){if(e)return typeof e=="function"?Zw()?$w(e,t):"ease-out":_w(e)?nl(e):Array.isArray(e)?e.map(n=>Bw(n,t)||V0.easeOut):V0[e]}function cO(e,t,n,{delay:a=0,duration:o=300,repeat:u=0,repeatType:l="loop",ease:d="easeOut",times:f}={},h=void 0){const p={[t]:n};f&&(p.offset=f);const x=Bw(d,o);Array.isArray(x)&&(p.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(p,b)}function Iw(e){return typeof e=="function"&&"applyToOptions"in e}function dO({type:e,...t}){return Iw(e)&&Zw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class fO extends sg{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,Kp(typeof t.type!="string");const h=dO(t);this.animation=cO(n,a,o,h,u),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const p=og(o,this.options,d,this.speed);this.updateMotionValue?this.updateMotionValue(p):oO(n,a,p),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 nr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+nr(t)}get time(){return nr(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Jr(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&&sO()?(this.animation.timeline=t,ar):n(this)}}const Hw={anticipate:kw,backInOut:vw,circInOut:ww};function hO(e){return e in Hw}function mO(e){typeof e.ease=="string"&&hO(e.ease)&&(e.ease=Hw[e.ease])}const Yh=10;class pO extends fO{constructor(t){mO(t),Uw(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 lg({...l,autoplay:!1}),f=Math.max(Yh,hn.now()-this.startTime),h=_r(0,Yh,f-Yh);n.setWithVelocity(d.sample(Math.max(0,f-h)).value,d.sample(f).value,h),d.stop()}}const Z0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ua.test(e)||e==="0")&&!e.startsWith("url("));function gO(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 yO(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=Z0(o,t),d=Z0(u,t);return!l||!d?!1:gO(e)||(n==="spring"||Iw(n))&&a}function ep(e){e.duration=0,e.type="keyframes"}const xO=new Set(["opacity","clipPath","filter","transform"]),bO=Jp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function vO(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 bO()&&n&&xO.has(n)&&(n!=="transform"||!h)&&!f&&!a&&o!=="mirror"&&u!==0&&l!=="inertia"}const kO=40;class SO extends sg{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:p,...x}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=hn.now();const b={autoplay:t,delay:n,type:a,repeat:o,repeatDelay:u,repeatType:l,name:f,motionValue:h,element:p,...x},v=p?.KeyframeResolver||ug;this.keyframeResolver=new v(d,(w,E,N)=>this.onKeyframesResolved(w,E,b,!N),f,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,a,o){this.keyframeResolver=void 0;const{name:u,type:l,velocity:d,delay:f,isHandoff:h,onUpdate:p}=a;this.resolvedAt=hn.now(),yO(t,u,l,d)||((Wr.instantAnimations||!f)&&p?.(og(t,a,n)),t[0]=t[t.length-1],ep(a),a.repeat=0);const b={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>kO?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...a,keyframes:t},v=!h&&vO(b),w=b.motionValue?.owner?.current,E=v?new pO({...b,element:w}):new lg(b);E.finished.then(()=>{this.notifyFinished()}).catch(ar),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}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(),aO()),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 Fw(e,t,n,a=0,o=1){const u=Array.from(e).sort((h,p)=>h.sortNodePosition(p)).indexOf(t),l=e.size,d=(l-1)*a;return typeof n=="function"?n(u,l):o===1?u*a:d-u*a}const wO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zO(e){const t=wO.exec(e);if(!t)return[,];const[,n,a,o]=t;return[`--${n??a}`,o]}function qw(e,t,n=1){const[a,o]=zO(e);if(!a)return;const u=window.getComputedStyle(t).getPropertyValue(a);if(u){const l=u.trim();return fw(l)?parseFloat(l):l}return tg(o)?qw(o,t,n+1):o}const _O={type:"spring",stiffness:500,damping:25,restSpeed:10},TO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),EO={type:"keyframes",duration:.8},CO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jO=(e,{keyframes:t})=>t.length>2?EO:qo.has(e)?e.startsWith("scale")?TO(t[1]):_O:CO,NO=e=>e!==null;function AO(e,{repeat:t,repeatType:n="loop"},a){const o=e.filter(NO),u=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[u]}function cg(e,t){return e?.[t]??e?.default??e}function OO({when:e,delay:t,delayChildren:n,staggerChildren:a,staggerDirection:o,repeat:u,repeatType:l,repeatDelay:d,from:f,elapsed:h,...p}){return!!Object.keys(p).length}const dg=(e,t,n,a={},o,u)=>l=>{const d=cg(a,e)||{},f=d.delay||a.delay||0;let{elapsed:h=0}=a;h=h-Jr(f);const p={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};OO(d)||Object.assign(p,jO(e,p)),p.duration&&(p.duration=Jr(p.duration)),p.repeatDelay&&(p.repeatDelay=Jr(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let x=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(ep(p),p.delay===0&&(x=!0)),(Wr.instantAnimations||Wr.skipAnimations)&&(x=!0,ep(p),p.delay=0),p.allowFlatten=!d.type&&!d.ease,x&&!u&&t.get()!==void 0){const b=AO(p.keyframes,d);if(b!==void 0){ft.update(()=>{p.onUpdate(b),p.onComplete()});return}}return d.isSync?new lg(p):new SO(p)};function B0(e){const t=[{},{}];return e?.values.forEach((n,a)=>{t[0][a]=n.get(),t[1][a]=n.getVelocity()}),t}function fg(e,t,n,a){if(typeof t=="function"){const[o,u]=B0(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]=B0(a);t=t(n!==void 0?n:e.custom,o,u)}return t}function No(e,t,n){const a=e.getProps();return fg(a,t,n!==void 0?n:a.custom,e)}const Gw=new Set(["width","height","top","left","right","bottom",...Fo]),I0=30,RO=e=>!isNaN(parseFloat(e));class MO{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{const o=hn.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=hn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=RO(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 Qp);const a=this.events[t].add(n);return t==="change"?()=>{a(),ft.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=hn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>I0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,I0);return pw(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 $o(e,t){return new MO(e,t)}const tp=e=>Array.isArray(e);function DO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$o(n))}function $O(e){return tp(e)?e[e.length-1]||0:e}function LO(e,t){const n=No(e,t);let{transitionEnd:a={},transition:o={},...u}=n||{};u={...u,...a};for(const l in u){const d=$O(u[l]);DO(e,l,d)}}const an=e=>!!(e&&e.getVelocity);function UO(e){return!!(an(e)&&e.add)}function np(e,t){const n=e.getValue("willChange");if(UO(n))return n.add(t);if(!n&&Wr.WillChange){const a=new Wr.WillChange("auto");e.addValue("willChange",a),a.add(t)}}function hg(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const PO="framerAppearId",Yw="data-"+hg(PO);function Xw(e){return e.props[Yw]}function VO({protectedKeys:e,needsAnimating:t},n){const a=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,a}function Kw(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=[],p=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||p&&VO(p,x))continue;const w={delay:n,...cg(u||{},x)},E=b.get();if(E!==void 0&&!b.isAnimating&&!Array.isArray(v)&&v===E&&!w.velocity)continue;let N=!1;if(window.MotionHandoffAnimation){const _=Xw(e);if(_){const P=window.MotionHandoffAnimation(_,x,ft);P!==null&&(w.startTime=P,N=!0)}}np(e,x);const j=f??e.shouldReduceMotion;b.start(dg(x,b,v,j&&Gw.has(x)?{type:!1}:w,e,N));const A=b.animation;A&&h.push(A)}return l&&Promise.all(h).then(()=>{ft.update(()=>{l&&LO(e,l)})}),h}function rp(e,t,n={}){const a=No(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(Kw(e,a,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:x}=o;return ZO(e,t,f,h,p,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 ZO(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(rp(f,t,{...l,delay:n+(typeof a=="function"?0:a)+Fw(e.variantChildren,f,a,o,u)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(d)}function BO(e,t,n={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const o=t.map(u=>rp(e,u,n));a=Promise.all(o)}else if(typeof t=="string")a=rp(e,t,n);else{const o=typeof t=="function"?No(e,t,n.custom):t;a=Promise.all(Kw(e,o,n))}return a.then(()=>{e.notify("AnimationComplete",t)})}const IO={test:e=>e==="auto",parse:e=>e},Jw=e=>t=>t.test(e),Qw=[Ho,pe,zr,Oa,g4,p4,IO],H0=e=>Qw.find(Jw(e));function HO(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mw(e):!0}const FO=new Set(["brightness","contrast","saturate","opacity"]);function qO(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=n.match(ng)||[];if(!a)return e;const o=n.replace(a,"");let u=FO.has(t)?1:0;return a!==n&&(u*=100),t+"("+u+o+")"}const GO=/\b([a-z-]*)\(.*?\)/gu,ap={...Ua,getAnimatableNone:e=>{const t=e.match(GO);return t?t.map(qO).join(" "):e}},F0={...Ho,transform:Math.round},YO={rotate:Oa,rotateX:Oa,rotateY:Oa,rotateZ:Oa,scale:ac,scaleX:ac,scaleY:ac,scaleZ:ac,skew:Oa,skewX:Oa,skewY:Oa,distance:pe,translateX:pe,translateY:pe,translateZ:pe,x:pe,y:pe,z:pe,perspective:pe,transformPerspective:pe,opacity:bl,originX:A0,originY:A0,originZ:pe},mg={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,...YO,zIndex:F0,fillOpacity:bl,strokeOpacity:bl,numOctaves:F0},XO={...mg,color:$t,backgroundColor:$t,outlineColor:$t,fill:$t,stroke:$t,borderColor:$t,borderTopColor:$t,borderRightColor:$t,borderBottomColor:$t,borderLeftColor:$t,filter:ap,WebkitFilter:ap},Ww=e=>XO[e];function ez(e,t){let n=Ww(e);return n!==ap&&(n=Ua),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const KO=new Set(["auto","none","0"]);function JO(e,t,n){let a=0,o;for(;a<e.length&&!o;){const u=e[a];typeof u=="string"&&!KO.has(u)&&vl(u).values.length&&(o=e[a]),a++}if(o&&n)for(const u of t)e[u]=ez(n,o)}class QO extends ug{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 p=0;p<t.length;p++){let x=t[p];if(typeof x=="string"&&(x=x.trim(),tg(x))){const b=qw(x,n.current);b!==void 0&&(t[p]=b),p===t.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!Gw.has(a)||t.length!==2)return;const[o,u]=t,l=H0(o),d=H0(u),f=N0(o),h=N0(u);if(f!==h&&Ma[a]){this.needsMeasurement=!0;return}if(l!==d)if(P0(l)&&P0(d))for(let p=0;p<t.length;p++){const x=t[p];typeof x=="string"&&(t[p]=parseFloat(x))}else Ma[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,a=[];for(let o=0;o<t.length;o++)(t[o]===null||HO(t[o]))&&a.push(o);a.length&&JO(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=Ma[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]=Ma[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 WO(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 tz=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ip(e){return hw(e)&&"offsetHeight"in e}const{schedule:pg}=Tw(queueMicrotask,!1),fr={x:!1,y:!1};function nz(){return fr.x||fr.y}function eR(e){return e==="x"||e==="y"?fr[e]?null:(fr[e]=!0,()=>{fr[e]=!1}):fr.x||fr.y?null:(fr.x=fr.y=!0,()=>{fr.x=fr.y=!1})}function rz(e,t){const n=WO(e),a=new AbortController,o={passive:!0,...t,signal:a.signal};return[n,o,()=>a.abort()]}function q0(e){return!(e.pointerType==="touch"||nz())}function tR(e,t,n={}){const[a,o,u]=rz(e,n),l=d=>{if(!q0(d))return;const{target:f}=d,h=t(f,d);if(typeof h!="function"||!f)return;const p=x=>{q0(x)&&(h(x),f.removeEventListener("pointerleave",p))};f.addEventListener("pointerleave",p,o)};return a.forEach(d=>{d.addEventListener("pointerenter",l,o)}),u}const az=(e,t)=>t?e===t?!0:az(e,t.parentElement):!1,gg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iz(e){return nR.has(e.tagName)||e.isContentEditable===!0}const zc=new WeakSet;function G0(e){return t=>{t.key==="Enter"&&e(t)}}function Xh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const rR=(e,t)=>{const n=e.currentTarget;if(!n)return;const a=G0(()=>{if(zc.has(n))return;Xh(n,"down");const o=G0(()=>{Xh(n,"up")}),u=()=>Xh(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 Y0(e){return gg(e)&&!nz()}function aR(e,t,n={}){const[a,o,u]=rz(e,n),l=d=>{const f=d.currentTarget;if(!Y0(d))return;zc.add(f);const h=t(f,d),p=(v,w)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",b),zc.has(f)&&zc.delete(f),Y0(v)&&typeof h=="function"&&h(v,{success:w})},x=v=>{p(v,f===window||f===document||n.useGlobalTarget||az(f,v.target))},b=v=>{p(v,!1)};window.addEventListener("pointerup",x,o),window.addEventListener("pointercancel",b,o)};return a.forEach(d=>{(n.useGlobalTarget?window:d).addEventListener("pointerdown",l,o),ip(d)&&(d.addEventListener("focus",h=>rR(h,o)),!iz(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),u}function oz(e){return hw(e)&&"ownerSVGElement"in e}function iR(e){return oz(e)&&e.tagName==="svg"}const oR=[...Qw,$t,Ua],sR=e=>oR.find(Jw(e)),X0=()=>({translate:0,scale:1,origin:0,originPoint:0}),wo=()=>({x:X0(),y:X0()}),K0=()=>({min:0,max:0}),Ht=()=>({x:K0(),y:K0()}),op={current:null},sz={current:!1},lR=typeof window<"u";function uR(){if(sz.current=!0,!!lR)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>op.current=e.matches;e.addEventListener("change",t),t()}else op.current=!1}const cR=new WeakMap;function Wc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function kl(e){return typeof e=="string"||Array.isArray(e)}const yg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xg=["initial",...yg];function ed(e){return Wc(e.animate)||xg.some(t=>kl(e[t]))}function lz(e){return!!(ed(e)||e.variants)}function dR(e,t,n){for(const a in t){const o=t[a],u=n[a];if(an(o))e.addValue(a,o);else if(an(u))e.addValue(a,$o(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,$o(l!==void 0?l:o,{owner:e}))}}for(const a in n)t[a]===void 0&&e.removeValue(a);return t}const J0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Mc={};function uz(e){Mc=e}function fR(){return Mc}class hR{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=ug,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=hn.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,ft.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=ed(n),this.isVariantNode=lz(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...x}=this.scrapeMotionValuesFromProps(n,{},this);for(const b in x){const v=x[b];f[b]!==void 0&&an(v)&&v.set(f[b])}}mount(t){this.current=t,cR.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:(sz.current||uR(),this.shouldReduceMotion=op.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),La(this.notifyUpdate),La(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=qo.has(t);a&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ft.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 Mc){const n=Mc[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):Ht()}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<J0.length;a++){const o=J0[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=dR(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=$o(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"&&(fw(a)||mw(a))?a=parseFloat(a):!sR(a)&&Ua.test(n)&&(a=ez(t,n)),this.setBaseTarget(t,an(a)?a.get():a)),an(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=fg(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&&!an(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 Qp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){pg.render(this.render)}}class cz extends hR{constructor(){super(...arguments),this.KeyframeResolver=QO}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;an(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Za{constructor(t){this.isMounted=!1,this.node=t}update(){}}function dz({top:e,left:t,right:n,bottom:a}){return{x:{min:t,max:n},y:{min:e,max:a}}}function mR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pR(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 Kh(e){return e===void 0||e===1}function sp({scale:e,scaleX:t,scaleY:n}){return!Kh(e)||!Kh(t)||!Kh(n)}function xi(e){return sp(e)||fz(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fz(e){return Q0(e.x)||Q0(e.y)}function Q0(e){return e&&e!=="0%"}function Dc(e,t,n){const a=e-n,o=t*a;return n+o}function W0(e,t,n,a,o){return o!==void 0&&(e=Dc(e,o,a)),Dc(e,n,a)+t}function lp(e,t=0,n=1,a,o){e.min=W0(e.min,t,n,a,o),e.max=W0(e.max,t,n,a,o)}function hz(e,{x:t,y:n}){lp(e.x,t.translate,t.scale,t.originPoint),lp(e.y,n.translate,n.scale,n.originPoint)}const e1=.999999999999,t1=1.0000000000001;function gR(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&&_o(e,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,hz(e,l)),a&&xi(u.latestValues)&&_o(e,u.latestValues))}t.x<t1&&t.x>e1&&(t.x=1),t.y<t1&&t.y>e1&&(t.y=1)}function zo(e,t){e.min=e.min+t,e.max=e.max+t}function n1(e,t,n,a,o=.5){const u=xt(e.min,e.max,o);lp(e,t,n,u,a)}function _o(e,t){n1(e.x,t.x,t.scaleX,t.scale,t.originX),n1(e.y,t.y,t.scaleY,t.scale,t.originY)}function mz(e,t){return dz(pR(e.getBoundingClientRect(),t))}function yR(e,t,n){const a=mz(e,n),{scroll:o}=t;return o&&(zo(a.x,o.offset.x),zo(a.y,o.offset.y)),a}const xR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bR=Fo.length;function vR(e,t,n){let a="",o=!0;for(let u=0;u<bR;u++){const l=Fo[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=tz(d,mg[l]);if(!f){o=!1;const p=xR[l]||l;a+=`${p}(${h}) `}n&&(t[l]=h)}}return a=a.trim(),n?a=n(t,o?"":a):o&&(a="none"),a}function bg(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(qo.has(f)){l=!0;continue}else if(Cw(f)){o[f]=h;continue}else{const p=tz(h,mg[f]);f.startsWith("origin")?(d=!0,u[f]=p):a[f]=p}}if(t.transform||(l||n?a.transform=vR(t,e.transform,n):a.transform&&(a.transform="none")),d){const{originX:f="50%",originY:h="50%",originZ:p=0}=u;a.transformOrigin=`${f} ${h} ${p}`}}function pz(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 r1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ys={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(pe.test(e))e=parseFloat(e);else return e;const n=r1(e,t.target.x),a=r1(e,t.target.y);return`${n}% ${a}%`}},kR={correct:(e,{treeScale:t,projectionDelta:n})=>{const a=e,o=Ua.parse(e);if(o.length>5)return a;const u=Ua.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=xt(d,f,.5);return typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h),u(o)}},up={borderRadius:{...Ys,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ys,borderTopRightRadius:Ys,borderBottomLeftRadius:Ys,borderBottomRightRadius:Ys,boxShadow:kR};function gz(e,{layout:t,layoutId:n}){return qo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!up[e]||e==="opacity")}function vg(e,t,n){const a=e.style,o=t?.style,u={};if(!a)return u;for(const l in a)(an(a[l])||o&&an(o[l])||gz(l,e)||n?.getValue(l)?.liveStyle!==void 0)&&(u[l]=a[l]);return u}function SR(e){return window.getComputedStyle(e)}class wR extends cz{constructor(){super(...arguments),this.type="html",this.renderInstance=pz}readValueFromInstance(t,n){if(qo.has(n))return this.projection?.isProjecting?Xm(n):W4(t,n);{const a=SR(t),o=(Cw(n)?a.getPropertyValue(n):a[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return mz(t,n)}build(t,n,a){bg(t,n,a.transformTemplate)}scrapeMotionValuesFromProps(t,n,a){return vg(t,n,a)}}const zR={offset:"stroke-dashoffset",array:"stroke-dasharray"},_R={offset:"strokeDashoffset",array:"strokeDasharray"};function TR(e,t,n=1,a=0,o=!0){e.pathLength=1;const u=o?zR:_R;e[u.offset]=`${-a}`,e[u.array]=`${t} ${n}`}const ER=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function yz(e,{attrX:t,attrY:n,attrScale:a,pathLength:o,pathSpacing:u=1,pathOffset:l=0,...d},f,h,p){if(bg(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=p?.transformBox??"fill-box",delete x.transformBox);for(const v of ER)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&&TR(x,o,u,l,!1)}const xz=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"]),bz=e=>typeof e=="string"&&e.toLowerCase()==="svg";function CR(e,t,n,a){pz(e,t,void 0,a);for(const o in t.attrs)e.setAttribute(xz.has(o)?o:hg(o),t.attrs[o])}function vz(e,t,n){const a=vg(e,t,n);for(const o in e)if(an(e[o])||an(t[o])){const u=Fo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;a[u]=e[o]}return a}class jR extends cz{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ht}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qo.has(n)){const a=Ww(n);return a&&a.default||0}return n=xz.has(n)?n:hg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,a){return vz(t,n,a)}build(t,n,a){yz(t,n,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,n,a,o){CR(t,n,a,o)}mount(t){this.isSVGTag=bz(t.tagName),super.mount(t)}}const NR=xg.length;function kz(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?kz(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<NR;n++){const a=xg[n],o=e.props[a];(kl(o)||o===!1)&&(t[a]=o)}return t}function Sz(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 AR=[...yg].reverse(),OR=yg.length;function RR(e){return t=>Promise.all(t.map(({animation:n,options:a})=>BO(e,n,a)))}function MR(e){let t=RR(e),n=a1(),a=!0;const o=f=>(h,p)=>{const x=No(e,p,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,p=kz(e.parent)||{},x=[],b=new Set;let v={},w=1/0;for(let N=0;N<OR;N++){const j=AR[N],A=n[j],_=h[j]!==void 0?h[j]:p[j],P=kl(_),D=j===f?A.isActive:null;D===!1&&(w=N);let L=_===p[j]&&_!==h[j]&&P;if(L&&a&&e.manuallyAnimateOnMount&&(L=!1),A.protectedKeys={...v},!A.isActive&&D===null||!_&&!A.prevProp||Wc(_)||typeof _=="boolean")continue;const G=DR(A.prevProp,_);let Z=G||j===f&&A.isActive&&!L&&P||N>w&&P,J=!1;const ce=Array.isArray(_)?_:[_];let $=ce.reduce(o(j),{});D===!1&&($={});const{prevResolvedValues:ie={}}=A,te={...ie,...$},oe=X=>{Z=!0,b.has(X)&&(J=!0,b.delete(X)),A.needsAnimating[X]=!0;const B=e.getValue(X);B&&(B.liveStyle=!1)};for(const X in te){const B=$[X],de=ie[X];if(v.hasOwnProperty(X))continue;let O=!1;tp(B)&&tp(de)?O=!Sz(B,de):O=B!==de,O?B!=null?oe(X):b.add(X):B!==void 0&&b.has(X)?oe(X):A.protectedKeys[X]=!0}A.prevProp=_,A.prevResolvedValues=$,A.isActive&&(v={...v,...$}),a&&e.blockInitialAnimation&&(Z=!1);const re=L&&G;Z&&(!re||J)&&x.push(...ce.map(X=>{const B={type:j};if(typeof X=="string"&&a&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:de}=e,O=No(de,X);if(de.enteringChildren&&O){const{delayChildren:C}=O.transition||{};B.delay=Fw(de.enteringChildren,e,C)}}return{animation:X,options:B}}))}if(b.size){const N={};if(typeof h.initial!="boolean"){const j=No(e,Array.isArray(h.initial)?h.initial[0]:h.initial);j&&j.transition&&(N.transition=j.transition)}b.forEach(j=>{const A=e.getBaseTarget(j),_=e.getValue(j);_&&(_.liveStyle=!0),N[j]=A??null}),x.push({animation:N})}let E=!!x.length;return a&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(E=!1),a=!1,E?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 p=l(f);for(const x in n)n[x].protectedKeys={};return p}return{animateChanges:l,setActive:d,setAnimateFunction:u,getState:()=>n,reset:()=>{n=a1()}}}function DR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Sz(t,e):!1}function fi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function a1(){return{animate:fi(!0),whileInView:fi(),whileHover:fi(),whileTap:fi(),whileDrag:fi(),whileFocus:fi(),exit:fi()}}function i1(e,t){e.min=t.min,e.max=t.max}function dr(e,t){i1(e.x,t.x),i1(e.y,t.y)}function o1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const wz=1e-4,$R=1-wz,LR=1+wz,zz=.01,UR=0-zz,PR=0+zz;function mn(e){return e.max-e.min}function VR(e,t,n){return Math.abs(e-t)<=n}function s1(e,t,n,a=.5){e.origin=a,e.originPoint=xt(t.min,t.max,e.origin),e.scale=mn(n)/mn(t),e.translate=xt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$R&&e.scale<=LR||isNaN(e.scale))&&(e.scale=1),(e.translate>=UR&&e.translate<=PR||isNaN(e.translate))&&(e.translate=0)}function ll(e,t,n,a){s1(e.x,t.x,n.x,a?a.originX:void 0),s1(e.y,t.y,n.y,a?a.originY:void 0)}function l1(e,t,n){e.min=n.min+t.min,e.max=e.min+mn(t)}function ZR(e,t,n){l1(e.x,t.x,n.x),l1(e.y,t.y,n.y)}function u1(e,t,n){e.min=t.min-n.min,e.max=e.min+mn(t)}function $c(e,t,n){u1(e.x,t.x,n.x),u1(e.y,t.y,n.y)}function c1(e,t,n,a,o){return e-=t,e=Dc(e,1/n,a),o!==void 0&&(e=Dc(e,1/o,a)),e}function BR(e,t=0,n=1,a=.5,o,u=e,l=e){if(zr.test(t)&&(t=parseFloat(t),t=xt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let d=xt(u.min,u.max,a);e===u&&(d-=t),e.min=c1(e.min,t,n,d,o),e.max=c1(e.max,t,n,d,o)}function d1(e,t,[n,a,o],u,l){BR(e,t[n],t[a],t[o],t.scale,u,l)}const IR=["x","scaleX","originX"],HR=["y","scaleY","originY"];function f1(e,t,n,a){d1(e.x,t,IR,n?n.x:void 0,a?a.x:void 0),d1(e.y,t,HR,n?n.y:void 0,a?a.y:void 0)}function h1(e){return e.translate===0&&e.scale===1}function _z(e){return h1(e.x)&&h1(e.y)}function m1(e,t){return e.min===t.min&&e.max===t.max}function FR(e,t){return m1(e.x,t.x)&&m1(e.y,t.y)}function p1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Tz(e,t){return p1(e.x,t.x)&&p1(e.y,t.y)}function g1(e){return mn(e.x)/mn(e.y)}function y1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Wn(e){return[e("x"),e("y")]}function qR(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:p,rotateX:x,rotateY:b,skewX:v,skewY:w}=n;h&&(a=`perspective(${h}px) ${a}`),p&&(a+=`rotate(${p}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 Ez=["TopLeft","TopRight","BottomLeft","BottomRight"],GR=Ez.length,x1=e=>typeof e=="string"?parseFloat(e):e,b1=e=>typeof e=="number"||pe.test(e);function YR(e,t,n,a,o,u){o?(e.opacity=xt(0,n.opacity??1,XR(a)),e.opacityExit=xt(t.opacity??1,0,KR(a))):u&&(e.opacity=xt(t.opacity??1,n.opacity??1,a));for(let l=0;l<GR;l++){const d=`border${Ez[l]}Radius`;let f=v1(t,d),h=v1(n,d);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||b1(f)===b1(h)?(e[d]=Math.max(xt(x1(f),x1(h),a),0),(zr.test(h)||zr.test(f))&&(e[d]+="%")):e[d]=h}(t.rotate||n.rotate)&&(e.rotate=xt(t.rotate||0,n.rotate||0,a))}function v1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const XR=Cz(0,.5,Sw),KR=Cz(.5,.95,ar);function Cz(e,t,n){return a=>a<e?0:a>t?1:n(xl(e,t,a))}function JR(e,t,n){const a=an(e)?e:$o(e);return a.start(dg("",a,t,n)),a.animation}function Sl(e,t,n,a={passive:!0}){return e.addEventListener(t,n,a),()=>e.removeEventListener(t,n)}const QR=(e,t)=>e.depth-t.depth;class WR{constructor(){this.children=[],this.isDirty=!1}add(t){Yp(this.children,t),this.isDirty=!0}remove(t){Xp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QR),this.isDirty=!1,this.children.forEach(t)}}function eM(e,t){const n=hn.now(),a=({timestamp:o})=>{const u=o-n;u>=t&&(La(a),e(u-t))};return ft.setup(a,!0),()=>La(a)}function _c(e){return an(e)?e.get():e}class tM{constructor(){this.members=[]}add(t){Yp(this.members,t),t.scheduleRender()}remove(t){if(Xp(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 Tc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Jh=["","X","Y","Z"],nM=1e3;let rM=0;function Qh(e,t,n,a){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),a&&(a[e]=0))}function jz(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Xw(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:u}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(o||u))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&jz(a)}function Nz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:a,resetTransform:o}){return class{constructor(l={},d=t?.()){this.id=rM++,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(oM),this.nodes.forEach(cM),this.nodes.forEach(dM),this.nodes.forEach(sM)},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 WR)}addEventListener(l,d){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Qp),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=oz(l)&&!iR(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 p,x=0;const b=()=>this.root.updateBlockedByResize=!1;ft.read(()=>{x=window.innerWidth}),e(l,()=>{const v=window.innerWidth;v!==x&&(x=v,this.root.updateBlockedByResize=!0,p&&p(),p=eM(b,250),Tc.hasAnimatedSinceResize&&(Tc.hasAnimatedSinceResize=!1,this.nodes.forEach(w1)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&h&&(d||f)&&this.addEventListener("didUpdate",({delta:p,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()||gM,{onLayoutAnimationStart:E,onLayoutAnimationComplete:N}=h.getProps(),j=!this.targetLayout||!Tz(this.targetLayout,v),A=!x&&b;if(this.options.layoutRoot||this.resumeFrom||A||x&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...cg(w,"layout"),onPlay:E,onComplete:N};(h.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(p,A)}else x||w1(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(),La(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(fM),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&&jz(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const x=this.path[p];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(k1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(S1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(uM),this.nodes.forEach(aM),this.nodes.forEach(iM)):this.nodes.forEach(S1),this.clearAllSnapshots();const d=hn.now();en.delta=_r(0,1e3/60,d-en.timestamp),en.timestamp=d,en.isProcessing=!0,Ih.update.process(en),Ih.preRender.process(en),Ih.render.process(en),en.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lM),this.sharedNodes.forEach(hM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!mn(this.snapshot.measuredBox.x)&&!mn(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=Ht(),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&&!_z(this.projectionDelta),f=this.getTransformTemplate(),h=f?f(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;l&&this.instance&&(d||xi(this.latestValues)||p)&&(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)),yM(f),{animationId:this.root.animationId,measuredBox:d,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Ht();const d=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(xM))){const{scroll:h}=this.root;h&&(zo(d.x,h.offset.x),zo(d.y,h.offset.y))}return d}removeElementScroll(l){const d=Ht();if(dr(d,l),this.scroll?.wasRoot)return d;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:p,options:x}=h;h!==this.root&&p&&x.layoutScroll&&(p.wasRoot&&dr(d,l),zo(d.x,p.offset.x),zo(d.y,p.offset.y))}return d}applyTransform(l,d=!1){const f=Ht();dr(f,l);for(let h=0;h<this.path.length;h++){const p=this.path[h];!d&&p.options.layoutScroll&&p.scroll&&p!==p.root&&_o(f,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),xi(p.latestValues)&&_o(f,p.latestValues)}return xi(this.latestValues)&&_o(f,this.latestValues),f}removeTransform(l){const d=Ht();dr(d,l);for(let f=0;f<this.path.length;f++){const h=this.path[f];if(!h.instance||!xi(h.latestValues))continue;sp(h.latestValues)&&h.updateSnapshot();const p=Ht(),x=h.measurePageBox();dr(p,x),f1(d,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,p)}return xi(this.latestValues)&&f1(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:p,layoutId:x}=this.options;if(!this.layout||!(p||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=Ht(),this.targetWithTransforms=Ht()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dr(this.target,this.layout.layoutBox),hz(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||sp(this.parent.latestValues)||fz(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=Ht(),this.relativeTargetOrigin=Ht(),$c(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:p}=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||p))return;dr(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,b=this.treeScale.y;gR(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=Ht());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(o1(this.prevProjectionDelta.x,this.projectionDelta.x),o1(this.prevProjectionDelta.y,this.projectionDelta.y)),ll(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==b||!y1(this.projectionDelta.x,this.prevProjectionDelta.x)||!y1(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=wo(),this.projectionDelta=wo(),this.projectionDeltaWithTransform=wo()}setAnimationOrigin(l,d=!1){const f=this.snapshot,h=f?f.latestValues:{},p={...this.latestValues},x=wo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const b=Ht(),v=f?f.source:void 0,w=this.layout?this.layout.source:void 0,E=v!==w,N=this.getStack(),j=!N||N.members.length<=1,A=!!(E&&!j&&this.options.crossfade===!0&&!this.path.some(pM));this.animationProgress=0;let _;this.mixTargetDelta=P=>{const D=P/1e3;z1(x.x,l.x,D),z1(x.y,l.y,D),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($c(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mM(this.relativeTarget,this.relativeTargetOrigin,b,D),_&&FR(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Ht()),dr(_,this.relativeTarget)),E&&(this.animationValues=p,YR(p,h,this.latestValues,D,A,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(La(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Tc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$o(0)),this.currentAnimation=JR(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(nM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:d,target:f,layout:h,latestValues:p}=l;if(!(!d||!f||!h)){if(this!==l&&this.layout&&h&&Az(this.options.animationType,this.layout.layoutBox,h.layoutBox)){f=this.target||Ht();const x=mn(this.layout.layoutBox.x);f.x.min=l.target.x.min,f.x.max=f.x.min+x;const b=mn(this.layout.layoutBox.y);f.y.min=l.target.y.min,f.y.max=f.y.min+b}dr(d,f),_o(d,p),ll(this.projectionDeltaWithTransform,this.layoutCorrected,d,p)}}registerSharedNode(l,d){this.sharedNodes.has(l)||this.sharedNodes.set(l,new tM),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&&Qh("z",l,h,this.animationValues);for(let p=0;p<Jh.length;p++)Qh(`rotate${Jh[p]}`,l,h,this.animationValues),Qh(`skew${Jh[p]}`,l,h,this.animationValues);l.render();for(const p in h)l.setStaticValue(p,h[p]),this.animationValues&&(this.animationValues[p]=h[p]);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=_c(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=_c(d?.pointerEvents)||""),this.hasProjected&&!xi(this.latestValues)&&(l.transform=f?f({},""):"none",this.hasProjected=!1);return}l.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let x=qR(this.projectionDeltaWithTransform,this.treeScale,p);f&&(x=f(p,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?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:l.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const w in up){if(p[w]===void 0)continue;const{correct:E,applyTo:N,isCSSVariable:j}=up[w],A=x==="none"?p[w]:E(p[w],h);if(N){const _=N.length;for(let P=0;P<_;P++)l[N[P]]=A}else j?this.options.visualElement.renderState.vars[w]=A:l[w]=A}this.options.layoutId&&(l.pointerEvents=h===this?_c(d?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(k1),this.root.sharedNodes.clear()}}}function aM(e){e.updateLayout()}function iM(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"?Wn(p=>{const x=u?t.measuredBox[p]:t.layoutBox[p],b=mn(x);x.min=n[p].min,x.max=x.min+b}):Az(o,t.layoutBox,n)&&Wn(p=>{const x=u?t.measuredBox[p]:t.layoutBox[p],b=mn(n[p]);x.max=x.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+b)});const l=wo();ll(l,n,t.layoutBox);const d=wo();u?ll(d,e.applyTransform(a,!0),t.measuredBox):ll(d,n,t.layoutBox);const f=!_z(l);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:x,layout:b}=p;if(x&&b){const v=Ht();$c(v,t.layoutBox,x.layoutBox);const w=Ht();$c(w,n,b.layoutBox),Tz(v,w)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=p)}}}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 oM(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 sM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lM(e){e.clearSnapshot()}function k1(e){e.clearMeasurements()}function S1(e){e.isLayoutDirty=!1}function uM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function w1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function cM(e){e.resolveTargetDelta()}function dM(e){e.calcProjection()}function fM(e){e.resetSkewAndRotation()}function hM(e){e.removeLeadSnapshot()}function z1(e,t,n){e.translate=xt(t.translate,0,n),e.scale=xt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _1(e,t,n,a){e.min=xt(t.min,n.min,a),e.max=xt(t.max,n.max,a)}function mM(e,t,n,a){_1(e.x,t.x,n.x,a),_1(e.y,t.y,n.y,a)}function pM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gM={duration:.45,ease:[.4,0,.1,1]},T1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),E1=T1("applewebkit/")&&!T1("chrome/")?Math.round:ar;function C1(e){e.min=E1(e.min),e.max=E1(e.max)}function yM(e){C1(e.x),C1(e.y)}function Az(e,t,n){return e==="position"||e==="preserve-aspect"&&!VR(g1(t),g1(n),.2)}function xM(e){return e!==e.root&&e.scroll?.wasRoot}const bM=Nz({attachResizeListener:(e,t)=>Sl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Wh={current:void 0},Oz=Nz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wh.current){const e=new bM({});e.mount(window),e.setOptions({layoutScroll:!0}),Wh.current=e}return Wh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kg=z.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function j1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vM(...e){return t=>{let n=!1;const a=e.map(o=>{const u=j1(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():j1(e[o],null)}}}}function kM(...e){return z.useCallback(vM(...e),e)}class SM extends z.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const a=n.offsetParent,o=ip(a)&&a.offsetWidth||0,u=ip(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 wM({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(kg),h=e.props?.ref??e?.ref,p=kM(l,h);return z.useInsertionEffect(()=>{const{width:x,height:b,top:v,left:w,right:E,bottom:N}=d.current;if(t||!l.current||!x||!b)return;const j=n==="left"?`left: ${w}`:`right: ${E}`,A=a==="bottom"?`bottom: ${N}`:`top: ${v}`;l.current.dataset.motionPopId=u;const _=document.createElement("style");f&&(_.nonce=f);const P=o??document.head;return P.appendChild(_),_.sheet&&_.sheet.insertRule(`
12
+ [data-motion-pop-id="${u}"] {
13
+ position: absolute !important;
14
+ width: ${x}px !important;
15
+ height: ${b}px !important;
16
+ ${j}px !important;
17
+ ${A}px !important;
18
+ }
19
+ `),()=>{P.contains(_)&&P.removeChild(_)}},[t]),g.jsx(SM,{isPresent:t,childRef:l,sizeRef:d,children:z.cloneElement(e,{ref:p})})}const zM=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:u,mode:l,anchorX:d,anchorY:f,root:h})=>{const p=Gp(_M),x=z.useId();let b=!0,v=z.useMemo(()=>(b=!1,{id:x,initial:t,isPresent:n,custom:o,onExitComplete:w=>{p.set(w,!0);for(const E of p.values())if(!E)return;a&&a()},register:w=>(p.set(w,!1),()=>p.delete(w))}),[n,p,a]);return u&&b&&(v={...v}),z.useMemo(()=>{p.forEach((w,E)=>p.set(E,!1))},[n]),z.useEffect(()=>{!n&&!p.size&&a&&a()},[n]),l==="popLayout"&&(e=g.jsx(wM,{isPresent:n,anchorX:d,anchorY:f,root:h,children:e})),g.jsx(Qc.Provider,{value:v,children:e})};function _M(){return new Map}function Rz(e=!0){const t=z.useContext(Qc);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 ic=e=>e.key||"";function N1(e){const t=[];return z.Children.forEach(e,n=>{z.isValidElement(n)&&t.push(n)}),t}const TM=({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[p,x]=Rz(l),b=z.useMemo(()=>N1(e),[e]),v=l&&!p?[]:b.map(ic),w=z.useRef(!0),E=z.useRef(b),N=Gp(()=>new Map),j=z.useRef(new Set),[A,_]=z.useState(b),[P,D]=z.useState(b);dw(()=>{w.current=!1,E.current=b;for(let Z=0;Z<P.length;Z++){const J=ic(P[Z]);v.includes(J)?(N.delete(J),j.current.delete(J)):N.get(J)!==!0&&N.set(J,!1)}},[P,v.length,v.join("-")]);const L=[];if(b!==A){let Z=[...b];for(let J=0;J<P.length;J++){const ce=P[J],$=ic(ce);v.includes($)||(Z.splice(J,0,ce),L.push(ce))}return u==="wait"&&L.length&&(Z=L),D(N1(Z)),_(b),null}const{forceRender:G}=z.useContext(qp);return g.jsx(g.Fragment,{children:P.map(Z=>{const J=ic(Z),ce=l&&!p?!1:b===P||v.includes(J),$=()=>{if(j.current.has(J))return;if(j.current.add(J),N.has(J))N.set(J,!0);else return;let ie=!0;N.forEach(te=>{te||(ie=!1)}),ie&&(G?.(),D(E.current),l&&x?.(),a&&a())};return g.jsx(zM,{isPresent:ce,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:u,root:h,onExitComplete:ce?void 0:$,anchorX:d,anchorY:f,children:Z},J)})})},Mz=z.createContext({strict:!1}),A1={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 O1=!1;function EM(){if(O1)return;const e={};for(const t in A1)e[t]={isEnabled:n=>A1[t].some(a=>!!n[a])};uz(e),O1=!0}function Dz(){return EM(),fR()}function CM(e){const t=Dz();for(const n in e)t[n]={...t[n],...e[n]};uz(t)}const jM=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 Lc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jM.has(e)}let $z=e=>!Lc(e);function NM(e){typeof e=="function"&&($z=t=>t.startsWith("on")?!Lc(t):e(t))}try{NM(require("@emotion/is-prop-valid").default)}catch{}function AM(e,t,n){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||($z(o)||n===!0&&Lc(o)||!t&&!Lc(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const td=z.createContext({});function OM(e,t){if(ed(e)){const{initial:n,animate:a}=e;return{initial:n===!1||kl(n)?n:void 0,animate:kl(a)?a:void 0}}return e.inherit!==!1?t:{}}function RM(e){const{initial:t,animate:n}=OM(e,z.useContext(td));return z.useMemo(()=>({initial:t,animate:n}),[R1(t),R1(n)])}function R1(e){return Array.isArray(e)?e.join(" "):e}const Sg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Lz(e,t,n){for(const a in t)!an(t[a])&&!gz(a,n)&&(e[a]=t[a])}function MM({transformTemplate:e},t){return z.useMemo(()=>{const n=Sg();return bg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DM(e,t){const n=e.style||{},a={};return Lz(a,n,e),Object.assign(a,MM(e,t)),a}function $M(e,t){const n={},a=DM(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 Uz=()=>({...Sg(),attrs:{}});function LM(e,t,n,a){const o=z.useMemo(()=>{const u=Uz();return yz(u,t,bz(a),e.transformTemplate,e.style),{...u.attrs,style:{...u.style}}},[t]);if(e.style){const u={};Lz(u,e.style,e),o.style={...u,...o.style}}return o}const UM=["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 wg(e){return typeof e!="string"||e.includes("-")?!1:!!(UM.indexOf(e)>-1||/[A-Z]/u.test(e))}function PM(e,t,n,{latestValues:a},o,u=!1,l){const f=(l??wg(e)?LM:$M)(t,a,o,e),h=AM(t,typeof e=="string",u),p=e!==z.Fragment?{...h,...f,ref:n}:{},{children:x}=t,b=z.useMemo(()=>an(x)?x.get():x,[x]);return z.createElement(e,{...p,children:b})}function VM({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,o){return{latestValues:ZM(n,a,o,e),renderState:t()}}function ZM(e,t,n,a){const o={},u=a(e,{});for(const b in u)o[b]=_c(u[b]);let{initial:l,animate:d}=e;const f=ed(e),h=lz(e);t&&h&&!f&&e.inherit!==!1&&(l===void 0&&(l=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const x=p?d:l;if(x&&typeof x!="boolean"&&!Wc(x)){const b=Array.isArray(x)?x:[x];for(let v=0;v<b.length;v++){const w=fg(e,b[v]);if(w){const{transitionEnd:E,transition:N,...j}=w;for(const A in j){let _=j[A];if(Array.isArray(_)){const P=p?_.length-1:0;_=_[P]}_!==null&&(o[A]=_)}for(const A in E)o[A]=E[A]}}}return o}const Pz=e=>(t,n)=>{const a=z.useContext(td),o=z.useContext(Qc),u=()=>VM(e,t,a,o);return n?u():Gp(u)},BM=Pz({scrapeMotionValuesFromProps:vg,createRenderState:Sg}),IM=Pz({scrapeMotionValuesFromProps:vz,createRenderState:Uz}),HM=Symbol.for("motionComponentSymbol");function FM(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 Vz=z.createContext({});function rl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qM(e,t,n,a,o,u){const{visualElement:l}=z.useContext(td),d=z.useContext(Mz),f=z.useContext(Qc),h=z.useContext(kg).reducedMotion,p=z.useRef(null),x=z.useRef(!1);a=a||d.renderer,!p.current&&a&&(p.current=a(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:h,isSVG:u}),x.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const b=p.current,v=z.useContext(Vz);b&&!b.projection&&o&&(b.type==="html"||b.type==="svg")&&GM(p.current,n,o,v);const w=z.useRef(!1);z.useInsertionEffect(()=>{b&&w.current&&b.update(n,f)});const E=n[Yw],N=z.useRef(!!E&&!window.MotionHandoffIsComplete?.(E)&&window.MotionHasOptimisedAnimation?.(E));return dw(()=>{x.current=!0,b&&(w.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),N.current&&b.animationState&&b.animationState.animateChanges())}),z.useEffect(()=>{b&&(!N.current&&b.animationState&&b.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(E)}),N.current=!1),b.enteringChildren=void 0)}),b}function GM(e,t,n,a){const{layoutId:o,layout:u,drag:l,dragConstraints:d,layoutScroll:f,layoutRoot:h,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zz(e.parent)),e.projection.setOptions({layoutId:o,layout:u,alwaysMeasureLayout:!!l||d&&rl(d),visualElement:e,animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,crossfade:p,layoutScroll:f,layoutRoot:h})}function Zz(e){if(e)return e.options.allowProjection!==!1?e.projection:Zz(e.parent)}function em(e,{forwardMotionProps:t=!1,type:n}={},a,o){a&&CM(a);const u=n?n==="svg":wg(e),l=u?IM:BM;function d(h,p){let x;const b={...z.useContext(kg),...h,layoutId:YM(h)},{isStatic:v}=b,w=RM(h),E=l(h,v);if(!v&&cw){XM();const N=KM(b);x=N.MeasureLayout,w.visualElement=qM(e,E,b,o,N.ProjectionNode,u)}return g.jsxs(td.Provider,{value:w,children:[x&&w.visualElement?g.jsx(x,{visualElement:w.visualElement,...b}):null,PM(e,h,FM(E,w.visualElement,p),E,v,t,u)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=z.forwardRef(d);return f[HM]=e,f}function YM({layoutId:e}){const t=z.useContext(qp).id;return t&&e!==void 0?t+"-"+e:e}function XM(e,t){z.useContext(Mz).strict}function KM(e){const t=Dz(),{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 JM(e,t){if(typeof Proxy>"u")return em;const n=new Map,a=(u,l)=>em(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,em(l,void 0,e,t)),n.get(l))})}const QM=(e,t)=>t.isSVG??wg(e)?new jR(t):new wR(t,{allowProjection:e!==z.Fragment});class WM extends Za{constructor(t){super(t),t.animationState||(t.animationState=MR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wc(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 eD=0;class tD extends Za{constructor(){super(...arguments),this.id=eD++}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 nD={animation:{Feature:WM},exit:{Feature:tD}};function Dl(e){return{point:{x:e.pageX,y:e.pageY}}}const rD=e=>t=>gg(t)&&e(t,Dl(t));function ul(e,t,n,a){return Sl(e,t,rD(n),a)}const Bz=({current:e})=>e?e.ownerDocument.defaultView:null,M1=(e,t)=>Math.abs(e-t);function aD(e,t){const n=M1(e.x,t.x),a=M1(e.y,t.y);return Math.sqrt(n**2+a**2)}const D1=new Set(["auto","scroll"]);class Iz{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=nm(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,E=aD(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!E)return;const{point:N}=v,{timestamp:j}=en;this.history.push({...N,timestamp:j});const{onStart:A,onMove:_}=this.handlers;w||(A&&A(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=tm(w,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:E,onSessionEnd:N,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=nm(v.type==="pointercancel"?this.lastMoveEventInfo:tm(w,this.transformPagePoint),this.history);this.startEvent&&E&&E(v,A),N&&N(v,A)},!gg(t))return;this.dragSnapToOrigin=u,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=o||window;const f=Dl(t),h=tm(f,this.transformPagePoint),{point:p}=h,{timestamp:x}=en;this.history=[{...p,timestamp:x}];const{onSessionStart:b}=n;b&&b(t,nm(h,this.history)),this.removeListeners=Ol(ul(this.contextWindow,"pointermove",this.handlePointerMove),ul(this.contextWindow,"pointerup",this.handlePointerUp),ul(this.contextWindow,"pointercancel",this.handlePointerUp)),d&&this.startScrollTracking(d)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(D1.has(a.overflowX)||D1.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),ft.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),La(this.updatePoint)}}function tm(e,t){return t?{point:t(e.point)}:e}function $1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nm({point:e},t){return{point:e,delta:$1(e,Hz(t)),offset:$1(e,iD(t)),velocity:oD(t,.1)}}function iD(e){return e[0]}function Hz(e){return e[e.length-1]}function oD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const o=Hz(e);for(;n>=0&&(a=e[n],!(o.timestamp-a.timestamp>Jr(t)));)n--;if(!a)return{x:0,y:0};const u=nr(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 sD(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?xt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?xt(n,e,a.max):Math.min(e,n)),e}function L1(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 lD(e,{top:t,left:n,bottom:a,right:o}){return{x:L1(e.x,n,o),y:L1(e.y,t,a)}}function U1(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 uD(e,t){return{x:U1(e.x,t.x),y:U1(e.y,t.y)}}function cD(e,t){let n=.5;const a=mn(e),o=mn(t);return o>a?n=xl(t.min,t.max-a,e.min):a>o&&(n=xl(e.min,e.max-o,t.min)),_r(0,1,n)}function dD(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 cp=.35;function fD(e=cp){return e===!1?e=0:e===!0&&(e=cp),{x:P1(e,"left","right"),y:P1(e,"top","bottom")}}function P1(e,t,n){return{min:V1(e,t),max:V1(e,n)}}function V1(e,t){return typeof e=="number"?e:e[t]||0}const hD=new WeakMap;class mD{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=Ht(),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(Dl(x).point)):this.pauseAnimation()},l=(x,b)=>{this.stopAnimation();const{drag:v,dragPropagation:w,onDragStart:E}=this.getProps();if(v&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=eR(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),Wn(j=>{let A=this.getAxisMotionValue(j).get()||0;if(zr.test(A)){const{projection:_}=this.visualElement;if(_&&_.layout){const P=_.layout.layoutBox[j];P&&(A=mn(P)*(parseFloat(A)/100))}}this.originPoint[j]=A}),E&&ft.postRender(()=>E(x,b)),np(this.visualElement,"transform");const{animationState:N}=this.visualElement;N&&N.setActive("whileDrag",!0)},d=(x,b)=>{this.latestPointerEvent=x,this.latestPanInfo=b;const{dragPropagation:v,dragDirectionLock:w,onDirectionLock:E,onDrag:N}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:j}=b;if(w&&this.currentDirection===null){this.currentDirection=pD(j),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",b.point,j),this.updateAxis("y",b.point,j),this.visualElement.render(),N&&N(x,b)},f=(x,b)=>{this.latestPointerEvent=x,this.latestPanInfo=b,this.stop(x,b),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Wn(x=>this.getAnimationState(x)==="paused"&&this.getAxisMotionValue(x).animation?.play()),{dragSnapToOrigin:p}=this.getProps();this.panSession=new Iz(t,{onSessionStart:u,onStart:l,onMove:d,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:a,contextWindow:Bz(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&&ft.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||!oc(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let l=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(l=sD(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&&rl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=lD(a.layoutBox,t):this.constraints=!1,this.elastic=fD(n),o!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&Wn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=dD(a.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!rl(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=yR(a,o.root,this.visualElement.getTransformPagePoint());let l=uD(o.layout.layoutBox,u);if(n){const d=n(mR(l));this.hasMutatedConstraints=!!d,d&&(l=dz(d))}return l}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:o,dragTransition:u,dragSnapToOrigin:l,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},h=Wn(p=>{if(!oc(p,n,this.currentDirection))return;let x=f&&f[p]||{};l&&(x={min:0,max:0});const b=o?200:1e6,v=o?40:1e7,w={type:"inertia",velocity:a?t[p]:0,bounceStiffness:b,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...u,...x};return this.startAxisValueAnimation(p,w)});return Promise.all(h).then(d)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return np(this.visualElement,t),a.start(dg(t,a,0,n,this.visualElement,!1))}stopAnimation(){Wn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Wn(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){Wn(n=>{const{drag:a}=this.getProps();if(!oc(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]-xt(l,d,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!rl(n)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Wn(l=>{const d=this.getAxisMotionValue(l);if(d&&this.constraints!==!1){const f=d.get();o[l]=cD({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(),Wn(l=>{if(!oc(l,t,null))return;const d=this.getAxisMotionValue(l),{min:f,max:h}=this.constraints[l];d.set(xt(f,h,o[l]))})}addListeners(){if(!this.visualElement.current)return;hD.set(this.visualElement,this);const t=this.visualElement.current,n=ul(t,"pointerdown",f=>{const{drag:h,dragListener:p=!0}=this.getProps(),x=f.target,b=x!==t&&iz(x);h&&p&&!b&&this.start(f)}),a=()=>{const{dragConstraints:f}=this.getProps();rl(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()),ft.read(a);const l=Sl(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:h})=>{this.isDragging&&h&&(Wn(p=>{const x=this.getAxisMotionValue(p);x&&(this.originPoint[p]+=f[p].translate,x.set(x.get()+f[p].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=cp,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:o,dragConstraints:u,dragElastic:l,dragMomentum:d}}}function oc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pD(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gD extends Za{constructor(t){super(t),this.removeGroupControls=ar,this.removeListeners=ar,this.controls=new mD(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 Z1=e=>(t,n)=>{e&&ft.postRender(()=>e(t,n))};class yD extends Za{constructor(){super(...arguments),this.removePointerDownListener=ar}onPointerDown(t){this.session=new Iz(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bz(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:Z1(t),onStart:Z1(n),onMove:a,onEnd:(u,l)=>{delete this.session,o&&ft.postRender(()=>o(u,l))}}}mount(){this.removePointerDownListener=ul(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 rm=!1;class xD 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),rm&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Tc.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}),rm=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==u?l.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?l.promote():l.relegate()||ft.postRender(()=>{const d=l.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),pg.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:o}=t;rm=!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 Fz(e){const[t,n]=Rz(),a=z.useContext(qp);return g.jsx(xD,{...e,layoutGroup:a,switchLayoutGroup:z.useContext(Vz),isPresent:t,safeToRemove:n})}const bD={pan:{Feature:yD},drag:{Feature:gD,ProjectionNode:Oz,MeasureLayout:Fz}};function B1(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&&ft.postRender(()=>u(t,Dl(t)))}class vD extends Za{mount(){const{current:t}=this.node;t&&(this.unmount=tR(t,(n,a)=>(B1(this.node,a,"Start"),o=>B1(this.node,o,"End"))))}unmount(){}}class kD extends Za{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=Ol(Sl(this.node.current,"focus",()=>this.onFocus()),Sl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function I1(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&&ft.postRender(()=>u(t,Dl(t)))}class SD extends Za{mount(){const{current:t}=this.node;t&&(this.unmount=aR(t,(n,a)=>(I1(this.node,a,"Start"),(o,{success:u})=>I1(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const dp=new WeakMap,am=new WeakMap,wD=e=>{const t=dp.get(e.target);t&&t(e)},zD=e=>{e.forEach(wD)};function _D({root:e,...t}){const n=e||document;am.has(n)||am.set(n,{});const a=am.get(n),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(zD,{root:e,...t})),a[o]}function TD(e,t,n){const a=_D(t);return dp.set(e,n),a.observe(e),()=>{dp.delete(e),a.unobserve(e)}}const ED={some:0,all:1};class CD extends Za{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:ED[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:p,onViewportLeave:x}=this.node.getProps(),b=h?p:x;b&&b(f)};return TD(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(jD(t,n))&&this.startObserver()}unmount(){}}function jD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ND={inView:{Feature:CD},tap:{Feature:SD},focus:{Feature:kD},hover:{Feature:vD}},AD={layout:{ProjectionNode:Oz,MeasureLayout:Fz}},OD={...nD,...ND,...bD,...AD},Tt=JM(OD,QM),qz=()=>{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 RD({onMenuClick:e,isDark:t,toggleTheme:n}){return g.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:[g.jsxs("h1",{className:"text-lg font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[g.jsx(ko,{className:"w-6 h-6"}),"MORPHEUS"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.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?g.jsx(WS,{className:"w-5 h-5"}):g.jsx(JS,{className:"w-5 h-5"})}),g.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:g.jsx(VN,{className:"w-6 h-6"})})]})]})}const Ra={list:()=>Pe.get("/webhooks"),get:e=>Pe.get(`/webhooks/${e}`),create:e=>Pe.post("/webhooks",e),update:(e,t)=>Pe.put(`/webhooks/${e}`,t),delete:e=>Pe.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 Pe.get(`/webhooks/notifications${n}`)},unreadCount:()=>Pe.get("/webhooks/notifications/unread-count"),markRead:e=>Pe.post("/webhooks/notifications/read",{ids:e})},ea=({open:e,onOpenChange:t,children:n})=>e?g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[g.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>t(!1)}),g.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,Lo=({className:e,children:t})=>g.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:g.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:t})}),ta=({children:e})=>g.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}),na=({className:e,children:t})=>g.jsx("h3",{className:`text-lg font-semibold leading-none tracking-tight ${e}`,children:t}),MD=({className:e,children:t})=>g.jsx("div",{className:`mt-6 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 ${e}`,children:t}),tr=({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 g.jsx("button",{className:d,...a})};function DD({isOpen:e,onClose:t,onConfirm:n}){return g.jsx(ea,{open:e,onOpenChange:t,children:g.jsxs(Lo,{className:"sm:max-w-md bg-azure-surface dark:bg-zinc-900 border-azure-border dark:border-matrix-primary",children:[g.jsx(ta,{children:g.jsx(na,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:"Confirm Restart"})}),g.jsxs("div",{children:[g.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."}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-end",children:[g.jsx(tr,{variant:"outline",onClick:t,children:"Cancel"}),g.jsx(tr,{variant:"destructive",onClick:()=>{n(),t()},children:"Confirm Restart"})]})]})]})})}function $D({children:e}){const t=mr(),[n,a]=z.useState(()=>{const w=localStorage.getItem("theme");return w?w==="dark":!0}),[o,u]=z.useState(!1),[l,d]=z.useState(!1),{logout:f}=qz(),{data:h}=rr("/webhooks/notifications/unread-count",()=>Ra.unreadCount(),{refreshInterval:1e4}),p=h?.count??0,x=async()=>{try{await Pe.post("/restart",{}),alert("Restart initiated successfully. The agent will restart shortly.")}catch(w){console.error("Failed to restart:",w),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 b=[{icon:m0,label:"Dashboard",path:"/"},{icon:pl,label:"Chat",path:"/chat"},{icon:b0,label:"Zaion",path:"/zaion"},{icon:y0,label:"MCP Servers",path:"/mcp-servers"},{icon:Am,label:"Usage Stats",path:"/stats"},{icon:Nc,label:"Model Pricing",path:"/model-pricing"},{icon:ko,label:"Sati Memories",path:"/sati-memories"},{icon:Mm,label:"Webhooks",path:"/webhooks"}],v=[{icon:m0,label:"Dashboard",path:"/"},{icon:pl,label:"Chat",path:"/chat"},{icon:b0,label:"Zaion",path:"/zaion"},{icon:y0,label:"MCP Servers",path:"/mcp-servers"},{icon:Am,label:"Usage Stats",path:"/stats"},{icon:Nc,label:"Model Pricing",path:"/model-pricing"},{icon:ko,label:"Sati Memories",path:"/sati-memories"},{icon:Mm,label:"Webhooks",path:"/webhooks"}];return g.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:[g.jsx(RD,{onMenuClick:()=>u(!0),isDark:n,toggleTheme:()=>a(!n)}),g.jsxs("div",{className:"flex flex-1 overflow-hidden pt-16 lg:pt-0",children:[" ",g.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:[g.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[g.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[g.jsx(ko,{className:"w-6 h-6"}),"MORPHEUS"]}),g.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?g.jsx(WS,{className:"w-4 h-4"}):g.jsx(JS,{className:"w-4 h-4"})})]}),g.jsxs("nav",{className:"flex-1 p-4 space-y-2",children:[b.map(w=>{const E=t.pathname===w.path;return g.jsxs(kr,{to:w.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${E?"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:[g.jsx(w.icon,{className:"w-5 h-5"}),g.jsx("span",{children:w.label})]},w.path)}),g.jsxs(kr,{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:[g.jsx(Rm,{className:"w-5 h-5"}),g.jsx("span",{children:"Logs"})]},"/logs"),g.jsxs(kr,{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:[g.jsxs("div",{className:"relative",children:[g.jsx(ml,{className:"w-5 h-5"}),p>0&&g.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:p>9?"9+":p})]}),g.jsx("span",{children:"Notifications"}),p>0&&g.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:p>99?"99+":p})]},"/notifications")]}),g.jsx("div",{className:"p-2",children:g.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:[g.jsx(x0,{className:"w-5 h-5"}),g.jsx("span",{children:"Restart"})]})}),g.jsx("div",{className:"p-2",children:g.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:[g.jsx(p0,{className:"w-5 h-5"}),g.jsx("span",{children:"Logout"})]})})]}),g.jsx(TM,{children:o&&g.jsxs(Tt.div,{className:"fixed inset-0 z-50 lg:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>u(!1),children:[g.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),g.jsxs(Tt.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:w=>w.stopPropagation(),children:[g.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[g.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[g.jsx(ko,{className:"w-6 h-6"}),"MORPHEUS"]}),g.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:g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),g.jsxs("nav",{className:"flex-1 p-4 space-y-2 overflow-y-auto",children:[v.map(w=>{const E=t.pathname===w.path;return g.jsxs(kr,{to:w.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${E?"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:[g.jsx(w.icon,{className:"w-5 h-5"}),g.jsx("span",{children:w.label})]},w.path)}),g.jsxs(kr,{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:[g.jsx(Rm,{className:"w-5 h-5"}),g.jsx("span",{children:"Logs"})]}),g.jsxs(kr,{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:[g.jsxs("div",{className:"relative",children:[g.jsx(ml,{className:"w-5 h-5"}),p>0&&g.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:p>9?"9+":p})]}),g.jsx("span",{children:"Notifications"}),p>0&&g.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:p>99?"99+":p})]})]}),g.jsx("div",{className:"p-2",children:g.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:[g.jsx(x0,{className:"w-5 h-5"}),g.jsx("span",{children:"Restart"})]})}),g.jsx("div",{className:"p-2",children:g.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:[g.jsx(p0,{className:"w-5 h-5"}),g.jsx("span",{children:"Logout"})]})})]})]})}),g.jsxs("main",{className:`flex-1 p-4 md:p-8 relative flex flex-col ${t.pathname==="/chat"?"overflow-hidden":"overflow-auto"}`,children:[g.jsx("div",{className:`w-full mx-auto flex-1 ${t.pathname==="/chat"?"h-full":"max-w-6xl"}`,children:e}),g.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"})]})]}),g.jsx(KA,{}),g.jsx(DD,{isOpen:l,onClose:()=>d(!1),onConfirm:x})]})}const LD={hidden:{opacity:0,y:20},show:{opacity:1,y:0}},bi=({title:e,value:t,icon:n,subValue:a})=>g.jsxs(Tt.div,{variants:LD,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:[g.jsxs("div",{className:"flex justify-between items-start mb-4",children:[g.jsx("h3",{className:"text-azure-text-secondary dark:text-matrix-secondary text-sm font-bold uppercase",children:e}),g.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"})]}),g.jsx("div",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight mb-1 font-mono tracking-tighter truncate",children:t}),a&&g.jsx("div",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary opacity-70 font-mono",children:a})]}),fp={fetchUsageStats:async()=>Pe.get("/stats/usage"),fetchGroupedUsageStats:async()=>Pe.get("/stats/usage/grouped")};function UD(){const{data:e}=rr("/api/stats/usage",fp.fetchUsageStats,{refreshInterval:5e3});return g.jsxs(g.Fragment,{children:[g.jsx(bi,{title:"Total Input",value:e?e.totalInputTokens.toLocaleString():"-",icon:tN,subValue:"Tokens processed"}),g.jsx(bi,{title:"Total Output",value:e?e.totalOutputTokens.toLocaleString():"-",icon:iN,subValue:"Tokens generated"})]})}function PD(){const{data:e}=lw(),t={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},n={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return g.jsxs(Tt.div,{className:"space-y-8",variants:t,initial:"hidden",animate:"show",children:[g.jsxs(Tt.div,{variants:n,children:[g.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight mb-2",children:"SYSTEM STATUS"}),g.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"Overview of the Morpheus agent runtime."})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[g.jsx(bi,{title:"Agent Status",value:e?.status.toUpperCase()||"CONNECTING...",icon:ko,subValue:e?`PID: ${e.pid}`:""}),g.jsx(bi,{title:"Uptime",value:e?uw(e.uptimeSeconds):"-",icon:Vp,subValue:e?`${e.uptimeSeconds.toFixed(0)} seconds`:""}),g.jsx(bi,{title:"Version",value:e?.projectVersion||"-",icon:KS,subValue:`Node ${e?.nodeVersion||"-"}`}),g.jsx(bi,{title:"Provider",value:e?.llmProvider?.toUpperCase()||"-",icon:dN,subValue:"LLM Inference Engine"}),g.jsx(bi,{title:"Model",value:e?.llmModel||"-",icon:uN,subValue:"Active Model"}),g.jsx(UD,{})]})]})}const VD=({sessions:e,activeSessionId:t,onSelectSession:n,onCreateSession:a,onArchiveSession:o,onDeleteSession:u,onRenameSession:l,isOpen:d,toggleSidebar:f})=>{const[h,p]=z.useState(null),[x,b]=z.useState(""),v=z.useRef(null);z.useEffect(()=>{h&&v.current&&v.current.focus()},[h]);const w=(A,_)=>{A.stopPropagation(),p(_.id),b(_.title||"Untitled Session")},E=A=>{A?.stopPropagation(),h&&x.trim()&&(l(h,x.trim()),p(null))},N=A=>{A?.stopPropagation(),p(null)},j=A=>{A.key==="Enter"?E():A.key==="Escape"&&N()};return d?g.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:[g.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:[g.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-matrix-highlight",children:"Sessions"}),g.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:g.jsx(pl,{size:18})})]}),g.jsx("div",{className:"p-4",children:g.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:[g.jsx(g0,{size:18}),g.jsx("span",{children:"New Chat"})]})}),g.jsxs("div",{className:"flex-1 overflow-y-auto px-2 space-y-1 custom-scrollbar",children:[e.map(A=>g.jsxs("div",{onClick:()=>n(A.id),className:`group flex items-center justify-between p-3 rounded-lg cursor-pointer transition-all border ${t===A.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:[g.jsx("div",{className:"flex flex-col overflow-hidden w-full mr-2",children:h===A.id?g.jsx("div",{className:"flex items-center gap-1 w-full",onClick:_=>_.stopPropagation(),children:g.jsx("input",{ref:v,type:"text",value:x,onChange:_=>b(_.target.value),onKeyDown:j,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"})}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:`text-sm font-medium truncate ${t===A.id?"text-azure-primary dark:text-matrix-highlight":"text-gray-700 dark:text-matrix-secondary"}`,children:A.title||"Untitled Session"}),g.jsx("span",{className:"text-xs text-gray-400 dark:text-matrix-secondary/70 mt-0.5",children:new Date(A.started_at).toLocaleString()})]})}),g.jsx("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:h===A.id?g.jsxs(g.Fragment,{children:[g.jsx("button",{onClick:E,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:g.jsx(Om,{size:14})}),g.jsx("button",{onClick:N,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:g.jsx(gA,{size:14})})]}):g.jsxs(g.Fragment,{children:[g.jsx("button",{onClick:_=>w(_,A),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:g.jsx(Bp,{size:14})}),g.jsx("button",{onClick:_=>{_.stopPropagation(),o(A.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:g.jsx(Wj,{size:14})}),g.jsx("button",{onClick:_=>{_.stopPropagation(),u(A.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:g.jsx(gl,{size:14})})]})})]},A.id)),e.length===0&&g.jsx("div",{className:"text-center text-gray-400 dark:text-matrix-secondary/50 mt-10 text-sm",children:"No active sessions."})]})]}):g.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:[g.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:g.jsx(pl,{})}),g.jsx("div",{className:"border-t border-gray-200 dark:border-matrix-primary/30 w-full my-2"}),g.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:g.jsx(g0,{size:20})})]})};function ZD(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const BD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ID=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HD={};function H1(e,t){return(HD.jsx?ID:BD).test(e)}const FD=/[ \t\n\f\r]/g;function qD(e){return typeof e=="object"?e.type==="text"?F1(e.value):!1:F1(e)}function F1(e){return e.replace(FD,"")===""}class $l{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}$l.prototype.normal={};$l.prototype.property={};$l.prototype.space=void 0;function Gz(e,t){const n={},a={};for(const o of e)Object.assign(n,o.property),Object.assign(a,o.normal);return new $l(n,a,t)}function hp(e){return e.toLowerCase()}class Tn{constructor(t,n){this.attribute=n,this.property=t}}Tn.prototype.attribute="";Tn.prototype.booleanish=!1;Tn.prototype.boolean=!1;Tn.prototype.commaOrSpaceSeparated=!1;Tn.prototype.commaSeparated=!1;Tn.prototype.defined=!1;Tn.prototype.mustUseProperty=!1;Tn.prototype.number=!1;Tn.prototype.overloadedBoolean=!1;Tn.prototype.property="";Tn.prototype.spaceSeparated=!1;Tn.prototype.space=void 0;let GD=0;const Ae=Ei(),Dt=Ei(),mp=Ei(),le=Ei(),ot=Ei(),Ao=Ei(),$n=Ei();function Ei(){return 2**++GD}const pp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:Dt,commaOrSpaceSeparated:$n,commaSeparated:Ao,number:le,overloadedBoolean:mp,spaceSeparated:ot},Symbol.toStringTag,{value:"Module"})),im=Object.keys(pp);class zg extends Tn{constructor(t,n,a,o){let u=-1;if(super(t,n),q1(this,"space",o),typeof a=="number")for(;++u<im.length;){const l=im[u];q1(this,im[u],(a&pp[l])===pp[l])}}}zg.prototype.defined=!0;function q1(e,t,n){n&&(e[t]=n)}function Go(e){const t={},n={};for(const[a,o]of Object.entries(e.properties)){const u=new zg(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),t[a]=u,n[hp(a)]=a,n[hp(u.attribute)]=a}return new $l(t,n,e.space)}const Yz=Go({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:ot,ariaCurrent:null,ariaDescribedBy:ot,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:ot,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:ot,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ot,ariaLevel:le,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:ot,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:ot,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Dt,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 Xz(e,t){return t in e?e[t]:t}function Kz(e,t){return Xz(e,t.toLowerCase())}const YD=Go({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ao,acceptCharset:ot,accessKey:ot,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:ot,autoFocus:Ae,autoPlay:Ae,blocking:ot,capture:null,charSet:null,checked:Ae,cite:null,className:ot,cols:le,colSpan:null,content:null,contentEditable:Dt,controls:Ae,controlsList:ot,coords:le|Ao,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:mp,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:ot,height:le,hidden:mp,high:le,href:null,hrefLang:null,htmlFor:ot,httpEquiv:ot,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:ot,itemRef:ot,itemScope:Ae,itemType:ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,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:Ae,optimum:le,pattern:null,ping:ot,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:ot,required:Ae,reversed:Ae,rows:le,rowSpan:le,sandbox:ot,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Dt,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:Ae,useMap:null,value:Dt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ot,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:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Dt,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:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Kz}),XD=Go({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:$n,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:ot,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:Ae,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:Ao,g2:Ao,glyphName:Ao,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:$n,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:ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,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:$n,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:$n,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:$n,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:Xz}),Jz=Go({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()}}),Qz=Go({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Kz}),Wz=Go({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),KD={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"},JD=/[A-Z]/g,G1=/-[a-z]/g,QD=/^data[-\w.:]+$/i;function WD(e,t){const n=hp(t);let a=t,o=Tn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&QD.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(G1,t3);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!G1.test(u)){let l=u.replace(JD,e3);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=zg}return new o(a,t)}function e3(e){return"-"+e.toLowerCase()}function t3(e){return e.charAt(1).toUpperCase()}const n3=Gz([Yz,YD,Jz,Qz,Wz],"html"),_g=Gz([Yz,XD,Jz,Qz,Wz],"svg");function r3(e){return e.join(" ").trim()}var go={},om,Y1;function a3(){if(Y1)return om;Y1=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="/",p="*",x="",b="comment",v="declaration";function w(N,j){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];j=j||{};var A=1,_=1;function P(oe){var re=oe.match(t);re&&(A+=re.length);var V=oe.lastIndexOf(f);_=~V?oe.length-V:_+oe.length}function D(){var oe={line:A,column:_};return function(re){return re.position=new L(oe),J(),re}}function L(oe){this.start=oe,this.end={line:A,column:_},this.source=j.source}L.prototype.content=N;function G(oe){var re=new Error(j.source+":"+A+":"+_+": "+oe);if(re.reason=oe,re.filename=j.source,re.line=A,re.column=_,re.source=N,!j.silent)throw re}function Z(oe){var re=oe.exec(N);if(re){var V=re[0];return P(V),N=N.slice(V.length),re}}function J(){Z(n)}function ce(oe){var re;for(oe=oe||[];re=$();)re!==!1&&oe.push(re);return oe}function $(){var oe=D();if(!(h!=N.charAt(0)||p!=N.charAt(1))){for(var re=2;x!=N.charAt(re)&&(p!=N.charAt(re)||h!=N.charAt(re+1));)++re;if(re+=2,x===N.charAt(re-1))return G("End of comment missing");var V=N.slice(2,re-2);return _+=2,P(V),N=N.slice(re),_+=2,oe({type:b,comment:V})}}function ie(){var oe=D(),re=Z(a);if(re){if($(),!Z(o))return G("property missing ':'");var V=Z(u),X=oe({type:v,property:E(re[0].replace(e,x)),value:V?E(V[0].replace(e,x)):x});return Z(l),X}}function te(){var oe=[];ce(oe);for(var re;re=ie();)re!==!1&&(oe.push(re),ce(oe));return oe}return J(),te()}function E(N){return N?N.replace(d,x):x}return om=w,om}var X1;function i3(){if(X1)return go;X1=1;var e=go&&go.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(go,"__esModule",{value:!0}),go.default=n;const t=e(a3());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:p}=f;d?o(h,p,f):p&&(u=u||{},u[h]=p)}),u}return go}var Xs={},K1;function o3(){if(K1)return Xs;K1=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.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,p){return p.toUpperCase()},d=function(h,p){return"".concat(p,"-")},f=function(h,p){return p===void 0&&(p={}),u(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,d):h=h.replace(a,d),h.replace(t,l))};return Xs.camelCase=f,Xs}var Ks,J1;function s3(){if(J1)return Ks;J1=1;var e=Ks&&Ks.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(i3()),n=o3();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,Ks=a,Ks}var l3=s3();const u3=Np(l3),e_=t_("end"),Tg=t_("start");function t_(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 c3(e){const t=Tg(e),n=e_(e);if(t&&n)return{start:t,end:n}}function cl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Q1(e.position):"start"in e||"end"in e?Q1(e):"line"in e||"column"in e?gp(e):""}function gp(e){return W1(e&&e.line)+":"+W1(e&&e.column)}function Q1(e){return gp(e&&e.start)+"-"+gp(e&&e.end)}function W1(e){return e&&typeof e=="number"?e:1}class on 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=cl(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}}on.prototype.file="";on.prototype.name="";on.prototype.reason="";on.prototype.message="";on.prototype.stack="";on.prototype.column=void 0;on.prototype.line=void 0;on.prototype.ancestors=void 0;on.prototype.cause=void 0;on.prototype.fatal=void 0;on.prototype.place=void 0;on.prototype.ruleId=void 0;on.prototype.source=void 0;const Eg={}.hasOwnProperty,d3=new Map,f3=/[A-Z]/g,h3=new Set(["table","tbody","thead","tfoot","tr"]),m3=new Set(["td","th"]),n_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function p3(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=w3(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=S3(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"?_g:n3,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=r_(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function r_(e,t,n){if(t.type==="element")return g3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return y3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return b3(e,t,n);if(t.type==="mdxjsEsm")return x3(e,t);if(t.type==="root")return v3(e,t,n);if(t.type==="text")return k3(e,t)}function g3(e,t,n){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=_g,e.schema=o),e.ancestors.push(t);const u=i_(e,t.tagName,!1),l=z3(e,t);let d=jg(e,t);return h3.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!qD(f):!0})),a_(e,l,u,t),Cg(l,d),e.ancestors.pop(),e.schema=a,e.create(t,u,l,n)}function y3(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)}wl(e,t.position)}function x3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wl(e,t.position)}function b3(e,t,n){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=_g,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:i_(e,t.name,!0),l=_3(e,t),d=jg(e,t);return a_(e,l,u,t),Cg(l,d),e.ancestors.pop(),e.schema=a,e.create(t,u,l,n)}function v3(e,t,n){const a={};return Cg(a,jg(e,t)),e.create(t,e.Fragment,a,n)}function k3(e,t){return t.value}function a_(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Cg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function S3(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 w3(e,t){return n;function n(a,o,u,l){const d=Array.isArray(u.children),f=Tg(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 z3(e,t){const n={};let a,o;for(o in t.properties)if(o!=="children"&&Eg.call(t.properties,o)){const u=T3(e,o,t.properties[o]);if(u){const[l,d]=u;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&m3.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 _3(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 wl(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 wl(e,t.position);else u=a.value===null?!0:a.value;n[o]=u}return n}function jg(e,t){const n=[];let a=-1;const o=e.passKeys?new Map:d3;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=r_(e,u,l);d!==void 0&&n.push(d)}return n}function T3(e,t,n){const a=WD(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?ZD(n):r3(n)),a.property==="style"){let o=typeof n=="object"?n:E3(e,String(n));return e.stylePropertyNameCase==="css"&&(o=C3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?KD[a.property]||a.property:a.attribute,n]}}function E3(e,t){try{return u3(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,o=new on("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=n_+"#cannot-parse-style-attribute",o}}function i_(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=H1(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=H1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return Eg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);wl(e)}function wl(e,t){const n=new on("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=n_+"#cannot-handle-mdx-estrees-without-createevaluater",n}function C3(e){const t={};let n;for(n in e)Eg.call(e,n)&&(t[j3(n)]=e[n]);return t}function j3(e){let t=e.replace(f3,N3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function N3(e){return"-"+e.toLowerCase()}const sm={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"]},A3={};function O3(e,t){const n=A3,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return o_(e,a,o)}function o_(e,t,n){if(R3(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 ek(e.children,t,n)}return Array.isArray(e)?ek(e,t,n):""}function ek(e,t,n){const a=[];let o=-1;for(;++o<e.length;)a[o]=o_(e[o],t,n);return a.join("")}function R3(e){return!!(e&&typeof e=="object")}const tk=document.createElement("i");function Ng(e){const t="&"+e+";";tk.innerHTML=t;const n=tk.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Tr(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 er(e,t){return e.length>0?(Tr(e,e.length,0,t),e):t}const nk={}.hasOwnProperty;function M3(e){const t={};let n=-1;for(;++n<e.length;)D3(t,e[n]);return t}function D3(e,t){let n;for(n in t){const o=(nk.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){nk.call(o,l)||(o[l]=[]);const d=u[l];$3(o[l],Array.isArray(d)?d:d?[d]:[])}}}function $3(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Tr(e,0,0,a)}function s_(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 Oo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wr=Ba(/[A-Za-z]/),Un=Ba(/[\dA-Za-z]/),L3=Ba(/[#-'*+\--9=?A-Z^-~]/);function yp(e){return e!==null&&(e<32||e===127)}const xp=Ba(/\d/),U3=Ba(/[\dA-Fa-f]/),P3=Ba(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function _n(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const V3=Ba(new RegExp("\\p{P}|\\p{S}","u")),Z3=Ba(/\s/);function Ba(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Yo(e){const t=[];let n=-1,a=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&Un(e.charCodeAt(n+1))&&Un(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 st(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 B3={tokenize:I3};function I3(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"),st(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 H3={tokenize:F3},rk={tokenize:q3};function F3(e){const t=this,n=[];let a=0,o,u,l;return d;function d(_){if(a<n.length){const P=n[a];return t.containerState=P[1],e.attempt(P[0].continuation,f,h)(_)}return h(_)}function f(_){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&A();const P=t.events.length;let D=P,L;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){L=t.events[D][1].end;break}j(a);let G=P;for(;G<t.events.length;)t.events[G][1].end={...L},G++;return Tr(t.events,D+1,0,t.events.slice(P)),t.events.length=G,h(_)}return d(_)}function h(_){if(a===n.length){if(!o)return b(_);if(o.currentConstruct&&o.currentConstruct.concrete)return w(_);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(rk,p,x)(_)}function p(_){return o&&A(),j(a),b(_)}function x(_){return t.parser.lazy[t.now().line]=a!==n.length,l=t.now().offset,w(_)}function b(_){return t.containerState={},e.attempt(rk,v,w)(_)}function v(_){return a++,n.push([t.currentConstruct,t.containerState]),b(_)}function w(_){if(_===null){o&&A(),j(0),e.consume(_);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),E(_)}function E(_){if(_===null){N(e.exit("chunkFlow"),!0),j(0),e.consume(_);return}return Te(_)?(e.consume(_),N(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(_),E)}function N(_,P){const D=t.sliceStream(_);if(P&&D.push(null),_.previous=u,u&&(u.next=_),u=_,o.defineSkip(_.start),o.write(D),t.parser.lazy[_.start.line]){let L=o.events.length;for(;L--;)if(o.events[L][1].start.offset<l&&(!o.events[L][1].end||o.events[L][1].end.offset>l))return;const G=t.events.length;let Z=G,J,ce;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(J){ce=t.events[Z][1].end;break}J=!0}for(j(a),L=G;L<t.events.length;)t.events[L][1].end={...ce},L++;Tr(t.events,Z+1,0,t.events.slice(G)),t.events.length=L}}function j(_){let P=n.length;for(;P-- >_;){const D=n[P];t.containerState=D[1],D[0].exit.call(t,e)}n.length=_}function A(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function q3(e,t,n){return st(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ak(e){if(e===null||_n(e)||Z3(e))return 1;if(V3(e))return 2}function Ag(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 bp={name:"attention",resolveAll:G3,tokenize:Y3};function G3(e,t){let n=-1,a,o,u,l,d,f,h,p;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};ik(x,-f),ik(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=er(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=er(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",u,t]]),h=er(h,Ag(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=er(h,[["exit",u,t],["enter",d,t],["exit",d,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=er(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Tr(e,a-1,n-a+3,h),n=a+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Y3(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,o=ak(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"),p=ak(f),x=!p||p===2&&o||n.includes(f),b=!o||o===2&&p||n.includes(a);return h._open=!!(u===42?x:x&&(o||!b)),h._close=!!(u===42?b:b&&(p||!x)),t(f)}}function ik(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const X3={name:"autolink",tokenize:K3};function K3(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 wr(v)?(e.consume(v),l):v===64?n(v):h(v)}function l(v){return v===43||v===45||v===46||Un(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||Un(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||yp(v)?n(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),p):L3(v)?(e.consume(v),h):n(v)}function p(v){return Un(v)?x(v):n(v)}function x(v){return v===46?(e.consume(v),a=0,p):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||Un(v))&&a++<63){const w=v===45?b:x;return e.consume(v),w}return n(v)}}const nd={partial:!0,tokenize:J3};function J3(e,t,n){return a;function a(u){return qe(u)?st(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Te(u)?t(u):n(u)}}const l_={continuation:{tokenize:W3},exit:e5,name:"blockQuote",tokenize:Q3};function Q3(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 W3(e,t,n){const a=this;return o;function o(l){return qe(l)?st(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt(l_,t,n)(l)}}function e5(e){e.exit("blockQuote")}const u_={name:"characterEscape",tokenize:t5};function t5(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 P3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const c_={name:"characterReference",tokenize:n5};function n5(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=Un,p(x))}function h(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=U3,p):(e.enter("characterReferenceValue"),u=7,l=xp,p(x))}function p(x){if(x===59&&o){const b=e.exit("characterReferenceValue");return l===Un&&!Ng(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),p):n(x)}}const ok={partial:!0,tokenize:a5},sk={concrete:!0,name:"codeFenced",tokenize:r5};function r5(e,t,n){const a=this,o={partial:!0,tokenize:D};let u=0,l=0,d;return f;function f(L){return h(L)}function h(L){const G=a.events[a.events.length-1];return u=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,d=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===d?(l++,e.consume(L),p):l<3?n(L):(e.exit("codeFencedFenceSequence"),qe(L)?st(e,x,"whitespace")(L):x(L))}function x(L){return L===null||Te(L)?(e.exit("codeFencedFence"),a.interrupt?t(L):e.check(ok,E,P)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||Te(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(L)):qe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),st(e,v,"whitespace")(L)):L===96&&L===d?n(L):(e.consume(L),b)}function v(L){return L===null||Te(L)?x(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(L))}function w(L){return L===null||Te(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(L)):L===96&&L===d?n(L):(e.consume(L),w)}function E(L){return e.attempt(o,P,N)(L)}function N(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),j}function j(L){return u>0&&qe(L)?st(e,A,"linePrefix",u+1)(L):A(L)}function A(L){return L===null||Te(L)?e.check(ok,E,P)(L):(e.enter("codeFlowValue"),_(L))}function _(L){return L===null||Te(L)?(e.exit("codeFlowValue"),A(L)):(e.consume(L),_)}function P(L){return e.exit("codeFenced"),t(L)}function D(L,G,Z){let J=0;return ce;function ce(re){return L.enter("lineEnding"),L.consume(re),L.exit("lineEnding"),$}function $(re){return L.enter("codeFencedFence"),qe(re)?st(L,ie,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):ie(re)}function ie(re){return re===d?(L.enter("codeFencedFenceSequence"),te(re)):Z(re)}function te(re){return re===d?(J++,L.consume(re),te):J>=l?(L.exit("codeFencedFenceSequence"),qe(re)?st(L,oe,"whitespace")(re):oe(re)):Z(re)}function oe(re){return re===null||Te(re)?(L.exit("codeFencedFence"),G(re)):Z(re)}}}function a5(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 lm={name:"codeIndented",tokenize:o5},i5={partial:!0,tokenize:s5};function o5(e,t,n){const a=this;return o;function o(h){return e.enter("codeIndented"),st(e,u,"linePrefix",5)(h)}function u(h){const p=a.events[a.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):Te(h)?e.attempt(i5,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 s5(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):st(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 l5={name:"codeText",previous:c5,resolve:u5,tokenize:d5};function u5(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 c5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function d5(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,p(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 p(x){return x===96?(e.consume(x),o++,p):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(u.type="codeTextData",h(x))}}class f5{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&&Js(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),Js(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Js(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);Js(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Js(this.left,n.reverse())}}}function Js(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 d_(e){const t={};let n=-1,a,o,u,l,d,f,h;const p=new f5(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(a=p.get(n),n&&a[1].type==="chunkFlow"&&p.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,h5(p,n)),n=t[n],h=!0);else if(a[1]._container){for(u=n,o=void 0;u--;)if(l=p.get(u),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.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={...p.get(o)[1].start},d=p.slice(o,n),d.unshift(a),p.splice(o,n-o+1,d))}}return Tr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function h5(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 p,x,b=-1,v=n,w=0,E=0;const N=[E];for(;v;){for(;e.get(++o)[1]!==v;);u.push(o),v._tokenizer||(p=a.sliceStream(v),v.next||p.push(null),x&&l.defineSkip(v.start),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),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&&(E=b+1,N.push(E),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(l.events=[],v?(v._tokenizer=void 0,v.previous=void 0):N.pop(),b=N.length;b--;){const j=d.slice(N[b],N[b+1]),A=u.pop();f.push([A,A+j.length-1]),e.splice(A,2,j)}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 m5={resolve:g5,tokenize:y5},p5={partial:!0,tokenize:x5};function g5(e){return d_(e),e}function y5(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(p5,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 x5(e,t,n){const a=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),st(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 f_(e,t,n,a,o,u,l,d,f){const h=f||Number.POSITIVE_INFINITY;let p=0;return x;function x(j){return j===60?(e.enter(a),e.enter(o),e.enter(u),e.consume(j),e.exit(u),b):j===null||j===32||j===41||yp(j)?n(j):(e.enter(a),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),E(j))}function b(j){return j===62?(e.enter(u),e.consume(j),e.exit(u),e.exit(o),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===62?(e.exit("chunkString"),e.exit(d),b(j)):j===null||j===60||Te(j)?n(j):(e.consume(j),j===92?w:v)}function w(j){return j===60||j===62||j===92?(e.consume(j),v):v(j)}function E(j){return!p&&(j===null||j===41||_n(j))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(a),t(j)):p<h&&j===40?(e.consume(j),p++,E):j===41?(e.consume(j),p--,E):j===null||j===32||j===40||yp(j)?n(j):(e.consume(j),j===92?N:E)}function N(j){return j===40||j===41||j===92?(e.consume(j),E):E(j)}}function h_(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),p}function p(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"),p):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||Te(v)||d++>999?(e.exit("chunkString"),p(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 m_(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"),st(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===l||b===null||Te(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?x:p)}function x(b){return b===l||b===92?(e.consume(b),p):p(b)}}function dl(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)?st(e,a,n?"linePrefix":"lineSuffix")(o):t(o)}}const b5={name:"definition",tokenize:k5},v5={partial:!0,tokenize:S5};function k5(e,t,n){const a=this;let o;return u;function u(v){return e.enter("definition"),l(v)}function l(v){return h_.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return o=Oo(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 _n(v)?dl(e,h)(v):h(v)}function h(v){return f_(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(v5,x,x)(v)}function x(v){return qe(v)?st(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 S5(e,t,n){return a;function a(d){return _n(d)?dl(e,o)(d):n(d)}function o(d){return m_(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return qe(d)?st(e,l,"whitespace")(d):l(d)}function l(d){return d===null||Te(d)?t(d):n(d)}}const w5={name:"hardBreakEscape",tokenize:z5};function z5(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 _5={name:"headingAtx",resolve:T5,tokenize:E5};function T5(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"},Tr(e,a,n-a+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function E5(e,t,n){let a=0;return o;function o(p){return e.enter("atxHeading"),u(p)}function u(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&a++<6?(e.consume(p),l):p===null||_n(p)?(e.exit("atxHeadingSequence"),d(p)):n(p)}function d(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||Te(p)?(e.exit("atxHeading"),t(p)):qe(p)?st(e,d,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function f(p){return p===35?(e.consume(p),f):(e.exit("atxHeadingSequence"),d(p))}function h(p){return p===null||p===35||_n(p)?(e.exit("atxHeadingText"),d(p)):(e.consume(p),h)}}const C5=["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"],lk=["pre","script","style","textarea"],j5={concrete:!0,name:"htmlFlow",resolveTo:O5,tokenize:R5},N5={partial:!0,tokenize:D5},A5={partial:!0,tokenize:M5};function O5(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 R5(e,t,n){const a=this;let o,u,l,d,f;return h;function h(T){return p(T)}function p(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,E):T===63?(e.consume(T),o=3,a.interrupt?t:O):wr(T)?(e.consume(T),l=String.fromCharCode(T),N):n(T)}function b(T){return T===45?(e.consume(T),o=2,v):T===91?(e.consume(T),o=5,d=0,w):wr(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 se="CDATA[";return T===se.charCodeAt(d++)?(e.consume(T),d===se.length?a.interrupt?t:ie:w):n(T)}function E(T){return wr(T)?(e.consume(T),l=String.fromCharCode(T),N):n(T)}function N(T){if(T===null||T===47||T===62||_n(T)){const se=T===47,ve=l.toLowerCase();return!se&&!u&&lk.includes(ve)?(o=1,a.interrupt?t(T):ie(T)):C5.includes(l.toLowerCase())?(o=6,se?(e.consume(T),j):a.interrupt?t(T):ie(T)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(T):u?A(T):_(T))}return T===45||Un(T)?(e.consume(T),l+=String.fromCharCode(T),N):n(T)}function j(T){return T===62?(e.consume(T),a.interrupt?t:ie):n(T)}function A(T){return qe(T)?(e.consume(T),A):ce(T)}function _(T){return T===47?(e.consume(T),ce):T===58||T===95||wr(T)?(e.consume(T),P):qe(T)?(e.consume(T),_):ce(T)}function P(T){return T===45||T===46||T===58||T===95||Un(T)?(e.consume(T),P):D(T)}function D(T){return T===61?(e.consume(T),L):qe(T)?(e.consume(T),D):_(T)}function L(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),f=T,G):qe(T)?(e.consume(T),L):Z(T)}function G(T){return T===f?(e.consume(T),f=null,J):T===null||Te(T)?n(T):(e.consume(T),G)}function Z(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||_n(T)?D(T):(e.consume(T),Z)}function J(T){return T===47||T===62||qe(T)?_(T):n(T)}function ce(T){return T===62?(e.consume(T),$):n(T)}function $(T){return T===null||Te(T)?ie(T):qe(T)?(e.consume(T),$):n(T)}function ie(T){return T===45&&o===2?(e.consume(T),V):T===60&&o===1?(e.consume(T),X):T===62&&o===4?(e.consume(T),C):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(N5,Y,te)(T)):T===null||Te(T)?(e.exit("htmlFlowData"),te(T)):(e.consume(T),ie)}function te(T){return e.check(A5,oe,Y)(T)}function oe(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"),ie(T))}function V(T){return T===45?(e.consume(T),O):ie(T)}function X(T){return T===47?(e.consume(T),l="",B):ie(T)}function B(T){if(T===62){const se=l.toLowerCase();return lk.includes(se)?(e.consume(T),C):ie(T)}return wr(T)&&l.length<8?(e.consume(T),l+=String.fromCharCode(T),B):ie(T)}function de(T){return T===93?(e.consume(T),O):ie(T)}function O(T){return T===62?(e.consume(T),C):T===45&&o===2?(e.consume(T),O):ie(T)}function C(T){return T===null||Te(T)?(e.exit("htmlFlowData"),Y(T)):(e.consume(T),C)}function Y(T){return e.exit("htmlFlow"),t(T)}}function M5(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 D5(e,t,n){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(nd,t,n)}}const $5={name:"htmlText",tokenize:L5};function L5(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),D):O===63?(e.consume(O),_):wr(O)?(e.consume(O),Z):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),u=0,w):wr(O)?(e.consume(O),A):n(O)}function p(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,X(O)):(e.consume(O),x)}function b(O){return O===45?(e.consume(O),v):x(O)}function v(O){return O===62?V(O):O===45?b(O):x(O)}function w(O){const C="CDATA[";return O===C.charCodeAt(u++)?(e.consume(O),u===C.length?E:w):n(O)}function E(O){return O===null?n(O):O===93?(e.consume(O),N):Te(O)?(l=E,X(O)):(e.consume(O),E)}function N(O){return O===93?(e.consume(O),j):E(O)}function j(O){return O===62?V(O):O===93?(e.consume(O),j):E(O)}function A(O){return O===null||O===62?V(O):Te(O)?(l=A,X(O)):(e.consume(O),A)}function _(O){return O===null?n(O):O===63?(e.consume(O),P):Te(O)?(l=_,X(O)):(e.consume(O),_)}function P(O){return O===62?V(O):_(O)}function D(O){return wr(O)?(e.consume(O),L):n(O)}function L(O){return O===45||Un(O)?(e.consume(O),L):G(O)}function G(O){return Te(O)?(l=G,X(O)):qe(O)?(e.consume(O),G):V(O)}function Z(O){return O===45||Un(O)?(e.consume(O),Z):O===47||O===62||_n(O)?J(O):n(O)}function J(O){return O===47?(e.consume(O),V):O===58||O===95||wr(O)?(e.consume(O),ce):Te(O)?(l=J,X(O)):qe(O)?(e.consume(O),J):V(O)}function ce(O){return O===45||O===46||O===58||O===95||Un(O)?(e.consume(O),ce):$(O)}function $(O){return O===61?(e.consume(O),ie):Te(O)?(l=$,X(O)):qe(O)?(e.consume(O),$):J(O)}function ie(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=ie,X(O)):qe(O)?(e.consume(O),ie):(e.consume(O),oe)}function te(O){return O===o?(e.consume(O),o=void 0,re):O===null?n(O):Te(O)?(l=te,X(O)):(e.consume(O),te)}function oe(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||_n(O)?J(O):(e.consume(O),oe)}function re(O){return O===47||O===62||_n(O)?J(O):n(O)}function V(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function X(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),B}function B(O){return qe(O)?st(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 Og={name:"labelEnd",resolveAll:Z5,resolveTo:B5,tokenize:I5},U5={tokenize:H5},P5={tokenize:F5},V5={tokenize:q5};function Z5(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&&Tr(e,0,e.length,n),e}function B5(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}},p={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[l-2][1].start}};return d=[["enter",f,t],["enter",h,t]],d=er(d,e.slice(u+1,u+a+3)),d=er(d,[["enter",p,t]]),d=er(d,Ag(t.parser.constructs.insideSpan.null,e.slice(u+a+4,l-3),t)),d=er(d,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),d=er(d,e.slice(l+1)),d=er(d,[["exit",f,t]]),Tr(e,u,e.length,d),e}function I5(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(Oo(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(U5,p,l?p:x)(b):b===91?e.attempt(P5,p,l?h:x)(b):l?p(b):x(b)}function h(b){return e.attempt(V5,p,x)(b)}function p(b){return t(b)}function x(b){return u._balanced=!0,n(b)}}function H5(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 _n(x)?dl(e,u)(x):u(x)}function u(x){return x===41?p(x):f_(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function l(x){return _n(x)?dl(e,f)(x):p(x)}function d(x){return n(x)}function f(x){return x===34||x===39||x===40?m_(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):p(x)}function h(x){return _n(x)?dl(e,p)(x):p(x)}function p(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):n(x)}}function F5(e,t,n){const a=this;return o;function o(d){return h_.call(a,e,u,l,"reference","referenceMarker","referenceString")(d)}function u(d){return a.parser.defined.includes(Oo(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function l(d){return n(d)}}function q5(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 G5={name:"labelStartImage",resolveAll:Og.resolveAll,tokenize:Y5};function Y5(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 X5={name:"labelStartLink",resolveAll:Og.resolveAll,tokenize:K5};function K5(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 um={name:"lineEnding",tokenize:J5};function J5(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),st(e,t,"linePrefix")}}const Ec={name:"thematicBreak",tokenize:Q5};function Q5(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)?st(e,d,"whitespace")(h):d(h))}}const zn={continuation:{tokenize:n$},exit:a$,name:"list",tokenize:t$},W5={partial:!0,tokenize:i$},e$={partial:!0,tokenize:r$};function t$(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:xp(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(Ec,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 xp(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(nd,a.interrupt?n:p,e.attempt(W5,b,x))}function p(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 n$(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(nd,o,u);function o(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,st(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(e$,t,l)(d))}function l(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,st(e,e.attempt(zn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function r$(e,t,n){const a=this;return st(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 a$(e){e.exit(this.containerState.type)}function i$(e,t,n){const a=this;return st(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 uk={name:"setextUnderline",resolveTo:o$,tokenize:s$};function o$(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 s$(e,t,n){const a=this;let o;return u;function u(h){let p=a.events.length,x;for(;p--;)if(a.events[p][1].type!=="lineEnding"&&a.events[p][1].type!=="linePrefix"&&a.events[p][1].type!=="content"){x=a.events[p][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)?st(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const l$={tokenize:u$};function u$(e){const t=this,n=e.attempt(nd,a,e.attempt(this.parser.constructs.flowInitial,o,st(e,e.attempt(this.parser.constructs.flow,o,e.attempt(m5,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 c$={resolveAll:g_()},d$=p_("string"),f$=p_("text");function p_(e){return{resolveAll:g_(e==="text"?h$: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(p){return h(p)?u(p):d(p)}function d(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),f}function f(p){return h(p)?(n.exit("data"),u(p)):(n.consume(p),f)}function h(p){if(p===null)return!0;const x=o[p];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 g_(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 h$(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 m$={42:zn,43:zn,45:zn,48:zn,49:zn,50:zn,51:zn,52:zn,53:zn,54:zn,55:zn,56:zn,57:zn,62:l_},p$={91:b5},g$={[-2]:lm,[-1]:lm,32:lm},y$={35:_5,42:Ec,45:[uk,Ec],60:j5,61:uk,95:Ec,96:sk,126:sk},x$={38:c_,92:u_},b$={[-5]:um,[-4]:um,[-3]:um,33:G5,38:c_,42:bp,60:[X3,$5],91:X5,92:[w5,u_],93:Og,95:bp,96:l5},v$={null:[bp,c$]},k$={null:[42,95]},S$={null:[]},w$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:k$,contentInitial:p$,disable:S$,document:m$,flow:y$,flowInitial:g$,insideSpan:v$,string:x$,text:b$},Symbol.toStringTag,{value:"Module"}));function z$(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:G(D),check:G(L),consume:A,enter:_,exit:P,interrupt:G(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:w,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:x};let p=t.tokenize.call(h,f);return t.resolveAll&&u.push(t),h;function x($){return l=er(l,$),N(),l[l.length-1]!==null?[]:(Z(t,0),h.events=Ag(u,h.events,h),h.events)}function b($,ie){return T$(v($),ie)}function v($){return _$(l,$)}function w(){const{_bufferIndex:$,_index:ie,line:te,column:oe,offset:re}=a;return{_bufferIndex:$,_index:ie,line:te,column:oe,offset:re}}function E($){o[$.line]=$.column,ce()}function N(){let $;for(;a._index<l.length;){const ie=l[a._index];if(typeof ie=="string")for($=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===$&&a._bufferIndex<ie.length;)j(ie.charCodeAt(a._bufferIndex));else j(ie)}}function j($){p=p($)}function A($){Te($)?(a.line++,a.column=1,a.offset+=$===-3?2:1,ce()):$!==-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=$}function _($,ie){const te=ie||{};return te.type=$,te.start=w(),h.events.push(["enter",te,h]),d.push(te),te}function P($){const ie=d.pop();return ie.end=w(),h.events.push(["exit",ie,h]),ie}function D($,ie){Z($,ie.from)}function L($,ie){ie.restore()}function G($,ie){return te;function te(oe,re,V){let X,B,de,O;return Array.isArray(oe)?Y(oe):"tokenize"in oe?Y([oe]):C(oe);function C(ge){return ye;function ye(Ye){const De=Ye!==null&&ge[Ye],Nt=Ye!==null&&ge.null,sn=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return Y(sn)(Ye)}}function Y(ge){return X=ge,B=0,ge.length===0?V:T(ge[B])}function T(ge){return ye;function ye(Ye){return O=J(),de=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?ve():ge.tokenize.call(ie?Object.assign(Object.create(h),ie):h,f,se,ve)(Ye)}}function se(ge){return $(de,O),re}function ve(ge){return O.restore(),++B<X.length?T(X[B]):V}}}function Z($,ie){$.resolveAll&&!u.includes($)&&u.push($),$.resolve&&Tr(h.events,ie,h.events.length-ie,$.resolve(h.events.slice(ie),h)),$.resolveTo&&(h.events=$.resolveTo(h.events,h))}function J(){const $=w(),ie=h.previous,te=h.currentConstruct,oe=h.events.length,re=Array.from(d);return{from:oe,restore:V};function V(){a=$,h.previous=ie,h.currentConstruct=te,h.events.length=oe,d=re,ce()}}function ce(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function _$(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 T$(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 E$(e){const a={constructs:M3([w$,...(e||{}).extensions||[]]),content:o(B3),defined:[],document:o(H3),flow:o(l$),lazy:{},string:o(d$),text:o(f$)};return a;function o(u){return l;function l(d){return z$(a,u,d)}}}function C$(e){for(;!d_(e););return e}const ck=/[\0\t\n\r]/g;function j$(){let e=1,t="",n=!0,a;return o;function o(u,l,d){const f=[];let h,p,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(ck.lastIndex=x,h=ck.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(p=Math.ceil(e/4)*4,f.push(-2);e++<p;)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 N$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function A$(e){return e.replace(N$,O$)}function O$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return s_(n.slice(u?2:1),u?16:10)}return Ng(n)||e}const y_={}.hasOwnProperty;function R$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),M$(n)(C$(E$(n).document().write(j$()(e,t,!0))))}function M$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Qe),autolinkProtocol:J,autolinkEmail:J,atxHeading:u(Ga),blockQuote:u(Nt),characterEscape:J,characterReference:J,codeFenced:u(sn),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(sn,l),codeText:u(Vn,l),codeTextData:J,data:J,codeFlowValue:J,definition:u(pr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(Zn),hardBreakEscape:u(Be),hardBreakTrailing:u(Be),htmlFlow:u(rt,l),htmlFlowData:J,htmlText:u(rt,l),htmlTextData:J,image:u(lt),label:l,link:u(Qe),listItem:u(Bn),listItemValue:b,listOrdered:u(Ft,x),listUnordered:u(Ft),paragraph:u(Et),reference:T,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Ga),strong:u(Vt),thematicBreak:u(Ni)},exit:{atxHeading:f(),atxHeadingSequence:D,autolink:f(),autolinkEmail:De,autolinkProtocol:Ye,blockQuote:f(),characterEscapeValue:ce,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:ge,characterReference:ye,codeFenced:f(N),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:w,codeFlowValue:ce,codeIndented:f(j),codeText:f(re),codeTextData:ce,data:ce,definition:f(),definitionDestinationString:P,definitionLabelString:A,definitionTitleString:_,emphasis:f(),hardBreakEscape:f(ie),hardBreakTrailing:f(ie),htmlFlow:f(te),htmlFlowData:ce,htmlText:f(oe),htmlTextData:ce,image:f(X),label:de,labelText:B,lineEnding:$,link:f(V),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:se,resourceDestinationString:O,resourceTitleString:C,resource:Y,setextHeading:f(Z),setextHeadingLineSequence:G,setextHeadingText:L,strong:f(),thematicBreak:f()}};x_(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(Q){let ue={type:"root",children:[]};const xe={stack:[ue],tokenStack:[],config:t,enter:d,exit:h,buffer:l,resume:p,data:n},_e=[];let Ve=-1;for(;++Ve<Q.length;)if(Q[Ve][1].type==="listOrdered"||Q[Ve][1].type==="listUnordered")if(Q[Ve][0]==="enter")_e.push(Ve);else{const ln=_e.pop();Ve=o(Q,ln,Ve)}for(Ve=-1;++Ve<Q.length;){const ln=t[Q[Ve][0]];y_.call(ln,Q[Ve][1].type)&&ln[Q[Ve][1].type].call(Object.assign({sliceSerialize:Q[Ve][2].sliceSerialize},xe),Q[Ve][1])}if(xe.tokenStack.length>0){const ln=xe.tokenStack[xe.tokenStack.length-1];(ln[1]||dk).call(xe,void 0,ln[0])}for(ue.position={start:Ca(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Ca(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<t.transforms.length;)ue=t.transforms[Ve](ue)||ue;return ue}function o(Q,ue,xe){let _e=ue-1,Ve=-1,ln=!1,Cn,un,Zt,pn;for(;++_e<=xe;){const at=Q[_e];switch(at[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{at[0]==="enter"?Ve++:Ve--,pn=void 0;break}case"lineEndingBlank":{at[0]==="enter"&&(Cn&&!pn&&!Ve&&!Zt&&(Zt=_e),pn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pn=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(Cn){let ra=_e;for(un=void 0;ra--;){const sr=Q[ra];if(sr[1].type==="lineEnding"||sr[1].type==="lineEndingBlank"){if(sr[0]==="exit")continue;un&&(Q[un][1].type="lineEndingBlank",ln=!0),sr[1].type="lineEnding",un=ra}else if(!(sr[1].type==="linePrefix"||sr[1].type==="blockQuotePrefix"||sr[1].type==="blockQuotePrefixWhitespace"||sr[1].type==="blockQuoteMarker"||sr[1].type==="listItemIndent"))break}Zt&&(!un||Zt<un)&&(Cn._spread=!0),Cn.end=Object.assign({},un?Q[un][1].start:at[1].end),Q.splice(un||_e,0,["exit",Cn,at[2]]),_e++,xe++}if(at[1].type==="listItemPrefix"){const ra={type:"listItem",_spread:!1,start:Object.assign({},at[1].start),end:void 0};Cn=ra,Q.splice(_e,0,["enter",ra,at[2]]),_e++,xe++,Zt=void 0,pn=!0}}}return Q[ue][1]._spread=ln,xe}function u(Q,ue){return xe;function xe(_e){d.call(this,Q(_e),_e),ue&&ue.call(this,_e)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(Q,ue,xe){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ue,xe||void 0]),Q.position={start:Ca(ue.start),end:void 0}}function f(Q){return ue;function ue(xe){Q&&Q.call(this,xe),h.call(this,xe)}}function h(Q,ue){const xe=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==Q.type&&(ue?ue.call(this,Q,_e[0]):(_e[1]||dk).call(this,Q,_e[0]));else throw new Error("Cannot close `"+Q.type+"` ("+cl({start:Q.start,end:Q.end})+"): it’s not open");xe.position.end=Ca(Q.end)}function p(){return O3(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function b(Q){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=Q}function w(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=Q}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q.replace(/(\r?\n|\r)$/g,"")}function A(Q){const ue=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ue,xe.identifier=Oo(this.sliceSerialize(Q)).toLowerCase()}function _(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.title=Q}function P(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.url=Q}function D(Q){const ue=this.stack[this.stack.length-1];if(!ue.depth){const xe=this.sliceSerialize(Q).length;ue.depth=xe}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function G(Q){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function J(Q){const xe=this.stack[this.stack.length-1].children;let _e=xe[xe.length-1];(!_e||_e.type!=="text")&&(_e=ut(),_e.position={start:Ca(Q.start),end:void 0},xe.push(_e)),this.stack.push(_e)}function ce(Q){const ue=this.stack.pop();ue.value+=this.sliceSerialize(Q),ue.position.end=Ca(Q.end)}function $(Q){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ue.children[ue.children.length-1];xe.position.end=Ca(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(J.call(this,Q),ce.call(this,Q))}function ie(){this.data.atHardBreak=!0}function te(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function oe(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function re(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function V(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ue,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function X(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ue,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function B(Q){const ue=this.sliceSerialize(Q),xe=this.stack[this.stack.length-2];xe.label=A$(ue),xe.identifier=Oo(ue).toLowerCase()}function de(){const Q=this.stack[this.stack.length-1],ue=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const _e=Q.children;xe.children=_e}else xe.alt=ue}function O(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.url=Q}function C(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.title=Q}function Y(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function se(Q){const ue=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ue,xe.identifier=Oo(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function ve(Q){this.data.characterReferenceType=Q.type}function ge(Q){const ue=this.sliceSerialize(Q),xe=this.data.characterReferenceType;let _e;xe?(_e=s_(ue,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=Ng(ue);const Ve=this.stack[this.stack.length-1];Ve.value+=_e}function ye(Q){const ue=this.stack.pop();ue.position.end=Ca(Q.end)}function Ye(Q){ce.call(this,Q);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(Q)}function De(Q){ce.call(this,Q);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(Q)}function Nt(){return{type:"blockquote",children:[]}}function sn(){return{type:"code",lang:null,meta:null,value:""}}function Vn(){return{type:"inlineCode",value:""}}function pr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zn(){return{type:"emphasis",children:[]}}function Ga(){return{type:"heading",depth:0,children:[]}}function Be(){return{type:"break"}}function rt(){return{type:"html",value:""}}function lt(){return{type:"image",title:null,url:"",alt:null}}function Qe(){return{type:"link",title:null,url:"",children:[]}}function Ft(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function Bn(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function Vt(){return{type:"strong",children:[]}}function ut(){return{type:"text",value:""}}function Ni(){return{type:"thematicBreak"}}}function Ca(e){return{line:e.line,column:e.column,offset:e.offset}}function x_(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?x_(e,a):D$(e,a)}}function D$(e,t){let n;for(n in t)if(y_.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 dk(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+cl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+cl({start:t.start,end:t.end})+") is still open")}function $$(e){const t=this;t.parser=n;function n(a){return R$(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function L$(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 U$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
23
+ `}]}function P$(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 V$(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Z$(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function B$(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=Yo(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 I$(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 H$(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function b_(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 F$(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return b_(e,t);const o={src:Yo(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 q$(e,t){const n={src:Yo(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 G$(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 Y$(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return b_(e,t);const o={href:Yo(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 X$(e,t){const n={href:Yo(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 K$(e,t,n){const a=e.all(t),o=n?J$(n):v_(t),u={},l=[];if(typeof t.checked=="boolean"){const p=a[0];let x;p&&p.type==="element"&&p.tagName==="p"?x=p:(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 p=a[d];(o||d!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
25
+ `}),p.type==="element"&&p.tagName==="p"&&!o?l.push(...p.children):l.push(p)}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 J$(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=v_(n[a])}return t}function v_(e){const t=e.spread;return t??e.children.length>1}function Q$(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 W$(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function e6(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function t6(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n6(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=Tg(t.children[1]),f=e_(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 r6(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 p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function a6(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const fk=9,hk=32;function i6(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),o=0;const u=[];for(;a;)u.push(mk(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=n.exec(t);return u.push(mk(t.slice(o),o>0,!1)),u.join("")}function mk(e,t,n){let a=0,o=e.length;if(t){let u=e.codePointAt(a);for(;u===fk||u===hk;)a++,u=e.codePointAt(a)}if(n){let u=e.codePointAt(o-1);for(;u===fk||u===hk;)o--,u=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function o6(e,t){const n={type:"text",value:i6(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function s6(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const l6={blockquote:L$,break:U$,code:P$,delete:V$,emphasis:Z$,footnoteReference:B$,heading:I$,html:H$,imageReference:F$,image:q$,inlineCode:G$,linkReference:Y$,link:X$,listItem:K$,list:Q$,paragraph:W$,root:e6,strong:t6,table:n6,tableCell:a6,tableRow:r6,text:o6,thematicBreak:s6,toml:sc,yaml:sc,definition:sc,footnoteDefinition:sc};function sc(){}const k_=-1,rd=0,fl=1,Uc=2,Rg=3,Mg=4,Dg=5,$g=6,S_=7,w_=8,pk=typeof self=="object"?self:globalThis,u6=(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 rd:case k_:return n(l,o);case fl:{const d=n([],o);for(const f of l)d.push(a(f));return d}case Uc:{const d=n({},o);for(const[f,h]of l)d[a(f)]=a(h);return d}case Rg:return n(new Date(l),o);case Mg:{const{source:d,flags:f}=l;return n(new RegExp(d,f),o)}case Dg:{const d=n(new Map,o);for(const[f,h]of l)d.set(a(f),a(h));return d}case $g:{const d=n(new Set,o);for(const f of l)d.add(a(f));return d}case S_:{const{name:d,message:f}=l;return n(new pk[d](f),o)}case w_: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 pk[u](l),o)};return a},gk=e=>u6(new Map,e)(0),yo="",{toString:c6}={},{keys:d6}=Object,Qs=e=>{const t=typeof e;if(t!=="object"||!e)return[rd,t];const n=c6.call(e).slice(8,-1);switch(n){case"Array":return[fl,yo];case"Object":return[Uc,yo];case"Date":return[Rg,yo];case"RegExp":return[Mg,yo];case"Map":return[Dg,yo];case"Set":return[$g,yo];case"DataView":return[fl,n]}return n.includes("Array")?[fl,n]:n.includes("Error")?[S_,n]:[Uc,n]},lc=([e,t])=>e===rd&&(t==="function"||t==="symbol"),f6=(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]=Qs(l);switch(d){case rd:{let p=l;switch(f){case"bigint":d=w_,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);p=null;break;case"undefined":return o([k_],l)}return o([d,p],l)}case fl:{if(f){let b=l;return f==="DataView"?b=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(l)),o([f,[...b]],l)}const p=[],x=o([d,p],l);for(const b of l)p.push(u(b));return x}case Uc:{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 p=[],x=o([d,p],l);for(const b of d6(l))(e||!lc(Qs(l[b])))&&p.push([u(b),u(l[b])]);return x}case Rg:return o([d,l.toISOString()],l);case Mg:{const{source:p,flags:x}=l;return o([d,{source:p,flags:x}],l)}case Dg:{const p=[],x=o([d,p],l);for(const[b,v]of l)(e||!(lc(Qs(b))||lc(Qs(v))))&&p.push([u(b),u(v)]);return x}case $g:{const p=[],x=o([d,p],l);for(const b of l)(e||!lc(Qs(b)))&&p.push(u(b));return x}}const{message:h}=l;return o([d,{name:f,message:h}],l)};return u},yk=(e,{json:t,lossy:n}={})=>{const a=[];return f6(!(t||n),!!t,new Map,a)(e),a},Pc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?gk(yk(e,t)):structuredClone(e):(e,t)=>gk(yk(e,t));function h6(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 m6(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function p6(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||h6,a=e.options.footnoteBackLabel||m6,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 p=e.all(h),x=String(h.identifier).toUpperCase(),b=Yo(x.toLowerCase());let v=0;const w=[],E=e.footnoteCounts.get(x);for(;E!==void 0&&++v<=E;){w.length>0&&w.push({type:"text",value:" "});let A=typeof n=="string"?n:n(f,v);typeof A=="string"&&(A={type:"text",value:A}),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(A)?A:[A]})}const N=p[p.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const A=N.children[N.children.length-1];A&&A.type==="text"?A.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...w)}else p.push(...w);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(h,j),d.push(j)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Pc(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 z_=(function(e){if(e==null)return b6;if(typeof e=="function")return ad(e);if(typeof e=="object")return Array.isArray(e)?g6(e):y6(e);if(typeof e=="string")return x6(e);throw new Error("Expected function, string, or object as test")});function g6(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=z_(e[n]);return ad(a);function a(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function y6(e){const t=e;return ad(n);function n(a){const o=a;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function x6(e){return ad(t);function t(n){return n&&n.type===e}}function ad(e){return t;function t(n,a,o){return!!(v6(n)&&e.call(this,n,typeof a=="number"?a:void 0,o||void 0))}}function b6(){return!0}function v6(e){return e!==null&&typeof e=="object"&&"type"in e}const __=[],k6=!0,xk=!1,S6="skip";function w6(e,t,n,a){let o;typeof t=="function"&&typeof n!="function"?(a=n,n=t):o=t;const u=z_(o),l=a?-1:1;d(e,void 0,[])();function d(f,h,p){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=__,w,E,N;if((!t||u(f,h,p[p.length-1]||void 0))&&(v=z6(n(f,p)),v[0]===xk))return v;if("children"in f&&f.children){const j=f;if(j.children&&v[0]!==S6)for(E=(a?j.children.length:-1)+l,N=p.concat(j);E>-1&&E<j.children.length;){const A=j.children[E];if(w=d(A,E,N)(),w[0]===xk)return w;E=typeof w[1]=="number"?w[1]:E+l}}return v}}}function z6(e){return Array.isArray(e)?e:typeof e=="number"?[k6,e]:e==null?__:[e]}function T_(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),w6(e,u,d,o);function d(f,h){const p=h[h.length-1],x=p?p.children.indexOf(f):void 0;return l(f,x,p)}}const vp={}.hasOwnProperty,_6={};function T6(e,t){const n=t||_6,a=new Map,o=new Map,u=new Map,l={...l6,...n.handlers},d={all:h,applyData:C6,definitionById:a,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:l,one:f,options:n,patch:E6,wrap:N6};return T_(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const x=p.type==="definition"?a:o,b=String(p.identifier).toUpperCase();x.has(b)||x.set(b,p)}}),d;function f(p,x){const b=p.type,v=d.handlers[b];if(vp.call(d.handlers,b)&&v)return v(d,p,x);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in p){const{children:E,...N}=p,j=Pc(N);return j.children=d.all(p),j}return Pc(p)}return(d.options.unknownHandler||j6)(d,p,x)}function h(p){const x=[];if("children"in p){const b=p.children;let v=-1;for(;++v<b.length;){const w=d.one(b[v],p);if(w){if(v&&b[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=bk(w.value)),!Array.isArray(w)&&w.type==="element")){const E=w.children[0];E&&E.type==="text"&&(E.value=bk(E.value))}Array.isArray(w)?x.push(...w):x.push(w)}}}return x}}function E6(e,t){e.position&&(t.position=c3(e))}function C6(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,Pc(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function j6(e,t){const n=t.data||{},a="value"in t&&!(vp.call(n,"hProperties")||vp.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 N6(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 bk(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vk(e,t){const n=T6(e,t),a=n.one(e,void 0),o=p6(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 A6(e,t){return e&&"run"in e?async function(n,a){const o=vk(n,{file:a,...t});await e.run(o,a)}:function(n,a){return vk(n,{file:a,...e||t})}}function kk(e){if(e)throw e}var cm,Sk;function O6(){if(Sk)return cm;Sk=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 p=e.call(h,"constructor"),x=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!x)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},d=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(a)return a(h,p).value}else return;return h[p]};return cm=function f(){var h,p,x,b,v,w,E=arguments[0],N=1,j=arguments.length,A=!1;for(typeof E=="boolean"&&(A=E,E=arguments[1]||{},N=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});N<j;++N)if(h=arguments[N],h!=null)for(p in h)x=d(E,p),b=d(h,p),E!==b&&(A&&b&&(u(b)||(v=o(b)))?(v?(v=!1,w=x&&o(x)?x:[]):w=x&&u(x)?x:{},l(E,{name:p,newValue:f(A,w,b)})):typeof b<"u"&&l(E,{name:p,newValue:b}));return E},cm}var R6=O6();const dm=Np(R6);function kp(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 M6(){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 p=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,p?D6(p,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 D6(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 p=h;if(d&&n)throw p;return o(p)}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 vr={basename:$6,dirname:L6,extname:U6,join:P6,sep:"/"};function $6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ll(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 L6(e){if(Ll(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 U6(e){Ll(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 P6(...e){let t=-1,n;for(;++t<e.length;)Ll(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":V6(n)}function V6(e){Ll(e);const t=e.codePointAt(0)===47;let n=Z6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Z6(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 Ll(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const B6={cwd:I6};function I6(){return"/"}function Sp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function H6(e){if(typeof e=="string")e=new URL(e);else if(!Sp(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 F6(e)}function F6(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 fm=["history","path","basename","stem","extname","dirname"];class E_{constructor(t){let n;t?Sp(t)?n={path:t}:typeof t=="string"||q6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":B6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<fm.length;){const u=fm[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)fm.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(t){mm(t,"basename"),hm(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){wk(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(hm(t,"extname"),wk(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=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Sp(t)&&(t=H6(t)),mm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){mm(t,"stem"),hm(t,"stem"),this.path=vr.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 on(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 hm(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function mm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function wk(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function q6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const G6=(function(e){const a=this.constructor.prototype,o=a[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),Y6={}.hasOwnProperty;class Lg extends G6{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=M6()}copy(){const t=new Lg;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(dm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ym("data",this.frozen),this.namespace[t]=n,this):Y6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ym("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=uc(t),a=this.parser||this.Parser;return pm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),pm("process",this.parser||this.Parser),gm("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,l){const d=uc(t),f=a.parse(d);a.run(f,d,function(p,x,b){if(p||!x||!b)return h(p);const v=x,w=a.stringify(v,b);J6(w)?b.value=w:b.result=w,h(p,b)});function h(p,x){p||!x?l(p):u?u(x):n(void 0,x)}}}processSync(t){let n=!1,a;return this.freeze(),pm("processSync",this.parser||this.Parser),gm("processSync",this.compiler||this.Compiler),this.process(t,o),_k("processSync","process",n),a;function o(u,l){n=!0,kk(u),a=l}}run(t,n,a){zk(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=uc(n);o.run(t,f,h);function h(p,x,b){const v=x||t;p?d(p):l?l(v):a(void 0,v,b)}}}runSync(t,n){let a=!1,o;return this.run(t,n,u),_k("runSync","run",a),o;function u(l,d){kk(l),o=d,a=!0}}stringify(t,n){this.freeze();const a=uc(n),o=this.compiler||this.Compiler;return gm("stringify",o),zk(t),o(t,a)}use(t,...n){const a=this.attachers,o=this.namespace;if(ym("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[p,...x]=h;f(p,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=dm(!0,o.settings,h.settings))}function d(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const x=h[p];u(x)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,p){let x=-1,b=-1;for(;++x<a.length;)if(a[x][0]===h){b=x;break}if(b===-1)a.push([h,...p]);else if(p.length>0){let[v,...w]=p;const E=a[b][1];kp(E)&&kp(v)&&(v=dm(!0,E,v)),a[b]=[h,v,...w]}}}}const X6=new Lg().freeze();function pm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function gm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ym(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 zk(e){if(!kp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _k(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function uc(e){return K6(e)?e:new E_(e)}function K6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function J6(e){return typeof e=="string"||Q6(e)}function Q6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const W6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tk=[],Ek={allowDangerousHtml:!0},eL=/^(https?|ircs?|mailto|xmpp)$/i,tL=[{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 nL(e){const t=rL(e),n=aL(e);return iL(t.runSync(t.parse(n),n),e)}function rL(e){const t=e.rehypePlugins||Tk,n=e.remarkPlugins||Tk,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ek}:Ek;return X6().use($$).use(n).use(A6,a).use(t)}function aL(e){const t=e.children||"",n=new E_;return typeof t=="string"&&(n.value=t),n}function iL(e,t){const n=t.allowedElements,a=t.allowElement,o=t.components,u=t.disallowedElements,l=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||oL;for(const p of tL)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+W6+p.id,void 0);return T_(e,h),p3(e,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function h(p,x,b){if(p.type==="raw"&&b&&typeof x=="number")return l?b.children.splice(x,1):b.children[x]={type:"text",value:p.value},x;if(p.type==="element"){let v;for(v in sm)if(Object.hasOwn(sm,v)&&Object.hasOwn(p.properties,v)){const w=p.properties[v],E=sm[v];(E===null||E.includes(p.tagName))&&(p.properties[v]=f(String(w||""),v,p))}}if(p.type==="element"){let v=n?!n.includes(p.tagName):u?u.includes(p.tagName):!1;if(!v&&a&&typeof x=="number"&&(v=!a(p,x,b)),v&&b&&typeof x=="number")return d&&p.children?b.children.splice(x,1,...p.children):b.children.splice(x,1),x}}}function oL(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||eL.test(e.slice(0,t))?e:""}const sL=({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=h=>{h.preventDefault(),!(!o.trim()||n)&&(t(o),u(""))};return a?g.jsxs("div",{className:"flex-1 flex flex-col h-full bg-gray-50 dark:bg-black relative overflow-hidden transition-colors duration-300",children:[g.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6 min-h-0",children:[e.map((h,p)=>g.jsxs("div",{className:`flex gap-4 ${h.type==="human"?"justify-end":"justify-start"}`,children:[h.type!=="human"&&g.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 ${h.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:h.type==="tool"?g.jsx(KS,{size:16}):g.jsx(h0,{size:18})}),g.jsx("div",{className:`max-w-[80%] rounded-2xl p-4 shadow-sm ${h.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":h.type==="tool"?"bg-gray-100 dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 text-gray-800 dark:text-gray-200 font-mono text-sm":"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:h.type==="tool"?g.jsxs("div",{className:"overflow-x-auto",children:[g.jsx("p",{className:"text-xs text-gray-500 mb-1 font-sans font-semibold",children:"Tool Output:"}),g.jsx("pre",{className:"whitespace-pre-wrap break-all",children:typeof h.content=="string"?h.content:JSON.stringify(h.content,null,2)})]}):g.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:g.jsx(nL,{children:h.content})})}),h.type==="human"&&g.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:g.jsx(hA,{size:18})})]},p)),n&&g.jsxs("div",{className:"flex gap-4 justify-start",children:[g.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:g.jsx(h0,{size:18})}),g.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:[g.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"0ms"}}),g.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"150ms"}}),g.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]}),g.jsx("div",{ref:l})]}),g.jsx("div",{className:"p-4 bg-white dark:bg-black border-t border-gray-200 dark:border-matrix-primary/30 shrink-0",children:g.jsxs("form",{onSubmit:f,className:"max-w-4xl mx-auto relative flex items-center gap-2",children:[g.jsx("input",{type:"text",value:o,onChange:h=>u(h.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}),g.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:g.jsx(WN,{size:20})})]})})]}):g.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:[g.jsx(lL,{size:48,className:"mb-4 opacity-20"}),g.jsx("p",{children:"Select a session to start chatting or create a new one."})]})},lL=({size:e,className:t})=>g.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:g.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"})}),hi={getSessions:async()=>Pe.get("/sessions"),createSession:async()=>Pe.post("/sessions",{}),deleteSession:async e=>Pe.delete(`/sessions/${e}`),renameSession:async(e,t)=>Pe.patch(`/sessions/${e}/title`,{title:t}),archiveSession:async e=>Pe.post(`/sessions/${e}/archive`,{}),getMessages:async e=>Pe.get(`/sessions/${e}/messages`),sendMessage:async(e,t)=>Pe.post("/chat",{sessionId:e,message:t})};function uL({isOpen:e,onClose:t,onConfirm:n,title:a,description:o,confirmJson:u="Confirm",variant:l="default"}){return g.jsx(ea,{open:e,onOpenChange:t,children:g.jsxs(Lo,{className:"sm:max-w-md bg-azure-surface dark:bg-black border-azure-border dark:border-matrix-primary/30",children:[g.jsx(ta,{children:g.jsx(na,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:a})}),g.jsx("div",{className:"py-4",children:g.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary",children:o})}),g.jsxs(MD,{className:"flex flex-col sm:flex-row gap-3 sm:justify-end",children:[g.jsx(tr,{variant:"outline",onClick:t,className:"dark:border-matrix-primary/30 dark:text-matrix-secondary dark:hover:bg-matrix-primary/20",children:"Cancel"}),g.jsx(tr,{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 cL=()=>{const[e,t]=z.useState([]),[n,a]=z.useState(null),[o,u]=z.useState([]),[l,d]=z.useState(!1),[f,h]=z.useState(!0),[p,x]=z.useState({isOpen:!1,title:"",description:"",onConfirm:()=>{}}),b=async()=>{try{const _=await hi.getSessions();t(_)}catch(_){console.error("Failed to load sessions:",_)}};z.useEffect(()=>{b()},[]),z.useEffect(()=>{n?v(n):u([])},[n]);const v=async _=>{try{const P=await hi.getMessages(_);u(P.filter(D=>D.type!=="system"&&D.type!=="tool"))}catch(P){console.error("Failed to load messages:",P)}},w=async()=>{try{const _=await hi.createSession();await b(),a(_.id)}catch(_){console.error("Failed to create session:",_)}},E=async _=>{if(!n)return;const P={type:"human",content:_};u(D=>[...D,P]),d(!0);try{await hi.sendMessage(n,_),await v(n),await b()}catch(D){console.error("Failed to send message:",D)}finally{d(!1)}},N=_=>{x({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 hi.archiveSession(_),n===_&&a(null),await b()}catch(P){console.error("Failed to archive session:",P)}}})},j=_=>{x({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 hi.deleteSession(_),n===_&&a(null),await b()}catch(P){console.error("Failed to delete session:",P)}}})},A=async(_,P)=>{try{await hi.renameSession(_,P),await b()}catch(D){console.error("Failed to rename session:",D)}};return g.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-gray-50 dark:bg-zinc-950",children:[g.jsx(VD,{sessions:e,activeSessionId:n,onSelectSession:a,onCreateSession:w,onArchiveSession:N,onDeleteSession:j,onRenameSession:A,isOpen:f,toggleSidebar:()=>h(!f)}),g.jsx("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:g.jsx(sL,{messages:o,onSendMessage:E,isLoading:l,activeSessionId:n})}),g.jsx(uL,{isOpen:p.isOpen,onClose:()=>x(_=>({..._,isOpen:!1})),onConfirm:p.onConfirm,title:p.title,description:p.description,confirmJson:p.confirmJson,variant:p.variant})]})};function ja({title:e,description:t,children:n}){return g.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:[g.jsxs("div",{className:"mb-4",children:[g.jsx("h3",{className:"text-lg font-medium text-azure-text-primary dark:text-matrix-highlight",children:e}),t&&g.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mt-1",children:t})]}),g.jsx("div",{className:"space-y-4",children:n})]})}const dL=(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},fL=(e,t)=>({classGroupId:e,validator:t}),C_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Vc="-",Ck=[],hL="arbitrary..",mL=e=>{const t=gL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return pL(l);const d=l.split(Vc),f=d[0]===""&&d.length>1?1:0;return j_(d,f,t)},getConflictingClassGroupIds:(l,d)=>{if(d){const f=a[l],h=n[l];return f?h?dL(h,f):f:h||Ck}return n[l]||Ck}}},j_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],u=n.nextPart.get(o);if(u){const h=j_(e,t+1,u);if(h)return h}const l=n.validators;if(l===null)return;const d=t===0?e.join(Vc):e.slice(t).join(Vc),f=l.length;for(let h=0;h<f;h++){const p=l[h];if(p.validator(d))return p.classGroupId}},pL=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?hL+a:void 0})(),gL=e=>{const{theme:t,classGroups:n}=e;return yL(n,t)},yL=(e,t)=>{const n=C_();for(const a in e){const o=e[a];Ug(o,n,a,t)}return n},Ug=(e,t,n,a)=>{const o=e.length;for(let u=0;u<o;u++){const l=e[u];xL(l,t,n,a)}},xL=(e,t,n,a)=>{if(typeof e=="string"){bL(e,t,n);return}if(typeof e=="function"){vL(e,t,n,a);return}kL(e,t,n,a)},bL=(e,t,n)=>{const a=e===""?t:N_(t,e);a.classGroupId=n},vL=(e,t,n,a)=>{if(SL(e)){Ug(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(fL(n,e))},kL=(e,t,n,a)=>{const o=Object.entries(e),u=o.length;for(let l=0;l<u;l++){const[d,f]=o[l];Ug(f,N_(t,d),n,a)}},N_=(e,t)=>{let n=e;const a=t.split(Vc),o=a.length;for(let u=0;u<o;u++){const l=a[u];let d=n.nextPart.get(l);d||(d=C_(),n.nextPart.set(l,d)),n=d}return n},SL=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wL=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)}}},wp="!",jk=":",zL=[],Nk=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),_L=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const u=[];let l=0,d=0,f=0,h;const p=o.length;for(let E=0;E<p;E++){const N=o[E];if(l===0&&d===0){if(N===jk){u.push(o.slice(f,E)),f=E+1;continue}if(N==="/"){h=E;continue}}N==="["?l++:N==="]"?l--:N==="("?d++:N===")"&&d--}const x=u.length===0?o:o.slice(f);let b=x,v=!1;x.endsWith(wp)?(b=x.slice(0,-1),v=!0):x.startsWith(wp)&&(b=x.slice(1),v=!0);const w=h&&h>f?h-f:void 0;return Nk(u,v,b,w)};if(t){const o=t+jk,u=a;a=l=>l.startsWith(o)?u(l.slice(o.length)):Nk(zL,!1,l,void 0,!0)}if(n){const o=a;a=u=>n({className:u,parseClassName:o})}return a},TL=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}},EL=e=>({cache:wL(e.cacheSize),parseClassName:_L(e),sortModifiers:TL(e),...mL(e)}),CL=/\s+/,jL=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:u}=t,l=[],d=e.trim().split(CL);let f="";for(let h=d.length-1;h>=0;h-=1){const p=d[h],{isExternal:x,modifiers:b,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:E}=n(p);if(x){f=p+(f.length>0?" "+f:f);continue}let N=!!E,j=a(N?w.substring(0,E):w);if(!j){if(!N){f=p+(f.length>0?" "+f:f);continue}if(j=a(w),!j){f=p+(f.length>0?" "+f:f);continue}N=!1}const A=b.length===0?"":b.length===1?b[0]:u(b).join(":"),_=v?A+wp:A,P=_+j;if(l.indexOf(P)>-1)continue;l.push(P);const D=o(j,N);for(let L=0;L<D.length;++L){const G=D[L];l.push(_+G)}f=p+(f.length>0?" "+f:f)}return f},NL=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=A_(n))&&(o&&(o+=" "),o+=a);return o},A_=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=A_(e[a]))&&(n&&(n+=" "),n+=t);return n},AL=(e,...t)=>{let n,a,o,u;const l=f=>{const h=t.reduce((p,x)=>x(p),e());return n=EL(h),a=n.cache.get,o=n.cache.set,u=d,d(f)},d=f=>{const h=a(f);if(h)return h;const p=jL(f,n);return o(f,p),p};return u=l,(...f)=>u(NL(...f))},OL=[],It=e=>{const t=n=>n[e]||OL;return t.isThemeGetter=!0,t},O_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RL=/^\d+\/\d+$/,ML=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DL=/\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$/,$L=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xo=e=>RL.test(e),Oe=e=>!!e&&!Number.isNaN(Number(e)),Na=e=>!!e&&Number.isInteger(Number(e)),xm=e=>e.endsWith("%")&&Oe(e.slice(0,-1)),Gr=e=>ML.test(e),PL=()=>!0,VL=e=>DL.test(e)&&!$L.test(e),M_=()=>!1,ZL=e=>LL.test(e),BL=e=>UL.test(e),IL=e=>!he(e)&&!me(e),HL=e=>Xo(e,L_,M_),he=e=>O_.test(e),mi=e=>Xo(e,U_,VL),bm=e=>Xo(e,XL,Oe),Ak=e=>Xo(e,D_,M_),FL=e=>Xo(e,$_,BL),cc=e=>Xo(e,P_,ZL),me=e=>R_.test(e),Ws=e=>Ko(e,U_),qL=e=>Ko(e,KL),Ok=e=>Ko(e,D_),GL=e=>Ko(e,L_),YL=e=>Ko(e,$_),dc=e=>Ko(e,P_,!0),Xo=(e,t,n)=>{const a=O_.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ko=(e,t,n=!1)=>{const a=R_.exec(e);return a?a[1]?t(a[1]):n:!1},D_=e=>e==="position"||e==="percentage",$_=e=>e==="image"||e==="url",L_=e=>e==="length"||e==="size"||e==="bg-size",U_=e=>e==="length",XL=e=>e==="number",KL=e=>e==="family-name",P_=e=>e==="shadow",JL=()=>{const e=It("color"),t=It("font"),n=It("text"),a=It("font-weight"),o=It("tracking"),u=It("leading"),l=It("breakpoint"),d=It("container"),f=It("spacing"),h=It("radius"),p=It("shadow"),x=It("inset-shadow"),b=It("text-shadow"),v=It("drop-shadow"),w=It("blur"),E=It("perspective"),N=It("aspect"),j=It("ease"),A=It("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...P(),me,he],L=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],Z=()=>[me,he,f],J=()=>[xo,"full","auto",...Z()],ce=()=>[Na,"none","subgrid",me,he],$=()=>["auto",{span:["full",Na,me,he]},Na,me,he],ie=()=>[Na,"auto",me,he],te=()=>["auto","min","max","fr",me,he],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...Z()],X=()=>[xo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],B=()=>[e,me,he],de=()=>[...P(),Ok,Ak,{position:[me,he]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",GL,HL,{size:[me,he]}],Y=()=>[xm,Ws,mi],T=()=>["","none","full",h,me,he],se=()=>["",Oe,Ws,mi],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=()=>[Oe,xm,Ok,Ak],Ye=()=>["","none",w,me,he],De=()=>["none",Oe,me,he],Nt=()=>["none",Oe,me,he],sn=()=>[Oe,me,he],Vn=()=>[xo,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gr],breakpoint:[Gr],color:[PL],container:[Gr],"drop-shadow":[Gr],ease:["in","out","in-out"],font:[IL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gr],shadow:[Gr],spacing:["px",Oe],text:[Gr],"text-shadow":[Gr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xo,he,me,N]}],container:["container"],columns:[{columns:[Oe,he,me,d]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:J()}],"inset-x":[{"inset-x":J()}],"inset-y":[{"inset-y":J()}],start:[{start:J()}],end:[{end:J()}],top:[{top:J()}],right:[{right:J()}],bottom:[{bottom:J()}],left:[{left:J()}],visibility:["visible","invisible","collapse"],z:[{z:[Na,"auto",me,he]}],basis:[{basis:[xo,"full","auto",d,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Oe,xo,"auto","initial","none",he]}],grow:[{grow:["",Oe,me,he]}],shrink:[{shrink:["",Oe,me,he]}],order:[{order:[Na,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":ce()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":ce()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[d,"screen",...X()]}],"min-w":[{"min-w":[d,"screen","none",...X()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[l]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,Ws,mi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,me,bm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xm,he]}],"font-family":[{font:[qL,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":[Oe,"none",me,bm]}],leading:[{leading:[u,...Z()]}],"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:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Oe,"from-font","auto",me,mi]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Oe,"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:Z()}],"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:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Na,me,he],radial:["",me,he],conic:[Na,me,he]},YL,FL]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],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:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Oe,me,he]}],"outline-w":[{outline:["",Oe,Ws,mi]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",p,dc,cc]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",x,dc,cc]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Oe,mi]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",b,dc,cc]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Oe,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":[Oe]}],"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":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"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":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"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":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"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":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"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":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"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":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"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":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"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":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[Oe]}],"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":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"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:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,he]}],filter:[{filter:["","none",me,he]}],blur:[{blur:Ye()}],brightness:[{brightness:[Oe,me,he]}],contrast:[{contrast:[Oe,me,he]}],"drop-shadow":[{"drop-shadow":["","none",v,dc,cc]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Oe,me,he]}],"hue-rotate":[{"hue-rotate":[Oe,me,he]}],invert:[{invert:["",Oe,me,he]}],saturate:[{saturate:[Oe,me,he]}],sepia:[{sepia:["",Oe,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[Oe,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Oe,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Oe,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Oe,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Oe,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Oe,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Oe,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Oe,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"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:[Oe,"initial",me,he]}],ease:[{ease:["linear","initial",j,me,he]}],delay:[{delay:[Oe,me,he]}],animate:[{animate:["none",A,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,me,he]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Nt()}],"scale-x":[{"scale-x":Nt()}],"scale-y":[{"scale-y":Nt()}],"scale-z":[{"scale-z":Nt()}],"scale-3d":["scale-3d"],skew:[{skew:sn()}],"skew-x":[{"skew-x":sn()}],"skew-y":[{"skew-y":sn()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Vn()}],"translate-x":[{"translate-x":Vn()}],"translate-y":[{"translate-y":Vn()}],"translate-z":[{"translate-z":Vn()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"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":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",...B()]}],"stroke-w":[{stroke:[Oe,Ws,mi,bm]}],stroke:[{stroke:["none",...B()]}],"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"]}},Ro=AL(JL);function Yt({label:e,error:t,helperText:n,className:a,...o}){return g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),g.jsx("input",{className:Ro("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&&g.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&g.jsx("p",{className:"text-xs text-red-500",children:t})]})}function el({label:e,options:t,error:n,helperText:a,className:o,...u}){return g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),g.jsx("select",{className:Ro("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=>g.jsx("option",{value:l.value,className:"bg-azure-bg dark:bg-matrix-base",children:l.label},l.value))}),a&&!n&&g.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:a}),n&&g.jsx("p",{className:"text-xs text-red-500",children:n})]})}function Aa({label:e,error:t,helperText:n,className:a,...o}){return g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),g.jsx("input",{type:"number",className:Ro("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&&g.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&g.jsx("p",{className:"text-xs text-red-500",children:t})]})}function tl({label:e,checked:t,onChange:n,helperText:a,disabled:o}){return g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex flex-col",children:[g.jsx("span",{className:Ro("text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",o&&"opacity-50"),children:e}),a&&g.jsx("span",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:a})]}),g.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>!o&&n(!t),className:Ro("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:g.jsx("span",{className:Ro("inline-block h-4 w-4 transform rounded-full bg-white dark:bg-black transition-transform",t?"translate-x-6":"translate-x-1")})})]})}const bo={fetchConfig:async()=>Pe.get("/config"),updateConfig:async e=>Pe.post("/config",e),getSatiConfig:async()=>Pe.get("/config/sati"),updateSatiConfig:async e=>Pe.post("/config/sati",e),deleteSatiConfig:async()=>Pe.delete("/config/sati"),getApocConfig:async()=>Pe.get("/config/apoc"),updateApocConfig:async e=>Pe.post("/config/apoc",e),deleteApocConfig:async()=>Pe.delete("/config/apoc")};function W(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,p=Object.keys(h);for(let x=0;x<p.length;x++){const b=p[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 p of h._zod.deferred)p();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 Mo=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},V_=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};const Z_={};function Pa(e){return Z_}function B_(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 zp(e,t){return typeof t=="bigint"?t.toString():t}function id(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Pg(e){return e==null}function Vg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function QL(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 Rk=Symbol("evaluating");function Ge(e,t,n){let a;Object.defineProperty(e,t,{get(){if(a!==Rk)return a===void 0&&(a=Rk,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 Ia(...e){const t={};for(const n of e){const a=Object.getOwnPropertyDescriptors(n);Object.assign(t,a)}return Object.defineProperties({},t)}function Mk(e){return JSON.stringify(e)}function WL(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const I_="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function zl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const e9=id(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Uo(e){if(zl(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(zl(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function H_(e){return Uo(e)?{...e}:Array.isArray(e)?[...e]:e}const t9=new Set(["string","number","symbol"]);function Po(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ha(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 n9(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const r9={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 a9(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=Ia(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 Ha(e,u)}function i9(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=Ia(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 Ha(e,u)}function o9(e,t){if(!Uo(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=Ia(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return Ci(this,"shape",u),u}});return Ha(e,o)}function s9(e,t){if(!Uo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ia(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Ci(this,"shape",a),a}});return Ha(e,n)}function l9(e,t){const n=Ia(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 Ha(e,n)}function u9(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=Ia(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 Ha(t,l)}function c9(e,t,n){const a=Ia(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 Ha(t,a)}function To(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 Eo(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function fc(e){return typeof e=="string"?e:e?.message}function Va(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const o=fc(e.inst?._zod.def?.error?.(e))??fc(t?.error?.(e))??fc(n.customError?.(e))??fc(n.localeError?.(e))??"Invalid input";a.message=o}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function Zg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function _l(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const F_=(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,zp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},q_=W("$ZodError",F_),G_=W("$ZodError",F_,{Parent:Error});function d9(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 f9(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 Bg=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 Mo;if(l.issues.length){const d=new(o?.Err??e)(l.issues.map(f=>Va(f,u,Pa())));throw I_(d,o?.callee),d}return l.value},Ig=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=>Va(f,u,Pa())));throw I_(d,o?.callee),d}return l.value},od=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 Mo;return u.issues.length?{success:!1,error:new(e??q_)(u.issues.map(l=>Va(l,o,Pa())))}:{success:!0,data:u.value}},h9=od(G_),sd=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=>Va(l,o,Pa())))}:{success:!0,data:u.value}},m9=sd(G_),p9=e=>(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Bg(e)(t,n,o)},g9=e=>(t,n,a)=>Bg(e)(t,n,a),y9=e=>async(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Ig(e)(t,n,o)},x9=e=>async(t,n,a)=>Ig(e)(t,n,a),b9=e=>(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return od(e)(t,n,o)},v9=e=>(t,n,a)=>od(e)(t,n,a),k9=e=>async(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return sd(e)(t,n,o)},S9=e=>async(t,n,a)=>sd(e)(t,n,a),w9=/^[cC][^\s-]{8,}$/,z9=/^[0-9a-z]+$/,_9=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,T9=/^[0-9a-vA-V]{20}$/,E9=/^[A-Za-z0-9]{27}$/,C9=/^[a-zA-Z0-9_-]{21}$/,j9=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,N9=/^([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})$/,Dk=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)$/,A9=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,O9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function R9(){return new RegExp(O9,"u")}const M9=/^(?:(?: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])$/,D9=/^(([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}|:))$/,$9=/^((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])$/,L9=/^(([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])$/,U9=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Y_=/^[A-Za-z0-9_-]*$/,P9=/^\+[1-9]\d{6,14}$/,X_="(?:(?:\\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])))",V9=new RegExp(`^${X_}$`);function K_(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 Z9(e){return new RegExp(`^${K_(e)}$`)}function B9(e){const t=K_({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(`^${X_}T(?:${a})$`)}const I9=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},H9=/^-?\d+$/,J_=/^-?\d+(?:\.\d+)?$/,F9=/^(?:true|false)$/i,q9=/^[^A-Z]*$/,G9=/^[^a-z]*$/,En=W("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Q_={number:"number",bigint:"bigint",object:"date"},W_=W("$ZodCheckLessThan",(e,t)=>{En.init(e,t);const n=Q_[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})}}),e2=W("$ZodCheckGreaterThan",(e,t)=>{En.init(e,t);const n=Q_[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})}}),Y9=W("$ZodCheckMultipleOf",(e,t)=>{En.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):QL(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})}}),X9=W("$ZodCheckNumberFormat",(e,t)=>{En.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),a=n?"int":"number",[o,u]=r9[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=H9)}),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})}}),K9=W("$ZodCheckMaxLength",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Pg(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=Zg(o);a.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),J9=W("$ZodCheckMinLength",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Pg(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=Zg(o);a.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Q9=W("$ZodCheckLengthEquals",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Pg(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=Zg(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})}}),ld=W("$ZodCheckStringFormat",(e,t)=>{var n,a;En.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=()=>{})}),W9=W("$ZodCheckRegex",(e,t)=>{ld.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})}}),eU=W("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=q9),ld.init(e,t)}),tU=W("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=G9),ld.init(e,t)}),nU=W("$ZodCheckIncludes",(e,t)=>{En.init(e,t);const n=Po(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})}}),rU=W("$ZodCheckStartsWith",(e,t)=>{En.init(e,t);const n=new RegExp(`^${Po(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})}}),aU=W("$ZodCheckEndsWith",(e,t)=>{En.init(e,t);const n=new RegExp(`.*${Po(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})}}),iU=W("$ZodCheckOverwrite",(e,t)=>{En.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});let oU=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 sU={major:4,minor:3,patch:6},bt=W("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sU;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=To(l),p;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 Mo;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,l.issues.length!==b&&(h||(h=To(l,b)))});else{if(l.issues.length===b)continue;h||(h=To(l,b))}}return p?p.then(()=>l):l},u=(l,d,f)=>{if(To(l))return l.aborted=!0,l;const h=o(d,a,f);if(h instanceof Promise){if(f.async===!1)throw new Mo;return h.then(p=>e._zod.parse(p,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(p=>u(p,l,d)):u(h,l,d)}const f=e._zod.parse(l,d);if(f instanceof Promise){if(d.async===!1)throw new Mo;return f.then(h=>o(h,a,d))}return o(f,a,d)}}Ge(e,"~standard",()=>({validate:o=>{try{const u=h9(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return m9(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Hg=W("$ZodString",(e,t)=>{bt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??I9(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}}),gt=W("$ZodStringFormat",(e,t)=>{ld.init(e,t),Hg.init(e,t)}),lU=W("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=N9),gt.init(e,t)}),uU=W("$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=Dk(a))}else t.pattern??(t.pattern=Dk());gt.init(e,t)}),cU=W("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=A9),gt.init(e,t)}),dU=W("$ZodURL",(e,t)=>{gt.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})}}}),fU=W("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=R9()),gt.init(e,t)}),hU=W("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=C9),gt.init(e,t)}),mU=W("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=w9),gt.init(e,t)}),pU=W("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=z9),gt.init(e,t)}),gU=W("$ZodULID",(e,t)=>{t.pattern??(t.pattern=_9),gt.init(e,t)}),yU=W("$ZodXID",(e,t)=>{t.pattern??(t.pattern=T9),gt.init(e,t)}),xU=W("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=E9),gt.init(e,t)}),bU=W("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=B9(t)),gt.init(e,t)}),vU=W("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=V9),gt.init(e,t)}),kU=W("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Z9(t)),gt.init(e,t)}),SU=W("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=j9),gt.init(e,t)}),wU=W("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=M9),gt.init(e,t),e._zod.bag.format="ipv4"}),zU=W("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=D9),gt.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})}}}),_U=W("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=$9),gt.init(e,t)}),TU=W("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=L9),gt.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 t2(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const EU=W("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=U9),gt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{t2(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function CU(e){if(!Y_.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return t2(n)}const jU=W("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Y_),gt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{CU(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),NU=W("$ZodE164",(e,t)=>{t.pattern??(t.pattern=P9),gt.init(e,t)});function AU(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 OU=W("$ZodJWT",(e,t)=>{gt.init(e,t),e._zod.check=n=>{AU(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),n2=W("$ZodNumber",(e,t)=>{bt.init(e,t),e._zod.pattern=e._zod.bag.pattern??J_,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}}),RU=W("$ZodNumberFormat",(e,t)=>{X9.init(e,t),n2.init(e,t)}),MU=W("$ZodBoolean",(e,t)=>{bt.init(e,t),e._zod.pattern=F9,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}}),DU=W("$ZodUnknown",(e,t)=>{bt.init(e,t),e._zod.parse=n=>n}),$U=W("$ZodNever",(e,t)=>{bt.init(e,t),e._zod.parse=(n,a)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function $k(e,t,n){e.issues.length&&t.issues.push(...Eo(n,e.issues)),t.value[n]=e.value}const LU=W("$ZodArray",(e,t)=>{bt.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=>$k(h,n,l))):$k(f,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Zc(e,t,n,a,o){if(e.issues.length){if(o&&!(n in a))return;t.issues.push(...Eo(n,e.issues))}e.value===void 0?n in a&&(t.value[n]=void 0):t.value[n]=e.value}function r2(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=n9(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function a2(e,t,n,a,o,u){const l=[],d=o.keySet,f=o.catchall._zod,h=f.def.type,p=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=>Zc(v,n,x,t,p))):Zc(b,n,x,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const UU=W("$ZodObject",(e,t)=>{if(bt.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=id(()=>r2(t));Ge(e._zod,"propValues",()=>{const d=t.shape,f={};for(const h in d){const p=d[h]._zod;if(p.values){f[h]??(f[h]=new Set);for(const x of p.values)f[h].add(x)}}return f});const o=zl,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 p=[],x=l.shape;for(const b of l.keys){const v=x[b],w=v._zod.optout==="optional",E=v._zod.run({value:h[b],issues:[]},f);E instanceof Promise?p.push(E.then(N=>Zc(N,d,b,h,w))):Zc(E,d,b,h,w)}return u?a2(p,h,d,f,a.value,e):p.length?Promise.all(p).then(()=>d):d}}),PU=W("$ZodObjectJIT",(e,t)=>{UU.init(e,t);const n=e._zod.parse,a=id(()=>r2(t)),o=b=>{const v=new oU(["shape","payload","ctx"]),w=a.value,E=_=>{const P=Mk(_);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};v.write("const input = payload.value;");const N=Object.create(null);let j=0;for(const _ of w.keys)N[_]=`key_${j++}`;v.write("const newResult = {};");for(const _ of w.keys){const P=N[_],D=Mk(_),G=b[_]?._zod?.optout==="optional";v.write(`const ${P} = ${E(_)};`),G?v.write(`
35
+ if (${P}.issues.length) {
36
+ if (${D} in input) {
37
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
38
+ ...iss,
39
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
40
+ })));
41
+ }
42
+ }
43
+
44
+ if (${P}.value === undefined) {
45
+ if (${D} in input) {
46
+ newResult[${D}] = undefined;
47
+ }
48
+ } else {
49
+ newResult[${D}] = ${P}.value;
50
+ }
51
+
52
+ `):v.write(`
53
+ if (${P}.issues.length) {
54
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
55
+ ...iss,
56
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
57
+ })));
58
+ }
59
+
60
+ if (${P}.value === undefined) {
61
+ if (${D} in input) {
62
+ newResult[${D}] = undefined;
63
+ }
64
+ } else {
65
+ newResult[${D}] = ${P}.value;
66
+ }
67
+
68
+ `)}v.write("payload.value = newResult;"),v.write("return payload;");const A=v.compile();return(_,P)=>A(b,_,P)};let u;const l=zl,d=!Z_.jitless,h=d&&e9.value,p=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),p?a2([],w,b,v,x,e):b):n(b,v):(b.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),b)}});function Lk(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=>!To(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=>Va(l,a,Pa())))}),t)}const i2=W("$ZodUnion",(e,t)=>{bt.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=>Vg(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=>Lk(f,o,e,u)):Lk(d,o,e,u)}}),VU=W("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,i2.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=id(()=>{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(!zl(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)}}),ZU=W("$ZodIntersection",(e,t)=>{bt.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])=>Uk(n,f,h)):Uk(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(Uo(e)&&Uo(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 Uk(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}),To(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 BU=W("$ZodRecord",(e,t)=>{bt.init(e,t),e._zod.parse=(n,a)=>{const o=n.value;if(!Uo(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 p=t.valueType._zod.run({value:o[h],issues:[]},a);p instanceof Promise?u.push(p.then(x=>{x.issues.length&&n.issues.push(...Eo(h,x.issues)),n.value[h]=x.value})):(p.issues.length&&n.issues.push(...Eo(h,p.issues)),n.value[h]=p.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"&&J_.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=>Va(x,a,Pa())),input:d,path:[d],inst:e});continue}const p=t.valueType._zod.run({value:o[d],issues:[]},a);p instanceof Promise?u.push(p.then(x=>{x.issues.length&&n.issues.push(...Eo(d,x.issues)),n.value[f.value]=x.value})):(p.issues.length&&n.issues.push(...Eo(d,p.issues)),n.value[f.value]=p.value)}}return u.length?Promise.all(u).then(()=>n):n}}),IU=W("$ZodEnum",(e,t)=>{bt.init(e,t);const n=B_(t.entries),a=new Set(n);e._zod.values=a,e._zod.pattern=new RegExp(`^(${n.filter(o=>t9.has(typeof o)).map(o=>typeof o=="string"?Po(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}}),HU=W("$ZodLiteral",(e,t)=>{if(bt.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"?Po(a):a?Po(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}}),FU=W("$ZodTransform",(e,t)=>{bt.init(e,t),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new V_(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 Mo;return n.value=o,n}});function Pk(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const o2=W("$ZodOptional",(e,t)=>{bt.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(`^(${Vg(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=>Pk(u,n.value)):Pk(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,a)}}),qU=W("$ZodExactOptional",(e,t)=>{o2.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)}),GU=W("$ZodNullable",(e,t)=>{bt.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(`^(${Vg(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)}),YU=W("$ZodDefault",(e,t)=>{bt.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=>Vk(u,t)):Vk(o,t)}});function Vk(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const XU=W("$ZodPrefault",(e,t)=>{bt.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))}),KU=W("$ZodNonOptional",(e,t)=>{bt.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=>Zk(u,e)):Zk(o,e)}});function Zk(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 JU=W("$ZodCatch",(e,t)=>{bt.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=>Va(l,a,Pa()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>Va(u,a,Pa()))},input:n.value}),n.issues=[]),n)}}),QU=W("$ZodPipe",(e,t)=>{bt.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=>hc(l,t.in,a)):hc(u,t.in,a)}const o=t.in._zod.run(n,a);return o instanceof Promise?o.then(u=>hc(u,t.out,a)):hc(o,t.out,a)}});function hc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const WU=W("$ZodReadonly",(e,t)=>{bt.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(Bk):Bk(o)}});function Bk(e){return e.value=Object.freeze(e.value),e}const eP=W("$ZodCustom",(e,t)=>{En.init(e,t),bt.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=>Ik(u,n,a,e));Ik(o,n,a,e)}});function Ik(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(_l(o))}}var Hk;let tP=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 nP(){return new tP}(Hk=globalThis).__zod_globalRegistry??(Hk.__zod_globalRegistry=nP());const al=globalThis.__zod_globalRegistry;function rP(e,t){return new e({type:"string",...ke(t)})}function aP(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ke(t)})}function Fk(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ke(t)})}function iP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ke(t)})}function oP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ke(t)})}function sP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ke(t)})}function lP(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ke(t)})}function uP(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ke(t)})}function cP(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ke(t)})}function dP(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ke(t)})}function fP(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ke(t)})}function hP(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ke(t)})}function mP(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ke(t)})}function pP(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ke(t)})}function gP(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ke(t)})}function yP(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ke(t)})}function xP(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ke(t)})}function bP(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ke(t)})}function vP(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ke(t)})}function kP(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ke(t)})}function SP(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ke(t)})}function wP(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ke(t)})}function zP(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ke(t)})}function _P(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ke(t)})}function TP(e,t){return new e({type:"string",format:"date",check:"string_format",...ke(t)})}function EP(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ke(t)})}function CP(e,t){return new e({type:"string",format:"duration",check:"string_format",...ke(t)})}function jP(e,t){return new e({type:"number",checks:[],...ke(t)})}function NP(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ke(t)})}function AP(e,t){return new e({type:"boolean",...ke(t)})}function OP(e){return new e({type:"unknown"})}function RP(e,t){return new e({type:"never",...ke(t)})}function qk(e,t){return new W_({check:"less_than",...ke(t),value:e,inclusive:!1})}function vm(e,t){return new W_({check:"less_than",...ke(t),value:e,inclusive:!0})}function Gk(e,t){return new e2({check:"greater_than",...ke(t),value:e,inclusive:!1})}function km(e,t){return new e2({check:"greater_than",...ke(t),value:e,inclusive:!0})}function Yk(e,t){return new Y9({check:"multiple_of",...ke(t),value:e})}function s2(e,t){return new K9({check:"max_length",...ke(t),maximum:e})}function Bc(e,t){return new J9({check:"min_length",...ke(t),minimum:e})}function l2(e,t){return new Q9({check:"length_equals",...ke(t),length:e})}function MP(e,t){return new W9({check:"string_format",format:"regex",...ke(t),pattern:e})}function DP(e){return new eU({check:"string_format",format:"lowercase",...ke(e)})}function $P(e){return new tU({check:"string_format",format:"uppercase",...ke(e)})}function LP(e,t){return new nU({check:"string_format",format:"includes",...ke(t),includes:e})}function UP(e,t){return new rU({check:"string_format",format:"starts_with",...ke(t),prefix:e})}function PP(e,t){return new aU({check:"string_format",format:"ends_with",...ke(t),suffix:e})}function Jo(e){return new iU({check:"overwrite",tx:e})}function VP(e){return Jo(t=>t.normalize(e))}function ZP(){return Jo(e=>e.trim())}function BP(){return Jo(e=>e.toLowerCase())}function IP(){return Jo(e=>e.toUpperCase())}function HP(){return Jo(e=>WL(e))}function FP(e,t,n){return new e({type:"array",element:t,...ke(n)})}function qP(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ke(n)})}function GP(e){const t=YP(n=>(n.addIssue=a=>{if(typeof a=="string")n.issues.push(_l(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(_l(o))}},e(n.value,n)));return t}function YP(e,t){const n=new En({check:"custom",...ke(t)});return n._zod.check=e,n}function u2(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??al,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 Lt(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 p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);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,p)}const x=e._zod.parent;x&&(l.ref||(l.ref=x),Lt(x,t,p),t.seen.get(x).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(l.schema,f),t.io==="input"&&dn(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 c2(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}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},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 p=d.schema;for(const x in p)delete p[x];p.$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 d2(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},p=d.ref;if(d.ref=null,p){a(p);const b=e.seen.get(p),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===p)for(const E in f)E==="$ref"||E==="allOf"||E in h||delete f[E];if(v.$ref&&b.def)for(const E in f)E==="$ref"||E==="allOf"||E in b.def&&JSON.stringify(f[E])===JSON.stringify(b.def[E])&&delete f[E]}const x=l._zod.parent;if(x&&x!==p){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:Ic(t,"input",e.processors),output:Ic(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function dn(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 dn(a.element,n);if(a.type==="set")return dn(a.valueType,n);if(a.type==="lazy")return dn(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 dn(a.innerType,n);if(a.type==="intersection")return dn(a.left,n)||dn(a.right,n);if(a.type==="record"||a.type==="map")return dn(a.keyType,n)||dn(a.valueType,n);if(a.type==="pipe")return dn(a.in,n)||dn(a.out,n);if(a.type==="object"){for(const o in a.shape)if(dn(a.shape[o],n))return!0;return!1}if(a.type==="union"){for(const o of a.options)if(dn(o,n))return!0;return!1}if(a.type==="tuple"){for(const o of a.items)if(dn(o,n))return!0;return!!(a.rest&&dn(a.rest,n))}return!1}const XP=(e,t={})=>n=>{const a=u2({...n,processors:t});return Lt(e,a),c2(a,e),d2(a,e)},Ic=(e,t,n={})=>a=>{const{libraryOptions:o,target:u}=a??{},l=u2({...o??{},target:u,io:t,processors:n});return Lt(e,l),c2(l,e),d2(l,e)},KP={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},JP=(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=KP[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),h&&(o.contentEncoding=h),f&&f.size>0){const p=[...f];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(x=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},QP=(e,t,n,a)=>{const o=n,{minimum:u,maximum:l,format:d,multipleOf:f,exclusiveMaximum:h,exclusiveMinimum:p}=e._zod.bag;typeof d=="string"&&d.includes("int")?o.type="integer":o.type="number",typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p),typeof u=="number"&&(o.minimum=u,typeof p=="number"&&t.target!=="draft-04"&&(p>=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)},WP=(e,t,n,a)=>{n.type="boolean"},e8=(e,t,n,a)=>{n.not={}},t8=(e,t,n,a)=>{},n8=(e,t,n,a)=>{const o=e._zod.def,u=B_(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},r8=(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},a8=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},i8=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},o8=(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=Lt(u.element,t,{...a,path:[...a.path,"items"]})},s8=(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]=Lt(l[h],t,{...a,path:[...a.path,"properties",h]});const d=new Set(Object.keys(l)),f=new Set([...d].filter(h=>{const p=u.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.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=Lt(u.catchall,t,{...a,path:[...a.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},l8=(e,t,n,a)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((d,f)=>Lt(d,t,{...a,path:[...a.path,u?"oneOf":"anyOf",f]}));u?n.oneOf=l:n.anyOf=l},u8=(e,t,n,a)=>{const o=e._zod.def,u=Lt(o.left,t,{...a,path:[...a.path,"allOf",0]}),l=Lt(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},c8=(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 p=Lt(u.valueType,t,{...a,path:[...a.path,"patternProperties","*"]});o.patternProperties={};for(const x of f)o.patternProperties[x.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Lt(u.keyType,t,{...a,path:[...a.path,"propertyNames"]})),o.additionalProperties=Lt(u.valueType,t,{...a,path:[...a.path,"additionalProperties"]});const h=l._zod.values;if(h){const p=[...h].filter(x=>typeof x=="string"||typeof x=="number");p.length>0&&(o.required=p)}},d8=(e,t,n,a)=>{const o=e._zod.def,u=Lt(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"}]},f8=(e,t,n,a)=>{const o=e._zod.def;Lt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},h8=(e,t,n,a)=>{const o=e._zod.def;Lt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},m8=(e,t,n,a)=>{const o=e._zod.def;Lt(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)))},p8=(e,t,n,a)=>{const o=e._zod.def;Lt(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},g8=(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;Lt(u,t,a);const l=t.seen.get(e);l.ref=u},y8=(e,t,n,a)=>{const o=e._zod.def;Lt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},f2=(e,t,n,a)=>{const o=e._zod.def;Lt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},x8=W("ZodISODateTime",(e,t)=>{bU.init(e,t),kt.init(e,t)});function b8(e){return _P(x8,e)}const v8=W("ZodISODate",(e,t)=>{vU.init(e,t),kt.init(e,t)});function k8(e){return TP(v8,e)}const S8=W("ZodISOTime",(e,t)=>{kU.init(e,t),kt.init(e,t)});function w8(e){return EP(S8,e)}const z8=W("ZodISODuration",(e,t)=>{SU.init(e,t),kt.init(e,t)});function _8(e){return CP(z8,e)}const T8=(e,t)=>{q_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>f9(e,n)},flatten:{value:n=>d9(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,zp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,zp,2)}},isEmpty:{get(){return e.issues.length===0}}})},ir=W("ZodError",T8,{Parent:Error}),E8=Bg(ir),C8=Ig(ir),j8=od(ir),N8=sd(ir),A8=p9(ir),O8=g9(ir),R8=y9(ir),M8=x9(ir),D8=b9(ir),$8=v9(ir),L8=k9(ir),U8=S9(ir),vt=W("ZodType",(e,t)=>(bt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ic(e,"input"),output:Ic(e,"output")}}),e.toJSONSchema=XP(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ia(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)=>Ha(e,n,a),e.brand=()=>e,e.register=((n,a)=>(n.add(e,a),e)),e.parse=(n,a)=>E8(e,n,a,{callee:e.parse}),e.safeParse=(n,a)=>j8(e,n,a),e.parseAsync=async(n,a)=>C8(e,n,a,{callee:e.parseAsync}),e.safeParseAsync=async(n,a)=>N8(e,n,a),e.spa=e.safeParseAsync,e.encode=(n,a)=>A8(e,n,a),e.decode=(n,a)=>O8(e,n,a),e.encodeAsync=async(n,a)=>R8(e,n,a),e.decodeAsync=async(n,a)=>M8(e,n,a),e.safeEncode=(n,a)=>D8(e,n,a),e.safeDecode=(n,a)=>$8(e,n,a),e.safeEncodeAsync=async(n,a)=>L8(e,n,a),e.safeDecodeAsync=async(n,a)=>U8(e,n,a),e.refine=(n,a)=>e.check(OV(n,a)),e.superRefine=n=>e.check(RV(n)),e.overwrite=n=>e.check(Jo(n)),e.optional=()=>Wk(e),e.exactOptional=()=>bV(e),e.nullable=()=>eS(e),e.nullish=()=>Wk(eS(e)),e.nonoptional=n=>_V(e,n),e.array=()=>Tl(e),e.or=n=>g2([e,n]),e.and=n=>hV(e,n),e.transform=n=>tS(e,yV(n)),e.default=n=>SV(e,n),e.prefault=n=>zV(e,n),e.catch=n=>EV(e,n),e.pipe=n=>tS(e,n),e.readonly=()=>NV(e),e.describe=n=>{const a=e.clone();return al.add(a,{description:n}),a},Object.defineProperty(e,"description",{get(){return al.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return al.get(e);const a=e.clone();return al.add(a,n[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),h2=W("_ZodString",(e,t)=>{Hg.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>JP(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(MP(...a)),e.includes=(...a)=>e.check(LP(...a)),e.startsWith=(...a)=>e.check(UP(...a)),e.endsWith=(...a)=>e.check(PP(...a)),e.min=(...a)=>e.check(Bc(...a)),e.max=(...a)=>e.check(s2(...a)),e.length=(...a)=>e.check(l2(...a)),e.nonempty=(...a)=>e.check(Bc(1,...a)),e.lowercase=a=>e.check(DP(a)),e.uppercase=a=>e.check($P(a)),e.trim=()=>e.check(ZP()),e.normalize=(...a)=>e.check(VP(...a)),e.toLowerCase=()=>e.check(BP()),e.toUpperCase=()=>e.check(IP()),e.slugify=()=>e.check(HP())}),P8=W("ZodString",(e,t)=>{Hg.init(e,t),h2.init(e,t),e.email=n=>e.check(aP(V8,n)),e.url=n=>e.check(uP(Z8,n)),e.jwt=n=>e.check(zP(nV,n)),e.emoji=n=>e.check(cP(B8,n)),e.guid=n=>e.check(Fk(Xk,n)),e.uuid=n=>e.check(iP(mc,n)),e.uuidv4=n=>e.check(oP(mc,n)),e.uuidv6=n=>e.check(sP(mc,n)),e.uuidv7=n=>e.check(lP(mc,n)),e.nanoid=n=>e.check(dP(I8,n)),e.guid=n=>e.check(Fk(Xk,n)),e.cuid=n=>e.check(fP(H8,n)),e.cuid2=n=>e.check(hP(F8,n)),e.ulid=n=>e.check(mP(q8,n)),e.base64=n=>e.check(kP(W8,n)),e.base64url=n=>e.check(SP(eV,n)),e.xid=n=>e.check(pP(G8,n)),e.ksuid=n=>e.check(gP(Y8,n)),e.ipv4=n=>e.check(yP(X8,n)),e.ipv6=n=>e.check(xP(K8,n)),e.cidrv4=n=>e.check(bP(J8,n)),e.cidrv6=n=>e.check(vP(Q8,n)),e.e164=n=>e.check(wP(tV,n)),e.datetime=n=>e.check(b8(n)),e.date=n=>e.check(k8(n)),e.time=n=>e.check(w8(n)),e.duration=n=>e.check(_8(n))});function nt(e){return rP(P8,e)}const kt=W("ZodStringFormat",(e,t)=>{gt.init(e,t),h2.init(e,t)}),V8=W("ZodEmail",(e,t)=>{cU.init(e,t),kt.init(e,t)}),Xk=W("ZodGUID",(e,t)=>{lU.init(e,t),kt.init(e,t)}),mc=W("ZodUUID",(e,t)=>{uU.init(e,t),kt.init(e,t)}),Z8=W("ZodURL",(e,t)=>{dU.init(e,t),kt.init(e,t)}),B8=W("ZodEmoji",(e,t)=>{fU.init(e,t),kt.init(e,t)}),I8=W("ZodNanoID",(e,t)=>{hU.init(e,t),kt.init(e,t)}),H8=W("ZodCUID",(e,t)=>{mU.init(e,t),kt.init(e,t)}),F8=W("ZodCUID2",(e,t)=>{pU.init(e,t),kt.init(e,t)}),q8=W("ZodULID",(e,t)=>{gU.init(e,t),kt.init(e,t)}),G8=W("ZodXID",(e,t)=>{yU.init(e,t),kt.init(e,t)}),Y8=W("ZodKSUID",(e,t)=>{xU.init(e,t),kt.init(e,t)}),X8=W("ZodIPv4",(e,t)=>{wU.init(e,t),kt.init(e,t)}),K8=W("ZodIPv6",(e,t)=>{zU.init(e,t),kt.init(e,t)}),J8=W("ZodCIDRv4",(e,t)=>{_U.init(e,t),kt.init(e,t)}),Q8=W("ZodCIDRv6",(e,t)=>{TU.init(e,t),kt.init(e,t)}),W8=W("ZodBase64",(e,t)=>{EU.init(e,t),kt.init(e,t)}),eV=W("ZodBase64URL",(e,t)=>{jU.init(e,t),kt.init(e,t)}),tV=W("ZodE164",(e,t)=>{NU.init(e,t),kt.init(e,t)}),nV=W("ZodJWT",(e,t)=>{OU.init(e,t),kt.init(e,t)}),m2=W("ZodNumber",(e,t)=>{n2.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>QP(e,a,o),e.gt=(a,o)=>e.check(Gk(a,o)),e.gte=(a,o)=>e.check(km(a,o)),e.min=(a,o)=>e.check(km(a,o)),e.lt=(a,o)=>e.check(qk(a,o)),e.lte=(a,o)=>e.check(vm(a,o)),e.max=(a,o)=>e.check(vm(a,o)),e.int=a=>e.check(Kk(a)),e.safe=a=>e.check(Kk(a)),e.positive=a=>e.check(Gk(0,a)),e.nonnegative=a=>e.check(km(0,a)),e.negative=a=>e.check(qk(0,a)),e.nonpositive=a=>e.check(vm(0,a)),e.multipleOf=(a,o)=>e.check(Yk(a,o)),e.step=(a,o)=>e.check(Yk(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 Da(e){return jP(m2,e)}const rV=W("ZodNumberFormat",(e,t)=>{RU.init(e,t),m2.init(e,t)});function Kk(e){return NP(rV,e)}const aV=W("ZodBoolean",(e,t)=>{MU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>WP(e,n,a)});function wi(e){return AP(aV,e)}const iV=W("ZodUnknown",(e,t)=>{DU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>t8()});function Jk(){return OP(iV)}const oV=W("ZodNever",(e,t)=>{$U.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>e8(e,n,a)});function sV(e){return RP(oV,e)}const lV=W("ZodArray",(e,t)=>{LU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>o8(e,n,a,o),e.element=t.element,e.min=(n,a)=>e.check(Bc(n,a)),e.nonempty=n=>e.check(Bc(1,n)),e.max=(n,a)=>e.check(s2(n,a)),e.length=(n,a)=>e.check(l2(n,a)),e.unwrap=()=>e.element});function Tl(e,t){return FP(lV,e,t)}const uV=W("ZodObject",(e,t)=>{PU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>s8(e,n,a,o),Ge(e,"shape",()=>t.shape),e.keyof=()=>ud(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Jk()}),e.loose=()=>e.clone({...e._zod.def,catchall:Jk()}),e.strict=()=>e.clone({...e._zod.def,catchall:sV()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>o9(e,n),e.safeExtend=n=>s9(e,n),e.merge=n=>l9(e,n),e.pick=n=>a9(e,n),e.omit=n=>i9(e,n),e.partial=(...n)=>u9(y2,e,n[0]),e.required=(...n)=>c9(x2,e,n[0])});function Ln(e,t){const n={type:"object",shape:e??{},...ke(t)};return new uV(n)}const p2=W("ZodUnion",(e,t)=>{i2.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>l8(e,n,a,o),e.options=t.options});function g2(e,t){return new p2({type:"union",options:e,...ke(t)})}const cV=W("ZodDiscriminatedUnion",(e,t)=>{p2.init(e,t),VU.init(e,t)});function dV(e,t,n){return new cV({type:"union",options:t,discriminator:e,...ke(n)})}const fV=W("ZodIntersection",(e,t)=>{ZU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>u8(e,n,a,o)});function hV(e,t){return new fV({type:"intersection",left:e,right:t})}const mV=W("ZodRecord",(e,t)=>{BU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>c8(e,n,a,o),e.keyType=t.keyType,e.valueType=t.valueType});function Cc(e,t,n){return new mV({type:"record",keyType:e,valueType:t,...ke(n)})}const Tp=W("ZodEnum",(e,t)=>{IU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>n8(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 Tp({...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 Tp({...t,checks:[],...ke(o),entries:u})}});function ud(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new Tp({type:"enum",entries:n,...ke(t)})}const pV=W("ZodLiteral",(e,t)=>{HU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>r8(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 Qk(e,t){return new pV({type:"literal",values:Array.isArray(e)?e:[e],...ke(t)})}const gV=W("ZodTransform",(e,t)=>{FU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>i8(e,n),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new V_(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(_l(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(_l(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function yV(e){return new gV({type:"transform",transform:e})}const y2=W("ZodOptional",(e,t)=>{o2.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>f2(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function Wk(e){return new y2({type:"optional",innerType:e})}const xV=W("ZodExactOptional",(e,t)=>{qU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>f2(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function bV(e){return new xV({type:"optional",innerType:e})}const vV=W("ZodNullable",(e,t)=>{GU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>d8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function eS(e){return new vV({type:"nullable",innerType:e})}const kV=W("ZodDefault",(e,t)=>{YU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>h8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function SV(e,t){return new kV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():H_(t)}})}const wV=W("ZodPrefault",(e,t)=>{XU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>m8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function zV(e,t){return new wV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():H_(t)}})}const x2=W("ZodNonOptional",(e,t)=>{KU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>f8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function _V(e,t){return new x2({type:"nonoptional",innerType:e,...ke(t)})}const TV=W("ZodCatch",(e,t)=>{JU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>p8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function EV(e,t){return new TV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const CV=W("ZodPipe",(e,t)=>{QU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>g8(e,n,a,o),e.in=t.in,e.out=t.out});function tS(e,t){return new CV({type:"pipe",in:e,out:t})}const jV=W("ZodReadonly",(e,t)=>{WU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>y8(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function NV(e){return new jV({type:"readonly",innerType:e})}const AV=W("ZodCustom",(e,t)=>{eP.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>a8(e,n)});function OV(e,t={}){return qP(AV,e,t)}function RV(e){return GP(e)}const mt={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},llm:{provider:"openai",model:"gpt-4",temperature:.7,context_window:100},channels:{telegram:{enabled:!1,allowedUsers:[]},discord:{enabled:!1}},ui:{enabled:!0,port:3333}},MV=Ln({provider:ud(["google","openai","openrouter","ollama"]).default(mt.audio.provider),model:nt().min(1).default(mt.audio.model),enabled:wi().default(mt.audio.enabled),apiKey:nt().optional(),base_url:nt().optional(),maxDurationSeconds:Da().default(mt.audio.maxDurationSeconds),supportedMimeTypes:Tl(nt()).default(mt.audio.supportedMimeTypes)}),Fg=Ln({provider:ud(["openai","anthropic","openrouter","ollama","gemini"]).default(mt.llm.provider),model:nt().min(1).default(mt.llm.model),temperature:Da().min(0).max(1).default(mt.llm.temperature),max_tokens:Da().int().positive().optional(),api_key:nt().optional(),base_url:nt().optional(),context_window:Da().int().positive().optional()}),DV=Fg.extend({memory_limit:Da().int().positive().optional(),enabled_archived_sessions:wi().default(!0)}),$V=Fg.extend({working_dir:nt().optional(),timeout_ms:Da().int().positive().optional()}),LV=Ln({telegram_notify_all:wi().optional()}).optional(),UV=Ln({agent:Ln({name:nt().default(mt.agent.name),personality:nt().default(mt.agent.personality)}).default(mt.agent),llm:Fg.default(mt.llm),sati:DV.optional(),apoc:$V.optional(),webhooks:LV,audio:MV.default(mt.audio),memory:Ln({limit:Da().int().positive().optional()}).default(mt.memory),channels:Ln({telegram:Ln({enabled:wi().default(!1),token:nt().optional(),allowedUsers:Tl(nt()).default([])}).default(mt.channels.telegram),discord:Ln({enabled:wi().default(!1),token:nt().optional()}).default(mt.channels.discord)}).default(mt.channels),ui:Ln({enabled:wi().default(mt.ui.enabled),port:Da().default(mt.ui.port)}).default(mt.ui),logging:Ln({enabled:wi().default(mt.logging.enabled),level:ud(["debug","info","warn","error"]).default(mt.logging.level),retention:nt().default(mt.logging.retention)}).default(mt.logging)}),PV=dV("transport",[Ln({transport:Qk("stdio"),command:nt().min(1,"Command is required for stdio transport"),args:Tl(nt()).optional().default([]),env:Cc(nt(),nt()).optional().default({}),_comment:nt().optional()}),Ln({transport:Qk("http"),url:nt().url("Valid URL is required for http transport"),headers:Cc(nt(),nt()).optional().default({}),args:Tl(nt()).optional().default([]),env:Cc(nt(),nt()).optional().default({}),_comment:nt().optional()})]);Cc(nt(),g2([PV,nt()]));function ae(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,p=Object.keys(h);for(let x=0;x<p.length;x++){const b=p[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 p of h._zod.deferred)p();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 Do extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class b2 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const v2={};function _i(e){return v2}function k2(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 Ep(e,t){return typeof t=="bigint"?t.toString():t}function qg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Gg(e){return e==null}function Yg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const nS=Symbol("evaluating");function Je(e,t,n){let a;Object.defineProperty(e,t,{get(){if(a!==nS)return a===void 0&&(a=nS,a=n()),a},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ji(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Fa(...e){const t={};for(const n of e){const a=Object.getOwnPropertyDescriptors(n);Object.assign(t,a)}return Object.defineProperties({},t)}function rS(e){return JSON.stringify(e)}function VV(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const S2="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const ZV=qg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function El(e){if(Hc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Hc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function w2(e){return El(e)?{...e}:Array.isArray(e)?[...e]:e}const BV=new Set(["string","number","symbol"]);function Vo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qa(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function Ee(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 IV(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function HV(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=Fa(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 ji(this,"shape",l),l},checks:[]});return qa(e,u)}function FV(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=Fa(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 ji(this,"shape",l),l},checks:[]});return qa(e,u)}function qV(e,t){if(!El(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=Fa(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return ji(this,"shape",u),u}});return qa(e,o)}function GV(e,t){if(!El(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Fa(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return ji(this,"shape",a),a}});return qa(e,n)}function YV(e,t){const n=Fa(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return ji(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:[]});return qa(e,n)}function XV(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=Fa(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 ji(this,"shape",f),f},checks:[]});return qa(t,l)}function KV(e,t,n){const a=Fa(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 ji(this,"shape",u),u}});return qa(t,a)}function Co(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 z2(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function pc(e){return typeof e=="string"?e:e?.message}function Ti(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const o=pc(e.inst?._zod.def?.error?.(e))??pc(t?.error?.(e))??pc(n.customError?.(e))??pc(n.localeError?.(e))??"Invalid input";a.message=o}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function Xg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Cl(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const _2=(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,Ep,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},T2=ae("$ZodError",_2),E2=ae("$ZodError",_2,{Parent:Error});function JV(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 QV(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 Kg=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 Do;if(l.issues.length){const d=new(o?.Err??e)(l.issues.map(f=>Ti(f,u,_i())));throw S2(d,o?.callee),d}return l.value},Jg=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=>Ti(f,u,_i())));throw S2(d,o?.callee),d}return l.value},cd=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 Do;return u.issues.length?{success:!1,error:new(e??T2)(u.issues.map(l=>Ti(l,o,_i())))}:{success:!0,data:u.value}},WV=cd(E2),dd=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=>Ti(l,o,_i())))}:{success:!0,data:u.value}},eZ=dd(E2),tZ=e=>(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Kg(e)(t,n,o)},nZ=e=>(t,n,a)=>Kg(e)(t,n,a),rZ=e=>async(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Jg(e)(t,n,o)},aZ=e=>async(t,n,a)=>Jg(e)(t,n,a),iZ=e=>(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return cd(e)(t,n,o)},oZ=e=>(t,n,a)=>cd(e)(t,n,a),sZ=e=>async(t,n,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return dd(e)(t,n,o)},lZ=e=>async(t,n,a)=>dd(e)(t,n,a),uZ=/^[cC][^\s-]{8,}$/,cZ=/^[0-9a-z]+$/,dZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fZ=/^[0-9a-vA-V]{20}$/,hZ=/^[A-Za-z0-9]{27}$/,mZ=/^[a-zA-Z0-9_-]{21}$/,pZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gZ=/^([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})$/,aS=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)$/,yZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,xZ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bZ(){return new RegExp(xZ,"u")}const vZ=/^(?:(?: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])$/,kZ=/^(([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}|:))$/,SZ=/^((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])$/,wZ=/^(([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])$/,zZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,C2=/^[A-Za-z0-9_-]*$/,_Z=/^\+[1-9]\d{6,14}$/,j2="(?:(?:\\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])))",TZ=new RegExp(`^${j2}$`);function N2(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 EZ(e){return new RegExp(`^${N2(e)}$`)}function CZ(e){const t=N2({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(`^${j2}T(?:${a})$`)}const jZ=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},NZ=/^[^A-Z]*$/,AZ=/^[^a-z]*$/,Cr=ae("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),OZ=ae("$ZodCheckMaxLength",(e,t)=>{var n;Cr.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Gg(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=Xg(o);a.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),RZ=ae("$ZodCheckMinLength",(e,t)=>{var n;Cr.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Gg(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=Xg(o);a.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),MZ=ae("$ZodCheckLengthEquals",(e,t)=>{var n;Cr.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Gg(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=Xg(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})}}),fd=ae("$ZodCheckStringFormat",(e,t)=>{var n,a;Cr.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=()=>{})}),DZ=ae("$ZodCheckRegex",(e,t)=>{fd.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})}}),$Z=ae("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=NZ),fd.init(e,t)}),LZ=ae("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=AZ),fd.init(e,t)}),UZ=ae("$ZodCheckIncludes",(e,t)=>{Cr.init(e,t);const n=Vo(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})}}),PZ=ae("$ZodCheckStartsWith",(e,t)=>{Cr.init(e,t);const n=new RegExp(`^${Vo(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})}}),VZ=ae("$ZodCheckEndsWith",(e,t)=>{Cr.init(e,t);const n=new RegExp(`.*${Vo(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})}}),ZZ=ae("$ZodCheckOverwrite",(e,t)=>{Cr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class BZ{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 IZ={major:4,minor:3,patch:6},Ut=ae("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=IZ;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=Co(l),p;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 Do;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,l.issues.length!==b&&(h||(h=Co(l,b)))});else{if(l.issues.length===b)continue;h||(h=Co(l,b))}}return p?p.then(()=>l):l},u=(l,d,f)=>{if(Co(l))return l.aborted=!0,l;const h=o(d,a,f);if(h instanceof Promise){if(f.async===!1)throw new Do;return h.then(p=>e._zod.parse(p,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(p=>u(p,l,d)):u(h,l,d)}const f=e._zod.parse(l,d);if(f instanceof Promise){if(d.async===!1)throw new Do;return f.then(h=>o(h,a,d))}return o(f,a,d)}}Je(e,"~standard",()=>({validate:o=>{try{const u=WV(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return eZ(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Qg=ae("$ZodString",(e,t)=>{Ut.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??jZ(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=ae("$ZodStringFormat",(e,t)=>{fd.init(e,t),Qg.init(e,t)}),HZ=ae("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gZ),yt.init(e,t)}),FZ=ae("$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=aS(a))}else t.pattern??(t.pattern=aS());yt.init(e,t)}),qZ=ae("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=yZ),yt.init(e,t)}),GZ=ae("$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})}}}),YZ=ae("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=bZ()),yt.init(e,t)}),XZ=ae("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=mZ),yt.init(e,t)}),KZ=ae("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=uZ),yt.init(e,t)}),JZ=ae("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=cZ),yt.init(e,t)}),QZ=ae("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dZ),yt.init(e,t)}),WZ=ae("$ZodXID",(e,t)=>{t.pattern??(t.pattern=fZ),yt.init(e,t)}),eB=ae("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=hZ),yt.init(e,t)}),tB=ae("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=CZ(t)),yt.init(e,t)}),nB=ae("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=TZ),yt.init(e,t)}),rB=ae("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=EZ(t)),yt.init(e,t)}),aB=ae("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=pZ),yt.init(e,t)}),iB=ae("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=vZ),yt.init(e,t),e._zod.bag.format="ipv4"}),oB=ae("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kZ),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})}}}),sB=ae("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=SZ),yt.init(e,t)}),lB=ae("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wZ),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 A2(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const uB=ae("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=zZ),yt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{A2(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function cB(e){if(!C2.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return A2(n)}const dB=ae("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=C2),yt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{cB(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),fB=ae("$ZodE164",(e,t)=>{t.pattern??(t.pattern=_Z),yt.init(e,t)});function hB(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 mB=ae("$ZodJWT",(e,t)=>{yt.init(e,t),e._zod.check=n=>{hB(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),pB=ae("$ZodUnknown",(e,t)=>{Ut.init(e,t),e._zod.parse=n=>n}),gB=ae("$ZodNever",(e,t)=>{Ut.init(e,t),e._zod.parse=(n,a)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function iS(e,t,n){e.issues.length&&t.issues.push(...z2(n,e.issues)),t.value[n]=e.value}const yB=ae("$ZodArray",(e,t)=>{Ut.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=>iS(h,n,l))):iS(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(...z2(n,e.issues))}e.value===void 0?n in a&&(t.value[n]=void 0):t.value[n]=e.value}function O2(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=IV(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function R2(e,t,n,a,o,u){const l=[],d=o.keySet,f=o.catchall._zod,h=f.def.type,p=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,p))):Fc(b,n,x,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const xB=ae("$ZodObject",(e,t)=>{if(Ut.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=qg(()=>O2(t));Je(e._zod,"propValues",()=>{const d=t.shape,f={};for(const h in d){const p=d[h]._zod;if(p.values){f[h]??(f[h]=new Set);for(const x of p.values)f[h].add(x)}}return f});const o=Hc,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 p=[],x=l.shape;for(const b of l.keys){const v=x[b],w=v._zod.optout==="optional",E=v._zod.run({value:h[b],issues:[]},f);E instanceof Promise?p.push(E.then(N=>Fc(N,d,b,h,w))):Fc(E,d,b,h,w)}return u?R2(p,h,d,f,a.value,e):p.length?Promise.all(p).then(()=>d):d}}),bB=ae("$ZodObjectJIT",(e,t)=>{xB.init(e,t);const n=e._zod.parse,a=qg(()=>O2(t)),o=b=>{const v=new BZ(["shape","payload","ctx"]),w=a.value,E=_=>{const P=rS(_);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};v.write("const input = payload.value;");const N=Object.create(null);let j=0;for(const _ of w.keys)N[_]=`key_${j++}`;v.write("const newResult = {};");for(const _ of w.keys){const P=N[_],D=rS(_),G=b[_]?._zod?.optout==="optional";v.write(`const ${P} = ${E(_)};`),G?v.write(`
73
+ if (${P}.issues.length) {
74
+ if (${D} in input) {
75
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
76
+ ...iss,
77
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
78
+ })));
79
+ }
80
+ }
81
+
82
+ if (${P}.value === undefined) {
83
+ if (${D} in input) {
84
+ newResult[${D}] = undefined;
85
+ }
86
+ } else {
87
+ newResult[${D}] = ${P}.value;
88
+ }
89
+
90
+ `):v.write(`
91
+ if (${P}.issues.length) {
92
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
93
+ ...iss,
94
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
95
+ })));
96
+ }
97
+
98
+ if (${P}.value === undefined) {
99
+ if (${D} in input) {
100
+ newResult[${D}] = undefined;
101
+ }
102
+ } else {
103
+ newResult[${D}] = ${P}.value;
104
+ }
105
+
106
+ `)}v.write("payload.value = newResult;"),v.write("return payload;");const A=v.compile();return(_,P)=>A(b,_,P)};let u;const l=Hc,d=!v2.jitless,h=d&&ZV.value,p=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),p?R2([],w,b,v,x,e):b):n(b,v):(b.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),b)}});function oS(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=>!Co(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=>Ti(l,a,_i())))}),t)}const vB=ae("$ZodUnion",(e,t)=>{Ut.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=>Yg(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=>oS(f,o,e,u)):oS(d,o,e,u)}}),kB=ae("$ZodIntersection",(e,t)=>{Ut.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])=>sS(n,f,h)):sS(n,u,l)}});function Cp(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(El(e)&&El(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=Cp(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=Cp(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 sS(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}),Co(e))return e;const l=Cp(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 SB=ae("$ZodEnum",(e,t)=>{Ut.init(e,t);const n=k2(t.entries),a=new Set(n);e._zod.values=a,e._zod.pattern=new RegExp(`^(${n.filter(o=>BV.has(typeof o)).map(o=>typeof o=="string"?Vo(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}}),wB=ae("$ZodLiteral",(e,t)=>{if(Ut.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"?Vo(a):a?Vo(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}}),zB=ae("$ZodTransform",(e,t)=>{Ut.init(e,t),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new b2(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 Do;return n.value=o,n}});function lS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const M2=ae("$ZodOptional",(e,t)=>{Ut.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(`^(${Yg(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=>lS(u,n.value)):lS(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,a)}}),_B=ae("$ZodExactOptional",(e,t)=>{M2.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)}),TB=ae("$ZodNullable",(e,t)=>{Ut.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(`^(${Yg(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)}),EB=ae("$ZodDefault",(e,t)=>{Ut.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=>uS(u,t)):uS(o,t)}});function uS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const CB=ae("$ZodPrefault",(e,t)=>{Ut.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))}),jB=ae("$ZodNonOptional",(e,t)=>{Ut.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=>cS(u,e)):cS(o,e)}});function cS(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 NB=ae("$ZodCatch",(e,t)=>{Ut.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=>Ti(l,a,_i()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>Ti(u,a,_i()))},input:n.value}),n.issues=[]),n)}}),AB=ae("$ZodPipe",(e,t)=>{Ut.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=>gc(l,t.in,a)):gc(u,t.in,a)}const o=t.in._zod.run(n,a);return o instanceof Promise?o.then(u=>gc(u,t.out,a)):gc(o,t.out,a)}});function gc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const OB=ae("$ZodReadonly",(e,t)=>{Ut.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(dS):dS(o)}});function dS(e){return e.value=Object.freeze(e.value),e}const RB=ae("$ZodCustom",(e,t)=>{Cr.init(e,t),Ut.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=>fS(u,n,a,e));fS(o,n,a,e)}});function fS(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(Cl(o))}}var hS;class MB{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 DB(){return new MB}(hS=globalThis).__zod_globalRegistry??(hS.__zod_globalRegistry=DB());const il=globalThis.__zod_globalRegistry;function $B(e,t){return new e({type:"string",...Ee(t)})}function LB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ee(t)})}function mS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ee(t)})}function UB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ee(t)})}function PB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ee(t)})}function VB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ee(t)})}function ZB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ee(t)})}function BB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ee(t)})}function IB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ee(t)})}function HB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ee(t)})}function FB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ee(t)})}function qB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ee(t)})}function GB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ee(t)})}function YB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ee(t)})}function XB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ee(t)})}function KB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ee(t)})}function JB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ee(t)})}function QB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ee(t)})}function WB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ee(t)})}function eI(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ee(t)})}function tI(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ee(t)})}function nI(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ee(t)})}function rI(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ee(t)})}function aI(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ee(t)})}function iI(e,t){return new e({type:"string",format:"date",check:"string_format",...Ee(t)})}function oI(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ee(t)})}function sI(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ee(t)})}function lI(e){return new e({type:"unknown"})}function uI(e,t){return new e({type:"never",...Ee(t)})}function D2(e,t){return new OZ({check:"max_length",...Ee(t),maximum:e})}function qc(e,t){return new RZ({check:"min_length",...Ee(t),minimum:e})}function $2(e,t){return new MZ({check:"length_equals",...Ee(t),length:e})}function cI(e,t){return new DZ({check:"string_format",format:"regex",...Ee(t),pattern:e})}function dI(e){return new $Z({check:"string_format",format:"lowercase",...Ee(e)})}function fI(e){return new LZ({check:"string_format",format:"uppercase",...Ee(e)})}function hI(e,t){return new UZ({check:"string_format",format:"includes",...Ee(t),includes:e})}function mI(e,t){return new PZ({check:"string_format",format:"starts_with",...Ee(t),prefix:e})}function pI(e,t){return new VZ({check:"string_format",format:"ends_with",...Ee(t),suffix:e})}function Qo(e){return new ZZ({check:"overwrite",tx:e})}function gI(e){return Qo(t=>t.normalize(e))}function yI(){return Qo(e=>e.trim())}function xI(){return Qo(e=>e.toLowerCase())}function bI(){return Qo(e=>e.toUpperCase())}function vI(){return Qo(e=>VV(e))}function kI(e,t,n){return new e({type:"array",element:t,...Ee(n)})}function SI(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ee(n)})}function wI(e){const t=zI(n=>(n.addIssue=a=>{if(typeof a=="string")n.issues.push(Cl(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(Cl(o))}},e(n.value,n)));return t}function zI(e,t){const n=new Cr({check:"custom",...Ee(t)});return n._zod.check=e,n}function L2(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??il,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 p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);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,p)}const x=e._zod.parent;x&&(l.ref||(l.ref=x),tn(x,t,p),t.seen.get(x).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(l.schema,f),t.io==="input"&&fn(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 U2(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}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},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 p=d.schema;for(const x in p)delete p[x];p.$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 P2(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},p=d.ref;if(d.ref=null,p){a(p);const b=e.seen.get(p),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===p)for(const E in f)E==="$ref"||E==="allOf"||E in h||delete f[E];if(v.$ref&&b.def)for(const E in f)E==="$ref"||E==="allOf"||E in b.def&&JSON.stringify(f[E])===JSON.stringify(b.def[E])&&delete f[E]}const x=l._zod.parent;if(x&&x!==p){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 fn(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 fn(a.element,n);if(a.type==="set")return fn(a.valueType,n);if(a.type==="lazy")return fn(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 fn(a.innerType,n);if(a.type==="intersection")return fn(a.left,n)||fn(a.right,n);if(a.type==="record"||a.type==="map")return fn(a.keyType,n)||fn(a.valueType,n);if(a.type==="pipe")return fn(a.in,n)||fn(a.out,n);if(a.type==="object"){for(const o in a.shape)if(fn(a.shape[o],n))return!0;return!1}if(a.type==="union"){for(const o of a.options)if(fn(o,n))return!0;return!1}if(a.type==="tuple"){for(const o of a.items)if(fn(o,n))return!0;return!!(a.rest&&fn(a.rest,n))}return!1}const _I=(e,t={})=>n=>{const a=L2({...n,processors:t});return tn(e,a),U2(a,e),P2(a,e)},Gc=(e,t,n={})=>a=>{const{libraryOptions:o,target:u}=a??{},l=L2({...o??{},target:u,io:t,processors:n});return tn(e,l),U2(l,e),P2(l,e)},TI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},EI=(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=TI[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),h&&(o.contentEncoding=h),f&&f.size>0){const p=[...f];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(x=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},CI=(e,t,n,a)=>{n.not={}},jI=(e,t,n,a)=>{},NI=(e,t,n,a)=>{const o=e._zod.def,u=k2(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},AI=(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},OI=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},RI=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},MI=(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"]})},DI=(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 p=u.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.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)},$I=(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},LI=(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},UI=(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"}]},PI=(e,t,n,a)=>{const o=e._zod.def;tn(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},VI=(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))},ZI=(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)))},BI=(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},II=(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},HI=(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},V2=(e,t,n,a)=>{const o=e._zod.def;tn(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},FI=ae("ZodISODateTime",(e,t)=>{tB.init(e,t),St.init(e,t)});function qI(e){return aI(FI,e)}const GI=ae("ZodISODate",(e,t)=>{nB.init(e,t),St.init(e,t)});function YI(e){return iI(GI,e)}const XI=ae("ZodISOTime",(e,t)=>{rB.init(e,t),St.init(e,t)});function KI(e){return oI(XI,e)}const JI=ae("ZodISODuration",(e,t)=>{aB.init(e,t),St.init(e,t)});function QI(e){return sI(JI,e)}const Z2=(e,t)=>{T2.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>QV(e,n)},flatten:{value:n=>JV(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ep,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ep,2)}},isEmpty:{get(){return e.issues.length===0}}})},WI=ae("ZodError",Z2),or=ae("ZodError",Z2,{Parent:Error}),e7=Kg(or),t7=Jg(or),n7=cd(or),r7=dd(or),a7=tZ(or),i7=nZ(or),o7=rZ(or),s7=aZ(or),l7=iZ(or),u7=oZ(or),c7=sZ(or),d7=lZ(or),Pt=ae("ZodType",(e,t)=>(Ut.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Gc(e,"input"),output:Gc(e,"output")}}),e.toJSONSchema=_I(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Fa(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)=>qa(e,n,a),e.brand=()=>e,e.register=((n,a)=>(n.add(e,a),e)),e.parse=(n,a)=>e7(e,n,a,{callee:e.parse}),e.safeParse=(n,a)=>n7(e,n,a),e.parseAsync=async(n,a)=>t7(e,n,a,{callee:e.parseAsync}),e.safeParseAsync=async(n,a)=>r7(e,n,a),e.spa=e.safeParseAsync,e.encode=(n,a)=>a7(e,n,a),e.decode=(n,a)=>i7(e,n,a),e.encodeAsync=async(n,a)=>o7(e,n,a),e.decodeAsync=async(n,a)=>s7(e,n,a),e.safeEncode=(n,a)=>l7(e,n,a),e.safeDecode=(n,a)=>u7(e,n,a),e.safeEncodeAsync=async(n,a)=>c7(e,n,a),e.safeDecodeAsync=async(n,a)=>d7(e,n,a),e.refine=(n,a)=>e.check(aH(n,a)),e.superRefine=n=>e.check(iH(n)),e.overwrite=n=>e.check(Qo(n)),e.optional=()=>xS(e),e.exactOptional=()=>F7(e),e.nullable=()=>bS(e),e.nullish=()=>xS(bS(e)),e.nonoptional=n=>J7(e,n),e.array=()=>M7(e),e.or=n=>I2([e,n]),e.and=n=>P7(e,n),e.transform=n=>vS(e,I7(n)),e.default=n=>Y7(e,n),e.prefault=n=>K7(e,n),e.catch=n=>W7(e,n),e.pipe=n=>vS(e,n),e.readonly=()=>nH(e),e.describe=n=>{const a=e.clone();return il.add(a,{description:n}),a},Object.defineProperty(e,"description",{get(){return il.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return il.get(e);const a=e.clone();return il.add(a,n[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),B2=ae("_ZodString",(e,t)=>{Qg.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>EI(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(cI(...a)),e.includes=(...a)=>e.check(hI(...a)),e.startsWith=(...a)=>e.check(mI(...a)),e.endsWith=(...a)=>e.check(pI(...a)),e.min=(...a)=>e.check(qc(...a)),e.max=(...a)=>e.check(D2(...a)),e.length=(...a)=>e.check($2(...a)),e.nonempty=(...a)=>e.check(qc(1,...a)),e.lowercase=a=>e.check(dI(a)),e.uppercase=a=>e.check(fI(a)),e.trim=()=>e.check(yI()),e.normalize=(...a)=>e.check(gI(...a)),e.toLowerCase=()=>e.check(xI()),e.toUpperCase=()=>e.check(bI()),e.slugify=()=>e.check(vI())}),f7=ae("ZodString",(e,t)=>{Qg.init(e,t),B2.init(e,t),e.email=n=>e.check(LB(h7,n)),e.url=n=>e.check(BB(m7,n)),e.jwt=n=>e.check(rI(j7,n)),e.emoji=n=>e.check(IB(p7,n)),e.guid=n=>e.check(mS(pS,n)),e.uuid=n=>e.check(UB(yc,n)),e.uuidv4=n=>e.check(PB(yc,n)),e.uuidv6=n=>e.check(VB(yc,n)),e.uuidv7=n=>e.check(ZB(yc,n)),e.nanoid=n=>e.check(HB(g7,n)),e.guid=n=>e.check(mS(pS,n)),e.cuid=n=>e.check(FB(y7,n)),e.cuid2=n=>e.check(qB(x7,n)),e.ulid=n=>e.check(GB(b7,n)),e.base64=n=>e.check(eI(T7,n)),e.base64url=n=>e.check(tI(E7,n)),e.xid=n=>e.check(YB(v7,n)),e.ksuid=n=>e.check(XB(k7,n)),e.ipv4=n=>e.check(KB(S7,n)),e.ipv6=n=>e.check(JB(w7,n)),e.cidrv4=n=>e.check(QB(z7,n)),e.cidrv6=n=>e.check(WB(_7,n)),e.e164=n=>e.check(nI(C7,n)),e.datetime=n=>e.check(qI(n)),e.date=n=>e.check(YI(n)),e.time=n=>e.check(KI(n)),e.duration=n=>e.check(QI(n))});function Sm(e){return $B(f7,e)}const St=ae("ZodStringFormat",(e,t)=>{yt.init(e,t),B2.init(e,t)}),h7=ae("ZodEmail",(e,t)=>{qZ.init(e,t),St.init(e,t)}),pS=ae("ZodGUID",(e,t)=>{HZ.init(e,t),St.init(e,t)}),yc=ae("ZodUUID",(e,t)=>{FZ.init(e,t),St.init(e,t)}),m7=ae("ZodURL",(e,t)=>{GZ.init(e,t),St.init(e,t)}),p7=ae("ZodEmoji",(e,t)=>{YZ.init(e,t),St.init(e,t)}),g7=ae("ZodNanoID",(e,t)=>{XZ.init(e,t),St.init(e,t)}),y7=ae("ZodCUID",(e,t)=>{KZ.init(e,t),St.init(e,t)}),x7=ae("ZodCUID2",(e,t)=>{JZ.init(e,t),St.init(e,t)}),b7=ae("ZodULID",(e,t)=>{QZ.init(e,t),St.init(e,t)}),v7=ae("ZodXID",(e,t)=>{WZ.init(e,t),St.init(e,t)}),k7=ae("ZodKSUID",(e,t)=>{eB.init(e,t),St.init(e,t)}),S7=ae("ZodIPv4",(e,t)=>{iB.init(e,t),St.init(e,t)}),w7=ae("ZodIPv6",(e,t)=>{oB.init(e,t),St.init(e,t)}),z7=ae("ZodCIDRv4",(e,t)=>{sB.init(e,t),St.init(e,t)}),_7=ae("ZodCIDRv6",(e,t)=>{lB.init(e,t),St.init(e,t)}),T7=ae("ZodBase64",(e,t)=>{uB.init(e,t),St.init(e,t)}),E7=ae("ZodBase64URL",(e,t)=>{dB.init(e,t),St.init(e,t)}),C7=ae("ZodE164",(e,t)=>{fB.init(e,t),St.init(e,t)}),j7=ae("ZodJWT",(e,t)=>{mB.init(e,t),St.init(e,t)}),N7=ae("ZodUnknown",(e,t)=>{pB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>jI()});function gS(){return lI(N7)}const A7=ae("ZodNever",(e,t)=>{gB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>CI(e,n,a)});function O7(e){return uI(A7,e)}const R7=ae("ZodArray",(e,t)=>{yB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>MI(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(D2(n,a)),e.length=(n,a)=>e.check($2(n,a)),e.unwrap=()=>e.element});function M7(e,t){return kI(R7,e,t)}const D7=ae("ZodObject",(e,t)=>{bB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>DI(e,n,a,o),Je(e,"shape",()=>t.shape),e.keyof=()=>V7(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:gS()}),e.loose=()=>e.clone({...e._zod.def,catchall:gS()}),e.strict=()=>e.clone({...e._zod.def,catchall:O7()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>qV(e,n),e.safeExtend=n=>GV(e,n),e.merge=n=>YV(e,n),e.pick=n=>HV(e,n),e.omit=n=>FV(e,n),e.partial=(...n)=>XV(H2,e,n[0]),e.required=(...n)=>KV(F2,e,n[0])});function $7(e,t){const n={type:"object",shape:e??{},...Ee(t)};return new D7(n)}const L7=ae("ZodUnion",(e,t)=>{vB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>$I(e,n,a,o),e.options=t.options});function I2(e,t){return new L7({type:"union",options:e,...Ee(t)})}const U7=ae("ZodIntersection",(e,t)=>{kB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>LI(e,n,a,o)});function P7(e,t){return new U7({type:"intersection",left:e,right:t})}const jp=ae("ZodEnum",(e,t)=>{SB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>NI(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 jp({...t,checks:[],...Ee(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 jp({...t,checks:[],...Ee(o),entries:u})}});function V7(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new jp({type:"enum",entries:n,...Ee(t)})}const Z7=ae("ZodLiteral",(e,t)=>{wB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>AI(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 yS(e,t){return new Z7({type:"literal",values:Array.isArray(e)?e:[e],...Ee(t)})}const B7=ae("ZodTransform",(e,t)=>{zB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>RI(e,n),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new b2(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(Cl(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(Cl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function I7(e){return new B7({type:"transform",transform:e})}const H2=ae("ZodOptional",(e,t)=>{M2.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>V2(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function xS(e){return new H2({type:"optional",innerType:e})}const H7=ae("ZodExactOptional",(e,t)=>{_B.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>V2(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function F7(e){return new H7({type:"optional",innerType:e})}const q7=ae("ZodNullable",(e,t)=>{TB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>UI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function bS(e){return new q7({type:"nullable",innerType:e})}const G7=ae("ZodDefault",(e,t)=>{EB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>VI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Y7(e,t){return new G7({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():w2(t)}})}const X7=ae("ZodPrefault",(e,t)=>{CB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>ZI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function K7(e,t){return new X7({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():w2(t)}})}const F2=ae("ZodNonOptional",(e,t)=>{jB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>PI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function J7(e,t){return new F2({type:"nonoptional",innerType:e,...Ee(t)})}const Q7=ae("ZodCatch",(e,t)=>{NB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>BI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function W7(e,t){return new Q7({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const eH=ae("ZodPipe",(e,t)=>{AB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>II(e,n,a,o),e.in=t.in,e.out=t.out});function vS(e,t){return new eH({type:"pipe",in:e,out:t})}const tH=ae("ZodReadonly",(e,t)=>{OB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>HI(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function nH(e){return new tH({type:"readonly",innerType:e})}const rH=ae("ZodCustom",(e,t)=>{RB.init(e,t),Pt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>OI(e,n)});function aH(e,t={}){return SI(rH,e,t)}function iH(e){return wI(e)}const oH=[{id:"general",label:"General"},{id:"agents",label:"Agents"},{id:"audio",label:"Audio"},{id:"channels",label:"Channels"},{id:"ui",label:"Interface"},{id:"logging",label:"Logging"}],sH=[{id:"oracle",label:"Oracle"},{id:"sati",label:"Sati"},{id:"apoc",label:"Apoc"}],wm=[{label:"OpenAI",value:"openai"},{label:"Anthropic",value:"anthropic"},{label:"OpenRouter",value:"openrouter"},{label:"Ollama",value:"ollama"},{label:"Google Gemini",value:"gemini"}];function lH(){const{data:e,error:t}=rr("/api/config",bo.fetchConfig),{data:n}=rr("/api/config/sati",bo.getSatiConfig),{data:a}=rr("/api/config/apoc",bo.getApocConfig),[o,u]=z.useState(null),[l,d]=z.useState(null),[f,h]=z.useState(null),[p,x]=z.useState("general"),[b,v]=z.useState("oracle"),[w,E]=z.useState(!1),[N,j]=z.useState({}),[A,_]=z.useState(null);z.useEffect(()=>{e&&!o&&u(e)},[e]),z.useEffect(()=>{n&&!l&&d(n)},[n]),z.useEffect(()=>{a&&!f?h(a):!a&&!f&&o&&h({...o.apoc??o.llm,temperature:o.apoc?.temperature??.2,timeout_ms:o.apoc?.timeout_ms??3e4})},[a,o]);const P=JSON.stringify(e)!==JSON.stringify(o)||JSON.stringify(n)!==JSON.stringify(l)||JSON.stringify(a)!==JSON.stringify(f),D=($,ie)=>{if(!o)return;const te=JSON.parse(JSON.stringify(o));let oe=te;for(let re=0;re<$.length-1;re++)oe=oe[$[re]];oe[$[$.length-1]]=ie,u(te);try{UV.parse(te),j({})}catch(re){if(re instanceof WI){const V={};re.errors.forEach(X=>{const B=X.path.join(".");V[B]=X.message}),j(V)}}},L=($,ie)=>{l&&d({...l,[$]:ie})},G=($,ie)=>{f&&h({...f,[$]:ie})},Z=()=>{!o||!l||d({...l,provider:o.llm.provider,model:o.llm.model,api_key:o.llm.api_key})},J=()=>{!o||!f||h({...f,provider:o.llm.provider,model:o.llm.model,api_key:o.llm.api_key})},ce=async()=>{if(o){E(!0),_(null);try{await bo.updateConfig(o),l&&await bo.updateSatiConfig(l),f&&await bo.updateApocConfig(f),Sc("/api/config"),Sc("/api/config/sati"),Sc("/api/config/apoc"),_({type:"success",message:"Settings saved successfully. Restart Morpheus daemon for changes to take effect."})}catch($){if(_({type:"error",message:$.message}),$.details&&Array.isArray($.details)){const ie={};$.details.forEach(te=>{const oe=te.path.join(".");ie[oe]=te.message}),j(ie)}}finally{E(!1)}}};return t?g.jsx("div",{className:"p-8 text-red-500",children:"Failed to load configuration"}):o?g.jsxs("div",{className:"max-w-4xl mx-auto p-0 md:p-6 space-y-6",children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Zaion Settings"}),g.jsx("button",{onClick:ce,disabled:!P||Object.keys(N).length>0||w,className:`px-4 py-2 rounded font-medium transition-colors ${P&&Object.keys(N).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:w?"Saving...":"Save Changes"})]}),A&&g.jsx("div",{className:`p-4 rounded border ${A.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:A.message}),g.jsx("div",{className:"overflow-x-auto py-1 hide-scrollbar",children:g.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px min-w-max",children:oH.map($=>g.jsx("button",{onClick:()=>x($.id),className:`px-4 py-2 text-sm font-medium rounded-t-md transition-colors flex-shrink-0 ${p===$.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:$.label},$.id))})}),g.jsxs("div",{className:"space-y-6",children:[p==="general"&&g.jsxs(ja,{title:"Agent Identity",children:[g.jsx(Yt,{label:"Agent Name",value:o.agent.name,onChange:$=>D(["agent","name"],$.target.value),error:N["agent.name"]}),g.jsx(Yt,{label:"Personality",value:o.agent.personality,onChange:$=>D(["agent","personality"],$.target.value),error:N["agent.personality"]})]}),p==="agents"&&g.jsxs("div",{className:"space-y-4",children:[g.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px",children:sH.map($=>g.jsx("button",{onClick:()=>v($.id),className:`px-4 py-2 text-sm font-medium rounded-t-md transition-colors ${b===$.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:$.label},$.id))}),b==="oracle"&&g.jsxs(ja,{title:"Oracle Agent",children:[g.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"}),g.jsx(el,{label:"Provider",value:o.llm.provider,onChange:$=>D(["llm","provider"],$.target.value),options:wm,error:N["llm.provider"]}),g.jsx(Yt,{label:"Model Name",value:o.llm.model,onChange:$=>D(["llm","model"],$.target.value),error:N["llm.model"]}),g.jsx(Aa,{label:"Temperature",value:o.llm.temperature,onChange:$=>D(["llm","temperature"],parseFloat($.target.value)),step:.1,min:0,max:1,error:N["llm.temperature"]}),g.jsx(Aa,{label:"Max Tokens",value:o.llm.max_tokens??"",onChange:$=>D(["llm","max_tokens"],$.target.value?parseInt($.target.value):void 0),min:1,error:N["llm.max_tokens"],helperText:"Maximum tokens per response. Leave empty for model default."}),g.jsx(Aa,{label:"Context Window (Messages)",value:o.llm.context_window??100,onChange:$=>D(["llm","context_window"],parseInt($.target.value)),min:1,step:1,error:N["llm.context_window"],helperText:"Number of past interactions to load into LLM context (e.g., 100)."}),g.jsx(Yt,{label:"API Key",type:"password",value:o.llm.api_key||"",onChange:$=>D(["llm","api_key"],$.target.value),placeholder:"sk-...",helperText:"Stored locally."}),o.llm.provider==="openrouter"&&g.jsx(Yt,{label:"Base URL",value:o.llm.base_url||"https://openrouter.ai/api/v1",onChange:$=>D(["llm","base_url"],$.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"})]}),b==="sati"&&g.jsxs(ja,{title:"Sati Agent",children:[g.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"}),g.jsxs("div",{className:"mb-4",children:[g.jsx("button",{type:"button",onClick:Z,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"}),g.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"})]}),l&&g.jsxs(g.Fragment,{children:[g.jsx(el,{label:"Provider",value:l.provider,onChange:$=>L("provider",$.target.value),options:wm}),g.jsx(Yt,{label:"Model Name",value:l.model,onChange:$=>L("model",$.target.value)}),g.jsx(Yt,{label:"API Key",type:"password",value:l.api_key||"",onChange:$=>L("api_key",$.target.value),placeholder:"sk-...",helperText:"Stored locally."}),l.provider==="openrouter"&&g.jsx(Yt,{label:"Base URL",value:l.base_url||"https://openrouter.ai/api/v1",onChange:$=>L("base_url",$.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"}),g.jsx(Aa,{label:"Memory Limit",value:l.memory_limit??10,onChange:$=>L("memory_limit",parseInt($.target.value)),min:1,step:1,helperText:"Number of memory items to retrieve from long-term storage."}),g.jsx(tl,{label:"Enable Archived Sessions in Memory Retrieval",checked:l.enabled_archived_sessions??!0,onChange:$=>L("enabled_archived_sessions",$)})]})]}),b==="apoc"&&g.jsxs(ja,{title:"Apoc Agent",children:[g.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"}),g.jsxs("div",{className:"mb-4",children:[g.jsx("button",{type:"button",onClick:J,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"}),g.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"})]}),f&&g.jsxs(g.Fragment,{children:[g.jsx(el,{label:"Provider",value:f.provider,onChange:$=>G("provider",$.target.value),options:wm}),g.jsx(Yt,{label:"Model Name",value:f.model,onChange:$=>G("model",$.target.value)}),g.jsx(Aa,{label:"Temperature",value:f.temperature,onChange:$=>G("temperature",parseFloat($.target.value)),step:.1,min:0,max:1}),g.jsx(Yt,{label:"API Key",type:"password",value:f.api_key||"",onChange:$=>G("api_key",$.target.value),placeholder:"sk-...",helperText:"Stored locally."}),f.provider==="openrouter"&&g.jsx(Yt,{label:"Base URL",value:f.base_url||"https://openrouter.ai/api/v1",onChange:$=>G("base_url",$.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"}),g.jsx(Yt,{label:"Working Directory",value:f.working_dir||"",onChange:$=>G("working_dir",$.target.value),placeholder:"/home/user/projects",helperText:"Root directory for file and shell operations. Leave empty to use process working directory."}),g.jsx(Aa,{label:"Timeout (ms)",value:f.timeout_ms??3e4,onChange:$=>G("timeout_ms",parseInt($.target.value)),min:1e3,step:1e3,helperText:"Maximum execution time for shell and system operations in milliseconds."})]})]})]}),p==="audio"&&g.jsxs(ja,{title:"Audio Transcription",children:[g.jsx(tl,{label:"Enable Audio",checked:o.audio.enabled,onChange:$=>D(["audio","enabled"],$)}),g.jsx(el,{label:"Provider",value:o.audio.provider||"google",onChange:$=>D(["audio","provider"],$.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:N["audio.provider"]}),g.jsx(Yt,{label:"Model",value:o.audio.model,onChange:$=>D(["audio","model"],$.target.value),placeholder:"e.g. whisper-1, gemini-2.5-flash-lite...",helperText:"Model to use for audio transcription.",error:N["audio.model"]}),o.audio.provider==="ollama"&&g.jsx(Yt,{label:"Base URL",value:o.audio.base_url||"",onChange:$=>D(["audio","base_url"],$.target.value),placeholder:"http://localhost:11434",helperText:"Ollama base URL. Requires a Whisper model loaded (ollama pull whisper)."}),g.jsx(Yt,{label:"API Key",type:"password",value:o.audio.apiKey||"",onChange:$=>D(["audio","apiKey"],$.target.value),placeholder:"If different from LLM key...",helperText:"Leave empty to use LLM API key if using the same provider."}),g.jsx(Aa,{label:"Max Duration (Seconds)",value:o.audio.maxDurationSeconds,onChange:$=>D(["audio","maxDurationSeconds"],parseInt($.target.value)),min:1}),g.jsx(Yt,{label:"Supported Mime Types",value:o.audio.supportedMimeTypes.join(", "),onChange:$=>D(["audio","supportedMimeTypes"],$.target.value.split(",").map(ie=>ie.trim()).filter(Boolean)),helperText:"Comma separated list (e.g. audio/ogg, audio/mp3)"})]}),p==="channels"&&g.jsxs(ja,{title:"Telegram",children:[g.jsx(tl,{label:"Enable Telegram",checked:o.channels.telegram.enabled,onChange:$=>D(["channels","telegram","enabled"],$)}),o.channels.telegram.enabled&&g.jsxs("div",{className:"space-y-4 mt-4 pl-4 border-l border-matrix-primary",children:[g.jsx(Yt,{label:"Bot Token",type:"password",value:o.channels.telegram.token||"",onChange:$=>D(["channels","telegram","token"],$.target.value)}),g.jsx(Yt,{label:"Allowed Users (comma separated)",value:o.channels.telegram.allowedUsers.join(", "),onChange:$=>D(["channels","telegram","allowedUsers"],$.target.value.split(",").map(ie=>ie.trim()).filter(Boolean)),helperText:"User IDs allowed to interact with the bot"})]})]}),p==="ui"&&g.jsxs(ja,{title:"Dashboard",children:[g.jsx(tl,{label:"Enable Web UI",checked:o.ui.enabled,onChange:$=>D(["ui","enabled"],$)}),g.jsx(Aa,{label:"Port",value:o.ui.port,onChange:$=>D(["ui","port"],parseInt($.target.value)),disabled:!0,helperText:"Requires restart to change."})]}),p==="logging"&&g.jsxs(ja,{title:"Logging",children:[g.jsx(tl,{label:"Enable Logging",checked:o.logging.enabled,onChange:$=>D(["logging","enabled"],$)}),g.jsx(el,{label:"Log Level",value:o.logging.level,onChange:$=>D(["logging","level"],$.target.value),options:[{label:"Debug",value:"debug"},{label:"Info",value:"info"},{label:"Warning",value:"warn"},{label:"Error",value:"error"}]})]})]})]}):g.jsx("div",{className:"p-8 text-azure-primary dark:text-matrix-highlight",children:"Loading settings..."})}function uH(){const{data:e}=YA(),[t,n]=z.useState(null),{data:a,mutate:o}=XA(t);return z.useEffect(()=>{!t&&e&&e.length>0&&n(e[0].name)},[e,t]),g.jsxs(Tt.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:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"SYSTEM LOGS"}),g.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"View runtime logs."})]}),g.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:[g.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:[g.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=>g.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:[g.jsx(NN,{className:"w-4 h-4 shrink-0"}),g.jsxs("div",{className:"flex flex-col overflow-hidden",children:[g.jsx("span",{className:"truncate font-bold",children:u.name}),g.jsxs("span",{className:"text-xs opacity-70",children:[(u.size/1024).toFixed(1)," KB"]})]})]},u.name))]}),g.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:[g.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:[g.jsx("span",{className:"text-azure-text-primary dark:text-matrix-highlight font-bold font-mono text-sm",children:t}),g.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:g.jsx(YN,{className:"w-4 h-4"})})]}),g.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 cH(){const[e,t]=z.useState(null),[n,a]=z.useState([]),[o,u]=z.useState(!0),[l,d]=z.useState("");if(z.useEffect(()=>{async function p(){try{const[x,b]=await Promise.all([fp.fetchUsageStats(),fp.fetchGroupedUsageStats()]);t(x),a(b)}catch(x){d("Failed to load usage statistics"),console.error(x)}finally{u(!1)}}p()},[]),o)return g.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 g.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 g.jsxs(Tt.div,{variants:f,initial:"hidden",animate:"show",className:"space-y-6",children:[g.jsx("div",{className:"flex items-center justify-between border-b border-azure-border dark:border-matrix-primary pb-4",children:g.jsxs("div",{children:[g.jsxs("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight font-mono flex items-center gap-2",children:[g.jsx(Am,{className:"w-6 h-6"}),"USAGE_ANALYTICS"]}),g.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1 font-mono text-sm",children:"Resource consumption tracking and metrics"})]})}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[g.jsxs(Tt.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:[g.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[g.jsx(pl,{className:"w-5 h-5"}),g.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Input Tokens"})]}),g.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalInputTokens.toLocaleString()??0})]}),g.jsxs(Tt.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:[g.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[g.jsx(TN,{className:"w-5 h-5"}),g.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Output Tokens"})]}),g.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalOutputTokens.toLocaleString()??0})]}),g.jsxs(Tt.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:[g.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[g.jsx(Nc,{className:"w-5 h-5"}),g.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Est. Total Cost"})]}),g.jsx("p",{className:"text-3xl font-bold text-green-600 dark:text-green-400 font-mono",children:e?.totalEstimatedCostUsd!=null?`$${e.totalEstimatedCostUsd.toFixed(4)}`:"—"})]})]}),g.jsxs(Tt.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:[g.jsx("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary bg-azure-bg dark:bg-zinc-900/50",children:g.jsx("h3",{className:"text-lg font-bold text-azure-text-primary dark:text-matrix-highlight font-mono uppercase",children:"Usage Breakdown by Model"})}),g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-left font-mono text-sm",children:[g.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:g.jsxs("tr",{children:[g.jsx("th",{className:"p-4",children:"Provider"}),g.jsx("th",{className:"p-4",children:"Model"}),g.jsx("th",{className:"p-4 text-right",children:"Messages"}),g.jsx("th",{className:"p-4 text-right",children:"Input Tokens"}),g.jsx("th",{className:"p-4 text-right",children:"Output Tokens"}),g.jsx("th",{className:"p-4 text-right",children:"Total Tokens"}),g.jsx("th",{className:"p-4 text-right",children:"Audio (s)"}),g.jsx("th",{className:"p-4 text-right",children:"Est. Cost (USD)"})]})}),g.jsx("tbody",{className:"divide-y divide-azure-border dark:divide-matrix-primary/30",children:n.length===0?g.jsx("tr",{children:g.jsx("td",{colSpan:8,className:"p-8 text-center text-azure-text-muted dark:text-matrix-secondary italic",children:"NO_DATA_AVAILABLE"})}):n.map((p,x)=>g.jsxs("tr",{className:"hover:bg-azure-hover dark:hover:bg-matrix-primary/10 transition-colors",children:[g.jsx("td",{className:"p-4 font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.provider}),g.jsx("td",{className:"p-4 text-azure-text-secondary dark:text-matrix-secondary",children:p.model}),g.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.messageCount.toLocaleString()}),g.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalInputTokens.toLocaleString()}),g.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalOutputTokens.toLocaleString()}),g.jsx("td",{className:"p-4 text-right font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.totalTokens.toLocaleString()}),g.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalAudioSeconds>0?p.totalAudioSeconds.toLocaleString():"—"}),g.jsx("td",{className:"p-4 text-right font-bold text-green-600 dark:text-green-400",children:p.estimatedCostUsd!=null?`$${p.estimatedCostUsd.toFixed(4)}`:"—"})]},`${p.provider}-${p.model}-${x}`))})]})})]})]})}const dH=()=>{const[e,t]=z.useState(""),[n,a]=z.useState(""),o=Dp(),u=mr(),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 g.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:g.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:[g.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"}),g.jsxs("form",{onSubmit:l,className:"space-y-6",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm mb-2 opacity-70 text-azure-text-secondary dark:text-green-500",children:"ACCESS_PASS:"}),g.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&&g.jsxs("div",{className:"text-red-500 text-sm animate-pulse",children:["[!] ERROR: ",n]}),g.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"})]}),g.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."})]})})},fH=({children:e})=>{const{isAuthenticated:t}=qz(),n=mr();return t?g.jsx(g.Fragment,{children:e}):g.jsx(IS,{to:"/login",state:{from:n},replace:!0})},hH=({className:e,...t})=>g.jsx("div",{className:"relative w-full overflow-auto",children:g.jsx("table",{className:`w-full caption-bottom text-sm ${e}`,...t})}),mH=({...e})=>g.jsx("thead",{...e}),pH=({...e})=>g.jsx("tbody",{...e}),zm=({...e})=>g.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}),vo=({className:e,...t})=>g.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}),pi=({className:e,...t})=>g.jsx("td",{className:`p-4 align-middle [&:has([role=checkbox])]:pr-0 ${e}`,...t}),kS=({checked:e,onCheckedChange:t,className:n,...a})=>{const o=u=>{t&&t(u.target.checked),a.onChange&&a.onChange(u)};return g.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})},Yc=({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 g.jsx("div",{className:o,...n})},_m=({className:e,...t})=>g.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}),SS=({className:e,...t})=>g.jsx("div",{className:`flex flex-col space-y-1.5 p-6 ${e||""}`,...t}),gH=({className:e,...t})=>g.jsx("h3",{className:`text-2xl font-semibold leading-none tracking-tight ${e||""}`,...t}),Tm=({className:e,...t})=>g.jsx("div",{className:`p-6 pt-0 ${e||""}`,...t}),yH=({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 g.jsx("div",{className:o,...n})},xH=({className:e,...t})=>g.jsx("div",{className:`text-sm [&_p]:leading-relaxed ${e||""}`,...t}),q2=({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 g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[g.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),g.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&&g.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-azure-border dark:border-matrix-primary",children:[n&&g.jsx("h3",{className:"text-lg font-semibold text-azure-text-primary dark:text-matrix-secondary",children:n}),t&&g.jsx("button",{onClick:t,className:"text-azure-text-secondary dark:text-matrix-tertiary hover:text-azure-text-primary dark:hover:text-matrix-secondary",children:g.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:g.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),g.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:a})]})]})},bH=({isOpen:e,onClose:t,memory:n})=>n?g.jsx(q2,{isOpen:e,onClose:t,title:"Memory Details",size:"lg",children:g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(rA,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),g.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Category"})]}),g.jsx("div",{children:g.jsx(Yc,{variant:"outline",children:n.category})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(dA,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),g.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Importance"})]}),g.jsx("div",{children:g.jsx(Yc,{variant:n.importance==="critical"?"destructive":n.importance==="high"?"default":n.importance==="medium"?"secondary":"outline",children:n.importance})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(XS,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),g.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Created"})]}),g.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.created_at).toLocaleString()}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Vp,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),g.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Updated"})]}),g.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.updated_at).toLocaleString()}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Zp,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),g.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Access Count"})]}),g.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.access_count}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(MN,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),g.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Hash"})]}),g.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary break-all text-sm",children:n.hash}),n.source&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx($N,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),g.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Source"})]}),g.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.source})]})]}),g.jsxs("div",{children:[g.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Summary"}),g.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&&g.jsxs("div",{children:[g.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Details"}),g.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})]}),g.jsx("div",{className:"flex justify-end pt-4",children:g.jsx(tr,{onClick:t,children:"Close"})})]})}):null,vH=({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"})=>g.jsx(q2,{isOpen:e,onClose:t,title:a,size:"md",children:g.jsxs("div",{className:"space-y-6",children:[g.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary",children:o}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(tr,{variant:"outline",onClick:t,children:l}),g.jsx(tr,{variant:"destructive",onClick:()=>{n(),t()},children:u})]})]})}),kH=()=>{const[e,t]=z.useState(!1),[n,a]=z.useState(null),o=z.useCallback(f=>(t(!0),a(null),Pe.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),Pe.post(f,h).then(p=>p).catch(p=>{throw a(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),l=z.useCallback((f,h)=>(t(!0),a(null),Pe.post(f,h).then(p=>p).catch(p=>{throw a(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),d=z.useCallback(f=>(t(!0),a(null),Pe.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}},SH=()=>{const[e,t]=z.useState([]),[n,a]=z.useState(!0),[o,u]=z.useState([]),[l,d]=z.useState(""),[f,h]=z.useState("all"),[p,x]=z.useState("all"),[b,v]=z.useState(null),[w,E]=z.useState(!1),[N,j]=z.useState(null),[A,_]=z.useState(!1),[P,D]=z.useState(null),[L,G]=z.useState(!1),{get:Z,del:J,post:ce}=kH();z.useEffect(()=>{$()},[]);const $=async()=>{try{a(!0);const C=await Z("/sati/memories");t(C),v(null)}catch(C){v("Failed to load memories. Please try again."),console.error("Error fetching memories:",C)}finally{a(!1)}},ie=()=>{o.length===B.length?u([]):u(B.map(C=>C.id))},te=C=>{o.includes(C)?u(o.filter(Y=>Y!==C)):u([...o,C])},oe=async()=>{if(o.length!==0)try{await ce("/sati/memories/bulk-delete",{ids:o}),await $(),u([]),E(!1)}catch(C){v("Failed to delete memories. Please try again."),console.error("Error deleting memories:",C)}},re=C=>{D(C),G(!0)},V=async()=>{if(P)try{await J(`/sati/memories/${P}`),await $()}catch(C){v("Failed to delete memory. Please try again."),console.error("Error deleting memory:",C)}finally{D(null),G(!1)}},X=C=>{j(C),_(!0)},B=e.filter(C=>{const Y=C.summary.toLowerCase().includes(l.toLowerCase())||C.details?.toLowerCase().includes(l.toLowerCase())||C.category.toLowerCase().includes(l.toLowerCase()),T=f==="all"||C.category===f,se=p==="all"||C.importance===p;return Y&&T&&se&&!C.archived}),de=Array.from(new Set(e.map(C=>C.category))),O=Array.from(new Set(e.map(C=>C.importance)));return n?g.jsx(_m,{className:"w-full",children:g.jsx(Tm,{className:"flex justify-center items-center h-64",children:g.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-azure-primary dark:border-matrix-highlight"})})}):g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Sati Memories"}),g.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&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-sm text-azure-text-muted dark:text-matrix-secondary",children:[o.length," selected"]}),g.jsxs(tr,{variant:"destructive",size:"sm",onClick:()=>E(!0),disabled:o.length===0,children:[g.jsx(gl,{className:"w-4 h-4 mr-1"}),"Delete Selected"]})]})]}),b&&g.jsx(yH,{variant:"destructive",children:g.jsx(xH,{children:b})}),g.jsxs(_m,{children:[g.jsx(SS,{className:"border-b border-azure-border dark:border-matrix-primary",children:g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[g.jsxs("div",{className:"flex flex-col relative w-full",children:[g.jsx(JN,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-azure-text-secondary dark:text-matrix-secondary w-4 h-4"}),g.jsx("input",{type:"text",placeholder:"Search memories...",value:l,onChange:C=>d(C.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"})]}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[g.jsxs("select",{value:f,onChange:C=>h(C.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:[g.jsx("option",{value:"all",children:"All Categories"}),de.map(C=>g.jsx("option",{value:C,children:C},C))]}),g.jsxs("select",{value:p,onChange:C=>x(C.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:[g.jsx("option",{value:"all",children:"All Importance"}),O.map(C=>g.jsx("option",{value:C,children:C},C))]})]})]})}),g.jsx(Tm,{className:"p-0",children:g.jsxs(hH,{children:[g.jsx(mH,{children:g.jsxs(zm,{className:"hover:bg-transparent",children:[g.jsx(vo,{className:"w-12",children:g.jsx(kS,{checked:B.length>0&&o.length===B.length,onCheckedChange:ie})}),g.jsx(vo,{children:"Summary"}),g.jsx(vo,{children:"Category"}),g.jsx(vo,{children:"Importance"}),g.jsx(vo,{children:"Created"}),g.jsx(vo,{className:"w-32",children:"Actions"})]})}),g.jsx(pH,{children:B.length===0?g.jsx(zm,{children:g.jsx(pi,{colSpan:6,className:"text-center py-8 text-azure-text-secondary dark:text-matrix-secondary",children:n?"Loading memories...":"No memories found"})}):B.map(C=>g.jsxs(zm,{children:[g.jsx(pi,{children:g.jsx(kS,{checked:o.includes(C.id),onCheckedChange:()=>te(C.id)})}),g.jsx(pi,{className:"font-medium max-w-xs truncate",children:C.summary}),g.jsx(pi,{children:g.jsx(Yc,{variant:"outline",children:C.category})}),g.jsx(pi,{children:g.jsx(Yc,{variant:C.importance==="critical"?"destructive":C.importance==="high"?"default":C.importance==="medium"?"secondary":"outline",children:C.importance})}),g.jsx(pi,{children:g.jsxs("div",{className:"flex items-center gap-1 text-azure-text-secondary dark:text-matrix-secondary",children:[g.jsx(XS,{className:"w-4 h-4"}),new Date(C.created_at).toLocaleDateString()]})}),g.jsx(pi,{children:g.jsxs("div",{className:"flex gap-1",children:[g.jsx(tr,{variant:"ghost",size:"sm",onClick:()=>X(C),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",children:g.jsx(Zp,{className:"w-4 h-4"})}),g.jsx(tr,{variant:"ghost",size:"sm",onClick:()=>re(C.id),className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",children:g.jsx(gl,{className:"w-4 h-4"})})]})})]},C.id))})]})})]}),w&&g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:g.jsxs(_m,{className:"w-full max-w-md mx-4",children:[g.jsx(SS,{children:g.jsx(gH,{children:"Delete Memories"})}),g.jsxs(Tm,{children:[g.jsxs("p",{className:"mb-4",children:["Are you sure you want to delete ",o.length," ","memory(ies)? This action cannot be undone."]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(tr,{variant:"outline",onClick:()=>E(!1),children:"Cancel"}),g.jsx(tr,{variant:"destructive",onClick:oe,children:"Delete"})]})]})]})}),g.jsx(bH,{isOpen:A,onClose:()=>_(!1),memory:N}),g.jsx(vH,{isOpen:L,onClose:()=>G(!1),onConfirm:V,title:"Confirm Memory Deletion",message:"Are you sure you want to delete this memory? This action cannot be undone.",confirmButtonText:"Delete Memory",cancelButtonText:"Cancel"})]})},gi=vi.getInstance(),yi={fetchServers:async()=>gi.get("/mcp/servers"),addServer:async(e,t)=>gi.post("/mcp/servers",{name:e,config:t}),updateServer:async(e,t)=>gi.put(`/mcp/servers/${encodeURIComponent(e)}`,{config:t}),deleteServer:async e=>gi.delete(`/mcp/servers/${encodeURIComponent(e)}`),toggleServer:async(e,t)=>gi.patch(`/mcp/servers/${encodeURIComponent(e)}/toggle`,{enabled:t}),reloadTools:async()=>gi.post("/mcp/reload",{}),fetchStatus:async()=>gi.get("/mcp/status")},wH=({label:e,values:t,onChange:n,placeholder:a})=>{const o=t.length>0?t:[""],u=(f,h)=>{const p=[...o];p[f]=h,n(p.filter(x=>x.trim().length>0))},l=()=>n([...o,""]),d=f=>{const h=o.filter((p,x)=>x!==f);n(h.filter(p=>p.trim().length>0))};return g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),o.map((f,h)=>g.jsxs("div",{className:"flex gap-2",children:[g.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:p=>u(h,p.target.value)}),g.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}`)),g.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"})]})},wS=({label:e,values:t,onChange:n,keyPlaceholder:a,valuePlaceholder:o})=>{const u=z.useMemo(()=>t.length>0?t:[{key:"",value:""}],[t]),l=(h,p,x)=>{const b=[...u];b[h]={...b[h],[p]:x},n(b.filter(v=>v.key.trim().length>0||v.value.trim().length>0))},d=()=>n([...u,{key:"",value:""}]),f=h=>{const p=u.filter((x,b)=>b!==h);n(p.filter(x=>x.key.trim().length>0||x.value.trim().length>0))};return g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),u.map((h,p)=>g.jsxs("div",{className:"grid gap-2 md:grid-cols-5",children:[g.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(p,"key",x.target.value)}),g.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(p,"value",x.target.value)}),g.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(p),children:"Remove"})]},`${e}-${p}`)),g.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"})]})},zH=({transport:e,command:t,url:n,args:a,env:o,headers:u,onCommandChange:l,onUrlChange:d,onArgsChange:f,onEnvChange:h,onHeadersChange:p})=>g.jsxs("div",{className:"space-y-4",children:[e==="stdio"&&g.jsxs(g.Fragment,{children:[g.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Command",g.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"})]}),g.jsx(wH,{label:"Arguments",values:a,onChange:f,placeholder:"--flag"})]}),e==="http"&&g.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["URL",g.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"})]}),g.jsx(wS,{label:"Environment Variables",values:o,onChange:h,keyPlaceholder:"KEY",valuePlaceholder:"value"}),e==="http"&&g.jsx(wS,{label:"Headers",values:u,onChange:p,keyPlaceholder:"Header",valuePlaceholder:"value"})]}),_H=$7({name:Sm().min(1,"Name is required"),transport:I2([yS("stdio"),yS("http")]),command:Sm().optional(),url:Sm().optional()}),xc=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Em=e=>e.reduce((t,n)=>(n.key.trim().length===0||(t[n.key]=n.value),t),{}),TH=({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,p]=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??[]),[E,N]=z.useState(xc(n?.config.env)),[j,A]=z.useState(n?.config.transport==="http"?xc(n.config.headers):[]),[_,P]=z.useState(null);z.useEffect(()=>{e&&(l(n?.name??""),f(n?.config.transport??"stdio"),p(n?.config.transport==="stdio"?n.config.command:""),b(n?.config.transport==="http"?n.config.url:""),w(n?.config.args??[]),N(xc(n?.config.env)),A(n?.config.transport==="http"?xc(n.config.headers):[]),P(null))},[e,n]);const D=t==="create",L=async()=>{const Z=_H.safeParse({name:u,transport:d,command:h,url:x});if(!Z.success){P(Z.error.issues[0]?.message??"Invalid form");return}if(d==="stdio"&&(!h||h.trim().length===0)){P("Command is required for stdio transport.");return}if(d==="http"&&(!x||x.trim().length===0)){P("URL is required for http transport.");return}const J=d==="stdio"?{transport:"stdio",command:h.trim(),args:v.length>0?v:void 0,env:E.length>0?Em(E):void 0}:{transport:"http",url:x.trim(),headers:j.length>0?Em(j):void 0,env:E.length>0?Em(E):void 0};P(null),await o(u.trim(),J)},G=z.useMemo(()=>t==="create"?"Add MCP Server":"Edit MCP Server",[t]);return g.jsx(ea,{open:e,onOpenChange:a,children:g.jsxs(Lo,{children:[g.jsx(ta,{children:g.jsx(na,{children:G})}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Name",g.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:Z=>l(Z.target.value),placeholder:"coolify",disabled:!D})]}),g.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Transport",g.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:Z=>f(Z.target.value),children:[g.jsx("option",{value:"stdio",children:"stdio"}),g.jsx("option",{value:"http",children:"http"})]})]}),g.jsx(zH,{transport:d,command:h,url:x,args:v,env:E,headers:j,onCommandChange:p,onUrlChange:b,onArgsChange:w,onEnvChange:N,onHeadersChange:A}),_&&g.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:_}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.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"}),g.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:L,children:"Save"})]})]})]})})},EH=({server:e,probeResult:t,onEdit:n,onDelete:a,onToggle:o})=>g.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:[g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-lg font-semibold text-azure-text-primary break-words dark:text-matrix-highlight",children:e.name}),g.jsx("div",{className:"text-xs uppercase tracking-wide text-azure-text-muted dark:text-matrix-secondary",children:e.config.transport})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[t&&g.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"}),g.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"})]})]}),g.jsxs("div",{className:"mt-4 space-y-2 text-sm text-azure-text-secondary dark:text-matrix-secondary",children:[e.config.transport==="stdio"&&g.jsxs("div",{className:"break-all",children:[g.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Command:"})," ",e.config.command]}),e.config.transport==="http"&&g.jsxs("div",{className:"break-all",children:[g.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&&g.jsxs("div",{className:"break-all",children:[g.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Args:"})," ",e.config.args.join(" ")]}),t&&!t.ok&&t.error&&g.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})]}),g.jsxs("div",{className:"mt-4 flex gap-2",children:[g.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"}),g.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"})]})]}),CH=()=>{const{data:e,error:t,mutate:n,isLoading:a}=rr("/api/mcp/servers",()=>yi.fetchServers()),[o,u]=z.useState(""),[l,d]=z.useState("all"),[f,h]=z.useState(!1),[p,x]=z.useState(null),[b,v]=z.useState(!1),[w,E]=z.useState(null),[N,j]=z.useState(null),[A,_]=z.useState({}),[P,D]=z.useState(!1),[L,G]=z.useState(!1),Z=e?.servers??[],J=z.useMemo(()=>Z.filter(B=>{const de=B.name.toLowerCase().includes(o.toLowerCase()),O=l==="all"||B.config.transport===l;return de&&O}),[Z,o,l]),ce=()=>{x(null),h(!0)},$=B=>{x(B),h(!0)},ie=async(B,de)=>{try{p?await yi.updateServer(p.name,de):await yi.addServer(B,de),h(!1),x(null),await n(),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(O){j({type:"error",message:O.message||"Failed to save MCP server."})}},te=async B=>{E(B),v(!0)},oe=async()=>{if(w)try{await yi.deleteServer(w.name),await n(),v(!1),E(null),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(B){j({type:"error",message:B.message||"Failed to delete MCP server."})}},re=async()=>{D(!0);try{const B=await yi.fetchStatus(),de={};for(const O of B.servers)de[O.name]=O;_(de)}catch(B){j({type:"error",message:B.message||"Failed to check MCP status."})}finally{D(!1)}},V=async()=>{G(!0);try{await yi.reloadTools(),j({type:"success",message:"MCP tools reloaded successfully."})}catch(B){j({type:"error",message:B.message||"Failed to reload MCP tools."})}finally{G(!1)}},X=async(B,de)=>{try{await yi.toggleServer(B.name,de),await n(),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(O){j({type:"error",message:O.message||"Failed to toggle MCP server."})}};return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-semibold text-azure-primary dark:text-matrix-highlight",children:"MCP Servers"}),g.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Manage MCP servers stored in mcps.json."})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{type:"button",disabled:P,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:P?"Checking…":"Check Status"}),g.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:V,children:L?"Reloading…":"Reload MCPs"}),g.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:ce,children:"Add Server"})]})]}),N&&g.jsx("div",{className:`p-4 rounded border ${N.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:N.message}),g.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center",children:[g.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:B=>u(B.target.value),placeholder:"Search by name"}),g.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:B=>d(B.target.value),children:[g.jsx("option",{value:"all",children:"All"}),g.jsx("option",{value:"stdio",children:"stdio"}),g.jsx("option",{value:"http",children:"http"})]})]}),a&&g.jsx("div",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Loading MCP servers..."}),t&&g.jsx("div",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to load MCP servers."}),!a&&J.length===0&&g.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."}),g.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:J.map(B=>g.jsx(EH,{server:B,probeResult:A[B.name],onEdit:$,onDelete:te,onToggle:X},`${B.name}-${B.enabled?"on":"off"}`))}),g.jsx(TH,{open:f,mode:p?"edit":"create",initial:p??void 0,onClose:()=>h(!1),onSubmit:ie}),g.jsx(ea,{open:b,onOpenChange:v,children:g.jsxs(Lo,{children:[g.jsx(ta,{children:g.jsx(na,{children:"Confirm Deletion"})}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:["Are you sure you want to delete the MCP server ",g.jsxs("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:['"',w?.name,'"']}),"? This action cannot be undone."]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.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"}),g.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:oe,children:"Delete"})]})]})]})})]})},Cm={list:()=>Pe.get("/model-pricing"),upsert:e=>Pe.post("/model-pricing",e),update:(e,t,n)=>Pe.put(`/model-pricing/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,n),delete:(e,t)=>Pe.delete(`/model-pricing/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},jH={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},zS={hidden:{opacity:0,y:10},show:{opacity:1,y:0}},NH=["anthropic","openai","google","openrouter","ollama","other"],_S=()=>({provider:"",model:"",input_price_per_1m:0,output_price_per_1m:0}),AH=()=>{const{data:e=[],mutate:t}=rr("/api/model-pricing",()=>Cm.list()),[n,a]=z.useState(!1),[o,u]=z.useState(null),[l,d]=z.useState(_S()),[f,h]=z.useState(null),[p,x]=z.useState(null),[b,v]=z.useState(!1),w=(_,P)=>{x({type:_,message:P}),setTimeout(()=>x(null),3e3)},E=()=>{u(null),d(_S()),a(!0)},N=_=>{u(_),d({..._}),a(!0)},j=async()=>{if(!(!l.provider.trim()||!l.model.trim())){v(!0);try{await Cm.upsert(l),await t(),a(!1),w("success",o?"Pricing updated.":"Pricing created.")}catch{w("error","Failed to save pricing entry.")}finally{v(!1)}}},A=async()=>{if(f)try{await Cm.delete(f.provider,f.model),await t(),h(null),w("success","Pricing entry deleted.")}catch{w("error","Failed to delete pricing entry.")}};return g.jsxs(Tt.div,{variants:jH,initial:"hidden",animate:"show",className:"space-y-6",children:[g.jsxs(Tt.div,{variants:zS,className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Nc,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Model Pricing"}),g.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."})]})]}),g.jsxs("button",{onClick:E,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:[g.jsx(QS,{className:"w-4 h-4"})," Add Pricing"]})]}),p&&g.jsx(Tt.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:`px-4 py-3 rounded-lg text-sm font-medium border ${p.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:p.message}),g.jsx(Tt.div,{variants:zS,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-hidden",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:g.jsx("tr",{children:["Provider","Model","Input ($/1M tokens)","Output ($/1M tokens)","Actions"].map(_=>g.jsx("th",{className:"px-4 py-3 text-left font-semibold text-azure-text-secondary dark:text-matrix-dim",children:_},_))})}),g.jsx("tbody",{children:e.length===0?g.jsx("tr",{children:g.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(_=>g.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:[g.jsx("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text capitalize",children:_.provider}),g.jsx("td",{className:"px-4 py-3 font-mono text-azure-text-primary dark:text-matrix-highlight text-xs",children:_.model}),g.jsxs("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:["$",_.input_price_per_1m.toFixed(4)]}),g.jsxs("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:["$",_.output_price_per_1m.toFixed(4)]}),g.jsx("td",{className:"px-4 py-3",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>N(_),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:g.jsx(Bp,{className:"w-4 h-4"})}),g.jsx("button",{onClick:()=>h(_),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:g.jsx(gl,{className:"w-4 h-4"})})]})})]},`${_.provider}/${_.model}`))})]})}),g.jsx(ea,{open:n,onOpenChange:a,children:g.jsxs(Lo,{children:[g.jsx(ta,{children:g.jsx(na,{children:o?"Edit Pricing":"Add Pricing"})}),g.jsxs("div",{className:"p-4 space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Provider"}),o?g.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}):g.jsxs("select",{value:l.provider,onChange:_=>d({...l,provider:_.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:[g.jsx("option",{value:"",children:"Select provider..."}),NH.map(_=>g.jsx("option",{value:_,children:_},_))]})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Model"}),o?g.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}):g.jsx("input",{type:"text",value:l.model,onChange:_=>d({...l,model:_.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"})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Input price / 1M tokens ($)"}),g.jsx("input",{type:"number",min:0,step:.001,value:l.input_price_per_1m,onChange:_=>d({...l,input_price_per_1m:parseFloat(_.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"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Output price / 1M tokens ($)"}),g.jsx("input",{type:"number",min:0,step:.001,value:l.output_price_per_1m,onChange:_=>d({...l,output_price_per_1m:parseFloat(_.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"})]})]}),g.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[g.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"}),g.jsx("button",{onClick:j,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"})]})]})]})}),g.jsx(ea,{open:!!f,onOpenChange:_=>!_&&h(null),children:g.jsxs(Lo,{children:[g.jsx(ta,{children:g.jsx(na,{children:"Delete Pricing Entry"})}),g.jsxs("div",{className:"p-4 space-y-4",children:[g.jsxs("p",{className:"text-sm text-azure-text-primary dark:text-matrix-text",children:["Are you sure you want to delete the pricing for"," ",g.jsxs("span",{className:"font-mono font-semibold text-azure-primary dark:text-matrix-highlight",children:[f?.provider,"/",f?.model]}),"? This cannot be undone."]}),g.jsxs("div",{className:"flex justify-end gap-3",children:[g.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"}),g.jsx("button",{onClick:A,className:"px-4 py-2 rounded-lg bg-red-600 text-white text-sm font-medium hover:bg-red-700 transition-colors",children:"Delete"})]})]})]})})]})},OH={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},TS={hidden:{opacity:0,y:10},show:{opacity:1,y:0}},RH=["ui","telegram"],ES=()=>({name:"",prompt:"",notification_channels:["ui"]}),MH=()=>{const{data:e=[],mutate:t}=rr("/webhooks",()=>Ra.list(),{refreshInterval:1e4}),[n,a]=z.useState(!1),[o,u]=z.useState(null),[l,d]=z.useState(ES()),[f,h]=z.useState(null),[p,x]=z.useState(null),[b,v]=z.useState(!1),[w,E]=z.useState(null),[N,j]=z.useState(null),A=(te,oe)=>{x({type:te,message:oe}),setTimeout(()=>x(null),3500)},_=()=>{u(null),d(ES()),j(null),a(!0)},P=te=>{u(te),d({name:te.name,prompt:te.prompt,notification_channels:te.notification_channels}),j(null),a(!0)},D=te=>/^[a-z0-9-_]+$/.test(te),L=async()=>{if(!(!l.name.trim()||!l.prompt.trim())){if(!D(l.name)){j("Name must only contain lowercase letters, numbers, hyphens (-) and underscores (_).");return}if(l.notification_channels.length===0){j("Select at least one notification channel.");return}j(null),v(!0);try{o?(await Ra.update(o.id,l),A("success","Webhook updated.")):(await Ra.create(l),A("success","Webhook created.")),await t(),a(!1)}catch(te){const oe=te?.message||"Failed to save webhook.";j(oe)}finally{v(!1)}}},G=async te=>{try{await Ra.update(te.id,{enabled:!te.enabled}),await t()}catch{A("error","Failed to toggle webhook.")}},Z=async()=>{if(f)try{await Ra.delete(f.id),await t(),h(null),A("success","Webhook deleted.")}catch{A("error","Failed to delete webhook.")}},J=te=>`${window.location.origin}/api/webhooks/trigger/${te}`,ce=te=>`curl -X POST ${J(te.name)} \\
110
+ -H "x-api-key: ${te.api_key}" \\
111
+ -H "Content-Type: application/json" \\
112
+ -d '{"event":"your_payload"}'`,$=async(te,oe)=>{await navigator.clipboard.writeText(te),E(oe),setTimeout(()=>E(null),2e3)},ie=te=>{const oe=l.notification_channels.includes(te);d({...l,notification_channels:oe?l.notification_channels.filter(re=>re!==te):[...l.notification_channels,te]})};return g.jsxs(Tt.div,{variants:OH,initial:"hidden",animate:"show",className:"space-y-6",children:[g.jsxs(Tt.div,{variants:TS,className:"flex items-center justify-between flex-wrap gap-3",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Mm,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Webhooks"}),g.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-dim mt-0.5",children:"Trigger Oracle agent tasks from external events."})]})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs(kr,{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:[g.jsx(ml,{className:"w-4 h-4"}),"Notifications"]}),g.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:[g.jsx(QS,{className:"w-4 h-4"}),"New Webhook"]})]})]}),p&&g.jsx(Tt.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:`px-4 py-3 rounded-lg text-sm font-medium border ${p.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:p.message}),g.jsx(Tt.div,{variants:TS,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-hidden",children:g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:g.jsx("tr",{children:["Name","API Key","Channels","Triggers","Status","Actions"].map(te=>g.jsx("th",{className:"px-4 py-3 text-left font-semibold text-azure-text-secondary dark:text-matrix-dim",children:te},te))})}),g.jsx("tbody",{children:e.length===0?g.jsx("tr",{children:g.jsxs("td",{colSpan:6,className:"px-4 py-10 text-center text-azure-text-secondary dark:text-matrix-dim",children:["No webhooks yet."," ",g.jsx("button",{onClick:_,className:"underline text-azure-primary dark:text-matrix-highlight",children:"Create one"})]})}):e.map(te=>g.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:[g.jsx("td",{className:"px-4 py-3",children:g.jsx("span",{className:"font-mono text-azure-text-primary dark:text-matrix-text font-medium",children:te.name})}),g.jsx("td",{className:"px-4 py-3",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.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),"…"]}),g.jsx("button",{onClick:()=>$(ce(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}`?g.jsx(Om,{className:"w-3.5 h-3.5 text-green-500"}):g.jsx(Rm,{className:"w-3.5 h-3.5"})}),g.jsx("button",{onClick:()=>$(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}`?g.jsx(Om,{className:"w-3.5 h-3.5 text-green-500"}):g.jsx(wN,{className:"w-3.5 h-3.5"})})]})}),g.jsx("td",{className:"px-4 py-3",children:g.jsx("div",{className:"flex gap-1 flex-wrap",children:te.notification_channels.map(oe=>g.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:oe},oe))})}),g.jsx("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:te.trigger_count}),g.jsx("td",{className:"px-4 py-3",children:g.jsx("button",{onClick:()=>G(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?g.jsxs(g.Fragment,{children:[g.jsx(lA,{className:"w-3.5 h-3.5"})," Enabled"]}):g.jsxs(g.Fragment,{children:[g.jsx(oA,{className:"w-3.5 h-3.5"})," Disabled"]})})}),g.jsx("td",{className:"px-4 py-3",children:g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("button",{onClick:()=>P(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:g.jsx(Bp,{className:"w-4 h-4"})}),g.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:g.jsx(gl,{className:"w-4 h-4"})})]})})]},te.id))})]})})}),g.jsxs(ea,{open:n,onOpenChange:a,children:[g.jsx(ta,{children:g.jsx(na,{className:"text-azure-text-primary dark:text-matrix-highlight",children:o?"Edit Webhook":"New Webhook"})}),g.jsxs("div",{className:"p-6 space-y-4 overflow-y-auto",children:[g.jsxs("div",{children:[g.jsxs("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:["Name ",g.jsx("span",{className:"text-azure-text-muted dark:text-matrix-dim/60 font-normal",children:"(slug — used in URL)"})]}),g.jsx("input",{type:"text",value:l.name,onChange:te=>{d({...l,name:te.target.value.toLowerCase().replace(/\s+/g,"-")}),j(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&&g.jsxs("p",{className:"mt-1 text-xs text-azure-text-secondary dark:text-matrix-dim",children:["Trigger URL:"," ",g.jsxs("code",{className:"font-mono text-azure-primary dark:text-matrix-highlight",children:["POST /api/webhooks/trigger/",l.name]})]})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Agent Prompt"}),g.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"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-2",children:"Notification Channels"}),g.jsx("div",{className:"flex gap-4",children:RH.map(te=>g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:l.notification_channels.includes(te),onChange:()=>ie(te),className:"rounded border-azure-border dark:border-matrix-primary accent-azure-primary dark:accent-matrix-highlight"}),g.jsx("span",{className:"text-sm text-azure-text-primary dark:text-matrix-text capitalize",children:te})]},te))})]}),N&&g.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:N}),g.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[g.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"}),g.jsx("button",{onClick:L,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"})]})]})]}),g.jsxs(ea,{open:!!f,onOpenChange:te=>!te&&h(null),children:[g.jsx(ta,{children:g.jsx(na,{className:"text-azure-text-primary dark:text-matrix-highlight",children:"Delete Webhook"})}),g.jsxs("div",{className:"p-6 space-y-4",children:[g.jsxs("p",{className:"text-sm text-azure-text-primary dark:text-matrix-text",children:["Delete"," ",g.jsx("span",{className:"font-semibold font-mono dark:text-matrix-highlight",children:f?.name}),"? This also removes all associated notifications and cannot be undone."]}),g.jsxs("div",{className:"flex justify-end gap-3",children:[g.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"}),g.jsx("button",{onClick:Z,className:"px-4 py-2 rounded-lg bg-red-600 text-white text-sm font-medium hover:bg-red-700 transition-colors",children:"Delete"})]})]})]})]})},DH={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},CS={hidden:{opacity:0,y:10},show:{opacity:1,y:0}},jS=({status:e})=>e==="completed"?g.jsxs("div",{className:"flex items-center gap-1.5 text-green-600 dark:text-green-400",children:[g.jsx(xN,{className:"w-4 h-4"}),g.jsx("span",{className:"text-xs",children:"Completed"})]}):e==="failed"?g.jsxs("div",{className:"flex items-center gap-1.5 text-red-600 dark:text-red-400",children:[g.jsx(vN,{className:"w-4 h-4"}),g.jsx("span",{className:"text-xs",children:"Failed"})]}):g.jsxs("div",{className:"flex items-center gap-1.5 text-yellow-600 dark:text-yellow-400",children:[g.jsx(Vp,{className:"w-4 h-4 animate-pulse"}),g.jsx("span",{className:"text-xs",children:"Pending"})]}),bc=e=>new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),$H=e=>{try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}},LH=()=>{const[e,t]=z.useState(!1),[n,a]=z.useState(null),{data:o=[],mutate:u}=rr(["/webhooks/notifications",e],()=>Ra.listNotifications({unreadOnly:e}),{refreshInterval:5e3}),l=o.filter(p=>!p.read).length,d=async p=>{p.length!==0&&(await Ra.markRead(p),await u())},f=()=>{const p=o.filter(x=>!x.read).map(x=>x.id);d(p)},h=async p=>{a(p),p.read||await d([p.id])};return g.jsxs(Tt.div,{variants:DH,initial:"hidden",animate:"show",className:"space-y-6",children:[g.jsxs(Tt.div,{variants:CS,className:"flex items-center justify-between flex-wrap gap-3",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs("div",{className:"relative",children:[g.jsx(ml,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),l>0&&g.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})]}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Notifications"}),g.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-dim mt-0.5",children:"Webhook execution results from the Oracle agent."})]})]}),g.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[g.jsxs(kr,{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:[g.jsx(rN,{className:"w-4 h-4"}),"Back to Webhooks"]}),g.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:[g.jsx(ON,{className:"w-4 h-4"}),"Unread only"]}),l>0&&g.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:[g.jsx(pN,{className:"w-4 h-4"}),"Mark all read"]})]})]}),g.jsx(Tt.div,{variants:CS,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-hidden",children:g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:g.jsx("tr",{children:["","Webhook","Status","Created","Completed","Actions"].map(p=>g.jsx("th",{className:"px-4 py-3 text-left font-semibold text-azure-text-secondary dark:text-matrix-dim",children:p},p))})}),g.jsx("tbody",{children:o.length===0?g.jsx("tr",{children:g.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(p=>g.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 ${p.read?"":"bg-blue-50/40 dark:bg-blue-900/10"}`,children:[g.jsx("td",{className:"px-4 py-3 w-6",children:!p.read&&g.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500 dark:bg-matrix-highlight"})}),g.jsx("td",{className:"px-4 py-3 font-mono font-medium text-azure-text-primary dark:text-matrix-text",children:p.webhook_name}),g.jsx("td",{className:"px-4 py-3",children:g.jsx(jS,{status:p.status})}),g.jsx("td",{className:"px-4 py-3 text-xs text-azure-text-secondary dark:text-matrix-dim whitespace-nowrap",children:bc(p.created_at)}),g.jsx("td",{className:"px-4 py-3 text-xs text-azure-text-secondary dark:text-matrix-dim whitespace-nowrap",children:p.completed_at?bc(p.completed_at):"—"}),g.jsx("td",{className:"px-4 py-3",children:g.jsx("button",{onClick:()=>h(p),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:g.jsx(Zp,{className:"w-4 h-4"})})})]},p.id))})]})})}),g.jsxs(ea,{open:!!n,onOpenChange:p=>!p&&a(null),children:[g.jsx(ta,{children:g.jsxs(na,{className:"text-azure-text-primary dark:text-matrix-highlight flex items-center gap-2",children:[g.jsx(ml,{className:"w-4 h-4"}),n?.webhook_name]})}),n&&g.jsxs("div",{className:"p-6 space-y-4 overflow-y-auto max-h-[65vh]",children:[g.jsxs("div",{className:"flex items-center gap-4 text-xs text-azure-text-secondary dark:text-matrix-dim",children:[g.jsx(jS,{status:n.status}),g.jsx("span",{children:bc(n.created_at)}),n.completed_at&&g.jsxs("span",{children:["→ ",bc(n.completed_at)]})]}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1.5",children:"Received Payload"}),g.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:$H(n.payload)})]}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1.5",children:"Agent Result"}),g.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??g.jsx("span",{className:"text-yellow-600 dark:text-yellow-400 animate-pulse",children:"Processing…"})})]}),g.jsx("div",{className:"flex justify-end pt-2",children:g.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"})})]})]})]})};function UH(){return g.jsx($j,{children:g.jsxs(c0,{children:[g.jsx(wn,{path:"/login",element:g.jsx(dH,{})}),g.jsx(wn,{path:"/*",element:g.jsx(fH,{children:g.jsx($D,{children:g.jsxs(c0,{children:[g.jsx(wn,{path:"/",element:g.jsx(PD,{})}),g.jsx(wn,{path:"/chat",element:g.jsx(cL,{})}),g.jsx(wn,{path:"/zaion",element:g.jsx(lH,{})}),g.jsx(wn,{path:"/logs",element:g.jsx(uH,{})}),g.jsx(wn,{path:"/stats",element:g.jsx(cH,{})}),g.jsx(wn,{path:"/sati-memories",element:g.jsx(SH,{})}),g.jsx(wn,{path:"/mcp-servers",element:g.jsx(CH,{})}),g.jsx(wn,{path:"/model-pricing",element:g.jsx(AH,{})}),g.jsx(wn,{path:"/webhooks",element:g.jsx(MH,{})}),g.jsx(wn,{path:"/notifications",element:g.jsx(LH,{})}),g.jsx(wn,{path:"*",element:g.jsx(IS,{to:"/",replace:!0})})]})})})})]})})}gC.createRoot(document.getElementById("root")).render(g.jsx(z.StrictMode,{children:g.jsx(UH,{})}));