morpheus-cli 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -0
- package/dist/cli/commands/start.js +9 -5
- package/dist/config/manager.js +32 -0
- package/dist/config/schemas.js +5 -0
- package/dist/devkit/adapters/shell.js +80 -0
- package/dist/devkit/index.js +10 -0
- package/dist/devkit/registry.js +12 -0
- package/dist/devkit/tools/filesystem.js +219 -0
- package/dist/devkit/tools/git.js +210 -0
- package/dist/devkit/tools/network.js +158 -0
- package/dist/devkit/tools/packages.js +73 -0
- package/dist/devkit/tools/processes.js +130 -0
- package/dist/devkit/tools/shell.js +94 -0
- package/dist/devkit/tools/system.js +132 -0
- package/dist/devkit/types.js +1 -0
- package/dist/devkit/utils.js +45 -0
- package/dist/http/api.js +46 -0
- package/dist/runtime/apoc.js +110 -0
- package/dist/runtime/lifecycle.js +22 -0
- package/dist/runtime/providers/factory.js +85 -80
- package/dist/runtime/tools/apoc-tool.js +43 -0
- package/dist/runtime/tools/index.js +1 -0
- package/dist/types/config.js +6 -0
- package/dist/ui/assets/index-CjlkpcsE.js +109 -0
- package/dist/ui/index.html +1 -1
- package/dist/ui/sw.js +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/index-CovGlIO5.js +0 -109
|
@@ -0,0 +1,109 @@
|
|
|
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"]'))i(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"&&i(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 i(o){if(o.ep)return;o.ep=!0;const u=n(o);fetch(o.href,u)}})();function zp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wh={exports:{}},Is={};var Vb;function JT(){if(Vb)return Is;Vb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,u){var l=null;if(u!==void 0&&(l=""+u),o.key!==void 0&&(l=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:i,key:l,ref:o!==void 0?o:null,props:u}}return Is.Fragment=t,Is.jsx=n,Is.jsxs=n,Is}var Zb;function QT(){return Zb||(Zb=1,wh.exports=JT()),wh.exports}var x=QT(),zh={exports:{}},Te={};var Bb;function WT(){if(Bb)return Te;Bb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(C){return C===null||typeof C!="object"?null:(C=v&&C[v]||C["@@iterator"],typeof C=="function"?C:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,A={};function j(C,G,z){this.props=C,this.context=G,this.refs=A,this.updater=z||E}j.prototype.isReactComponent={},j.prototype.setState=function(C,G){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,G,"setState")},j.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function O(){}O.prototype=j.prototype;function w(C,G,z){this.props=C,this.context=G,this.refs=A,this.updater=z||E}var P=w.prototype=new O;P.constructor=w,T(P,j.prototype),P.isPureReactComponent=!0;var D=Array.isArray;function L(){}var Y={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function J(C,G,z){var ae=z.ref;return{$$typeof:e,type:C,key:G,ref:ae!==void 0?ae:null,props:z}}function ue(C,G){return J(C.type,G,C.props)}function $(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function ie(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(z){return G[z]})}var ve=/\/+/g;function se(C,G){return typeof C=="object"&&C!==null&&C.key!=null?ie(""+C.key):G.toString(36)}function ne(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(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function V(C,G,z,ae,be){var pe=typeof C;(pe==="undefined"||pe==="boolean")&&(C=null);var ge=!1;if(C===null)ge=!0;else switch(pe){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(C.$$typeof){case e:case t:ge=!0;break;case p:return ge=C._init,V(ge(C._payload),G,z,ae,be)}}if(ge)return be=be(C),ge=ae===""?"."+se(C,0):ae,D(be)?(z="",ge!=null&&(z=ge.replace(ve,"$&/")+"/"),V(be,G,z,"",function(At){return At})):be!=null&&($(be)&&(be=ue(be,z+(be.key==null||C&&C.key===be.key?"":(""+be.key).replace(ve,"$&/")+"/")+ge)),G.push(be)),1;ge=0;var Ge=ae===""?".":ae+":";if(D(C))for(var De=0;De<C.length;De++)ae=C[De],pe=Ge+se(ae,De),ge+=V(ae,G,z,pe,be);else if(De=b(C),typeof De=="function")for(C=De.call(C),De=0;!(ae=C.next()).done;)ae=ae.value,pe=Ge+se(ae,De++),ge+=V(ae,G,z,pe,be);else if(pe==="object"){if(typeof C.then=="function")return V(ne(C),G,z,ae,be);throw G=String(C),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ge}function X(C,G,z){if(C==null)return C;var ae=[],be=0;return V(C,ae,"","",function(pe){return G.call(z,pe,be++)}),ae}function Z(C){if(C._status===-1){var G=C._result;G=G(),G.then(function(z){(C._status===0||C._status===-1)&&(C._status=1,C._result=z)},function(z){(C._status===0||C._status===-1)&&(C._status=2,C._result=z)}),C._status===-1&&(C._status=0,C._result=G)}if(C._status===1)return C._result.default;throw C._result}var ce=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=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(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},N={map:X,forEach:function(C,G,z){X(C,function(){G.apply(this,arguments)},z)},count:function(C){var G=0;return X(C,function(){G++}),G},toArray:function(C){return X(C,function(G){return G})||[]},only:function(C){if(!$(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Te.Activity=y,Te.Children=N,Te.Component=j,Te.Fragment=n,Te.Profiler=o,Te.PureComponent=w,Te.StrictMode=i,Te.Suspense=d,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,Te.__COMPILER_RUNTIME={__proto__:null,c:function(C){return Y.H.useMemoCache(C)}},Te.cache=function(C){return function(){return C.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(C,G,z){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var ae=T({},C.props),be=C.key;if(G!=null)for(pe in G.key!==void 0&&(be=""+G.key),G)!B.call(G,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&G.ref===void 0||(ae[pe]=G[pe]);var pe=arguments.length-2;if(pe===1)ae.children=z;else if(1<pe){for(var ge=Array(pe),Ge=0;Ge<pe;Ge++)ge[Ge]=arguments[Ge+2];ae.children=ge}return J(C.type,be,ae)},Te.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},Te.createElement=function(C,G,z){var ae,be={},pe=null;if(G!=null)for(ae in G.key!==void 0&&(pe=""+G.key),G)B.call(G,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(be[ae]=G[ae]);var ge=arguments.length-2;if(ge===1)be.children=z;else if(1<ge){for(var Ge=Array(ge),De=0;De<ge;De++)Ge[De]=arguments[De+2];be.children=Ge}if(C&&C.defaultProps)for(ae in ge=C.defaultProps,ge)be[ae]===void 0&&(be[ae]=ge[ae]);return J(C,pe,be)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(C){return{$$typeof:f,render:C}},Te.isValidElement=$,Te.lazy=function(C){return{$$typeof:p,_payload:{_status:-1,_result:C},_init:Z}},Te.memo=function(C,G){return{$$typeof:h,type:C,compare:G===void 0?null:G}},Te.startTransition=function(C){var G=Y.T,z={};Y.T=z;try{var ae=C(),be=Y.S;be!==null&&be(z,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(L,ce)}catch(pe){ce(pe)}finally{G!==null&&z.types!==null&&(G.types=z.types),Y.T=G}},Te.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},Te.use=function(C){return Y.H.use(C)},Te.useActionState=function(C,G,z){return Y.H.useActionState(C,G,z)},Te.useCallback=function(C,G){return Y.H.useCallback(C,G)},Te.useContext=function(C){return Y.H.useContext(C)},Te.useDebugValue=function(){},Te.useDeferredValue=function(C,G){return Y.H.useDeferredValue(C,G)},Te.useEffect=function(C,G){return Y.H.useEffect(C,G)},Te.useEffectEvent=function(C){return Y.H.useEffectEvent(C)},Te.useId=function(){return Y.H.useId()},Te.useImperativeHandle=function(C,G,z){return Y.H.useImperativeHandle(C,G,z)},Te.useInsertionEffect=function(C,G){return Y.H.useInsertionEffect(C,G)},Te.useLayoutEffect=function(C,G){return Y.H.useLayoutEffect(C,G)},Te.useMemo=function(C,G){return Y.H.useMemo(C,G)},Te.useOptimistic=function(C,G){return Y.H.useOptimistic(C,G)},Te.useReducer=function(C,G,z){return Y.H.useReducer(C,G,z)},Te.useRef=function(C){return Y.H.useRef(C)},Te.useState=function(C){return Y.H.useState(C)},Te.useSyncExternalStore=function(C,G,z){return Y.H.useSyncExternalStore(C,G,z)},Te.useTransition=function(){return Y.H.useTransition()},Te.version="19.2.4",Te}var Ib;function qc(){return Ib||(Ib=1,zh.exports=WT()),zh.exports}var _=qc();const _p=zp(_);var _h={exports:{}},Hs={},Eh={exports:{}},Th={};var Hb;function eC(){return Hb||(Hb=1,(function(e){function t(V,X){var Z=V.length;V.push(X);e:for(;0<Z;){var ce=Z-1>>>1,N=V[ce];if(0<o(N,X))V[ce]=X,V[Z]=N,Z=ce;else break e}}function n(V){return V.length===0?null:V[0]}function i(V){if(V.length===0)return null;var X=V[0],Z=V.pop();if(Z!==X){V[0]=Z;e:for(var ce=0,N=V.length,C=N>>>1;ce<C;){var G=2*(ce+1)-1,z=V[G],ae=G+1,be=V[ae];if(0>o(z,Z))ae<N&&0>o(be,z)?(V[ce]=be,V[ae]=Z,ce=ae):(V[ce]=z,V[G]=Z,ce=G);else if(ae<N&&0>o(be,Z))V[ce]=be,V[ae]=Z,ce=ae;else break e}}return X}function o(V,X){var Z=V.sortIndex-X.sortIndex;return Z!==0?Z: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,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],p=1,y=null,v=3,b=!1,E=!1,T=!1,A=!1,j=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function P(V){for(var X=n(h);X!==null;){if(X.callback===null)i(h);else if(X.startTime<=V)i(h),X.sortIndex=X.expirationTime,t(d,X);else break;X=n(h)}}function D(V){if(T=!1,P(V),!E)if(n(d)!==null)E=!0,L||(L=!0,ie());else{var X=n(h);X!==null&&ne(D,X.startTime-V)}}var L=!1,Y=-1,B=5,J=-1;function ue(){return A?!0:!(e.unstable_now()-J<B)}function $(){if(A=!1,L){var V=e.unstable_now();J=V;var X=!0;try{e:{E=!1,T&&(T=!1,O(Y),Y=-1),b=!0;var Z=v;try{t:{for(P(V),y=n(d);y!==null&&!(y.expirationTime>V&&ue());){var ce=y.callback;if(typeof ce=="function"){y.callback=null,v=y.priorityLevel;var N=ce(y.expirationTime<=V);if(V=e.unstable_now(),typeof N=="function"){y.callback=N,P(V),X=!0;break t}y===n(d)&&i(d),P(V)}else i(d);y=n(d)}if(y!==null)X=!0;else{var C=n(h);C!==null&&ne(D,C.startTime-V),X=!1}}break e}finally{y=null,v=Z,b=!1}X=void 0}}finally{X?ie():L=!1}}}var ie;if(typeof w=="function")ie=function(){w($)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,se=ve.port2;ve.port1.onmessage=$,ie=function(){se.postMessage(null)}}else ie=function(){j($,0)};function ne(V,X){Y=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"):B=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(V){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var Z=v;v=X;try{return V()}finally{v=Z}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(V,X){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var Z=v;v=V;try{return X()}finally{v=Z}},e.unstable_scheduleCallback=function(V,X,Z){var ce=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ce+Z:ce):Z=ce,V){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=Z+N,V={id:p++,callback:X,priorityLevel:V,startTime:Z,expirationTime:N,sortIndex:-1},Z>ce?(V.sortIndex=Z,t(h,V),n(d)===null&&V===n(h)&&(T?(O(Y),Y=-1):T=!0,ne(D,Z-ce))):(V.sortIndex=N,t(d,V),E||b||(E=!0,L||(L=!0,ie()))),V},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(V){var X=v;return function(){var Z=v;v=X;try{return V.apply(this,arguments)}finally{v=Z}}}})(Th)),Th}var Fb;function tC(){return Fb||(Fb=1,Eh.exports=eC()),Eh.exports}var Ch={exports:{}},tn={};var qb;function nC(){if(qb)return tn;qb=1;var e=qc();function t(d){var h="https://react.dev/errors/"+d;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 #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={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(d,h,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:d,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,tn.createPortal=function(d,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(d,h,null,p)},tn.flushSync=function(d){var h=l.T,p=i.p;try{if(l.T=null,i.p=2,d)return d()}finally{l.T=h,i.p=p,i.d.f()}},tn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},tn.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},tn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var p=h.as,y=f(p,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):p==="script"&&i.d.X(d,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},tn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},tn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,y=f(p,h.crossOrigin);i.d.L(d,p,{crossOrigin:y,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})}},tn.preloadModule=function(d,h){if(typeof d=="string")if(h){var p=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},tn.requestFormReset=function(d){i.d.r(d)},tn.unstable_batchedUpdates=function(d,h){return d(h)},tn.useFormState=function(d,h,p){return l.H.useFormState(d,h,p)},tn.useFormStatus=function(){return l.H.useHostTransitionStatus()},tn.version="19.2.4",tn}var Gb;function rC(){if(Gb)return Ch.exports;Gb=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=nC(),Ch.exports}var Yb;function iC(){if(Yb)return Hs;Yb=1;var e=tC(),t=qc(),n=rC();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+a+" 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 a=r,s=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(s=a.return),r=a.return;while(r)}return a.tag===3?s:null}function l(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(u(r)!==r)throw Error(i(188))}function h(r){var a=r.alternate;if(!a){if(a=u(r),a===null)throw Error(i(188));return a!==r?null:r}for(var s=r,c=a;;){var m=s.return;if(m===null)break;var g=m.alternate;if(g===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===g.child){for(g=m.child;g;){if(g===s)return d(m),r;if(g===c)return d(m),a;g=g.sibling}throw Error(i(188))}if(s.return!==c.return)s=m,c=g;else{for(var S=!1,k=m.child;k;){if(k===s){S=!0,s=m,c=g;break}if(k===c){S=!0,c=m,s=g;break}k=k.sibling}if(!S){for(k=g.child;k;){if(k===s){S=!0,s=g,c=m;break}if(k===c){S=!0,c=g,s=m;break}k=k.sibling}if(!S)throw Error(i(189))}}if(s.alternate!==c)throw Error(i(190))}if(s.tag!==3)throw Error(i(188));return s.stateNode.current===s?r:a}function p(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=p(r),a!==null)return a;r=r.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),w=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),ue=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 ve=Symbol.for("react.client.reference");function se(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ve?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case T:return"Fragment";case j:return"Profiler";case A:return"StrictMode";case D:return"Suspense";case L:return"SuspenseList";case J:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case E:return"Portal";case w:return r.displayName||"Context";case O:return(r._context.displayName||"Context")+".Consumer";case P:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Y:return a=r.displayName||null,a!==null?a:se(r.type)||"Memo";case B:a=r._payload,r=r._init;try{return se(r(a))}catch{}}return null}var ne=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,Z={pending:!1,data:null,method:null,action:null},ce=[],N=-1;function C(r){return{current:r}}function G(r){0>N||(r.current=ce[N],ce[N]=null,N--)}function z(r,a){N++,ce[N]=r.current,r.current=a}var ae=C(null),be=C(null),pe=C(null),ge=C(null);function Ge(r,a){switch(z(pe,a),z(be,r),z(ae,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?ub(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=ub(a),r=cb(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}G(ae),z(ae,r)}function De(){G(ae),G(be),G(pe)}function At(r){r.memoizedState!==null&&z(ge,r);var a=ae.current,s=cb(a,r.type);a!==s&&(z(be,r),z(ae,s))}function on(r){be.current===r&&(G(ae),G(be)),ge.current===r&&(G(ge),Ps._currentValue=Z)}var Un,mr;function Pn(r){if(Un===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Un=a&&a[1]||"",mr=-1<s.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Un+r+mr}var Bi=!1;function Ze(r,a){if(!r||Bi)return"";Bi=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var te=function(){throw Error()};if(Object.defineProperty(te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(te,[])}catch(q){var F=q}Reflect.construct(r,[],te)}else{try{te.call()}catch(q){F=q}r.call(te.prototype)}}else{try{throw Error()}catch(q){F=q}(te=r())&&typeof te.catch=="function"&&te.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 g=c.DetermineComponentFrameRoot(),S=g[0],k=g[1];if(S&&k){var R=S.split(`
|
|
4
|
+
`),H=k.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{Bi=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?Pn(s):""}function nt(r,a){switch(r.tag){case 26:case 27:case 5:return Pn(r.type);case 16:return Pn("Lazy");case 13:return r.child!==a&&a!==null?Pn("Suspense Fallback"):Pn("Suspense");case 19:return Pn("SuspenseList");case 0:case 15:return Ze(r.type,!1);case 11:return Ze(r.type.render,!1);case 1:return Ze(r.type,!0);case 31:return Pn("Activity");default:return""}}function lt(r){try{var a="",s=null;do a+=nt(r,s),s=r,r=r.return;while(r);return a}catch(c){return`
|
|
7
|
+
Error generating stack: `+c.message+`
|
|
8
|
+
`+c.stack}}var Je=Object.prototype.hasOwnProperty,Ht=e.unstable_scheduleCallback,Vn=e.unstable_cancelCallback,Et=e.unstable_shouldYield,Pt=e.unstable_requestPaint,ut=e.unstable_now,za=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,le=e.unstable_UserBlockingPriority,ye=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Pe=e.unstable_IdlePriority,sn=e.log,Tn=e.unstable_setDisableYieldValue,ln=null,Vt=null;function pn(r){if(typeof sn=="function"&&Tn(r),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(ln,r)}catch{}}var rt=Math.clz32?Math.clz32:L2,Wr=Math.log,or=Math.LN2;function L2(r){return r>>>=0,r===0?32:31-(Wr(r)/or|0)|0}var Dl=256,$l=262144,Ll=4194304;function Ii(r){var a=r&42;if(a!==0)return a;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 Ul(r,a,s){var c=r.pendingLanes;if(c===0)return 0;var m=0,g=r.suspendedLanes,S=r.pingedLanes;r=r.warmLanes;var k=c&134217727;return k!==0?(c=k&~g,c!==0?m=Ii(c):(S&=k,S!==0?m=Ii(S):s||(s=k&~r,s!==0&&(m=Ii(s))))):(k=c&~g,k!==0?m=Ii(k):S!==0?m=Ii(S):s||(s=c&~r,s!==0&&(m=Ii(s)))),m===0?0:a!==0&&a!==m&&(a&g)===0&&(g=m&-m,s=a&-a,g>=s||g===32&&(s&4194048)!==0)?a:m}function Qo(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function U2(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Hg(){var r=Ll;return Ll<<=1,(Ll&62914560)===0&&(Ll=4194304),r}function ff(r){for(var a=[],s=0;31>s;s++)a.push(r);return a}function Wo(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function P2(r,a,s,c,m,g){var S=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 k=r.entanglements,R=r.expirationTimes,H=r.hiddenUpdates;for(s=S&~s;0<s;){var K=31-rt(s),te=1<<K;k[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&=~te}c!==0&&Fg(r,c,0),g!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=g&~(S&~a))}function Fg(r,a,s){r.pendingLanes|=a,r.suspendedLanes&=~a;var c=31-rt(a);r.entangledLanes|=a,r.entanglements[c]=r.entanglements[c]|1073741824|s&261930}function qg(r,a){var s=r.entangledLanes|=a;for(r=r.entanglements;s;){var c=31-rt(s),m=1<<c;m&a|r[c]&a&&(r[c]|=a),s&=~m}}function Gg(r,a){var s=a&-a;return s=(s&42)!==0?1:df(s),(s&(r.suspendedLanes|a))!==0?0:s}function df(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 hf(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Yg(){var r=X.p;return r!==0?r:(r=window.event,r===void 0?32:Rb(r.type))}function Xg(r,a){var s=X.p;try{return X.p=r,a()}finally{X.p=s}}var ei=Math.random().toString(36).slice(2),Yt="__reactFiber$"+ei,gn="__reactProps$"+ei,_a="__reactContainer$"+ei,mf="__reactEvents$"+ei,V2="__reactListeners$"+ei,Z2="__reactHandles$"+ei,Kg="__reactResources$"+ei,es="__reactMarker$"+ei;function pf(r){delete r[Yt],delete r[gn],delete r[mf],delete r[V2],delete r[Z2]}function Ea(r){var a=r[Yt];if(a)return a;for(var s=r.parentNode;s;){if(a=s[_a]||s[Yt]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(r=yb(r);r!==null;){if(s=r[Yt])return s;r=yb(r)}return a}r=s,s=r.parentNode}return null}function Ta(r){if(r=r[Yt]||r[_a]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function ts(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function Ca(r){var a=r[Kg];return a||(a=r[Kg]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ft(r){r[es]=!0}var Jg=new Set,Qg={};function Hi(r,a){Aa(r,a),Aa(r+"Capture",a)}function Aa(r,a){for(Qg[r]=a,r=0;r<a.length;r++)Jg.add(a[r])}var B2=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]*$"),Wg={},ey={};function I2(r){return Je.call(ey,r)?!0:Je.call(Wg,r)?!1:B2.test(r)?ey[r]=!0:(Wg[r]=!0,!1)}function Pl(r,a,s){if(I2(a))if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+s)}}function Vl(r,a,s){if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+s)}}function Tr(r,a,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(a,s,""+c)}}function Zn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ty(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function H2(r,a,s){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,g=c.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return m.call(this)},set:function(S){s=""+S,g.call(this,S)}}),Object.defineProperty(r,a,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(S){s=""+S},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function gf(r){if(!r._valueTracker){var a=ty(r)?"checked":"value";r._valueTracker=H2(r,a,""+r[a])}}function ny(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var s=a.getValue(),c="";return r&&(c=ty(r)?r.checked?"true":"false":r.value),r=c,r!==s?(a.setValue(r),!0):!1}function Zl(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 F2=/[\n"\\]/g;function Bn(r){return r.replace(F2,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function yf(r,a,s,c,m,g,S,k){r.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?r.type=S:r.removeAttribute("type"),a!=null?S==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Zn(a)):r.value!==""+Zn(a)&&(r.value=""+Zn(a)):S!=="submit"&&S!=="reset"||r.removeAttribute("value"),a!=null?xf(r,S,Zn(a)):s!=null?xf(r,S,Zn(s)):c!=null&&r.removeAttribute("value"),m==null&&g!=null&&(r.defaultChecked=!!g),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?r.name=""+Zn(k):r.removeAttribute("name")}function ry(r,a,s,c,m,g,S,k){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),a!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){gf(r);return}s=s!=null?""+Zn(s):"",a=a!=null?""+Zn(a):s,k||a===r.value||(r.value=a),r.defaultValue=a}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=k?r.checked:!!c,r.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(r.name=S),gf(r)}function xf(r,a,s){a==="number"&&Zl(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function ja(r,a,s,c){if(r=r.options,a){a={};for(var m=0;m<s.length;m++)a["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=a.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&c&&(r[s].defaultSelected=!0)}else{for(s=""+Zn(s),a=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}a!==null||r[m].disabled||(a=r[m])}a!==null&&(a.selected=!0)}}function iy(r,a,s){if(a!=null&&(a=""+Zn(a),a!==r.value&&(r.value=a),s==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=s!=null?""+Zn(s):""}function ay(r,a,s,c){if(a==null){if(c!=null){if(s!=null)throw Error(i(92));if(ne(c)){if(1<c.length)throw Error(i(93));c=c[0]}s=c}s==null&&(s=""),a=s}s=Zn(a),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),gf(r)}function Na(r,a){if(a){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=a;return}}r.textContent=a}var q2=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 oy(r,a,s){var c=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":c?r.setProperty(a,s):typeof s!="number"||s===0||q2.has(a)?a==="float"?r.cssFloat=s:r[a]=(""+s).trim():r[a]=s+"px"}function sy(r,a,s){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in a)c=a[m],a.hasOwnProperty(m)&&s[m]!==c&&oy(r,m,c)}else for(var g in a)a.hasOwnProperty(g)&&oy(r,g,a[g])}function vf(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 G2=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"]]),Y2=/^[\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 Bl(r){return Y2.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Cr(){}var bf=null;function Sf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Oa=null,Ra=null;function ly(r){var a=Ta(r);if(a&&(r=a.stateNode)){var s=r[gn]||null;e:switch(r=a.stateNode,a.type){case"input":if(yf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Bn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var c=s[a];if(c!==r&&c.form===r.form){var m=c[gn]||null;if(!m)throw Error(i(90));yf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(a=0;a<s.length;a++)c=s[a],c.form===r.form&&ny(c)}break e;case"textarea":iy(r,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&ja(r,!!s.multiple,a,!1)}}}var kf=!1;function uy(r,a,s){if(kf)return r(a,s);kf=!0;try{var c=r(a);return c}finally{if(kf=!1,(Oa!==null||Ra!==null)&&(Au(),Oa&&(a=Oa,r=Ra,Ra=Oa=null,ly(a),r)))for(a=0;a<r.length;a++)ly(r[a])}}function ns(r,a){var s=r.stateNode;if(s===null)return null;var c=s[gn]||null;if(c===null)return null;s=c[a];e:switch(a){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(i(231,a,typeof s));return s}var Ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wf=!1;if(Ar)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){wf=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{wf=!1}var ti=null,zf=null,Il=null;function cy(){if(Il)return Il;var r,a=zf,s=a.length,c,m="value"in ti?ti.value:ti.textContent,g=m.length;for(r=0;r<s&&a[r]===m[r];r++);var S=s-r;for(c=1;c<=S&&a[s-c]===m[g-c];c++);return Il=m.slice(r,1<c?1-c:void 0)}function Hl(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Fl(){return!0}function fy(){return!1}function yn(r){function a(s,c,m,g,S){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=g,this.target=S,this.currentTarget=null;for(var k in r)r.hasOwnProperty(k)&&(s=r[k],this[k]=s?s(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Fl:fy,this.isPropagationStopped=fy,this}return y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Fl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Fl)},persist:function(){},isPersistent:Fl}),a}var Fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ql=yn(Fi),is=y({},Fi,{view:0,detail:0}),X2=yn(is),_f,Ef,as,Gl=y({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cf,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!==as&&(as&&r.type==="mousemove"?(_f=r.screenX-as.screenX,Ef=r.screenY-as.screenY):Ef=_f=0,as=r),_f)},movementY:function(r){return"movementY"in r?r.movementY:Ef}}),dy=yn(Gl),K2=y({},Gl,{dataTransfer:0}),J2=yn(K2),Q2=y({},is,{relatedTarget:0}),Tf=yn(Q2),W2=y({},Fi,{animationName:0,elapsedTime:0,pseudoElement:0}),eE=yn(W2),tE=y({},Fi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),nE=yn(tE),rE=y({},Fi,{data:0}),hy=yn(rE),iE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aE={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"},oE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sE(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=oE[r])?!!a[r]:!1}function Cf(){return sE}var lE=y({},is,{key:function(r){if(r.key){var a=iE[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=Hl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?aE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cf,charCode:function(r){return r.type==="keypress"?Hl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Hl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),uE=yn(lE),cE=y({},Gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),my=yn(cE),fE=y({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cf}),dE=yn(fE),hE=y({},Fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),mE=yn(hE),pE=y({},Gl,{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}),gE=yn(pE),yE=y({},Fi,{newState:0,oldState:0}),xE=yn(yE),vE=[9,13,27,32],Af=Ar&&"CompositionEvent"in window,os=null;Ar&&"documentMode"in document&&(os=document.documentMode);var bE=Ar&&"TextEvent"in window&&!os,py=Ar&&(!Af||os&&8<os&&11>=os),gy=" ",yy=!1;function xy(r,a){switch(r){case"keyup":return vE.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vy(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ma=!1;function SE(r,a){switch(r){case"compositionend":return vy(a);case"keypress":return a.which!==32?null:(yy=!0,gy);case"textInput":return r=a.data,r===gy&&yy?null:r;default:return null}}function kE(r,a){if(Ma)return r==="compositionend"||!Af&&xy(r,a)?(r=cy(),Il=zf=ti=null,Ma=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return py&&a.locale!=="ko"?null:a.data;default:return null}}var wE={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 by(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!wE[r.type]:a==="textarea"}function Sy(r,a,s,c){Oa?Ra?Ra.push(c):Ra=[c]:Oa=c,a=$u(a,"onChange"),0<a.length&&(s=new ql("onChange","change",null,s,c),r.push({event:s,listeners:a}))}var ss=null,ls=null;function zE(r){rb(r,0)}function Yl(r){var a=ts(r);if(ny(a))return r}function ky(r,a){if(r==="change")return a}var wy=!1;if(Ar){var jf;if(Ar){var Nf="oninput"in document;if(!Nf){var zy=document.createElement("div");zy.setAttribute("oninput","return;"),Nf=typeof zy.oninput=="function"}jf=Nf}else jf=!1;wy=jf&&(!document.documentMode||9<document.documentMode)}function _y(){ss&&(ss.detachEvent("onpropertychange",Ey),ls=ss=null)}function Ey(r){if(r.propertyName==="value"&&Yl(ls)){var a=[];Sy(a,ls,r,Sf(r)),uy(zE,a)}}function _E(r,a,s){r==="focusin"?(_y(),ss=a,ls=s,ss.attachEvent("onpropertychange",Ey)):r==="focusout"&&_y()}function EE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Yl(ls)}function TE(r,a){if(r==="click")return Yl(a)}function CE(r,a){if(r==="input"||r==="change")return Yl(a)}function AE(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var Cn=typeof Object.is=="function"?Object.is:AE;function us(r,a){if(Cn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var s=Object.keys(r),c=Object.keys(a);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Je.call(a,m)||!Cn(r[m],a[m]))return!1}return!0}function Ty(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Cy(r,a){var s=Ty(r);r=0;for(var c;s;){if(s.nodeType===3){if(c=r+s.textContent.length,r<=a&&c>=a)return{node:s,offset:a-r};r=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Ty(s)}}function Ay(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?Ay(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function jy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Zl(r.document);a instanceof r.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)r=a.contentWindow;else break;a=Zl(r.document)}return a}function Of(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var jE=Ar&&"documentMode"in document&&11>=document.documentMode,Da=null,Rf=null,cs=null,Mf=!1;function Ny(r,a,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Mf||Da==null||Da!==Zl(c)||(c=Da,"selectionStart"in c&&Of(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}),cs&&us(cs,c)||(cs=c,c=$u(Rf,"onSelect"),0<c.length&&(a=new ql("onSelect","select",null,a,s),r.push({event:a,listeners:c}),a.target=Da)))}function qi(r,a){var s={};return s[r.toLowerCase()]=a.toLowerCase(),s["Webkit"+r]="webkit"+a,s["Moz"+r]="moz"+a,s}var $a={animationend:qi("Animation","AnimationEnd"),animationiteration:qi("Animation","AnimationIteration"),animationstart:qi("Animation","AnimationStart"),transitionrun:qi("Transition","TransitionRun"),transitionstart:qi("Transition","TransitionStart"),transitioncancel:qi("Transition","TransitionCancel"),transitionend:qi("Transition","TransitionEnd")},Df={},Oy={};Ar&&(Oy=document.createElement("div").style,"AnimationEvent"in window||(delete $a.animationend.animation,delete $a.animationiteration.animation,delete $a.animationstart.animation),"TransitionEvent"in window||delete $a.transitionend.transition);function Gi(r){if(Df[r])return Df[r];if(!$a[r])return r;var a=$a[r],s;for(s in a)if(a.hasOwnProperty(s)&&s in Oy)return Df[r]=a[s];return r}var Ry=Gi("animationend"),My=Gi("animationiteration"),Dy=Gi("animationstart"),NE=Gi("transitionrun"),OE=Gi("transitionstart"),RE=Gi("transitioncancel"),$y=Gi("transitionend"),Ly=new Map,$f="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(" ");$f.push("scrollEnd");function sr(r,a){Ly.set(r,a),Hi(a,[r])}var Xl=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},In=[],La=0,Lf=0;function Kl(){for(var r=La,a=Lf=La=0;a<r;){var s=In[a];In[a++]=null;var c=In[a];In[a++]=null;var m=In[a];In[a++]=null;var g=In[a];if(In[a++]=null,c!==null&&m!==null){var S=c.pending;S===null?m.next=m:(m.next=S.next,S.next=m),c.pending=m}g!==0&&Uy(s,m,g)}}function Jl(r,a,s,c){In[La++]=r,In[La++]=a,In[La++]=s,In[La++]=c,Lf|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Uf(r,a,s,c){return Jl(r,a,s,c),Ql(r)}function Yi(r,a){return Jl(r,null,null,a),Ql(r)}function Uy(r,a,s){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s);for(var m=!1,g=r.return;g!==null;)g.childLanes|=s,c=g.alternate,c!==null&&(c.childLanes|=s),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(m=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,m&&a!==null&&(m=31-rt(s),r=g.hiddenUpdates,c=r[m],c===null?r[m]=[a]:c.push(a),a.lane=s|536870912),g):null}function Ql(r){if(50<Os)throw Os=0,Gd=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var Ua={};function ME(r,a,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=a,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 An(r,a,s,c){return new ME(r,a,s,c)}function Pf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function jr(r,a){var s=r.alternate;return s===null?(s=An(r.tag,a,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=a,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,a=r.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function Py(r,a){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=a,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,a=s.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Wl(r,a,s,c,m,g){var S=0;if(c=r,typeof r=="function")Pf(r)&&(S=1);else if(typeof r=="string")S=PT(r,s,ae.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case J:return r=An(31,s,a,m),r.elementType=J,r.lanes=g,r;case T:return Xi(s.children,m,g,a);case A:S=8,m|=24;break;case j:return r=An(12,s,a,m|2),r.elementType=j,r.lanes=g,r;case D:return r=An(13,s,a,m),r.elementType=D,r.lanes=g,r;case L:return r=An(19,s,a,m),r.elementType=L,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case w:S=10;break e;case O:S=9;break e;case P:S=11;break e;case Y:S=14;break e;case B:S=16,c=null;break e}S=29,s=Error(i(130,r===null?"null":typeof r,"")),c=null}return a=An(S,s,a,m),a.elementType=r,a.type=c,a.lanes=g,a}function Xi(r,a,s,c){return r=An(7,r,c,a),r.lanes=s,r}function Vf(r,a,s){return r=An(6,r,null,a),r.lanes=s,r}function Vy(r){var a=An(18,null,null,0);return a.stateNode=r,a}function Zf(r,a,s){return a=An(4,r.children!==null?r.children:[],r.key,a),a.lanes=s,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Zy=new WeakMap;function Hn(r,a){if(typeof r=="object"&&r!==null){var s=Zy.get(r);return s!==void 0?s:(a={value:r,source:a,stack:lt(a)},Zy.set(r,a),a)}return{value:r,source:a,stack:lt(a)}}var Pa=[],Va=0,eu=null,fs=0,Fn=[],qn=0,ni=null,pr=1,gr="";function Nr(r,a){Pa[Va++]=fs,Pa[Va++]=eu,eu=r,fs=a}function By(r,a,s){Fn[qn++]=pr,Fn[qn++]=gr,Fn[qn++]=ni,ni=r;var c=pr;r=gr;var m=32-rt(c)-1;c&=~(1<<m),s+=1;var g=32-rt(a)+m;if(30<g){var S=m-m%5;g=(c&(1<<S)-1).toString(32),c>>=S,m-=S,pr=1<<32-rt(a)+m|s<<m|c,gr=g+r}else pr=1<<g|s<<m|c,gr=r}function Bf(r){r.return!==null&&(Nr(r,1),By(r,1,0))}function If(r){for(;r===eu;)eu=Pa[--Va],Pa[Va]=null,fs=Pa[--Va],Pa[Va]=null;for(;r===ni;)ni=Fn[--qn],Fn[qn]=null,gr=Fn[--qn],Fn[qn]=null,pr=Fn[--qn],Fn[qn]=null}function Iy(r,a){Fn[qn++]=pr,Fn[qn++]=gr,Fn[qn++]=ni,pr=a.id,gr=a.overflow,ni=r}var Xt=null,ct=null,Ue=!1,ri=null,Gn=!1,Hf=Error(i(519));function ii(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ds(Hn(a,r)),Hf}function Hy(r){var a=r.stateNode,s=r.type,c=r.memoizedProps;switch(a[Yt]=r,a[gn]=c,s){case"dialog":Me("cancel",a),Me("close",a);break;case"iframe":case"object":case"embed":Me("load",a);break;case"video":case"audio":for(s=0;s<Ms.length;s++)Me(Ms[s],a);break;case"source":Me("error",a);break;case"img":case"image":case"link":Me("error",a),Me("load",a);break;case"details":Me("toggle",a);break;case"input":Me("invalid",a),ry(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Me("invalid",a);break;case"textarea":Me("invalid",a),ay(a,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||c.suppressHydrationWarning===!0||sb(a.textContent,s)?(c.popover!=null&&(Me("beforetoggle",a),Me("toggle",a)),c.onScroll!=null&&Me("scroll",a),c.onScrollEnd!=null&&Me("scrollend",a),c.onClick!=null&&(a.onclick=Cr),a=!0):a=!1,a||ii(r,!0)}function Fy(r){for(Xt=r.return;Xt;)switch(Xt.tag){case 5:case 31:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:Xt=Xt.return}}function Za(r){if(r!==Xt)return!1;if(!Ue)return Fy(r),Ue=!0,!1;var a=r.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||lh(r.type,r.memoizedProps)),s=!s),s&&ct&&ii(r),Fy(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ct=gb(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ct=gb(r)}else a===27?(a=ct,xi(r.type)?(r=hh,hh=null,ct=r):ct=a):ct=Xt?Xn(r.stateNode.nextSibling):null;return!0}function Ki(){ct=Xt=null,Ue=!1}function Ff(){var r=ri;return r!==null&&(Sn===null?Sn=r:Sn.push.apply(Sn,r),ri=null),r}function ds(r){ri===null?ri=[r]:ri.push(r)}var qf=C(null),Ji=null,Or=null;function ai(r,a,s){z(qf,a._currentValue),a._currentValue=s}function Rr(r){r._currentValue=qf.current,G(qf)}function Gf(r,a,s){for(;r!==null;){var c=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),r===s)break;r=r.return}}function Yf(r,a,s,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var g=m.dependencies;if(g!==null){var S=m.child;g=g.firstContext;e:for(;g!==null;){var k=g;g=m;for(var R=0;R<a.length;R++)if(k.context===a[R]){g.lanes|=s,k=g.alternate,k!==null&&(k.lanes|=s),Gf(g.return,s,r),c||(S=null);break e}g=k.next}}else if(m.tag===18){if(S=m.return,S===null)throw Error(i(341));S.lanes|=s,g=S.alternate,g!==null&&(g.lanes|=s),Gf(S,s,r),S=null}else S=m.child;if(S!==null)S.return=m;else for(S=m;S!==null;){if(S===r){S=null;break}if(m=S.sibling,m!==null){m.return=S.return,S=m;break}S=S.return}m=S}}function Ba(r,a,s,c){r=null;for(var m=a,g=!1;m!==null;){if(!g){if((m.flags&524288)!==0)g=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var S=m.alternate;if(S===null)throw Error(i(387));if(S=S.memoizedProps,S!==null){var k=m.type;Cn(m.pendingProps.value,S.value)||(r!==null?r.push(k):r=[k])}}else if(m===ge.current){if(S=m.alternate,S===null)throw Error(i(387));S.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Ps):r=[Ps])}m=m.return}r!==null&&Yf(a,r,s,c),a.flags|=262144}function tu(r){for(r=r.firstContext;r!==null;){if(!Cn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Qi(r){Ji=r,Or=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Kt(r){return qy(Ji,r)}function nu(r,a){return Ji===null&&Qi(r),qy(r,a)}function qy(r,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Or===null){if(r===null)throw Error(i(308));Or=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Or=Or.next=a;return s}var DE=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(s,c){r.push(c)}};this.abort=function(){a.aborted=!0,r.forEach(function(s){return s()})}},$E=e.unstable_scheduleCallback,LE=e.unstable_NormalPriority,jt={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xf(){return{controller:new DE,data:new Map,refCount:0}}function hs(r){r.refCount--,r.refCount===0&&$E(LE,function(){r.controller.abort()})}var ms=null,Kf=0,Ia=0,Ha=null;function UE(r,a){if(ms===null){var s=ms=[];Kf=0,Ia=Wd(),Ha={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Kf++,a.then(Gy,Gy),a}function Gy(){if(--Kf===0&&ms!==null){Ha!==null&&(Ha.status="fulfilled");var r=ms;ms=null,Ia=0,Ha=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function PE(r,a){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){c.status="fulfilled",c.value=a;for(var m=0;m<s.length;m++)(0,s[m])(a)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var Yy=V.S;V.S=function(r,a){Nv=ut(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&UE(r,a),Yy!==null&&Yy(r,a)};var Wi=C(null);function Jf(){var r=Wi.current;return r!==null?r:it.pooledCache}function ru(r,a){a===null?z(Wi,Wi.current):z(Wi,a.pool)}function Xy(){var r=Jf();return r===null?null:{parent:jt._currentValue,pool:r}}var Fa=Error(i(460)),Qf=Error(i(474)),iu=Error(i(542)),au={then:function(){}};function Ky(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Jy(r,a,s){switch(s=r[s],s===void 0?r.push(a):s!==a&&(a.then(Cr,Cr),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Wy(r),r;default:if(typeof a.status=="string")a.then(Cr,Cr);else{if(r=it,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(c){if(a.status==="pending"){var m=a;m.status="fulfilled",m.value=c}},function(c){if(a.status==="pending"){var m=a;m.status="rejected",m.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Wy(r),r}throw ta=a,Fa}}function ea(r){try{var a=r._init;return a(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ta=s,Fa):s}}var ta=null;function Qy(){if(ta===null)throw Error(i(459));var r=ta;return ta=null,r}function Wy(r){if(r===Fa||r===iu)throw Error(i(483))}var qa=null,ps=0;function ou(r){var a=ps;return ps+=1,qa===null&&(qa=[]),Jy(qa,r,a)}function gs(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function su(r,a){throw a.$$typeof===v?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function ex(r){function a(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;)a(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=jr(U,M),U.index=0,U.sibling=null,U}function g(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 S(U){return r&&U.alternate===null&&(U.flags|=67108866),U}function k(U,M,I,ee){return M===null||M.tag!==6?(M=Vf(I,U.mode,ee),M.return=U,M):(M=m(M,I),M.return=U,M)}function R(U,M,I,ee){var ke=I.type;return ke===T?K(U,M,I.props.children,ee,I.key):M!==null&&(M.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===B&&ea(ke)===M.type)?(M=m(M,I.props),gs(M,I),M.return=U,M):(M=Wl(I.type,I.key,I.props,null,U.mode,ee),gs(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=Zf(I,U.mode,ee),M.return=U,M):(M=m(M,I.children||[]),M.return=U,M)}function K(U,M,I,ee,ke){return M===null||M.tag!==7?(M=Xi(I,U.mode,ee,ke),M.return=U,M):(M=m(M,I),M.return=U,M)}function te(U,M,I){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Vf(""+M,U.mode,I),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return I=Wl(M.type,M.key,M.props,null,U.mode,I),gs(I,M),I.return=U,I;case E:return M=Zf(M,U.mode,I),M.return=U,M;case B:return M=ea(M),te(U,M,I)}if(ne(M)||ie(M))return M=Xi(M,U.mode,I,null),M.return=U,M;if(typeof M.then=="function")return te(U,ou(M),I);if(M.$$typeof===w)return te(U,nu(U,M),I);su(U,M)}return null}function F(U,M,I,ee){var ke=M!==null?M.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return ke!==null?null:k(U,M,""+I,ee);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case b:return I.key===ke?R(U,M,I,ee):null;case E:return I.key===ke?H(U,M,I,ee):null;case B:return I=ea(I),F(U,M,I,ee)}if(ne(I)||ie(I))return ke!==null?null:K(U,M,I,ee,null);if(typeof I.then=="function")return F(U,M,ou(I),ee);if(I.$$typeof===w)return F(U,M,nu(U,I),ee);su(U,I)}return null}function q(U,M,I,ee,ke){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return U=U.get(I)||null,k(M,U,""+ee,ke);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return U=U.get(ee.key===null?I:ee.key)||null,R(M,U,ee,ke);case E:return U=U.get(ee.key===null?I:ee.key)||null,H(M,U,ee,ke);case B:return ee=ea(ee),q(U,M,I,ee,ke)}if(ne(ee)||ie(ee))return U=U.get(I)||null,K(M,U,ee,ke,null);if(typeof ee.then=="function")return q(U,M,I,ou(ee),ke);if(ee.$$typeof===w)return q(U,M,I,nu(M,ee),ke);su(M,ee)}return null}function fe(U,M,I,ee){for(var ke=null,Be=null,xe=M,Ae=M=0,Le=null;xe!==null&&Ae<I.length;Ae++){xe.index>Ae?(Le=xe,xe=null):Le=xe.sibling;var Ie=F(U,xe,I[Ae],ee);if(Ie===null){xe===null&&(xe=Le);break}r&&xe&&Ie.alternate===null&&a(U,xe),M=g(Ie,M,Ae),Be===null?ke=Ie:Be.sibling=Ie,Be=Ie,xe=Le}if(Ae===I.length)return s(U,xe),Ue&&Nr(U,Ae),ke;if(xe===null){for(;Ae<I.length;Ae++)xe=te(U,I[Ae],ee),xe!==null&&(M=g(xe,M,Ae),Be===null?ke=xe:Be.sibling=xe,Be=xe);return Ue&&Nr(U,Ae),ke}for(xe=c(xe);Ae<I.length;Ae++)Le=q(xe,U,Ae,I[Ae],ee),Le!==null&&(r&&Le.alternate!==null&&xe.delete(Le.key===null?Ae:Le.key),M=g(Le,M,Ae),Be===null?ke=Le:Be.sibling=Le,Be=Le);return r&&xe.forEach(function(wi){return a(U,wi)}),Ue&&Nr(U,Ae),ke}function we(U,M,I,ee){if(I==null)throw Error(i(151));for(var ke=null,Be=null,xe=M,Ae=M=0,Le=null,Ie=I.next();xe!==null&&!Ie.done;Ae++,Ie=I.next()){xe.index>Ae?(Le=xe,xe=null):Le=xe.sibling;var wi=F(U,xe,Ie.value,ee);if(wi===null){xe===null&&(xe=Le);break}r&&xe&&wi.alternate===null&&a(U,xe),M=g(wi,M,Ae),Be===null?ke=wi:Be.sibling=wi,Be=wi,xe=Le}if(Ie.done)return s(U,xe),Ue&&Nr(U,Ae),ke;if(xe===null){for(;!Ie.done;Ae++,Ie=I.next())Ie=te(U,Ie.value,ee),Ie!==null&&(M=g(Ie,M,Ae),Be===null?ke=Ie:Be.sibling=Ie,Be=Ie);return Ue&&Nr(U,Ae),ke}for(xe=c(xe);!Ie.done;Ae++,Ie=I.next())Ie=q(xe,U,Ae,Ie.value,ee),Ie!==null&&(r&&Ie.alternate!==null&&xe.delete(Ie.key===null?Ae:Ie.key),M=g(Ie,M,Ae),Be===null?ke=Ie:Be.sibling=Ie,Be=Ie);return r&&xe.forEach(function(KT){return a(U,KT)}),Ue&&Nr(U,Ae),ke}function et(U,M,I,ee){if(typeof I=="object"&&I!==null&&I.type===T&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case b:e:{for(var ke=I.key;M!==null;){if(M.key===ke){if(ke=I.type,ke===T){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===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===B&&ea(ke)===M.type){s(U,M.sibling),ee=m(M,I.props),gs(ee,I),ee.return=U,U=ee;break e}s(U,M);break}else a(U,M);M=M.sibling}I.type===T?(ee=Xi(I.props.children,U.mode,ee,I.key),ee.return=U,U=ee):(ee=Wl(I.type,I.key,I.props,null,U.mode,ee),gs(ee,I),ee.return=U,U=ee)}return S(U);case E:e:{for(ke=I.key;M!==null;){if(M.key===ke)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 a(U,M);M=M.sibling}ee=Zf(I,U.mode,ee),ee.return=U,U=ee}return S(U);case B:return I=ea(I),et(U,M,I,ee)}if(ne(I))return fe(U,M,I,ee);if(ie(I)){if(ke=ie(I),typeof ke!="function")throw Error(i(150));return I=ke.call(I),we(U,M,I,ee)}if(typeof I.then=="function")return et(U,M,ou(I),ee);if(I.$$typeof===w)return et(U,M,nu(U,I),ee);su(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=Vf(I,U.mode,ee),ee.return=U,U=ee),S(U)):s(U,M)}return function(U,M,I,ee){try{ps=0;var ke=et(U,M,I,ee);return qa=null,ke}catch(xe){if(xe===Fa||xe===iu)throw xe;var Be=An(29,xe,null,U.mode);return Be.lanes=ee,Be.return=U,Be}}}var na=ex(!0),tx=ex(!1),oi=!1;function Wf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ed(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function si(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function li(r,a,s){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(He&2)!==0){var m=c.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),c.pending=a,a=Ql(r),Uy(r,null,s),a}return Jl(r,c,a,s),Ql(r)}function ys(r,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var c=a.lanes;c&=r.pendingLanes,s|=c,a.lanes=s,qg(r,s)}}function td(r,a){var s=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var S={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?m=g=S:g=g.next=S,s=s.next}while(s!==null);g===null?m=g=a:g=g.next=a}else m=g=a;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=a:r.next=a,s.lastBaseUpdate=a}var nd=!1;function xs(){if(nd){var r=Ha;if(r!==null)throw r}}function vs(r,a,s,c){nd=!1;var m=r.updateQueue;oi=!1;var g=m.firstBaseUpdate,S=m.lastBaseUpdate,k=m.shared.pending;if(k!==null){m.shared.pending=null;var R=k,H=R.next;R.next=null,S===null?g=H:S.next=H,S=R;var K=r.alternate;K!==null&&(K=K.updateQueue,k=K.lastBaseUpdate,k!==S&&(k===null?K.firstBaseUpdate=H:k.next=H,K.lastBaseUpdate=R))}if(g!==null){var te=m.baseState;S=0,K=H=R=null,k=g;do{var F=k.lane&-536870913,q=F!==k.lane;if(q?($e&F)===F:(c&F)===F){F!==0&&F===Ia&&(nd=!0),K!==null&&(K=K.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var fe=r,we=k;F=a;var et=s;switch(we.tag){case 1:if(fe=we.payload,typeof fe=="function"){te=fe.call(et,te,F);break e}te=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=we.payload,F=typeof fe=="function"?fe.call(et,te,F):fe,F==null)break e;te=y({},te,F);break e;case 2:oi=!0}}F=k.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:k.tag,payload:k.payload,callback:k.callback,next:null},K===null?(H=K=q,R=te):K=K.next=q,S|=F;if(k=k.next,k===null){if(k=m.shared.pending,k===null)break;q=k,k=q.next,q.next=null,m.lastBaseUpdate=q,m.shared.pending=null}}while(!0);K===null&&(R=te),m.baseState=R,m.firstBaseUpdate=H,m.lastBaseUpdate=K,g===null&&(m.shared.lanes=0),hi|=S,r.lanes=S,r.memoizedState=te}}function nx(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function rx(r,a){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)nx(s[r],a)}var Ga=C(null),lu=C(0);function ix(r,a){r=Br,z(lu,r),z(Ga,a),Br=r|a.baseLanes}function rd(){z(lu,Br),z(Ga,Ga.current)}function id(){Br=lu.current,G(Ga),G(lu)}var jn=C(null),Yn=null;function ui(r){var a=r.alternate;z(Tt,Tt.current&1),z(jn,r),Yn===null&&(a===null||Ga.current!==null||a.memoizedState!==null)&&(Yn=r)}function ad(r){z(Tt,Tt.current),z(jn,r),Yn===null&&(Yn=r)}function ax(r){r.tag===22?(z(Tt,Tt.current),z(jn,r),Yn===null&&(Yn=r)):ci()}function ci(){z(Tt,Tt.current),z(jn,jn.current)}function Nn(r){G(jn),Yn===r&&(Yn=null),G(Tt)}var Tt=C(0);function uu(r){for(var a=r;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||fh(s)||dh(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Mr=0,Ce=null,Qe=null,Nt=null,cu=!1,Ya=!1,ra=!1,fu=0,bs=0,Xa=null,VE=0;function wt(){throw Error(i(321))}function od(r,a){if(a===null)return!1;for(var s=0;s<a.length&&s<r.length;s++)if(!Cn(r[s],a[s]))return!1;return!0}function sd(r,a,s,c,m,g){return Mr=g,Ce=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,V.H=r===null||r.memoizedState===null?Bx:kd,ra=!1,g=s(c,m),ra=!1,Ya&&(g=sx(a,s,c,m)),ox(r),g}function ox(r){V.H=ws;var a=Qe!==null&&Qe.next!==null;if(Mr=0,Nt=Qe=Ce=null,cu=!1,bs=0,Xa=null,a)throw Error(i(300));r===null||Ot||(r=r.dependencies,r!==null&&tu(r)&&(Ot=!0))}function sx(r,a,s,c){Ce=r;var m=0;do{if(Ya&&(Xa=null),bs=0,Ya=!1,25<=m)throw Error(i(301));if(m+=1,Nt=Qe=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}V.H=Ix,g=a(s,c)}while(Ya);return g}function ZE(){var r=V.H,a=r.useState()[0];return a=typeof a.then=="function"?Ss(a):a,r=r.useState()[0],(Qe!==null?Qe.memoizedState:null)!==r&&(Ce.flags|=1024),a}function ld(){var r=fu!==0;return fu=0,r}function ud(r,a,s){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~s}function cd(r){if(cu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}cu=!1}Mr=0,Nt=Qe=Ce=null,Ya=!1,bs=fu=0,Xa=null}function un(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Ce.memoizedState=Nt=r:Nt=Nt.next=r,Nt}function Ct(){if(Qe===null){var r=Ce.alternate;r=r!==null?r.memoizedState:null}else r=Qe.next;var a=Nt===null?Ce.memoizedState:Nt.next;if(a!==null)Nt=a,Qe=r;else{if(r===null)throw Ce.alternate===null?Error(i(467)):Error(i(310));Qe=r,r={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},Nt===null?Ce.memoizedState=Nt=r:Nt=Nt.next=r}return Nt}function du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ss(r){var a=bs;return bs+=1,Xa===null&&(Xa=[]),r=Jy(Xa,r,a),a=Ce,(Nt===null?a.memoizedState:Nt.next)===null&&(a=a.alternate,V.H=a===null||a.memoizedState===null?Bx:kd),r}function hu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Ss(r);if(r.$$typeof===w)return Kt(r)}throw Error(i(438,String(r)))}function fd(r){var a=null,s=Ce.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var c=Ce.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(m){return m.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=du(),Ce.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(r),c=0;c<r;c++)s[c]=ue;return a.index++,s}function Dr(r,a){return typeof a=="function"?a(r):a}function mu(r){var a=Ct();return dd(a,Qe,r)}function dd(r,a,s){var c=r.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=s;var m=r.baseQueue,g=c.pending;if(g!==null){if(m!==null){var S=m.next;m.next=g.next,g.next=S}a.baseQueue=m=g,c.pending=null}if(g=r.baseState,m===null)r.memoizedState=g;else{a=m.next;var k=S=null,R=null,H=a,K=!1;do{var te=H.lane&-536870913;if(te!==H.lane?($e&te)===te:(Mr&te)===te){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}),te===Ia&&(K=!0);else if((Mr&F)===F){H=H.next,F===Ia&&(K=!0);continue}else te={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(k=R=te,S=g):R=R.next=te,Ce.lanes|=F,hi|=F;te=H.action,ra&&s(g,te),g=H.hasEagerState?H.eagerState:s(g,te)}else F={lane:te,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(k=R=F,S=g):R=R.next=F,Ce.lanes|=te,hi|=te;H=H.next}while(H!==null&&H!==a);if(R===null?S=g:R.next=k,!Cn(g,r.memoizedState)&&(Ot=!0,K&&(s=Ha,s!==null)))throw s;r.memoizedState=g,r.baseState=S,r.baseQueue=R,c.lastRenderedState=g}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function hd(r){var a=Ct(),s=a.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=r;var c=s.dispatch,m=s.pending,g=a.memoizedState;if(m!==null){s.pending=null;var S=m=m.next;do g=r(g,S.action),S=S.next;while(S!==m);Cn(g,a.memoizedState)||(Ot=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),s.lastRenderedState=g}return[g,c]}function lx(r,a,s){var c=Ce,m=Ct(),g=Ue;if(g){if(s===void 0)throw Error(i(407));s=s()}else s=a();var S=!Cn((Qe||m).memoizedState,s);if(S&&(m.memoizedState=s,Ot=!0),m=m.queue,gd(fx.bind(null,c,m,r),[r]),m.getSnapshot!==a||S||Nt!==null&&Nt.memoizedState.tag&1){if(c.flags|=2048,Ka(9,{destroy:void 0},cx.bind(null,c,m,s,a),null),it===null)throw Error(i(349));g||(Mr&127)!==0||ux(c,a,s)}return s}function ux(r,a,s){r.flags|=16384,r={getSnapshot:a,value:s},a=Ce.updateQueue,a===null?(a=du(),Ce.updateQueue=a,a.stores=[r]):(s=a.stores,s===null?a.stores=[r]:s.push(r))}function cx(r,a,s,c){a.value=s,a.getSnapshot=c,dx(a)&&hx(r)}function fx(r,a,s){return s(function(){dx(a)&&hx(r)})}function dx(r){var a=r.getSnapshot;r=r.value;try{var s=a();return!Cn(r,s)}catch{return!0}}function hx(r){var a=Yi(r,2);a!==null&&kn(a,r,2)}function md(r){var a=un();if(typeof r=="function"){var s=r;if(r=s(),ra){pn(!0);try{s()}finally{pn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:r},a}function mx(r,a,s,c){return r.baseState=s,dd(r,Qe,typeof c=="function"?c:Dr)}function BE(r,a,s,c,m){if(yu(r))throw Error(i(485));if(r=a.action,r!==null){var g={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){g.listeners.push(S)}};V.T!==null?s(!0):g.isTransition=!1,c(g),s=a.pending,s===null?(g.next=a.pending=g,px(a,g)):(g.next=s.next,a.pending=s.next=g)}}function px(r,a){var s=a.action,c=a.payload,m=r.state;if(a.isTransition){var g=V.T,S={};V.T=S;try{var k=s(m,c),R=V.S;R!==null&&R(S,k),gx(r,a,k)}catch(H){pd(r,a,H)}finally{g!==null&&S.types!==null&&(g.types=S.types),V.T=g}}else try{g=s(m,c),gx(r,a,g)}catch(H){pd(r,a,H)}}function gx(r,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){yx(r,a,c)},function(c){return pd(r,a,c)}):yx(r,a,s)}function yx(r,a,s){a.status="fulfilled",a.value=s,xx(a),r.state=s,a=r.pending,a!==null&&(s=a.next,s===a?r.pending=null:(s=s.next,a.next=s,px(r,s)))}function pd(r,a,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=s,xx(a),a=a.next;while(a!==c)}r.action=null}function xx(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function vx(r,a){return a}function bx(r,a){if(Ue){var s=it.formState;if(s!==null){e:{var c=Ce;if(Ue){if(ct){t:{for(var m=ct,g=Gn;m.nodeType!==8;){if(!g){m=null;break t}if(m=Xn(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){ct=Xn(m.nextSibling),c=m.data==="F!";break e}}ii(c)}c=!1}c&&(a=s[0])}}return s=un(),s.memoizedState=s.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vx,lastRenderedState:a},s.queue=c,s=Px.bind(null,Ce,c),c.dispatch=s,c=md(!1),g=Sd.bind(null,Ce,!1,c.queue),c=un(),m={state:a,dispatch:null,action:r,pending:null},c.queue=m,s=BE.bind(null,Ce,m,g,s),m.dispatch=s,c.memoizedState=r,[a,s,!1]}function Sx(r){var a=Ct();return kx(a,Qe,r)}function kx(r,a,s){if(a=dd(r,a,vx)[0],r=mu(Dr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Ss(a)}catch(S){throw S===Fa?iu:S}else c=a;a=Ct();var m=a.queue,g=m.dispatch;return s!==a.memoizedState&&(Ce.flags|=2048,Ka(9,{destroy:void 0},IE.bind(null,m,s),null)),[c,g,r]}function IE(r,a){r.action=a}function wx(r){var a=Ct(),s=Qe;if(s!==null)return kx(a,s,r);Ct(),a=a.memoizedState,s=Ct();var c=s.queue.dispatch;return s.memoizedState=r,[a,c,!1]}function Ka(r,a,s,c){return r={tag:r,create:s,deps:c,inst:a,next:null},a=Ce.updateQueue,a===null&&(a=du(),Ce.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=r.next=r:(c=s.next,s.next=r,r.next=c,a.lastEffect=r),r}function zx(){return Ct().memoizedState}function pu(r,a,s,c){var m=un();Ce.flags|=r,m.memoizedState=Ka(1|a,{destroy:void 0},s,c===void 0?null:c)}function gu(r,a,s,c){var m=Ct();c=c===void 0?null:c;var g=m.memoizedState.inst;Qe!==null&&c!==null&&od(c,Qe.memoizedState.deps)?m.memoizedState=Ka(a,g,s,c):(Ce.flags|=r,m.memoizedState=Ka(1|a,g,s,c))}function _x(r,a){pu(8390656,8,r,a)}function gd(r,a){gu(2048,8,r,a)}function HE(r){Ce.flags|=4;var a=Ce.updateQueue;if(a===null)a=du(),Ce.updateQueue=a,a.events=[r];else{var s=a.events;s===null?a.events=[r]:s.push(r)}}function Ex(r){var a=Ct().memoizedState;return HE({ref:a,nextImpl:r}),function(){if((He&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function Tx(r,a){return gu(4,2,r,a)}function Cx(r,a){return gu(4,4,r,a)}function Ax(r,a){if(typeof a=="function"){r=r();var s=a(r);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function jx(r,a,s){s=s!=null?s.concat([r]):null,gu(4,4,Ax.bind(null,a,r),s)}function yd(){}function Nx(r,a){var s=Ct();a=a===void 0?null:a;var c=s.memoizedState;return a!==null&&od(a,c[1])?c[0]:(s.memoizedState=[r,a],r)}function Ox(r,a){var s=Ct();a=a===void 0?null:a;var c=s.memoizedState;if(a!==null&&od(a,c[1]))return c[0];if(c=r(),ra){pn(!0);try{r()}finally{pn(!1)}}return s.memoizedState=[c,a],c}function xd(r,a,s){return s===void 0||(Mr&1073741824)!==0&&($e&261930)===0?r.memoizedState=a:(r.memoizedState=s,r=Rv(),Ce.lanes|=r,hi|=r,s)}function Rx(r,a,s,c){return Cn(s,a)?s:Ga.current!==null?(r=xd(r,s,c),Cn(r,a)||(Ot=!0),r):(Mr&42)===0||(Mr&1073741824)!==0&&($e&261930)===0?(Ot=!0,r.memoizedState=s):(r=Rv(),Ce.lanes|=r,hi|=r,a)}function Mx(r,a,s,c,m){var g=X.p;X.p=g!==0&&8>g?g:8;var S=V.T,k={};V.T=k,Sd(r,!1,a,s);try{var R=m(),H=V.S;if(H!==null&&H(k,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var K=PE(R,c);ks(r,a,K,Mn(r))}else ks(r,a,c,Mn(r))}catch(te){ks(r,a,{then:function(){},status:"rejected",reason:te},Mn())}finally{X.p=g,S!==null&&k.types!==null&&(S.types=k.types),V.T=S}}function FE(){}function vd(r,a,s,c){if(r.tag!==5)throw Error(i(476));var m=Dx(r).queue;Mx(r,m,a,Z,s===null?FE:function(){return $x(r),s(c)})}function Dx(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:Z},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:s},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function $x(r){var a=Dx(r);a.next===null&&(a=r.alternate.memoizedState),ks(r,a.next.queue,{},Mn())}function bd(){return Kt(Ps)}function Lx(){return Ct().memoizedState}function Ux(){return Ct().memoizedState}function qE(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var s=Mn();r=si(s);var c=li(a,r,s);c!==null&&(kn(c,a,s),ys(c,a,s)),a={cache:Xf()},r.payload=a;return}a=a.return}}function GE(r,a,s){var c=Mn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},yu(r)?Vx(a,s):(s=Uf(r,a,s,c),s!==null&&(kn(s,r,c),Zx(s,a,c)))}function Px(r,a,s){var c=Mn();ks(r,a,s,c)}function ks(r,a,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(yu(r))Vx(a,m);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var S=a.lastRenderedState,k=g(S,s);if(m.hasEagerState=!0,m.eagerState=k,Cn(k,S))return Jl(r,a,m,0),it===null&&Kl(),!1}catch{}if(s=Uf(r,a,m,c),s!==null)return kn(s,r,c),Zx(s,a,c),!0}return!1}function Sd(r,a,s,c){if(c={lane:2,revertLane:Wd(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},yu(r)){if(a)throw Error(i(479))}else a=Uf(r,s,c,2),a!==null&&kn(a,r,2)}function yu(r){var a=r.alternate;return r===Ce||a!==null&&a===Ce}function Vx(r,a){Ya=cu=!0;var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}function Zx(r,a,s){if((s&4194048)!==0){var c=a.lanes;c&=r.pendingLanes,s|=c,a.lanes=s,qg(r,s)}}var ws={readContext:Kt,use:hu,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};ws.useEffectEvent=wt;var Bx={readContext:Kt,use:hu,useCallback:function(r,a){return un().memoizedState=[r,a===void 0?null:a],r},useContext:Kt,useEffect:_x,useImperativeHandle:function(r,a,s){s=s!=null?s.concat([r]):null,pu(4194308,4,Ax.bind(null,a,r),s)},useLayoutEffect:function(r,a){return pu(4194308,4,r,a)},useInsertionEffect:function(r,a){pu(4,2,r,a)},useMemo:function(r,a){var s=un();a=a===void 0?null:a;var c=r();if(ra){pn(!0);try{r()}finally{pn(!1)}}return s.memoizedState=[c,a],c},useReducer:function(r,a,s){var c=un();if(s!==void 0){var m=s(a);if(ra){pn(!0);try{s(a)}finally{pn(!1)}}}else m=a;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=GE.bind(null,Ce,r),[c.memoizedState,r]},useRef:function(r){var a=un();return r={current:r},a.memoizedState=r},useState:function(r){r=md(r);var a=r.queue,s=Px.bind(null,Ce,a);return a.dispatch=s,[r.memoizedState,s]},useDebugValue:yd,useDeferredValue:function(r,a){var s=un();return xd(s,r,a)},useTransition:function(){var r=md(!1);return r=Mx.bind(null,Ce,r.queue,!0,!1),un().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,s){var c=Ce,m=un();if(Ue){if(s===void 0)throw Error(i(407));s=s()}else{if(s=a(),it===null)throw Error(i(349));($e&127)!==0||ux(c,a,s)}m.memoizedState=s;var g={value:s,getSnapshot:a};return m.queue=g,_x(fx.bind(null,c,g,r),[r]),c.flags|=2048,Ka(9,{destroy:void 0},cx.bind(null,c,g,s,a),null),s},useId:function(){var r=un(),a=it.identifierPrefix;if(Ue){var s=gr,c=pr;s=(c&~(1<<32-rt(c)-1)).toString(32)+s,a="_"+a+"R_"+s,s=fu++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=VE++,a="_"+a+"r_"+s.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:bd,useFormState:bx,useActionState:bx,useOptimistic:function(r){var a=un();a.memoizedState=a.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Sd.bind(null,Ce,!0,s),s.dispatch=a,[r,a]},useMemoCache:fd,useCacheRefresh:function(){return un().memoizedState=qE.bind(null,Ce)},useEffectEvent:function(r){var a=un(),s={impl:r};return a.memoizedState=s,function(){if((He&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}},kd={readContext:Kt,use:hu,useCallback:Nx,useContext:Kt,useEffect:gd,useImperativeHandle:jx,useInsertionEffect:Tx,useLayoutEffect:Cx,useMemo:Ox,useReducer:mu,useRef:zx,useState:function(){return mu(Dr)},useDebugValue:yd,useDeferredValue:function(r,a){var s=Ct();return Rx(s,Qe.memoizedState,r,a)},useTransition:function(){var r=mu(Dr)[0],a=Ct().memoizedState;return[typeof r=="boolean"?r:Ss(r),a]},useSyncExternalStore:lx,useId:Lx,useHostTransitionStatus:bd,useFormState:Sx,useActionState:Sx,useOptimistic:function(r,a){var s=Ct();return mx(s,Qe,r,a)},useMemoCache:fd,useCacheRefresh:Ux};kd.useEffectEvent=Ex;var Ix={readContext:Kt,use:hu,useCallback:Nx,useContext:Kt,useEffect:gd,useImperativeHandle:jx,useInsertionEffect:Tx,useLayoutEffect:Cx,useMemo:Ox,useReducer:hd,useRef:zx,useState:function(){return hd(Dr)},useDebugValue:yd,useDeferredValue:function(r,a){var s=Ct();return Qe===null?xd(s,r,a):Rx(s,Qe.memoizedState,r,a)},useTransition:function(){var r=hd(Dr)[0],a=Ct().memoizedState;return[typeof r=="boolean"?r:Ss(r),a]},useSyncExternalStore:lx,useId:Lx,useHostTransitionStatus:bd,useFormState:wx,useActionState:wx,useOptimistic:function(r,a){var s=Ct();return Qe!==null?mx(s,Qe,r,a):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:fd,useCacheRefresh:Ux};Ix.useEffectEvent=Ex;function wd(r,a,s,c){a=r.memoizedState,s=s(c,a),s=s==null?a:y({},a,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var zd={enqueueSetState:function(r,a,s){r=r._reactInternals;var c=Mn(),m=si(c);m.payload=a,s!=null&&(m.callback=s),a=li(r,m,c),a!==null&&(kn(a,r,c),ys(a,r,c))},enqueueReplaceState:function(r,a,s){r=r._reactInternals;var c=Mn(),m=si(c);m.tag=1,m.payload=a,s!=null&&(m.callback=s),a=li(r,m,c),a!==null&&(kn(a,r,c),ys(a,r,c))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var s=Mn(),c=si(s);c.tag=2,a!=null&&(c.callback=a),a=li(r,c,s),a!==null&&(kn(a,r,s),ys(a,r,s))}};function Hx(r,a,s,c,m,g,S){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,g,S):a.prototype&&a.prototype.isPureReactComponent?!us(s,c)||!us(m,g):!0}function Fx(r,a,s,c){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,c),a.state!==r&&zd.enqueueReplaceState(a,a.state,null)}function ia(r,a){var s=a;if("ref"in a){s={};for(var c in a)c!=="ref"&&(s[c]=a[c])}if(r=r.defaultProps){s===a&&(s=y({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function qx(r){Xl(r)}function Gx(r){console.error(r)}function Yx(r){Xl(r)}function xu(r,a){try{var s=r.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function Xx(r,a,s){try{var c=r.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function _d(r,a,s){return s=si(s),s.tag=3,s.payload={element:null},s.callback=function(){xu(r,a)},s}function Kx(r){return r=si(r),r.tag=3,r}function Jx(r,a,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var g=c.value;r.payload=function(){return m(g)},r.callback=function(){Xx(a,s,c)}}var S=s.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(r.callback=function(){Xx(a,s,c),typeof m!="function"&&(mi===null?mi=new Set([this]):mi.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function YE(r,a,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=s.alternate,a!==null&&Ba(a,s,m,!0),s=jn.current,s!==null){switch(s.tag){case 31:case 13:return Yn===null?ju():s.alternate===null&&zt===0&&(zt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===au?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([c]):a.add(c),Kd(r,c,m)),!1;case 22:return s.flags|=65536,c===au?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([c]):s.add(c)),Kd(r,c,m)),!1}throw Error(i(435,s.tag))}return Kd(r,c,m),ju(),!1}if(Ue)return a=jn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,c!==Hf&&(r=Error(i(422),{cause:c}),ds(Hn(r,s)))):(c!==Hf&&(a=Error(i(423),{cause:c}),ds(Hn(a,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=Hn(c,s),m=_d(r.stateNode,c,m),td(r,m),zt!==4&&(zt=2)),!1;var g=Error(i(520),{cause:c});if(g=Hn(g,s),Ns===null?Ns=[g]:Ns.push(g),zt!==4&&(zt=2),a===null)return!0;c=Hn(c,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=_d(s.stateNode,c,r),td(s,r),!1;case 1:if(a=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(mi===null||!mi.has(g))))return s.flags|=65536,m&=-m,s.lanes|=m,m=Kx(m),Jx(m,r,s,c),td(s,m),!1}s=s.return}while(s!==null);return!1}var Ed=Error(i(461)),Ot=!1;function Jt(r,a,s,c){a.child=r===null?tx(a,null,s,c):na(a,r.child,s,c)}function Qx(r,a,s,c,m){s=s.render;var g=a.ref;if("ref"in c){var S={};for(var k in c)k!=="ref"&&(S[k]=c[k])}else S=c;return Qi(a),c=sd(r,a,s,S,g,m),k=ld(),r!==null&&!Ot?(ud(r,a,m),$r(r,a,m)):(Ue&&k&&Bf(a),a.flags|=1,Jt(r,a,c,m),a.child)}function Wx(r,a,s,c,m){if(r===null){var g=s.type;return typeof g=="function"&&!Pf(g)&&g.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=g,ev(r,a,g,c,m)):(r=Wl(s.type,null,c,a,a.mode,m),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!Md(r,m)){var S=g.memoizedProps;if(s=s.compare,s=s!==null?s:us,s(S,c)&&r.ref===a.ref)return $r(r,a,m)}return a.flags|=1,r=jr(g,c),r.ref=a.ref,r.return=a,a.child=r}function ev(r,a,s,c,m){if(r!==null){var g=r.memoizedProps;if(us(g,c)&&r.ref===a.ref)if(Ot=!1,a.pendingProps=c=g,Md(r,m))(r.flags&131072)!==0&&(Ot=!0);else return a.lanes=r.lanes,$r(r,a,m)}return Td(r,a,s,c,m)}function tv(r,a,s,c){var m=c.children,g=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,r!==null){for(c=a.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~g}else c=0,a.child=null;return nv(r,a,g,s,c)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&ru(a,g!==null?g.cachePool:null),g!==null?ix(a,g):rd(),ax(a);else return c=a.lanes=536870912,nv(r,a,g!==null?g.baseLanes|s:s,s,c)}else g!==null?(ru(a,g.cachePool),ix(a,g),ci(),a.memoizedState=null):(r!==null&&ru(a,null),rd(),ci());return Jt(r,a,m,s),a.child}function zs(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function nv(r,a,s,c,m){var g=Jf();return g=g===null?null:{parent:jt._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},r!==null&&ru(a,null),rd(),ax(a),r!==null&&Ba(r,a,c,!0),a.childLanes=m,null}function vu(r,a){return a=Su({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function rv(r,a,s){return na(a,r.child,null,s),r=vu(a,a.pendingProps),r.flags|=2,Nn(a),a.memoizedState=null,r}function XE(r,a,s){var c=a.pendingProps,m=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Ue){if(c.mode==="hidden")return r=vu(a,c),a.lanes=536870912,zs(null,r);if(ad(a),(r=ct)?(r=pb(r,Gn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ni!==null?{id:pr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},s=Vy(r),s.return=a,a.child=s,Xt=a,ct=null)):r=null,r===null)throw ii(a);return a.lanes=536870912,null}return vu(a,c)}var g=r.memoizedState;if(g!==null){var S=g.dehydrated;if(ad(a),m)if(a.flags&256)a.flags&=-257,a=rv(r,a,s);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Ot||Ba(r,a,s,!1),m=(s&r.childLanes)!==0,Ot||m){if(c=it,c!==null&&(S=Gg(c,s),S!==0&&S!==g.retryLane))throw g.retryLane=S,Yi(r,S),kn(c,r,S),Ed;ju(),a=rv(r,a,s)}else r=g.treeContext,ct=Xn(S.nextSibling),Xt=a,Ue=!0,ri=null,Gn=!1,r!==null&&Iy(a,r),a=vu(a,c),a.flags|=4096;return a}return r=jr(r.child,{mode:c.mode,children:c.children}),r.ref=a.ref,a.child=r,r.return=a,r}function bu(r,a){var s=a.ref;if(s===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(i(284));(r===null||r.ref!==s)&&(a.flags|=4194816)}}function Td(r,a,s,c,m){return Qi(a),s=sd(r,a,s,c,void 0,m),c=ld(),r!==null&&!Ot?(ud(r,a,m),$r(r,a,m)):(Ue&&c&&Bf(a),a.flags|=1,Jt(r,a,s,m),a.child)}function iv(r,a,s,c,m,g){return Qi(a),a.updateQueue=null,s=sx(a,c,s,m),ox(r),c=ld(),r!==null&&!Ot?(ud(r,a,g),$r(r,a,g)):(Ue&&c&&Bf(a),a.flags|=1,Jt(r,a,s,g),a.child)}function av(r,a,s,c,m){if(Qi(a),a.stateNode===null){var g=Ua,S=s.contextType;typeof S=="object"&&S!==null&&(g=Kt(S)),g=new s(c,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=zd,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Wf(a),S=s.contextType,g.context=typeof S=="object"&&S!==null?Kt(S):Ua,g.state=a.memoizedState,S=s.getDerivedStateFromProps,typeof S=="function"&&(wd(a,s,S,c),g.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&zd.enqueueReplaceState(g,g.state,null),vs(a,c,g,m),xs(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(r===null){g=a.stateNode;var k=a.memoizedProps,R=ia(s,k);g.props=R;var H=g.context,K=s.contextType;S=Ua,typeof K=="object"&&K!==null&&(S=Kt(K));var te=s.getDerivedStateFromProps;K=typeof te=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=a.pendingProps!==k,K||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||H!==S)&&Fx(a,g,c,S),oi=!1;var F=a.memoizedState;g.state=F,vs(a,c,g,m),xs(),H=a.memoizedState,k||F!==H||oi?(typeof te=="function"&&(wd(a,s,te,c),H=a.memoizedState),(R=oi||Hx(a,s,R,c,F,H,S))?(K||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=H),g.props=c,g.state=H,g.context=S,c=R):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{g=a.stateNode,ed(r,a),S=a.memoizedProps,K=ia(s,S),g.props=K,te=a.pendingProps,F=g.context,H=s.contextType,R=Ua,typeof H=="object"&&H!==null&&(R=Kt(H)),k=s.getDerivedStateFromProps,(H=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==te||F!==R)&&Fx(a,g,c,R),oi=!1,F=a.memoizedState,g.state=F,vs(a,c,g,m),xs();var q=a.memoizedState;S!==te||F!==q||oi||r!==null&&r.dependencies!==null&&tu(r.dependencies)?(typeof k=="function"&&(wd(a,s,k,c),q=a.memoizedState),(K=oi||Hx(a,s,K,c,F,q,R)||r!==null&&r.dependencies!==null&&tu(r.dependencies))?(H||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,q,R),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,q,R)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===r.memoizedProps&&F===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&F===r.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=q),g.props=c,g.state=q,g.context=R,c=K):(typeof g.componentDidUpdate!="function"||S===r.memoizedProps&&F===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&F===r.memoizedState||(a.flags|=1024),c=!1)}return g=c,bu(r,a),c=(a.flags&128)!==0,g||c?(g=a.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,r!==null&&c?(a.child=na(a,r.child,null,m),a.child=na(a,null,s,m)):Jt(r,a,s,m),a.memoizedState=g.state,r=a.child):r=$r(r,a,m),r}function ov(r,a,s,c){return Ki(),a.flags|=256,Jt(r,a,s,c),a.child}var Cd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ad(r){return{baseLanes:r,cachePool:Xy()}}function jd(r,a,s){return r=r!==null?r.childLanes&~s:0,a&&(r|=Rn),r}function sv(r,a,s){var c=a.pendingProps,m=!1,g=(a.flags&128)!==0,S;if((S=g)||(S=r!==null&&r.memoizedState===null?!1:(Tt.current&2)!==0),S&&(m=!0,a.flags&=-129),S=(a.flags&32)!==0,a.flags&=-33,r===null){if(Ue){if(m?ui(a):ci(),(r=ct)?(r=pb(r,Gn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ni!==null?{id:pr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},s=Vy(r),s.return=a,a.child=s,Xt=a,ct=null)):r=null,r===null)throw ii(a);return dh(r)?a.lanes=32:a.lanes=536870912,null}var k=c.children;return c=c.fallback,m?(ci(),m=a.mode,k=Su({mode:"hidden",children:k},m),c=Xi(c,m,s,null),k.return=a,c.return=a,k.sibling=c,a.child=k,c=a.child,c.memoizedState=Ad(s),c.childLanes=jd(r,S,s),a.memoizedState=Cd,zs(null,c)):(ui(a),Nd(a,k))}var R=r.memoizedState;if(R!==null&&(k=R.dehydrated,k!==null)){if(g)a.flags&256?(ui(a),a.flags&=-257,a=Od(r,a,s)):a.memoizedState!==null?(ci(),a.child=r.child,a.flags|=128,a=null):(ci(),k=c.fallback,m=a.mode,c=Su({mode:"visible",children:c.children},m),k=Xi(k,m,s,null),k.flags|=2,c.return=a,k.return=a,c.sibling=k,a.child=c,na(a,r.child,null,s),c=a.child,c.memoizedState=Ad(s),c.childLanes=jd(r,S,s),a.memoizedState=Cd,a=zs(null,c));else if(ui(a),dh(k)){if(S=k.nextSibling&&k.nextSibling.dataset,S)var H=S.dgst;S=H,c=Error(i(419)),c.stack="",c.digest=S,ds({value:c,source:null,stack:null}),a=Od(r,a,s)}else if(Ot||Ba(r,a,s,!1),S=(s&r.childLanes)!==0,Ot||S){if(S=it,S!==null&&(c=Gg(S,s),c!==0&&c!==R.retryLane))throw R.retryLane=c,Yi(r,c),kn(S,r,c),Ed;fh(k)||ju(),a=Od(r,a,s)}else fh(k)?(a.flags|=192,a.child=r.child,a=null):(r=R.treeContext,ct=Xn(k.nextSibling),Xt=a,Ue=!0,ri=null,Gn=!1,r!==null&&Iy(a,r),a=Nd(a,c.children),a.flags|=4096);return a}return m?(ci(),k=c.fallback,m=a.mode,R=r.child,H=R.sibling,c=jr(R,{mode:"hidden",children:c.children}),c.subtreeFlags=R.subtreeFlags&65011712,H!==null?k=jr(H,k):(k=Xi(k,m,s,null),k.flags|=2),k.return=a,c.return=a,c.sibling=k,a.child=c,zs(null,c),c=a.child,k=r.child.memoizedState,k===null?k=Ad(s):(m=k.cachePool,m!==null?(R=jt._currentValue,m=m.parent!==R?{parent:R,pool:R}:m):m=Xy(),k={baseLanes:k.baseLanes|s,cachePool:m}),c.memoizedState=k,c.childLanes=jd(r,S,s),a.memoizedState=Cd,zs(r.child,c)):(ui(a),s=r.child,r=s.sibling,s=jr(s,{mode:"visible",children:c.children}),s.return=a,s.sibling=null,r!==null&&(S=a.deletions,S===null?(a.deletions=[r],a.flags|=16):S.push(r)),a.child=s,a.memoizedState=null,s)}function Nd(r,a){return a=Su({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function Su(r,a){return r=An(22,r,null,a),r.lanes=0,r}function Od(r,a,s){return na(a,r.child,null,s),r=Nd(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function lv(r,a,s){r.lanes|=a;var c=r.alternate;c!==null&&(c.lanes|=a),Gf(r.return,a,s)}function Rd(r,a,s,c,m,g){var S=r.memoizedState;S===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:g}:(S.isBackwards=a,S.rendering=null,S.renderingStartTime=0,S.last=c,S.tail=s,S.tailMode=m,S.treeForkCount=g)}function uv(r,a,s){var c=a.pendingProps,m=c.revealOrder,g=c.tail;c=c.children;var S=Tt.current,k=(S&2)!==0;if(k?(S=S&1|2,a.flags|=128):S&=1,z(Tt,S),Jt(r,a,c,s),c=Ue?fs:0,!k&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&lv(r,s,a);else if(r.tag===19)lv(r,s,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=a.child,m=null;s!==null;)r=s.alternate,r!==null&&uu(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=a.child,a.child=null):(m=s.sibling,s.sibling=null),Rd(a,!1,m,s,g,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=a.child,a.child=null;m!==null;){if(r=m.alternate,r!==null&&uu(r)===null){a.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}Rd(a,!0,s,null,g,c);break;case"together":Rd(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function $r(r,a,s){if(r!==null&&(a.dependencies=r.dependencies),hi|=a.lanes,(s&a.childLanes)===0)if(r!==null){if(Ba(r,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,s=jr(r,r.pendingProps),a.child=s,s.return=a;r.sibling!==null;)r=r.sibling,s=s.sibling=jr(r,r.pendingProps),s.return=a;s.sibling=null}return a.child}function Md(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&tu(r)))}function KE(r,a,s){switch(a.tag){case 3:Ge(a,a.stateNode.containerInfo),ai(a,jt,r.memoizedState.cache),Ki();break;case 27:case 5:At(a);break;case 4:Ge(a,a.stateNode.containerInfo);break;case 10:ai(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,ad(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(ui(a),a.flags|=128,null):(s&a.child.childLanes)!==0?sv(r,a,s):(ui(a),r=$r(r,a,s),r!==null?r.sibling:null);ui(a);break;case 19:var m=(r.flags&128)!==0;if(c=(s&a.childLanes)!==0,c||(Ba(r,a,s,!1),c=(s&a.childLanes)!==0),m){if(c)return uv(r,a,s);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),z(Tt,Tt.current),c)break;return null;case 22:return a.lanes=0,tv(r,a,s,a.pendingProps);case 24:ai(a,jt,r.memoizedState.cache)}return $r(r,a,s)}function cv(r,a,s){if(r!==null)if(r.memoizedProps!==a.pendingProps)Ot=!0;else{if(!Md(r,s)&&(a.flags&128)===0)return Ot=!1,KE(r,a,s);Ot=(r.flags&131072)!==0}else Ot=!1,Ue&&(a.flags&1048576)!==0&&By(a,fs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(r=ea(a.elementType),a.type=r,typeof r=="function")Pf(r)?(c=ia(r,c),a.tag=1,a=av(null,a,r,c,s)):(a.tag=0,a=Td(null,a,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===P){a.tag=11,a=Qx(null,a,r,c,s);break e}else if(m===Y){a.tag=14,a=Wx(null,a,r,c,s);break e}}throw a=se(r)||r,Error(i(306,a,""))}}return a;case 0:return Td(r,a,a.type,a.pendingProps,s);case 1:return c=a.type,m=ia(c,a.pendingProps),av(r,a,c,m,s);case 3:e:{if(Ge(a,a.stateNode.containerInfo),r===null)throw Error(i(387));c=a.pendingProps;var g=a.memoizedState;m=g.element,ed(r,a),vs(a,c,null,s);var S=a.memoizedState;if(c=S.cache,ai(a,jt,c),c!==g.cache&&Yf(a,[jt],s,!0),xs(),c=S.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:S.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=ov(r,a,c,s);break e}else if(c!==m){m=Hn(Error(i(424)),a),ds(m),a=ov(r,a,c,s);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,ct=Xn(r.firstChild),Xt=a,Ue=!0,ri=null,Gn=!0,s=tx(a,null,c,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ki(),c===m){a=$r(r,a,s);break e}Jt(r,a,c,s)}a=a.child}return a;case 26:return bu(r,a),r===null?(s=Sb(a.type,null,a.pendingProps,null))?a.memoizedState=s:Ue||(s=a.type,r=a.pendingProps,c=Lu(pe.current).createElement(s),c[Yt]=a,c[gn]=r,Qt(c,s,r),Ft(c),a.stateNode=c):a.memoizedState=Sb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return At(a),r===null&&Ue&&(c=a.stateNode=xb(a.type,a.pendingProps,pe.current),Xt=a,Gn=!0,m=ct,xi(a.type)?(hh=m,ct=Xn(c.firstChild)):ct=m),Jt(r,a,a.pendingProps.children,s),bu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Ue&&((m=c=ct)&&(c=ET(c,a.type,a.pendingProps,Gn),c!==null?(a.stateNode=c,Xt=a,ct=Xn(c.firstChild),Gn=!1,m=!0):m=!1),m||ii(a)),At(a),m=a.type,g=a.pendingProps,S=r!==null?r.memoizedProps:null,c=g.children,lh(m,g)?c=null:S!==null&&lh(m,S)&&(a.flags|=32),a.memoizedState!==null&&(m=sd(r,a,ZE,null,null,s),Ps._currentValue=m),bu(r,a),Jt(r,a,c,s),a.child;case 6:return r===null&&Ue&&((r=s=ct)&&(s=TT(s,a.pendingProps,Gn),s!==null?(a.stateNode=s,Xt=a,ct=null,r=!0):r=!1),r||ii(a)),null;case 13:return sv(r,a,s);case 4:return Ge(a,a.stateNode.containerInfo),c=a.pendingProps,r===null?a.child=na(a,null,c,s):Jt(r,a,c,s),a.child;case 11:return Qx(r,a,a.type,a.pendingProps,s);case 7:return Jt(r,a,a.pendingProps,s),a.child;case 8:return Jt(r,a,a.pendingProps.children,s),a.child;case 12:return Jt(r,a,a.pendingProps.children,s),a.child;case 10:return c=a.pendingProps,ai(a,a.type,c.value),Jt(r,a,c.children,s),a.child;case 9:return m=a.type._context,c=a.pendingProps.children,Qi(a),m=Kt(m),c=c(m),a.flags|=1,Jt(r,a,c,s),a.child;case 14:return Wx(r,a,a.type,a.pendingProps,s);case 15:return ev(r,a,a.type,a.pendingProps,s);case 19:return uv(r,a,s);case 31:return XE(r,a,s);case 22:return tv(r,a,s,a.pendingProps);case 24:return Qi(a),c=Kt(jt),r===null?(m=Jf(),m===null&&(m=it,g=Xf(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=s),m=g),a.memoizedState={parent:c,cache:m},Wf(a),ai(a,jt,m)):((r.lanes&s)!==0&&(ed(r,a),vs(a,null,null,s),xs()),m=r.memoizedState,g=a.memoizedState,m.parent!==c?(m={parent:c,cache:c},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),ai(a,jt,c)):(c=g.cache,ai(a,jt,c),c!==m.cache&&Yf(a,[jt],s,!0))),Jt(r,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Lr(r){r.flags|=4}function Dd(r,a,s,c,m){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(Lv())r.flags|=8192;else throw ta=au,Qf}else r.flags&=-16777217}function fv(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Eb(a))if(Lv())r.flags|=8192;else throw ta=au,Qf}function ku(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?Hg():536870912,r.lanes|=a,eo|=a)}function _s(r,a){if(!Ue)switch(r.tailMode){case"hidden":a=r.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.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?a||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function ft(r){var a=r.alternate!==null&&r.alternate.child===r.child,s=0,c=0;if(a)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,a}function JE(r,a,s){var c=a.pendingProps;switch(If(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(a),null;case 1:return ft(a),null;case 3:return s=a.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Rr(jt),De(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Za(a)?Lr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ff())),ft(a),null;case 26:var m=a.type,g=a.memoizedState;return r===null?(Lr(a),g!==null?(ft(a),fv(a,g)):(ft(a),Dd(a,m,null,c,s))):g?g!==r.memoizedState?(Lr(a),ft(a),fv(a,g)):(ft(a),a.flags&=-16777217):(r=r.memoizedProps,r!==c&&Lr(a),ft(a),Dd(a,m,r,c,s)),null;case 27:if(on(a),s=pe.current,m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return ft(a),null}r=ae.current,Za(a)?Hy(a):(r=xb(m,c,s),a.stateNode=r,Lr(a))}return ft(a),null;case 5:if(on(a),m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return ft(a),null}if(g=ae.current,Za(a))Hy(a);else{var S=Lu(pe.current);switch(g){case 1:g=S.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:g=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":g=S.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":g=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":g=S.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?S.createElement(m,{is:c.is}):S.createElement(m)}}g[Yt]=a,g[gn]=c;e:for(S=a.child;S!==null;){if(S.tag===5||S.tag===6)g.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===a)break e;for(;S.sibling===null;){if(S.return===null||S.return===a)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}a.stateNode=g;e:switch(Qt(g,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&&Lr(a)}}return ft(a),Dd(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,s),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(r=pe.current,Za(a)){if(r=a.stateNode,s=a.memoizedProps,c=null,m=Xt,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[Yt]=a,r=!!(r.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||sb(r.nodeValue,s)),r||ii(a,!0)}else r=Lu(r).createTextNode(c),r[Yt]=a,a.stateNode=r}return ft(a),null;case 31:if(s=a.memoizedState,r===null||r.memoizedState!==null){if(c=Za(a),s!==null){if(r===null){if(!c)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Yt]=a}else Ki(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ft(a),r=!1}else s=Ff(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return a.flags&256?(Nn(a),a):(Nn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return ft(a),null;case 13:if(c=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Za(a),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(i(318));if(m=a.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(i(317));m[Yt]=a}else Ki(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ft(a),m=!1}else m=Ff(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(Nn(a),a):(Nn(a),null)}return Nn(a),(a.flags&128)!==0?(a.lanes=s,a):(s=c!==null,r=r!==null&&r.memoizedState!==null,s&&(c=a.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==m&&(c.flags|=2048)),s!==r&&s&&(a.child.flags|=8192),ku(a,a.updateQueue),ft(a),null);case 4:return De(),r===null&&rh(a.stateNode.containerInfo),ft(a),null;case 10:return Rr(a.type),ft(a),null;case 19:if(G(Tt),c=a.memoizedState,c===null)return ft(a),null;if(m=(a.flags&128)!==0,g=c.rendering,g===null)if(m)_s(c,!1);else{if(zt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=uu(r),g!==null){for(a.flags|=128,_s(c,!1),r=g.updateQueue,a.updateQueue=r,ku(a,r),a.subtreeFlags=0,r=s,s=a.child;s!==null;)Py(s,r),s=s.sibling;return z(Tt,Tt.current&1|2),Ue&&Nr(a,c.treeForkCount),a.child}r=r.sibling}c.tail!==null&&ut()>Tu&&(a.flags|=128,m=!0,_s(c,!1),a.lanes=4194304)}else{if(!m)if(r=uu(g),r!==null){if(a.flags|=128,m=!0,r=r.updateQueue,a.updateQueue=r,ku(a,r),_s(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Ue)return ft(a),null}else 2*ut()-c.renderingStartTime>Tu&&s!==536870912&&(a.flags|=128,m=!0,_s(c,!1),a.lanes=4194304);c.isBackwards?(g.sibling=a.child,a.child=g):(r=c.last,r!==null?r.sibling=g:a.child=g,c.last=g)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=ut(),r.sibling=null,s=Tt.current,z(Tt,m?s&1|2:s&1),Ue&&Nr(a,c.treeForkCount),r):(ft(a),null);case 22:case 23:return Nn(a),id(),c=a.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(s&536870912)!==0&&(a.flags&128)===0&&(ft(a),a.subtreeFlags&6&&(a.flags|=8192)):ft(a),s=a.updateQueue,s!==null&&ku(a,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==s&&(a.flags|=2048),r!==null&&G(Wi),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Rr(jt),ft(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function QE(r,a){switch(If(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Rr(jt),De(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return on(a),null;case 31:if(a.memoizedState!==null){if(Nn(a),a.alternate===null)throw Error(i(340));Ki()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(Nn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ki()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return G(Tt),null;case 4:return De(),null;case 10:return Rr(a.type),null;case 22:case 23:return Nn(a),id(),r!==null&&G(Wi),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Rr(jt),null;case 25:return null;default:return null}}function dv(r,a){switch(If(a),a.tag){case 3:Rr(jt),De();break;case 26:case 27:case 5:on(a);break;case 4:De();break;case 31:a.memoizedState!==null&&Nn(a);break;case 13:Nn(a);break;case 19:G(Tt);break;case 10:Rr(a.type);break;case 22:case 23:Nn(a),id(),r!==null&&G(Wi);break;case 24:Rr(jt)}}function Es(r,a){try{var s=a.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 g=s.create,S=s.inst;c=g(),S.destroy=c}s=s.next}while(s!==m)}}catch(k){Xe(a,a.return,k)}}function fi(r,a,s){try{var c=a.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var g=m.next;c=g;do{if((c.tag&r)===r){var S=c.inst,k=S.destroy;if(k!==void 0){S.destroy=void 0,m=a;var R=s,H=k;try{H()}catch(K){Xe(m,R,K)}}}c=c.next}while(c!==g)}}catch(K){Xe(a,a.return,K)}}function hv(r){var a=r.updateQueue;if(a!==null){var s=r.stateNode;try{rx(a,s)}catch(c){Xe(r,r.return,c)}}}function mv(r,a,s){s.props=ia(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){Xe(r,a,c)}}function Ts(r,a){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){Xe(r,a,m)}}function yr(r,a){var s=r.ref,c=r.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){Xe(r,a,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Xe(r,a,m)}else s.current=null}function pv(r){var a=r.type,s=r.memoizedProps,c=r.stateNode;try{e:switch(a){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){Xe(r,r.return,m)}}function $d(r,a,s){try{var c=r.stateNode;bT(c,r.type,s,a),c[gn]=a}catch(m){Xe(r,r.return,m)}}function gv(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&xi(r.type)||r.tag===4}function Ld(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||gv(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&&xi(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 Ud(r,a,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(r),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=Cr));else if(c!==4&&(c===27&&xi(r.type)&&(s=r.stateNode,a=null),r=r.child,r!==null))for(Ud(r,a,s),r=r.sibling;r!==null;)Ud(r,a,s),r=r.sibling}function wu(r,a,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?s.insertBefore(r,a):s.appendChild(r);else if(c!==4&&(c===27&&xi(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(wu(r,a,s),r=r.sibling;r!==null;)wu(r,a,s),r=r.sibling}function yv(r){var a=r.stateNode,s=r.memoizedProps;try{for(var c=r.type,m=a.attributes;m.length;)a.removeAttributeNode(m[0]);Qt(a,c,s),a[Yt]=r,a[gn]=s}catch(g){Xe(r,r.return,g)}}var Ur=!1,Rt=!1,Pd=!1,xv=typeof WeakSet=="function"?WeakSet:Set,qt=null;function WE(r,a){if(r=r.containerInfo,oh=Hu,r=jy(r),Of(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,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var S=0,k=-1,R=-1,H=0,K=0,te=r,F=null;t:for(;;){for(var q;te!==s||m!==0&&te.nodeType!==3||(k=S+m),te!==g||c!==0&&te.nodeType!==3||(R=S+c),te.nodeType===3&&(S+=te.nodeValue.length),(q=te.firstChild)!==null;)F=te,te=q;for(;;){if(te===r)break t;if(F===s&&++H===m&&(k=S),F===g&&++K===c&&(R=S),(q=te.nextSibling)!==null)break;te=F,F=te.parentNode}te=q}s=k===-1||R===-1?null:{start:k,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;for(sh={focusedElem:r,selectionRange:s},Hu=!1,qt=a;qt!==null;)if(a=qt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,qt=r;else for(;qt!==null;){switch(a=qt,g=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.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&&g!==null){r=void 0,s=a,m=g.memoizedProps,g=g.memoizedState,c=s.stateNode;try{var fe=ia(s.type,m);r=c.getSnapshotBeforeUpdate(fe,g),c.__reactInternalSnapshotBeforeUpdate=r}catch(we){Xe(s,s.return,we)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,s=r.nodeType,s===9)ch(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":ch(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(i(163))}if(r=a.sibling,r!==null){r.return=a.return,qt=r;break}qt=a.return}}function vv(r,a,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Vr(r,s),c&4&&Es(5,s);break;case 1:if(Vr(r,s),c&4)if(r=s.stateNode,a===null)try{r.componentDidMount()}catch(S){Xe(s,s.return,S)}else{var m=ia(s.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(m,a,r.__reactInternalSnapshotBeforeUpdate)}catch(S){Xe(s,s.return,S)}}c&64&&hv(s),c&512&&Ts(s,s.return);break;case 3:if(Vr(r,s),c&64&&(r=s.updateQueue,r!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{rx(r,a)}catch(S){Xe(s,s.return,S)}}break;case 27:a===null&&c&4&&yv(s);case 26:case 5:Vr(r,s),a===null&&c&4&&pv(s),c&512&&Ts(s,s.return);break;case 12:Vr(r,s);break;case 31:Vr(r,s),c&4&&kv(r,s);break;case 13:Vr(r,s),c&4&&wv(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=lT.bind(null,s),CT(r,s))));break;case 22:if(c=s.memoizedState!==null||Ur,!c){a=a!==null&&a.memoizedState!==null||Rt,m=Ur;var g=Rt;Ur=c,(Rt=a)&&!g?Zr(r,s,(s.subtreeFlags&8772)!==0):Vr(r,s),Ur=m,Rt=g}break;case 30:break;default:Vr(r,s)}}function bv(r){var a=r.alternate;a!==null&&(r.alternate=null,bv(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&pf(a)),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 Pr(r,a,s){for(s=s.child;s!==null;)Sv(r,a,s),s=s.sibling}function Sv(r,a,s){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(ln,s)}catch{}switch(s.tag){case 26:Rt||yr(s,a),Pr(r,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Rt||yr(s,a);var c=ht,m=xn;xi(s.type)&&(ht=s.stateNode,xn=!1),Pr(r,a,s),$s(s.stateNode),ht=c,xn=m;break;case 5:Rt||yr(s,a);case 6:if(c=ht,m=xn,ht=null,Pr(r,a,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(g){Xe(s,a,g)}else try{ht.removeChild(s.stateNode)}catch(g){Xe(s,a,g)}break;case 18:ht!==null&&(xn?(r=ht,hb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),lo(r)):hb(ht,s.stateNode));break;case 4:c=ht,m=xn,ht=s.stateNode.containerInfo,xn=!0,Pr(r,a,s),ht=c,xn=m;break;case 0:case 11:case 14:case 15:fi(2,s,a),Rt||fi(4,s,a),Pr(r,a,s);break;case 1:Rt||(yr(s,a),c=s.stateNode,typeof c.componentWillUnmount=="function"&&mv(s,a,c)),Pr(r,a,s);break;case 21:Pr(r,a,s);break;case 22:Rt=(c=Rt)||s.memoizedState!==null,Pr(r,a,s),Rt=c;break;default:Pr(r,a,s)}}function kv(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{lo(r)}catch(s){Xe(a,a.return,s)}}}function wv(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{lo(r)}catch(s){Xe(a,a.return,s)}}function eT(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new xv),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new xv),a;default:throw Error(i(435,r.tag))}}function zu(r,a){var s=eT(r);a.forEach(function(c){if(!s.has(c)){s.add(c);var m=uT.bind(null,r,c);c.then(m,m)}})}function vn(r,a){var s=a.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],g=r,S=a,k=S;e:for(;k!==null;){switch(k.tag){case 27:if(xi(k.type)){ht=k.stateNode,xn=!1;break e}break;case 5:ht=k.stateNode,xn=!1;break e;case 3:case 4:ht=k.stateNode.containerInfo,xn=!0;break e}k=k.return}if(ht===null)throw Error(i(160));Sv(g,S,m),ht=null,xn=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)zv(a,r),a=a.sibling}var lr=null;function zv(r,a){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:vn(a,r),bn(r),c&4&&(fi(3,r,r.return),Es(3,r),fi(5,r,r.return));break;case 1:vn(a,r),bn(r),c&512&&(Rt||s===null||yr(s,s.return)),c&64&&Ur&&(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=lr;if(vn(a,r),bn(r),c&512&&(Rt||s===null||yr(s,s.return)),c&4){var g=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":g=m.getElementsByTagName("title")[0],(!g||g[es]||g[Yt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=m.createElement(c),m.head.insertBefore(g,m.querySelector("head > title"))),Qt(g,c,s),g[Yt]=r,Ft(g),c=g;break e;case"link":var S=zb("link","href",m).get(c+(s.href||""));if(S){for(var k=0;k<S.length;k++)if(g=S[k],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){S.splice(k,1);break t}}g=m.createElement(c),Qt(g,c,s),m.head.appendChild(g);break;case"meta":if(S=zb("meta","content",m).get(c+(s.content||""))){for(k=0;k<S.length;k++)if(g=S[k],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){S.splice(k,1);break t}}g=m.createElement(c),Qt(g,c,s),m.head.appendChild(g);break;default:throw Error(i(468,c))}g[Yt]=r,Ft(g),c=g}r.stateNode=c}else _b(m,r.type,r.stateNode);else r.stateNode=wb(m,c,r.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?_b(m,r.type,r.stateNode):wb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&$d(r,r.memoizedProps,s.memoizedProps)}break;case 27:vn(a,r),bn(r),c&512&&(Rt||s===null||yr(s,s.return)),s!==null&&c&4&&$d(r,r.memoizedProps,s.memoizedProps);break;case 5:if(vn(a,r),bn(r),c&512&&(Rt||s===null||yr(s,s.return)),r.flags&32){m=r.stateNode;try{Na(m,"")}catch(fe){Xe(r,r.return,fe)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,$d(r,m,s!==null?s.memoizedProps:m)),c&1024&&(Pd=!0);break;case 6:if(vn(a,r),bn(r),c&4){if(r.stateNode===null)throw Error(i(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(fe){Xe(r,r.return,fe)}}break;case 3:if(Vu=null,m=lr,lr=Uu(a.containerInfo),vn(a,r),lr=m,bn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{lo(a.containerInfo)}catch(fe){Xe(r,r.return,fe)}Pd&&(Pd=!1,_v(r));break;case 4:c=lr,lr=Uu(r.stateNode.containerInfo),vn(a,r),bn(r),lr=c;break;case 12:vn(a,r),bn(r);break;case 31:vn(a,r),bn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,zu(r,c)));break;case 13:vn(a,r),bn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Eu=ut()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,zu(r,c)));break;case 22:m=r.memoizedState!==null;var R=s!==null&&s.memoizedState!==null,H=Ur,K=Rt;if(Ur=H||m,Rt=K||R,vn(a,r),Rt=K,Ur=H,bn(r),c&8192)e:for(a=r.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(s===null||R||Ur||Rt||aa(r)),s=null,a=r;;){if(a.tag===5||a.tag===26){if(s===null){R=s=a;try{if(g=R.stateNode,m)S=g.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{k=R.stateNode;var te=R.memoizedProps.style,F=te!=null&&te.hasOwnProperty("display")?te.display:null;k.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(fe){Xe(R,R.return,fe)}}}else if(a.tag===6){if(s===null){R=a;try{R.stateNode.nodeValue=m?"":R.memoizedProps}catch(fe){Xe(R,R.return,fe)}}}else if(a.tag===18){if(s===null){R=a;try{var q=R.stateNode;m?mb(q,!0):mb(R.stateNode,!1)}catch(fe){Xe(R,R.return,fe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=r.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,zu(r,s))));break;case 19:vn(a,r),bn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,zu(r,c)));break;case 30:break;case 21:break;default:vn(a,r),bn(r)}}function bn(r){var a=r.flags;if(a&2){try{for(var s,c=r.return;c!==null;){if(gv(c)){s=c;break}c=c.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var m=s.stateNode,g=Ld(r);wu(r,g,m);break;case 5:var S=s.stateNode;s.flags&32&&(Na(S,""),s.flags&=-33);var k=Ld(r);wu(r,k,S);break;case 3:case 4:var R=s.stateNode.containerInfo,H=Ld(r);Ud(r,H,R);break;default:throw Error(i(161))}}catch(K){Xe(r,r.return,K)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function _v(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;_v(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Vr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)vv(r,a.alternate,a),a=a.sibling}function aa(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:fi(4,a,a.return),aa(a);break;case 1:yr(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&mv(a,a.return,s),aa(a);break;case 27:$s(a.stateNode);case 26:case 5:yr(a,a.return),aa(a);break;case 22:a.memoizedState===null&&aa(a);break;case 30:aa(a);break;default:aa(a)}r=r.sibling}}function Zr(r,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,m=r,g=a,S=g.flags;switch(g.tag){case 0:case 11:case 15:Zr(m,g,s),Es(4,g);break;case 1:if(Zr(m,g,s),c=g,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(H){Xe(c,c.return,H)}if(c=g,m=c.updateQueue,m!==null){var k=c.stateNode;try{var R=m.shared.hiddenCallbacks;if(R!==null)for(m.shared.hiddenCallbacks=null,m=0;m<R.length;m++)nx(R[m],k)}catch(H){Xe(c,c.return,H)}}s&&S&64&&hv(g),Ts(g,g.return);break;case 27:yv(g);case 26:case 5:Zr(m,g,s),s&&c===null&&S&4&&pv(g),Ts(g,g.return);break;case 12:Zr(m,g,s);break;case 31:Zr(m,g,s),s&&S&4&&kv(m,g);break;case 13:Zr(m,g,s),s&&S&4&&wv(m,g);break;case 22:g.memoizedState===null&&Zr(m,g,s),Ts(g,g.return);break;case 30:break;default:Zr(m,g,s)}a=a.sibling}}function Vd(r,a){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&hs(s))}function Zd(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&hs(r))}function ur(r,a,s,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Ev(r,a,s,c),a=a.sibling}function Ev(r,a,s,c){var m=a.flags;switch(a.tag){case 0:case 11:case 15:ur(r,a,s,c),m&2048&&Es(9,a);break;case 1:ur(r,a,s,c);break;case 3:ur(r,a,s,c),m&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&hs(r)));break;case 12:if(m&2048){ur(r,a,s,c),r=a.stateNode;try{var g=a.memoizedProps,S=g.id,k=g.onPostCommit;typeof k=="function"&&k(S,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(R){Xe(a,a.return,R)}}else ur(r,a,s,c);break;case 31:ur(r,a,s,c);break;case 13:ur(r,a,s,c);break;case 23:break;case 22:g=a.stateNode,S=a.alternate,a.memoizedState!==null?g._visibility&2?ur(r,a,s,c):Cs(r,a):g._visibility&2?ur(r,a,s,c):(g._visibility|=2,Ja(r,a,s,c,(a.subtreeFlags&10256)!==0||!1)),m&2048&&Vd(S,a);break;case 24:ur(r,a,s,c),m&2048&&Zd(a.alternate,a);break;default:ur(r,a,s,c)}}function Ja(r,a,s,c,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,S=a,k=s,R=c,H=S.flags;switch(S.tag){case 0:case 11:case 15:Ja(g,S,k,R,m),Es(8,S);break;case 23:break;case 22:var K=S.stateNode;S.memoizedState!==null?K._visibility&2?Ja(g,S,k,R,m):Cs(g,S):(K._visibility|=2,Ja(g,S,k,R,m)),m&&H&2048&&Vd(S.alternate,S);break;case 24:Ja(g,S,k,R,m),m&&H&2048&&Zd(S.alternate,S);break;default:Ja(g,S,k,R,m)}a=a.sibling}}function Cs(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=r,c=a,m=c.flags;switch(c.tag){case 22:Cs(s,c),m&2048&&Vd(c.alternate,c);break;case 24:Cs(s,c),m&2048&&Zd(c.alternate,c);break;default:Cs(s,c)}a=a.sibling}}var As=8192;function Qa(r,a,s){if(r.subtreeFlags&As)for(r=r.child;r!==null;)Tv(r,a,s),r=r.sibling}function Tv(r,a,s){switch(r.tag){case 26:Qa(r,a,s),r.flags&As&&r.memoizedState!==null&&VT(s,lr,r.memoizedState,r.memoizedProps);break;case 5:Qa(r,a,s);break;case 3:case 4:var c=lr;lr=Uu(r.stateNode.containerInfo),Qa(r,a,s),lr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=As,As=16777216,Qa(r,a,s),As=c):Qa(r,a,s));break;default:Qa(r,a,s)}}function Cv(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function js(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var c=a[s];qt=c,jv(c,r)}Cv(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Av(r),r=r.sibling}function Av(r){switch(r.tag){case 0:case 11:case 15:js(r),r.flags&2048&&fi(9,r,r.return);break;case 3:js(r);break;case 12:js(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,_u(r)):js(r);break;default:js(r)}}function _u(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var c=a[s];qt=c,jv(c,r)}Cv(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:fi(8,a,a.return),_u(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,_u(a));break;default:_u(a)}r=r.sibling}}function jv(r,a){for(;qt!==null;){var s=qt;switch(s.tag){case 0:case 11:case 15:fi(8,s,a);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:hs(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,qt=c;else e:for(s=r;qt!==null;){c=qt;var m=c.sibling,g=c.return;if(bv(c),c===s){qt=null;break e}if(m!==null){m.return=g,qt=m;break e}qt=g}}}var tT={getCacheForType:function(r){var a=Kt(jt),s=a.data.get(r);return s===void 0&&(s=r(),a.data.set(r,s)),s},cacheSignal:function(){return Kt(jt).controller.signal}},nT=typeof WeakMap=="function"?WeakMap:Map,He=0,it=null,Re=null,$e=0,Ye=0,On=null,di=!1,Wa=!1,Bd=!1,Br=0,zt=0,hi=0,oa=0,Id=0,Rn=0,eo=0,Ns=null,Sn=null,Hd=!1,Eu=0,Nv=0,Tu=1/0,Cu=null,mi=null,Zt=0,pi=null,to=null,Ir=0,Fd=0,qd=null,Ov=null,Os=0,Gd=null;function Mn(){return(He&2)!==0&&$e!==0?$e&-$e:V.T!==null?Wd():Yg()}function Rv(){if(Rn===0)if(($e&536870912)===0||Ue){var r=$l;$l<<=1,($l&3932160)===0&&($l=262144),Rn=r}else Rn=536870912;return r=jn.current,r!==null&&(r.flags|=32),Rn}function kn(r,a,s){(r===it&&(Ye===2||Ye===9)||r.cancelPendingCommit!==null)&&(no(r,0),gi(r,$e,Rn,!1)),Wo(r,s),((He&2)===0||r!==it)&&(r===it&&((He&2)===0&&(oa|=s),zt===4&&gi(r,$e,Rn,!1)),xr(r))}function Mv(r,a,s){if((He&6)!==0)throw Error(i(327));var c=!s&&(a&127)===0&&(a&r.expiredLanes)===0||Qo(r,a),m=c?aT(r,a):Xd(r,a,!0),g=c;do{if(m===0){Wa&&!c&&gi(r,a,0,!1);break}else{if(s=r.current.alternate,g&&!rT(s)){m=Xd(r,a,!1),g=!1;continue}if(m===2){if(g=a,r.errorRecoveryDisabledLanes&g)var S=0;else S=r.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){a=S;e:{var k=r;m=Ns;var R=k.current.memoizedState.isDehydrated;if(R&&(no(k,S).flags|=256),S=Xd(k,S,!1),S!==2){if(Bd&&!R){k.errorRecoveryDisabledLanes|=g,oa|=g,m=4;break e}g=Sn,Sn=m,g!==null&&(Sn===null?Sn=g:Sn.push.apply(Sn,g))}m=S}if(g=!1,m!==2)continue}}if(m===1){no(r,0),gi(r,a,0,!0);break}e:{switch(c=r,g=m,g){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:gi(c,a,Rn,!di);break e;case 2:Sn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(m=Eu+300-ut(),10<m)){if(gi(c,a,Rn,!di),Ul(c,0,!0)!==0)break e;Ir=a,c.timeoutHandle=fb(Dv.bind(null,c,s,Sn,Cu,Hd,a,Rn,oa,eo,di,g,"Throttled",-0,0),m);break e}Dv(c,s,Sn,Cu,Hd,a,Rn,oa,eo,di,g,null,-0,0)}}break}while(!0);xr(r)}function Dv(r,a,s,c,m,g,S,k,R,H,K,te,F,q){if(r.timeoutHandle=-1,te=a.subtreeFlags,te&8192||(te&16785408)===16785408){te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cr},Tv(a,g,te);var fe=(g&62914560)===g?Eu-ut():(g&4194048)===g?Nv-ut():0;if(fe=ZT(te,fe),fe!==null){Ir=g,r.cancelPendingCommit=fe(Iv.bind(null,r,a,g,s,c,m,S,k,R,K,te,null,F,q)),gi(r,g,S,!H);return}}Iv(r,a,g,s,c,m,S,k,R)}function rT(r){for(var a=r;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],g=m.getSnapshot;m=m.value;try{if(!Cn(g(),m))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function gi(r,a,s,c){a&=~Id,a&=~oa,r.suspendedLanes|=a,r.pingedLanes&=~a,c&&(r.warmLanes|=a),c=r.expirationTimes;for(var m=a;0<m;){var g=31-rt(m),S=1<<g;c[g]=-1,m&=~S}s!==0&&Fg(r,s,a)}function Au(){return(He&6)===0?(Rs(0),!1):!0}function Yd(){if(Re!==null){if(Ye===0)var r=Re.return;else r=Re,Or=Ji=null,cd(r),qa=null,ps=0,r=Re;for(;r!==null;)dv(r.alternate,r),r=r.return;Re=null}}function no(r,a){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,wT(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Ir=0,Yd(),it=r,Re=s=jr(r.current,null),$e=a,Ye=0,On=null,di=!1,Wa=Qo(r,a),Bd=!1,eo=Rn=Id=oa=hi=zt=0,Sn=Ns=null,Hd=!1,(a&8)!==0&&(a|=a&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=a;0<c;){var m=31-rt(c),g=1<<m;a|=r[m],c&=~g}return Br=a,Kl(),s}function $v(r,a){Ce=null,V.H=ws,a===Fa||a===iu?(a=Qy(),Ye=3):a===Qf?(a=Qy(),Ye=4):Ye=a===Ed?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,On=a,Re===null&&(zt=1,xu(r,Hn(a,r.current)))}function Lv(){var r=jn.current;return r===null?!0:($e&4194048)===$e?Yn===null:($e&62914560)===$e||($e&536870912)!==0?r===Yn:!1}function Uv(){var r=V.H;return V.H=ws,r===null?ws:r}function Pv(){var r=V.A;return V.A=tT,r}function ju(){zt=4,di||($e&4194048)!==$e&&jn.current!==null||(Wa=!0),(hi&134217727)===0&&(oa&134217727)===0||it===null||gi(it,$e,Rn,!1)}function Xd(r,a,s){var c=He;He|=2;var m=Uv(),g=Pv();(it!==r||$e!==a)&&(Cu=null,no(r,a)),a=!1;var S=zt;e:do try{if(Ye!==0&&Re!==null){var k=Re,R=On;switch(Ye){case 8:Yd(),S=6;break e;case 3:case 2:case 9:case 6:jn.current===null&&(a=!0);var H=Ye;if(Ye=0,On=null,ro(r,k,R,H),s&&Wa){S=0;break e}break;default:H=Ye,Ye=0,On=null,ro(r,k,R,H)}}iT(),S=zt;break}catch(K){$v(r,K)}while(!0);return a&&r.shellSuspendCounter++,Or=Ji=null,He=c,V.H=m,V.A=g,Re===null&&(it=null,$e=0,Kl()),S}function iT(){for(;Re!==null;)Vv(Re)}function aT(r,a){var s=He;He|=2;var c=Uv(),m=Pv();it!==r||$e!==a?(Cu=null,Tu=ut()+500,no(r,a)):Wa=Qo(r,a);e:do try{if(Ye!==0&&Re!==null){a=Re;var g=On;t:switch(Ye){case 1:Ye=0,On=null,ro(r,a,g,1);break;case 2:case 9:if(Ky(g)){Ye=0,On=null,Zv(a);break}a=function(){Ye!==2&&Ye!==9||it!==r||(Ye=7),xr(r)},g.then(a,a);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:Ky(g)?(Ye=0,On=null,Zv(a)):(Ye=0,On=null,ro(r,a,g,7));break;case 5:var S=null;switch(Re.tag){case 26:S=Re.memoizedState;case 5:case 27:var k=Re;if(S?Eb(S):k.stateNode.complete){Ye=0,On=null;var R=k.sibling;if(R!==null)Re=R;else{var H=k.return;H!==null?(Re=H,Nu(H)):Re=null}break t}}Ye=0,On=null,ro(r,a,g,5);break;case 6:Ye=0,On=null,ro(r,a,g,6);break;case 8:Yd(),zt=6;break e;default:throw Error(i(462))}}oT();break}catch(K){$v(r,K)}while(!0);return Or=Ji=null,V.H=c,V.A=m,He=s,Re!==null?0:(it=null,$e=0,Kl(),zt)}function oT(){for(;Re!==null&&!Et();)Vv(Re)}function Vv(r){var a=cv(r.alternate,r,Br);r.memoizedProps=r.pendingProps,a===null?Nu(r):Re=a}function Zv(r){var a=r,s=a.alternate;switch(a.tag){case 15:case 0:a=iv(s,a,a.pendingProps,a.type,void 0,$e);break;case 11:a=iv(s,a,a.pendingProps,a.type.render,a.ref,$e);break;case 5:cd(a);default:dv(s,a),a=Re=Py(a,Br),a=cv(s,a,Br)}r.memoizedProps=r.pendingProps,a===null?Nu(r):Re=a}function ro(r,a,s,c){Or=Ji=null,cd(a),qa=null,ps=0;var m=a.return;try{if(YE(r,m,a,s,$e)){zt=1,xu(r,Hn(s,r.current)),Re=null;return}}catch(g){if(m!==null)throw Re=m,g;zt=1,xu(r,Hn(s,r.current)),Re=null;return}a.flags&32768?(Ue||c===1?r=!0:Wa||($e&536870912)!==0?r=!1:(di=r=!0,(c===2||c===9||c===3||c===6)&&(c=jn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Bv(a,r)):Nu(a)}function Nu(r){var a=r;do{if((a.flags&32768)!==0){Bv(a,di);return}r=a.return;var s=JE(a.alternate,a,Br);if(s!==null){Re=s;return}if(a=a.sibling,a!==null){Re=a;return}Re=a=r}while(a!==null);zt===0&&(zt=5)}function Bv(r,a){do{var s=QE(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),!a&&(r=r.sibling,r!==null)){Re=r;return}Re=r=s}while(r!==null);zt=6,Re=null}function Iv(r,a,s,c,m,g,S,k,R){r.cancelPendingCommit=null;do Ou();while(Zt!==0);if((He&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(g=a.lanes|a.childLanes,g|=Lf,P2(r,s,g,S,k,R),r===it&&(Re=it=null,$e=0),to=a,pi=r,Ir=s,Fd=g,qd=m,Ov=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,cT(ye,function(){return Yv(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=V.T,V.T=null,m=X.p,X.p=2,S=He,He|=4;try{WE(r,a,s)}finally{He=S,X.p=m,V.T=c}}Zt=1,Hv(),Fv(),qv()}}function Hv(){if(Zt===1){Zt=0;var r=pi,a=to,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=V.T,V.T=null;var c=X.p;X.p=2;var m=He;He|=4;try{zv(a,r);var g=sh,S=jy(r.containerInfo),k=g.focusedElem,R=g.selectionRange;if(S!==k&&k&&k.ownerDocument&&Ay(k.ownerDocument.documentElement,k)){if(R!==null&&Of(k)){var H=R.start,K=R.end;if(K===void 0&&(K=H),"selectionStart"in k)k.selectionStart=H,k.selectionEnd=Math.min(K,k.value.length);else{var te=k.ownerDocument||document,F=te&&te.defaultView||window;if(F.getSelection){var q=F.getSelection(),fe=k.textContent.length,we=Math.min(R.start,fe),et=R.end===void 0?we:Math.min(R.end,fe);!q.extend&&we>et&&(S=et,et=we,we=S);var U=Cy(k,we),M=Cy(k,et);if(U&&M&&(q.rangeCount!==1||q.anchorNode!==U.node||q.anchorOffset!==U.offset||q.focusNode!==M.node||q.focusOffset!==M.offset)){var I=te.createRange();I.setStart(U.node,U.offset),q.removeAllRanges(),we>et?(q.addRange(I),q.extend(M.node,M.offset)):(I.setEnd(M.node,M.offset),q.addRange(I))}}}}for(te=[],q=k;q=q.parentNode;)q.nodeType===1&&te.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<te.length;k++){var ee=te[k];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}Hu=!!oh,sh=oh=null}finally{He=m,X.p=c,V.T=s}}r.current=a,Zt=2}}function Fv(){if(Zt===2){Zt=0;var r=pi,a=to,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=V.T,V.T=null;var c=X.p;X.p=2;var m=He;He|=4;try{vv(r,a.alternate,a)}finally{He=m,X.p=c,V.T=s}}Zt=3}}function qv(){if(Zt===4||Zt===3){Zt=0,Pt();var r=pi,a=to,s=Ir,c=Ov;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Zt=5:(Zt=0,to=pi=null,Gv(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(mi=null),hf(s),a=a.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(ln,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=V.T,m=X.p,X.p=2,V.T=null;try{for(var g=r.onRecoverableError,S=0;S<c.length;S++){var k=c[S];g(k.value,{componentStack:k.stack})}}finally{V.T=a,X.p=m}}(Ir&3)!==0&&Ou(),xr(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===Gd?Os++:(Os=0,Gd=r):Os=0,Rs(0)}}function Gv(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,hs(a)))}function Ou(){return Hv(),Fv(),qv(),Yv()}function Yv(){if(Zt!==5)return!1;var r=pi,a=Fd;Fd=0;var s=hf(Ir),c=V.T,m=X.p;try{X.p=32>s?32:s,V.T=null,s=qd,qd=null;var g=pi,S=Ir;if(Zt=0,to=pi=null,Ir=0,(He&6)!==0)throw Error(i(331));var k=He;if(He|=4,Av(g.current),Ev(g,g.current,S,s),He=k,Rs(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(ln,g)}catch{}return!0}finally{X.p=m,V.T=c,Gv(r,a)}}function Xv(r,a,s){a=Hn(s,a),a=_d(r.stateNode,a,2),r=li(r,a,2),r!==null&&(Wo(r,2),xr(r))}function Xe(r,a,s){if(r.tag===3)Xv(r,r,s);else for(;a!==null;){if(a.tag===3){Xv(a,r,s);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(mi===null||!mi.has(c))){r=Hn(s,r),s=Kx(2),c=li(a,s,2),c!==null&&(Jx(s,c,a,r),Wo(c,2),xr(c));break}}a=a.return}}function Kd(r,a,s){var c=r.pingCache;if(c===null){c=r.pingCache=new nT;var m=new Set;c.set(a,m)}else m=c.get(a),m===void 0&&(m=new Set,c.set(a,m));m.has(s)||(Bd=!0,m.add(s),r=sT.bind(null,r,a,s),a.then(r,r))}function sT(r,a,s){var c=r.pingCache;c!==null&&c.delete(a),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,it===r&&($e&s)===s&&(zt===4||zt===3&&($e&62914560)===$e&&300>ut()-Eu?(He&2)===0&&no(r,0):Id|=s,eo===$e&&(eo=0)),xr(r)}function Kv(r,a){a===0&&(a=Hg()),r=Yi(r,a),r!==null&&(Wo(r,a),xr(r))}function lT(r){var a=r.memoizedState,s=0;a!==null&&(s=a.retryLane),Kv(r,s)}function uT(r,a){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(i(314))}c!==null&&c.delete(a),Kv(r,s)}function cT(r,a){return Ht(r,a)}var Ru=null,io=null,Jd=!1,Mu=!1,Qd=!1,yi=0;function xr(r){r!==io&&r.next===null&&(io===null?Ru=io=r:io=io.next=r),Mu=!0,Jd||(Jd=!0,dT())}function Rs(r,a){if(!Qd&&Mu){Qd=!0;do for(var s=!1,c=Ru;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var g=0;else{var S=c.suspendedLanes,k=c.pingedLanes;g=(1<<31-rt(42|r)+1)-1,g&=m&~(S&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,eb(c,g))}else g=$e,g=Ul(c,c===it?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Qo(c,g)||(s=!0,eb(c,g));c=c.next}while(s);Qd=!1}}function fT(){Jv()}function Jv(){Mu=Jd=!1;var r=0;yi!==0&&kT()&&(r=yi);for(var a=ut(),s=null,c=Ru;c!==null;){var m=c.next,g=Qv(c,a);g===0?(c.next=null,s===null?Ru=m:s.next=m,m===null&&(io=s)):(s=c,(r!==0||(g&3)!==0)&&(Mu=!0)),c=m}Zt!==0&&Zt!==5||Rs(r),yi!==0&&(yi=0)}function Qv(r,a){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var S=31-rt(g),k=1<<S,R=m[S];R===-1?((k&s)===0||(k&c)!==0)&&(m[S]=U2(k,a)):R<=a&&(r.expiredLanes|=k),g&=~k}if(a=it,s=$e,s=Ul(r,r===a?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,s===0||r===a&&(Ye===2||Ye===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&Vn(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Qo(r,s)){if(a=s&-s,a===r.callbackPriority)return a;switch(c!==null&&Vn(c),hf(s)){case 2:case 8:s=le;break;case 32:s=ye;break;case 268435456:s=Pe;break;default:s=ye}return c=Wv.bind(null,r),s=Ht(s,c),r.callbackPriority=a,r.callbackNode=s,a}return c!==null&&c!==null&&Vn(c),r.callbackPriority=2,r.callbackNode=null,2}function Wv(r,a){if(Zt!==0&&Zt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Ou()&&r.callbackNode!==s)return null;var c=$e;return c=Ul(r,r===it?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(Mv(r,c,a),Qv(r,ut()),r.callbackNode!=null&&r.callbackNode===s?Wv.bind(null,r):null)}function eb(r,a){if(Ou())return null;Mv(r,a,!0)}function dT(){zT(function(){(He&6)!==0?Ht(Q,fT):Jv()})}function Wd(){if(yi===0){var r=Ia;r===0&&(r=Dl,Dl<<=1,(Dl&261888)===0&&(Dl=256)),yi=r}return yi}function tb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Bl(""+r)}function nb(r,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,r.id&&s.setAttribute("form",r.id),a.parentNode.insertBefore(s,a),r=new FormData(r),s.parentNode.removeChild(s),r}function hT(r,a,s,c,m){if(a==="submit"&&s&&s.stateNode===m){var g=tb((m[gn]||null).action),S=c.submitter;S&&(a=(a=S[gn]||null)?tb(a.formAction):S.getAttribute("formAction"),a!==null&&(g=a,S=null));var k=new ql("action","action",null,c,m);r.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(yi!==0){var R=S?nb(m,S):new FormData(m);vd(s,{pending:!0,data:R,method:m.method,action:g},null,R)}}else typeof g=="function"&&(k.preventDefault(),R=S?nb(m,S):new FormData(m),vd(s,{pending:!0,data:R,method:m.method,action:g},g,R))},currentTarget:m}]})}}for(var eh=0;eh<$f.length;eh++){var th=$f[eh],mT=th.toLowerCase(),pT=th[0].toUpperCase()+th.slice(1);sr(mT,"on"+pT)}sr(Ry,"onAnimationEnd"),sr(My,"onAnimationIteration"),sr(Dy,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(NE,"onTransitionRun"),sr(OE,"onTransitionStart"),sr(RE,"onTransitionCancel"),sr($y,"onTransitionEnd"),Aa("onMouseEnter",["mouseout","mouseover"]),Aa("onMouseLeave",["mouseout","mouseover"]),Aa("onPointerEnter",["pointerout","pointerover"]),Aa("onPointerLeave",["pointerout","pointerover"]),Hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ms="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(" "),gT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ms));function rb(r,a){a=(a&4)!==0;for(var s=0;s<r.length;s++){var c=r[s],m=c.event;c=c.listeners;e:{var g=void 0;if(a)for(var S=c.length-1;0<=S;S--){var k=c[S],R=k.instance,H=k.currentTarget;if(k=k.listener,R!==g&&m.isPropagationStopped())break e;g=k,m.currentTarget=H;try{g(m)}catch(K){Xl(K)}m.currentTarget=null,g=R}else for(S=0;S<c.length;S++){if(k=c[S],R=k.instance,H=k.currentTarget,k=k.listener,R!==g&&m.isPropagationStopped())break e;g=k,m.currentTarget=H;try{g(m)}catch(K){Xl(K)}m.currentTarget=null,g=R}}}}function Me(r,a){var s=a[mf];s===void 0&&(s=a[mf]=new Set);var c=r+"__bubble";s.has(c)||(ib(a,r,2,!1),s.add(c))}function nh(r,a,s){var c=0;a&&(c|=4),ib(s,r,c,a)}var Du="_reactListening"+Math.random().toString(36).slice(2);function rh(r){if(!r[Du]){r[Du]=!0,Jg.forEach(function(s){s!=="selectionchange"&&(gT.has(s)||nh(s,!1,r),nh(s,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Du]||(a[Du]=!0,nh("selectionchange",!1,a))}}function ib(r,a,s,c){switch(Rb(a)){case 2:var m=HT;break;case 8:m=FT;break;default:m=xh}s=m.bind(null,a,s,r),m=void 0,!wf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(a,s,{capture:!0,passive:m}):r.addEventListener(a,s,!0):m!==void 0?r.addEventListener(a,s,{passive:m}):r.addEventListener(a,s,!1)}function ih(r,a,s,c,m){var g=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var k=c.stateNode.containerInfo;if(k===m)break;if(S===4)for(S=c.return;S!==null;){var R=S.tag;if((R===3||R===4)&&S.stateNode.containerInfo===m)return;S=S.return}for(;k!==null;){if(S=Ea(k),S===null)return;if(R=S.tag,R===5||R===6||R===26||R===27){c=g=S;continue e}k=k.parentNode}}c=c.return}uy(function(){var H=g,K=Sf(s),te=[];e:{var F=Ly.get(r);if(F!==void 0){var q=ql,fe=r;switch(r){case"keypress":if(Hl(s)===0)break e;case"keydown":case"keyup":q=uE;break;case"focusin":fe="focus",q=Tf;break;case"focusout":fe="blur",q=Tf;break;case"beforeblur":case"afterblur":q=Tf;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=dy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=J2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=dE;break;case Ry:case My:case Dy:q=eE;break;case $y:q=mE;break;case"scroll":case"scrollend":q=X2;break;case"wheel":q=gE;break;case"copy":case"cut":case"paste":q=nE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=my;break;case"toggle":case"beforetoggle":q=xE}var we=(a&4)!==0,et=!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=ns(M,U),ee!=null&&we.push(Ds(M,ee,I))),et)break;M=M.return}0<we.length&&(F=new q(F,fe,null,s,K),te.push({event:F,listeners:we}))}}if((a&7)===0){e:{if(F=r==="mouseover"||r==="pointerover",q=r==="mouseout"||r==="pointerout",F&&s!==bf&&(fe=s.relatedTarget||s.fromElement)&&(Ea(fe)||fe[_a]))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?Ea(fe):null,fe!==null&&(et=u(fe),we=fe.tag,fe!==et||we!==5&&we!==27&&we!==6)&&(fe=null)):(q=null,fe=H),q!==fe)){if(we=dy,ee="onMouseLeave",U="onMouseEnter",M="mouse",(r==="pointerout"||r==="pointerover")&&(we=my,ee="onPointerLeave",U="onPointerEnter",M="pointer"),et=q==null?F:ts(q),I=fe==null?F:ts(fe),F=new we(ee,M+"leave",q,s,K),F.target=et,F.relatedTarget=I,ee=null,Ea(K)===H&&(we=new we(U,M+"enter",fe,s,K),we.target=I,we.relatedTarget=et,ee=we),et=ee,q&&fe)t:{for(we=yT,U=q,M=fe,I=0,ee=U;ee;ee=we(ee))I++;ee=0;for(var ke=M;ke;ke=we(ke))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&&ab(te,F,q,we,!1),fe!==null&&et!==null&&ab(te,et,fe,we,!0)}}e:{if(F=H?ts(H):window,q=F.nodeName&&F.nodeName.toLowerCase(),q==="select"||q==="input"&&F.type==="file")var Be=ky;else if(by(F))if(wy)Be=CE;else{Be=EE;var xe=_E}else q=F.nodeName,!q||q.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?H&&vf(H.elementType)&&(Be=ky):Be=TE;if(Be&&(Be=Be(r,H))){Sy(te,Be,s,K);break e}xe&&xe(r,F,H),r==="focusout"&&H&&F.type==="number"&&H.memoizedProps.value!=null&&xf(F,"number",F.value)}switch(xe=H?ts(H):window,r){case"focusin":(by(xe)||xe.contentEditable==="true")&&(Da=xe,Rf=H,cs=null);break;case"focusout":cs=Rf=Da=null;break;case"mousedown":Mf=!0;break;case"contextmenu":case"mouseup":case"dragend":Mf=!1,Ny(te,s,K);break;case"selectionchange":if(jE)break;case"keydown":case"keyup":Ny(te,s,K)}var Ae;if(Af)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 Ma?xy(r,s)&&(Le="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(py&&s.locale!=="ko"&&(Ma||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Ma&&(Ae=cy()):(ti=K,zf="value"in ti?ti.value:ti.textContent,Ma=!0)),xe=$u(H,Le),0<xe.length&&(Le=new hy(Le,r,null,s,K),te.push({event:Le,listeners:xe}),Ae?Le.data=Ae:(Ae=vy(s),Ae!==null&&(Le.data=Ae)))),(Ae=bE?SE(r,s):kE(r,s))&&(Le=$u(H,"onBeforeInput"),0<Le.length&&(xe=new hy("onBeforeInput","beforeinput",null,s,K),te.push({event:xe,listeners:Le}),xe.data=Ae)),hT(te,r,H,s,K)}rb(te,a)})}function Ds(r,a,s){return{instance:r,listener:a,currentTarget:s}}function $u(r,a){for(var s=a+"Capture",c=[];r!==null;){var m=r,g=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||g===null||(m=ns(r,s),m!=null&&c.unshift(Ds(r,m,g)),m=ns(r,a),m!=null&&c.push(Ds(r,m,g))),r.tag===3)return c;r=r.return}return[]}function yT(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function ab(r,a,s,c,m){for(var g=a._reactName,S=[];s!==null&&s!==c;){var k=s,R=k.alternate,H=k.stateNode;if(k=k.tag,R!==null&&R===c)break;k!==5&&k!==26&&k!==27||H===null||(R=H,m?(H=ns(s,g),H!=null&&S.unshift(Ds(s,H,R))):m||(H=ns(s,g),H!=null&&S.push(Ds(s,H,R)))),s=s.return}S.length!==0&&r.push({event:a,listeners:S})}var xT=/\r\n?/g,vT=/\u0000|\uFFFD/g;function ob(r){return(typeof r=="string"?r:""+r).replace(xT,`
|
|
9
|
+
`).replace(vT,"")}function sb(r,a){return a=ob(a),ob(r)===a}function We(r,a,s,c,m,g){switch(s){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Na(r,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Na(r,""+c);break;case"className":Vl(r,"class",c);break;case"tabIndex":Vl(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Vl(r,s,c);break;case"style":sy(r,c,g);break;case"data":if(a!=="object"){Vl(r,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Bl(""+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 g=="function"&&(s==="formAction"?(a!=="input"&&We(r,a,"name",m.name,m,null),We(r,a,"formEncType",m.formEncType,m,null),We(r,a,"formMethod",m.formMethod,m,null),We(r,a,"formTarget",m.formTarget,m,null)):(We(r,a,"encType",m.encType,m,null),We(r,a,"method",m.method,m,null),We(r,a,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=Bl(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=Cr);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(i(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(i(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=Bl(""+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),Pl(r,"popover",c);break;case"xlinkActuate":Tr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Tr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Tr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Tr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Tr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Tr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Pl(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=G2.get(s)||s,Pl(r,s,c))}}function ah(r,a,s,c,m,g){switch(s){case"style":sy(r,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(i(60));r.innerHTML=s}}break;case"children":typeof c=="string"?Na(r,c):(typeof c=="number"||typeof c=="bigint")&&Na(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=Cr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qg.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),a=s.slice(2,m?s.length-7:void 0),g=r[gn]||null,g=g!=null?g[s]:null,typeof g=="function"&&r.removeEventListener(a,g,m),typeof c=="function")){typeof g!="function"&&g!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(a,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):Pl(r,s,c)}}}function Qt(r,a,s){switch(a){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,g;for(g in s)if(s.hasOwnProperty(g)){var S=s[g];if(S!=null)switch(g){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:We(r,a,g,S,s,null)}}m&&We(r,a,"srcSet",s.srcSet,s,null),c&&We(r,a,"src",s.src,s,null);return;case"input":Me("invalid",r);var k=g=S=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":S=K;break;case"checked":R=K;break;case"defaultChecked":H=K;break;case"value":g=K;break;case"defaultValue":k=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(137,a));break;default:We(r,a,c,K,s,null)}}ry(r,g,k,R,H,S,m,!1);return;case"select":Me("invalid",r),c=S=g=null;for(m in s)if(s.hasOwnProperty(m)&&(k=s[m],k!=null))switch(m){case"value":g=k;break;case"defaultValue":S=k;break;case"multiple":c=k;default:We(r,a,m,k,s,null)}a=g,s=S,r.multiple=!!c,a!=null?ja(r,!!c,a,!1):s!=null&&ja(r,!!c,s,!0);return;case"textarea":Me("invalid",r),g=m=c=null;for(S in s)if(s.hasOwnProperty(S)&&(k=s[S],k!=null))switch(S){case"value":c=k;break;case"defaultValue":m=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(i(91));break;default:We(r,a,S,k,s,null)}ay(r,c,m,g);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":We(r,a,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<Ms.length;c++)Me(Ms[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(i(137,a));default:We(r,a,H,c,s,null)}return;default:if(vf(a)){for(K in s)s.hasOwnProperty(K)&&(c=s[K],c!==void 0&&ah(r,a,K,c,s,void 0));return}}for(k in s)s.hasOwnProperty(k)&&(c=s[k],c!=null&&We(r,a,k,c,s,null))}function bT(r,a,s,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,g=null,S=null,k=null,R=null,H=null,K=null;for(q in s){var te=s[q];if(s.hasOwnProperty(q)&&te!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":R=te;default:c.hasOwnProperty(q)||We(r,a,q,null,c,te)}}for(var F in c){var q=c[F];if(te=s[F],c.hasOwnProperty(F)&&(q!=null||te!=null))switch(F){case"type":g=q;break;case"name":m=q;break;case"checked":H=q;break;case"defaultChecked":K=q;break;case"value":S=q;break;case"defaultValue":k=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(i(137,a));break;default:q!==te&&We(r,a,F,q,c,te)}}yf(r,S,k,R,H,K,g,m);return;case"select":q=S=k=F=null;for(g in s)if(R=s[g],s.hasOwnProperty(g)&&R!=null)switch(g){case"value":break;case"multiple":q=R;default:c.hasOwnProperty(g)||We(r,a,g,null,c,R)}for(m in c)if(g=c[m],R=s[m],c.hasOwnProperty(m)&&(g!=null||R!=null))switch(m){case"value":F=g;break;case"defaultValue":k=g;break;case"multiple":S=g;default:g!==R&&We(r,a,m,g,c,R)}a=k,s=S,c=q,F!=null?ja(r,!!s,F,!1):!!c!=!!s&&(a!=null?ja(r,!!s,a,!0):ja(r,!!s,s?[]:"",!1));return;case"textarea":q=F=null;for(k in s)if(m=s[k],s.hasOwnProperty(k)&&m!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:We(r,a,k,null,c,m)}for(S in c)if(m=c[S],g=s[S],c.hasOwnProperty(S)&&(m!=null||g!=null))switch(S){case"value":F=m;break;case"defaultValue":q=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(i(91));break;default:m!==g&&We(r,a,S,m,c,g)}iy(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:We(r,a,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":We(r,a,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)&&We(r,a,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(i(137,a));break;default:We(r,a,H,F,c,q)}return;default:if(vf(a)){for(var et in s)F=s[et],s.hasOwnProperty(et)&&F!==void 0&&!c.hasOwnProperty(et)&&ah(r,a,et,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||ah(r,a,K,F,c,q);return}}for(var U in s)F=s[U],s.hasOwnProperty(U)&&F!=null&&!c.hasOwnProperty(U)&&We(r,a,U,null,c,F);for(te in c)F=c[te],q=s[te],!c.hasOwnProperty(te)||F===q||F==null&&q==null||We(r,a,te,F,c,q)}function lb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ST(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],g=m.transferSize,S=m.initiatorType,k=m.duration;if(g&&k&&lb(S)){for(S=0,k=m.responseEnd,c+=1;c<s.length;c++){var R=s[c],H=R.startTime;if(H>k)break;var K=R.transferSize,te=R.initiatorType;K&&lb(te)&&(R=R.responseEnd,S+=K*(R<k?1:(k-H)/(R-H)))}if(--c,a+=8*(g+S)/(m.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var oh=null,sh=null;function Lu(r){return r.nodeType===9?r:r.ownerDocument}function ub(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 cb(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function lh(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var uh=null;function kT(){var r=window.event;return r&&r.type==="popstate"?r===uh?!1:(uh=r,!0):(uh=null,!1)}var fb=typeof setTimeout=="function"?setTimeout:void 0,wT=typeof clearTimeout=="function"?clearTimeout:void 0,db=typeof Promise=="function"?Promise:void 0,zT=typeof queueMicrotask=="function"?queueMicrotask:typeof db<"u"?function(r){return db.resolve(null).then(r).catch(_T)}:fb;function _T(r){setTimeout(function(){throw r})}function xi(r){return r==="head"}function hb(r,a){var s=a,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),lo(a);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")$s(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,$s(s);for(var g=s.firstChild;g;){var S=g.nextSibling,k=g.nodeName;g[es]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=S}}else s==="body"&&$s(r.ownerDocument.body);s=m}while(s);lo(a)}function mb(r,a){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(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 ch(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ch(s),pf(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function ET(r,a,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[es])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==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(g=r.getAttribute("src"),(g!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var g=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=Xn(r.nextSibling),r===null)break}return null}function TT(r,a,s){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Xn(r.nextSibling),r===null))return null;return r}function pb(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Xn(r.nextSibling),r===null))return null;return r}function fh(r){return r.data==="$?"||r.data==="$~"}function dh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function CT(r,a){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||s.readyState!=="loading")a();else{var c=function(){a(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Xn(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var hh=null;function gb(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(a===0)return Xn(r.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}r=r.nextSibling}return null}function yb(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return r;a--}else s!=="/$"&&s!=="/&"||a++}r=r.previousSibling}return null}function xb(r,a,s){switch(a=Lu(s),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function $s(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);pf(r)}var Kn=new Map,vb=new Set;function Uu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Hr=X.d;X.d={f:AT,r:jT,D:NT,C:OT,L:RT,m:MT,X:$T,S:DT,M:LT};function AT(){var r=Hr.f(),a=Au();return r||a}function jT(r){var a=Ta(r);a!==null&&a.tag===5&&a.type==="form"?$x(a):Hr.r(r)}var ao=typeof document>"u"?null:document;function bb(r,a,s){var c=ao;if(c&&typeof a=="string"&&a){var m=Bn(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),vb.has(m)||(vb.add(m),r={rel:r,crossOrigin:s,href:a},c.querySelector(m)===null&&(a=c.createElement("link"),Qt(a,"link",r),Ft(a),c.head.appendChild(a)))}}function NT(r){Hr.D(r),bb("dns-prefetch",r,null)}function OT(r,a){Hr.C(r,a),bb("preconnect",r,a)}function RT(r,a,s){Hr.L(r,a,s);var c=ao;if(c&&r&&a){var m='link[rel="preload"][as="'+Bn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Bn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Bn(s.imageSizes)+'"]')):m+='[href="'+Bn(r)+'"]';var g=m;switch(a){case"style":g=oo(r);break;case"script":g=so(r)}Kn.has(g)||(r=y({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:r,as:a},s),Kn.set(g,r),c.querySelector(m)!==null||a==="style"&&c.querySelector(Ls(g))||a==="script"&&c.querySelector(Us(g))||(a=c.createElement("link"),Qt(a,"link",r),Ft(a),c.head.appendChild(a)))}}function MT(r,a){Hr.m(r,a);var s=ao;if(s&&r){var c=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Bn(c)+'"][href="'+Bn(r)+'"]',g=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=so(r)}if(!Kn.has(g)&&(r=y({rel:"modulepreload",href:r},a),Kn.set(g,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Us(g)))return}c=s.createElement("link"),Qt(c,"link",r),Ft(c),s.head.appendChild(c)}}}function DT(r,a,s){Hr.S(r,a,s);var c=ao;if(c&&r){var m=Ca(c).hoistableStyles,g=oo(r);a=a||"default";var S=m.get(g);if(!S){var k={loading:0,preload:null};if(S=c.querySelector(Ls(g)))k.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":a},s),(s=Kn.get(g))&&mh(r,s);var R=S=c.createElement("link");Ft(R),Qt(R,"link",r),R._p=new Promise(function(H,K){R.onload=H,R.onerror=K}),R.addEventListener("load",function(){k.loading|=1}),R.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Pu(S,a,c)}S={type:"stylesheet",instance:S,count:1,state:k},m.set(g,S)}}}function $T(r,a){Hr.X(r,a);var s=ao;if(s&&r){var c=Ca(s).hoistableScripts,m=so(r),g=c.get(m);g||(g=s.querySelector(Us(m)),g||(r=y({src:r,async:!0},a),(a=Kn.get(m))&&ph(r,a),g=s.createElement("script"),Ft(g),Qt(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function LT(r,a){Hr.M(r,a);var s=ao;if(s&&r){var c=Ca(s).hoistableScripts,m=so(r),g=c.get(m);g||(g=s.querySelector(Us(m)),g||(r=y({src:r,async:!0,type:"module"},a),(a=Kn.get(m))&&ph(r,a),g=s.createElement("script"),Ft(g),Qt(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function Sb(r,a,s,c){var m=(m=pe.current)?Uu(m):null;if(!m)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=oo(s.href),s=Ca(m).hoistableStyles,c=s.get(a),c||(c={type:"style",instance:null,count:0,state:null},s.set(a,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=oo(s.href);var g=Ca(m).hoistableStyles,S=g.get(r);if(S||(m=m.ownerDocument||m,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,S),(g=m.querySelector(Ls(r)))&&!g._p&&(S.instance=g,S.state.loading=5),Kn.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},Kn.set(r,s),g||UT(m,r,s,S.state))),a&&c===null)throw Error(i(528,""));return S}if(a&&c!==null)throw Error(i(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=so(s),s=Ca(m).hoistableScripts,c=s.get(a),c||(c={type:"script",instance:null,count:0,state:null},s.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function oo(r){return'href="'+Bn(r)+'"'}function Ls(r){return'link[rel="stylesheet"]['+r+"]"}function kb(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function UT(r,a,s,c){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=r.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Qt(a,"link",s),Ft(a),r.head.appendChild(a))}function so(r){return'[src="'+Bn(r)+'"]'}function Us(r){return"script[async]"+r}function wb(r,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var c=r.querySelector('style[data-href~="'+Bn(s.href)+'"]');if(c)return a.instance=c,Ft(c),c;var m=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Ft(c),Qt(c,"style",m),Pu(c,s.precedence,r),a.instance=c;case"stylesheet":m=oo(s.href);var g=r.querySelector(Ls(m));if(g)return a.state.loading|=4,a.instance=g,Ft(g),g;c=kb(s),(m=Kn.get(m))&&mh(c,m),g=(r.ownerDocument||r).createElement("link"),Ft(g);var S=g;return S._p=new Promise(function(k,R){S.onload=k,S.onerror=R}),Qt(g,"link",c),a.state.loading|=4,Pu(g,s.precedence,r),a.instance=g;case"script":return g=so(s.src),(m=r.querySelector(Us(g)))?(a.instance=m,Ft(m),m):(c=s,(m=Kn.get(g))&&(c=y({},s),ph(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),Ft(m),Qt(m,"link",c),r.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,Pu(c,s.precedence,r));return a.instance}function Pu(r,a,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,g=m,S=0;S<c.length;S++){var k=c[S];if(k.dataset.precedence===a)g=k;else if(g!==m)break}g?g.parentNode.insertBefore(r,g.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(r,a.firstChild))}function mh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function ph(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Vu=null;function zb(r,a,s){if(Vu===null){var c=new Map,m=Vu=new Map;m.set(s,c)}else m=Vu,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 g=s[m];if(!(g[es]||g[Yt]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(a)||"";S=r+S;var k=c.get(S);k?k.push(g):c.set(S,[g])}}return c}function _b(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function PT(r,a,s){if(s===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Eb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function VT(r,a,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=oo(c.href),g=a.querySelector(Ls(m));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Zu.bind(r),a.then(r,r)),s.state.loading|=4,s.instance=g,Ft(g);return}g=a.ownerDocument||a,c=kb(c),(m=Kn.get(m))&&mh(c,m),g=g.createElement("link"),Ft(g);var S=g;S._p=new Promise(function(k,R){S.onload=k,S.onerror=R}),Qt(g,"link",c),s.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Zu.bind(r),a.addEventListener("load",s),a.addEventListener("error",s))}}var gh=0;function ZT(r,a){return r.stylesheets&&r.count===0&&Iu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&Iu(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&gh===0&&(gh=62500*ST());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Iu(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>gh?50:800)+a);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Zu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Iu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Bu=null;function Iu(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Bu=new Map,a.forEach(BT,r),Bu=null,Zu.call(r))}function BT(r,a){if(!(a.state.loading&4)){var s=Bu.get(r);if(s)var c=s.get(null);else{s=new Map,Bu.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<m.length;g++){var S=m[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(s.set(S.dataset.precedence,S),c=S)}c&&s.set(null,c)}m=a.instance,S=m.getAttribute("data-precedence"),g=s.get(S)||c,g===c&&s.set(null,m),s.set(S,m),this.count++,c=Zu.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),g?g.parentNode.insertBefore(m,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),a.state.loading|=4}}var Ps={$$typeof:w,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function IT(r,a,s,c,m,g,S,k,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=ff(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ff(0),this.hiddenUpdates=ff(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Tb(r,a,s,c,m,g,S,k,R,H,K,te){return r=new IT(r,a,s,S,R,H,K,te,k),a=1,g===!0&&(a|=24),g=An(3,null,null,a),r.current=g,g.stateNode=r,a=Xf(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:a},Wf(g),r}function Cb(r){return r?(r=Ua,r):Ua}function Ab(r,a,s,c,m,g){m=Cb(m),c.context===null?c.context=m:c.pendingContext=m,c=si(a),c.payload={element:s},g=g===void 0?null:g,g!==null&&(c.callback=g),s=li(r,c,a),s!==null&&(kn(s,r,a),ys(s,r,a))}function jb(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<a?s:a}}function yh(r,a){jb(r,a),(r=r.alternate)&&jb(r,a)}function Nb(r){if(r.tag===13||r.tag===31){var a=Yi(r,67108864);a!==null&&kn(a,r,67108864),yh(r,67108864)}}function Ob(r){if(r.tag===13||r.tag===31){var a=Mn();a=df(a);var s=Yi(r,a);s!==null&&kn(s,r,a),yh(r,a)}}var Hu=!0;function HT(r,a,s,c){var m=V.T;V.T=null;var g=X.p;try{X.p=2,xh(r,a,s,c)}finally{X.p=g,V.T=m}}function FT(r,a,s,c){var m=V.T;V.T=null;var g=X.p;try{X.p=8,xh(r,a,s,c)}finally{X.p=g,V.T=m}}function xh(r,a,s,c){if(Hu){var m=vh(c);if(m===null)ih(r,a,c,Fu,s),Mb(r,c);else if(GT(m,r,a,s,c))c.stopPropagation();else if(Mb(r,c),a&4&&-1<qT.indexOf(r)){for(;m!==null;){var g=Ta(m);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=Ii(g.pendingLanes);if(S!==0){var k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;S;){var R=1<<31-rt(S);k.entanglements[1]|=R,S&=~R}xr(g),(He&6)===0&&(Tu=ut()+500,Rs(0))}}break;case 31:case 13:k=Yi(g,2),k!==null&&kn(k,g,2),Au(),yh(g,2)}if(g=vh(c),g===null&&ih(r,a,c,Fu,s),g===m)break;m=g}m!==null&&c.stopPropagation()}else ih(r,a,c,null,s)}}function vh(r){return r=Sf(r),bh(r)}var Fu=null;function bh(r){if(Fu=null,r=Ea(r),r!==null){var a=u(r);if(a===null)r=null;else{var s=a.tag;if(s===13){if(r=l(a),r!==null)return r;r=null}else if(s===31){if(r=f(a),r!==null)return r;r=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Fu=r,null}function Rb(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(za()){case Q:return 2;case le:return 8;case ye:case ze:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var Sh=!1,vi=null,bi=null,Si=null,Vs=new Map,Zs=new Map,ki=[],qT="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 Mb(r,a){switch(r){case"focusin":case"focusout":vi=null;break;case"dragenter":case"dragleave":bi=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":Vs.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zs.delete(a.pointerId)}}function Bs(r,a,s,c,m,g){return r===null||r.nativeEvent!==g?(r={blockedOn:a,domEventName:s,eventSystemFlags:c,nativeEvent:g,targetContainers:[m]},a!==null&&(a=Ta(a),a!==null&&Nb(a)),r):(r.eventSystemFlags|=c,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function GT(r,a,s,c,m){switch(a){case"focusin":return vi=Bs(vi,r,a,s,c,m),!0;case"dragenter":return bi=Bs(bi,r,a,s,c,m),!0;case"mouseover":return Si=Bs(Si,r,a,s,c,m),!0;case"pointerover":var g=m.pointerId;return Vs.set(g,Bs(Vs.get(g)||null,r,a,s,c,m)),!0;case"gotpointercapture":return g=m.pointerId,Zs.set(g,Bs(Zs.get(g)||null,r,a,s,c,m)),!0}return!1}function Db(r){var a=Ea(r.target);if(a!==null){var s=u(a);if(s!==null){if(a=s.tag,a===13){if(a=l(s),a!==null){r.blockedOn=a,Xg(r.priority,function(){Ob(s)});return}}else if(a===31){if(a=f(s),a!==null){r.blockedOn=a,Xg(r.priority,function(){Ob(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function qu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var s=vh(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);bf=c,s.target.dispatchEvent(c),bf=null}else return a=Ta(s),a!==null&&Nb(a),r.blockedOn=s,!1;a.shift()}return!0}function $b(r,a,s){qu(r)&&s.delete(a)}function YT(){Sh=!1,vi!==null&&qu(vi)&&(vi=null),bi!==null&&qu(bi)&&(bi=null),Si!==null&&qu(Si)&&(Si=null),Vs.forEach($b),Zs.forEach($b)}function Gu(r,a){r.blockedOn===a&&(r.blockedOn=null,Sh||(Sh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,YT)))}var Yu=null;function Lb(r){Yu!==r&&(Yu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Yu===r&&(Yu=null);for(var a=0;a<r.length;a+=3){var s=r[a],c=r[a+1],m=r[a+2];if(typeof c!="function"){if(bh(c||s)===null)continue;break}var g=Ta(s);g!==null&&(r.splice(a,3),a-=3,vd(g,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function lo(r){function a(R){return Gu(R,r)}vi!==null&&Gu(vi,r),bi!==null&&Gu(bi,r),Si!==null&&Gu(Si,r),Vs.forEach(a),Zs.forEach(a);for(var s=0;s<ki.length;s++){var c=ki[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<ki.length&&(s=ki[0],s.blockedOn===null);)Db(s),s.blockedOn===null&&ki.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],g=s[c+1],S=m[gn]||null;if(typeof g=="function")S||Lb(s);else if(S){var k=null;if(g&&g.hasAttribute("formAction")){if(m=g,S=g[gn]||null)k=S.formAction;else if(bh(m)!==null)continue}else k=S.action;typeof k=="function"?s[c+1]=k:(s.splice(c,3),c-=3),Lb(s)}}}function Ub(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(S){return m=S})},focusReset:"manual",scroll:"manual"})}function a(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),m!==null&&(m(),m=null)}}}function kh(r){this._internalRoot=r}Xu.prototype.render=kh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var s=a.current,c=Mn();Ab(s,c,r,a,null,null)},Xu.prototype.unmount=kh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;Ab(r.current,2,null,r,null,null),Au(),a[_a]=null}};function Xu(r){this._internalRoot=r}Xu.prototype.unstable_scheduleHydration=function(r){if(r){var a=Yg();r={blockedOn:null,target:r,priority:a};for(var s=0;s<ki.length&&a!==0&&a<ki[s].priority;s++);ki.splice(s,0,r),s===0&&Db(r)}};var Pb=t.version;if(Pb!=="19.2.4")throw Error(i(527,Pb,"19.2.4"));X.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var XT={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{ln=Ku.inject(XT),Vt=Ku}catch{}}return Hs.createRoot=function(r,a){if(!o(r))throw Error(i(299));var s=!1,c="",m=qx,g=Gx,S=Yx;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),a=Tb(r,1,!1,null,null,s,c,null,m,g,S,Ub),r[_a]=a.current,rh(r),new kh(a)},Hs.hydrateRoot=function(r,a,s){if(!o(r))throw Error(i(299));var c=!1,m="",g=qx,S=Gx,k=Yx,R=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(S=s.onCaughtError),s.onRecoverableError!==void 0&&(k=s.onRecoverableError),s.formState!==void 0&&(R=s.formState)),a=Tb(r,1,!0,a,s??null,c,m,R,g,S,k,Ub),a.context=Cb(null),s=a.current,c=Mn(),c=df(c),m=si(c),m.callback=null,li(s,m,c),s=c,a.current.lanes=s,Wo(a,s),xr(a),r[_a]=a.current,rh(r),new Xu(a)},Hs.version="19.2.4",Hs}var Xb;function aC(){if(Xb)return _h.exports;Xb=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(),_h.exports=iC(),_h.exports}var oC=aC();var Kb="popstate";function sC(e={}){function t(i,o){let{pathname:u,search:l,hash:f}=i.location;return Em("",{pathname:u,search:l,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){return typeof o=="string"?o:dl(o)}return uC(t,n,null,e)}function pt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lC(){return Math.random().toString(36).substring(2,10)}function Jb(e,t){return{usr:e.state,key:e.key,idx:t}}function Em(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Vo(t):t,state:n,key:t&&t.key||i||lC()}}function dl({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 Vo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function uC(e,t,n,i={}){let{window:o=document.defaultView,v5Compat:u=!1}=i,l=o.history,f="POP",d=null,h=p();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function p(){return(l.state||{idx:null}).idx}function y(){f="POP";let A=p(),j=A==null?null:A-h;h=A,d&&d({action:f,location:T.location,delta:j})}function v(A,j){f="PUSH";let O=Em(T.location,A,j);h=p()+1;let w=Jb(O,h),P=T.createHref(O);try{l.pushState(w,"",P)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;o.location.assign(P)}u&&d&&d({action:f,location:T.location,delta:1})}function b(A,j){f="REPLACE";let O=Em(T.location,A,j);h=p();let w=Jb(O,h),P=T.createHref(O);l.replaceState(w,"",P),u&&d&&d({action:f,location:T.location,delta:0})}function E(A){return cC(A)}let T={get action(){return f},get location(){return e(o,l)},listen(A){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(Kb,y),d=A,()=>{o.removeEventListener(Kb,y),d=null}},createHref(A){return t(o,A)},createURL:E,encodeLocation(A){let j=E(A);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:v,replace:b,go(A){return l.go(A)}};return T}function cC(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 i=typeof e=="string"?e:dl(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function xk(e,t,n="/"){return fC(e,t,n,!1)}function fC(e,t,n,i){let o=typeof t=="string"?Vo(t):t,u=Jr(o.pathname||"/",n);if(u==null)return null;let l=vk(e);dC(l);let f=null;for(let d=0;f==null&&d<l.length;++d){let h=wC(u);f=SC(l[d],h,i)}return f}function vk(e,t=[],n=[],i="",o=!1){let u=(l,f,d=o,h)=>{let p={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:f,route:l};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(i)&&d)return;pt(p.relativePath.startsWith(i),`Absolute route path "${p.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(i.length)}let y=Yr([i,p.relativePath]),v=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 "${y}".`),vk(l.children,t,v,y,d)),!(l.path==null&&!l.index)&&t.push({path:y,score:vC(y,l.index),routesMeta:v})};return e.forEach((l,f)=>{if(l.path===""||!l.path?.includes("?"))u(l,f);else for(let d of bk(l.path))u(l,f,!0,d)}),t}function bk(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,o=n.endsWith("?"),u=n.replace(/\?$/,"");if(i.length===0)return o?[u,""]:[u];let l=bk(i.join("/")),f=[];return f.push(...l.map(d=>d===""?u:[u,d].join("/"))),o&&f.push(...l),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function dC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:bC(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var hC=/^:[\w-]+$/,mC=3,pC=2,gC=1,yC=10,xC=-2,Qb=e=>e==="*";function vC(e,t){let n=e.split("/"),i=n.length;return n.some(Qb)&&(i+=xC),t&&(i+=pC),n.filter(o=>!Qb(o)).reduce((o,u)=>o+(hC.test(u)?mC:u===""?gC:yC),i)}function bC(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function SC(e,t,n=!1){let{routesMeta:i}=e,o={},u="/",l=[];for(let f=0;f<i.length;++f){let d=i[f],h=f===i.length-1,p=u==="/"?t:t.slice(u.length)||"/",y=_c({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},p),v=d.route;if(!y&&h&&n&&!i[i.length-1].route.index&&(y=_c({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},p)),!y)return null;Object.assign(o,y.params),l.push({params:o,pathname:Yr([u,y.pathname]),pathnameBase:TC(Yr([u,y.pathnameBase])),route:v}),y.pathnameBase!=="/"&&(u=Yr([u,y.pathnameBase]))}return l}function _c(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=kC(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let u=o[0],l=u.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:i.reduce((h,{paramName:p,isOptional:y},v)=>{if(p==="*"){let E=f[v]||"";l=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const b=f[v];return y&&!b?h[p]=void 0:h[p]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:l,pattern:e}}function kC(e,t=!1,n=!0){dr(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 i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,f,d)=>(i.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function wC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dr(!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 Jr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}var zC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function _C(e,t="/"){let{pathname:n,search:i="",hash:o=""}=typeof e=="string"?Vo(e):e,u;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?u=Wb(n.substring(1),"/"):u=Wb(n,t)):u=t,{pathname:u,search:CC(i),hash:AC(o)}}function Wb(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 Ah(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. 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 EC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ep(e){let t=EC(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Tp(e,t,n,i=!1){let o;typeof e=="string"?o=Vo(e):(o={...e},pt(!o.pathname||!o.pathname.includes("?"),Ah("?","pathname","search",o)),pt(!o.pathname||!o.pathname.includes("#"),Ah("#","pathname","hash",o)),pt(!o.search||!o.search.includes("#"),Ah("#","search","hash",o)));let u=e===""||o.pathname==="",l=u?"/":o.pathname,f;if(l==null)f=n;else{let y=t.length-1;if(!i&&l.startsWith("..")){let v=l.split("/");for(;v[0]==="..";)v.shift(),y-=1;o.pathname=v.join("/")}f=y>=0?t[y]:"/"}let d=_C(o,f),h=l&&l!=="/"&&l.endsWith("/"),p=(u||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||p)&&(d.pathname+="/"),d}var Yr=e=>e.join("/").replace(/\/\/+/g,"/"),TC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),CC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,AC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,jC=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function NC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function OC(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Sk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function kk(e,t){let n=e;if(typeof n!="string"||!zC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,o=!1;if(Sk)try{let u=new URL(window.location.href),l=n.startsWith("//")?new URL(u.protocol+n):new URL(n),f=Jr(l.pathname,t);l.origin===u.origin&&f!=null?n=f+l.search+l.hash:o=!0}catch{dr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var wk=["POST","PUT","PATCH","DELETE"];new Set(wk);var RC=["GET",...wk];new Set(RC);var Zo=_.createContext(null);Zo.displayName="DataRouter";var Gc=_.createContext(null);Gc.displayName="DataRouterState";var MC=_.createContext(!1),zk=_.createContext({isTransitioning:!1});zk.displayName="ViewTransition";var DC=_.createContext(new Map);DC.displayName="Fetchers";var $C=_.createContext(null);$C.displayName="Await";var Ln=_.createContext(null);Ln.displayName="Navigation";var El=_.createContext(null);El.displayName="Location";var _r=_.createContext({outlet:null,matches:[],isDataRoute:!1});_r.displayName="Route";var Cp=_.createContext(null);Cp.displayName="RouteError";var _k="REACT_ROUTER_ERROR",LC="REDIRECT",UC="ROUTE_ERROR_RESPONSE";function PC(e){if(e.startsWith(`${_k}:${LC}:{`))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 VC(e){if(e.startsWith(`${_k}:${UC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new jC(t.status,t.statusText,t.data)}catch{}}function ZC(e,{relative:t}={}){pt(Bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=_.useContext(Ln),{hash:o,pathname:u,search:l}=Tl(e,{relative:t}),f=u;return n!=="/"&&(f=u==="/"?n:Yr([n,u])),i.createHref({pathname:f,search:l,hash:o})}function Bo(){return _.useContext(El)!=null}function hr(){return pt(Bo(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(El).location}var Ek="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Tk(e){_.useContext(Ln).static||_.useLayoutEffect(e)}function Ap(){let{isDataRoute:e}=_.useContext(_r);return e?eA():BC()}function BC(){pt(Bo(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Zo),{basename:t,navigator:n}=_.useContext(Ln),{matches:i}=_.useContext(_r),{pathname:o}=hr(),u=JSON.stringify(Ep(i)),l=_.useRef(!1);return Tk(()=>{l.current=!0}),_.useCallback((d,h={})=>{if(dr(l.current,Ek),!l.current)return;if(typeof d=="number"){n.go(d);return}let p=Tp(d,JSON.parse(u),o,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Yr([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,u,o,e])}_.createContext(null);function Tl(e,{relative:t}={}){let{matches:n}=_.useContext(_r),{pathname:i}=hr(),o=JSON.stringify(Ep(n));return _.useMemo(()=>Tp(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function IC(e,t){return Ck(e,t)}function Ck(e,t,n,i,o){pt(Bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=_.useContext(Ln),{matches:l}=_.useContext(_r),f=l[l.length-1],d=f?f.params:{},h=f?f.pathname:"/",p=f?f.pathnameBase:"/",y=f&&f.route;{let O=y&&y.path||"";jk(h,!y||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${O}">) 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="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let v=hr(),b;if(t){let O=typeof t=="string"?Vo(t):t;pt(p==="/"||O.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 "${O.pathname}" was given in the \`location\` prop.`),b=O}else b=v;let E=b.pathname||"/",T=E;if(p!=="/"){let O=p.replace(/^\//,"").split("/");T="/"+E.replace(/^\//,"").split("/").slice(O.length).join("/")}let A=xk(e,{pathname:T});dr(y||A!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),dr(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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=YC(A&&A.map(O=>Object.assign({},O,{params:Object.assign({},d,O.params),pathname:Yr([p,u.encodeLocation?u.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?p:Yr([p,u.encodeLocation?u.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),l,n,i,o);return t&&j?_.createElement(El.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},j):j}function HC(){let e=WC(),t=NC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:u},"ErrorBoundary")," or"," ",_.createElement("code",{style:u},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:o},n):null,l)}var FC=_.createElement(HC,null),Ak=class extends _.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=VC(e.digest);n&&(e=n)}let t=e!==void 0?_.createElement(_r.Provider,{value:this.props.routeContext},_.createElement(Cp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(qC,{error:e},t):t}};Ak.contextType=MC;var jh=new WeakMap;function qC({children:e,error:t}){let{basename:n}=_.useContext(Ln);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=PC(t.digest);if(i){let o=jh.get(t);if(o)throw o;let u=kk(i.location,n);if(Sk&&!jh.get(t))if(u.isExternal||i.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw jh.set(t,l),l}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function GC({routeContext:e,match:t,children:n}){let i=_.useContext(Zo);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(_r.Provider,{value:e},n)}function YC(e,t=[],n=null,i=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(y=>y.route.id&&l?.[y.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 f=!1,d=-1;if(n)for(let p=0;p<u.length;p++){let y=u[p];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(d=p),y.route.id){let{loaderData:v,errors:b}=n,E=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!b||b[y.route.id]===void 0);if(y.route.lazy||E){f=!0,d>=0?u=u.slice(0,d+1):u=[u[0]];break}}}let h=n&&i?(p,y)=>{i(p,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:OC(n.matches),errorInfo:y})}:void 0;return u.reduceRight((p,y,v)=>{let b,E=!1,T=null,A=null;n&&(b=l&&y.route.id?l[y.route.id]:void 0,T=y.route.errorElement||FC,f&&(d<0&&v===0?(jk("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,A=null):d===v&&(E=!0,A=y.route.hydrateFallbackElement||null)));let j=t.concat(u.slice(0,v+1)),O=()=>{let w;return b?w=T:E?w=A:y.route.Component?w=_.createElement(y.route.Component,null):y.route.element?w=y.route.element:w=p,_.createElement(GC,{match:y,routeContext:{outlet:p,matches:j,isDataRoute:n!=null},children:w})};return n&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?_.createElement(Ak,{location:n.location,revalidation:n.revalidation,component:T,error:b,children:O(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:h}):O()},null)}function jp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function XC(e){let t=_.useContext(Zo);return pt(t,jp(e)),t}function KC(e){let t=_.useContext(Gc);return pt(t,jp(e)),t}function JC(e){let t=_.useContext(_r);return pt(t,jp(e)),t}function Np(e){let t=JC(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 QC(){return Np("useRouteId")}function WC(){let e=_.useContext(Cp),t=KC("useRouteError"),n=Np("useRouteError");return e!==void 0?e:t.errors?.[n]}function eA(){let{router:e}=XC("useNavigate"),t=Np("useNavigate"),n=_.useRef(!1);return Tk(()=>{n.current=!0}),_.useCallback(async(o,u={})=>{dr(n.current,Ek),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var e0={};function jk(e,t,n){!t&&!e0[e]&&(e0[e]=!0,dr(!1,n))}_.memo(tA);function tA({routes:e,future:t,state:n,onError:i}){return Ck(e,void 0,n,i,t)}function Nk({to:e,replace:t,state:n,relative:i}){pt(Bo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=_.useContext(Ln);dr(!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}=_.useContext(_r),{pathname:l}=hr(),f=Ap(),d=Tp(e,Ep(u),l,i==="path"),h=JSON.stringify(d);return _.useEffect(()=>{f(JSON.parse(h),{replace:t,state:n,relative:i})},[f,h,i,t,n]),null}function Jn(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 nA({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:o,static:u=!1,unstable_useTransitions:l}){pt(!Bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=_.useMemo(()=>({basename:f,navigator:o,static:u,unstable_useTransitions:l,future:{}}),[f,o,u,l]);typeof n=="string"&&(n=Vo(n));let{pathname:h="/",search:p="",hash:y="",state:v=null,key:b="default"}=n,E=_.useMemo(()=>{let T=Jr(h,f);return T==null?null:{location:{pathname:T,search:p,hash:y,state:v,key:b},navigationType:i}},[f,h,p,y,v,b,i]);return dr(E!=null,`<Router basename="${f}"> is not able to match the URL "${h}${p}${y}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:_.createElement(Ln.Provider,{value:d},_.createElement(El.Provider,{children:t,value:E}))}function t0({children:e,location:t}){return IC(Tm(e),t)}function Tm(e,t=[]){let n=[];return _.Children.forEach(e,(i,o)=>{if(!_.isValidElement(i))return;let u=[...t,o];if(i.type===_.Fragment){n.push.apply(n,Tm(i.props.children,u));return}pt(i.type===Jn,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),pt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let l={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=Tm(i.props.children,u)),n.push(l)}),n}var gc="get",yc="application/x-www-form-urlencoded";function Yc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function rA(e){return Yc(e)&&e.tagName.toLowerCase()==="button"}function iA(e){return Yc(e)&&e.tagName.toLowerCase()==="form"}function aA(e){return Yc(e)&&e.tagName.toLowerCase()==="input"}function oA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sA(e,t){return e.button===0&&(!t||t==="_self")&&!oA(e)}var Ju=null;function lA(){if(Ju===null)try{new FormData(document.createElement("form"),0),Ju=!1}catch{Ju=!0}return Ju}var uA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Nh(e){return e!=null&&!uA.has(e)?(dr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yc}"`),null):e}function cA(e,t){let n,i,o,u,l;if(iA(e)){let f=e.getAttribute("action");i=f?Jr(f,t):null,n=e.getAttribute("method")||gc,o=Nh(e.getAttribute("enctype"))||yc,u=new FormData(e)}else if(rA(e)||aA(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(i=d?Jr(d,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||gc,o=Nh(e.getAttribute("formenctype"))||Nh(f.getAttribute("enctype"))||yc,u=new FormData(f,e),!lA()){let{name:h,type:p,value:y}=e;if(p==="image"){let v=h?`${h}.`:"";u.append(`${v}x`,"0"),u.append(`${v}y`,"0")}else h&&u.append(h,y)}}else{if(Yc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=gc,i=null,o=yc,l=e}return u&&o==="text/plain"&&(l=u,u=void 0),{action:i,method:n.toLowerCase(),encType:o,formData:u,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Op(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fA(e,t,n,i){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}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:t&&Jr(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${i}`,o}async function dA(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 hA(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 mA(e,t,n){let i=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let l=await dA(u,n);return l.links?l.links():[]}return[]}));return xA(i.flat(1).filter(hA).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function n0(e,t,n,i,o,u){let l=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,f=(d,h)=>n[h].pathname!==d.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==d.params["*"];return u==="assets"?t.filter((d,h)=>l(d,h)||f(d,h)):u==="data"?t.filter((d,h)=>{let p=i.routes[d.route.id];if(!p||!p.hasLoader)return!1;if(l(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function pA(e,t,{includeHydrateFallback:n}={}){return gA(e.map(i=>{let o=t.routes[i.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 gA(e){return[...new Set(e)]}function yA(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function xA(e,t){let n=new Set;return new Set(t),e.reduce((i,o)=>{let u=JSON.stringify(yA(o));return n.has(u)||(n.add(u),i.push({key:u,link:o})),i},[])}function Ok(){let e=_.useContext(Zo);return Op(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vA(){let e=_.useContext(Gc);return Op(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Rp=_.createContext(void 0);Rp.displayName="FrameworkContext";function Rk(){let e=_.useContext(Rp);return Op(e,"You must render this element inside a <HydratedRouter> element"),e}function bA(e,t){let n=_.useContext(Rp),[i,o]=_.useState(!1),[u,l]=_.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:p,onTouchStart:y}=t,v=_.useRef(null);_.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let T=j=>{j.forEach(O=>{l(O.isIntersecting)})},A=new IntersectionObserver(T,{threshold:.5});return v.current&&A.observe(v.current),()=>{A.disconnect()}}},[e]),_.useEffect(()=>{if(i){let T=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(T)}}},[i]);let b=()=>{o(!0)},E=()=>{o(!1),l(!1)};return n?e!=="intent"?[u,v,{}]:[u,v,{onFocus:Fs(f,b),onBlur:Fs(d,E),onMouseEnter:Fs(h,b),onMouseLeave:Fs(p,E),onTouchStart:Fs(y,b)}]:[!1,v,{}]}function Fs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function SA({page:e,...t}){let{router:n}=Ok(),i=_.useMemo(()=>xk(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?_.createElement(wA,{page:e,matches:i,...t}):null}function kA(e){let{manifest:t,routeModules:n}=Rk(),[i,o]=_.useState([]);return _.useEffect(()=>{let u=!1;return mA(e,t,n).then(l=>{u||o(l)}),()=>{u=!0}},[e,t,n]),i}function wA({page:e,matches:t,...n}){let i=hr(),{future:o,manifest:u,routeModules:l}=Rk(),{basename:f}=Ok(),{loaderData:d,matches:h}=vA(),p=_.useMemo(()=>n0(e,t,h,u,i,"data"),[e,t,h,u,i]),y=_.useMemo(()=>n0(e,t,h,u,i,"assets"),[e,t,h,u,i]),v=_.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let T=new Set,A=!1;if(t.forEach(O=>{let w=u.routes[O.route.id];!w||!w.hasLoader||(!p.some(P=>P.route.id===O.route.id)&&O.route.id in d&&l[O.route.id]?.shouldRevalidate||w.hasClientLoader?A=!0:T.add(O.route.id))}),T.size===0)return[];let j=fA(e,f,o.unstable_trailingSlashAwareDataRequests,"data");return A&&T.size>0&&j.searchParams.set("_routes",t.filter(O=>T.has(O.route.id)).map(O=>O.route.id).join(",")),[j.pathname+j.search]},[f,o.unstable_trailingSlashAwareDataRequests,d,i,u,p,t,e,l]),b=_.useMemo(()=>pA(y,u),[y,u]),E=kA(y);return _.createElement(_.Fragment,null,v.map(T=>_.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...n})),b.map(T=>_.createElement("link",{key:T,rel:"modulepreload",href:T,...n})),E.map(({key:T,link:A})=>_.createElement("link",{key:T,nonce:n.nonce,...A,crossOrigin:A.crossOrigin??n.crossOrigin})))}function zA(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var _A=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_A&&(window.__reactRouterVersion="7.13.0")}catch{}function EA({basename:e,children:t,unstable_useTransitions:n,window:i}){let o=_.useRef();o.current==null&&(o.current=sC({window:i,v5Compat:!0}));let u=o.current,[l,f]=_.useState({action:u.action,location:u.location}),d=_.useCallback(h=>{n===!1?f(h):_.startTransition(()=>f(h))},[n]);return _.useLayoutEffect(()=>u.listen(d),[u,d]),_.createElement(nA,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,unstable_useTransitions:n})}var Mk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,po=_.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:o,reloadDocument:u,replace:l,state:f,target:d,to:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:v,...b},E){let{basename:T,unstable_useTransitions:A}=_.useContext(Ln),j=typeof h=="string"&&Mk.test(h),O=kk(h,T);h=O.to;let w=ZC(h,{relative:o}),[P,D,L]=bA(i,b),Y=jA(h,{replace:l,state:f,target:d,preventScrollReset:p,relative:o,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:A});function B(ue){t&&t(ue),ue.defaultPrevented||Y(ue)}let J=_.createElement("a",{...b,...L,href:O.absoluteURL||w,onClick:O.isExternal||u?t:B,ref:zA(E,D),target:d,"data-discover":!j&&n==="render"?"true":void 0});return P&&!j?_.createElement(_.Fragment,null,J,_.createElement(SA,{page:w})):J});po.displayName="Link";var TA=_.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:o=!1,style:u,to:l,viewTransition:f,children:d,...h},p){let y=Tl(l,{relative:h.relative}),v=hr(),b=_.useContext(Gc),{navigator:E,basename:T}=_.useContext(Ln),A=b!=null&&DA(y)&&f===!0,j=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,O=v.pathname,w=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(O=O.toLowerCase(),w=w?w.toLowerCase():null,j=j.toLowerCase()),w&&T&&(w=Jr(w,T)||w);const P=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let D=O===j||!o&&O.startsWith(j)&&O.charAt(P)==="/",L=w!=null&&(w===j||!o&&w.startsWith(j)&&w.charAt(j.length)==="/"),Y={isActive:D,isPending:L,isTransitioning:A},B=D?t:void 0,J;typeof i=="function"?J=i(Y):J=[i,D?"active":null,L?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let ue=typeof u=="function"?u(Y):u;return _.createElement(po,{...h,"aria-current":B,className:J,ref:p,style:ue,to:l,viewTransition:f},typeof d=="function"?d(Y):d)});TA.displayName="NavLink";var CA=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:o,state:u,method:l=gc,action:f,onSubmit:d,relative:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:v,...b},E)=>{let{unstable_useTransitions:T}=_.useContext(Ln),A=RA(),j=MA(f,{relative:h}),O=l.toLowerCase()==="get"?"get":"post",w=typeof f=="string"&&Mk.test(f),P=D=>{if(d&&d(D),D.defaultPrevented)return;D.preventDefault();let L=D.nativeEvent.submitter,Y=L?.getAttribute("formmethod")||l,B=()=>A(L||D.currentTarget,{fetcherKey:t,method:Y,navigate:n,replace:o,state:u,relative:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:v});T&&n!==!1?_.startTransition(()=>B()):B()};return _.createElement("form",{ref:E,method:O,action:j,onSubmit:i?d:P,...b,"data-discover":!w&&e==="render"?"true":void 0})});CA.displayName="Form";function AA(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dk(e){let t=_.useContext(Zo);return pt(t,AA(e)),t}function jA(e,{target:t,replace:n,state:i,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f,unstable_useTransitions:d}={}){let h=Ap(),p=hr(),y=Tl(e,{relative:u});return _.useCallback(v=>{if(sA(v,t)){v.preventDefault();let b=n!==void 0?n:dl(p)===dl(y),E=()=>h(e,{replace:b,state:i,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f});d?_.startTransition(()=>E()):E()}},[p,h,y,n,i,t,e,o,u,l,f,d])}var NA=0,OA=()=>`__${String(++NA)}__`;function RA(){let{router:e}=Dk("useSubmit"),{basename:t}=_.useContext(Ln),n=QC(),i=e.fetch,o=e.navigate;return _.useCallback(async(u,l={})=>{let{action:f,method:d,encType:h,formData:p,body:y}=cA(u,t);if(l.navigate===!1){let v=l.fetcherKey||OA();await i(v,n,l.action||f,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:y,formMethod:l.method||d,formEncType:l.encType||h,flushSync:l.flushSync})}else await o(l.action||f,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:y,formMethod:l.method||d,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,o,t,n])}function MA(e,{relative:t}={}){let{basename:n}=_.useContext(Ln),i=_.useContext(_r);pt(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),u={...Tl(e||".",{relative:t})},l=hr();if(e==null){u.search=l.search;let f=new URLSearchParams(u.search),d=f.getAll("index");if(d.some(p=>p==="")){f.delete("index"),d.filter(y=>y).forEach(y=>f.append("index",y));let p=f.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:Yr([n,u.pathname])),dl(u)}function DA(e,{relative:t}={}){let n=_.useContext(zk);pt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Dk("useViewTransitionState"),o=Tl(e,{relative:t});if(!n.isTransitioning)return!1;let u=Jr(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=Jr(n.nextLocation.pathname,i)||n.nextLocation.pathname;return _c(o.pathname,l)!=null||_c(o.pathname,u)!=null}const $k=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const $A=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const LA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const r0=e=>{const t=LA(e);return t.charAt(0).toUpperCase()+t.slice(1)};var UA={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 PA=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const VA=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:u,iconNode:l,...f},d)=>_.createElement("svg",{ref:d,...UA,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:$k("lucide",o),...!u&&!PA(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,p])=>_.createElement(h,p)),...Array.isArray(u)?u:[u]]));const Oe=(e,t)=>{const n=_.forwardRef(({className:i,...o},u)=>_.createElement(VA,{ref:u,iconNode:t,className:$k(`lucide-${$A(r0(e))}`,`lucide-${e}`,i),...o}));return n.displayName=r0(e),n};const ZA=[["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"}]],go=Oe("activity",ZA);const BA=[["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"}]],IA=Oe("archive",BA);const HA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],FA=Oe("arrow-down",HA);const qA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],GA=Oe("arrow-up",qA);const YA=[["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"}]],i0=Oe("bot",YA);const XA=[["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"}]],KA=Oe("box",XA);const JA=[["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"}]],QA=Oe("brain",JA);const WA=[["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"}]],Lk=Oe("calendar",WA);const ej=[["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"}]],Cm=Oe("chart-column",ej);const tj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nj=Oe("check",tj);const rj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Uk=Oe("clock",rj);const ij=[["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"}]],Pk=Oe("cpu",ij);const aj=[["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"}]],oj=Oe("database",aj);const sj=[["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"}]],Ec=Oe("dollar-sign",sj);const lj=[["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"}]],Vk=Oe("eye",lj);const uj=[["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"}]],cj=Oe("file-text",uj);const fj=[["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"}]],dj=Oe("hash",fj);const hj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],mj=Oe("info",hj);const pj=[["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"}]],a0=Oe("layout-dashboard",pj);const gj=[["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"}]],o0=Oe("log-out",gj);const yj=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],xj=Oe("menu",yj);const vj=[["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"}]],s0=Oe("message-square-plus",vj);const bj=[["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"}]],hl=Oe("message-square",bj);const Sj=[["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"}]],Zk=Oe("moon",Sj);const kj=[["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"}]],Bk=Oe("pencil",kj);const wj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zj=Oe("plus",wj);const _j=[["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"}]],l0=Oe("puzzle",_j);const Ej=[["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"}]],Tj=Oe("refresh-cw",Ej);const Cj=[["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"}]],u0=Oe("rotate-ccw",Cj);const Aj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],jj=Oe("search",Aj);const Nj=[["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"}]],Oj=Oe("send",Nj);const Rj=[["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"}]],c0=Oe("settings",Rj);const Mj=[["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"}]],Ik=Oe("sun",Mj);const Dj=[["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"}]],$j=Oe("tag",Dj);const Lj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],f0=Oe("terminal",Lj);const Uj=[["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"}]],Tc=Oe("trash-2",Uj);const Pj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Vj=Oe("trending-up",Pj);const Zj=[["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"}]],Bj=Oe("user",Zj);const Ij=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hj=Oe("x",Ij);var Oh={exports:{}},Rh={};var d0;function Fj(){if(d0)return Rh;d0=1;var e=qc();function t(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,u=e.useLayoutEffect,l=e.useDebugValue;function f(y,v){var b=v(),E=i({inst:{value:b,getSnapshot:v}}),T=E[0].inst,A=E[1];return u(function(){T.value=b,T.getSnapshot=v,d(T)&&A({inst:T})},[y,b,v]),o(function(){return d(T)&&A({inst:T}),y(function(){d(T)&&A({inst:T})})},[y]),l(b),b}function d(y){var v=y.getSnapshot;y=y.value;try{var b=v();return!n(y,b)}catch{return!0}}function h(y,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Rh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Rh}var h0;function qj(){return h0||(h0=1,Oh.exports=Fj()),Oh.exports}var m0=qj();const Hk=0,Fk=1,qk=2,p0=3;var g0=Object.prototype.hasOwnProperty;function Am(e,t){var n,i;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((i=e.length)===t.length)for(;i--&&Am(e[i],t[i]););return i===-1}if(!n||typeof e=="object"){i=0;for(n in e)if(g0.call(e,n)&&++i&&!g0.call(t,n)||!(n in t)||!Am(e[n],t[n]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}const qr=new WeakMap,Gr=()=>{},nn=Gr(),jm=Object,Ve=e=>e===nn,br=e=>typeof e=="function",Ni=(e,t)=>({...e,...t}),Gk=e=>br(e.then),Mh={},Qu={},Mp="undefined",Cl=typeof window!=Mp,Nm=typeof document!=Mp,Gj=Cl&&"Deno"in window,Yj=()=>Cl&&typeof window.requestAnimationFrame!=Mp,Yk=(e,t)=>{const n=qr.get(e);return[()=>!Ve(t)&&e.get(t)||Mh,i=>{if(!Ve(t)){const o=e.get(t);t in Qu||(Qu[t]=o),n[5](t,Ni(o,i),o||Mh)}},n[6],()=>!Ve(t)&&t in Qu?Qu[t]:!Ve(t)&&e.get(t)||Mh]};let Om=!0;const Xj=()=>Om,[Rm,Mm]=Cl&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Gr,Gr],Kj=()=>{const e=Nm&&document.visibilityState;return Ve(e)||e!=="hidden"},Jj=e=>(Nm&&document.addEventListener("visibilitychange",e),Rm("focus",e),()=>{Nm&&document.removeEventListener("visibilitychange",e),Mm("focus",e)}),Qj=e=>{const t=()=>{Om=!0,e()},n=()=>{Om=!1};return Rm("online",t),Rm("offline",n),()=>{Mm("online",t),Mm("offline",n)}},Wj={isOnline:Xj,isVisible:Kj},eN={initFocus:Jj,initReconnect:Qj},y0=!_p.useId,_o=!Cl||Gj,tN=e=>Yj()?window.requestAnimationFrame(e):setTimeout(e,1),Dh=_o?_.useEffect:_.useLayoutEffect,$h=typeof navigator<"u"&&navigator.connection,x0=!_o&&$h&&(["slow-2g","2g"].includes($h.effectiveType)||$h.saveData),Wu=new WeakMap,nN=e=>jm.prototype.toString.call(e),Lh=(e,t)=>e===`[object ${t}]`;let rN=0;const Dm=e=>{const t=typeof e,n=nN(e),i=Lh(n,"Date"),o=Lh(n,"RegExp"),u=Lh(n,"Object");let l,f;if(jm(e)===e&&!i&&!o){if(l=Wu.get(e),l)return l;if(l=++rN+"~",Wu.set(e,l),Array.isArray(e)){for(l="@",f=0;f<e.length;f++)l+=Dm(e[f])+",";Wu.set(e,l)}if(u){l="#";const d=jm.keys(e).sort();for(;!Ve(f=d.pop());)Ve(e[f])||(l+=f+":"+Dm(e[f])+",");Wu.set(e,l)}}else l=i?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return l},Dp=e=>{if(br(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Dm(e):"",[e,t]};let iN=0;const $m=()=>++iN;async function Xk(...e){const[t,n,i,o]=e,u=Ni({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let l=u.populateCache;const f=u.rollbackOnError;let d=u.optimisticData;const h=v=>typeof f=="function"?f(v):f!==!1,p=u.throwOnError;if(br(n)){const v=n,b=[],E=t.keys();for(const T of E)!/^\$(inf|sub)\$/.test(T)&&v(t.get(T)._k)&&b.push(T);return Promise.all(b.map(y))}return y(n);async function y(v){const[b]=Dp(v);if(!b)return;const[E,T]=Yk(t,b),[A,j,O,w]=qr.get(t),P=()=>{const se=A[b];return(br(u.revalidate)?u.revalidate(E().data,v):u.revalidate!==!1)&&(delete O[b],delete w[b],se&&se[0])?se[0](qk).then(()=>E().data):E().data};if(e.length<3)return P();let D=i,L,Y=!1;const B=$m();j[b]=[B,0];const J=!Ve(d),ue=E(),$=ue.data,ie=ue._c,ve=Ve(ie)?$:ie;if(J&&(d=br(d)?d(ve,$):d,T({data:d,_c:ve})),br(D))try{D=D(ve)}catch(se){L=se,Y=!0}if(D&&Gk(D))if(D=await D.catch(se=>{L=se,Y=!0}),B!==j[b][0]){if(Y)throw L;return D}else Y&&J&&h(L)&&(l=!0,T({data:ve,_c:nn}));if(l&&!Y)if(br(l)){const se=l(D,ve);T({data:se,error:nn,_c:nn})}else T({data:D,error:nn,_c:nn});if(j[b][1]=$m(),Promise.resolve(P()).then(()=>{T({_c:nn})}),Y){if(p)throw L;return}return D}}const v0=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},aN=(e,t)=>{if(!qr.has(e)){const n=Ni(eN,t),i=Object.create(null),o=Xk.bind(nn,e);let u=Gr;const l=Object.create(null),f=(p,y)=>{const v=l[p]||[];return l[p]=v,v.push(y),()=>v.splice(v.indexOf(y),1)},d=(p,y,v)=>{e.set(p,y);const b=l[p];if(b)for(const E of b)E(y,v)},h=()=>{if(!qr.has(e)&&(qr.set(e,[i,Object.create(null),Object.create(null),Object.create(null),o,d,f]),!_o)){const p=n.initFocus(setTimeout.bind(nn,v0.bind(nn,i,Hk))),y=n.initReconnect(setTimeout.bind(nn,v0.bind(nn,i,Fk)));u=()=>{p&&p(),y&&y(),qr.delete(e)}}};return h(),[e,o,h,u]}return[e,qr.get(e)[4]]},oN=(e,t,n,i,o)=>{const u=n.errorRetryCount,l=o.retryCount,f=~~((Math.random()+.5)*(1<<(l<8?l:8)))*n.errorRetryInterval;!Ve(u)&&l>u||setTimeout(i,f,o)},sN=Am,[Kk,xc]=aN(new Map),lN=Ni({onLoadingSlow:Gr,onSuccess:Gr,onError:Gr,onErrorRetry:oN,onDiscarded:Gr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:x0?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:x0?5e3:3e3,compare:sN,isPaused:()=>!1,cache:Kk,mutate:xc,fallback:{}},Wj),uN=(e,t)=>{const n=Ni(e,t);if(t){const{use:i,fallback:o}=e,{use:u,fallback:l}=t;i&&u&&(n.use=i.concat(u)),o&&l&&(n.fallback=Ni(o,l))}return n},cN=_.createContext({}),fN="$inf$",Jk=Cl&&window.__SWR_DEVTOOLS_USE__,dN=Jk?window.__SWR_DEVTOOLS_USE__:[],hN=()=>{Jk&&(window.__SWR_DEVTOOLS_REACT__=_p)},mN=e=>br(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],pN=()=>{const e=_.useContext(cN);return _.useMemo(()=>Ni(lN,e),[e])},gN=e=>(t,n,i)=>e(t,n&&((...u)=>{const[l]=Dp(t),[,,,f]=qr.get(Kk);if(l.startsWith(fN))return n(...u);const d=f[l];return Ve(d)?n(...u):(delete f[l],d)}),i),yN=dN.concat(gN),xN=e=>function(...n){const i=pN(),[o,u,l]=mN(n),f=uN(i,l);let d=e;const{use:h}=f,p=(h||[]).concat(yN);for(let y=p.length;y--;)d=p[y](d);return d(o,u||f.fetcher||null,f)},vN=(e,t,n)=>{const i=t[e]||(t[e]=[]);return i.push(n),()=>{const o=i.indexOf(n);o>=0&&(i[o]=i[i.length-1],i.pop())}};hN();const Uh=_p.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}}),Ph={dedupe:!0},b0=Promise.resolve(nn),bN=(e,t,n)=>{const{cache:i,compare:o,suspense:u,fallbackData:l,revalidateOnMount:f,revalidateIfStale:d,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:y,keepPreviousData:v,strictServerPrefetchWarning:b}=n,[E,T,A,j]=qr.get(i),[O,w]=Dp(e),P=_.useRef(!1),D=_.useRef(!1),L=_.useRef(O),Y=_.useRef(t),B=_.useRef(n),J=()=>B.current,ue=()=>J().isVisible()&&J().isOnline(),[$,ie,ve,se]=Yk(i,O),ne=_.useRef({}).current,V=Ve(l)?Ve(n.fallback)?nn:n.fallback[O]:l,X=(Ze,nt)=>{for(const lt in ne){const Je=lt;if(Je==="data"){if(!o(Ze[Je],nt[Je])&&(!Ve(Ze[Je])||!o(pe,nt[Je])))return!1}else if(nt[Je]!==Ze[Je])return!1}return!0},Z=_.useMemo(()=>{const Ze=!O||!t?!1:Ve(f)?J().isPaused()||u?!1:d!==!1:f,nt=Pt=>{const ut=Ni(Pt);return delete ut._k,Ze?{isValidating:!0,isLoading:!0,...ut}:ut},lt=$(),Je=se(),Ht=nt(lt),Vn=lt===Je?Ht:nt(Je);let Et=Ht;return[()=>{const Pt=nt($());return X(Pt,Et)?(Et.data=Pt.data,Et.isLoading=Pt.isLoading,Et.isValidating=Pt.isValidating,Et.error=Pt.error,Et):(Et=Pt,Pt)},()=>Vn]},[i,O]),ce=m0.useSyncExternalStore(_.useCallback(Ze=>ve(O,(nt,lt)=>{X(lt,nt)||Ze()}),[i,O]),Z[0],Z[1]),N=!P.current,C=E[O]&&E[O].length>0,G=ce.data,z=Ve(G)?V&&Gk(V)?Uh(V):V:G,ae=ce.error,be=_.useRef(z),pe=v?Ve(G)?Ve(be.current)?z:be.current:G:z,ge=O&&Ve(z),Ge=!_o&&m0.useSyncExternalStore(()=>Gr,()=>!1,()=>!0);b&&Ge&&!u&&ge&&console.warn(`Missing pre-initiated data for serialized key "${O}" 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&&!Ve(ae)?!1:N&&!Ve(f)?f:J().isPaused()?!1:u?Ve(z)?!1:d:Ve(z)||d,At=!!(O&&t&&N&&De),on=Ve(ce.isValidating)?At:ce.isValidating,Un=Ve(ce.isLoading)?At:ce.isLoading,mr=_.useCallback(async Ze=>{const nt=Y.current;if(!O||!nt||D.current||J().isPaused())return!1;let lt,Je,Ht=!0;const Vn=Ze||{},Et=!A[O]||!Vn.dedupe,Pt=()=>y0?!D.current&&O===L.current&&P.current:O===L.current,ut={isValidating:!1,isLoading:!1},za=()=>{ie(ut)},Q=()=>{const ye=A[O];ye&&ye[1]===Je&&delete A[O]},le={isValidating:!0};Ve($().data)&&(le.isLoading=!0);try{if(Et&&(ie(le),n.loadingTimeout&&Ve($().data)&&setTimeout(()=>{Ht&&Pt()&&J().onLoadingSlow(O,n)},n.loadingTimeout),A[O]=[nt(w),$m()]),[lt,Je]=A[O],lt=await lt,Et&&setTimeout(Q,n.dedupingInterval),!A[O]||A[O][1]!==Je)return Et&&Pt()&&J().onDiscarded(O),!1;ut.error=nn;const ye=T[O];if(!Ve(ye)&&(Je<=ye[0]||Je<=ye[1]||ye[1]===0))return za(),Et&&Pt()&&J().onDiscarded(O),!1;const ze=$().data;ut.data=o(ze,lt)?ze:lt,Et&&Pt()&&J().onSuccess(lt,O,n)}catch(ye){Q();const ze=J(),{shouldRetryOnError:Pe}=ze;ze.isPaused()||(ut.error=ye,Et&&Pt()&&(ze.onError(ye,O,ze),(Pe===!0||br(Pe)&&Pe(ye))&&(!J().revalidateOnFocus||!J().revalidateOnReconnect||ue())&&ze.onErrorRetry(ye,O,ze,sn=>{const Tn=E[O];Tn&&Tn[0]&&Tn[0](p0,sn)},{retryCount:(Vn.retryCount||0)+1,dedupe:!0})))}return Ht=!1,za(),!0},[O,i]),Pn=_.useCallback((...Ze)=>Xk(i,L.current,...Ze),[]);if(Dh(()=>{Y.current=t,B.current=n,Ve(G)||(be.current=G)}),Dh(()=>{if(!O)return;const Ze=mr.bind(nn,Ph);let nt=0;J().revalidateOnFocus&&(nt=Date.now()+J().focusThrottleInterval);const Je=vN(O,E,(Ht,Vn={})=>{if(Ht==Hk){const Et=Date.now();J().revalidateOnFocus&&Et>nt&&ue()&&(nt=Et+J().focusThrottleInterval,Ze())}else if(Ht==Fk)J().revalidateOnReconnect&&ue()&&Ze();else{if(Ht==qk)return mr();if(Ht==p0)return mr(Vn)}});return D.current=!1,L.current=O,P.current=!0,ie({_k:w}),De&&(A[O]||(Ve(z)||_o?Ze():tN(Ze))),()=>{D.current=!0,Je()}},[O]),Dh(()=>{let Ze;function nt(){const Je=br(h)?h($().data):h;Je&&Ze!==-1&&(Ze=setTimeout(lt,Je))}function lt(){!$().error&&(p||J().isVisible())&&(y||J().isOnline())?mr(Ph).then(nt):nt()}return nt(),()=>{Ze&&(clearTimeout(Ze),Ze=-1)}},[h,p,y,O]),_.useDebugValue(pe),u){if(!y0&&_o&&ge)throw new Error("Fallback data is required when using Suspense in SSR.");ge&&(Y.current=t,B.current=n,D.current=!1);const Ze=j[O],nt=!Ve(Ze)&&ge?Pn(Ze):b0;if(Uh(nt),!Ve(ae)&&ge)throw ae;const lt=ge?mr(Ph):b0;!Ve(pe)&&ge&&(lt.status="fulfilled",lt.value=!0),Uh(lt)}return{mutate:Pn,get data(){return ne.data=!0,pe},get error(){return ne.error=!0,ae},get isValidating(){return ne.isValidating=!0,on},get isLoading(){return ne.isLoading=!0,Un}}},Xr=xN(bN),SN="x-architect-pass",qs="/api";class pa{static instance;constructor(){}static getInstance(){return pa.instance||(pa.instance=new pa),pa.instance}getHeaders(t={}){const n=localStorage.getItem("morpheus.auth.token"),i={...t};return n&&(i[SN]=n),i}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"})),i=new Error(n.error||`HTTP error! status: ${t.status}`);throw i.details=n.details,i}return t.json()}async get(t){const n=await fetch(`${qs}${t}`,{headers:this.getHeaders()});return this.handleResponse(n)}async post(t,n){const i=await fetch(`${qs}${t}`,{method:"POST",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async put(t,n){const i=await fetch(`${qs}${t}`,{method:"PUT",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async patch(t,n){const i=await fetch(`${qs}${t}`,{method:"PATCH",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async delete(t){const n=await fetch(`${qs}${t}`,{method:"DELETE",headers:this.getHeaders()});return this.handleResponse(n)}}const at=pa.getInstance(),ml="/api",$p=e=>{const t=e.startsWith(ml)?e.substring(ml.length):e;return at.get(t)};function Qk(){return Xr(`${ml}/status`,$p,{refreshInterval:5e3})}function kN(){return Xr(`${ml}/logs`,$p)}function wN(e){return Xr(e?`${ml}/logs/${e}?limit=1000`:null,$p,{refreshInterval:2e3})}function Wk(e){const t=Math.floor(e/60);if(t>59){const n=Math.floor(t/60),i=t%60;return`${n}h ${i}m`}return`${t}m`}function zN(){const{data:e}=Qk();return x.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:[x.jsxs("div",{className:"flex gap-4",children:[x.jsxs("span",{className:e?"text-azure-primary dark:text-matrix-highlight":"text-red-500",children:["● ",e?.status.toUpperCase()||"OFFLINE"]}),x.jsxs("span",{children:["PID: ",e?.pid||"-"]}),x.jsxs("span",{children:["UPTIME: ",e?Wk(e.uptimeSeconds):"-"]})]}),x.jsxs("div",{className:"flex gap-4 opacity-70",children:[x.jsxs("span",{children:["v",e?.projectVersion||"0.0.0"]}),x.jsx("span",{children:e?.agentName||"Morpheus"})]})]})}const Lp=_.createContext({});function Up(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const ew=typeof window<"u",tw=ew?_.useLayoutEffect:_.useEffect,Xc=_.createContext(null);function Pp(e,t){e.indexOf(t)===-1&&e.push(t)}function Vp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const wr=(e,t,n)=>n>t?t:n<e?e:n;let Zp=()=>{};const Qr={},nw=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function rw(e){return typeof e=="object"&&e!==null}const iw=e=>/^0[^.\s]+$/u.test(e);function Bp(e){let t;return()=>(t===void 0&&(t=e()),t)}const rr=e=>e,_N=(e,t)=>n=>t(e(n)),Al=(...e)=>e.reduce(_N),pl=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class Ip{constructor(){this.subscriptions=[]}add(t){return Pp(this.subscriptions,t),()=>Vp(this.subscriptions,t)}notify(t,n,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,i);else for(let u=0;u<o;u++){const l=this.subscriptions[u];l&&l(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Kr=e=>e*1e3,nr=e=>e/1e3;function aw(e,t){return t?e*(1e3/t):0}const ow=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,EN=1e-7,TN=12;function CN(e,t,n,i,o){let u,l,f=0;do l=t+(n-t)/2,u=ow(l,i,o)-e,u>0?n=l:t=l;while(Math.abs(u)>EN&&++f<TN);return l}function jl(e,t,n,i){if(e===t&&n===i)return rr;const o=u=>CN(u,0,1,e,n);return u=>u===0||u===1?u:ow(o(u),t,i)}const sw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lw=e=>t=>1-e(1-t),uw=jl(.33,1.53,.69,.99),Hp=lw(uw),cw=sw(Hp),fw=e=>(e*=2)<1?.5*Hp(e):.5*(2-Math.pow(2,-10*(e-1))),Fp=e=>1-Math.sin(Math.acos(e)),dw=lw(Fp),hw=sw(Fp),AN=jl(.42,0,1,1),jN=jl(0,0,.58,1),mw=jl(.42,0,.58,1),NN=e=>Array.isArray(e)&&typeof e[0]!="number",pw=e=>Array.isArray(e)&&typeof e[0]=="number",ON={linear:rr,easeIn:AN,easeInOut:mw,easeOut:jN,circIn:Fp,circInOut:hw,circOut:dw,backIn:Hp,backInOut:cw,backOut:uw,anticipate:fw},RN=e=>typeof e=="string",S0=e=>{if(pw(e)){Zp(e.length===4);const[t,n,i,o]=e;return jl(t,n,i,o)}else if(RN(e))return ON[e];return e},ec=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function MN(e,t){let n=new Set,i=new Set,o=!1,u=!1;const l=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(h.schedule(p),e()),p(f)}const h={schedule:(p,y=!1,v=!1)=>{const E=v&&o?n:i;return y&&l.add(p),E.has(p)||E.add(p),p},cancel:p=>{i.delete(p),l.delete(p)},process:p=>{if(f=p,o){u=!0;return}o=!0,[n,i]=[i,n],n.forEach(d),n.clear(),o=!1,u&&(u=!1,h.process(p))}};return h}const DN=40;function gw(e,t){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=()=>n=!0,l=ec.reduce((w,P)=>(w[P]=MN(u),w),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:p,update:y,preRender:v,render:b,postRender:E}=l,T=()=>{const w=Qr.useManualTiming?o.timestamp:performance.now();n=!1,Qr.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(w-o.timestamp,DN),1)),o.timestamp=w,o.isProcessing=!0,f.process(o),d.process(o),h.process(o),p.process(o),y.process(o),v.process(o),b.process(o),E.process(o),o.isProcessing=!1,n&&t&&(i=!1,e(T))},A=()=>{n=!0,i=!0,o.isProcessing||e(T)};return{schedule:ec.reduce((w,P)=>{const D=l[P];return w[P]=(L,Y=!1,B=!1)=>(n||A(),D.schedule(L,Y,B)),w},{}),cancel:w=>{for(let P=0;P<ec.length;P++)l[ec[P]].cancel(w)},state:o,steps:l}}const{schedule:dt,cancel:Oi,state:Wt,steps:Vh}=gw(typeof requestAnimationFrame<"u"?requestAnimationFrame:rr,!0);let vc;function $N(){vc=void 0}const hn={now:()=>(vc===void 0&&hn.set(Wt.isProcessing||Qr.useManualTiming?Wt.timestamp:performance.now()),vc),set:e=>{vc=e,queueMicrotask($N)}},yw=e=>t=>typeof t=="string"&&t.startsWith(e),xw=yw("--"),LN=yw("var(--"),qp=e=>LN(e)?UN.test(e.split("/*")[0].trim()):!1,UN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function k0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Io={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gl={...Io,transform:e=>wr(0,1,e)},tc={...Io,default:1},al=e=>Math.round(e*1e5)/1e5,Gp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PN(e){return e==null}const VN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yp=(e,t)=>n=>!!(typeof n=="string"&&VN.test(n)&&n.startsWith(e)||t&&!PN(n)&&Object.prototype.hasOwnProperty.call(n,t)),vw=(e,t,n)=>i=>{if(typeof i!="string")return i;const[o,u,l,f]=i.match(Gp);return{[e]:parseFloat(o),[t]:parseFloat(u),[n]:parseFloat(l),alpha:f!==void 0?parseFloat(f):1}},ZN=e=>wr(0,255,e),Zh={...Io,transform:e=>Math.round(ZN(e))},ga={test:Yp("rgb","red"),parse:vw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Zh.transform(e)+", "+Zh.transform(t)+", "+Zh.transform(n)+", "+al(gl.transform(i))+")"};function BN(e){let t="",n="",i="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const Lm={test:Yp("#"),parse:BN,transform:ga.transform},Nl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ci=Nl("deg"),kr=Nl("%"),me=Nl("px"),IN=Nl("vh"),HN=Nl("vw"),w0={...kr,parse:e=>kr.parse(e)/100,transform:e=>kr.transform(e*100)},yo={test:Yp("hsl","hue"),parse:vw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+kr.transform(al(t))+", "+kr.transform(al(n))+", "+al(gl.transform(i))+")"},Dt={test:e=>ga.test(e)||Lm.test(e)||yo.test(e),parse:e=>ga.test(e)?ga.parse(e):yo.test(e)?yo.parse(e):Lm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ga.transform(e):yo.transform(e),getAnimatableNone:e=>{const t=Dt.parse(e);return t.alpha=0,Dt.transform(t)}},FN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qN(e){return isNaN(e)&&typeof e=="string"&&(e.match(Gp)?.length||0)+(e.match(FN)?.length||0)>0}const bw="number",Sw="color",GN="var",YN="var(",z0="${}",XN=/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 yl(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},o=[];let u=0;const f=t.replace(XN,d=>(Dt.test(d)?(i.color.push(u),o.push(Sw),n.push(Dt.parse(d))):d.startsWith(YN)?(i.var.push(u),o.push(GN),n.push(d)):(i.number.push(u),o.push(bw),n.push(parseFloat(d))),++u,z0)).split(z0);return{values:n,split:f,indexes:i,types:o}}function kw(e){return yl(e).values}function ww(e){const{split:t,types:n}=yl(e),i=t.length;return o=>{let u="";for(let l=0;l<i;l++)if(u+=t[l],o[l]!==void 0){const f=n[l];f===bw?u+=al(o[l]):f===Sw?u+=Dt.transform(o[l]):u+=o[l]}return u}}const KN=e=>typeof e=="number"?0:Dt.test(e)?Dt.getAnimatableNone(e):e;function JN(e){const t=kw(e);return ww(e)(t.map(KN))}const Ri={test:qN,parse:kw,createTransformer:ww,getAnimatableNone:JN};function Bh(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 QN({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let o=0,u=0,l=0;if(!t)o=u=l=n;else{const f=n<.5?n*(1+t):n+t-n*t,d=2*n-f;o=Bh(d,f,e+1/3),u=Bh(d,f,e),l=Bh(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(l*255),alpha:i}}function Cc(e,t){return n=>n>0?t:e}const xt=(e,t,n)=>e+(t-e)*n,Ih=(e,t,n)=>{const i=e*e,o=n*(t*t-i)+i;return o<0?0:Math.sqrt(o)},WN=[Lm,ga,yo],e4=e=>WN.find(t=>t.test(e));function _0(e){const t=e4(e);if(!t)return!1;let n=t.parse(e);return t===yo&&(n=QN(n)),n}const E0=(e,t)=>{const n=_0(e),i=_0(t);if(!n||!i)return Cc(e,t);const o={...n};return u=>(o.red=Ih(n.red,i.red,u),o.green=Ih(n.green,i.green,u),o.blue=Ih(n.blue,i.blue,u),o.alpha=xt(n.alpha,i.alpha,u),ga.transform(o))},Um=new Set(["none","hidden"]);function t4(e,t){return Um.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function n4(e,t){return n=>xt(e,t,n)}function Xp(e){return typeof e=="number"?n4:typeof e=="string"?qp(e)?Cc:Dt.test(e)?E0:a4:Array.isArray(e)?zw:typeof e=="object"?Dt.test(e)?E0:r4:Cc}function zw(e,t){const n=[...e],i=n.length,o=e.map((u,l)=>Xp(u)(u,t[l]));return u=>{for(let l=0;l<i;l++)n[l]=o[l](u);return n}}function r4(e,t){const n={...e,...t},i={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(i[o]=Xp(e[o])(e[o],t[o]));return o=>{for(const u in i)n[u]=i[u](o);return n}}function i4(e,t){const n=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const u=t.types[o],l=e.indexes[u][i[u]],f=e.values[l]??0;n[o]=f,i[u]++}return n}const a4=(e,t)=>{const n=Ri.createTransformer(t),i=yl(e),o=yl(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?Um.has(e)&&!o.values.length||Um.has(t)&&!i.values.length?t4(e,t):Al(zw(i4(i,o),o.values),n):Cc(e,t)};function _w(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xt(e,t,n):Xp(e)(e,t)}const o4=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>dt.update(t,n),stop:()=>Oi(t),now:()=>Wt.isProcessing?Wt.timestamp:hn.now()}},Ew=(e,t,n=10)=>{let i="";const o=Math.max(Math.round(t/n),2);for(let u=0;u<o;u++)i+=Math.round(e(u/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Ac=2e4;function Kp(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Ac;)t+=n,i=e.next(t);return t>=Ac?1/0:t}function s4(e,t=100,n){const i=n({...e,keyframes:[0,t]}),o=Math.min(Kp(i),Ac);return{type:"keyframes",ease:u=>i.next(o*u).value/t,duration:nr(o)}}const l4=5;function Tw(e,t,n){const i=Math.max(t-l4,0);return aw(n-e(i),t-i)}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},Hh=.001;function u4({duration:e=_t.duration,bounce:t=_t.bounce,velocity:n=_t.velocity,mass:i=_t.mass}){let o,u,l=1-t;l=wr(_t.minDamping,_t.maxDamping,l),e=wr(_t.minDuration,_t.maxDuration,nr(e)),l<1?(o=h=>{const p=h*l,y=p*e,v=p-n,b=Pm(h,l),E=Math.exp(-y);return Hh-v/b*E},u=h=>{const y=h*l*e,v=y*n+n,b=Math.pow(l,2)*Math.pow(h,2)*e,E=Math.exp(-y),T=Pm(Math.pow(h,2),l);return(-o(h)+Hh>0?-1:1)*((v-b)*E)/T}):(o=h=>{const p=Math.exp(-h*e),y=(h-n)*e+1;return-Hh+p*y},u=h=>{const p=Math.exp(-h*e),y=(n-h)*(e*e);return p*y});const f=5/e,d=f4(o,u,f);if(e=Kr(e),isNaN(d))return{stiffness:_t.stiffness,damping:_t.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:l*2*Math.sqrt(i*h),duration:e}}}const c4=12;function f4(e,t,n){let i=n;for(let o=1;o<c4;o++)i=i-e(i)/t(i);return i}function Pm(e,t){return e*Math.sqrt(1-t*t)}const d4=["duration","bounce"],h4=["stiffness","damping","mass"];function T0(e,t){return t.some(n=>e[n]!==void 0)}function m4(e){let t={velocity:_t.velocity,stiffness:_t.stiffness,damping:_t.damping,mass:_t.mass,isResolvedFromDuration:!1,...e};if(!T0(e,h4)&&T0(e,d4))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),o=i*i,u=2*wr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:_t.mass,stiffness:o,damping:u}}else{const n=u4(e);t={...t,...n,mass:_t.mass},t.isResolvedFromDuration=!0}return t}function jc(e=_t.visualDuration,t=_t.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=n;const u=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],f={done:!1,value:u},{stiffness:d,damping:h,mass:p,duration:y,velocity:v,isResolvedFromDuration:b}=m4({...n,velocity:-nr(n.velocity||0)}),E=v||0,T=h/(2*Math.sqrt(d*p)),A=l-u,j=nr(Math.sqrt(d/p)),O=Math.abs(A)<5;i||(i=O?_t.restSpeed.granular:_t.restSpeed.default),o||(o=O?_t.restDelta.granular:_t.restDelta.default);let w;if(T<1){const D=Pm(j,T);w=L=>{const Y=Math.exp(-T*j*L);return l-Y*((E+T*j*A)/D*Math.sin(D*L)+A*Math.cos(D*L))}}else if(T===1)w=D=>l-Math.exp(-j*D)*(A+(E+j*A)*D);else{const D=j*Math.sqrt(T*T-1);w=L=>{const Y=Math.exp(-T*j*L),B=Math.min(D*L,300);return l-Y*((E+T*j*A)*Math.sinh(B)+D*A*Math.cosh(B))/D}}const P={calculatedDuration:b&&y||null,next:D=>{const L=w(D);if(b)f.done=D>=y;else{let Y=D===0?E:0;T<1&&(Y=D===0?Kr(E):Tw(w,D,L));const B=Math.abs(Y)<=i,J=Math.abs(l-L)<=o;f.done=B&&J}return f.value=f.done?l:L,f},toString:()=>{const D=Math.min(Kp(P),Ac),L=Ew(Y=>P.next(D*Y).value,D,30);return D+"ms "+L},toTransition:()=>{}};return P}jc.applyToOptions=e=>{const t=s4(e,100,jc);return e.ease=t.ease,e.duration=Kr(t.duration),e.type="keyframes",e};function Vm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:u=500,modifyTarget:l,min:f,max:d,restDelta:h=.5,restSpeed:p}){const y=e[0],v={done:!1,value:y},b=B=>f!==void 0&&B<f||d!==void 0&&B>d,E=B=>f===void 0?d:d===void 0||Math.abs(f-B)<Math.abs(d-B)?f:d;let T=n*t;const A=y+T,j=l===void 0?A:l(A);j!==A&&(T=j-y);const O=B=>-T*Math.exp(-B/i),w=B=>j+O(B),P=B=>{const J=O(B),ue=w(B);v.done=Math.abs(J)<=h,v.value=v.done?j:ue};let D,L;const Y=B=>{b(v.value)&&(D=B,L=jc({keyframes:[v.value,E(v.value)],velocity:Tw(w,B,v.value),damping:o,stiffness:u,restDelta:h,restSpeed:p}))};return Y(0),{calculatedDuration:null,next:B=>{let J=!1;return!L&&D===void 0&&(J=!0,P(B),Y(B)),D!==void 0&&B>=D?L.next(B-D):(!J&&P(B),v)}}}function p4(e,t,n){const i=[],o=n||Qr.mix||_w,u=e.length-1;for(let l=0;l<u;l++){let f=o(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||rr:t;f=Al(d,f)}i.push(f)}return i}function g4(e,t,{clamp:n=!0,ease:i,mixer:o}={}){const u=e.length;if(Zp(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 f=p4(t,i,o),d=f.length,h=p=>{if(l&&p<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(p<e[y+1]);y++);const v=pl(e[y],e[y+1],p);return f[y](v)};return n?p=>h(wr(e[0],e[u-1],p)):h}function y4(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const o=pl(0,t,i);e.push(xt(n,1,o))}}function x4(e){const t=[0];return y4(t,e.length-1),t}function v4(e,t){return e.map(n=>n*t)}function b4(e,t){return e.map(()=>t||mw).splice(0,e.length-1)}function ol({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const o=NN(i)?i.map(S0):S0(i),u={done:!1,value:t[0]},l=v4(n&&n.length===t.length?n:x4(t),e),f=g4(l,t,{ease:Array.isArray(o)?o:b4(t,o)});return{calculatedDuration:e,next:d=>(u.value=f(d),u.done=d>=e,u)}}const S4=e=>e!==null;function Jp(e,{repeat:t,repeatType:n="loop"},i,o=1){const u=e.filter(S4),f=o<0||t&&n!=="loop"&&t%2===1?0:u.length-1;return!f||i===void 0?u[f]:i}const k4={decay:Vm,inertia:Vm,tween:ol,keyframes:ol,spring:jc};function Cw(e){typeof e.type=="string"&&(e.type=k4[e.type])}class Qp{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 w4=e=>e/100;class Wp extends Qp{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;Cw(t);const{type:n=ol,repeat:i=0,repeatDelay:o=0,repeatType:u,velocity:l=0}=t;let{keyframes:f}=t;const d=n||ol;d!==ol&&typeof f[0]!="number"&&(this.mixKeyframes=Al(w4,_w(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});u==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=Kp(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+o,this.totalDuration=this.resolvedDuration*(i+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:i,totalDuration:o,mixKeyframes:u,mirroredGenerator:l,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:p,repeat:y,repeatType:v,repeatDelay:b,type:E,onUpdate:T,finalKeyframe:A}=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),O=this.playbackSpeed>=0?j<0:j>o;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,P=i;if(y){const B=Math.min(this.currentTime,o)/f;let J=Math.floor(B),ue=B%1;!ue&&B>=1&&(ue=1),ue===1&&J--,J=Math.min(J,y+1),J%2&&(v==="reverse"?(ue=1-ue,b&&(ue-=b/f)):v==="mirror"&&(P=l)),w=wr(0,1,ue)*f}const D=O?{done:!1,value:p[0]}:P.next(w);u&&(D.value=u(D.value));let{done:L}=D;!O&&d!==null&&(L=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const Y=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return Y&&E!==Vm&&(D.value=Jp(p,this.options,A,this.speed)),T&&T(D.value),Y&&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=Kr(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 i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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 z4(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ya=e=>e*180/Math.PI,Zm=e=>{const t=ya(Math.atan2(e[1],e[0]));return Bm(t)},_4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Zm,rotateZ:Zm,skewX:e=>ya(Math.atan(e[1])),skewY:e=>ya(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bm=e=>(e=e%360,e<0&&(e+=360),e),C0=Zm,A0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),j0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),E4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:A0,scaleY:j0,scale:e=>(A0(e)+j0(e))/2,rotateX:e=>Bm(ya(Math.atan2(e[6],e[5]))),rotateY:e=>Bm(ya(Math.atan2(-e[2],e[0]))),rotateZ:C0,rotate:C0,skewX:e=>ya(Math.atan(e[4])),skewY:e=>ya(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Im(e){return e.includes("scale")?1:0}function Hm(e,t){if(!e||e==="none")return Im(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=E4,o=n;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=_4,o=f}if(!o)return Im(t);const u=i[t],l=o[1].split(",").map(C4);return typeof u=="function"?u(l):l[u]}const T4=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hm(n,t)};function C4(e){return parseFloat(e.trim())}const Ho=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fo=new Set(Ho),N0=e=>e===Io||e===me,A4=new Set(["x","y","z"]),j4=Ho.filter(e=>!A4.has(e));function N4(e){const t=[];return j4.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Ai={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})=>Hm(t,"x"),y:(e,{transform:t})=>Hm(t,"y")};Ai.translateX=Ai.x;Ai.translateY=Ai.y;const xa=new Set;let Fm=!1,qm=!1,Gm=!1;function Aw(){if(qm){const e=Array.from(xa).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const o=N4(i);o.length&&(n.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=n.get(i);o&&o.forEach(([u,l])=>{i.getValue(u)?.set(l)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}qm=!1,Fm=!1,xa.forEach(e=>e.complete(Gm)),xa.clear()}function jw(){xa.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qm=!0)})}function O4(){Gm=!0,jw(),Aw(),Gm=!1}class eg{constructor(t,n,i,o,u,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=o,this.element=u,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(xa.add(this),Fm||(Fm=!0,dt.read(jw),dt.resolveKeyframes(Aw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,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(i&&n){const f=i.readValue(n,l);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=l),o&&u===void 0&&o.set(t[0])}z4(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xa.delete(this)}cancel(){this.state==="scheduled"&&(xa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const R4=e=>e.startsWith("--");function M4(e,t,n){R4(t)?e.style.setProperty(t,n):e.style[t]=n}const D4=Bp(()=>window.ScrollTimeline!==void 0),$4={};function L4(e,t){const n=Bp(e);return()=>$4[t]??n()}const Nw=L4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),tl=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,O0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tl([0,.65,.55,1]),circOut:tl([.55,0,1,.45]),backIn:tl([.31,.01,.66,-.59]),backOut:tl([.33,1.53,.69,.99])};function Ow(e,t){if(e)return typeof e=="function"?Nw()?Ew(e,t):"ease-out":pw(e)?tl(e):Array.isArray(e)?e.map(n=>Ow(n,t)||O0.easeOut):O0[e]}function U4(e,t,n,{delay:i=0,duration:o=300,repeat:u=0,repeatType:l="loop",ease:f="easeOut",times:d}={},h=void 0){const p={[t]:n};d&&(p.offset=d);const y=Ow(f,o);Array.isArray(y)&&(p.easing=y);const v={delay:i,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:l==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(p,v)}function Rw(e){return typeof e=="function"&&"applyToOptions"in e}function P4({type:e,...t}){return Rw(e)&&Nw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class V4 extends Qp{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:o,pseudoElement:u,allowFlatten:l=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!u,this.allowFlatten=l,this.options=t,Zp(typeof t.type!="string");const h=P4(t);this.animation=U4(n,i,o,h,u),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const p=Jp(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(p):M4(n,i,p),this.animation.cancel()}d?.(),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=Kr(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&&D4()?(this.animation.timeline=t,rr):n(this)}}const Mw={anticipate:fw,backInOut:cw,circInOut:hw};function Z4(e){return e in Mw}function B4(e){typeof e.ease=="string"&&Z4(e.ease)&&(e.ease=Mw[e.ease])}const Fh=10;class I4 extends V4{constructor(t){B4(t),Cw(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:o,element:u,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const f=new Wp({...l,autoplay:!1}),d=Math.max(Fh,hn.now()-this.startTime),h=wr(0,Fh,d-Fh);n.setWithVelocity(f.sample(Math.max(0,d-h)).value,f.sample(d).value,h),f.stop()}}const R0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ri.test(e)||e==="0")&&!e.startsWith("url("));function H4(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 F4(e,t,n,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const u=e[e.length-1],l=R0(o,t),f=R0(u,t);return!l||!f?!1:H4(e)||(n==="spring"||Rw(n))&&i}function Ym(e){e.duration=0,e.type="keyframes"}const q4=new Set(["opacity","clipPath","filter","transform"]),G4=Bp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Y4(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:o,damping:u,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return G4()&&n&&q4.has(n)&&(n!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&u!==0&&l!=="inertia"}const X4=40;class K4 extends Qp{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:o=0,repeatDelay:u=0,repeatType:l="loop",keyframes:f,name:d,motionValue:h,element:p,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=hn.now();const v={autoplay:t,delay:n,type:i,repeat:o,repeatDelay:u,repeatType:l,name:d,motionValue:h,element:p,...y},b=p?.KeyframeResolver||eg;this.keyframeResolver=new b(f,(E,T,A)=>this.onKeyframesResolved(E,T,v,!A),d,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,o){this.keyframeResolver=void 0;const{name:u,type:l,velocity:f,delay:d,isHandoff:h,onUpdate:p}=i;this.resolvedAt=hn.now(),F4(t,u,l,f)||((Qr.instantAnimations||!d)&&p?.(Jp(t,i,n)),t[0]=t[t.length-1],Ym(i),i.repeat=0);const v={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>X4?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},b=!h&&Y4(v),E=v.motionValue?.owner?.current,T=b?new I4({...v,element:E}):new Wp(v);T.finished.then(()=>{this.notifyFinished()}).catch(rr),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}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(),O4()),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 Dw(e,t,n,i=0,o=1){const u=Array.from(e).sort((h,p)=>h.sortNodePosition(p)).indexOf(t),l=e.size,f=(l-1)*i;return typeof n=="function"?n(u,l):o===1?u*i:f-u*i}const J4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Q4(e){const t=J4.exec(e);if(!t)return[,];const[,n,i,o]=t;return[`--${n??i}`,o]}function $w(e,t,n=1){const[i,o]=Q4(e);if(!i)return;const u=window.getComputedStyle(t).getPropertyValue(i);if(u){const l=u.trim();return nw(l)?parseFloat(l):l}return qp(o)?$w(o,t,n+1):o}const W4={type:"spring",stiffness:500,damping:25,restSpeed:10},eO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),tO={type:"keyframes",duration:.8},nO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rO=(e,{keyframes:t})=>t.length>2?tO:Fo.has(e)?e.startsWith("scale")?eO(t[1]):W4:nO,iO=e=>e!==null;function aO(e,{repeat:t,repeatType:n="loop"},i){const o=e.filter(iO),u=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[u]}function tg(e,t){return e?.[t]??e?.default??e}function oO({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:o,repeat:u,repeatType:l,repeatDelay:f,from:d,elapsed:h,...p}){return!!Object.keys(p).length}const ng=(e,t,n,i={},o,u)=>l=>{const f=tg(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-Kr(d);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{l(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:u?void 0:o};oO(f)||Object.assign(p,rO(e,p)),p.duration&&(p.duration=Kr(p.duration)),p.repeatDelay&&(p.repeatDelay=Kr(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let y=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(Ym(p),p.delay===0&&(y=!0)),(Qr.instantAnimations||Qr.skipAnimations)&&(y=!0,Ym(p),p.delay=0),p.allowFlatten=!f.type&&!f.ease,y&&!u&&t.get()!==void 0){const v=aO(p.keyframes,f);if(v!==void 0){dt.update(()=>{p.onUpdate(v),p.onComplete()});return}}return f.isSync?new Wp(p):new K4(p)};function M0(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function rg(e,t,n,i){if(typeof t=="function"){const[o,u]=M0(i);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]=M0(i);t=t(n!==void 0?n:e.custom,o,u)}return t}function Eo(e,t,n){const i=e.getProps();return rg(i,t,n!==void 0?n:i.custom,e)}const Lw=new Set(["width","height","top","left","right","bottom",...Ho]),D0=30,sO=e=>!isNaN(parseFloat(e));class lO{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=hn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),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=sO(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 Ip);const i=this.events[t].add(n);return t==="change"?()=>{i(),dt.read(()=>{this.events.change.getSize()||this.stop()})}:i}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,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}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>D0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,D0);return aw(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 Oo(e,t){return new lO(e,t)}const Xm=e=>Array.isArray(e);function uO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Oo(n))}function cO(e){return Xm(e)?e[e.length-1]||0:e}function fO(e,t){const n=Eo(e,t);let{transitionEnd:i={},transition:o={},...u}=n||{};u={...u,...i};for(const l in u){const f=cO(u[l]);uO(e,l,f)}}const rn=e=>!!(e&&e.getVelocity);function dO(e){return!!(rn(e)&&e.add)}function Km(e,t){const n=e.getValue("willChange");if(dO(n))return n.add(t);if(!n&&Qr.WillChange){const i=new Qr.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function ig(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const hO="framerAppearId",Uw="data-"+ig(hO);function Pw(e){return e.props[Uw]}function mO({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Vw(e,t,{delay:n=0,transitionOverride:i,type:o}={}){let{transition:u=e.getDefaultTransition(),transitionEnd:l,...f}=t;const d=u?.reduceMotion;i&&(u=i);const h=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const y in f){const v=e.getValue(y,e.latestValues[y]??null),b=f[y];if(b===void 0||p&&mO(p,y))continue;const E={delay:n,...tg(u||{},y)},T=v.get();if(T!==void 0&&!v.isAnimating&&!Array.isArray(b)&&b===T&&!E.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const w=Pw(e);if(w){const P=window.MotionHandoffAnimation(w,y,dt);P!==null&&(E.startTime=P,A=!0)}}Km(e,y);const j=d??e.shouldReduceMotion;v.start(ng(y,v,b,j&&Lw.has(y)?{type:!1}:E,e,A));const O=v.animation;O&&h.push(O)}return l&&Promise.all(h).then(()=>{dt.update(()=>{l&&fO(e,l)})}),h}function Jm(e,t,n={}){const i=Eo(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const u=i?()=>Promise.all(Vw(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:y}=o;return pO(e,t,d,h,p,y,n)}:()=>Promise.resolve(),{when:f}=o;if(f){const[d,h]=f==="beforeChildren"?[u,l]:[l,u];return d().then(()=>h())}else return Promise.all([u(),l(n.delay)])}function pO(e,t,n=0,i=0,o=0,u=1,l){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(Jm(d,t,{...l,delay:n+(typeof i=="function"?0:i)+Dw(e.variantChildren,d,i,o,u)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function gO(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(u=>Jm(e,u,n));i=Promise.all(o)}else if(typeof t=="string")i=Jm(e,t,n);else{const o=typeof t=="function"?Eo(e,t,n.custom):t;i=Promise.all(Vw(e,o,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const yO={test:e=>e==="auto",parse:e=>e},Zw=e=>t=>t.test(e),Bw=[Io,me,kr,Ci,HN,IN,yO],$0=e=>Bw.find(Zw(e));function xO(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||iw(e):!0}const vO=new Set(["brightness","contrast","saturate","opacity"]);function bO(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Gp)||[];if(!i)return e;const o=n.replace(i,"");let u=vO.has(t)?1:0;return i!==n&&(u*=100),t+"("+u+o+")"}const SO=/\b([a-z-]*)\(.*?\)/gu,Qm={...Ri,getAnimatableNone:e=>{const t=e.match(SO);return t?t.map(bO).join(" "):e}},L0={...Io,transform:Math.round},kO={rotate:Ci,rotateX:Ci,rotateY:Ci,rotateZ:Ci,scale:tc,scaleX:tc,scaleY:tc,scaleZ:tc,skew:Ci,skewX:Ci,skewY:Ci,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:gl,originX:w0,originY:w0,originZ:me},ag={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,inset:me,insetBlock:me,insetBlockStart:me,insetBlockEnd:me,insetInline:me,insetInlineStart:me,insetInlineEnd:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,paddingBlock:me,paddingBlockStart:me,paddingBlockEnd:me,paddingInline:me,paddingInlineStart:me,paddingInlineEnd:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,marginBlock:me,marginBlockStart:me,marginBlockEnd:me,marginInline:me,marginInlineStart:me,marginInlineEnd:me,fontSize:me,backgroundPositionX:me,backgroundPositionY:me,...kO,zIndex:L0,fillOpacity:gl,strokeOpacity:gl,numOctaves:L0},wO={...ag,color:Dt,backgroundColor:Dt,outlineColor:Dt,fill:Dt,stroke:Dt,borderColor:Dt,borderTopColor:Dt,borderRightColor:Dt,borderBottomColor:Dt,borderLeftColor:Dt,filter:Qm,WebkitFilter:Qm},Iw=e=>wO[e];function Hw(e,t){let n=Iw(e);return n!==Qm&&(n=Ri),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zO=new Set(["auto","none","0"]);function _O(e,t,n){let i=0,o;for(;i<e.length&&!o;){const u=e[i];typeof u=="string"&&!zO.has(u)&&yl(u).values.length&&(o=e[i]),i++}if(o&&n)for(const u of t)e[u]=Hw(n,o)}class EO extends eg{constructor(t,n,i,o,u){super(t,n,i,o,u,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let p=0;p<t.length;p++){let y=t[p];if(typeof y=="string"&&(y=y.trim(),qp(y))){const v=$w(y,n.current);v!==void 0&&(t[p]=v),p===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!Lw.has(i)||t.length!==2)return;const[o,u]=t,l=$0(o),f=$0(u),d=k0(o),h=k0(u);if(d!==h&&Ai[i]){this.needsMeasurement=!0;return}if(l!==f)if(N0(l)&&N0(f))for(let p=0;p<t.length;p++){const y=t[p];typeof y=="string"&&(t[p]=parseFloat(y))}else Ai[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||xO(t[o]))&&i.push(o);i.length&&_O(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ai[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const u=i.length-1,l=i[u];i[u]=Ai[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function TO(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=n?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(i=>i!=null)}const Fw=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Wm(e){return rw(e)&&"offsetHeight"in e}const{schedule:og}=gw(queueMicrotask,!1),fr={x:!1,y:!1};function qw(){return fr.x||fr.y}function CO(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 Gw(e,t){const n=TO(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[n,o,()=>i.abort()]}function U0(e){return!(e.pointerType==="touch"||qw())}function AO(e,t,n={}){const[i,o,u]=Gw(e,n),l=f=>{if(!U0(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const p=y=>{U0(y)&&(h(y),d.removeEventListener("pointerleave",p))};d.addEventListener("pointerleave",p,o)};return i.forEach(f=>{f.addEventListener("pointerenter",l,o)}),u}const Yw=(e,t)=>t?e===t?!0:Yw(e,t.parentElement):!1,sg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Xw(e){return jO.has(e.tagName)||e.isContentEditable===!0}const bc=new WeakSet;function P0(e){return t=>{t.key==="Enter"&&e(t)}}function qh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const NO=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=P0(()=>{if(bc.has(n))return;qh(n,"down");const o=P0(()=>{qh(n,"up")}),u=()=>qh(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",u,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function V0(e){return sg(e)&&!qw()}function OO(e,t,n={}){const[i,o,u]=Gw(e,n),l=f=>{const d=f.currentTarget;if(!V0(f))return;bc.add(d);const h=t(d,f),p=(b,E)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),bc.has(d)&&bc.delete(d),V0(b)&&typeof h=="function"&&h(b,{success:E})},y=b=>{p(b,d===window||d===document||n.useGlobalTarget||Yw(d,b.target))},v=b=>{p(b,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",v,o)};return i.forEach(f=>{(n.useGlobalTarget?window:f).addEventListener("pointerdown",l,o),Wm(f)&&(f.addEventListener("focus",h=>NO(h,o)),!Xw(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),u}function Kw(e){return rw(e)&&"ownerSVGElement"in e}function RO(e){return Kw(e)&&e.tagName==="svg"}const MO=[...Bw,Dt,Ri],DO=e=>MO.find(Zw(e)),Z0=()=>({translate:0,scale:1,origin:0,originPoint:0}),xo=()=>({x:Z0(),y:Z0()}),B0=()=>({min:0,max:0}),It=()=>({x:B0(),y:B0()}),ep={current:null},Jw={current:!1},$O=typeof window<"u";function LO(){if(Jw.current=!0,!!$O)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ep.current=e.matches;e.addEventListener("change",t),t()}else ep.current=!1}const UO=new WeakMap;function Kc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function xl(e){return typeof e=="string"||Array.isArray(e)}const lg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ug=["initial",...lg];function Jc(e){return Kc(e.animate)||ug.some(t=>xl(e[t]))}function Qw(e){return!!(Jc(e)||e.variants)}function PO(e,t,n){for(const i in t){const o=t[i],u=n[i];if(rn(o))e.addValue(i,o);else if(rn(u))e.addValue(i,Oo(o,{owner:e}));else if(u!==o)if(e.hasValue(i)){const l=e.getValue(i);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(i);e.addValue(i,Oo(l!==void 0?l:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const I0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Nc={};function Ww(e){Nc=e}function VO(){return Nc}class ZO{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:u,visualState:l},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eg,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 v=hn.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,dt.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=f,this.blockInitialAnimation=!!u,this.isControllingVariants=Jc(n),this.isVariantNode=Qw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in y){const b=y[v];d[v]!==void 0&&rn(b)&&b.set(d[v])}}mount(t){this.current=t,UO.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,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Jw.current||LO(),this.shouldReduceMotion=ep.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Oi(this.notifyUpdate),Oi(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 i=Fo.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&dt.preRender(this.notifyUpdate),i&&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 Nc){const n=Nc[t];if(!n)continue;const{isEnabled:i,Feature:o}=n;if(!this.features[t]&&o&&i(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):It()}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 i=0;i<I0.length;i++){const o=I0[i];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=PO(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 i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Oo(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(nw(i)||iw(i))?i=parseFloat(i):!DO(i)&&Ri.test(n)&&(i=Hw(t,n)),this.setBaseTarget(t,rn(i)?i.get():i)),rn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const u=rg(this.props,n,this.presenceContext?.custom);u&&(i=u[t])}if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!rn(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ip),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){og.render(this.render)}}class ez extends ZO{constructor(){super(...arguments),this.KeyframeResolver=EO}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;rn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class $i{constructor(t){this.isMounted=!1,this.node=t}update(){}}function tz({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function BO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IO(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Gh(e){return e===void 0||e===1}function tp({scale:e,scaleX:t,scaleY:n}){return!Gh(e)||!Gh(t)||!Gh(n)}function ha(e){return tp(e)||nz(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nz(e){return H0(e.x)||H0(e.y)}function H0(e){return e&&e!=="0%"}function Oc(e,t,n){const i=e-n,o=t*i;return n+o}function F0(e,t,n,i,o){return o!==void 0&&(e=Oc(e,o,i)),Oc(e,n,i)+t}function np(e,t=0,n=1,i,o){e.min=F0(e.min,t,n,i,o),e.max=F0(e.max,t,n,i,o)}function rz(e,{x:t,y:n}){np(e.x,t.translate,t.scale,t.originPoint),np(e.y,n.translate,n.scale,n.originPoint)}const q0=.999999999999,G0=1.0000000000001;function HO(e,t,n,i=!1){const o=n.length;if(!o)return;t.x=t.y=1;let u,l;for(let f=0;f<o;f++){u=n[f],l=u.projectionDelta;const{visualElement:d}=u.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&u.options.layoutScroll&&u.scroll&&u!==u.root&&bo(e,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,rz(e,l)),i&&ha(u.latestValues)&&bo(e,u.latestValues))}t.x<G0&&t.x>q0&&(t.x=1),t.y<G0&&t.y>q0&&(t.y=1)}function vo(e,t){e.min=e.min+t,e.max=e.max+t}function Y0(e,t,n,i,o=.5){const u=xt(e.min,e.max,o);np(e,t,n,u,i)}function bo(e,t){Y0(e.x,t.x,t.scaleX,t.scale,t.originX),Y0(e.y,t.y,t.scaleY,t.scale,t.originY)}function iz(e,t){return tz(IO(e.getBoundingClientRect(),t))}function FO(e,t,n){const i=iz(e,n),{scroll:o}=t;return o&&(vo(i.x,o.offset.x),vo(i.y,o.offset.y)),i}const qO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},GO=Ho.length;function YO(e,t,n){let i="",o=!0;for(let u=0;u<GO;u++){const l=Ho[u],f=e[l];if(f===void 0)continue;let d=!0;if(typeof f=="number")d=f===(l.startsWith("scale")?1:0);else{const h=parseFloat(f);d=l.startsWith("scale")?h===1:h===0}if(!d||n){const h=Fw(f,ag[l]);if(!d){o=!1;const p=qO[l]||l;i+=`${p}(${h}) `}n&&(t[l]=h)}}return i=i.trim(),n?i=n(t,o?"":i):o&&(i="none"),i}function cg(e,t,n){const{style:i,vars:o,transformOrigin:u}=e;let l=!1,f=!1;for(const d in t){const h=t[d];if(Fo.has(d)){l=!0;continue}else if(xw(d)){o[d]=h;continue}else{const p=Fw(h,ag[d]);d.startsWith("origin")?(f=!0,u[d]=p):i[d]=p}}if(t.transform||(l||n?i.transform=YO(t,e.transform,n):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:p=0}=u;i.transformOrigin=`${d} ${h} ${p}`}}function az(e,{style:t,vars:n},i,o){const u=e.style;let l;for(l in t)u[l]=t[l];o?.applyProjectionStyles(u,i);for(l in n)u.setProperty(l,n[l])}function X0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const n=X0(e,t.target.x),i=X0(e,t.target.y);return`${n}% ${i}%`}},XO={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,o=Ri.parse(e);if(o.length>5)return i;const u=Ri.createTransformer(e),l=typeof o[0]!="number"?1:0,f=n.x.scale*t.x,d=n.y.scale*t.y;o[0+l]/=f,o[1+l]/=d;const h=xt(f,d,.5);return typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h),u(o)}},rp={borderRadius:{...Gs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gs,borderTopRightRadius:Gs,borderBottomLeftRadius:Gs,borderBottomRightRadius:Gs,boxShadow:XO};function oz(e,{layout:t,layoutId:n}){return Fo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!rp[e]||e==="opacity")}function fg(e,t,n){const i=e.style,o=t?.style,u={};if(!i)return u;for(const l in i)(rn(i[l])||o&&rn(o[l])||oz(l,e)||n?.getValue(l)?.liveStyle!==void 0)&&(u[l]=i[l]);return u}function KO(e){return window.getComputedStyle(e)}class JO extends ez{constructor(){super(...arguments),this.type="html",this.renderInstance=az}readValueFromInstance(t,n){if(Fo.has(n))return this.projection?.isProjecting?Im(n):T4(t,n);{const i=KO(t),o=(xw(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return iz(t,n)}build(t,n,i){cg(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return fg(t,n,i)}}const QO={offset:"stroke-dashoffset",array:"stroke-dasharray"},WO={offset:"strokeDashoffset",array:"strokeDasharray"};function eR(e,t,n=1,i=0,o=!0){e.pathLength=1;const u=o?QO:WO;e[u.offset]=`${-i}`,e[u.array]=`${t} ${n}`}const tR=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function sz(e,{attrX:t,attrY:n,attrScale:i,pathLength:o,pathSpacing:u=1,pathOffset:l=0,...f},d,h,p){if(cg(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=p?.transformBox??"fill-box",delete y.transformBox);for(const b of tR)y[b]!==void 0&&(v[b]=y[b],delete y[b]);t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),i!==void 0&&(y.scale=i),o!==void 0&&eR(y,o,u,l,!1)}const lz=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"]),uz=e=>typeof e=="string"&&e.toLowerCase()==="svg";function nR(e,t,n,i){az(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(lz.has(o)?o:ig(o),t.attrs[o])}function cz(e,t,n){const i=fg(e,t,n);for(const o in e)if(rn(e[o])||rn(t[o])){const u=Ho.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[u]=e[o]}return i}class rR extends ez{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=It}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fo.has(n)){const i=Iw(n);return i&&i.default||0}return n=lz.has(n)?n:ig(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return cz(t,n,i)}build(t,n,i){sz(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,o){nR(t,n,i,o)}mount(t){this.isSVGTag=uz(t.tagName),super.mount(t)}}const iR=ug.length;function fz(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?fz(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<iR;n++){const i=ug[n],o=e.props[i];(xl(o)||o===!1)&&(t[i]=o)}return t}function dz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const aR=[...lg].reverse(),oR=lg.length;function sR(e){return t=>Promise.all(t.map(({animation:n,options:i})=>gO(e,n,i)))}function lR(e){let t=sR(e),n=K0(),i=!0;const o=d=>(h,p)=>{const y=Eo(e,p,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:v,transitionEnd:b,...E}=y;h={...h,...E,...b}}return h};function u(d){t=d(e)}function l(d){const{props:h}=e,p=fz(e.parent)||{},y=[],v=new Set;let b={},E=1/0;for(let A=0;A<oR;A++){const j=aR[A],O=n[j],w=h[j]!==void 0?h[j]:p[j],P=xl(w),D=j===d?O.isActive:null;D===!1&&(E=A);let L=w===p[j]&&w!==h[j]&&P;if(L&&i&&e.manuallyAnimateOnMount&&(L=!1),O.protectedKeys={...b},!O.isActive&&D===null||!w&&!O.prevProp||Kc(w)||typeof w=="boolean")continue;const Y=uR(O.prevProp,w);let B=Y||j===d&&O.isActive&&!L&&P||A>E&&P,J=!1;const ue=Array.isArray(w)?w:[w];let $=ue.reduce(o(j),{});D===!1&&($={});const{prevResolvedValues:ie={}}=O,ve={...ie,...$},se=X=>{B=!0,v.has(X)&&(J=!0,v.delete(X)),O.needsAnimating[X]=!0;const Z=e.getValue(X);Z&&(Z.liveStyle=!1)};for(const X in ve){const Z=$[X],ce=ie[X];if(b.hasOwnProperty(X))continue;let N=!1;Xm(Z)&&Xm(ce)?N=!dz(Z,ce):N=Z!==ce,N?Z!=null?se(X):v.add(X):Z!==void 0&&v.has(X)?se(X):O.protectedKeys[X]=!0}O.prevProp=w,O.prevResolvedValues=$,O.isActive&&(b={...b,...$}),i&&e.blockInitialAnimation&&(B=!1);const ne=L&&Y;B&&(!ne||J)&&y.push(...ue.map(X=>{const Z={type:j};if(typeof X=="string"&&i&&!ne&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,N=Eo(ce,X);if(ce.enteringChildren&&N){const{delayChildren:C}=N.transition||{};Z.delay=Dw(ce.enteringChildren,e,C)}}return{animation:X,options:Z}}))}if(v.size){const A={};if(typeof h.initial!="boolean"){const j=Eo(e,Array.isArray(h.initial)?h.initial[0]:h.initial);j&&j.transition&&(A.transition=j.transition)}v.forEach(j=>{const O=e.getBaseTarget(j),w=e.getValue(j);w&&(w.liveStyle=!0),A[j]=O??null}),y.push({animation:A})}let T=!!y.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,T?t(y):Promise.resolve()}function f(d,h){if(n[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(d,h)),n[d].isActive=h;const p=l(d);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:l,setActive:f,setAnimateFunction:u,getState:()=>n,reset:()=>{n=K0()}}}function uR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!dz(t,e):!1}function sa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function K0(){return{animate:sa(!0),whileInView:sa(),whileHover:sa(),whileTap:sa(),whileDrag:sa(),whileFocus:sa(),exit:sa()}}function J0(e,t){e.min=t.min,e.max=t.max}function cr(e,t){J0(e.x,t.x),J0(e.y,t.y)}function Q0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const hz=1e-4,cR=1-hz,fR=1+hz,mz=.01,dR=0-mz,hR=0+mz;function mn(e){return e.max-e.min}function mR(e,t,n){return Math.abs(e-t)<=n}function W0(e,t,n,i=.5){e.origin=i,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>=cR&&e.scale<=fR||isNaN(e.scale))&&(e.scale=1),(e.translate>=dR&&e.translate<=hR||isNaN(e.translate))&&(e.translate=0)}function sl(e,t,n,i){W0(e.x,t.x,n.x,i?i.originX:void 0),W0(e.y,t.y,n.y,i?i.originY:void 0)}function e1(e,t,n){e.min=n.min+t.min,e.max=e.min+mn(t)}function pR(e,t,n){e1(e.x,t.x,n.x),e1(e.y,t.y,n.y)}function t1(e,t,n){e.min=t.min-n.min,e.max=e.min+mn(t)}function Rc(e,t,n){t1(e.x,t.x,n.x),t1(e.y,t.y,n.y)}function n1(e,t,n,i,o){return e-=t,e=Oc(e,1/n,i),o!==void 0&&(e=Oc(e,1/o,i)),e}function gR(e,t=0,n=1,i=.5,o,u=e,l=e){if(kr.test(t)&&(t=parseFloat(t),t=xt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let f=xt(u.min,u.max,i);e===u&&(f-=t),e.min=n1(e.min,t,n,f,o),e.max=n1(e.max,t,n,f,o)}function r1(e,t,[n,i,o],u,l){gR(e,t[n],t[i],t[o],t.scale,u,l)}const yR=["x","scaleX","originX"],xR=["y","scaleY","originY"];function i1(e,t,n,i){r1(e.x,t,yR,n?n.x:void 0,i?i.x:void 0),r1(e.y,t,xR,n?n.y:void 0,i?i.y:void 0)}function a1(e){return e.translate===0&&e.scale===1}function pz(e){return a1(e.x)&&a1(e.y)}function o1(e,t){return e.min===t.min&&e.max===t.max}function vR(e,t){return o1(e.x,t.x)&&o1(e.y,t.y)}function s1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gz(e,t){return s1(e.x,t.x)&&s1(e.y,t.y)}function l1(e){return mn(e.x)/mn(e.y)}function u1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qn(e){return[e("x"),e("y")]}function bR(e,t,n){let i="";const o=e.x.translate/t.x,u=e.y.translate/t.y,l=n?.z||0;if((o||u||l)&&(i=`translate3d(${o}px, ${u}px, ${l}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:p,rotateX:y,rotateY:v,skewX:b,skewY:E}=n;h&&(i=`perspective(${h}px) ${i}`),p&&(i+=`rotate(${p}deg) `),y&&(i+=`rotateX(${y}deg) `),v&&(i+=`rotateY(${v}deg) `),b&&(i+=`skewX(${b}deg) `),E&&(i+=`skewY(${E}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const yz=["TopLeft","TopRight","BottomLeft","BottomRight"],SR=yz.length,c1=e=>typeof e=="string"?parseFloat(e):e,f1=e=>typeof e=="number"||me.test(e);function kR(e,t,n,i,o,u){o?(e.opacity=xt(0,n.opacity??1,wR(i)),e.opacityExit=xt(t.opacity??1,0,zR(i))):u&&(e.opacity=xt(t.opacity??1,n.opacity??1,i));for(let l=0;l<SR;l++){const f=`border${yz[l]}Radius`;let d=d1(t,f),h=d1(n,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||f1(d)===f1(h)?(e[f]=Math.max(xt(c1(d),c1(h),i),0),(kr.test(h)||kr.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||n.rotate)&&(e.rotate=xt(t.rotate||0,n.rotate||0,i))}function d1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const wR=xz(0,.5,dw),zR=xz(.5,.95,rr);function xz(e,t,n){return i=>i<e?0:i>t?1:n(pl(e,t,i))}function _R(e,t,n){const i=rn(e)?e:Oo(e);return i.start(ng("",i,t,n)),i.animation}function vl(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const ER=(e,t)=>e.depth-t.depth;class TR{constructor(){this.children=[],this.isDirty=!1}add(t){Pp(this.children,t),this.isDirty=!0}remove(t){Vp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ER),this.isDirty=!1,this.children.forEach(t)}}function CR(e,t){const n=hn.now(),i=({timestamp:o})=>{const u=o-n;u>=t&&(Oi(i),e(u-t))};return dt.setup(i,!0),()=>Oi(i)}function Sc(e){return rn(e)?e.get():e}class AR{constructor(){this.members=[]}add(t){Pp(this.members,t),t.scheduleRender()}remove(t){if(Vp(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 i;for(let o=n;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1){i=u;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const o=i.options.layoutDependency,u=t.options.layoutDependency;o!==void 0&&u!==void 0&&o===u||(t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:f}=t.options;f===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const kc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Yh=["","X","Y","Z"],jR=1e3;let NR=0;function Xh(e,t,n,i){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function vz(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Pw(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:u}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",dt,!(o||u))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&vz(i)}function bz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(l={},f=t?.()){this.id=NR++,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(MR),this.nodes.forEach(UR),this.nodes.forEach(PR),this.nodes.forEach(DR)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new TR)}addEventListener(l,f){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Ip),this.eventHandlers.get(l).add(f)}notifyListeners(l,...f){const d=this.eventHandlers.get(l);d&&d.notify(...f)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=Kw(l)&&!RO(l),this.instance=l;const{layoutId:f,layout:d,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&&(d||f)&&(this.isLayoutDirty=!0),e){let p,y=0;const v=()=>this.root.updateBlockedByResize=!1;dt.read(()=>{y=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==y&&(y=b,this.root.updateBlockedByResize=!0,p&&p(),p=CR(v,250),kc.hasAnimatedSinceResize&&(kc.hasAnimatedSinceResize=!1,this.nodes.forEach(p1)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||h.getDefaultTransition()||HR,{onLayoutAnimationStart:T,onLayoutAnimationComplete:A}=h.getProps(),j=!this.targetLayout||!gz(this.targetLayout,b),O=!y&&v;if(this.options.layoutRoot||this.resumeFrom||O||y&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...tg(E,"layout"),onPlay:T,onComplete:A};(h.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(p,O)}else y||p1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}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(),Oi(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(VR),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&&vz(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const y=this.path[p];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)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(h1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(m1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(LR),this.nodes.forEach(OR),this.nodes.forEach(RR)):this.nodes.forEach(m1),this.clearAllSnapshots();const f=hn.now();Wt.delta=wr(0,1e3/60,f-Wt.timestamp),Wt.timestamp=f,Wt.isProcessing=!0,Vh.update.process(Wt),Vh.preRender.process(Wt),Vh.render.process(Wt),Wt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,og.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($R),this.sharedNodes.forEach(ZR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dt.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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=It(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!pz(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;l&&this.instance&&(f||ha(this.latestValues)||p)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return l&&(d=this.removeTransform(d)),FR(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return It();const f=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(qR))){const{scroll:h}=this.root;h&&(vo(f.x,h.offset.x),vo(f.y,h.offset.y))}return f}removeElementScroll(l){const f=It();if(cr(f,l),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:p,options:y}=h;h!==this.root&&p&&y.layoutScroll&&(p.wasRoot&&cr(f,l),vo(f.x,p.offset.x),vo(f.y,p.offset.y))}return f}applyTransform(l,f=!1){const d=It();cr(d,l);for(let h=0;h<this.path.length;h++){const p=this.path[h];!f&&p.options.layoutScroll&&p.scroll&&p!==p.root&&bo(d,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),ha(p.latestValues)&&bo(d,p.latestValues)}return ha(this.latestValues)&&bo(d,this.latestValues),d}removeTransform(l){const f=It();cr(f,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!ha(h.latestValues))continue;tp(h.latestValues)&&h.updateSnapshot();const p=It(),y=h.measurePageBox();cr(p,y),i1(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,p)}return ha(this.latestValues)&&i1(f,this.latestValues),f}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!==Wt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:y}=this.options;if(!this.layout||!(p||y))return;this.resolvedRelativeTargetAt=Wt.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=It(),this.targetWithTransforms=It()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):cr(this.target,this.layout.layoutBox),rz(this.target,this.targetDelta)):cr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||tp(this.parent.latestValues)||nz(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,f,d){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=It(),this.relativeTargetOrigin=It(),Rc(this.relativeTargetOrigin,f,d),cr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),f=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Wt.timestamp&&(d=!1),d)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;cr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;HO(this.layoutCorrected,this.treeScale,this.path,f),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=It());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Q0(this.prevProjectionDelta.x,this.projectionDelta.x),Q0(this.prevProjectionDelta.y,this.projectionDelta.y)),sl(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!u1(this.projectionDelta.x,this.prevProjectionDelta.x)||!u1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xo(),this.projectionDelta=xo(),this.projectionDeltaWithTransform=xo()}setAnimationOrigin(l,f=!1){const d=this.snapshot,h=d?d.latestValues:{},p={...this.latestValues},y=xo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=It(),b=d?d.source:void 0,E=this.layout?this.layout.source:void 0,T=b!==E,A=this.getStack(),j=!A||A.members.length<=1,O=!!(T&&!j&&this.options.crossfade===!0&&!this.path.some(IR));this.animationProgress=0;let w;this.mixTargetDelta=P=>{const D=P/1e3;g1(y.x,l.x,D),g1(y.y,l.y,D),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rc(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),BR(this.relativeTarget,this.relativeTargetOrigin,v,D),w&&vR(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=It()),cr(w,this.relativeTarget)),T&&(this.animationValues=p,kR(p,h,this.latestValues,D,O,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&&(Oi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dt.update(()=>{kc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Oo(0)),this.currentAnimation=_R(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),l.onUpdate&&l.onUpdate(f)},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(jR),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:p}=l;if(!(!f||!d||!h)){if(this!==l&&this.layout&&h&&Sz(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||It();const y=mn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+y;const v=mn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+v}cr(f,d),bo(f,p),sl(this.projectionDeltaWithTransform,this.layoutCorrected,f,p)}}registerSharedNode(l,f){this.sharedNodes.has(l)||this.sharedNodes.set(l,new AR),this.sharedNodes.get(l).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):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:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let f=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&Xh("z",l,h,this.animationValues);for(let p=0;p<Yh.length;p++)Xh(`rotate${Yh[p]}`,l,h,this.animationValues),Xh(`skew${Yh[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,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=Sc(f?.pointerEvents)||"",l.transform=d?d(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=Sc(f?.pointerEvents)||""),this.hasProjected&&!ha(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=bR(this.projectionDeltaWithTransform,this.treeScale,p);d&&(y=d(p,y)),l.transform=y;const{x:v,y:b}=this.projectionDelta;l.transformOrigin=`${v.origin*100}% ${b.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 E in rp){if(p[E]===void 0)continue;const{correct:T,applyTo:A,isCSSVariable:j}=rp[E],O=y==="none"?p[E]:T(p[E],h);if(A){const w=A.length;for(let P=0;P<w;P++)l[A[P]]=O}else j?this.options.visualElement.renderState.vars[E]=O:l[E]=O}this.options.layoutId&&(l.pointerEvents=h===this?Sc(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(h1),this.root.sharedNodes.clear()}}}function OR(e){e.updateLayout()}function RR(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:o}=e.options,u=t.source!==e.layout.source;o==="size"?Qn(p=>{const y=u?t.measuredBox[p]:t.layoutBox[p],v=mn(y);y.min=n[p].min,y.max=y.min+v}):Sz(o,t.layoutBox,n)&&Qn(p=>{const y=u?t.measuredBox[p]:t.layoutBox[p],v=mn(n[p]);y.max=y.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+v)});const l=xo();sl(l,n,t.layoutBox);const f=xo();u?sl(f,e.applyTransform(i,!0),t.measuredBox):sl(f,n,t.layoutBox);const d=!pz(l);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:y,layout:v}=p;if(y&&v){const b=It();Rc(b,t.layoutBox,y.layoutBox);const E=It();Rc(E,n,v.layoutBox),gz(b,E)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=b,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:f,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function MR(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 DR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $R(e){e.clearSnapshot()}function h1(e){e.clearMeasurements()}function m1(e){e.isLayoutDirty=!1}function LR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function p1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function UR(e){e.resolveTargetDelta()}function PR(e){e.calcProjection()}function VR(e){e.resetSkewAndRotation()}function ZR(e){e.removeLeadSnapshot()}function g1(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 y1(e,t,n,i){e.min=xt(t.min,n.min,i),e.max=xt(t.max,n.max,i)}function BR(e,t,n,i){y1(e.x,t.x,n.x,i),y1(e.y,t.y,n.y,i)}function IR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const HR={duration:.45,ease:[.4,0,.1,1]},x1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),v1=x1("applewebkit/")&&!x1("chrome/")?Math.round:rr;function b1(e){e.min=v1(e.min),e.max=v1(e.max)}function FR(e){b1(e.x),b1(e.y)}function Sz(e,t,n){return e==="position"||e==="preserve-aspect"&&!mR(l1(t),l1(n),.2)}function qR(e){return e!==e.root&&e.scroll?.wasRoot}const GR=bz({attachResizeListener:(e,t)=>vl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Kh={current:void 0},kz=bz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Kh.current){const e=new GR({});e.mount(window),e.setOptions({layoutScroll:!0}),Kh.current=e}return Kh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dg=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function S1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function YR(...e){return t=>{let n=!1;const i=e.map(o=>{const u=S1(o,t);return!n&&typeof u=="function"&&(n=!0),u});if(n)return()=>{for(let o=0;o<i.length;o++){const u=i[o];typeof u=="function"?u():S1(e[o],null)}}}}function XR(...e){return _.useCallback(YR(...e),e)}class KR extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,o=Wm(i)&&i.offsetWidth||0,u=Wm(i)&&i.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 JR({children:e,isPresent:t,anchorX:n,anchorY:i,root:o}){const u=_.useId(),l=_.useRef(null),f=_.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=_.useContext(dg),h=e.props?.ref??e?.ref,p=XR(l,h);return _.useInsertionEffect(()=>{const{width:y,height:v,top:b,left:E,right:T,bottom:A}=f.current;if(t||!l.current||!y||!v)return;const j=n==="left"?`left: ${E}`:`right: ${T}`,O=i==="bottom"?`bottom: ${A}`:`top: ${b}`;l.current.dataset.motionPopId=u;const w=document.createElement("style");d&&(w.nonce=d);const P=o??document.head;return P.appendChild(w),w.sheet&&w.sheet.insertRule(`
|
|
12
|
+
[data-motion-pop-id="${u}"] {
|
|
13
|
+
position: absolute !important;
|
|
14
|
+
width: ${y}px !important;
|
|
15
|
+
height: ${v}px !important;
|
|
16
|
+
${j}px !important;
|
|
17
|
+
${O}px !important;
|
|
18
|
+
}
|
|
19
|
+
`),()=>{P.contains(w)&&P.removeChild(w)}},[t]),x.jsx(KR,{isPresent:t,childRef:l,sizeRef:f,children:_.cloneElement(e,{ref:p})})}const QR=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:o,presenceAffectsLayout:u,mode:l,anchorX:f,anchorY:d,root:h})=>{const p=Up(WR),y=_.useId();let v=!0,b=_.useMemo(()=>(v=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:E=>{p.set(E,!0);for(const T of p.values())if(!T)return;i&&i()},register:E=>(p.set(E,!1),()=>p.delete(E))}),[n,p,i]);return u&&v&&(b={...b}),_.useMemo(()=>{p.forEach((E,T)=>p.set(T,!1))},[n]),_.useEffect(()=>{!n&&!p.size&&i&&i()},[n]),l==="popLayout"&&(e=x.jsx(JR,{isPresent:n,anchorX:f,anchorY:d,root:h,children:e})),x.jsx(Xc.Provider,{value:b,children:e})};function WR(){return new Map}function wz(e=!0){const t=_.useContext(Xc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:o}=t,u=_.useId();_.useEffect(()=>{if(e)return o(u)},[e]);const l=_.useCallback(()=>e&&i&&i(u),[u,i,e]);return!n&&i?[!1,l]:[!0]}const nc=e=>e.key||"";function k1(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const eM=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:u="sync",propagate:l=!1,anchorX:f="left",anchorY:d="top",root:h})=>{const[p,y]=wz(l),v=_.useMemo(()=>k1(e),[e]),b=l&&!p?[]:v.map(nc),E=_.useRef(!0),T=_.useRef(v),A=Up(()=>new Map),j=_.useRef(new Set),[O,w]=_.useState(v),[P,D]=_.useState(v);tw(()=>{E.current=!1,T.current=v;for(let B=0;B<P.length;B++){const J=nc(P[B]);b.includes(J)?(A.delete(J),j.current.delete(J)):A.get(J)!==!0&&A.set(J,!1)}},[P,b.length,b.join("-")]);const L=[];if(v!==O){let B=[...v];for(let J=0;J<P.length;J++){const ue=P[J],$=nc(ue);b.includes($)||(B.splice(J,0,ue),L.push(ue))}return u==="wait"&&L.length&&(B=L),D(k1(B)),w(v),null}const{forceRender:Y}=_.useContext(Lp);return x.jsx(x.Fragment,{children:P.map(B=>{const J=nc(B),ue=l&&!p?!1:v===P||b.includes(J),$=()=>{if(j.current.has(J))return;if(j.current.add(J),A.has(J))A.set(J,!0);else return;let ie=!0;A.forEach(ve=>{ve||(ie=!1)}),ie&&(Y?.(),D(T.current),l&&y?.(),i&&i())};return x.jsx(QR,{isPresent:ue,initial:!E.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:u,root:h,onExitComplete:ue?void 0:$,anchorX:f,anchorY:d,children:B},J)})})},zz=_.createContext({strict:!1}),w1={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 z1=!1;function tM(){if(z1)return;const e={};for(const t in w1)e[t]={isEnabled:n=>w1[t].some(i=>!!n[i])};Ww(e),z1=!0}function _z(){return tM(),VO()}function nM(e){const t=_z();for(const n in e)t[n]={...t[n],...e[n]};Ww(t)}const rM=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 Mc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rM.has(e)}let Ez=e=>!Mc(e);function iM(e){typeof e=="function"&&(Ez=t=>t.startsWith("on")?!Mc(t):e(t))}try{iM(require("@emotion/is-prop-valid").default)}catch{}function aM(e,t,n){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ez(o)||n===!0&&Mc(o)||!t&&!Mc(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const Qc=_.createContext({});function oM(e,t){if(Jc(e)){const{initial:n,animate:i}=e;return{initial:n===!1||xl(n)?n:void 0,animate:xl(i)?i:void 0}}return e.inherit!==!1?t:{}}function sM(e){const{initial:t,animate:n}=oM(e,_.useContext(Qc));return _.useMemo(()=>({initial:t,animate:n}),[_1(t),_1(n)])}function _1(e){return Array.isArray(e)?e.join(" "):e}const hg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Tz(e,t,n){for(const i in t)!rn(t[i])&&!oz(i,n)&&(e[i]=t[i])}function lM({transformTemplate:e},t){return _.useMemo(()=>{const n=hg();return cg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function uM(e,t){const n=e.style||{},i={};return Tz(i,n,e),Object.assign(i,lM(e,t)),i}function cM(e,t){const n={},i=uM(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Cz=()=>({...hg(),attrs:{}});function fM(e,t,n,i){const o=_.useMemo(()=>{const u=Cz();return sz(u,t,uz(i),e.transformTemplate,e.style),{...u.attrs,style:{...u.style}}},[t]);if(e.style){const u={};Tz(u,e.style,e),o.style={...u,...o.style}}return o}const dM=["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 mg(e){return typeof e!="string"||e.includes("-")?!1:!!(dM.indexOf(e)>-1||/[A-Z]/u.test(e))}function hM(e,t,n,{latestValues:i},o,u=!1,l){const d=(l??mg(e)?fM:cM)(t,i,o,e),h=aM(t,typeof e=="string",u),p=e!==_.Fragment?{...h,...d,ref:n}:{},{children:y}=t,v=_.useMemo(()=>rn(y)?y.get():y,[y]);return _.createElement(e,{...p,children:v})}function mM({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,o){return{latestValues:pM(n,i,o,e),renderState:t()}}function pM(e,t,n,i){const o={},u=i(e,{});for(const v in u)o[v]=Sc(u[v]);let{initial:l,animate:f}=e;const d=Jc(e),h=Qw(e);t&&h&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const y=p?f:l;if(y&&typeof y!="boolean"&&!Kc(y)){const v=Array.isArray(y)?y:[y];for(let b=0;b<v.length;b++){const E=rg(e,v[b]);if(E){const{transitionEnd:T,transition:A,...j}=E;for(const O in j){let w=j[O];if(Array.isArray(w)){const P=p?w.length-1:0;w=w[P]}w!==null&&(o[O]=w)}for(const O in T)o[O]=T[O]}}}return o}const Az=e=>(t,n)=>{const i=_.useContext(Qc),o=_.useContext(Xc),u=()=>mM(e,t,i,o);return n?u():Up(u)},gM=Az({scrapeMotionValuesFromProps:fg,createRenderState:hg}),yM=Az({scrapeMotionValuesFromProps:cz,createRenderState:Cz}),xM=Symbol.for("motionComponentSymbol");function vM(e,t,n){const i=_.useRef(n);_.useInsertionEffect(()=>{i.current=n});const o=_.useRef(null);return _.useCallback(u=>{u&&e.onMount?.(u),t&&(u?t.mount(u):t.unmount());const l=i.current;if(typeof l=="function")if(u){const f=l(u);typeof f=="function"&&(o.current=f)}else o.current?(o.current(),o.current=null):l(u);else l&&(l.current=u)},[t])}const jz=_.createContext({});function nl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bM(e,t,n,i,o,u){const{visualElement:l}=_.useContext(Qc),f=_.useContext(zz),d=_.useContext(Xc),h=_.useContext(dg).reducedMotion,p=_.useRef(null),y=_.useRef(!1);i=i||f.renderer,!p.current&&i&&(p.current=i(e,{visualState:t,parent:l,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h,isSVG:u}),y.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const v=p.current,b=_.useContext(jz);v&&!v.projection&&o&&(v.type==="html"||v.type==="svg")&&SM(p.current,n,o,b);const E=_.useRef(!1);_.useInsertionEffect(()=>{v&&E.current&&v.update(n,d)});const T=n[Uw],A=_.useRef(!!T&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return tw(()=>{y.current=!0,v&&(E.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),A.current&&v.animationState&&v.animationState.animateChanges())}),_.useEffect(()=>{v&&(!A.current&&v.animationState&&v.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),A.current=!1),v.enteringChildren=void 0)}),v}function SM(e,t,n,i){const{layoutId:o,layout:u,drag:l,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Nz(e.parent)),e.projection.setOptions({layoutId:o,layout:u,alwaysMeasureLayout:!!l||f&&nl(f),visualElement:e,animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:d,layoutRoot:h})}function Nz(e){if(e)return e.options.allowProjection!==!1?e.projection:Nz(e.parent)}function Jh(e,{forwardMotionProps:t=!1,type:n}={},i,o){i&&nM(i);const u=n?n==="svg":mg(e),l=u?yM:gM;function f(h,p){let y;const v={..._.useContext(dg),...h,layoutId:kM(h)},{isStatic:b}=v,E=sM(h),T=l(h,b);if(!b&&ew){wM();const A=zM(v);y=A.MeasureLayout,E.visualElement=bM(e,T,v,o,A.ProjectionNode,u)}return x.jsxs(Qc.Provider,{value:E,children:[y&&E.visualElement?x.jsx(y,{visualElement:E.visualElement,...v}):null,hM(e,h,vM(T,E.visualElement,p),T,b,t,u)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=_.forwardRef(f);return d[xM]=e,d}function kM({layoutId:e}){const t=_.useContext(Lp).id;return t&&e!==void 0?t+"-"+e:e}function wM(e,t){_.useContext(zz).strict}function zM(e){const t=_z(),{drag:n,layout:i}=t;if(!n&&!i)return{};const o={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function _M(e,t){if(typeof Proxy>"u")return Jh;const n=new Map,i=(u,l)=>Jh(u,l,e,t),o=(u,l)=>i(u,l);return new Proxy(o,{get:(u,l)=>l==="create"?i:(n.has(l)||n.set(l,Jh(l,void 0,e,t)),n.get(l))})}const EM=(e,t)=>t.isSVG??mg(e)?new rR(t):new JO(t,{allowProjection:e!==_.Fragment});class TM extends $i{constructor(t){super(t),t.animationState||(t.animationState=lR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kc(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 CM=0;class AM extends $i{constructor(){super(...arguments),this.id=CM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)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 jM={animation:{Feature:TM},exit:{Feature:AM}};function Ol(e){return{point:{x:e.pageX,y:e.pageY}}}const NM=e=>t=>sg(t)&&e(t,Ol(t));function ll(e,t,n,i){return vl(e,t,NM(n),i)}const Oz=({current:e})=>e?e.ownerDocument.defaultView:null,E1=(e,t)=>Math.abs(e-t);function OM(e,t){const n=E1(e.x,t.x),i=E1(e.y,t.y);return Math.sqrt(n**2+i**2)}const T1=new Set(["auto","scroll"]);class Rz{constructor(t,n,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:u=!1,distanceThreshold:l=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Wh(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,T=OM(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!T)return;const{point:A}=b,{timestamp:j}=Wt;this.history.push({...A,timestamp:j});const{onStart:O,onMove:w}=this.handlers;E||(O&&O(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,b)},this.handlePointerMove=(b,E)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Qh(E,this.transformPagePoint),dt.update(this.updatePoint,!0)},this.handlePointerUp=(b,E)=>{this.end();const{onEnd:T,onSessionEnd:A,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=Wh(b.type==="pointercancel"?this.lastMoveEventInfo:Qh(E,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,O),A&&A(b,O)},!sg(t))return;this.dragSnapToOrigin=u,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=l,this.contextWindow=o||window;const d=Ol(t),h=Qh(d,this.transformPagePoint),{point:p}=h,{timestamp:y}=Wt;this.history=[{...p,timestamp:y}];const{onSessionStart:v}=n;v&&v(t,Wh(h,this.history)),this.removeListeners=Al(ll(this.contextWindow,"pointermove",this.handlePointerMove),ll(this.contextWindow,"pointerup",this.handlePointerUp),ll(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(T1.has(i.overflowX)||T1.has(i.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 i=t===window,o=i?{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||(i?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),dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Oi(this.updatePoint)}}function Qh(e,t){return t?{point:t(e.point)}:e}function C1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wh({point:e},t){return{point:e,delta:C1(e,Mz(t)),offset:C1(e,RM(t)),velocity:MM(t,.1)}}function RM(e){return e[0]}function Mz(e){return e[e.length-1]}function MM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const o=Mz(e);for(;n>=0&&(i=e[n],!(o.timestamp-i.timestamp>Kr(t)));)n--;if(!i)return{x:0,y:0};const u=nr(o.timestamp-i.timestamp);if(u===0)return{x:0,y:0};const l={x:(o.x-i.x)/u,y:(o.y-i.y)/u};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function DM(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?xt(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?xt(n,e,i.max):Math.min(e,n)),e}function A1(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 $M(e,{top:t,left:n,bottom:i,right:o}){return{x:A1(e.x,n,o),y:A1(e.y,t,i)}}function j1(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function LM(e,t){return{x:j1(e.x,t.x),y:j1(e.y,t.y)}}function UM(e,t){let n=.5;const i=mn(e),o=mn(t);return o>i?n=pl(t.min,t.max-i,e.min):i>o&&(n=pl(e.min,e.max-o,t.min)),wr(0,1,n)}function PM(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 ip=.35;function VM(e=ip){return e===!1?e=0:e===!0&&(e=ip),{x:N1(e,"left","right"),y:N1(e,"top","bottom")}}function N1(e,t,n){return{min:O1(e,t),max:O1(e,n)}}function O1(e,t){return typeof e=="number"?e:e[t]||0}const ZM=new WeakMap;class BM{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=It(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const u=y=>{n?(this.stopAnimation(),this.snapToCursor(Ol(y).point)):this.pauseAnimation()},l=(y,v)=>{this.stopAnimation();const{drag:b,dragPropagation:E,onDragStart:T}=this.getProps();if(b&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=CO(b),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qn(j=>{let O=this.getAxisMotionValue(j).get()||0;if(kr.test(O)){const{projection:w}=this.visualElement;if(w&&w.layout){const P=w.layout.layoutBox[j];P&&(O=mn(P)*(parseFloat(O)/100))}}this.originPoint[j]=O}),T&&dt.postRender(()=>T(y,v)),Km(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:b,dragDirectionLock:E,onDirectionLock:T,onDrag:A}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:j}=v;if(E&&this.currentDirection===null){this.currentDirection=IM(j),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",v.point,j),this.updateAxis("y",v.point,j),this.visualElement.render(),A&&A(y,v)},d=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Qn(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:p}=this.getProps();this.panSession=new Rz(t,{onSessionStart:u,onStart:l,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:i,contextWindow:Oz(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,o=n||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!o||!i)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:f}=this.getProps();f&&dt.postRender(()=>f(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&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,i){const{drag:o}=this.getProps();if(!i||!rc(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let l=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(l=DM(l,this.constraints[t],this.elastic[t])),u.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&nl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=$M(i.layoutBox,t):this.constraints=!1,this.elastic=VM(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=PM(i.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nl(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=FO(i,o.root,this.visualElement.getTransformPagePoint());let l=LM(o.layout.layoutBox,u);if(n){const f=n(BO(l));this.hasMutatedConstraints=!!f,f&&(l=tz(f))}return l}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:o,dragTransition:u,dragSnapToOrigin:l,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Qn(p=>{if(!rc(p,n,this.currentDirection))return;let y=d&&d[p]||{};l&&(y={min:0,max:0});const v=o?200:1e6,b=o?40:1e7,E={type:"inertia",velocity:i?t[p]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...u,...y};return this.startAxisValueAnimation(p,E)});return Promise.all(h).then(f)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Km(this.visualElement,t),i.start(ng(t,i,0,n,this.visualElement,!1))}stopAnimation(){Qn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),o=i[n];return o||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Qn(n=>{const{drag:i}=this.getProps();if(!rc(n,i,this.currentDirection))return;const{projection:o}=this.visualElement,u=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:f}=o.layout.layoutBox[n],d=u.get()||0;u.set(t[n]-xt(l,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!nl(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qn(l=>{const f=this.getAxisMotionValue(l);if(f&&this.constraints!==!1){const d=f.get();o[l]=UM({min:d,max:d},this.constraints[l])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Qn(l=>{if(!rc(l,t,null))return;const f=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];f.set(xt(d,h,o[l]))})}addListeners(){if(!this.visualElement.current)return;ZM.set(this.visualElement,this);const t=this.visualElement.current,n=ll(t,"pointerdown",d=>{const{drag:h,dragListener:p=!0}=this.getProps(),y=d.target,v=y!==t&&Xw(y);h&&p&&!v&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();nl(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,u=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),dt.read(i);const l=vl(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Qn(p=>{const y=this.getAxisMotionValue(p);y&&(this.originPoint[p]+=d[p].translate,y.set(y.get()+d[p].translate))}),this.visualElement.render())}));return()=>{l(),n(),u(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:u=!1,dragElastic:l=ip,dragMomentum:f=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:o,dragConstraints:u,dragElastic:l,dragMomentum:f}}}function rc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function IM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class HM extends $i{constructor(t){super(t),this.removeGroupControls=rr,this.removeListeners=rr,this.controls=new BM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rr}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 R1=e=>(t,n)=>{e&&dt.postRender(()=>e(t,n))};class FM extends $i{constructor(){super(...arguments),this.removePointerDownListener=rr}onPointerDown(t){this.session=new Rz(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Oz(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:R1(t),onStart:R1(n),onMove:i,onEnd:(u,l)=>{delete this.session,o&&dt.postRender(()=>o(u,l))}}}mount(){this.removePointerDownListener=ll(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 em=!1;class qM extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:o}=this.props,{projection:u}=t;u&&(n.group&&n.group.add(u),i&&i.register&&o&&i.register(u),em&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),kc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:o,isPresent:u}=this.props,{projection:l}=i;return l&&(l.isPresent=u,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),em=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==u?l.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?l.promote():l.relegate()||dt.postRender(()=>{const f=l.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),og.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:o}=t;em=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Dz(e){const[t,n]=wz(),i=_.useContext(Lp);return x.jsx(qM,{...e,layoutGroup:i,switchLayoutGroup:_.useContext(jz),isPresent:t,safeToRemove:n})}const GM={pan:{Feature:FM},drag:{Feature:HM,ProjectionNode:kz,MeasureLayout:Dz}};function M1(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,u=i[o];u&&dt.postRender(()=>u(t,Ol(t)))}class YM extends $i{mount(){const{current:t}=this.node;t&&(this.unmount=AO(t,(n,i)=>(M1(this.node,i,"Start"),o=>M1(this.node,o,"End"))))}unmount(){}}class XM extends $i{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=Al(vl(this.node.current,"focus",()=>this.onFocus()),vl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function D1(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),u=i[o];u&&dt.postRender(()=>u(t,Ol(t)))}class KM extends $i{mount(){const{current:t}=this.node;t&&(this.unmount=OO(t,(n,i)=>(D1(this.node,i,"Start"),(o,{success:u})=>D1(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ap=new WeakMap,tm=new WeakMap,JM=e=>{const t=ap.get(e.target);t&&t(e)},QM=e=>{e.forEach(JM)};function WM({root:e,...t}){const n=e||document;tm.has(n)||tm.set(n,{});const i=tm.get(n),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(QM,{root:e,...t})),i[o]}function eD(e,t,n){const i=WM(t);return ap.set(e,n),i.observe(e),()=>{ap.delete(e),i.unobserve(e)}}const tD={some:0,all:1};class nD extends $i{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:o="some",once:u}=t,l={root:n?n.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:tD[o]},f=d=>{const{isIntersecting:h}=d;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:y}=this.node.getProps(),v=h?p:y;v&&v(d)};return eD(this.node.current,l,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(rD(t,n))&&this.startObserver()}unmount(){}}function rD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const iD={inView:{Feature:nD},tap:{Feature:KM},focus:{Feature:XM},hover:{Feature:YM}},aD={layout:{ProjectionNode:kz,MeasureLayout:Dz}},oD={...jM,...iD,...GM,...aD},dn=_M(oD,EM),$z=()=>{const[e,t]=_.useState(!!localStorage.getItem("morpheus.auth.token"));return _.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 sD({onMenuClick:e,isDark:t,toggleTheme:n}){return x.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:[x.jsxs("h1",{className:"text-lg font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[x.jsx(go,{className:"w-6 h-6"}),"MORPHEUS"]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.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?x.jsx(Ik,{className:"w-5 h-5"}):x.jsx(Zk,{className:"w-5 h-5"})}),x.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:x.jsx(xj,{className:"w-6 h-6"})})]})]})}const Ro=({open:e,onOpenChange:t,children:n})=>e?x.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[x.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>t(!1)}),x.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,Mo=({className:e,children:t})=>x.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:x.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:t})}),Do=({children:e})=>x.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}),$o=({className:e,children:t})=>x.jsx("h3",{className:`text-lg font-semibold leading-none tracking-tight ${e}`,children:t}),lD=({className:e,children:t})=>x.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",...i})=>{const f=`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 x.jsx("button",{className:f,...i})};function uD({isOpen:e,onClose:t,onConfirm:n}){return x.jsx(Ro,{open:e,onOpenChange:t,children:x.jsxs(Mo,{className:"sm:max-w-md bg-azure-surface dark:bg-zinc-900 border-azure-border dark:border-matrix-primary",children:[x.jsx(Do,{children:x.jsx($o,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:"Confirm Restart"})}),x.jsxs("div",{children:[x.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."}),x.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-end",children:[x.jsx(tr,{variant:"outline",onClick:t,children:"Cancel"}),x.jsx(tr,{variant:"destructive",onClick:()=>{n(),t()},children:"Confirm Restart"})]})]})]})})}function cD({children:e}){const t=hr(),[n,i]=_.useState(()=>{const v=localStorage.getItem("theme");return v?v==="dark":!0}),[o,u]=_.useState(!1),[l,f]=_.useState(!1),{logout:d}=$z(),h=async()=>{try{await at.post("/restart",{}),alert("Restart initiated successfully. The agent will restart shortly.")}catch(v){console.error("Failed to restart:",v),alert("Failed to restart the agent. Please try again.")}};_.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]),_.useEffect(()=>{u(!1)},[t.pathname]);const p=[{icon:a0,label:"Dashboard",path:"/"},{icon:hl,label:"Chat",path:"/chat"},{icon:c0,label:"Zaion",path:"/zaion"},{icon:l0,label:"MCP Servers",path:"/mcp-servers"},{icon:Cm,label:"Usage Stats",path:"/stats"},{icon:Ec,label:"Model Pricing",path:"/model-pricing"},{icon:go,label:"Sati Memories",path:"/sati-memories"}],y=[{icon:a0,label:"Dashboard",path:"/"},{icon:hl,label:"Chat",path:"/chat"},{icon:c0,label:"Zaion",path:"/zaion"},{icon:l0,label:"MCP Servers",path:"/mcp-servers"},{icon:Cm,label:"Usage Stats",path:"/stats"},{icon:Ec,label:"Model Pricing",path:"/model-pricing"},{icon:go,label:"Sati Memories",path:"/sati-memories"}];return x.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:[x.jsx(sD,{onMenuClick:()=>u(!0),isDark:n,toggleTheme:()=>i(!n)}),x.jsxs("div",{className:"flex flex-1 overflow-hidden pt-16 lg:pt-0",children:[" ",x.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:[x.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[x.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[x.jsx(go,{className:"w-6 h-6"}),"MORPHEUS"]}),x.jsx("button",{onClick:()=>i(!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?x.jsx(Ik,{className:"w-4 h-4"}):x.jsx(Zk,{className:"w-4 h-4"})})]}),x.jsxs("nav",{className:"flex-1 p-4 space-y-2",children:[p.map(v=>{const b=t.pathname===v.path;return x.jsxs(po,{to:v.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${b?"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:[x.jsx(v.icon,{className:"w-5 h-5"}),x.jsx("span",{children:v.label})]},v.path)}),x.jsxs(po,{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:[x.jsx(f0,{className:"w-5 h-5"}),x.jsx("span",{children:"Logs"})]},"/logs")]}),x.jsx("div",{className:"p-2",children:x.jsxs("button",{onClick:()=>f(!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:[x.jsx(u0,{className:"w-5 h-5"}),x.jsx("span",{children:"Restart"})]})}),x.jsx("div",{className:"p-2",children:x.jsxs("button",{onClick:d,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:[x.jsx(o0,{className:"w-5 h-5"}),x.jsx("span",{children:"Logout"})]})})]}),x.jsx(eM,{children:o&&x.jsxs(dn.div,{className:"fixed inset-0 z-50 lg:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>u(!1),children:[x.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),x.jsxs(dn.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:v=>v.stopPropagation(),children:[x.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[x.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[x.jsx(go,{className:"w-6 h-6"}),"MORPHEUS"]}),x.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:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),x.jsxs("nav",{className:"flex-1 p-4 space-y-2 overflow-y-auto",children:[y.map(v=>{const b=t.pathname===v.path;return x.jsxs(po,{to:v.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${b?"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:[x.jsx(v.icon,{className:"w-5 h-5"}),x.jsx("span",{children:v.label})]},v.path)}),x.jsxs(po,{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:[x.jsx(f0,{className:"w-5 h-5"}),x.jsx("span",{children:"Logs"})]})]}),x.jsx("div",{className:"p-2",children:x.jsxs("button",{onClick:()=>{f(!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:[x.jsx(u0,{className:"w-5 h-5"}),x.jsx("span",{children:"Restart"})]})}),x.jsx("div",{className:"p-2",children:x.jsxs("button",{onClick:()=>{d(),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:[x.jsx(o0,{className:"w-5 h-5"}),x.jsx("span",{children:"Logout"})]})})]})]})}),x.jsxs("main",{className:`flex-1 p-4 md:p-8 relative flex flex-col ${t.pathname==="/chat"?"overflow-hidden":"overflow-auto"}`,children:[x.jsx("div",{className:`w-full mx-auto flex-1 ${t.pathname==="/chat"?"h-full":"max-w-6xl"}`,children:e}),x.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"})]})]}),x.jsx(zN,{}),x.jsx(uD,{isOpen:l,onClose:()=>f(!1),onConfirm:h})]})}const fD={hidden:{opacity:0,y:20},show:{opacity:1,y:0}},ma=({title:e,value:t,icon:n,subValue:i})=>x.jsxs(dn.div,{variants:fD,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:[x.jsxs("div",{className:"flex justify-between items-start mb-4",children:[x.jsx("h3",{className:"text-azure-text-secondary dark:text-matrix-secondary text-sm font-bold uppercase",children:e}),x.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"})]}),x.jsx("div",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight mb-1 font-mono tracking-tighter truncate",children:t}),i&&x.jsx("div",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary opacity-70 font-mono",children:i})]}),op={fetchUsageStats:async()=>at.get("/stats/usage"),fetchGroupedUsageStats:async()=>at.get("/stats/usage/grouped")};function dD(){const{data:e}=Xr("/api/stats/usage",op.fetchUsageStats,{refreshInterval:5e3});return x.jsxs(x.Fragment,{children:[x.jsx(ma,{title:"Total Input",value:e?e.totalInputTokens.toLocaleString():"-",icon:FA,subValue:"Tokens processed"}),x.jsx(ma,{title:"Total Output",value:e?e.totalOutputTokens.toLocaleString():"-",icon:GA,subValue:"Tokens generated"})]})}function hD(){const{data:e}=Qk(),t={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},n={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return x.jsxs(dn.div,{className:"space-y-8",variants:t,initial:"hidden",animate:"show",children:[x.jsxs(dn.div,{variants:n,children:[x.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight mb-2",children:"SYSTEM STATUS"}),x.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"Overview of the Morpheus agent runtime."})]}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[x.jsx(ma,{title:"Agent Status",value:e?.status.toUpperCase()||"CONNECTING...",icon:go,subValue:e?`PID: ${e.pid}`:""}),x.jsx(ma,{title:"Uptime",value:e?Wk(e.uptimeSeconds):"-",icon:Uk,subValue:e?`${e.uptimeSeconds.toFixed(0)} seconds`:""}),x.jsx(ma,{title:"Version",value:e?.projectVersion||"-",icon:Pk,subValue:`Node ${e?.nodeVersion||"-"}`}),x.jsx(ma,{title:"Provider",value:e?.llmProvider?.toUpperCase()||"-",icon:QA,subValue:"LLM Inference Engine"}),x.jsx(ma,{title:"Model",value:e?.llmModel||"-",icon:KA,subValue:"Active Model"}),x.jsx(dD,{})]})]})}const mD=({sessions:e,activeSessionId:t,onSelectSession:n,onCreateSession:i,onArchiveSession:o,onDeleteSession:u,onRenameSession:l,isOpen:f,toggleSidebar:d})=>{const[h,p]=_.useState(null),[y,v]=_.useState(""),b=_.useRef(null);_.useEffect(()=>{h&&b.current&&b.current.focus()},[h]);const E=(O,w)=>{O.stopPropagation(),p(w.id),v(w.title||"Untitled Session")},T=O=>{O?.stopPropagation(),h&&y.trim()&&(l(h,y.trim()),p(null))},A=O=>{O?.stopPropagation(),p(null)},j=O=>{O.key==="Enter"?T():O.key==="Escape"&&A()};return f?x.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:[x.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:[x.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-matrix-highlight",children:"Sessions"}),x.jsx("button",{onClick:d,className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-matrix-primary/20 text-gray-500 dark:text-matrix-secondary",children:x.jsx(hl,{size:18})})]}),x.jsx("div",{className:"p-4",children:x.jsxs("button",{onClick:i,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:[x.jsx(s0,{size:18}),x.jsx("span",{children:"New Chat"})]})}),x.jsxs("div",{className:"flex-1 overflow-y-auto px-2 space-y-1 custom-scrollbar",children:[e.map(O=>x.jsxs("div",{onClick:()=>n(O.id),className:`group flex items-center justify-between p-3 rounded-lg cursor-pointer transition-all border ${t===O.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:[x.jsx("div",{className:"flex flex-col overflow-hidden w-full mr-2",children:h===O.id?x.jsx("div",{className:"flex items-center gap-1 w-full",onClick:w=>w.stopPropagation(),children:x.jsx("input",{ref:b,type:"text",value:y,onChange:w=>v(w.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"})}):x.jsxs(x.Fragment,{children:[x.jsx("span",{className:`text-sm font-medium truncate ${t===O.id?"text-azure-primary dark:text-matrix-highlight":"text-gray-700 dark:text-matrix-secondary"}`,children:O.title||"Untitled Session"}),x.jsx("span",{className:"text-xs text-gray-400 dark:text-matrix-secondary/70 mt-0.5",children:new Date(O.started_at).toLocaleString()})]})}),x.jsx("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:h===O.id?x.jsxs(x.Fragment,{children:[x.jsx("button",{onClick:T,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:x.jsx(nj,{size:14})}),x.jsx("button",{onClick:A,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:x.jsx(Hj,{size:14})})]}):x.jsxs(x.Fragment,{children:[x.jsx("button",{onClick:w=>E(w,O),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:x.jsx(Bk,{size:14})}),x.jsx("button",{onClick:w=>{w.stopPropagation(),o(O.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:x.jsx(IA,{size:14})}),x.jsx("button",{onClick:w=>{w.stopPropagation(),u(O.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:x.jsx(Tc,{size:14})})]})})]},O.id)),e.length===0&&x.jsx("div",{className:"text-center text-gray-400 dark:text-matrix-secondary/50 mt-10 text-sm",children:"No active sessions."})]})]}):x.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:[x.jsx("button",{onClick:d,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:x.jsx(hl,{})}),x.jsx("div",{className:"border-t border-gray-200 dark:border-matrix-primary/30 w-full my-2"}),x.jsx("button",{onClick:i,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:x.jsx(s0,{size:20})})]})};function pD(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const gD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xD={};function $1(e,t){return(xD.jsx?yD:gD).test(e)}const vD=/[ \t\n\f\r]/g;function bD(e){return typeof e=="object"?e.type==="text"?L1(e.value):!1:L1(e)}function L1(e){return e.replace(vD,"")===""}class Rl{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Rl.prototype.normal={};Rl.prototype.property={};Rl.prototype.space=void 0;function Lz(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new Rl(n,i,t)}function sp(e){return e.toLowerCase()}class _n{constructor(t,n){this.attribute=n,this.property=t}}_n.prototype.attribute="";_n.prototype.booleanish=!1;_n.prototype.boolean=!1;_n.prototype.commaOrSpaceSeparated=!1;_n.prototype.commaSeparated=!1;_n.prototype.defined=!1;_n.prototype.mustUseProperty=!1;_n.prototype.number=!1;_n.prototype.overloadedBoolean=!1;_n.prototype.property="";_n.prototype.spaceSeparated=!1;_n.prototype.space=void 0;let SD=0;const je=Sa(),Mt=Sa(),lp=Sa(),oe=Sa(),ot=Sa(),To=Sa(),Dn=Sa();function Sa(){return 2**++SD}const up=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Mt,commaOrSpaceSeparated:Dn,commaSeparated:To,number:oe,overloadedBoolean:lp,spaceSeparated:ot},Symbol.toStringTag,{value:"Module"})),nm=Object.keys(up);class pg extends _n{constructor(t,n,i,o){let u=-1;if(super(t,n),U1(this,"space",o),typeof i=="number")for(;++u<nm.length;){const l=nm[u];U1(this,nm[u],(i&up[l])===up[l])}}}pg.prototype.defined=!0;function U1(e,t,n){n&&(e[t]=n)}function qo(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const u=new pg(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),t[i]=u,n[sp(i)]=i,n[sp(u.attribute)]=i}return new Rl(t,n,e.space)}const Uz=qo({properties:{ariaActiveDescendant:null,ariaAtomic:Mt,ariaAutoComplete:null,ariaBusy:Mt,ariaChecked:Mt,ariaColCount:oe,ariaColIndex:oe,ariaColSpan:oe,ariaControls:ot,ariaCurrent:null,ariaDescribedBy:ot,ariaDetails:null,ariaDisabled:Mt,ariaDropEffect:ot,ariaErrorMessage:null,ariaExpanded:Mt,ariaFlowTo:ot,ariaGrabbed:Mt,ariaHasPopup:null,ariaHidden:Mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ot,ariaLevel:oe,ariaLive:null,ariaModal:Mt,ariaMultiLine:Mt,ariaMultiSelectable:Mt,ariaOrientation:null,ariaOwns:ot,ariaPlaceholder:null,ariaPosInSet:oe,ariaPressed:Mt,ariaReadOnly:Mt,ariaRelevant:null,ariaRequired:Mt,ariaRoleDescription:ot,ariaRowCount:oe,ariaRowIndex:oe,ariaRowSpan:oe,ariaSelected:Mt,ariaSetSize:oe,ariaSort:null,ariaValueMax:oe,ariaValueMin:oe,ariaValueNow:oe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Pz(e,t){return t in e?e[t]:t}function Vz(e,t){return Pz(e,t.toLowerCase())}const kD=qo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:To,acceptCharset:ot,accessKey:ot,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:ot,autoFocus:je,autoPlay:je,blocking:ot,capture:null,charSet:null,checked:je,cite:null,className:ot,cols:oe,colSpan:null,content:null,contentEditable:Mt,controls:je,controlsList:ot,coords:oe|To,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:lp,draggable:Mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:ot,height:oe,hidden:lp,high:oe,href:null,hrefLang:null,htmlFor:ot,httpEquiv:ot,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:ot,itemRef:ot,itemScope:je,itemType:ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:oe,manifest:null,max:null,maxLength:oe,media:null,method:null,min:null,minLength:oe,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:oe,pattern:null,ping:ot,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:ot,required:je,reversed:je,rows:oe,rowSpan:oe,sandbox:ot,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:oe,sizes:null,slot:null,span:oe,spellCheck:Mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:oe,step:null,style:null,tabIndex:oe,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Mt,width:oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ot,axis:null,background:null,bgColor:null,border:oe,borderColor:null,bottomMargin:oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:oe,leftMargin:oe,link:null,longDesc:null,lowSrc:null,marginHeight:oe,marginWidth:oe,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:oe,rules:null,scheme:null,scrolling:Mt,standby:null,summary:null,text:null,topMargin:oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:oe,security:null,unselectable:null},space:"html",transform:Vz}),wD=qo({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:Dn,accentHeight:oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:oe,amplitude:oe,arabicForm:null,ascent:oe,attributeName:null,attributeType:null,azimuth:oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:oe,by:null,calcMode:null,capHeight:oe,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:oe,diffuseConstant:oe,direction:null,display:null,dur:null,divisor:oe,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:oe,enableBackground:null,end:null,event:null,exponent:oe,externalResourcesRequired:null,fill:null,fillOpacity:oe,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:To,g2:To,glyphName:To,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:oe,horizOriginX:oe,horizOriginY:oe,id:null,ideographic:oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:oe,k:oe,k1:oe,k2:oe,k3:oe,k4:oe,kernelMatrix:Dn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:oe,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:oe,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:oe,overlineThickness:oe,paintOrder:null,panose1:null,path:null,pathLength:oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:oe,pointsAtY:oe,pointsAtZ:oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dn,rev:Dn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dn,requiredFeatures:Dn,requiredFonts:Dn,requiredFormats:Dn,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:oe,specularExponent:oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:oe,strikethroughThickness:oe,string:null,stroke:null,strokeDashArray:Dn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:oe,strokeOpacity:oe,strokeWidth:null,style:null,surfaceScale:oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dn,tabIndex:oe,tableValues:null,target:null,targetX:oe,targetY:oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:oe,underlineThickness:oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:oe,values:null,vAlphabetic:oe,vMathematical:oe,vectorEffect:null,vHanging:oe,vIdeographic:oe,version:null,vertAdvY:oe,vertOriginX:oe,vertOriginY:oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pz}),Zz=qo({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()}}),Bz=qo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vz}),Iz=qo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zD={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"},_D=/[A-Z]/g,P1=/-[a-z]/g,ED=/^data[-\w.:]+$/i;function TD(e,t){const n=sp(t);let i=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ED.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(P1,AD);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!P1.test(u)){let l=u.replace(_D,CD);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=pg}return new o(i,t)}function CD(e){return"-"+e.toLowerCase()}function AD(e){return e.charAt(1).toUpperCase()}const jD=Lz([Uz,kD,Zz,Bz,Iz],"html"),gg=Lz([Uz,wD,Zz,Bz,Iz],"svg");function ND(e){return e.join(" ").trim()}var uo={},rm,V1;function OD(){if(V1)return rm;V1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
20
|
+
`,h="/",p="*",y="",v="comment",b="declaration";function E(A,j){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];j=j||{};var O=1,w=1;function P(se){var ne=se.match(t);ne&&(O+=ne.length);var V=se.lastIndexOf(d);w=~V?se.length-V:w+se.length}function D(){var se={line:O,column:w};return function(ne){return ne.position=new L(se),J(),ne}}function L(se){this.start=se,this.end={line:O,column:w},this.source=j.source}L.prototype.content=A;function Y(se){var ne=new Error(j.source+":"+O+":"+w+": "+se);if(ne.reason=se,ne.filename=j.source,ne.line=O,ne.column=w,ne.source=A,!j.silent)throw ne}function B(se){var ne=se.exec(A);if(ne){var V=ne[0];return P(V),A=A.slice(V.length),ne}}function J(){B(n)}function ue(se){var ne;for(se=se||[];ne=$();)ne!==!1&&se.push(ne);return se}function $(){var se=D();if(!(h!=A.charAt(0)||p!=A.charAt(1))){for(var ne=2;y!=A.charAt(ne)&&(p!=A.charAt(ne)||h!=A.charAt(ne+1));)++ne;if(ne+=2,y===A.charAt(ne-1))return Y("End of comment missing");var V=A.slice(2,ne-2);return w+=2,P(V),A=A.slice(ne),w+=2,se({type:v,comment:V})}}function ie(){var se=D(),ne=B(i);if(ne){if($(),!B(o))return Y("property missing ':'");var V=B(u),X=se({type:b,property:T(ne[0].replace(e,y)),value:V?T(V[0].replace(e,y)):y});return B(l),X}}function ve(){var se=[];ue(se);for(var ne;ne=ie();)ne!==!1&&(se.push(ne),ue(se));return se}return J(),ve()}function T(A){return A?A.replace(f,y):y}return rm=E,rm}var Z1;function RD(){if(Z1)return uo;Z1=1;var e=uo&&uo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(uo,"__esModule",{value:!0}),uo.default=n;const t=e(OD());function n(i,o){let u=null;if(!i||typeof i!="string")return u;const l=(0,t.default)(i),f=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;f?o(h,p,d):p&&(u=u||{},u[h]=p)}),u}return uo}var Ys={},B1;function MD(){if(B1)return Ys;B1=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(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()},f=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),u(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,f):h=h.replace(i,f),h.replace(t,l))};return Ys.camelCase=d,Ys}var Xs,I1;function DD(){if(I1)return Xs;I1=1;var e=Xs&&Xs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(RD()),n=MD();function i(o,u){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(f,d){f&&d&&(l[(0,n.camelCase)(f,u)]=d)}),l}return i.default=i,Xs=i,Xs}var $D=DD();const LD=zp($D),Hz=Fz("end"),yg=Fz("start");function Fz(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function UD(e){const t=yg(e),n=Hz(e);if(t&&n)return{start:t,end:n}}function ul(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?H1(e.position):"start"in e||"end"in e?H1(e):"line"in e||"column"in e?cp(e):""}function cp(e){return F1(e&&e.line)+":"+F1(e&&e.column)}function H1(e){return cp(e&&e.start)+"-"+cp(e&&e.end)}function F1(e){return e&&typeof e=="number"?e:1}class an extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=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 i=="string"){const d=i.indexOf(":");d===-1?u.ruleId=i:(u.source=i.slice(0,d),u.ruleId=i.slice(d+1))}if(!u.place&&u.ancestors&&u.ancestors){const d=u.ancestors[u.ancestors.length-1];d&&(u.place=d.position)}const f=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=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=ul(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}}an.prototype.file="";an.prototype.name="";an.prototype.reason="";an.prototype.message="";an.prototype.stack="";an.prototype.column=void 0;an.prototype.line=void 0;an.prototype.ancestors=void 0;an.prototype.cause=void 0;an.prototype.fatal=void 0;an.prototype.place=void 0;an.prototype.ruleId=void 0;an.prototype.source=void 0;const xg={}.hasOwnProperty,PD=new Map,VD=/[A-Z]/g,ZD=new Set(["table","tbody","thead","tfoot","tr"]),BD=new Set(["td","th"]),qz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ID(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=JD(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");i=KD(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?gg:jD,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=Gz(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function Gz(e,t,n){if(t.type==="element")return HD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return FD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return GD(e,t,n);if(t.type==="mdxjsEsm")return qD(e,t);if(t.type==="root")return YD(e,t,n);if(t.type==="text")return XD(e,t)}function HD(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=gg,e.schema=o),e.ancestors.push(t);const u=Xz(e,t.tagName,!1),l=QD(e,t);let f=bg(e,t);return ZD.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!bD(d):!0})),Yz(e,l,u,t),vg(l,f),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function FD(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}bl(e,t.position)}function qD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bl(e,t.position)}function GD(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=gg,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:Xz(e,t.name,!0),l=WD(e,t),f=bg(e,t);return Yz(e,l,u,t),vg(l,f),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function YD(e,t,n){const i={};return vg(i,bg(e,t)),e.create(t,e.Fragment,i,n)}function XD(e,t){return t.value}function Yz(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function vg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function KD(e,t,n){return i;function i(o,u,l,f){const h=Array.isArray(l.children)?n:t;return f?h(u,l,f):h(u,l)}}function JD(e,t){return n;function n(i,o,u,l){const f=Array.isArray(u.children),d=yg(i);return t(o,u,l,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function QD(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&xg.call(t.properties,o)){const u=e3(e,o,t.properties[o]);if(u){const[l,f]=u;e.tableCellAlignToStyle&&l==="align"&&typeof f=="string"&&BD.has(t.tagName)?i=f:n[l]=f}}if(i){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function WD(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const l=u.expression;l.type;const f=l.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else bl(e,t.position);else{const o=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else bl(e,t.position);else u=i.value===null?!0:i.value;n[o]=u}return n}function bg(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:PD;for(;++i<t.children.length;){const u=t.children[i];let l;if(e.passKeys){const d=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const f=Gz(e,u,l);f!==void 0&&n.push(f)}return n}function e3(e,t,n){const i=TD(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?pD(n):ND(n)),i.property==="style"){let o=typeof n=="object"?n:t3(e,String(n));return e.stylePropertyNameCase==="css"&&(o=n3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?zD[i.property]||i.property:i.attribute,n]}}function t3(e,t){try{return LD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new an("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=qz+"#cannot-parse-style-attribute",o}}function Xz(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,l;for(;++u<o.length;){const f=$1(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};l=l?{type:"MemberExpression",object:l,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}i=l}else i=$1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return xg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);bl(e)}function bl(e,t){const n=new an("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=qz+"#cannot-handle-mdx-estrees-without-createevaluater",n}function n3(e){const t={};let n;for(n in e)xg.call(e,n)&&(t[r3(n)]=e[n]);return t}function r3(e){let t=e.replace(VD,i3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function i3(e){return"-"+e.toLowerCase()}const im={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,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Kz(e,i,o)}function Kz(e,t,n){if(s3(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 q1(e.children,t,n)}return Array.isArray(e)?q1(e,t,n):""}function q1(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=Kz(e[o],t,n);return i.join("")}function s3(e){return!!(e&&typeof e=="object")}const G1=document.createElement("i");function Sg(e){const t="&"+e+";";G1.innerHTML=t;const n=G1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zr(e,t,n,i){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,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);u<i.length;)l=i.slice(u,u+1e4),l.unshift(t,0),e.splice(...l),u+=1e4,t+=1e4}function er(e,t){return e.length>0?(zr(e,e.length,0,t),e):t}const Y1={}.hasOwnProperty;function l3(e){const t={};let n=-1;for(;++n<e.length;)u3(t,e[n]);return t}function u3(e,t){let n;for(n in t){const o=(Y1.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){Y1.call(o,l)||(o[l]=[]);const f=u[l];c3(o[l],Array.isArray(f)?f:f?[f]:[])}}}function c3(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);zr(e,0,0,i)}function Jz(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 Co(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sr=Li(/[A-Za-z]/),$n=Li(/[\dA-Za-z]/),f3=Li(/[#-'*+\--9=?A-Z^-~]/);function fp(e){return e!==null&&(e<32||e===127)}const dp=Li(/\d/),d3=Li(/[\dA-Fa-f]/),h3=Li(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function zn(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const m3=Li(new RegExp("\\p{P}|\\p{S}","u")),p3=Li(/\s/);function Li(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Go(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&$n(e.charCodeAt(n+1))&&$n(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 f=e.charCodeAt(n+1);u<56320&&f>56319&&f<57344?(l=String.fromCharCode(u,f),o=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function st(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let u=0;return l;function l(d){return Fe(d)?(e.enter(n),f(d)):t(d)}function f(d){return Fe(d)&&u++<o?(e.consume(d),f):(e.exit(n),t(d))}}const g3={tokenize:y3};function y3(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),st(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(f)}function l(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return _e(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),l)}}const x3={tokenize:v3},X1={tokenize:b3};function v3(e){const t=this,n=[];let i=0,o,u,l;return f;function f(w){if(i<n.length){const P=n[i];return t.containerState=P[1],e.attempt(P[0].continuation,d,h)(w)}return h(w)}function d(w){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&O();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(i);let Y=P;for(;Y<t.events.length;)t.events[Y][1].end={...L},Y++;return zr(t.events,D+1,0,t.events.slice(P)),t.events.length=Y,h(w)}return f(w)}function h(w){if(i===n.length){if(!o)return v(w);if(o.currentConstruct&&o.currentConstruct.concrete)return E(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(X1,p,y)(w)}function p(w){return o&&O(),j(i),v(w)}function y(w){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,E(w)}function v(w){return t.containerState={},e.attempt(X1,b,E)(w)}function b(w){return i++,n.push([t.currentConstruct,t.containerState]),v(w)}function E(w){if(w===null){o&&O(),j(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),T(w)}function T(w){if(w===null){A(e.exit("chunkFlow"),!0),j(0),e.consume(w);return}return _e(w)?(e.consume(w),A(e.exit("chunkFlow")),i=0,t.interrupt=void 0,f):(e.consume(w),T)}function A(w,P){const D=t.sliceStream(w);if(P&&D.push(null),w.previous=u,u&&(u.next=w),u=w,o.defineSkip(w.start),o.write(D),t.parser.lazy[w.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 Y=t.events.length;let B=Y,J,ue;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(J){ue=t.events[B][1].end;break}J=!0}for(j(i),L=Y;L<t.events.length;)t.events[L][1].end={...ue},L++;zr(t.events,B+1,0,t.events.slice(Y)),t.events.length=L}}function j(w){let P=n.length;for(;P-- >w;){const D=n[P];t.containerState=D[1],D[0].exit.call(t,e)}n.length=w}function O(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function b3(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 K1(e){if(e===null||zn(e)||p3(e))return 1;if(m3(e))return 2}function kg(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!i.includes(u)&&(t=u(t,n),i.push(u))}return t}const hp={name:"attention",resolveAll:S3,tokenize:k3};function S3(e,t){let n=-1,i,o,u,l,f,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const y={...e[i][1].end},v={...e[n][1].start};J1(y,-d),J1(v,d),l={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},u={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...f.end}},e[i][1].end={...l.start},e[n][1].start={...f.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=er(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=er(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",u,t]]),h=er(h,kg(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=er(h,[["exit",u,t],["enter",f,t],["exit",f,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,zr(e,i-1,n-i+3,h),n=i+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function k3(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=K1(i);let u;return l;function l(d){return u=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===u)return e.consume(d),f;const h=e.exit("attentionSequence"),p=K1(d),y=!p||p===2&&o||n.includes(d),v=!o||o===2&&p||n.includes(i);return h._open=!!(u===42?y:y&&(o||!v)),h._close=!!(u===42?v:v&&(p||!y)),t(d)}}function J1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const w3={name:"autolink",tokenize:z3};function z3(e,t,n){let i=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return Sr(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||$n(b)?(i=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),i=0,d):(b===43||b===45||b===46||$n(b))&&i++<32?(e.consume(b),f):(i=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||fp(b)?n(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),p):f3(b)?(e.consume(b),h):n(b)}function p(b){return $n(b)?y(b):n(b)}function y(b){return b===46?(e.consume(b),i=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||$n(b))&&i++<63){const E=b===45?v:y;return e.consume(b),E}return n(b)}}const Wc={partial:!0,tokenize:_3};function _3(e,t,n){return i;function i(u){return Fe(u)?st(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||_e(u)?t(u):n(u)}}const Qz={continuation:{tokenize:T3},exit:C3,name:"blockQuote",tokenize:E3};function E3(e,t,n){const i=this;return o;function o(l){if(l===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),u}return n(l)}function u(l){return Fe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function T3(e,t,n){const i=this;return o;function o(l){return Fe(l)?st(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt(Qz,t,n)(l)}}function C3(e){e.exit("blockQuote")}const Wz={name:"characterEscape",tokenize:A3};function A3(e,t,n){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return h3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const e_={name:"characterReference",tokenize:j3};function j3(e,t,n){const i=this;let o=0,u,l;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,l=$n,p(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=d3,p):(e.enter("characterReferenceValue"),u=7,l=dp,p(y))}function p(y){if(y===59&&o){const v=e.exit("characterReferenceValue");return l===$n&&!Sg(i.sliceSerialize(v))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(y)&&o++<u?(e.consume(y),p):n(y)}}const Q1={partial:!0,tokenize:O3},W1={concrete:!0,name:"codeFenced",tokenize:N3};function N3(e,t,n){const i=this,o={partial:!0,tokenize:D};let u=0,l=0,f;return d;function d(L){return h(L)}function h(L){const Y=i.events[i.events.length-1];return u=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===f?(l++,e.consume(L),p):l<3?n(L):(e.exit("codeFencedFenceSequence"),Fe(L)?st(e,y,"whitespace")(L):y(L))}function y(L){return L===null||_e(L)?(e.exit("codeFencedFence"),i.interrupt?t(L):e.check(Q1,T,P)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(L))}function v(L){return L===null||_e(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(L)):Fe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),st(e,b,"whitespace")(L)):L===96&&L===f?n(L):(e.consume(L),v)}function b(L){return L===null||_e(L)?y(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(L))}function E(L){return L===null||_e(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(L)):L===96&&L===f?n(L):(e.consume(L),E)}function T(L){return e.attempt(o,P,A)(L)}function A(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),j}function j(L){return u>0&&Fe(L)?st(e,O,"linePrefix",u+1)(L):O(L)}function O(L){return L===null||_e(L)?e.check(Q1,T,P)(L):(e.enter("codeFlowValue"),w(L))}function w(L){return L===null||_e(L)?(e.exit("codeFlowValue"),O(L)):(e.consume(L),w)}function P(L){return e.exit("codeFenced"),t(L)}function D(L,Y,B){let J=0;return ue;function ue(ne){return L.enter("lineEnding"),L.consume(ne),L.exit("lineEnding"),$}function $(ne){return L.enter("codeFencedFence"),Fe(ne)?st(L,ie,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):ie(ne)}function ie(ne){return ne===f?(L.enter("codeFencedFenceSequence"),ve(ne)):B(ne)}function ve(ne){return ne===f?(J++,L.consume(ne),ve):J>=l?(L.exit("codeFencedFenceSequence"),Fe(ne)?st(L,se,"whitespace")(ne):se(ne)):B(ne)}function se(ne){return ne===null||_e(ne)?(L.exit("codeFencedFence"),Y(ne)):B(ne)}}}function O3(e,t,n){const i=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 i.parser.lazy[i.now().line]?n(l):t(l)}}const am={name:"codeIndented",tokenize:M3},R3={partial:!0,tokenize:D3};function M3(e,t,n){const i=this;return o;function o(h){return e.enter("codeIndented"),st(e,u,"linePrefix",5)(h)}function u(h){const p=i.events[i.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?d(h):_e(h)?e.attempt(R3,l,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||_e(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function D3(e,t,n){const i=this;return o;function o(l){return i.parser.lazy[i.now().line]?n(l):_e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):st(e,u,"linePrefix",5)(l)}function u(l){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(l):_e(l)?o(l):n(l)}}const $3={name:"codeText",previous:U3,resolve:L3,tokenize:P3};function L3(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function U3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function P3(e,t,n){let i=0,o,u;return l;function l(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),i++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(u=e.enter("codeTextSequence"),o=0,p(y)):_e(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||_e(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function p(y){return y===96?(e.consume(y),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(u.type="codeTextData",h(y))}}class V3{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&Ks(this.left,i),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),Ks(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ks(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);Ks(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ks(this.left,n.reverse())}}}function Ks(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 t_(e){const t={};let n=-1,i,o,u,l,f,d,h;const p=new V3(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,u=0,u<d.length&&d[u][1].type==="lineEndingBlank"&&(u+=2),u<d.length&&d[u][1].type==="content"))for(;++u<d.length&&d[u][1].type!=="content";)d[u][1].type==="chunkText"&&(d[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,Z3(p,n)),n=t[n],h=!0);else if(i[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&&(i[1].end={...p.get(o)[1].start},f=p.slice(o,n),f.unshift(i),p.splice(o,n-o+1,f))}}return zr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function Z3(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const u=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const f=l.events,d=[],h={};let p,y,v=-1,b=n,E=0,T=0;const A=[T];for(;b;){for(;e.get(++o)[1]!==b;);u.push(o),b._tokenizer||(p=i.sliceStream(b),b.next||p.push(null),y&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=n;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(T=v+1,A.push(T),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):A.pop(),v=A.length;v--;){const j=f.slice(A[v],A[v+1]),O=u.pop();d.push([O,O+j.length-1]),e.splice(O,2,j)}for(d.reverse(),v=-1;++v<d.length;)h[E+d[v][0]]=E+d[v][1],E+=d[v][1]-d[v][0]-1;return h}const B3={resolve:H3,tokenize:F3},I3={partial:!0,tokenize:q3};function H3(e){return t_(e),e}function F3(e,t){let n;return i;function i(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):_e(f)?e.check(I3,l,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function l(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function q3(e,t,n){const i=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||_e(l))return n(l);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function n_(e,t,n,i,o,u,l,f,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return y;function y(j){return j===60?(e.enter(i),e.enter(o),e.enter(u),e.consume(j),e.exit(u),v):j===null||j===32||j===41||fp(j)?n(j):(e.enter(i),e.enter(l),e.enter(f),e.enter("chunkString",{contentType:"string"}),T(j))}function v(j){return j===62?(e.enter(u),e.consume(j),e.exit(u),e.exit(o),e.exit(i),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===62?(e.exit("chunkString"),e.exit(f),v(j)):j===null||j===60||_e(j)?n(j):(e.consume(j),j===92?E:b)}function E(j){return j===60||j===62||j===92?(e.consume(j),b):b(j)}function T(j){return!p&&(j===null||j===41||zn(j))?(e.exit("chunkString"),e.exit(f),e.exit(l),e.exit(i),t(j)):p<h&&j===40?(e.consume(j),p++,T):j===41?(e.consume(j),p--,T):j===null||j===32||j===40||fp(j)?n(j):(e.consume(j),j===92?A:T)}function A(j){return j===40||j===41||j===92?(e.consume(j),T):T(j)}}function r_(e,t,n,i,o,u){const l=this;let f=0,d;return h;function h(b){return e.enter(i),e.enter(o),e.consume(b),e.exit(o),e.enter(u),p}function p(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(u),e.enter(o),e.consume(b),e.exit(o),e.exit(i),t):_e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||_e(b)||f++>999?(e.exit("chunkString"),p(b)):(e.consume(b),d||(d=!Fe(b)),b===92?v:y)}function v(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function i_(e,t,n,i,o,u){let l;return f;function f(v){return v===34||v===39||v===40?(e.enter(i),e.enter(o),e.consume(v),e.exit(o),l=v===40?41:v,d):n(v)}function d(v){return v===l?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):(e.enter(u),h(v))}function h(v){return v===l?(e.exit(u),d(l)):v===null?n(v):_e(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),st(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===l||v===null||_e(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?y:p)}function y(v){return v===l||v===92?(e.consume(v),p):p(v)}}function cl(e,t){let n;return i;function i(o){return _e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Fe(o)?st(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const G3={name:"definition",tokenize:X3},Y3={partial:!0,tokenize:K3};function X3(e,t,n){const i=this;let o;return u;function u(b){return e.enter("definition"),l(b)}function l(b){return r_.call(i,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=Co(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return zn(b)?cl(e,h)(b):h(b)}function h(b){return n_(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(Y3,y,y)(b)}function y(b){return Fe(b)?st(e,v,"whitespace")(b):v(b)}function v(b){return b===null||_e(b)?(e.exit("definition"),i.parser.defined.push(o),t(b)):n(b)}}function K3(e,t,n){return i;function i(f){return zn(f)?cl(e,o)(f):n(f)}function o(f){return i_(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Fe(f)?st(e,l,"whitespace")(f):l(f)}function l(f){return f===null||_e(f)?t(f):n(f)}}const J3={name:"hardBreakEscape",tokenize:Q3};function Q3(e,t,n){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return _e(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const W3={name:"headingAtx",resolve:e$,tokenize:t$};function e$(e,t){let n=e.length-2,i=3,o,u;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},u={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},zr(e,i,n-i+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function t$(e,t,n){let i=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&&i++<6?(e.consume(p),l):p===null||zn(p)?(e.exit("atxHeadingSequence"),f(p)):n(p)}function f(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||_e(p)?(e.exit("atxHeading"),t(p)):Fe(p)?st(e,f,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),f(p))}function h(p){return p===null||p===35||zn(p)?(e.exit("atxHeadingText"),f(p)):(e.consume(p),h)}}const n$=["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"],eS=["pre","script","style","textarea"],r$={concrete:!0,name:"htmlFlow",resolveTo:o$,tokenize:s$},i$={partial:!0,tokenize:u$},a$={partial:!0,tokenize:l$};function o$(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 s$(e,t,n){const i=this;let o,u,l,f,d;return h;function h(z){return p(z)}function p(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),y}function y(z){return z===33?(e.consume(z),v):z===47?(e.consume(z),u=!0,T):z===63?(e.consume(z),o=3,i.interrupt?t:N):Sr(z)?(e.consume(z),l=String.fromCharCode(z),A):n(z)}function v(z){return z===45?(e.consume(z),o=2,b):z===91?(e.consume(z),o=5,f=0,E):Sr(z)?(e.consume(z),o=4,i.interrupt?t:N):n(z)}function b(z){return z===45?(e.consume(z),i.interrupt?t:N):n(z)}function E(z){const ae="CDATA[";return z===ae.charCodeAt(f++)?(e.consume(z),f===ae.length?i.interrupt?t:ie:E):n(z)}function T(z){return Sr(z)?(e.consume(z),l=String.fromCharCode(z),A):n(z)}function A(z){if(z===null||z===47||z===62||zn(z)){const ae=z===47,be=l.toLowerCase();return!ae&&!u&&eS.includes(be)?(o=1,i.interrupt?t(z):ie(z)):n$.includes(l.toLowerCase())?(o=6,ae?(e.consume(z),j):i.interrupt?t(z):ie(z)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(z):u?O(z):w(z))}return z===45||$n(z)?(e.consume(z),l+=String.fromCharCode(z),A):n(z)}function j(z){return z===62?(e.consume(z),i.interrupt?t:ie):n(z)}function O(z){return Fe(z)?(e.consume(z),O):ue(z)}function w(z){return z===47?(e.consume(z),ue):z===58||z===95||Sr(z)?(e.consume(z),P):Fe(z)?(e.consume(z),w):ue(z)}function P(z){return z===45||z===46||z===58||z===95||$n(z)?(e.consume(z),P):D(z)}function D(z){return z===61?(e.consume(z),L):Fe(z)?(e.consume(z),D):w(z)}function L(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),d=z,Y):Fe(z)?(e.consume(z),L):B(z)}function Y(z){return z===d?(e.consume(z),d=null,J):z===null||_e(z)?n(z):(e.consume(z),Y)}function B(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||zn(z)?D(z):(e.consume(z),B)}function J(z){return z===47||z===62||Fe(z)?w(z):n(z)}function ue(z){return z===62?(e.consume(z),$):n(z)}function $(z){return z===null||_e(z)?ie(z):Fe(z)?(e.consume(z),$):n(z)}function ie(z){return z===45&&o===2?(e.consume(z),V):z===60&&o===1?(e.consume(z),X):z===62&&o===4?(e.consume(z),C):z===63&&o===3?(e.consume(z),N):z===93&&o===5?(e.consume(z),ce):_e(z)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(i$,G,ve)(z)):z===null||_e(z)?(e.exit("htmlFlowData"),ve(z)):(e.consume(z),ie)}function ve(z){return e.check(a$,se,G)(z)}function se(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),ne}function ne(z){return z===null||_e(z)?ve(z):(e.enter("htmlFlowData"),ie(z))}function V(z){return z===45?(e.consume(z),N):ie(z)}function X(z){return z===47?(e.consume(z),l="",Z):ie(z)}function Z(z){if(z===62){const ae=l.toLowerCase();return eS.includes(ae)?(e.consume(z),C):ie(z)}return Sr(z)&&l.length<8?(e.consume(z),l+=String.fromCharCode(z),Z):ie(z)}function ce(z){return z===93?(e.consume(z),N):ie(z)}function N(z){return z===62?(e.consume(z),C):z===45&&o===2?(e.consume(z),N):ie(z)}function C(z){return z===null||_e(z)?(e.exit("htmlFlowData"),G(z)):(e.consume(z),C)}function G(z){return e.exit("htmlFlow"),t(z)}}function l$(e,t,n){const i=this;return o;function o(l){return _e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u):n(l)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function u$(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Wc,t,n)}}const c$={name:"htmlText",tokenize:f$};function f$(e,t,n){const i=this;let o,u,l;return f;function f(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),h):N===47?(e.consume(N),D):N===63?(e.consume(N),w):Sr(N)?(e.consume(N),B):n(N)}function h(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),u=0,E):Sr(N)?(e.consume(N),O):n(N)}function p(N){return N===45?(e.consume(N),b):n(N)}function y(N){return N===null?n(N):N===45?(e.consume(N),v):_e(N)?(l=y,X(N)):(e.consume(N),y)}function v(N){return N===45?(e.consume(N),b):y(N)}function b(N){return N===62?V(N):N===45?v(N):y(N)}function E(N){const C="CDATA[";return N===C.charCodeAt(u++)?(e.consume(N),u===C.length?T:E):n(N)}function T(N){return N===null?n(N):N===93?(e.consume(N),A):_e(N)?(l=T,X(N)):(e.consume(N),T)}function A(N){return N===93?(e.consume(N),j):T(N)}function j(N){return N===62?V(N):N===93?(e.consume(N),j):T(N)}function O(N){return N===null||N===62?V(N):_e(N)?(l=O,X(N)):(e.consume(N),O)}function w(N){return N===null?n(N):N===63?(e.consume(N),P):_e(N)?(l=w,X(N)):(e.consume(N),w)}function P(N){return N===62?V(N):w(N)}function D(N){return Sr(N)?(e.consume(N),L):n(N)}function L(N){return N===45||$n(N)?(e.consume(N),L):Y(N)}function Y(N){return _e(N)?(l=Y,X(N)):Fe(N)?(e.consume(N),Y):V(N)}function B(N){return N===45||$n(N)?(e.consume(N),B):N===47||N===62||zn(N)?J(N):n(N)}function J(N){return N===47?(e.consume(N),V):N===58||N===95||Sr(N)?(e.consume(N),ue):_e(N)?(l=J,X(N)):Fe(N)?(e.consume(N),J):V(N)}function ue(N){return N===45||N===46||N===58||N===95||$n(N)?(e.consume(N),ue):$(N)}function $(N){return N===61?(e.consume(N),ie):_e(N)?(l=$,X(N)):Fe(N)?(e.consume(N),$):J(N)}function ie(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,ve):_e(N)?(l=ie,X(N)):Fe(N)?(e.consume(N),ie):(e.consume(N),se)}function ve(N){return N===o?(e.consume(N),o=void 0,ne):N===null?n(N):_e(N)?(l=ve,X(N)):(e.consume(N),ve)}function se(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||zn(N)?J(N):(e.consume(N),se)}function ne(N){return N===47||N===62||zn(N)?J(N):n(N)}function V(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function X(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Z}function Z(N){return Fe(N)?st(e,ce,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ce(N)}function ce(N){return e.enter("htmlTextData"),l(N)}}const wg={name:"labelEnd",resolveAll:p$,resolveTo:g$,tokenize:y$},d$={tokenize:x$},h$={tokenize:v$},m$={tokenize:b$};function p$(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&zr(e,0,e.length,n),e}function g$(e,t){let n=e.length,i=0,o,u,l,f;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")){i=2;break}}else o.type==="labelEnd"&&(l=n);const d={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+i+2][1].end},end:{...e[l-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=er(f,e.slice(u+1,u+i+3)),f=er(f,[["enter",p,t]]),f=er(f,kg(t.parser.constructs.insideSpan.null,e.slice(u+i+4,l-3),t)),f=er(f,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),f=er(f,e.slice(l+1)),f=er(f,[["exit",d,t]]),zr(e,u,e.length,f),e}function y$(e,t,n){const i=this;let o=i.events.length,u,l;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){u=i.events[o][1];break}return f;function f(v){return u?u._inactive?y(v):(l=i.parser.defined.includes(Co(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(d$,p,l?p:y)(v):v===91?e.attempt(h$,p,l?h:y)(v):l?p(v):y(v)}function h(v){return e.attempt(m$,p,y)(v)}function p(v){return t(v)}function y(v){return u._balanced=!0,n(v)}}function x$(e,t,n){return i;function i(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return zn(y)?cl(e,u)(y):u(y)}function u(y){return y===41?p(y):n_(e,l,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function l(y){return zn(y)?cl(e,d)(y):p(y)}function f(y){return n(y)}function d(y){return y===34||y===39||y===40?i_(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):p(y)}function h(y){return zn(y)?cl(e,p)(y):p(y)}function p(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function v$(e,t,n){const i=this;return o;function o(f){return r_.call(i,e,u,l,"reference","referenceMarker","referenceString")(f)}function u(f){return i.parser.defined.includes(Co(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function l(f){return n(f)}}function b$(e,t,n){return i;function i(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 S$={name:"labelStartImage",resolveAll:wg.resolveAll,tokenize:k$};function k$(e,t,n){const i=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),l):n(f)}function l(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(f):t(f)}}const w$={name:"labelStartLink",resolveAll:wg.resolveAll,tokenize:z$};function z$(e,t,n){const i=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 i.parser.constructs?n(l):t(l)}}const om={name:"lineEnding",tokenize:_$};function _$(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),st(e,t,"linePrefix")}}const wc={name:"thematicBreak",tokenize:E$};function E$(e,t,n){let i=0,o;return u;function u(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||_e(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Fe(h)?st(e,f,"whitespace")(h):f(h))}}const wn={continuation:{tokenize:j$},exit:O$,name:"list",tokenize:A$},T$={partial:!0,tokenize:R$},C$={partial:!0,tokenize:N$};function A$(e,t,n){const i=this,o=i.events[i.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return f;function f(b){const E=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:dp(b)){if(i.containerState.type||(i.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(wc,n,h)(b):h(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return dp(b)&&++l<10?(e.consume(b),d):(!i.interrupt||l<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check(Wc,i.interrupt?n:p,e.attempt(T$,v,y))}function p(b){return i.containerState.initialBlankLine=!0,u++,v(b)}function y(b){return Fe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):n(b)}function v(b){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function j$(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Wc,o,u);function o(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,st(e,t,"listItemIndent",i.containerState.size+1)(f)}function u(f){return i.containerState.furtherBlankLines||!Fe(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(C$,t,l)(f))}function l(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,st(e,e.attempt(wn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function N$(e,t,n){const i=this;return st(e,o,"listItemIndent",i.containerState.size+1);function o(u){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(u):n(u)}}function O$(e){e.exit(this.containerState.type)}function R$(e,t,n){const i=this;return st(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const l=i.events[i.events.length-1];return!Fe(u)&&l&&l[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const tS={name:"setextUnderline",resolveTo:M$,tokenize:D$};function M$(e,t){let n=e.length,i,o,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=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[i][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[i][1],t]),e[i][1].end={...e[u][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function D$(e,t,n){const i=this;let o;return u;function u(h){let p=i.events.length,y;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){y=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Fe(h)?st(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||_e(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const $$={tokenize:L$};function L$(e){const t=this,n=e.attempt(Wc,i,e.attempt(this.parser.constructs.flowInitial,o,st(e,e.attempt(this.parser.constructs.flow,o,e.attempt(B3,o)),"linePrefix")));return n;function i(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 U$={resolveAll:o_()},P$=a_("string"),V$=a_("text");function a_(e){return{resolveAll:o_(e==="text"?Z$:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],u=n.attempt(o,l,f);return l;function l(p){return h(p)?u(p):f(p)}function f(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),u(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const y=o[p];let v=-1;if(y)for(;++v<y.length;){const b=y[v];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function o_(e){return t;function t(n,i){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,i):n}}function Z$(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 i=e[n-1][1],o=t.sliceStream(i);let u=o.length,l=-1,f=0,d;for(;u--;){const h=o[u];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)f++,l--;if(l)break;l=-1}else if(h===-2)d=!0,f++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?l:i.start._bufferIndex+l,_index:i.start._index+u,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const B$={42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:Qz},I$={91:G3},H$={[-2]:am,[-1]:am,32:am},F$={35:W3,42:wc,45:[tS,wc],60:r$,61:tS,95:wc,96:W1,126:W1},q$={38:e_,92:Wz},G$={[-5]:om,[-4]:om,[-3]:om,33:S$,38:e_,42:hp,60:[w3,c$],91:w$,92:[J3,Wz],93:wg,95:hp,96:$3},Y$={null:[hp,U$]},X$={null:[42,95]},K$={null:[]},J$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:X$,contentInitial:I$,disable:K$,document:B$,flow:F$,flowInitial:H$,insideSpan:Y$,string:q$,text:G$},Symbol.toStringTag,{value:"Module"}));function Q$(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},u=[];let l=[],f=[];const d={attempt:Y(D),check:Y(L),consume:O,enter:w,exit:P,interrupt:Y(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:T,events:[],now:E,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:y};let p=t.tokenize.call(h,d);return t.resolveAll&&u.push(t),h;function y($){return l=er(l,$),A(),l[l.length-1]!==null?[]:(B(t,0),h.events=kg(u,h.events,h),h.events)}function v($,ie){return e5(b($),ie)}function b($){return W$(l,$)}function E(){const{_bufferIndex:$,_index:ie,line:ve,column:se,offset:ne}=i;return{_bufferIndex:$,_index:ie,line:ve,column:se,offset:ne}}function T($){o[$.line]=$.column,ue()}function A(){let $;for(;i._index<l.length;){const ie=l[i._index];if(typeof ie=="string")for($=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===$&&i._bufferIndex<ie.length;)j(ie.charCodeAt(i._bufferIndex));else j(ie)}}function j($){p=p($)}function O($){_e($)?(i.line++,i.column=1,i.offset+=$===-3?2:1,ue()):$!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=$}function w($,ie){const ve=ie||{};return ve.type=$,ve.start=E(),h.events.push(["enter",ve,h]),f.push(ve),ve}function P($){const ie=f.pop();return ie.end=E(),h.events.push(["exit",ie,h]),ie}function D($,ie){B($,ie.from)}function L($,ie){ie.restore()}function Y($,ie){return ve;function ve(se,ne,V){let X,Z,ce,N;return Array.isArray(se)?G(se):"tokenize"in se?G([se]):C(se);function C(pe){return ge;function ge(Ge){const De=Ge!==null&&pe[Ge],At=Ge!==null&&pe.null,on=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(At)?At:At?[At]:[]];return G(on)(Ge)}}function G(pe){return X=pe,Z=0,pe.length===0?V:z(pe[Z])}function z(pe){return ge;function ge(Ge){return N=J(),ce=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?be():pe.tokenize.call(ie?Object.assign(Object.create(h),ie):h,d,ae,be)(Ge)}}function ae(pe){return $(ce,N),ne}function be(pe){return N.restore(),++Z<X.length?z(X[Z]):V}}}function B($,ie){$.resolveAll&&!u.includes($)&&u.push($),$.resolve&&zr(h.events,ie,h.events.length-ie,$.resolve(h.events.slice(ie),h)),$.resolveTo&&(h.events=$.resolveTo(h.events,h))}function J(){const $=E(),ie=h.previous,ve=h.currentConstruct,se=h.events.length,ne=Array.from(f);return{from:se,restore:V};function V(){i=$,h.previous=ie,h.currentConstruct=ve,h.events.length=se,f=ne,ue()}}function ue(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function W$(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(i,u)];else{if(l=e.slice(n,o),i>-1){const f=l[0];typeof f=="string"?l[0]=f.slice(i):l.shift()}u>0&&l.push(e[o].slice(0,u))}return l}function e5(e,t){let n=-1;const i=[];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,i.push(l)}return i.join("")}function t5(e){const i={constructs:l3([J$,...(e||{}).extensions||[]]),content:o(g3),defined:[],document:o(x3),flow:o($$),lazy:{},string:o(P$),text:o(V$)};return i;function o(u){return l;function l(f){return Q$(i,u,f)}}}function n5(e){for(;!t_(e););return e}const nS=/[\0\t\n\r]/g;function r5(){let e=1,t="",n=!0,i;return o;function o(u,l,f){const d=[];let h,p,y,v,b;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(l||void 0).decode(u)),y=0,t="",n&&(u.charCodeAt(0)===65279&&y++,n=void 0);y<u.length;){if(nS.lastIndex=y,h=nS.exec(u),v=h&&h.index!==void 0?h.index:u.length,b=u.charCodeAt(v),!h){t=u.slice(y);break}if(b===10&&y===v&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),y<v&&(d.push(u.slice(y,v)),e+=v-y),b){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}y=v+1}return f&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}const i5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function a5(e){return e.replace(i5,o5)}function o5(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return Jz(n.slice(u?2:1),u?16:10)}return Sg(n)||e}const s_={}.hasOwnProperty;function s5(e,t,n){return typeof t!="string"&&(n=t,t=void 0),l5(n)(n5(t5(n).document().write(r5()(e,t,!0))))}function l5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Je),autolinkProtocol:J,autolinkEmail:J,atxHeading:u(Bi),blockQuote:u(At),characterEscape:J,characterReference:J,codeFenced:u(on),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(on,l),codeText:u(Un,l),codeTextData:J,data:J,codeFlowValue:J,definition:u(mr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(Pn),hardBreakEscape:u(Ze),hardBreakTrailing:u(Ze),htmlFlow:u(nt,l),htmlFlowData:J,htmlText:u(nt,l),htmlTextData:J,image:u(lt),label:l,link:u(Je),listItem:u(Vn),listItemValue:v,listOrdered:u(Ht,y),listUnordered:u(Ht),paragraph:u(Et),reference:z,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Bi),strong:u(Pt),thematicBreak:u(za)},exit:{atxHeading:d(),atxHeadingSequence:D,autolink:d(),autolinkEmail:De,autolinkProtocol:Ge,blockQuote:d(),characterEscapeValue:ue,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:pe,characterReference:ge,codeFenced:d(A),codeFencedFence:T,codeFencedFenceInfo:b,codeFencedFenceMeta:E,codeFlowValue:ue,codeIndented:d(j),codeText:d(ne),codeTextData:ue,data:ue,definition:d(),definitionDestinationString:P,definitionLabelString:O,definitionTitleString:w,emphasis:d(),hardBreakEscape:d(ie),hardBreakTrailing:d(ie),htmlFlow:d(ve),htmlFlowData:ue,htmlText:d(se),htmlTextData:ue,image:d(X),label:ce,labelText:Z,lineEnding:$,link:d(V),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ae,resourceDestinationString:N,resourceTitleString:C,resource:G,setextHeading:d(B),setextHeadingLineSequence:Y,setextHeadingText:L,strong:d(),thematicBreak:d()}};l_(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(Q){let le={type:"root",children:[]};const ye={stack:[le],tokenStack:[],config:t,enter:f,exit:h,buffer:l,resume:p,data:n},ze=[];let Pe=-1;for(;++Pe<Q.length;)if(Q[Pe][1].type==="listOrdered"||Q[Pe][1].type==="listUnordered")if(Q[Pe][0]==="enter")ze.push(Pe);else{const sn=ze.pop();Pe=o(Q,sn,Pe)}for(Pe=-1;++Pe<Q.length;){const sn=t[Q[Pe][0]];s_.call(sn,Q[Pe][1].type)&&sn[Q[Pe][1].type].call(Object.assign({sliceSerialize:Q[Pe][2].sliceSerialize},ye),Q[Pe][1])}if(ye.tokenStack.length>0){const sn=ye.tokenStack[ye.tokenStack.length-1];(sn[1]||rS).call(ye,void 0,sn[0])}for(le.position={start:zi(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:zi(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<t.transforms.length;)le=t.transforms[Pe](le)||le;return le}function o(Q,le,ye){let ze=le-1,Pe=-1,sn=!1,Tn,ln,Vt,pn;for(;++ze<=ye;){const rt=Q[ze];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?Pe++:Pe--,pn=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(Tn&&!pn&&!Pe&&!Vt&&(Vt=ze),pn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pn=void 0}if(!Pe&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||Pe===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(Tn){let Wr=ze;for(ln=void 0;Wr--;){const or=Q[Wr];if(or[1].type==="lineEnding"||or[1].type==="lineEndingBlank"){if(or[0]==="exit")continue;ln&&(Q[ln][1].type="lineEndingBlank",sn=!0),or[1].type="lineEnding",ln=Wr}else if(!(or[1].type==="linePrefix"||or[1].type==="blockQuotePrefix"||or[1].type==="blockQuotePrefixWhitespace"||or[1].type==="blockQuoteMarker"||or[1].type==="listItemIndent"))break}Vt&&(!ln||Vt<ln)&&(Tn._spread=!0),Tn.end=Object.assign({},ln?Q[ln][1].start:rt[1].end),Q.splice(ln||ze,0,["exit",Tn,rt[2]]),ze++,ye++}if(rt[1].type==="listItemPrefix"){const Wr={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};Tn=Wr,Q.splice(ze,0,["enter",Wr,rt[2]]),ze++,ye++,Vt=void 0,pn=!0}}}return Q[le][1]._spread=sn,ye}function u(Q,le){return ye;function ye(ze){f.call(this,Q(ze),ze),le&&le.call(this,ze)}}function l(){this.stack.push({type:"fragment",children:[]})}function f(Q,le,ye){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([le,ye||void 0]),Q.position={start:zi(le.start),end:void 0}}function d(Q){return le;function le(ye){Q&&Q.call(this,ye),h.call(this,ye)}}function h(Q,le){const ye=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==Q.type&&(le?le.call(this,Q,ze[0]):(ze[1]||rS).call(this,Q,ze[0]));else throw new Error("Cannot close `"+Q.type+"` ("+ul({start:Q.start,end:Q.end})+"): it’s not open");ye.position.end=zi(Q.end)}function p(){return o3(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(Q){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.lang=Q}function E(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.meta=Q}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q.replace(/(\r?\n|\r)$/g,"")}function O(Q){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.label=le,ye.identifier=Co(this.sliceSerialize(Q)).toLowerCase()}function w(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.title=Q}function P(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.url=Q}function D(Q){const le=this.stack[this.stack.length-1];if(!le.depth){const ye=this.sliceSerialize(Q).length;le.depth=ye}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function Y(Q){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function J(Q){const ye=this.stack[this.stack.length-1].children;let ze=ye[ye.length-1];(!ze||ze.type!=="text")&&(ze=ut(),ze.position={start:zi(Q.start),end:void 0},ye.push(ze)),this.stack.push(ze)}function ue(Q){const le=this.stack.pop();le.value+=this.sliceSerialize(Q),le.position.end=zi(Q.end)}function $(Q){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=le.children[le.children.length-1];ye.position.end=zi(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(J.call(this,Q),ue.call(this,Q))}function ie(){this.data.atHardBreak=!0}function ve(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function se(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function ne(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function V(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=le,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 le=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=le,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function Z(Q){const le=this.sliceSerialize(Q),ye=this.stack[this.stack.length-2];ye.label=a5(le),ye.identifier=Co(le).toLowerCase()}function ce(){const Q=this.stack[this.stack.length-1],le=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const ze=Q.children;ye.children=ze}else ye.alt=le}function N(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.url=Q}function C(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.title=Q}function G(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function ae(Q){const le=this.resume(),ye=this.stack[this.stack.length-1];ye.label=le,ye.identifier=Co(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function be(Q){this.data.characterReferenceType=Q.type}function pe(Q){const le=this.sliceSerialize(Q),ye=this.data.characterReferenceType;let ze;ye?(ze=Jz(le,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=Sg(le);const Pe=this.stack[this.stack.length-1];Pe.value+=ze}function ge(Q){const le=this.stack.pop();le.position.end=zi(Q.end)}function Ge(Q){ue.call(this,Q);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(Q)}function De(Q){ue.call(this,Q);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(Q)}function At(){return{type:"blockquote",children:[]}}function on(){return{type:"code",lang:null,meta:null,value:""}}function Un(){return{type:"inlineCode",value:""}}function mr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pn(){return{type:"emphasis",children:[]}}function Bi(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function nt(){return{type:"html",value:""}}function lt(){return{type:"image",title:null,url:"",alt:null}}function Je(){return{type:"link",title:null,url:"",children:[]}}function Ht(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function Vn(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function Pt(){return{type:"strong",children:[]}}function ut(){return{type:"text",value:""}}function za(){return{type:"thematicBreak"}}}function zi(e){return{line:e.line,column:e.column,offset:e.offset}}function l_(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?l_(e,i):u5(e,i)}}function u5(e,t){let n;for(n in t)if(s_.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function rS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ul({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ul({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ul({start:t.start,end:t.end})+") is still open")}function c5(e){const t=this;t.parser=n;function n(i){return s5(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function f5(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 d5(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
23
|
+
`}]}function h5(e,t){const n=t.value?t.value+`
|
|
24
|
+
`:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:i,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 m5(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function p5(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g5(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=Go(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let l,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=u+1,f+=1,e.footnoteCounts.set(i,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function y5(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 x5(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function u_(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];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+=i:o.push({type:"text",value:i}),o}function v5(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return u_(e,t);const o={src:Go(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function b5(e,t){const n={src:Go(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function S5(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function k5(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return u_(e,t);const o={href:Go(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function w5(e,t){const n={href:Go(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function z5(e,t,n){const i=e.all(t),o=n?_5(n):c_(t),u={},l=[];if(typeof t.checked=="boolean"){const p=i[0];let y;p&&p.type==="element"&&p.tagName==="p"?y=p:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const p=i[f];(o||f!==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 d=i[i.length-1];d&&(o||d.type!=="element"||d.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 _5(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=c_(n[i])}return t}function c_(e){const t=e.spread;return t??e.children.length>1}function E5(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const l=i[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(i,!0)};return e.patch(t,u),e.applyData(t,u)}function T5(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C5(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function A5(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function j5(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!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)},f=yg(t.children[1]),d=Hz(t.children[t.children.length-1]);f&&d&&(l.position={start:f,end:d}),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 N5(e,t,n){const i=n?n.children:void 0,u=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,f=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const y=t.children[d],v={},b=l?l[d]:void 0;b&&(v.align=b);let E={type:"element",tagName:u,properties:v,children:[]};y&&(E.children=e.all(y),e.patch(y,E),E=e.applyData(y,E)),h.push(E)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function O5(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const iS=9,aS=32;function R5(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const u=[];for(;i;)u.push(oS(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return u.push(oS(t.slice(o),o>0,!1)),u.join("")}function oS(e,t,n){let i=0,o=e.length;if(t){let u=e.codePointAt(i);for(;u===iS||u===aS;)i++,u=e.codePointAt(i)}if(n){let u=e.codePointAt(o-1);for(;u===iS||u===aS;)o--,u=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function M5(e,t){const n={type:"text",value:R5(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function D5(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $5={blockquote:f5,break:d5,code:h5,delete:m5,emphasis:p5,footnoteReference:g5,heading:y5,html:x5,imageReference:v5,image:b5,inlineCode:S5,linkReference:k5,link:w5,listItem:z5,list:E5,paragraph:T5,root:C5,strong:A5,table:j5,tableCell:O5,tableRow:N5,text:M5,thematicBreak:D5,toml:ic,yaml:ic,definition:ic,footnoteDefinition:ic};function ic(){}const f_=-1,ef=0,fl=1,Dc=2,zg=3,_g=4,Eg=5,Tg=6,d_=7,h_=8,sS=typeof self=="object"?self:globalThis,L5=(e,t)=>{const n=(o,u)=>(e.set(u,o),o),i=o=>{if(e.has(o))return e.get(o);const[u,l]=t[o];switch(u){case ef:case f_:return n(l,o);case fl:{const f=n([],o);for(const d of l)f.push(i(d));return f}case Dc:{const f=n({},o);for(const[d,h]of l)f[i(d)]=i(h);return f}case zg:return n(new Date(l),o);case _g:{const{source:f,flags:d}=l;return n(new RegExp(f,d),o)}case Eg:{const f=n(new Map,o);for(const[d,h]of l)f.set(i(d),i(h));return f}case Tg:{const f=n(new Set,o);for(const d of l)f.add(i(d));return f}case d_:{const{name:f,message:d}=l;return n(new sS[f](d),o)}case h_: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:f}=new Uint8Array(l);return n(new DataView(f),l)}}return n(new sS[u](l),o)};return i},lS=e=>L5(new Map,e)(0),co="",{toString:U5}={},{keys:P5}=Object,Js=e=>{const t=typeof e;if(t!=="object"||!e)return[ef,t];const n=U5.call(e).slice(8,-1);switch(n){case"Array":return[fl,co];case"Object":return[Dc,co];case"Date":return[zg,co];case"RegExp":return[_g,co];case"Map":return[Eg,co];case"Set":return[Tg,co];case"DataView":return[fl,n]}return n.includes("Array")?[fl,n]:n.includes("Error")?[d_,n]:[Dc,n]},ac=([e,t])=>e===ef&&(t==="function"||t==="symbol"),V5=(e,t,n,i)=>{const o=(l,f)=>{const d=i.push(l)-1;return n.set(f,d),d},u=l=>{if(n.has(l))return n.get(l);let[f,d]=Js(l);switch(f){case ef:{let p=l;switch(d){case"bigint":f=h_,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([f_],l)}return o([f,p],l)}case fl:{if(d){let v=l;return d==="DataView"?v=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(l)),o([d,[...v]],l)}const p=[],y=o([f,p],l);for(const v of l)p.push(u(v));return y}case Dc:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return u(l.toJSON());const p=[],y=o([f,p],l);for(const v of P5(l))(e||!ac(Js(l[v])))&&p.push([u(v),u(l[v])]);return y}case zg:return o([f,l.toISOString()],l);case _g:{const{source:p,flags:y}=l;return o([f,{source:p,flags:y}],l)}case Eg:{const p=[],y=o([f,p],l);for(const[v,b]of l)(e||!(ac(Js(v))||ac(Js(b))))&&p.push([u(v),u(b)]);return y}case Tg:{const p=[],y=o([f,p],l);for(const v of l)(e||!ac(Js(v)))&&p.push(u(v));return y}}const{message:h}=l;return o([f,{name:d,message:h}],l)};return u},uS=(e,{json:t,lossy:n}={})=>{const i=[];return V5(!(t||n),!!t,new Map,i)(e),i},$c=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?lS(uS(e,t)):structuredClone(e):(e,t)=>lS(uS(e,t));function Z5(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 B5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function I5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Z5,i=e.options.footnoteBackLabel||B5,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),y=String(h.identifier).toUpperCase(),v=Go(y.toLowerCase());let b=0;const E=[],T=e.footnoteCounts.get(y);for(;T!==void 0&&++b<=T;){E.length>0&&E.push({type:"text",value:" "});let O=typeof n=="string"?n:n(d,b);typeof O=="string"&&(O={type:"text",value:O}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,b),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const O=A.children[A.children.length-1];O&&O.type==="text"?O.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...E)}else p.push(...E);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(p,!0)};e.patch(h,j),f.push(j)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...$c(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
27
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
28
|
+
`}]}}const m_=(function(e){if(e==null)return G5;if(typeof e=="function")return tf(e);if(typeof e=="object")return Array.isArray(e)?H5(e):F5(e);if(typeof e=="string")return q5(e);throw new Error("Expected function, string, or object as test")});function H5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=m_(e[n]);return tf(i);function i(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function F5(e){const t=e;return tf(n);function n(i){const o=i;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function q5(e){return tf(t);function t(n){return n&&n.type===e}}function tf(e){return t;function t(n,i,o){return!!(Y5(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function G5(){return!0}function Y5(e){return e!==null&&typeof e=="object"&&"type"in e}const p_=[],X5=!0,cS=!1,K5="skip";function J5(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const u=m_(o),l=i?-1:1;f(e,void 0,[])();function f(d,h,p){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=p_,E,T,A;if((!t||u(d,h,p[p.length-1]||void 0))&&(b=Q5(n(d,p)),b[0]===cS))return b;if("children"in d&&d.children){const j=d;if(j.children&&b[0]!==K5)for(T=(i?j.children.length:-1)+l,A=p.concat(j);T>-1&&T<j.children.length;){const O=j.children[T];if(E=f(O,T,A)(),E[0]===cS)return E;T=typeof E[1]=="number"?E[1]:T+l}}return b}}}function Q5(e){return Array.isArray(e)?e:typeof e=="number"?[X5,e]:e==null?p_:[e]}function g_(e,t,n,i){let o,u,l;typeof t=="function"&&typeof n!="function"?(u=void 0,l=t,o=n):(u=t,l=n,o=i),J5(e,u,f,o);function f(d,h){const p=h[h.length-1],y=p?p.children.indexOf(d):void 0;return l(d,y,p)}}const mp={}.hasOwnProperty,W5={};function e6(e,t){const n=t||W5,i=new Map,o=new Map,u=new Map,l={...$5,...n.handlers},f={all:h,applyData:n6,definitionById:i,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:l,one:d,options:n,patch:t6,wrap:i6};return g_(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const y=p.type==="definition"?i:o,v=String(p.identifier).toUpperCase();y.has(v)||y.set(v,p)}}),f;function d(p,y){const v=p.type,b=f.handlers[v];if(mp.call(f.handlers,v)&&b)return b(f,p,y);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in p){const{children:T,...A}=p,j=$c(A);return j.children=f.all(p),j}return $c(p)}return(f.options.unknownHandler||r6)(f,p,y)}function h(p){const y=[];if("children"in p){const v=p.children;let b=-1;for(;++b<v.length;){const E=f.one(v[b],p);if(E){if(b&&v[b-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=fS(E.value)),!Array.isArray(E)&&E.type==="element")){const T=E.children[0];T&&T.type==="text"&&(T.value=fS(T.value))}Array.isArray(E)?y.push(...E):y.push(E)}}}return y}}function t6(e,t){e.position&&(t.position=UD(e))}function n6(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&u&&Object.assign(n.properties,$c(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function r6(e,t){const n=t.data||{},i="value"in t&&!(mp.call(n,"hProperties")||mp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function i6(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
29
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
30
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
31
|
+
`}),n}function fS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function dS(e,t){const n=e6(e,t),i=n.one(e,void 0),o=I5(n),u=Array.isArray(i)?{type:"root",children:i}:i||{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,i){const o=dS(n,{file:i,...t});await e.run(o,i)}:function(n,i){return dS(n,{file:i,...e||t})}}function hS(e){if(e)throw e}var sm,mS;function o6(){if(mS)return sm;mS=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=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"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!y)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},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},f=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(i)return i(h,p).value}else return;return h[p]};return sm=function d(){var h,p,y,v,b,E,T=arguments[0],A=1,j=arguments.length,O=!1;for(typeof T=="boolean"&&(O=T,T=arguments[1]||{},A=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});A<j;++A)if(h=arguments[A],h!=null)for(p in h)y=f(T,p),v=f(h,p),T!==v&&(O&&v&&(u(v)||(b=o(v)))?(b?(b=!1,E=y&&o(y)?y:[]):E=y&&u(y)?y:{},l(T,{name:p,newValue:d(O,E,v)})):typeof v<"u"&&l(T,{name:p,newValue:v}));return T},sm}var s6=o6();const lm=zp(s6);function pp(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 l6(){const e=[],t={run:n,use:i};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);f(null,...o);function f(d,...h){const p=e[++u];let y=-1;if(d){l(d);return}for(;++y<o.length;)(h[y]===null||h[y]===void 0)&&(h[y]=o[y]);o=h,p?u6(p,f)(...h):l(null,...h)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function u6(e,t){let n;return i;function i(...l){const f=e.length>l.length;let d;f&&l.push(o);try{d=e.apply(this,l)}catch(h){const p=h;if(f&&n)throw p;return o(p)}f||(d&&d.then&&typeof d.then=="function"?d.then(u,o):d instanceof Error?o(d):u(d))}function o(l,...f){n||(n=!0,t(l,...f))}function u(l){o(null,l)}}const vr={basename:c6,dirname:f6,extname:d6,join:h6,sep:"/"};function c6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ml(e);let n=0,i=-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 i<0&&(u=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else l<0&&(u=!0,l=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(i=o):(f=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function f6(e){if(Ml(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function d6(e){Ml(e);let t=e.length,n=-1,i=0,o=-1,u=0,l;for(;t--;){const f=e.codePointAt(t);if(f===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),f===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===i+1?"":e.slice(o,n)}function h6(...e){let t=-1,n;for(;++t<e.length;)Ml(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":m6(n)}function m6(e){Ml(e);const t=e.codePointAt(0)===47;let n=p6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function p6(e,t){let n="",i=0,o=-1,u=0,l=-1,f,d;for(;++l<=e.length;){if(l<e.length)f=e.codePointAt(l);else{if(f===47)break;f=47}if(f===47){if(!(o===l-1||u===1))if(o!==l-1&&u===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),o=l,u=0;continue}}else if(n.length>0){n="",i=0,o=l,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),i=l-o-1;o=l,u=0}else f===46&&u>-1?u++:u=-1}return n}function Ml(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const g6={cwd:y6};function y6(){return"/"}function gp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function x6(e){if(typeof e=="string")e=new URL(e);else if(!gp(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 v6(e)}function v6(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===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 um=["history","path","basename","stem","extname","dirname"];class y_{constructor(t){let n;t?gp(t)?n={path:t}:typeof t=="string"||b6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":g6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<um.length;){const u=um[i];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let o;for(o in n)um.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(t){fm(t,"basename"),cm(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){pS(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(cm(t,"extname"),pS(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){gp(t)&&(t=x6(t)),fm(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){fm(t,"stem"),cm(t,"stem"),this.path=vr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new an(t,n,i);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 cm(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function fm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function pS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function b6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const S6=(function(e){const i=this.constructor.prototype,o=i[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),k6={}.hasOwnProperty;class Cg extends S6{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=l6()}copy(){const t=new Cg;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(lm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(mm("data",this.frozen),this.namespace[t]=n,this):k6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(mm("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=oc(t),i=this.parser||this.Parser;return dm("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),dm("process",this.parser||this.Parser),hm("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,l){const f=oc(t),d=i.parse(f);i.run(d,f,function(p,y,v){if(p||!y||!v)return h(p);const b=y,E=i.stringify(b,v);_6(E)?v.value=E:v.result=E,h(p,v)});function h(p,y){p||!y?l(p):u?u(y):n(void 0,y)}}}processSync(t){let n=!1,i;return this.freeze(),dm("processSync",this.parser||this.Parser),hm("processSync",this.compiler||this.Compiler),this.process(t,o),yS("processSync","process",n),i;function o(u,l){n=!0,hS(u),i=l}}run(t,n,i){gS(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?u(void 0,i):new Promise(u);function u(l,f){const d=oc(n);o.run(t,d,h);function h(p,y,v){const b=y||t;p?f(p):l?l(b):i(void 0,b,v)}}}runSync(t,n){let i=!1,o;return this.run(t,n,u),yS("runSync","run",i),o;function u(l,f){hS(l),o=f,i=!0}}stringify(t,n){this.freeze();const i=oc(n),o=this.compiler||this.Compiler;return hm("stringify",o),gS(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(mm("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...y]=h;d(p,y)}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");f(h.plugins),h.settings&&(o.settings=lm(!0,o.settings,h.settings))}function f(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const y=h[p];u(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let y=-1,v=-1;for(;++y<i.length;)if(i[y][0]===h){v=y;break}if(v===-1)i.push([h,...p]);else if(p.length>0){let[b,...E]=p;const T=i[v][1];pp(T)&&pp(b)&&(b=lm(!0,T,b)),i[v]=[h,b,...E]}}}}const w6=new Cg().freeze();function dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mm(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 gS(e){if(!pp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function yS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function oc(e){return z6(e)?e:new y_(e)}function z6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _6(e){return typeof e=="string"||E6(e)}function E6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const T6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xS=[],vS={allowDangerousHtml:!0},C6=/^(https?|ircs?|mailto|xmpp)$/i,A6=[{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 j6(e){const t=N6(e),n=O6(e);return R6(t.runSync(t.parse(n),n),e)}function N6(e){const t=e.rehypePlugins||xS,n=e.remarkPlugins||xS,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vS}:vS;return w6().use(c5).use(n).use(a6,i).use(t)}function O6(e){const t=e.children||"",n=new y_;return typeof t=="string"&&(n.value=t),n}function R6(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,u=t.disallowedElements,l=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||M6;for(const p of A6)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+T6+p.id,void 0);return g_(e,h),ID(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(p,y,v){if(p.type==="raw"&&v&&typeof y=="number")return l?v.children.splice(y,1):v.children[y]={type:"text",value:p.value},y;if(p.type==="element"){let b;for(b in im)if(Object.hasOwn(im,b)&&Object.hasOwn(p.properties,b)){const E=p.properties[b],T=im[b];(T===null||T.includes(p.tagName))&&(p.properties[b]=d(String(E||""),b,p))}}if(p.type==="element"){let b=n?!n.includes(p.tagName):u?u.includes(p.tagName):!1;if(!b&&i&&typeof y=="number"&&(b=!i(p,y,v)),b&&v&&typeof y=="number")return f&&p.children?v.children.splice(y,1,...p.children):v.children.splice(y,1),y}}}function M6(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||C6.test(e.slice(0,t))?e:""}const D6=({messages:e,onSendMessage:t,isLoading:n,activeSessionId:i})=>{const[o,u]=_.useState(""),l=_.useRef(null),f=()=>{l.current?.scrollIntoView({behavior:"smooth"})};_.useEffect(()=>{f()},[e,n]);const d=h=>{h.preventDefault(),!(!o.trim()||n)&&(t(o),u(""))};return i?x.jsxs("div",{className:"flex-1 flex flex-col h-full bg-gray-50 dark:bg-black relative overflow-hidden transition-colors duration-300",children:[x.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6 min-h-0",children:[e.map((h,p)=>x.jsxs("div",{className:`flex gap-4 ${h.type==="human"?"justify-end":"justify-start"}`,children:[h.type!=="human"&&x.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"?x.jsx(Pk,{size:16}):x.jsx(i0,{size:18})}),x.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"?x.jsxs("div",{className:"overflow-x-auto",children:[x.jsx("p",{className:"text-xs text-gray-500 mb-1 font-sans font-semibold",children:"Tool Output:"}),x.jsx("pre",{className:"whitespace-pre-wrap break-all",children:typeof h.content=="string"?h.content:JSON.stringify(h.content,null,2)})]}):x.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:x.jsx(j6,{children:h.content})})}),h.type==="human"&&x.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:x.jsx(Bj,{size:18})})]},p)),n&&x.jsxs("div",{className:"flex gap-4 justify-start",children:[x.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:x.jsx(i0,{size:18})}),x.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:[x.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"0ms"}}),x.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"150ms"}}),x.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]}),x.jsx("div",{ref:l})]}),x.jsx("div",{className:"p-4 bg-white dark:bg-black border-t border-gray-200 dark:border-matrix-primary/30 shrink-0",children:x.jsxs("form",{onSubmit:d,className:"max-w-4xl mx-auto relative flex items-center gap-2",children:[x.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}),x.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:x.jsx(Oj,{size:20})})]})})]}):x.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:[x.jsx($6,{size:48,className:"mb-4 opacity-20"}),x.jsx("p",{children:"Select a session to start chatting or create a new one."})]})},$6=({size:e,className:t})=>x.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:x.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"})}),la={getSessions:async()=>at.get("/sessions"),createSession:async()=>at.post("/sessions",{}),deleteSession:async e=>at.delete(`/sessions/${e}`),renameSession:async(e,t)=>at.patch(`/sessions/${e}/title`,{title:t}),archiveSession:async e=>at.post(`/sessions/${e}/archive`,{}),getMessages:async e=>at.get(`/sessions/${e}/messages`),sendMessage:async(e,t)=>at.post("/chat",{sessionId:e,message:t})};function L6({isOpen:e,onClose:t,onConfirm:n,title:i,description:o,confirmJson:u="Confirm",variant:l="default"}){return x.jsx(Ro,{open:e,onOpenChange:t,children:x.jsxs(Mo,{className:"sm:max-w-md bg-azure-surface dark:bg-black border-azure-border dark:border-matrix-primary/30",children:[x.jsx(Do,{children:x.jsx($o,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:i})}),x.jsx("div",{className:"py-4",children:x.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary",children:o})}),x.jsxs(lD,{className:"flex flex-col sm:flex-row gap-3 sm:justify-end",children:[x.jsx(tr,{variant:"outline",onClick:t,className:"dark:border-matrix-primary/30 dark:text-matrix-secondary dark:hover:bg-matrix-primary/20",children:"Cancel"}),x.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 U6=()=>{const[e,t]=_.useState([]),[n,i]=_.useState(null),[o,u]=_.useState([]),[l,f]=_.useState(!1),[d,h]=_.useState(!0),[p,y]=_.useState({isOpen:!1,title:"",description:"",onConfirm:()=>{}}),v=async()=>{try{const w=await la.getSessions();t(w)}catch(w){console.error("Failed to load sessions:",w)}};_.useEffect(()=>{v()},[]),_.useEffect(()=>{n?b(n):u([])},[n]);const b=async w=>{try{const P=await la.getMessages(w);u(P.filter(D=>D.type!=="system"&&D.type!=="tool"))}catch(P){console.error("Failed to load messages:",P)}},E=async()=>{try{const w=await la.createSession();await v(),i(w.id)}catch(w){console.error("Failed to create session:",w)}},T=async w=>{if(!n)return;const P={type:"human",content:w};u(D=>[...D,P]),f(!0);try{await la.sendMessage(n,w),await b(n),await v()}catch(D){console.error("Failed to send message:",D)}finally{f(!1)}},A=w=>{y({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 la.archiveSession(w),n===w&&i(null),await v()}catch(P){console.error("Failed to archive session:",P)}}})},j=w=>{y({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 la.deleteSession(w),n===w&&i(null),await v()}catch(P){console.error("Failed to delete session:",P)}}})},O=async(w,P)=>{try{await la.renameSession(w,P),await v()}catch(D){console.error("Failed to rename session:",D)}};return x.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-gray-50 dark:bg-zinc-950",children:[x.jsx(mD,{sessions:e,activeSessionId:n,onSelectSession:i,onCreateSession:E,onArchiveSession:A,onDeleteSession:j,onRenameSession:O,isOpen:d,toggleSidebar:()=>h(!d)}),x.jsx("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:x.jsx(D6,{messages:o,onSendMessage:T,isLoading:l,activeSessionId:n})}),x.jsx(L6,{isOpen:p.isOpen,onClose:()=>y(w=>({...w,isOpen:!1})),onConfirm:p.onConfirm,title:p.title,description:p.description,confirmJson:p.confirmJson,variant:p.variant})]})};function _i({title:e,description:t,children:n}){return x.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:[x.jsxs("div",{className:"mb-4",children:[x.jsx("h3",{className:"text-lg font-medium text-azure-text-primary dark:text-matrix-highlight",children:e}),t&&x.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mt-1",children:t})]}),x.jsx("div",{className:"space-y-4",children:n})]})}const P6=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},V6=(e,t)=>({classGroupId:e,validator:t}),x_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Lc="-",bS=[],Z6="arbitrary..",B6=e=>{const t=H6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return I6(l);const f=l.split(Lc),d=f[0]===""&&f.length>1?1:0;return v_(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=i[l],h=n[l];return d?h?P6(h,d):d:h||bS}return n[l]||bS}}},v_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],u=n.nextPart.get(o);if(u){const h=v_(e,t+1,u);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(Lc):e.slice(t).join(Lc),d=l.length;for(let h=0;h<d;h++){const p=l[h];if(p.validator(f))return p.classGroupId}},I6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?Z6+i:void 0})(),H6=e=>{const{theme:t,classGroups:n}=e;return F6(n,t)},F6=(e,t)=>{const n=x_();for(const i in e){const o=e[i];Ag(o,n,i,t)}return n},Ag=(e,t,n,i)=>{const o=e.length;for(let u=0;u<o;u++){const l=e[u];q6(l,t,n,i)}},q6=(e,t,n,i)=>{if(typeof e=="string"){G6(e,t,n);return}if(typeof e=="function"){Y6(e,t,n,i);return}X6(e,t,n,i)},G6=(e,t,n)=>{const i=e===""?t:b_(t,e);i.classGroupId=n},Y6=(e,t,n,i)=>{if(K6(e)){Ag(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(V6(n,e))},X6=(e,t,n,i)=>{const o=Object.entries(e),u=o.length;for(let l=0;l<u;l++){const[f,d]=o[l];Ag(d,b_(t,f),n,i)}},b_=(e,t)=>{let n=e;const i=t.split(Lc),o=i.length;for(let u=0;u<o;u++){const l=i[u];let f=n.nextPart.get(l);f||(f=x_(),n.nextPart.set(l,f)),n=f}return n},K6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,J6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const o=(u,l)=>{n[u]=l,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(u){let l=n[u];if(l!==void 0)return l;if((l=i[u])!==void 0)return o(u,l),l},set(u,l){u in n?n[u]=l:o(u,l)}}},yp="!",SS=":",Q6=[],kS=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),W6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=o=>{const u=[];let l=0,f=0,d=0,h;const p=o.length;for(let T=0;T<p;T++){const A=o[T];if(l===0&&f===0){if(A===SS){u.push(o.slice(d,T)),d=T+1;continue}if(A==="/"){h=T;continue}}A==="["?l++:A==="]"?l--:A==="("?f++:A===")"&&f--}const y=u.length===0?o:o.slice(d);let v=y,b=!1;y.endsWith(yp)?(v=y.slice(0,-1),b=!0):y.startsWith(yp)&&(v=y.slice(1),b=!0);const E=h&&h>d?h-d:void 0;return kS(u,b,v,E)};if(t){const o=t+SS,u=i;i=l=>l.startsWith(o)?u(l.slice(o.length)):kS(Q6,!1,l,void 0,!0)}if(n){const o=i;i=u=>n({className:u,parseClassName:o})}return i},eL=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let u=0;u<n.length;u++){const l=n[u],f=l[0]==="[",d=t.has(l);f||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(l)):o.push(l)}return o.length>0&&(o.sort(),i.push(...o)),i}},tL=e=>({cache:J6(e.cacheSize),parseClassName:W6(e),sortModifiers:eL(e),...B6(e)}),nL=/\s+/,rL=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:u}=t,l=[],f=e.trim().split(nL);let d="";for(let h=f.length-1;h>=0;h-=1){const p=f[h],{isExternal:y,modifiers:v,hasImportantModifier:b,baseClassName:E,maybePostfixModifierPosition:T}=n(p);if(y){d=p+(d.length>0?" "+d:d);continue}let A=!!T,j=i(A?E.substring(0,T):E);if(!j){if(!A){d=p+(d.length>0?" "+d:d);continue}if(j=i(E),!j){d=p+(d.length>0?" "+d:d);continue}A=!1}const O=v.length===0?"":v.length===1?v[0]:u(v).join(":"),w=b?O+yp:O,P=w+j;if(l.indexOf(P)>-1)continue;l.push(P);const D=o(j,A);for(let L=0;L<D.length;++L){const Y=D[L];l.push(w+Y)}d=p+(d.length>0?" "+d:d)}return d},iL=(...e)=>{let t=0,n,i,o="";for(;t<e.length;)(n=e[t++])&&(i=S_(n))&&(o&&(o+=" "),o+=i);return o},S_=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=S_(e[i]))&&(n&&(n+=" "),n+=t);return n},aL=(e,...t)=>{let n,i,o,u;const l=d=>{const h=t.reduce((p,y)=>y(p),e());return n=tL(h),i=n.cache.get,o=n.cache.set,u=f,f(d)},f=d=>{const h=i(d);if(h)return h;const p=rL(d,n);return o(d,p),p};return u=l,(...d)=>u(iL(...d))},oL=[],Bt=e=>{const t=n=>n[e]||oL;return t.isThemeGetter=!0,t},k_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sL=/^\d+\/\d+$/,lL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uL=/\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$/,cL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>sL.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),Ei=e=>!!e&&Number.isInteger(Number(e)),pm=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Fr=e=>lL.test(e),hL=()=>!0,mL=e=>uL.test(e)&&!cL.test(e),z_=()=>!1,pL=e=>fL.test(e),gL=e=>dL.test(e),yL=e=>!de(e)&&!he(e),xL=e=>Yo(e,T_,z_),de=e=>k_.test(e),ua=e=>Yo(e,C_,mL),gm=e=>Yo(e,wL,Ne),wS=e=>Yo(e,__,z_),vL=e=>Yo(e,E_,gL),sc=e=>Yo(e,A_,pL),he=e=>w_.test(e),Qs=e=>Xo(e,C_),bL=e=>Xo(e,zL),zS=e=>Xo(e,__),SL=e=>Xo(e,T_),kL=e=>Xo(e,E_),lc=e=>Xo(e,A_,!0),Yo=(e,t,n)=>{const i=k_.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Xo=(e,t,n=!1)=>{const i=w_.exec(e);return i?i[1]?t(i[1]):n:!1},__=e=>e==="position"||e==="percentage",E_=e=>e==="image"||e==="url",T_=e=>e==="length"||e==="size"||e==="bg-size",C_=e=>e==="length",wL=e=>e==="number",zL=e=>e==="family-name",A_=e=>e==="shadow",_L=()=>{const e=Bt("color"),t=Bt("font"),n=Bt("text"),i=Bt("font-weight"),o=Bt("tracking"),u=Bt("leading"),l=Bt("breakpoint"),f=Bt("container"),d=Bt("spacing"),h=Bt("radius"),p=Bt("shadow"),y=Bt("inset-shadow"),v=Bt("text-shadow"),b=Bt("drop-shadow"),E=Bt("blur"),T=Bt("perspective"),A=Bt("aspect"),j=Bt("ease"),O=Bt("animate"),w=()=>["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(),he,de],L=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],B=()=>[he,de,d],J=()=>[fo,"full","auto",...B()],ue=()=>[Ei,"none","subgrid",he,de],$=()=>["auto",{span:["full",Ei,he,de]},Ei,he,de],ie=()=>[Ei,"auto",he,de],ve=()=>["auto","min","max","fr",he,de],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...B()],X=()=>[fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],Z=()=>[e,he,de],ce=()=>[...P(),zS,wS,{position:[he,de]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",SL,xL,{size:[he,de]}],G=()=>[pm,Qs,ua],z=()=>["","none","full",h,he,de],ae=()=>["",Ne,Qs,ua],be=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Ne,pm,zS,wS],Ge=()=>["","none",E,he,de],De=()=>["none",Ne,he,de],At=()=>["none",Ne,he,de],on=()=>[Ne,he,de],Un=()=>[fo,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[hL],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[yL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fr],shadow:[Fr],spacing:["px",Ne],text:[Fr],"text-shadow":[Fr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fo,de,he,A]}],container:["container"],columns:[{columns:[Ne,de,he,f]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],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:[Ei,"auto",he,de]}],basis:[{basis:[fo,"full","auto",f,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,fo,"auto","initial","none",de]}],grow:[{grow:["",Ne,he,de]}],shrink:[{shrink:["",Ne,he,de]}],order:[{order:[Ei,"first","last","none",he,de]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":ue()}],"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":ve()}],"auto-rows":[{"auto-rows":ve()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],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":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[f,"screen",...X()]}],"min-w":[{"min-w":[f,"screen","none",...X()]}],"max-w":[{"max-w":[f,"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,Qs,ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,he,gm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pm,de]}],"font-family":[{font:[bL,de,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,he,de]}],"line-clamp":[{"line-clamp":[Ne,"none",he,gm]}],leading:[{leading:[u,...B()]}],"list-image":[{"list-image":["none",he,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",he,ua]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Ne,"auto",he,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,de]}],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",he,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ei,he,de],radial:["",he,de],conic:[Ei,he,de]},kL,vL]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,he,de]}],"outline-w":[{outline:["",Ne,Qs,ua]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",p,lc,sc]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",y,lc,sc]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Ne,ua]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",v,lc,sc]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Ne,he,de]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[he,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,de]}],filter:[{filter:["","none",he,de]}],blur:[{blur:Ge()}],brightness:[{brightness:[Ne,he,de]}],contrast:[{contrast:[Ne,he,de]}],"drop-shadow":[{"drop-shadow":["","none",b,lc,sc]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Ne,he,de]}],"hue-rotate":[{"hue-rotate":[Ne,he,de]}],invert:[{invert:["",Ne,he,de]}],saturate:[{saturate:[Ne,he,de]}],sepia:[{sepia:["",Ne,he,de]}],"backdrop-filter":[{"backdrop-filter":["","none",he,de]}],"backdrop-blur":[{"backdrop-blur":Ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,he,de]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,he,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,he,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,he,de]}],"backdrop-invert":[{"backdrop-invert":["",Ne,he,de]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,he,de]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,he,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,he,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",he,de]}],ease:[{ease:["linear","initial",j,he,de]}],delay:[{delay:[Ne,he,de]}],animate:[{animate:["none",O,he,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,he,de]}],"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:At()}],"scale-x":[{"scale-x":At()}],"scale-y":[{"scale-y":At()}],"scale-z":[{"scale-z":At()}],"scale-3d":["scale-3d"],skew:[{skew:on()}],"skew-x":[{"skew-x":on()}],"skew-y":[{"skew-y":on()}],transform:[{transform:[he,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Un()}],"translate-x":[{"translate-x":Un()}],"translate-y":[{"translate-y":Un()}],"translate-z":[{"translate-z":Un()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,de]}],"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":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",he,de]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Ne,Qs,ua,gm]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ao=aL(_L);function Gt({label:e,error:t,helperText:n,className:i,...o}){return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),x.jsx("input",{className:Ao("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",i),...o}),n&&!t&&x.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&x.jsx("p",{className:"text-xs text-red-500",children:t})]})}function Ws({label:e,options:t,error:n,helperText:i,className:o,...u}){return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),x.jsx("select",{className:Ao("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=>x.jsx("option",{value:l.value,className:"bg-azure-bg dark:bg-matrix-base",children:l.label},l.value))}),i&&!n&&x.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:i}),n&&x.jsx("p",{className:"text-xs text-red-500",children:n})]})}function Ti({label:e,error:t,helperText:n,className:i,...o}){return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),x.jsx("input",{type:"number",className:Ao("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",i),...o}),n&&!t&&x.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&x.jsx("p",{className:"text-xs text-red-500",children:t})]})}function el({label:e,checked:t,onChange:n,helperText:i,disabled:o}){return x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{className:Ao("text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",o&&"opacity-50"),children:e}),i&&x.jsx("span",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:i})]}),x.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>!o&&n(!t),className:Ao("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:x.jsx("span",{className:Ao("inline-block h-4 w-4 transform rounded-full bg-white dark:bg-black transition-transform",t?"translate-x-6":"translate-x-1")})})]})}const ho={fetchConfig:async()=>at.get("/config"),updateConfig:async e=>at.post("/config",e),getSatiConfig:async()=>at.get("/config/sati"),updateSatiConfig:async e=>at.post("/config/sati",e),deleteSatiConfig:async()=>at.delete("/config/sati"),getApocConfig:async()=>at.get("/config/apoc"),updateApocConfig:async e=>at.post("/config/apoc",e),deleteApocConfig:async()=>at.delete("/config/apoc")};function W(e,t,n){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,p=Object.keys(h);for(let y=0;y<p.length;y++){const v=p[y];v in f||(f[v]=h[v].bind(f))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function l(f){var d;const h=n?.Parent?new u:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const p of h._zod.deferred)p();return h}return Object.defineProperty(l,"init",{value:i}),Object.defineProperty(l,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}let jo=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},j_=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};const N_={};function Mi(e){return N_}function O_(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,o])=>t.indexOf(+i)===-1).map(([i,o])=>o)}function xp(e,t){return typeof t=="bigint"?t.toString():t}function nf(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function jg(e){return e==null}function Ng(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function EL(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let o=(i.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(i)){const d=i.match(/\d?e-(\d?)/);d?.[1]&&(o=Number.parseInt(d[1]))}const u=n>o?n:o,l=Number.parseInt(e.toFixed(u).replace(".","")),f=Number.parseInt(t.toFixed(u).replace(".",""));return l%f/10**u}const _S=Symbol("evaluating");function qe(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==_S)return i===void 0&&(i=_S,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ka(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ui(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function ES(e){return JSON.stringify(e)}function TL(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const R_="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Sl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const CL=nf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Lo(e){if(Sl(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Sl(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function M_(e){return Lo(e)?{...e}:Array.isArray(e)?[...e]:e}const AL=new Set(["string","number","symbol"]);function Uo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Pi(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function Se(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 jL(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const NL={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 OL(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Ui(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return ka(this,"shape",l),l},checks:[]});return Pi(e,u)}function RL(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Ui(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return ka(this,"shape",l),l},checks:[]});return Pi(e,u)}function ML(e,t){if(!Lo(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=Ui(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return ka(this,"shape",u),u}});return Pi(e,o)}function DL(e,t){if(!Lo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ui(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return ka(this,"shape",i),i}});return Pi(e,n)}function $L(e,t){const n=Ui(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ka(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Pi(e,n)}function LL(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=Ui(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return ka(this,"shape",d),d},checks:[]});return Pi(t,l)}function UL(e,t,n){const i=Ui(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 ka(this,"shape",u),u}});return Pi(t,i)}function So(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 ko(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function uc(e){return typeof e=="string"?e:e?.message}function Di(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=uc(e.inst?._zod.def?.error?.(e))??uc(t?.error?.(e))??uc(n.customError?.(e))??uc(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Og(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function kl(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const D_=(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,xp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$_=W("$ZodError",D_),L_=W("$ZodError",D_,{Parent:Error});function PL(e,t=n=>n.message){const n={},i=[];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))):i.push(t(o));return{formErrors:i,fieldErrors:n}}function VL(e,t=n=>n.message){const n={_errors:[]},i=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)n._errors.push(t(u));else{let l=n,f=0;for(;f<u.path.length;){const d=u.path[f];f===u.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(u))):l[d]=l[d]||{_errors:[]},l=l[d],f++}}};return i(e),n}const Rg=e=>(t,n,i,o)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise)throw new jo;if(l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>Di(d,u,Mi())));throw R_(f,o?.callee),f}return l.value},Mg=e=>async(t,n,i,o)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>Di(d,u,Mi())));throw R_(f,o?.callee),f}return l.value},rf=e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new jo;return u.issues.length?{success:!1,error:new(e??$_)(u.issues.map(l=>Di(l,o,Mi())))}:{success:!0,data:u.value}},ZL=rf(L_),af=e=>async(t,n,i)=>{const o=i?Object.assign(i,{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=>Di(l,o,Mi())))}:{success:!0,data:u.value}},BL=af(L_),IL=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Rg(e)(t,n,o)},HL=e=>(t,n,i)=>Rg(e)(t,n,i),FL=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Mg(e)(t,n,o)},qL=e=>async(t,n,i)=>Mg(e)(t,n,i),GL=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return rf(e)(t,n,o)},YL=e=>(t,n,i)=>rf(e)(t,n,i),XL=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return af(e)(t,n,o)},KL=e=>async(t,n,i)=>af(e)(t,n,i),JL=/^[cC][^\s-]{8,}$/,QL=/^[0-9a-z]+$/,WL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,e9=/^[0-9a-vA-V]{20}$/,t9=/^[A-Za-z0-9]{27}$/,n9=/^[a-zA-Z0-9_-]{21}$/,r9=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,i9=/^([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})$/,TS=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 s9(){return new RegExp(o9,"u")}const l9=/^(?:(?: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])$/,u9=/^(([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}|:))$/,c9=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,f9=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,d9=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,U_=/^[A-Za-z0-9_-]*$/,h9=/^\+[1-9]\d{6,14}$/,P_="(?:(?:\\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])))",m9=new RegExp(`^${P_}$`);function V_(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 p9(e){return new RegExp(`^${V_(e)}$`)}function g9(e){const t=V_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${P_}T(?:${i})$`)}const y9=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},x9=/^-?\d+$/,Z_=/^-?\d+(?:\.\d+)?$/,v9=/^(?:true|false)$/i,b9=/^[^A-Z]*$/,S9=/^[^a-z]*$/,En=W("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),B_={number:"number",bigint:"bigint",object:"date"},I_=W("$ZodCheckLessThan",(e,t)=>{En.init(e,t);const n=B_[typeof t.value];e._zod.onattach.push(i=>{const o=i._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=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),H_=W("$ZodCheckGreaterThan",(e,t)=>{En.init(e,t);const n=B_[typeof t.value];e._zod.onattach.push(i=>{const o=i._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=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),k9=W("$ZodCheckMultipleOf",(e,t)=>{En.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.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):EL(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})}}),w9=W("$ZodCheckNumberFormat",(e,t)=>{En.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,u]=NL[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=o,f.maximum=u,n&&(f.pattern=x9)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}f<o&&l.issues.push({origin:"number",input:f,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),f>u&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}}),z9=W("$ZodCheckMaxLength",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!jg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const o=i.value;if(o.length<=t.maximum)return;const l=Og(o);i.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_9=W("$ZodCheckMinLength",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!jg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const o=i.value;if(o.length>=t.minimum)return;const l=Og(o);i.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),E9=W("$ZodCheckLengthEquals",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!jg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{const o=i.value,u=o.length;if(u===t.length)return;const l=Og(o),f=u>t.length;i.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),of=W("$ZodCheckStringFormat",(e,t)=>{var n,i;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})}):(i=e._zod).check??(i.check=()=>{})}),T9=W("$ZodCheckRegex",(e,t)=>{of.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})}}),C9=W("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=b9),of.init(e,t)}),A9=W("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=S9),of.init(e,t)}),j9=W("$ZodCheckIncludes",(e,t)=>{En.init(e,t);const n=Uo(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),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})}}),N9=W("$ZodCheckStartsWith",(e,t)=>{En.init(e,t);const n=new RegExp(`^${Uo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),O9=W("$ZodCheckEndsWith",(e,t)=>{En.init(e,t);const n=new RegExp(`.*${Uo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),R9=W("$ZodCheckOverwrite",(e,t)=>{En.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});let M9=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 i=t.split(`
|
|
33
|
+
`).filter(l=>l),o=Math.min(...i.map(l=>l.length-l.trimStart().length)),u=i.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 D9={major:4,minor:3,patch:6},vt=W("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=D9;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const u of o._zod.onattach)u(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,f,d)=>{let h=So(l),p;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=y._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new jo;if(p||b instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=So(l,v)))});else{if(l.issues.length===v)continue;h||(h=So(l,v))}}return p?p.then(()=>l):l},u=(l,f,d)=>{if(So(l))return l.aborted=!0,l;const h=o(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new jo;return h.then(p=>e._zod.parse(p,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(p=>u(p,l,f)):u(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new jo;return d.then(h=>o(h,i,f))}return o(d,i,f)}}qe(e,"~standard",()=>({validate:o=>{try{const u=ZL(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return BL(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Dg=W("$ZodString",(e,t)=>{vt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??y9(e._zod.bag),e._zod.parse=(n,i)=>{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)=>{of.init(e,t),Dg.init(e,t)}),$9=W("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=i9),gt.init(e,t)}),L9=W("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=TS(i))}else t.pattern??(t.pattern=TS());gt.init(e,t)}),U9=W("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=a9),gt.init(e,t)}),P9=W("$ZodURL",(e,t)=>{gt.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),o=new URL(i);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=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),V9=W("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=s9()),gt.init(e,t)}),Z9=W("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=n9),gt.init(e,t)}),B9=W("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=JL),gt.init(e,t)}),I9=W("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=QL),gt.init(e,t)}),H9=W("$ZodULID",(e,t)=>{t.pattern??(t.pattern=WL),gt.init(e,t)}),F9=W("$ZodXID",(e,t)=>{t.pattern??(t.pattern=e9),gt.init(e,t)}),q9=W("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=t9),gt.init(e,t)}),G9=W("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=g9(t)),gt.init(e,t)}),Y9=W("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=m9),gt.init(e,t)}),X9=W("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=p9(t)),gt.init(e,t)}),K9=W("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=r9),gt.init(e,t)}),J9=W("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=l9),gt.init(e,t),e._zod.bag.format="ipv4"}),Q9=W("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=u9),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})}}}),W9=W("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=c9),gt.init(e,t)}),eU=W("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=f9),gt.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[o,u]=i;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 F_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const tU=W("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=d9),gt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{F_(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function nU(e){if(!U_.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return F_(n)}const rU=W("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=U_),gt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{nU(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),iU=W("$ZodE164",(e,t)=>{t.pattern??(t.pattern=h9),gt.init(e,t)});function aU(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));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})}}),q_=W("$ZodNumber",(e,t)=>{vt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Z_,e._zod.parse=(n,i)=>{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}}),sU=W("$ZodNumberFormat",(e,t)=>{w9.init(e,t),q_.init(e,t)}),lU=W("$ZodBoolean",(e,t)=>{vt.init(e,t),e._zod.pattern=v9,e._zod.parse=(n,i)=>{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}}),uU=W("$ZodUnknown",(e,t)=>{vt.init(e,t),e._zod.parse=n=>n}),cU=W("$ZodNever",(e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function CS(e,t,n){e.issues.length&&t.issues.push(...ko(n,e.issues)),t.value[n]=e.value}const fU=W("$ZodArray",(e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>{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 f=o[l],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?u.push(d.then(h=>CS(h,n,l))):CS(d,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Uc(e,t,n,i,o){if(e.issues.length){if(o&&!(n in i))return;t.issues.push(...ko(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function G_(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=jL(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Y_(e,t,n,i,o,u){const l=[],f=o.keySet,d=o.catchall._zod,h=d.def.type,p=d.optout==="optional";for(const y in t){if(f.has(y))continue;if(h==="never"){l.push(y);continue}const v=d.run({value:t[y],issues:[]},i);v instanceof Promise?e.push(v.then(b=>Uc(b,n,y,t,p))):Uc(v,n,y,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 dU=W("$ZodObject",(e,t)=>{if(vt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=nf(()=>G_(t));qe(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const p=f[h]._zod;if(p.values){d[h]??(d[h]=new Set);for(const y of p.values)d[h].add(y)}}return d});const o=Sl,u=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=i.value);const h=f.value;if(!o(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const p=[],y=l.shape;for(const v of l.keys){const b=y[v],E=b._zod.optout==="optional",T=b._zod.run({value:h[v],issues:[]},d);T instanceof Promise?p.push(T.then(A=>Uc(A,f,v,h,E))):Uc(T,f,v,h,E)}return u?Y_(p,h,f,d,i.value,e):p.length?Promise.all(p).then(()=>f):f}}),hU=W("$ZodObjectJIT",(e,t)=>{dU.init(e,t);const n=e._zod.parse,i=nf(()=>G_(t)),o=v=>{const b=new M9(["shape","payload","ctx"]),E=i.value,T=w=>{const P=ES(w);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};b.write("const input = payload.value;");const A=Object.create(null);let j=0;for(const w of E.keys)A[w]=`key_${j++}`;b.write("const newResult = {};");for(const w of E.keys){const P=A[w],D=ES(w),Y=v[w]?._zod?.optout==="optional";b.write(`const ${P} = ${T(w)};`),Y?b.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
|
+
`):b.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
|
+
`)}b.write("payload.value = newResult;"),b.write("return payload;");const O=b.compile();return(w,P)=>O(v,w,P)};let u;const l=Sl,f=!N_.jitless,h=f&&CL.value,p=t.catchall;let y;e._zod.parse=(v,b)=>{y??(y=i.value);const E=v.value;return l(E)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=o(t.shape)),v=u(v,b),p?Y_([],E,v,b,y,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),v)}});function AS(e,t,n,i){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!So(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=>Di(l,i,Mi())))}),t)}const X_=W("$ZodUnion",(e,t)=>{vt.init(e,t),qe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),qe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),qe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),qe(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=>Ng(u.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(n)return i(o,u);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>AS(d,o,e,u)):AS(f,o,e,u)}}),mU=W("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,X_.init(e,t);const n=e._zod.parse;qe(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[f,d]of Object.entries(l)){o[f]||(o[f]=new Set);for(const h of d)o[f].add(h)}}return o});const i=nf(()=>{const o=t.options,u=new Map;for(const l of o){const f=l._zod.propValues?.[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of f){if(u.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);u.set(d,l)}}return u});e._zod.parse=(o,u)=>{const l=o.value;if(!Sl(l))return o.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),o;const f=i.value.get(l?.[t.discriminator]);return f?f._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)}}),pU=W("$ZodIntersection",(e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},i),l=t.right._zod.run({value:o,issues:[]},i);return u instanceof Promise||l instanceof Promise?Promise.all([u,l]).then(([d,h])=>jS(n,d,h)):jS(n,u,l)}});function vp(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(Lo(e)&&Lo(t)){const n=Object.keys(t),i=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of i){const l=vp(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 i=0;i<e.length;i++){const o=e[i],u=t[i],l=vp(o,u);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function jS(e,t,n){const i=new Map;let o;for(const f of t.issues)if(f.code==="unrecognized_keys"){o??(o=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of n.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const u=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(u.length&&o&&e.issues.push({...o,keys:u}),So(e))return e;const l=vp(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 gU=W("$ZodRecord",(e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Lo(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 f=new Set;for(const h of l)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){f.add(typeof h=="number"?h.toString():h);const p=t.valueType._zod.run({value:o[h],issues:[]},i);p instanceof Promise?u.push(p.then(y=>{y.issues.length&&n.issues.push(...ko(h,y.issues)),n.value[h]=y.value})):(p.issues.length&&n.issues.push(...ko(h,p.issues)),n.value[h]=p.value)}let d;for(const h in o)f.has(h)||(d=d??[],d.push(h));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:d})}else{n.value={};for(const f of Reflect.ownKeys(o)){if(f==="__proto__")continue;let d=t.keyType._zod.run({value:f,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&Z_.test(f)&&d.issues.length){const y=t.keyType._zod.run({value:Number(f),issues:[]},i);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(d=y)}if(d.issues.length){t.mode==="loose"?n.value[f]=o[f]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(y=>Di(y,i,Mi())),input:f,path:[f],inst:e});continue}const p=t.valueType._zod.run({value:o[f],issues:[]},i);p instanceof Promise?u.push(p.then(y=>{y.issues.length&&n.issues.push(...ko(f,y.issues)),n.value[d.value]=y.value})):(p.issues.length&&n.issues.push(...ko(f,p.issues)),n.value[d.value]=p.value)}}return u.length?Promise.all(u).then(()=>n):n}}),yU=W("$ZodEnum",(e,t)=>{vt.init(e,t);const n=O_(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>AL.has(typeof o)).map(o=>typeof o=="string"?Uo(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const l=o.value;return i.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),xU=W("$ZodLiteral",(e,t)=>{if(vt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Uo(i):i?Uo(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,o)=>{const u=i.value;return n.has(u)||i.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),i}}),vU=W("$ZodTransform",(e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new j_(e.constructor.name);const o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new jo;return n.value=o,n}});function NS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const K_=W("$ZodOptional",(e,t)=>{vt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ng(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>NS(u,n.value)):NS(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),bU=W("$ZodExactOptional",(e,t)=>{K_.init(e,t),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),SU=W("$ZodNullable",(e,t)=>{vt.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ng(n.source)}|null)$`):void 0}),qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),kU=W("$ZodDefault",(e,t)=>{vt.init(e,t),e._zod.optin="optional",qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>OS(u,t)):OS(o,t)}});function OS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const wU=W("$ZodPrefault",(e,t)=>{vt.init(e,t),e._zod.optin="optional",qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),zU=W("$ZodNonOptional",(e,t)=>{vt.init(e,t),qe(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>RS(u,e)):RS(o,e)}});function RS(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 _U=W("$ZodCatch",(e,t)=>{vt.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);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=>Di(l,i,Mi()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>Di(u,i,Mi()))},input:n.value}),n.issues=[]),n)}}),EU=W("$ZodPipe",(e,t)=>{vt.init(e,t),qe(e._zod,"values",()=>t.in._zod.values),qe(e._zod,"optin",()=>t.in._zod.optin),qe(e._zod,"optout",()=>t.out._zod.optout),qe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const u=t.out._zod.run(n,i);return u instanceof Promise?u.then(l=>cc(l,t.in,i)):cc(u,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(u=>cc(u,t.out,i)):cc(o,t.out,i)}});function cc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const TU=W("$ZodReadonly",(e,t)=>{vt.init(e,t),qe(e._zod,"propValues",()=>t.innerType._zod.propValues),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"optin",()=>t.innerType?._zod?.optin),qe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(MS):MS(o)}});function MS(e){return e.value=Object.freeze(e.value),e}const CU=W("$ZodCustom",(e,t)=>{En.init(e,t),vt.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then(u=>DS(u,n,i,e));DS(o,n,i,e)}});function DS(e,t,n,i){if(!e){const o={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(kl(o))}}var $S;let AU=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.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 i={...this.get(n)??{}};delete i.id;const o={...i,...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 jU(){return new AU}($S=globalThis).__zod_globalRegistry??($S.__zod_globalRegistry=jU());const rl=globalThis.__zod_globalRegistry;function NU(e,t){return new e({type:"string",...Se(t)})}function OU(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Se(t)})}function LS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Se(t)})}function RU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Se(t)})}function MU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Se(t)})}function DU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Se(t)})}function $U(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Se(t)})}function LU(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Se(t)})}function UU(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Se(t)})}function PU(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Se(t)})}function VU(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Se(t)})}function ZU(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Se(t)})}function BU(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Se(t)})}function IU(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Se(t)})}function HU(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Se(t)})}function FU(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Se(t)})}function qU(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Se(t)})}function GU(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Se(t)})}function YU(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Se(t)})}function XU(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Se(t)})}function KU(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Se(t)})}function JU(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Se(t)})}function QU(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Se(t)})}function WU(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Se(t)})}function eP(e,t){return new e({type:"string",format:"date",check:"string_format",...Se(t)})}function tP(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Se(t)})}function nP(e,t){return new e({type:"string",format:"duration",check:"string_format",...Se(t)})}function rP(e,t){return new e({type:"number",checks:[],...Se(t)})}function iP(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Se(t)})}function aP(e,t){return new e({type:"boolean",...Se(t)})}function oP(e){return new e({type:"unknown"})}function sP(e,t){return new e({type:"never",...Se(t)})}function US(e,t){return new I_({check:"less_than",...Se(t),value:e,inclusive:!1})}function ym(e,t){return new I_({check:"less_than",...Se(t),value:e,inclusive:!0})}function PS(e,t){return new H_({check:"greater_than",...Se(t),value:e,inclusive:!1})}function xm(e,t){return new H_({check:"greater_than",...Se(t),value:e,inclusive:!0})}function VS(e,t){return new k9({check:"multiple_of",...Se(t),value:e})}function J_(e,t){return new z9({check:"max_length",...Se(t),maximum:e})}function Pc(e,t){return new _9({check:"min_length",...Se(t),minimum:e})}function Q_(e,t){return new E9({check:"length_equals",...Se(t),length:e})}function lP(e,t){return new T9({check:"string_format",format:"regex",...Se(t),pattern:e})}function uP(e){return new C9({check:"string_format",format:"lowercase",...Se(e)})}function cP(e){return new A9({check:"string_format",format:"uppercase",...Se(e)})}function fP(e,t){return new j9({check:"string_format",format:"includes",...Se(t),includes:e})}function dP(e,t){return new N9({check:"string_format",format:"starts_with",...Se(t),prefix:e})}function hP(e,t){return new O9({check:"string_format",format:"ends_with",...Se(t),suffix:e})}function Ko(e){return new R9({check:"overwrite",tx:e})}function mP(e){return Ko(t=>t.normalize(e))}function pP(){return Ko(e=>e.trim())}function gP(){return Ko(e=>e.toLowerCase())}function yP(){return Ko(e=>e.toUpperCase())}function xP(){return Ko(e=>TL(e))}function vP(e,t,n){return new e({type:"array",element:t,...Se(n)})}function bP(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Se(n)})}function SP(e){const t=kP(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(kl(i,n.value,t._zod.def));else{const o=i;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(kl(o))}},e(n.value,n)));return t}function kP(e,t){const n=new En({check:"custom",...Se(t)});return n._zod.check=e,n}function W_(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??rl,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 $t(e,t,n={path:[],schemaPath:[]}){var i;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 f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const v=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,v,p)}const y=e._zod.parent;y&&(l.ref||(l.ref=y),$t(y,t,p),t.seen.get(y).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&cn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((i=l.schema).default??(i.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function e2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=i.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,l[0])}}const o=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(l[0])?.id,v=e.external.uri??(E=>E);if(y)return{ref:v(y)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},u=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=o(l);f.def={...f.schema},h&&(f.defId=h);const p=f.schema;for(const y in p)delete p[y];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.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 f=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(f.cycle){u(l);continue}if(f.count>1&&e.reused==="ref"){u(l);continue}}}function t2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},p=f.ref;if(f.ref=null,p){i(p);const v=e.seen.get(p),b=v.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===p)for(const T in d)T==="$ref"||T==="allOf"||T in h||delete d[T];if(b.$ref&&v.def)for(const T in d)T==="$ref"||T==="allOf"||T in v.def&&JSON.stringify(d[T])===JSON.stringify(v.def[T])&&delete d[T]}const y=l._zod.parent;if(y&&y!==p){i(y);const v=e.seen.get(y);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())i(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 f=l[1];f.def&&f.defId&&(u[f.defId]=f.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:Vc(t,"input",e.processors),output:Vc(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function cn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return cn(i.element,n);if(i.type==="set")return cn(i.valueType,n);if(i.type==="lazy")return cn(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return cn(i.innerType,n);if(i.type==="intersection")return cn(i.left,n)||cn(i.right,n);if(i.type==="record"||i.type==="map")return cn(i.keyType,n)||cn(i.valueType,n);if(i.type==="pipe")return cn(i.in,n)||cn(i.out,n);if(i.type==="object"){for(const o in i.shape)if(cn(i.shape[o],n))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(cn(o,n))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(cn(o,n))return!0;return!!(i.rest&&cn(i.rest,n))}return!1}const wP=(e,t={})=>n=>{const i=W_({...n,processors:t});return $t(e,i),e2(i,e),t2(i,e)},Vc=(e,t,n={})=>i=>{const{libraryOptions:o,target:u}=i??{},l=W_({...o??{},target:u,io:t,processors:n});return $t(e,l),e2(l,e),t2(l,e)},zP={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},_P=(e,t,n,i)=>{const o=n;o.type="string";const{minimum:u,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof l=="number"&&(o.maxLength=l),f&&(o.format=zP[f]??f,o.format===""&&delete o.format,f==="time"&&delete o.format),h&&(o.contentEncoding=h),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},EP=(e,t,n,i)=>{const o=n,{minimum:u,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:p}=e._zod.bag;typeof f=="string"&&f.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 d=="number"&&(o.multipleOf=d)},TP=(e,t,n,i)=>{n.type="boolean"},CP=(e,t,n,i)=>{n.not={}},AP=(e,t,n,i)=>{},jP=(e,t,n,i)=>{const o=e._zod.def,u=O_(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},NP=(e,t,n,i)=>{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},OP=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},RP=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},MP=(e,t,n,i)=>{const o=n,u=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof f=="number"&&(o.maxItems=f),o.type="array",o.items=$t(u.element,t,{...i,path:[...i.path,"items"]})},DP=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const l=u.shape;for(const h in l)o.properties[h]=$t(l[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const p=u.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=$t(u.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},$P=(e,t,n,i)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((f,d)=>$t(f,t,{...i,path:[...i.path,u?"oneOf":"anyOf",d]}));u?n.oneOf=l:n.anyOf=l},LP=(e,t,n,i)=>{const o=e._zod.def,u=$t(o.left,t,{...i,path:[...i.path,"allOf",0]}),l=$t(o.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(u)?u.allOf:[u],...f(l)?l.allOf:[l]];n.allOf=d},UP=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object";const l=u.keyType,d=l._zod.bag?.patterns;if(u.mode==="loose"&&d&&d.size>0){const p=$t(u.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});o.patternProperties={};for(const y of d)o.patternProperties[y.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=$t(u.keyType,t,{...i,path:[...i.path,"propertyNames"]})),o.additionalProperties=$t(u.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const h=l._zod.values;if(h){const p=[...h].filter(y=>typeof y=="string"||typeof y=="number");p.length>0&&(o.required=p)}},PP=(e,t,n,i)=>{const o=e._zod.def,u=$t(o.innerType,t,i),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},VP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},ZP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},BP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},IP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);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},HP=(e,t,n,i)=>{const o=e._zod.def,u=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;$t(u,t,i);const l=t.seen.get(e);l.ref=u},FP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},n2=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},qP=W("ZodISODateTime",(e,t)=>{G9.init(e,t),St.init(e,t)});function GP(e){return WU(qP,e)}const YP=W("ZodISODate",(e,t)=>{Y9.init(e,t),St.init(e,t)});function XP(e){return eP(YP,e)}const KP=W("ZodISOTime",(e,t)=>{X9.init(e,t),St.init(e,t)});function JP(e){return tP(KP,e)}const QP=W("ZodISODuration",(e,t)=>{K9.init(e,t),St.init(e,t)});function WP(e){return nP(QP,e)}const eV=(e,t)=>{$_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>VL(e,n)},flatten:{value:n=>PL(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xp,2)}},isEmpty:{get(){return e.issues.length===0}}})},ir=W("ZodError",eV,{Parent:Error}),tV=Rg(ir),nV=Mg(ir),rV=rf(ir),iV=af(ir),aV=IL(ir),oV=HL(ir),sV=FL(ir),lV=qL(ir),uV=GL(ir),cV=YL(ir),fV=XL(ir),dV=KL(ir),bt=W("ZodType",(e,t)=>(vt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Vc(e,"input"),output:Vc(e,"output")}}),e.toJSONSchema=wP(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ui(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Pi(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>tV(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>rV(e,n,i),e.parseAsync=async(n,i)=>nV(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>iV(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>aV(e,n,i),e.decode=(n,i)=>oV(e,n,i),e.encodeAsync=async(n,i)=>sV(e,n,i),e.decodeAsync=async(n,i)=>lV(e,n,i),e.safeEncode=(n,i)=>uV(e,n,i),e.safeDecode=(n,i)=>cV(e,n,i),e.safeEncodeAsync=async(n,i)=>fV(e,n,i),e.safeDecodeAsync=async(n,i)=>dV(e,n,i),e.refine=(n,i)=>e.check(o8(n,i)),e.superRefine=n=>e.check(s8(n)),e.overwrite=n=>e.check(Ko(n)),e.optional=()=>FS(e),e.exactOptional=()=>GV(e),e.nullable=()=>qS(e),e.nullish=()=>FS(qS(e)),e.nonoptional=n=>WV(e,n),e.array=()=>wl(e),e.or=n=>o2([e,n]),e.and=n=>ZV(e,n),e.transform=n=>GS(e,FV(n)),e.default=n=>KV(e,n),e.prefault=n=>QV(e,n),e.catch=n=>t8(e,n),e.pipe=n=>GS(e,n),e.readonly=()=>i8(e),e.describe=n=>{const i=e.clone();return rl.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return rl.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return rl.get(e);const i=e.clone();return rl.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),r2=W("_ZodString",(e,t)=>{Dg.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>_P(e,i,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(lP(...i)),e.includes=(...i)=>e.check(fP(...i)),e.startsWith=(...i)=>e.check(dP(...i)),e.endsWith=(...i)=>e.check(hP(...i)),e.min=(...i)=>e.check(Pc(...i)),e.max=(...i)=>e.check(J_(...i)),e.length=(...i)=>e.check(Q_(...i)),e.nonempty=(...i)=>e.check(Pc(1,...i)),e.lowercase=i=>e.check(uP(i)),e.uppercase=i=>e.check(cP(i)),e.trim=()=>e.check(pP()),e.normalize=(...i)=>e.check(mP(...i)),e.toLowerCase=()=>e.check(gP()),e.toUpperCase=()=>e.check(yP()),e.slugify=()=>e.check(xP())}),hV=W("ZodString",(e,t)=>{Dg.init(e,t),r2.init(e,t),e.email=n=>e.check(OU(mV,n)),e.url=n=>e.check(LU(pV,n)),e.jwt=n=>e.check(QU(jV,n)),e.emoji=n=>e.check(UU(gV,n)),e.guid=n=>e.check(LS(ZS,n)),e.uuid=n=>e.check(RU(fc,n)),e.uuidv4=n=>e.check(MU(fc,n)),e.uuidv6=n=>e.check(DU(fc,n)),e.uuidv7=n=>e.check($U(fc,n)),e.nanoid=n=>e.check(PU(yV,n)),e.guid=n=>e.check(LS(ZS,n)),e.cuid=n=>e.check(VU(xV,n)),e.cuid2=n=>e.check(ZU(vV,n)),e.ulid=n=>e.check(BU(bV,n)),e.base64=n=>e.check(XU(TV,n)),e.base64url=n=>e.check(KU(CV,n)),e.xid=n=>e.check(IU(SV,n)),e.ksuid=n=>e.check(HU(kV,n)),e.ipv4=n=>e.check(FU(wV,n)),e.ipv6=n=>e.check(qU(zV,n)),e.cidrv4=n=>e.check(GU(_V,n)),e.cidrv6=n=>e.check(YU(EV,n)),e.e164=n=>e.check(JU(AV,n)),e.datetime=n=>e.check(GP(n)),e.date=n=>e.check(XP(n)),e.time=n=>e.check(JP(n)),e.duration=n=>e.check(WP(n))});function tt(e){return NU(hV,e)}const St=W("ZodStringFormat",(e,t)=>{gt.init(e,t),r2.init(e,t)}),mV=W("ZodEmail",(e,t)=>{U9.init(e,t),St.init(e,t)}),ZS=W("ZodGUID",(e,t)=>{$9.init(e,t),St.init(e,t)}),fc=W("ZodUUID",(e,t)=>{L9.init(e,t),St.init(e,t)}),pV=W("ZodURL",(e,t)=>{P9.init(e,t),St.init(e,t)}),gV=W("ZodEmoji",(e,t)=>{V9.init(e,t),St.init(e,t)}),yV=W("ZodNanoID",(e,t)=>{Z9.init(e,t),St.init(e,t)}),xV=W("ZodCUID",(e,t)=>{B9.init(e,t),St.init(e,t)}),vV=W("ZodCUID2",(e,t)=>{I9.init(e,t),St.init(e,t)}),bV=W("ZodULID",(e,t)=>{H9.init(e,t),St.init(e,t)}),SV=W("ZodXID",(e,t)=>{F9.init(e,t),St.init(e,t)}),kV=W("ZodKSUID",(e,t)=>{q9.init(e,t),St.init(e,t)}),wV=W("ZodIPv4",(e,t)=>{J9.init(e,t),St.init(e,t)}),zV=W("ZodIPv6",(e,t)=>{Q9.init(e,t),St.init(e,t)}),_V=W("ZodCIDRv4",(e,t)=>{W9.init(e,t),St.init(e,t)}),EV=W("ZodCIDRv6",(e,t)=>{eU.init(e,t),St.init(e,t)}),TV=W("ZodBase64",(e,t)=>{tU.init(e,t),St.init(e,t)}),CV=W("ZodBase64URL",(e,t)=>{rU.init(e,t),St.init(e,t)}),AV=W("ZodE164",(e,t)=>{iU.init(e,t),St.init(e,t)}),jV=W("ZodJWT",(e,t)=>{oU.init(e,t),St.init(e,t)}),i2=W("ZodNumber",(e,t)=>{q_.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>EP(e,i,o),e.gt=(i,o)=>e.check(PS(i,o)),e.gte=(i,o)=>e.check(xm(i,o)),e.min=(i,o)=>e.check(xm(i,o)),e.lt=(i,o)=>e.check(US(i,o)),e.lte=(i,o)=>e.check(ym(i,o)),e.max=(i,o)=>e.check(ym(i,o)),e.int=i=>e.check(BS(i)),e.safe=i=>e.check(BS(i)),e.positive=i=>e.check(PS(0,i)),e.nonnegative=i=>e.check(xm(0,i)),e.negative=i=>e.check(US(0,i)),e.nonpositive=i=>e.check(ym(0,i)),e.multipleOf=(i,o)=>e.check(VS(i,o)),e.step=(i,o)=>e.check(VS(i,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 ji(e){return rP(i2,e)}const NV=W("ZodNumberFormat",(e,t)=>{sU.init(e,t),i2.init(e,t)});function BS(e){return iP(NV,e)}const OV=W("ZodBoolean",(e,t)=>{lU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>TP(e,n,i)});function wo(e){return aP(OV,e)}const RV=W("ZodUnknown",(e,t)=>{uU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>AP()});function IS(){return oP(RV)}const MV=W("ZodNever",(e,t)=>{cU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>CP(e,n,i)});function DV(e){return sP(MV,e)}const $V=W("ZodArray",(e,t)=>{fU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>MP(e,n,i,o),e.element=t.element,e.min=(n,i)=>e.check(Pc(n,i)),e.nonempty=n=>e.check(Pc(1,n)),e.max=(n,i)=>e.check(J_(n,i)),e.length=(n,i)=>e.check(Q_(n,i)),e.unwrap=()=>e.element});function wl(e,t){return vP($V,e,t)}const LV=W("ZodObject",(e,t)=>{hU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>DP(e,n,i,o),qe(e,"shape",()=>t.shape),e.keyof=()=>sf(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:IS()}),e.loose=()=>e.clone({...e._zod.def,catchall:IS()}),e.strict=()=>e.clone({...e._zod.def,catchall:DV()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>ML(e,n),e.safeExtend=n=>DL(e,n),e.merge=n=>$L(e,n),e.pick=n=>OL(e,n),e.omit=n=>RL(e,n),e.partial=(...n)=>LL(s2,e,n[0]),e.required=(...n)=>UL(l2,e,n[0])});function Wn(e,t){const n={type:"object",shape:e??{},...Se(t)};return new LV(n)}const a2=W("ZodUnion",(e,t)=>{X_.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>$P(e,n,i,o),e.options=t.options});function o2(e,t){return new a2({type:"union",options:e,...Se(t)})}const UV=W("ZodDiscriminatedUnion",(e,t)=>{a2.init(e,t),mU.init(e,t)});function PV(e,t,n){return new UV({type:"union",options:t,discriminator:e,...Se(n)})}const VV=W("ZodIntersection",(e,t)=>{pU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>LP(e,n,i,o)});function ZV(e,t){return new VV({type:"intersection",left:e,right:t})}const BV=W("ZodRecord",(e,t)=>{gU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>UP(e,n,i,o),e.keyType=t.keyType,e.valueType=t.valueType});function zc(e,t,n){return new BV({type:"record",keyType:e,valueType:t,...Se(n)})}const bp=W("ZodEnum",(e,t)=>{yU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>jP(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const u={};for(const l of i)if(n.has(l))u[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new bp({...t,checks:[],...Se(o),entries:u})},e.exclude=(i,o)=>{const u={...t.entries};for(const l of i)if(n.has(l))delete u[l];else throw new Error(`Key ${l} not found in enum`);return new bp({...t,checks:[],...Se(o),entries:u})}});function sf(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new bp({type:"enum",entries:n,...Se(t)})}const IV=W("ZodLiteral",(e,t)=>{xU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>NP(e,n,i),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 HS(e,t){return new IV({type:"literal",values:Array.isArray(e)?e:[e],...Se(t)})}const HV=W("ZodTransform",(e,t)=>{vU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>RP(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new j_(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(kl(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(kl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function FV(e){return new HV({type:"transform",transform:e})}const s2=W("ZodOptional",(e,t)=>{K_.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>n2(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function FS(e){return new s2({type:"optional",innerType:e})}const qV=W("ZodExactOptional",(e,t)=>{bU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>n2(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function GV(e){return new qV({type:"optional",innerType:e})}const YV=W("ZodNullable",(e,t)=>{SU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>PP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function qS(e){return new YV({type:"nullable",innerType:e})}const XV=W("ZodDefault",(e,t)=>{kU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>ZP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function KV(e,t){return new XV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():M_(t)}})}const JV=W("ZodPrefault",(e,t)=>{wU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>BP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function QV(e,t){return new JV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():M_(t)}})}const l2=W("ZodNonOptional",(e,t)=>{zU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>VP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function WV(e,t){return new l2({type:"nonoptional",innerType:e,...Se(t)})}const e8=W("ZodCatch",(e,t)=>{_U.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>IP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function t8(e,t){return new e8({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const n8=W("ZodPipe",(e,t)=>{EU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>HP(e,n,i,o),e.in=t.in,e.out=t.out});function GS(e,t){return new n8({type:"pipe",in:e,out:t})}const r8=W("ZodReadonly",(e,t)=>{TU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>FP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function i8(e){return new r8({type:"readonly",innerType:e})}const a8=W("ZodCustom",(e,t)=>{CU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>OP(e,n)});function o8(e,t={}){return bP(a8,e,t)}function s8(e){return SP(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}},l8=Wn({provider:sf(["google","openai","openrouter","ollama"]).default(mt.audio.provider),model:tt().min(1).default(mt.audio.model),enabled:wo().default(mt.audio.enabled),apiKey:tt().optional(),base_url:tt().optional(),maxDurationSeconds:ji().default(mt.audio.maxDurationSeconds),supportedMimeTypes:wl(tt()).default(mt.audio.supportedMimeTypes)}),$g=Wn({provider:sf(["openai","anthropic","openrouter","ollama","gemini"]).default(mt.llm.provider),model:tt().min(1).default(mt.llm.model),temperature:ji().min(0).max(1).default(mt.llm.temperature),max_tokens:ji().int().positive().optional(),api_key:tt().optional(),base_url:tt().optional(),context_window:ji().int().positive().optional()}),u8=$g.extend({memory_limit:ji().int().positive().optional(),enabled_archived_sessions:wo().default(!0)}),c8=$g.extend({working_dir:tt().optional(),timeout_ms:ji().int().positive().optional()}),f8=Wn({agent:Wn({name:tt().default(mt.agent.name),personality:tt().default(mt.agent.personality)}).default(mt.agent),llm:$g.default(mt.llm),sati:u8.optional(),apoc:c8.optional(),audio:l8.default(mt.audio),memory:Wn({limit:ji().int().positive().optional()}).default(mt.memory),channels:Wn({telegram:Wn({enabled:wo().default(!1),token:tt().optional(),allowedUsers:wl(tt()).default([])}).default(mt.channels.telegram),discord:Wn({enabled:wo().default(!1),token:tt().optional()}).default(mt.channels.discord)}).default(mt.channels),ui:Wn({enabled:wo().default(mt.ui.enabled),port:ji().default(mt.ui.port)}).default(mt.ui),logging:Wn({enabled:wo().default(mt.logging.enabled),level:sf(["debug","info","warn","error"]).default(mt.logging.level),retention:tt().default(mt.logging.retention)}).default(mt.logging)}),d8=PV("transport",[Wn({transport:HS("stdio"),command:tt().min(1,"Command is required for stdio transport"),args:wl(tt()).optional().default([]),env:zc(tt(),tt()).optional().default({}),_comment:tt().optional()}),Wn({transport:HS("http"),url:tt().url("Valid URL is required for http transport"),headers:zc(tt(),tt()).optional().default({}),args:wl(tt()).optional().default([]),env:zc(tt(),tt()).optional().default({}),_comment:tt().optional()})]);zc(tt(),o2([d8,tt()]));function re(e,t,n){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,p=Object.keys(h);for(let y=0;y<p.length;y++){const v=p[y];v in f||(f[v]=h[v].bind(f))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function l(f){var d;const h=n?.Parent?new u:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const p of h._zod.deferred)p();return h}return Object.defineProperty(l,"init",{value:i}),Object.defineProperty(l,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class No extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class u2 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const c2={};function va(e){return c2}function f2(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,o])=>t.indexOf(+i)===-1).map(([i,o])=>o)}function Sp(e,t){return typeof t=="bigint"?t.toString():t}function Lg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ug(e){return e==null}function Pg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const YS=Symbol("evaluating");function Ke(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==YS)return i===void 0&&(i=YS,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function wa(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vi(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function XS(e){return JSON.stringify(e)}function h8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const d2="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Zc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const m8=Lg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function zl(e){if(Zc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Zc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function h2(e){return zl(e)?{...e}:Array.isArray(e)?[...e]:e}const p8=new Set(["string","number","symbol"]);function Po(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zi(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}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 g8(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function y8(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Vi(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return wa(this,"shape",l),l},checks:[]});return Zi(e,u)}function x8(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Vi(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return wa(this,"shape",l),l},checks:[]});return Zi(e,u)}function v8(e,t){if(!zl(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=Vi(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return wa(this,"shape",u),u}});return Zi(e,o)}function b8(e,t){if(!zl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Vi(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return wa(this,"shape",i),i}});return Zi(e,n)}function S8(e,t){const n=Vi(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return wa(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Zi(e,n)}function k8(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=Vi(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return wa(this,"shape",d),d},checks:[]});return Zi(t,l)}function w8(e,t,n){const i=Vi(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 wa(this,"shape",u),u}});return Zi(t,i)}function zo(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 m2(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function dc(e){return typeof e=="string"?e:e?.message}function ba(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=dc(e.inst?._zod.def?.error?.(e))??dc(t?.error?.(e))??dc(n.customError?.(e))??dc(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Vg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function _l(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const p2=(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,Sp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},g2=re("$ZodError",p2),y2=re("$ZodError",p2,{Parent:Error});function z8(e,t=n=>n.message){const n={},i=[];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))):i.push(t(o));return{formErrors:i,fieldErrors:n}}function _8(e,t=n=>n.message){const n={_errors:[]},i=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)n._errors.push(t(u));else{let l=n,f=0;for(;f<u.path.length;){const d=u.path[f];f===u.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(u))):l[d]=l[d]||{_errors:[]},l=l[d],f++}}};return i(e),n}const Zg=e=>(t,n,i,o)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise)throw new No;if(l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>ba(d,u,va())));throw d2(f,o?.callee),f}return l.value},Bg=e=>async(t,n,i,o)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>ba(d,u,va())));throw d2(f,o?.callee),f}return l.value},lf=e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new No;return u.issues.length?{success:!1,error:new(e??g2)(u.issues.map(l=>ba(l,o,va())))}:{success:!0,data:u.value}},E8=lf(y2),uf=e=>async(t,n,i)=>{const o=i?Object.assign(i,{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=>ba(l,o,va())))}:{success:!0,data:u.value}},T8=uf(y2),C8=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Zg(e)(t,n,o)},A8=e=>(t,n,i)=>Zg(e)(t,n,i),j8=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Bg(e)(t,n,o)},N8=e=>async(t,n,i)=>Bg(e)(t,n,i),O8=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return lf(e)(t,n,o)},R8=e=>(t,n,i)=>lf(e)(t,n,i),M8=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return uf(e)(t,n,o)},D8=e=>async(t,n,i)=>uf(e)(t,n,i),$8=/^[cC][^\s-]{8,}$/,L8=/^[0-9a-z]+$/,U8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,P8=/^[0-9a-vA-V]{20}$/,V8=/^[A-Za-z0-9]{27}$/,Z8=/^[a-zA-Z0-9_-]{21}$/,B8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,I8=/^([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})$/,KS=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)$/,H8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,F8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function q8(){return new RegExp(F8,"u")}const G8=/^(?:(?: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])$/,Y8=/^(([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}|:))$/,X8=/^((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])$/,K8=/^(([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])$/,J8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,x2=/^[A-Za-z0-9_-]*$/,Q8=/^\+[1-9]\d{6,14}$/,v2="(?:(?:\\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])))",W8=new RegExp(`^${v2}$`);function b2(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(`^${b2(e)}$`)}function tZ(e){const t=b2({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${v2}T(?:${i})$`)}const nZ=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},rZ=/^[^A-Z]*$/,iZ=/^[^a-z]*$/,Er=re("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),aZ=re("$ZodCheckMaxLength",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Ug(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const o=i.value;if(o.length<=t.maximum)return;const l=Vg(o);i.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oZ=re("$ZodCheckMinLength",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Ug(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const o=i.value;if(o.length>=t.minimum)return;const l=Vg(o);i.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),sZ=re("$ZodCheckLengthEquals",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Ug(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{const o=i.value,u=o.length;if(u===t.length)return;const l=Vg(o),f=u>t.length;i.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),cf=re("$ZodCheckStringFormat",(e,t)=>{var n,i;Er.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})}):(i=e._zod).check??(i.check=()=>{})}),lZ=re("$ZodCheckRegex",(e,t)=>{cf.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})}}),uZ=re("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=rZ),cf.init(e,t)}),cZ=re("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=iZ),cf.init(e,t)}),fZ=re("$ZodCheckIncludes",(e,t)=>{Er.init(e,t);const n=Po(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),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})}}),dZ=re("$ZodCheckStartsWith",(e,t)=>{Er.init(e,t);const n=new RegExp(`^${Po(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),hZ=re("$ZodCheckEndsWith",(e,t)=>{Er.init(e,t);const n=new RegExp(`.*${Po(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),mZ=re("$ZodCheckOverwrite",(e,t)=>{Er.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class pZ{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 i=t.split(`
|
|
71
|
+
`).filter(l=>l),o=Math.min(...i.map(l=>l.length-l.trimStart().length)),u=i.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 gZ={major:4,minor:3,patch:6},Lt=re("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gZ;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const u of o._zod.onattach)u(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,f,d)=>{let h=zo(l),p;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=y._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new No;if(p||b instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=zo(l,v)))});else{if(l.issues.length===v)continue;h||(h=zo(l,v))}}return p?p.then(()=>l):l},u=(l,f,d)=>{if(zo(l))return l.aborted=!0,l;const h=o(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new No;return h.then(p=>e._zod.parse(p,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(p=>u(p,l,f)):u(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new No;return d.then(h=>o(h,i,f))}return o(d,i,f)}}Ke(e,"~standard",()=>({validate:o=>{try{const u=E8(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return T8(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Ig=re("$ZodString",(e,t)=>{Lt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??nZ(e._zod.bag),e._zod.parse=(n,i)=>{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=re("$ZodStringFormat",(e,t)=>{cf.init(e,t),Ig.init(e,t)}),yZ=re("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=I8),yt.init(e,t)}),xZ=re("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=KS(i))}else t.pattern??(t.pattern=KS());yt.init(e,t)}),vZ=re("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=H8),yt.init(e,t)}),bZ=re("$ZodURL",(e,t)=>{yt.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),o=new URL(i);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=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),SZ=re("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=q8()),yt.init(e,t)}),kZ=re("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Z8),yt.init(e,t)}),wZ=re("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$8),yt.init(e,t)}),zZ=re("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=L8),yt.init(e,t)}),_Z=re("$ZodULID",(e,t)=>{t.pattern??(t.pattern=U8),yt.init(e,t)}),EZ=re("$ZodXID",(e,t)=>{t.pattern??(t.pattern=P8),yt.init(e,t)}),TZ=re("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=V8),yt.init(e,t)}),CZ=re("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=tZ(t)),yt.init(e,t)}),AZ=re("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=W8),yt.init(e,t)}),jZ=re("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=eZ(t)),yt.init(e,t)}),NZ=re("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=B8),yt.init(e,t)}),OZ=re("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=G8),yt.init(e,t),e._zod.bag.format="ipv4"}),RZ=re("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Y8),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})}}}),MZ=re("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=X8),yt.init(e,t)}),DZ=re("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=K8),yt.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[o,u]=i;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 S2(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const $Z=re("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=J8),yt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{S2(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function LZ(e){if(!x2.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return S2(n)}const UZ=re("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=x2),yt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{LZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),PZ=re("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Q8),yt.init(e,t)});function VZ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const ZZ=re("$ZodJWT",(e,t)=>{yt.init(e,t),e._zod.check=n=>{VZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),BZ=re("$ZodUnknown",(e,t)=>{Lt.init(e,t),e._zod.parse=n=>n}),IZ=re("$ZodNever",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function JS(e,t,n){e.issues.length&&t.issues.push(...m2(n,e.issues)),t.value[n]=e.value}const HZ=re("$ZodArray",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{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 f=o[l],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?u.push(d.then(h=>JS(h,n,l))):JS(d,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Bc(e,t,n,i,o){if(e.issues.length){if(o&&!(n in i))return;t.issues.push(...m2(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function k2(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=g8(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function w2(e,t,n,i,o,u){const l=[],f=o.keySet,d=o.catchall._zod,h=d.def.type,p=d.optout==="optional";for(const y in t){if(f.has(y))continue;if(h==="never"){l.push(y);continue}const v=d.run({value:t[y],issues:[]},i);v instanceof Promise?e.push(v.then(b=>Bc(b,n,y,t,p))):Bc(v,n,y,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 FZ=re("$ZodObject",(e,t)=>{if(Lt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=Lg(()=>k2(t));Ke(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const p=f[h]._zod;if(p.values){d[h]??(d[h]=new Set);for(const y of p.values)d[h].add(y)}}return d});const o=Zc,u=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=i.value);const h=f.value;if(!o(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const p=[],y=l.shape;for(const v of l.keys){const b=y[v],E=b._zod.optout==="optional",T=b._zod.run({value:h[v],issues:[]},d);T instanceof Promise?p.push(T.then(A=>Bc(A,f,v,h,E))):Bc(T,f,v,h,E)}return u?w2(p,h,f,d,i.value,e):p.length?Promise.all(p).then(()=>f):f}}),qZ=re("$ZodObjectJIT",(e,t)=>{FZ.init(e,t);const n=e._zod.parse,i=Lg(()=>k2(t)),o=v=>{const b=new pZ(["shape","payload","ctx"]),E=i.value,T=w=>{const P=XS(w);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};b.write("const input = payload.value;");const A=Object.create(null);let j=0;for(const w of E.keys)A[w]=`key_${j++}`;b.write("const newResult = {};");for(const w of E.keys){const P=A[w],D=XS(w),Y=v[w]?._zod?.optout==="optional";b.write(`const ${P} = ${T(w)};`),Y?b.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
|
+
`):b.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
|
+
`)}b.write("payload.value = newResult;"),b.write("return payload;");const O=b.compile();return(w,P)=>O(v,w,P)};let u;const l=Zc,f=!c2.jitless,h=f&&m8.value,p=t.catchall;let y;e._zod.parse=(v,b)=>{y??(y=i.value);const E=v.value;return l(E)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=o(t.shape)),v=u(v,b),p?w2([],E,v,b,y,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),v)}});function QS(e,t,n,i){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!zo(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=>ba(l,i,va())))}),t)}const GZ=re("$ZodUnion",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ke(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ke(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Ke(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=>Pg(u.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(n)return i(o,u);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>QS(d,o,e,u)):QS(f,o,e,u)}}),YZ=re("$ZodIntersection",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},i),l=t.right._zod.run({value:o,issues:[]},i);return u instanceof Promise||l instanceof Promise?Promise.all([u,l]).then(([d,h])=>WS(n,d,h)):WS(n,u,l)}});function kp(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(zl(e)&&zl(t)){const n=Object.keys(t),i=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of i){const l=kp(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 i=0;i<e.length;i++){const o=e[i],u=t[i],l=kp(o,u);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function WS(e,t,n){const i=new Map;let o;for(const f of t.issues)if(f.code==="unrecognized_keys"){o??(o=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of n.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const u=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(u.length&&o&&e.issues.push({...o,keys:u}),zo(e))return e;const l=kp(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 XZ=re("$ZodEnum",(e,t)=>{Lt.init(e,t);const n=f2(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>p8.has(typeof o)).map(o=>typeof o=="string"?Po(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const l=o.value;return i.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),KZ=re("$ZodLiteral",(e,t)=>{if(Lt.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(i=>typeof i=="string"?Po(i):i?Po(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,o)=>{const u=i.value;return n.has(u)||i.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),i}}),JZ=re("$ZodTransform",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new u2(e.constructor.name);const o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new No;return n.value=o,n}});function ek(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const z2=re("$ZodOptional",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ke(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Pg(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>ek(u,n.value)):ek(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),QZ=re("$ZodExactOptional",(e,t)=>{z2.init(e,t),Ke(e._zod,"values",()=>t.innerType._zod.values),Ke(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),WZ=re("$ZodNullable",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.innerType._zod.optin),Ke(e._zod,"optout",()=>t.innerType._zod.optout),Ke(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Pg(n.source)}|null)$`):void 0}),Ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),eB=re("$ZodDefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>tk(u,t)):tk(o,t)}});function tk(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const tB=re("$ZodPrefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),nB=re("$ZodNonOptional",(e,t)=>{Lt.init(e,t),Ke(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>nk(u,e)):nk(o,e)}});function nk(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 rB=re("$ZodCatch",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.innerType._zod.optin),Ke(e._zod,"optout",()=>t.innerType._zod.optout),Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);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=>ba(l,i,va()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>ba(u,i,va()))},input:n.value}),n.issues=[]),n)}}),iB=re("$ZodPipe",(e,t)=>{Lt.init(e,t),Ke(e._zod,"values",()=>t.in._zod.values),Ke(e._zod,"optin",()=>t.in._zod.optin),Ke(e._zod,"optout",()=>t.out._zod.optout),Ke(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const u=t.out._zod.run(n,i);return u instanceof Promise?u.then(l=>hc(l,t.in,i)):hc(u,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(u=>hc(u,t.out,i)):hc(o,t.out,i)}});function hc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const aB=re("$ZodReadonly",(e,t)=>{Lt.init(e,t),Ke(e._zod,"propValues",()=>t.innerType._zod.propValues),Ke(e._zod,"values",()=>t.innerType._zod.values),Ke(e._zod,"optin",()=>t.innerType?._zod?.optin),Ke(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(rk):rk(o)}});function rk(e){return e.value=Object.freeze(e.value),e}const oB=re("$ZodCustom",(e,t)=>{Er.init(e,t),Lt.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then(u=>ik(u,n,i,e));ik(o,n,i,e)}});function ik(e,t,n,i){if(!e){const o={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(_l(o))}}var ak;class sB{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.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 i={...this.get(n)??{}};delete i.id;const o={...i,...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 lB(){return new sB}(ak=globalThis).__zod_globalRegistry??(ak.__zod_globalRegistry=lB());const il=globalThis.__zod_globalRegistry;function uB(e,t){return new e({type:"string",...Ee(t)})}function cB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ee(t)})}function ok(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ee(t)})}function fB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ee(t)})}function dB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ee(t)})}function hB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ee(t)})}function mB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ee(t)})}function pB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ee(t)})}function gB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ee(t)})}function yB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ee(t)})}function xB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ee(t)})}function vB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ee(t)})}function bB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ee(t)})}function SB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ee(t)})}function kB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ee(t)})}function wB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ee(t)})}function zB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ee(t)})}function _B(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ee(t)})}function EB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ee(t)})}function TB(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ee(t)})}function CB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ee(t)})}function AB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ee(t)})}function jB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ee(t)})}function NB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ee(t)})}function OB(e,t){return new e({type:"string",format:"date",check:"string_format",...Ee(t)})}function RB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ee(t)})}function MB(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ee(t)})}function DB(e){return new e({type:"unknown"})}function $B(e,t){return new e({type:"never",...Ee(t)})}function _2(e,t){return new aZ({check:"max_length",...Ee(t),maximum:e})}function Ic(e,t){return new oZ({check:"min_length",...Ee(t),minimum:e})}function E2(e,t){return new sZ({check:"length_equals",...Ee(t),length:e})}function LB(e,t){return new lZ({check:"string_format",format:"regex",...Ee(t),pattern:e})}function UB(e){return new uZ({check:"string_format",format:"lowercase",...Ee(e)})}function PB(e){return new cZ({check:"string_format",format:"uppercase",...Ee(e)})}function VB(e,t){return new fZ({check:"string_format",format:"includes",...Ee(t),includes:e})}function ZB(e,t){return new dZ({check:"string_format",format:"starts_with",...Ee(t),prefix:e})}function BB(e,t){return new hZ({check:"string_format",format:"ends_with",...Ee(t),suffix:e})}function Jo(e){return new mZ({check:"overwrite",tx:e})}function IB(e){return Jo(t=>t.normalize(e))}function HB(){return Jo(e=>e.trim())}function FB(){return Jo(e=>e.toLowerCase())}function qB(){return Jo(e=>e.toUpperCase())}function GB(){return Jo(e=>h8(e))}function YB(e,t,n){return new e({type:"array",element:t,...Ee(n)})}function XB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ee(n)})}function KB(e){const t=JB(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(_l(i,n.value,t._zod.def));else{const o=i;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 JB(e,t){const n=new Er({check:"custom",...Ee(t)});return n._zod.check=e,n}function T2(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 en(e,t,n={path:[],schemaPath:[]}){var i;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 f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const v=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,v,p)}const y=e._zod.parent;y&&(l.ref||(l.ref=y),en(y,t,p),t.seen.get(y).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&fn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((i=l.schema).default??(i.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 i=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=i.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,l[0])}}const o=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(l[0])?.id,v=e.external.uri??(E=>E);if(y)return{ref:v(y)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},u=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=o(l);f.def={...f.schema},h&&(f.defId=h);const p=f.schema;for(const y in p)delete p[y];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.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 f=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(f.cycle){u(l);continue}if(f.count>1&&e.reused==="ref"){u(l);continue}}}function A2(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},p=f.ref;if(f.ref=null,p){i(p);const v=e.seen.get(p),b=v.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===p)for(const T in d)T==="$ref"||T==="allOf"||T in h||delete d[T];if(b.$ref&&v.def)for(const T in d)T==="$ref"||T==="allOf"||T in v.def&&JSON.stringify(d[T])===JSON.stringify(v.def[T])&&delete d[T]}const y=l._zod.parent;if(y&&y!==p){i(y);const v=e.seen.get(y);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())i(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 f=l[1];f.def&&f.defId&&(u[f.defId]=f.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:Hc(t,"input",e.processors),output:Hc(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 i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return fn(i.element,n);if(i.type==="set")return fn(i.valueType,n);if(i.type==="lazy")return fn(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return fn(i.innerType,n);if(i.type==="intersection")return fn(i.left,n)||fn(i.right,n);if(i.type==="record"||i.type==="map")return fn(i.keyType,n)||fn(i.valueType,n);if(i.type==="pipe")return fn(i.in,n)||fn(i.out,n);if(i.type==="object"){for(const o in i.shape)if(fn(i.shape[o],n))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(fn(o,n))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(fn(o,n))return!0;return!!(i.rest&&fn(i.rest,n))}return!1}const QB=(e,t={})=>n=>{const i=T2({...n,processors:t});return en(e,i),C2(i,e),A2(i,e)},Hc=(e,t,n={})=>i=>{const{libraryOptions:o,target:u}=i??{},l=T2({...o??{},target:u,io:t,processors:n});return en(e,l),C2(l,e),A2(l,e)},WB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},eI=(e,t,n,i)=>{const o=n;o.type="string";const{minimum:u,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof l=="number"&&(o.maxLength=l),f&&(o.format=WB[f]??f,o.format===""&&delete o.format,f==="time"&&delete o.format),h&&(o.contentEncoding=h),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},tI=(e,t,n,i)=>{n.not={}},nI=(e,t,n,i)=>{},rI=(e,t,n,i)=>{const o=e._zod.def,u=f2(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},iI=(e,t,n,i)=>{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},aI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},oI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},sI=(e,t,n,i)=>{const o=n,u=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof f=="number"&&(o.maxItems=f),o.type="array",o.items=en(u.element,t,{...i,path:[...i.path,"items"]})},lI=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const l=u.shape;for(const h in l)o.properties[h]=en(l[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const p=u.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=en(u.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},uI=(e,t,n,i)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((f,d)=>en(f,t,{...i,path:[...i.path,u?"oneOf":"anyOf",d]}));u?n.oneOf=l:n.anyOf=l},cI=(e,t,n,i)=>{const o=e._zod.def,u=en(o.left,t,{...i,path:[...i.path,"allOf",0]}),l=en(o.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(u)?u.allOf:[u],...f(l)?l.allOf:[l]];n.allOf=d},fI=(e,t,n,i)=>{const o=e._zod.def,u=en(o.innerType,t,i),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},dI=(e,t,n,i)=>{const o=e._zod.def;en(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},hI=(e,t,n,i)=>{const o=e._zod.def;en(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},mI=(e,t,n,i)=>{const o=e._zod.def;en(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},pI=(e,t,n,i)=>{const o=e._zod.def;en(o.innerType,t,i);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},gI=(e,t,n,i)=>{const o=e._zod.def,u=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;en(u,t,i);const l=t.seen.get(e);l.ref=u},yI=(e,t,n,i)=>{const o=e._zod.def;en(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},j2=(e,t,n,i)=>{const o=e._zod.def;en(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},xI=re("ZodISODateTime",(e,t)=>{CZ.init(e,t),kt.init(e,t)});function vI(e){return NB(xI,e)}const bI=re("ZodISODate",(e,t)=>{AZ.init(e,t),kt.init(e,t)});function SI(e){return OB(bI,e)}const kI=re("ZodISOTime",(e,t)=>{jZ.init(e,t),kt.init(e,t)});function wI(e){return RB(kI,e)}const zI=re("ZodISODuration",(e,t)=>{NZ.init(e,t),kt.init(e,t)});function _I(e){return MB(zI,e)}const N2=(e,t)=>{g2.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>_8(e,n)},flatten:{value:n=>z8(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Sp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Sp,2)}},isEmpty:{get(){return e.issues.length===0}}})},EI=re("ZodError",N2),ar=re("ZodError",N2,{Parent:Error}),TI=Zg(ar),CI=Bg(ar),AI=lf(ar),jI=uf(ar),NI=C8(ar),OI=A8(ar),RI=j8(ar),MI=N8(ar),DI=O8(ar),$I=R8(ar),LI=M8(ar),UI=D8(ar),Ut=re("ZodType",(e,t)=>(Lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Hc(e,"input"),output:Hc(e,"output")}}),e.toJSONSchema=QB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Vi(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Zi(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>TI(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>AI(e,n,i),e.parseAsync=async(n,i)=>CI(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>jI(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>NI(e,n,i),e.decode=(n,i)=>OI(e,n,i),e.encodeAsync=async(n,i)=>RI(e,n,i),e.decodeAsync=async(n,i)=>MI(e,n,i),e.safeEncode=(n,i)=>DI(e,n,i),e.safeDecode=(n,i)=>$I(e,n,i),e.safeEncodeAsync=async(n,i)=>LI(e,n,i),e.safeDecodeAsync=async(n,i)=>UI(e,n,i),e.refine=(n,i)=>e.check(N7(n,i)),e.superRefine=n=>e.check(O7(n)),e.overwrite=n=>e.check(Jo(n)),e.optional=()=>ck(e),e.exactOptional=()=>x7(e),e.nullable=()=>fk(e),e.nullish=()=>ck(fk(e)),e.nonoptional=n=>z7(e,n),e.array=()=>s7(e),e.or=n=>R2([e,n]),e.and=n=>d7(e,n),e.transform=n=>dk(e,g7(n)),e.default=n=>S7(e,n),e.prefault=n=>w7(e,n),e.catch=n=>E7(e,n),e.pipe=n=>dk(e,n),e.readonly=()=>A7(e),e.describe=n=>{const i=e.clone();return il.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return il.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return il.get(e);const i=e.clone();return il.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),O2=re("_ZodString",(e,t)=>{Ig.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,u)=>eI(e,i,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(LB(...i)),e.includes=(...i)=>e.check(VB(...i)),e.startsWith=(...i)=>e.check(ZB(...i)),e.endsWith=(...i)=>e.check(BB(...i)),e.min=(...i)=>e.check(Ic(...i)),e.max=(...i)=>e.check(_2(...i)),e.length=(...i)=>e.check(E2(...i)),e.nonempty=(...i)=>e.check(Ic(1,...i)),e.lowercase=i=>e.check(UB(i)),e.uppercase=i=>e.check(PB(i)),e.trim=()=>e.check(HB()),e.normalize=(...i)=>e.check(IB(...i)),e.toLowerCase=()=>e.check(FB()),e.toUpperCase=()=>e.check(qB()),e.slugify=()=>e.check(GB())}),PI=re("ZodString",(e,t)=>{Ig.init(e,t),O2.init(e,t),e.email=n=>e.check(cB(VI,n)),e.url=n=>e.check(pB(ZI,n)),e.jwt=n=>e.check(jB(n7,n)),e.emoji=n=>e.check(gB(BI,n)),e.guid=n=>e.check(ok(sk,n)),e.uuid=n=>e.check(fB(mc,n)),e.uuidv4=n=>e.check(dB(mc,n)),e.uuidv6=n=>e.check(hB(mc,n)),e.uuidv7=n=>e.check(mB(mc,n)),e.nanoid=n=>e.check(yB(II,n)),e.guid=n=>e.check(ok(sk,n)),e.cuid=n=>e.check(xB(HI,n)),e.cuid2=n=>e.check(vB(FI,n)),e.ulid=n=>e.check(bB(qI,n)),e.base64=n=>e.check(TB(WI,n)),e.base64url=n=>e.check(CB(e7,n)),e.xid=n=>e.check(SB(GI,n)),e.ksuid=n=>e.check(kB(YI,n)),e.ipv4=n=>e.check(wB(XI,n)),e.ipv6=n=>e.check(zB(KI,n)),e.cidrv4=n=>e.check(_B(JI,n)),e.cidrv6=n=>e.check(EB(QI,n)),e.e164=n=>e.check(AB(t7,n)),e.datetime=n=>e.check(vI(n)),e.date=n=>e.check(SI(n)),e.time=n=>e.check(wI(n)),e.duration=n=>e.check(_I(n))});function vm(e){return uB(PI,e)}const kt=re("ZodStringFormat",(e,t)=>{yt.init(e,t),O2.init(e,t)}),VI=re("ZodEmail",(e,t)=>{vZ.init(e,t),kt.init(e,t)}),sk=re("ZodGUID",(e,t)=>{yZ.init(e,t),kt.init(e,t)}),mc=re("ZodUUID",(e,t)=>{xZ.init(e,t),kt.init(e,t)}),ZI=re("ZodURL",(e,t)=>{bZ.init(e,t),kt.init(e,t)}),BI=re("ZodEmoji",(e,t)=>{SZ.init(e,t),kt.init(e,t)}),II=re("ZodNanoID",(e,t)=>{kZ.init(e,t),kt.init(e,t)}),HI=re("ZodCUID",(e,t)=>{wZ.init(e,t),kt.init(e,t)}),FI=re("ZodCUID2",(e,t)=>{zZ.init(e,t),kt.init(e,t)}),qI=re("ZodULID",(e,t)=>{_Z.init(e,t),kt.init(e,t)}),GI=re("ZodXID",(e,t)=>{EZ.init(e,t),kt.init(e,t)}),YI=re("ZodKSUID",(e,t)=>{TZ.init(e,t),kt.init(e,t)}),XI=re("ZodIPv4",(e,t)=>{OZ.init(e,t),kt.init(e,t)}),KI=re("ZodIPv6",(e,t)=>{RZ.init(e,t),kt.init(e,t)}),JI=re("ZodCIDRv4",(e,t)=>{MZ.init(e,t),kt.init(e,t)}),QI=re("ZodCIDRv6",(e,t)=>{DZ.init(e,t),kt.init(e,t)}),WI=re("ZodBase64",(e,t)=>{$Z.init(e,t),kt.init(e,t)}),e7=re("ZodBase64URL",(e,t)=>{UZ.init(e,t),kt.init(e,t)}),t7=re("ZodE164",(e,t)=>{PZ.init(e,t),kt.init(e,t)}),n7=re("ZodJWT",(e,t)=>{ZZ.init(e,t),kt.init(e,t)}),r7=re("ZodUnknown",(e,t)=>{BZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>nI()});function lk(){return DB(r7)}const i7=re("ZodNever",(e,t)=>{IZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>tI(e,n,i)});function a7(e){return $B(i7,e)}const o7=re("ZodArray",(e,t)=>{HZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>sI(e,n,i,o),e.element=t.element,e.min=(n,i)=>e.check(Ic(n,i)),e.nonempty=n=>e.check(Ic(1,n)),e.max=(n,i)=>e.check(_2(n,i)),e.length=(n,i)=>e.check(E2(n,i)),e.unwrap=()=>e.element});function s7(e,t){return YB(o7,e,t)}const l7=re("ZodObject",(e,t)=>{qZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>lI(e,n,i,o),Ke(e,"shape",()=>t.shape),e.keyof=()=>h7(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:lk()}),e.loose=()=>e.clone({...e._zod.def,catchall:lk()}),e.strict=()=>e.clone({...e._zod.def,catchall:a7()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>v8(e,n),e.safeExtend=n=>b8(e,n),e.merge=n=>S8(e,n),e.pick=n=>y8(e,n),e.omit=n=>x8(e,n),e.partial=(...n)=>k8(M2,e,n[0]),e.required=(...n)=>w8(D2,e,n[0])});function u7(e,t){const n={type:"object",shape:e??{},...Ee(t)};return new l7(n)}const c7=re("ZodUnion",(e,t)=>{GZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>uI(e,n,i,o),e.options=t.options});function R2(e,t){return new c7({type:"union",options:e,...Ee(t)})}const f7=re("ZodIntersection",(e,t)=>{YZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>cI(e,n,i,o)});function d7(e,t){return new f7({type:"intersection",left:e,right:t})}const wp=re("ZodEnum",(e,t)=>{XZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,u)=>rI(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const u={};for(const l of i)if(n.has(l))u[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new wp({...t,checks:[],...Ee(o),entries:u})},e.exclude=(i,o)=>{const u={...t.entries};for(const l of i)if(n.has(l))delete u[l];else throw new Error(`Key ${l} not found in enum`);return new wp({...t,checks:[],...Ee(o),entries:u})}});function h7(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new wp({type:"enum",entries:n,...Ee(t)})}const m7=re("ZodLiteral",(e,t)=>{KZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>iI(e,n,i),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 uk(e,t){return new m7({type:"literal",values:Array.isArray(e)?e:[e],...Ee(t)})}const p7=re("ZodTransform",(e,t)=>{JZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>oI(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new u2(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 g7(e){return new p7({type:"transform",transform:e})}const M2=re("ZodOptional",(e,t)=>{z2.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>j2(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function ck(e){return new M2({type:"optional",innerType:e})}const y7=re("ZodExactOptional",(e,t)=>{QZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>j2(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function x7(e){return new y7({type:"optional",innerType:e})}const v7=re("ZodNullable",(e,t)=>{WZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>fI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function fk(e){return new v7({type:"nullable",innerType:e})}const b7=re("ZodDefault",(e,t)=>{eB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>hI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function S7(e,t){return new b7({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():h2(t)}})}const k7=re("ZodPrefault",(e,t)=>{tB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>mI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function w7(e,t){return new k7({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():h2(t)}})}const D2=re("ZodNonOptional",(e,t)=>{nB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>dI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function z7(e,t){return new D2({type:"nonoptional",innerType:e,...Ee(t)})}const _7=re("ZodCatch",(e,t)=>{rB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>pI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function E7(e,t){return new _7({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const T7=re("ZodPipe",(e,t)=>{iB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>gI(e,n,i,o),e.in=t.in,e.out=t.out});function dk(e,t){return new T7({type:"pipe",in:e,out:t})}const C7=re("ZodReadonly",(e,t)=>{aB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>yI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function A7(e){return new C7({type:"readonly",innerType:e})}const j7=re("ZodCustom",(e,t)=>{oB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>aI(e,n)});function N7(e,t={}){return XB(j7,e,t)}function O7(e){return KB(e)}const R7=[{id:"general",label:"General"},{id:"agents",label:"Agents"},{id:"audio",label:"Audio"},{id:"channels",label:"Channels"},{id:"ui",label:"Interface"},{id:"logging",label:"Logging"}],M7=[{id:"oracle",label:"Oracle"},{id:"sati",label:"Sati"},{id:"apoc",label:"Apoc"}],bm=[{label:"OpenAI",value:"openai"},{label:"Anthropic",value:"anthropic"},{label:"OpenRouter",value:"openrouter"},{label:"Ollama",value:"ollama"},{label:"Google Gemini",value:"gemini"}];function D7(){const{data:e,error:t}=Xr("/api/config",ho.fetchConfig),{data:n}=Xr("/api/config/sati",ho.getSatiConfig),{data:i}=Xr("/api/config/apoc",ho.getApocConfig),[o,u]=_.useState(null),[l,f]=_.useState(null),[d,h]=_.useState(null),[p,y]=_.useState("general"),[v,b]=_.useState("oracle"),[E,T]=_.useState(!1),[A,j]=_.useState({}),[O,w]=_.useState(null);_.useEffect(()=>{e&&!o&&u(e)},[e]),_.useEffect(()=>{n&&!l&&f(n)},[n]),_.useEffect(()=>{i&&!d?h(i):!i&&!d&&o&&h({...o.apoc??o.llm,temperature:o.apoc?.temperature??.2,timeout_ms:o.apoc?.timeout_ms??3e4})},[i,o]);const P=JSON.stringify(e)!==JSON.stringify(o)||JSON.stringify(n)!==JSON.stringify(l)||JSON.stringify(i)!==JSON.stringify(d),D=($,ie)=>{if(!o)return;const ve=JSON.parse(JSON.stringify(o));let se=ve;for(let ne=0;ne<$.length-1;ne++)se=se[$[ne]];se[$[$.length-1]]=ie,u(ve);try{f8.parse(ve),j({})}catch(ne){if(ne instanceof EI){const V={};ne.errors.forEach(X=>{const Z=X.path.join(".");V[Z]=X.message}),j(V)}}},L=($,ie)=>{l&&f({...l,[$]:ie})},Y=($,ie)=>{d&&h({...d,[$]:ie})},B=()=>{!o||!l||f({...l,provider:o.llm.provider,model:o.llm.model,api_key:o.llm.api_key})},J=()=>{!o||!d||h({...d,provider:o.llm.provider,model:o.llm.model,api_key:o.llm.api_key})},ue=async()=>{if(o){T(!0),w(null);try{await ho.updateConfig(o),l&&await ho.updateSatiConfig(l),d&&await ho.updateApocConfig(d),xc("/api/config"),xc("/api/config/sati"),xc("/api/config/apoc"),w({type:"success",message:"Settings saved successfully. Restart Morpheus daemon for changes to take effect."})}catch($){if(w({type:"error",message:$.message}),$.details&&Array.isArray($.details)){const ie={};$.details.forEach(ve=>{const se=ve.path.join(".");ie[se]=ve.message}),j(ie)}}finally{T(!1)}}};return t?x.jsx("div",{className:"p-8 text-red-500",children:"Failed to load configuration"}):o?x.jsxs("div",{className:"max-w-4xl mx-auto p-0 md:p-6 space-y-6",children:[x.jsxs("div",{className:"flex justify-between items-center",children:[x.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Zaion Settings"}),x.jsx("button",{onClick:ue,disabled:!P||Object.keys(A).length>0||E,className:`px-4 py-2 rounded font-medium transition-colors ${P&&Object.keys(A).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:E?"Saving...":"Save Changes"})]}),O&&x.jsx("div",{className:`p-4 rounded border ${O.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:O.message}),x.jsx("div",{className:"overflow-x-auto py-1 hide-scrollbar",children:x.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px min-w-max",children:R7.map($=>x.jsx("button",{onClick:()=>y($.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))})}),x.jsxs("div",{className:"space-y-6",children:[p==="general"&&x.jsxs(_i,{title:"Agent Identity",children:[x.jsx(Gt,{label:"Agent Name",value:o.agent.name,onChange:$=>D(["agent","name"],$.target.value),error:A["agent.name"]}),x.jsx(Gt,{label:"Personality",value:o.agent.personality,onChange:$=>D(["agent","personality"],$.target.value),error:A["agent.personality"]})]}),p==="agents"&&x.jsxs("div",{className:"space-y-4",children:[x.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px",children:M7.map($=>x.jsx("button",{onClick:()=>b($.id),className:`px-4 py-2 text-sm font-medium rounded-t-md transition-colors ${v===$.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))}),v==="oracle"&&x.jsxs(_i,{title:"Oracle Agent",children:[x.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"}),x.jsx(Ws,{label:"Provider",value:o.llm.provider,onChange:$=>D(["llm","provider"],$.target.value),options:bm,error:A["llm.provider"]}),x.jsx(Gt,{label:"Model Name",value:o.llm.model,onChange:$=>D(["llm","model"],$.target.value),error:A["llm.model"]}),x.jsx(Ti,{label:"Temperature",value:o.llm.temperature,onChange:$=>D(["llm","temperature"],parseFloat($.target.value)),step:.1,min:0,max:1,error:A["llm.temperature"]}),x.jsx(Ti,{label:"Max Tokens",value:o.llm.max_tokens??"",onChange:$=>D(["llm","max_tokens"],$.target.value?parseInt($.target.value):void 0),min:1,error:A["llm.max_tokens"],helperText:"Maximum tokens per response. Leave empty for model default."}),x.jsx(Ti,{label:"Context Window (Messages)",value:o.llm.context_window??100,onChange:$=>D(["llm","context_window"],parseInt($.target.value)),min:1,step:1,error:A["llm.context_window"],helperText:"Number of past interactions to load into LLM context (e.g., 100)."}),x.jsx(Gt,{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"&&x.jsx(Gt,{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"})]}),v==="sati"&&x.jsxs(_i,{title:"Sati Agent",children:[x.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"}),x.jsxs("div",{className:"mb-4",children:[x.jsx("button",{type:"button",onClick:B,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"}),x.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&&x.jsxs(x.Fragment,{children:[x.jsx(Ws,{label:"Provider",value:l.provider,onChange:$=>L("provider",$.target.value),options:bm}),x.jsx(Gt,{label:"Model Name",value:l.model,onChange:$=>L("model",$.target.value)}),x.jsx(Gt,{label:"API Key",type:"password",value:l.api_key||"",onChange:$=>L("api_key",$.target.value),placeholder:"sk-...",helperText:"Stored locally."}),l.provider==="openrouter"&&x.jsx(Gt,{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"}),x.jsx(Ti,{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."}),x.jsx(el,{label:"Enable Archived Sessions in Memory Retrieval",checked:l.enabled_archived_sessions??!0,onChange:$=>L("enabled_archived_sessions",$)})]})]}),v==="apoc"&&x.jsxs(_i,{title:"Apoc Agent",children:[x.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"}),x.jsxs("div",{className:"mb-4",children:[x.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"}),x.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary mt-1",children:"Copy Provider, Model, and API Key from Oracle Agent configuration"})]}),d&&x.jsxs(x.Fragment,{children:[x.jsx(Ws,{label:"Provider",value:d.provider,onChange:$=>Y("provider",$.target.value),options:bm}),x.jsx(Gt,{label:"Model Name",value:d.model,onChange:$=>Y("model",$.target.value)}),x.jsx(Ti,{label:"Temperature",value:d.temperature,onChange:$=>Y("temperature",parseFloat($.target.value)),step:.1,min:0,max:1}),x.jsx(Gt,{label:"API Key",type:"password",value:d.api_key||"",onChange:$=>Y("api_key",$.target.value),placeholder:"sk-...",helperText:"Stored locally."}),d.provider==="openrouter"&&x.jsx(Gt,{label:"Base URL",value:d.base_url||"https://openrouter.ai/api/v1",onChange:$=>Y("base_url",$.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"}),x.jsx(Gt,{label:"Working Directory",value:d.working_dir||"",onChange:$=>Y("working_dir",$.target.value),placeholder:"/home/user/projects",helperText:"Root directory for file and shell operations. Leave empty to use process working directory."}),x.jsx(Ti,{label:"Timeout (ms)",value:d.timeout_ms??3e4,onChange:$=>Y("timeout_ms",parseInt($.target.value)),min:1e3,step:1e3,helperText:"Maximum execution time for shell and system operations in milliseconds."})]})]})]}),p==="audio"&&x.jsxs(_i,{title:"Audio Transcription",children:[x.jsx(el,{label:"Enable Audio",checked:o.audio.enabled,onChange:$=>D(["audio","enabled"],$)}),x.jsx(Ws,{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:A["audio.provider"]}),x.jsx(Gt,{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:A["audio.model"]}),o.audio.provider==="ollama"&&x.jsx(Gt,{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)."}),x.jsx(Gt,{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."}),x.jsx(Ti,{label:"Max Duration (Seconds)",value:o.audio.maxDurationSeconds,onChange:$=>D(["audio","maxDurationSeconds"],parseInt($.target.value)),min:1}),x.jsx(Gt,{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"&&x.jsxs(_i,{title:"Telegram",children:[x.jsx(el,{label:"Enable Telegram",checked:o.channels.telegram.enabled,onChange:$=>D(["channels","telegram","enabled"],$)}),o.channels.telegram.enabled&&x.jsxs("div",{className:"space-y-4 mt-4 pl-4 border-l border-matrix-primary",children:[x.jsx(Gt,{label:"Bot Token",type:"password",value:o.channels.telegram.token||"",onChange:$=>D(["channels","telegram","token"],$.target.value)}),x.jsx(Gt,{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"&&x.jsxs(_i,{title:"Dashboard",children:[x.jsx(el,{label:"Enable Web UI",checked:o.ui.enabled,onChange:$=>D(["ui","enabled"],$)}),x.jsx(Ti,{label:"Port",value:o.ui.port,onChange:$=>D(["ui","port"],parseInt($.target.value)),disabled:!0,helperText:"Requires restart to change."})]}),p==="logging"&&x.jsxs(_i,{title:"Logging",children:[x.jsx(el,{label:"Enable Logging",checked:o.logging.enabled,onChange:$=>D(["logging","enabled"],$)}),x.jsx(Ws,{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"}]})]})]})]}):x.jsx("div",{className:"p-8 text-azure-primary dark:text-matrix-highlight",children:"Loading settings..."})}function $7(){const{data:e}=kN(),[t,n]=_.useState(null),{data:i,mutate:o}=wN(t);return _.useEffect(()=>{!t&&e&&e.length>0&&n(e[0].name)},[e,t]),x.jsxs(dn.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:[x.jsxs("div",{children:[x.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"SYSTEM LOGS"}),x.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"View runtime logs."})]}),x.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:[x.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:[x.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=>x.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:[x.jsx(cj,{className:"w-4 h-4 shrink-0"}),x.jsxs("div",{className:"flex flex-col overflow-hidden",children:[x.jsx("span",{className:"truncate font-bold",children:u.name}),x.jsxs("span",{className:"text-xs opacity-70",children:[(u.size/1024).toFixed(1)," KB"]})]})]},u.name))]}),x.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:[x.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:[x.jsx("span",{className:"text-azure-text-primary dark:text-matrix-highlight font-bold font-mono text-sm",children:t}),x.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:x.jsx(Tj,{className:"w-4 h-4"})})]}),x.jsx("div",{className:"flex-1 overflow-auto p-4 font-mono text-xs whitespace-pre-wrap text-azure-text-primary dark:text-white",children:i?i.lines.join(`
|
|
109
|
+
`):"Select a log file to view content..."})]})]})]})}function L7(){const[e,t]=_.useState(null),[n,i]=_.useState([]),[o,u]=_.useState(!0),[l,f]=_.useState("");if(_.useEffect(()=>{async function p(){try{const[y,v]=await Promise.all([op.fetchUsageStats(),op.fetchGroupedUsageStats()]);t(y),i(v)}catch(y){f("Failed to load usage statistics"),console.error(y)}finally{u(!1)}}p()},[]),o)return x.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 x.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 d={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},h={hidden:{y:20,opacity:0},show:{y:0,opacity:1}};return x.jsxs(dn.div,{variants:d,initial:"hidden",animate:"show",className:"space-y-6",children:[x.jsx("div",{className:"flex items-center justify-between border-b border-azure-border dark:border-matrix-primary pb-4",children:x.jsxs("div",{children:[x.jsxs("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight font-mono flex items-center gap-2",children:[x.jsx(Cm,{className:"w-6 h-6"}),"USAGE_ANALYTICS"]}),x.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1 font-mono text-sm",children:"Resource consumption tracking and metrics"})]})}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[x.jsxs(dn.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:[x.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[x.jsx(hl,{className:"w-5 h-5"}),x.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Input Tokens"})]}),x.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalInputTokens.toLocaleString()??0})]}),x.jsxs(dn.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:[x.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[x.jsx(oj,{className:"w-5 h-5"}),x.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Output Tokens"})]}),x.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalOutputTokens.toLocaleString()??0})]}),x.jsxs(dn.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:[x.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[x.jsx(Ec,{className:"w-5 h-5"}),x.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Est. Total Cost"})]}),x.jsx("p",{className:"text-3xl font-bold text-green-600 dark:text-green-400 font-mono",children:e?.totalEstimatedCostUsd!=null?`$${e.totalEstimatedCostUsd.toFixed(4)}`:"—"})]})]}),x.jsxs(dn.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:[x.jsx("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary bg-azure-bg dark:bg-zinc-900/50",children:x.jsx("h3",{className:"text-lg font-bold text-azure-text-primary dark:text-matrix-highlight font-mono uppercase",children:"Usage Breakdown by Model"})}),x.jsx("div",{className:"overflow-x-auto",children:x.jsxs("table",{className:"w-full text-left font-mono text-sm",children:[x.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:x.jsxs("tr",{children:[x.jsx("th",{className:"p-4",children:"Provider"}),x.jsx("th",{className:"p-4",children:"Model"}),x.jsx("th",{className:"p-4 text-right",children:"Messages"}),x.jsx("th",{className:"p-4 text-right",children:"Input Tokens"}),x.jsx("th",{className:"p-4 text-right",children:"Output Tokens"}),x.jsx("th",{className:"p-4 text-right",children:"Total Tokens"}),x.jsx("th",{className:"p-4 text-right",children:"Audio (s)"}),x.jsx("th",{className:"p-4 text-right",children:"Est. Cost (USD)"})]})}),x.jsx("tbody",{className:"divide-y divide-azure-border dark:divide-matrix-primary/30",children:n.length===0?x.jsx("tr",{children:x.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,y)=>x.jsxs("tr",{className:"hover:bg-azure-hover dark:hover:bg-matrix-primary/10 transition-colors",children:[x.jsx("td",{className:"p-4 font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.provider}),x.jsx("td",{className:"p-4 text-azure-text-secondary dark:text-matrix-secondary",children:p.model}),x.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.messageCount.toLocaleString()}),x.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalInputTokens.toLocaleString()}),x.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalOutputTokens.toLocaleString()}),x.jsx("td",{className:"p-4 text-right font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.totalTokens.toLocaleString()}),x.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalAudioSeconds>0?p.totalAudioSeconds.toLocaleString():"—"}),x.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}-${y}`))})]})})]})]})}const U7=()=>{const[e,t]=_.useState(""),[n,i]=_.useState(""),o=Ap(),u=hr(),l=f=>{f.preventDefault(),e&&(i(""),fetch("/api/config",{headers:{"x-architect-pass":e}}).then(async d=>{if(d.ok){localStorage.setItem("morpheus.auth.token",e);const h=u.state?.from?.pathname||"/";o(h,{replace:!0})}else i("Invalid architect password")}).catch(()=>{i("Connection failed")}))};return x.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:x.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:[x.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"}),x.jsxs("form",{onSubmit:l,className:"space-y-6",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm mb-2 opacity-70 text-azure-text-secondary dark:text-green-500",children:"ACCESS_PASS:"}),x.jsx("input",{type:"password",value:e,onChange:f=>t(f.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&&x.jsxs("div",{className:"text-red-500 text-sm animate-pulse",children:["[!] ERROR: ",n]}),x.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"})]}),x.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."})]})})},P7=({children:e})=>{const{isAuthenticated:t}=$z(),n=hr();return t?x.jsx(x.Fragment,{children:e}):x.jsx(Nk,{to:"/login",state:{from:n},replace:!0})},V7=({className:e,...t})=>x.jsx("div",{className:"relative w-full overflow-auto",children:x.jsx("table",{className:`w-full caption-bottom text-sm ${e}`,...t})}),Z7=({...e})=>x.jsx("thead",{...e}),B7=({...e})=>x.jsx("tbody",{...e}),Sm=({...e})=>x.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}),mo=({className:e,...t})=>x.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}),ca=({className:e,...t})=>x.jsx("td",{className:`p-4 align-middle [&:has([role=checkbox])]:pr-0 ${e}`,...t}),hk=({checked:e,onCheckedChange:t,className:n,...i})=>{const o=u=>{t&&t(u.target.checked),i.onChange&&i.onChange(u)};return x.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||""}`,...i})},Fc=({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 x.jsx("div",{className:o,...n})},km=({className:e,...t})=>x.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}),mk=({className:e,...t})=>x.jsx("div",{className:`flex flex-col space-y-1.5 p-6 ${e||""}`,...t}),I7=({className:e,...t})=>x.jsx("h3",{className:`text-2xl font-semibold leading-none tracking-tight ${e||""}`,...t}),wm=({className:e,...t})=>x.jsx("div",{className:`p-6 pt-0 ${e||""}`,...t}),H7=({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 x.jsx("div",{className:o,...n})},F7=({className:e,...t})=>x.jsx("div",{className:`text-sm [&_p]:leading-relaxed ${e||""}`,...t}),$2=({isOpen:e,onClose:t,title:n,children:i,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 x.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[x.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),x.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&&x.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-azure-border dark:border-matrix-primary",children:[n&&x.jsx("h3",{className:"text-lg font-semibold text-azure-text-primary dark:text-matrix-secondary",children:n}),t&&x.jsx("button",{onClick:t,className:"text-azure-text-secondary dark:text-matrix-tertiary hover:text-azure-text-primary dark:hover:text-matrix-secondary",children:x.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:x.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),x.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:i})]})]})},q7=({isOpen:e,onClose:t,memory:n})=>n?x.jsx($2,{isOpen:e,onClose:t,title:"Memory Details",size:"lg",children:x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx($j,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Category"})]}),x.jsx("div",{children:x.jsx(Fc,{variant:"outline",children:n.category})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Vj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Importance"})]}),x.jsx("div",{children:x.jsx(Fc,{variant:n.importance==="critical"?"destructive":n.importance==="high"?"default":n.importance==="medium"?"secondary":"outline",children:n.importance})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Lk,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Created"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.created_at).toLocaleString()}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Uk,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Updated"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.updated_at).toLocaleString()}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Vk,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Access Count"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.access_count}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(dj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Hash"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary break-all text-sm",children:n.hash}),n.source&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(mj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Source"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.source})]})]}),x.jsxs("div",{children:[x.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Summary"}),x.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&&x.jsxs("div",{children:[x.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Details"}),x.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})]}),x.jsx("div",{className:"flex justify-end pt-4",children:x.jsx(tr,{onClick:t,children:"Close"})})]})}):null,G7=({isOpen:e,onClose:t,onConfirm:n,title:i="Confirm Deletion",message:o="Are you sure you want to delete this item? This action cannot be undone.",confirmButtonText:u="Delete",cancelButtonText:l="Cancel"})=>x.jsx($2,{isOpen:e,onClose:t,title:i,size:"md",children:x.jsxs("div",{className:"space-y-6",children:[x.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary",children:o}),x.jsxs("div",{className:"flex justify-end gap-2",children:[x.jsx(tr,{variant:"outline",onClick:t,children:l}),x.jsx(tr,{variant:"destructive",onClick:()=>{n(),t()},children:u})]})]})}),Y7=()=>{const[e,t]=_.useState(!1),[n,i]=_.useState(null),o=_.useCallback(d=>(t(!0),i(null),at.get(d).then(h=>h).catch(h=>{throw i(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]),u=_.useCallback((d,h)=>(t(!0),i(null),at.post(d,h).then(p=>p).catch(p=>{throw i(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),l=_.useCallback((d,h)=>(t(!0),i(null),at.post(d,h).then(p=>p).catch(p=>{throw i(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),f=_.useCallback(d=>(t(!0),i(null),at.delete(d).then(h=>h).catch(h=>{throw i(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]);return{get:o,post:u,put:l,del:f,loading:e,error:n}},X7=()=>{const[e,t]=_.useState([]),[n,i]=_.useState(!0),[o,u]=_.useState([]),[l,f]=_.useState(""),[d,h]=_.useState("all"),[p,y]=_.useState("all"),[v,b]=_.useState(null),[E,T]=_.useState(!1),[A,j]=_.useState(null),[O,w]=_.useState(!1),[P,D]=_.useState(null),[L,Y]=_.useState(!1),{get:B,del:J,post:ue}=Y7();_.useEffect(()=>{$()},[]);const $=async()=>{try{i(!0);const C=await B("/sati/memories");t(C),b(null)}catch(C){b("Failed to load memories. Please try again."),console.error("Error fetching memories:",C)}finally{i(!1)}},ie=()=>{o.length===Z.length?u([]):u(Z.map(C=>C.id))},ve=C=>{o.includes(C)?u(o.filter(G=>G!==C)):u([...o,C])},se=async()=>{if(o.length!==0)try{await ue("/sati/memories/bulk-delete",{ids:o}),await $(),u([]),T(!1)}catch(C){b("Failed to delete memories. Please try again."),console.error("Error deleting memories:",C)}},ne=C=>{D(C),Y(!0)},V=async()=>{if(P)try{await J(`/sati/memories/${P}`),await $()}catch(C){b("Failed to delete memory. Please try again."),console.error("Error deleting memory:",C)}finally{D(null),Y(!1)}},X=C=>{j(C),w(!0)},Z=e.filter(C=>{const G=C.summary.toLowerCase().includes(l.toLowerCase())||C.details?.toLowerCase().includes(l.toLowerCase())||C.category.toLowerCase().includes(l.toLowerCase()),z=d==="all"||C.category===d,ae=p==="all"||C.importance===p;return G&&z&&ae&&!C.archived}),ce=Array.from(new Set(e.map(C=>C.category))),N=Array.from(new Set(e.map(C=>C.importance)));return n?x.jsx(km,{className:"w-full",children:x.jsx(wm,{className:"flex justify-center items-center h-64",children:x.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-azure-primary dark:border-matrix-highlight"})})}):x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[x.jsxs("div",{children:[x.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Sati Memories"}),x.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&&x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsxs("span",{className:"text-sm text-azure-text-muted dark:text-matrix-secondary",children:[o.length," selected"]}),x.jsxs(tr,{variant:"destructive",size:"sm",onClick:()=>T(!0),disabled:o.length===0,children:[x.jsx(Tc,{className:"w-4 h-4 mr-1"}),"Delete Selected"]})]})]}),v&&x.jsx(H7,{variant:"destructive",children:x.jsx(F7,{children:v})}),x.jsxs(km,{children:[x.jsx(mk,{className:"border-b border-azure-border dark:border-matrix-primary",children:x.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[x.jsxs("div",{className:"flex flex-col relative w-full",children:[x.jsx(jj,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-azure-text-secondary dark:text-matrix-secondary w-4 h-4"}),x.jsx("input",{type:"text",placeholder:"Search memories...",value:l,onChange:C=>f(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"})]}),x.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[x.jsxs("select",{value:d,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:[x.jsx("option",{value:"all",children:"All Categories"}),ce.map(C=>x.jsx("option",{value:C,children:C},C))]}),x.jsxs("select",{value:p,onChange:C=>y(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:[x.jsx("option",{value:"all",children:"All Importance"}),N.map(C=>x.jsx("option",{value:C,children:C},C))]})]})]})}),x.jsx(wm,{className:"p-0",children:x.jsxs(V7,{children:[x.jsx(Z7,{children:x.jsxs(Sm,{className:"hover:bg-transparent",children:[x.jsx(mo,{className:"w-12",children:x.jsx(hk,{checked:Z.length>0&&o.length===Z.length,onCheckedChange:ie})}),x.jsx(mo,{children:"Summary"}),x.jsx(mo,{children:"Category"}),x.jsx(mo,{children:"Importance"}),x.jsx(mo,{children:"Created"}),x.jsx(mo,{className:"w-32",children:"Actions"})]})}),x.jsx(B7,{children:Z.length===0?x.jsx(Sm,{children:x.jsx(ca,{colSpan:6,className:"text-center py-8 text-azure-text-secondary dark:text-matrix-secondary",children:n?"Loading memories...":"No memories found"})}):Z.map(C=>x.jsxs(Sm,{children:[x.jsx(ca,{children:x.jsx(hk,{checked:o.includes(C.id),onCheckedChange:()=>ve(C.id)})}),x.jsx(ca,{className:"font-medium max-w-xs truncate",children:C.summary}),x.jsx(ca,{children:x.jsx(Fc,{variant:"outline",children:C.category})}),x.jsx(ca,{children:x.jsx(Fc,{variant:C.importance==="critical"?"destructive":C.importance==="high"?"default":C.importance==="medium"?"secondary":"outline",children:C.importance})}),x.jsx(ca,{children:x.jsxs("div",{className:"flex items-center gap-1 text-azure-text-secondary dark:text-matrix-secondary",children:[x.jsx(Lk,{className:"w-4 h-4"}),new Date(C.created_at).toLocaleDateString()]})}),x.jsx(ca,{children:x.jsxs("div",{className:"flex gap-1",children:[x.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:x.jsx(Vk,{className:"w-4 h-4"})}),x.jsx(tr,{variant:"ghost",size:"sm",onClick:()=>ne(C.id),className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",children:x.jsx(Tc,{className:"w-4 h-4"})})]})})]},C.id))})]})})]}),E&&x.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:x.jsxs(km,{className:"w-full max-w-md mx-4",children:[x.jsx(mk,{children:x.jsx(I7,{children:"Delete Memories"})}),x.jsxs(wm,{children:[x.jsxs("p",{className:"mb-4",children:["Are you sure you want to delete ",o.length," ","memory(ies)? This action cannot be undone."]}),x.jsxs("div",{className:"flex justify-end gap-2",children:[x.jsx(tr,{variant:"outline",onClick:()=>T(!1),children:"Cancel"}),x.jsx(tr,{variant:"destructive",onClick:se,children:"Delete"})]})]})]})}),x.jsx(q7,{isOpen:O,onClose:()=>w(!1),memory:A}),x.jsx(G7,{isOpen:L,onClose:()=>Y(!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"})]})},fa=pa.getInstance(),da={fetchServers:async()=>fa.get("/mcp/servers"),addServer:async(e,t)=>fa.post("/mcp/servers",{name:e,config:t}),updateServer:async(e,t)=>fa.put(`/mcp/servers/${encodeURIComponent(e)}`,{config:t}),deleteServer:async e=>fa.delete(`/mcp/servers/${encodeURIComponent(e)}`),toggleServer:async(e,t)=>fa.patch(`/mcp/servers/${encodeURIComponent(e)}/toggle`,{enabled:t}),reloadTools:async()=>fa.post("/mcp/reload",{}),fetchStatus:async()=>fa.get("/mcp/status")},K7=({label:e,values:t,onChange:n,placeholder:i})=>{const o=t.length>0?t:[""],u=(d,h)=>{const p=[...o];p[d]=h,n(p.filter(y=>y.trim().length>0))},l=()=>n([...o,""]),f=d=>{const h=o.filter((p,y)=>y!==d);n(h.filter(p=>p.trim().length>0))};return x.jsxs("div",{className:"space-y-2",children:[x.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),o.map((d,h)=>x.jsxs("div",{className:"flex gap-2",children:[x.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:d,placeholder:i,onChange:p=>u(h,p.target.value)}),x.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(h),children:"Remove"})]},`${e}-${h}`)),x.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"})]})},pk=({label:e,values:t,onChange:n,keyPlaceholder:i,valuePlaceholder:o})=>{const u=_.useMemo(()=>t.length>0?t:[{key:"",value:""}],[t]),l=(h,p,y)=>{const v=[...u];v[h]={...v[h],[p]:y},n(v.filter(b=>b.key.trim().length>0||b.value.trim().length>0))},f=()=>n([...u,{key:"",value:""}]),d=h=>{const p=u.filter((y,v)=>v!==h);n(p.filter(y=>y.key.trim().length>0||y.value.trim().length>0))};return x.jsxs("div",{className:"space-y-2",children:[x.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),u.map((h,p)=>x.jsxs("div",{className:"grid gap-2 md:grid-cols-5",children:[x.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:i,onChange:y=>l(p,"key",y.target.value)}),x.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:y=>l(p,"value",y.target.value)}),x.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(p),children:"Remove"})]},`${e}-${p}`)),x.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:f,children:"Add entry"})]})},J7=({transport:e,command:t,url:n,args:i,env:o,headers:u,onCommandChange:l,onUrlChange:f,onArgsChange:d,onEnvChange:h,onHeadersChange:p})=>x.jsxs("div",{className:"space-y-4",children:[e==="stdio"&&x.jsxs(x.Fragment,{children:[x.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Command",x.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:y=>l(y.target.value),placeholder:"npx"})]}),x.jsx(K7,{label:"Arguments",values:i,onChange:d,placeholder:"--flag"})]}),e==="http"&&x.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["URL",x.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:y=>f(y.target.value),placeholder:"https://example.com/mcp"})]}),x.jsx(pk,{label:"Environment Variables",values:o,onChange:h,keyPlaceholder:"KEY",valuePlaceholder:"value"}),e==="http"&&x.jsx(pk,{label:"Headers",values:u,onChange:p,keyPlaceholder:"Header",valuePlaceholder:"value"})]}),Q7=u7({name:vm().min(1,"Name is required"),transport:R2([uk("stdio"),uk("http")]),command:vm().optional(),url:vm().optional()}),pc=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],zm=e=>e.reduce((t,n)=>(n.key.trim().length===0||(t[n.key]=n.value),t),{}),W7=({open:e,mode:t,initial:n,onClose:i,onSubmit:o})=>{const[u,l]=_.useState(n?.name??""),[f,d]=_.useState(n?.config.transport??"stdio"),[h,p]=_.useState(n?.config.transport==="stdio"?n.config.command:""),[y,v]=_.useState(n?.config.transport==="http"?n.config.url:""),[b,E]=_.useState(n?.config.args??[]),[T,A]=_.useState(pc(n?.config.env)),[j,O]=_.useState(n?.config.transport==="http"?pc(n.config.headers):[]),[w,P]=_.useState(null);_.useEffect(()=>{e&&(l(n?.name??""),d(n?.config.transport??"stdio"),p(n?.config.transport==="stdio"?n.config.command:""),v(n?.config.transport==="http"?n.config.url:""),E(n?.config.args??[]),A(pc(n?.config.env)),O(n?.config.transport==="http"?pc(n.config.headers):[]),P(null))},[e,n]);const D=t==="create",L=async()=>{const B=Q7.safeParse({name:u,transport:f,command:h,url:y});if(!B.success){P(B.error.issues[0]?.message??"Invalid form");return}if(f==="stdio"&&(!h||h.trim().length===0)){P("Command is required for stdio transport.");return}if(f==="http"&&(!y||y.trim().length===0)){P("URL is required for http transport.");return}const J=f==="stdio"?{transport:"stdio",command:h.trim(),args:b.length>0?b:void 0,env:T.length>0?zm(T):void 0}:{transport:"http",url:y.trim(),headers:j.length>0?zm(j):void 0,env:T.length>0?zm(T):void 0};P(null),await o(u.trim(),J)},Y=_.useMemo(()=>t==="create"?"Add MCP Server":"Edit MCP Server",[t]);return x.jsx(Ro,{open:e,onOpenChange:i,children:x.jsxs(Mo,{children:[x.jsx(Do,{children:x.jsx($o,{children:Y})}),x.jsxs("div",{className:"space-y-4",children:[x.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Name",x.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:B=>l(B.target.value),placeholder:"coolify",disabled:!D})]}),x.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Transport",x.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:f,onChange:B=>d(B.target.value),children:[x.jsx("option",{value:"stdio",children:"stdio"}),x.jsx("option",{value:"http",children:"http"})]})]}),x.jsx(J7,{transport:f,command:h,url:y,args:b,env:T,headers:j,onCommandChange:p,onUrlChange:v,onArgsChange:E,onEnvChange:A,onHeadersChange:O}),w&&x.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:w}),x.jsxs("div",{className:"flex justify-end gap-2",children:[x.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:i,children:"Cancel"}),x.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:i,onToggle:o})=>x.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:[x.jsxs("div",{className:"flex items-start justify-between gap-3",children:[x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"text-lg font-semibold text-azure-text-primary break-words dark:text-matrix-highlight",children:e.name}),x.jsx("div",{className:"text-xs uppercase tracking-wide text-azure-text-muted dark:text-matrix-secondary",children:e.config.transport})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[t&&x.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"}),x.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"})]})]}),x.jsxs("div",{className:"mt-4 space-y-2 text-sm text-azure-text-secondary dark:text-matrix-secondary",children:[e.config.transport==="stdio"&&x.jsxs("div",{className:"break-all",children:[x.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Command:"})," ",e.config.command]}),e.config.transport==="http"&&x.jsxs("div",{className:"break-all",children:[x.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&&x.jsxs("div",{className:"break-all",children:[x.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Args:"})," ",e.config.args.join(" ")]}),t&&!t.ok&&t.error&&x.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})]}),x.jsxs("div",{className:"mt-4 flex gap-2",children:[x.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"}),x.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:()=>i(e),children:"Delete"})]})]}),tH=()=>{const{data:e,error:t,mutate:n,isLoading:i}=Xr("/api/mcp/servers",()=>da.fetchServers()),[o,u]=_.useState(""),[l,f]=_.useState("all"),[d,h]=_.useState(!1),[p,y]=_.useState(null),[v,b]=_.useState(!1),[E,T]=_.useState(null),[A,j]=_.useState(null),[O,w]=_.useState({}),[P,D]=_.useState(!1),[L,Y]=_.useState(!1),B=e?.servers??[],J=_.useMemo(()=>B.filter(Z=>{const ce=Z.name.toLowerCase().includes(o.toLowerCase()),N=l==="all"||Z.config.transport===l;return ce&&N}),[B,o,l]),ue=()=>{y(null),h(!0)},$=Z=>{y(Z),h(!0)},ie=async(Z,ce)=>{try{p?await da.updateServer(p.name,ce):await da.addServer(Z,ce),h(!1),y(null),await n(),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(N){j({type:"error",message:N.message||"Failed to save MCP server."})}},ve=async Z=>{T(Z),b(!0)},se=async()=>{if(E)try{await da.deleteServer(E.name),await n(),b(!1),T(null),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(Z){j({type:"error",message:Z.message||"Failed to delete MCP server."})}},ne=async()=>{D(!0);try{const Z=await da.fetchStatus(),ce={};for(const N of Z.servers)ce[N.name]=N;w(ce)}catch(Z){j({type:"error",message:Z.message||"Failed to check MCP status."})}finally{D(!1)}},V=async()=>{Y(!0);try{await da.reloadTools(),j({type:"success",message:"MCP tools reloaded successfully."})}catch(Z){j({type:"error",message:Z.message||"Failed to reload MCP tools."})}finally{Y(!1)}},X=async(Z,ce)=>{try{await da.toggleServer(Z.name,ce),await n(),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(N){j({type:"error",message:N.message||"Failed to toggle MCP server."})}};return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[x.jsxs("div",{children:[x.jsx("h1",{className:"text-2xl font-semibold text-azure-primary dark:text-matrix-highlight",children:"MCP Servers"}),x.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Manage MCP servers stored in mcps.json."})]}),x.jsxs("div",{className:"flex gap-2",children:[x.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:ne,children:P?"Checking…":"Check Status"}),x.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"}),x.jsx("button",{type:"button",className:"rounded-md bg-azure-primary px-4 py-2 text-sm font-semibold text-white shadow hover:bg-azure-secondary dark:bg-matrix-highlight dark:text-matrix-bg hover:dark:bg-matrix-secondary",onClick:ue,children:"Add Server"})]})]}),A&&x.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}),x.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center",children:[x.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:o,onChange:Z=>u(Z.target.value),placeholder:"Search by name"}),x.jsxs("select",{className:"rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:l,onChange:Z=>f(Z.target.value),children:[x.jsx("option",{value:"all",children:"All"}),x.jsx("option",{value:"stdio",children:"stdio"}),x.jsx("option",{value:"http",children:"http"})]})]}),i&&x.jsx("div",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Loading MCP servers..."}),t&&x.jsx("div",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to load MCP servers."}),!i&&J.length===0&&x.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."}),x.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:J.map(Z=>x.jsx(eH,{server:Z,probeResult:O[Z.name],onEdit:$,onDelete:ve,onToggle:X},`${Z.name}-${Z.enabled?"on":"off"}`))}),x.jsx(W7,{open:d,mode:p?"edit":"create",initial:p??void 0,onClose:()=>h(!1),onSubmit:ie}),x.jsx(Ro,{open:v,onOpenChange:b,children:x.jsxs(Mo,{children:[x.jsx(Do,{children:x.jsx($o,{children:"Confirm Deletion"})}),x.jsxs("div",{className:"space-y-4",children:[x.jsxs("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:["Are you sure you want to delete the MCP server ",x.jsxs("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:['"',E?.name,'"']}),"? This action cannot be undone."]}),x.jsxs("div",{className:"flex justify-end gap-2",children:[x.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:()=>b(!1),children:"Cancel"}),x.jsx("button",{type:"button",className:"rounded-md bg-red-500 px-4 py-2 text-sm font-semibold text-white shadow hover:bg-red-400 dark:bg-red-600 hover:dark:bg-red-500",onClick:se,children:"Delete"})]})]})]})})]})},_m={list:()=>at.get("/model-pricing"),upsert:e=>at.post("/model-pricing",e),update:(e,t,n)=>at.put(`/model-pricing/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,n),delete:(e,t)=>at.delete(`/model-pricing/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},nH={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},gk={hidden:{opacity:0,y:10},show:{opacity:1,y:0}},rH=["anthropic","openai","google","openrouter","ollama","other"],yk=()=>({provider:"",model:"",input_price_per_1m:0,output_price_per_1m:0}),iH=()=>{const{data:e=[],mutate:t}=Xr("/api/model-pricing",()=>_m.list()),[n,i]=_.useState(!1),[o,u]=_.useState(null),[l,f]=_.useState(yk()),[d,h]=_.useState(null),[p,y]=_.useState(null),[v,b]=_.useState(!1),E=(w,P)=>{y({type:w,message:P}),setTimeout(()=>y(null),3e3)},T=()=>{u(null),f(yk()),i(!0)},A=w=>{u(w),f({...w}),i(!0)},j=async()=>{if(!(!l.provider.trim()||!l.model.trim())){b(!0);try{await _m.upsert(l),await t(),i(!1),E("success",o?"Pricing updated.":"Pricing created.")}catch{E("error","Failed to save pricing entry.")}finally{b(!1)}}},O=async()=>{if(d)try{await _m.delete(d.provider,d.model),await t(),h(null),E("success","Pricing entry deleted.")}catch{E("error","Failed to delete pricing entry.")}};return x.jsxs(dn.div,{variants:nH,initial:"hidden",animate:"show",className:"space-y-6",children:[x.jsxs(dn.div,{variants:gk,className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(Ec,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),x.jsxs("div",{children:[x.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Model Pricing"}),x.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."})]})]}),x.jsxs("button",{onClick:T,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:[x.jsx(zj,{className:"w-4 h-4"})," Add Pricing"]})]}),p&&x.jsx(dn.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}),x.jsx(dn.div,{variants:gk,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-hidden",children:x.jsxs("table",{className:"w-full text-sm",children:[x.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:x.jsx("tr",{children:["Provider","Model","Input ($/1M tokens)","Output ($/1M tokens)","Actions"].map(w=>x.jsx("th",{className:"px-4 py-3 text-left font-semibold text-azure-text-secondary dark:text-matrix-dim",children:w},w))})}),x.jsx("tbody",{children:e.length===0?x.jsx("tr",{children:x.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(w=>x.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:[x.jsx("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text capitalize",children:w.provider}),x.jsx("td",{className:"px-4 py-3 font-mono text-azure-text-primary dark:text-matrix-highlight text-xs",children:w.model}),x.jsxs("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:["$",w.input_price_per_1m.toFixed(4)]}),x.jsxs("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:["$",w.output_price_per_1m.toFixed(4)]}),x.jsx("td",{className:"px-4 py-3",children:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("button",{onClick:()=>A(w),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:x.jsx(Bk,{className:"w-4 h-4"})}),x.jsx("button",{onClick:()=>h(w),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:x.jsx(Tc,{className:"w-4 h-4"})})]})})]},`${w.provider}/${w.model}`))})]})}),x.jsx(Ro,{open:n,onOpenChange:i,children:x.jsxs(Mo,{children:[x.jsx(Do,{children:x.jsx($o,{children:o?"Edit Pricing":"Add Pricing"})}),x.jsxs("div",{className:"p-4 space-y-4",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Provider"}),o?x.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}):x.jsxs("select",{value:l.provider,onChange:w=>f({...l,provider:w.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:[x.jsx("option",{value:"",children:"Select provider..."}),rH.map(w=>x.jsx("option",{value:w,children:w},w))]})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Model"}),o?x.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}):x.jsx("input",{type:"text",value:l.model,onChange:w=>f({...l,model:w.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"})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Input price / 1M tokens ($)"}),x.jsx("input",{type:"number",min:0,step:.001,value:l.input_price_per_1m,onChange:w=>f({...l,input_price_per_1m:parseFloat(w.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"})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Output price / 1M tokens ($)"}),x.jsx("input",{type:"number",min:0,step:.001,value:l.output_price_per_1m,onChange:w=>f({...l,output_price_per_1m:parseFloat(w.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"})]})]}),x.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[x.jsx("button",{onClick:()=>i(!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"}),x.jsx("button",{onClick:j,disabled:v||!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:v?"Saving...":"Save"})]})]})]})}),x.jsx(Ro,{open:!!d,onOpenChange:w=>!w&&h(null),children:x.jsxs(Mo,{children:[x.jsx(Do,{children:x.jsx($o,{children:"Delete Pricing Entry"})}),x.jsxs("div",{className:"p-4 space-y-4",children:[x.jsxs("p",{className:"text-sm text-azure-text-primary dark:text-matrix-text",children:["Are you sure you want to delete the pricing for"," ",x.jsxs("span",{className:"font-mono font-semibold text-azure-primary dark:text-matrix-highlight",children:[d?.provider,"/",d?.model]}),"? This cannot be undone."]}),x.jsxs("div",{className:"flex justify-end gap-3",children:[x.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"}),x.jsx("button",{onClick:O,className:"px-4 py-2 rounded-lg bg-red-600 text-white text-sm font-medium hover:bg-red-700 transition-colors",children:"Delete"})]})]})]})})]})};function aH(){return x.jsx(EA,{children:x.jsxs(t0,{children:[x.jsx(Jn,{path:"/login",element:x.jsx(U7,{})}),x.jsx(Jn,{path:"/*",element:x.jsx(P7,{children:x.jsx(cD,{children:x.jsxs(t0,{children:[x.jsx(Jn,{path:"/",element:x.jsx(hD,{})}),x.jsx(Jn,{path:"/chat",element:x.jsx(U6,{})}),x.jsx(Jn,{path:"/zaion",element:x.jsx(D7,{})}),x.jsx(Jn,{path:"/logs",element:x.jsx($7,{})}),x.jsx(Jn,{path:"/stats",element:x.jsx(L7,{})}),x.jsx(Jn,{path:"/sati-memories",element:x.jsx(X7,{})}),x.jsx(Jn,{path:"/mcp-servers",element:x.jsx(tH,{})}),x.jsx(Jn,{path:"/model-pricing",element:x.jsx(iH,{})}),x.jsx(Jn,{path:"*",element:x.jsx(Nk,{to:"/",replace:!0})})]})})})})]})})}oC.createRoot(document.getElementById("root")).render(x.jsx(_.StrictMode,{children:x.jsx(aH,{})}));
|